LATEX-L Archives

Mailing list for the LaTeX3 project

LATEX-L@LISTSERV.UNI-HEIDELBERG.DE

Options: Use Classic View

Use Proportional Font
Show Text Part by Default
Show All Mail Headers

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

Print Reply
Frank Mittelbach <[log in to unmask]>
Mon, 24 Aug 2009 18:10:12 +0200
text/plain (113 lines)
Hi Will,

 > I've been meaning to thank you, Frank, for the clear and insightful  
 > basis for discussion with the language layers. It's very helpful to be  
 > able to refer to these ideas in more concrete terms.

good, always glad when such long emails are not totally wasted time :-)

 > I also see that you've now answered Joel's questions as well, but I  
 > figured another viewpoint could hurt (much). Interesting to see if  
 > what I write makes sense to you :)

I see some different viewpoints and or missunderstandings on one or the other
side so it is probably good to go through them so that eventually we find a
common language

 > I'd like to draw a nice info-graphic to illustrate these layers, but  
 > for now I'll just try and answer your questions as I see the  
 > situation. (Please chime in with alternative interpretations.)
 > 
 > - Yes, the document author writes in Layer -1.

yep

 > - Layer 0 defines the structure of the document sufficiently to be  
 > able to write the document in terms of abstract "content", separate  
 > from the "presentation". This layer doesn't define \part, \chapter,  
 > {figure}, and so on, it simply defines that those elements exist and  
 > can be used. (Perhaps also with an loose understanding of the way they  
 > interact.)

yep, logical interpretation

 > - Layer 0 is also the layer than an automated system could output. 

if they like to yes. but they may also like to use a specific layer -1
interface, such as an XML one

 > In LaTeX2e, there is no difference between layer 0 and layer -1 (hence the
 > odd numbering scheme, perhaps).

there is no distinction in 2e right, but that isn't the reason for the "odd"
numbering as you put it. it is more that I think conceptually as the layers 0
1 2 3 going in the direction of providing typographical representations
(output) and the layers 0 -1 -2 in the direction of providing "domain specific
input languages (input).

For example, something like xymtex could be thought of one layer up on basic
LaTeX2e input language in direction of providing a domain specific input
language for chemistry (being internally implemented by using picture elements
from LaTeX (or rather epic)).

so in short: layer 0 sits kind of in the middle between the two directions
which is why I called it my layer 0.


 > - Layer 1 is used by the author who wishes to adjust the design of the  
 > document (different spacing, different fonts, etc.) and for the  
 > designer who sets up a local modification of a class (say, a  
 > university thesis style for others to use). In LaTeX2e, this could be  
 > thought of as loading a package such as geometry and then using its  
 > methods to change the page size.


here is where my interpreation of layers differ: if the author wishes to
adjust design of the document he or she does so conceptually on layer 1. Now
if (and we are going to do that) pass design customization functions to layer
0 which in turn offers those on layer -1 then yes he or she can do it
there. But this is not automatic.

It only looks like it if our functions on layer 1, say, \EditInstance, looks
like a command of layer -1 (which it does if our layer -1 is a 2e-like syntax
layer). But just assume that layer -1 is an XML interface then you have to
translate the functions through the layers.

 > - Layer 2 is a set of document styles that each fulfil certain generic  
 > design elements. There might be a set of templates that can be used to  
 > generate an "article-like" class that allows everything in LaTeX2e's  
 > article, but with a keyval interface (through template) for all of the  
 > design parameters.

again I see this slightly different. The article-like class lives on layer 0
(as far the the logical element definitions are concerned) and an instance of
the class, say, famous standard LaTeX2e article layout, lives on layer 1.

Layer 2 instead provides the generic set of templates that once initiated
define the layout for document classes

 > - Layer 3 is the code that turns the source itself plus the design  
 > parameters into a typeset document. In LaTeX2e terms, this is simply  
 > what exists inside the standard classes, since they offer no (or few)  
 > options for direct modification. Layer 3 is the mechanics that  
 > performs the (a) typesetting algorithms of paragraphs and lists, (b)  
 > automatic numbering, (c) page layout with footnotes and floats, (d)  
 > resolving cross-references, and so on and so on.

that is interesting: to may layer 3 was already basic expl3, but you are right
it might be worth putting certain higher level concepts between layer 2
(templates) and base processing functions


 > I hope, like Frank, that this explains *my* thinking and that it  
 > correlates with his explanations as well. If not, then I've got some  
 > more pondering to do.

I'm not saying my interpretation is right and your's is wrong, it is a
different way to look at what is happening. Unfortunately, for the sake of
being able to talk about something needs implementing on layer 1 etc we need
to come to a single interpretation of the terms (unless you want to call it
FMi-layer-1 :-)

frank

ATOM RSS1 RSS2