Received: from mail.proteosys.com ([213.139.130.197]) by nummer-3.proteosys with Microsoft SMTPSVC(6.0.3790.3959); Mon, 17 Aug 2009 11:01:08 +0200 Received: by mail.proteosys.com (8.14.3/8.14.3) with ESMTP id n7H917fT010986 for ; Mon, 17 Aug 2009 11:01:08 +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 n7H8tHRZ024034 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 17 Aug 2009 10:55:17 +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 n7GM1A4Q006563; Mon, 17 Aug 2009 10:55:11 +0200 Received: by LISTSERV.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 15.5) with spool id 285826 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Mon, 17 Aug 2009 10:55:11 +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 n7H8tBUA023324 for ; Mon, 17 Aug 2009 10:55:11 +0200 Received: from mail-px0-f194.google.com (mail-px0-f194.google.com [209.85.216.194]) by relay.uni-heidelberg.de (8.14.1/8.14.1) with ESMTP id n7H8t5nc023856 for ; Mon, 17 Aug 2009 10:55:09 +0200 Received: by pxi32 with SMTP id 32so933283pxi.25 for ; Mon, 17 Aug 2009 01:55:04 -0700 (PDT) Received: by 10.115.86.19 with SMTP id o19mr4512632wal.212.1250499304605; Mon, 17 Aug 2009 01:55:04 -0700 (PDT) Received: from ?129.127.15.244? ([129.127.15.244]) by mx.google.com with ESMTPS id g14sm16329633rvb.1.2009.08.17.01.55.01 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 17 Aug 2009 01:55:03 -0700 (PDT) Content-Type: multipart/signed; boundary=Apple-Mail-4--538319677; micalg=sha1; protocol="application/pkcs7-signature" Mime-Version: 1.0 (Apple Message framework v935.3) References: <4A7921CF.5020803@morningstar2.co.uk> <4A86949D.3090500@morningstar2.co.uk> <4A886BA8.2000209@morningstar2.co.uk> <0417DF73-EC19-4262-B9DF-5C870D47BFCE@gmail.com> <4A89058A.3060506@morningstar2.co.uk> X-Mailer: Apple Mail (2.935.3) X-Spam-Whitelist: Message-ID: <6E237F62-5DA8-4106-B270-F2D6BFBAA0EA@gmail.com> Date: Mon, 17 Aug 2009 18:25:03 +0930 Reply-To: Mailing list for the LaTeX3 project Sender: Mailing list for the LaTeX3 project From: Will Robertson Subject: Re: xparse To: LATEX-L@LISTSERV.UNI-HEIDELBERG.DE In-Reply-To: <4A89058A.3060506@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: 17 Aug 2009 09:01:08.0395 (UTC) FILETIME=[428227B0:01CA1F19] Status: R X-Status: X-Keywords: X-UID: 5931 --Apple-Mail-4--538319677 Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Hi Joseph, Short reply. (You said it all already.) On 17/08/2009, at 4:53 PM, Joseph Wright wrote: > Will Robertson wrote: >> Hi Joseph, >> >> Thanks for the great efforts here! >> I did a once-over on the documentation (and made a couple of minor >> adjustments) and everything seems logical to me. >> >> To summarise the changes from the old xparse: >> >> - >{P} replaced by + >> - >{W} dropped, since it is applied automatically when necessary >> (final >> optional argument(s)) > > Actually, for the moment I've simply not used any space skipping at > all. > > Of course, TeX skips spaces after the command name itself, but for > something like: > > \foo{arg1}[arg2]{arg3} > > it seemed easier to explain if there is no space skipping at a LaTeX > level. If other people disagree it is easy to change. Ah, right. Well, it's hard to explain either way, I think; e.g., \foo{a} {b} {c} % works \bar{a} [b] {c} % does not Personally, I liked xparse-alt's original method, but I'm happy to leave it like this until complaints start coming in :) (Which I'm not sure will happen.) >> - c dropped, replaced by 'd()' > > I'm imagining that LaTeX3 at the document level might well not need > this > input type too much. Yup. >> - g and G{} added: optional braced argument >> - d** and D**{} added: pair-delimited argument >> - u* and U*{} added: post-delimited argument > > Just u{}: mandatory argument, no default but takes multiple tokens. Thanks; silly slip of mine. [Regarding single token delimited arguments:] > To allow multiple opening tokens, there has to be one check (and > removal) for each token. That looks rather awkward to write, as you > have > to be able to put back all of the removed opening tokens if not all > are > actually present. Okay, I have to admit I didn't think about the implementation when I thought about it earlier today. (Recovering from a bug, so my head's a bit fuzzy. If that's an excuse.) > More generally, I'd hope that more complex options can be handled in > better ways than opaque argument syntax. Something like: > > \foo[opt1][[opt2]]{arg} % Two opt args [...] and [[...]] > > is probably better handled as: > > \foo[opt1=text1,opt2=text2]{arg} > > in any case. Most certainly! > I'd hope we cover enough for almost all non-verbatim circumstances. > For > example, taking Will's question of delimiters, you can make a > mandatory > delimited argument with multiple tokens: > > \DeclareDocumentCommand \foo { u{} u{} { > \tl_if_empty:nTF {#1} { > % Do stuff > }{ > % Probably should not happen! > } > } Heh; nice. Yes, I think xparse is doing basically everything one could ever hope for, at this stage. Will --Apple-Mail-4--538319677 Content-Disposition: attachment; filename=smime.p7s Content-Type: application/pkcs7-signature; name=smime.p7s Content-Transfer-Encoding: base64 MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIIGITCCAtow ggJDoAMCAQICECN4qE5kBXLk2f/jVDfSZPwwDQYJKoZIhvcNAQEFBQAwYjELMAkGA1UEBhMCWkEx JTAjBgNVBAoTHFRoYXd0ZSBDb25zdWx0aW5nIChQdHkpIEx0ZC4xLDAqBgNVBAMTI1RoYXd0ZSBQ ZXJzb25hbCBGcmVlbWFpbCBJc3N1aW5nIENBMB4XDTA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