# writing inside a ball in a itemize/enumerate in Beamer

I am doing a Beamer and I don't know how to put something like that:

\begin{enumerate}
\item item1
\end{enumerate}

\begin{itemize}
\item[1'] % I want that the 1' appears inside a ball.
\end{itemize}

\begin{enumerate}\setcounter{enumi}{1}
\item item2
\item item3
\end{enumerate}

-
Do you want the ball to become an ellipse to accomodate for the extra width or do you want to set up the ball size at the beginning for all? – percusse Sep 16 '12 at 20:39

The easy way for automatic numeration: use an appropriate theme in the preamble:

\usetheme{JuanLesPins} % or Madrid, or ...


The hard way for the same: remember to write

\setbeamertemplate{items}[ball]


(...and set more things to have an attractive presentation).

For custom items a solution could be tikz macro that can look almost as the default numbered items, but in long items the ball become enormous. The same as rounded boxes are more elegant in this case. There are other possible decorations without managing directly tkiz. For example, the menukeys, or without extra packages, with \fbox or \textcircle (but the last one do not allow much more that one digit). With the pifont package it is possible print one digit in filled circle, but anything extra must be outside. A comparison of these methods is made in this MWE:

\documentclass{beamer}
\setbeamercolor{structure}{fg=purple}
\usepackage{pifont}   % for \ding
\usepackage{tikz}

% tkiz ball item
\newcommand*\circled[1]{\tikz[baseline=(char.base)]{
color=white,inner sep=1.2pt] (char) {\tiny #1};}}

% tkiz rounded item
\newcommand*\rounded[1]{\tikz[baseline=(char.base)]{
color=white, rounded corners=3.5pt, inner sep=2.5pt] (char) {\scriptsize #1};}}

\begin{document}
\begin{frame}{}

\begin{enumerate}
\item Default item
\item[\circled{2}] Item with {\tt tikz} ball
(not so smooth)
\item[\circled{3'}] With {\tt tikz} ball (bigger)
\item[\circled{3''b}] With {\tt tikz} ball (really big)
\item[\rounded{4}] With {\tt tikz} roundex box
\item[\rounded{4'}] With {\tt tikz} rounded box
\item[\rounded{4''b}] With {\tt tikz} rounded box
\item[\textcircled{\scriptsize{5}}'] With\textbackslash{\tt texcircled} item (not expandable)
\item[\large\ding{187}'] With {\tt pifont} (\textbackslash{ding}\{\})
\item[\small\fbox{8'}] With \textbackslash{\tt fbox}
\end{enumerate}

\end{frame}

\end{document}


-
No no... I want: 1 (inside a ball) Item 1 1' (inside a ball too) Item 1' 2 (inside a ball too) Item 2 3 (inside a ball) Item 3 And I have the problem with the 1' because the ball disappears if I put \item[1'] or \begin{enumerate}[1'] or something. – pirr Sep 16 '12 at 20:02
@pirr, I understood now, see the edited answer. – Fran Sep 16 '12 at 21:33
+1 Beautiful comparison! – Paul Gaborit Sep 17 '12 at 6:14
Perfect. :) :) :) – pirr Sep 17 '12 at 17:39

My try would be a programmatic solution, i.e., drawing your own bullet sign as you like it. The code below is based on that in the pgfmanual (probably on your disk somewhere, or here), section 5.1 Styling the nodes (pg. 61).

\documentclass[english]{beamer}

\usepackage{tikz}
\begin{document}
\def\bulletmark#1{%
\begin{tikzpicture}[baseline,%
terminal/.style={
% The shape is a rectangle with rounded corners
rectangle,minimum size=6,rounded corners=3.8,
thin,draw=black!50,       % the width and color of the border
fill=blue!70,             % the fill color
font=\scriptsize\bfseries,% the font size, possibly family
scale=0.6         % scaling of the resulting drawing
}]
\node [terminal] at (0,0.1) {\color{white} #1};
\end{tikzpicture}
}

\begin{frame}
\begin{itemize}
\item [\bulletmark{1}] something
\begin{itemize}
\item [\bulletmark{1'}] something
\item [\bulletmark{2''}] something
\begin{itemize}
\item [\bulletmark{3''}] something
\end{itemize}
\end{itemize}
\item [\bulletmark{example}] something else
\item [\bulletmark{ex}] something else
\end{itemize}

\end{frame}
\end{document}


The result would look as follows:

-