LATEX-L Archives

Mailing list for the LaTeX3 project


Options: Use Classic View

Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

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

Print Reply
Joseph Wright <[log in to unmask]>
Sun, 14 Jul 2013 20:45:04 +0100
text/plain (34 lines)
On 13/07/2013 17:01, Jura Pintar wrote:
> I'm still not entirely sure about the handling of unknown keys. On the
> one hand, I think there is a substantial conceptual difference between
> keys that shouldn't be set because they're not in a group on the
> 'opt-in' list or they're in a group on the 'opt-out' list, and keys
> that cannot be set because they're undefined. For one, I expect users
> are likely to pass a disallowed key to a document command because
> they've not read the the documentation carefully enough (and then such
> a key can be filtered out), but when they pass an undefined key,
> they're likelier to have just made a typo. So they should get
> different notifications in the two cases. On the other hand, I agree
> that passing an undefined key to \keys_set_groups:nnn should normally
> be less bad than passing such a key to \keys_set_filtered:nnn. Maybe
> unknown key errors should be demoted to warnings in this case?

For the moment I've gone with my simpler separation of 'keys which have
been set' and 'keys which have not'. I've yet to write the docs, which
may reveal issues, but my thinking currently is that key filtering is a
way to assign only some keys in particular contexts, but that elsewhere
either the 'balance' will be set or all keys will be set

  \key_set_groups:n { module } { group-a } { ... }


  \key_set_filter:n { module } { group-a } { ... }

so unknown keys should turn up. I'm not seeing the need to using groups
to separate out keys such that the 'balance' are never set: we have
\keys_set_known:nn and different paths for such cases.
Joseph Wright