General environment variables |
This very important environment variable determines the current mode. There are four possible values: text (text mode), math (mathematical mode), prog (programming mode) and src (source mode). The behaviour of the editor (menus, keystrokes, typesetting, etc.) depends heavily on the mode. For example, the following code may be used in order to include a mathematical formula inside text:
The formula a2 +
b2 = c2
is well known.
The formula <with|mode|math|a<rsup|2>+b<rsup|2>=c<rsup|2>>
is well known.
Some other environment variables (mainly the language and the
font) also depend on the current mode (in this context, the
source mode always behaves in a similar way as the text mode).
During copy
language≔english
math-language≔texmath
A second major environment variable is the current language. In fact, there are three such environment variables: one for each mode. The language in which content is written is responsible for associating a precise semantics to the content. This semantics is used for different purposes:
The language controls (among other parameters like the mode and the document format) the way content is being converted from one context to another.
Currently, no real language-dependent conversions have been implemented yet. But in the future one may imagine that copying a piece of English text to a document written in French will perform an automatic translation. Similarly, a mathematical document might be converted from infix to postfix notation.
At the moment, the current language is mainly used as a hint for indicating the semantics of text: it is not required that a text written in English contains no spelling errors, or that a formula written in a mathematical language is mathematically or even syntactically correct. Nevertheless, the editor is intended to enforce correctness more and more, especially for mathematics.
The language may be specified globally for the whole document in
This environment variables is used in addition to the prog-language
variable in order to determine a concrete implementation as well
as a particular instance of the current programming language. For
instance, in case of the
This variable determines the magnification which is applied to all content. Magnifications bigger than one are typically useful for presentations (from slides or from a laptop):
normal<htab|5mm><with|magnification|2|big><htab|5mm><with|magnification|3|huge>
The magnification should not be confused with the font
size: contrary to the magnification, the font size may also
affect the shapes of the glyphs. The magnification is usually
specified for the entire document in
The current foreground color of text and graphics, as specified in
This flag determines whether we are editing normal text or a
style-sheet. The source tree or preamble mode may be selected in
This variable controls the rendering of informative flags, which are for instance used to indicate the locations of otherwise invisible labels or typesetting directives. The info-flag may take the values none, short and detailed:
<with|info-flag|none|Label 1<label|flag-label-1>>, <with|info-flag|short|Label
2<label|flag-label-2>>, <with|info-flag|detailed|Label 3<label|flag-label-3>>.
Usually, the rendering of informative flags is specified
document-wide in