LATEX-L Archives

Mailing list for the LaTeX3 project

LATEX-L@LISTSERV.UNI-HEIDELBERG.DE

Options: Use Classic View

Use Monospaced Font
Show Text Part by Default
Condense Mail Headers

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

Print Reply
Mime-Version: 1.0 (Apple Message framework v935.3)
Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes
Date: Thu, 27 Aug 2009 11:11:50 +0930
Reply-To: Mailing list for the LaTeX3 project <[log in to unmask]>
From: Will Robertson <[log in to unmask]>
In-Reply-To: <[log in to unmask]>
Content-Transfer-Encoding: 8bit
Sender: Mailing list for the LaTeX3 project <[log in to unmask]>
Parts/Attachments: 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  
parser.

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  
suppose:

       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.

Cheers,
Will

ATOM RSS1 RSS2