Received: from mout.gmx.net (mout.gmx.net [212.227.15.18]) by h1439878.stratoserver.net (8.14.2/8.14.2/Debian-2build1) with ESMTP id r3T97Amp003858 for ; Mon, 29 Apr 2013 11:07:11 +0200 Received: from relay2.uni-heidelberg.de ([129.206.210.211]) by mx-ha.gmx.net (mxgmx105) with ESMTP (Nemesis) id 0MC7vI-1UNuLQ0fMe-008oFR for ; Mon, 29 Apr 2013 11:07:05 +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 r3T94Z94029427 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 29 Apr 2013 11:04:36 +0200 Received: from listserv.uni-heidelberg.de (listserv.uni-heidelberg.de [127.0.0.1]) by listserv.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id r3SM1312032355; Mon, 29 Apr 2013 11:04:34 +0200 Received: by LISTSERV.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 16.0) with spool id 9146124 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Mon, 29 Apr 2013 11:04:34 +0200 Received: from relay.uni-heidelberg.de (relay.uni-heidelberg.de [129.206.100.212]) by listserv.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id r3T8sYNP006994 for ; Mon, 29 Apr 2013 10:54:34 +0200 Received: from mail-ee0-f52.google.com (mail-ee0-f52.google.com [74.125.83.52]) by relay.uni-heidelberg.de (8.14.1/8.14.1) with ESMTP id r3T8sN5J023460 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=FAIL) for ; Mon, 29 Apr 2013 10:54:25 +0200 Received: by mail-ee0-f52.google.com with SMTP id d41so2461934eek.11 for ; Mon, 29 Apr 2013 01:54:23 -0700 (PDT) X-Received: by 10.14.9.71 with SMTP id 47mr76593884ees.21.1367225662840; Mon, 29 Apr 2013 01:54:22 -0700 (PDT) Received: from [139.222.115.91] ([139.222.115.91]) by mx.google.com with ESMTPSA id ch6sm31452356eeb.17.2013.04.29.01.54.21 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 29 Apr 2013 01:54:21 -0700 (PDT) User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130328 Thunderbird/17.0.5 MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Message-ID: <517E353C.5050701@morningstar2.co.uk> Date: Mon, 29 Apr 2013 09:54:20 +0100 Reply-To: Mailing list for the LaTeX3 project Sender: Mailing list for the LaTeX3 project From: Joseph Wright Subject: Behaviour of \SplitArgument with missing input To: LATEX-L@LISTSERV.UNI-HEIDELBERG.DE Precedence: list List-Help: , List-Unsubscribe: List-Subscribe: List-Owner: List-Archive: Envelope-To: X-GMX-Antispam: 0 (Mail was not recognized as spam); Detail=V3; X-GMX-Antivirus: 0 (no virus found) X-UI-Filterresults: notjunk:1;V01:K0:WcLqKdpuPOI=:cg65u695AeacvwIMb6UCNQ oC85mimF/4uhWSxsPAaX8CKMd/CuL9c+Twyht2hQGTpErOuIz4HQ+4HQvpCBBN+znK2yFa7 qwlgSuTc+3UwvpreUbo4iI8Z0UwzxEjm8iWdC9v6F6X2L65LkYRWeHfIvzegyd7e07rf9vG komzAjZEECiM58AFVGPwpXX1tHvR+jw3UbU5z1KEsRo/c/uExJJGLxNBspGP3o6mOJkqyNe B8GYZEv83FImIBgyVaydLhRMz4lmApW9/+AP5kBQ5Ub3qq2obk/W6S2L1ygVjWqgwcO3y9U eSfHWPYihFxzoRONaZ50S5XA7Pbl5G7IXZ2CG/mNmQKx2Uik961kK4X/iFB+6dve9aXv+pK ncmqxTjdsfxP2cq7SaHOTS8QfQ19pTTcPZ6/7pRaBXJBQpcGR+jpHLknWvrydsX/TRJBwxb zKLi8cFZK50Ihyh69Yg++zbmfv0vUIco6ZMG2pzA9QaYWb8PQCLKdc7/oDBLqIzN4m050xU 88lxhEpxvu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xpXcZ/GtFKdlIaVzCiSDafLB2pBueP36VeJmtp555b7CKtpVNIMr2/uH7G Kg5rLD4du X-UI-Loop:V01:lwnukyp7dwE=:bA0gOT2prezb19VhJdmcAn+xauQPptQ+nv8eeh3+Qjw= Status: R X-Status: X-Keywords: X-UID: 7193 Hello all, I've had a couple of reports recently of an inconsistency in the way \SplitArgument is documented compared to how it is implemented. In the current CTAN release, something like \DeclareDocumentCommand { \foo } { > { \SplitArgument { 2 } { ; } } m } { \showtokens {#1} } ... \foo{bar} gives > {bar}{-NoValue-}{-NoValue-}. \foo code #1->\showtokens {#1} i.e. inserts the '-NoValue-' marker, but the documentation says you should get > {bar}{}{}. \foo code #1->\showtokens {#1} i.e. empty groups. In the SVN, I have altered the behaviour to do what the docs say. However, this breaks some packages and more importantly may not be the 'best' approach. In particular, returning '-NoValue-' allows differentiation of \foo{bar;;} and \foo{bar} which is not possible if an empty group is returned. Conceptually, '-NoValue-' was introduced for flagging omitted optional arguments. Using it in \SplitArgument is therefore something of an extension, but at the same time the way this function works makes the splitting 'optional'. Thus it is quite arguable that the use of the special marker is entirely correct here. What do people feel is the best approach? (Note: There are some other issues related to '-NoValue-' that this raises, which I'll cover in a separate message.) -- Joseph Wright