19

I use this in my personal .sty file to change the standard enumerate scheme (when I do homework it better matches the numbering scheme in texts/MSWord):

\usepackage{enumerate}

% Change enumerate numbering scheme
\renewcommand{\theenumi}{(\alph{enumi})} 
\renewcommand{\labelenumi}{\theenumi} 
\renewcommand{\theenumii}{{(}\roman{enumii}{)}} 
\renewcommand{\labelenumii}{\theenumii}

But the other day I created a beamer presentation (that didn't call the enumerate package) and I keep getting these errors:

/etc/texmf/tex/latex/herron.sty|7 error| \labelenumi undefined.
/etc/texmf/tex/latex/herron.sty|9 error| \labelenumii undefined.

It compiles just fine and I have no complaints with the .pdf it generates, but I would like to understand why this happens (and make the error go away, mainly because I'm using Vim anf vimlatexsuite and it's a bit of pain to deal with the panes that split out).

Thanks!

2 Answers2

17

With the beamer class, enumerate labels can be customized in the desired way:

\setbeamertemplate{enumerate item}{(\alph{enumi})}
\setbeamertemplate{enumerate subitem}{(\roman{enumii})}

alt text

Stefan Kottwitz
  • 231,401
8

My guess is that the beamer class doesn't define \labelenumi etc., then \renewcommand complains, but nevertheless defines the command so that there is effectively no difference. One possible solution is to use the TeX primitive \def, which creates or overwrites commands without checks:

\def\labelenumi{\theenumi}
Philipp
  • 17,641
  • You're right. The problem is that in enumerate I can't define the labels like I am. It isn't causing a problem in the end b/c I am not using the enumerate package (if I were, the new enumeration wouldn't come across). – Richard Herron Sep 24 '10 at 21:52
  • Your pointer led me to this: http://old.nabble.com/beamer-and-labelenumi-td16034658.html I also found a slide deck form a TUG that mentions that enumerate label changing doesn't work in beamer class. – Richard Herron Sep 24 '10 at 21:53