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
Condense Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Sender:
Mailing list for the LaTeX3 project <[log in to unmask]>
Date:
Tue, 3 Jun 2014 10:15:29 +0100
Reply-To:
Mailing list for the LaTeX3 project <[log in to unmask]>
Message-ID:
Subject:
MIME-Version:
1.0
Content-Transfer-Encoding:
8bit
In-Reply-To:
Content-Type:
text/plain; charset=windows-1252
From:
Joseph Wright <[log in to unmask]>
Parts/Attachments:
text/plain (51 lines)
On 03/06/2014 00:17, Will Robertson wrote:
> Hi Joseph,
> 
> I think the name and the functionality are sensible.

Cool :-)

> The first case is what I do in fontspec (but thereís lots I do in fontspec that I probably shouldn't).
> I suspect that Iíd need to play around with some interfaces to figure out how this would change things.
> Thinking along these lines:
> 
> 
>>    \cs_new_protected:Npn \foo #1#2 % #1 = keys
>>      {
>>        \keys_define:nn { mymod }
>>          {
>>            key-a .preset:n = new-value ,
>>          }
>>       \keys_set:nn { mymod }
>>          {
>>            #1
>>          }
> 
> 
> One thing that becomes a bit harder is unsetting the preset; if I then need to run \keys_set:nn again the preset would either need to be grouped or explicitly disabled.
> 
> (E.g., when setting Letters=SmallCaps for the small caps font before moving on to another font shape.)
> 
> So at least in my use case, and only thinking very briefly about it, Iím not sure if this interface would be a advantage for fontspec ó but thatís not to say that itís not a bad idea, nor either that fontspec couldn't be re-jigged to be a bit more sensible in such matters.
> 
> Cheers,
> Will

I'm seeing offering a 'preset' concept as a convenience/performance
boost, but not necessarily trying to cover everything. The scenario you
outline for fontspec is probably tricky to cover without some dedicated
code, although I guess one might have

  key-a .unset:

or

  key-a .skip_preset:

I think a more common issue is how presetting interacts with filtering
or grouping. Not sure at present, but I suspect the most sensible
outcome is that filters/groups apply to preset keys such that only
'active' keys (that potentially could be set) are preset.
-- 
Joseph Wright

ATOM RSS1 RSS2