3

I sometimes use ~ in LaTeX to keep for example "Figure" together with its \ref. However, in some cases where LaTeX has to stretch a line quite a lot to fill it, it appears that ~ is fixed-width. It becomes much shorter than the other, unusually wide spaces on that line. Is there another character that achieves a non-breaking space but allows varying the width?

  • That means you have an underfull box. What you are looking for is available in Word and you know it is not a good idea ;) You might like cleveref package instead. – percusse Oct 2 '15 at 16:42
  • 3
    As Ulrike shows, ~ is stretchable. If it is not for you, then you need to provide a minimal working example (MWE) that shows the problem. – yo' Oct 2 '15 at 16:52
  • Word... :-) I know cleveref but cannot always use it due to journal requirements. BTW how does cleveref achieve non-breaking? – Thomas Arildsen Oct 2 '15 at 17:07
11

~ has not a fixed width, at least not with its default definition:

\documentclass{article}
\begin{document}
ABC~ABC~ABC ABC ABC ABC\linebreak
blub
\end{document}

enter image description here

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.