LATEX-L Archives

Mailing list for the LaTeX3 project

LATEX-L@LISTSERV.UNI-HEIDELBERG.DE

Options: Use Forum View

Use Monospaced Font
Show Text Part by Default
Condense Mail Headers

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

Print Reply
Mime-Version:
1.0 (Apple Message framework v1081)
Content-Type:
text/plain; charset=us-ascii
Date:
Thu, 17 Feb 2011 00:20:23 +1030
Reply-To:
Mailing list for the LaTeX3 project <[log in to unmask]>
Subject:
From:
Will Robertson <[log in to unmask]>
Message-ID:
In-Reply-To:
Content-Transfer-Encoding:
8bit
Sender:
Mailing list for the LaTeX3 project <[log in to unmask]>
Parts/Attachments:
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