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
Sender:
Mailing list for the LaTeX3 project <[log in to unmask]>
Date:
Thu, 24 May 2012 21:31:38 +0200
Reply-To:
Mailing list for the LaTeX3 project <[log in to unmask]>
Subject:
MIME-Version:
1.0
Message-ID:
In-Reply-To:
Content-Type:
text/plain; charset=ISO-8859-1
From:
Bruno Le Floch <[log in to unmask]>
Parts/Attachments:
text/plain (34 lines)
On 5/24/12, Marco Daniel <[log in to unmask]> wrote:
>> A small correction: \clist_use:N should be replaced by \tl_use:N
> Does it mean I have to write:
>
> \tl_use:N \l_mylist_clist

At the moment yes.  We agree that this is not very LaTeX3-like.  The
current plan is to introduce a higher-level function to convert comma
lists and sequences to nicely setup lists of the form "item1, item2,
item3, and item4".

    \clist_use:Nnnn <clist var>
     { <separator for two> }
     { <separator in general> }
     { <last separator for more than 2> }

For instance,

    \clist_use:Nnnn \l_my_clist
      { ~ and ~ } { , ~ } { , ~ and ~ }

would give

    item1 % if the clist had only one item
    item1 and item2 % if the clist had two items
    item1, item2, and item3 % for 3 items or more.

We have not yet decided whether to add this function yet.  Since
\clist_use:N was not used in TeXLive 2011 (apart from our own l3doc),
deciding this seemed less urgent than other issues.

Regards,
Bruno

ATOM RSS1 RSS2