ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Renaud AUBIN <aubin@nibua-r.org>
Subject: Re: followtokens & font color
Date: Sun, 08 Jan 2006 21:52:19 +0100	[thread overview]
Message-ID: <43C17B83.2050106@nibua-r.org> (raw)
In-Reply-To: <43BFCE18.9010002@boede.nl>

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

  reply	other threads:[~2006-01-08 20:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-06 23:18 Renaud AUBIN
2006-01-07 14:20 ` Willi Egger
2006-01-08 20:52   ` Renaud AUBIN [this message]
2006-01-07 14:27 ` headers of multiple pages toc Willi Egger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=43C17B83.2050106@nibua-r.org \
    --to=aubin@nibua-r.org \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).