ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Metapost example and code
@ 2001-04-29 10:53 Johannes Huesing
  2001-05-04 15:29 ` Hans Hagen
  0 siblings, 1 reply; 5+ messages in thread
From: Johannes Huesing @ 2001-04-29 10:53 UTC (permalink / raw)


Hi all,

I am trying to define a start-stop-environment which allows me to
prettyprint MetaPost code and display its results. This is what I
tried:

%%%% code begins here %%%%
\runMPgraphicstrue

\def\PreMPExample{\startbuffer[mpe]}

\def\PostMPExmaple{\stopbuffer%
   \startMPgraphic
     input mpe.tmp;
   \stopMPgraphic
   \placeMPgraphic[right]{none}
   \expandafter\startMP
     \input mpe.tmp
   \stopMP
   }    
\starttext
\stoptext

\startMPExample
 draw
 for i=0 upto 4:
   (50, 0) rotated (i*144) --
  endfor
 cycle;
\stopMPExample

\stoptext
%%%% code ends here %%%%

and this is what I got:

%%%% messages begin here %%%%
<mpe.tmp>
! Undefined control sequence.
<argument> \def \fontattribute 
                               {\getvalue {\??be MPExample\c!letter }}
\doifdefinedelse ...t \donottest \doprocesstest #2
                                                  \fi 
\do\dostartattributes ... \fontattribute =\empty }
                                                  \doifdefinedelse {#1#3} {\...
<write> ...es {\??be MPExample}\c!letter \c!kleur 
                                                  {}
<inserted text> 
                }\endwrite 
<argument> ...?be MPExample}\c!letter \c!kleur {}}

...
%%%% messages end here %%%%

Does anybody have an idea what I am doing wrong here? I didn't use the
useMPgraphics constructs in order not to have to worry clashing
temporary file names. 

Groetjes 

Johannes
-- 
Johannes Hüsing | Domain: Adresse im Internet. Besteht aus einem 
hannes@ruhrau.de| technischen Teil (http://www.), einem Namen 
                | (erwin_meier) und einer Endung  (zum Beispiel 
                | .de für Deutschland) [J. Albrecht, "Zeit" 12/2001]


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

end of thread, other threads:[~2001-05-08  6:19 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-04-29 10:53 Metapost example and code Johannes Huesing
2001-05-04 15:29 ` Hans Hagen
2001-05-06  4:15   ` Johannes Huesing
2001-05-07  8:21     ` Hans Hagen
2001-05-08  6:19       ` Johannes Huesing

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