Search code examples
latextexbeamer

Correct way to use "enumitem" (or its alternatives) for itemize in Latex Beamer


I'm trying to customize my itemize list in a Beamer slide using the noitemsep and topsep settings available in the enumitem package. However, using enumitem with Beamer causes the bullet points to disappear (images attached below). I also came to know that enumitem isn't really compatible with Beamer, and should not be used alongside the enumerate package, but I can't figure out what alternatives are available for my use case.

When I don't use enumitem

\begin{frame}
    \begin{itemize}
        \item Apples
        \item Oranges
        \item Bananas
    \end{itemize}
\end{frame}

Output (contains bullet points):

enter image description here

When I use enumitem:

\usepackage{enumitem}
\begin{frame}
    \begin{itemize}[noitemsep]
        \item Apples
        \item Oranges
        \item Bananas
    \end{itemize}
\end{frame}

Output (the bullets have disappeared):

enter image description here

Any hints regarding what settings I should use with enumitem when using Beamer, or what other alternative packages I can use (which is more compatible with Beamer) which can fulfill my objective, would be greatly appreciated.


Solution

  • Don't use enumitem with beamer, it is not compatible.

    You can adjust the spacing in various ways, either locally or globally.

    \documentclass{beamer}
    
    
    \begin{document}
        
    \begin{frame}
    text
        \vskip-1ex
        \begin{itemize}
        \addtolength{\itemsep}{-1ex}
            \item Apples
            \item Oranges
            \item Bananas
        \end{itemize}
    \end{frame}
    
        
    \end{document}
    

    \documentclass{beamer}
    
    \usepackage{xpatch}
    
    \xpatchcmd{\itemize}
      {\def\makelabel}
      {%
        \addtolength{\itemsep}{-1ex}%
        \def\makelabel%
      }
      {}
      {}
    
    \BeforeBeginEnvironment{itemize}{\vskip-1ex}
    
    \begin{document}
        
    \begin{frame}
    text
        \begin{itemize}
            \item Apples
            \item Oranges
            \item Bananas
        \end{itemize}
    \end{frame}
    
        
    \end{document}