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:
Jura Pintar <[log in to unmask]>
Reply To:
Mailing list for the LaTeX3 project <[log in to unmask]>
Date:
Fri, 12 Jul 2013 06:48:18 -0400
Content-Type:
text/plain
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
        \clist_if_empty:cTF
          { \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
              {
                \clist_map_inline:cn
                  { \c__keys_vars_root_tl \l_keys_path_tl .group }
                  {
                    \tl_if_eq:nnT {##1} {####1}
                      {
                        \bool_set_true:N \l__keys_filtered_bool
                        \clist_map_break:
                      }
                  }
              }
          }
        \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.

ATOM RSS1 RSS2