[luatex] fontspec prevents hyphenation
mpg at elzevir.fr
Tue Nov 23 19:43:49 CET 2010
Le 23/11/2010 19:14, Mojca Miklavec a écrit :
> On Tue, Nov 23, 2010 at 19:05, Manuel Pégourié-Gonnard wrote:
>>> % Because latex.ltx sets up character code tables for T1 encoding by default,
>>> % we need to reset values from unicode-letters that may have been overridden
>> Sorry if I'm asking a very stupid question, but why not simply input
>> unicode-letters *after* latex.ltx, then? It would avoid duplicating this part of
>> the code.
> Don't ask me - it is you who has written the patch with
> unicode-letters. It may be that XeTeX needs some magic and proper
> catcodes/lccodes before loading latex.ltx and/or other macros.
Ok, I got it. latex.ltx inputs hyphen.cfg which load patterns using \patterns.
At this point, everything inside the "argument" of \patterns needs to have a
non-zero \lccode or TeX will complain that "Nonletter." For characters in the
0-255 range, this is taken care of by the latex kernel (which is precisely the
cause of the problem). For Unicode characters outside this range, \lccodes have
to be set (by unicode-letters) before patterns are loaded.
Since patterns are not really loaded at this point in LuaTeX, we don't really
need to load luatex-unidoe-letters before latex.ltx.
(Which reminds me, I should reread section 6 of the luatex manual, I guess
LuaTeX handles lccodes in a more clever way than other *TeXs, but I'm not
> I'm CC-ing Jonathan. Maybe he can explain you better why lccodes are
> set twice in xelatex - before and after loading latex.ltx. You can
> probably move unicode-letters for lualatex to the end of lualatex.ini
> without any consequences. You just need to make sure that you not only
> set the codes for letters, but also unset them for non-letters in the
> "80-"FF range.
Yep, I think I'll do that, after some testing.
More information about the luatex