GeneralIncrease counter for enumerate

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
krabby
Posts: 12
Joined: Tue Mar 20, 2012 9:38 pm

Increase counter for enumerate

Post by krabby »

Hi,

I know that I can set the counter from the enumerate environment by using \setcounter{enumi}{}

But I want to increase the count enumerate does each time there is a new item.

i.e. 120 130 140 150 instead of 120 121 123 124

can someone help?

Thanks!
Last edited by cgnieder on Tue May 21, 2013 6:20 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

Increase counter for enumerate

Post by cgnieder »

You can use \numexpr to set \theenumi (which is used to typeset the formatted counter value) to multiply the enumi counter by 10. Note that the argument of \numexpr should be ended with \relax which will be gobbled by \numexpr but ensure that it doesn't scan further ahead for possible numbers. Note also that in order to typeset the number calculated by \numexpr it must be preceded with \the.

Code: Select all

\documentclass{article}

\begin{document}
\renewcommand*\theenumi{\the\numexpr(\value{enumi}*10)\relax}
\begin{enumerate}
  \item foo
  \item bar
  \item baz
\end{enumerate}

\end{document}
Regards
site moderator & package author
Post Reply