LATEX-L Archives

Mailing list for the LaTeX3 project

LATEX-L@LISTSERV.UNI-HEIDELBERG.DE

Options: Use Classic View

Use Proportional Font
Show HTML Part by Default
Condense Mail Headers

Topic: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Sender: Mailing list for the LaTeX3 project <[log in to unmask]>
Date: Tue, 30 Apr 2013 08:40:25 +0100
Reply-To: Mailing list for the LaTeX3 project <[log in to unmask]>
Message-ID: <[log in to unmask]>
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
In-Reply-To: <[log in to unmask]>
Content-Type: text/plain; charset=ISO-8859-1
From: Joseph Wright <[log in to unmask]>
Parts/Attachments: text/plain (32 lines)
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{<degree>;<minute>;<second>}

so that at the code level the three are distinct, while the '<a>-<b>'
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

ATOM RSS1 RSS2