[NTG-context] trouble with \startMPinclusions[+]

Sanjoy Mahajan sanjoy at mrao.cam.ac.uk
Sat Sep 23 05:15:14 CEST 2006


The small test file below uses \startMPinclusions[+], but it produces
"TeX capacity exceeded" from what looks like an endless loop.  The error
msgs are below the file.  This is with context 2006.08.08 21:51, and the
live ConTeXt (2006.09.17) gives the same error.

[I was trying to test whether I could replicate my standalong metapost
programming style within metafun. I often have:

u := 1cm;
% a couple figures using this u:=1cm unit size;
beginfig(1)
fill ...
endfig;
etc.
% now a few figures with a different unit size
u := 1.5cm;
beginfig(10)
fill ...
endfig;
...

So I wanted to see whether I could use \startMPinclusions[+] midway
through the source file, in between several
\start(stop)reusableMPgraphic blocks, to change u between figures.  But
the error msgs intervened.  Anyway, here's the file.  The
currentcolor(def) in the error msgs makes me wonder whether it's related
to the new code to make there be a fixed current color before each
figure?]

=================== cut here =================
\starttext

\startreusableMPgraphic{a}
fill fullcircle scaled 1cm;
\stopreusableMPgraphic

\placefigure[force,none]{}{\reuseMPgraphic{a}}

hello

% instead, just \startMPinclusions works (i.e. without the [+])
\startMPinclusions[+]
\stopMPinclusions

\startreusableMPgraphic{b}
fill fullcircle scaled 1cm;
\stopreusableMPgraphic

\placefigure[force,none]{}{\reuseMPgraphic{b}}

hello2

\stoptext
=================== cut here =================

And a piece of the log:

floatblocks     : order disturbed
floatblocks     : 1 placed
color           : currentcolor (def) is not defined 
! TeX capacity exceeded, sorry [input stack size=1500].
\theMPinclusions ->\theMPinclusions 
                                    \writeMPgraphic {
}
\theMPinclusions ->\theMPinclusions 
                                    \writeMPgraphic {
}
\theMPinclusions ->\theMPinclusions 
                                    \writeMPgraphic {
}
\theMPinclusions ->\theMPinclusions 
                                    \writeMPgraphic {
}
\theMPinclusions ->\theMPinclusions 
                                    \writeMPgraphic {
}
\theMPinclusions ->\theMPinclusions 
                                    \writeMPgraphic {
}
...
l.19 ...cefigure[force,none]{}{\reuseMPgraphic{b}}
                                                  
If you really absolutely need more capacity,
you can ask a wizard to enlarge me.


More information about the ntg-context mailing list