From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/16006 Path: main.gmane.org!not-for-mail From: Vit Zyka Newsgroups: gmane.comp.tex.context Subject: Re: High level user macro (howto?) Date: Tue, 10 Aug 2004 14:35:52 +0200 Sender: ntg-context-bounces@ntg.nl Message-ID: <4118C128.4010806@seznam.cz> References: <"m2hdtw92rn.fs f"@levana.de> <6.1.1.1.2.20040601200608.01eb9640@server-1> <"m2n032tvs8.fs f"@levana.de> <20040622161300.GA5608@swordfish> <34371.80.58.5.46.1087924408.squirrel@bitmail.bitmailer.com> <0D45B077-C4DA-11D8-972E-000A9595B57C@ensta.fr> <40D944A4.5030402@gmx.de> <43DEE2EE-C510-11D8-972E-000A9595B57C@ensta.fr> <72D4BC80-C612-11D8-9706-0030659899AA@fiee.net> <40DC4CDF.2090904@wxs.nl> <5CAF4C26-C756-11D8-AE54-000A95C38698@chello.fr> <20040628113217.2efb080b@glenlivet.elvenkind.com> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1092141434 27312 80.91.224.253 (10 Aug 2004 12:37:14 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 10 Aug 2004 12:37:14 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Tue Aug 10 14:37:03 2004 Return-path: Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BuVsE-0003aZ-00 for ; Tue, 10 Aug 2004 14:37:02 +0200 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 8F1651276B; Tue, 10 Aug 2004 14:37:02 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (ronja.vet.uu.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 03250-02; Tue, 10 Aug 2004 14:37:02 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id C40821276F; Tue, 10 Aug 2004 14:35:18 +0200 (CEST) Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id A45171276F for ; Tue, 10 Aug 2004 14:35:17 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (ronja.vet.uu.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 03250-01 for ; Tue, 10 Aug 2004 14:35:17 +0200 (CEST) Original-Received: from smtp.seznam.cz (unknown [212.80.76.43]) by ronja.ntg.nl (Postfix) with SMTP id EACE71276B for ; Tue, 10 Aug 2004 14:35:16 +0200 (CEST) Original-Received: (qmail 2032 invoked from network); 10 Aug 2004 12:34:59 -0000 Original-Received: from unknown (HELO ?192.168.1.45?) (vit.zyka@82.142.74.35) by smtp.seznam.cz with SMTP; 10 Aug 2004 12:34:59 -0000 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7) Gecko/20040616 X-Accept-Language: cs, en-us, en Original-To: ntg-context@ntg.nl In-Reply-To: X-Virus-Scanned: by amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.5 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl X-Virus-Scanned: by amavisd-new at ntg.nl Xref: main.gmane.org gmane.comp.tex.context:16006 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:16006 > \useregime[il1] > \enableregime[il1] > \useencoding[ffr] > \definehspace[fr][:][.16667em] > \definehspace[fr][;][.16667em] > \definehspace[fr][!][.16667em] > \definehspace[fr][?][.16667em] > \mainlanguage[fr] > \newdimen\BigWidth \BigWidth=3D18cm > \setupscreens[screen=3D0.85] > \setupcolors[state=3Dstart] > \setupheadertexts[R=E9v.: \the\RevC] > \def\Vfil{\vskip0pt plus3fil\relax} > \def\In[#1,#2]{\ifx#1\empty\else\in[#1]\fi\if\relax#2\else, \In[#2]\fi} > \def\BigTitle{\centerline{\framed[width=3D\BigWidth,offset=3D2mm, > background=3Dscreen]{\bfb\setupinterlinespace\cbox{Title}}}} >=20 > \def\startChanges{\hbox to \hsize\bgroup\hss\SetTableToWidth{\BigWidth}= % > \starttable[s1 | c | c | p(95mm) | p(17mm) | p(37mm) |] > \HL\BL[5]\AR\VL R=E9v.\VL Date\VL Origine de la mise =E0 jour\VL=A7 m= odifi=E9\VL > Auteur\VL\AR\HL} > \def\stopChanges{\stoptable\hss\egroup}\newcount\RevC > \def\Changes#1[#2]{% > \getparameters[CH][#2]% Auteur, Modif, Labels, Date > \ifnum\RevC=3D0 \BigTitle \vskip0.5ex \Vfil \startChanges \fi > \global\advance\RevC by 1 \VL \the\RevC \VL \CHDate \VL \CHModif \VL > XXX%\In[\CHLabels,\relax] % does not work, but not so important for n= ow > \VL \CHAuteur \VL\AR\HL} > \def\Destinataires#1{\stopChanges\Vfil > \def\temp{#1}\ifx\temp\empty\else\noindenting Destinataires:\crlf#1\b= lank\fi > \centerline{\SetTableToWidth{\BigWidth}% > \bf\starttable[| c | c | c |] > \HL\BL[3]\AR\VL Approbateur\VL Date\VL Visa\VL\AR\HL > \VL\vbox to 2cm{}\VL\VL\VL\AR\HL > \stoptable}\par\page\completecontent} >=20 > \starttext > \Changes[Date=3D1/2/2004,Modif=3DFirst version,Auteur=3DPeter] > \Changes[Date=3D3/4/2004,Modif=3DSome modifications,Lables=3D{sec:S1,se= c:S2}, > Auteur=3DPeter M=FCnster] > \Changes[Date=3D5/6/2004,Modif=3DSome other modifications,Lables=3D{sec= :S2}, > Auteur=3DPeter] > % > \Destinataires{Peter, Olivier} >=20 > \section[sec:S1]{A section} > some text > \subsection{Bla} > \subsection{Bla} >=20 > \section[sec:S2]{Another section} > some text > \stoptext >=20 > Cheers, Peter > The problem: > the parameter values are not updated in the two last calls of the > macro. In the second and later call of \Changes you are in the table (\halign=20 or \hbox?, it depends on table mechanism) cell. In both cases you are=20 inside a group. Since \getparameters expands to local assignments, the=20 contents is forgotten outside this cell. Try \getgparameters Vit Zyka