1. Vedran Miletić
  2. beamer
Issue #227 resolved

Frames do not implicitly end with \par

cyberSingularity
created an issue

Not sure if you'll agree that this is a bug or not. But, I would expect the following two frames to look the same. Instead, the first is not centered because there is no explicit \par token/empty line at the end of the frame.

\documentclass{beamer}
\begin{document}
    \begin{frame}\centering
        Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit,
        vestibulum ut, placerat ac, adipiscing vitae, felis. Curabitur dictum gravida
        mauris.
    \end{frame}

    \begin{frame}\centering
        Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit,
        vestibulum ut, placerat ac, adipiscing vitae, felis. Curabitur dictum gravida
        mauris.

    \end{frame}

\end{document}

Compare with the article class where no blank line is needed before \end{document} for \centering to take effect.

\documentclass{article}
\begin{document}
    \centering
    Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit,
    vestibulum ut, placerat ac, adipiscing vitae, felis. Curabitur dictum gravida
    mauris.
\end{document}

Note that there may be other side-effects of the missing \par than just ignoring alignment for the last 'paragraph' in a frame.

Comments (3)

  1. Joseph Wright

    Add \par at end of frame content (fixes #227)

    As noted in bug report, there should be a \par here: with my 'LaTeX3 hat' on, I note that we do much the same in vertical coffins for the same reason (TeX does not use \ar-the-user-token here).

    → <<cset 1443917db2cf>>

  2. Log in to comment