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:
Joseph Wright <[log in to unmask]>
Reply To:
Mailing list for the LaTeX3 project <[log in to unmask]>
Date:
Tue, 14 Jul 2015 11:03:22 +0100
Content-Type:
text/plain
Parts/Attachments:
text/plain (51 lines)
On 14/07/2015 10:19, Ulrike Fischer wrote:
> Am Tue, 14 Jul 2015 09:42:13 +0100 schrieb Joseph Wright:
>
>> I was thinking of
>>
>> \keys_define:nn {test}
>> {
>> testa .code:n = {\tl_show:n {#1}},
>> testa .value_required:,
>> testb .code:n = {\tl_show:n {#1}},
>> testb .value_required:,
>> testb .default:n = {}
>> }
>>
>> \keys_set:nn {test} {testa,testb}
>>
>> where one might expect to get an error only in the first case. That's
>> not currently the situation!
>
> Hm. My first reaction was that it works as expected. If I explictly
> require that the *user* gives a value, a *package* default doesn't
> make sense and shouldn't replace the user action.

That's entirely logical and as you say what currently happens, it's just
it's not documented (or I think tested). I'll address that so we have a
clear position :-)

> It is also consistent with the other way round:
>
> \documentclass{article}
> \usepackage{expl3}
> \begin{document}
> \ExplSyntaxOn
> \keys_define:nn {test}
> {
> testb .code:n = {#1},
> testb .value_forbidden:,
> testb .default:n = {xxx}
> }
>
> \keys_set:nn {test} {testb}
>
> \end{document}

Again, probably should document this.

Time-allowing I will do an update to l3keys today to address all of the
points raised.
--
Joseph Wright

ATOM RSS1 RSS2