# Beamer: Custom numbers enumeration

I want to allow custom numbering of examples in Beamer. In particular, I want to be able to have lists like the following (and I want to be able to use prime superscripts potentially for any number on a list):

1. Example 1.
2. Example 2. 2’. Example 2.

I’m using a suggestion made by timothymctim here: LaTeX Beamer: Enumerate with manual numbers', namely:

\documentclass{beamer}

\newcommand{\labelname}[1]{
\def\insertenumlabel{#1}%
\usebeamertemplate{enumerate item}%
}

\begin{document}

\begin{frame}
\begin{enumerate}
\item first
\item[\labelname{1'}] prime
\item second
\end{enumerate}
\end{frame}

\end{document}


Unlike timothymctim, I want to use the default theme, not Warsaw. However, when I use default theme, the custom numbered bullet point is not properly indented; it is misaligned relative to other numbers on the list. How can I control for this?

The label is properly aligned but on the right side and not on the left. A compromise could be to align it on both sides by moving the prime on top of the period.

\documentclass{beamer}

\newlength{\primewidth}
\settowidth{\primewidth}{'}

\begin{document}

\begin{frame}
\begin{enumerate}
\item first
\item[1'\hskip-\primewidth .] prime
\item second
\end{enumerate}
\end{frame}

\end{document}


To ignore the with of the prime, you can use a right overlap (\rlap):

\begin{enumerate}
\item first
\item[1\rlap{'}.] prime
\item second
\end{enumerate}


As mentioned by @samcarter, the use of \labelname is not strictly necessary here. However, it might still be useful if you use something different from the default enumerate items theme: in that case, use \labelname{1\rlap{'}} (note that the . is now omitted).

• That's a clever solution! But is the \labelname necessary in this case? Wouldn't \item[1.\rlap{'}] prime give the desired result? Mar 1, 2017 at 13:07
• @samcarter Thanks, although it's about the same solution as yours, albeit a bit shorter. You're right about the \labelname: If you use default for enumerate items, you can just use \item[1\rlap{'}.]` Mar 2, 2017 at 21:09