2

Feeding

\documentclass{article}
\showoutput
\begin{document}\noindent
A B\\
A\ B\\
A\hskip\fontdimen2\font plus\fontdimen3\font minus\fontdimen4\font B
\end{document}

to latex yields thrice the same “A B” in the DVI file without any visible difference. However, the stretch and shrink values in the console output do differ:

....\OT1/cmr/m/n/10 A
....\glue 3.33333 plus 1.66498 minus 1.11221
....\OT1/cmr/m/n/10 B
....\penalty 10000
....\glue 0.0 plus 1.0fil
....\penalty -10000
....\glue(\rightskip) 0.0
...\penalty 150
...\glue(\baselineskip) 5.16669
...\hbox(6.83331+0.0)x345.0, glue set 327.0833fil
....\OT1/cmr/m/n/10 A
....\glue 3.33333 plus 1.66666 minus 1.11111
....\OT1/cmr/m/n/10 B
....\penalty 10000
....\glue 0.0 plus 1.0fil
....\penalty -10000
....\glue(\rightskip) 0.0
...\penalty 150
...\glue(\baselineskip) 5.16669
...\hbox(6.83331+0.0)x345.0, glue set 327.0833fil
....\OT1/cmr/m/n/10 A
....\glue 3.33333 plus 1.66666 minus 1.11111
....\OT1/cmr/m/n/10 B

The difference is slight (plus 1.66498 minus 1.11221 in the first line vs. plus 1.66666 minus 1.11111 in the second and third lines), but it still exists. Why does this happen? Following The TeXbook, I thought that \ is how we typeset a usual space after a command (say, \foo\ vs. \foo ), without any difference in the semantics, but apparently, I was wrong on this.

0

1 Answer 1

2

The space added by is the space specified by the font dimens adjusted by \spacefactor, specifically the plus component is multiplied by \spacefactor/1000 as \spacefactor is usually 1000 but is 999 after a capital letter so the values differ by a factor of 999/1000 as \ is not affected by \spacefactor and always adds a standard word space even after punctuation (or capital letters). The minus component is similar but multiplied by 1000/\spacefactor

\documentclass{article}
\showoutput
\begin{document}\noindent
A B\\
A\ B\\
A\hskip\fontdimen2\font plus\fontdimen3\font minus\fontdimen4\font B\\
A\dimen0=\fontdimen3\font
\multiply\dimen0 \spacefactor % = 999 not 1000
\divide\dimen0 1000
\dimen2=\fontdimen4\font
\multiply\dimen2 1000
\divide\dimen2 \spacefactor
A\hskip\fontdimen2\font plus\dimen0 minus\dimen2 B

a\showthe\spacefactor  A\showthe\spacefactor 
\end{document}

This shows the four glue settings as

....\glue 3.33333 plus 1.66498 minus 1.11221
....\glue 3.33333 plus 1.66666 minus 1.11111
....\glue 3.33333 plus 1.66666 minus 1.11111
....\glue 3.33333 plus 1.66498 minus 1.11221

showing the last line calculation matches the glue.

1
  • I see. I completely missed the fact that the letters were capital. Right! With “a b” instead, this artefact doesn't happen.
    – AlMa1r
    Feb 4 at 1:29

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .