Mom -- Document processing, creating cover pages

Back to Table of Contents | Next: Tables of contents

# Creating cover pages

- Introduction to cover pages
  - Important note
  - Description of cover pages
  - Headers/footers/pagination and cover pages
  - Designing your own cover pages
- Cover and document cover macros
  - COVER / DOC_COVER
    - The required argument
    - How the CHAPTER argument and friends work
    - The optional arguments
    - What the DOCTYPE argument means
    - What the BLANKPAGE argument means
- Enabling/disabling automatic generation of cover pages
- Control macros for covers and doc covers

## Introduction to cover pages

Though identical in treatment, mom provides two kinds of cover pages: document cover pages (”doc covers”), and section cover pages (which I shall refer to simply as cover pages).

A doc cover is what you’d most likely use at the start of a collated document, where you might want the name of the complete document, the author(s) and the copyright line to appear. Another place you might use a doc cover is for a novel, where you want the title of the novel, not the chapter title or chapter number, as the first cover page.

A cover is what you’d use for pages that separate sections of a collated document, ie title pages. A cover page (but not a doc cover) in a collated document could, for example, simply read: ”PART 1”.

In non-collated documents (say, an essay) you can use either a cover or doc cover to generate the cover sheet.

In addition, nothing prevents you from generating both a doc cover and a cover for every document in a collated document. Or you can selectively disable the automatic generation of either doc covers or covers in a collated document on-the-fly.

Important note: Automatic generation of covers or doc covers after the first one(s) only takes place if you are working with collated documents. Mom provides no mechanism for saying ”print a section cover here even though I'm still working on the same (non-collated) document.”

### Description of cover pages

By default, mom typesets covers and doc covers identically to docheaders (see How to change the look of docheaders for a description of what a docheader looks like). The only differences are

- the position on the page where the information is output
- the (optional) addition of copyright and miscellaneous information
- there’s no running text underneath

You tell mom what you want to appear on cover pages through the arguments you pass to COVER and/or DOC_COVER. Provided you have already given mom the appropriate reference macros (eg TITLE or AUTHOR), she will output covers and doc covers identically to how she would output docheaders containing the same information.

By default, mom starts covers and doc covers one-third of the way down the page. This can be changed through the use of the control macros COVER_ADVANCE / DOC_COVER_ADVANCE.

If you request copyright information (and have already given mom the reference macro, COPYRIGHT), she sets it, by default, in a smaller point size in the bottom right hand corner of the cover or doc cover. The position, as well as all of the standard typesetting parameters, can be altered via control macros.

Similarly, if you request miscellaneous information (and have already given mom the reference macro, MISC), she sets it, by default, in a smaller point size in the bottom left hand corner of the cover or doc cover. As with the copyright, the position and type specs can be altered via control macros.

### Headers/footers/pagination and cover pages

Mom does not set any headers or footers on cover pages. Neither does she set any page numbers. From the point of view of pagination, covers and doc covers are by default considered ”null” pages. If you wish them to be included in the pagination scheme (even though no page numbers appear), you must tell mom that’s what you want with the macros DOC_COVERS_COUNT_PAGES and/or COVERS_COUNT_PAGES.

### Designing your own cover pages

Finally, if you want to design your own cover page(s), you can always typeset them (using the typesetting macros), invoke `.NEWPAGE`, set up your document (see Tutorial – Setting up a mom document), and lastly invoke `.START`. The cover page, and any typesetting commands on it, will have no effect on mom’s processing of the document after you invoke `.START`.

### Cover and document cover macros

- COVER and DOC_COVER
  - Required and optional arguments
- Enabling/disabling automatic generation of cover pages
  - COVERS
  - DOC_COVERS
- Control macros for covers and doc covers

### COVER and DOC_COVER

Macro: COVER `(see required and optional arguments, below)`
Macro: DOC_COVER `(see required and optional arguments, below)`
Required argument: `TITLE | DOCTITLE | COVERTITLE | CHAPTER | CHAPTER_TITLE | CHAPTER+TITLE`
Optional arguments: `[ SUBTITLE AUTHOR DOCTYPE COPYRIGHT MISC BLANKPAGE PDF_OUTLINE_LABEL <label> ]`

Note: These macros should be placed in the style sheet section of your document setup (see Tutorial – Setting up a mom document), ie after PRINTSTYLE (and/or DOCTYPE and/or COPYSTYLE), but before START.

COVER and DOC_COVER behave identically. The reason mom provides two macros for cover page generation is so that you can have two different kinds of covers with different information on each.

Imagine, for a moment, you’ve written a document comprised of three sections. When you COLLATE the document for output, you could use DOC_COVER to generate a cover page that contained the name of the entire document, your (the author’s) name, and perhaps the copyright date. Subsequently, you could use COVER, after each `.COLLATE` but before each `.START`, to generate a cover page (or cover ”sheet”, if you prefer) containing just the name of the section.

