Mime-Version: |
1.0 (Mac OS X Mail 7.3 \(1878.2\)) |
Content-Type: |
text/plain; charset=windows-1252 |
Date: |
Sun, 24 Aug 2014 11:23:25 +0930 |
Reply-To: |
|
Subject: |
|
From: |
|
Message-ID: |
|
In-Reply-To: |
|
Content-Transfer-Encoding: |
8bit |
Sender: |
|
Parts/Attachments: |
|
|
On 23 Aug 2014, at 4:49 am, Sean Allred <[log in to unmask]> wrote:
> And I don't mean to advocate that these objects should be able to have
> many (9+) mandatory arguments; I'm far more concerned with the
> homelessness for optional ones.
I think after Frank’s experiments with sectioning, it became apparent that this was a major stumbling block. When a chapter heading can have
1. title
2. toc title
3. header title
4. label
5. unnumbered flag
6. author
7. epigraph
…
it no longer makes sense to require mandatory arguments. On the other hand I do see Joseph’s point that when you have just one or two actually mandatory arguments that writing the following is a bit ugly:
\UseInstance{crossref}{latex2e}{ label = #1 }% only one mandatory argument
* * *
A model that I think has worked quite well in the LaTeX world is how BibTeX has a notion of “mandatory” and “optional” fields for bibliography references.
Perhaps we could supplement the current xtemplate interface with a keyval-type-argument (one only per interface, of course), in which the optional/mandatory nature of each keyval item within is specified by the document design (and some may well be always mandatory).
So according to the situation you could have either
\UseInstance{…}{…}{arg one}{arg two}{arg three}
or
\UseInstance{…}{…}{ arg-one=… , arg-two=…, arg-three=… }
or even a combination of the two:
\UseInstance{…}{…}{arg one}{ arg-two=…, arg-three=… }
Any thoughts?
Will
|
|
|