LATEX-L Archives

Mailing list for the LaTeX3 project


Options: Use Classic View

Use Monospaced Font
Show Text 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: Mon, 5 Sep 2011 17:26:39 -0400
Reply-To: Mailing list for the LaTeX3 project <[log in to unmask]>
MIME-Version: 1.0
Message-ID: <[log in to unmask]>
In-Reply-To: <[log in to unmask]>
Content-Type: text/plain; charset=ISO-8859-1
From: Bruno Le Floch <[log in to unmask]>
Parts/Attachments: text/plain (38 lines)
Hello all,

a small correction on what Joseph wrote earlier: for mapping
functions, a set of braces is removed from each item after space

> We have revised the behaviour of some comma-list functions, making the
> treatment of spaces and braces more consistent.
> Spaces are now stripped from items when they are added to a clist, while
> braces are retained. Thus
>   \clist_put_left:Nn \l_my_clist { a , ~ b ~ , { c } , ~ { ~ d ~ } ~ }
> will add the items "a", "b", "{c}" and "{~d~}" to the clist.
> The mapping functions for 'inline' clists, for example
> \clist_map_function:nN, strip spaces in the same way, so that
>   \clist_map_function:nN { a , ~ b ~ , { c } , ~ { ~ d ~ } ~ } \foo:n
> will result in \foo:n being mapped to "a", "b", "{c}" and "{~d~}".

In fact, the arguments received by \foo:n are "a", "b", "c" and "~d~".

Two features of this choice: (1) since braces are kept when trimming
spaces, applying space trimming multiple times does nothing; (2) since
one set of braces is removed when mapping, any item can still appear
within a clist.

> As a result of these alterations, \clist_trim_spaces:N is deprecated,
> and scheduled for removal by 2012-09-05. \clist_trim_spaces:n is moved
> to an internal function only: it should therefore be regarded as
> deprecated with respect to use outside of the kernel.

Bruno Le Floch