7

Is there a way that I can start an enumerate numbering at, say 17, then have the succeeding item numbers automatically add 2 to the preceding one? Say, I want to typeset the answers to the odd-numbered exercises starting from 17, I want my list to show

17. answer 17
19. answer 19
21. answer 21
23. answer 23
.
.
.

I know that this can be done manually but after a while, typing the item numbers manually can become bothersome.

Edit I put the list in the code environment to prevent automatic renumbering.

3
  • Revolved or resolved?
    – Karthik C
    Feb 20, 2014 at 6:14
  • @AneeshKarthikC This was resolved. That is why I accepted the answer. Do you have the same problem as mine?
    – hpesoj626
    Feb 20, 2014 at 11:39
  • Yes. It worked for me!
    – Karthik C
    Feb 21, 2014 at 3:25

1 Answer 1

11

You can use a custom counter with the enumitem package, and increment this counter each time it is used as the label:

enter image description here

Code:

\documentclass{article}

\newcounter{MyCounter}
\usepackage{enumitem}

\begin{document}
\setcounter{MyCounter}{17}% initial value
\begin{enumerate}[label={\arabic{MyCounter}\addtocounter{MyCounter}{2}}]
\item abc
\item bcd
\item xyz
\end{enumerate}
\end{document}
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .