Reference with entire number in enumerate












4















So I have made this file where I list my exercises as 1.A, 1.B,... for the exercises in Chapter 1, and 2.A,2.B,... for the exercises in Chapter 2.



documentclass{book}

usepackage{enumerate}

begin{document}

chapter{Chapter 1}

Text

section{Exercises}

begin{enumerate}[arabic{chapter}.A]
item Bla. label{thislabel}
item bla. Hint: use Exercise ref{thislabel}.
end{enumerate}

end{document}


Now the reference prints only the letter A, I would like it to print 1.A instead. When using hyperref, this does not matter unless the material is printed of course.










share|improve this question























  • Welcome to TeX.SX. See this question: tex.stackexchange.com/q/464119/28557 , might be related.

    – nidhin
    Dec 13 '18 at 14:07











  • In general it's probably better to use thechapter rather than arabic{chapter}.

    – Werner
    Dec 13 '18 at 16:16
















4















So I have made this file where I list my exercises as 1.A, 1.B,... for the exercises in Chapter 1, and 2.A,2.B,... for the exercises in Chapter 2.



documentclass{book}

usepackage{enumerate}

begin{document}

chapter{Chapter 1}

Text

section{Exercises}

begin{enumerate}[arabic{chapter}.A]
item Bla. label{thislabel}
item bla. Hint: use Exercise ref{thislabel}.
end{enumerate}

end{document}


Now the reference prints only the letter A, I would like it to print 1.A instead. When using hyperref, this does not matter unless the material is printed of course.










share|improve this question























  • Welcome to TeX.SX. See this question: tex.stackexchange.com/q/464119/28557 , might be related.

    – nidhin
    Dec 13 '18 at 14:07











  • In general it's probably better to use thechapter rather than arabic{chapter}.

    – Werner
    Dec 13 '18 at 16:16














4












4








4


1






So I have made this file where I list my exercises as 1.A, 1.B,... for the exercises in Chapter 1, and 2.A,2.B,... for the exercises in Chapter 2.



documentclass{book}

usepackage{enumerate}

begin{document}

chapter{Chapter 1}

Text

section{Exercises}

begin{enumerate}[arabic{chapter}.A]
item Bla. label{thislabel}
item bla. Hint: use Exercise ref{thislabel}.
end{enumerate}

end{document}


Now the reference prints only the letter A, I would like it to print 1.A instead. When using hyperref, this does not matter unless the material is printed of course.










share|improve this question














So I have made this file where I list my exercises as 1.A, 1.B,... for the exercises in Chapter 1, and 2.A,2.B,... for the exercises in Chapter 2.



documentclass{book}

usepackage{enumerate}

begin{document}

chapter{Chapter 1}

Text

section{Exercises}

begin{enumerate}[arabic{chapter}.A]
item Bla. label{thislabel}
item bla. Hint: use Exercise ref{thislabel}.
end{enumerate}

end{document}


Now the reference prints only the letter A, I would like it to print 1.A instead. When using hyperref, this does not matter unless the material is printed of course.







cross-referencing lists enumerate






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Dec 13 '18 at 12:44









JSchooneJSchoone

1233




1233













  • Welcome to TeX.SX. See this question: tex.stackexchange.com/q/464119/28557 , might be related.

    – nidhin
    Dec 13 '18 at 14:07











  • In general it's probably better to use thechapter rather than arabic{chapter}.

    – Werner
    Dec 13 '18 at 16:16



















  • Welcome to TeX.SX. See this question: tex.stackexchange.com/q/464119/28557 , might be related.

    – nidhin
    Dec 13 '18 at 14:07











  • In general it's probably better to use thechapter rather than arabic{chapter}.

    – Werner
    Dec 13 '18 at 16:16

















Welcome to TeX.SX. See this question: tex.stackexchange.com/q/464119/28557 , might be related.

– nidhin
Dec 13 '18 at 14:07





Welcome to TeX.SX. See this question: tex.stackexchange.com/q/464119/28557 , might be related.

– nidhin
Dec 13 '18 at 14:07













In general it's probably better to use thechapter rather than arabic{chapter}.

– Werner
Dec 13 '18 at 16:16





In general it's probably better to use thechapter rather than arabic{chapter}.

– Werner
Dec 13 '18 at 16:16










2 Answers
2






active

oldest

votes


















7














