[metapost] mptopdf corrupts source file - Engines.tar.bz2 (1/1)

Hans Hagen pragma at wxs.nl
Sun Jan 17 21:30:28 CET 2010


On 17-1-2010 20:26, Nicola wrote:
> In article<71A4055B-3954-4401-9101-5416E97CE85C at mpq.mpg.de>,
>   Oliver Buerschaper<oliver.buerschaper at mpq.mpg.de>  wrote:
>
>> consider this:
>>
>> --
>> verbatimtex
>>      \setupbodyfont[10pt]
>> etex
>>
>>
>> beginfig(1);
>>      draw btex Hello world! etex;
>> endfig;
>>
>>
>> end
>> --
>>
>> This is a typical example for my workflow where I need the labels to be
>> typeset by ConTeXt. Apparently this is *not* what happens in your MetaFun
>> script
>
> This seems to work for me:
>
> verbatimtex
>     %&cont-en
>     \setupbodyfont[10pt]
> etex
>
> beginfig(1);
>     draw btex Hello world! etex;
> endfig;

just mnake a tex file, say figure-001.tex

\startMPpage
%     fill fullcircle scaled 10cm ;
%     draw textext("test \sl test") ;
     draw btex test \sl test etex ;
\stopMPpage

and run that one

context figure-001

this is probably the easiest way

(the context commands will run context mkiv which uses the mplib 
linbrary; you can use texexec instead but it's a bit slower and you 
might need to wrap the code in \starttext ... \stoptext)


-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------


More information about the metapost mailing list