color in drawoptions (mplib)
hi, just encountered an expansion problem with color inside drawoptions... % engine=luatex \starttext \startuniqueMPgraphic{foo} begingroup save c ; color c[] ; c0:= red; drawoptions(withcolor c0); fill OverlayBox; endgroup; \stopuniqueMPgraphic \defineoverlay[foo][\uniqueMPgraphic{foo}] \framed[width=10cm,background=foo]{} \stoptext regards, peter
Peter Rolf wrote:
hi,
just encountered an expansion problem with color inside drawoptions...
The patch below fixes this issue. Best wishes, Taco --- /opt/tex/texmf-local/metapost/context/base/mp-mlib.mp.orig 2008-05-12 12:14:46.000000000 +0200 +++ /opt/tex/texmf-local/metapost/context/base/mp-mlib.mp 2008-06-12 18:13:34.785337518 +0200 @@ -26,7 +26,7 @@ _tt_p_ := nullpicture ; enddef ; -extra_endfig := ";draw _tt_p_; " & extra_endfig ; +extra_endfig := ";addto currentpicture also _tt_p_; " & extra_endfig; extra_beginfig := extra_beginfig & "resettextexts;"; vardef rawtextext(expr str) =
Taco Hoekwater wrote:
-extra_endfig := ";draw _tt_p_; " & extra_endfig ; +extra_endfig := ";addto currentpicture also _tt_p_; " & extra_endfig;
subtle ... fixed Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
Hans Hagen schrieb:
Taco Hoekwater wrote:
-extra_endfig := ";draw _tt_p_; " & extra_endfig ; +extra_endfig := ";addto currentpicture also _tt_p_; " & extra_endfig;
subtle ... fixed
yep! works again. thank you!
Hans
----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | 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://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________
Taco Hoekwater wrote:
-extra_endfig := ";draw _tt_p_; " & extra_endfig ; +extra_endfig := ";addto currentpicture also _tt_p_; " & extra_endfig; extra_beginfig := extra_beginfig & "resettextexts;";
after this fix you need to do ctxtools --touch context --make otherwise the mplib format will not be regenerated; normally this happens automatically when a new version is installed Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
Hans Hagen schrieb:
Taco Hoekwater wrote:
-extra_endfig := ";draw _tt_p_; " & extra_endfig ; +extra_endfig := ";addto currentpicture also _tt_p_; " & extra_endfig; extra_beginfig := extra_beginfig & "resettextexts;";
after this fix you need to do
ctxtools --touch context --make
otherwise the mplib format will not be regenerated; normally this happens automatically when a new version is installed
ah, good to know. 'till now i have deleted the old format by hand.
Hans
----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | 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://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________
participants (3)
-
Hans Hagen
-
Peter Rolf
-
Taco Hoekwater