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 19:12:07 +0100
Content-Type:
text/plain
Parts/Attachments:
text/plain (35 lines)
On 12/06/2015 11:58, Ulrike Fischer wrote:
> Am Fri, 12 Jun 2015 10:50:34 +0100 schrieb Joseph Wright:
> 
> 
>>> Why is the T-branch executed in the second case? Is is a bug?
>  
>> Yes: 
> 
> That's a relieve. I was really very bewildered ;-)

Glad I could help: is a release urgent?

> 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. As such, you are going to have to go
with x-type expansion here if you want the effect you describe. If the
input might contain uncontrolled LaTeX2e user input then you'll have to
go with \protected@edef and an intermediate tl, but if everything can be
assumed to be LaTeX3-based (or if you make it clear that \robustify or
similar should be applied to any non-robust input) then define a variant
and use \keys_set:nx.
---
Joseph Wright

ATOM RSS1 RSS2