9

The xtemplate documentation describes (briefly and a little unhelpfully) the concept of 'collections' in xtemplate. It goes on to say,

However, while the idea of switchable instances is a useful one, the team feel[s] that collections are not the correct way to achieve this, at least the current approach.

Where was this determined (LaTeX-L?) and what concerns were actually raised? Are there any new thoughts on this?

Also, xtemplate is the second coolest thing since the PGFication of Dolan Duck.

1 Answer 1

11

The first thing to remember here is that work on LaTeX3 is very much exploiting what is possible, and so not everything that gets tried is right. The bigger picture with templates is to find a way of describing design in a general way and that works for LaTeX (typesetting). It's also important to bear in mind that some of this code has been around for a long time.

In the case of 'collections', the idea behind them was to allow design elements to be have 'context-dependence', for example a change in appearance between main and back matter. When the experiments were first carried out, there was another approach also considered: the 'LaTeX Data Base' (LDB). This alternative was more flexible but significantly more complex, and at the time the main work happened (early 1990s) the LDB was not workable with available TeX systems.

What the LDB offered, and what collections lack, is a more nuanced approach to altering design. With collections, all you can do is switch from one to another, with no chance to have any further subdivision. For example, you can use a collection to alter the style of a section in the main and back matter, but not to also add design changes that apply if the section is inside a minipage: either you take the 'main/back' setting or the 'minipage' setting but not a combination.

At the present time, it seems likely that what we really want is something informed by CSS (which post-dates development of the LDB and templates). The current thinking is a 'LaTeX Style Sheet' approach covering 'design elements' and 'context-dependence'. I guess this is probably a high priority to get sorted!

1
  • Note that the template code is not going anywhere at present: it's used by xfrac and we have said it's 'stable for use'. If we get the 'style sheet' idea working then of course there may be some changes.
    – Joseph Wright
    Commented Jan 27, 2014 at 11:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .