Received: from mail.proteosys.com ([213.139.130.197]) by nummer-3.proteosys with Microsoft SMTPSVC(6.0.3790.3959); Mon, 10 Aug 2009 23:27:22 +0200 Received: by mail.proteosys.com (8.14.3/8.14.3) with ESMTP id n7ALRNsT032362 for ; Mon, 10 Aug 2009 23:27:24 +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 n7ALOVcB005109 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 10 Aug 2009 23:24:31 +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 n7AG7sFB014993; Mon, 10 Aug 2009 23:24:30 +0200 Received: by LISTSERV.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 15.5) with spool id 300642 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Mon, 10 Aug 2009 23:24:30 +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 n7ALOUgD006673 for ; Mon, 10 Aug 2009 23:24:30 +0200 Received: from anchor-post-1.mail.demon.net (anchor-post-1.mail.demon.net [195.173.77.132]) by relay2.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id n7ALOKx3005040 for ; Mon, 10 Aug 2009 23:24:23 +0200 Received: from cremornelane.demon.co.uk ([80.177.25.195] helo=[192.168.0.2]) by anchor-post-1.mail.demon.net with esmtp (Exim 4.69) id 1MacLt-00020I-iA for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Mon, 10 Aug 2009 21:24:21 +0000 User-Agent: Thunderbird 2.0.0.22 (Windows/20090605) MIME-Version: 1.0 References: <4A7921CF.5020803@morningstar2.co.uk> <4A8072A6.9080005@elzevir.fr> <4A807946.5060707@morningstar2.co.uk> <4A8083E3.7080009@elzevir.fr> <4A808C25.7030501@morningstar2.co.uk> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Message-ID: <4A809007.5050208@morningstar2.co.uk> Date: Mon, 10 Aug 2009 22:24:23 +0100 Reply-To: Mailing list for the LaTeX3 project Sender: Mailing list for the LaTeX3 project From: Joseph Wright Subject: Re: xparse To: LATEX-L@LISTSERV.UNI-HEIDELBERG.DE In-Reply-To: <4A808C25.7030501@morningstar2.co.uk> 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: 10 Aug 2009 21:27:22.0840 (UTC) FILETIME=[59440580:01CA1A01] Status: R X-Status: X-Keywords: X-UID: 5870 Joseph Wright wrote: > There is a bigger issue than simply \peek_ here. With > \newcommand, it is only the first argument that is ever checked, so it > is possible to do things in an expandable fashion. I assume that it is > feasible to do the same for the first n arguments. However, with xparse > there is the possibility to do: > > \DeclareDocumentCommand \foo { o m o m } % Or whatever syntax! > > which I don't see being easy (possible?) to do in an expandable way. > You've then got to factor in the parallel question about > post-processing: this would pretty certainly fail. (That is before you > factor in other argument types.) > > I guess that using LuaTeX this type of thing becomes a lot easier. I > wonder if this is a case where as Jonathan Fine suggests we are trying > to do things TeX macros simply cannot do because of the nature of TeX > (even with the various extensions). I should add that I think xparse should check if all of the arguments are of type "m", and if so not do any grabbing but just \protected\def the function directly. (The same is true for no arguments at all.) This is on my "to do" list once the discussion reaches some conclusions or at least directions. -- Joseph Wright