Hi all, I use \followtokens and I would colorize the text. I've try some drawoptions or ConTeXt command to switch font color (i.e. {\red red text}) and nothing works. Is it possible to switch color during \definefont[RotFont][] ? Any idea on how to do this ? PS: Please, is there anyone who can answer to my thread [NTG-context] headers of multiple pages toc ? Thanks
Hi Renaud, you can define a color with \definecolor[brown] [r=.9,g=.8,b=0.6] in your MEATPOST code you can say things like drawoptions(withcolor \MPcolor{brown}) i.e. that all will be drawn in borwn draw ... withcolor \MPcolor{brown} i.e. append the color to the drawing statement. Willi Renaud AUBIN wrote:
Hi all,
I use \followtokens and I would colorize the text. I've try some drawoptions or ConTeXt command to switch font color (i.e. {\red red text}) and nothing works. Is it possible to switch color during \definefont[RotFont][] ? Any idea on how to do this ?
PS: Please, is there anyone who can answer to my thread [NTG-context] headers of multiple pages toc ?
Thanks
------------------------------------------------------------------------
_______________________________________________ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Hi Willi, all, Thank you for your answer but it doesn't work... I need it quickly, so I've a solution but it's not, hum, very clean since I don't know metapost very well: \def\followtokens#1% {\vbox\bgroup \forgetall \dontcomplain \startMPenvironment \doifundefined{RotFont}{\definefont[RotFont][RegularBold]} \stopMPenvironment \MPtoks\emptytoks \resetMPdrawing \startMPdrawing \includeMPgraphic{followtokens} picture pic[] ; numeric len[], n ; n := 0 ; \stopMPdrawing \handletokens#1\with\processfollowingtoken \startMPdrawing if unknown RotPath : path RotPath ; RotPath := origin ; fi ; if unknown RotColor : color RotColor ; RotColor := (0,.625,0) ; fi ; % mygreen if unknown TraceRot : boolean TraceRot ; TraceRot := false ; fi ; ... Renaud Willi Egger a écrit :
Hi Renaud,
you can define a color with \definecolor[brown] [r=.9,g=.8,b=0.6]
in your MEATPOST code you can say things like drawoptions(withcolor \MPcolor{brown}) i.e. that all will be drawn in borwn draw ... withcolor \MPcolor{brown} i.e. append the color to the drawing statement.
Willi
Hi Renaud, Actually I have the thread deleted... Still, if I remember correctly, you could do things like \setupheadertexts[Mybook-title][Contents] \completecontent[criterium=all, interaction=all] Where \completecontent places a title and an entry in the TOC itself. The following pages of the TOC will get a header as setup with the setupheadertexts command. Willi
participants (2)
-
Renaud AUBIN
-
Willi Egger