Formatting primitives |
This section contains some important notes on formatting primitives which are not really part of the style-sheet language, but nevertheless very related.
First of all, most TeXmacs presentation tags can be divided in two
main categories: inline tags and block tags. For instance,
<assign|my-theorem|<macro|body|<surround|<no-indent><with|font-series|bold|Theorem. >|<right-flush>|body>>>
In this example, we surrounded the body of the theorem with the bold text “Theorem.” at the left hand side and a “right-flush” at the right-hand side. Flushing to the right is important in order to make the blue visual border hints look nice when you are inside the environment.
In most cases, TeXmacs does a good job in determining which tags are
inline and which ones are not. However, you sometimes may wish to
force a tag to be a block environment. For instance, the tag
<assign|very-important|<macro|body|<with|font-series|bold|color|red|body>>>
may both be used as an inline tag and a block environment. When
placing your cursor just before the
<assign|very-important|<macro|body|<document|<with|font-series|bold|color|red|body>>>>
Since the body of the macro is now a block, your tag
Another important property of tags is whether they contain normal
textual content or tabular content. For instance, consider the
definition of the standard
<assign|eqnarray*|<macro|body|<with|par-mode|center|mode|math|math-display|true|par-sep|0.45fn|<surround|<no-page-break*><vspace*|0.5fn>|<vspace|0.5fn><no-indent*>|<tformat|<twith|table-hyphen|y>|<twith|table-width|1par>|<twith|table-min-cols|3>|<twith|table-max-cols|3>|<cwith|1|-1|1|1|cell-hpart|1>|<cwith|1|-1|-1|-1|cell-hpart|1>|body>>>>>
The use of
Finally, it is important to bear in mind that style-sheets do not
merely specify the final presentation of a document, but that they may
also contain information for the authoring phase. Above, we have
already mentioned the use of the
<
assign
|
labeled-theorem
|
<
macro
|
id
|
body
|
<\surround|
<\concat|
<no-indent>
<flag|Id:
id|blue|id>
<with|font-series|bold|Theorem. >
<right-flush>
body
More generally, the