TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.