Steve Litt wrote:
Thanks Oliver,

I still don't understand the underlying philosophy of layout modules:

0) What is a layout module?
A modular approach to layout files.

1) Why are they better than just writing your own layout file?
Flexibility.
For example, lets say you need a special kind of markup. (A new charstyle or an extra paragraph type.) This extra stuff can now be used in many different document types. I.e. you can use your
layout module in book, article, scrarticle, ...

Under the old system, you had to make a new layout file for each of these cases. And what if you had a second special kind of markup? You'd need to make layout files for all combinations of "extra stuff" and various document classes. Now, all you need is one layout module per extra feature. These can be added to existing document classes as needed. So you include "extra math theorem environments" only when you need them, avoiding cluttered menus in all those documents that don't use math.

2) How do you decide when to use them?

When you have some nonstandard markup feature that'd be nice to use in several different document classes. And perhaps you don't want to use them _always_, only when needed.

Some latex styles increase compile time or introduce conflicts with others. Some are only used for specialized kinds of writing. And some are unusal, not all people have them.

So you don't want to add them permanently to one or all document classes.

3) By what design methodology do you create them?

They are made the same way as layout files.

Typically:
A new kind of document (or heavily customized "book") gets a new
layout, a new document class.

An smaller add-on, like a latex .sty file defining an interesting environment gets a layout module.

4) What are the attributes of a "good" layout module?
It is useful, possibly with several document classes. Few conflicts with other stuff, and preferably not dependencies either.

A small module adding just one kind of functionality is probably good. If you need several unrelated add-ons, make several distinct modules. Of course a module may define several charstyles/paragraph types, but then they should be related somehow.

5) What are the attributes of a "bad" layout module?

Not sure, but an enormous module redefining everything would be bad,
in that case a new document class is probably what you want.

Fragile setups: A module that works with only one document class, relying on quite a few parameters, other modules, and preamble commands being "just right" or latex will fail. Definitely bad.

Helge Hafting

Reply via email to