| 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-2023 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 -- Document processing, creating cover pages</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="tables-of-contents.html#top">Next: Tables of contents</a></td> |
| 38 |
</tr> |
| 39 |
</table> |
| 40 |
|
| 41 |
<h1 class="docs">Creating cover pages</h1> |
| 42 |
|
| 43 |
<div style="width: 66%; 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</a> |
| 50 |
<ul style="margin-left: -1.25em; list-style-type: circle;"> |
| 51 |
<li><a href="#pagination">DOC_COVERS_COUNT_PAGES</a></li> |
| 52 |
<li><a href="#pagination">COVERS_COUNT_PAGES</a></li> |
| 53 |
</ul> |
| 54 |
</li> |
| 55 |
<li><a href="#design">Designing your own cover pages</a></li> |
| 56 |
<li><a href="#persistence">Persistence of data and formatting</a></li> |
| 57 |
</ul></li> |
| 58 |
<li><a href="#index-covers">Doc-cover and cover macros</a> |
| 59 |
<ul style="margin-left: -.5em; list-style-type: disc;"> |
| 60 |
<li><a href="#cover">DOC_COVER / COVER</a> |
| 61 |
<ul style="margin-left: -1.25em; list-style-type: circle;"> |
| 62 |
<li><a href="#cover-args">The argument list: saying what goes on doc cover and cover pages</a></li> |
| 63 |
<li><a href="#meanings">What the arguments mean</a></li> |
| 64 |
<li><a href="#chapter">How the CHAPTER argument and friends work</a></li> |
| 65 |
</ul></li> |
| 66 |
<li><a href="#covertext">DOC_COVERTEXT / COVERTEXT</a> |
| 67 |
<ul style="margin-left: -1.25em; list-style-type: circle;"> |
| 68 |
<li><a href="#placement">Placement</a></li> |
| 69 |
</ul> |
| 70 |
</li> |
| 71 |
<li><a href="#coverimages">DOC_COVER_IMAGE / COVER_IMAGE</a> |
| 72 |
<ul style="margin-left: -1.25em; list-style-type: circle;"> |
| 73 |
<li><a href="#positioning">Positioning of doc cover and cover images</a></li> |
| 74 |
</ul> |
| 75 |
</li> |
| 76 |
</ul></li> |
| 77 |
<li><a href="#on-off">Enabling/disabling automatic generation of cover pages</a></li> |
| 78 |
<li><a href="#cover-control">Control macros for covers and doc covers</a></li> |
| 79 |
</ul> |
| 80 |
</div> |
| 81 |
|
| 82 |
<div class="rule-medium"><hr/></div> |
| 83 |
|
| 84 |
<h2 id="cover-intro" class="docs">Introduction to cover pages</h2> |
| 85 |
|
| 86 |
<p> |
| 87 |
Though identical in treatment, mom provides two kinds of cover |
| 88 |
pages: document cover pages (”doc covers”) and section |
| 89 |
cover pages (“covers”). Section cover pages are |
| 90 |
analogous to title pages. |
| 91 |
</p> |
| 92 |
|
| 93 |
<p> |
| 94 |
A doc cover is what you’d most likely use at the start of a |
| 95 |
collated document, where you might want the name of the complete |
| 96 |
document, the author(s) and the copyright line to appear. Another |
| 97 |
place you might use a doc cover is for a novel, where you want the |
| 98 |
title of the novel, not the chapter title or chapter number, as the |
| 99 |
first cover page. |
| 100 |
</p> |
| 101 |
|
| 102 |
<p> |
| 103 |
A cover is what you’d use for pages that separate sections |
| 104 |
of a collated document, i.e. title pages. A cover page (but not a |
| 105 |
doc cover) in a collated document could, for example, simply read: |
| 106 |
”PART 1”. |
| 107 |
</p> |
| 108 |
|
| 109 |
<p> |
| 110 |
In non-collated documents (say, an essay) you can use either a cover |
| 111 |
or doc cover to generate the cover sheet. |
| 112 |
</p> |
| 113 |
|
| 114 |
<p> |
| 115 |
In addition, nothing prevents you from generating both a doc cover |
| 116 |
and a cover for every document in a collated document. Or you can |
| 117 |
selectively disable the automatic generation of either doc covers or |
| 118 |
covers in a collated document on-the-fly. |
| 119 |
</p> |
| 120 |
|
| 121 |
<div id="important-note" class="box-important"> |
| 122 |
<p class="tip"> |
| 123 |
<span class="important">Important note:</span> |
| 124 |
Automatic generation of covers or doc covers after the first one(s) |
| 125 |
only takes place if you are working with collated documents. Mom |
| 126 |
provides no mechanism for saying ”print a section cover |
| 127 |
here even though I’m still working on the same (non-collated) |
| 128 |
document.” |
| 129 |
</p> |
| 130 |
</div> |
| 131 |
|
| 132 |
<h3 id="desc" class="docs">Description of cover pages</h3> |
| 133 |
|
| 134 |
<p> |
| 135 |
By default, mom typesets covers and doc covers identically to |
| 136 |
<a href="definitions.html#docheader">docheaders</a> |
| 137 |
(see |
| 138 |
<a href="docprocessing.html#docheader-control">How to change the look of docheaders</a> |
| 139 |
for a description of what a docheader looks like). The only |
| 140 |
differences are |
| 141 |
</p> |
| 142 |
<ul style="margin-top: -.5em; margin-bottom: -.5em;"> |
| 143 |
<li>the position on the page where the information is output</li> |
| 144 |
<li>the (optional) addition of copyright and miscellaneous information</li> |
| 145 |
<li>there’s no running text underneath, although you can add text |
| 146 |
to a cover or doc cover (for example, an Abstract) with |
| 147 |
<a href="#covertext">COVERTEXT</a> |
| 148 |
</li> |
| 149 |
</ul> |
| 150 |
|
| 151 |
<p> |
| 152 |
You tell mom what you want to appear on cover pages through the |
| 153 |
arguments you pass to |
| 154 |
<a href="#cover">DOC_COVER</a> |
| 155 |
and/or |
| 156 |
<a href="#cover">COVER</a>. |
| 157 |
Provided you have already given mom the appropriate reference macros |
| 158 |
(e.g. |
| 159 |
<a href="docprocessing.html#title">TITLE</a> |
| 160 |
or |
| 161 |
<a href="docprocessing.html#author">AUTHOR</a>), |
| 162 |
she will output covers and doc covers identically to how she |
| 163 |
would output docheaders containing the same information. |
| 164 |
</p> |
| 165 |
|
| 166 |
<p> |
| 167 |
By default, mom starts covers and doc covers one-third of the way |
| 168 |
down the page. This can be changed through the use of the control |
| 169 |
macros DOC_COVER_START_POS / COVER_START_POS (or DOC_COVER_ADVANCE / |
| 170 |
COVER_ADVANCE). |
| 171 |
</p> |
| 172 |
|
| 173 |
<p> |
| 174 |
If you request copyright information (and have already given mom the |
| 175 |
reference macro |
| 176 |
<a href="docprocessing.html#copyright">COPYRIGHT</a>) |
| 177 |
she sets it, by default, in a smaller |
| 178 |
<a href="definitions.html#ps">point size</a> |
| 179 |
in the bottom right hand corner of the cover or doc cover. The |
| 180 |
position, as well as all of the standard typesetting parameters, can be |
| 181 |
altered via control macros. |
| 182 |
</p> |
| 183 |
|
| 184 |
<p> |
| 185 |
Similarly, if you request miscellaneous information (and have |
| 186 |
already given mom the reference macro |
| 187 |
<a href="docprocessing.html#misc">MISC</a>) |
| 188 |
she sets it, by default, in a smaller point size in the bottom left |
| 189 |
hand corner of the cover or doc cover. As with the copyright, the |
| 190 |
position and type specs can be altered via control macros. |
| 191 |
</p> |
| 192 |
|
| 193 |
<h3 id="pagination" class="docs">Headers/footers/pagination</h3> |
| 194 |
|
| 195 |
<p> |
| 196 |
Mom does not set any |
| 197 |
<a href="definitions.html#header">headers</a> |
| 198 |
or |
| 199 |
<a href="definitions.html#footer">footers</a> |
| 200 |
on cover pages. Neither does she set any page numbers. From |
| 201 |
the point of view of pagination, covers and doc covers are by |
| 202 |
default considered ”null” pages. If you wish them to |
| 203 |
be included in the pagination scheme (even though no page numbers |
| 204 |
appear), you must tell mom that’s what you want by invoking |
| 205 |
<br/> |
| 206 |
<span class="pre-in-pp"> |
| 207 |
.DOC_COVER_COUNTS_PAGES |
| 208 |
</span> |
| 209 |
or |
| 210 |
<br/> |
| 211 |
<span class="pre-in-pp"> |
| 212 |
.COVER_COUNTS_PAGES |
| 213 |
</span> |
| 214 |
</p> |
| 215 |
|
| 216 |
<h3 id="design" class="docs">Designing your own cover pages</h3> |
| 217 |
|
| 218 |
<p> |
| 219 |
Finally, if you want to design your own cover page(s), you can |
| 220 |
typeset them by hand inside a |
| 221 |
<a href="#covertext">COVERTEXT</a> |
| 222 |
block using mom’s typesetting macros to format the text. |
| 223 |
</p> |
| 224 |
|
| 225 |
<h3 id="persistence" class="docs">Persistence of data and formatting</h3> |
| 226 |
|
| 227 |
<p> |
| 228 |
Doc-cover and cover data—that is to say, the strings passed to |
| 229 |
reference macros that appear on doc cover and cover |
| 230 |
pages—do not persist after |
| 231 |
<a href="docprocessing.html#start">START</a>, |
| 232 |
however the formatting of the various parts (TITLE, AUTHOR, |
| 233 |
COPYRIGHT, etc.) does. |
| 234 |
</p> |
| 235 |
|
| 236 |
<div class="macro-list-container"> |
| 237 |
<h3 id="index-covers" class="macro-list">Cover and document cover macros</h3> |
| 238 |
<ul class="macro-list"> |
| 239 |
<li><a href="#cover">DOC_COVER and COVER</a> |
| 240 |
<ul style="margin-left: -.5em; list-style-type: disc;"> |
| 241 |
<li><a href="#cover-args">The arguments: saying what goes on doc cover and cover pages</a></li> |
| 242 |
</ul></li> |
| 243 |
<li><a href="#covertext">DOC_COVERTEXT / COVERTEXT</a></li> |
| 244 |
<li><a href="#doc-coverimage">DOC_COVER_IMAGE / COVER_IMAGE</a></li> |
| 245 |
<li><a href="#on-off">Enabling/disabling automatic generation of cover pages</a> |
| 246 |
<ul style="margin-left: -.5em; list-style-type: disc;"> |
| 247 |
<li><a href="#doc-covers">DOC_COVERS</a></li> |
| 248 |
<li><a href="#covers">COVERS</a></li> |
| 249 |
</ul></li> |
| 250 |
<li><a href="#cover-control">Control macros for doc covers and covers</a></li> |
| 251 |
</ul> |
| 252 |
</div> |
| 253 |
|
| 254 |
<!-- -COVER- --> |
| 255 |
|
| 256 |
<div class="macro-id-overline"> |
| 257 |
<h3 id="cover" class="macro-id">DOC_COVER and COVER</h3> |
| 258 |
</div> |
| 259 |
|
| 260 |
<div id="doc-cover" class="box-macro-args"> |
| 261 |
Macro: <b>DOC_COVER</b> <kbd class="macro-args">(see argument list, below)</kbd> |
| 262 |
</div> |
| 263 |
|
| 264 |
<div class="box-macro-args" style="margin-top: 1em;"> |
| 265 |
Macro: <b>COVER</b> <kbd class="macro-args">(see argument list, below)</kbd> |
| 266 |
</div> |
| 267 |
|
| 268 |
<p> |
| 269 |
DOC_COVER and COVER behave identically. The reason mom provides |
| 270 |
two macros for cover page generation is so that you can have two |
| 271 |
different kinds of covers with different information on each. |
| 272 |
</p> |
| 273 |
|
| 274 |
<p> |
| 275 |
Imagine, for a moment, you’ve written a document comprised of |
| 276 |
three sections. When you |
| 277 |
<a href="rectoverso.html#collate">COLLATE</a> |
| 278 |
the document for output, you could use DOC_COVER to generate a cover |
| 279 |
page that contained the name of the entire document, your (the |
| 280 |
author’s) name, and perhaps the copyright date. Subsequently, |
| 281 |
you could use COVER, after each <kbd>.COLLATE</kbd> but before each |
| 282 |
<kbd><a href="docprocessing.html#start">.START</a></kbd>, |
| 283 |
to generate a cover page (title page, cover sheet) containing |
| 284 |
just the name of the section, for example, “Part 1”. |
| 285 |
</p> |
| 286 |
|
| 287 |
<p> |
| 288 |
The arguments to <kbd>DOC_COVER</kbd> and <kbd>COVER</kbd> tell mom |
| 289 |
what you’d like on cover pages. You may give as many or as |
| 290 |
few arguments as you need, in any order. A very common setup would |
| 291 |
be: |
| 292 |
<br/> |
| 293 |
<span class="pre-in-pp"> |
| 294 |
.COVER TITLE AUTHOR COPYRIGHT |
| 295 |
</span> |
| 296 |
</p> |
| 297 |
|
| 298 |
<h4 id="cover-args" class="docs" style="margin-top: -1em;">The argument list</h4> |
| 299 |
|
| 300 |
<p style="margin-top: 1em"> |
| 301 |
The arguments to <kbd>COVER</kbd> and <kbd>DOC_COVER</kbd> tell mom |
| 302 |
what you want on the cover page: |
| 303 |
<br/> |
| 304 |
<span class="pre-in-pp"> |
| 305 |
TITLE | DOCTITLE | DOC_COVERTITLE | COVERTITLE |
| 306 |
CHAPTER | CHAPTER_TITLE | CHAPTER+TITLE |
| 307 |
SUBTITLE |
| 308 |
AUTHOR |
| 309 |
DOCTYPE |
| 310 |
DOC_COVERTEXT | COVERTEXT |
| 311 |
DOC_COVER_IMAGE | COVER_IMAGE |
| 312 |
COPYRIGHT |
| 313 |
MISC |
| 314 |
PDF_OUTLINE_LABEL "<label>" |
| 315 |
BLANKPAGE |
| 316 |
</span> |
| 317 |
</p> |
| 318 |
|
| 319 |
<h4 id="meanings" class="docs" style="margin-top: -1em;">What the arguments mean</h4> |
| 320 |
|
| 321 |
<dl> |
| 322 |
<dt class="params">TITLE</dt> |
| 323 |
<dd class="cover-args">– the string(s) you gave to |
| 324 |
<a href="docprocessing.html#title">TITLE</a> |
| 325 |
</dd> |
| 326 |
<dt class="params">DOCTITLE</dt> |
| 327 |
<dd class="cover-args">– the string(s) you gave to |
| 328 |
<a href="docprocessing.html#doc-title">DOCTITLE</a> |
| 329 |
</dd> |
| 330 |
<dt class="params">DOC_COVERTITLE / COVERTITLE</dt> |
| 331 |
<dd class="cover-args">– the string(s) you gave to |
| 332 |
<a href="docprocessing.html#doc-covertitle">DOC_COVERTITLE</a> |
| 333 |
or |
| 334 |
<a href="docprocessing.html#covertitle">COVERTITLE</a> |
| 335 |
</dd> |
| 336 |
<dt class="params">CHAPTER, CHAPTER_TITLE, CHAPTER+TITLE</dt> |
| 337 |
<dd class="cover-args">– see below, |
| 338 |
<a href="#chapter">How the CHAPTER argument and friends work</a> |
| 339 |
</dd> |
| 340 |
<dt class="params">SUBTITLE</dt> |
| 341 |
<dd class="cover-args">– the string(s) you gave to |
| 342 |
<a href="docprocessing.html#subtitle">SUBTITLE</a> |
| 343 |
</dd> |
| 344 |
<dt class="params">AUTHOR</dt> |
| 345 |
<dd class="cover-args">– the string(s) you gave to |
| 346 |
<a href="docprocessing.html#author">AUTHOR</a> |
| 347 |
</dd> |
| 348 |
<dt class="params">DOCTYPE</dt> |
| 349 |
<dd class="cover-args">– the string you gave to |
| 350 |
<a href="docprocessing.html#doctype">DOCTYPE NAMED</a> |
| 351 |
</dd> |
| 352 |
<dt class="params">DOC_COVERTEXT / COVERTEXT</dt> |
| 353 |
<dd class="cover-args">– the block of type you entered for |
| 354 |
<a href="#covertext">DOC_COVERTEXT</a> |
| 355 |
or |
| 356 |
<a href="#covertext">COVERTEXT</a> |
| 357 |
</dd> |
| 358 |
<dt class="params">DOC_COVER_IMAGE / COVER_IMAGE</dt> |
| 359 |
<dd class="cover-args">– the image file you gave to |
| 360 |
<a href="#covertext">DOC_COVER_IMAGE</a> |
| 361 |
or |
| 362 |
<a href="#covertext">COVER_IMAGE</a> |
| 363 |
</dd> |
| 364 |
<dt class="params">COPYRIGHT</dt> |
| 365 |
<dd class="cover-args">– the string you gave to |
| 366 |
<a href="docprocessing.html#copyright">COPYRIGHT</a> |
| 367 |
</dd> |
| 368 |
<dt class="params">MISC</dt> |
| 369 |
<dd class="cover-args">– the string(s) you gave to |
| 370 |
<a href="docprocessing.html#misc">MISC</a> |
| 371 |
</dd> |
| 372 |
<dt class="params">PDF_OUTLINE_LABEL <label></dt> |
| 373 |
<dd class="cover-args"> |
| 374 |
<span style="display:block; margin-left: 1em"> |
| 375 |
By default, mom identifies doc covers in the outline panel of PDF |
| 376 |
viewers with the prepended label, “Cover:”, and covers |
| 377 |
with the label “Title Page:”. If you would like |
| 378 |
to change the label, give the <kbd>PDF_OUTLINE_LABEL</kbd> |
| 379 |
argument to DOC_COVER or COVER along with the new label, in |
| 380 |
quotation marks, as in this example: |
| 381 |
<br/> |
| 382 |
<kbd> .COVER TITLE AUTHOR COPYRIGHT PDF_LABEL "Cover Sheet: "</kbd> |
| 383 |
</span> |
| 384 |
</dd> |
| 385 |
<dt class="params">BLANKPAGE</dt> |
| 386 |
<dd class="cover-args"> |
| 387 |
<span style="display:block; margin-left: 1em"> |
| 388 |
If the final argument to DOC_COVER or COVER is <kbd>BLANKPAGE</kbd>, |
| 389 |
mom will insert a blank page after the doc cover or cover. This is |
| 390 |
particularly useful if you intend to print your document two-sided, |
| 391 |
since, in two-sided printing, there may be instances where you do |
| 392 |
not want text on the reverse side of cover or title pages |
| 393 |
</span> |
| 394 |
<span style="display:block; margin-left: 1em; margin-top: .5em"> |
| 395 |
If you enable |
| 396 |
<a href="#pagination">DOC_COVERS_COUNT_PAGES</a> |
| 397 |
and/or |
| 398 |
<a href="#pagination">COVERS_COUNT_PAGES</a>, |
| 399 |
the blank page will be taken into account in the pagination |
| 400 |
scheme, though no page number appears on it. Otherwise, blank |
| 401 |
pages are invisible to mom’s pagination. |
| 402 |
</span> |
| 403 |
</dd> |
| 404 |
</dl> |
| 405 |
|
| 406 |
<p> |
| 407 |
Please note that in all cases, if you have passed |
| 408 |
a reference macro one of the optional arguments |
| 409 |
<kbd>DOC_COVER</kbd> or <kbd>COVER</kbd> (e.g. |
| 410 |
<kbd>.TITLE DOC_COVER "Title"</kbd>), mom will print the |
| 411 |
appropriate string on the appropriate cover page. Thus, |
| 412 |
<br/> |
| 413 |
<span class="pre-in-pp"> |
| 414 |
.TITLE DOC_COVER "Collected Essays" |
| 415 |
.TITLE COVER "1985-2015" |
| 416 |
.TITLE "Neo-liberalism: Who Did They Think They Were Fooling?" |
| 417 |
.DOC_COVER TITLE |
| 418 |
.COVER TITLE |
| 419 |
</span> |
| 420 |
will print “Collected Essays” on the doc cover page, |
| 421 |
“1985-2015” on the cover page, and, assuming the |
| 422 |
docheader hasn’t been disabled, “Neo-liberalism: Who |
| 423 |
Did They Think They Were Fooling?” as the title in the |
| 424 |
docheader. |
| 425 |
</p> |
| 426 |
|
| 427 |
<p> |
| 428 |
Note that |
| 429 |
<br/> |
| 430 |
<span class="pre-in-pp"> |
| 431 |
.DOC_COVERTITLE "Collected Essays" |
| 432 |
.COVERTITLE "1985-2015" |
| 433 |
.TITLE "Neo-liberalism: Who Did They Think They Were Fooling?" |
| 434 |
.DOC_COVER DOC_COVERTITLE |
| 435 |
.COVER COVERTITLE |
| 436 |
</span> |
| 437 |
could be used to accomplish the same thing. |
| 438 |
</p> |
| 439 |
|
| 440 |
<h5 id="chapter" class="docs" style="margin-top: 0; text-transform: none;">How the CHAPTER argument and friends work</h5> |
| 441 |
|
| 442 |
<p style="margin-top: .75em"> |
| 443 |
<span style="display: block; margin-bottom: -1.25em; font-weight: bold;">• CHAPTER</span> |
| 444 |
<br/> |
| 445 |
The <kbd>CHAPTER</kbd> argument will print the |
| 446 |
<a href="docprocessing.html#chapter-string">CHAPTER_STRING</a> |
| 447 |
concatenated with the chapter number you gave to |
| 448 |
<a href="docprocessing.html#chapter">CHAPTER</a>. |
| 449 |
For example, assuming a vanilla setup for your chapter: |
| 450 |
<br/> |
| 451 |
<span class="pre-in-pp" style="color: #64614a;"> |
| 452 |
.CHAPTER 1 |
| 453 |
.CHAPTER_TITLE "The Bonny Blue Yonder" |
| 454 |
<span style="color: #941614;">.COVER CHAPTER</span> \" (or <span style="color: #941614;">.DOC_COVER CHAPTER</span>) |
| 455 |
</span> |
| 456 |
will print (and only print) |
| 457 |
<br/> |
| 458 |
<span class="pre-in-pp"> |
| 459 |
Chapter 1 |
| 460 |
</span> |
| 461 |
</p> |
| 462 |
|
| 463 |
<p style="margin-top: -1em;"> |
| 464 |
<span style="display: block; margin-bottom: -1.25em; font-weight: bold;">• CHAPTER_TITLE</span> |
| 465 |
<br/> |
| 466 |
The <kbd>CHAPTER_TITLE</kbd> argument will print the chapter title |
| 467 |
you gave to |
| 468 |
<a href="docprocessing.html#chapter-title">CHAPTER_TITLE</a>. |
| 469 |
For example, assuming a vanilla setup for your chapter: |
| 470 |
<br/> |
| 471 |
<span class="pre-in-pp" style="color: #64614a;"> |
| 472 |
.CHAPTER 1 |
| 473 |
.CHAPTER_TITLE "The Bonny Blue Yonder" |
| 474 |
<span style="color: #941614;">.COVER CHAPTER_TITLE</span> \"(or <span style="color: #941614;">.DOC_COVER CHAPTER_TITLE</span>) |
| 475 |
</span> |
| 476 |
will print (and only print) |
| 477 |
<br/> |
| 478 |
<span class="pre-in-pp"> |
| 479 |
The Bonny Blue Yonder |
| 480 |
</span> |
| 481 |
</p> |
| 482 |
|
| 483 |
<p style="margin-top: -1em;"> |
| 484 |
<span style="display: block; margin-bottom: -1.25em; font-weight: bold;">• CHAPTER+TITLE</span> |
| 485 |
<br/> |
| 486 |
The <kbd>CHAPTER+TITLE</kbd> argument will print both the |
| 487 |
concatenated chapter string+number and the chapter title. For |
| 488 |
example, assuming a vanilla setup for your chapter: |
| 489 |
<br/> |
| 490 |
<span class="pre-in-pp" style="color: #64614a;"> |
| 491 |
.CHAPTER 1 |
| 492 |
.CHAPTER_TITLE "The Bonny Blue Yonder" |
| 493 |
<span style="color: #941614;">.COVER CHAPTER+TITLE</span> \"(or <span style="color: #941614;">.DOC_COVER CHAPTER+TITLE</span>) |
| 494 |
</span> |
| 495 |
will print |
| 496 |
<br/> |
| 497 |
<span class="pre-in-pp"> |
| 498 |
Chapter 1 |
| 499 |
The Bonny Blue Yonder |
| 500 |
</span> |
| 501 |
</p> |
| 502 |
|
| 503 |
<div class="macro-id-overline"> |
| 504 |
<h3 id="covertext" class="macro-id">DOC_COVERTEXT and COVERTEXT</h3> |
| 505 |
</div> |
| 506 |
|
| 507 |
<div class="box-macro-args"> |
| 508 |
Macro: <b>DOC_COVERTEXT</b> <kbd class="macro-args">[START <starting position>] <toggle></kbd> |
| 509 |
</div> |
| 510 |
<div class="box-macro-args" style="margin-top: 1em;"> |
| 511 |
Macro: <b>COVERTEXT</b> <kbd class="macro-args">[START <starting position>] <toggle></kbd> |
| 512 |
</div> |
| 513 |
|
| 514 |
<p class="requires"> |
| 515 |
• Must come after |
| 516 |
<a href="#printstyle"><span class="normal">PRINTSTYLE</span></a> |
| 517 |
</p> |
| 518 |
|
| 519 |
<p> |
| 520 |
<kbd>DOC_COVERTEXT</kbd> and <kbd>COVERTEXT</kbd> allow you to add |
| 521 |
text to doc covers and covers in addition to, or instead of, what is |
| 522 |
generated by mom from the arguments you give to |
| 523 |
<a href="#doccover">DOC_COVER</a> |
| 524 |
and |
| 525 |
<a href="#doccover">COVER</a>. |
| 526 |
</p> |
| 527 |
|
| 528 |
<p> |
| 529 |
Invoke <kbd>.DOC_COVERTEXT</kbd> or <kbd>.COVERTEXT</kbd> on a line |
| 530 |
by itself, follow it with the text and formatting you desire, and |
| 531 |
terminate the text block with <kbd>.DOC_COVERTEXT OFF</kbd> or |
| 532 |
<kbd>COVERTEXT OFF</kbd> (or <kbd>QUIT, END, DONE</kbd>, etc.). |
| 533 |
</p> |
| 534 |
|
| 535 |
<p> |
| 536 |
By default, cover text is set over the full line length of the |
| 537 |
document, using the style parameters of |
| 538 |
<a href="definitions.html#running">running text</a>. |
| 539 |
Therefore, as noted, these macros must come after PRINTSTYLE |
| 540 |
and any global style changes (margins, family, size, leading, |
| 541 |
etc.). Formatting within a cover text block must be done |
| 542 |
“manually” with mom’s typesetting macros; |
| 543 |
<a href="docelement.html#pp">PP</a> |
| 544 |
is the only allowed document element tag. |
| 545 |
</p> |
| 546 |
|
| 547 |
<h4 id="placement" class="docs">Placement</h4> |
| 548 |
|
| 549 |
<p> |
| 550 |
If you do not instruct mom to put anything on doc cover or cover |
| 551 |
pages except <kbd>DOC_COVERTEXT</kbd> or <kbd>COVERTEXT</kbd>, the |
| 552 |
cover text will begin at the document’s top margin. |
| 553 |
Equally, if only <kbd>COPYRIGHT</kbd> and/or <kbd>MISC</kbd> are |
| 554 |
to go on the pages, cover text begins at the top margin. In all |
| 555 |
other cases, cover text begins below the last element on the page |
| 556 |
(excluding COPYRIGHT or MISC), separated by a blank line. |
| 557 |
</p> |
| 558 |
|
| 559 |
<p> |
| 560 |
If you wish to change the starting position of the text, you must |
| 561 |
use |
| 562 |
<a href="typesetting.html#space">SP</a> |
| 563 |
or |
| 564 |
<a href="typesetting.html#ald">ALD</a> |
| 565 |
to move it further down the page. Alternatively, you may use the |
| 566 |
optional START argument to give a precise location for the text to |
| 567 |
begin. |
| 568 |
</p> |
| 569 |
|
| 570 |
<p> |
| 571 |
<kbd>DOC_COVERTEXT</kbd> and <kbd>COVERTEXT</kbd> are particularly |
| 572 |
useful for putting abstracts on cover pages, as technical reports |
| 573 |
often require. |
| 574 |
</p> |
| 575 |
|
| 576 |
<p> |
| 577 |
Here’s a simple recipe for setting an abstract: |
| 578 |
<br/> |
| 579 |
<span class="pre-in-pp"> |
| 580 |
.COVERTEXT |
| 581 |
.FT BI |
| 582 |
.PT_SIZE 14 |
| 583 |
.LS 14 |
| 584 |
.CENTER |
| 585 |
Abstract |
| 586 |
.SP .5v |
| 587 |
.FT R |
| 588 |
.PT_SIZE 12 |
| 589 |
.IB 6P |
| 590 |
.JUSTIFY |
| 591 |
Text of Abstract... |
| 592 |
.COVERTEXT OFF |
| 593 |
</span> |
| 594 |
Assuming you have told mom to put the title and author on the |
| 595 |
cover page, the abstract will appear beneath the author with a |
| 596 |
14-point bold-italic title, centered, with the text of the abstract |
| 597 |
medium-roman and justified, indented 6 picas from both margins. |
| 598 |
</p> |
| 599 |
|
| 600 |
<div class="macro-id-overline"> |
| 601 |
<h3 id="coverimages" class="macro-id">DOC_COVER_IMAGE and COVER_IMAGE</h3> |
| 602 |
</div> |
| 603 |
|
| 604 |
<div id="doc-coverimage" class="box-macro-args"> |
| 605 |
Macro: <b>DOC_COVER_IMAGE</b> <kbd class="macro-args"><image> <width> <height> [ -L | -C | -R | -I <indent> <Y-pos> [ <X-pos> ] ]</kbd> |
| 606 |
</div> |
| 607 |
|
| 608 |
<div id="coverimage" class="box-macro-args" style="margin-top: 1em;"> |
| 609 |
Macro: <b>COVER_IMAGE</b> <kbd class="macro-args"><image> <width> <height> [ -L | -C | -R | -I <indent> <Y-pos> [ <X-pos> ] ]</kbd> |
| 610 |
</div> |
| 611 |
|
| 612 |
<p> |
| 613 |
There are times you need a full page image on a cover, for example |
| 614 |
the jacket of a book. Equally, there are times when you need a small |
| 615 |
image on the cover, perhaps a company logo. |
| 616 |
</p> |
| 617 |
|
| 618 |
<p> |
| 619 |
DOC_COVER_IMAGE and COVER_IMAGE take the same arguments |
| 620 |
as PDF_IMAGE, and in the same order. Consult |
| 621 |
<a href="images.html#pdf-image">PDF_IMAGE</a> |
| 622 |
for a description. |
| 623 |
</p> |
| 624 |
|
| 625 |
<p> |
| 626 |
Two additional arguments allow you to place images using x-y |
| 627 |
coordinates. Please note that if you use x-y coordinates for |
| 628 |
positioning, <b>Y-pos</b> comes before <b>X-pos</b> in the order of |
| 629 |
arguments. |
| 630 |
</p> |
| 631 |
|
| 632 |
<p> |
| 633 |
Like PDF_IMAGE, the image file must be in PDF format. Mom |
| 634 |
apologizes, but PostScript images are not supported for inclusion on |
| 635 |
covers. See |
| 636 |
<a href="images.html#pdf">Image conversion and file processing</a> |
| 637 |
for instructions on converting various image types to PDF, and |
| 638 |
<a href="images.html#bounding-box">here</a> |
| 639 |
for instructions on obtaining image dimensions. |
| 640 |
</p> |
| 641 |
|
| 642 |
<h4 id="positioning" class="docs">Positioning of doc cover and cover images</h4> |
| 643 |
|
| 644 |
<p> |
| 645 |
With no arguments other than <kbd><file name></kbd>, |
| 646 |
<kbd><width></kbd>, and <kbd><height></kbd>, |
| 647 |
DOC_COVER_IMAGE and COVER_IMAGE place images flush with the top |
| 648 |
left corner of the printer sheet. This allows placing full-page |
| 649 |
background images on covers. For example, assuming a US-letter page |
| 650 |
size, |
| 651 |
<br/> |
| 652 |
<span class="pre-in-pp"> |
| 653 |
.DOC_COVER_IMAGE image.pdf 612p 792p |
| 654 |
.DOC_COVER TITLE AUTHOR DOC_COVER_IMAGE |
| 655 |
</span> |
| 656 |
will fill the doc cover page with “image.pdf” and set |
| 657 |
the title and author in their usual locations. |
| 658 |
</p> |
| 659 |
|
| 660 |
<p> |
| 661 |
For smaller images, the horizontal position is established |
| 662 |
with one of the <kbd>-L</kbd>, <kbd>-C</kbd>, <kbd>-R</kbd>, or |
| 663 |
<kbd>-I <indent></kbd> arguments, just like |
| 664 |
<a href="images.html#pdf-image">PDF_IMAGE</a>. |
| 665 |
You may instead use the <kbd>X-pos</kbd> argument, provided that it |
| 666 |
is preceded by a <kbd>Y-pos</kbd> argument. The values given to |
| 667 |
<kbd>-I</kbd>, <kbd>Y-pos</kbd> and <kbd>X-pos</kbd> must have a |
| 668 |
<a href="definitions.html#unitofmeasure">unit of measure</a> |
| 669 |
appended to them. |
| 670 |
</p> |
| 671 |
|
| 672 |
<p> |
| 673 |
Vertical positioning of smaller images requires the <kbd>Y-pos</kbd> |
| 674 |
argument (which is why it precedes <kbd>X-pos</kbd> in the order of |
| 675 |
arguments) otherwise the image will be flush with the top edge of |
| 676 |
the printer sheet |
| 677 |
</p> |
| 678 |
|
| 679 |
<p> |
| 680 |
The positioning of images does not effect the placement of type on |
| 681 |
doc cover and cover pages. |
| 682 |
</p> |
| 683 |
|
| 684 |
<div class="box-tip"> |
| 685 |
<p class="tip"> |
| 686 |
<span class="note">Tip:</span> |
| 687 |
The combination of |
| 688 |
<a href="#covertext">COVERTEXT</a> |
| 689 |
and COVER_IMAGE make it possible to design covers entirely to your |
| 690 |
own specifications. |
| 691 |
</p> |
| 692 |
</div> |
| 693 |
|
| 694 |
<div class="macro-id-overline" style="margin-top: .5em"> |
| 695 |
<h3 id="on-off" class="macro-id">Enabling/disabling automatic generation of cover pages</h3> |
| 696 |
</div> |
| 697 |
|
| 698 |
<div id="covers" class="box-macro-args" style="margin-top: .5em"> |
| 699 |
Macro: <b>COVERS</b> <kbd class="macro-args"><toggle></kbd> |
| 700 |
</div> |
| 701 |
|
| 702 |
<div id="doc-covers" class="box-macro-args" style="margin-top: 1em;"> |
| 703 |
Macro: <b>DOC_COVERS</b> <kbd class="macro-args"><toggle></kbd> |
| 704 |
</div> |
| 705 |
|
| 706 |
<p> |
| 707 |
By default, if you give mom a |
| 708 |
<a href="#cover">COVER</a> |
| 709 |
or |
| 710 |
<a href="#doc-cover">DOC_COVER</a> |
| 711 |
directive, she will print the cover or doc cover. In a document |
| 712 |
that contains sections, articles or chapters formerly treated as |
| 713 |
”one-off’s” but now being |
| 714 |
<a href="rectoverso.html#collate-intro">collated</a>, |
| 715 |
such behaviour may not be desirable. |
| 716 |
</p> |
| 717 |
|
| 718 |
<p> |
| 719 |
Mom lets you selectively enable or disable the generation of covers |
| 720 |
and/or doc covers with the toggle macros, COVERS and DOC_COVERS. |
| 721 |
Because they’re toggle macros, simply invoking them by |
| 722 |
themselves enables automatic cover or doc cover generation, while |
| 723 |
invoking them with any argument at all (<kbd>OFF, QUIT, X</kbd>, |
| 724 |
etc) disables cover or doc cover generation. </p> |
| 725 |
|
| 726 |
<div class="box-tip"> |
| 727 |
<p class="tip"> |
| 728 |
<span class="note">Note:</span> |
| 729 |
You must place these macros prior to any instance of |
| 730 |
<a href="docprocessing.html#start">START</a>. |
| 731 |
Since they’re ”on” by default, there’s no |
| 732 |
need to use them if you want covers. However, if you don’t, |
| 733 |
especially in the kind of scenario described above, the best place |
| 734 |
to put them (most likely with an <kbd>OFF, NO, X</kbd>, etc. argument), |
| 735 |
is immediately after the first invocation of START. By doing so, |
| 736 |
you ensure they meet the requirement of preceding all subsequent |
| 737 |
instances of START. |
| 738 |
</p> |
| 739 |
</div> |
| 740 |
|
| 741 |
<div class="rule-short"><hr/></div> |
| 742 |
|
| 743 |
<h2 id="cover-control" class="macro-group">Control macros for doc covers and covers</h2> |
| 744 |
|
| 745 |
<p> |
| 746 |
The default typographic appearance of the items on a doc cover or |
| 747 |
cover is identical to that of the items in a |
| 748 |
<a href="definitions.html#docheader">docheader</a>. |
| 749 |
(See |
| 750 |
<a href="docprocessing.html#docheader-desc">Docheader description</a> |
| 751 |
for a description of the defaults.) |
| 752 |
</p> |
| 753 |
|
| 754 |
<p> |
| 755 |
<a href="docprocessing.html#copyright">COPYRIGHT</a> |
| 756 |
and |
| 757 |
<a href="docprocessing.html#misc">MISC</a>, |
| 758 |
which do not appear in docheaders, have the following default |
| 759 |
characteristics: |
| 760 |
</p> |
| 761 |
<ul style="margin-top: -.5em; margin-bottom: -.5em;"> |
| 762 |
<li>the COPYRIGHT line is set flush with the document’s right |
| 763 |
and bottom margins, 2 |
| 764 |
<a href="definitions.html#ps">point sizes</a> |
| 765 |
smaller than the size of |
| 766 |
<a href="definitions.html#running">running text</a> |
| 767 |
</li> |
| 768 |
<li>MISC lines are set flush with the document’s left and bottom |
| 769 |
margins, in the same family, font and point size as the |
| 770 |
copyright line. |
| 771 |
</li> |
| 772 |
</ul> |
| 773 |
|
| 774 |
<p> |
| 775 |
The defaults for the entirety of doc covers and covers, and all the |
| 776 |
elements thereon, can be changed with control macros whose defaults |
| 777 |
and arguments are identical to the corresponding |
| 778 |
<a href="docprocessing.html#index-docheader-control">Control macros for docheaders</a> |
| 779 |
(q.v.) The only difference is the name by which you invoke them. Wherever |
| 780 |
<kbd>DOCHEADER</kbd> is used for overall changes, replace it |
| 781 |
with <kbd>DOC_COVER</kbd> or <kbd>COVER</kbd>. For part-by-part |
| 782 |
changes, prepend <kbd>DOC_COVER_</kbd> or <kbd>COVER_</kbd> to the |
| 783 |
part/parameter. |
| 784 |
</p> |
| 785 |
|
| 786 |
<p> |
| 787 |
Thus, to change the overall family, color, leading, quad, and |
| 788 |
starting position of a doc cover, you’d do |
| 789 |
<br/> |
| 790 |
<span class="pre-in-pp"> |
| 791 |
.DOC_COVER_FAMILY H |
| 792 |
.DOC_COVER_COLOR blue |
| 793 |
.DOC_COVER_LEAD +2 |
| 794 |
.DOC_COVER_QUAD L |
| 795 |
.DOC_COVER_ADVANCE 3i \" or .DOC_COVER_START_POS 3i |
| 796 |
</span> |
| 797 |
To change the style parameters for selected parts of a cover, you |
| 798 |
might do something like this: |
| 799 |
<br/> |
| 800 |
<span class="pre-in-pp"> |
| 801 |
.COVER_TITLE_FONT B |
| 802 |
.COVER_TITLE_SIZE +4 |
| 803 |
.COVER_SUBTITLE_FONT I |
| 804 |
.COVER_AUTHOR_FONT R |
| 805 |
.COVER_AUTHOR_SPACE_BEFORE 6p |
| 806 |
.COVER_DOCTYPE_COLOR red |
| 807 |
.COVER_MISC_SIZE -1 |
| 808 |
.COVER_MISC_LEAD 12 |
| 809 |
.COVER_COPYRIGHT_SIZE -2 |
| 810 |
.COVER_COPYRIGHT_QUAD L |
| 811 |
.COVER_MISC_QUAD R |
| 812 |
</span> |
| 813 |
Note in the above example that _COPYRIGHT_QUAD and _MISC_QUAD set |
| 814 |
both the horizontal position on the page and the quad direction, |
| 815 |
either L (or LEFT) or R (or RIGHT), and have no corresponding |
| 816 |
docheader control macro. |
| 817 |
</p> |
| 818 |
|
| 819 |
<div class="box-tip"> |
| 820 |
<p class="tip-top"> |
| 821 |
<span class="note">Tip:</span> |
| 822 |
As with the docheader control macros, <kbd>DOC_COVER_</kbd> and |
| 823 |
<kbd>COVER_</kbd> part/parameter style changes may be |
| 824 |
<a href="docprocessing.html#grouping">grouped</a>, |
| 825 |
for example |
| 826 |
<br/> |
| 827 |
<span class="pre-in-pp"> |
| 828 |
.DOC_COVER_TITLE_STYLE \ |
| 829 |
FAMILY A \ |
| 830 |
FONT B \ |
| 831 |
SIZE +4 \ |
| 832 |
CAPS |
| 833 |
</span> |
| 834 |
</p> |
| 835 |
</div> |
| 836 |
|
| 837 |
<!-- Navigation links --> |
| 838 |
<table style="width: 100%; margin-top: 12px;"> |
| 839 |
<tr> |
| 840 |
<td style="width: 33%;"><a href="toc.html">Back to Table of Contents</a></td> |
| 841 |
<td style="width: 33%; text-align: center;"><a href="#top">Top</a></td> |
| 842 |
<td style="width: 33%; text-align: right;"><a href="tables-of-contents.html">Next: Tables of contents</a></td> |
| 843 |
</tr> |
| 844 |
</table> |
| 845 |
|
| 846 |
</div> |
| 847 |
|
| 848 |
<div class="bottom-spacer"><br/></div> |
| 849 |
|
| 850 |
</body> |
| 851 |
</html> |