LATEX-L Archives

Mailing list for the LaTeX3 project


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
Lars Hellström <[log in to unmask]>
Reply To:
Mailing list for the LaTeX3 project <[log in to unmask]>
Wed, 11 Dec 2002 22:48:16 +0100
text/plain (58 lines)
At 16.36 +0100 2002-12-10, Thomas Lotze wrote:
>Hi all,
>provoced by a discussion on de.comp.text.tex, I took a first look at the
>LaTeX3 experimental code, in particular the templates. Up until now I've
>only read the documentation coming with the xbase package, as well as
>the notes by Lars Hellstroem.

Oh, are those available somewhere? (It must be a year and a half now since
I last saw them ...)

>So the following two questions are
>probably rather superficial, but anyway:
>- Why does the template name argument come after the instance name
>  argument in \DeclareInstance? Wouldn't a sequence
>  Template Type -> Template Name -> Instance Name
>  be more logical and intuitive, the more general coming before the more
>  specific?

The template is part of the _definition_ of the instance, not part of the
identity of the instance (hence it follows the general structure

  <definition command> <what to define> <how to define it>

which is normal for such LaTeX commands). However, the relation of
templates to instances is admittedly not very clear in the documentation.

>- If the number of arguments to a template is the same for all templates
>  of any given type, why does it have to be specified in the template
>  declaration, where it can be inferred from the template type?
>Two more things:
>- In the template documentation, the question is raised whether a
>  template type declaration should expect an argument containing a
>  description of the semantics. I'm strongly in favour of this idea and
>  would even suggest that all declarations get a mandatory argument for
>  storing descriptive information, i.e. also those for templates and
>  instances. (Together with another one for a one-line short description
>  this would make automatic documentation of designs possible and
>  besides would encourage the programmer or designer to spell out their
>  ideas to themselves before coding.)

I tend to disagree. There already is a standard (doc package / .dtx
sources) in the LaTeX world which is far more expressive than what one can
achieve through mere command arguments, hence it would be counterproductive
to try to force another level of (lower quality) documentation into the
actual commands. Definition commands with mandatory help texts may be
suitable for interactive languages, but LaTeX is hardly ever interactive.

A better idea would be to device a set of doc commands adapted to the needs
of template documentation, and promote the use of those. A "smart editor"
should use the sources (.dtx) as reference for command definitions, not the
"executables" (.sty and such).

Lars Hellström