Standard environment variables

1.Built-in environment variables

The way TeXmacs typesets documents is influenced by so called environment variables. The style-sheet language uses a so called environment (or context) to store both environment variables and macros. The environment variables are subdivided into two categories: built-in variables and additional variables provided by style files. Built-in variables usually affect the layout, while additional variables mostly serve computational purposes. In the next sections of this chapter, we will describe all built-in environment variables.

A typical built-in environment variable is color. The value of an environment variable may be changed permanently using assign and temporarily using the with primitive:

Some colored text.

Some <with|color|dark red|colored> text.

Counters are typical environment variables defined in style-sheets.

  1. A weirdly

  2. numbered list…

<enumerate|<document|<item>A weirdly|<assign|item-nr|3><item>numbered list…>>

The typesetting language uses dynamic scoping of variables. That means that macros can access and modify variables in their calling context. In the previous example, the enumerate macro locally initializes item-nr to (uses with) and the item macro increments it by one and shows its value. Since enumerate locally redefines item-nr, the original value of item-nr is restored on exit.

Each document comes with an initial environment with the initial values of environment values, i.e. their values just before we typeset the document. If an environment variable does not occur in the initial environment, then its initial value defaults to its value after typesetting the document style and possible additional packages. The initial environment before typesetting the style files and packages is built-in into the editor.

Some variables, like header and footer variables, must be set inside the document, their initial environment value is ignored. Generally, they should be set by header and sectioning markup.

1.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 is well known.

The formula <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. Named colors, like “Salmon”, are supported for different color charts: dvips, x11 and html.

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 DocumentSourceEdit 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 DocumentInformative flags.

2.Specifying the current font

In this section, we describe the environment variables which control the rendering of fonts. Font properties may be controlled globally for the whole document in DocumentFont and locally for document fragments in FormatFont.

From an abstract point of view, a font is defined to be a graphically consistent way of rendering strings. Fonts are usually made up from glyphs like “x”, “ffi”, “”, “”, etc. When rendering a string, the string is decomposed into glyphs so as to take into account ligatures (like fi, fl, ff, ffi, ffl). Next, the individual glyphs are positioned while taking into account kerning information (in “xo” the “o” character is slightly shifted to the left so as to take profit out of the hole in the “x”). In the case of mathematical fonts, TeXmacs also provides a coherent rendering for resizable characters, like the large brackets in

Similarly, a font family is a family of fonts with different characteristics (like font weight, slant, etc.), but with a globally consistent rendering. One also says that the fonts in a font family “mix well together”. For instance, the standard computer modern roman font and its bold and italic variants mix well together, but the computer modern roman font and the Avant Garde font do not.

Remark 1. In versions of TeXmacs prior to 1.99.1, the fonts for the mathematical and programming modes could be controlled independently using the environment variables math-font, math-font-family, math-font-series, math-font-shape, prog-font, prog-font-family, prog-font-series, prog-font-shape. In more recent versions of TeXmacs, the environment variables font, font-family, font-series and font-shape directly control the font for all modes.

fontroman
(font name)

These variables control the main name of the font, also called the font family. For instance:

Computer modern roman, Pandora, Chancery, Palatino

Similarly, TeXmacs supports various mathematical fonts:

Roman:

Adobe:

New roman:

Concrete:

Most fonts only implement a subset of all Unicode glyphs. Sometimes, the user might wish to combine several fonts to cover a larger subset. For instance, when specifying roman,IPAMincho or cjk=IPAMincho,roman as the font name, ordinary text and mathematics will be typeset using the default roman font, whereas Chinese text will use the IPAMincho font. Similarly, when specifying math=Stix,roman as the font name, ordinary text will be typeset using the default roman font, but mathematical formulas using the Stix font.

font-familyrm
(font variant)

This variable selects a variant of the major font, like a sans serif font, a typewriter font, and so on. As explained above, variants of a given font are designed to mix well together. Physically speaking, many fonts do not come with all possible variants (sans serif, typewriter, etc.), in which case TeXmacs tries to fall back on a suitable alternative font.

Typical variants for text fonts are rm (roman), tt (typewriter) and ss (sans serif):

