Received: from mail.proteosys.com ([213.139.130.197]) by nummer-3.proteosys with Microsoft SMTPSVC(6.0.3790.3959); Tue, 18 Aug 2009 11:11:13 +0200 Received: by mail.proteosys.com (8.14.3/8.14.3) with ESMTP id n7I9BDHF007533 for ; Tue, 18 Aug 2009 11:11:13 +0200 Received: from listserv.uni-heidelberg.de (listserv.uni-heidelberg.de [129.206.100.94]) by relay2.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id n7I97At3013805 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 18 Aug 2009 11:07:10 +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 n7HM1lT0029448; Tue, 18 Aug 2009 11:07:04 +0200 Received: by LISTSERV.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 15.5) with spool id 286598 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Tue, 18 Aug 2009 11:07:03 +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 n7I973kX017450 for ; Tue, 18 Aug 2009 11:07:03 +0200 Received: from pluto.open.ac.uk (pluto.open.ac.uk [137.108.145.32]) by relay2.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id n7I96nie013629 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 18 Aug 2009 11:06:53 +0200 Received: from laurel.open.ac.uk ([137.108.170.71]) by pluto.open.ac.uk with esmtp (Exim 4.69) (envelope-from ) id 1MdKeX-0003Wp-40 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Tue, 18 Aug 2009 10:06:49 +0100 Received: from KIELDERCMS1.open.ac.uk ([137.108.140.186]) by LAUREL.open.ac.uk ([137.108.170.71]) with mapi; Tue, 18 Aug 2009 10:06:49 +0100 Thread-Topic: Named parameters in macros Thread-Index: Acofls9DCMfwUzDmTYSCKEqC9ayKLAAS9F0o References: ,<1C09237E-F871-434B-9527-4C6A3F2CF6A0@gmail.com> <4A852C0B.8080608@elzevir.fr> ,<026FA2E8-5889-4146-9854-262A2574F057@gmail.com> Accept-Language: en-US, en-GB Content-Language: en-GB X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US, en-GB Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by listserv.uni-heidelberg.de id n7I973kX017451 Message-ID: Date: Tue, 18 Aug 2009 10:02:35 +0100 Reply-To: Mailing list for the LaTeX3 project Sender: Mailing list for the LaTeX3 project From: "J.Fine" Subject: Re: Named parameters in macros To: LATEX-L@LISTSERV.UNI-HEIDELBERG.DE In-Reply-To: <026FA2E8-5889-4146-9854-262A2574F057@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: 18 Aug 2009 09:11:13.0953 (UTC) FILETIME=[D5DCB910:01CA1FE3] Status: R X-Status: X-Keywords: X-UID: 5940 Will Robertson wrote: > (Sent from my phone. Apologies for brevity.) Thank you for your brevity. I'll try to be brief also. https://ouca.open.ac.uk/owa/?ae=PreFormAction&t=IPM.Note&a=Reply&id=RgAAAAAONUOqS8DYTpP2Ig%2bgTMtnBwDaUTCEWZXVSbC8nKwVVJKWAAABoZo3AACpacn4ZfJ7QoqOYOOdPO0VACAQT8F3AAAJ# [snip: allow period and digit in control sequence names] > Period (I think) and digits (definitely) must all be catcode other to > work inside numexpr and so on. I wish it were otherwise, but I don't > think it's nice to have to use scantokens to sanitise input for all > numeric work. [snip: tilde always produces space] >> So that >> \this ~ \that >> has as space between \this and \that, for example. Or to get several >> spaces in a row. > > ~ is currently catcode space in expl3 since space itself is catcode > ignore. So I don't think this suggestion is feasible either. Thanks, Will. I think you've almost got it. The task is to translate input characters into tokens, in a way that well is adapted to writing macros. You've said that what I suggest is not easily accomplished using TeX itself to do /all/ of the translation. I agree (although if all characters are made active it's easier). I'm suggesting that a little program, in some suitable language, transform the input file into an intermediate file that creates something that TeX can readily load to produce the required sequence of macros. Here, again, is the URL for the proof-of-concept code: http://pytex.svn.sourceforge.net/viewvc/pytex/trunk/pytex/sandbox/jfine/macroload/ The more general point, which you implicitly acknowledge in your post, is that using TeX macros to do everything places restrictions on what can be done without there being an unwelcome programming (or runtime) burden. The specific point is that named parameters is easy, provided one is willing to use another program to do some of the work. -- Jonathan The Open University is incorporated by Royal Charter (RC 000391), an exempt charity in England & Wales and a charity registered in Scotland (SC 038302).