![]() |
Transient markup | ![]() |
The tags described in this section are used to control the rendering of style files and style file elements. It both contains markup for activation and deactivation of content and for the rendering of tags.
These tags can be used to temporarily or permanently change the activity of the content. In usual documents, tags are by default active. In style files, they are by default inactive. For instance, an activated fraction is rendered as
| 1 |
| 2 |
; when deactivated, it is rendered as <frac|1|2>.
The active and inactive tags only activate or deactivate the root tag of the content. Typically, a tag which contains hidden information (like hlink) can be deactivated by positioning the cursor just behind it and pressing ⌫. This action just deactivates the hyperlink, but not the potentially complicated body of the hyperlink. Therefore, the hyperlink is transformed into an inactive tag of the form <inactive|<hlink|body|ref>>.
The active* and inactive* variants are used to activate or deactivate the whole content (except when other (dis-)activation tags are found inside the content). The inactive* is used frequently inside the present documentation in order to show the inactive representation of TeXmacs content. Nevertheless, it is sometimes desirable to reactivate certain subtrees inside deactivated content. For instance, the following piece of deactivated code (using inactive*) contains the reactivated subexpression \({\color{red}{\heartsuit \heartsuit \heartsuit}}\) (using active*):
<assign|love|<macro|from|\({\color{red}{\heartsuit \heartsuit \heartsuit}}\) from from.>> |
This tag is used for the default inline rendering of an inactive tag with a given name and arguments arg-1 until arg-n. For instance, <inline-tag|foo|x|y> produces <foo|x|y>. The style of the rendering may be customized in the Document\(\rightarrow\)Source\(\rightarrow\)Preferences menu, or by modifying the src-style, src-special, src-compact and src-close environment variables.
<open-tag|name|arg-1|\(\cdots\)|arg-n>
<middle-tag|name|arg-1|\(\cdots\)|arg-n>
These tags are similar to inline-tag, when some of the arguments of the tag run over several lines. Typical HTML-like tags would correspond to <open-tag|name> and <close-tag|name>. Since TeXmacs macros may take more than one argument, a middle-tag is provided for separating distinct multi-paragraph arguments. Moreover, the opening, middle and closing tags may take additional inline arguments for rendering in a compact fashion. For instance, the code
<document|<open-tag|theorem>|<indent|The weather should be nice today.>|<close-tag|theorem>> |
is rendered by default as
<\theorem| The weather should be nice today. > |
The rendering may be customized in a similar way as in the case of inline-tag.
This tag may be used in order to temporarily modify the rendering of inactive tags, by setting each environment variable var-i to val-i in the local typesetting context of body. When importing a style file, each style-with/style-with* tag is replaced by its body. In the case of style-with, the modified rendering is only applied to the root tag of the body. In the case of style-with*, the rendering is modified for the entire body.
This tag may be used in order to render an inactive tags as whether we applied the macro foo on it. When importing a style file, each style-only/style-only* tag is replaced by its content. In the case of style-only, the modified rendering is only applied to the root tag of the content. In the case of style-only*, the rendering is modified for the entire content.
Evaluates expr, removes all style-with, style-with*, style-only, style-only*, active, active*, inactive and inactive* tags from the result, as is done when importing a style file, and evaluates the filtered tree.
These tags are used only temporarily when entering special content.
When pressing ⌃Q, a symbol tag is created. After entering the name of the symbol, or the ASCII-code of the symbol and pressing return, the symbol tag is replaced by the corresponding symbol (usually a string enclosed in <>). A code above 255 is the Unicode code point of the symbol.
When pressing \, a hybrid tag is created. After entering a string and pressing return, it is determined whether the string corresponds to a LaTeX command, a macro argument, a macro or an environment variable (in this order). If so, then the hybrid tag is replaced by the appropriate content. When pressing \ while a selection is active, then the selection automatically becomes the argument of the hybrid command (or the hybrid command itself, when recognized).
The latex tag behaves similarly as the hybrid tag except that it only recognizes LaTeX commands.
The rendering macros for source trees are built-in into TeXmacs. They should not really be considered as primitives, but they are not part of any style file either.
Typeset the body using some indentation: indent* increases the left margin par-left by 1.5fn, and indent moreover adds a right-flush at the end.
Flush to the right (this macro expands to <htab|0fn|first>). This macro is useful to make the end of a block environment run until the right margin. This allows for more natural cursor positioning and a better layout of the informative boxes.
These macros are used for the syntactic highlighting of source trees. They determine how to render subtrees which correspond to macro names, variable names, argument names, verbatim content, numbers, lengths, textual content, regular content, content of unknown type and error messages.
These macros are used for the identification of style files and packages and their corresponding D.T.D.s. The src-title is a container for src-style-file, src-package, src-package-dtd as well as src-license and src-copyright macros.
The src-style-file tag specifies the name and version of a style file and sets the environment variable with name-style to version. The src-package-dtd specifies the name and version of a package, as well as the corresponding dtd and its version dtd-version. It sets the environment variable name-package to version and dtd-dtd to dtd-version. The src-package tag is a shorthand for src-package-dtd when the name of the D.T.D. coincides with the name of the package.