LATEX-L Archives

Mailing list for the LaTeX3 project

LATEX-L@LISTSERV.UNI-HEIDELBERG.DE

Options: Use Forum View

Use Monospaced Font
Show Text Part by Default
Condense Mail Headers

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

Print Reply
Sender:
Mailing list for the LaTeX3 project <[log in to unmask]>
Date:
Wed, 19 Aug 2009 11:06:13 +0930
Reply-To:
Mailing list for the LaTeX3 project <[log in to unmask]>
Subject:
MIME-Version:
1.0
Content-Transfer-Encoding:
8bit
In-Reply-To:
Content-Type:
text/plain; charset=UTF-8
From:
Will Robertson <[log in to unmask]>
Parts/Attachments:
text/plain (54 lines)
Hi Joseph,

On Wed, Aug 19, 2009 at 6:28 AM, Joseph
Wright<[log in to unmask]> wrote:
> Joseph Wright wrote:
>> 2) Exact structure for type/template boundary (I still don't get it!)
>
> A hunt through some more of the xpackages gives me an example where
> perhaps I can see this.  From xfmgalley.dtx:
>
> \DeclareTemplateType{pshape}{0}
> \DeclareTemplate{pshape}{cutout}{0}{ <keys> } { <code> }
> \DeclareInstance{pshape}{staggered}{cutout}{ <keys>}
>
> This sort-of makes sense. (There are other examples in the same place:
> perhaps it is needed after all!)

I think you've got it. From your previous examples:

Type:     Explanatory-note
Template: Footnote
Instance: Numbered-per-page

Type:     Document-part
Template: Document-division
Instance: Section

Here I think it would be more "sensical" to write (respectively)

Type: textual-note
Template: plain-footnote
Instance: <arbitrarydesignname> with parameters for numbering per page, etc.

Type: division
Template: plain-chapter
Instance: <arbitrary-design-name> with parameters for fonts used, layout, etc.

Note that different templates could be constructed such as
"chapter-like-section", "fancy-chapter", and so on which would all be
of type "division" (and hence take the same arguments) but use
different parameters.

The only reason that we "need" instances is to improve efficiency, and
the only reason that we need instance names is because we need to be
able to refer to them somehow. The instance names themselves don't
carry as much structural meaning as the template name (some instance
names might just be "standard" or "mydoc" or "default"). The level of
referring to a specific design and naming it, say "plain-chapter" is
one step higher than freezing the parameters used in that design.

Not sure if that helps to clarify things :)

Will

ATOM RSS1 RSS2