[luatex] a question about the names \Umathcharnumdef etc
Joseph Wright
joseph.wright at morningstar2.co.uk
Fri Oct 16 10:07:18 CEST 2015
On 16/10/2015 08:47, Ulrike Fischer wrote:
> Am Thu, 15 Oct 2015 18:18:58 +0100 schrieb David Carlisle:
>
>>> or perhaps \Umathcharnumdef was always ok ?
>>
>> yes, it was, the Umath... commands were always available with their
>> basic luatex names and also prefixed luatex.
>
> That's not true. In a texlive 2012
>
> \documentclass{article}
>
> \begin{document}
> \show\Umathcharnumdef
> \show\luatexUmathcharnumdef
> \end{document}
>
> gives
>
>> \Umathcharnumdef=undefined.
> l.36 \show\Umathcharnumdef
>
> ?
>> \luatexUmathcharnumdef=\Umathcharnumdef.
> l.37 \show\luatexUmathcharnumdef
For LuaTeX
\directlua{
local i
local t = { }
for _,i in pairs(tex.extraprimitives("luatex")) do
if string.match(i, "^U") then
table.insert(t, i)
end
end
tex.enableprimitives("", tex.extraprimitives("Umath"))
tex.enableprimitives("", t)
}
will enable all of the \U... primitives with their 'natural names with
older LuaTeX releases and newer ones: they used to be just part of the
"luatex" list. So something like
\ifdefined\directlua
\directlua{
local i
local t = { }
for _,i in pairs(tex.extraprimitives("luatex")) do
if string.match(i,"^U") then
table.insert(t,i)
end
end
tex.enableprimitives("", tex.extraprimitives("Umath"))
tex.enableprimitives("", t)
}
\else
\ifdefined\XeTeXmathcode
\let\Umathcode\XeTeXmathcode
\let\Umathcodenum\XeTeXmathcodenum
\let\Umathchar\XeTeXmathchar
\let\Umathcharnum\XeTeXmathcharnum
\let\Umathchardef\XeTeXmathchardef
\let\Umathcharnumdef\XeTeXmathcharnumdef
\let\Udelcode\XeTeXdelcode
\let\Udelcodenum\XeTeXdelcodenum
\let\Udelimiter\XeTeXdelimiter
\let\Umathaccent\XeTeXmathaccent
\let\Uradical\XeTeXradical
\fi
\fi
should get you \U... with all possible supported engines.
Joseph
More information about the luatex
mailing list