[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Texmacs-dev] Questioning the concept of document styles
From: |
Norbert Nemec |
Subject: |
[Texmacs-dev] Questioning the concept of document styles |
Date: |
Wed, 7 Jan 2004 10:52:21 +0100 |
User-agent: |
KMail/1.5.4 |
Hi there,
I spent some time thinking why working with document styles in TeXmacs feels
so clumsy. My result was, that the very concept of document styles, that
TeXmacs copies from LaTeX, has to be questioned. Obviously, I can't avoid
touching some fundamental questions here, so I'll take care to be as clear as
possible in writing the following.
-------------------------------------------
Document styles vs. templates
Almost all modern word processors and other document-editing programs use a
system of "templates" for creating new documents of different standard types
(letter, article, book, whatever).
The usage of a template differs fundamentally from that of a style: the
template is used only at creation time. The contents are simply copied to the
new file. Afterwards, the default settings given in the template can be
edited directly in the file. Editing the template will only affect future
works. A template basically is just a plain file, so any user can edit and
create templates just the same way he does with his documents.
Document styles however are not copied but referenced in documents. Editing a
style file will affect all existing documents that use it. To change defaults
given in a style, you can't just edit them in some place, but you have to
override them in the document.
Theoretically, a style is not different from a plain document.
Practically, you have to think hard what to put into a style, since changing
it afterwards is a real pain.
Theoretically, you can change the style of an existing document.
Practically, it won't work because the document uses markup that might not
even exist in the new style. (Just change a "book"-style document to style
"article" and you'll see...)
Theoretically, the style concept should ensure consistency in the look of
documents.
Practically, you don't even want that consistency: Why would you want an
article you wrote three years ago (using your personal style file) to look
similar to newer articles? Currently, you would actually have to archive old
documents along with their style files to ensure they still work lateron
without being completely distorted just because you changed your personal
preferences and edited your personal style file?
Theoretically, the different elements of the predefined styles (sectioning,
header/footer, environments, etc.) should be modular and freely combinable.
Practically, disecting a style is almost impossible because of
interdependencies. Cleaning up the package/style system delivered with
TeXmacs also is about impossible, because it would break oodles of existing
documents.
Theoretically, it should be possible to override detailed settings of a style
used.
Practically, you really have to know the internals of the style. (Just try to
use "article" style and then change the look of the footer...) Also, there is
no clear interface for overriding settings of a style, resulting in the fact
that the existing package/style system can't be maintained at all without
breaking compatibility...
------------------------------
That being said, I believe that the design decision in LaTeX definitely was a
big error. The concept of documents styles really is obsoleted by the modern
concept of templates.
Once, styles were meant as a means of separating formatting from content.
Anyway, what we really would need is to separate those *within* a document.
Every document should be thought of as a combination of content and
formatting. Keeping the formatting outside the document in a centralized
style file might help in those cases where several documents are being worked
on in parallel and their style should stay synchronized. (Like, e.g. a
web-site using CSS) for everyday use, though, people use TeXmacs to work on
one document at a time and the individual documents only have to be
consistent within themselves.
If people want their documents to look similar, they can just extract the
formatting section from one and put it in a template for future documents. If
they want the formatting of a collection of documents to stay synchronized,
that should be done by some "include" mechanism.
I have no idea about a smooth transition plan. My proposal for how it should
be, though:
* rework the current "packages" into something really generic, containing
mechanisms, but not decisions about details (i.e. one file "sectioning" that
works for all kinds of documents with a clean interface how the individual
document types can configure it to their needs)
* the details of different packages should be configurable independantly: one
should be able to change the look of the footer independant of the sectioning
scheme that is configured for the document.
* write templates: e.g. book, article, seminar, whatever -- a template file
should only contain *configuration* not *mechanisms*
* for every configuration option, define a clean interface to set it in a
document in such a way, that a document can easily be split in a formatting
and a content section.
---------------------------------------------------
I know, these suggestions are extremely ambitious and I have no idea, how far
you might agree and whether anybody thinks it worthy to even discuss the
matter. Maybe, it really is too late to do such fundamental design decisions,
but I think it is worthy to at least think about the matter.
Ciao,
Nobbi
--
______________________Norbert Nemec <address@hidden>
Universität Erlangen-Nürnberg, Germany
Institut für Theoretische Physik III
Staudtstr. 7 ... D-91058 Erlangen ... Room No. U1.526
Tel: +49 9131 / 85-28816 ... Mobile: +49 179 / 7475199
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Texmacs-dev] Questioning the concept of document styles,
Norbert Nemec <=