![]() |
Typesetting mathematics | ![]() |
The index level increases inside certain mathematical constructs such as indices and fractions. When the index level is high, formulas are rendered in a smaller font. Nevertheless, index levels higher than 2 are all rendered in the same way as index level 2 (more precisely, all index levels beyond the number of script sizes specified by math-font-sizes are rendered using the smallest size); this ensures that formulas like
remain readable. The index level may be manually changed in Format\(\rightarrow\)Index level, so as to produce formulas like
\({\color{black}{x}}{\color{black}{}}\) |
This variable determines the font sizes which are used for the different index levels. For the value default, TeXmacs uses two standard script sizes (for index levels 1 and 2). Alternatively, the value may be a tuple of tuples of the form <tuple|size|s-1|\(\cdots\)|s-n>, where size is either a base font size (in points) or all, and where the script sizes s-1 until s-n are either integers (font sizes) or relative sizes like *0.8 or *4/5. For instance, the four-script-sizes package uses the value
<tuple|<tuple|all|*0.8|*0.6|*0.5>> |
This environment variable controls whether we are in display style or not. Formulas which occur on separate lines like
are usually typeset in display style, contrary to inline formulas like \(\frac{n}{H (\alpha_1, \ldots, \alpha_n)} = \frac{1}{\alpha_1} + \cdots + \frac{1}{\alpha_n}\). As you notice, formulas in display style are rendered using a wider spacing. The display style is disabled in several mathematical constructs such as scripts, fractions, binomial coefficients, and so on. As a result, the double numerators in the formula
are typeset in a smaller font. You may override the default settings using Format\(\rightarrow\)Display style.
By default, formulas like \(a + \cdots + z\) are typeset using a nice, wide spacing around the \(+\) symbol. In formulas with scripts like \(\mathrm{e}^{a + \cdots + z} + \mathrm{e}^{\alpha + \cdots + \zeta}\) the readability is further enhanced by using a more condensed spacing inside the scripts: this helps the reader to distinguish symbols occurring in the scripts from symbols occurring at the ground level when the scripts are long. The default behaviour can be overridden using Format\(\rightarrow\)Condensed.
For a high quality typesetting of fraction, it is good to avoid subscripts in numerators to descend to low and superscripts in denominators to ascend to high. TeXmacs therefore provides an additional environment variable math-vpos which takes the value \(1\) inside numerators, \(- 1\) inside denominators and \(0\) otherwise. In order to see the effect the different settings, consider the following formula:
\({\color{black}{}}{\color{black}{+}}{\color{black}{}}{\color{black}{+}}{\color{black}{}}\) |
In this example, the grouping is necessary in order to let the different vertical positions take effect on each \(a_i^2\). Indeed, the vertical position is uniform for each horizontal concatenation.
math-nesting-mode\(:=\)off
When math-nesting-mode is not off (the math-brackets and math-check packages set it to colored), matching large brackets are rendered in colors which depend on their nesting depth. The current depth is maintained by the typesetter in the variable math-nesting-level.
math-frac-limit\(:=\)100par
math-table-limit\(:=\)100par
Fractions whose numerator or denominator are wider than math-frac-limit are typeset in a linear form \(a / b\) instead of the usual two-dimensional form; similarly, simple tables (without an explicit table-width) which are wider than math-table-limit are flattened. The brackets and slashes which are introduced for such flattened expressions are rendered using the color math-flatten-color. The default limits are so large that flattening essentially never happens; smaller limits are used for instance in the output of interactive sessions.
math-top-swell-start\(:=\)1.7ex
math-top-swell-end\(:=\)3.5ex
math-bot-swell-start\(:=\)-0.7ex
When the paragraph variable par-swell (resp. the cell variable cell-swell) is positive, some extra vertical padding is added above lines (resp. table cells) whose content rises above math-top-swell-start. The padding increases linearly with the height and reaches the full value of par-swell at math-top-swell-end. The variables math-bot-swell-start and math-bot-swell-end play a similar role below the baseline.