How to skip items in reverse enumerations?
I'm using the etaremune package to create a reverse enumeration and I would like to be able to alter the counter so that an item is skipped but the enumeration still ends at 1.
documentclass{article}
usepackage{etaremune}
begin{document}
begin{etaremune}
item the fourth
item the third
%%item the second
item the first
end{etaremune}
end{document}
lists etaremune
add a comment |
I'm using the etaremune package to create a reverse enumeration and I would like to be able to alter the counter so that an item is skipped but the enumeration still ends at 1.
documentclass{article}
usepackage{etaremune}
begin{document}
begin{etaremune}
item the fourth
item the third
%%item the second
item the first
end{etaremune}
end{document}
lists etaremune
add a comment |
I'm using the etaremune package to create a reverse enumeration and I would like to be able to alter the counter so that an item is skipped but the enumeration still ends at 1.
documentclass{article}
usepackage{etaremune}
begin{document}
begin{etaremune}
item the fourth
item the third
%%item the second
item the first
end{etaremune}
end{document}
lists etaremune
I'm using the etaremune package to create a reverse enumeration and I would like to be able to alter the counter so that an item is skipped but the enumeration still ends at 1.
documentclass{article}
usepackage{etaremune}
begin{document}
begin{etaremune}
item the fourth
item the third
%%item the second
item the first
end{etaremune}
end{document}
lists etaremune
lists etaremune
asked Dec 16 at 5:49
Abdallah
267210
267210
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
One way to alter the numbering is the addtocounter
command. However only using it at the location of the item being skipped will alter the items coming after it in the tex file rather than the items coming after it in the counting scheme. A solution to this inconvenience is to juggle with counters as follows.
documentclass{article}
usepackage{etaremune}
begin{document}
begin{etaremune}
addtocounter{enumi}{1}
item the fourth
item the third
%%item the second
addtocounter{enumi}{-1}
item the first
end{etaremune}
end{document}
1
An alternative to executingaddtocounter{enumi}{1}
would be to changebegin{etaremune}
tobegin{etaremune}[start=4]
. Of course, the instructionaddtocounter{enumi}{-1}
is still needed.
– Mico
Dec 16 at 8:42
add a comment |
In addition to the normal counters for enumeration environments, which now count down, etaremune
uses a second counter called EM@itemctr
.
This counter just counts up like normal and it is used to determine how many items the environment has so that the right starting value can be used during the next run.
You can thus skip an item in an etaremune
environment by decreasing @enumctr
(= enum<i+>
where <i+>
stands for an appropriate number of i
's) by one and increasing EM@itemctr
by one.
The macro etaremuneskip
, which I define below, does precisely this (and it takes an optional argument in case you want to skip multiple items).
documentclass{article}
pagestyle{empty}
usepackage{etaremune}
makeatletter %% <- make @ usable in command names
newcommand*etaremuneskip[1][1]{%
addtocounter{EM@itemctr}{#1}%
addtocounter{@enumctr}{-#1}%
}
makeatother %% <- revert @
begin{document}
begin{etaremune}
item the fourthlabel{fourth}
begin{etaremune}
item the f-th
item the e-th
etaremuneskip[3]
item the a-th
end{etaremune}
item the third label{third}
etaremuneskip
item the firstlabel{first}
end{etaremune}
end{document}
(Apart from the fact that it is localised to the place where the item should otherwise be inserted, I don't think this has any advantages to the answer you posted yourself though.)
Is there an advantage to runningetaremuneskip[3]
instead of, say,addtocounter{enumii}{-3}
?
– Mico
Dec 16 at 8:46
1
@Mico: If you do the latter (without incrementingEM@itemctr
), you'll also need to addaddtocounter{enumii}{3}
at the top of theetaremune
environment (as in the other answer). Otherwise the items will not be labelled correctly.
– Circumscribe
Dec 16 at 8:54
1
@Mico: (Apart from that, no.)
– Circumscribe
Dec 16 at 9:06
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%2f466047%2fhow-to-skip-items-in-reverse-enumerations%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
One way to alter the numbering is the addtocounter
command. However only using it at the location of the item being skipped will alter the items coming after it in the tex file rather than the items coming after it in the counting scheme. A solution to this inconvenience is to juggle with counters as follows.
documentclass{article}
usepackage{etaremune}
begin{document}
begin{etaremune}
addtocounter{enumi}{1}
item the fourth
item the third
%%item the second
addtocounter{enumi}{-1}
item the first
end{etaremune}
end{document}
1
An alternative to executingaddtocounter{enumi}{1}
would be to changebegin{etaremune}
tobegin{etaremune}[start=4]
. Of course, the instructionaddtocounter{enumi}{-1}
is still needed.
– Mico
Dec 16 at 8:42
add a comment |
One way to alter the numbering is the addtocounter
command. However only using it at the location of the item being skipped will alter the items coming after it in the tex file rather than the items coming after it in the counting scheme. A solution to this inconvenience is to juggle with counters as follows.
documentclass{article}
usepackage{etaremune}
begin{document}
begin{etaremune}
addtocounter{enumi}{1}
item the fourth
item the third
%%item the second
addtocounter{enumi}{-1}
item the first
end{etaremune}
end{document}
1
An alternative to executingaddtocounter{enumi}{1}
would be to changebegin{etaremune}
tobegin{etaremune}[start=4]
. Of course, the instructionaddtocounter{enumi}{-1}
is still needed.
– Mico
Dec 16 at 8:42
add a comment |
One way to alter the numbering is the addtocounter
command. However only using it at the location of the item being skipped will alter the items coming after it in the tex file rather than the items coming after it in the counting scheme. A solution to this inconvenience is to juggle with counters as follows.
documentclass{article}
usepackage{etaremune}
begin{document}
begin{etaremune}
addtocounter{enumi}{1}
item the fourth
item the third
%%item the second
addtocounter{enumi}{-1}
item the first
end{etaremune}
end{document}
One way to alter the numbering is the addtocounter
command. However only using it at the location of the item being skipped will alter the items coming after it in the tex file rather than the items coming after it in the counting scheme. A solution to this inconvenience is to juggle with counters as follows.
documentclass{article}
usepackage{etaremune}
begin{document}
begin{etaremune}
addtocounter{enumi}{1}
item the fourth
item the third
%%item the second
addtocounter{enumi}{-1}
item the first
end{etaremune}
end{document}
answered Dec 16 at 5:53
Abdallah
267210
267210
1
An alternative to executingaddtocounter{enumi}{1}
would be to changebegin{etaremune}
tobegin{etaremune}[start=4]
. Of course, the instructionaddtocounter{enumi}{-1}
is still needed.
– Mico
Dec 16 at 8:42
add a comment |
1
An alternative to executingaddtocounter{enumi}{1}
would be to changebegin{etaremune}
tobegin{etaremune}[start=4]
. Of course, the instructionaddtocounter{enumi}{-1}
is still needed.
– Mico
Dec 16 at 8:42
1
1
An alternative to executing
addtocounter{enumi}{1}
would be to change begin{etaremune}
to begin{etaremune}[start=4]
. Of course, the instruction addtocounter{enumi}{-1}
is still needed.– Mico
Dec 16 at 8:42
An alternative to executing
addtocounter{enumi}{1}
would be to change begin{etaremune}
to begin{etaremune}[start=4]
. Of course, the instruction addtocounter{enumi}{-1}
is still needed.– Mico
Dec 16 at 8:42
add a comment |
In addition to the normal counters for enumeration environments, which now count down, etaremune
uses a second counter called EM@itemctr
.
This counter just counts up like normal and it is used to determine how many items the environment has so that the right starting value can be used during the next run.
You can thus skip an item in an etaremune
environment by decreasing @enumctr
(= enum<i+>
where <i+>
stands for an appropriate number of i
's) by one and increasing EM@itemctr
by one.
The macro etaremuneskip
, which I define below, does precisely this (and it takes an optional argument in case you want to skip multiple items).
documentclass{article}
pagestyle{empty}
usepackage{etaremune}
makeatletter %% <- make @ usable in command names
newcommand*etaremuneskip[1][1]{%
addtocounter{EM@itemctr}{#1}%
addtocounter{@enumctr}{-#1}%
}
makeatother %% <- revert @
begin{document}
begin{etaremune}
item the fourthlabel{fourth}
begin{etaremune}
item the f-th
item the e-th
etaremuneskip[3]
item the a-th
end{etaremune}
item the third label{third}
etaremuneskip
item the firstlabel{first}
end{etaremune}
end{document}
(Apart from the fact that it is localised to the place where the item should otherwise be inserted, I don't think this has any advantages to the answer you posted yourself though.)
Is there an advantage to runningetaremuneskip[3]
instead of, say,addtocounter{enumii}{-3}
?
– Mico
Dec 16 at 8:46
1
@Mico: If you do the latter (without incrementingEM@itemctr
), you'll also need to addaddtocounter{enumii}{3}
at the top of theetaremune
environment (as in the other answer). Otherwise the items will not be labelled correctly.
– Circumscribe
Dec 16 at 8:54
1
@Mico: (Apart from that, no.)
– Circumscribe
Dec 16 at 9:06
add a comment |
In addition to the normal counters for enumeration environments, which now count down, etaremune
uses a second counter called EM@itemctr
.
This counter just counts up like normal and it is used to determine how many items the environment has so that the right starting value can be used during the next run.
You can thus skip an item in an etaremune
environment by decreasing @enumctr
(= enum<i+>
where <i+>
stands for an appropriate number of i
's) by one and increasing EM@itemctr
by one.
The macro etaremuneskip
, which I define below, does precisely this (and it takes an optional argument in case you want to skip multiple items).
documentclass{article}
pagestyle{empty}
usepackage{etaremune}
makeatletter %% <- make @ usable in command names
newcommand*etaremuneskip[1][1]{%
addtocounter{EM@itemctr}{#1}%
addtocounter{@enumctr}{-#1}%
}
makeatother %% <- revert @
begin{document}
begin{etaremune}
item the fourthlabel{fourth}
begin{etaremune}
item the f-th
item the e-th
etaremuneskip[3]
item the a-th
end{etaremune}
item the third label{third}
etaremuneskip
item the firstlabel{first}
end{etaremune}
end{document}
(Apart from the fact that it is localised to the place where the item should otherwise be inserted, I don't think this has any advantages to the answer you posted yourself though.)
Is there an advantage to runningetaremuneskip[3]
instead of, say,addtocounter{enumii}{-3}
?
– Mico
Dec 16 at 8:46
1
@Mico: If you do the latter (without incrementingEM@itemctr
), you'll also need to addaddtocounter{enumii}{3}
at the top of theetaremune
environment (as in the other answer). Otherwise the items will not be labelled correctly.
– Circumscribe
Dec 16 at 8:54
1
@Mico: (Apart from that, no.)
– Circumscribe
Dec 16 at 9:06
add a comment |
In addition to the normal counters for enumeration environments, which now count down, etaremune
uses a second counter called EM@itemctr
.
This counter just counts up like normal and it is used to determine how many items the environment has so that the right starting value can be used during the next run.
You can thus skip an item in an etaremune
environment by decreasing @enumctr
(= enum<i+>
where <i+>
stands for an appropriate number of i
's) by one and increasing EM@itemctr
by one.
The macro etaremuneskip
, which I define below, does precisely this (and it takes an optional argument in case you want to skip multiple items).
documentclass{article}
pagestyle{empty}
usepackage{etaremune}
makeatletter %% <- make @ usable in command names
newcommand*etaremuneskip[1][1]{%
addtocounter{EM@itemctr}{#1}%
addtocounter{@enumctr}{-#1}%
}
makeatother %% <- revert @
begin{document}
begin{etaremune}
item the fourthlabel{fourth}
begin{etaremune}
item the f-th
item the e-th
etaremuneskip[3]
item the a-th
end{etaremune}
item the third label{third}
etaremuneskip
item the firstlabel{first}
end{etaremune}
end{document}
(Apart from the fact that it is localised to the place where the item should otherwise be inserted, I don't think this has any advantages to the answer you posted yourself though.)
In addition to the normal counters for enumeration environments, which now count down, etaremune
uses a second counter called EM@itemctr
.
This counter just counts up like normal and it is used to determine how many items the environment has so that the right starting value can be used during the next run.
You can thus skip an item in an etaremune
environment by decreasing @enumctr
(= enum<i+>
where <i+>
stands for an appropriate number of i
's) by one and increasing EM@itemctr
by one.
The macro etaremuneskip
, which I define below, does precisely this (and it takes an optional argument in case you want to skip multiple items).
documentclass{article}
pagestyle{empty}
usepackage{etaremune}
makeatletter %% <- make @ usable in command names
newcommand*etaremuneskip[1][1]{%
addtocounter{EM@itemctr}{#1}%
addtocounter{@enumctr}{-#1}%
}
makeatother %% <- revert @
begin{document}
begin{etaremune}
item the fourthlabel{fourth}
begin{etaremune}
item the f-th
item the e-th
etaremuneskip[3]
item the a-th
end{etaremune}
item the third label{third}
etaremuneskip
item the firstlabel{first}
end{etaremune}
end{document}
(Apart from the fact that it is localised to the place where the item should otherwise be inserted, I don't think this has any advantages to the answer you posted yourself though.)
edited Dec 16 at 9:00
answered Dec 16 at 8:41
Circumscribe
4,5611432
4,5611432
Is there an advantage to runningetaremuneskip[3]
instead of, say,addtocounter{enumii}{-3}
?
– Mico
Dec 16 at 8:46
1
@Mico: If you do the latter (without incrementingEM@itemctr
), you'll also need to addaddtocounter{enumii}{3}
at the top of theetaremune
environment (as in the other answer). Otherwise the items will not be labelled correctly.
– Circumscribe
Dec 16 at 8:54
1
@Mico: (Apart from that, no.)
– Circumscribe
Dec 16 at 9:06
add a comment |
Is there an advantage to runningetaremuneskip[3]
instead of, say,addtocounter{enumii}{-3}
?
– Mico
Dec 16 at 8:46
1
@Mico: If you do the latter (without incrementingEM@itemctr
), you'll also need to addaddtocounter{enumii}{3}
at the top of theetaremune
environment (as in the other answer). Otherwise the items will not be labelled correctly.
– Circumscribe
Dec 16 at 8:54
1
@Mico: (Apart from that, no.)
– Circumscribe
Dec 16 at 9:06
Is there an advantage to running
etaremuneskip[3]
instead of, say, addtocounter{enumii}{-3}
?– Mico
Dec 16 at 8:46
Is there an advantage to running
etaremuneskip[3]
instead of, say, addtocounter{enumii}{-3}
?– Mico
Dec 16 at 8:46
1
1
@Mico: If you do the latter (without incrementing
EM@itemctr
), you'll also need to add addtocounter{enumii}{3}
at the top of the etaremune
environment (as in the other answer). Otherwise the items will not be labelled correctly.– Circumscribe
Dec 16 at 8:54
@Mico: If you do the latter (without incrementing
EM@itemctr
), you'll also need to add addtocounter{enumii}{3}
at the top of the etaremune
environment (as in the other answer). Otherwise the items will not be labelled correctly.– Circumscribe
Dec 16 at 8:54
1
1
@Mico: (Apart from that, no.)
– Circumscribe
Dec 16 at 9:06
@Mico: (Apart from that, no.)
– Circumscribe
Dec 16 at 9:06
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.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- 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%2f466047%2fhow-to-skip-items-in-reverse-enumerations%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