![]() |
Box operation primitives | ![]() |
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. During the evaluation of delta-x and delta-y, the box lengths w, h, l, r, b and t of content are defined.
This primitive is similar to move, except that the bounding box of the shifted content is the same as the bounding box of the original content.
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 specified in terms of the box lengths w, h, l, r, b and t of content. For instance, the code
(<resize|Hopsa|<minus|1l|5mm>||<plus|1r|5mm>|>) |
widens the box for “Hopsa” by 5mm on each side:
(Hopsa) |
This primitive is similar to resize, except that the content is clipped so as to fit in the specified new bounding 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>.
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.
Variant of repeat, where the repeated pattern is placed underneath the content instead of on top of it.
The content is typeset (so that side effects such as assignments, labels or auxiliary data are taken into account), but nothing is displayed.
These primitives are used to decorate a posteriori the atoms on 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 (datoms) 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. More generally, the tags accept several decorating macros before the content; the last macro (just before the content) is applied first and the first macro is applied last. Inside the decorating macro, the box being decorated is inserted by the internal dbox primitive. 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.