Open main menu

Changes

added scaling page functionality to the Layer sets as individual pages code
draw textext(decimal(\MPvar{mypagenumber})) scaled .1u withcolor magenta ;
setbounds currentpicture to TheFrame ;
%scaling the page to your preferred dimension:
desiredformat := 150;% In pixels (will be converted by default at 72dpi)
currentpicture := currentpicture xysized (desiredformat ,desiredformat );
\stopuseMPgraphic %finishing
draw layerW ;
draw layerA ;
\includeMPgraphic{finishing}
\stopuseMPgraphic
\includeMPgraphic{layersetpage1} ;
draw layerV ;
\includeMPgraphic{finishing}
\stopuseMPgraphic
\includeMPgraphic{layersetpage2} ;
\includeMPgraphic{Gamma} ;
\includeMPgraphic{finishing}
\stopuseMPgraphic
\includeMPgraphic{layersetpre4} ;
label("special!", (z3+z4)/2) rotated 5 withcolor red;
\includeMPgraphic{finishing}
\stopuseMPgraphic
\includeMPgraphic{layersetpage3} ;
draw layerC ;
\includeMPgraphic{finishing}
\stopuseMPgraphic
\includeMPgraphic{layersetpre4} ;
draw layerC ;
\includeMPgraphic{finishing}
\stopuseMPgraphic
\dorecurse{6}{ %This loop starts from 1 until the set number and draws each layersetpage onto its own page. Don't set a number which is higher than the number of your last layersetpage.
 
%By differentiating finishinglayersetpage#1 from finishinglayersetpage#1, we can avoid adding \includeMPgraphic{finishing} to each \startuseMPgraphic{layersetpage<number>}. This allows us to apply the scaling of the page to our desiredformat, because the scaling will done only once per \useMPgraphic{}
\startuseMPgraphic{finishinglayersetpage#1}
\includeMPgraphic{layersetpage#1} ;
\includeMPgraphic{finishing}
\stopuseMPgraphic
 
\startTEXpage
\useMPgraphic{layersetpagefinishinglayersetpage#1}{mypagenumber=#1}
\stopTEXpage
}
12

edits