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.
Specify the size of a page when printing out. Most standard
formats are available in
The orientation of pages can be either portrait or landscape.
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
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 os 123, one may redefine
<assign|page-the-page|<macro|<plus|page-nr|122>>>
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.
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 1 allows spaces to be stretched to their minimal and maximal values. A page flexibility of 0 prevents spaces to be stretched. For other values of page-flexibility the behaviour is linear.
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.
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.
This environment variable, which is initialized using
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
In automatic mode, this environement variable contains the width of the screen.
In automatic mode, this environement variable contains the height of the screen.
This flag specifies whether the screen margins are manually specified by the user, or whether they are the same as on paper.
page-screen-left≔5mm
page-screen-right≔5mm
page-screen-top≔15mm
When page-screen-margin is true, then these environment variables determine the margins which are to be used for rendering on the 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.
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-margin≔false
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-width≔auto
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-odd≔auto
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.
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-shift≔0mm
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
page-even | = |
|
||
page-odd | = |
|
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.
These environment variables contain the header and footer texts for odd and even pages.
page-head-sep≔8mm
These parameters determine the space between the main text and page headers and footers. They correspond to the h and f distances at the right hand side of figure ?.
The separation between the main text and footnotes, i.e. the distance d in figure ?.
The length of the foornote bar.
The separation between the main text and floating objects.
The separation between marginal notes and the main text (not implemented yet).
The width of marginal notes (not implemented yet).