Changes

Jump to navigation Jump to search
666 bytes added ,  07:28, 4 March 2005
changed erronous info about not being able to change layouts for first, even, and odd pages; changed erronous info about cutspace and backspace; changed \setuplayout to \definelayout
Page Layout
 
=Overview=
\part{}
\definepapersize[secondPart][width=8.5in, height=10in11in]
\setuppapersize[secondPart]
Text for second part.
% define layout for first part
\setuplayoutdefinelayout[
topspace=.5in,
bottomspace=.5in,
cutspace=1in,
backspace=1in,
header=2in,
The "topspace" value refers to the space at the very top of a
page, and is roughly equivalent to the "margin-top" attribute in
FO. The "bottompace" value refers to the space at the very bottomof a page, and is roughly equivalent to the "margin-bottom"attribute in FO. The "backspace " value indicates the space in the left of the page and is roughly equivalent to "margin-left"attribute in FO. The "cutspace" value indicates the space in theleft of the page and is roughly equivalent to "margin-left" attribute in FO.No text will occur in either one of these regions.
ConTeXt has no equivalent to the FO attributes "margin-right" and"margin-bottom". Rather, other values such as "height" and"leftmargin" determine how much space is left over for thesevalues. If you pages are not doublesided (not part of a book),thethe "backspace" value will determine how much space occursbetweenbetween the left edge of the paper and any text. It alwaystouches the "leftmargin" region. If you have a doublesidedlayout, the "backspace" value will flip from right to left sideof your pages, but will always be in the gutter, or the spine ofa book that is bound.
The values ConTeXt "header", "footer" "leftmargin" and
the "width" and "height" values.
=Changing Layouts for Odd and Even Pages='''I ahve a table to put in here, as soon as I figure out how to do so with wiki'''
FO lets you create different pages sizes and layouts for the
first page, and for odd and even pages. So far as I can tell,ConTeXt does not allow you this flexibility. The best you can Here is how to dothesame in ConTeXt is mirror pages--create pages in which the odd and evenpages swap their values. Put this command at the top of thedoucment==First Page== In order to define different pysical dimmensions for your firstpage, use "1" as your first option:
<texcode>
 
\definelayout[1][
topspace=.5in, % the space at the very top of the page
backspace=2in, % the space in the gutter
header=2in, % the space for headers
footer=2in, % the space for footers
leftmargin=1in, % the space for margin notes
rightmargin=1.5in, % the space for right margin notes
width=3in, % the width of the body text
height=7in % the height of the body text
]
 
 
 
</texcode>
 
==Odd and Even Pages==
 
If you simply want to mirror odd and even pages, put this command
at the top of your document:
 
<texcode>
 
\setuppagenumbering[alternative=doublesided, state=stop]
</texcode>
'''''Note: this section is inaccurateFor more flexibility, you can add a position argument to your<tt>\definelayout</tt> command.''''' Try this minimal example to get started: 
<texcode>
 
 
\definelayout[odd]
[backspace=1in, cutspace=1.25in, width=middle, height=9in]
\definelayout[even]
[backspace=1in, cutspace=1.25in, width=middle, height=8in]\setuplayout % needed to add this or the first page wouldn't format
\starttext
\showframe
\dorecurse{12}{\input dawkins \par}
\stoptext
 
 
 
</texcode>
document.
[[pagelayout1.texpage setup1]]
=Summary=
* We use the <tt>\part</tt> command to change page formatting, or put another way, to start a new run of pages.* Unlike in FO, which defines page formatting at the start of a document, in ConTeXt we place page formatting commands are placed in the vicinity of <tt>\part</tt>.* We use <tt>\definelayout</tt> to set both the physical properties of a page as well as its layout.
* We place the <tt>\setuphead</tt> command before the <tt>\part</tt> command. We place all other commands after <tt>\part</tt>.
* The <tt>\setuphead</tt> command allows us to control the first page of headers and foooters for a new part.* So far as I know, ConTeXt has no mechanisim to create different margins for the first and odd and even pages. The best we can do is mirror odd and even run of pages.
* We use the <tt>\vbox</tt> and <tt>\hfill</tt> commands to format text within a header or footer.
Anonymous user

Navigation menu