16

I failed to center an itemize in beamer, together with its headline. In my second try below, although the items are centered, their headline (i.e. the text My second try: Centering the itemize) is not left-aligned with them.

How to center an itemize in beamer, together with its headline?

centering-itemize

\documentclass{beamer}
\usetheme{CambridgeUS}
\begin{document}
\begin{frame}{Centering the itemize}
  My first try: Centering the itemize
  \begin{center}
    \begin{itemize}
      \item item1
      \item item2
    \end{itemize}
  \end{center}

  \begin{center}
  My second try: Centering the itemize
  \begin{itemize}
    \centering
    \item item1
    \item item2
  \end{itemize}
  \end{center}
\end{frame}
\end{document}
12

Here is one way; using a tabular-like structure:

enter image description here

\documentclass{beamer}
\usetheme{CambridgeUS}
\newcommand{\tabitem}{%
  \usebeamertemplate{itemize item}\hspace*{\labelsep}}

\begin{document}

\begin{frame}{Centering the itemize}
  My first try: Centering the itemize
  \begin{itemize}
    \item item1
    \item item2
  \end{itemize}

  \begin{center}
    \begin{tabular}{@{}l@{}}
      My second try: Centering the itemize \\
      \tabitem item1 \\
      \tabitem item2
    \end{tabular}
  \end{center}
\end{frame}

\end{document}

You insert an "\item" inside the tabular using \tabitem.

2
  • Thanks. BTW, what does @{}l@{} in tabular mean? (I can understand something like |c|l|.) – hengxin Apr 16 '15 at 5:43
  • 1
    @hengxin: @{} removes the column spacing. – Werner Apr 16 '15 at 5:55
6

Another way is to include the itemize list within the minipage environment and center the minipage. The key is to make the width of the minipage just enough to hold the widest item in the list. I use trial and error, but I am sure there is a more cleaver way.

LaTeX output

\documentclass{beamer}
\usetheme{CambridgeUS}

\begin{document}

\begin{frame}{Centering the itemize}
  \begin{center}
    \begin{minipage}{0.14\textwidth}
      \begin{itemize}
        \item item1
        \item item2
      \end{itemize}
    \end{minipage}
  \end{center}
\end{frame}

\end{document}
4

There is another way:

\begin{itemize}
    \item  \begin{center} item1 \end{center}
    \item  \begin{center} item2 \end{center}
\end{itemize}
1
  • This doesn't center any headline – Ben Nov 6 '17 at 17:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.