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
Show All Mail Headers

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

Print Reply
Subject:
From:
Bruno Le Floch <[log in to unmask]>
Reply To:
Mailing list for the LaTeX3 project <[log in to unmask]>
Date:
Sun, 13 Mar 2011 06:56:34 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (29 lines)
>> Do we care about keeping braces surrounding an element in a sequence
>> (I'd say yes, although it requires more care)?
>
> Absolutely, yes.

More on that. Many of the functions in the seq module are defined somewhat like

    \cs_new:Npn \seq_foo:w \seq_elt:w #1 \seq_elt_end: {... #1 ...}

This removes braces around #1. Since the documentation explicitly
states that seq can contain any token except `\seq_elt:w` and
`\seq_elt_end:`, I started reimplementing many of the functions to
avoid removing braces.

However, I'm now seeing that "We use explicit delimiters instead of
braces around text to allow efficient searching for an item in the
sequence." But that won't work if the item contains `{`, `}`, or `#`.

**So my question is: do we want to support braces in seq items or not?**

One option would be to say yes, and provide two search functions: one
quick one if the item does not contain braces nor `#`, and a slower
one which recurses through the arguments and compares with
`\tl_if_eq:nnTF`.

-- 
Regards,
Bruno

ATOM RSS1 RSS2