I would like to typeset post--World War II
with what Adobe InDesign calls a "quarter space". The en-dash is there to be wider than a normal space, to clarify the constituent structure ([post-[[World War] II]]), but in good typesetting, the two spaces in this expression should, unlike other spaces in the same typeset line, not stretch.
How do I typeset a fixed-width "quarter space" in LaTeX?
(I used to think that the right way was post--World\ War\ II
, but I just found out that \␣
isn't a fixed space at all but is just a line-breaking variant of the line␣break--preventing
~
.)
Really, I need two different macros: one that allows for a linebreak and one that doesn't. For example, the expression above should be linebroken in the following ways:
- ok:
post--
/World␣War␣II
- ok:
post--World
/War␣II
- bad:
post--World␣War
/II
(Let's just assume that this is how we want it and leave the question of whether the second linebreak option is typographically good or not for another debate.)
Let's also assume that linebreaking points in a component word are to be retained. Two examples (from Wikipedia's "Dash" article):
- "Fran·cis·co" in
non--San␣Francisco
- "min·is·ter" in
ex--prime␣minister
Related:
- about
~
and\␣
(which don't help here): Difference between control space and non-breaking space - about various ways to produce spaces in LaTeX: Lengths and when to use them
Best Answer
Just set
\spaceskip
; if this parameter is nonzero, TeX will use it for the interword space, ignoring the font defined parameters.With
\makebox[\textwidth][s]{...}
interword spaces that can stretch do.With the optional argument you can reduce (or expand) the interword space in the
\fixedspaceword
bit.If you prefer that spaces are allowed to shrink together with the other spaces in the line, change the definition into
The space won't be allowed to stretch, because
\spaceskip
has zero stretch component.