On 2/12/2021 12:42 PM, Floris van Manen wrote:
What is the correct ways to pass parameters into a \startMPpage section?
This does not produce a page (obviously if you know how it works)
But how to get the intende output?
\def\blz[#1][#2][#3]{
\startMPpage
draw thefmttext(#1) shifted(10mm, 20mm);
draw thefmttext(#2) shifted(10mm, 205m);
draw thefmttext(#3) shifted(10mm, 30mm);
\stopMPpage
}
\blz[01][02][AA]
\blz[03][42][ZZ]
whatever suits your purpose or taste, like
\def\blz[#1]%
{\begingroup
\setvariables[blz][#1]%
\startMPpage
draw textext("\getvariable{blz}{a}") shifted(10mm, 10mm);
draw textext("\getvariable{blz}{b}") shifted(10mm, 20mm);
draw textext("\getvariable{blz}{c}") shifted(10mm, 30mm);
\stopMPpage
\endgroup}
\blz[a=01,b=02,c=AA]
-
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
___