1

MWE:

\documentclass{beamer}

\begin{document}
\begin{frame}{meh...}
  \begin{itemize}
    \item[Hello] World
    \item[Hey! Hello?] D'oh!
  \end{itemize}  
\end{frame}
\end{document}

The names of the items ("Hey!" in this example) get out of the frame and are not visible.

I would prefer to keep as much of the current template intact if possible.

I tried with a description environment at first, but I don't understand the alignment it does.

2

3 Answers 3

3

In the description environment the alignment is equal to length the text into the [] brackets after \begin{description}:

\documentclass{beamer}

\begin{document}
\begin{frame}{meh...}
  \begin{description}[Hey! Hello?]
    \item[Hello] World
    \item[Hey! Hello?] D'oh!
  \end{description}

  \begin{description}[Hello]
    \item[Hello] World
    \item[Hey! Hello?] D'oh!
  \end{description}
\end{frame}
\end{document}

enter image description here

Put the longest label into brackets and you should be fine.

1
  • I wish LaTeX was a bit more clever, but this seems to be the best possible solution. I guess LuaTeX and similar environments would have no trouble in counting the number of characters, but I prefer to stick to the standard pdflatex for a while. Thanks a lot.
    – Trylks
    Sep 9, 2014 at 17:53
1

Use the enumitem package with the align=left option.

\documentclass{beamer}
\usepackage{enumitem}
\setlist{align=left}

\begin{document}
\begin{frame}{meh...}
  \begin{itemize}
    \item[Hello] World World World World World World World World World World World World
    \item[Hey! Hello?] D'oh! D'oh! D'oh! D'oh! D'oh! D'oh! D'oh! D'oh! D'oh! D'oh! D'oh! D'oh!
  \end{itemize}  
\end{frame}
\end{document}

sample code output

1

This uses no additional packages, but resets the value of \itemindent length inside the list.

In addition to the fact that an alternative enumitem solution removes the color of the label, it is said that enumitem and beamer do not play well together: Trouble combining enumitem and beamer

\documentclass{beamer}
\begin{document}
\begin{frame}{meh...}
  \begin{itemize}
    \itemindent=1in
    \item[Hello] World
    \item[Hey! Hello?] D'oh!
  \end{itemize}  
\end{frame}
\end{document}

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .