Sender: |
|
Date: |
Sun, 21 Aug 2011 12:32:44 +0100 |
Reply-To: |
|
Message-ID: |
|
Subject: |
|
MIME-Version: |
1.0 |
Content-Transfer-Encoding: |
7bit |
In-Reply-To: |
|
Content-Type: |
text/plain; charset=ISO-8859-1 |
From: |
|
Parts/Attachments: |
|
|
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
|
|
|