1

As you can see in the image below, the EndOfLines are not correctly right aligned: The alignment using \hfill is different for an \item followed by an itemize environment compared to an \item followed by another \item or nothing.

Is that a slight bug in Beamer? How shall I correct this, at least locally?

Not aligned!

\documentclass{beamer}
\begin{document}
\begin{frame}
\begin{itemize}
\item Item 1 \hfill EndOfLine
    \begin{itemize}
    \item Subitem
    \end{itemize}
\item Item 2 \hfill EndOfLine
\item Item 3 \hfill EndOfLine
    \begin{itemize}
    \item Subitem 
    \end{itemize}
\item Item 4 \hfill EndOfLine
\end{itemize}
\end{frame} 
\end{document}

1 Answer 1

2

Try giving a blank line before every

\begin{itemize}

or a % or // after EndofLine. This seem to work!

\documentclass{beamer}
\begin{document}
\begin{frame}
\begin{itemize}
\item Item 1 \hfill EndOfLine

\begin{itemize}
\item Subitem
\end{itemize}
\item Item 2 \hfill EndOfLine
\item Item 3 \hfill EndOfLine

\begin{itemize}
\item Subitem 
\end{itemize}
\item Item 4 \hfill EndOfLine
\end{itemize}
\end{frame} 
\end{document}

enter image description here

1
  • It indeed works. I prefer the solution with % since I find it the least intrusive in the code. Before accepting your answer, I'll wait for a potential answer on whether it is considered a bug or not. And whether there may be a fix that does not require to change the code, say using a package or some magic command in the preamble.
    – Bruno
    May 11, 2015 at 13:30

You must log in to answer this question.

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