From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/4607 Path: main.gmane.org!not-for-mail From: Johannes Huesing Newsgroups: gmane.comp.tex.context Subject: Metapost example and code Date: Sun, 29 Apr 2001 12:53:28 +0200 Sender: owner-ntg-context@let.uu.nl Message-ID: <20010429125328.A1242@ruhrau.de> Reply-To: johannes.huesing@ruhrau.de NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: main.gmane.org 1035395259 27100 80.91.224.250 (23 Oct 2002 17:47:39 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 23 Oct 2002 17:47:39 +0000 (UTC) Original-To: ntg-context@ntg.nl Xref: main.gmane.org gmane.comp.tex.context:4607 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:4607 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 %%%% ! Undefined control sequence. \def \fontattribute {\getvalue {\??be MPExample\c!letter }} \doifdefinedelse ...t \donottest \doprocesstest #2 \fi \do\dostartattributes ... \fontattribute =\empty } \doifdefinedelse {#1#3} {\... ...es {\??be MPExample}\c!letter \c!kleur {} }\endwrite ...?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]