From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/31224 Path: news.gmane.org!not-for-mail From: Aditya Mahajan Newsgroups: gmane.comp.tex.context Subject: Re: MPenvironment \def gives "Parameters must be numbered consecutively" Date: Thu, 5 Oct 2006 03:10:32 -0400 (EDT) Message-ID: References: <451CCB4F.6090409@wxs.nl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1160032525 26256 80.91.229.2 (5 Oct 2006 07:15:25 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 5 Oct 2006 07:15:25 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Thu Oct 05 09:15:23 2006 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 ciao.gmane.org with esmtp (Exim 4.43) id 1GVNRo-0000sI-V0 for gctc-ntg-context-518@m.gmane.org; Thu, 05 Oct 2006 09:15:13 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 9B6B31FEAF; Thu, 5 Oct 2006 09:15:11 +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 03582-03-2; Thu, 5 Oct 2006 09:14:59 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 75A801FE7F; Thu, 5 Oct 2006 09:14:59 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 868C41FE5B for ; Thu, 5 Oct 2006 09:14:54 +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 03582-03 for ; Thu, 5 Oct 2006 09:14:44 +0200 (CEST) Original-Received: from hackers.mr.itd.umich.edu (smtp.mail.umich.edu [141.211.14.81]) by ronja.ntg.nl (Postfix) with SMTP id 593211FE7F for ; Thu, 5 Oct 2006 09:10:33 +0200 (CEST) Original-Received: FROM aditya.annarb01.mi.comcast.net (c-68-40-50-205.hsd1.mi.comcast.net [68.40.50.205]) BY hackers.mr.itd.umich.edu ID 4524AFE8.A06D8.3273 ; 5 Oct 2006 03:10:32 -0400 Original-To: mailing list for ConTeXt users In-Reply-To: <451CCB4F.6090409@wxs.nl> X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.7 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:31224 Archived-At: On Fri, 29 Sep 2006, Hans Hagen wrote: > environments are saved in macros, therefore you end up in an argument > mess > > > > \starttext > > \startbuffer[mp] > \def\2#1#2{\vbox{\halign{\hfil##\hfil\cr #1\cr #2\cr}}} > \stopbuffer > > \def\useMPenvironmentbuffer[#1]% > > {\expanded{\startMPenvironment\noexpand\readfile{\TEXbufferfile{\jobname}}{}{}}\stopMPenvironment} Shouldn't that be \readfile{\TEXbufferfile{#1}? > \useMPenvironmentbuffer[mp] > \startreusableMPgraphic{fig} > label(btex sun etex, origin); If you try label(btex \2{one}{two} etex, origin) ; it does not work. > \stopreusableMPgraphic > > \reuseMPgraphic{fig} > > \stoptext > > works ok ; maybe i should add that command to the core but anyhow you > can wikify it How about defining something like \startMPTEX .... \stopMPTEX which writes everything to a file jobname-mp, so that the user does not need to be aware that he/she has to create a buffer with the name mp. However, using \startbuffer[mp] is fragile as the user can also define a buffer with the name mp. How about a different/ less common word, say verbtaimtex? Aditya