3

I noticed that I can use \ to produce a spacing in math environment that seems to me equal to the one produced by \quad. Where is the difference?

azetina
  • 28,884
Rgkpdx
  • 145

2 Answers2

9

The spacing is not at all similar:

\documentclass{article}


\begin{document}

\showoutput
$a\ b\quad c$

\end{document}

produces

....\OML/cmm/m/it/10 a
....\glue 3.33333 plus 1.66666 minus 1.11111
....\OML/cmm/m/it/10 b
....\glue 10.00002
....\OML/cmm/m/it/10 c

which shows that \quad produces a fixed space (10pt here) but \ produces the normal inter-word space from the current text font. Which here is stretchy between 2 2/9 pt and 5pt, and would, if necessary stretch more than that.

David Carlisle
  • 757,742
7

If you type \⍽ (backslash space) in math mode, you get an interword space in addition to the space TeX could automatically insert. Consider the following example:

\documentclass{article}
\begin{document}
$a\ a>\ a$

$a\ a\;{>}\quad a$
\end{document}

that produces

enter image description here

As you see, \⍽ in the first line doesn't produce a space as wide as \quad; but there are two \⍽ in the first line, that seem to output different spaces.

What happens is that the first \⍽ is between two ordinary symbols, where TeX does not add any space. But it does around a binary relation symbol. In the second line {>} makes > into an ordinary symbol and I added \; in front of it so that the spacing on the left matches the space in the first line. The second \⍽ in the first line comes after the \; automatically inserted by TeX after >, so it appears to be bigger, but it isn't.

Note also that \⍽ inserts flexible space, so its amount is not fixed and can stretch or shrink together with all other flexible spaces (mostly interword spaces) on the same line.

egreg
  • 1,121,712