-1

The vertical alignment of the standard itemize and enumerate symbols is not consistent in Beamer. Below is a MWE with some common symbols and manually placed reference lines. Output, code: Output

\documentclass{beamer}
\usepackage[absolute,overlay]{textpos}

\begin{document} \begin{frame} \begin{columns}[onlytextwidth]

        \column{0.15\textwidth}
        \setbeamertemplate{enumerate item}[circle]
        \setbeamertemplate{itemize item}[circle]
        \begin{itemize}
            \item Txq
        \end{itemize}
        \begin{enumerate}
            \item Txq
        \end{enumerate}


        \column{0.15\textwidth}
        \setbeamertemplate{enumerate item}[ball]
        \setbeamertemplate{itemize item}[ball]
        \begin{itemize}
            \item Txq
        \end{itemize}
        \begin{enumerate}
            \item Txq
        \end{enumerate}


        \column{0.7\textwidth}
        \setbeamertemplate{enumerate item}[square]
        \setbeamertemplate{itemize item}[default]
        \begin{itemize}
            \item Txq
        \end{itemize}
        \begin{enumerate}
            \item Txq
        \end{enumerate}

    \end{columns}

    \begin{textblock*}{3cm}(11mm,37.58mm)
        \rule{46mm}{0.1pt}
    \end{textblock*}

    \begin{textblock*}{3cm}(11mm,44.46mm)
        \rule{46mm}{0.1pt}
    \end{textblock*}
\end{frame}

\end{document}

Exactly where the symbols should be centered is perhaps a matter of taste, but some of them do not look right, and when using more than one symbol (e.g. one for items, another for subitems), the inconsistency is obviously bad. (Here seems to be room for some Beamer improvement.) How to fix it?

I use ball by default for itemize, but circle for enumerate (making the numbers more clearly visible). Both of these symbols are in my eyes placed too low. I have found that the vertical placement can be adjusted by editing beamerbaseauxtemplates.sty according to the below. See the comments for where the changes are.

% Itemize items, ball

\defbeamertemplate{itemize item}{ball}{\raise0.9pt\beamer@usesphere{item projected}{bigsphere}} % "raise" increased to lift the ball

[...]

% Enumerate items, circle

\defbeamertemplate{enumerate item}{circle} { \usebeamerfont*{item projected}% \usebeamercolor[bg]{item projected}% \begin{pgfpicture}{-1ex}{-0.3ex}{1ex}{2ex} % second argument lowered to raise the circle \pgfpathcircle{\pgfpoint{0pt}{.75ex}}{1.2ex} \pgfusepath{fill} \pgftext[base]{\color{fg}\insertenumlabel} \end{pgfpicture} }

However, it seems better to make the adjustments in the files themselves (so that the same output is reliably produced everywhere). I get stuck when trying to adapt these changes to the preamble of the document.

Lorents
  • 170

1 Answers1

1

There are several methods you can use. Here two simple ones:

  1. define the enumerate item under a new name, e.g. mycircle instead of circle

  2. if you don't need to switch between different templates, then you can use \setbeamertemplate{enumerate item}{...} to directly define the template

Both these methods have the advantage that you still have the original definition available.

Besides these, you could undefine the templates before you redefine them, as suggested by @Marijn in comments or you could patch the templates.

\documentclass{beamer}

% methode 1: \defbeamertemplate{enumerate item}{mycircle} { \usebeamerfont*{item projected}% \usebeamercolor[bg]{item projected}% \begin{pgfpicture}{-1ex}{-2ex}{1ex}{2ex} % second argument lowered to raise the circle \pgfpathcircle{\pgfpoint{0pt}{.75ex}}{1.2ex} \pgfusepath{fill} \pgftext[base]{\color{fg}\insertenumlabel} \end{pgfpicture}% } [action] {\setbeamerfont{item projected}{size=\scriptsize}} \setbeamertemplate{enumerate item}[mycircle]

\makeatletter \defbeamertemplate{itemize item}{myball}{\raise4pt\beamer@usesphere{item projected}{bigsphere}} \makeatother \setbeamertemplate{itemize item}[myball]

% methode 2:

%\setbeamertemplate{enumerate item} %{ % \usebeamerfont*{item projected}% % \usebeamercolor[bg]{item projected}% % \begin{pgfpicture}{-1ex}{-2ex}{1ex}{2ex} % second argument lowered to raise the circle % \pgfpathcircle{\pgfpoint{0pt}{.75ex}}{1.2ex} % \pgfusepath{fill} % \pgftext[base]{\color{fg}\insertenumlabel} % \end{pgfpicture}% %} %\setbeamerfont{item projected}{size=\scriptsize} % %\makeatletter %\setbeamertemplate{itemize item}{\raise4pt\beamer@usesphere{item projected}{bigsphere}} %\makeatother

\begin{document} \begin{frame} \begin{enumerate} \item Txq \end{enumerate} \begin{itemize} \item Txq \end{itemize}
\end{frame}

\end{document}

enter image description here

  • Could you also include a solution for the itemize ball? Trying to replicate the method above produces errors. After changing \raise to \raisebox{} the problem seems to be ´\beamer@usesphere{item projected}{bigsphere} – Lorents Jan 02 '24 at 23:21
  • The solution produces a smaller circle and smaller number that the default. This can be readjusted by adding a \scriptsize before \insertnumlabel and fiddling with the arguments of \pgfpoint. But what is going on? – Lorents Jan 02 '24 at 23:23
  • @Lorents I updated the code to show also the itemize item. – samcarter_is_at_topanswers.xyz Jan 02 '24 at 23:36
  • Thanks, this works; the @ was the problem. The size change for enumerate is still mysterious! – Lorents Jan 02 '24 at 23:45
  • @Lorents If you look at the original definition of the enumerate item circle it contains the size change at the end, but this part (and the closing }) is missing in your question. – samcarter_is_at_topanswers.xyz Jan 02 '24 at 23:53
  • Well, perhaps it is missing from our attempted solutions! The missing } is corrected. – Lorents Jan 03 '24 at 00:28