roman, typewriter and sans serif

Sans serif formula:

font-seriesmedium
(font weight)

The font series determines the weight of the font. Most fonts only provide regular and bold font weights. Some fonts also provide light as a possible value.

medium, bold

font-shaperight
(font shape)

The font shape determines other characters of a font, like its slant, whether we use small capitals, whether it is condensed, and so on. For instance,

upright, slanted, italic, left slanted, Small Capitals, proportional typewriter, bold condensed, flat sans serif, long

font-base-size10
(font base size)

The base font size is specified in pt units and is usually invariant throughout the document. Usually, the base font size is 9pt, 10pt, 11pt or 12pt. Other font sizes are usually obtained by changing the magnification or the relative font-size.

9pt, 10pt, 11pt, 12pt

font-size1
(font size)

The real font size is obtained by multiplying the font-base-size by the font-size multiplier. The following standard font sizes are available from FormatSize:

size multiplier size multiplier
Tiny 0.59 Very small 0.71
Small 0.84 Normal 1
Large 1.19 Very large 1.41
Huge 1.68 Really huge 2

Table 1. Standard font sizes.

From a mathematical point of view, the multipliers are in a geometric progression with factor . Notice that the font size is also affected by the index level.

dpi600
(fonts rendering quality)

The rendering quality of raster fonts (also called Type 3 fonts), such as the fonts generated by the Metafont program is controlled through its discretization precision in dots per inch. Nowadays, most laser printers offer a printing quality of at least 600dpi, which is also the default dpi setting for TeXmacs. For really high quality printing, professionals usually use a precision of 1200dpi. The dpi is usually set once and for all for the whole document.

3.Typesetting mathematics

math-level0
(index level)

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; this ensures that formulas like

remain readable. The index level may be manually changed in FormatIndex level, so as to produce formulas like

math-displayfalse
(display style)

This environement 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 . 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 FormatDisplay style.

math-condensedfalse
(condensed display style)

By default, formulas like are typeset using a nice, wide spacing around the symbol. In formulas with scripts like 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 FormatCondensed.

math-vpos0
(position in fractions)

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 inside numerators, inside denominators and otherwise. In order to see the effect the different settings, consider the following formula:

In this example, the grouping is necessary in order to let the different vertical positions take effect on each . Indeed, the vertical position is uniform for each horizontal concatenation.

4.Paragraph layout

par-modejustify
(paragraph alignment)

This environment variable specifies the alignment of the different lines in a paragraph. Possible values are left, center, right and justify:

This paragraph is aligned to the left. This paragraph is aligned to the left. This paragraph is aligned to the left.

This paragraph is has been centered. This paragraph is has been centered. This paragraph is has been centered.

This paragraph is aligned to the right. This paragraph is aligned to the right. This paragraph is aligned to the right.

This paragraph has been justified. Justification is the default alignment mode for paragraphs. So be it.

Table 2. The supported modes for alignment.

par-flexibility1000.0
(paragraph flexibility)

When using the justified alignment mode, it sometimes occurs that certain lines need to be stretched a lot, thereby leaving abnormally large spaces in the middle of those lines. This is typically the case inside bibliographies with unbreakable hyperlinks. The par-flexibility variable specifies a threshold above which justification of a line is abandoned. More precisely, we switch to left alignment whenever the remaining space on a line exceeds par-flexibility times the maximal amount of stretching which still “looks nice” for the given font.

For certain paragraphs with wide unbreakable pieces of text, such as the hyperlink https://www.texmacs.org it is sometimes preferrable to switch from justified to left aligned text when the spacing between words becomes to wide.

For certain paragraphs with wide unbreakable pieces of text, such as the hyperlink https://www.texmacs.org it is sometimes preferrable to switch from justified to left aligned text when the spacing between words becomes to wide.

Table 3. Difference between a large and small flexibility (on the left and right hand sides respectively).

par-hyphennormal
(quality of hyphenation)

This parameter controls the quality of the hyphenation algorithm. Possible values are normal and professional. The professional hyphenation algorithm uses a global algorithm on the entire paragraph, whereas the normal one uses a faster first-fit algorithm.

