Enumeration style with letters but overlapping
up vote
4
down vote
favorite
I'd like to use letter style enumeration for two running lists, combined into one.
The two lists have letter enumeration J-journals and C-conference. Code and output below for the two lists.
Once combined as one single list, it would allow overlapping J and C items. such as: J3 C2 J2 J1 C1
Journal list:
begin{etaremune}
renewcommand{theenumi}{Jarabic{enumi}}
item Journal 1
item Journal 2
end{etaremune}
Conference list:
begin{etaremune}
renewcommand{theenumi}{Carabic{enumi}}
item Proceeding 1
item Proceeding 2
end{etaremune}
enumerate enumitem etaremune
New contributor
add a comment |
up vote
4
down vote
favorite
I'd like to use letter style enumeration for two running lists, combined into one.
The two lists have letter enumeration J-journals and C-conference. Code and output below for the two lists.
Once combined as one single list, it would allow overlapping J and C items. such as: J3 C2 J2 J1 C1
Journal list:
begin{etaremune}
renewcommand{theenumi}{Jarabic{enumi}}
item Journal 1
item Journal 2
end{etaremune}
Conference list:
begin{etaremune}
renewcommand{theenumi}{Carabic{enumi}}
item Proceeding 1
item Proceeding 2
end{etaremune}
enumerate enumitem etaremune
New contributor
You mean that the numbers will be counted down, like J5 -> C5 -> J4 -> C4 -> ... -> J1 -> C1?
– Dũng Vũ
10 hours ago
Not exactly, I can list journals and conference items together but they are counted separately, the journals with a J and conference items with a C. They are both counted down of course descending order. I have updated my question, does it help?
– dr_rk
10 hours ago
1
it is always better to post a small test document rather than a fragment in particular it would show where you are defining etaremune
– David Carlisle
10 hours ago
add a comment |
up vote
4
down vote
favorite
up vote
4
down vote
favorite
I'd like to use letter style enumeration for two running lists, combined into one.
The two lists have letter enumeration J-journals and C-conference. Code and output below for the two lists.
Once combined as one single list, it would allow overlapping J and C items. such as: J3 C2 J2 J1 C1
Journal list:
begin{etaremune}
renewcommand{theenumi}{Jarabic{enumi}}
item Journal 1
item Journal 2
end{etaremune}
Conference list:
begin{etaremune}
renewcommand{theenumi}{Carabic{enumi}}
item Proceeding 1
item Proceeding 2
end{etaremune}
enumerate enumitem etaremune
New contributor
I'd like to use letter style enumeration for two running lists, combined into one.
The two lists have letter enumeration J-journals and C-conference. Code and output below for the two lists.
Once combined as one single list, it would allow overlapping J and C items. such as: J3 C2 J2 J1 C1
Journal list:
begin{etaremune}
renewcommand{theenumi}{Jarabic{enumi}}
item Journal 1
item Journal 2
end{etaremune}
Conference list:
begin{etaremune}
renewcommand{theenumi}{Carabic{enumi}}
item Proceeding 1
item Proceeding 2
end{etaremune}
enumerate enumitem etaremune
enumerate enumitem etaremune
New contributor
New contributor
edited 10 hours ago
New contributor
asked 11 hours ago
dr_rk
1214
1214
New contributor
New contributor
You mean that the numbers will be counted down, like J5 -> C5 -> J4 -> C4 -> ... -> J1 -> C1?
– Dũng Vũ
10 hours ago
Not exactly, I can list journals and conference items together but they are counted separately, the journals with a J and conference items with a C. They are both counted down of course descending order. I have updated my question, does it help?
– dr_rk
10 hours ago
1
it is always better to post a small test document rather than a fragment in particular it would show where you are defining etaremune
– David Carlisle
10 hours ago
add a comment |
You mean that the numbers will be counted down, like J5 -> C5 -> J4 -> C4 -> ... -> J1 -> C1?
– Dũng Vũ
10 hours ago
Not exactly, I can list journals and conference items together but they are counted separately, the journals with a J and conference items with a C. They are both counted down of course descending order. I have updated my question, does it help?
– dr_rk
10 hours ago
1
it is always better to post a small test document rather than a fragment in particular it would show where you are defining etaremune
– David Carlisle
10 hours ago
You mean that the numbers will be counted down, like J5 -> C5 -> J4 -> C4 -> ... -> J1 -> C1?
– Dũng Vũ
10 hours ago
You mean that the numbers will be counted down, like J5 -> C5 -> J4 -> C4 -> ... -> J1 -> C1?
– Dũng Vũ
10 hours ago
Not exactly, I can list journals and conference items together but they are counted separately, the journals with a J and conference items with a C. They are both counted down of course descending order. I have updated my question, does it help?
– dr_rk
10 hours ago
Not exactly, I can list journals and conference items together but they are counted separately, the journals with a J and conference items with a C. They are both counted down of course descending order. I have updated my question, does it help?
– dr_rk
10 hours ago
1
1
it is always better to post a small test document rather than a fragment in particular it would show where you are defining etaremune
– David Carlisle
10 hours ago
it is always better to post a small test document rather than a fragment in particular it would show where you are defining etaremune
– David Carlisle
10 hours ago
add a comment |
1 Answer
1
active
oldest
votes
up vote
1
down vote
The following code should do what you want.
You need to compile it twice (like with etaremune
) for the counter values to settle.
documentclass{article}
%% Counter for jcenum environments:
newcounter{jcenum}
%% Separate counters for journals and conferences:
newcounter{enumj} %% <- counts journals
newcounter{enumc} %% <- counts conferences
renewcommand*theenumj{Jarabic{enumj}}
renewcommand*theenumc{Carabic{enumc}}
%% A new enumeration environment based on itemize:
makeatletter %% <- make @ usable in macro names
newenvironment{jcenum}{%
stepcounter{jcenum}%
@ifundefined{enumjmax@arabic{jcenum}}{@namedef{enumjmax@arabic{jcenum}}{0}}{}%
@ifundefined{enumcmax@arabic{jcenum}}{@namedef{enumcmax@arabic{jcenum}}{0}}{}%
setcounter{enumj}{@nameuse{enumjmax@arabic{jcenum}}}%
setcounter{enumc}{@nameuse{enumcmax@arabic{jcenum}}}%
itemize
}{%
%% Write the number of journals/conferences to the aux files:
immediatewrite@auxout{%
stringglobalstring@namedef{enumjmax@arabic{jcenum}}%
{thenumexpr@nameuse{enumjmax@arabic{jcenum}}-value{enumj}+1}%
stringglobalstring@namedef{enumcmax@arabic{jcenum}}%
{thenumexpr@nameuse{enumcmax@arabic{jcenum}}-value{enumc}+1}%
}%
enditemize
}
makeatother %% <- revert @
%% Separate item macros for journals and conferences:
newcommand*jitem{addtocounter{enumj}{-2}refstepcounter{enumj}item[theenumj.]}
newcommand*citem{addtocounter{enumc}{-2}refstepcounter{enumc}item[theenumc.]}
begin{document}
subsection*{First environment}
begin{jcenum}
jitem First journal label{firstitem}
citem First conference
citem Second conference
jitem Second journal
citem Third conference
end{jcenum}
noindent Reference to the first item: ref{firstitem}
subsection*{Second environment}
begin{jcenum}
jitem First journal
citem First conference
citem Second conference
end{jcenum}
end{document}
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
The following code should do what you want.
You need to compile it twice (like with etaremune
) for the counter values to settle.
documentclass{article}
%% Counter for jcenum environments:
newcounter{jcenum}
%% Separate counters for journals and conferences:
newcounter{enumj} %% <- counts journals
newcounter{enumc} %% <- counts conferences
renewcommand*theenumj{Jarabic{enumj}}
renewcommand*theenumc{Carabic{enumc}}
%% A new enumeration environment based on itemize:
makeatletter %% <- make @ usable in macro names
newenvironment{jcenum}{%
stepcounter{jcenum}%
@ifundefined{enumjmax@arabic{jcenum}}{@namedef{enumjmax@arabic{jcenum}}{0}}{}%
@ifundefined{enumcmax@arabic{jcenum}}{@namedef{enumcmax@arabic{jcenum}}{0}}{}%
setcounter{enumj}{@nameuse{enumjmax@arabic{jcenum}}}%
setcounter{enumc}{@nameuse{enumcmax@arabic{jcenum}}}%
itemize
}{%
%% Write the number of journals/conferences to the aux files:
immediatewrite@auxout{%
stringglobalstring@namedef{enumjmax@arabic{jcenum}}%
{thenumexpr@nameuse{enumjmax@arabic{jcenum}}-value{enumj}+1}%
stringglobalstring@namedef{enumcmax@arabic{jcenum}}%
{thenumexpr@nameuse{enumcmax@arabic{jcenum}}-value{enumc}+1}%
}%
enditemize
}
makeatother %% <- revert @
%% Separate item macros for journals and conferences:
newcommand*jitem{addtocounter{enumj}{-2}refstepcounter{enumj}item[theenumj.]}
newcommand*citem{addtocounter{enumc}{-2}refstepcounter{enumc}item[theenumc.]}
begin{document}
subsection*{First environment}
begin{jcenum}
jitem First journal label{firstitem}
citem First conference
citem Second conference
jitem Second journal
citem Third conference
end{jcenum}
noindent Reference to the first item: ref{firstitem}
subsection*{Second environment}
begin{jcenum}
jitem First journal
citem First conference
citem Second conference
end{jcenum}
end{document}
add a comment |
up vote
1
down vote
The following code should do what you want.
You need to compile it twice (like with etaremune
) for the counter values to settle.
documentclass{article}
%% Counter for jcenum environments:
newcounter{jcenum}
%% Separate counters for journals and conferences:
newcounter{enumj} %% <- counts journals
newcounter{enumc} %% <- counts conferences
renewcommand*theenumj{Jarabic{enumj}}
renewcommand*theenumc{Carabic{enumc}}
%% A new enumeration environment based on itemize:
makeatletter %% <- make @ usable in macro names
newenvironment{jcenum}{%
stepcounter{jcenum}%
@ifundefined{enumjmax@arabic{jcenum}}{@namedef{enumjmax@arabic{jcenum}}{0}}{}%
@ifundefined{enumcmax@arabic{jcenum}}{@namedef{enumcmax@arabic{jcenum}}{0}}{}%
setcounter{enumj}{@nameuse{enumjmax@arabic{jcenum}}}%
setcounter{enumc}{@nameuse{enumcmax@arabic{jcenum}}}%
itemize
}{%
%% Write the number of journals/conferences to the aux files:
immediatewrite@auxout{%
stringglobalstring@namedef{enumjmax@arabic{jcenum}}%
{thenumexpr@nameuse{enumjmax@arabic{jcenum}}-value{enumj}+1}%
stringglobalstring@namedef{enumcmax@arabic{jcenum}}%
{thenumexpr@nameuse{enumcmax@arabic{jcenum}}-value{enumc}+1}%
}%
enditemize
}
makeatother %% <- revert @
%% Separate item macros for journals and conferences:
newcommand*jitem{addtocounter{enumj}{-2}refstepcounter{enumj}item[theenumj.]}
newcommand*citem{addtocounter{enumc}{-2}refstepcounter{enumc}item[theenumc.]}
begin{document}
subsection*{First environment}
begin{jcenum}
jitem First journal label{firstitem}
citem First conference
citem Second conference
jitem Second journal
citem Third conference
end{jcenum}
noindent Reference to the first item: ref{firstitem}
subsection*{Second environment}
begin{jcenum}
jitem First journal
citem First conference
citem Second conference
end{jcenum}
end{document}
add a comment |
up vote
1
down vote
up vote
1
down vote
The following code should do what you want.
You need to compile it twice (like with etaremune
) for the counter values to settle.
documentclass{article}
%% Counter for jcenum environments:
newcounter{jcenum}
%% Separate counters for journals and conferences:
newcounter{enumj} %% <- counts journals
newcounter{enumc} %% <- counts conferences
renewcommand*theenumj{Jarabic{enumj}}
renewcommand*theenumc{Carabic{enumc}}
%% A new enumeration environment based on itemize:
makeatletter %% <- make @ usable in macro names
newenvironment{jcenum}{%
stepcounter{jcenum}%
@ifundefined{enumjmax@arabic{jcenum}}{@namedef{enumjmax@arabic{jcenum}}{0}}{}%
@ifundefined{enumcmax@arabic{jcenum}}{@namedef{enumcmax@arabic{jcenum}}{0}}{}%
setcounter{enumj}{@nameuse{enumjmax@arabic{jcenum}}}%
setcounter{enumc}{@nameuse{enumcmax@arabic{jcenum}}}%
itemize
}{%
%% Write the number of journals/conferences to the aux files:
immediatewrite@auxout{%
stringglobalstring@namedef{enumjmax@arabic{jcenum}}%
{thenumexpr@nameuse{enumjmax@arabic{jcenum}}-value{enumj}+1}%
stringglobalstring@namedef{enumcmax@arabic{jcenum}}%
{thenumexpr@nameuse{enumcmax@arabic{jcenum}}-value{enumc}+1}%
}%
enditemize
}
makeatother %% <- revert @
%% Separate item macros for journals and conferences:
newcommand*jitem{addtocounter{enumj}{-2}refstepcounter{enumj}item[theenumj.]}
newcommand*citem{addtocounter{enumc}{-2}refstepcounter{enumc}item[theenumc.]}
begin{document}
subsection*{First environment}
begin{jcenum}
jitem First journal label{firstitem}
citem First conference
citem Second conference
jitem Second journal
citem Third conference
end{jcenum}
noindent Reference to the first item: ref{firstitem}
subsection*{Second environment}
begin{jcenum}
jitem First journal
citem First conference
citem Second conference
end{jcenum}
end{document}
The following code should do what you want.
You need to compile it twice (like with etaremune
) for the counter values to settle.
documentclass{article}
%% Counter for jcenum environments:
newcounter{jcenum}
%% Separate counters for journals and conferences:
newcounter{enumj} %% <- counts journals
newcounter{enumc} %% <- counts conferences
renewcommand*theenumj{Jarabic{enumj}}
renewcommand*theenumc{Carabic{enumc}}
%% A new enumeration environment based on itemize:
makeatletter %% <- make @ usable in macro names
newenvironment{jcenum}{%
stepcounter{jcenum}%
@ifundefined{enumjmax@arabic{jcenum}}{@namedef{enumjmax@arabic{jcenum}}{0}}{}%
@ifundefined{enumcmax@arabic{jcenum}}{@namedef{enumcmax@arabic{jcenum}}{0}}{}%
setcounter{enumj}{@nameuse{enumjmax@arabic{jcenum}}}%
setcounter{enumc}{@nameuse{enumcmax@arabic{jcenum}}}%
itemize
}{%
%% Write the number of journals/conferences to the aux files:
immediatewrite@auxout{%
stringglobalstring@namedef{enumjmax@arabic{jcenum}}%
{thenumexpr@nameuse{enumjmax@arabic{jcenum}}-value{enumj}+1}%
stringglobalstring@namedef{enumcmax@arabic{jcenum}}%
{thenumexpr@nameuse{enumcmax@arabic{jcenum}}-value{enumc}+1}%
}%
enditemize
}
makeatother %% <- revert @
%% Separate item macros for journals and conferences:
newcommand*jitem{addtocounter{enumj}{-2}refstepcounter{enumj}item[theenumj.]}
newcommand*citem{addtocounter{enumc}{-2}refstepcounter{enumc}item[theenumc.]}
begin{document}
subsection*{First environment}
begin{jcenum}
jitem First journal label{firstitem}
citem First conference
citem Second conference
jitem Second journal
citem Third conference
end{jcenum}
noindent Reference to the first item: ref{firstitem}
subsection*{Second environment}
begin{jcenum}
jitem First journal
citem First conference
citem Second conference
end{jcenum}
end{document}
edited 5 hours ago
answered 9 hours ago
Circumscribe
2,6171324
2,6171324
add a comment |
add a comment |
dr_rk is a new contributor. Be nice, and check out our Code of Conduct.
dr_rk is a new contributor. Be nice, and check out our Code of Conduct.
dr_rk is a new contributor. Be nice, and check out our Code of Conduct.
dr_rk is a new contributor. Be nice, and check out our Code of Conduct.
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%2f461127%2fenumeration-style-with-letters-but-overlapping%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
You mean that the numbers will be counted down, like J5 -> C5 -> J4 -> C4 -> ... -> J1 -> C1?
– Dũng Vũ
10 hours ago
Not exactly, I can list journals and conference items together but they are counted separately, the journals with a J and conference items with a C. They are both counted down of course descending order. I have updated my question, does it help?
– dr_rk
10 hours ago
1
it is always better to post a small test document rather than a fragment in particular it would show where you are defining etaremune
– David Carlisle
10 hours ago