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: Tue, 14 Jul 2015 11:19:39 +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 (46 lines)
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.

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} 




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

ATOM RSS1 RSS2