\startMPpage ... \stopMPpage
Hans, Taco, et al, There's a quote in metafun-s.pdf (page 539) that says "You can embed the graphic in a \startMPpage construct and process it with TEXEXEC. In that case you have the full MetaFun functionality available. Before processing the file, TEXEXEC will do a couple of checks on the file. It will also make sure that the auxiliary files (mpt for textext’s and mpo for outline fonts) are taken care of too." I am really unsure of what this means as the code below will attest. Simply uncomment % \startMPpage % \includeMPgraphic{EnglishRule} % \stopMPpage at the end and the file will not compile. Just what can and cannot be used between a \startMPpage ... \stopMPpage pair? This is first introduced in metafun-s.pdf on page 214 and wish there were more said there. %output=pdf \setupcolors[state=start] \definecolor[gridlines][s=0.7] \startMPinclusions color gridlines; gridlines:=\MPcolor{gridlines}; \stopMPinclusions \starttext \setupMPvariables [EnglishRule] [height=1ex, width=\localhsize, color=darkred] \startuniqueMPgraphic{EnglishRule}{height,width,color} numeric height; height=\MPvar{height}; x1=0; x3=\MPvar{width}; x2=x4=.5x3; y1=y3=0; y2:=-y4=height/2; fill z1..z2..z3 & z3..z4..z1 & cycle withcolor \MPvar{color}; \stopuniqueMPgraphic \defineblank [EnglishRule] [medium] \def\EnglishRule% {\startlinecorrection[EnglishRule] \setlocalhsize \noindent \reuseMPgraphic{EnglishRule} \stoplinecorrection} Why is this called an English line? \startnarrower \EnglishRule Is it because they cannot draw a straight one? This could be ture after a few strong beers, but then, ow do Germans draw a line? \EnglishRule \stopnarrower \defineblank [EnglishRule] [big] Why is this called an English line? \startnarrower \EnglishRule Is it because they cannot draw a straight one? This could be ture after a few strong beers, but then, ow do Germans draw a line? \EnglishRule \stopnarrower % \startMPpage % \includeMPgraphic{EnglishRule} % \stopMPpage \stoptext %%% Local Variables: %%% mode: conTeXt-en %%% End:
David Arnold wrote:
% \startMPpage % \includeMPgraphic{EnglishRule} % \stopMPpage
you can only include a simple usable graphic, defined with \startuseMPgraphic; unique mp graphics are more tricky and involve (once we have lua in tex we can find ways around this since then we can (1) implement some of the unique housekeeping in lua and (2) fool tex with hidden expansions) Hans
participants (2)
-
David Arnold
-
Hans Hagen