LATEX-L Archives

Mailing list for the LaTeX3 project


Options: Use Classic View

Use Monospaced Font
Show HTML 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: Fri, 12 Jul 2013 06:48:18 -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: Jura Pintar <[log in to unmask]>
Parts/Attachments: text/plain (44 lines)
> This allows each key to be in exactly one group:
> doing multiple groups is possible but more tricky.

About that (and assuming we'd decided to save the filtered keys), do
you think that just doing

\bool_new:N \l__keys_filtered_bool
\cs_new_protected_nopar:Npn \__keys_set_elt_grouped:
    \cs_if_exist:cT { \c__keys_vars_root_tl \l_keys_path_tl .group }
        \bool_set_false:N \l__keys_filtered_bool
          { \c__keys_vars_root_tl \l_keys_path_tl .group }
          { \bool_set_true:N \l__keys_filtered_bool }
            \clist_map_inline:Nn \l__keys_groups_clist
                  { \c__keys_vars_root_tl \l_keys_path_tl .group }
                    \tl_if_eq:nnT {##1} {####1}
                        \bool_set_true:N \l__keys_filtered_bool
        \bool_if:NTF \l__keys_filtered_bool
          { \__keys_set_elt_aux: }
          { \clist_put_right:Nx \l__keys_filtered_clist { \l_keys_key_tl } }

would be too inefficient?

I think allowing multiple groups could be fairly useful, e.g. because
it makes it easy to implement different grains of filtering by
assigning keys to nested groups. And it's also something that pgfkeys
cannot do, so it could give an additional reason for switching to
l3keys to people who don't need pgfkeys for any of the fancier stuff.