The difference between the different hyphenation algorithms provided by TeXmacs is seen best for long paragraphs which are typeset into a narrow column. The professional hyphenation usually succeeds to minimize the number of ugly gaps between words.

The difference between the different hyphenation algorithms provided by TeXmacs is seen best for long paragraphs which are typeset into a narrow column. The professional hyphenation usually succeeds to minimize the number of ugly gaps between words.

Table 4. Comparison different hyphenation algorithms. At the left hand side, we have used the normal algorithm and on the right hand side the professional one. Even though there are some ugly gaps at the right hand side around “hyphenation”, the really bad gap around “The” on the left hand side has been avoided.

par-widthauto
(paragraph width)

This environment variable controls the width of paragraphs. By default, it is automatically determined as a function of the page (or screen) size and margins.

par-left0cm

par-right0cm
(left and right margins)

These environment variables specify absolute left and right margins for the paragraph, with respect to the default left and right margins (which are determined as a function of the page layout). For instance:

This text uses the default margins.

This text uses a left margin of 1cm

This text uses a left margin of 2cm

This text uses a left margin of 3cm

The left and right margins of this text have both been set to 3cm.

Environments like itemize and quote-env which maybe nested usually compute new margins as a function of the old values by adding or subtracting some space:

<assign|quote-env|

<macro|body|

<\surround|

<vspace*|0.5fn>

|

<right-flush><vspace|0.5fn>

|

<with|par-left|<plus|par-left|3fn>|par-right|<plus|par-right|3fn>|par-first|0fn|par-par-sep|0.25fn|body>

>

>

>

par-first1.5fn
(first indentation)

The par-first parameter specifies the additional indentation which is used for the first line of the paragraph. The aim of first indentations is to indicate the starts of new paragraphs. An alternative technique is the use of vertical whitespace.

The article and book styles in TeXmacs indictate the starts of new paragraphs through the use of a first indentation.

The generic and letter styles rather use vertical whitespace.

The generic and letter styles in TeXmacs indictate the starts of new paragraphs through the use of vertical whitespace.

The article and book styles rather use a first indentation.

Table 5. Two classical ways to indicate the starts of new paragraphs.

par-sep0.2fn
(extra separation between successive lines)

The sum of the font size and par-sep determines the ideal distance between two successive base lines in a paragraph (also called the “base line skip”). Of course, when the lines contain large boxes, then this distance may need to be increased. When 1fn for par-sep, one may for instance produce documents with a double interline space:

A double interline space corresponds to par-sep1fn. Double interline spaces are often used by lazy people who want to pretend that they have written many pages. They generally do not care about tropical rain forests.

In the case when two successive lines use different base line skips, then the maximal value is used in order to compute the ideal distance between their baselines. This allows for a reasonable spacing when the font size is changed from one paragraph to another:

Normal text.

Some very large text.

And back to normal.

par-line-sep0.025fn*
(extra space between lines)

This parameter corresponds an additional stretchable amount of whitespace between successive lines in a paragraph. Setting par-line-sep to a small stretchable value which defaults to allows the page breaker to correctly stretch pages which contain a very long textual paragraph. Indeed, par-line-sep vanishes, then the height of a textual paragraph is of the form , where and are constants and is the number of lines. There is no reason why the usable height of a page should be of this form.

par-par-sep0.5fn*
(extra space between paragraphs)

The par-par-sep parameter specifies the amount of vertical whitespace which separates two successive paragraphs. This space is determined in stretchable length units. By default, TeXmacs does not use any whitespace between successive paragraphs, except when no nice page breaks could be found (this explains the use of the fn* length unit). Starts of new paragraphs are rather indicated through the use of first indentations (see table ?).

In the case when two successive paragraph use different paragraph separations, then the maximum of the two is taken. In fact, the par-par-sep length is added to both the vertical spacing before and the vertical spacing after the paragraph.

par-hor-sep0.5fn

par-ver-sep0.2fn
(minimal space between ink)

When a paragraph contains several exceptionally large boxes, then TeXmacs attempts to “shove successive lines into another” as long as none of the boxes collide:

