Sender: |
|
Date: |
Sat, 27 Aug 2011 22:52:37 +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 23/08/2011 18:29, Ulrike Fischer wrote:
>>> So keys like "fig / encoding" look quite natural, but it would be
>>> quite useful if a user could set keys also like this:
>>>
>>> set-all, family=...
>>>
>>> set-fig, family=... , size= ...
>
>> At a technical level, this can be supported. However, my concern is more
>> at the conceptual level. In most programming languages, keyval input is
>> used to replace positional parameters by named ones. On the other hand,
>> the pgfkeys approach inter-mixes named parameters with executed items.
>
> chessboard is doing it too. Once I got the knack on defining keys it
> came quite naturally to use them not only to set width or size but
> also to put and remove pieces, declare a color in one key, and with
> the next key draw a rule in this color.
>
> I realized only at the end that this was an quite unusual use of
> keyval syntax.
>
> A "change path" command would be really useful here. Currently every
> key must have an unique name, and this can give quite long names.
>
>
>> At present, the approach in l3keys when setting keys is rather more
>> toward the 'named parameters' approach.
>
> This is also the case with xkeyval and it could be used for the
> other approach too ;-) I think l3keys is very powerful and quite fun
> to use.
I suspect that we may want the 'executable' key idea, for example .cd,
at some stage. This plus '.style' is part of why pgfkeys works so well.
I will probably look to add this in as experimental stuff to l3keys at
some stage (soon-ish).
--
Joseph Wright
|
|
|