# [tex-live] [luatex] Ignored italic correction with lua(la)tex format

Sat Oct 8 09:35:24 CEST 2011

```2011/10/8 Reinhard Kotucha <reinhard.kotucha at web.de>:
> On 2011-10-07 at 00:01:52 +0100, Arthur Reutenauer wrote:
>
>  > >                                               I don't think catcodes
>  > > are the right thing in order to determine where to apply italic
>  > > correction.
>  >
>  >   They are for hyphenation...
>
> I must admit that it's unclear to me where catcodes are involved.  I
> would expect that hyphenation works on character codes only.  At which
> point are catcodes involved?  Anyway, hyphenation is applied between
> letters, and letters always have catcode 11.  This seems to be safe
> because when I set \catcode`\e=12 , I break the system anyway (can't
> even say \bye).

You could, and most typesetting-related things should still work since
catcodes are only for input processing. Once there is a mlist/hlist,
the catcodes are gone and not used any more.

>
> As far as italic correction is concerned, I'm even more clueless.  An
> italic correction is applied if one switches from an italic font to an
> upright font.

There is no font switching at all in OpenType math mode. In our
example, the italic P and the opening parentheses are characters from
the same font.

> If catcodes are involved, does LuaTeX insert italic
> correction automatically?  If yes, when?

It suppresses italic correction after all category-11 characters.

> What I'm concerned about is
> that, for instance, an exclamation mark can have catcode 11 if one
> want to use it in control sequence names, or catcode 12 otherwise.
> I would expect to get the same amount of kerning in both cases.

Sure. Another reason why the current LuaTeX behavior is not kosher.
Math typesetting uses the math class and family for distinctions in
typesetting, but should never use the catcode.

```