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:
Fri, 12 Jun 2015 11:28:05 +0200
Content-Type:
text/plain
Parts/Attachments:
text/plain (49 lines)
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?


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

ATOM RSS1 RSS2