Cross-referencing enumerate itemEnumerate and itemize undefined + captions not workingpagenote: Adding a cross-referencing mechanismHow to cross-reference labels in the text using LyX?Referencing a custom labeled item in enumitem inline listHow to cross reference to multiple appendices in an article?No new line for theorem in enumerateCross-referencing across foldersOdd Cross-Referencing BehaviourHow to prevent reference to enumeration inside new environment?

Is there any practical application for performing a double Fourier transform? ...or an inverse Fourier transform on a time-domain input?

What are some interesting features that are common cross-linguistically but don't exist in English?

When did G-d say to Yaakov that he will have 12 sons?

Mathematical uses of string theory

How would one country purchase another?

C++20 constexpr std::copy optimizations for run-time

What professions would a medieval village with a population of 100 need?

Why can't an Airbus A330 dump fuel in an emergency?

How to use "Du hast/ Du hattest'?

Defense against attacks using dictionaries

What brought these couples together?

Start from ones

Why is Boris Johnson visiting only Paris & Berlin if every member of the EU needs to agree on a withdrawal deal?

Is there a known non-euclidean geometry where two concentric circles of different radii can intersect? (as in the novel "The Universe Between")

Singleton Design Pattern implementation in a not traditional way

Fried gnocchi with spinach, bacon, cream sauce in a single pan

Would this system work to purify water?

Sleeping solo in a double sleeping bag

Numbers Decrease while Letters Increase

Shouldn't the "credit score" prevent Americans from going deeper and deeper into personal debt?

I got kicked out from graduate school in the past. How do I include this on my CV?

Why were the crew so desperate to catch Truman and return him to Seahaven?

Who was president?

Is "The life is beautiful" incorrect or just very non-idiomatic?



Cross-referencing enumerate item


Enumerate and itemize undefined + captions not workingpagenote: Adding a cross-referencing mechanismHow to cross-reference labels in the text using LyX?Referencing a custom labeled item in enumitem inline listHow to cross reference to multiple appendices in an article?No new line for theorem in enumerateCross-referencing across foldersOdd Cross-Referencing BehaviourHow to prevent reference to enumeration inside new environment?






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








3















I need to cross-reference the item in enumerate. Here is what I have.



documentclass[12pt]article
begindocument

beginenumerate
item Solve $x^2=1$.
item Solve $x^2=4$.
beginenumerate
item labelenum:1 Find all roots.
item For each root in (refenum:1), subtract 2 from it.
endenumerate
endenumerate

enddocument


enter image description here



It works fine but I want to have (a) instead of (2a) in the last line. In other words, I only want to have the label within the current enumerate. Thanks.










share|improve this question


























  • @PhelypeOleinik: Why did you delete your answer? It gives valuable information.

    – GuM
    7 hours ago

















3















I need to cross-reference the item in enumerate. Here is what I have.



documentclass[12pt]article
begindocument

beginenumerate
item Solve $x^2=1$.
item Solve $x^2=4$.
beginenumerate
item labelenum:1 Find all roots.
item For each root in (refenum:1), subtract 2 from it.
endenumerate
endenumerate

enddocument


enter image description here



It works fine but I want to have (a) instead of (2a) in the last line. In other words, I only want to have the label within the current enumerate. Thanks.










share|improve this question


























  • @PhelypeOleinik: Why did you delete your answer? It gives valuable information.

    – GuM
    7 hours ago













3












3








3








I need to cross-reference the item in enumerate. Here is what I have.



documentclass[12pt]article
begindocument

beginenumerate
item Solve $x^2=1$.
item Solve $x^2=4$.
beginenumerate
item labelenum:1 Find all roots.
item For each root in (refenum:1), subtract 2 from it.
endenumerate
endenumerate

enddocument


enter image description here



It works fine but I want to have (a) instead of (2a) in the last line. In other words, I only want to have the label within the current enumerate. Thanks.










share|improve this question
















I need to cross-reference the item in enumerate. Here is what I have.



documentclass[12pt]article
begindocument

beginenumerate
item Solve $x^2=1$.
item Solve $x^2=4$.
beginenumerate
item labelenum:1 Find all roots.
item For each root in (refenum:1), subtract 2 from it.
endenumerate
endenumerate

