[XeTeX] [EXT] A LaTeX Unicode initialization desire/question/suggestion
Doug McKenna
doug at mathemaesthetics.com
Sat Jan 11 17:18:28 CET 2020
Phil Taylor wrote:
>| How about delaying the definition of \Umathcode until after
>| "load-unicode-data.tex" has been processed ? Is that possible, and
>| would it have undesirable side-effects ?
\Umathcode is a XeTeX primitive extension to the TeX language in the service of solving a problem in classic TeX, which was that the machinery and syntax of the classic TeX \mathchar primitive could not handle 21-bit Unicode values, or more than 16 math font families, etc. So \Umathchar (and a bunch of other related extensions all starting with 'U') is defined in XeTeX's WEB source code; it exists the moment the engine is launched. Thus it's not possible to delay \Umathchar's definition.
Furthermore, the purpose of executing "load-unicode-data.tex" is precisely to populate the \Umathchar table, as well as other Unicode character tables. So these tables have to exist prior to executing the file. Perhaps I'm misunderstanding your question.
In any case, my point is that a TeX engine interested in initializing itself as fast as possible (using a different form of the exact same official Unicode character data) should be able to avoid processing "load-unicode-data.tex" altogether, because doing so ends up being a completely redundant waste of time (and, depending upon implementation, space). XeTeX does not have to care about this, but other Unicode engines, certainly the one I'm working on, will care.
A couple of lines of TeX code added to the file appears to me to solve the problem, with no downside to creating the XeTeX LaTeX format.
Doug McKenna
Mathemaesthetics, Inc.
More information about the XeTeX
mailing list