Re: [NTG-context] Metapost+mpgraph and mkiv
On Saturday 07 November 2009 17:21:04 Taco Hoekwater wrote:
1. You should load the MP packages you need in \startMPinclusions (this is where the code really belongs, even in mkii) instead of inside each separate graphic.
2. You have to make sure that you do not re-state equations that were already solved in a previous graphic.
These are in fact the excact same rules that you have to adhere to in mkii if \runMPgraphicsfalse is active.
So, for the mailing list, here is a working solution (mkii & mkiv): %% minimal example %% \starttext \startMPinclusions input graph \stopMPinclusions \startuseMPgraphic{test} draw begingraph(16cm,12cm); setrange(whatever,whatever,whatever,whatever); gdraw (0,0) -- (1,1) ; endgraph; \stopuseMPgraphic \startTEXpage \useMPgraphic{test} \stopTEXpage \stoptext
glabel <option list> withcolor is broken (mkiv and mkii). The label at the first point is black (the 2nd comes out red). %% minimal example %% \setupcolors[state=start] \usemodule[graph] \startuseMPgraphic{test} draw begingraph(16cm,12cm); gdraw (0,0) -- (1,1) withcolor red ; glabel.urt(btex beginning etex, 0) withcolor red ; glabel.llft(btex \red end etex, infinity) ; endgraph; \stopuseMPgraphic \starttext \startTEXpage \useMPgraphic{test} \stopTEXpage \stoptext
participants (2)
-
Alan BRASLAU
-
Wolfgang Schuster