1

With komascript and geometry I made a page layout such that I can render a logo at the top right of every page simply with

\ohead{\hfill\usebox{\rtlogo}}

except that this pushes the logo only out against the end of the main right edge of the text. Corporate design however requires to push the logo out into the margin by 1 cm.

Since this code above is so nice and simple, I would like to avoid complicated means like picture-puts or similar. I looked at \rlap, but it makes a zero length box. I think a good solution would be to tell LaTeX to just pretend the box is a bit shorter than it actually is. Then \hfilling it as above should make it stick out into the margin. And of course forcefully reducing the box size without clipping the logo should not result in overfull, because these would clutter otherwise important messages.

The question more abstractly: How to render text and then wrap it into a box such that the box has a given width which is smaller than the actually rendered text without clipping or line breaking and without overfull.

  • Does \makebox work for you? – Sean Allred Mar 25 '15 at 12:42
1

This turned out to be easier than I thought, thanks to a colleague reminding my of \hspace. Here is what did the trick:

\ohead{\hfill\usebox{\rtlogo}\hspace*{-1cm}}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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