This test file (beta 2006.09.28):

============ 1.tex ============================
\starttext
\startMPenvironment
\def\2#1#2{\vbox{\halign{\hfil##\hfil\cr #1\cr #2\cr}}}
\stopMPenvironment

\startreusableMPgraphic{fig}
label(btex sun etex, origin);
\stopreusableMPgraphic

\reuseMPgraphic{fig}

\stoptext
========================================

fails with the error:

! Parameters must be numbered consecutively.
<to be read again> 
                   ##
l.44 \global \loadfontfileoncetrue \def \2##
                                            1##2{\vbox {\halign {\hfil ####\...


1-mpgraph.mp gets this figure definition:

beginfig(1);
verbatimtex \global \loadfontfileoncetrue \def \2##1##2{\vbox {\halign {\hfil 
####\hfil \cr ##1\cr ##2\cr }}}  etex;
label(btex  sun etex
, origin);
;
endfig;

So the parameters in the definition are being doubled up by one of the
transformations that inserts the verbatimtex..etex block.  By the way,
should the verbatimtex..etex block go outside the beginfig..endfig, as
it would in a standalone MP file?  If only for efficiency rather than MP
reparsing it with each beginfig.

-Sanjoy

`A society of sheep must in time beget a government of wolves.'
   -- Bertrand de Jouvenal
_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context

Reply via email to