6

I have two itemize environments, one is nested in the other. Somehow the nested itemize environment affects the vertical spacing of the adjacent item of the parent itemize environment. As you can see in the example below, the vertical space between b and c is slightly smaller than between a and b. If I remove the nested itemize environment, the vertical spacing between b and c is the same as between a and b. How can I achieve equally spaced items in an itemize environment nesting another itemize environment?

enter image description here

\documentclass{beamer}

\begin{document}
  \begin{frame}
    \begin{itemize}
      \item a
      \item b
      \item c
      \begin{itemize}
        \item d
        \item e
      \end{itemize}
    \end{itemize}
  \end{frame}
\end{document}
deboerk
  • 1,469

2 Answers2

7

The package enumitem somehow solves the problem. Note that the package redefines beamer list features.

\documentclass{beamer}

\usepackage{enumitem}

% redefine default beamer item labels
\setitemize{label=\usebeamerfont*{itemize item}%
  \usebeamercolor[fg]{itemize item}
  \usebeamertemplate{itemize item}}

\begin{document}
  \begin{frame}
    \begin{itemize}
      \item a
      \item b
      \item c
      \begin{itemize}
        \item d
        \item e
      \end{itemize}
    \end{itemize}
  \end{frame}
\end{document}
deboerk
  • 1,469
6

This issue appears to be solved by leaving a blank line before the nested itemize:

\documentclass{beamer}

\begin{document}
  \begin{frame}
    \begin{itemize}
      \item a
      \item b
      \item c

      \begin{itemize}
        \item d
        \item e
      \end{itemize}
    \end{itemize}
  \end{frame}
\end{document}

comp

JorgeGT
  • 1,602
  • 12
  • 14
  • AFAICT, this solution doesn't work (or, at least, it does not anymore). For example: https://www.overleaf.com/read/vzjhdthnhqfw – kjo May 22 '22 at 12:23