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