Multi-line labels in MetaPost MKIV
Hello all, What is the recommended method for creating multi-line labels in MetaPost in MKIV, please? I have the following code: \definetextext[mplabel]{\framed[frame=off,align=middle]} \starttext \startMPpage input mp-tool; draw fullcircle scaled 5cm; label(\sometxt[mplabel]{One\\Two}, (0,0)); \stopMPpage \stoptext which gives a line feed between One and Two using MKII, but no line feed in MKIV. Thanks, Richard Converteam UK Ltd. Registration Number: 5571739 and Converteam Ltd. Registration Number: 2416188 Registered in England and Wales. Registered office: Boughton Road, Rugby, Warwickshire, CV21 1BU. CONFIDENTIALITY : This e-mail and any attachments are confidential and may be privileged. If you are not a named recipient, please notify the sender immediately and do not disclose the contents to another person, use it for any purpose or store or copy the information in any medium. http://www.converteam.com Please consider the environment before printing this e-mail.
Am 28.07.10 10:03, schrieb Richard Stephens:
Hello all,
What is the recommended method for creating multi-line labels in MetaPost in MKIV, please? I have the following code:
\definetextext[mplabel]{\framed[frame=off,align=middle]} \starttext \startMPpage input mp-tool;
draw fullcircle scaled 5cm; label(\sometxt[mplabel]{One\\Two}, (0,0)); \stopMPpage \stoptext
which gives a line feed between One and Two using MKII, but no line feed in MKIV.
\defineframed[mplabel][frame=off,align=middle] \starttext \startMPpage draw fullcircle scaled 5cm ; label(textext("\mplabel{One\\Two}"),origin)) ; \stopMPpage \stoptext Wolfgang
Am 28.07.10 10:03, schrieb Richard Stephens:
Hello all,
What is the recommended method for creating multi-line labels in MetaPost in MKIV, please? I have the following code:
\definetextext[mplabel]{\framed[frame=off,align=middle]} \starttext \startMPpage input mp-tool;
draw fullcircle scaled 5cm; label(\sometxt[mplabel]{One\\Two}, (0,0)); \stopMPpage \stoptext
which gives a line feed between One and Two using MKII, but no line feed in MKIV.
\defineframed[mplabel][frame=off,align=middle]
\starttext \startMPpage draw fullcircle scaled 5cm ; label(textext("\mplabel{One\\Two}"),origin)) ; \stopMPpage \stoptext
Wolfgang
Thanks for the suggestion, but I still don't get a line feed! I am using ConTeXt from 15-May-2010, has something changed since then? Richard Converteam UK Ltd. Registration Number: 5571739 and Converteam Ltd. Registration Number: 2416188 Registered in England and Wales. Registered office: Boughton Road, Rugby, Warwickshire, CV21 1BU. CONFIDENTIALITY : This e-mail and any attachments are confidential and may be privileged. If you are not a named recipient, please notify the sender immediately and do not disclose the contents to another person, use it for any purpose or store or copy the information in any medium. http://www.converteam.com Please consider the environment before printing this e-mail.
On 28-7-2010 12:22, Richard Stephens wrote:
Am 28.07.10 10:03, schrieb Richard Stephens:
Hello all,
What is the recommended method for creating multi-line labels in MetaPost in MKIV, please? I have the following code:
\definetextext[mplabel]{\framed[frame=off,align=middle]} \starttext \startMPpage input mp-tool;
draw fullcircle scaled 5cm; label(\sometxt[mplabel]{One\\Two}, (0,0)); \stopMPpage \stoptext
which gives a line feed between One and Two using MKII, but no line feed in MKIV.
\defineframed[mplabel][frame=off,align=middle]
\starttext \startMPpage draw fullcircle scaled 5cm ; label(textext("\mplabel{One\\Two}"),origin)) ; \stopMPpage \stoptext
Wolfgang
Thanks for the suggestion, but I still don't get a line feed! I am using ConTeXt from 15-May-2010, has something changed since then?
in pack-rul.mkiv add \unexpanded here: \unexpanded\def\vboxednewline {\endgraf\ignorespaces} \unexpanded\def\hboxednewline {\unskip\normalspace\ignorespaces} and then remake the format (it's a side effect of nested framed usage) ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
participants (3)
-
Hans Hagen
-
Richard Stephens
-
Wolfgang Schuster