# [luatex] \mathchardef\foo=\mathcode\x

jfbu jfbu at free.fr
Fri Dec 18 23:34:29 CET 2015

Le 18 déc. 2015 à 23:20, David Carlisle <d.p.carlisle at gmail.com> a écrit :

> On 18 December 2015 at 21:57, jfbu <jfbu at free.fr> wrote:
>> Hi David,
>>
>
>>
>> I thought package lualatex-math by Philipp Stephani addressed
>> these amsmath problems with \std at minus and \std at equal already ?
>
> It does some things yes but standard amsmath loads without error
> in luatex prior to .87. In 0.87 it gives errors while loading which will
> affect a lot of documents unless we we can get it updated
> (or adjust things so an  update not necessary) before tl2016.
> lualatex-math hasn't been been updated since yesterday to adapt to
> luatex 0.87 has it?

not that I know of... Sorry for not having paid enough attention
to the fact that your message is motivated by 0.87

>
> In the other message
>
>> which has the \mathcode/\mathchardef issue if one has assigned
>> an Umathcode to -
>
>
> not sure what you mean by that?

well, I only meant that when a Umathcode had been assigned to -,
the

\mathchardef\std at minus\mathcode\-\relax

within \newmcodes@,
hence within any macro \foo having been user declared via
\DeclareMathOperator
(which is not the case of \sin, \cos, etc... in amsopn.sty)
provoked an error.

>
> In .87  assigning a \mathcode to - or assigning a Umathcode to it
> are the same thing (and luatex always reports
> the Umathcode version when you query it) so essentially
> it will be the case that a umath ccode is assigned to - at that point.

but \mathchardef is not updated to recognize a \Umathcode from a \mathcode ?

(I don't want to derail the thread though and will just sit back
and read the upcoming explanations by knowledgeable people)

cheers

Jean-François