From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/9896 Path: main.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: Automating a letter module style Date: Sat, 23 Nov 2002 00:14:38 +0100 Sender: ntg-context-admin@ntg.nl Message-ID: <5.1.0.14.1.20021123000850.00ae6238@server-1> References: Reply-To: ntg-context@ntg.nl NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Trace: main.gmane.org 1038006828 5169 80.91.224.249 (22 Nov 2002 23:13:48 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 22 Nov 2002 23:13:48 +0000 (UTC) Return-path: Original-Received: from ref.vet.uu.nl ([131.211.172.13] helo=ref.ntg.nl) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18FMzZ-0001L7-00 for ; Sat, 23 Nov 2002 00:13:45 +0100 Original-Received: from ref.ntg.nl (localhost.localdomain [127.0.0.1]) by ref.ntg.nl (Postfix) with ESMTP id 1DDE210AF1; Sat, 23 Nov 2002 00:15:44 +0100 (MET) Original-Received: from mail.solcon.nl (mail.solcon.nl [212.45.33.11]) by ref.ntg.nl (Postfix) with ESMTP id BC9A210AEC for ; Sat, 23 Nov 2002 00:14:48 +0100 (MET) Original-Received: from server-1.pragma-ade.nl (wc-58016.solcon.nl [212.45.58.16]) by mail.solcon.nl (8.12.5/pre1.0-MySQL/8.12.5) with ESMTP id gAN09mOZ001290 for ; Sat, 23 Nov 2002 01:09:48 +0100 Original-Received: from LAPTOP-3.wxs.nl (laptop-3 [10.100.1.191]) by server-1.pragma-ade.nl (8.12.2/8.12.2) with ESMTP id gAMNEkgg011032 for ; Sat, 23 Nov 2002 00:14:46 +0100 X-Sender: hagen-mail@server-1 X-Mailer: QUALCOMM Windows Eudora Version 5.1 Original-To: ntg-context@ntg.nl In-Reply-To: X-RAVMilter-Version: 8.4.1(snapshot 20020919) (mail.solcon.nl) 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:9896 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:9896 At 12:00 AM 11/21/2002 +0000, Nigel King wrote: concerning modules, why not make it an environment? >2. I cannot find a way of defining elements which are effectively in the >running text like \openingline=Dear ..., in the setupletter because >\getvalue{letter@opening} seems not to pick up the value. A similar problem >occurs with closing which has a number of formatting constraints which >deosn't want to be seen in the letter source. The only way I have been able >to achieve the objective has been to use the following type of construct. >In the source letter >\signature[Nigel King] >In the module >\def\signature[#1]{\def\fromsig{#1}} >\def\closing[#1]{\par\framed[width=\textwidth,frame=off]{\rbox{ > \blank[2*big] #1 \blank[6*big] \fromsig\par}}} > >Any help would be much appreciated. The best way to deal with variables is the following: \setvariables [letter:opening] [name=..., date=...] \setvariables [letter:closing] [name=..., whatver=...] .... \getvariable{letter:opening}{name} This way there is no need for the get parameter stuff and you can group your variables; this mechanism also bypasses the multi lingual inferface, since this is what is troubling you: getparameter remaps tags to the low level names. You get better error messages for free. Hans ------------------------------------------------------------------------- Hans Hagen | PRAGMA ADE | pragma@wxs.nl Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com ------------------------------------------------------------------------- information: http://www.pragma-ade.com/roadmap.pdf documentation: http://www.pragma-ade.com/showcase.pdf -------------------------------------------------------------------------