2013-02-26 00:51:46 +08:00
|
|
|
<TeXmacs|1.0.7.18>
|
2011-08-28 15:59:50 +08:00
|
|
|
|
|
|
|
<style|tmdoc>
|
|
|
|
|
|
|
|
<\body>
|
|
|
|
<tmdoc-title|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.
|
|
|
|
|
|
|
|
<paragraph*|Paper specific variables>
|
|
|
|
|
|
|
|
<\explain>
|
|
|
|
<var-val|page-type|a4><explain-synopsis|the size of pages>
|
|
|
|
<|explain>
|
|
|
|
Specify the size of a page when printing out. Most standard formats are
|
|
|
|
available in <menu|Document|Page|Size>. By default, the paper size is the
|
|
|
|
one of your printer (the default printer settings may be changed in
|
|
|
|
<menu|Edit|Preferences|Printer>). When the <src-var|page-type> is set to
|
|
|
|
<verbatim|user>, then the page size is given by <src-var|page-width> and
|
|
|
|
<src-var|page-height>.
|
|
|
|
</explain>
|
|
|
|
|
|
|
|
<\explain>
|
|
|
|
<var-val|page-orientation|portrait><explain-synopsis|page orientation>
|
|
|
|
<|explain>
|
|
|
|
The orientation of pages can be either <verbatim|portrait> or
|
|
|
|
<verbatim|landscape>.
|
|
|
|
</explain>
|
|
|
|
|
|
|
|
<\explain>
|
|
|
|
<var-val|page-nr|0><explain-synopsis|current page number>
|
|
|
|
<|explain>
|
|
|
|
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
|
|
|
|
<markup|label> and <markup|page-ref> primitives. Nevertheless, the
|
|
|
|
<src-var|page-nr> variable can be used in the macros which render page
|
|
|
|
headers and footers.
|
|
|
|
</explain>
|
|
|
|
|
|
|
|
<\explain>
|
|
|
|
<src-var|page-the-page><explain-synopsis|display the page number>
|
|
|
|
<|explain>
|
|
|
|
This environment variable really contains the macro which is used for
|
|
|
|
rendering the page-number. By default, it renders <src-var|page-nr>. The
|
|
|
|
macro takes no arguments. In order to simulate a document whose first
|
2013-02-26 00:51:46 +08:00
|
|
|
page number is <math|123>, one may redefine
|
2011-08-28 15:59:50 +08:00
|
|
|
|
|
|
|
<\tm-fragment>
|
|
|
|
<inactive*|<assign|page-the-page|<macro|<plus|<value|page-nr>|122>>>>
|
|
|
|
</tm-fragment>
|
|
|
|
</explain>
|
|
|
|
|
|
|
|
<\explain>
|
|
|
|
<var-val|page-breaking|optimal><explain-synopsis|page breaking algorithm>
|
|
|
|
<|explain>
|
|
|
|
This parameter specifies the page breaking algorithm. The default
|
|
|
|
<verbatim|optimal> algorithm takes into account the global document and
|
|
|
|
tries hard to avoid bad page breaks. The alternative <verbatim|sloppy>
|
|
|
|
algorithm uses a fast first-fit algorithm, but produces bad page break
|
|
|
|
with a higher probability. The <verbatim|medium> quality algorithm is the
|
|
|
|
same as the <verbatim|optimal> algorithm, except for two column content.
|
|
|
|
</explain>
|
|
|
|
|
|
|
|
<\explain>
|
|
|
|
<var-val|page-flexibility|1.0><explain-synopsis|flexibility for
|
|
|
|
stretching>
|
|
|
|
<|explain>
|
|
|
|
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
|
2013-02-26 00:51:46 +08:00
|
|
|
flexibility of <math|1> allows spaces to be stretched to their minimal
|
|
|
|
and maximal values. A page flexibility of <math|0> prevents spaces to be
|
|
|
|
stretched. For other values of <src-var|page-flexibility> the behaviour
|
|
|
|
is linear.
|
2011-08-28 15:59:50 +08:00
|
|
|
</explain>
|
|
|
|
|
|
|
|
<\explain>
|
|
|
|
<var-val|page-shrink|1fn><explain-synopsis|allowed amount of page
|
|
|
|
shrinking>
|
|
|
|
<|explain>
|
|
|
|
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.
|
|
|
|
</explain>
|
|
|
|
|
|
|
|
<\explain>
|
|
|
|
<var-val|page-extend|0fn><explain-synopsis|allowed amount of page
|
|
|
|
extensions>
|
|
|
|
<|explain>
|
|
|
|
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.
|
|
|
|
</explain>
|
|
|
|
|
|
|
|
<paragraph*|Screen specific variables>
|
|
|
|
|
|
|
|
<\explain>
|
|
|
|
<var-val|page-medium|papyrus><explain-synopsis|the page medium>
|
|
|
|
<|explain>
|
|
|
|
This environment variable, which is initialized using
|
|
|
|
<menu|Document|Page|Type>, specifies how pages are rendered on the
|
|
|
|
screen. The following values are available:
|
|
|
|
|
|
|
|
<\description>
|
|
|
|
<item*|<verbatim|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
|
2013-10-27 05:20:27 +08:00
|
|
|
<menu|Document|Page|Screen margins|Show header and footer> and
|
|
|
|
<menu|Document|Page|Screen margins|Margins as on paper>.
|
2011-08-28 15:59:50 +08:00
|
|
|
|
|
|
|
<item*|<verbatim|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.
|
|
|
|
|
|
|
|
<item*|<verbatim|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.
|
|
|
|
</description>
|
|
|
|
</explain>
|
|
|
|
|
|
|
|
<\explain>
|
|
|
|
<var-val|page-screen-width|10cm><explain-synopsis|width of the rendering
|
|
|
|
window>
|
|
|
|
<|explain>
|
|
|
|
In <verbatim|automatic> mode, this environement variable contains the
|
|
|
|
width of the screen.
|
|
|
|
</explain>
|
|
|
|
|
|
|
|
<\explain>
|
|
|
|
<var-val|page-screen-height|10cm><explain-synopsis|height of the
|
|
|
|
rendering window>
|
|
|
|
<|explain>
|
|
|
|
In <verbatim|automatic> mode, this environement variable contains the
|
|
|
|
height of the screen.
|
|
|
|
</explain>
|
|
|
|
|
|
|
|
<\explain>
|
|
|
|
<var-val|page-screen-margin|true><explain-synopsis|special margins for
|
|
|
|
screen editing?>
|
|
|
|
<|explain>
|
|
|
|
This flag specifies whether the screen margins are manually specified by
|
|
|
|
the user, or whether they are the same as on paper.
|
|
|
|
</explain>
|
|
|
|
|
|
|
|
<\explain>
|
|
|
|
<var-val|page-screen-left|5mm>
|
|
|
|
|
|
|
|
<var-val|page-screen-right|5mm>
|
|
|
|
|
|
|
|
<var-val|page-screen-top|15mm>
|
|
|
|
|
|
|
|
<var-val|page-screen-bot|15mm><explain-synopsis|left margin on screen>
|
|
|
|
<|explain>
|
|
|
|
When <src-var|page-screen-margin> is <verbatim|true>, then these
|
|
|
|
environment variables determine the margins which are to be used for
|
|
|
|
rendering on the screen.
|
|
|
|
</explain>
|
|
|
|
|
|
|
|
<\explain>
|
|
|
|
<var-val|page-show-hf|false><explain-synopsis|show headers and footers on
|
|
|
|
screen?>
|
|
|
|
<|explain>
|
|
|
|
This flag determines whether the page headers and footers should be
|
|
|
|
visible on the screen. When set to <verbatim|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.
|
|
|
|
</explain>
|
|
|
|
|
|
|
|
<paragraph*|Specifying the margins>
|
|
|
|
|
|
|
|
The parameters for page margins are represented schematically at the left
|
|
|
|
hand side in figure <no-break><reference|tm-page-fig>. One may either
|
|
|
|
specify the paragraph width as a function of the left and right margins, or
|
|
|
|
<em|vice versa>. The left and right margins may depend on whether the page
|
|
|
|
number is odd or even.
|
|
|
|
|
|
|
|
<\explain>
|
|
|
|
<var-val|page-width-margin|false>
|
|
|
|
|
|
|
|
<var-val|page-height-margin|false><explain-synopsis|compute margins from
|
|
|
|
main text dimensions?>
|
|
|
|
<|explain>
|
|
|
|
When <src-var|page-width-margin> is set to <verbatim|false>, then the
|
|
|
|
paragraph width <src-var|par-width> is determined automatically from the
|
|
|
|
page size and the left and right margins. When set to <verbatim|true>,
|
|
|
|
the left and right margins are determined as a function of the page size,
|
|
|
|
the paragraph width, <src-var|page-odd-shift> and
|
|
|
|
<src-var|page-even-shift>. For compatability with <TeX>/<LaTeX>, it is
|
|
|
|
also possible to set <src-var|page-width-margin> to <verbatim|tex>, in
|
|
|
|
which case the horizontal margins are determined from <src-var|page-odd>,
|
|
|
|
<src-var|page-even> and <src-var|par-width>. The
|
|
|
|
<src-var|page-height-margin> variable plays a similar role for the
|
|
|
|
vertical margins.
|
|
|
|
</explain>
|
|
|
|
|
|
|
|
<\explain>
|
|
|
|
<var-val|page-width|auto>
|
|
|
|
|
|
|
|
<var-val|page-height|auto><explain-synopsis|page width>
|
|
|
|
<|explain>
|
|
|
|
By default, the width and height of a page are automatically determined
|
|
|
|
from the page type. When <src-var|page-type> is set to <verbatim|user>,
|
|
|
|
then the user may manually specify the page size using
|
|
|
|
<src-var|page-width> and <src-var|page-height>.
|
|
|
|
</explain>
|
|
|
|
|
|
|
|
<\explain>
|
|
|
|
<var-val|page-odd|auto>
|
|
|
|
|
|
|
|
<var-val|page-even|auto><explain-synopsis|left margin>
|
|
|
|
<|explain>
|
|
|
|
If <src-var|page-width-margin> is set to <verbatim|false>, then
|
|
|
|
<src-var|page-odd> and <src-var|page-even> specify the left margins for
|
|
|
|
odd and even pages. If <src-var|page-width-margin> is <verbatim|true>,
|
|
|
|
then these values are computed as a function of the page size, the
|
|
|
|
paragraph width, <src-var|page-odd-shift> and <src-var|page-even-shift>.
|
|
|
|
When <src-var|page-odd> and <src-var|page-even> are set to
|
|
|
|
<verbatim|auto>, then a nice default left margin is determined as a
|
|
|
|
function of the specified page type.
|
|
|
|
</explain>
|
|
|
|
|
|
|
|
<\explain>
|
|
|
|
<var-val|page-right|auto><explain-synopsis|right margin>
|
|
|
|
<|explain>
|
|
|
|
If <src-var|page-width-margin> is set to <verbatim|false>, then
|
|
|
|
<src-var|page-right> specifies the right margin for odd pages. The right
|
|
|
|
margin for even pages is given by the formula
|
|
|
|
|
|
|
|
<\equation*>
|
2013-02-26 00:51:46 +08:00
|
|
|
<text|<src-var|page-right>>+<text|<src-var|page-even>>-<text|<src-var|page-odd>>
|
2011-08-28 15:59:50 +08:00
|
|
|
</equation*>
|
|
|
|
|
|
|
|
If <src-var|page-width-margin> is <verbatim|true> or when
|
|
|
|
<src-var|page-right> is set to <verbatim|auto>, then the right margin is
|
|
|
|
determined in a similar way as the left margin.
|
|
|
|
</explain>
|
|
|
|
|
|
|
|
<\explain>
|
|
|
|
<var-val|page-odd-shift|0mm>
|
|
|
|
|
|
|
|
<var-val|page-even-shift|0mm><explain-synopsis|margin shifts>
|
|
|
|
<|explain>
|
|
|
|
If <src-var|page-width-margin> is set to <verbatim|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
|
|
|
|
|
|
|
|
<\eqnarray*>
|
2013-02-26 00:51:46 +08:00
|
|
|
<tformat|<table|<row|<cell|<text|<src-var|page-even>>>|<cell|=>|<cell|<frac|<text|<src-var|page-width>>-<text|<src-var|par-width>>|2>+<text|<src-var|page-odd-shift>>>>|<row|<cell|<text|<src-var|page-odd>>>|<cell|=>|<cell|<frac|<text|<src-var|page-width>>-<text|<src-var|par-width>>|2>+<text|<src-var|page-even-shift>>>>>>
|
2011-08-28 15:59:50 +08:00
|
|
|
</eqnarray*>
|
|
|
|
|
|
|
|
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.
|
|
|
|
</explain>
|
|
|
|
|
|
|
|
<\quote-env>
|
2013-02-26 00:51:46 +08:00
|
|
|
<\big-figure|<image|<tuple|<#252150532D41646F62652D322E3020455053462D322E300A252543726561746F723A206476697073286B2920352E383620436F707972696768742031393939205261646963616C2045796520536F6674776172650A25255469746C653A2066327073706F73742E6476690A2525426F756E64696E67426F783A203133332032313320363630203538340A2525456E64436F6D6D656E74730A254456495053576562506167653A20287777772E7261646963616C6579652E636F6D290A254456495053436F6D6D616E644C696E653A206476697073202D45202D6F2066327073706F73742E70732066327073706F73740A254456495053506172616D65746572733A206470693D3630302C20636F6D707265737365640A254456495053536F757263653A2020546558206F757470757420323030342E30372E31393A313734300A2525426567696E50726F635365743A20746578632E70726F0A25210A2F5465584469637420333030206469637420646566205465584469637420626567696E2F4E7B6465667D6465662F427B62696E64206465667D4E2F537B657863687D4E2F587B530A4E7D422F417B6475707D422F54527B7472616E736C6174657D4E2F69736C732066616C7365204E2F7673697A65203131203732206D756C204E2F6873697A6520382E352037320A6D756C204E2F6C616E64706C757339307B66616C73657D6465662F40726967696E7B69736C737B5B30206C616E64706C757339307B31202D317D7B2D3120317D6966656C736520300A3020305D636F6E6361747D6966203732205265736F6C7574696F6E2064697620373220565265736F6C7574696F6E20646976206E6567207363616C652069736C737B0A6C616E64706C757339307B565265736F6C7574696F6E20373220646976207673697A65206D756C203020657863687D7B5265736F6C7574696F6E202D373220646976206873697A650A6D756C20307D6966656C73652054527D6966205265736F6C7574696F6E20565265736F6C7574696F6E207673697A65202D373220646976203120616464206D756C2054525B0A6D61747269782063757272656E746D61747269787B41204120726F756E64207375622061627320302E3030303031206C747B726F756E647D69667D666F72616C6C20726F756E640A6578636820726F756E6420657863685D7365746D61747269787D4E2F406C616E6473636170657B2F69736C732074727565204E7D422F406D616E75616C666565647B0A737461747573646963742F6D616E75616C666565642074727565207075747D422F40636F706965737B2F23636F7069657320587D422F464D61745B3120302030202D31203020305D0A4E2F4642425B302030203020305D4E2F6E6E2030204E2F49456E2030204E2F6374722030204E2F64662D7461696C7B2F6E6E20382064696374204E206E6E20626567696E0A2F466F6E74547970652033204E2F466F6E744D617472697820666E747278204E2F466F6E7442426F7820464242204E20737472696E672F6261736520582061727261790A2F4269744D61707320582F4275696C64436861727B436861724275696C6465727D4E2F456E636F64696E672049456E204E20656E6420417B2F666F6F20736574666F6E747D320A617272617920636F707920637678204E206C6F61642030206E6E207075742F6374722030204E5B7D422F73662030204E2F64667B2F73662031204E2F666E74727820464D6174204E0A64662D7461696C7D422F6466737B6469762F736620582F666E7472785B736620302030207366206E6567203020305D4E2064662D7461696C7D422F457B706F70206E6E20410A646566696E65666F6E7420736574666F6E747D422F43777B43642041206C656E677468203520737562206765747D422F43687B43642041206C656E677468203420737562206765740A7D422F43787B3132382043642041206C656E67746820332073756220676574207375627D422F43797B43642041206C656E6774682032207375622067657420313237207375627D0A422F4364787B43642041206C656E677468203120737562206765747D422F43697B4364204120747970652F737472696E6774797065206E657B637472206765742F637472206374720A3120616464204E7D69667D422F69642030204E2F72772030204E2F72632030204E2F67702030204E2F63702030204E2F472030204E2F436861724275696C6465727B7361766520330A3120726F6C6C205320412F6261736520676574203220696E6465782067657420532F4269744D617073206765742053206765742F4364205820706F702F6374722030204E204364780A30204378204379204368207375622043782043772061646420437920736574636163686564657669636520437720436820747275655B3120302030202D31202D2E312043780A737562204379202E31207375625D2F6964204369204E2F72772043772037206164642038206964697620737472696E67204E2F72632030204E2F67702030204E2F63702030204E7B0A72632030206E657B72632031207375622F726320582072777D7B477D6966656C73657D696D6167656D61736B20726573746F72657D422F477B7B6964206770206765742F67700A6770203120616464204E2041203138206D6F642053203138206964697620706C20532067657420657865637D6C6F6F707D422F6164767B6370206164642F637020587D420A2F6368677B7277206370206964206770203420696E64657820676574696E74657276616C20707574696E7465727661
|
2011-08-28 15:59:50 +08:00
|
|
|
<label|tm-page-fig>Schematic representation of the layout of pages. On
|
2013-02-26 00:51:46 +08:00
|
|
|
the left hand side, the parameters <math|l>, <math|r>, <math|t> and
|
|
|
|
<math|b> respectively correspond to the left, right, top and bottom
|
|
|
|
margins, and <math|w> corresponds to the paragraph width. On the right
|
|
|
|
hand side, <math|h>, <math|f>, <math|d> and <math|m> correspond to the
|
|
|
|
header, footer, footnote and marginal note separations, <math|w> to the
|
|
|
|
width of marginal notes, and <math|l> to the length of the footnote
|
|
|
|
bar.
|
2011-08-28 15:59:50 +08:00
|
|
|
</big-figure>
|
|
|
|
</quote-env>
|
|
|
|
|
|
|
|
<paragraph*|Page decorations>
|
|
|
|
|
|
|
|
<\explain>
|
|
|
|
<label|header-footer-env><var-val|page-odd-header|>
|
|
|
|
|
|
|
|
<var-val|page-odd-footer|>
|
|
|
|
|
|
|
|
<var-val|page-even-header|>
|
|
|
|
|
|
|
|
<var-val|page-even-footer|><explain-synopsis|header for odd pages>
|
|
|
|
<|explain>
|
|
|
|
These environment variables contain the header and footer texts for odd
|
|
|
|
and even pages.
|
|
|
|
</explain>
|
|
|
|
|
|
|
|
<\explain>
|
|
|
|
<var-val|page-head-sep|8mm>
|
|
|
|
|
2014-11-07 05:26:23 +08:00
|
|
|
<var-val|page-foot-sep|8mm><explain-synopsis|separation between
|
2011-08-28 15:59:50 +08:00
|
|
|
headers/fotters and text>
|
|
|
|
<|explain>
|
|
|
|
These parameters determine the space between the main text and page
|
2013-02-26 00:51:46 +08:00
|
|
|
headers and footers. They correspond to the <math|h> and <math|f>
|
|
|
|
distances at the right hand side of figure <reference|tm-page-fig>.
|
2011-08-28 15:59:50 +08:00
|
|
|
</explain>
|
|
|
|
|
|
|
|
<\explain>
|
|
|
|
<var-val|page-fnote-sep|1.0fn><explain-synopsis|space between footnotes
|
|
|
|
and text>
|
|
|
|
<|explain>
|
|
|
|
The separation between the main text and footnotes, <abbr|i.e.> the
|
2013-02-26 00:51:46 +08:00
|
|
|
distance <math|d> in figure <reference|tm-page-fig>.
|
2011-08-28 15:59:50 +08:00
|
|
|
</explain>
|
|
|
|
|
|
|
|
<\explain>
|
|
|
|
<var-val|page-fnote-barlen|7.5fn><explain-synopsis|length of footnote
|
|
|
|
bars>
|
|
|
|
<|explain>
|
|
|
|
The length of the foornote bar.
|
|
|
|
</explain>
|
|
|
|
|
|
|
|
<\explain>
|
|
|
|
<var-val|page-float-sep|1.5fn><explain-synopsis|separation between floats
|
|
|
|
and text>
|
|
|
|
<|explain>
|
|
|
|
The separation between the main text and floating objects.
|
|
|
|
</explain>
|
|
|
|
|
|
|
|
<\explain>
|
|
|
|
<var-val|page-mnote-sep|5mm><explain-synopsis|separation between marginal
|
|
|
|
notes and text>
|
|
|
|
<|explain>
|
|
|
|
The separation between marginal notes and the main text (not implemented
|
|
|
|
yet).
|
|
|
|
</explain>
|
|
|
|
|
|
|
|
<\explain>
|
|
|
|
<var-val|page-mnote-width|15mm><explain-synopsis|width of marginal notes>
|
|
|
|
<|explain>
|
|
|
|
The width of marginal notes (not implemented yet).
|
|
|
|
</explain>
|
|
|
|
|
|
|
|
<tmdoc-copyright|2004|Joris van der Hoeven>
|
|
|
|
|
|
|
|
<tmdoc-license|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".>
|
2013-02-26 00:51:46 +08:00
|
|
|
</body>
|
|
|
|
|
|
|
|
<initial|<\collection>
|
2014-11-07 05:26:23 +08:00
|
|
|
</collection>>
|