3

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}  

example

  • 1
    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
3

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!

enter image description here

  • 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
3

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

enter image description here

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

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


\begin{document}


\begin{enumerate}
\item bla
\item[2--5.]\addtocounter{enumi}{4} 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} 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.