TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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

I'm trying to scale some text up. It seems like \resizebox (from graphicx?) and \adjustbox (from the adjustbox package) ignore line breaks:


Is there a way to scale things up that respects line breaks?

share|improve this question
up vote 4 down vote accepted

Both use a horizontal savebox to store and then scale the content. You can't have line breaks in this kind of boxes. While manual line breaks would be somehow possible (e.g. using some vertical stacked \hboxes), automatic line breaking only works when a specific width is given.

The adjustbox package supports a minipage=<length> key which automatically places a minipage around the content. Then line breaks will work.
It also has a tabular key, which also allows the stacking of lines, e.g. using tabular=@{}l@{} to left-align all lines without any separation on the right and left of the table. So your example could now be written as \adjustbox{tabular=@{}l@{},width=5cm}{Hello\\world\\}. Note that the trailing \\ is mandatory when tabular is used.

You can also use \shortstack{Hello\\world} (maybe with \struts included) to get the line breaking. Then there is the minibox package which provides a quick tabular as macro \minibox.

share|improve this answer

Use a tabular inside the box.

  hello\\ world
share|improve this answer
Your code did not work for me. What worked though was \resizebox{5cm}{!}{ ... – Florian Sep 8 '15 at 14:08
@Florian: You are right, there was typo. I corrected it. – Ulrike Fischer Sep 8 '15 at 14:33

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.