Consider a fraction which decends more than usual like at the end of a line and an expression like which is higher than usual.

When these expressions occur at different places, then TeXmacs tries to render the successive lines in a compact manner.

In the case of a fraction and an exceptionally high expression at the wrong place, like the expression here, the boxes are separated by env-ver-sep.

As soon as the horizontal distance between two large boxes is less than par-hor-sep, then they are considered to be in collision. In that case, the vertical distance between them must be at least par-ver-sep. Also, the amount of showing never exceeds 1ex.

When using an interline space of 1.5 or 2, the default value of par-ver-sep allows the user to type larger formulas in the text while preserving a uniform layout. When using a small par-sep and a large par-ver-sep, the distance between two successive lines remains small, except when their contents are horizontally close. This may for instance be used to reduce the space between a short like followed by a centered equation.

par-fnote-sep0.2fn
(minimal space between different footnotes)

This parameter controls the amount of vertical space between successive footnotes.

par-columns1
(number of columns)

This environment variable specifies the number of columns into which the text is being typeset. Different numbers of columns may be used successively in the same document.

par-columns-sep2fn
(distance between columns)

This environment variable specifies the amount of horizontal whitespace which separates different columns in multi-column mode.

5.Page layout

In this section, we describe how TeXmacs fills pages with typesetted content. Besides specifying the settings on how to print a document, the user may also determine the way pages should be rendered on screen. It should be noticed that the number of environment variables is redundant in the sense that some variables are computed as a function of other ones. For instance, by default, the paragraph width is computed as a function of the page size and the left and right margins.

Paper specific variables

page-typea4
(the size of pages)

Specify the size of a page when printing out. Most standard formats are available in DocumentPageSize. By default, the paper size is the one of your printer (the default printer settings may be changed in EditPreferencesPrinter). When the page-type is set to user, then the page size is given by page-width and page-height.

page-orientationportrait
(page orientation)

The orientation of pages can be either portrait or landscape.

page-nr0
(current page number)

The current page number. This environment variable should be manipulated with care, since it is not yet available at typesetting time. For a reliable determination of page numbers, one may combine the label and page-ref primitives. Nevertheless, the page-nr variable can be used in the macros which render page headers and footers.

page-the-page
(display the page number)

This environment variable really contains the macro which is used for rendering the page-number. By default, it renders page-nr. The macro takes no arguments. In order to simulate a document whose first page number is , one may redefine

<assign|page-the-page|<macro|<plus|page-nr|122>>>

page-breakingoptimal
(page breaking algorithm)

This parameter specifies the page breaking algorithm. The default optimal algorithm takes into account the global document and tries hard to avoid bad page breaks. The alternative sloppy algorithm uses a fast first-fit algorithm, but produces bad page break with a higher probability. The medium quality algorithm is the same as the optimal algorithm, except for two column content.

page-flexibility1.0
(flexibility for stretching)

This parameter specifies how much stretchable spaces may be extended or reduced in order to fill pages which are too short or too long. A page flexibility of allows spaces to be stretched to their minimal and maximal values. A page flexibility of prevents spaces to be stretched. For other values of page-flexibility the behaviour is linear.

page-shrink1fn
(allowed amount of page shrinking)

In the case when it is very hard to find good page breaks, this parameter specifies an additional amount of space by which a page is allowed to be reduced.

page-extend0fn
(allowed amount of page extensions)

In the case when it is very hard to find good page breaks, this parameter specifies an additional amount of space by which a page is allowed to be extended.

Screen specific variables

page-mediumpapyrus
(the page medium)

This environment variable, which is initialized using DocumentPageType, specifies how pages are rendered on the screen. The following values are available:

paper

Page breaks are visually indicated on the screen. This mode is useful for ajusting the final version of a document before printing or sending it to a publisher. However, the use of this mode slows down the editor since every modification in the document triggers the page-breaking algorithm.

Notice also that the mere selection of this mode does not imply the screen margins and page decorations to be as on paper. In order to previsualize a document in a fully realistic way, you should also set DocumentPageScreen marginsShow header and footer and DocumentPageScreen marginsMargins as on paper.