enddocument


enter image description here



It works fine but I want to have (a) instead of (2a) in the last line. In other words, I only want to have the label within the current enumerate. Thanks.







cross-referencing enumerate labels






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 7 hours ago









Bernard

189k7 gold badges85 silver badges224 bronze badges




189k7 gold badges85 silver badges224 bronze badges










asked 8 hours ago









Patrick LiPatrick Li

8954 gold badges12 silver badges22 bronze badges




8954 gold badges12 silver badges22 bronze badges















  • @PhelypeOleinik: Why did you delete your answer? It gives valuable information.

    – GuM
    7 hours ago

















  • @PhelypeOleinik: Why did you delete your answer? It gives valuable information.

    – GuM
    7 hours ago
















@PhelypeOleinik: Why did you delete your answer? It gives valuable information.

– GuM
7 hours ago





@PhelypeOleinik: Why did you delete your answer? It gives valuable information.

– GuM
7 hours ago










2 Answers
2






active

oldest

votes


















3















The key is to redefine the macro p@enumii, which holds the prefix used in this situation:



documentclass[12pt]article
begindocument

beginenumerate
item Solve $x^2=1$.
item Solve $x^2=4$.
beginenumerate
makeatletter
renewcommand*p@enumii
makeatother
item labelenum:1 Find all roots.
item For each root in (refenum:1), subtract 2 from it.
endenumerate
item To show that the redefinition is local:
beginenumerate
item labelenum:2 Find all roots.
item For each root in (refenum:2), subtract 2 from it.
endenumerate
endenumerate

enddocument





