156

Many LaTeX command names have some 'justification'. For example the commands \cup and \cap have a straightforward meaning.

However, I couldn't find a meaning for the commands \quad and \qquad. Is it maybe coming from a concatenation of 'equation' and 'add' ?

egreg
  • 1,121,712
  • 32
    Welcome to TeX.SX! “Quad” is a traditional term of typography; it comes from Italian “quadratone” (big square), because it denoted a square piece of metal that could be placed between types for spacing them. – egreg Jun 13 '13 at 22:25
  • 1
    I had that some doubt, so I wonder if there was a TeX command glossary somewhere. This is what I found: https://en.wikibooks.org/wiki/LaTeX/Command_Glossary

    It would be even better if there was an "all-TeX-package command dictionary".

    – Leonardo Castro Jan 25 '16 at 14:15

3 Answers3

218

The word “quad” is a traditional term in typography. It comes from Italian “quadratone” (big square). In old fashioned metal typography it meant a square piece of metal lower than type height that could be inserted between types for spacing them. In Italian typography it's still called “spazio quadratone”.

It's commonly as wide and high as an uppercase “M”, since this is usually the widest letter in a font and occupies a square area.

The command \quad takes its name from this traditional name; \qquad just means ”two quads”. However in TeX the \quad has no height, but only width.

egreg
  • 1,121,712
42

Some more information:

QUAD is the abbreviation of quadrat. It comes from quadratus in Latin (Merriam-Webster).

\quad and \qquad are macros defined by (La)TeX kernel:

\def\quad{\hskip1em\relax}
\def\qquad{\hskip2em\relax}

For TeXicians, the unit “em” is one of the font dimensions. Say, \fontdimen6 of a font in TeX. It originally means the width of capital letter M in a font (see Wikipedia), but it is not always true in practice.

The font dimensions in TeX and the \fontdimen command is described in “Appendix F: Font Tables” in The TeXbook, and “Appendix F: Font Metric Information” in The METAFONTbook.

You can define a macro equivalent to \quad like this:

\def\myQuad{\hskip\fontdimen6\font}

and of course a \qquad doubles \quad:

\def\myQQuad{\hskip2\fontdimen6\font}
Leo Liu
  • 77,365
  • 2
    And if you want your quads to be flexible, stretchable a little bit so they don’t cause over-long lines, you can define \def\flexquad{\hskip1em plus 0.2em minus 0.2em\relax} (change 0.2em to the amount you find pleasing, of course). – Júda Ronén Oct 07 '17 at 14:28
9

In the Not so Short Intro to LaTex, it says that size of \quad corresponds to the width of the character M of the current font.

That is, \qquad is the space of MM.

dustin
  • 18,617
  • 23
  • 99
  • 204
  • 10
    does it say that, it's not strictly true, it is the width of 1em which is a notional unit set in the font metrics which may or may not actually be the width of the M in that font. – David Carlisle Jun 13 '13 at 22:37
  • @DavidCarlisle No, Section 3.7 Math Spacing doesn't say that. – dustin Jun 13 '13 at 22:41
  • 1
    @dustin: Do you mean lshort? I'm sure that document is not that precise. Frankly speaking I don't think lshort is a very good introduction to LaTeX. – Leo Liu Jun 14 '13 at 07:45