4

I need a simple enumerate list with a custom label but I can't use the enumitem package.

\documentclass{article}
\newcounter{mycounter}
\setcounter{mycounter}{1}
\newcommand{\mycounter}{\stepcounter\arabic{mycounter})}
\begin{document}
\begin{enumerate}
\item[\mycounter] test
\item[\mycounter] test
\end{enumerate}
\end{document}

Which throws an error. If I remove \stepcounter the error goes away but the number does not increase. Another requirement (other than not using enumitem) is that this should not affect the entire enumerate list but only some items to be chosen manually).

To clarify, I can't use enumitem nor any other package.

  • 3
    \stepcounter{} needs an argument :) – Nico Boni Oct 15 '14 at 18:50
  • Also, welcome to TeX.SX! :) – Adam Liter Oct 15 '14 at 18:51
  • Please forgive me for the super noob question... – Christian Oct 15 '14 at 18:56
3
\documentclass{article}
\newcounter{mycounter}
\setcounter{mycounter}{1}
\newcommand{\mycounter}{\stepcounter{mycounter}\arabic{mycounter}}
\begin{document}
\begin{enumerate}
\item[\mycounter] test
\item[\mycounter] test
\end{enumerate}
\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.