share|improve this answer

























  • or just use enumitem to split them apart. I never even realized that barebones enumerate behaved like that on inner lists.

    – daleif
    7 hours ago











  • @daleif: Please, do post an answer with your solution, which is surely better than mine.

    – GuM
    7 hours ago











  • @GuM :-):-). I have upvoted all :-(

    – Sebastiano
    7 hours ago


















3















Here is a different solution using the enumitem package. With it we can configure how references to items look. In this MWE I change the reference format of second level enumerate globally.



As an added bonus we do not have to mess with internals.



documentclass[12pt]article
usepackageenumitem
setlist[enumerate,2]
ref=(alph*),

begindocument

beginenumerate
item Solve $x^2=1$.
item Solve $x^2=4$.
beginenumerate
item labelenum:1 Find all roots.
item For each root in refenum:1, subtract 2 from it.
endenumerate
endenumerate

enddocument


enter image description here






share|improve this answer



























    Your Answer








    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "85"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f505262%2fcross-referencing-enumerate-item%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    3















    The key is to redefine the macro p@enumii, which holds the prefix used in this situation:



    documentclass[12pt]article
    begindocument

    beginenumerate
    item Solve $x^2=1$.
    item Solve $x^2=4$.
    beginenumerate
    makeatletter
    renewcommand*p@enumii
    makeatother
    item labelenum:1 Find all roots.
    item For each root in (refenum:1), subtract 2 from it.
    endenumerate
    item To show that the redefinition is local:
    beginenumerate
    item labelenum:2 Find all roots.
    item For each root in (refenum:2), subtract 2 from it.
    endenumerate
    endenumerate

    enddocument





    share|improve this answer

























    • or just use enumitem to split them apart. I never even realized that barebones enumerate behaved like that on inner lists.

      – daleif
      7 hours ago











    • @daleif: Please, do post an answer with your solution, which is surely better than mine.

      – GuM
      7 hours ago











    • @GuM :-):-). I have upvoted all :-(

      – Sebastiano
      7 hours ago















    3















    The key is to redefine the macro p@enumii, which holds the prefix used in this situation:



    documentclass[12pt]article
    begindocument

    beginenumerate
    item Solve $x^2=1$.
    item Solve $x^2=4$.
    beginenumerate
    makeatletter
    renewcommand*p@enumii
    makeatother
    item labelenum:1 Find all roots.
    item For each root in (refenum:1), subtract 2 from it.
    endenumerate
    item To show that the redefinition is local:
    beginenumerate
    item labelenum:2 Find all roots.
    item For each root in (refenum:2), subtract 2 from it.
    endenumerate
    endenumerate

    enddocument





    share|improve this answer

























    • or just use enumitem to split them apart. I never even realized that barebones enumerate behaved like that on inner lists.

      – daleif
      7 hours ago











    • @daleif: Please, do post an answer with your solution, which is surely better than mine.

      – GuM
      7 hours ago











    • @GuM :-):-). I have upvoted all :-(

      – Sebastiano
      7 hours ago













    3














    3










    3









    The key is to redefine the macro p@enumii, which holds the prefix used in this situation:



    documentclass[12pt]article
    begindocument

    beginenumerate
    item Solve $x^2=1$.
    item Solve $x^2=4$.
    beginenumerate
    makeatletter
    renewcommand*p@enumii
    makeatother
    item labelenum:1 Find all roots.
    item For each root in (refenum:1), subtract 2 from it.
    endenumerate
    item To show that the redefinition is local:
    beginenumerate
    item labelenum:2 Find all roots.
    item For each root in (refenum:2), subtract 2 from it.
    endenumerate
    endenumerate

    enddocument





    share|improve this answer













    The key is to redefine the macro p@enumii, which holds the prefix used in this situation:



    documentclass[12pt]article
    begindocument

    beginenumerate
    item Solve $x^2=1$.
    item Solve $x^2=4$.
    beginenumerate
    makeatletter
    renewcommand*p@enumii
    makeatother
    item labelenum:1 Find all roots.
    item For each root in (refenum:1), subtract 2 from it.
    endenumerate
    item To show that the redefinition is local:
    beginenumerate
    item labelenum:2 Find all roots.
    item For each root in (refenum:2), subtract 2 from it.
    endenumerate
    endenumerate

    enddocument






    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered 7 hours ago









    GuMGuM

    17.2k26 silver badges61 bronze badges




    17.2k26 silver badges61 bronze badges















    • or just use enumitem to split them apart. I never even realized that barebones enumerate behaved like that on inner lists.

      – daleif
      7 hours ago











    • @daleif: Please, do post an answer with your solution, which is surely better than mine.

      – GuM
      7 hours ago











    • @GuM :-):-). I have upvoted all :-(

      – Sebastiano
      7 hours ago

















    • or just use enumitem to split them apart. I never even realized that barebones enumerate behaved like that on inner lists.

      – daleif
      7 hours ago











    • @daleif: Please, do post an answer with your solution, which is surely better than mine.

      – GuM
      7 hours ago











    • @GuM :-):-). I have upvoted all :-(

      – Sebastiano
      7 hours ago
















    or just use enumitem to split them apart. I never even realized that barebones enumerate behaved like that on inner lists.

    – daleif
    7 hours ago





    or just use enumitem to split them apart. I never even realized that barebones enumerate behaved like that on inner lists.

    – daleif
    7 hours ago













    @daleif: Please, do post an answer with your solution, which is surely better than mine.

    – GuM
    7 hours ago





    @daleif: Please, do post an answer with your solution, which is surely better than mine.

    – GuM
    7 hours ago













    @GuM :-):-). I have upvoted all :-(

    – Sebastiano
    7 hours ago





    @GuM :-):-). I have upvoted all :-(

    – Sebastiano
    7 hours ago













    3















    Here is a different solution using the enumitem package. With it we can configure how references to items look. In this MWE I change the reference format of second level enumerate globally.



    As an added bonus we do not have to mess with internals.



    documentclass[12pt]article
    usepackageenumitem
    setlist[enumerate,2]
    ref=(alph*),

    begindocument

    beginenumerate
    item Solve $x^2=1$.
    item Solve $x^2=4$.
    beginenumerate
    item labelenum:1 Find all roots.
    item For each root in refenum:1, subtract 2 from it.
    endenumerate
    endenumerate

    enddocument


    enter image description here






    share|improve this answer





























      3















      Here is a different solution using the enumitem package. With it we can configure how references to items look. In this MWE I change the reference format of second level enumerate globally.



      As an added bonus we do not have to mess with internals.



      documentclass[12pt]article
      usepackageenumitem
      setlist[enumerate,2]
      ref=(alph*),

      begindocument

      beginenumerate
      item Solve $x^2=1$.
      item Solve $x^2=4$.
      beginenumerate
      item labelenum:1 Find all roots.
      item For each root in refenum:1, subtract 2 from it.
      endenumerate
      endenumerate

      enddocument


      enter image description here






      share|improve this answer



























        3














        3










        3









        Here is a different solution using the enumitem package. With it we can configure how references to items look. In this MWE I change the reference format of second level enumerate globally.



        As an added bonus we do not have to mess with internals.



        documentclass[12pt]article
        usepackageenumitem
        setlist[enumerate,2]
        ref=(alph*),

        begindocument

        beginenumerate
        item Solve $x^2=1$.
        item Solve $x^2=4$.
        beginenumerate
        item labelenum:1 Find all roots.
        item For each root in refenum:1, subtract 2 from it.
        endenumerate
        endenumerate

        enddocument


        enter image description here






        share|improve this answer













        Here is a different solution using the enumitem package. With it we can configure how references to items look. In this MWE I change the reference format of second level enumerate globally.



        As an added bonus we do not have to mess with internals.



        documentclass[12pt]article
        usepackageenumitem
        setlist[enumerate,2]
        ref=(alph*),

        begindocument

        beginenumerate
        item Solve $x^2=1$.
        item Solve $x^2=4$.
        beginenumerate
        item labelenum:1 Find all roots.
        item For each root in refenum:1, subtract 2 from it.
        endenumerate
        endenumerate

        enddocument


        enter image description here







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered 7 hours ago









        daleifdaleif

        35.5k2 gold badges57 silver badges122 bronze badges




        35.5k2 gold badges57 silver badges122 bronze badges






























            draft saved

            draft discarded
















































            Thanks for contributing an answer to TeX - LaTeX Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f505262%2fcross-referencing-enumerate-item%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Canceling a color specificationRandomly assigning color to Graphics3D objects?Default color for Filling in Mathematica 9Coloring specific elements of sets with a prime modified order in an array plotHow to pick a color differing significantly from the colors already in a given color list?Detection of the text colorColor numbers based on their valueCan color schemes for use with ColorData include opacity specification?My dynamic color schemes

            Invision Community Contents History See also References External links Navigation menuProprietaryinvisioncommunity.comIPS Community ForumsIPS Community Forumsthis blog entry"License Changes, IP.Board 3.4, and the Future""Interview -- Matt Mecham of Ibforums""CEO Invision Power Board, Matt Mecham Is a Liar, Thief!"IPB License Explanation 1.3, 1.3.1, 2.0, and 2.1ArchivedSecurity Fixes, Updates And Enhancements For IPB 1.3.1Archived"New Demo Accounts - Invision Power Services"the original"New Default Skin"the original"Invision Power Board 3.0.0 and Applications Released"the original"Archived copy"the original"Perpetual licenses being done away with""Release Notes - Invision Power Services""Introducing: IPS Community Suite 4!"Invision Community Release Notes

            François Viète Contents Biography Work and thought Bibliography See also Notes Further reading External links Navigation menup. 21Google Bookspp. 75–77Google BooksDe thou (from University of Saint Andrews)ArchivedGoogle BooksGoogle BooksGoogle BooksGoogle booksGoogle Bookscc-parthenay.frL'histoire universelle (fr)Universal History (en)ArchivedAdsabs.harvard.eduPagesperso-orange.frArchive.orgChikara Sasaki. Descartes' mathematical thought p.259Google BooksGoogle BooksGoogle Bookspp. 152 and onwardGoogle BooksGoogle BooksScribd.comGoogle Books1257-7979Google BooksGoogle BooksGoogle BooksGoogle BooksGoogle BooksGoogle BooksGallica.bnf.frGoogle BooksGoogle Books"François Viète"Francois Viète: Father of Modern Algebraic NotationThe Lawyer and the GamblerAbout TarporleySite de Jean-Paul GuichardL'algèbre nouvelle"About the Harmonicon"cb120511976(data)1188044800000 0001 0913 5903n82164680ola2013766880073431702w6vt1sb70287374827140948071409480