On Thu, 13 Aug 2009, richard.stephens@converteam.com wrote:
Hello,
Is it possible to generate multi-line labels in MetaPost? I have naively tried the following hoping to get a line feed between the two words, but it doesn't work!
label.rt( btex One \crlf Two etex, (0,0));
\defineframed[mplabel][frame=off,align=right,width=fit]
label.rt(textext("\mplabel{One\\Two}"),origin) ;
Wolfgang
Thank-you for a very elegant solution, Wolfgang, unfortunately I get an error:
! Argument of \dododefinecolor has an extra }.
I have fixed this by using:
label.rt(textext("\framed[frame=off,align=right]{One\\Two}"),origin);
which works okay. It's not as elegant but as the code is generated automatically it does not require any more typing on my part!
Section 4.2 of Mojca's MyWay on sometxt http://dl.contextgarden.net/myway/sometxt.pdf provides another solution. Aditya