#### The required argument

Both COVER and DOC_COVER, whenever invoked, require a first argument, as listed above. This first argument will become the first bit of information mom prints on the cover or doc cover (ie the title).

In order for the information to appear, you must, of course, have given mom the appropriate reference macro. A list of first arguments with their equivalent reference macros follows.

`TITLE`
  – means the argument you gave to TITLE
`DOCTITLE`
  – means the argument you gave to DOCTITLE
`COVERTITLE`
  – means the argument you gave to COVERTITLE or DOC_COVERTITLE
`CHAPTER, CHAPTER_TITLE, CHAPTER+TITLE`
  – see below, How the CHAPTER argument and friends work

##### How the CHAPTER argument and friends work

• CHAPTER
The `CHAPTER` argument will print the CHAPTER_STRING concatenated with the chapter number you gave to CHAPTER. For example, assuming a vanilla setup for your chapter:
.CHAPTER 1 .CHAPTER_TITLE "The Bonny Blue Yonder" .COVER CHAPTER \"(or .DOC_COVER CHAPTER) will print (and only print)
Chapter 1

• CHAPTER_TITLE
The `CHAPTER_TITLE` argument will print the chapter title you gave to CHAPTER_TITLE. For example, assuming a vanilla setup for your chapter:
.CHAPTER 1 .CHAPTER_TITLE "The Bonny Blue Yonder" .COVER CHAPTER_TITLE \"(or .DOC_COVER CHAPTER_TITLE) will print (and only print)
The Bonny Blue Yonder

• CHAPTER+TITLE
The `CHAPTER+TITLE` argument will print both the concatenated chapter string+number and the chapter title. For example, assuming a vanilla setup for your chapter:
.CHAPTER 1 .CHAPTER_TITLE "The Bonny Blue Yonder" .COVER CHAPTER+TITLE \"(or .DOC_COVER CHAPTER+TITLE) will print
Chapter 1 The Bonny Blue Yonder

#### The optional arguments

The remainder of the arguments to COVER and DOC_COVER are optional. They refer specifically to the information you gave the reference macros bearing the same name as the arguments. You may enter as many or as few as you like, in any order.

##### What the DOCTYPE argument means

When you pass COVER or DOC_COVER the argument, `DOCTYPE`, it refers to the argument you gave to DOCTYPE `NAMED`. For example, if, in your docstyle macros you gave a
.DOCTYPE NAMED "Abstract" the argument, `DOCTYPE`, given to the COVER or DOC_COVER macros, would mean that you wanted the word, Abstract, to appear on the cover or doc cover underneath the title and/or author(s), just as it would in the docheader.

##### What the BLANKPAGE argument means

If the final argument to DOC_COVER or COVER is `BLANKPAGE`, mom will insert a blank page after the doc cover or cover. This is particularly useful if you intend to print your document two-sided, since, in two-sided printing, there may be instances where you do not want text on the reverse side of cover or title pages.

If you enable DOC_COVERS_COUNT_PAGES and/or COVERS_COUNT_PAGES, the blank page will be taken into account in the pagination scheme, though no page number appears on it. Otherwise, blank pages are invisible to mom's pagination.

##### What the PDF_OUTLINE_LABEL argument means

By default, mom identifies doccovers in the outline panel of PDF viewers with the prepended string, “Cover:”, and covers with the string “Title Page:”. If you would like to change the strings, pass the `PDF_OUTLINE_LABEL` argument to COVER or DOCCOVER, along with the new string.

### Enabling/disabling automatic generation of cover pages

Macro: COVERS `<toggle>`
Macro: DOC_COVERS `<toggle>`

By default, if you give mom a COVER or DOC_COVER directive, she will print the cover or doc cover. In a document that contains sections, articles or chapters formerly treated as ”one-off’s” but now being collated, such behaviour may not be desirable.

Mom lets you selectively enable or disable the generation of covers and/or doc covers with the toggle macros, COVERS and DOC_COVERS. Because they’re toggle macros, simply invoking them by themselves enables automatic cover or doc cover generation, while invoking them with any argument at all (`OFF, QUIT, X`, etc) disables cover or doc cover generation.

Note: You must place these macros prior to any instance of START. Since they’re ”on” by default, there’s no need to use them if you want covers. However, if you don’t, especially in the kind of scenario described above, the best place to put them (most likely with an `OFF, NO, X`, etc. argument), is immediately after the first invocation of START. By doing so, you ensure they meet the requirement of preceding all subsequent instances of START.

## Control macros for covers and doc covers

The default typographic appearance of the items on a cover or doc cover is identical to that of the items in a docheader. (See Docheader description for a description of the defaults.)

COPYRIGHT and MISC, which do not appear in docheaders, have the following default characteristics:

- the COPYRIGHT line is set in the bottom right hand corner of the page, 2 point sizes smaller than the size of running text
- MISC lines are set in the bottom left hand corner of the page, in the same family, font and point size as the copyright line.

