[texhax] Correcting for math-mode kerning before commas and periods?

Uwe Lück uwe.lueck at web.de
Sun Oct 16 14:14:20 CEST 2005

At 21:27 15.10.05, Oleg Katsitadze wrote:
>On Sat, Oct 15, 2005 at 07:57:09PM +0200, Uwe L?ck wrote:
> > According to TeXbook p. 280f., there is a primitive command \unkern,
> > such that \unkern$ should serve your desire -- since the italic correction
> > is a kern (TeXbook p. 287).
>\unkern does not seem to work here.  I guess this is because
>of the two-stage process by which the math lists are
>processed -- when the math list is read by TeX, there is yet
>no kern after the S in $S$, so \unkern does not have any
>effect.  And when TeX converts the math list into horizontal
>list and inserts the kern after the S, there is already no

This had come to my mind as well, so I made experiments with
\showlists. Yet they seem not to agree with that conjecture.
$f\kern.123pt$\showlists just shows two \kerns, the second
one being \kern.123pt, the only difference between these \kern's
seems to be the dimension of .123pt vs. ...
$f\kern.123pt\unkern$ produces the same list as $f$,
so you see that, in general, an \unkern is recognized in forming
the horizontal list. Yet now, $f\kern.123\unkern\unkern$ removes
the second \kern, but not the first one ...

My most recent guess: See TeXbook bottom of p. 441:
`In case (c), ... an additional level of hboxing is omitted if it turns
out to be redundant.' So perhaps:
At one stage of forming the list from $f\unkern$,
there is something like ...\hbox{f\kern...}\unkern... Then the
\unkern's etc. are executed, the one you see here vanishes
at that stage. Then the redundant `\hbox' surroundings are
removed. The result is what \showlists presents.

(More accurate: The list is built by "creeping" from left to right.
When the `f' is found, \hbox{[font]f\kern...} is appended to the
list. Now \unkern is found and executed, the list doesn't change.
The final $ removes all redundant \hbox levels.)

These guesses bring me back to the question of a _real_
reference manual for TeX ... (another TeXhax entry)

Uwe L.

More information about the texhax mailing list