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:
Sun, 21 Aug 2011 12:32:44 +0100
Content-Type:
text/plain
Parts/Attachments:
text/plain (27 lines)
On 21/08/2011 10:39, Will Robertson wrote:
>>> I suppose fontspec is a little odd in its keyval approach when viewed through this lens. It's perfectly reasonable (in fontspec!) to write options like
>>>
>>>    [Numbers={OldStyle,Proportional}]
>>
>> To me, this looks like a meta-option of two boolean choices. We don't
>> currently have a 'meta-in-other-paths', so I'd do something like
>>
>>  \keys_define:nn { fontspec }
>>    { Numbers .code:n = \keys_set:nn { fontspec / Numbers } {#1} }
>>  \keys_define:nn { fontspec / Numbers }
>>    {
>>      OldStyle     .bool_set:N = \l_fontspec_Numbers_OldStyle_bool     ,
>>      Proportional .bool_set:N = \l_fontspec_Numbers_Proportional_bool ,
>>    }
>>
>> Perhaps we need something like ".multichoice:", which would do the same
>> as the above automatically. (This is not that disimilar to what .choice:
>> does.)
> 
> This is essentially the approach I was using with xkeyval; I always thought it was a bit clunky (admittedly, less so here). I think I like the idea of .multichoice:, as having both mutually-exclusive and multiple-choice options seems like a fairly sensible breakdown -- does anyone else have any comments on this?

I've added .multichoice: and .multichoices:nn, marked as 'experimental'.
Feedback on these and .choices:nn would be very useful.
-- 
Joseph Wright

ATOM RSS1 RSS2