Bug with ConTeXt and pgfplot library fillbetween

Hi, The following example fails: \usemodule[pgfplots] \usepgfplotslibrary[fillbetween] \starttext \startformula \left. a \right| \stopformula \stoptext with tex error > tex error on line 7 in file /private/tmp/test.tex: ! Missing \endgroup inserted <inserted text> \endgroup <to be read again> \Ucheckedstopdisplaymath \stopdisplaymath ...math \Ucheckedstopdisplaymath \par \ifvmode \ifcase \c_s... \strc_formulas_stop_formula ...native \v!formula } \dostoptagged \dostoptagge... l.7 \stopformula This is a weird bug. Only \left. \right| fails; \left| \right| works correctly. If I remove the fillbetween library, the error goes away. Any hints as to what is happening will be appreciated. Thanks, Aditya

The fillbetween library changes the catcode of the bar character. \starttext \the\catcode`| \usemodule[pgfplots] \usepgfplotslibrary[fillbetween] \the\catcode`| \stoptext You get the same error when you use \asciimode in your document. \asciimode \starttext \startformula \left. a \right| \stopformula \stoptext Wolfgang

On Fri, 23 Oct 2015, Wolfgang Schuster wrote:
Thanks! What is the easiest way to fix this (without patching tikz)? I thought that \pushcatcodetable \usemodule[pgfplots] \usepgfplotslibrary[fillbetween] \popcatcodetable should work, but it does not. Why? Surrounding by \unprotect ... \protect does work, so I am wondering what is the difference between the two? Aditya

Below is a simplified version of your example where the catcode change remains even when I try to restore the default settings with \catcodetable\ctxcatcodes but I don’t now if this is a bug. \starttext \the\catcode`| \catcode`|=12 \catcodetable\ctxcatcodes \the\catcode`| \stoptext Wolfgang

On Mon, 26 Oct 2015, Wolfgang Schuster wrote:
This works: \starttext \the\catcode`| \pushcatcodetable \catcodetable\prtcatcodes \catcode`|=12 \popcatcodetable \the\catcode`| \stoptext (Note that under \prtcatcode, the catcode of | is 12). But replacing \prtcatcodes with \ctxcatcodes does not work. So, one "proper" fix may be add a new catcodetable, say \tikzcatcodes, for all the catcode changes that tikz does. Aditya
participants (3)
-
Aditya Mahajan
-
Mojca Miklavec
-
Wolfgang Schuster