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
Condense Mail Headers

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

Print Reply
Mime-Version:
1.0
Content-Type:
text/plain; charset="us-ascii"
Date:
Mon, 22 Aug 2011 10:05:10 +0200
Reply-To:
Mailing list for the LaTeX3 project <[log in to unmask]>
Subject:
Content-Transfer-Encoding:
7bit
Message-ID:
Sender:
Mailing list for the LaTeX3 project <[log in to unmask]>
From:
Ulrike Fischer <[log in to unmask]>
Parts/Attachments:
text/plain (44 lines)
Am Sun, 21 Aug 2011 21:43:30 +0100 schrieb Joseph Wright:


>> Sure; thanks. I don't think this needs to be too complex; at a
>> bare minimum the xkeyval approach of returning the unset keys
>> works for most cases.
 
> Okay, there are several approaches we might consider in this area. There
> are also questions about what is needed. For example, is it important to
> _know_ the two independent lists of keys, or just to pass unknown keys
> from one root to another? 

In the chessboard code I still have some "%\show\XKV@rm". I remember
that seeing the list of remaining keys was really helpful to figure
out, what's happening.


 
> With this approach, we'd need to decide whether to wait until the end of
> the 'parent' \keys_set:nn run before doing the redirections, or to do
> the setting 'now', or indeed whether we need both variants. As I say, at
> the moment I'd go with 'interleaved' setting. You can also imagine
> extending such a property to named keys.


In chessboard I use the xkeyval feature to pass remaining keys to
order the processing: I have three types of keys: initialization,
setting properties of the board, filling the board which must be
processed in this order. 

So I'm using something like this
\def\chessboard #1 {
  \setkeys*  {init} {#1}
  \setrmkeys*{set}  {#1}
  \setrmkeys {fill} {#1}

The main difference in this approach compared to three simple
\setkeys commands are in the *:  It means that unknown keys will
pass the first setkeys but the last \setrmkeys command will give an
error if there remains a key unknown. Can this be done with l3keys?

-- 
Ulrike Fischer 

ATOM RSS1 RSS2