papyrus

The paragraph width is the same as on paper, but page breaking is disabled. This mode is most useful during the editing phase of a document which will ultimately be printed out. It combines a reasonable editing speed with realistic line breaks.

automatic

The paragraph width is as large as possible so as to fit into the current window and page breaking is disabled. This setting, which makes optimal use of the available space on your screen, is useful for documents which are not intended to be printed out. It may for instance be selected when using TeXmacs as a browser or as an interface to computer algebra systems.

page-screen-width10cm
(width of the rendering window)

In automatic mode, this environement variable contains the width of the screen.

page-screen-height10cm
(height of the rendering window)

In automatic mode, this environement variable contains the height of the screen.

page-screen-margintrue
(special margins for screen editing?)

This flag specifies whether the screen margins are manually specified by the user, or whether they are the same as on paper.

page-screen-left5mm

page-screen-right5mm

page-screen-top15mm

page-screen-bot15mm
(left margin on screen)

When page-screen-margin is true, then these environment variables determine the margins which are to be used for rendering on the screen.

page-show-hffalse
(show headers and footers on screen?)

This flag determines whether the page headers and footers should be visible on the screen. When set to true, it should be noticed that the headers and footers are not always correctly updated when editing. In the case when you suspect them to be wrong, refreshing the display by scrolling down and up should display the correct values.

Specifying the margins

The parameters for page margins are represented schematically at the left hand side in figure ?. One may either specify the paragraph width as a function of the left and right margins, or vice versa. The left and right margins may depend on whether the page number is odd or even.

page-width-marginfalse

page-height-marginfalse
(compute margins from main text dimensions?)

When page-width-margin is set to false, then the paragraph width par-width is determined automatically from the page size and the left and right margins. When set to true, the left and right margins are determined as a function of the page size, the paragraph width, page-odd-shift and page-even-shift. For compatability with TeX/LaTeX, it is also possible to set page-width-margin to tex, in which case the horizontal margins are determined from page-odd, page-even and par-width. The page-height-margin variable plays a similar role for the vertical margins.

page-widthauto

page-heightauto
(page width)

By default, the width and height of a page are automatically determined from the page type. When page-type is set to user, then the user may manually specify the page size using page-width and page-height.

page-oddauto

page-evenauto
(left margin)

If page-width-margin is set to false, then page-odd and page-even specify the left margins for odd and even pages. If page-width-margin is true, then these values are computed as a function of the page size, the paragraph width, page-odd-shift and page-even-shift. When page-odd and page-even are set to auto, then a nice default left margin is determined as a function of the specified page type.

page-rightauto
(right margin)

If page-width-margin is set to false, then page-right specifies the right margin for odd pages. The right margin for even pages is given by the formula

If page-width-margin is true or when page-right is set to auto, then the right margin is determined in a similar way as the left margin.

page-odd-shift0mm

page-even-shift0mm
(margin shifts)

If page-width-margin is set to true, then the left margins for odd and even pages are determined from the page size, paragraph width and the margin shifts using the formulas

The right margin is always taken to be such that the paragraph width and the left and right margins sum up to the page width.

Figure 1. Schematic representation of the layout of pages. On the left hand side, the parameters , , and respectively correspond to the left, right, top and bottom margins, and corresponds to the paragraph width. On the right hand side, , , and correspond to the header, footer, footnote and marginal note separations, to the width of marginal notes, and to the length of the footnote bar.

Page decorations

page-odd-header

page-odd-footer

page-even-header

page-even-footer
(header for odd pages)

These environment variables contain the header and footer texts for odd and even pages.

page-head-sep8mm

page-foot-sep8mm
(separation between headers/fotters and text)

These parameters determine the space between the main text and page headers and footers. They correspond to the and distances at the right hand side of figure ?.

page-fnote-sep1.0fn
(space between footnotes and text)

The separation between the main text and footnotes, i.e. the distance in figure ?.

page-fnote-barlen7.5fn
(length of footnote bars)

The length of the foornote bar.

page-float-sep1.5fn
(separation between floats and text)

The separation between the main text and floating objects.

