12

The short command \, has (more or less) the long command equivalent \thinspace. - What is the long command for the unbreakable space ~?

Also, is there a long command for a space which is *just a little bit shorter than a space? (For situations like fig. 1, where fig\,1 puts the two parts too close and fig.\@ 1 IMHO is to far from each other.)

12

~ is defined by

\def~{\nobreakspace{}}

so \nobreakspace

A word space adds a space defined by the font but a typical value is

....\glue 3.33333 plus 1.66666 minus 1.11111

so \hspace{.2em plus .1em minus .1em} would typically be a smaller, but still stretchy, space.

  • Thanks for the pointer! I had a little look around and found the dimensions \fontdimen2 et al. So I think a more general approach could be the command \hspace{0.8\fontdimen2\font plus 0.8\fontdimen3\font minus 0.8\fontdimen4\font}. If I define a macro with this, I'm set. :-) – halloleo Sep 29 '13 at 9:53
  • Only remaining question: Is \hspace unbreakable as is \nobreakspace? – halloleo Sep 29 '13 at 9:54
  • @halloleo Ah OK I nearly mentioned the font dimens but I thought it might look a bit scary, it's hard to know sometimes:-) – David Carlisle Sep 29 '13 at 9:54
  • @halloleo \hspace is breakable (like a word space) \nobreakspace is \leavevmode\nobreak\ so you can similarly use \leavevmode\nobreak\hspace{...} – David Carlisle Sep 29 '13 at 9:56
  • Isn't \hspace*{...} unbreakable though? – A.Ellett Sep 29 '13 at 14:52

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.