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:
Ulrike Fischer <[log in to unmask]>
Reply To:
Mailing list for the LaTeX3 project <[log in to unmask]>
Date:
Tue, 14 Jul 2015 11:19:39 +0200
Content-Type:
text/plain
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