ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* \asciimode and MetaPost in LMTX result in “Isolated expression”
@ 2022-01-31 19:02 Marco Patzer via ntg-context
  2022-03-12 14:35 ` Marco Patzer via ntg-context
  0 siblings, 1 reply; 6+ messages in thread
From: Marco Patzer via ntg-context @ 2022-01-31 19:02 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Marco Patzer

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 > <line 107> vardef dashpattern(text t) =

Marco

ConTeXt  ver: 2022.01.21 20:13 LMTX  fmt: 2022.1.21
___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re:  \asciimode and MetaPost in LMTX result in “Isolated expression”
  2022-01-31 19:02 \asciimode and MetaPost in LMTX result in “Isolated expression” Marco Patzer via ntg-context
@ 2022-03-12 14:35 ` Marco Patzer via ntg-context
  2022-03-12 14:51   ` Hans Hagen via ntg-context
  0 siblings, 1 reply; 6+ messages in thread
From: Marco Patzer via ntg-context @ 2022-03-12 14:35 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Marco Patzer

On Mon, 31 Jan 2022 20:02:42 +0100
Marco Patzer via ntg-context <ntg-context@ntg.nl> 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.

Marco
___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re:  \asciimode and MetaPost in LMTX result in “Isolated expression”
  2022-03-12 14:35 ` Marco Patzer via ntg-context
@ 2022-03-12 14:51   ` Hans Hagen via ntg-context
  2022-03-12 17:08     ` Marco Patzer via ntg-context
  0 siblings, 1 reply; 6+ messages in thread
From: Hans Hagen via ntg-context @ 2022-03-12 14:51 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Hans Hagen

On 3/12/2022 3:35 PM, Marco Patzer via ntg-context wrote:
> On Mon, 31 Jan 2022 20:02:42 +0100
> Marco Patzer via ntg-context <ntg-context@ntg.nl> 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.
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
-----------------------------------------------------------------
___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re:  \asciimode and MetaPost in LMTX result in “Isolated expression”
  2022-03-12 14:51   ` Hans Hagen via ntg-context
@ 2022-03-12 17:08     ` Marco Patzer via ntg-context
  2022-03-12 21:27       ` Henning Hraban Ramm via ntg-context
  0 siblings, 1 reply; 6+ messages in thread
From: Marco Patzer via ntg-context @ 2022-03-12 17:08 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Marco Patzer

On Sat, 12 Mar 2022 15:51:16 +0100
Hans Hagen <j.hagen@xs4all.nl> wrote:

> 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…
___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re:  \asciimode and MetaPost in LMTX result in “Isolated expression”
  2022-03-12 17:08     ` Marco Patzer via ntg-context
@ 2022-03-12 21:27       ` Henning Hraban Ramm via ntg-context
  2022-03-13  7:30         ` Marco Patzer via ntg-context
  0 siblings, 1 reply; 6+ messages in thread
From: Henning Hraban Ramm via ntg-context @ 2022-03-12 21:27 UTC (permalink / raw)
  To: ntg-context; +Cc: Henning Hraban Ramm

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
___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re:  \asciimode and MetaPost in LMTX result in “Isolated expression”
  2022-03-12 21:27       ` Henning Hraban Ramm via ntg-context
@ 2022-03-13  7:30         ` Marco Patzer via ntg-context
  0 siblings, 0 replies; 6+ messages in thread
From: Marco Patzer via ntg-context @ 2022-03-13  7:30 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Marco Patzer

On Sat, 12 Mar 2022 22:27:38 +0100
Henning Hraban Ramm via ntg-context <ntg-context@ntg.nl> wrote:

> 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
___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

end of thread, other threads:[~2022-03-13  7:30 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-31 19:02 \asciimode and MetaPost in LMTX result in “Isolated expression” Marco Patzer via ntg-context
2022-03-12 14:35 ` Marco Patzer via ntg-context
2022-03-12 14:51   ` Hans Hagen via ntg-context
2022-03-12 17:08     ` Marco Patzer via ntg-context
2022-03-12 21:27       ` Henning Hraban Ramm via ntg-context
2022-03-13  7:30         ` Marco Patzer via ntg-context

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).