Hello,

I am defining functions to design timelines. What I did works as long as dates are positive, but fails with Ancien Greece or prahistory. Looks like I do something wrong with MPvariables.

This works:

\setuppapersize [S3]
\starttext

\startreusableMPgraphic{Frise}
numeric l;
numeric a; a:= -900;
numeric b; b:= -800;
l:=abs(a-b);
draw fullsquare xyscaled (l,10);
\stopreusableMPgraphic

\reuseMPgraphic{Frise}
\stoptext

Whereas this MWE does not compile:

\setuppapersize [S3]
\starttext

\setupMPvariables[Frise][début=-900]
\setupMPvariables[Frise][fin=-800]

\startreusableMPgraphic{Frise}
numeric l;
l:=\MPvar{début}-\MPvar{fin};
l:=abs(l);
draw fullsquare xyscaled (l,10);
\stopreusableMPgraphic

\reuseMPgraphic{Frise}

\stoptext


I tried also without success:

\setupMPvariables[Frise][début={-900}]
\setupMPvariables[Frise][fin={-800}]

What is the problem here?

Damien


BTW, I couldn't check the mailing list archive to find some related topics, the server didn't answer to my requests…
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : [email protected] / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

Reply via email to