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 have an enumerate list in this MWE.

\documentclass[]{beamer}
\usetheme{Madrid}
\setbeamertemplate{items}[circle]

\begin{document}

\begin{frame}
\frametitle{Example}
\begin{enumerate}
\item First one
\item Second one
\item Third one
\end{enumerate}
In the above list, 2 and 3 are what more important.
\end{frame}

\end{document}

I want "2" and "3" in the text to be the same as in the list, a blue solid circle with white numbers.

How do I do that? Thank you.

enter image description here

share|improve this question
    
possible duplicate: tex.stackexchange.com/questions/94478/… –  bloodworks Feb 24 at 17:25

3 Answers 3

up vote 4 down vote accepted

If the appearance is the only thing matters, then the following will do:

Code

\documentclass[]{beamer}
\usetheme{Madrid}
\setbeamertemplate{items}[circle]
\usepackage{tikz}

\newcommand\mynum[1]{%
  \usebeamercolor{enumerate item}%
  \tikzset{beameritem/.style={circle,inner sep=0,minimum size=2ex,text=enumerate item.bg,fill=enumerate item.fg,font=\footnotesize}}%
  \tikz[baseline=(n.base)]\node(n)[beameritem]{#1};%
}

\begin{document}

\begin{frame}
\frametitle{Example}
\begin{enumerate}
\item First one
\item Second one
\item Third one
\end{enumerate}
In the above list, \mynum{2} and \mynum{3} are what more important.
\end{frame}

\end{document}

Output

enter image description here

share|improve this answer
    
Thank you very much. –  Patrick Li Jan 6 at 21:07

This is almost the same answer, but with safe reference to label names instead of item numbers (i.e., when the item order is changed, the references are still correct).

\documentclass[]{beamer}
\usetheme{Warsaw}
\setbeamertemplate{items}[circle]
\usepackage{tikz}

\newcommand*\itemref[1]{%
\tikz[baseline=(char.base)]{%
\node[circle, fill=enumerate item.fg, inner sep=.6pt] (char) {\scriptsize\color{white}\ref{#1}};}}

\begin{document}

(Compile twice to solve the cross references).  

\begin{frame}
\frametitle{Example}
\begin{enumerate}
\item \label{one} First one
\item \label{two} Second one
\item  Last minuted included item without importance 
\item \label{three} Third one
\end{enumerate}
In the above list, \itemref{one}, \itemref{two} and \itemref{three} are the more important.

\end{frame}
\end{document}
share|improve this answer
1  
I have an error with your code: Undefined color `enumerate item.fg' –  Antonin May 14 at 6:53
    
@Antonin Still work fine in my computer with the vanilla TexLive 2013...may be you are using an outdated version? –  Fran May 14 at 9:56

With this code:

\newcommand*\circled[1]{\tikz[baseline=(char.base)]{\node[shape=circle,draw,inner sep=2pt,fill=blue] (char) {#1};}}

\circled{\color{white} 3}

you get this:

The picture shows "In your text, 2 and 3" where 2 and 3 are circled.

share|improve this answer

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.