Am Fri, 12 Jun 2015 19:12:07 +0100 schrieb Joseph Wright:
> On 12/06/2015 11:58, Ulrike Fischer wrote:
>> That's a relieve. I was really very bewildered ;-)
>
> Glad I could help: is a release urgent?
No.
>
>> Btw: I came across the problem because I was looking for a way to
>> get
>>
>> \keys_set:nn { test } {type=\testvalue}
>>
>> working, if \testvalue expands to a known choice. Is there some good
>> way to do it?
>>
>> \exp_args:Nnx\keys_set:nn { test } {type=\testvalue}
>>
>> works but could lead to problems if more keys are in the list.
>
> Like other keyval systems, l3keys does no expansion of the key or value
> when parsing: that's by-design.
I know ;-). But sometimes it would be useful to be able to set a
choice or a boolean key through a tl or bool variable and not
explicitly.
Btw: This doesn't work either
\documentclass{article}
\usepackage{expl3}
\begin{document}
\ExplSyntaxOn
\def\testvalueA{A}
\keys_define:nn {test}
{
type .choices:nn = { A , B , \testvalueA }
{
blub
},
}
\keys_set:nn { test } {type=\testvalueA}
\ExplSyntaxOff
%Error
\end{document}
--
Ulrike Fischer
http://www.troubleshooting-tex.de/