[tex-k] dynamically loading \patterns

Olaf Weber olaf at infovore.xs4all.nl
Mon Mar 7 18:32:34 CET 2005

Karl Berry writes:

> Hello Olaf and all,
> How hard would it be to relax the restriction that \patterns can only be
> executed by initex?  E.g., so a TeX document could load replacement
> patterns for a language for that document, instead of having it embedded
> in a format?

There seem to be two limitations on \patterns: the first is that you
can only use it in -ini mode, to save memory for ordinary runs.  The
web2c implementation doesn't save this memory because the (statically
allocated!) arrays are always present.

The second limitation is that TeX wants to have all patterns read
before typesetting begins (see |new_patterns| in tex.web).  I'm not
certain where that limitation comes from, it might be trivial to lift
(perhaps only applicable to "\language 0") or it might be hard.


> So if we could load new patterns dynamically, in the sources, we could,
> say, build latex.fmt with a hypothetical hyphen-en-US-2005.tex, and old
> source files could explicitly input the original hyphen.tex if there was
> a concern for archival typesetting.

Now this has me worried a bit: does this mean you want the patterns to
be a wholesale replacement for already loaded patterns?  (At present
they are accumulative for the current language.)

Olaf Weber

               (This space left blank for technical reasons.)

More information about the tex-k mailing list