From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/34991 Path: news.gmane.org!not-for-mail From: "Zhichu Chen" Newsgroups: gmane.comp.tex.context Subject: Re: Weird Fieldstack problem Date: Mon, 11 Jun 2007 19:56:28 +0800 Message-ID: <769ba7780706110456r49a5696dnad8fb2e3d80855c3@mail.gmail.com> References: <769ba7780706080135v3a1511dci754a8cc3b95b364f@mail.gmail.com> <769ba7780706080816p1f5b3c3fq845dcf7c834b4814@mail.gmail.com> <20070608133536.69zi83gaowscg04s@web.mail.umich.edu> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1791277780==" X-Trace: sea.gmane.org 1181563020 31087 80.91.229.12 (11 Jun 2007 11:57:00 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 11 Jun 2007 11:57:00 +0000 (UTC) To: "mailing list for ConTeXt users" Original-X-From: ntg-context-bounces@ntg.nl Mon Jun 11 13:56:47 2007 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by lo.gmane.org with esmtp (Exim 4.50) id 1HxiVr-0000u1-1z for gctc-ntg-context-518@m.gmane.org; Mon, 11 Jun 2007 13:56:47 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id AD85D20167; Mon, 11 Jun 2007 13:56:45 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 03142-02; Mon, 11 Jun 2007 13:56:37 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 836B92016C; Mon, 11 Jun 2007 13:56:37 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id CCDEE2016C for ; Mon, 11 Jun 2007 13:56:35 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 03184-01-4 for ; Mon, 11 Jun 2007 13:56:33 +0200 (CEST) Original-Received: from nz-out-0506.google.com (nz-out-0506.google.com [64.233.162.239]) by ronja.ntg.nl (Postfix) with ESMTP id D25AC20167 for ; Mon, 11 Jun 2007 13:56:32 +0200 (CEST) Original-Received: by nz-out-0506.google.com with SMTP id o1so1314772nzf for ; Mon, 11 Jun 2007 04:56:28 -0700 (PDT) Original-Received: by 10.115.58.1 with SMTP id l1mr5419714wak.1181562988208; Mon, 11 Jun 2007 04:56:28 -0700 (PDT) Original-Received: by 10.114.103.11 with HTTP; Mon, 11 Jun 2007 04:56:28 -0700 (PDT) In-Reply-To: <20070608133536.69zi83gaowscg04s@web.mail.umich.edu> X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.9 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:34991 Archived-At: --===============1791277780== Content-Type: multipart/alternative; boundary="----=_Part_99154_24513131.1181562988182" ------=_Part_99154_24513131.1181562988182 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline 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 wrote: > > Quoting Zhichu Chen : > > > 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@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 ---------------------------------------------------------------- ------=_Part_99154_24513131.1181562988182 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline 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@umich.edu> wrote:
Quoting Zhichu Chen < zhichu.chen@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@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
---------------------------------------------------------------- ------=_Part_99154_24513131.1181562988182-- --===============1791277780== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@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 ___________________________________________________________________________________ --===============1791277780==--