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
Show All Mail Headers

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

Print Reply
Subject:
From:
Joseph Wright <[log in to unmask]>
Reply To:
Mailing list for the LaTeX3 project <[log in to unmask]>
Date:
Wed, 19 Aug 2009 08:37:38 +0100
Content-Type:
text/plain
Parts/Attachments:
text/plain (72 lines)
Will Robertson wrote:
> 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.

How does this fit with creating user functions?  For example, I'd
imagine that at some point there has to be something like:

\DeclareDocumentCommand \chapter { s o m } % or whatever
 { \UseInstance {division} {plain-chapter} {<arbitrary-design-name>} }

However, that ties the definition of \chapter to the design, whereas
something like:

\DeclareDocumentCommand \chapter { s o m } % or whatever
 { \UseInstance {division} {chapter} } % no type

means that you can alter the appearance of a document by doing
\DeclareInstance {division} {chapter} { <settings> } without having to
actually touch the definition of \chapter.

I'd also bear in mind that collections are meant for things like "number
sections in the main body, but not in the front matter or appendix", and
therefore <arbitrary-design-name> doesn't want to include anything
covered by a collection. Making "numberless-sections" numbered using a
collection seems very confusing.

Further to the collections idea, I'd imagine that LaTeX3 could supply a
set of basic collections of design decisions, and it would then be
possible to apply them to the entire document. For example, continuing
with the example of sections, we might provide collections

standard-sections
numberless-sections
fancy-sections
Tufte-sections

and so on, meaning that changing the document design could be done using

\UseInstance{<whatever>}

in the document class. Here again I think it makes more sense if
instance names are more structural than design-led. Of course, there
will be some "design" instances, but I'd think that should be very much
as a class level. Taking the example from xfmgalley

\DeclareTemplateType{pshape}{0}
\DeclareTemplate{pshape}{cutout}{0}{ <keys> } { <code> }
\DeclareInstance{pshape}{staggered}{cutout}{ <keys>}

I'd think we could imagine

\DeclareTemplate{paragraph-cutout}{0}{ <keys> } { <code> }
\DeclareInstance{paragraph-cutout}{staggered}{ <keys>}

working without too much difficulty. The idea of "staggered" isn't tied
to design, although any one \DeclareInstance will have to set things
like distances.
-- 
Joseph Wright

ATOM RSS1 RSS2