TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am new to La Tex and wondering when to use a tilde, or a \mbox? A tilde prohibits a line break and so does \mbox, so when to use one or the other? For example, should I use:

\mbox{words to kept together} 


share|improve this question
Welcome to TeX.SE. – Peter Grill Jul 1 '12 at 18:31

There are probably other reasons, but I believe the space given by a ~ can stretch or shrink as other spaces in the line, while an \mbox gives you a fixed box, with fixed spaces.

And words joined with ~ can still be hyphenated, while an \mbox won't.

A text with~some~unbreakable~spaces might stretch to jusssssssssssstify the line.
A text \mbox{with some unbreakable spaces} might stretch to jusssssssssssstify the line.
\mbox{A text with unbreakable spaces might be hyphenated if necessary.}

enter image description here

share|improve this answer
I'd add that \mbox{...} is very useful for avoiding line breaks in a particular word. – egreg Jul 2 '12 at 10:45

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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