Customizing the general layout |
The general layout of a document is mainly modified by setting the appropriate environment variables for page layout and paragraph layout. For instance, by including the following lines in your style file, you can set the page size to letter and the left and right margins to 2in:
<document|<assign|page-type|letter>|<assign|page-odd|2in>|<assign|page-even|2in>|<assign|page-right|2in>>
It should be noticed that the environment variables for page layout are quite different in TeXmacs and TeX/LaTeX. In order to make it easier to adapt LaTeX style files to TeXmacs, we have therefore provided the std-latex package, which emulates the environment variables from TeX/LaTeX. Typically, this allows you determine the global layout by lines like
<document|<assign|tex-odd-side-margin|<macro|20pt>>|<assign|tex-even-side-margin|<macro|20pt>>|<assign|tex-text-width|<macro|33pc>>>
We notice that macros which return lengths are considered as lengths themselves. In the case of the TeX/LaTeX emulation package, we actually require all lengths to be macros.
The page headers and footers are usually not determined by global
environment variables or macros, since they may change when a new
chapter or section is started. Instead, TeXmacs provides the call-back
macros
<
assign
|
header-primary
|
<
macro
|
title
|
nr
|
type
|
<
assign
|
page-even-header
|
<
quasiquote
|
<\wide-std-underlined|
<\concat|
<page-the-page>
<htab|5mm>
<unquote|title>