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/