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:
Fri, 12 Jun 2015 10:50:34 +0100
Content-Type:
text/plain
Parts/Attachments:
text/plain (51 lines)
On 12/06/2015 10:28, Ulrike Fischer wrote:
> I'm getting an error in this document and don't understand it ;-(
> 
> \documentclass{article}
> \usepackage{expl3}
> \begin{document}
> \ExplSyntaxOn
> 
> \keys_define:nn {test}
>  {
>   type    .choices:nn = { A , B }
>    {
>     blub
>    }, 
>  }
> 
> %Works as expected:
> \keys_if_choice_exist:nnnT { test } { type }{ C}
>   {
>    \keys_set:nn { test } {type=C}
>   } {choice~doesn't~exist!}
> 
> \def\testvalue{A} 
> 
> %Error
> \keys_if_choice_exist:nnnT { test } { type }{ \testvalue }
>   {
>    \keys_set:nn { test } {type=\testvalue}
>   } {choice~doesn't~exist!}
> \ExplSyntaxOff
> \end{document}
> 
> !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
> !
> ! LaTeX error: "kernel/key-choice-unknown"
> !
> ! Key 'test/type' accepts only a fixed set of choices.
> !
> ! See the LaTeX3 documentation for further information.
> !
> ! For immediate help type H <return>.
> !...............................................  
> 
> Why is the T-branch executed in the second case? Is is a bug?

Yes: I see where this is. I'll fix shortly and update CTAN over the weekend.

P.S. Will also look at your TeX-sx question on key setting!
--
Joseph Wright

ATOM RSS1 RSS2