1 <?xml version="1.0" encoding="utf-8"?>
3 This file is part of groff, the GNU roff type-setting system.
5 Copyright (C) 2004-2014 Free Software Foundation, Inc.
6 Written by Peter Schaffter (peter@schaffter.ca).
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 the
11 Invariant Sections being this comment section, with no Front-Cover
12 Texts, and with no Back-Cover Texts.
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.
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">
22 <meta http-equiv="content-type" content="text/html;charset=utf-8"/>
23 <title>Mom -- Document processing, creating cover pages</title>
24 <link rel="stylesheet" type="text/css" href="stylesheet.css" />
27 <body style="background-color: #f5faff;">
29 <!-- ==================================================================== -->
31 <div id="top" class="page">
33 <!-- Navigation links -->
34 <table style="width: 100%;">
36 <td><a href="toc.html">Back to Table of Contents</a></td>
37 <td style="text-align: right;"><a href="tables-of-contents.html#top">Next: Tables of contents</a></td>
41 <h1 class="docs">Creating cover pages</h1>
43 <div style="width: 63%; margin: auto;">
44 <ul class="no-enumerator">
45 <li><a href="#cover-intro">Introduction to cover pages</a>
46 <ul style="margin-left: -.5em; list-style-type: disc;">
47 <li><a href="#important-note">Important note</a></li>
48 <li><a href="#desc">Description of cover pages</a></li>
49 <li><a href="#pagination">Headers/footers/pagination and cover pages</a></li>
50 <li><a href="#design">Designing your own cover pages</a></li>
52 <li><a href="#index-covers">Cover and document cover macros</a>
53 <ul style="margin-left: -.5em; list-style-type: disc;">
54 <li><a href="#cover">COVER / DOC_COVER</a>
55 <ul style="margin-left: -.5em; list-style-type: circle;">
56 <li><a href="#required-arg">The required argument</a></li>
57 <li><a href="#chapter">How the CHAPTER argument and friends work</a></li>
58 <li><a href="#optional-args">The optional arguments</a></li>
59 <li><a href="#doctype">What the DOCTYPE argument means</a></li>
60 <li><a href="#blankpage">What the BLANKPAGE argument means</a></li>
63 <li><a href="#on-off">Enabling/disabling automatic generation of cover pages</a></li>
64 <li><a href="#cover-control">Control macros for covers and doc covers</a></li>
68 <div class="rule-medium"><hr/></div>
70 <h2 id="cover-intro" class="docs">Introduction to cover pages</h2>
73 Though identical in treatment, mom provides two kinds of cover
74 pages: document cover pages (”doc covers”), and section
75 cover pages (which I shall refer to simply as cover pages).
79 A doc cover is what you’d most likely use at the start of a
80 collated document, where you might want the name of the complete
81 document, the author(s) and the copyright line to appear. Another
82 place you might use a doc cover is for a novel, where you want the
83 title of the novel, not the chapter title or chapter number, as the
88 A cover is what you’d use for pages that separate sections
89 of a collated document, ie title pages. A cover page (but not a
90 doc cover) in a collated document could, for example, simply read:
95 In non-collated documents (say, an essay) you can use either a cover
96 or doc cover to generate the cover sheet.
100 In addition, nothing prevents you from generating both a doc cover
101 and a cover for every document in a collated document. Or you can
102 selectively disable the automatic generation of either doc covers or
103 covers in a collated document on-the-fly.
106 <div id="important-note" class="box-important">
108 <span class="important">Important note:</span>
109 Automatic generation of covers or doc covers after the first one(s)
110 only takes place if you are working with collated documents. Mom
111 provides no mechanism for saying ”print a section cover
112 here even though I'm still working on the same (non-collated)
117 <h3 id="desc" class="docs">Description of cover pages</h3>
120 By default, mom typesets covers and doc covers identically to
121 <a href="definitions.html#docheader">docheaders</a>
123 <a href="docprocessing.html#docheader-control">How to change the look of docheaders</a>
124 for a description of what a docheader looks like). The only
127 <ul style="margin-top: -.5em; margin-bottom: -.5em;">
128 <li>the position on the page where the information is output</li>
129 <li>the (optional) addition of copyright and miscellaneous information</li>
130 <li>there’s no running text underneath</li>
134 You tell mom what you want to appear on cover pages through the
135 arguments you pass to
136 <a href="#cover">COVER</a>
138 <a href="#cover">DOC_COVER</a>.
139 Provided you have already given mom the appropriate reference macros
141 <a href="docprocessing.html#title">TITLE</a>
143 <a href="docprocessing.html#author">AUTHOR</a>),
144 she will output covers and doc covers identically to how she
145 would output docheaders containing the same information.
149 By default, mom starts covers and doc covers one-third of the way
150 down the page. This can be changed through the use of the control
151 macros COVER_ADVANCE / DOC_COVER_ADVANCE.
155 If you request copyright information (and have already given mom the
157 <a href="docprocessing.html#copyright">COPYRIGHT</a>),
158 she sets it, by default, in a smaller
159 <a href="definitions.html#ps">point size</a>
160 in the bottom right hand corner of the cover or doc cover. The
161 position, as well as all of the standard typesetting parameters, can be
162 altered via control macros.
166 Similarly, if you request miscellaneous information (and have
167 already given mom the reference macro,
168 <a href="docprocessing.html#misc">MISC</a>),
169 she sets it, by default, in a smaller point size in the bottom left
170 hand corner of the cover or doc cover. As with the copyright, the
171 position and type specs can be altered via control macros.
174 <h3 id="pagination" class="docs">Headers/footers/pagination and cover pages</h3>
178 <a href="definitions.html#header">headers</a>
180 <a href="definitions.html#footer">footers</a>
181 on cover pages. Neither does she set any page numbers. From
182 the point of view of pagination, covers and doc covers are by
183 default considered ”null” pages. If you wish them to
184 be included in the pagination scheme (even though no page numbers
185 appear), you must tell mom that’s what you want with the
186 macros DOC_COVERS_COUNT_PAGES and/or COVERS_COUNT_PAGES.
189 <h3 id="design" class="docs">Designing your own cover pages</h3>
192 Finally, if you want to design your own cover page(s), you can
193 always typeset them (using the
194 <a href="typesetting.html#macros-typesetting">typesetting macros</a>),
196 <a href="typesetting.html#newpage"><kbd>.NEWPAGE</kbd></a>,
197 set up your document (see
198 <a href="docprocessing.html#docprocessing-tut">Tutorial – Setting up a mom document</a>),
200 <a href="docprocessing.html#start"><kbd>.START</kbd></a>.
201 The cover page, and any typesetting commands on it, will have no
202 effect on mom’s processing of the document after you invoke
203 <kbd><a href="docprocessing.html#START">.START</a></kbd>.
206 <div class="macro-list-container">
207 <h3 id="index-covers" class="macro-list">Cover and document cover macros</h3>
208 <ul class="macro-list">
209 <li><a href="#cover">COVER and DOC_COVER</a>
210 <ul style="margin-left: -.5em; list-style-type: disc;">
211 <li><a href="#required-and-optional-args">Required and optional arguments</a></li>
213 <li><a href="#on-off">Enabling/disabling automatic generation of cover pages</a>
214 <ul style="margin-left: -.5em; list-style-type: disc;">
215 <li><a href="#covers">COVERS</a></li>
216 <li><a href="#doc-covers">DOC_COVERS</a></li>
218 <li><a href="#cover-control">Control macros for covers and doc covers</a></li>
224 <div class="macro-id-overline">
225 <h3 id="cover" class="macro-id">COVER and DOC_COVER</h3>
228 <div class="box-macro-args">
229 Macro: <b>COVER</b> <kbd class="macro-args">(see required and optional arguments, below)</kbd>
232 <div id="doc-cover" class="box-macro-args" style="margin-top: 1em;">
233 Macro: <b>DOC_COVER</b> <kbd class="macro-args">(see required and optional arguments, below)</kbd>
236 <div id="required-and-optional-args" style="margin-top: 1em; padding-bottom: 3px; white-space: nowrap; overflow: auto;">
237 <b><a href="#required-arg">Required argument:</a></b> <kbd class="macro-args">TITLE | DOCTITLE | COVERTITLE | CHAPTER | CHAPTER_TITLE | CHAPTER+TITLE</kbd>
240 <div style="margin-top: .5em; padding-bottom: 3px; white-space: nowrap; overflow: auto;">
241 <b><a href="#optional-args">Optional arguments:</a></b> <kbd class="macro-args">[ SUBTITLE AUTHOR DOCTYPE COPYRIGHT MISC BLANKPAGE PDF_OUTLINE_LABEL <label> ]</kbd>
244 <div class="box-tip">
246 <span class="note">Note:</span>
247 These macros should be placed in the style sheet section of your
249 <a href="docprocessing.html#docprocessing-tut">Tutorial – Setting up a mom document</a>),
250 ie after PRINTSTYLE (and/or DOCTYPE and/or COPYSTYLE), but before
255 <p style="margin-top: -.25em;">
256 COVER and DOC_COVER behave identically. The reason mom provides
257 two macros for cover page generation is so that you can have two
258 different kinds of covers with different information on each.
262 Imagine, for a moment, you’ve written a document comprised of
263 three sections. When you
264 <a href="rectoverso.html#collate">COLLATE</a>
265 the document for output, you could use DOC_COVER to generate a cover
266 page that contained the name of the entire document, your (the
267 author’s) name, and perhaps the copyright date. Subsequently,
268 you could use COVER, after each <kbd>.COLLATE</kbd> but before each
269 <kbd><a href="docprocessing.html#start">.START</a></kbd>,
270 to generate a cover page (or cover ”sheet”, if you
271 prefer) containing just the name of the section.
274 <h4 id="required-arg" class="docs" style="margin-top: -.5em;">The required argument</h4>
277 Both COVER and DOC_COVER, whenever invoked, require a first
278 argument, as listed above. This first argument will become the
279 first bit of information mom prints on the cover or doc cover (ie
284 In order for the information to appear, you must, of course, have
285 given mom the appropriate
286 <a href="docprocessing.html#reference-macros">reference macro</a>.
287 A list of first arguments with their equivalent reference macros follows.
290 <dl style="margin-top: -.5em;">
291 <dt class="no-italic"><kbd>TITLE</kbd></dt>
293 – means the argument you gave to <a href="docprocessing.html#title">TITLE</a>
295 <dt class="no-italic"><kbd>DOCTITLE</kbd></dt>
297 – means the argument you gave to <a href="docprocessing.html#doc-title">DOCTITLE</a>
299 <dt class="no-italic"><kbd>COVERTITLE</kbd></dt>
301 – means the argument you gave to <a href="docprocessing.html#covertitle">COVERTITLE</a>
303 <a href="docprocessing.html#doc-covertitle">DOC_COVERTITLE</a>
305 <dt class="no-italic"><kbd>CHAPTER, CHAPTER_TITLE, CHAPTER+TITLE</kbd></dt>
307 – see below, <i>How the CHAPTER argument and friends work</i>
311 <h5 id="chapter" class="docs" style="margin-top: -.5em; text-transform: none;">How the CHAPTER argument and friends work</h5>
314 <span style="display: block; margin-bottom: -1.25em; font-weight: bold;">• CHAPTER</span>
316 The <kbd>CHAPTER</kbd> argument will print the
317 <a href="docprocessing.html#chapter-string">CHAPTER_STRING</a>
318 concatenated with the chapter number you gave to
319 <a href="docprocessing.html#chapter">CHAPTER</a>.
320 For example, assuming a vanilla setup for your chapter:
322 <span class="pre-in-pp" style="color: #64614a;">
324 .CHAPTER_TITLE "The Bonny Blue Yonder"
325 <span style="color: #941614;">.COVER CHAPTER</span> \"(or <span style="color: #941614;">.DOC_COVER CHAPTER</span>)
327 will print (and only print)
329 <span class="pre-in-pp">
334 <p style="margin-top: -1em;">
335 <span style="display: block; margin-bottom: -1.25em; font-weight: bold;">• CHAPTER_TITLE</span>
337 The <kbd>CHAPTER_TITLE</kbd> argument will print the chapter title
339 <a href="docprocessing.html#chapter-title">CHAPTER_TITLE</a>.
340 For example, assuming a vanilla setup for your chapter:
342 <span class="pre-in-pp" style="color: #64614a;">
344 .CHAPTER_TITLE "The Bonny Blue Yonder"
345 <span style="color: #941614;">.COVER CHAPTER_TITLE</span> \"(or <span style="color: #941614;">.DOC_COVER CHAPTER_TITLE</span>)
347 will print (and only print)
349 <span class="pre-in-pp">
350 The Bonny Blue Yonder
354 <p style="margin-top: -1em;">
355 <span style="display: block; margin-bottom: -1.25em; font-weight: bold;">• CHAPTER+TITLE</span>
357 The <kbd>CHAPTER+TITLE</kbd> argument will print both the
358 concatenated chapter string+number and the chapter title. For
359 example, assuming a vanilla setup for your chapter:
361 <span class="pre-in-pp" style="color: #64614a;">
363 .CHAPTER_TITLE "The Bonny Blue Yonder"
364 <span style="color: #941614;">.COVER CHAPTER+TITLE</span> \"(or <span style="color: #941614;">.DOC_COVER CHAPTER+TITLE</span>)
368 <span class="pre-in-pp">
370 The Bonny Blue Yonder
374 <h4 id="optional-args" class="docs" style="margin-top: -1em;">The optional arguments</h4>
377 The remainder of the arguments to COVER and
378 DOC_COVER are optional. They refer specifically to
379 the information you gave the
380 <a href="docprocessing.html#reference-macros">reference macros</a>
381 bearing the same name as the arguments. You may enter as many or as
382 few as you like, in any order.
385 <h5 id="doctype" class="docs" style="text-transform: none; margin-top: -.5em;">What the DOCTYPE argument means</h5>
388 When you pass COVER or DOC_COVER
389 the argument, <kbd>DOCTYPE</kbd>, it refers to the argument you gave
391 <a href="docprocessing.html#doctype">DOCTYPE</a> <kbd>NAMED</kbd>.
392 For example, if, in your
393 <a href="docprocessing.html#docstyle-macros">docstyle macros</a>
396 <span class="pre-in-pp">
397 .DOCTYPE NAMED "Abstract"
399 the argument, <kbd>DOCTYPE</kbd>, given to the COVER or DOC_COVER
400 macros, would mean that you wanted the word, Abstract, to appear on
401 the cover or doc cover underneath the title and/or author(s), just
403 <a href="docprocessing.html#docheader">docheader</a>.
406 <h5 id="blankpage" class="docs" style="text-transform: none; margin-top: -.5em;">What the BLANKPAGE argument means</h5>
409 If the final argument to DOC_COVER or COVER is <kbd>BLANKPAGE</kbd>,
410 mom will insert a blank page after the doc cover or cover. This is
411 particularly useful if you intend to print your document two-sided,
412 since, in two-sided printing, there may be instances where you do
413 not want text on the reverse side of cover or title pages.
417 If you enable DOC_COVERS_COUNT_PAGES and/or COVERS_COUNT_PAGES, the
418 blank page will be taken into account in the pagination scheme,
419 though no page number appears on it. Otherwise, blank pages are
420 invisible to mom's pagination.
423 <h5 id="pdf-label" class="docs" style="text-transform: none; margin-top: -.5em;">What the PDF_OUTLINE_LABEL argument means</h5>
426 By default, mom identifies doccovers in the outline panel of PDF
427 viewers with the prepended string, “Cover:”, and covers
428 with the string “Title Page:”. If you would like
429 to change the strings, pass the <kbd>PDF_OUTLINE_LABEL</kbd>
430 argument to COVER or DOCCOVER, along with the new string.
433 <!-- -ENABLING/DISABLING- -->
435 <div class="macro-id-overline">
436 <h3 id="on-off" class="macro-id">Enabling/disabling automatic generation of cover pages</h3>
439 <div id="covers" class="box-macro-args">
440 Macro: <b>COVERS</b> <kbd class="macro-args"><toggle></kbd>
443 <div id="doc-covers" class="box-macro-args" style="margin-top: 1em;">
444 Macro: <b>DOC_COVERS</b> <kbd class="macro-args"><toggle></kbd>
448 By default, if you give mom a
449 <a href="#cover">COVER</a>
451 <a href="#doc-cover">DOC_COVER</a>
452 directive, she will print the cover or doc cover. In a document
453 that contains sections, articles or chapters formerly treated as
454 ”one-off’s” but now being
455 <a href="rectoverso.html#collate-intro">collated</a>,
456 such behaviour may not be desirable.
460 Mom lets you selectively enable or disable the generation of covers
461 and/or doc covers with the toggle macros, COVERS and DOC_COVERS.
462 Because they’re toggle macros, simply invoking them by
463 themselves enables automatic cover or doc cover generation, while
464 invoking them with any argument at all (<kbd>OFF, QUIT, X</kbd>,
465 etc) disables cover or doc cover generation.
468 <div class="box-tip">
470 <span class="note">Note:</span>
471 You must place these macros prior to any instance of
472 <a href="docprocessing.html#start">START</a>.
473 Since they’re ”on” by default, there’s no
474 need to use them if you want covers. However, if you don’t,
475 especially in the kind of scenario described above, the best place
476 to put them (most likely with an <kbd>OFF, NO, X</kbd>, etc. argument),
477 is immediately after the first invocation of START. By doing so,
478 you ensure they meet the requirement of preceding all subsequent
483 <div class="rule-short"><hr/></div>
485 <h2 id="cover-control" class="macro-group">Control macros for covers and doc covers</h2>
488 The default typographic appearance of the items on a cover or doc
489 cover is identical to that of the items in a
490 <a href="definitions.html#docheader">docheader</a>.
492 <a href="docprocessing.html#docheader-desc">Docheader description</a>
493 for a description of the defaults.)
497 <a href="docprocessing.html#copyright">COPYRIGHT</a>
499 <a href="docprocessing.html#misc">MISC</a>,
500 which do not appear in docheaders, have the following default
503 <ul style="margin-top: -.5em; margin-bottom: -.5em;">
504 <li>the COPYRIGHT line is set in the bottom right hand corner
506 <a href="definitions.html#ps">point sizes</a>
507 smaller than the size of
508 <a href="definitions.html#running">running text</a>
510 <li>MISC lines are set in the bottom left hand
511 corner of the page, in the same family, font and point size
512 as the copyright line.
517 The defaults for the entirety of covers and doc covers, and all the
518 elements thereon, can be changed with control macros whose defaults
519 and arguments are identical to the corresponding control macros
520 governing docheaders. The only difference is the name by which you
525 A complete list of cover and doc cover control macros follows.
527 <a href="docprocessing.html#index-docheader-control">docheader control</a>
528 in order to get the defaults and any special instructions for usage.
531 <h3 id="index-cover-control" class="docs" style="margin-bottom: .25em;">Cover / doc cover control macros and defaults</h3>
533 <div class="defaults-container" style="padding-bottom: 8px;">
535 <span class="pre defaults">
536 COVER_ADVANCE DOC_COVER_ADVANCE -+
537 COVER_FAMILY DOC_COVER_FAMILY | like
538 COVER_LEAD DOC_COVER_LEAD | DOCHEADER_<spec>
539 COVER_QUAD DOC_COVER_QUAD -+
541 COVER_TITLE_FAMILY DOC_COVER_TITLE_FAMILY -+
542 COVER_TITLE_FONT DOC_COVER_TITLE_FONT | like
543 COVER_TITLE_COLOR DOC_COVER_TITLE_COLOR | TITLE_<spec>
544 COVER_TITLE_SIZE DOC_COVER_TITLE_SIZE -+
546 COVER_CHAPTER_TITLE_FAMILY DOC_COVER_CHAPTER_TITLE_FAMILY -+
547 COVER_CHAPTER_TITLE_FONT DOC_COVER_CHAPTER_TITLE_FONT | like
548 COVER_CHAPTER_TITLE_COLOR DOC_COVER_CHAPTER_TITLE_COLOR | CHAPTER_TITLE_<spec>
549 COVER_CHAPTER_TITLE_SIZE DOC_COVER_CHAPTER_TITLE_SIZE -+
551 COVER_SUBTITLE_FAMILY DOC_COVER_SUBTITLE_FAMILY -+
552 COVER_SUBTITLE_FONT DOC_COVER_SUBTITLE_FONT | like
553 COVER_SUBTITLE_COLOR DOC_COVER_SUBTITLE_COLOR | SUBTITLE_<spec>
554 COVER_SUBTITLE_SIZE DOC_COVER_AUTHOR_SIZE -+
556 COVER_ATTRIBUTE_COLOR DOC_COVER_ATTRIBUTE_COLOR - like ATTRIBUTE_COLOR
557 - the macro, ATTRIBUTE_STRING, controls the attribution string
558 for both docheaders and cover pages; cover pages have no
559 separate ATTRIBUTE_STRING macro
561 COVER_AUTHOR_FAMILY DOC_COVER_AUTHOR_FAMILY -+
562 COVER_AUTHOR_FONT DOC_COVER_AUTHOR_FONT | like
563 COVER_AUTHOR_COLOR DOC_COVER_AUTHOR_COLOR | AUTHOR_<spec>
564 COVER_AUTHOR_SIZE DOC_COVER_AUTHOR_SIZE -+
566 COVER_DOCTYPE_FAMILY DOC_COVER_DOCTYPE_FAMILY -+
567 COVER_DOCTYPE_FONT DOC_COVER_DOCTYPE_FONT | like
568 COVER_DOCTYPE_COLOR DOC_COVER_DOCTYPE_COLOR | DOCTYPE_<spec>
569 COVER_DOCTYPE_SIZE DOC_COVER_DOCTYPE_SIZE -+
571 COVER_COPYRIGHT_FAMILY DOC_COVER_COPYRIGHT_FAMILY -+
572 COVER_COPYRIGHT_FONT DOC_COVER_COPYRIGHT_FONT |
573 COVER_COPYRIGHT_COLOR DOC_COVER_COPYRIGHT_COLOR | like any of the above
574 COVER_COPYRIGHT_SIZE DOC_COVER_COPYRIGHT_SIZE |
575 COVER_COPYRIGHT_QUAD DOC_COVER_COPYRIGHT_QUAD -+
576 - copyright quad sets both the position on the page and the quad
577 direction and can be either L (left) or R (right); default is right
579 COVER_MISC_FAMILY DOC_COVER_MISC_FAMILY -+
580 COVER_MISC_FONT DOC_COVER_MISC_FONT |
581 COVER_MISC_COLOR DOC_COVER_MISC_COLOR | like any of the above
582 COVER_MISC_SIZE DOC_COVER_MISC_SIZE |
583 COVER_MISC_QUAD DOC_COVER_MISC_QUAD -+
584 - misc quad sets both the position on the page and the quad
585 direction and can be either L (left) or R (right); default is left
587 COVER_UNDERLINE DOC_COVER_UNDERLINE - like DOCTYPE_UNDERLINE
588 - cover underline controls underlining of the argument given to
589 DOCTYPE NAMED "<name>" only
591 COVER_COUNTS_PAGES DOC_COVER_COUNTS_PAGES
592 - whether to consider cover pages in the pagination scheme; the
593 default is to ignore them
598 <p style="margin-top: -2em;">
601 COVER_COUNTS_PAGES and DOC_COVER_COUNTS_PAGES are toggle macros,
602 hence invoking them by themselves means that mom will consider
603 covers and doc covers in the pagination scheme; invoking them with
604 any argument (<kbd>OFF, NO, X</kbd>, etc.) means they are ignored.
605 The default is to ignore them.
608 <div class="rule-long"><hr/></div>
610 <!-- Navigation links -->
611 <table style="width: 100%; margin-top: 12px;">
613 <td style="width: 33%;"><a href="toc.html">Back to Table of Contents</a></td>
614 <td style="width: 33%; text-align: center;"><a href="#top">Top</a></td>
615 <td style="width: 33%; text-align: right;"><a href="tables-of-contents.html">Next: Tables of contents</a></td>
621 <div class="bottom-spacer"><br/></div>
625 <!-- vim: fileencoding=utf-8: nomodified: -->