[luatex] [tex-live] Ignored italic correction with lua(la)tex format
Khaled Hosny
khaledhosny at eglug.org
Thu Oct 13 19:00:43 CEST 2011
On Thu, Oct 13, 2011 at 05:32:53PM +0200, Taco Hoekwater wrote:
> On 10/13/2011 04:35 PM, Ulrike Fischer wrote:
> >
> >The perl script says "# \catcode = 11 for everything with GC=L*"
> >
> >and the unicode-data entry for e.g. the mathematical P is:
> >
> >1D443;MATHEMATICAL ITALIC CAPITAL P;Lu;0;L;<font> 0050;;;;N;;;;;
> >
> >So I would say it has catcode 11 because unicode says it is a
> >letter.
>
> IMHO, The Unicode specification is being silly, but nothing can be
> done about that, I am quite sure.
>
> In any case: probably luatex should not be using \catcode's to make
> decisions. Luckily, following the Unicode logic, it would be allowed
> to use \lccode <> 0 instead. It would still be wrong though, and
> that is the frustrating part here: it is not at all clear to me what
> the algorithm should be on when to apply italic corrections in math
> mode.
I did a bit of testing with Word, it seems for alphanumeric symbols
(e.g. f, or 1) the italic correction is only applied when it is
followed by a non-alphanumeric symbol, e.g. between "(", "f(" and "1("
but not "" or "" or "f1". For non alphanumeric symbols, e.g. "+" or
"∫" (as a symbol not an operator), italic correction is always applied,
e.g. between "+++" or "∫∫∫" or "∫+∫+". At the end of math mode italic
correction is always applied.
So, it seems to me the algorithm is something like:
if not isalphanum(current)
apply_ic(current)
else
if not next or not isalphanum(next)
apply_ic(current)
Regards,
Khaled
More information about the luatex
mailing list