From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/12993 Path: main.gmane.org!not-for-mail From: Peter Rolf Newsgroups: gmane.comp.tex.context Subject: parameter mechanism Date: Wed, 27 Aug 2003 15:32:32 +0200 Sender: ntg-context-admin@ntg.nl Message-ID: <3F4CB2F0.2020705@arcor.de> Reply-To: ntg-context@ntg.nl NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------040500080309070907030506" X-Trace: sea.gmane.org 1061991502 13010 80.91.224.253 (27 Aug 2003 13:38:22 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 27 Aug 2003 13:38:22 +0000 (UTC) Original-X-From: ntg-context-admin@ntg.nl Wed Aug 27 15:38:20 2003 Return-path: Original-Received: from ref.vet.uu.nl ([131.211.172.13] helo=ref.ntg.nl) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19s0V9-0005WJ-00 for ; Wed, 27 Aug 2003 15:38:20 +0200 Original-Received: from ref.ntg.nl (localhost.localdomain [127.0.0.1]) by ref.ntg.nl (Postfix) with ESMTP id B169C10B2C; Wed, 27 Aug 2003 15:38:17 +0200 (MEST) Original-Received: from mail-in-02.arcor-online.net (mail-in-02.arcor-online.net [151.189.21.42]) by ref.ntg.nl (Postfix) with ESMTP id 3A1C810B26 for ; Wed, 27 Aug 2003 15:31:07 +0200 (MEST) Original-Received: from arcor.de (dialin-145-254-094-051.arcor-ip.net [145.254.94.51]) by mail-in-02.arcor-online.net (Postfix) with ESMTP id 0391789996 for ; Wed, 27 Aug 2003 15:31:04 +0200 (CEST) User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.4) Gecko/20030624 X-Accept-Language: en-us, en Original-To: NTG-ConTeXt Errors-To: ntg-context-admin@ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.0.13 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.comp.tex.context:12993 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:12993 This is a multi-part message in MIME format. --------------040500080309070907030506 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hello all, I have problems to understand the command (parameter) mechanism of context. My experiments with \getparameters didn't work, so I used \xdescgetparameters from Giuseppe Bilotta (t-xdesc.tex). In my eyes they look the same, but \xdescgetparameters works with my sample code, \getparameters don't. Mhhh.... % t-xdesc.tex \def\xdescsetvalue#1#2{\expandafter\def\csname#1#2\endcsname} \def\xdescgetparameters{\dogetparameters\xdescsetvalue} % syst-gen.tex \def\dosetvalue#1#2% #3 {\@EA\def\csname#1#2\endcsname} % {#3}} \def\getparameters {\dogetparameters\dosetvalue} This leads me to my two questions: What must I change, to make my test example run with \getparameters? Where is the error in my \docommand? All parameters but [height] work and the tracing output at this parameter (\OTRSETshowstatus) says nothing to me. Thanks for any help, Peter P.S.: using miktex 2.3, context version 21.08.2003 --------------040500080309070907030506 Content-Type: application/x-tex; name="Cmd.tex" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="Cmd.tex" % interface=en output=pdftex % Time-stamp: % \newdimen\Headheigth \Headheigth=45mm \newdimen\Headwidth \Headwidth=\textwidth \newdimen\Headhpos \Headhpos=20mm \newdimen\Headvpos \Headvpos=16.9mm \def\xdescsetvalue#1#2{\expandafter\def\csname#1#2\endcsname} \def\xdescgetparameters{\dogetparameters\xdescsetvalue} \def\SetupTesthead{\dosingleargument\doSetupTesthead} \def\doSetupTesthead[#1]{% \xdescgetparameters[TH][#1] \def\Headervariableslist{hpos,vpos,height,width} \def\docommand##1{\doifdefined{TH##1}% {\getvalue{Head##1}=\getvalue{TH##1}}} \processcommacommand[\Headervariableslist]\docommand % this works, but... %% \doifdefined{THheight}{\Headheigth=\THheight} %% \doifdefined{THwidth}{\Headwidth=\THwidth} %% \doifdefined{THhpos}{\Headhpos=\THhpos} %% \doifdefined{THvpos}{\Headvpos=\THvpos} \doifdefinedelse{THheader}{\setvariables[Test][header=\THheader]} {\message{** Test header isn't defined!}} } %----------------------------------------% \starttext \tracingmacros=2 \SetupTesthead[ height=27mm, width=60mm, hpos=0mm, vpos=120mm, header={line 1\crlf line 2\crlf line 3}, ] \tracingmacros=0 \framed[height=\Headheigth,width=\Headwidth,align={lohi,left}] {\vtop{\strut\getvariable{Test}{header}\strut}} \stoptext %----------------------------------------% --------------040500080309070907030506--