[NTG-context] Weird Fieldstack problem

Zhichu Chen zhichu.chen at gmail.com
Mon Jun 11 13:56:28 CEST 2007


Hi Aditya,

In my situation, I can't use buffer conveniently. So is there an easy way to
\includeMPgraphic recurrently? I've tried
====================================
\newcount\steps

%%%%%%%% repeat the following block several times
\advance\steps\plusone
\startuseMPgraphics{step\the\steps}
. . . % Some random graphics
\stopuseMPgraphic
%%%%%%%%%%%%%%%%%%%%%%%%%

\startuseMPgraphic{aa}
\dorecurse{\the\steps}
  {\includeMPgraphic{step\recurselevel}}
\stopuseMPgraphic
====================================

but, it's not working.

On 6/9/07, Aditya Mahajan <adityam at umich.edu> wrote:
>
> Quoting Zhichu Chen <zhichu.chen at gmail.com>:
>
> > Hi Aditya,
> >
> > Actually, they should have the same boundingbox, the first MPdrawing
> > environment draws a line from (0,0) to (2cm,2cm) and the sequence
> MPdrawing
> > environments just add two lines that are in the previous boundingbox.
> >
> > I know what's happening now. \definesymbol doesn't define a symbol
> > from \getMPdrawing at once.
>
> Yes, \definesymbol[a][b] is roughly equal to \def\a{b}, for example
>
> \starttext
>
> \def\something{aa}
>
> \definesymbol[aa][\something]
> \symbol[aa]
>
> \def\something{bb}
> \symbol[aa]
>
> \stoptext
>
> This is what is also happening in your case. You need to go back to the
> definebuffer and processbuffer as suggested in metafun manual.
>
> I do not know if it makes sense to have a \edef version of
> definesymbol. In any case, getting expansion to work with \getMPdrawing
> is going to be difficult.
>
> Aditya
>
>
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context at ntg.nl /
> http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
> archive  : https://foundry.supelec.fr/projects/contextrev/
> wiki     : http://contextgarden.net
>
> ___________________________________________________________________________________
>



-- 
Best Regards
Chen
----------------------------------------------------------------

          Zhi-chu Chen | Shanghai Synchrotron Radiation Facility
         No. 2019 | Jialuo Rd. | Jiading | Shanghai | P.R. China
             tel: 086 21 5955 3405 | zhichu.chen.googlepages.com
                                               | www.sinap.ac.cn
----------------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.ntg.nl/pipermail/ntg-context/attachments/20070611/9f927500/attachment.html 


More information about the ntg-context mailing list