Pull requests

#11 Declined
Repository
milksea/beamer-leoliu beamer-leoliu
Branch
default
Repository
rivanvx/beamer beamer
Branch
default

Fix a color issue of 'enumerate item' template.

Author
  1. Haiyang Liu
Reviewers
Description

Minimal working example:

% Compile with XeLaTeX
\documentclass{beamer}

\setbeamertemplate{enumerate item}[ball]

\begin{document}

\begin{frame}
  \begin{enumerate}
    \item foo
    \item bar
    \item baz
  \end{enumerate}
\end{frame}

\end{document}

Let's have a look at beamerbaseauxtemplates.sty:

\defbeamertemplate{enumerate item}{ball}
{
  \begin{pgfpicture}{-1ex}{-0.65ex}{1ex}{1ex}
    \usebeamercolor[fg]{item projected}
    {\pgftransformscale{1.75}\pgftext{\normalsize\pgfuseshading{bigsphere}}}
    {\pgftransformshift{\pgfpoint{0pt}{0.5pt}}
      \pgftext{\usebeamerfont*{item projected}\insertenumlabel}}
  \end{pgfpicture}%
}

The color is not properly changed in \pgftext. There should be a \color{fg} before \insertnumlabel.

Similarly, \color{fg} should be inserted in template enumerate subitem, enumerate subsubitem, enumerate mini template of ball style.

AFAIK, in pgf, it is not guaranteed that \color command before \pgftext changes the color of text. The \color command should be used in the argument of \pgftext instead.

Comments (0)