# [texhax] Line break inside \makebox

Dan Hatton vi5u0-texhax at yahoo.co.uk
Wed Nov 21 12:48:50 CET 2007

On Wed, 20 Nov 2007, Donald Arseneau wrote:

> Dan Hatton <vi5u0-texhax at yahoo.co.uk> writes:

>> I have the following two snippets of LaTeX code (automatically
>> generated by getting two different versions of a plotting program to
>> produce the same graph.)

>> \makebox(0,0)[b]{\shortstack{Dissolution\\{}rate
>> \$\Lambda{}/(\ut{nm}/\ut{s})\$}}%

> \shortstack is a good way to get multiple lines compactly.

> Also tabular.

>>    \makebox(0,0){\strut{}Dissolution\\{}rate
>>    \$\Lambda{}/(\ut{nm}/\ut{s})\$}%

> No, \makebox puts its argument in "lr" mode, not "paragraph" mode,
> so it only has a single line.  You can use a \parbox for paragraph
> mode, and multiple lines.

Ah, thank you.  You've given me the clue I needed with your
description of what \shortstack does.  As I mentioned, these bits of
LaTeX code are automatically generated, so I can edit
straightforwardly only the bit that says

Dissolution\\{}rate
\$\Lambda{}/(\ut{nm}/\ut{s})\$

The problem is solved by manually putting back in the \shortstack,
getting

\makebox(0,0){\strut{}\shortstack{Dissolution\\{}rate
\$\Lambda{}/(\ut{nm}/\ut{s})\$}}%

--

Thanks again,

Dan Hatton