[tex-k] dynamically loading \patterns

Karl Berry karl at freefriends.org
Thu Mar 3 15:20:29 CET 2005


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?

Or, looking at it another way, what would be the downside of always
using initex?  I doubt the initialization speed is an issue these days.

I seem to remember some stuff in tex.web that makes me think it might be
nontrivial to allow dynamically reloading patterns.  I think wholesale
replacement for a given \language is more important than being able to
add patterns.

The reason for this whole idea is that it would be nice to be able to
improve hyphenation patterns as time goes by, like everything else,
instead of being stuck with, say, Knuth's 1982 patterns for US English
for the rest of time.  On the other hand, of course there's a need for
archived documents to be able to be typeset again as they were.

The thing that makes hyphenation patterns different than style files in
this regard is that it's relatively easy to get TeX to load different
style files, if you want some archived snapshot (e.g., put them all in
the current directory).  But to load different patterns, you have to
build a new format, which is pretty impractical (version skew,
unportable, and just plain painful).

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.

Wdyt?

Thanks,
k



More information about the tex-k mailing list