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 p4FLT4OX019734 for ; Sun, 15 May 2011 23:29:05 +0200 Received: (qmail 26364 invoked by alias); 15 May 2011 21:28:58 -0000 Delivered-To: GMX delivery to rainer.schoepf@gmx.net Received: (qmail invoked by alias); 15 May 2011 21:28:58 -0000 Received: from relay2.uni-heidelberg.de (EHLO relay2.uni-heidelberg.de) [129.206.210.211] by mx0.gmx.net (mx002) with SMTP; 15 May 2011 23:28:58 +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 p4FLQtjB030774 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 15 May 2011 23:26:55 +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 p4EM15kH020093; Sun, 15 May 2011 23:26:55 +0200 Received: by LISTSERV.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 16.0) with spool id 1210196 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Sun, 15 May 2011 23:26:55 +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 p4FLQtN5000534 for ; Sun, 15 May 2011 23:26:55 +0200 Received: from mail-gw0-f49.google.com (mail-gw0-f49.google.com [74.125.83.49]) by relay.uni-heidelberg.de (8.14.1/8.14.1) with ESMTP id p4FLQohY001624 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=FAIL) for ; Sun, 15 May 2011 23:26:54 +0200 Received: by gwb1 with SMTP id 1so2019432gwb.22 for ; Sun, 15 May 2011 14:26:49 -0700 (PDT) MIME-Version: 1.0 Received: by 10.150.113.2 with SMTP id l2mr2834421ybc.108.1305494809552; Sun, 15 May 2011 14:26:49 -0700 (PDT) Received: by 10.147.41.17 with HTTP; Sun, 15 May 2011 14:26:49 -0700 (PDT) References: <4DCA93CC.5020605@morningstar2.co.uk> <19920.15087.714131.100464@morse.mittelbach-online.de> Content-Type: text/plain; charset=ISO-8859-1 X-Spam-Whitelist: Message-ID: Date: Sun, 15 May 2011 17:26:49 -0400 Reply-To: Mailing list for the LaTeX3 project Sender: Mailing list for the LaTeX3 project From: Bruno Le Floch Subject: Re: xparse and space skipping To: LATEX-L@listserv.uni-heidelberg.de In-Reply-To: <19920.15087.714131.100464@morse.mittelbach-online.de> Precedence: list List-Help: , List-Unsubscribe: List-Subscribe: List-Owner: List-Archive: X-GMX-Antispam: 0 (eXpurgate); Detail=5D7Q89H36p4yCuwxJv6KY0FCZRnwZ+13u2sIJWWmpUWkEAG3rTRjaZ4Kx7ob9k2FAsj51 zjFuciSB8ry8yqP2RQyg8PVm1rSnY5m8OFzhI4J5l61LAyuyyP190FPdOBa9uuPajHZlJKgu/CoF 90BtdAfAT1l5l5ojVPMAppHrgxBzUO4nxOJSpP9ocMZa1QNGRgY0I7xdSsc+dEN+gPs0Q==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: 6749 > strong deviation from that. (this is independent of the fatc that > there may be a completely different approach to document level > syntax, eventually, but this is not what xparse was meant to be). I'm guessing that "completely different approach[es] to document level syntax" have been discussed earlier. Any pointer to such a discussion on this list? > -snip- > to break between arguments (rather than inside) > -snip- > Now one could argue that that this behavior for \\ is useful Ok, I retract my previous proposal: it makes a lot of sense to want a consistent user interface. Then always skipping spaces is probably best. For \\, I am thinking that perhaps removing the optional argument completely, and replacing it by a look-ahead for \vspace is possible: \\ [1cm] => \\ \vspace {1cm} of course allowing spaces. Then we wouldn't have this odd exception anymore. > have to implement a full blown scanner yourself and disable TeX's internal > scanner completely It should be enough to make spaces active, but then comes the task of removing spaces at the beginning and end of lines, and converting several spaces in a row, etc. A huge mess. > here is my summary > > allow spaces but not \par between arguments > do not allow spaces between arguments > leave it to the command how spaces between arguments are interpreted I agree with all the pros and cons mentionned by Frank. However, I think you forget one possibility (which is the current xparse approach): trailing optional arguments do not ignore spaces, except if the command is a control word with no mandatory arguments. Ugly, slightly difficult to remember, but consistent. Though I'm now convinced that the LaTeX2e approach is probably the simplest. Regards, Bruno