The defaults for the entirety of covers and doc covers, and all the elements thereon, can be changed with control macros whose defaults and arguments are identical to the corresponding control macros governing docheaders. The only difference is the name by which you invoke them.

A complete list of cover and doc cover control macros follows. Please refer to docheader control in order to get the defaults and any special instructions for usage.

### Cover / doc cover control macros and defaults

COVER_ADVANCE DOC_COVER_ADVANCE -+ COVER_FAMILY DOC_COVER_FAMILY | like COVER_LEAD DOC_COVER_LEAD | DOCHEADER_<spec> COVER_QUAD DOC_COVER_QUAD -+ COVER_TITLE_FAMILY DOC_COVER_TITLE_FAMILY -+ COVER_TITLE_FONT DOC_COVER_TITLE_FONT | like COVER_TITLE_COLOR DOC_COVER_TITLE_COLOR | TITLE_<spec> COVER_TITLE_SIZE DOC_COVER_TITLE_SIZE -+ COVER_CHAPTER_TITLE_FAMILY DOC_COVER_CHAPTER_TITLE_FAMILY -+ COVER_CHAPTER_TITLE_FONT DOC_COVER_CHAPTER_TITLE_FONT | like COVER_CHAPTER_TITLE_COLOR DOC_COVER_CHAPTER_TITLE_COLOR | CHAPTER_TITLE_<spec> COVER_CHAPTER_TITLE_SIZE DOC_COVER_CHAPTER_TITLE_SIZE -+ COVER_SUBTITLE_FAMILY DOC_COVER_SUBTITLE_FAMILY -+ COVER_SUBTITLE_FONT DOC_COVER_SUBTITLE_FONT | like COVER_SUBTITLE_COLOR DOC_COVER_SUBTITLE_COLOR | SUBTITLE_<spec> COVER_SUBTITLE_SIZE DOC_COVER_AUTHOR_SIZE -+ COVER_ATTRIBUTE_COLOR DOC_COVER_ATTRIBUTE_COLOR - like ATTRIBUTE_COLOR - the macro, ATTRIBUTE_STRING, controls the attribution string for both docheaders and cover pages; cover pages have no separate ATTRIBUTE_STRING macro COVER_AUTHOR_FAMILY DOC_COVER_AUTHOR_FAMILY -+ COVER_AUTHOR_FONT DOC_COVER_AUTHOR_FONT | like COVER_AUTHOR_COLOR DOC_COVER_AUTHOR_COLOR | AUTHOR_<spec> COVER_AUTHOR_SIZE DOC_COVER_AUTHOR_SIZE -+ COVER_DOCTYPE_FAMILY DOC_COVER_DOCTYPE_FAMILY -+ COVER_DOCTYPE_FONT DOC_COVER_DOCTYPE_FONT | like COVER_DOCTYPE_COLOR DOC_COVER_DOCTYPE_COLOR | DOCTYPE_<spec> COVER_DOCTYPE_SIZE DOC_COVER_DOCTYPE_SIZE -+ COVER_COPYRIGHT_FAMILY DOC_COVER_COPYRIGHT_FAMILY -+ COVER_COPYRIGHT_FONT DOC_COVER_COPYRIGHT_FONT | COVER_COPYRIGHT_COLOR DOC_COVER_COPYRIGHT_COLOR | like any of the above COVER_COPYRIGHT_SIZE DOC_COVER_COPYRIGHT_SIZE | COVER_COPYRIGHT_QUAD DOC_COVER_COPYRIGHT_QUAD -+ - copyright quad sets both the position on the page and the quad direction and can be either L (left) or R (right); default is right COVER_MISC_FAMILY DOC_COVER_MISC_FAMILY -+ COVER_MISC_FONT DOC_COVER_MISC_FONT | COVER_MISC_COLOR DOC_COVER_MISC_COLOR | like any of the above COVER_MISC_SIZE DOC_COVER_MISC_SIZE | COVER_MISC_QUAD DOC_COVER_MISC_QUAD -+ - misc quad sets both the position on the page and the quad direction and can be either L (left) or R (right); default is left COVER_UNDERLINE DOC_COVER_UNDERLINE - like DOCTYPE_UNDERLINE - cover underline controls underlining of the argument given to DOCTYPE NAMED "<name>" only COVER_COUNTS_PAGES DOC_COVER_COUNTS_PAGES - whether to consider cover pages in the pagination scheme; the default is to ignore them - see Note

Note:
COVER_COUNTS_PAGES and DOC_COVER_COUNTS_PAGES are toggle macros, hence invoking them by themselves means that mom will consider covers and doc covers in the pagination scheme; invoking them with any argument (`OFF, NO, X`, etc.) means they are ignored. The default is to ignore them.

Back to Table of Contents | Top | Next: Tables of contents