Import of mom
[s-roff.git] / contrib / mom / momdoc / rectoverso.html
blobe45537f86e7e770c3b74947a18ccb0b0d2fcb665
1 <html>
2 <head>
3 <meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
4 <title>Mom -- Document Processing, Recto/verso printing</title>
5 </head>
6 <body bgcolor="#dfdfdf">
8 <!====================================================================>
10 <a href="cover.html#TOP">Next</a>&nbsp;&nbsp;
11 <a href="headfootpage.html#TOP">Prev</a>&nbsp;&nbsp;
12 <a href="toc.html">Back to Table of Contents</a>
14 <a name="TOP"></a>
15 <a name="RECTOVERSO">
16 <h2 align="center"><u>RECTO/VERSO PRINTING and COLLATING</u></h2>
17 </a>
19 <a name="INDEX_RECTOVERSO">
20 <h3><u>Recto/verso and collating</u></h3>
21 </a>
23 <ul>
24 <li><a href="#RECTOVERSO_INTRO">Introduction to recto/verso</a>
25 <ul>
26 <li><a href="#RECTOVERSO_LIST">Macro list</a>
27 </ul>
28 <li><a href="#COLLATE_INTRO">Introduction to collating</a>
29 <ul>
30 <li><a href="#COLLATE">The COLLATE macro</a>
31 </ul>
32 </ul>
34 <a name="RECTOVERSO_INTRO">
35 <h2><u>Introduction to recto/verso</u></h2>
36 </a>
38 Recto/verso printing allows you to set up a <strong>mom</strong>
39 document in such a way that it can be printed on both sides of a
40 printer sheet and subsequently bound.
41 <p>
42 With recto/verso, <strong>mom</strong> automatically takes control
43 of two aspects of alternating page layout in a document: the left and right
44 margins (provided they're not equal), and the switching of the left
45 and right parts of
46 <a href="definitions.html#TERMS_HEADER">headers</a>
48 <a href="definitions.html#TERMS_FOOTER">footers</a>
49 (see the
50 <a href="headfootpage.html#DESCRIPTION_GENERAL">General description of headers</a>)
51 and page numbering (if page numbers are not centered).
52 <p>
53 It is beyond the scope of this documentation to cover the different
54 ways in which you can make your printer print on both sides of a sheet.
55 A simple but effective method for those of us with &quot;dumb&quot;
56 printers is to open the document (after it's been processed into
57 PostScript by groff -- see
58 <a href="using.html#USING_INVOKING">How to invoke groff with mom</a>)
59 in <strong>gv</strong> (ghostview),
60 click the &quot;odd pages&quot; icon, then click &quot;Print
61 Marked&quot;. After printing is complete, rearrange the sheets
62 appropriately, put them back in your printer, and have
63 <strong>gv</strong> print the &quot;even pages&quot;. If you prefer to
64 work from the command line, check out the man pages for
65 <strong>pstops</strong> and <strong>psbook</strong>. There are other
66 programs out there as well to help with two-sided printing.
67 <br>
70 <a name="RECTOVERSO_LIST">
71 <h3><u>Recto/verso macros list</u></h3>
72 </a>
74 <ul>
75 <li><a href="#RECTO_VERSO">RECTO_VERSO</a>
76 <li><a href="#SWITCH_HDRFTR">SWITCH_HEADERS (also FOOTERS)</a>
77 </ul>
79 <hr>
80 <!---RECTO_VERSO--->
82 <a name="RECTO_VERSO">
83 <h3><u>Recto/verso printing</u></h3>
84 </a>
85 <br>
86 Macro: <strong>RECTO_VERSO</strong>
88 <p>
89 If you want <strong>mom</strong> to set up alternating pages for
90 recto/verso printing, simply invoke <strong>RECTO_VERSO</strong>
91 with no argument.
92 <p>
93 <strong>NOTE:</strong>
94 <br>
95 Recto/verso always switches the left and right parts of
96 <a href="definitions.html#TERMS_HEADER">headers</a>
98 <a href="definitions.html#TERMS_FOOTER">footers</a>
99 on odd/even pages. However, it only switches the left and right
100 margins if the margins aren't equal. Consequently, it is your
101 responsibility to set the appropriate differing left and right
102 margins with
103 <a href="typesetting.html#L_MARGIN">L_MARGIN</a>
105 <a href="typesetting.html#R_MARGIN">R_MARGIN</a>
106 (prior to
107 <a href="docprocessing.html#START">START</a>)
108 or with
109 <a href="docprocessing.html#DOC_LEFT_MARGIN">DOC_LEFT_MARGIN</a>
111 <a href="docprocessing.html#DOC_RIGHT_MARGIN">DOC_RIGHT_MARGIN</a>
112 (before or after <strong>START</strong>).
114 Equally, recto/verso only switches the page number position if page
115 numbers aren't centered, which means you have to set the page
116 number position with
117 <a href="headfootpage.html#PAGENUM_POS">PAGENUM_POS</a>
118 (before or after <strong>START</strong>).
119 <br>
121 <!---SWITCH_HDRFTR--->
123 <hr width="66%" align="left">
124 <a name="SWITCH_HDRFTR">
125 <h3><u>Switch header left part/right part</u></h3>
126 </a>
127 <br>
128 Macro: <strong>SWITCH_HEADERS</strong>
131 <strong>SWITCH_HEADERS</strong> switches the location of the
132 header left string (by default, the author) and the header right
133 string (by default, the document title). If you don't like
134 <strong>mom</strong>'s default placement of author and title, use
135 <strong>SWITCH_HEADERS</strong> to reverse it.
137 <strong>SWITCH_HEADERS</strong> can also be useful in conjuction
138 with
139 <a href="#RECTO_VERSO">RECTO_VERSO</a>.
140 The assumption of <strong>RECTO_VERSO</strong> is that the first
141 page of a document (recto/odd) represents the norm for header-left
142 and header-right, meaning that the second (and all subsequent even)
143 page(s) of the document exchange header-left and header-right.
145 If <strong>mom</strong>'s behaviour in this matter is not what
146 you want, simply invoke <strong>SWITCH_HEADERS</strong> on the
147 first page of your recto/verso document to reverse her default
148 treatment of header parts. The remainder of your document (with
149 respect to headers) will come out as you want.
151 <strong>NOTE:</strong> Replace <strong>_HEADERS</strong>, above,
152 with <strong>_FOOTERS</strong> if your document uses footers.
153 <br>
154 <hr>
156 <!=====================================================================>
158 <a name="COLLATE_INTRO">
159 <h2><u>Introduction to collating</u></h2>
160 </a>
162 The macro <strong>COLLATE</strong> lets you join documents together.
163 Primarily, it's a convenience for printing long documents that
164 comprise several chapters, although it could be used for any
165 document type (except <strong>LETTER</strong>).
167 Personally, I prefer to keep chapters in separate files and print
168 them out as needed. However, that means keeping track of the correct
169 starting page number for each chapter, a problem circumvented by the
170 use of <strong>COLLATE</strong>.
172 When collating chapters, you need only put <code>.COLLATE</code>
173 at the end of a chapter, follow it with any
174 <a href="docprocessing.html#REFERENCE_MACROS">reference macros</a>
175 needed for the new chapter, e.g.
176 <a href="docprocessing.html#CHAPTER">CHAPTER</a>
178 <a href="docprocessing.html#CHAPTER_STRING">CHAPTER_STRING</a>
179 (have a look at the
180 <a href="#CHAPTER_NOTE">Special Note on CHAPTER</a>)
181 make any pertinent style changes to the document (unlikely, but
182 possible), and re-invoke the
183 <a href="docprocessing.html#START">START</a>
184 macro. Your new chapter will begin on a fresh page and behave
185 as expected.
187 <strong>COLLATE</strong> assumes you are collating documents/files
188 with similar type-style parameters hence there's no need for
189 <strong>PRINTSTYLE</strong> to appear after <strong>COLLATE</strong>,
190 although if you're collating documents that were created as separate
191 files, chances are the <strong>PRINTSTYLE</strong>'s already there.
193 <a name="CAUTION"></a>
194 <strong><u>Two words of caution:</u></strong>
195 <ol>
196 <li>do not collate documents of differing
197 <strong>PRINTSTYLES</strong> (i.e. don't try to
198 collate a TYPESET document and TYPEWRITE document --
199 why would you want to do that anyway?)
200 <li>use <strong>DOC_FAMILY</strong> instead of
201 <strong>FAMILY</strong> if, for some reason, you want
202 to change the family of all the document elements after
203 <strong>COLLATE</strong>. <strong>FAMILY</strong>, by
204 itself, will change the family of paragraph text only.
205 </ol>
206 <br>
208 <!---COLLATE--->
210 <hr width="66%" align="left">
211 <a name="COLLATE">
212 <h3><u>Collate document files</u></h3>
213 </a>
214 <br>
215 Macro: <strong>COLLATE</strong>
218 The most basic (and most likely) collating situation looks like
219 this:
221 <pre>
222 .COLLATE
223 .CHAPTER 17
224 .START
225 </pre>
227 A slightly more complex version of the same thing, for chapters
228 that require their own titles, looks like this:
230 <pre>
231 .COLLATE
232 .CHAPTER_STRING "Geek Fatigue: Symptoms and Causes"
233 .HEADER_CENTER "Geek Fatigue: Symptoms and Causes"
234 .START
235 </pre>
237 <strong>NOTE:</strong> See the
238 <a href="#CAUTION">two words of caution</a>,
239 above.
240 <br>
242 <hr>
243 <a href="cover.html#TOP">Next</a>&nbsp;&nbsp;
244 <a href="headfootpage.html#TOP">Prev</a>&nbsp;&nbsp;
245 <a href="#TOP">Top</a>&nbsp;&nbsp;
246 <a href="toc.html">Back to Table of Contents</a>
247 </body>
248 </html>