Received: from mout.gmx.net (mout.gmx.net [212.227.15.19]) by h1439878.stratoserver.net (8.14.2/8.14.2/Debian-2build1) with ESMTP id r3U7rbEd007537 for ; Tue, 30 Apr 2013 09:53:38 +0200 Received: from relay2.uni-heidelberg.de ([129.206.210.211]) by mx-ha.gmx.net (mxgmx012) with ESMTP (Nemesis) id 0MfAAk-1U8FE60KCY-00Optm for ; Tue, 30 Apr 2013 09:53:32 +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 r3U7oem0023241 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 30 Apr 2013 09:50:41 +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 r3TM14xU001615; Tue, 30 Apr 2013 09:50:39 +0200 Received: by LISTSERV.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 16.0) with spool id 9202794 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Tue, 30 Apr 2013 09:50:39 +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 r3U7edBj010605 for ; Tue, 30 Apr 2013 09:40:39 +0200 Received: from mail-ee0-f41.google.com (mail-ee0-f41.google.com [74.125.83.41]) by relay.uni-heidelberg.de (8.14.1/8.14.1) with ESMTP id r3U7eSej001737 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=FAIL) for ; Tue, 30 Apr 2013 09:40:31 +0200 Received: by mail-ee0-f41.google.com with SMTP id c50so94082eek.0 for ; Tue, 30 Apr 2013 00:40:28 -0700 (PDT) X-Received: by 10.15.77.133 with SMTP id p5mr87144719eey.46.1367307628257; Tue, 30 Apr 2013 00:40:28 -0700 (PDT) Received: from [139.222.115.91] (che12-j-wright1.che.uea.ac.uk. [139.222.115.91]) by mx.google.com with ESMTPSA id j43sm36963237eep.4.2013.04.30.00.40.26 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 30 Apr 2013 00:40:27 -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 References: <517E353C.5050701@morningstar2.co.uk> <517E3D7E.3060808@nag.co.uk> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Message-ID: <517F7569.6000800@morningstar2.co.uk> Date: Tue, 30 Apr 2013 08:40:25 +0100 Reply-To: Mailing list for the LaTeX3 project Sender: Mailing list for the LaTeX3 project From: Joseph Wright Subject: Re: Behaviour of \SplitArgument with missing input To: LATEX-L@LISTSERV.UNI-HEIDELBERG.DE In-Reply-To: <517E3D7E.3060808@nag.co.uk> 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:HTPgUuNWr2E=:B7btZaL2VBN3jrtvL7QlU8 PRKoihVhd0ieEhv/1ovfuk/v30hmGRCf35+K40UrtblSJlIL0O+2TDQSvrJXCT+ePqBClFv 7JCIppVviKq0wFOv/oimFQfVg+3fIsIwKudFat5xXkMooUCVJfRLu/9fJZ4OV+RU7CjGRz6 HgEJiEesO2XxzTyR5vf0MoS1BAVGV+gz5N0kN+2QP9weqhaPXKFvTkUuf16kFnwZUJD7y/J Y2EZhOOchGd/Aww/b+NPU02qhO0oX3Gxn3+xR4nfYDl4y/beEfiKeodFzxEfyw93ByULTTG W8A3/NQIXFfLtrLO5xA+IwD3h0l81Bl/CCEr+7iMvbiCqei1f/omEaDERGwyhGOhqZ5F+Jd toCv18zMWzSD2tOGfQp9AeL9fqGSKirs64jK/9hA9Wnc02IYBPjPECV4lBmv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k/ffcwhrh/ywT1qpx+xYd50oRYlESNu0LfJulgq+KZSkrn15RUFuZddB3dg5vj/xX lAzaiyHB7sNTouwy2Qdm7diM692C1FzNZgvRjK0yU9GR1p+kjYlKtarE/0mLNd2P+CNkbUv NQ6Dp6MVR X-UI-Loop:V01:wZxcxoge26s=:5MSokR95l0qksK47EYbxyM3rl3CQ/IU3SQzc4zsVXx8= Status: R X-Status: X-Keywords: X-UID: 7196 On 29/04/2013 10:29, David Carlisle wrote: > historically I think splitting arguments comes from things like > \cline{1-2} but is it really needed now? It might be more natural to > just split the argument as a clist then missing separators can be > distinguished from empty items by the length of the list. One good question is the scope of xparse. At the most basic, it's job is to deal 'cleanly' with the outer layer of LaTeX2e syntax: \foo[...]{...}. We brought in the idea of 'processors' as there seem to be cases where the input syntax is still 'close' to the document end, and which are common enough to make this sensible. If you accept the idea that some (simple) post-processing is at the 'document' not the 'code' level, then the question is how much. For me, splitting an argument at a token seems to fall within that. I use it in siunitx for \ang{;;} so that at the code level the three are distinct, while the '-' syntax is quite common (\cline as you say, but several other places also use ranges). Of course, at some stage you have to accept that a complex parsing step needs its own code: again, a large part of siunitx is about parsing numbers in a way that is tied to the package and where xparse therefore does nothing other than grab the 'entire' input. My take here is that \SplitArgument (and \SplitList) seem to be about right: they are sufficiently general that they belong in xparse and therefore available to non-programmers. -- Joseph Wright