I'm looking at the first, 'letter class' example in LaTeX/Letters – Wikibooks, open books for an open world. What I'd like to do is to use a \newcommand
– say, \insertbox
– which would be inserted somewhere in the \adress
statement, e.g.:
...
\address{\insertbox{}21 Bridge Street \\ Smallville \\ Dunwich DU3 4WE}
...
… and in the definition of \insertbox
, have four lines of text (say, 21 Bridge Street \\ Smallville \\ extra line \\ Dunwich DU3 4WE
), which will have width of, say, 2.5 cm; positioned to the left of the address lines, and the first line of the (left) box text is aligned to the first line of the address text.
What would be the recommended way to do this?
PS: For reference, I'm hotlinking the page image of the example below:
EDIT: The position of the box with red outline is what I'd like to achieve:
The text in there is pointless (I just quickly copy pasted a portion of the image in gimp
) – but that is what should be specified through the \insertbox
command.
Best Answer
This might be what you're after:
\llap
allows for a zero-width box left overlap, while\smash
ensures that you can have a line-break that does not influence the line breaking in the remainder of the\address
command. OtherwiseSmallville
would be pushed down with each\\
in\insertbox
. Finally, a\parbox[t]{2.5cm}
provides a 2.5cm wide (paragraph/left-aligned) box, aligned at the top[t]
.