Wed, 26 Aug 2009 13:09:30 +0200
text/plain; charset=ISO-8859-1; format=flowed
Will Robertson skrev:
> 1. Despite the large increase in verbosity (doubling the line count), I
> think I like splitting the defaults into separate keyvals. In fact,
> after splitting defaults from the definition of the keys, it's no longer
> clear to me whether defaults should be included within the template
> definition at all.
Agreed. I recall from my own experiments (long ago) with template that
the defaults-in-definitions were troublesome. I think I ended up not
using them at all.
> 2. If template-alt is going to auto-detect variables and set them
> appropriately, perhaps it could do the same for functions.
> number-format .set:N = \caption_number_format:nn
> could look at the signature of \caption_number_format:nn and use
> \cs_set:Nn automagically, I think.
I'm generally not keen on automagic stuff myself, but that's just me.
One remark without having looked at template-alt in detail is however
that the signatures above feel as though they're on the wrong side of
the =. That there are two arguments is a property of number-format; you
need to know this when providing a value for this parameter. The :N
signature rather seems like it applies to the implementation, the
details of which are otherwise in the right hand side.