Is there an advantage to using the enumerate package over the enumitem package or vice versa? I use enumitem and my co-worker uses enumerate, and we're trying to decide which should be used when we collaborate.
[Tex/LaTex] What’s the difference between the enumerate and enumitem packages
#enumerateenumitempackages
Related Solutions
- Don't load
inputenc
orfontenc
manually; use UTF-8 input and thefontspec
package instead - Don't load the
textcomp
package; if you want macros to enter varios symbols, load thexunicode
package (EDIT BY LOCKSTEP: According to Ulrike Fischer, "[i]n a current system you don't need to loadxunicode
at all,fontspec
will do it at the correct place") - Use
polyglossia
instead ofbabel
- For OpenType math support, use
unicode-math
instead ofamsfonts
/amssymb
etc. (butamsmath
can/should still be used). - The
xltxtra
package isn't necessary any more
Everything in this list is probably valid for LuaLaTeX, too, with the exception of xunicode
, which requires XeTeX.
I would suggest not to use enumitem
with beamer
, since this combination could produce more damages than benefits. Take for example the code given in the answer you linked to in your question:
\documentclass[12pt]{beamer}
\usetheme{Singapore}
\usepackage{enumitem}
\setenumerate[1]{%
label=\protect\usebeamerfont{enumerate item}%
\protect\usebeamercolor[fg]{enumerate item}%
\insertenumlabel.}
\begin{document}
\begin{frame}
\begin{enumerate}
\item First item
\item Second item
\end{enumerate}
\end{frame}
\end{document}
This code works and apparently everything it's OK, but something this code "hides" is that now enumerate
is not overlay-aware and this is a serious drawback; adding the typical overlay specification
\documentclass[12pt]{beamer}
\usetheme{Singapore}
\usepackage{enumitem}
\setenumerate[1]{%
label=\protect\usebeamerfont{enumerate item}%
\protect\usebeamercolor[fg]{enumerate item}%
\insertenumlabel.}
\begin{document}
\begin{frame}
\begin{enumerate}[<+->]
\item First item
\item Second item
\end{enumerate}
\end{frame}
\end{document}
you get the error message
! Package enumitem Error: <+-> undefined.
See the enumitem package documentation for explanation. Type H <return> for immediate help. ...
l.14 \end{frame}
If you want to customize the list-like environments, you can do it by redefining the corresponding elements as they are defined in beamer
. For example, the definitions for the enumerate item
template for each one of the predefined options (default
, ball
, circle
, square
) can be found in the file beamerbaseauxtemplates.sty
. You can then change this definitions according to your needs; a little example, increasing the size of the circle and adding a final dot after the label of the enumeration:
\documentclass[12pt]{beamer}
\makeatletter
\setbeamertemplate{enumerate item}
{
\begin{pgfpicture}{-1ex}{-0.65ex}{1ex}{1ex}
\usebeamercolor[fg]{item projected}
{\pgftransformscale{2}\pgftext{\normalsize\pgfuseshading{bigsphere}}}
{\pgftransformshift{\pgfpoint{0pt}{0.5pt}}
\pgftext{\usebeamerfont*{item projected}\insertenumlabel.}}
\end{pgfpicture}%
}
\makeatother
\begin{document}
\begin{frame}
\begin{enumerate}
\item First item
\item Second item
\end{enumerate}
\end{frame}
\end{document}
Best Answer
use
enumitem
(I wroteenumerate
)