Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am trying to set the background color of the numbers in numbered lists that appear in my example blocks in Beamer. I thought this would do it:

\setbeamercolor{item projected example}{fg=red, bg=yellow}

It does not work. In the example below, I would like to have the numbers "1" and "2" on a dark green background.

example

share|improve this question
add comment

1 Answer

up vote 3 down vote accepted

In the absence of a complete MWE it's hard to tell, but the following seems to produce what you want

enter image description here

The important line is

\setbeamertemplate{enumerate item}[square]

Note that the colour of the \item will change within the example block, but not outside of it.

Complete MWE

\documentclass{beamer}
\setbeamertemplate{enumerate item}[square]
\usecolortheme{rose}

\begin{document}
\begin{frame}{Inside an example}
\begin{example}
  \begin{enumerate}
    \item hello
    \item world
  \end{enumerate}
\end{example}
\end{frame}

\begin{frame}{Outside example}
  \begin{enumerate}
    \item one
    \item two
  \end{enumerate}
\end{frame}
\end{document}
share|improve this answer
    
Thanks, that worked perfectly. It has greatly simplified my template too! –  Fr. Feb 17 '13 at 4:39
    
@gonzalomedina: While the answer by cmhughes shows the cleaner approach, your answer is more generic and just shows a different approach. I don't think it should be deleted. –  Daniel Feb 17 '13 at 8:25
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.