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
Sender: Mailing list for the LaTeX3 project <[log in to unmask]>
Date: Wed, 25 Mar 2015 05:15:08 +0000
Reply-To: Mailing list for the LaTeX3 project <[log in to unmask]>
Message-ID: <[log in to unmask]>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
In-Reply-To: <[log in to unmask]>
Content-Type: text/plain; charset=utf-8
From: Brent Longborough <[log in to unmask]>
Parts/Attachments: text/plain (37 lines)
On 2014-09-29 10:37, Denis Bitouzé wrote:
> Hi,
> 
> among others, `.value_forbidden:` and `.value_required:` key properties
> from `l3keys` package are useful: they let us specify that a given key,
> when used, either cannot or must receive a value.
> 
> What could be useful as well is a key property, say `.required:`, that would
> specify that the corresponding key /has/ to be used. This could be helpful for
> instance in the case of a document command `\MyModuleSetup` for setting up
> a module `mymodule`:
> 
>     \DeclareDocumentCommand \MyModuleSetup { m }
>       { \keys_set:nn { mymodule } { #1 } }
> 
> where some module property /has/ to be specified.
> 
> I know this can be achieved with something like test of existence of
> some tokenlist and message emitted in case of nonexistence but a high
> level key property for this could be nice.
> 
> May I ask what is your opinion about that?
> 
> Thanks in anticipation.
> 

Just a couple of thoughts, humbly offered with some uncertainty:

1. A compulsory key seems to me, on the face of it, to imply a
less-than-friendly user experience.

2. A simple solution might be to provide a default (such as "nil"), and,
'later in the package', test the key for "nil" and complain if it has
not been overridden.

Brent Longborough

ATOM RSS1 RSS2