ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen <pragma@wxs.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: new error in Context-Metapost
Date: Wed, 17 Feb 2016 13:34:09 +0100	[thread overview]
Message-ID: <56C468C1.6010309@wxs.nl> (raw)
In-Reply-To: <97284027-1647-4226-80E4-3F45BBEE3A06@uva.nl>

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
___________________________________________________________________________________

  reply	other threads:[~2016-02-17 12:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-17 10:27 Meer, Hans van der
2016-02-17 12:34 ` Hans Hagen [this message]
2016-02-17 13:17   ` Meer, Hans van der

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56C468C1.6010309@wxs.nl \
    --to=pragma@wxs.nl \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).