[passing parameter into MPpage]
![](https://secure.gravatar.com/avatar/aaec8862a4c7f861ffc1f105419e1805.jpg?s=120&d=mm&r=g)
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]
![](https://secure.gravatar.com/avatar/46562c7d27388490d62e8d7a5bc960dd.jpg?s=120&d=mm&r=g)
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 -----------------------------------------------------------------
participants (2)
-
Floris van Manen
-
Hans Hagen