3

In the majority of fonts such as Computer Modern, NewTX Math, or TeX Gyre Termes Math, how wide is the control space \ (visibly: \␣) in relation to the other math-mode space commands

  • \quad,

  • \;,

  • \>, and

  • \,?

That is, is it possible to sort the list “\quad, \;, \>, \,, \␣“ in a descending order universally or almost universally?

2 Answers2

3

\ is the same as an interword space so is
\fontdimen2 plus \fontdimen3 minus \fontdimen4
in the current font.

\quad is \hskip 1em so is
\fontdimen6
in the current font.

See What do different \fontdimen<num> mean

\; \> \, were originally math mode only, but now have similar defintions in text mode and are \thickmuskip, \medmuskip and \thinmuskip respectively which are set by the macro layer but in mu units so 1/18 em in the font assigned to \fam2

generally \quad is bigger than \ which is bigger than \; then \> then \,

David Carlisle
  • 757,742
2

A concrete measurement for Computer Modern:

enter image description here

\documentclass{article}

\usepackage{xfp} \newlength{\tmplen} \newlength{\controlspacelen}

\begin{document}

\settowidth{\controlspacelen}{\ }% Widths of spaces in Computer Modern: \begin{itemize} \item \verb|\quad|: \settowidth{\tmplen}{\quad}\the\tmplen~ (\fpeval{round(\tmplen / \controlspacelen, 1)} control spaces)

\item \verb|\ |: \settowidth{\tmplen}{\ }\the\tmplen~ (1 control space)

\item \verb|;|: \settowidth{\tmplen}{;}\the\tmplen~ (\fpeval{round(\tmplen / \controlspacelen, 1)} control spaces)

\item \verb|&gt;|: \settowidth{\tmplen}{&gt;}\the\tmplen~ (\fpeval{round(\tmplen / \controlspacelen, 1)} control spaces)

\item \verb|,|: \settowidth{\tmplen}{,}\the\tmplen~ (\fpeval{round(\tmplen / \controlspacelen, 1)} control spaces) \end{itemize}

\end{document}

Werner
  • 603,163
  • The control space in practice may stretch or shrink like an interword space, to ensure that all lines are the same length. The value you show is the starting width, before the line is justified. All other spaces listed are fixed width. – barbara beeton Feb 12 '22 at 04:18
  • @barbarabeeton no by default \> and \; are stretchy as well – David Carlisle Feb 12 '22 at 11:02
  • @DavidCarlisle -- Thanks for the correction. The real point of my comment, though, is that the value shown is the base width, and there can also be stretch (and maybe shrink), so the "final" width may be different. – barbara beeton Feb 12 '22 at 16:23
  • @DavidCarlisle Is there any reason for \, not being stretchy whereas \> and \; are stretchy? –  Feb 14 '22 at 15:09
  • 1
    @GeekestGeek Because one day in the late '70's Professor Knuth thought that looked about right. – David Carlisle Feb 14 '22 at 15:10
  • @DavidCarlisle Hm, I see. I guess that's why it has always been bothering me that I have to write stuff such as \mskip 3mu plus1.5mu minus1.5mu instead of \, for a pleasant typesetting result. What do you use yourself if you wish to have a stretchy version of \,? –  Feb 14 '22 at 15:38
  • 1
    you know I almost never use tex:-) But espcially if not using the original computer modern fonts, I would have no qualms about redefining all three of the muskip spaces to fit what I thought looked best. Note redefining \thinmuskip is better than adding a by hand space amount as the point about \,, \> and \; is that they are exactly the spaces added by tex between atoms of various classes and \! is exactly the negative of \, @GeekestGeek – David Carlisle Feb 14 '22 at 15:41
  • @DavidCarlisle Thanks! So let's say you have $A\cup B$, how much space is added around the union symbol? I always thought it to be the same as A\,{\cup}\,B, i.e., \, to each side of ∪; any comment on this? –  Apr 08 '22 at 21:26
  • 1
    @GeekestGeek \cup is \mathbinso that is\medmuskip:not,` – David Carlisle Apr 08 '22 at 21:30
  • @DavidCarlisle Thanks! I see what goes on with \: and \>: they are the same according to latex.ltx, defaulting to \mskip+\medmuskip in math mode (and to something else in text mode). I have to change my \,{Bin}\, to \>{Bin}\> now to make it look as Bin, for binary operations Bin. Any idea why \: has been introduced to LaTeX (in addition to \>, which is already there anyway)? –  May 05 '22 at 20:09
  • @GeekestGeek I see you asked a new question about that but it's not true to say \> is already in latex and \: added. It is just that latex has always defined two commands for that. – David Carlisle May 05 '22 at 20:35
  • @DavidCarlisle You're right. I meant that \> is already there in TeX. –  May 05 '22 at 20:36
  • 1
    @GeekestGeek "already" isn't the right word to use though, a different fomat (plain tex) has a command of that name, but latex doesn't input plain tex and tex itself does not define a primitive command of that name. \:, \medspace and \> commands are undefined until all three are defined in consecutive lines as latex.ltx is loaded while defining the latex format. – David Carlisle May 05 '22 at 20:41
  • @DavidCarlisle Got it. Thank you!!! –  May 05 '22 at 21:10