Received: from mail.proteosys.com ([213.139.130.197]) by nummer-3.proteosys with Microsoft SMTPSVC(6.0.3790.3959); Mon, 31 Aug 2009 21:54:45 +0200 Received: by mail.proteosys.com (8.14.3/8.14.3) with ESMTP id n7VJsieC032747 for ; Mon, 31 Aug 2009 21:54:44 +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 n7VJoY1h008514 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 31 Aug 2009 21:50:34 +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 n7VEc4dB004620; Mon, 31 Aug 2009 21:50:32 +0200 Received: by LISTSERV.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 15.5) with spool id 292244 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Mon, 31 Aug 2009 21:50:32 +0200 Received: from relay2.uni-heidelberg.de (relay2.uni-heidelberg.de [129.206.210.211]) by listserv.uni-heidelberg.de (8.13.1/8.13.1) with ESMTP id n7VJoWb8022389 for ; Mon, 31 Aug 2009 21:50:32 +0200 Received: from anchor-post-2.mail.demon.net (anchor-post-2.mail.demon.net [195.173.77.133]) by relay2.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id n7VJoVW1013656 for ; Mon, 31 Aug 2009 21:50:34 +0200 Received: from cremornelane.demon.co.uk ([80.177.25.195] helo=[192.168.0.2]) by anchor-post-2.mail.demon.net with esmtp (Exim 4.69) id 1MiCtS-00019R-jN for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Mon, 31 Aug 2009 19:50:22 +0000 User-Agent: Thunderbird 2.0.0.22 (Windows/20090605) MIME-Version: 1.0 References: <122D1D66-1300-424C-9FBC-11C0B0CCB6C9@gmail.com> <4A9517EA.208@residenset.net> <7FF23F49-785D-444F-94E0-28498B035A60@gmail.com> <4A97D80A.4000602@residenset.net> <5AEE5632-BCE2-4ED1-8FCA-F882AC15912F@gmail.com> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Message-ID: <4A9C297E.9030404@morningstar2.co.uk> Date: Mon, 31 Aug 2009 20:50:22 +0100 Reply-To: Mailing list for the LaTeX3 project Sender: Mailing list for the LaTeX3 project From: Joseph Wright Subject: Re: template vs template-alt To: LATEX-L@LISTSERV.UNI-HEIDELBERG.DE In-Reply-To: <5AEE5632-BCE2-4ED1-8FCA-F882AC15912F@gmail.com> 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 19:54:45.0089 (UTC) FILETIME=[E3434510:01CA2A74] Status: R X-Status: X-Keywords: X-UID: 6046 Will Robertson wrote: > 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 > Hello Will, I'd point out that most of template-alt was about trying to understand the code in template (which is not easy to read at all). I'd hope that I've done enough with template-alt to enable discussion of the ideas without needing too much more coding until a clear idea emerges of what is wanted. (I'd add that at the moment I prefer the idea of using a keyval approach as I like the "symmetry" of both defining and using in the same style. But if it turns out this is not the best approach, then I don't see too much difficultly in writing the code to do what Lars suggests.) -- Joseph Wright