ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* MP and multiline text
@ 2011-07-29 10:05 Procházka Lukáš Ing. - Pontex s. r. o.
  2011-07-29 12:05 ` Hans Hagen
  0 siblings, 1 reply; 2+ messages in thread
From: Procházka Lukáš Ing. - Pontex s. r. o. @ 2011-07-29 10:05 UTC (permalink / raw)
  To: ConTeXt

[-- Attachment #1: Type: text/plain, Size: 906 bytes --]

Hello,

is it possible to create multiline text only with \crlf, \par etc. inside a MP block?

The following example treats \par (or \crlf resp.) as a space (or skips it completely), so is there another trick?

----
\setMPtext{Text}{TEXT\par UUU}

\startuseMPgraphic{Test}
   fill fullsquare xyscaled(10cm, 5cm) withcolor red;
   label(btex AAA aaa etex, (0, 1cm));
   label(btex BBB \crlf bbb etex, (0, 0cm));
   label(btex CCC \par ccc etex, (0, -1cm));
   label(\MPbetex{Text}, (0, -2cm));
\stopuseMPgraphic

\starttext
   \useMPgraphic{Test}
\stoptext
----

Or - if multiline text is wanted - each line of the text must be placed separately by MP code?

Best regards,

Lukas


-- 
Ing. Lukáš Procházka [mailto:LPr@pontex.cz]
Pontex s. r. o.      [mailto:pontex@pontex.cz] [http://www.pontex.cz]
Bezová 1658
147 14 Praha 4

Tel: +420 244 062 238
Fax: +420 244 461 038

[-- Attachment #2: Test.mkiv --]
[-- Type: application/octet-stream, Size: 347 bytes --]

\setMPtext{Text}{TEXT\par UUU}

\startuseMPgraphic{Test}
  fill fullsquare xyscaled(10cm, 5cm) withcolor red;
  label(btex AAA aaa etex, (0, 1cm));
  label(btex BBB \crlf bbb etex, (0, 0cm));
  label(btex CCC \par ccc etex, (0, -1cm));
  label(\MPbetex{Text}, (0, -2cm));
\stopuseMPgraphic

\starttext
  \useMPgraphic{Test}
\stoptext

[-- Attachment #3: Test.pdf --]
[-- Type: application/pdf, Size: 6227 bytes --]

[-- Attachment #4: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: MP and multiline text
  2011-07-29 10:05 MP and multiline text Procházka Lukáš Ing. - Pontex s. r. o.
@ 2011-07-29 12:05 ` Hans Hagen
  0 siblings, 0 replies; 2+ messages in thread
From: Hans Hagen @ 2011-07-29 12:05 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 29-7-2011 12:05, Procházka Lukáš Ing. - Pontex s. r. o. wrote:
> \setMPtext{Text}{TEXT\par UUU}
>
> \startuseMPgraphic{Test}
>    fill fullsquare xyscaled(10cm, 5cm) withcolor red;
>    label(btex AAA aaa etex, (0, 1cm));
>    label(btex BBB \crlf bbb etex, (0, 0cm));
>    label(btex CCC \par ccc etex, (0, -1cm));
>    label(\MPbetex{Text}, (0, -2cm));
> \stopuseMPgraphic
>
> \starttext
>    \useMPgraphic{Test}
> \stoptext
\startuseMPgraphic{Test}
     fill fullsquare xyscaled(10cm, 5cm) withcolor red;
     label(textext("\framed[align=normal,width=10cm]{\input{knuth}}"), 
(0, 0cm));
\stopuseMPgraphic

\starttext
     \useMPgraphic{Test}
\stoptext


-- 

-----------------------------------------------------------------
                                           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
-----------------------------------------------------------------
___________________________________________________________________________________
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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-07-29 12:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-29 10:05 MP and multiline text Procházka Lukáš Ing. - Pontex s. r. o.
2011-07-29 12:05 ` Hans Hagen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).