[luatex] a question about the names \Umathcharnumdef etc
David Carlisle
d.p.carlisle at gmail.com
Thu Oct 15 19:37:52 CEST 2015
On 15 October 2015 at 18:35, jfbu <jfbu at free.fr> wrote:
> Hi Joseph
>
> Le 15 oct. 2015 à 19:29, Joseph Wright <joseph.wright at morningstar2.co.uk> a écrit :
>
>>>
>>
>> Hello Jean-François,
>>
>> The 'real' names of the primitives have always been just \Umath... For
>> some time they've been enabled with the "luatex" prefix.. The LaTeX team
>> have recently taken a more 'active' interest in directly supporting
>> LuaTeX (and XeTeX) by modifying latex.ltx to 'know' about these engines.
>> As part of that process, we've revised the approach to the newer
>> primitives and dropped the prefix 'out of the box'.
>>
>> For code that needs to work both with older (pre 2015/10/01) and newer
>> (2015/10/01 onward) kernel releases, adding
>>
>> \directlua{
>> tex.enableprimitives("luatex", tex.extraprimitives("Umath"))
>> }
>>
>> (for just the Umath set) will do the job. Alternatively, if the code in
>> your package gets modified to drop the prefix then
>>
>> \directlua{
>> tex.enableprimitives("", tex.extraprimitives("Umath"))
>> }
>>
>> will ensure that the 'natural' names are available with older kernel
>> releases.
>
>
> OK, let's see if I get you right: I remove from mathastext.sty
> all "luatex" prefixes, but also I need to add
>
> \directlua{
> tex.enableprimitives("", tex.extraprimitives("Umath"))
> }
>
> to mathastext.sty if it detects luatex,
>
> so as to be sure the new version of the package will work also
> with older LaTeX releases ?
>
> is that right ?
>
> best,
>
> Jean-François
That works in general for primitives that were previously prefixed
\luatex... but the \Umath... names are special in that they were
previously available both prefixed and not prefixed, so you can just
use the unprefixed ones.
David
More information about the luatex
mailing list