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
On 2/17/2016 11:27 AM, Meer, Hans van der wrote:
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.
That was a tricky one to nail down ... it related to the fact that have \{ and \} have a different meaning when we flush metapost text (makes me wonder if that is still needed) this helps \installmathfencepair \letteropenbrace \Lbrace \letterclosebrace \Rbrace
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
___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________
-- ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
Thanks for the quick answer.
This error looks tricky indeed. I haven't the faintest illusion I could have found out by myself...
Hans van der Meer
On 17 Feb 2016, at 13:34, Hans Hagen
participants (2)
-
Hans Hagen
-
Meer, Hans van der