yes I had realized this already but I still don't know how to
get those page numbers down into MP - they keep being strings
with macro code instead
is there a way the I can get \setupMPvariables[hdrPgs]
in \setupheadertexts[\setups{page:header}]
to be fully evaluated and stored as the page number in the
MPvariables first= and next= ??
\startsetups page:header\setupMPvariables[hdrPgs][curr=\pagenumber,first={\ref[page][\headerfirst]},next={\ref[page][\headernext]}]
I've tried \expanded and \numeric without success
or alternatively in MP how would I call TeX (from MP) with a string like "\ref[page][a]" and have the page number stored in a numeric var?
Thanks
in advance,
Werner
On 3/18/2021 6:14 PM, Werner Hennrich wrote:
metafun > log >watch closely to the previous log line ... you're missing quotes so mp sees \ref [page] and as it ignores a \ it sees ref[page] which unless you defined 'ref' and 'page' triggers an error
metafun > log > error: Improper subscript has been replaced by zero
metapost > log > <*> ... numeric numFirst; numFirst := \ref [page]
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------