Received: from mx0.gmx.net (mx0.gmx.net [213.165.64.100]) by h1439878.stratoserver.net (8.14.2/8.14.2/Debian-2build1) with SMTP id p4GCq0uP028279 for ; Mon, 16 May 2011 14:52:01 +0200 Received: (qmail 4496 invoked by alias); 16 May 2011 12:51:55 -0000 Delivered-To: GMX delivery to rainer.schoepf@gmx.net Received: (qmail invoked by alias); 16 May 2011 12:51:54 -0000 Received: from relay.uni-heidelberg.de (EHLO relay.uni-heidelberg.de) [129.206.100.212] by mx0.gmx.net (mx095) with SMTP; 16 May 2011 14:51:54 +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 p4GCndTa029138 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 16 May 2011 14:49: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 p4GBxLsq004064; Mon, 16 May 2011 14:49:39 +0200 Received: by LISTSERV.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 16.0) with spool id 1267074 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Mon, 16 May 2011 14:49:39 +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 p4GCnciY029868 for ; Mon, 16 May 2011 14:49:38 +0200 Received: from csep02.cliche.se (csep02.cliche.se [195.249.40.184]) by relay.uni-heidelberg.de (8.14.1/8.14.1) with ESMTP id p4GCnL3U028974 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 16 May 2011 14:49:26 +0200 Received: from nova-2.local (unknown [130.239.119.148]) by csep02.cliche.se (Postfix) with ESMTP id A6EBB1865EA for ; Mon, 16 May 2011 14:49:19 +0200 (CEST) User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; sv-SE; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9 MIME-Version: 1.0 References: <4DCA93CC.5020605@morningstar2.co.uk> <19920.15087.714131.100464@morse.mittelbach-online.de> <447088.31292.qm@web24704.mail.ird.yahoo.com> <4DD0BFB3.7070007@morningstar2.co.uk> <27DAD3FD-9C28-4707-9454-FBB65B66A56D@gmail.com> <4DD0D8F4.7030101@morningstar2.co.uk> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by listserv.uni-heidelberg.de id p4GCnciY029869 Message-ID: <4DD11D50.6000901@residenset.net> Date: Mon, 16 May 2011 14:49:20 +0200 Reply-To: Mailing list for the LaTeX3 project Sender: Mailing list for the LaTeX3 project From: =?ISO-8859-1?Q?Lars_Hellstr=F6m?= Subject: Re: xparse and space skipping To: LATEX-L@listserv.uni-heidelberg.de In-Reply-To: <4DD0D8F4.7030101@morningstar2.co.uk> Precedence: list List-Help: , List-Unsubscribe: List-Subscribe: List-Owner: List-Archive: X-GMX-Antispam: 0 (eXpurgate); Detail=5D7Q89H36p52GZ/WIcVIIYE2tsJSftWTYbfMGDu4UjgOuNVrfPk/gzpNTjEoSEIjEY79Z w9pJ8oCnu/qZ4sMFjD1f+HmE7XL/Y+WzgC05hX9xgdXfrbl5R1YhbdTHnNZhOCQ3Rw6CxfuS8QZw WAVZcXCS3Oemy3foJ5XlGf9nfvNZb4Z/BKkQ4hip5lRHf97aV4719xDGrQSBnl/nlXJHw==V1; X-Resent-By: Forwarder X-Resent-For: rainer.schoepf@gmx.net X-Resent-To: rainer@rainer-schoepf.de Status: R X-Status: X-Keywords: X-UID: 6756 My take would be as follows: 1. As several has observed: for compatibility with LaTeX2e, spaces should normally be skipped. This allows for formatting such as \foo{apa} [bepa] {cepa} 2. Sometimes, an existing command is redefined so that an optional argument is added at the end. In such cases, it may be preferable to make that argument such that it does not skip spaces, for compatibility with existing documents written under the assumption that spaces would not be skipped at that point. In other words, if \bar{apa} cepa used to have a space, and \bar for some reason in a package needs to be extended to support \bar{apa}[bepa], then \bar{apa} cepa should still have that space. Therefore, the solution should be to provide both, but let the space-nonskipping variants come with a big warning in the xparse documentation, detailing why they are usually inappropriate. In particular, such documentation should suggest the argument order \bar[bepa]{apa} as preferable to \bar{apa}[bepa] since package authors are otherwise likely to pick one at random, never even considering the syntactical implications. I also think the spacious formatting \foo{apa} {bepa} {cepa} needs to be mentioned in the documentation, because I'm sure there are plenty of LaTeX users out there who don't know this is normally possible, and therefore would be inclined to assume thight formatting if ever defining commands. That 2e package definitions are likely to say things like \def\bar{% ... \foo{apa}% {bepa}% {cepa}% ... } certainly supports the mistaken impression that spaces are not allowed between arguments. Lars Hellström