Fwd: Re: [texhax] Correcting for math-mode kerning before commas
alexander at tunicate.org
Sun Oct 16 18:06:18 CEST 2005
Wow, my little query has sparked quite a discussion! [continued below]
Uwe Lück wrote:
> OK, TeX first builds a math list from the "input stream"
> according to Chapters 24 and 26. When some \kern<wd>
> comes in, a kern of width <wd> is appended to the math list.
> When an \unkern follows immediately, that kern of width
> <wd> is removed again. When an \unkern comes in that
> has not been preceded by a \kern<wd> immediately, it is
> just ignored. Thus a math list can contain kerns, but not
> \unkern's. However, the kern (which is a kern indeed!)
> from the automatic italic correction according to
> Appendix G Rules 13, 17, 18f can come in only when the
> math list has been finished and is converted into a
> horizontal list, and there is no way for an \unkern to
> interfere here. Even $\unkern can't, because it is screened
> off by the final \mathoff.
Yes, this seems to be what is going on, and now I am at the point of
trying to find a practical solution. From my cross-post on comp.text.tex
, it was suggested that inserting a final subscript would prevent the
extra kerning, as follows:
Let $U$ be the union of sets $R$ and $S\nok$.
which works well for Computer Modern fonts. But just to add a little
spice to the mix, it seems this solution doesn't work for my preferred
font, the venerable Times Roman, via the txfonts package. It turns out
that txfonts has TeX putting some kind of space *in between* math-mode
letters and their subscripts. I used the following test input both as-is
and commenting out the \usepackage line:
Comparing the two you will notice a marked difference. I've attached a
small PNG image highlighting the discrepancy. And here is the relevant
portion of the log file, first for Computer Modern:
.\hbox(4.63193+0.0)x3.32928, shifted 1.49998
and now for Times Roman:
.\hbox(4.5745+0.05249)x2.446, shifted 1.49998
What puzzles me is that the logs don't look that different. In fact I
don't see any extra hskip or kern at all. But have a look at the
attached PNG -- there's definitely a huge space coming in from
somewhere! I'm at a loss even trying to start looking for this bug.
Just doing my best to typeset beautiful documents,
(Please CC me with any reply because I am not subscribed to this list.)
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 1371 bytes
Desc: not available
Url : http://tug.org/pipermail/texhax/attachments/20051016/bb426166/tx-cm-side-by-side.png
More information about the texhax