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

How can I have a box not take the full width?


\hbox{keke}\hbox{lala} % end up on their own lines instead of same line.
\vbox{keke}\vbox{lala} % same thing, except also indented.

Why does \hbox by default take the whole line width? Does not compute.

share|improve this question
up vote 5 down vote accepted

You need to exit vertical mode, otherwise TeX just stacks up the hboxes.

share|improve this answer
This is precisely what LaTeX's \mbox does for you. – Harald Hanche-Olsen Jan 25 '11 at 22:44

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.