Organization of style files and packages

Each standard TeXmacs style file or package is based on a potentially finite number of subpackages. From an abstract point of view, this organization may be represented by a labeled tree. For instance, the tree which corresponds to the article style is represented below:

Figure 1. The tree with the packages from which the article style has been built up. In order to save space, we have regrouped the numerous children of std and env in vertical lists.

Most of the style packages correspond to a d.t.d. (data type definition) which contains the “abstract interface” of the package, i.e. the exported tags. For instance, the package std-markup corresponds to the d.t.d. std-markup. Sometimes however, several style packages match the same d.t.d.. For instance, both header-article and header-book match the d.t.d. header, since they merely implement different ways to render the same tags.

When building your own style files or packages, you may use the use-package primitive in order to include other packages. For instance, the article style essentially consists of the line

<use-package|std|env|title-generic|header-article|section-article>

More precisely, the use-package package sequentially includes the style packages corresponding to its arguments. The packages should be in $TEXMACS_PACKAGE_PATH, which contains ., ~/.TeXmacs/packages and $TEXMACS_PATH/packages by default. Furthermore rendering information for the source code like style-with tags are discarded before evaluation of the files.

Remark 1. We strongly recommend the user to take a look at some of the standard style files and packages which can be found in

    $TEXMACS_PATH/styles
    $TEXMACS_PATH/packages

When loading using C-x C-f, these paths are in the standard load path. For instance, if you want to take a look at the std-markup package, then it suffices to type C-x C-f, followed by the file name std-markup.ts and return.

Remark 2. It is also possible to customize the presentation of the source code of the style files and packages themselves, by using other packages in addition to source or by using another major style file based on source. In that case, the extra markup provided by such packages may be used for presentation purposes of the source code, but it is not exported when using your package in another file.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License".