Debian Codegraph @

contrib/mom/momdoc/rectoverso.html

raw
1 <?xml version="1.0" encoding="utf-8"?>
2 <!--
3 This file is part of groff, the GNU roff type-setting system.
4
5 Copyright (C) 2004-2020 Free Software Foundation, Inc.
6 Written by Peter Schaffter ([email protected]).
7
8 Permission is granted to copy, distribute and/or modify this document
9 under the terms of the GNU Free Documentation License, Version 1.3 or
10 any later version published by the Free Software Foundation; with no
11 Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
12 Texts.
13
14 A copy of the Free Documentation License is included as a file called
15 FDL in the main directory of the groff source package.
16 -->
17
18 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
19 <html xmlns="http://www.w3.org/1999/xhtml">
20
21 <head>
22 <meta http-equiv="content-type" content="text/html;charset=utf-8"/>
23 <title>Mom -- Recto/verso printing, collating</title>
24 <link rel="stylesheet" type="text/css" href="stylesheet.css" />
25 </head>
26
27 <body style="background-color: #f5faff;">
28
29 <!-- ==================================================================== -->
30
31 <div id="top" class="page">
32
33 <!-- Navigation links -->
34 <table style="width: 100%;">
35 <tr>
36 <td><a href="toc.html">Back to Table of Contents</a></td>
37 <td style="text-align: right;"><a href="cover.html#top">Next: Cover pages</a></td>
38 </tr>
39 </table>
40
41 <h1 class="docs">Recto/verso printing, collating</h1>
42
43 <div style="width: 50%; margin: auto;">
44 <ul class="no-enumerator" style="margin-left: -1em;">
45 <li><a href="#rectoverso-intro">Introduction to recto/verso printing</a>
46 <ul style="margin-left: -.5em; list-style-type: disc;">
47 <li><a href="#rectoverso-list">Macro list</a></li>
48 </ul></li>
49 <li><a href="#collate-intro">Introduction to collating</a>
50 <ul style="margin-left: -.5em; list-style-type: disc;">
51 <li><a href="#collate">The COLLATE macro</a></li>
52 </ul></li>
53 </ul>
54 </div>
55
56 <div class="rule-medium"><hr/></div>
57
58 <h2 id="rectoverso-intro" class="docs">Introduction to recto/verso printing</h2>
59
60 <p>
61 Recto/verso printing allows you to set up a mom document in such
62 a way that it can be printed on both sides of a printer sheet and
63 subsequently bound.
64 </p>
65
66 <p>
67 With recto/verso, mom automatically takes control of the following
68 aspects of alternating page layout:
69 </p>
70 <ul style="margin-top: -.5em; margin-left: -.5em; margin-bottom: -.5em;">
71 <li>switching left and right margins (if they&#8217;re not equal)</li>
72 <li>switching the left and right parts of the default 3-part
73 <a href="definitions.html#header">headers</a>
74 or
75 <a href="definitions.html#footer">footers</a>
76 (see the
77 <a href="headfootpage.html#description-general">General description of headers</a>)
78 </li>
79 <li>switching
80 <a href="headfootpage.html#hdrftr-recto">HEADER_RECTO</a>
81 and
82 <a href="headfootpage.html#hdrftr-recto">HEADER_VERSO</a>
83 if user-defined, single string recto/verso headers
84 or footers are used in place of the default 3-part
85 headers or footers
86 </li>
87 <li>switching the page number position (if page numbers are not centred)</li>
88 </ul>
89 <br/>
90
91 <div class="macro-list-container">
92 <h3 id="rectoverso-list" class="macro-list">Recto/verso macros</h3>
93 <ul class="macro-list">
94 <li><a href="#recto-verso">RECTO_VERSO</a></li>
95 <li><a href="#force-recto">FORCE_RECTO</a></li>
96 <li><a href="#switch-hdrftr">SWITCH_HEADERS (also FOOTERS)</a>
97 &ndash; switch starting position of the header parts (left and right)
98 </li>
99 </ul>
100 </div>
101
102 <!-- -RECTO_VERSO- -->
103
104 <div id="recto-verso" class="box-macro-args">
105 Macro: <b>RECTO_VERSO</b>
106 </div>
107
108 <p>
109 If you want mom to set up alternating pages for recto/verso
110 printing, simply invoke RECTO_VERSO, with no argument, anywhere in
111 your document (most likely before
112 <a href="docprocessing.html#start">START</a>).
113 </p>
114
115 <div class="box-tip">
116 <p class="tip-top">
117 <span class="note">Note:</span>
118 Recto/verso always switches the left and right parts of
119 <a href="definitions.html#header">headers</a>
120 or
121 <a href="definitions.html#footer">footers</a>
122 on odd/even pages. However, it only switches the left and right
123 margins if the margins aren&#8217;t equal. Consequently, it is
124 your responsibility to set the appropriate differing left and right
125 margins with
126 <a href="typesetting.html#l-margin">L_MARGIN</a>
127 and
128 <a href="typesetting.html#r-margin">R_MARGIN</a>
129 (prior to
130 <a href="docprocessing.html#start">START</a>)
131 or with
132 <a href="docprocessing.html#doc-left-margin">DOC_LEFT_MARGIN</a>
133 and
134 <a href="docprocessing.html#doc-right-margin">DOC_RIGHT_MARGIN</a>
135 (before or after START).
136 </p>
137
138 <p class="tip-bottom">
139 Equally, recto/verso only switches the page number position if page
140 numbers aren&#8217;t centred, which means you have to set the page
141 number position with
142 <a href="headfootpage.html#pagenum-pos">PAGENUM_POS</a>
143 (before or after START).
144 </p>
145 </div>
146
147 <!-- -FORCE_RECTO- -->
148
149 <div id="force-recto" class="box-macro-args" style="margin-top: 1em;">
150 Macro: <b>FORCE_RECTO</b>
151 </div>
152
153 <p>
154 It is a common convention with two-sided printing to ensure that
155 cover pages, title pages, and chapters or major sections of a document
156 always begin on the recto side of a page. This sometimes
157 necessitates inserting a blank page before the start of a new
158 chapter or major section.
159 </p>
160
161 <p>
162 If you would like mom to take care of this for you automatically,
163 simply invoke <kbd>FORCE_RECTO</kbd> before the first
164 <a href="docprocessing.html#start">START</a>
165 of the document.
166 </p>
167
168 <!-- -SWITCH_HDRFTR- -->
169
170 <div id="switch-hdrftr" class="box-macro-args" style="margin-top: 1em;">
171 Macro: <b>SWITCH_HEADERS</b>
172 </div>
173
174 <p>
175 SWITCH_HEADERS switches the location of the header left string
176 (by default, the author) and the header right string (by default,
177 the document title). If you don&#8217;t like mom&#8217;s default
178 placement of author and title, use SWITCH_HEADERS to reverse it.
179 </p>
180
181 <p>
182 SWITCH_HEADERS can also be useful in conjunction with
183 <a href="#recto-verso">RECTO_VERSO</a>.
184 The assumption of RECTO_VERSO is that the first page of a document
185 (i.e. recto/odd) represents the norm for header-left and header-right,
186 meaning that the second (and all subsequent verso/even) pages of the
187 document will reverse the order of header-left and header-right.
188 </p>
189
190 <p>
191 If mom&#8217;s behaviour in this matter is not what you want, simply
192 invoke SWITCH_HEADERS on the first page of your recto/verso document
193 to reverse her default treatment of header parts. The remainder of
194 your document (with respect to headers) will come out as you want.
195 </p>
196
197 <div class="rule-medium"><hr/></div>
198
199 <!-- ===================================================================== -->
200
201 <h2 id="collate-intro" class="docs">Introduction to collating</h2>
202
203 <p>
204 Many people wisely keep chapters of a long work in separate
205 files, previewing or printing them as needed during the draft
206 phase. However, when it comes to the final version, mom requires
207 a single, collated file in order to keep track of page numbering
208 and recto/verso administration, generating tables of contents and
209 endnotes, ensuring that
210 <a href="definitions.html#docheader">docheaders</a>
211 get printed correctly, and a host of other details.
212 </p>
213
214 <p>
215 The COLLATE macro, which can be used with any
216 <a href="docprocessing.html#doctype">DOCTYPE</a>
217 except <kbd>LETTER</kbd>, lets you glue mom-formatted input files
218 together. You need only concatenate chapters into a single file
219 (most likely with <kbd>cat(1)</kbd>), and put
220 <kbd>.COLLATE</kbd> at the end of each concatenated chapter.
221 Assuming all the files begin with the required
222 <a href="docprocessing.html#reference-macros">reference macros</a>
223 (metadata), style parameters, and
224 <a href="docprocessing.html#start">START</a>,
225 each chapter will begin on a fresh page and behave as expected.
226 </p>
227
228 <p>
229 Even if you work with monolithic, multi-chapter files, every
230 chapter and its associated metadata plus <kbd>.START</kbd>
231 still needs to be preceded by <kbd>.COLLATE</kbd>.
232 </p>
233
234 <div class="box-tip">
235 <p class="tip">
236 <span class="note">Note:</span>
237 COLLATE assumes you are collating documents/files with similar
238 type-style parameters hence there&#8217;s no need for PRINTSTYLE
239 to appear after COLLATE, although if you&#8217;re collating
240 documents that were created as separate files, chances are the
241 PRINTSTYLE&#8217;s already there.
242 </p>
243 </div>
244
245 <div class="box-tip">
246 <p id="caution" class="tip">
247 <b>Two words of caution:</b>
248 </p>
249 <ol style="margin-top: -1.25em; padding-bottom: .5em;">
250 <li>Do not collate documents of differing
251 PRINTSTYLES (i.e., don&#8217;t try to
252 collate a <kbd>TYPESET</kbd> document and <kbd>TYPEWRITE</kbd>
253 document).
254 </li>
255 <li>Use <kbd>.DOC_FAMILY</kbd> instead of
256 <kbd>.FAMILY</kbd> if, for some reason, you want to
257 change the family of all the document elements after
258 <kbd>.COLLATE</kbd>. <kbd>.FAMILY</kbd>, by itself, will
259 change the family of paragraph text only.
260 </li>
261 </ol>
262 </div>
263
264 <!-- -COLLATE- -->
265
266 <div class="macro-id-overline">
267 <h3 id="collate" class="macro-id">collate</h3>
268 </div>
269
270 <div class="box-macro-args">
271 Macro: <b>COLLATE</b>
272 </div>
273
274 <p>
275 The most basic (and most likely) collating situation looks like
276 this:
277 <br/>
278 <span class="pre-in-pp">
279 .COLLATE
280 .CHAPTER 17
281 .START
282 </span>
283 A slightly more complex version of the same thing, for chapters
284 that require their own titles, looks like this:
285 <br/>
286 <span class="pre-in-pp">
287 .COLLATE
288 .CHAPTER_TITLE "Geek Fatigue: Symptoms and Causes"
289 .START
290 </span>
291 </p>
292
293 <div class="box-tip" style="margin-top: -1em">
294 <p class="tip">
295 <span class="tip">Tip:</span>
296 If the last line of text before <kbd>.COLLATE</kbd>
297 falls too close to the bottom margin, or if the line is followed
298 by a macro likely to cause a linebreak (e.g. <kbd>.LIST OFF</kbd> or
299 <kbd>.IQ</kbd>), mom may output a superfluous blank page before
300 the start of the following document.
301 </p>
302
303 <p class="tip-bottom" style="margin-top: -1em">
304 In order to avoid this, insert
305 <a href="docprocessing.html#EL"><kbd>.EL</kbd></a>
306 after the last line of text, before <kbd>.COLLATE</kbd> and/or any
307 concluding macros. For example,
308 <br/>
309 <span class="pre-in-pp">
310 some concluding text.\c
311 .EL
312 .COLLATE
313 </span>
314 or
315 <br/>
316 <span class="pre-in-pp">
317 some concluding text.\c
318 .EL
319 .LIST OFF
320 .COLLATE
321 </span>
322 </p>
323 </div>
324
325 <div class="box-tip">
326 <p class="tip">
327 <span class="note">Note:</span>
328 See the
329 <a href="#caution">two words of caution</a>,
330 above.
331 </p>
332 </div>
333
334 <div class="rule-long"><hr/></div>
335
336 <!-- Navigation links -->
337 <table style="width: 100%; margin-top: 12px;">
338 <tr>
339 <td style="width: 33%;"><a href="toc.html">Back to Table of Contents</a></td>
340 <td style="width: 33%; text-align: center;"><a href="#top">Top</a></td>
341 <td style="width: 33%; text-align: right;"><a href="cover.html">Next: Cover pages</a></td>
342 </tr>
343 </table>
344
345 </div>
346
347 <div class="bottom-spacer"><br/></div>
348
349 </body>
350 </html>