page-mnote-sep5mm
(separation between marginal notes and text)

The separation between marginal notes and the main text (not implemented yet).

page-mnote-width15mm
(width of marginal notes)

The width of marginal notes (not implemented yet).

6.Table layout

The environment variables for tables can be subdivided in variables (prefixed by table-) which apply to the whole table and those (prefixed by cell-) which apply to individual cells. Whereas usual environment variables are set with assign and with, the tabular environment variables are rather set with the tformat primitive. This makes it possible to apply certain settings to any rectangular subtable of the entire table and in particular to rows or columns. For more details, see the documentation of the twith and cwith primitives.

Layout of the table as a whole

table-width

table-height
(hint for table dimensions)

These parameters indicate a hint for the dimensions of the table. The table-hmode and table-vmode variables determine how to take into account these settings.

table-hmode

table-vmode
(determination of table dimensions)

These parameters specify how to determine the dimensions of the table. At the moment, the values of table-hmode and table-vmode are actually ignored and table-width and table-height are interpreted as the minimal width and height of the table.

table-halignl

table-valignf
(alignment inside text)

These parameters determine how the table should be aligned in the surrounding text. Possible values for table-halign are l (left), c (center) and r (right), and possible values for table-valign are t (top), f (centered at fraction bar height), c (center) and b (bottom).

In addition to the above values, the alignment can take place with respect to the baselines of particular cells. Such values for table-halign are L (align w.r.t. the left column), C (align w.r.t. the middle column), R (align w.r.t. the right column) and O (align w.r.t. the priviledged origin column table-col-origin). Similarly, table-halign may take the additional values T (align w.r.t. the top row), C (align w.r.t. the middle row), B (align w.r.t. the bottom row) and O (align w.r.t. the priviledged origin row table-row-origin).

table-row-origin0

table-col-origin0
(priviledged cell)

Table coordinates of an priviledged “origin cell” which may be used for aligning the table in the surrounding text (see above).

table-lsep0fn

table-rsep0fn

table-bsep0fn

table-tsep0fn
(padding around table)

Padding around the table (in addition to the padding of individual cells).

table-lborder0ln

table-rborder0ln

table-bborder0ln

table-tborder0ln
(border around table)

Border width for the table (in addition to borders of the individual cells).

table-hyphenn
(allow for hyphenation?)

A flag which specifies whether page breaks may occur at the middle of rows in the table. When table-hyphen is set to y, then such page breaks may only occur when

  1. The table is not surrounded by other markup in the same paragraph.

  2. The rows whether the page break occurs has no borders.

An example of a tabular environment which allows for page breaks is eqnarray*.

table-min-rows

table-min-cols

table-max-rows

