Hi, I wonder if it's necessary to manually load the MetaPost variables using LoadPageState. Some of them are static and do not require an update on each page, e.g. NOfPages, but many of them might change on each page, e.g. OnOddPage, PageNumber, TextWidth. Forgetting to use LoadPageState easily results in perfectly valid code producing wrong results, which might not be hard to spot. Example:
\setuplayout [width=10cm]
\showframe
\starttext
\startMPcode
fill unitsquare xyscaled (\the\textwidth, 2cm);
\stopMPcode
\startMPcode
fill unitsquare xyscaled (TextWidth, 2cm);
\stopMPcode
\startMPcode
LoadPageState;
fill unitsquare xyscaled (TextWidth, 2cm);
\stopMPcode
\stoptext
I assume it's too inefficient to load the page state automatically
for each graphic. However, loading the page state automatically is
simple:
\startMPinitializations
LoadPageState;
\stopMPinitializations
Marco
signature.asc
Description: Digital signature
___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : [email protected] / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________
