Utilities for writing style files

The std-utils package provides several macros which may be useful when writing style files. First of all, the following macros may be used for rendering purposes:

<hflush>

<left-flush>

<right-flush>

Low level tags for flushing to the right in the definition of environments. One usually should use wide-normal or wide-centered instead.

<wide-normal|body>

<wide-centered|body>

These tags are used to make the body span over the entire paragraph width. The text is left-aligned in the case of wide-normal and centered in the case of wide-centered. Making a body span over the entire paragraph width does not change the rendering on paper, but it facilitates the editing on the document. Indeed, on the one hand side, the box which indicates that you are inside the environment will span over the entire paragraph width. On the other hand, when clicking sufficiently close to the text inside this box, it becomes easier to position your cursor at the start or at the end inside the environment. You may check this by clicking on one of the texts below:

>Some text inside a wide-normal environment.
<

>
Some text inside a wide-centered environment.
<

<padded-normal|space-above|space-below|body>

<padded-centered|space-above|space-below|body>

These tags are variants of <wide-normal|body> and <wide-centered|body>, which put some vertical white space space-above and space-below above and below the body.

<wide-bothlined|top-border|bot-border|top-sep|bot-sep|body>

<wide-std-bothlined|body>

<padded-bothlined|space-above|space-below|top-border|bot-border|top-sep|bot-sep|body>

<padded-std-bothlined|space-above|space-below|body>

<wide-underlined|bborder|bsep|body>

<wide-std-underlined|body>

These tags are used to make the body span over the entire paragraph width and to put a horizontal rule above and/or below it. The widths of the rules are given by top-border and bot-border and the separation between the rules by top-sep and bot-sep. The standard width and separation (used by wide-std-bothlined, padded-std-bothlined and wide-std-underlined) are 1ln and 1sep. The padded variants specify additional spaces space-above and space-below above and below the rules. As an example, <wide-std-underlined|left<htab|5mm>right> yields:

left
right

Wide underlined environments are typically used for page headers. Wide environments which are both overlined and underlined are typically used for abstracts or floating figures and tables.

<wide-framed|border-width|hsep|vsep|body>

<wide-std-framed|body>

<wide-framed-colored|border-color|body-color|border-width|hsep|vsep|body>

<wide-std-framed-colored|border-color|body-color|body>

These tags put the body inside a frame box which spans over the whole paragraph. The user may specify a border-width, horizontal and vertical separations hsep and vsep between the border and the text, and colors border-color and body-color for the border and the background. For instance, <wide-std-framed-colored|brown|pastel green|Hi there!> yields

Hi there!

<indent-left|left-amount|body>

<indent-right|right-amount|body>

<indent-both|left-amount|right-amount|body>

These environments may be used in order to increase the current left and/or right indentation by the amounts left-amount and/or right-amount.

<margin-first-other|first-margin|other-margin|body>

This environment allows to set the margin first-margin for the first lines of paragraphs in the body, as well as the margin other-margin for the other lines. This environment is for instance useful for glossaries, indexes, etc., in which case other-margin is often larger than first-margin. Notice that this environment enables indentation for the first line of body.

The following macros may be used in order to set headers and footers:

<set-header|header-text>

A macro for permanently changing the header. Notice that certain tags in the style file, like sectional tags, may override such manual changes.

<set-footer|footer-text>

A macro for permanently changing the footer. Again, certain tags in the style file may override such manual changes.

<blanc-page>

Remove all headers and footers from this page.

<simple-page>

Remove the header of this page and set the footer to the current page number (centered). This macro is often called for title pages or at the start of new chapters.

Other macros provided by std-utils are:

<localize|text>

This macro should be used in order to “localize” some English text to the current language. For instance, <with|language|french|<localize|Theorem>> yields Théorème.

<map|fun|tuple>

This macro applies the macro fun to each of the entries in a tuple (or the children of an arbitrary TeXmacs tag) and returns the result as a tuple. For instance, <map|<macro|x|<em|x>>|<tuple|1|2|3>> yields (the quote only appears when rendering the result, not when performing further computations with it).

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".