LATEX-L Archives

Mailing list for the LaTeX3 project

LATEX-L@LISTSERV.UNI-HEIDELBERG.DE

Options: Use Classic View

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

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

Print Reply
Will Robertson <[log in to unmask]>
Thu, 17 Feb 2011 00:20:23 +1030
text/plain (21 lines)
On 16/02/2011, at 11:58 PM, Bruno Le Floch wrote:

> As I now understand, the key point in all of this is that we can
> detect spaces and braces expandably using delimited arguments, and we
> can then be sure to act on one token at a time.

Ah, I see:

    \long\gdef\UL_brace_check:nw#1#2#{%
      \UL_if_empty:nTF{#2}%
      {\UL_brace_yes:nn{#1}}%
      {\UL_space_check:nw{#1}#2}%
    }

This is clever. Has anyone seen this done before? Are there any downsides?

If it's as good as it seems then it allows all sorts of expandable things, such as optional argument parsing and expandable nested mapping.

Thanks!
-- Will

ATOM RSS1 RSS2