[NTG-context] MetaPost, specifiy max width of a text?

Hans Hagen pragma at wxs.nl
Wed Mar 18 08:42:57 CET 2015


On 3/18/2015 8:25 AM, Norbert Melzer wrote:
> Hi there!
>
> Is there a way to specify the with of a text so that the text gets
> wrapped? Something simalar to the following TikZ-Example (wrapped in
> ConTeXt):
>
> ```tex
> \usemodule[tikz]
> \starttext
>    \starttikzpicture
>      \draw (0, 0) node[text width=2.5cm,align=center] {Start new Game};
>    \stoptikzpicture
>
>    \startMPcode
>      draw "Start new Game" infont defaultfont scaled defaultscale;
>    \stopMPcode
> \stoptext

\startMPpage
     draw textext("\framed[width=6cm,align={normal,tolerant}]{\input 
tufte\relax}") ;
\stopMPpage



-----------------------------------------------------------------
                                           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
-----------------------------------------------------------------


More information about the ntg-context mailing list