Is it possible to have lines (as an exception) that continue into the right margin ?

Here's why I hope it's possible: I have a document and one of the headings is the formal name of a particular organization. The name is a few letters wider than what fits in the article's text width. It looks uglier if I break it in two lines than allowing for this exception (because of the space around it, in this particular document it doesn't look that bad).

One option suggested by SE is given in the question How can I change the margins for only part of the text?. The reason I'm asking is that maybe there is another way, to tell LaTeX "do not break this line, even if you bleed into the margin".

If there isn't, I'll look into the changepage package, but it's worth asking.

Thanks in advance.


It can depend on where you need to do this, but the standard methods for keeping text together should work for you:

aaa bbb ccc ddd~eee~fff ...


aaa bbb ccc \mbox{ddd eee fff} ...

Under no circumstances will ddd eee fff ever break, so you can write the entire organisation name with \mbox and it should do what you want.

  • 3
    …unless ~ or \mbox are redefined… :) – Will Robertson Dec 1 '10 at 6:58

I would use \rlap:

\rlap{This is a very long name of some arcane organization}

will typeset the text, but it won't take up any space, so you don't even get an overfull hbox.


I would use \kern with a small, negative value (a fraction of an em) between every letter in the heading ‘condensing’ the text until it fits the available space. You may use \rlap in addition, because then you can protrude the heading a fraction into the right margin.

With a little tinkering, no one will even see that you have ‘cheated’.

As Frank Mittelback point out in the comment below, hand tuning with \kernwill probably be (too) much work. To avoid that the heading protrude to much into the right margin, you can ‘condense’ (shrink) the text by using Microtype’s letterspacing with a small negative tracking. The code below reduces the number of characters protruding into the right margin from four to one on my system.


\noindent\rlap{\lsstyle Testing testing resting test testing testing Testing testing testing Testing testing testing Testing}
  • The problem with kerning in this manner is that you break any natural kerns between letters as well, which means that you have to tinker quite a lot to make it look right (if at all). Making the heading protuding slightly to the right, for example with \rlap is therefore probably the better looking, and definitely the simpler solution. – Frank Mittelbach May 12 '12 at 21:18

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.