19.6 ~, \nobreakspace

Synopsis:

before~after

The tie character, ~, produces a normal word space between before and after at which the line will not be broken. The command \nobreakspace and the Unicode input character U+00A0 are synonyms. The character is also included in Latin 1 and other 8-bit encodings.

The amount of space inserted is exactly the same interword glue as that inserted by a space character between two regular words or the ‘\ ’ command (see Backslash-space: ‘\ ), which is normally defined by the current font. It can stretch or shrink as usual. The difference is that TeX will not break a line at that space.

The word ‘tie’ has the above meaning in the TeX community; this differs from the typographic term “tie”, which is a diacritic in the shape of an arc, called a “tie-after” accent in the TeX world: o͡o (see Accents).

Here LaTeX will not break the line between “Donald” and “E.”:

Thanks to Donald~E. Knuth.

In addition, despite the period, LaTeX does not use end-of-sentence spacing (see \@).

Ties prevent a line break where that could cause confusion. They still allow hyphenation (of either of the tied words), so they are generally preferable to putting consecutive words in an \mbox (see \mbox & \makebox).

Exactly where ties should be used is something of a matter of taste, sometimes alarmingly dogmatic taste, among readers. If you are using a particular style guide, then of course you should use its particular recommendations. Here are some widely accepted examples, many of them from The TeXbook.

If in doubt, you might ask yourself whether the reader would be confused or startled (probably only momentarily, but still) if the space in question became a line break. If yes, use a tie.

Some non-English typesetting traditions have additional strong rules for using ties: in Czech, for example, ties must be placed after single-letter conjunctions; in French, before “high” punctuation marks such as ‘:’; and conventions for breakable vs. unbreakable spaces around em-dashes vary widely. LaTeX can take care of some of these language-specific typesetting with the babel, polyglossia, or other packages, but it can’t do everything.


Unofficial LaTeX2e reference manual