\asciimode and MetaPost in LMTX result in “Isolated expression”
Hi!
LMTX seems to have an issue with \asciimode and MetaPost:
\asciimode
\starttext
\startMPcode
fill unitsquare scaled 2cm;
\stopMPcode
\stoptext
Results in:
metafun > log > error: Isolated expression
metafun > log >
metapost > trace > <error> .dash.patterns
metapost > trace > <to be read again> vardef
metafun > log >
metafun > log > I couldn't find an '=' or ':=' after the expression that is shown above this
error message, so I guess I'll just ignore it and carry on.
metafun > log >
metapost > trace >
On Mon, 31 Jan 2022 20:02:42 +0100
Marco Patzer via ntg-context
LMTX seems to have an issue with \asciimode and MetaPost:
\asciimode \starttext \startMPcode fill unitsquare scaled 2cm; \stopMPcode \stoptext
Results in:
metafun > log > error: Isolated expression
This is still an issue with today's ver: 2022.03.12 11:27 LMTX. Marco
On Mon, 31 Jan 2022 20:02:42 +0100 Marco Patzer via ntg-context
wrote: LMTX seems to have an issue with \asciimode and MetaPost:
\asciimode \starttext \startMPcode fill unitsquare scaled 2cm; \stopMPcode \stoptext
Results in:
metafun > log > error: Isolated expression
This is still an issue with today's ver: 2022.03.12 11:27 LMTX.
On 3/12/2022 3:35 PM, Marco Patzer via ntg-context wrote: that's because ascimode messes up some catcodes .. you can try this (in cont-new.tex): \prependtoks \setcatcodetable\ctxcatcodes \to \everyMPgraphic and then do lots of tests with and without asciimode so see if this doesn't interfere Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
On Sat, 12 Mar 2022 15:51:16 +0100
Hans Hagen
you can try this (in cont-new.tex):
\prependtoks \setcatcodetable\ctxcatcodes \to \everyMPgraphic
and then do lots of tests with and without asciimode so see if this doesn't interfere
I run almost every document with \asciimode, so I can surely test that aspect, but I'm not using MetaPost a lot these days. I ran a few projects and it seems to work fine. But that's not what I'd call extensive testing. I think compiling the MetaPost manual would be a good test. But on my machine this fails even without the \ctxcatcode fix in place. Maybe someone else with more MetaPost-heavy workflows¹ can test this, too? Marco ¹ Hraban? nudge, nudge…
Am 12.03.22 um 18:08 schrieb Marco Patzer via ntg-context:
Maybe someone else with more MetaPost-heavy workflows¹ can test this, too?
Marco
¹ Hraban? nudge, nudge…
My use of MetaPost is very simple, I still don’t understand much... My current and most MP-heavy project so far, fails in asciimode with "Extra }, or forgotten \endgroup" No time to investigate why, ATM. Hraban
On Sat, 12 Mar 2022 22:27:38 +0100
Henning Hraban Ramm via ntg-context
My current and most MP-heavy project so far, fails in asciimode with "Extra }, or forgotten \endgroup"
You can't just run “normal” projects with \asciimode. Chances are, constructs are being used that are invalid in asciimode. But as far as I understand, it should be sufficient running it without asciimode just with the \ctxcatcodes snippet in place to test if that breaks something.
No time to investigate why, ATM.
No problem. Thanks for checking. Marco
participants (3)
-
Hans Hagen
-
Henning Hraban Ramm
-
Marco Patzer