ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* new error in Context-Metapost
@ 2016-02-17 10:27 Meer, Hans van der
  2016-02-17 12:34 ` Hans Hagen
  0 siblings, 1 reply; 3+ messages in thread
From: Meer, Hans van der @ 2016-02-17 10:27 UTC (permalink / raw)
  To: NTG ConTeXt


[-- Attachment #1.1: Type: text/plain, Size: 1529 bytes --]

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




[-- Attachment #1.2: Type: text/html, Size: 5612 bytes --]

[-- Attachment #2: cases.pdf --]
[-- Type: application/pdf, Size: 11303 bytes --]

[-- Attachment #3: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: new error in Context-Metapost
  2016-02-17 10:27 new error in Context-Metapost Meer, Hans van der
@ 2016-02-17 12:34 ` Hans Hagen
  2016-02-17 13:17   ` Meer, Hans van der
  0 siblings, 1 reply; 3+ messages in thread
From: Hans Hagen @ 2016-02-17 12:34 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
-----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: new error in Context-Metapost
  2016-02-17 12:34 ` Hans Hagen
@ 2016-02-17 13:17   ` Meer, Hans van der
  0 siblings, 0 replies; 3+ messages in thread
From: Meer, Hans van der @ 2016-02-17 13:17 UTC (permalink / raw)
  To: NTG ConTeXt


[-- Attachment #1.1: Type: text/plain, Size: 517 bytes --]

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 <pragma@wxs.nl<mailto:pragma@wxs.nl>> wrote:
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


[-- Attachment #1.2: Type: text/html, Size: 3085 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-02-17 13:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-17 10:27 new error in Context-Metapost Meer, Hans van der
2016-02-17 12:34 ` Hans Hagen
2016-02-17 13:17   ` Meer, Hans van der

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).