General environment variables

modetext
(major mode)

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&paste and search&replace operations, TeXmacs tries to preserve the mode.

languageenglish

math-languagetexmath

prog-languagescheme
(language)

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:

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 DocumentLanguage and locally for a piece of text in FormatLanguage.

prog-sessiondefault
(name of programming session)

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 Maxima language, different implementation may be used fooor the underlying Lisp. Similarly, one may wish to run two different instances of Maxima in parallel.

magnification1
(magnification)

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
big
huge

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

bg-colorwhite
(background color)

The background color for your document, as specified in DocumentColorBackground.

colorblack
(foreground color)

The current foreground color of text and graphics, as specified in DocumentColorForeground or FormatColor.

preamblefalse
(edit source tree?)

This flag determines whether we are editing normal text or a style-sheet. The source tree or preamble mode may be selected in DocumentViewEdit source tree.

info-flagshort
(informative flags style)

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:

Label 1, Label 2, Label 3.

<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 DocumentViewInformative flags.

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