GNU TeXmacsUser manualReferenceAboutEnglishยทDeutsch
Paragraph layout
par-mode\(:=\)justify
(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 1. The supported modes for alignment.

par-flexibility\(:=\)1000
(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 2. Difference between a large and small flexibility (on the left and right hand sides respectively).

par-hyphen\(:=\)professional
(quality of hyphenation)

This parameter controls the quality of the hyphenation algorithm. Possible values are normal and professional (the default). The professional hyphenation algorithm uses a global algorithm on the entire paragraph, whereas the normal one uses a faster first-fit algorithm. Any value other than normal selects the professional 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 3. 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-min-penalty\(:=\)0
(minimal page break penalty)

A minimal penalty which is applied to the page breaks between the successive lines of a paragraph. Increasing this value discourages page breaks inside paragraphs.

par-kerning-reduce\(:=\)auto

par-kerning-stretch\(:=\)auto
(reduced and extra kerning)

When justifying lines, TeXmacs may slightly reduce or stretch the spacing between characters, in addition to the spacing between words. These variables determine the maximal relative amounts of such reductions and extensions. Possible values are auto (a default which depends on the average number of characters per line), a number (the relative amount itself), or none (any other non-numeric value disables the feature). The par-kerning-stretch variable also accepts the value tolerant, which allows for more stretching than auto.

par-contraction\(:=\)auto

par-expansion\(:=\)auto
(glyph contraction and expansion)

When justifying lines, TeXmacs may also slightly contract or expand the glyphs themselves. These variables specify the maximal relative contraction and expansion. The allowed values are the same as for par-kerning-reduce and par-kerning-stretch (auto, a number, or a non-numeric value such as none for no contraction resp. expansion); the par-expansion variable also accepts tolerant.

par-kerning-margin\(:=\)false
(marginal kerning)

When set to true, certain characters, like punctuation, are allowed to protrude slightly into the margins, which gives the margins a visually straighter appearance (this technique is also known as protrusion).

par-spacing\(:=\)plain
(spacing of CJK punctuation)

This variable controls the spacing around punctuation in Chinese, Japanese and Korean text. The possible values are plain, quanjiao, banjiao, hangmobanjiao and kaiming. Some language-specific packages set this variable to kaiming.

par-width\(:=\)auto
(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. When par-width is set explicitly and par-columns is larger than one, the width of each column is derived from it (taking into account par-columns-sep).

par-left\(:=\)0cm

par-right\(:=\)0cm
(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-first\(:=\)1.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 4. Two classical ways to indicate the starts of new paragraphs.

par-sep\(:=\)0.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 using 1fn for par-sep, one may for instance produce documents with a double interline space:

A double interline space corresponds to par-sep\(:=\)1fn. 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-sep\(:=\)0.025fns
(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 \(0\) allows the page breaker to correctly stretch pages which contain a very long textual paragraph. Indeed, if par-line-sep vanishes, then the height of a textual paragraph is of the form \(a + bn\), where \(a\) and \(b\) are constants and \(n\) is the number of lines. There is no reason why the usable height of a page should be of this form. The default value 0.025fns is zero, but may be stretched up to 0.025fn.

par-par-sep\(:=\)0.5fns
(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 fns 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-sep\(:=\)0.5fn

par-ver-sep\(:=\)0.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 descends more than usual like \(\frac{1}{x + 1}\) at the end of a line and an expression like \(\mathrm{e}^{\mathrm{e}^x}\) 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 \(\frac{1}{x + 1}\) and an exceptionally high expression at the wrong place, like the expression \(\mathrm{e}^{\mathrm{e}^x}\) here, the boxes are separated by par-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 shoving 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 line followed by a centered equation.

par-fnote-sep\(:=\)0.2fn
(minimal space between different footnotes)

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

par-columns\(:=\)1
(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-sep\(:=\)2fn
(distance between columns)

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

par-swell\(:=\)0ex
(extra padding around large lines)

When positive, lines containing exceptionally high or deep content (like large formulas) receive additional vertical padding of at most par-swell. The amount of padding increases progressively when the content exceeds the thresholds given by math-top-swell-start resp. math-bot-swell-start, and reaches its maximum at math-top-swell-end resp. math-bot-swell-end.

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