Take the 2-minute tour ×

Why is it that the file

    \hphantom{ }b

produces an a and a b vertically aligned with a line skip in between whereas the same file with \\ replaced by \newline produces the expected: an a, then a b on the next line, indented by one space?

Is that a bug in Beamer (in documentclass Article, both versions have the same, expected effect)?


share|improve this question
add comment

1 Answer

I'd call this a feature of how beamer redefines \\. After it TeX is in vertical mode, so the \hphantom, which ultimately does \box2 doesn't start horizontal mode.


\leavevmode\hphantom{ }

Note that standard LaTeX doesn't start vertical mode after \\.

share|improve this answer
That's a strange vision of a 'feature' but ok, it makes sense. Thanks! –  mqtthiqs Sep 4 '12 at 12:33
@mqtthiqs Well, our beloved moderator Joseph, who has taken over maintenance of beamer, is looking. :) –  egreg Sep 4 '12 at 12:36
add comment

Your Answer


