ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Parenthesis error in metapost
@ 2021-04-07  8:14 Mikael Sundqvist
  2021-04-07  9:29 ` Hans Hagen
  0 siblings, 1 reply; 2+ messages in thread
From: Mikael Sundqvist @ 2021-04-07  8:14 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi,

the following code has been working before:

\starttext
\startMPpage[instance=decimalfun]
draw function(1,"x","x*sin(x)",0.5,1,1/100) scaled 1in;
\stopMPpage
\stoptext

Now (with an updated ConTeXt) I get an error:

metapost        > loading 'metafun' as 'metafun.mpxl' using method 'decimal'
metapost        > initializing number mode 'decimal'
metafun         > log >
metafun         > log > error: Missing ')' has been inserted
metafun         > log >
metapost        > log > <to be read again>
metapost        > log >                    (
metapost        > log > <scantokens> x*sin(
metapost        > log >                    x)
metapost        > log > <to be read again>
metapost        > log >                    )

Maybe I have done something wrong earlier, but I cannot see any
unmatched parenthesis now.

/Mikael
___________________________________________________________________________________
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] 2+ messages in thread

* Re: Parenthesis error in metapost
  2021-04-07  8:14 Parenthesis error in metapost Mikael Sundqvist
@ 2021-04-07  9:29 ` Hans Hagen
  0 siblings, 0 replies; 2+ messages in thread
From: Hans Hagen @ 2021-04-07  9:29 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Mikael Sundqvist

On 4/7/2021 10:14 AM, Mikael Sundqvist wrote:
> Hi,
> 
> the following code has been working before:
> 
> \starttext
> \startMPpage[instance=decimalfun]
> draw function(1,"x","x*sin(x)",0.5,1,1/100) scaled 1in;
> \stopMPpage
> \stoptext
> 
> Now (with an updated ConTeXt) I get an error:
> 
> metapost        > loading 'metafun' as 'metafun.mpxl' using method 'decimal'
> metapost        > initializing number mode 'decimal'
> metafun         > log >
> metafun         > log > error: Missing ')' has been inserted
> metafun         > log >
> metapost        > log > <to be read again>
> metapost        > log >                    (
> metapost        > log > <scantokens> x*sin(
> metapost        > log >                    x)
> metapost        > log > <to be read again>
> metapost        > log >                    )
> 
> Maybe I have done something wrong earlier, but I cannot see any
> unmatched parenthesis now.
sin is just not defined in decimal mode (in scaled and double they use 
the math library) .. so i'll fix that

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] 2+ messages in thread

end of thread, other threads:[~2021-04-07  9:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-07  8:14 Parenthesis error in metapost Mikael Sundqvist
2021-04-07  9:29 ` Hans Hagen

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