[lltx] pattern loading in luatex

Ulrike Fischer news3 at nililand.de
Thu Feb 24 11:10:46 CET 2011

Am Thu, 24 Feb 2011 10:33:57 +0100 schrieb Stephan Hennig:

> [moving to lualatex list]
> schrieb Mojca Miklavec:
>>> For LuaTeX, are the new German patterns currently held twice in
>>> memory, e.g., as language ngerman (via hyph-utf8) and
>>> dehyphn-x-2009-06-19 (via dehyph-exptl)?
>> They are not held in memory at all (the synonyms are), they are
>> loaded on demand. However in XeTeX they are (the same patterns are
>> first loaded as ngerman and then as dehyphn-x-2009-06-19; once from
>> out package and once from yours).
> That is interesting.  With LuaTeX being able to load patterns at
> run-time, there are now three different pattern loading strategies
> possible (that I can think of):
>   1.  Load all patterns in the format.
>   2.  Load all patterns unconditionally at start-up, but only
>       after loading the format.
>   3.  Load requested patterns on demand.
> Strategy 2 would already decouple patterns from the format and be a step
> into the direction of strategy 3.  My impression was (for whatever
> reason), that lualatex uses strategy 2 or at least it did once.  Is it
> really true that, now, lualatex loads only requested patterns on demand,
> that is, it uses strategy 3?

Yes. lualatex uses a special hyphen.cfg stored in
tex\luatex\hyph-utf8.  It loads only english as default. Other
languages (which must be activated in the language.dat) are loaded
when requested. If you put e.g. somewhere in your document 

\makeatletter \bbl at patterns{ngerman}

You will see a message in the log

luatex-hyphen: loading patterns and exceptions for: ngerman

Ulrike Fischer 

More information about the lualatex-dev mailing list