TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

If $a+b$ appears in a paragraph, the spacing around + will depend on how stretched/compressed the line is. If ${a+b}$ is used, then the formula will have its natural width regardless of how stretched/compressed the line is. However, the stretchable space (glue) around + is still present, as can be seen from \showlists:


shows (with plain TeX)

.\teni a
.\glue(\medmuskip) 2.22217 plus 1.11108 minus 2.22217
.\tenrm +
.\glue(\medmuskip) 2.22217 plus 1.11108 minus 2.22217
.\teni b

On the other hand, there is no such glue in \scriptstyle: the code above with the addition of \scriptstyle after the dollar (or after the brace) gives

.\seveni a
.\sevenrm +
.\seveni b

Does (La)TeX ever insert glue (in particular stretchable/shrinkable glue) in \scriptstyle (and \scriptscriptstyle)? I'm interested in what happens in real-life documents (e.g., using ams(La)TeX and other macro packages).

share|improve this question
spaces such as \> are not guarded by \nonscript so insert stretch glue in script styles. – David Carlisle Jul 16 '14 at 22:07
up vote 3 down vote accepted

According to the description on page 170 of the TeXbook, automatic glue around math atoms can be “conditional”, that is, inserted only in display and text styles:

Here 0, 1, 2, and 3 stand for no space, thin space, medium space, and thick space, respectively; the table entry is parenthesized if the space is to be inserted only in display and text styles, not in script and scriptscript styles. For example, many of the entries in the Rel row and the Rel column are ‘(3)’; this means that thick spaces are normally inserted before and after relational symbols like ‘=’, but not in subscripts.

The same happens if an explicitly inserted glue is preceded by \nonscript; this case, will be denoted in \showlists by \glue(\nonscript); for instance

$a\nonscript\hskip2pt b$\showlists

will print

\seveni a
\glue 2.0
\seveni b


$\scriptstyle a\nonscript\hskip2pt b$\showlists

will print

\seveni a
\seveni b

and the effect would be exactly the same as if no glue had been added.

Relevant modules in “TeX the program” are 732 (for \nonscript), 764 (for the table at page 170 of the TeXbook), 765 and 766.

If one uses LaTeX and amsmath, the glue will “magically” reappear with


because the subscript will be typeset in text style in a \fontsize{\sf@size} context (where \sf@size is computed from the current text font size).

share|improve this answer
I looked at that table, and it is interesting to note that only 0 and 1 appear without parentheses, which means that only "no space" or \thinmuskip are inserted in scriptstyle and scriptscriptstyle. So you could get stretchable glue in subscripts via \thinmuskip=3mu plus 1mu\relax $x_{a\prod}$\tracingonline=1\showlists. – Bruno Le Floch Jul 16 '14 at 22:15
@BrunoLeFloch A space between “log” and “x” is needed independently of the style, so that \thinmuskip can't be conditional. However glue never stretches when a subformula is typeset. Thus \hbox to 3cm{\thinmuskip=3mu plus 1fill$\left(a\prod\right)$} will be underfull, while \hbox to 3cm{\thinmuskip=3mu plus 1fill$\scriptstyle a\prod$} won't – egreg Jul 16 '14 at 22:25

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.