[luatex] Missing math primitive & assorted remarks
taco at elvenkind.com
Tue Jul 13 09:02:29 CEST 2010
On 07/13/2010 08:25 AM, Will Robertson wrote:
> I know this is a little late to be reporting the problem... I just
> realised that I missed documenting a maths primitive in xetexref, and
> LuaTeX is also missing it.
That happened precisely because the XeTeX documentation was missing.
> \XeTeXmathcharnumdef is the "logical" extension to \mathchar, which uses
> a single integer input to encode the fam/type/slot information. This
> primitive is used where legacy code would look like:
> \mathchardef\foo=\mathcode`\- % (e.g., see amsmath)
> I'm not stuck on any code that needs this feature (and I think that
> \omathchardef probably supports most uses anyway?) but the primitive
> should probably be included in some later version of LuaTeX.
> I should probably just mention that the LuaTeX manual is a little
> unclear on the use of "num" variants of the primitives; they're intended
> for when the mathcode information needs to be passed around as in the
> example above; without the "num" primitives, you could query the
> single-integer mathcode information but you couldn't do anything useful
> with it.
I don't want to over-document the new 'num' variants because they are
ugly and the (\the) functionality they offer is in most cases better
achieved via \directlua.
> While I'm on the topic, I've just discovered a small difference in the
> way XeTeX and LuaTeX handle the legacy "\mathcode" primitive when it is
> used to query the mathcode of a character. See attached example,
> compiled with both engines; the difference is that in LuaTeX, \mathcode
> behaves like \Umathcodenum always, whereas in XeTeX \mathcode retains
> its legacy behaviour.
What does XeTeX do with \the\mathcode`\( when
\Umathcode `\( = "4 "20 "1D400
More information about the luatex