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;
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

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
add a comment |
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

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
@PhelypeOleinik: Why did you delete your answer? It gives valuable information.
– GuM
7 hours ago
add a comment |
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

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
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

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
cross-referencing enumerate labels
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
add a comment |
@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
add a comment |
2 Answers
2
active
oldest
votes
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
or just useenumitemto split them apart. I never even realized that barebonesenumeratebehaved 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
add a comment |
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

add a comment |
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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
or just useenumitemto split them apart. I never even realized that barebonesenumeratebehaved 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
add a comment |
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
or just useenumitemto split them apart. I never even realized that barebonesenumeratebehaved 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
add a comment |
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
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
answered 7 hours ago
GuMGuM
17.2k26 silver badges61 bronze badges
17.2k26 silver badges61 bronze badges
or just useenumitemto split them apart. I never even realized that barebonesenumeratebehaved 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
add a comment |
or just useenumitemto split them apart. I never even realized that barebonesenumeratebehaved 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
add a comment |
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

add a comment |
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

add a comment |
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

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

answered 7 hours ago
daleifdaleif
35.5k2 gold badges57 silver badges122 bronze badges
35.5k2 gold badges57 silver badges122 bronze badges
add a comment |
add a comment |
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
@PhelypeOleinik: Why did you delete your answer? It gives valuable information.
– GuM
7 hours ago