table-max-cols
(constraints on the table's size)

It is possible to specify a minimal and maximal numbers of rows or columns for the table. Such settings constraint the behaviour of the editor for operations which may modify the size of the table (like the insertion and deletion of rows and columns). This is particularly useful for tabular macros. For instance, table-min-columns and table-max-columns are both set to for the eqnarray* environment.

Layout of the individual cells

cell-background
(background color)

A background color for the cell.

cell-width

cell-height
(hint for cell dimensions)

Hints for the width and the height of the cell. The real width and height also depend on the modes cell-hmode and cell-vmode, possible filling (see cell-hpart and cell-vpart below), and, of course, on the dimensions of other cells in the same row or column.

cell-hpart

cell-vpart
(fill part of unused space)

When the sum of the widths of all columns in a table is smaller than the width of the table itself, then it should be specified what should be done with the unused space. The cell-hpart parameter specifies a part in the unusued space which will be taken by a particular cell. The horizontal part taken by a column is the maximum of the horizontal parts of its composing cells. Now let the so determined part for each column (). Then the extra horizontal space which will be distributed to this column is . A similar computation determines the extra vertical space which is distributed to each row.

cell-hmodeexact

cell-vmodeexact
(determination of cell dimensions)

These parameters specify how to determine the width and the height of the cell. If cell-hmode is exact, then the width is given by cell-width. If cell-hmode is min or max, then the width is the minimul resp. maximum of cell-width and the width of the content. The height is determined similarly.

cell-halignl

cell-valignB
(cell alignment)

These parameters determine the horizontal and vertical alignment of the cell. Possible values of cell-halign are l (left), c (center), r (right), . (decimal dot), , (decimal comma) and R (vertical baseline). Possible values of cell-valign are t (top), c (center), b (bottom) and B (baseline).

cell-lsep0fn

cell-rsep0fn

cell-bsep0fn

cell-tsep0fn
(cell padding)

The amount of padding around the cell (at the left, right, bottom and top).

cell-lborder0ln

cell-rborder0ln

cell-bborder0ln

cell-tborder0ln
(cell borders)

The borders of the cell (at the left, right, bottom and top). The displayed border between cells and at positions and is the maximum of the borders between the right border of and the left border of . Similarly, the displayed border between cells and is the maximum of the bottom border of and the top border of .

cell-vcorrecta
(vertical correction of text)

As described above, the dimensions and the alignment of a cell may depend on the dimensions of its content. When cells contain text boxes, the vertical bounding boxes of such text may vary as a function of the text (the letter “k” resp. “y” ascends resp. descends further than “x”). Such differences sometimes leads to unwanted, non-uniform results. The vertical cell correction allows for a more uniform treatment of text of the same font, by descending and/or ascending the bounding boxes to a level which only depends on the font. Possible values for cell-vcorrect are n (no vertical correction), b (vertical correction of the bottom), t (vertical correction of the top), a (vertical correction of bottom and the top).

cell-hyphenn
(allow for hyphenation inside cells)

By default, the cells contain inline content which is not hyphenated. By selecting TableSpecial cell propertiesHyphenationMulti-paragraph, the cell contents becomes multi-paragraph. In that case, cell-hyphen determines how this content is hyphenated. Possible values are n (disable line breaking) and b, c and t (enable line breaking and align at the bottom, center resp. top line).

cell-row-span1

cell-col-span1
(span of a cell)

Certain cells in a table are allowed to span over other cells at their right or below them. The cell-row-span and cell-col-span specify the row span and column span of the cell.

cell-decoration
(decorating table for cell)

This environment variable may contain a decorating table for the cell. Such a decoration enlarges the table with extra columns and cells. The tmarker primitive determines the location of the original decorated cell and its surroundings in the enlarged table are filled up with the decorations. Cell decorations are not really used at present and may disappear in future versions of TeXmacs.

cell-orientationportrait
(orientation of cell)

Other orientations for cells than portrait have not yet been implemented.

cell-row-nr1

cell-col-nr1
(current cell position)

In the future, these environment variables should contain the current cell position during the typesetting process.

7.Editing source trees

The different rendering styles for source trees are described in more detail in the section about the global presentation of source trees. The corresponding environment variables are briefly described here.

src-styleangular
(rendering style for source tags)

The principal rendering style for source trees as specified in DocumentSourceStyle. Possible values are angular, scheme, functional and latex.

src-specialnormal
(how to render special tags)

How to render special tags like concat, document, compound, etc., as specified in DocumentSourceSpecial. Possible values are raw, format, normal and maximal.

src-compactnormal
(compactication level)

How compact should tags be rendered, as specified in DocumentSourceCompactification. Possible values are none, inline, normal, inline tags and all.

src-closecompact
(closing style for long tags)

The rendering style of closing tags as specified in DocumentSourceClosing style. Possible values are repeat, long, compact and minimal.

8.Miscellaneous environment variables

The following miscellaneous environment variables are mainly intended for internal use:

save-auxtrue
(save auxiliary content)

This flag specifies whether auxiliary content has to be saved along with the document.

sfactor5
(shrinking factor)

The shrinking factor which is used for rendering.

par-no-firstfalse
(disable first indentation for next paragraph?)

This flag disables first indentation for the next paragraph.

cell-format
(current cell format)

This variable us used during the typsetting of tables in order to store the with-settings which apply to the current cell.

atom-decorations

line-decorations

page-decorations

xoff-decorations

yoff-decorations
(auxiliary variables for decorations)

These environment variables store auxiliary information during the typsetting of decorations.