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.

Trylks
  • 579
  • Not really a beamer issue; if you did the same thing in the article class the second item label sticks out into the left margin. – Matthew Leingang Sep 09 '14 at 16:10
  • @MatthewLeingang As I note in my answer, beamer and enumitem don't play well together: http://tex.stackexchange.com/questions/31505/trouble-combining-enumitem-and-beamer – Steven B. Segletes Sep 09 '14 at 16:26

3 Answers3

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.

d-cmst
  • 23,095
  • 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 09 '14 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

Matthew Leingang
  • 44,937
  • 14
  • 131
  • 195
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