LATEX-L Archives

Mailing list for the LaTeX3 project

LATEX-L@LISTSERV.UNI-HEIDELBERG.DE

Options: Use Classic View

Use Monospaced Font
Show Text Part by Default
Condense Mail Headers

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

Print Reply
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Date: Fri, 10 Apr 2015 11:17:41 +0200
Reply-To: Mailing list for the LaTeX3 project <[log in to unmask]>
Content-Transfer-Encoding: 7bit
Message-ID: <[log in to unmask]>
Sender: Mailing list for the LaTeX3 project <[log in to unmask]>
From: Ulrike Fischer <[log in to unmask]>
Parts/Attachments: text/plain (33 lines)
Am Fri, 10 Apr 2015 11:13:18 +0200 schrieb Ulrike Fischer:

> Is there a way to assign the default key to "none and all groups"
> so that is always processed by both commands?

As expected, once I post a question I find a solution:

\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 = {meta},  
 }

\keys_set_groups:nnn {mymodule} {meta,init} {default}  \par %init

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

\ExplSyntaxOff
\end{document}


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

ATOM RSS1 RSS2