Some code that worked ok but hasn't been used for some time, now gives an error: missing $.
It is working fine in ConTeXt, but putting it inside an MPpage goes wrong.

Here a minimal example, the output of the ConTeXt run and the error on the MPpage run.
Has something changed I missed?

Hans van der Meer


The error occurs in this code, my suspect is the cases macro.
\starttext
\startsetups[dif-1]
$\displaystyle
\Delta_{in} = 1000_2 \cases{(A,2)(2,A)&\cr (6,E)(E,6)&\cr}
\buildrel S_1 \over \rightarrow \quad
\Delta_{uit} = 1011_2 \cases{(6,D)(D,6)&\cr (B,0)(0,B)&\cr}
$
\stopsetups
\startMPpage
label("\setup[dif-1]",origin);
\stopMPpage
\stoptext

tex error       > tex error on line 9 in file /Users/hansm/Documents/TeX/Test-tex/cases/cases.tex: ! Missing $ inserted

<inserted text> 
$
<to be read again> 
\endgroup 
\math_fenced_fenced_stop ...leparameter \endgroup 
                                                  \advance \c_math_fenced_ne...
\14>:dif-1 ...ses {(A,2)(2,A)&\cr (6,E)(E,6)&\cr }
                                                  \buildrel S_1 \over \right...
l.9 ...edfont[LMRoman-Regular*default]\setup [dif-1]

                                                  

<to be read again> 
\relax 
...
l.12 \stopMPpage

The ConTeXt run itself is ok, see below

\starttext
\startsetups[dif-1]
$\displaystyle
\Delta_{in} = 1000_2 \cases{(A,2)(2,A)&\cr (6,E)(E,6)&\cr}
\buildrel S_1 \over \rightarrow \quad
\Delta_{uit} = 1011_2 \cases{(6,D)(D,6)&\cr (B,0)(0,B)&\cr}
$
\stopsetups
\setup[dif-1]
\stoptext