[Tex/LaTex] Use ball items in enumerate list with enumitem package

#enumeratebeamerenumitemlists

In Beamer, I would like to be able to use ball items (with a number inside) in an enumerate list whose layout is defined by the package enumitem.

This question is closely related to Make enumerate have beamer themes when using enumitem. Actually a hint is given but does not work.

Hereafter, my MWE.
If you remove \protect\usebeamertemplate{enumerate item}, the MWE works.

\documentclass[12pt]{beamer}
\usepackage{enumitem}
\setbeamertemplate{enumerate item}[ball]
\setenumerate[1]{%
  label=\protect\usebeamerfont{enumerate item}
        \protect\usebeamercolor[fg]{enumerate item}
        \protect\usebeamertemplate{enumerate item}
        \insertenumlabel.}
\begin{document}
\begin{frame}
  \begin{enumerate}
    \item First item
    \item Second item
  \end{enumerate}
\end{frame}
\end{document}

Would you have any suggestions to include properly the item template? Thanks.

Best Answer

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}

enter image description here

Related Question