Use the enumitem package:



documentclass{book}

usepackage{enumitem}

begin{document}

chapter{Chapter 1}

Text

section{Exercises}

begin{enumerate}[label=arabic{chapter}.Alph*]
item Bla. label{thislabel}
item bla. Hint: use Exercise ref{thislabel}.
end{enumerate}

end{document}


enter image description here






share|improve this answer
























  • Thank you for this solution. I've removed the enumerate package and used enumitem, as they are known not to work together. At first glance, I am not missing out on features of enumerate right now.

    – JSchoone
    Dec 13 '18 at 16:27













  • @JSchoone if you load enumitem with the shortlabels option, then it covers all of the syntax features from the enumerate package.

    – daleif
    Dec 13 '18 at 17:18



















4














A no package solution



documentclass{book}

renewcommand{theenumi}{arabic{chapter}.Alph{enumi}}
renewcommand{labelenumi}{theenumi}

usepackage{hyperref}
begin{document}

chapter{Chapter 1}

Text

section{Exercises}

begin{enumerate}
item Bla. label{thislabel}
item bla. Hint: use Exercise ref{thislabel}.
end{enumerate}

end{document}


enter image description here






share|improve this answer
























  • I've decided not to use your solution, but in the future I might, when my co-authors need enumerate instead of enumitem. But your solution seems to be global, am I wrong in that? I need enumerate environments elsewhere and don't want the numbering to be the same as the exercises. But thank you for your solution, which most surely will help others. (:

    – JSchoone
    Dec 13 '18 at 16:29











  • The approach is global but you can make it local of course for example by wrapping the two lines in a zut macro (add a % at end of first line) and the use begin{enumerate}zut ... or better define some other environment wrapping enumerate and insert there the two lines.

    – user4686
    Dec 13 '18 at 16:47











  • But enumitem is a useful package and I trust (although I never really looked) you can get with it most if not all of enumerate functionality. (hence I of course +1ed Ulrike's answer and find it the better one)

    – user4686
    Dec 13 '18 at 16:50













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%2f464692%2freference-with-entire-number-in-enumerate%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









7














Use the enumitem package:



documentclass{book}

usepackage{enumitem}

begin{document}

chapter{Chapter 1}

Text

section{Exercises}

begin{enumerate}[label=arabic{chapter}.Alph*]
item Bla. label{thislabel}
item bla. Hint: use Exercise ref{thislabel}.
end{enumerate}

end{document}


enter image description here






share|improve this answer
























  • Thank you for this solution. I've removed the enumerate package and used enumitem, as they are known not to work together. At first glance, I am not missing out on features of enumerate right now.

    – JSchoone
    Dec 13 '18 at 16:27













  • @JSchoone if you load enumitem with the shortlabels option, then it covers all of the syntax features from the enumerate package.

    – daleif
    Dec 13 '18 at 17:18
















7














Use the enumitem package:



documentclass{book}

usepackage{enumitem}

begin{document}

chapter{Chapter 1}

Text

section{Exercises}

begin{enumerate}[label=arabic{chapter}.Alph*]
item Bla. label{thislabel}
item bla. Hint: use Exercise ref{thislabel}.
end{enumerate}

end{document}


enter image description here






share|improve this answer
























  • Thank you for this solution. I've removed the enumerate package and used enumitem, as they are known not to work together. At first glance, I am not missing out on features of enumerate right now.

    – JSchoone
    Dec 13 '18 at 16:27













  • @JSchoone if you load enumitem with the shortlabels option, then it covers all of the syntax features from the enumerate package.

    – daleif
    Dec 13 '18 at 17:18














7












7








7







Use the enumitem package:



documentclass{book}

usepackage{enumitem}

begin{document}

chapter{Chapter 1}

Text

section{Exercises}

begin{enumerate}[label=arabic{chapter}.Alph*]
item Bla. label{thislabel}
item bla. Hint: use Exercise ref{thislabel}.
end{enumerate}

end{document}


enter image description here






share|improve this answer













Use the enumitem package:



documentclass{book}

usepackage{enumitem}

begin{document}

chapter{Chapter 1}

Text

section{Exercises}

begin{enumerate}[label=arabic{chapter}.Alph*]
item Bla. label{thislabel}
item bla. Hint: use Exercise ref{thislabel}.
end{enumerate}

end{document}


enter image description here







share|improve this answer












share|improve this answer



share|improve this answer










answered Dec 13 '18 at 15:41









Ulrike FischerUlrike Fischer

191k8298681




191k8298681













  • Thank you for this solution. I've removed the enumerate package and used enumitem, as they are known not to work together. At first glance, I am not missing out on features of enumerate right now.

    – JSchoone
    Dec 13 '18 at 16:27













  • @JSchoone if you load enumitem with the shortlabels option, then it covers all of the syntax features from the enumerate package.

    – daleif
    Dec 13 '18 at 17:18



















  • Thank you for this solution. I've removed the enumerate package and used enumitem, as they are known not to work together. At first glance, I am not missing out on features of enumerate right now.

    – JSchoone
    Dec 13 '18 at 16:27













  • @JSchoone if you load enumitem with the shortlabels option, then it covers all of the syntax features from the enumerate package.

    – daleif
    Dec 13 '18 at 17:18

















Thank you for this solution. I've removed the enumerate package and used enumitem, as they are known not to work together. At first glance, I am not missing out on features of enumerate right now.

– JSchoone
Dec 13 '18 at 16:27







Thank you for this solution. I've removed the enumerate package and used enumitem, as they are known not to work together. At first glance, I am not missing out on features of enumerate right now.

– JSchoone
Dec 13 '18 at 16:27















@JSchoone if you load enumitem with the shortlabels option, then it covers all of the syntax features from the enumerate package.

– daleif
Dec 13 '18 at 17:18





@JSchoone if you load enumitem with the shortlabels option, then it covers all of the syntax features from the enumerate package.

– daleif
Dec 13 '18 at 17:18











4














A no package solution



documentclass{book}

renewcommand{theenumi}{arabic{chapter}.Alph{enumi}}
renewcommand{labelenumi}{theenumi}

usepackage{hyperref}
begin{document}

chapter{Chapter 1}

Text

section{Exercises}

begin{enumerate}
item Bla. label{thislabel}
item bla. Hint: use Exercise ref{thislabel}.
end{enumerate}

end{document}


enter image description here






share|improve this answer
























  • I've decided not to use your solution, but in the future I might, when my co-authors need enumerate instead of enumitem. But your solution seems to be global, am I wrong in that? I need enumerate environments elsewhere and don't want the numbering to be the same as the exercises. But thank you for your solution, which most surely will help others. (:

    – JSchoone
    Dec 13 '18 at 16:29











  • The approach is global but you can make it local of course for example by wrapping the two lines in a zut macro (add a % at end of first line) and the use begin{enumerate}zut ... or better define some other environment wrapping enumerate and insert there the two lines.

    – user4686
    Dec 13 '18 at 16:47











  • But enumitem is a useful package and I trust (although I never really looked) you can get with it most if not all of enumerate functionality. (hence I of course +1ed Ulrike's answer and find it the better one)

    – user4686
    Dec 13 '18 at 16:50


















4














A no package solution



documentclass{book}

renewcommand{theenumi}{arabic{chapter}.Alph{enumi}}
renewcommand{labelenumi}{theenumi}

usepackage{hyperref}
begin{document}

chapter{Chapter 1}

Text

section{Exercises}

begin{enumerate}
item Bla. label{thislabel}
item bla. Hint: use Exercise ref{thislabel}.
end{enumerate}

end{document}


enter image description here






share|improve this answer
























  • I've decided not to use your solution, but in the future I might, when my co-authors need enumerate instead of enumitem. But your solution seems to be global, am I wrong in that? I need enumerate environments elsewhere and don't want the numbering to be the same as the exercises. But thank you for your solution, which most surely will help others. (:

    – JSchoone
    Dec 13 '18 at 16:29











  • The approach is global but you can make it local of course for example by wrapping the two lines in a zut macro (add a % at end of first line) and the use begin{enumerate}zut ... or better define some other environment wrapping enumerate and insert there the two lines.

    – user4686
    Dec 13 '18 at 16:47











  • But enumitem is a useful package and I trust (although I never really looked) you can get with it most if not all of enumerate functionality. (hence I of course +1ed Ulrike's answer and find it the better one)

    – user4686
    Dec 13 '18 at 16:50
















4












4








4







A no package solution



documentclass{book}

renewcommand{theenumi}{arabic{chapter}.Alph{enumi}}
renewcommand{labelenumi}{theenumi}

usepackage{hyperref}
begin{document}

chapter{Chapter 1}

Text

section{Exercises}

begin{enumerate}
item Bla. label{thislabel}
item bla. Hint: use Exercise ref{thislabel}.
end{enumerate}

end{document}


enter image description here






share|improve this answer













A no package solution



documentclass{book}

renewcommand{theenumi}{arabic{chapter}.Alph{enumi}}
renewcommand{labelenumi}{theenumi}

usepackage{hyperref}
begin{document}

chapter{Chapter 1}

Text

section{Exercises}

begin{enumerate}
item Bla. label{thislabel}
item bla. Hint: use Exercise ref{thislabel}.
end{enumerate}

end{document}


enter image description here







share|improve this answer












share|improve this answer



share|improve this answer










answered Dec 13 '18 at 16:03







user4686




















  • I've decided not to use your solution, but in the future I might, when my co-authors need enumerate instead of enumitem. But your solution seems to be global, am I wrong in that? I need enumerate environments elsewhere and don't want the numbering to be the same as the exercises. But thank you for your solution, which most surely will help others. (:

    – JSchoone
    Dec 13 '18 at 16:29











  • The approach is global but you can make it local of course for example by wrapping the two lines in a zut macro (add a % at end of first line) and the use begin{enumerate}zut ... or better define some other environment wrapping enumerate and insert there the two lines.

    – user4686
    Dec 13 '18 at 16:47











  • But enumitem is a useful package and I trust (although I never really looked) you can get with it most if not all of enumerate functionality. (hence I of course +1ed Ulrike's answer and find it the better one)

    – user4686
    Dec 13 '18 at 16:50





















  • I've decided not to use your solution, but in the future I might, when my co-authors need enumerate instead of enumitem. But your solution seems to be global, am I wrong in that? I need enumerate environments elsewhere and don't want the numbering to be the same as the exercises. But thank you for your solution, which most surely will help others. (:

    – JSchoone
    Dec 13 '18 at 16:29











  • The approach is global but you can make it local of course for example by wrapping the two lines in a zut macro (add a % at end of first line) and the use begin{enumerate}zut ... or better define some other environment wrapping enumerate and insert there the two lines.

    – user4686
    Dec 13 '18 at 16:47











  • But enumitem is a useful package and I trust (although I never really looked) you can get with it most if not all of enumerate functionality. (hence I of course +1ed Ulrike's answer and find it the better one)

    – user4686
    Dec 13 '18 at 16:50



















I've decided not to use your solution, but in the future I might, when my co-authors need enumerate instead of enumitem. But your solution seems to be global, am I wrong in that? I need enumerate environments elsewhere and don't want the numbering to be the same as the exercises. But thank you for your solution, which most surely will help others. (:

– JSchoone
Dec 13 '18 at 16:29





I've decided not to use your solution, but in the future I might, when my co-authors need enumerate instead of enumitem. But your solution seems to be global, am I wrong in that? I need enumerate environments elsewhere and don't want the numbering to be the same as the exercises. But thank you for your solution, which most surely will help others. (:

– JSchoone
Dec 13 '18 at 16:29













The approach is global but you can make it local of course for example by wrapping the two lines in a zut macro (add a % at end of first line) and the use begin{enumerate}zut ... or better define some other environment wrapping enumerate and insert there the two lines.

– user4686
Dec 13 '18 at 16:47





The approach is global but you can make it local of course for example by wrapping the two lines in a zut macro (add a % at end of first line) and the use begin{enumerate}zut ... or better define some other environment wrapping enumerate and insert there the two lines.

– user4686
Dec 13 '18 at 16:47













But enumitem is a useful package and I trust (although I never really looked) you can get with it most if not all of enumerate functionality. (hence I of course +1ed Ulrike's answer and find it the better one)

– user4686
Dec 13 '18 at 16:50







But enumitem is a useful package and I trust (although I never really looked) you can get with it most if not all of enumerate functionality. (hence I of course +1ed Ulrike's answer and find it the better one)

– user4686
Dec 13 '18 at 16:50




















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%2f464692%2freference-with-entire-number-in-enumerate%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

Tonle Sap (See)

I get strange results when I access the Sqlitedatabase with Unity C# via XAMPP

Guatemaltekische Davis-Cup-Mannschaft