LATEX-L Archives

Mailing list for the LaTeX3 project


Options: Use Forum View

Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

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

Print Reply
Joseph Wright <[log in to unmask]>
Reply To:
Mailing list for the LaTeX3 project <[log in to unmask]>
Tue, 30 Apr 2013 08:40:25 +0100
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


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