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:
Ulrike Fischer <[log in to unmask]>
Reply To:
Mailing list for the LaTeX3 project <[log in to unmask]>
Date:
Fri, 10 Apr 2015 11:13:18 +0200
Content-Type:
text/plain
Parts/Attachments:
text/plain (47 lines)
In the following example \keys_set_groups:nnn ignores every key in
the meta key "default", while \keys_set_filter:nnn "looks" into the
meta key and filters out (as wanted) only the initkey. 

When I add the default key to the "init" group the output of
\keys_set_groups:nnn is correct, but now the filter is wrong.  


\documentclass{article}
\usepackage{expl3}
\begin{document}
\ExplSyntaxOn
\keys_define:nn {mymodule}
 {
  initkey   .code:n   = {init!~},
  initkey   .groups:n = {init},
  laterkey  .code:n   = {later!~},
  laterkey  .groups:n = {later},
  default   .meta:n   = {initkey,laterkey},
  %default  .groups:n = {init},
 }

% no output, wanted: init!
\keys_set_groups:nnn {mymodule} {init} {default}  \par 

% wanted: later!
\keys_set_filter:nnn {mymodule} {init} {default}  \par  

\ExplSyntaxOff
\end{document}


The only work around I found is to create  key copies:
  defaultinit   .meta:n   =     {initkey,laterkey},
  defaultlater  .meta:n   =     {initkey,laterkey},

but this doesn't look very elegant. Is there a way to assign the
default key to "none and all groups" so that is always processed by
both commands?




-- 
Ulrike Fischer 
http://www.troubleshooting-tex.de/

ATOM RSS1 RSS2