Fundamental primitives

<document|par-1||par-n>
(vertical sequence of paragraphs)

This primitive is used for sequences of logical paragraphs. A simple, plain text document is made of a sequence of paragraphs. For instance,

A simple document.

Made of several paragraphs. The second paragraph is very long, so that it is hyphenated across several line.

is internally represented as a document with two subtrees:

<document|A simple document.|Made of several paragraphs. The second paragraph is very long, so that it is hyphenated across several line.>

From the visual point of view, different paragraphs are often separated by some vertical whitespace. Alternatively, new paragraphs are indicated through the use of an additional indentation. The root of a TeXmacs document is usually a document node.

The document tag is also used for marking multi-paragraph content inside other tags, such lists or theorem-like environments. Environments which require the use of a document tag for at least one argument are called “block environments”.

<paragraph|unit-1||unit-n>
(vertical sequence of paragraph units)

This not yet implemented primitive is a variant of document. While a document is made up of logical paragraphs, a paragraph is made up of “paragraph units”. From a visual point of view, different paragraphs are singled out using some additional space or indentation. New paragraph units rather correspond to simple new lines. Typically, displayed equations are also paragraph units in a larger paragraph.

<concat|item-1||item-n>
(horizontal sequence of inline markup)

This primitive is used for sequences of line items, also called “inline content”. For instance,

Some emphasized text.

is internally represented as:

<concat|Some |<em|emphasized>| text.>

The concat operator is essential to put compound structures in trees taking multiple parameters. For example, let us place the previous fragment in a multi-paragraph context:

Multiple paragraphs.

Some emphasized text.

In this example, we need the concat tag in order to indicate that “Some emphasized text.” correponds to a single paragraph:

<document|A simple document.|<concat|Some |<em|emphasized>| text.>>

Notice that block tags like document may contain inline tags such as concat as its children, but not vice versa. In order to typeset line content before or after block content, one has to use the surround tag below.

<surround|left|right|body>
(surround block content with inline content)

Although it is not possible in TeXmacs to use block content inside horizontal concatenations, it is sometimes useful to add some additional inline content before or after a block environment. The surround primitive serves this purpose, by adding a left and right surrounding to some block content body. For instance,

<document|<surround| ||<document|<theorem|<document|Given PT{F} and f<gT with P(f) P(g)<0, there exists an hT with P(h) = 0.>>>>>

produces

Theorem 1. Given PT{F} and f<gT with P(f) P(g)<0, there exists an hT with P(h) = 0.

In general, the surround is mainly used in style files, but it occasionally turns out to be useful in regular documents as well.

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