LATEX-L Archives

Mailing list for the LaTeX3 project


Options: Use Classic View

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

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

Print Reply
Achim Blumensath <[log in to unmask]>
Sat, 4 Dec 1999 12:23:54 CET
text/plain (33 lines)
Hans Aberg wrote:
> Here is a possible generalization of the templates in the
> document to classes. The
> point with the class dogma is that one has data with certain structure
> that one wants to describe, and that it helps that description (as it
> lessens programming errors, diminishes the need for repetitive low-level
> programming, etc).

Even if the template system reminds of object-oriented programming at first
glace, it is something completely different. Templates are just commands
which are parameterised; an instance provides the actual parameters for the
command. It doesn't make sense to subclass a template. You have to write a
completely new template if you want to add new parameters.

I don't think that an object-oriented approach is appropriate for LaTeX.
Objects are entities with an internal state capable of sending and
responding to messages. Thus, they are active elements. A text document
on the other hand is something static. It consists of text enriched by
meta-data describing its layout. LaTeX translates this static description
into some lowlevel format. Thus, basically LaTeX is a set of rules
determining this translation, i.e., a set of commands to perform this
translation. Therefore, IMHO a command-based system like templates is
much more appropriate in this context. Some work with the new system has
confirmed this impression.

                                _                             | \_____/ |
    //  Achim Blumensath       | \  _                        \O/ \___/\ |
   //   [log in to unmask]   |-< /_\                       =o=  \ /\ \|
 \X/    (p^2 - m^2)\psi = 0    |_/ \_                        /"\   o----|