LATEX-L Archives

Mailing list for the LaTeX3 project


Options: Use Classic View

Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

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

Print Reply
Will Robertson <[log in to unmask]>
Thu, 27 Aug 2009 11:11:50 +0930
text/plain (49 lines)
On 26/08/2009, at 8:39 PM, Lars Hellström wrote:

> 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.

The current interface evolved from pgfkeys; I can't say I disagree  
with you but I think a simpler scheme might involve a more complex  

This is what the current syntax is:

       number-format .set:N = \caption_number_format:nn

The problem in parsing is that spaces are (probably) going to be  
ignored, so there has to be some token between the key, the signature,  
and the argument. We could read everything up to the first brace, I  

       number-format = set:N {\caption_number_format:nn}

but I'm not sure this would work so well (after all, an :N type  
argument wouldn't usually need the braces there). Maybe if the  
signature was braced as well?

       number-format = {set:N} {\caption_number_format:nn}

Could use another token but I can't see one that works so well:

       number-format = set:N : \caption_number_format:nn
       number-format = set:N > \caption_number_format:nn
       number-format = set:N / \caption_number_format:nn
       number-format = set:N | \caption_number_format:nn
       number-format = set:N - \caption_number_format:nn
       number-format = set:N ~ \caption_number_format:nn
       number-format = set:N @ \caption_number_format:nn

Unless any of these jump out at you or you've got some more radical  
ideas how to design this interface, I don't think I can see an  
improvement over what template-alt currently uses.