# Customising counter within enumerate-list

Please consider the following code. I would like to use the enumerate-environment to generate a list, which (for better understanding) I built with the tabular-environment. I would like to have the second item labeled as "2-5.".

\documentclass[fontsize=12pt, paper=a4]{scrartcl}

\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage{ngerman}

\begin{document}

\begin{enumerate}
\item bla
\item bla bla
\item bla bla bla
\end{enumerate}

\begin{table}[htbp]
\begin{tabular}{rl}
1. & bla \\
2-5. & bla bla   \\
6. & bla bla bla  \\
\end{tabular}
\end{table}

\end{document}


• What exactly do you want the customized enumeration to be like. Be more specific. You mean the enumerate 2-5 is brought together in one \item[2-5] sort of input? – azetina Jun 12 '12 at 22:29
• @azetina: Thx for the comment. Please see edit. – John Jun 12 '12 at 22:37

If you want to resume the numbering after a modification

\documentclass[fontsize=12pt, paper=a4]{scrartcl}

\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage{ngerman}

\begin{document}
\begin{enumerate}
\item bla \stepcounter{enumi}
\item[\theenumi--5.] bla bla \setcounter{enumi}{5}
\item bla bla bla
\end{enumerate}
\end{document}


Thanks to egreg and Mico for the correction/modification!

• You should add the period: \item[\theenumi-5.]. – egreg Jun 12 '12 at 22:51
• To highlight that you're dealing with a range of numbers rather than a simple "dash", you may want to to write \item[\theenumi--5.] (the -- will be typeset as an en-dash). – Mico Jun 13 '12 at 2:28
• @Mico That's better, thank you. I've updated the code accordingly. – percusse Jun 13 '12 at 7:55

I think you are looking for the optional argument to \item:

\documentclass[fontsize=12pt, paper=a4]{scrartcl}

\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}

\begin{document}

\begin{enumerate}
\item bla
\item bla bla bla
\end{enumerate}

\begin{table}[htbp]
\begin{tabular}{rl}
1. & bla \\
2-5. & bla bla   \\
6. & bla bla bla  \\
\end{tabular}
\end{table}

\end{document}