Box operation primitives

<move|content|delta-x|delta-y>
(adjust position)

This primitive moves the box with the specified content by delta-x to the right and delta-y upwards. It may be used for fine-grained positioning.

<resize|content|left-lim|bot-lim|right-lim|top-lim>
(adjust size)

Resize the box for the content according to new left, bottom, right and top limits left-lim, bot-lim, right-lim and top-lim. The limits may be either be empty strings (in which case the old limit is taken), an absolute coordinate, or a limit computed as a function of the old limit.

In the last case, the limit string should be of the form <pos><op><len>. The first character <pos> indicates a position in the old box and should be either l (left), b (bottom), c (center), r (right) or t (top). The second character <op> indicates the operation which will be performed on this position and the remaining length string <len> in order to yield the new position. Possible operations are +, -, [ and ]. The brackets [ and ] stand for “minimum” and “maximum”. For instance, the code

(<resize|Hopsa|l-5mm||r+5mm||>)

widens the box for “Hopsa” by 5mm on each side:

(Hopsa)

<if*|condition|content>
(conditional appearance of box)

The box with the content is displayed as usual if the condition is satisfied and displayed as whitespace otherwise. This primitive is used in particular for the definition of the phantom macro. For instance, the non-text “” is produced using <if*|false|phantom>.

<repeat|content|pattern>
(fill line)

This primitive can be used to decorate some content with a given pattern. For instance, when defining the macro

<assign|wipe-out|<macro|x|<repeat|x|<with|color|red|/>>>>

the code <wipe-out|obsolete> produces obsolete. The repeat primitive may also be used to fill the current line with a given content, like the dots in tables of contents.

<datoms|foo|content>

<dlines|foo|content>

<dpages|foo|content>
(decorations)

These primitives are used to decorate a posteriori the lines of a paragraph, the lines of a page, or the pages of a document. Currently, only decorations of atoms on lines of a paragraph have been implemented.

The first argument foo is a macro which will be applied to all boxes in the line and the second argument content is the part of the paragraph to which the decoration will be applied. For instance, the construction

<\datoms|

< macro | x |

>

|

body

>

may be used in order to visualize the boxes in a given paragraph:

Here is a sufficiently long paragraph. Here is a sufficiently long paragraph. Here is a sufficiently long paragraph. Here is a sufficiently long paragraph. Here is a sufficiently long paragraph. Here is a sufficiently long paragraph.

When used in combination with the repeat primitive, one may for instance produce the dotted lines in tables of contents using the macro

<\assign|

toc-dots

|

<\macro|

<\datoms|

<macro|x|<repeat|x|<space|0.2fn>.<space|0.2fn>>>

|

<htab|5mm>

>

>

>

Notice that the datoms primitive is quite fragile, because the foo macro has no access to the environment in which content is typeset.

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