Changes

Jump to navigation Jump to search
340 bytes added ,  21:40, 20 November 2013
m
no edit summary
<pre>
 
<fo:simple-page-master
master-name="first"
</fo:simple-page-master>
 
</pre>
<texcode>
 
\enableregime[utf]
\setuppagenumbering[state=stop, way=bytext]
\starttext
 
</texcode>
<texcode>
 
\part{}
 
</texcode>
<texcode>
 
\definepapersize[firstPart][width=8.5in, height=11in]
\setuppapersize[firstPart]  
</texcode>
<texcode>
 
 
Some text for our first part.
 
</texcode>
<texcode>
 
 
\part{}
\definepapersize[secondPart][width=8.5in, height=11in]
\setuppapersize[secondPart]
Text for second part.
\stoptext
 
</texcode>
<texcode>
 
 
\part{}
\definepapersize[firstdPart][width=8.5in, height=11in]
\setuppapersize[firstPart]
% define layout for first part
\definelayout[
topspace=.5in, bottomspace=.5in, cutspace=1in, backspace=1in, header=2in, footer=2in, rightmargin=1in, leftmargin=1in, width=5in, height=10in, ]
Text for first part.
 
 
</texcode>
the actual body height would be:
4 - 2 -2 = 0 (!)
You would have no room for your body text at all. If you meant to
inches (2 + 2 + 4 = 8).
<table borderstyle="2border:1px solid #DDDDDD" >
<caption>
FO ConTeXt conversions for physical page layouts </caption>
<trstyle="background-color:#DDDDDD"> <tdth> FO </tdth> <tdth> ConTeXt </tdth
</tr>
<tr>
 
<td>
 <pre><fo:simple-page-master margin-top="x"></pre> </td> 
<td>
 <tttexcode>\definelayout</tt> <tt>topspace=x</tttexcode> </td> 
</tr>
<trstyle="background-color:#EEEEEE"
<td>
 <pre><fo:simple-page-master margin-bottom="x"></pre> </td> 
<td>
 <tttexcode>\definelayout</tt> <tt>bottomspace=x</tttexcode> </td> 
</tr>
<tr>
 
<td>
 <pre><simple-page-master margin-left="x"></pre> </td> 
<td>
 <tttexcode>\definelayout</tt> <tt>backspace=x</tttexcode> </td> 
</tr>
<trstyle="background-color:#EEEEEE"
<td>
 <pre><simple-page-master margin-right="x"></pre> </td> 
<td>
 <tttexcode>\definelayout</tt> <tt>cutspace=x</tttexcode> </td> 
</tr>
<tr>
 
<td>
 <pre><fo:region-body margin-top="x"/></pre> </td> 
<td>
 <tttexcode>\definelayout</tt> <tt>headerdistance=x</tttexcode> </td> 
</tr>
<trstyle="background-color:#EEEEEE"
<td>
 <pre><fo:region-before extent="x"/></pre> </td> 
<td>
 <tttexcode>\definelayout</tt> <tt>header=x</tttexcode> </td> 
</tr>
<tr>
 
<td>
 <pre><fo:region-after extent="x"/></pre> </td> 
<td>
 <tttexcode>\definelayout</tt> <tt>footer=x</tttexcode> </td> 
</tr>
<trstyle="background-color:#EEEEEE"
<td>
 <pre><fo:region-start extent="x"/></pre> </td> 
<td>
 <tttexcode>\definelayout</tt> <tt>left-margin=x</tttexcode> </td> 
</tr>
<tr>
 
<td>
 <pre><fo:region-after extent="x"/></pre> </td> 
<td>
 <tttexcode>\definelayout</tt> <tt>right-margin=x</tttexcode> </td> 
</tr>
<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>
<texcode>
 
 
\setuppagenumbering[alternative=doublesided, state=stop]
 
</texcode>
<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
\dorecurse{12}{\input dawkins \par}
\stoptext
 
 
 
</texcode>
<pre>
 
 
<fo:static-content
flow-name="even-page">
Title
</fo:static-content>
 
</pre>
text wherever we want them with the commands
<tt>\setupheadertexts</tt> and <tt>\setupfootertexts</tt>. These
commands takes 4 arguments, the first for the left margin on evenodd
pages, the second for the right margin on odd pages, the third
for the right left margin on odd even pages, and the fourth for the leftrightmargin on odd even pages. For simplicity's sake, let's leave the
middle two options empty, so we get headers and footers on the
even and odd pages, naturally alligned with the left margin,
<texcode>
 
\setupheadertexts[left(even) header][] [][right(odd) header]
\setupfootertexts[left(even) footer][] [][right(odd) footer]
 
</texcode>
<texcode>
 
 
\setupheader[state=high]
\setupfooter[state=high]
 
</texcode>
<texcode>
 
\definetext[partStart1][header][Part Header]
\setuphead[part][header=partStart1]
\part{}
 
</texcode>
<texcode>
 
 
% force the odd header to the right and the even header to the left
% (where it would appear, anyway).
% forces the word to be centered
\setupheadertexts[left \hfill middle \hfill right][] [][right header]
 
</texcode>
* Find out if there is a corresponding value of footerdistnace in FO.
 
[[Category:XML]]
[[Category:Text elements]]
18

edits

Navigation menu