# LaTeX Beamer: two-digit numbers don't fit with enumerate square

I'm using beamer with the inner theme "rectangles". For my presentation, I need to realize an enumeration with lots of items. The items 1 to 9 look really nice (I like the font size and the rectangle size), but the two-digit numbers are squeezed into squares of the same size and almost stick out. I think it would look better with slightly wider rectangles (they don't have to be square).

I tried to fix this using this question, but only get needlessly big rectangles.

MWE to show the problem:

\documentclass{beamer}
\useinnertheme{rectangles}

\begin{document}

\begin{frame}
\begin{enumerate}
\item These
\item items
\item look
\item pretty
\item nice
\item \dots
\item \dots
\item \dots
\item \dots
\item \dots
\item but two-digit numbers
\item don't fit with the square
\end{enumerate}
\end{frame}

\end{document}


• Welcome! Try adding \usepackage{tikz} \setbeamertemplate{enumerate item}{% \usebeamercolor[bg]{item projected} \tikz[baseline=(X.base)]{\node[fill=bg,text=white,inner sep=3pt](X){\insertenumlabel};} } if you don't mind loading TikZ. – user121799 Jun 15 '18 at 5:59
• Thank you, that seems to be a good way (I'm using TikZ anyway, so I don't mind loading it). I changed to \setbeamertemplate{enumerate item}{% \usebeamercolor[bg]{item projected} \tikz[baseline=(X.base)]{\node[fill=bg,text=white,inner sep=1.2pt](X){\footnotesize\insertenumlabel};} } and like the way it looks now. Do you want to add your comment as an answer so I can mark it as accepted? – Brokie Jun 15 '18 at 6:18

A slight modification of this answer.

\documentclass{beamer}
\useinnertheme{rectangles}
\usepackage{tikz}
\setbeamertemplate{enumerate item}{%
\usebeamercolor[bg]{item projected}
\tikz[baseline=(X.base)]{\node[fill=bg,text=white,inner sep=3pt](X){\insertenumlabel};}
}

\begin{document}

\begin{frame}
\begin{enumerate}
\item These
\item items
\item look
\item pretty
\item nice
\item \dots
\item \dots
\item \dots
\item \dots
\item \dots
\item now two-digit numbers
\item fit into the squares
\end{enumerate}
\end{frame}

\end{document}


• I like this approach, because I can change the box size modifying inner sep – Brokie Jun 15 '18 at 6:35