On Fri, Oct 24, 2008 at 3:15 PM, Aditya Mahajan <[EMAIL PROTECTED]> wrote: > On Fri, 24 Oct 2008, Wolfgang Schuster wrote: > >> Hi all, >> >> what is the best method to format MetaPost labels in MkII with \doattributes. > > \startMPenvironment[global] >> \setupcolors[state=start] >> >> \def\labelstyle{bold} >> \def\labelcolor{red} > \stopMPenvironment > > This gives you only bold label.
I try to avoid this. >> \starttext >> \startMPcode >> label(textext("\doattributes{label}{style}{color}{Label}"),origin) ; >> \stopMPcode >> \stoptext > > Tex colors do not work inside textext. Try > > label(textext("\startcolor[red] red \stopcolor"), origin) ; > > One way to get around this is to use \sometxt. > > label(\sometxt{\doattributes{label}{style}{color}{Label}},(5cm,0)) ; This helped me. > But then you have to be careful about the differences between \sometxt in > MKII and MKIV (which I need to summarize on the wiki). I use different code for MkII and MkIV and could use the best for each file. Thanks and regards, Wolfgang ___________________________________________________________________________________ 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 ___________________________________________________________________________________