Received: from mail.proteosys.com ([213.139.130.197]) by nummer-3.proteosys with Microsoft SMTPSVC(6.0.3790.3959); Mon, 31 Aug 2009 09:40:24 +0200 Received: by mail.proteosys.com (8.14.3/8.14.3) with ESMTP id n7V7eNcP009452 for ; Mon, 31 Aug 2009 09:40:23 +0200 Received: from listserv.uni-heidelberg.de (listserv.uni-heidelberg.de [129.206.100.94]) by relay.uni-heidelberg.de (8.14.1/8.14.1) with ESMTP id n7V7Ydig015718 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 31 Aug 2009 09:34:39 +0200 Received: from listserv.uni-heidelberg.de (localhost.localdomain [127.0.0.1]) by listserv.uni-heidelberg.de (8.13.1/8.13.1) with ESMTP id n7UM5TqN004620; Mon, 31 Aug 2009 09:34:28 +0200 Received: by LISTSERV.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 15.5) with spool id 285998 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Mon, 31 Aug 2009 09:34:28 +0200 Received: from relay.uni-heidelberg.de (relay.uni-heidelberg.de [129.206.100.212]) by listserv.uni-heidelberg.de (8.13.1/8.13.1) with ESMTP id n7V7YSDT014297 for ; Mon, 31 Aug 2009 09:34:28 +0200 Received: from mail-ew0-f217.google.com (mail-ew0-f217.google.com [209.85.219.217]) by relay.uni-heidelberg.de (8.14.1/8.14.1) with ESMTP id n7V7YNWO015481 for ; Mon, 31 Aug 2009 09:34:27 +0200 Received: by ewy17 with SMTP id 17so2955401ewy.2 for ; Mon, 31 Aug 2009 00:34:23 -0700 (PDT) Received: by 10.216.85.147 with SMTP id u19mr1008880wee.88.1251704063067; Mon, 31 Aug 2009 00:34:23 -0700 (PDT) Received: from ?129.127.15.244? ([129.127.15.244]) by mx.google.com with ESMTPS id 10sm2004451eyd.2.2009.08.31.00.34.18 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 31 Aug 2009 00:34:21 -0700 (PDT) Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes Mime-Version: 1.0 (Apple Message framework v935.3) References: <122D1D66-1300-424C-9FBC-11C0B0CCB6C9@gmail.com> <4A9517EA.208@residenset.net> <7FF23F49-785D-444F-94E0-28498B035A60@gmail.com> <4A97D80A.4000602@residenset.net> X-Mailer: Apple Mail (2.935.3) X-Spam-Whitelist: Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by listserv.uni-heidelberg.de id n7V7YSDT014298 Message-ID: <5AEE5632-BCE2-4ED1-8FCA-F882AC15912F@gmail.com> Date: Mon, 31 Aug 2009 17:04:16 +0930 Reply-To: Mailing list for the LaTeX3 project Sender: Mailing list for the LaTeX3 project From: Will Robertson Subject: Re: template vs template-alt To: LATEX-L@LISTSERV.UNI-HEIDELBERG.DE In-Reply-To: <4A97D80A.4000602@residenset.net> Precedence: list List-Help: , List-Unsubscribe: List-Subscribe: List-Owner: List-Archive: X-ProteoSys-SPAM-Score: -6.599 () BAYES_00,RCVD_IN_DNSWL_MED X-Scanned-By: MIMEDefang 2.65 on 213.139.130.197 Return-Path: owner-latex-l@LISTSERV.UNI-HEIDELBERG.DE X-OriginalArrivalTime: 31 Aug 2009 07:40:24.0067 (UTC) FILETIME=[4CD8DD30:01CA2A0E] Status: R X-Status: X-Keywords: X-UID: 6044 On 28/08/2009, at 10:43 PM, Lars Hellström wrote: > Well, why use a syntax that needs a separate parser at all? [...] > \DeclareTemplate{caption}{lesssimple}{4}{ > \Variable {above-skip} {\l_caption_above_skip} > \Variable {below-skip} {\l_caption_below_skip} > \Function {number-format} {2}{\caption_number_format:nn} > \Function {nonumber-format} {2}{\caption_nonumber_format:nn} > \Function {single-line-format}{1}{\caption_single_line_format:n} > \Function {caption-font} {0}{\caption_set_font:} > \Instance {caption-hj-setup} {hj}{\caption_hj_instance} > } > > The \Variable, \Function, and \Instance commands above need not > exist in general; they can be locally redefined "within the > parameter declarations". (Philologically it is not unheard of in > other languages to have special sets of commands available within > declaration blocks.) Besides avoiding the overhead of a special > parser, the above also has the advantage of being more robust by > virtue of simplicity and adherence to the general language syntax > and semantics, which tend to have their corner cases better worked > out than something invented for a special purpose. Bonus points for the word "philologically" :) I quite like this approach. I'm going to be a bit quiet over the next little while, but after that I may try to put together a "template-alt-alt" along these lines to see how things turn out. Thanks, Will