24 Oct
2008
24 Oct
'08
3:15 p.m.
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.
\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)) ; But then you have to be careful about the differences between \sometxt in MKII and MKIV (which I need to summarize on the wiki). Aditya