Initial Windows agent repository
This commit is contained in:
commit
a0db0c2e5b
10589 changed files with 3844063 additions and 0 deletions
901
OGP64/usr/share/doc/groff-1.24.1/html/mom/appendices.html
Normal file
901
OGP64/usr/share/doc/groff-1.24.1/html/mom/appendices.html
Normal file
|
|
@ -0,0 +1,901 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
This file is part of groff, the GNU roff type-setting system.
|
||||
|
||||
Copyright (C) 2004-2020 Free Software Foundation, Inc.
|
||||
Written by Peter Schaffter (peter@schaffter.ca).
|
||||
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.3 or
|
||||
any later version published by the Free Software Foundation; with no
|
||||
Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
|
||||
Texts.
|
||||
|
||||
A copy of the Free Documentation License is included as a file called
|
||||
FDL in the main directory of the groff source package.
|
||||
-->
|
||||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html;charset=utf-8"/>
|
||||
<title>Mom -- Appendices</title>
|
||||
<link rel="stylesheet" type="text/css" href="stylesheet.css" />
|
||||
</head>
|
||||
|
||||
<body style="background-color: #f5faff;">
|
||||
|
||||
<!-- ==================================================================== -->
|
||||
|
||||
<div id="top" class="page">
|
||||
|
||||
<!-- Navigation links -->
|
||||
<table style="width: 100%;">
|
||||
<tr>
|
||||
<td><a href="toc.html">Back to Table of Contents</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h1 id="appendices" class="docs">Appendices</h1>
|
||||
|
||||
<div style="width: 68%; margin: auto;">
|
||||
<ul class="no-enumerator">
|
||||
<li><a href="#fonts">Adding fonts to groff</a>
|
||||
<ul style="margin-left: -.5em; list-style-type: disc">
|
||||
<li><a href="#extending">Extending groff families / adding new families and fonts</a>
|
||||
<ul style="margin-left: -.5em; list-style-type: circle">
|
||||
<li><a href="#traditional">The traditional approach</a></li>
|
||||
<li><a href="#simpler">The simpler way with mom</a></li>
|
||||
</ul></li>
|
||||
<li><a href="#steps">Step-by-step instructions</a></li>
|
||||
<li><a href="#install-font">Automate the whole process – the install-font script</a></li>
|
||||
</ul></li>
|
||||
<li><a href="#codenotes">Some reflections on mom</a></li>
|
||||
<li><a href="#contact">Contact the author</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="rule-medium"><hr/></div>
|
||||
|
||||
<h2 id="fonts" class="docs">Adding fonts to groff</h2>
|
||||
|
||||
<div id="small-note" class="box-tip">
|
||||
<p class="tip-top">
|
||||
<kbd><prefix></kbd>, in this section, refers
|
||||
to the directory in which groff is installed, typically
|
||||
<br/>
|
||||
<span class="pre-in-pp">
|
||||
/usr/share/groff/
|
||||
</span>
|
||||
(for distro-specific, pre-compiled groff packages) or
|
||||
<br/>
|
||||
<span class="pre-in-pp">
|
||||
/usr/local/share/groff/
|
||||
</span>
|
||||
(if you’ve built groff from source).
|
||||
</p>
|
||||
|
||||
<p class="tip-bottom">
|
||||
<kbd><version></kbd> refers to the groff version number, which
|
||||
can be found, if necessary, by typing
|
||||
<br/>
|
||||
<span class="pre-in-pp">
|
||||
groff -v
|
||||
</span>
|
||||
at the command line.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
Groff comes with a small library of
|
||||
<a href="definitions.html#family">families</a>
|
||||
(see the
|
||||
<a href="typesetting.html#family">FAMILY</a>
|
||||
macro for a list). The families have four
|
||||
<a href="definitions.html#font">fonts</a>
|
||||
associated with them. These fonts are a combination of
|
||||
<a href="definitions.html#weight">weight</a>
|
||||
and
|
||||
<a href="definitions.html#shape">shape</a>:
|
||||
<br/>
|
||||
<span class="pre-in-pp">
|
||||
R (Roman, usually Medium weight),
|
||||
I (Italic, usually Medium weight),
|
||||
B (Bold, usually Roman shape) and
|
||||
BI (Bold Italic)
|
||||
</span>
|
||||
If you work with mom a lot, sooner or later you’ll find that these
|
||||
families and their associated fonts aren’t sufficient. You’ll
|
||||
want to supplement them, either with more fonts for the families
|
||||
already provided—<i>Damn! I need Helvetica Bold Condensed
|
||||
Italic</i>—or with entire new families.
|
||||
</p>
|
||||
|
||||
<h3 id="extending" class="docs">Extending groff families / adding new families and fonts</h3>
|
||||
|
||||
<h4 id="traditional" class="docs">The traditional approach</h4>
|
||||
|
||||
<p>
|
||||
The traditional approach to extending groff families has been
|
||||
to create new families for non-default weights and shapes (e.g.
|
||||
<b>Light</b>, which is a
|
||||
<a href="definitions.html#weight">weight</a>,
|
||||
or <b>Condensed</b>, which is a
|
||||
<a href="definitions.html#shape">shape</a>),
|
||||
then to associate them with groff’s predefined <b>R,
|
||||
I, B</b> and <b>BI</b> font styles. An example of this
|
||||
can be seen in the groff PostScript font library itself, which is
|
||||
found in
|
||||
<br/>
|
||||
<span class="pre-in-pp">
|
||||
<prefix>/<version>/font/devps/
|
||||
</span>
|
||||
There’s one “family” for Helvetica (<b>HR</b>,
|
||||
<b>HI</b>, <b>HB</b>, <b>HBI</b>) and another for Helvetica Narrow
|
||||
(<b>HNR</b>, <b>HNI</b>, <b>HNB</b>, <b>HNBI</b>).
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The difficulty with this approach is that typographers tend to
|
||||
think of families as referring to the entire set of font weights
|
||||
and shapes associated with a family name. For example, when
|
||||
a typesetter says “the Helvetica family”, s/he is
|
||||
including the weights Helvetica Thin, Helvetica Light, Helvetica
|
||||
Regular, Helvetica Bold, Helvetica Heavy, etc, and all their
|
||||
associated shapes (Roman, Italic, Condensed, Narrow, Extended,
|
||||
Outline, etc).
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Thus, intuitively, when a typesetter gives mom a
|
||||
<kbd>.FAMILY H</kbd> directive, s/he reasonably expects that
|
||||
any subsequent <kbd>.FT</kbd> directive will access the desired font
|
||||
from the Helvetica family—without the need to state explicitly
|
||||
both family and font to <kbd>.FT</kbd>, as it is explained one can
|
||||
do in the
|
||||
<a href="typesetting.html#family">FAMILY</a>
|
||||
and
|
||||
<a href="typesetting.html#font">FT</a>
|
||||
sections of these documents.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
If one had, say, Helvetica Light Roman and Helvetica Light Italic
|
||||
as well as Helvetica Light Condensed Roman and Helvetica Light
|
||||
Condensed Italic, the established groff approach would require two
|
||||
“partial” families, <b>HL</b> (for Helvetica Light)
|
||||
and <b>HLCD</b> (for Helvetica Light Condensed), with <b>R</b> and
|
||||
<b>I</b> fonts for both:
|
||||
<br/>
|
||||
<span class="pre-in-pp">
|
||||
HLR
|
||||
HLI
|
||||
HLCDR
|
||||
HLCDI
|
||||
</span>
|
||||
Accessing these family/font combos routinely
|
||||
throughout a document would then require changing the family
|
||||
(with <kbd>.FAMILY</kbd>) and selecting the desired font
|
||||
(with <kbd>.FT R</kbd> or <kbd>.FT I</kbd>), or
|
||||
passing <kbd>.FT</kbd> the lengthy family+fontname (.e.g.
|
||||
<kbd>.FT HLCDI</kbd>).
|
||||
</p>
|
||||
|
||||
<h4 id="simpler" class="docs">The simpler way with mom</h4>
|
||||
|
||||
<p>
|
||||
Fortunately, groff provides a mechanism whereby it’s possible
|
||||
to extend the basic <b>R</b>, <b>I</b>, <b>B</b>, and <b>BI</b> fonts
|
||||
(“styles” in groff-speak) so that one can, in fact,
|
||||
create extensive type families, and access all the fonts in them
|
||||
with <kbd>.ft</kbd> (groff) or <kbd>.FT</kbd> (mom).
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Mom uses this mechanism to offer, in addition to groff’s
|
||||
default font styles, the following:
|
||||
</p>
|
||||
|
||||
<div class="examples-container" style="padding-bottom: 1em;">
|
||||
<div id="style-extensions" style="width: 50%; float: left;">
|
||||
<span class="pre" style="font-size: 85%">
|
||||
UL = Ultra Light
|
||||
ULI = Ultra Light Italic
|
||||
ULCD = Ultra Light Condensed
|
||||
ULCDI = Ultra Light Condensed Italic
|
||||
ULEX = Ultra Light Extended
|
||||
ULEXI = Ultra Light Extended Italic
|
||||
|
||||
XL = Extra Light
|
||||
XLI = Extra Light Italic
|
||||
XLCD = Extra Light Condensed
|
||||
XLCDI = Extra Light Condensed Italic
|
||||
XLEX = Extra Light Extended
|
||||
XLEXI = Extra Light Extended Italic
|
||||
|
||||
TH = Thin
|
||||
THI = Thin Italic
|
||||
THCD = Thin Condensed
|
||||
THCDI = Thin Condensed Italic
|
||||
THEX = Thin Extended
|
||||
THEXI = Thin Extended Italic
|
||||
|
||||
L = Light Roman
|
||||
LI = Light Italic
|
||||
LCD = Light Condensed
|
||||
LCDI = Light Condensed Italic
|
||||
LEX = Light Extended
|
||||
LEXI = Light Extended Italic
|
||||
|
||||
BK = Book Roman
|
||||
BKI = Book Italic
|
||||
BKCD = Book Condensed
|
||||
BKCDI = Book Condensed Italic
|
||||
BKEX = Book Extended
|
||||
BKEXI = Book Extended Italic
|
||||
|
||||
CD = Medium Condensed
|
||||
CDI = Medium Condensed Italic
|
||||
EX = Medium Extended
|
||||
EXI = Medium Extended Italic
|
||||
|
||||
DB = DemiBold Roman
|
||||
DBI = DemiBold Italic
|
||||
DBCD = DemiBold Condensed
|
||||
DBCDI = DemiBold Condensed Italic
|
||||
DBEX = DemiBold Extended
|
||||
DBEXI = DemiBold Extended Italic
|
||||
|
||||
SB = SemiBold Roman
|
||||
SBI = SemiBold Italic
|
||||
SBCD = SemiBold Condensed
|
||||
SBCDI = SemiBold Condensed Italic
|
||||
SBEX = SemiBold Extended
|
||||
SBEXI = SemiBold Extended Italic
|
||||
</span>
|
||||
</div>
|
||||
<span class="pre" style="font-size: 85%">
|
||||
BCD = Bold Condensed
|
||||
BCDI = Bold Condensed Italic
|
||||
BEX = Bold Extended
|
||||
BEXI = Bold Extended Italic
|
||||
BO = Bold Outline
|
||||
|
||||
XB = Extra Bold
|
||||
XBI = Extra Bold Italic
|
||||
XBCD = Extra Bold Condensed
|
||||
XBCDI = Extra Bold Condensed Italic
|
||||
XBEX = Extra Bold Extended
|
||||
XBEXI = Extra Bold Extended Italic
|
||||
|
||||
UB = Ultra Bold
|
||||
UBI = Ultra Bold Italic
|
||||
UBCD = Ultra Bold Condensed
|
||||
UBCDI = Ultra Bold Condensed Italic
|
||||
UBEX = Ultra Bold Extended
|
||||
UBEXI = Ultra Bold Extended Italic
|
||||
|
||||
HV = Heavy
|
||||
HVI = Heavy Italic
|
||||
HVCD = Heavy Condensed
|
||||
HVCDI = Heavy Condensed Italic
|
||||
HVEX = Heavy Extended
|
||||
HVEXI = Heavy Extended Italic
|
||||
|
||||
BL = Black
|
||||
BLI = Black Italic
|
||||
BLCD = Black Condensed
|
||||
BLCDI = Black Condensed Italic
|
||||
BLEX = Black Extended
|
||||
BLEXI = Black Extended Italic
|
||||
BLO = Black Outline
|
||||
|
||||
XBL = Extra Black
|
||||
XBLI = Extra Black Italic
|
||||
XBLCD = Extra Black
|
||||
XBLCDI = Extra Black
|
||||
XBLEX = Extra Black Italic
|
||||
XBLEXI = Extra Black Italic
|
||||
|
||||
UBL = Ultra Black
|
||||
UBLI = Ultra Black Italic
|
||||
UBLCD = Ultra Black Condensed
|
||||
UBLCDI = Ultra Black Condensed Italic
|
||||
UBLEX = Ultra Black Extended
|
||||
UBLEXI = Ultra Black Extended Italic
|
||||
|
||||
SC = Small Caps Roman
|
||||
SCI = Small Caps Italic
|
||||
SCDB = Small Caps Demibold
|
||||
SCDBI = Small Caps Demibold Italic
|
||||
SCSB = Small Caps Semibold
|
||||
SCSBI = Small Caps Semibold Italic
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<p style="clear: both;">
|
||||
Thus, with mom, if you’ve installed some extra
|
||||
Helvetica fonts and named them according to the convention
|
||||
<kbd><F><S></kbd> (where <kbd><F></kbd> means
|
||||
family and <kbd><S></kbd> means font style), once having
|
||||
entered
|
||||
<br/>
|
||||
<span class="pre-in-pp" style="margin-bottom: -1em;">
|
||||
.FAMILY H
|
||||
</span>
|
||||
you can access any of the extra Helvetica fonts simply by passing
|
||||
the correct argument to
|
||||
<a href="typesetting.html#font">FT</a>
|
||||
from the list, above. For example, if you were working in Medium
|
||||
Roman (<kbd>.FT R</kbd>) and you needed Medium Condensed Italic
|
||||
for a while (assuming it’s installed), you’d just type
|
||||
<br/>
|
||||
<span class="pre-in-pp" style="margin-bottom: -1em;">
|
||||
.FT CDI
|
||||
</span>
|
||||
to access the Medium Condensed Italic font from the Helvetica
|
||||
family.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Mom’s list of font styles doesn’t pretend to be
|
||||
exhaustive. The extension names are arbitrary and can be used in a
|
||||
flexible manner. For example, if you create a family that has a
|
||||
Demibold font (<b>DB</b>) but no Bold font (<b>B</b>), you might
|
||||
find it more convenient to give the Demibold font the extension
|
||||
“<b>B</b>”.
|
||||
</p>
|
||||
|
||||
<p id="register-style">
|
||||
You may, at needs, want to add to mom’s list of font styles.
|
||||
You can do this by editing the file, om.tmac (typical location:
|
||||
<kbd><prefix>/<version>/tmac/om.tmac</kbd>). Near the
|
||||
top, you’ll see lines of the form
|
||||
<br/>
|
||||
<span class="pre-in-pp">
|
||||
.sty \n[.fp] XL \" Extra Light
|
||||
.sty \n[.fp] L \" Light Roman
|
||||
.sty \n[.fp] LI \" Light Italic
|
||||
.sty \n[.fp] LCD \" Light Condensed Roman
|
||||
</span>
|
||||
Simply add your new font style by imitating what you see, above,
|
||||
and plugging in your new font style (having, of course,
|
||||
added the font to groff, correctly named); see
|
||||
<a href="#steps">Step-by-step instructions</a>).
|
||||
</p>
|
||||
|
||||
<p>
|
||||
For example, if you already have some fonts from the Univers family
|
||||
installed and have called the family <b>Univers</b>, you might decide at
|
||||
some point to add the Bold Outline font (<b>UniversBO</b>). In which
|
||||
case, you’d add
|
||||
<br/>
|
||||
<span class="pre-in-pp">
|
||||
.sty \n[.fp] BO \" Bold Outline
|
||||
</span>
|
||||
to the <kbd>.sty \n[.fp] <font style></kbd> list
|
||||
in om.tmac.
|
||||
</p>
|
||||
|
||||
<div class="box-tip">
|
||||
<p class="tip">
|
||||
<span class="note">Note:</span>
|
||||
Mom’s font extensions are not “user-space”
|
||||
controllable via a macro. If you’ve been using groff for
|
||||
a long time, and have already rolled your own solution to adding
|
||||
families and fonts to groff, you may find that mom’s font
|
||||
extensions conflict with your own scheme. Should that be the case,
|
||||
comment out the <kbd>.sty \n[.fp] <font style></kbd>
|
||||
lines found near the top of the <kbd>om.tmac</kbd> file.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="box-important">
|
||||
<p class="tip">
|
||||
<span class="important">Important:</span>
|
||||
Be careful that any styles you add do not conflict with
|
||||
<i>family</i> names that already exist. “<b>C</b>”,
|
||||
for example, conflicts with the Courier family (<b>CR</b>,
|
||||
<b>CI</b>, <b>CB</b>, <b>CI</b>). Were you to create a font
|
||||
style “<b>C</b>”, thinking that <kbd>.FT C</kbd>
|
||||
would give you access to font style once you’d given a
|
||||
<kbd>.FAMILY</kbd> directive, you’d get a nasty surprise:
|
||||
your type would come out in Courier Roman!
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="rule-medium"><hr/></div>
|
||||
|
||||
<h2 id="steps" class="docs">Step-by-step instructions</h2>
|
||||
|
||||
<div>
|
||||
<ul class="no-enumerator" style="margin-left: -1.5em;">
|
||||
<li><a href="#need">What you need before you start</a></li>
|
||||
<li><a href="#preparation">Initial preparation</a></li>
|
||||
<li><a href="#step-1">1. Acquire the font</a></li>
|
||||
<li><a href="#step-2">2. Prepare to convert the font to the correct format</a>
|
||||
<ul style="margin-left: -.5em">
|
||||
<li><a href="#ttf">TTF fonts</a></li>
|
||||
<li><a href="#type1">Type 1 fonts</a></li>
|
||||
</ul></li>
|
||||
<li><a href="#step-3">3. Convert the font and put it in the right place</a></li>
|
||||
<li><a href="#step-4">4. Update the download file</a>
|
||||
<ul style="margin-left: -.5em">
|
||||
<li><a href="#internal">Get the internal font name</a></li>
|
||||
<li><a href="#add">Add the font to the download file</a></li>
|
||||
<li><a href="#gropdf-download">Updating the gropdf download file</a></li>
|
||||
</ul></li>
|
||||
<li><a href="#groff-font-names">Naming groff fonts</a></li>
|
||||
<li><a href="#install-font">Automate the whole process – the install-font script</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
<p>
|
||||
There are a number of ways to approach making fonts available
|
||||
to groff. These instructions aren’t meant to cover all
|
||||
possibilities, merely one.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
GNU/Linux distributions being what they are, directory locations
|
||||
may differ and the presence of some executable can’t be
|
||||
guaranteed. I run a Debian-based system. The instructions reflect
|
||||
that. Users of other distros may have to interpret them according
|
||||
to the way their distro operates.
|
||||
</p>
|
||||
|
||||
<h3 id="need" class="docs appendices">What you need before you start</h3>
|
||||
|
||||
<ul style="margin-top: 1em; margin-left: -.5em;">
|
||||
<li>groff, version 1.18 or higher<br/>
|
||||
(Debian package: groff)
|
||||
</li>
|
||||
<li>ghostscript<br/>
|
||||
(Debian package: ghostscript or ghostscript-x)
|
||||
</li>
|
||||
<li>fontforge<br/>
|
||||
(Debian package: fontforge)
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3 id="preparation" class="docs appendices">Initial preparation (you only need do this once)</h3>
|
||||
|
||||
<ol id="site-font" style="margin-left: -1em;">
|
||||
<li>
|
||||
Locate the groff directory,
|
||||
<kbd class="nobr">site-font</kbd>. The exact location is
|
||||
difficult to predict, owing to differences between distros and
|
||||
whether you’re using a pre-packaged groff or have built
|
||||
it from source. Some typical locations are:
|
||||
<br/>
|
||||
<span class="pre-in-pp" style="margin-bottom: -2em;">
|
||||
/usr/share/groff/
|
||||
/usr/local/share/groff/
|
||||
/etc/groff/
|
||||
</span>
|
||||
If you can’t find the site-font directory, locate
|
||||
groff’s <kbd class="nobr">site-tmac</kbd> directory, and, as root,
|
||||
create site-font in the same directory. Eg, if you find
|
||||
site-tmac in <kbd class="nobr">/usr/share/groff/</kbd>, create site-font in
|
||||
<kbd class="nobr">/usr/share/groff/</kbd>
|
||||
<br/>
|
||||
<span class="pre-in-pp" style="margin-bottom: -2em;">
|
||||
sudo mkdir site-font
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
Create two files, generate-t42.pe and generate-pfa.pe,
|
||||
as you see them below. Place them in a convenient and
|
||||
easily-remembered location, like your home directory.
|
||||
<br/>
|
||||
<span class="examples" style="font-size: 95%; display: block; margin-top: .5em;">generate-t42.pe</span>
|
||||
|
||||
<div class="examples-container" style="margin-top: 0; margin-bottom: -1em; padding-bottom: 1em;">
|
||||
<span class="pre">
|
||||
# generate-t42.pe
|
||||
|
||||
Open($1);
|
||||
Generate($fontname + ".pfa");
|
||||
Generate($fontname + ".t42");
|
||||
</span>
|
||||
</div>
|
||||
<br/>
|
||||
<span class="examples" style="font-size: 95%; display: block; margin-top: .5em;">generate-pfa.pe</span>
|
||||
<div class="examples-container" style="margin-top: 0; padding-bottom: 1em;">
|
||||
<span class="pre">
|
||||
# generate-pfa.pe
|
||||
|
||||
Open($1);
|
||||
Generate($fontname + ".pfa");
|
||||
</span>
|
||||
</div>
|
||||
</li>
|
||||
</ol>
|
||||
|
||||
<h3 id="step-1" class="docs appendices">Step 1: Acquire the font</h3>
|
||||
|
||||
<p class="top">
|
||||
The two most commonly available types of fonts are PostScript Type1
|
||||
(extension .pfb) and TrueType (extension .ttf). Either can be made
|
||||
available to groff. There are many websites holding collections of
|
||||
both.
|
||||
</p>
|
||||
|
||||
<h3 id="step-2" class="docs appendices">Step 2: Prepare to convert the font to the correct format</h3>
|
||||
|
||||
<p class="top">
|
||||
Change into the directory holding the new font.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
For convenience in the next step, make a symbolic link to
|
||||
the file 'textmap':
|
||||
<br/>
|
||||
<span class="pre-in-pp">
|
||||
ln -s <prefix>/<version>/font/devps/generate/textmap .
|
||||
</span>
|
||||
See
|
||||
<a href="#small-note">here</a>
|
||||
for an explanation of <kbd><prefix></kbd>
|
||||
and <kbd><version></kbd>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
In addition, unless you’re installing fonts from your home
|
||||
directory, make links to the files 'generate-t42.pe' and
|
||||
'generate-pfa.pe'.
|
||||
<br/>
|
||||
<span class="pre-in-pp">
|
||||
ln -s $HOME/generate-t42.pe .
|
||||
ln -s $HOME/generate-pfa.pe .
|
||||
</span>
|
||||
</p>
|
||||
|
||||
<h3 id="step-3" class="docs appendices">Step 3: Convert the font and put it in the right place</h3>
|
||||
|
||||
<p class="top">
|
||||
TrueType fonts (.ttf) need to be converted to .t42. Type 1 fonts
|
||||
(.pfa, .pfb) need to be converted to .pfa.
|
||||
</p>
|
||||
|
||||
<h4 id="ttf" class="docs" style="font-size: 90%; text-transform: uppercase;"> • Converting TTF Fonts</h4>
|
||||
|
||||
<p class="top" style="margin-top: .5em;">
|
||||
For .ttf fonts, run
|
||||
<br/>
|
||||
<span class="pre-in-pp">
|
||||
fontforge -script generate-t42.pe <file>.ttf
|
||||
</span>
|
||||
This will create three new files with the extensions .t42, .pfa, and
|
||||
.afm. Next, run
|
||||
<br/>
|
||||
<span class="pre-in-pp">
|
||||
afmtodit <afm file> textmap <groff font>
|
||||
</span>
|
||||
This will create a groff font with the name you give. (See
|
||||
<a href="#groff-font-names">here</a>
|
||||
for advice on naming groff fonts.)
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Move the .t42 and groff font files to
|
||||
<kbd class="nobr"><prefix>/site-font/devps/</kbd>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
If you’re running a recent version of groff that includes
|
||||
the native pdf device (gropdf), move the .pfa file to <kbd
|
||||
class="nobr"><prefix>/site-font/devpdf/</kbd>. If not, you
|
||||
may safely remove it. You may also safely remove the .afm file.
|
||||
</p>
|
||||
|
||||
<h4 id="type1" class="docs" style="font-size: 90%; text-transform: uppercase;"> • Converting Type1 Fonts</h4>
|
||||
|
||||
<p class="top" style="margin-top: .5em;">
|
||||
For .pfb fonts, run
|
||||
<br/>
|
||||
<span class="pre-in-pp">
|
||||
fontforge -script generate-pfa.pe <file>.pfb
|
||||
</span>
|
||||
This will create two new files with the extensions .pfa, and .afm.
|
||||
Next, run
|
||||
<br/>
|
||||
<span class="pre-in-pp">
|
||||
afmtodit <afm file> textmap <groff font>
|
||||
</span>
|
||||
Move the .pfa and groff font files to
|
||||
<kbd class="nobr"><prefix>/<site-font>/devps/</kbd>.
|
||||
(See
|
||||
<a href="#groff-font-names">here</a>
|
||||
for advice on naming groff fonts.)
|
||||
</p>
|
||||
|
||||
<p>
|
||||
If you’re running a recent version of groff that includes the
|
||||
native pdf device (gropdf), link the .pfa and groff font files, now
|
||||
in <kbd class="nobr"><prefix>/<site-font>/devps/</kbd>,
|
||||
to the <kbd class="nobr"><prefix>/site-font/devpdf</kbd>
|
||||
directory.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Start by changing into the
|
||||
<kbd class="nobr"><prefix>/site-font/devpdf/</kbd>
|
||||
directory, then:
|
||||
<br/>
|
||||
<span class="pre-in-pp">
|
||||
ln -s <prefix>/<site-font>/devps/<file>.pfa .
|
||||
ln -s <prefix>/<site-font>/devps/<groff font> .
|
||||
</span>
|
||||
You may safely remove the .afm file.
|
||||
</p>
|
||||
|
||||
<h3 id="step-4" class="docs appendices">Step 4: Update the download file</h3>
|
||||
|
||||
<h4 id="internal" class="docs" style="font-size: 90%; text-transform: uppercase;"> • Get the internal font name</h4>
|
||||
|
||||
<p class="top" style="margin-top: .5em;">
|
||||
Inspect your new groff font file. Near the top, you will see a line
|
||||
of the form
|
||||
<br/>
|
||||
<span class="pre-in-pp">
|
||||
internalname <name>
|
||||
</span>
|
||||
Usually, the internal name is helpfully descriptive, e.g.
|
||||
<br/>
|
||||
<span class="pre-in-pp">
|
||||
internalname Optima-Bold
|
||||
</span>
|
||||
Make a note of the internal name.
|
||||
</p>
|
||||
|
||||
<h4 id="add" class="docs" style="font-size: 90%; text-transform: uppercase;"> • Add the font to the download file</h4>
|
||||
|
||||
<p class="top" style="margin-top: .5em;">
|
||||
If a file called ‘download’ is not already present in
|
||||
<kbd class="nobr"><prefix>/site-font/devps/</kbd>,
|
||||
copy over the one found in
|
||||
<kbd class="nobr"><prefix>/<version>/font/devps/</kbd>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The download file maps the internal names used by groff to the
|
||||
actual fonts. To add your new font to the download file, append a
|
||||
line containing the internal name, followed by a tab (make sure your
|
||||
text editor is inserting the tab character, not spaces), followed by
|
||||
the .t42 or .pfa font to which the internal name refers.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
For example, if the internal name is Optima-Bold and the font is a
|
||||
.pfa file called Optima-Bold.pfa, your updated download file will
|
||||
contain
|
||||
<br/>
|
||||
<span class="pre-in-pp">
|
||||
Optima-Bold<tab>Optima-Bold.pfa
|
||||
</span>
|
||||
</p>
|
||||
|
||||
<h4 id="gropdf-download" class="docs" style="font-size: 90%; text-transform: uppercase;"> • Updating the gropdf download file</h4>
|
||||
|
||||
<p class="top" style="margin-top: .5em;">
|
||||
If you’re running a recent version of groff that includes
|
||||
the native pdf device (gropdf), you must update the
|
||||
<kbd class="nobr"><prefix>/site-font/devpdf/download</kbd>
|
||||
file as well. If it does not exist, create it.
|
||||
</p>
|
||||
|
||||
<div class="box-tip">
|
||||
<p class="tip">
|
||||
<span class="note">Note:</span>
|
||||
Start with a blank ‘download’ file. Do not copy
|
||||
over the ‘download’ file from
|
||||
<kbd class="nobr"><prefix>/<version>/font/devpdf/</kbd>.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
The instructions for registering fonts in the
|
||||
<kbd class="nobr"><prefix>/site-font/devpdf/</kbd> download
|
||||
file are identical to those for PostScript fonts (see above), but
|
||||
with one important difference: the lines must all begin with a tab
|
||||
character. Thus, using our Optima example, your
|
||||
<kbd class="nobr"><prefix>/site-font/devpdf/download</kbd>
|
||||
file download line for the same font is
|
||||
<br/>
|
||||
<span class="pre-in-pp">
|
||||
<tab>Optima-Bold<tab>Optima-Bold.pfa
|
||||
</span>
|
||||
</p>
|
||||
|
||||
<h3 id="groff-font-names" class="docs appendices">Naming groff fonts</h3>
|
||||
|
||||
<p class="top">
|
||||
For convenience when using mom, and to keep your font collection
|
||||
organized, choose meaningful groff font names following the scheme
|
||||
<Family><FONT>, where Family is something
|
||||
like Optima or Univers or Clarendon, and FONT is either
|
||||
<br/>
|
||||
<span style="display: block; margin-left: 2em;">
|
||||
<kbd>R </kbd>(roman/regular)
|
||||
<br/>
|
||||
<kbd>I </kbd>(italic)
|
||||
<br/>
|
||||
<kbd>B </kbd>(bold)
|
||||
<br/>
|
||||
<kbd>BI </kbd>(bold italic)
|
||||
</span>
|
||||
or one of the 1–5 character fontstyles listed
|
||||
<a href="#style-extensions">here</a>.
|
||||
Thus, for the fonts Optima Light Italic and Optima Extra Black, your font names would be
|
||||
<br/>
|
||||
<span class="pre-in-pp">
|
||||
OptimaLI
|
||||
OptimaXBL
|
||||
</span>
|
||||
This scheme allows you to enter <kbd>.FAMILY Optima</kbd> to make
|
||||
Optima the current family, and <kbd>.FT LI</kbd> or <kbd>.FT XBL</kbd>
|
||||
when you need the fonts Light Italic or Extra Black.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Groff font names are, in fact, arbitrary; you can call your fonts
|
||||
anything you like, provided the
|
||||
<a href="#internal">internal name</a>
|
||||
in the
|
||||
<a href="#add">download file</a>
|
||||
matches the internal name found in the groff font file. When
|
||||
calling a font that does not follow the recommended naming convention,
|
||||
you must pass the full font name to <kbd>.FT</kbd> whenever you wish
|
||||
to use it.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
For example, the font, Goudy Stout, isn’t really part of the
|
||||
Goudy family, and while "stout" describes it, Stout is not a
|
||||
recognized font style. Therefore, its groff name could simply be
|
||||
GoudyStout, and whenever you needed it, you could call it with
|
||||
<kbd>.FT GoudyStout</kbd>.
|
||||
</p>
|
||||
|
||||
<h3 id="install-font" class="docs appendices">Automate the whole process – the install-font script</h3>
|
||||
|
||||
<p>
|
||||
A bash script to make the entire process of installing fonts a
|
||||
painless no-brainer has been posted online at
|
||||
<a href="https://www.schaffter.ca/mom/bin/install-font.sh">https://www.schaffter.ca/mom/bin/install-font.sh</a>.
|
||||
Be sure to make the script executable
|
||||
(<kbd class="nobr">chmod 755 install-font</kbd>)
|
||||
after you download it, then type <kbd>./install-font.sh -H</kbd> for
|
||||
usage.
|
||||
</p>
|
||||
|
||||
<div class="rule-medium" style="margin-top: 2em;"><hr/></div>
|
||||
|
||||
<!-- ===================================================================== -->
|
||||
|
||||
<h2 id="codenotes" class="docs">Some reflections on mom</h2>
|
||||
|
||||
<p>
|
||||
If, as Eric Raymond asserts, open source begins with a programmer
|
||||
scratching a personal itch, then mom can truly be called open
|
||||
source.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Mom had her origins in a library of groff routines I wrote over
|
||||
the years to handle various aspects of typesetting and document
|
||||
processing that weren’t adequately covered by ms, me, mm, and
|
||||
friends. Typically, I’d use the library to cobble together
|
||||
macro sets for new challenges as they came my way.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
As a writer living in a perpetual state of penury, all the computers
|
||||
I’ve ever owned have been hand-me-downs—several
|
||||
generations out-of-date and resource challenged. Disk space has
|
||||
always been an issue, as has processor speed and available RAM. One
|
||||
of the reasons I run GNU/Linux rather than the offering from Redmond
|
||||
is that it has helped enormously to get the most out of my poor
|
||||
little boxes.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
In Linux-land (all Unix variants, in fact), the choice of
|
||||
typesetting systems basically comes down to groff or TeX. Both are
|
||||
wonderful—monumental achievements if you ask me—and both
|
||||
have their own particular strengths. However, for people in my
|
||||
financial position (and there are millions of us around the globe,
|
||||
in both developed and developing countries), TeX and groff have one
|
||||
big difference: size. TeX is huge. Even its most ardent supporters
|
||||
agree it suffers from bloat, on top of being complex and unwieldy to
|
||||
manage. Groff is tiny by comparison, occupying minimal disk space
|
||||
and having only a small memory footprint while at the same time
|
||||
being flexible and powerful, typographically speaking. Back in the
|
||||
Jurassic Period, I ran it successfully on a 386 with 8 megs of RAM
|
||||
and a 250 meg hard disk.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
However, groff has always had a liability: it’s incredibly geeky.
|
||||
Owing to its very long history, it—and its power users
|
||||
—seem to have remained stuck in a time warp. The canonical macro packages
|
||||
still look as they did back in those decades when memory was exorbitantly
|
||||
expensive and every byte mattered.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
For some time now, groff users and macro writers have had the option
|
||||
to use “long” names for macros (i.e. longer than two
|
||||
letters, the original limit), yet have mostly chosen not to. With
|
||||
long names, it’s possible to create macro sets that are
|
||||
humanly readable and easy to interpret, encouraging development and
|
||||
evolution. What’s more, the macros themselves need not be
|
||||
terse, intimidating, and easily forgotten 1- or 2-letter commands
|
||||
inserted in the body of a document. They can be sensible and
|
||||
helpful to everyone, groff newbies and old hands alike.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Mom’s macro file, om.tmac, uses long names, aliases, and a
|
||||
host of other groff goodies that have become part of the whole groff
|
||||
picture. The function of nearly every macro, number register and
|
||||
string can be inferred simply from its name. The file is heavily
|
||||
commented. A consistent, if idiosyncratic, indenting style is used
|
||||
as well, significantly improving readability. Anyone wanting to
|
||||
futz around with mom’s macros should be able to do so with a
|
||||
minimum of head scratching.
|
||||
</p>
|
||||
|
||||
<div class="rule-medium"><hr/></div>
|
||||
|
||||
<!-- ===================================================================== -->
|
||||
|
||||
<h2 id="contact" class="docs">Contact the author</h2>
|
||||
|
||||
<p>
|
||||
If you have any questions or comments about mom, suggestions to
|
||||
make, criticisms to offer, or bugs to report, use the groff mailing
|
||||
list (subscription information available
|
||||
<a href="http://www.gnu.org/software/groff/groff.html">here</a>)
|
||||
or contact me, Peter Schaffter, directly at the following
|
||||
address:
|
||||
<br/>
|
||||
<span class="pre-in-pp">
|
||||
peter@schaffter.ca
|
||||
</span>
|
||||
Please include the word “mom” or “groff” in
|
||||
the Subject line of any message sent to my personal address or you
|
||||
risk the wrath of my implacable spam filters.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
If you want to visit mom’s website, you’ll find a link
|
||||
to it at
|
||||
<br/>
|
||||
<span class="pre-in-pp">
|
||||
https://www.schaffter.ca
|
||||
</span>
|
||||
The site contains links to some of my fiction, all of which was
|
||||
typeset with mom and groff.
|
||||
</p>
|
||||
|
||||
<div class="rule-long"><hr/></div>
|
||||
|
||||
<!-- Navigation links -->
|
||||
<table style="width: 100%; margin-top: 12px;">
|
||||
<tr>
|
||||
<td style="width: 33%;"><a href="toc.html">Back to Table of Contents</a></td>
|
||||
<td style="width: 100%; text-align: right;"><a href="#top">Top</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="bottom-spacer"><br/></div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
505
OGP64/usr/share/doc/groff-1.24.1/html/mom/color.html
Normal file
505
OGP64/usr/share/doc/groff-1.24.1/html/mom/color.html
Normal file
|
|
@ -0,0 +1,505 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
This file is part of groff, the GNU roff type-setting system.
|
||||
|
||||
Copyright (C) 2004-2020 Free Software Foundation, Inc.
|
||||
Written by Peter Schaffter (peter@schaffter.ca).
|
||||
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.3 or
|
||||
any later version published by the Free Software Foundation; with no
|
||||
Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
|
||||
Texts.
|
||||
|
||||
A copy of the Free Documentation License is included as a file called
|
||||
FDL in the main directory of the groff source package.
|
||||
-->
|
||||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html;charset=utf-8"/>
|
||||
<title>Mom -- Colour</title>
|
||||
<link rel="stylesheet" type="text/css" href="stylesheet.css" />
|
||||
</head>
|
||||
|
||||
<body style="background-color: #f5faff;">
|
||||
|
||||
<!-- ==================================================================== -->
|
||||
|
||||
<div id="top" class="page">
|
||||
|
||||
<!-- Navigation links -->
|
||||
<table style="width: 100%;">
|
||||
<tr>
|
||||
<td><a href="toc.html">Back to Table of Contents</a></td>
|
||||
<td style="text-align: right;"><a href="graphical.html#top">Next: Graphical objects</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h1 class="docs">Coloured text</h1>
|
||||
|
||||
<div style="text-align: center;">
|
||||
<a href="#index-color">List of color macros</a>
|
||||
</div>
|
||||
|
||||
<div class="rule-medium"><hr/></div>
|
||||
|
||||
<h2 class="docs">Introduction</h2>
|
||||
|
||||
<p>
|
||||
Mom’s support for coloured text is straightforward. You begin
|
||||
by telling mom about the colours you want with
|
||||
<a href="#newcolor">NEWCOLOR</a>
|
||||
or
|
||||
<a href="#xcolor">XCOLOR</a>.
|
||||
Afterwards, any time you want text to be coloured, you either colour
|
||||
it with an
|
||||
<a href="definitions.html#inlines">inline escape</a>
|
||||
that contains the colour name (e.g. <kbd><span class="nobr">\*[red]</span></kbd>
|
||||
or <kbd><span class="nobr">\*[blue]</span></kbd>) or invoke the macro
|
||||
<a href="#color">COLOR</a>
|
||||
with the name of the colour you want.
|
||||
</p>
|
||||
|
||||
<p id="color-example">
|
||||
For example, say you want to have the name “Jack” in the
|
||||
sentence “All work and no play makes Jack a dull boy”
|
||||
appear in yellow. You’d begin by telling mom about the colour,
|
||||
yellow. There are two ways of doing this; see
|
||||
<a href="#newcolor">NEWCOLOR</a>
|
||||
and
|
||||
<a href="#xcolor">XCOLOR</a>
|
||||
for a full explanation of the difference between the two.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
If you use XCOLOR, you’d enter this:
|
||||
<br/>
|
||||
<span class="pre-in-pp">
|
||||
.XCOLOR yellow
|
||||
</span>
|
||||
If you use NEWCOLOR, you might enter:
|
||||
<br/>
|
||||
<span class="pre-in-pp">
|
||||
.NEWCOLOR yellow RGB #FFFF00
|
||||
</span>
|
||||
</p>
|
||||
|
||||
<p id="color-example2" style="margin-top: -1em;">
|
||||
After defining or initializing the colour yellow you’d
|
||||
colourise the name, Jack, either with an inline escape
|
||||
<br/>
|
||||
<span class="pre-in-pp">
|
||||
All work and no play makes \*[yellow]Jack\*[black] a dull boy.
|
||||
</span>
|
||||
or with the
|
||||
<a href="#color">COLOR</a>
|
||||
macro
|
||||
<br/>
|
||||
<span class="pre-in-pp">
|
||||
All work and no play makes
|
||||
.COLOR yellow
|
||||
Jack
|
||||
.COLOR black
|
||||
a dull boy.
|
||||
</span>
|
||||
Notice, in both examples, that a) you have to set the colour back
|
||||
to black after “Jack,” and b) you don’t have to
|
||||
define or initialize the colour, black. Mom predefines it for you.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
For information on using colour during
|
||||
<a href="docprocessing.html#intro-macros-docprocessing">document processing</a>,
|
||||
see
|
||||
<a href="docprocessing.html#color">Colour support in document processing</a>.
|
||||
</p>
|
||||
|
||||
<div class="box-tip">
|
||||
<p class="tip">
|
||||
<span class="note">Note:</span>
|
||||
Mom’s colour support is for text only. She doesn’t
|
||||
support “fill” (or “background”) colour for
|
||||
solid, enclosed graphical objects (polygons, ellipses) drawn with
|
||||
groff’s <kbd>\D</kbd>
|
||||
<a href="definitions.html#inlines">inline escapes</a>,
|
||||
although you may give a colour as one of the arguments to
|
||||
mom’s “box” and “circle” macros,
|
||||
<a href="graphical.html#dbx">DBX</a>
|
||||
and
|
||||
<a href="graphical.html#dcl">DCL</a>
|
||||
when the first argument to these macros is <kbd>SOLID</kbd>.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="box-tip">
|
||||
<p class="tip">
|
||||
<span class="experts">Experts:</span>
|
||||
If you’re accustomed to using groff’s
|
||||
<kbd>.defcolor</kbd> to define colours, and groff’s inline
|
||||
<kbd>\m[<colorname>]</kbd> to call them, you may continue to
|
||||
do so without confusing mom.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="macro-list-container">
|
||||
<h3 id="index-color" class="macro-list">Coloured text macros</h3>
|
||||
|
||||
<ul class="macro-list">
|
||||
<li><a href="#newcolor">NEWCOLOR</a></li>
|
||||
<li><a href="#xcolor">XCOLOR</a></li>
|
||||
<li><a href="#color">COLOR</a></li>
|
||||
<li><a href="#color-inline">\*[<colourname>]</a> (inline escape)</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="rule-medium" style="margin-bottom: 1.5em;"><hr/></div>
|
||||
|
||||
<!-- -NEWCOLOR- -->
|
||||
|
||||
<div class="macro-id-overline">
|
||||
<h3 id="newcolor" class="macro-id">Creating (initializing) a colour with NEWCOLOR</h3>
|
||||
</div>
|
||||
|
||||
<div class="box-macro-args">
|
||||
Macro: <b>NEWCOLOR</b> <kbd class="macro-args"><colour name> [<colour scheme>] <colour components></kbd>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
NEWCOLOR lets you create a colour, rather like an artist mixing
|
||||
paint on a palette. The colour isn’t used immediately;
|
||||
NEWCOLOR merely tells mom how to mix the colour when you need it.
|
||||
If you haven’t invoked <kbd>.NEWCOLOR</kbd> (or
|
||||
<kbd><a href="#xcolor">.XCOLOR</a></kbd>),
|
||||
mom doesn’t have a clue what you mean when you reference a
|
||||
colour (with
|
||||
<a href="#color">COLOR</a>
|
||||
or
|
||||
<a href="#color-inline"><kbd><span class="nobr">\*[<colour name>]</span></kbd></a>).
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The first argument to NEWCOLOR is a name for your colour. It
|
||||
can be anything you like—provided it’s just one word
|
||||
long—and can be caps, lower case, or any combination of the
|
||||
two.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The second argument, which is entirely optional, is the
|
||||
“colour scheme” you want mom to use when mixing the
|
||||
colour. Valid arguments are
|
||||
<br/>
|
||||
<span class="pre-in-pp">
|
||||
RGB (3 components: red green blue)
|
||||
CYM (3 components: cyan yellow magenta)
|
||||
CMYK (4 components: cyan magenta yellow black)
|
||||
GRAY (1 component)
|
||||
</span>
|
||||
If you omit the second argument, mom assumes you
|
||||
want RGB.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The final argument is the components of your colour. This can be
|
||||
hexadecimal string starting with a pound sign (<kbd>#</kbd>) (for
|
||||
colour values in the 0-255 range) or two pound signs (<kbd>##</kbd>)
|
||||
(for colour values in the 0-65535 range), or it can be a series of
|
||||
decimal digits, separated by spaces, one digit per component, with
|
||||
the argument enclosed in double quotes. (If this is all gibberish
|
||||
to you, see
|
||||
<a href="#color-tip">Tips for newbies</a>.)
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Thus, to tell mom about a colour named “YELLOW”, you
|
||||
could enter one of the following:
|
||||
<br/>
|
||||
<span class="pre-in-pp">
|
||||
.NEWCOLOR YELLOW #FFFF00 \"or ##FFFFFFFF0000 or "1 1 0"
|
||||
.NEWCOLOR YELLOW RGB #FFFF00 \"or ##FFFFFFFF0000 or "1 1 0"
|
||||
.NEWCOLOR YELLOW CMY #0000FF \"or ##0000FFFF0000 or "0 0 1"
|
||||
.NEWCOLOR YELLOW CMYK #0000FF00 \"or ##00000000FFFF0000 or "0 0 1 0"
|
||||
</span>
|
||||
After you’ve told mom about a colour, you can then get her to
|
||||
set text in that colour either with the
|
||||
<a href="definitions.html#inlines">inline escape</a>,
|
||||
<a href="#color-inline"><kbd><span class="nobr">\*[<colourname>]</span></kbd></a>,
|
||||
or the macro
|
||||
<a href="#color">COLOR</a>.
|
||||
(See the
|
||||
<a href="#color-example">example</a>,
|
||||
above.)
|
||||
</p>
|
||||
|
||||
<div class="box-tip">
|
||||
<p class="tip-top">
|
||||
<span class="note">Note:</span>
|
||||
The colourname you give to NEWCOLOR may be used with groff’s
|
||||
<kbd>\m[<colourname>]</kbd> inline escape (the <kbd>\m</kbd>
|
||||
escape is used to set text and rule colours). Thus, assuming
|
||||
a colourname “blueblack” set with NEWCOLOR,
|
||||
<kbd><span class="nobr">\*[blueblack]</span></kbd> and <kbd>\m[blueblack]</kbd>
|
||||
are equivalent. Furthermore, the colourname can be given as an
|
||||
argument to <b>groff</b>’s
|
||||
<a href="definitions.html#primitives">primitive</a>
|
||||
request, <kbd>.gcolor</kbd> (which does the same thing as
|
||||
<kbd>\m[<colourname>]</kbd>).
|
||||
</p>
|
||||
|
||||
<p class="tip-bottom">
|
||||
Equally, the colourname may be used with
|
||||
<kbd>\M[<colourname>]</kbd> and <kbd>.fcolor</kbd>, which set
|
||||
the “fill” colour for solid graphical objects.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="box-tip">
|
||||
<p id="color-tip" class="tip-top">
|
||||
<span class="tip">Tips for newbies:</span>
|
||||
Colour manipulation can be tremendously confusing if you don’t
|
||||
have a background in graphic arts or computing. My advice, if colour
|
||||
intimidates you, is to stick to using mom’s default RGB colour
|
||||
scheme, and to fire up a colour chooser that gives you the RGB values
|
||||
you want for the colour you select. Plug those values into the
|
||||
components argument to NEWCOLOR, and you’ll get the colour
|
||||
you want. Both the KDE and gnome desktops have colour selectors
|
||||
that provide you with the shorter RGB hexadecimal string. If
|
||||
you’re not running KDE or gnome, the X utility, xcolorsel,
|
||||
provides you with a similar functionality, although it only provides
|
||||
RGB values for 256 pre-defined colours. If you use xcolorsel, be
|
||||
sure to click the button “Display format” and select
|
||||
“8 bit truncated rgb”.
|
||||
</p>
|
||||
|
||||
<p class="tip-bottom">
|
||||
Alternatively, you can use mom’s simpler
|
||||
<kbd><a href="#xcolor">XCOLOR</a></kbd>
|
||||
macro to initialize one of the 256 pre-defined X colours by
|
||||
supplying the name of the colour as an argument.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<!-- -XCOLOR- -->
|
||||
|
||||
<div class="macro-id-overline">
|
||||
<h3 id="xcolor" class="macro-id">Initializing a colour with XCOLOR</h3>
|
||||
</div>
|
||||
|
||||
<div class="box-macro-args">
|
||||
Macro: <b>XCOLOR</b> <kbd class="macro-args"><X colourname> [<alias>]</kbd>
|
||||
</div>
|
||||
|
||||
<p class="requires">
|
||||
<kbd style="font-style: normal"><X colourname></kbd> <i>must be all one word, all lower case.</i>
|
||||
<br/>
|
||||
(See
|
||||
<a href="#xcolor-names" style="font-style: normal;">Finding X colour names</a>
|
||||
for how to get a list of valid colour names.)
|
||||
</p>
|
||||
|
||||
<p>
|
||||
XCOLOR is similar to NEWCOLOR in that it tells mom to initialize a
|
||||
colour, but it’s easier to use. All you have to do is pass
|
||||
it, as an argument, the valid name of one of the 256 pre-defined
|
||||
X colours. The name must be all one word, and, breaking with mom
|
||||
policy, it must be entered in lower case.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
For example, if you want to initialize the X colour, coral, all you
|
||||
have to do is enter
|
||||
<br/>
|
||||
<span class="pre-in-pp">
|
||||
.XCOLOR coral
|
||||
</span>
|
||||
Afterwards
|
||||
<br/>
|
||||
<span class="pre-in-pp">
|
||||
.COLOR coral
|
||||
</span>
|
||||
|
||||
will colourise subsequent text coral until you instruct mom to
|
||||
return to black, or some other pre-defined, initialized colour.
|
||||
(The
|
||||
<a href="definitions.html#inlines">inline escape</a>
|
||||
<kbd><span class="nobr">\*[coral]</span></kbd> will equally colourise text coral
|
||||
after you’ve initialized the colour with XCOLOR.)
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The downside of XCOLOR is that you can’t create custom
|
||||
colours. This restriction, however, is mitigated by the fact that
|
||||
for many users, 256 colours is more than enough to play around with.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
While some X colours have fanciful names (peachpuff, papayawhip,
|
||||
thistle, snow), many are self-explanatory and self-descriptive
|
||||
in ordinary colour terms. “blue” is pure (rgb)
|
||||
blue, “green” is pure (rgb) green, and so on.
|
||||
Furthermore, for many X colours, there exist four variants, each
|
||||
representing increasingly darker shades of the same colour.
|
||||
For example, “blue1” is a relatively bright blue;
|
||||
“blue2”, “blue3” and “blue4” are
|
||||
increasingly darker shades. For that reason, you may find XCOLOR is
|
||||
a better choice than NEWCOLOR when it comes to initializing common
|
||||
colours.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The whimsical nature of X colour names sometimes makes for names
|
||||
that are long to type in, e.g. “mediumspringgreen”. The
|
||||
optional second argument to XCOLOR allows you to come up with more
|
||||
convenient name by which to reference the colour. For example, you
|
||||
could enter
|
||||
<br/>
|
||||
<span class="pre-in-pp">
|
||||
.XCOLOR mediumspringgreen mygreen
|
||||
</span>
|
||||
or
|
||||
<span class="pre-in-pp">
|
||||
.XCOLOR mediumspringgreen MYGREEN
|
||||
</span>
|
||||
so that whenever you want text mediumspringgreen-ed, you can use
|
||||
either <kbd>.COLOR mygreen</kbd> (or <kbd>.COLOR MYGREEN</kbd>)
|
||||
or the inline escape
|
||||
<kbd>\*[mygreen]</kbd> (or <kbd>\*[MYGREEN]</kbd>.)
|
||||
</p>
|
||||
|
||||
<h3 id="xcolor-names" class="docs">Finding X colour names</h3>
|
||||
|
||||
<p>
|
||||
There are two ways of finding the names of the pre-defined X
|
||||
colours. One is to consult the file, rgb.txt, included with all
|
||||
X11 installations. The location of the file on a Debian GNU/Linux
|
||||
distribution is typically /etc/X11/rgb.txt. Other distributions and
|
||||
other X installations may have the file in another location. The
|
||||
file lists the colour names, but doesn’t show you what the
|
||||
colours actually look like.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
A better way to get the colour names, as well as to see what the
|
||||
colours look like, is to fire up a colour chooser (like xcolorsel)
|
||||
that both lists the colour names and shows a swatch of the colour
|
||||
as well.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Whichever method you use to find X colour names, remember that the
|
||||
names, passed as arguments to XCOLOR, must be all one word, all in
|
||||
lower case.
|
||||
</p>
|
||||
|
||||
<div class="box-tip">
|
||||
<p class="tip-top">
|
||||
<span class="note">Note:</span>
|
||||
Both the colourname and the alias you give to XCOLOR may be
|
||||
used with groff’s <kbd>\m[<colourname>]</kbd>
|
||||
inline escape (the <kbd>\m</kbd> escape is used to set
|
||||
text and rule colours). Thus, assuming an X-colourname
|
||||
“mediumspringgreen” set with
|
||||
XCOLOR, and an alias, “mygreen”,
|
||||
<kbd><span class="nobr">\*[mediumspringgreen]</span></kbd>,
|
||||
<kbd><span class="nobr">\m[mediumspringgreen]</span></kbd>,
|
||||
<kbd><span class="nobr">\*[mygreen]</span></kbd> and
|
||||
<kbd><span class="nobr">\m[mygreen]</span></kbd> are all equivalent.
|
||||
Furthermore, both the colourname and the alias can be given as an
|
||||
argument to groff’s
|
||||
<a href="definitions.html#primitives">primitive</a>
|
||||
request, <kbd>.gcolor</kbd> (which does the same thing as
|
||||
<kbd><span class="nobr">\m[<colourname>]</span></kbd>).
|
||||
</p>
|
||||
|
||||
<p class="tip-bottom">
|
||||
The colourname initialized with XCOLOR <i>but not the
|
||||
alias</i> may also be used with groff’s inline escape,
|
||||
<kbd>\M[<colorname>]</kbd>, and the corresponding primitive,
|
||||
<kbd>.fcolor</kbd>, both of which set the “fill” colour
|
||||
for solid graphical objects. If you need a colour initialized with
|
||||
XCOLOR for <kbd>\M</kbd> or <kbd>.fcolor</kbd>, you MUST give the
|
||||
full colourname; the alias won’t work.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<!-- -COLOR- -->
|
||||
|
||||
<div class="macro-id-overline">
|
||||
<h3 id="color" class="macro-id">Invoking a colour</h3>
|
||||
</div>
|
||||
|
||||
<div class="box-macro-args">
|
||||
Macro: <b>COLOR</b> <kbd class="macro-args"><colourname></kbd>
|
||||
</div>
|
||||
|
||||
<p id="color-inline" class="requires" style="font-style: normal;">
|
||||
Inline: <kbd>\*[<colourname>]</kbd>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Once you’ve told mom about a colour (via
|
||||
<a href="#newcolor">NEWCOLOR</a>
|
||||
or
|
||||
<a href="#xcolor">XCOLOR</a>,
|
||||
you use either the macro COLOR or the
|
||||
<a href="definitions.html#inlines">inline escape</a>,
|
||||
<kbd><span class="nobr">\*[<colourname>]</span></kbd>, to cause mom to set
|
||||
subsequent text in that colour. See the
|
||||
<a href="#color-example2">example</a>,
|
||||
above, which shows both in action.
|
||||
</p>
|
||||
|
||||
<div class="box-tip">
|
||||
<p class="tip-top">
|
||||
<span class="note">Note:</span>
|
||||
You can use the <kbd><span class="nobr">\*[<colourname>]</span></kbd>
|
||||
inline escape in any
|
||||
<a href="docprocessing.html#top">document processing</a>
|
||||
macro that takes a
|
||||
<a href="definitions.html#stringargument">string argument</a>.
|
||||
However, you must remember to reset the colour at the end of the
|
||||
argument (typically with <kbd><span class="nobr">\*[black]</span></kbd>) unless
|
||||
you want all subsequent invocations of that particular macro to be
|
||||
colourised.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Furthermore, if you use
|
||||
<kbd><span class="nobr">\*[<colourname>]</span></kbd> in the string
|
||||
argument passed to
|
||||
<a href="docelement.html#heading">HEADING <n></a>
|
||||
and you’ve requested that the heading level be numbered, the
|
||||
numbers themselves will not be colourised, only the text you pass to
|
||||
the macro. If you wish the numbers to be colourised along with the
|
||||
text, you must explicitly tell mom with
|
||||
<a href="docelement.html#heading-style">HEADING_STYLE <n></a>.
|
||||
</p>
|
||||
|
||||
<p class="tip-bottom">
|
||||
For colourising underscored text, see
|
||||
<a href="goodies.html#underscore-color">Colourising underscored text</a>
|
||||
in the notes at the end of
|
||||
<a href="goodies.html#underscore">UNDERSCORE</a>.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="rule-long"><hr/></div>
|
||||
|
||||
<!-- Navigation links -->
|
||||
<table style="width: 100%; margin-top: 12px;">
|
||||
<tr>
|
||||
<td style="width: 33%;"><a href="toc.html">Back to Table of Contents</a></td>
|
||||
<td style="width: 33%; text-align: center;"><a href="#top">Top</a></td>
|
||||
<td style="width: 33%; text-align: right;"><a href="graphical.html#top">Next: Graphical objects</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="bottom-spacer"><br/></div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
851
OGP64/usr/share/doc/groff-1.24.1/html/mom/cover.html
Normal file
851
OGP64/usr/share/doc/groff-1.24.1/html/mom/cover.html
Normal file
|
|
@ -0,0 +1,851 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
This file is part of groff, the GNU roff type-setting system.
|
||||
|
||||
Copyright (C) 2004-2023 Free Software Foundation, Inc.
|
||||
Written by Peter Schaffter (peter@schaffter.ca).
|
||||
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.3 or
|
||||
any later version published by the Free Software Foundation; with no
|
||||
Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
|
||||
Texts.
|
||||
|
||||
A copy of the Free Documentation License is included as a file called
|
||||
FDL in the main directory of the groff source package.
|
||||
-->
|
||||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html;charset=utf-8"/>
|
||||
<title>Mom -- Document processing, creating cover pages</title>
|
||||
<link rel="stylesheet" type="text/css" href="stylesheet.css" />
|
||||
</head>
|
||||
|
||||
<body style="background-color: #f5faff;">
|
||||
|
||||
<!-- ==================================================================== -->
|
||||
|
||||
<div id="top" class="page">
|
||||
|
||||
<!-- Navigation links -->
|
||||
<table style="width: 100%;">
|
||||
<tr>
|
||||
<td><a href="toc.html">Back to Table of Contents</a></td>
|
||||
<td style="text-align: right;"><a href="tables-of-contents.html#top">Next: Tables of contents</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h1 class="docs">Creating cover pages</h1>
|
||||
|
||||
<div style="width: 66%; margin: auto;">
|
||||
<ul class="no-enumerator">
|
||||
<li><a href="#cover-intro">Introduction to cover pages</a>
|
||||
<ul style="margin-left: -.5em; list-style-type: disc;">
|
||||
<li><a href="#important-note">Important note</a></li>
|
||||
<li><a href="#desc">Description of cover pages</a></li>
|
||||
<li><a href="#pagination">Headers/footers/pagination</a>
|
||||
<ul style="margin-left: -1.25em; list-style-type: circle;">
|
||||
<li><a href="#pagination">DOC_COVERS_COUNT_PAGES</a></li>
|
||||
<li><a href="#pagination">COVERS_COUNT_PAGES</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#design">Designing your own cover pages</a></li>
|
||||
<li><a href="#persistence">Persistence of data and formatting</a></li>
|
||||
</ul></li>
|
||||
<li><a href="#index-covers">Doc-cover and cover macros</a>
|
||||
<ul style="margin-left: -.5em; list-style-type: disc;">
|
||||
<li><a href="#cover">DOC_COVER / COVER</a>
|
||||
<ul style="margin-left: -1.25em; list-style-type: circle;">
|
||||
<li><a href="#cover-args">The argument list: saying what goes on doc cover and cover pages</a></li>
|
||||
<li><a href="#meanings">What the arguments mean</a></li>
|
||||
<li><a href="#chapter">How the CHAPTER argument and friends work</a></li>
|
||||
</ul></li>
|
||||
<li><a href="#covertext">DOC_COVERTEXT / COVERTEXT</a>
|
||||
<ul style="margin-left: -1.25em; list-style-type: circle;">
|
||||
<li><a href="#placement">Placement</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#coverimages">DOC_COVER_IMAGE / COVER_IMAGE</a>
|
||||
<ul style="margin-left: -1.25em; list-style-type: circle;">
|
||||
<li><a href="#positioning">Positioning of doc cover and cover images</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul></li>
|
||||
<li><a href="#on-off">Enabling/disabling automatic generation of cover pages</a></li>
|
||||
<li><a href="#cover-control">Control macros for covers and doc covers</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="rule-medium"><hr/></div>
|
||||
|
||||
<h2 id="cover-intro" class="docs">Introduction to cover pages</h2>
|
||||
|
||||
<p>
|
||||
Though identical in treatment, mom provides two kinds of cover
|
||||
pages: document cover pages (”doc covers”) and section
|
||||
cover pages (“covers”). Section cover pages are
|
||||
analogous to title pages.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
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.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
A cover is what you’d use for pages that separate sections
|
||||
of a collated document, i.e. title pages. A cover page (but not a
|
||||
doc cover) in a collated document could, for example, simply read:
|
||||
”PART 1”.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
In non-collated documents (say, an essay) you can use either a cover
|
||||
or doc cover to generate the cover sheet.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
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.
|
||||
</p>
|
||||
|
||||
<div id="important-note" class="box-important">
|
||||
<p class="tip">
|
||||
<span class="important">Important note:</span>
|
||||
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.”
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<h3 id="desc" class="docs">Description of cover pages</h3>
|
||||
|
||||
<p>
|
||||
By default, mom typesets covers and doc covers identically to
|
||||
<a href="definitions.html#docheader">docheaders</a>
|
||||
(see
|
||||
<a href="docprocessing.html#docheader-control">How to change the look of docheaders</a>
|
||||
for a description of what a docheader looks like). The only
|
||||
differences are
|
||||
</p>
|
||||
<ul style="margin-top: -.5em; margin-bottom: -.5em;">
|
||||
<li>the position on the page where the information is output</li>
|
||||
<li>the (optional) addition of copyright and miscellaneous information</li>
|
||||
<li>there’s no running text underneath, although you can add text
|
||||
to a cover or doc cover (for example, an Abstract) with
|
||||
<a href="#covertext">COVERTEXT</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<p>
|
||||
You tell mom what you want to appear on cover pages through the
|
||||
arguments you pass to
|
||||
<a href="#cover">DOC_COVER</a>
|
||||
and/or
|
||||
<a href="#cover">COVER</a>.
|
||||
Provided you have already given mom the appropriate reference macros
|
||||
(e.g.
|
||||
<a href="docprocessing.html#title">TITLE</a>
|
||||
or
|
||||
<a href="docprocessing.html#author">AUTHOR</a>),
|
||||
she will output covers and doc covers identically to how she
|
||||
would output docheaders containing the same information.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
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 DOC_COVER_START_POS / COVER_START_POS (or DOC_COVER_ADVANCE /
|
||||
COVER_ADVANCE).
|
||||
</p>
|
||||
|
||||
<p>
|
||||
If you request copyright information (and have already given mom the
|
||||
reference macro
|
||||
<a href="docprocessing.html#copyright">COPYRIGHT</a>)
|
||||
she sets it, by default, in a smaller
|
||||
<a href="definitions.html#ps">point size</a>
|
||||
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.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Similarly, if you request miscellaneous information (and have
|
||||
already given mom the reference macro
|
||||
<a href="docprocessing.html#misc">MISC</a>)
|
||||
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.
|
||||
</p>
|
||||
|
||||
<h3 id="pagination" class="docs">Headers/footers/pagination</h3>
|
||||
|
||||
<p>
|
||||
Mom does not set any
|
||||
<a href="definitions.html#header">headers</a>
|
||||
or
|
||||
<a href="definitions.html#footer">footers</a>
|
||||
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 by invoking
|
||||
<br/>
|
||||
<span class="pre-in-pp">
|
||||
.DOC_COVER_COUNTS_PAGES
|
||||
</span>
|
||||
or
|
||||
<br/>
|
||||
<span class="pre-in-pp">
|
||||
.COVER_COUNTS_PAGES
|
||||
</span>
|
||||
</p>
|
||||
|
||||
<h3 id="design" class="docs">Designing your own cover pages</h3>
|
||||
|
||||
<p>
|
||||
Finally, if you want to design your own cover page(s), you can
|
||||
typeset them by hand inside a
|
||||
<a href="#covertext">COVERTEXT</a>
|
||||
block using mom’s typesetting macros to format the text.
|
||||
</p>
|
||||
|
||||
<h3 id="persistence" class="docs">Persistence of data and formatting</h3>
|
||||
|
||||
<p>
|
||||
Doc-cover and cover data—that is to say, the strings passed to
|
||||
reference macros that appear on doc cover and cover
|
||||
pages—do not persist after
|
||||
<a href="docprocessing.html#start">START</a>,
|
||||
however the formatting of the various parts (TITLE, AUTHOR,
|
||||
COPYRIGHT, etc.) does.
|
||||
</p>
|
||||
|
||||
<div class="macro-list-container">
|
||||
<h3 id="index-covers" class="macro-list">Cover and document cover macros</h3>
|
||||
<ul class="macro-list">
|
||||
<li><a href="#cover">DOC_COVER and COVER</a>
|
||||
<ul style="margin-left: -.5em; list-style-type: disc;">
|
||||
<li><a href="#cover-args">The arguments: saying what goes on doc cover and cover pages</a></li>
|
||||
</ul></li>
|
||||
<li><a href="#covertext">DOC_COVERTEXT / COVERTEXT</a></li>
|
||||
<li><a href="#doc-coverimage">DOC_COVER_IMAGE / COVER_IMAGE</a></li>
|
||||
<li><a href="#on-off">Enabling/disabling automatic generation of cover pages</a>
|
||||
<ul style="margin-left: -.5em; list-style-type: disc;">
|
||||
<li><a href="#doc-covers">DOC_COVERS</a></li>
|
||||
<li><a href="#covers">COVERS</a></li>
|
||||
</ul></li>
|
||||
<li><a href="#cover-control">Control macros for doc covers and covers</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<!-- -COVER- -->
|
||||
|
||||
<div class="macro-id-overline">
|
||||
<h3 id="cover" class="macro-id">DOC_COVER and COVER</h3>
|
||||
</div>
|
||||
|
||||
<div id="doc-cover" class="box-macro-args">
|
||||
Macro: <b>DOC_COVER</b> <kbd class="macro-args">(see argument list, below)</kbd>
|
||||
</div>
|
||||
|
||||
<div class="box-macro-args" style="margin-top: 1em;">
|
||||
Macro: <b>COVER</b> <kbd class="macro-args">(see argument list, below)</kbd>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
DOC_COVER and 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.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Imagine, for a moment, you’ve written a document comprised of
|
||||
three sections. When you
|
||||
<a href="rectoverso.html#collate">COLLATE</a>
|
||||
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 <kbd>.COLLATE</kbd> but before each
|
||||
<kbd><a href="docprocessing.html#start">.START</a></kbd>,
|
||||
to generate a cover page (title page, cover sheet) containing
|
||||
just the name of the section, for example, “Part 1”.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The arguments to <kbd>DOC_COVER</kbd> and <kbd>COVER</kbd> tell mom
|
||||
what you’d like on cover pages. You may give as many or as
|
||||
few arguments as you need, in any order. A very common setup would
|
||||
be:
|
||||
<br/>
|
||||
<span class="pre-in-pp">
|
||||
.COVER TITLE AUTHOR COPYRIGHT
|
||||
</span>
|
||||
</p>
|
||||
|
||||
<h4 id="cover-args" class="docs" style="margin-top: -1em;">The argument list</h4>
|
||||
|
||||
<p style="margin-top: 1em">
|
||||
The arguments to <kbd>COVER</kbd> and <kbd>DOC_COVER</kbd> tell mom
|
||||
what you want on the cover page:
|
||||
<br/>
|
||||
<span class="pre-in-pp">
|
||||
TITLE | DOCTITLE | DOC_COVERTITLE | COVERTITLE
|
||||
CHAPTER | CHAPTER_TITLE | CHAPTER+TITLE
|
||||
SUBTITLE
|
||||
AUTHOR
|
||||
DOCTYPE
|
||||
DOC_COVERTEXT | COVERTEXT
|
||||
DOC_COVER_IMAGE | COVER_IMAGE
|
||||
COPYRIGHT
|
||||
MISC
|
||||
PDF_OUTLINE_LABEL "<label>"
|
||||
BLANKPAGE
|
||||
</span>
|
||||
</p>
|
||||
|
||||
<h4 id="meanings" class="docs" style="margin-top: -1em;">What the arguments mean</h4>
|
||||
|
||||
<dl>
|
||||
<dt class="params">TITLE</dt>
|
||||
<dd class="cover-args">– the string(s) you gave to
|
||||
<a href="docprocessing.html#title">TITLE</a>
|
||||
</dd>
|
||||
<dt class="params">DOCTITLE</dt>
|
||||
<dd class="cover-args">– the string(s) you gave to
|
||||
<a href="docprocessing.html#doc-title">DOCTITLE</a>
|
||||
</dd>
|
||||
<dt class="params">DOC_COVERTITLE / COVERTITLE</dt>
|
||||
<dd class="cover-args">– the string(s) you gave to
|
||||
<a href="docprocessing.html#doc-covertitle">DOC_COVERTITLE</a>
|
||||
or
|
||||
<a href="docprocessing.html#covertitle">COVERTITLE</a>
|
||||
</dd>
|
||||
<dt class="params">CHAPTER, CHAPTER_TITLE, CHAPTER+TITLE</dt>
|
||||
<dd class="cover-args">– see below,
|
||||
<a href="#chapter">How the CHAPTER argument and friends work</a>
|
||||
</dd>
|
||||
<dt class="params">SUBTITLE</dt>
|
||||
<dd class="cover-args">– the string(s) you gave to
|
||||
<a href="docprocessing.html#subtitle">SUBTITLE</a>
|
||||
</dd>
|
||||
<dt class="params">AUTHOR</dt>
|
||||
<dd class="cover-args">– the string(s) you gave to
|
||||
<a href="docprocessing.html#author">AUTHOR</a>
|
||||
</dd>
|
||||
<dt class="params">DOCTYPE</dt>
|
||||
<dd class="cover-args">– the string you gave to
|
||||
<a href="docprocessing.html#doctype">DOCTYPE NAMED</a>
|
||||
</dd>
|
||||
<dt class="params">DOC_COVERTEXT / COVERTEXT</dt>
|
||||
<dd class="cover-args">– the block of type you entered for
|
||||
<a href="#covertext">DOC_COVERTEXT</a>
|
||||
or
|
||||
<a href="#covertext">COVERTEXT</a>
|
||||
</dd>
|
||||
<dt class="params">DOC_COVER_IMAGE / COVER_IMAGE</dt>
|
||||
<dd class="cover-args">– the image file you gave to
|
||||
<a href="#covertext">DOC_COVER_IMAGE</a>
|
||||
or
|
||||
<a href="#covertext">COVER_IMAGE</a>
|
||||
</dd>
|
||||
<dt class="params">COPYRIGHT</dt>
|
||||
<dd class="cover-args">– the string you gave to
|
||||
<a href="docprocessing.html#copyright">COPYRIGHT</a>
|
||||
</dd>
|
||||
<dt class="params">MISC</dt>
|
||||
<dd class="cover-args">– the string(s) you gave to
|
||||
<a href="docprocessing.html#misc">MISC</a>
|
||||
</dd>
|
||||
<dt class="params">PDF_OUTLINE_LABEL <label></dt>
|
||||
<dd class="cover-args">
|
||||
<span style="display:block; margin-left: 1em">
|
||||
By default, mom identifies doc covers in the outline panel of PDF
|
||||
viewers with the prepended label, “Cover:”, and covers
|
||||
with the label “Title Page:”. If you would like
|
||||
to change the label, give the <kbd>PDF_OUTLINE_LABEL</kbd>
|
||||
argument to DOC_COVER or COVER along with the new label, in
|
||||
quotation marks, as in this example:
|
||||
<br/>
|
||||
<kbd> .COVER TITLE AUTHOR COPYRIGHT PDF_LABEL "Cover Sheet: "</kbd>
|
||||
</span>
|
||||
</dd>
|
||||
<dt class="params">BLANKPAGE</dt>
|
||||
<dd class="cover-args">
|
||||
<span style="display:block; margin-left: 1em">
|
||||
If the final argument to DOC_COVER or COVER is <kbd>BLANKPAGE</kbd>,
|
||||
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
|
||||
</span>
|
||||
<span style="display:block; margin-left: 1em; margin-top: .5em">
|
||||
If you enable
|
||||
<a href="#pagination">DOC_COVERS_COUNT_PAGES</a>
|
||||
and/or
|
||||
<a href="#pagination">COVERS_COUNT_PAGES</a>,
|
||||
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.
|
||||
</span>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<p>
|
||||
Please note that in all cases, if you have passed
|
||||
a reference macro one of the optional arguments
|
||||
<kbd>DOC_COVER</kbd> or <kbd>COVER</kbd> (e.g.
|
||||
<kbd>.TITLE DOC_COVER "Title"</kbd>), mom will print the
|
||||
appropriate string on the appropriate cover page. Thus,
|
||||
<br/>
|
||||
<span class="pre-in-pp">
|
||||
.TITLE DOC_COVER "Collected Essays"
|
||||
.TITLE COVER "1985-2015"
|
||||
.TITLE "Neo-liberalism: Who Did They Think They Were Fooling?"
|
||||
.DOC_COVER TITLE
|
||||
.COVER TITLE
|
||||
</span>
|
||||
will print “Collected Essays” on the doc cover page,
|
||||
“1985-2015” on the cover page, and, assuming the
|
||||
docheader hasn’t been disabled, “Neo-liberalism: Who
|
||||
Did They Think They Were Fooling?” as the title in the
|
||||
docheader.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Note that
|
||||
<br/>
|
||||
<span class="pre-in-pp">
|
||||
.DOC_COVERTITLE "Collected Essays"
|
||||
.COVERTITLE "1985-2015"
|
||||
.TITLE "Neo-liberalism: Who Did They Think They Were Fooling?"
|
||||
.DOC_COVER DOC_COVERTITLE
|
||||
.COVER COVERTITLE
|
||||
</span>
|
||||
could be used to accomplish the same thing.
|
||||
</p>
|
||||
|
||||
<h5 id="chapter" class="docs" style="margin-top: 0; text-transform: none;">How the CHAPTER argument and friends work</h5>
|
||||
|
||||
<p style="margin-top: .75em">
|
||||
<span style="display: block; margin-bottom: -1.25em; font-weight: bold;">• CHAPTER</span>
|
||||
<br/>
|
||||
The <kbd>CHAPTER</kbd> argument will print the
|
||||
<a href="docprocessing.html#chapter-string">CHAPTER_STRING</a>
|
||||
concatenated with the chapter number you gave to
|
||||
<a href="docprocessing.html#chapter">CHAPTER</a>.
|
||||
For example, assuming a vanilla setup for your chapter:
|
||||
<br/>
|
||||
<span class="pre-in-pp" style="color: #64614a;">
|
||||
.CHAPTER 1
|
||||
.CHAPTER_TITLE "The Bonny Blue Yonder"
|
||||
<span style="color: #941614;">.COVER CHAPTER</span> \" (or <span style="color: #941614;">.DOC_COVER CHAPTER</span>)
|
||||
</span>
|
||||
will print (and only print)
|
||||
<br/>
|
||||
<span class="pre-in-pp">
|
||||
Chapter 1
|
||||
</span>
|
||||
</p>
|
||||
|
||||
<p style="margin-top: -1em;">
|
||||
<span style="display: block; margin-bottom: -1.25em; font-weight: bold;">• CHAPTER_TITLE</span>
|
||||
<br/>
|
||||
The <kbd>CHAPTER_TITLE</kbd> argument will print the chapter title
|
||||
you gave to
|
||||
<a href="docprocessing.html#chapter-title">CHAPTER_TITLE</a>.
|
||||
For example, assuming a vanilla setup for your chapter:
|
||||
<br/>
|
||||
<span class="pre-in-pp" style="color: #64614a;">
|
||||
.CHAPTER 1
|
||||
.CHAPTER_TITLE "The Bonny Blue Yonder"
|
||||
<span style="color: #941614;">.COVER CHAPTER_TITLE</span> \"(or <span style="color: #941614;">.DOC_COVER CHAPTER_TITLE</span>)
|
||||
</span>
|
||||
will print (and only print)
|
||||
<br/>
|
||||
<span class="pre-in-pp">
|
||||
The Bonny Blue Yonder
|
||||
</span>
|
||||
</p>
|
||||
|
||||
<p style="margin-top: -1em;">
|
||||
<span style="display: block; margin-bottom: -1.25em; font-weight: bold;">• CHAPTER+TITLE</span>
|
||||
<br/>
|
||||
The <kbd>CHAPTER+TITLE</kbd> argument will print both the
|
||||
concatenated chapter string+number and the chapter title. For
|
||||
example, assuming a vanilla setup for your chapter:
|
||||
<br/>
|
||||
<span class="pre-in-pp" style="color: #64614a;">
|
||||
.CHAPTER 1
|
||||
.CHAPTER_TITLE "The Bonny Blue Yonder"
|
||||
<span style="color: #941614;">.COVER CHAPTER+TITLE</span> \"(or <span style="color: #941614;">.DOC_COVER CHAPTER+TITLE</span>)
|
||||
</span>
|
||||
will print
|
||||
<br/>
|
||||
<span class="pre-in-pp">
|
||||
Chapter 1
|
||||
The Bonny Blue Yonder
|
||||
</span>
|
||||
</p>
|
||||
|
||||
<div class="macro-id-overline">
|
||||
<h3 id="covertext" class="macro-id">DOC_COVERTEXT and COVERTEXT</h3>
|
||||
</div>
|
||||
|
||||
<div class="box-macro-args">
|
||||
Macro: <b>DOC_COVERTEXT</b> <kbd class="macro-args">[START <starting position>] <toggle></kbd>
|
||||
</div>
|
||||
<div class="box-macro-args" style="margin-top: 1em;">
|
||||
Macro: <b>COVERTEXT</b> <kbd class="macro-args">[START <starting position>] <toggle></kbd>
|
||||
</div>
|
||||
|
||||
<p class="requires">
|
||||
• Must come after
|
||||
<a href="#printstyle"><span class="normal">PRINTSTYLE</span></a>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<kbd>DOC_COVERTEXT</kbd> and <kbd>COVERTEXT</kbd> allow you to add
|
||||
text to doc covers and covers in addition to, or instead of, what is
|
||||
generated by mom from the arguments you give to
|
||||
<a href="#doccover">DOC_COVER</a>
|
||||
and
|
||||
<a href="#doccover">COVER</a>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Invoke <kbd>.DOC_COVERTEXT</kbd> or <kbd>.COVERTEXT</kbd> on a line
|
||||
by itself, follow it with the text and formatting you desire, and
|
||||
terminate the text block with <kbd>.DOC_COVERTEXT OFF</kbd> or
|
||||
<kbd>COVERTEXT OFF</kbd> (or <kbd>QUIT, END, DONE</kbd>, etc.).
|
||||
</p>
|
||||
|
||||
<p>
|
||||
By default, cover text is set over the full line length of the
|
||||
document, using the style parameters of
|
||||
<a href="definitions.html#running">running text</a>.
|
||||
Therefore, as noted, these macros must come after PRINTSTYLE
|
||||
and any global style changes (margins, family, size, leading,
|
||||
etc.). Formatting within a cover text block must be done
|
||||
“manually” with mom’s typesetting macros;
|
||||
<a href="docelement.html#pp">PP</a>
|
||||
is the only allowed document element tag.
|
||||
</p>
|
||||
|
||||
<h4 id="placement" class="docs">Placement</h4>
|
||||
|
||||
<p>
|
||||
If you do not instruct mom to put anything on doc cover or cover
|
||||
pages except <kbd>DOC_COVERTEXT</kbd> or <kbd>COVERTEXT</kbd>, the
|
||||
cover text will begin at the document’s top margin.
|
||||
Equally, if only <kbd>COPYRIGHT</kbd> and/or <kbd>MISC</kbd> are
|
||||
to go on the pages, cover text begins at the top margin. In all
|
||||
other cases, cover text begins below the last element on the page
|
||||
(excluding COPYRIGHT or MISC), separated by a blank line.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
If you wish to change the starting position of the text, you must
|
||||
use
|
||||
<a href="typesetting.html#space">SP</a>
|
||||
or
|
||||
<a href="typesetting.html#ald">ALD</a>
|
||||
to move it further down the page. Alternatively, you may use the
|
||||
optional START argument to give a precise location for the text to
|
||||
begin.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<kbd>DOC_COVERTEXT</kbd> and <kbd>COVERTEXT</kbd> are particularly
|
||||
useful for putting abstracts on cover pages, as technical reports
|
||||
often require.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Here’s a simple recipe for setting an abstract:
|
||||
<br/>
|
||||
<span class="pre-in-pp">
|
||||
.COVERTEXT
|
||||
.FT BI
|
||||
.PT_SIZE 14
|
||||
.LS 14
|
||||
.CENTER
|
||||
Abstract
|
||||
.SP .5v
|
||||
.FT R
|
||||
.PT_SIZE 12
|
||||
.IB 6P
|
||||
.JUSTIFY
|
||||
Text of Abstract...
|
||||
.COVERTEXT OFF
|
||||
</span>
|
||||
Assuming you have told mom to put the title and author on the
|
||||
cover page, the abstract will appear beneath the author with a
|
||||
14-point bold-italic title, centered, with the text of the abstract
|
||||
medium-roman and justified, indented 6 picas from both margins.
|
||||
</p>
|
||||
|
||||
<div class="macro-id-overline">
|
||||
<h3 id="coverimages" class="macro-id">DOC_COVER_IMAGE and COVER_IMAGE</h3>
|
||||
</div>
|
||||
|
||||
<div id="doc-coverimage" class="box-macro-args">
|
||||
Macro: <b>DOC_COVER_IMAGE</b> <kbd class="macro-args"><image> <width> <height> [ -L | -C | -R | -I <indent> <Y-pos> [ <X-pos> ] ]</kbd>
|
||||
</div>
|
||||
|
||||
<div id="coverimage" class="box-macro-args" style="margin-top: 1em;">
|
||||
Macro: <b>COVER_IMAGE</b> <kbd class="macro-args"><image> <width> <height> [ -L | -C | -R | -I <indent> <Y-pos> [ <X-pos> ] ]</kbd>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
There are times you need a full page image on a cover, for example
|
||||
the jacket of a book. Equally, there are times when you need a small
|
||||
image on the cover, perhaps a company logo.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
DOC_COVER_IMAGE and COVER_IMAGE take the same arguments
|
||||
as PDF_IMAGE, and in the same order. Consult
|
||||
<a href="images.html#pdf-image">PDF_IMAGE</a>
|
||||
for a description.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Two additional arguments allow you to place images using x-y
|
||||
coordinates. Please note that if you use x-y coordinates for
|
||||
positioning, <b>Y-pos</b> comes before <b>X-pos</b> in the order of
|
||||
arguments.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Like PDF_IMAGE, the image file must be in PDF format. Mom
|
||||
apologizes, but PostScript images are not supported for inclusion on
|
||||
covers. See
|
||||
<a href="images.html#pdf">Image conversion and file processing</a>
|
||||
for instructions on converting various image types to PDF, and
|
||||
<a href="images.html#bounding-box">here</a>
|
||||
for instructions on obtaining image dimensions.
|
||||
</p>
|
||||
|
||||
<h4 id="positioning" class="docs">Positioning of doc cover and cover images</h4>
|
||||
|
||||
<p>
|
||||
With no arguments other than <kbd><file name></kbd>,
|
||||
<kbd><width></kbd>, and <kbd><height></kbd>,
|
||||
DOC_COVER_IMAGE and COVER_IMAGE place images flush with the top
|
||||
left corner of the printer sheet. This allows placing full-page
|
||||
background images on covers. For example, assuming a US-letter page
|
||||
size,
|
||||
<br/>
|
||||
<span class="pre-in-pp">
|
||||
.DOC_COVER_IMAGE image.pdf 612p 792p
|
||||
.DOC_COVER TITLE AUTHOR DOC_COVER_IMAGE
|
||||
</span>
|
||||
will fill the doc cover page with “image.pdf” and set
|
||||
the title and author in their usual locations.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
For smaller images, the horizontal position is established
|
||||
with one of the <kbd>-L</kbd>, <kbd>-C</kbd>, <kbd>-R</kbd>, or
|
||||
<kbd>-I <indent></kbd> arguments, just like
|
||||
<a href="images.html#pdf-image">PDF_IMAGE</a>.
|
||||
You may instead use the <kbd>X-pos</kbd> argument, provided that it
|
||||
is preceded by a <kbd>Y-pos</kbd> argument. The values given to
|
||||
<kbd>-I</kbd>, <kbd>Y-pos</kbd> and <kbd>X-pos</kbd> must have a
|
||||
<a href="definitions.html#unitofmeasure">unit of measure</a>
|
||||
appended to them.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Vertical positioning of smaller images requires the <kbd>Y-pos</kbd>
|
||||
argument (which is why it precedes <kbd>X-pos</kbd> in the order of
|
||||
arguments) otherwise the image will be flush with the top edge of
|
||||
the printer sheet
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The positioning of images does not effect the placement of type on
|
||||
doc cover and cover pages.
|
||||
</p>
|
||||
|
||||
<div class="box-tip">
|
||||
<p class="tip">
|
||||
<span class="note">Tip:</span>
|
||||
The combination of
|
||||
<a href="#covertext">COVERTEXT</a>
|
||||
and COVER_IMAGE make it possible to design covers entirely to your
|
||||
own specifications.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="macro-id-overline" style="margin-top: .5em">
|
||||
<h3 id="on-off" class="macro-id">Enabling/disabling automatic generation of cover pages</h3>
|
||||
</div>
|
||||
|
||||
<div id="covers" class="box-macro-args" style="margin-top: .5em">
|
||||
Macro: <b>COVERS</b> <kbd class="macro-args"><toggle></kbd>
|
||||
</div>
|
||||
|
||||
<div id="doc-covers" class="box-macro-args" style="margin-top: 1em;">
|
||||
Macro: <b>DOC_COVERS</b> <kbd class="macro-args"><toggle></kbd>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
By default, if you give mom a
|
||||
<a href="#cover">COVER</a>
|
||||
or
|
||||
<a href="#doc-cover">DOC_COVER</a>
|
||||
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
|
||||
<a href="rectoverso.html#collate-intro">collated</a>,
|
||||
such behaviour may not be desirable.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
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 (<kbd>OFF, QUIT, X</kbd>,
|
||||
etc) disables cover or doc cover generation. </p>
|
||||
|
||||
<div class="box-tip">
|
||||
<p class="tip">
|
||||
<span class="note">Note:</span>
|
||||
You must place these macros prior to any instance of
|
||||
<a href="docprocessing.html#start">START</a>.
|
||||
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 <kbd>OFF, NO, X</kbd>, 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.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="rule-short"><hr/></div>
|
||||
|
||||
<h2 id="cover-control" class="macro-group">Control macros for doc covers and covers</h2>
|
||||
|
||||
<p>
|
||||
The default typographic appearance of the items on a doc cover or
|
||||
cover is identical to that of the items in a
|
||||
<a href="definitions.html#docheader">docheader</a>.
|
||||
(See
|
||||
<a href="docprocessing.html#docheader-desc">Docheader description</a>
|
||||
for a description of the defaults.)
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<a href="docprocessing.html#copyright">COPYRIGHT</a>
|
||||
and
|
||||
<a href="docprocessing.html#misc">MISC</a>,
|
||||
which do not appear in docheaders, have the following default
|
||||
characteristics:
|
||||
</p>
|
||||
<ul style="margin-top: -.5em; margin-bottom: -.5em;">
|
||||
<li>the COPYRIGHT line is set flush with the document’s right
|
||||
and bottom margins, 2
|
||||
<a href="definitions.html#ps">point sizes</a>
|
||||
smaller than the size of
|
||||
<a href="definitions.html#running">running text</a>
|
||||
</li>
|
||||
<li>MISC lines are set flush with the document’s left and bottom
|
||||
margins, in the same family, font and point size as the
|
||||
copyright line.
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<p>
|
||||
The defaults for the entirety of doc covers and covers, and all the
|
||||
elements thereon, can be changed with control macros whose defaults
|
||||
and arguments are identical to the corresponding
|
||||
<a href="docprocessing.html#index-docheader-control">Control macros for docheaders</a>
|
||||
(q.v.) The only difference is the name by which you invoke them. Wherever
|
||||
<kbd>DOCHEADER</kbd> is used for overall changes, replace it
|
||||
with <kbd>DOC_COVER</kbd> or <kbd>COVER</kbd>. For part-by-part
|
||||
changes, prepend <kbd>DOC_COVER_</kbd> or <kbd>COVER_</kbd> to the
|
||||
part/parameter.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Thus, to change the overall family, color, leading, quad, and
|
||||
starting position of a doc cover, you’d do
|
||||
<br/>
|
||||
<span class="pre-in-pp">
|
||||
.DOC_COVER_FAMILY H
|
||||
.DOC_COVER_COLOR blue
|
||||
.DOC_COVER_LEAD +2
|
||||
.DOC_COVER_QUAD L
|
||||
.DOC_COVER_ADVANCE 3i \" or .DOC_COVER_START_POS 3i
|
||||
</span>
|
||||
To change the style parameters for selected parts of a cover, you
|
||||
might do something like this:
|
||||
<br/>
|
||||
<span class="pre-in-pp">
|
||||
.COVER_TITLE_FONT B
|
||||
.COVER_TITLE_SIZE +4
|
||||
.COVER_SUBTITLE_FONT I
|
||||
.COVER_AUTHOR_FONT R
|
||||
.COVER_AUTHOR_SPACE_BEFORE 6p
|
||||
.COVER_DOCTYPE_COLOR red
|
||||
.COVER_MISC_SIZE -1
|
||||
.COVER_MISC_LEAD 12
|
||||
.COVER_COPYRIGHT_SIZE -2
|
||||
.COVER_COPYRIGHT_QUAD L
|
||||
.COVER_MISC_QUAD R
|
||||
</span>
|
||||
Note in the above example that _COPYRIGHT_QUAD and _MISC_QUAD set
|
||||
both the horizontal position on the page and the quad direction,
|
||||
either L (or LEFT) or R (or RIGHT), and have no corresponding
|
||||
docheader control macro.
|
||||
</p>
|
||||
|
||||
<div class="box-tip">
|
||||
<p class="tip-top">
|
||||
<span class="note">Tip:</span>
|
||||
As with the docheader control macros, <kbd>DOC_COVER_</kbd> and
|
||||
<kbd>COVER_</kbd> part/parameter style changes may be
|
||||
<a href="docprocessing.html#grouping">grouped</a>,
|
||||
for example
|
||||
<br/>
|
||||
<span class="pre-in-pp">
|
||||
.DOC_COVER_TITLE_STYLE \
|
||||
FAMILY A \
|
||||
FONT B \
|
||||
SIZE +4 \
|
||||
CAPS
|
||||
</span>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<!-- Navigation links -->
|
||||
<table style="width: 100%; margin-top: 12px;">
|
||||
<tr>
|
||||
<td style="width: 33%;"><a href="toc.html">Back to Table of Contents</a></td>
|
||||
<td style="width: 33%; text-align: center;"><a href="#top">Top</a></td>
|
||||
<td style="width: 33%; text-align: right;"><a href="tables-of-contents.html">Next: Tables of contents</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="bottom-spacer"><br/></div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
996
OGP64/usr/share/doc/groff-1.24.1/html/mom/definitions.html
Normal file
996
OGP64/usr/share/doc/groff-1.24.1/html/mom/definitions.html
Normal file
|
|
@ -0,0 +1,996 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
This file is part of groff, the GNU roff type-setting system.
|
||||
|
||||
Copyright (C) 2004-2020 Free Software Foundation, Inc.
|
||||
Written by Peter Schaffter (peter@schaffter.ca).
|
||||
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.3 or
|
||||
any later version published by the Free Software Foundation; with no
|
||||
Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
|
||||
Texts.
|
||||
|
||||
A copy of the Free Documentation License is included as a file called
|
||||
FDL in the main directory of the groff source package.
|
||||
-->
|
||||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html;charset=utf-8"/>
|
||||
<title>Mom -- Definitions and Terms</title>
|
||||
<link rel="stylesheet" type="text/css" href="stylesheet.css" />
|
||||
</head>
|
||||
|
||||
<body style="background-color: #f5faff;">
|
||||
|
||||
<!-- ==================================================================== -->
|
||||
|
||||
<div id="top" class="page">
|
||||
|
||||
<!-- Navigation links -->
|
||||
<table style="width: 100%;">
|
||||
<tr>
|
||||
<td><a href="toc.html">Back to Table of Contents</a></td>
|
||||
<td style="text-align: right;"><a href="using.html#top">Next: Using mom</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h1 id="terms" class="docs">Definitions of terms used in this manual</h1>
|
||||
|
||||
<p>
|
||||
I use a number of typesetting-specific and groff-specific terms
|
||||
throughout this documentation, as well as a few terms that apply
|
||||
to mom herself. To make life easier, I’ll explain
|
||||
them here. Refer back to this section should you encounter a word
|
||||
or concept you’re not familiar with.
|
||||
</p>
|
||||
|
||||
<div class="rule-short" style="margin-top: 18px; margin-bottom: 28px;"><hr/></div>
|
||||
|
||||
<div class="col-1-definitions">
|
||||
<table class="definitions">
|
||||
<tr><th class="definitions">Typesetting terms</th></tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="#ascender">Ascender</a><br/>
|
||||
<a href="#baseline">Baseline</a><br/>
|
||||
<a href="#ballotbox">Ballot box</a><br/>
|
||||
<a href="#bullet">Bullet</a><br/>
|
||||
<a href="#capheight">Cap-height</a><br/>
|
||||
<a href="#descender">Descender</a><br/>
|
||||
<a href="#discretionaryhyphen">Discretionary hyphen</a><br/>
|
||||
<a href="#dropcap">Drop cap</a><br/>
|
||||
<a href="#em">Em/en</a><br/>
|
||||
<a href="#family">Family</a><br/>
|
||||
<a href="#figurespace">Figure space/Digit space</a><br/>
|
||||
<a href="#fixedwidthfont">Fixed width font</a><br/>
|
||||
<a href="#fixedwidthspace">Fixed width space</a><br/>
|
||||
<a href="#font">Font</a><br/>
|
||||
<a href="#force">Force justify</a><br/>
|
||||
<a href="#just">Justify/justification</a><br/>
|
||||
<a href="#gutter">Gutter</a><br/>
|
||||
<a href="#kern">Kerning</a><br/>
|
||||
<a href="#kernunit">Kern Units</a><br/>
|
||||
<a href="#leading">Lead/leading</a><br/>
|
||||
<a href="#leader">Leaders</a><br/>
|
||||
<a href="#ligatures">Ligature</a><br/>
|
||||
<a href="#picaspoints">Picas/Points</a><br/>
|
||||
<a href="#ps">Point Size</a><br/>
|
||||
<a href="#quad">Quad</a><br/>
|
||||
<a href="#rag">Rag</a><br/>
|
||||
<a href="#shape">Shape</a><br/>
|
||||
<a href="#solid">Solid/set solid</a><br/>
|
||||
<a href="#trackkerning">Track kerning/Line kerning</a><br/>
|
||||
<a href="#unbreakablespace">Unbreakable space</a><br/>
|
||||
<a href="#weight">Weight</a><br/>
|
||||
<a href="#wordspace">Word space</a><br/>
|
||||
<a href="#xheight">x-height</a><br/>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="col-2-definitions">
|
||||
<table class="definitions">
|
||||
<tr><th class="definitions">Groff terms</th></tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="#alias">Alias</a><br/>
|
||||
<a href="#arguments">Arguments</a><br/>
|
||||
<a href="#commentlines">Comment lines</a><br/>
|
||||
<a href="#controllines">Control Lines</a><br/>
|
||||
<a href="#filled">Filled lines</a><br/>
|
||||
<a href="#inlines">Inline escapes</a><br/>
|
||||
<a href="#inputline">Input line</a><br/>
|
||||
<a href="#macros">Macros</a><br/>
|
||||
<a href="#units">Machine units</a><br/>
|
||||
<a href="#numericargument">Numeric argument</a><br/>
|
||||
<a href="#outputline">Output line</a><br/>
|
||||
<a href="#primitives">Primitives</a><br/>
|
||||
<a href="#preprocessor">Pre-processor</a><br/>
|
||||
<a href="#stringargument">String Argument</a><br/>
|
||||
<a href="#unitofmeasure">Unit of measure</a><br/>
|
||||
<a href="#zerowidthcharacter">Zero-width character</a><br/>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="col-3-definitions">
|
||||
<table class="definitions">
|
||||
<tr><th class="definitions">Mom terms</th></tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="#baseline-grid">Baseline grid</a><br/>
|
||||
<a href="#blockquote">Blockquote</a><br/>
|
||||
<a href="#controlmacro">Control macro</a><br/>
|
||||
<a href="#docheader">Docheader</a><br/>
|
||||
<a href="#epigraph">Epigraph</a><br/>
|
||||
<a href="#float">Float</a><br/>
|
||||
<a href="#footer">Footer</a><br/>
|
||||
<a href="#head">Head</a><br/>
|
||||
<a href="#header">Header</a><br/>
|
||||
<a href="#linebreak">Linebreak</a><br/>
|
||||
<a href="#parahead">Paragraph head</a><br/>
|
||||
<a href="#pdflink">PDF link</a><br/>
|
||||
<a href="#pdfoutline">PDF outline</a><br/>
|
||||
<a href="#quote">Quote</a><br/>
|
||||
<a href="#running">Running text</a><br/>
|
||||
<a href="#toggle">Toggle</a><br/>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<h3 id="typesetting-terms" class="docs">Typesetting terms</h3>
|
||||
<dl>
|
||||
<dt id="ascender">Ascender</dt>
|
||||
<dd>
|
||||
The portion of a letter that extends above the bowl. For
|
||||
example, the letters a, c, and e have no ascenders. The letters
|
||||
b, d, and h do.
|
||||
</dd>
|
||||
|
||||
<dt id="baseline">Baseline</dt>
|
||||
<dd>
|
||||
The imaginary line on which the bottoms of capital letters and
|
||||
the bowls of lower case letters rest.
|
||||
</dd>
|
||||
|
||||
<dt id="ballotbox">Ballot box</dt>
|
||||
<dd>
|
||||
An unfilled square, usually
|
||||
<a href="#capheight">cap-height</a>
|
||||
in size, typically placed beside items in a checklist.
|
||||
</dd>
|
||||
|
||||
<dt id="bullet">Bullet</dt>
|
||||
<dd>
|
||||
A small, filled circle typically found beside items or points in
|
||||
a list.
|
||||
</dd>
|
||||
|
||||
<dt id="capheight">Cap-height</dt>
|
||||
<dd>
|
||||
The height of the tallest capital letter in a given
|
||||
<a href="#font">font</a>
|
||||
at the current
|
||||
<a href="#ps">point size</a>.
|
||||
</dd>
|
||||
|
||||
<dt id="descender">Descender</dt>
|
||||
<dd>
|
||||
The portion of a letter that extends beneath the
|
||||
<a href="#baseline">baseline</a>
|
||||
(j, q, y are letters with descenders).
|
||||
</dd>
|
||||
|
||||
<dt id="discretionaryhyphen">Discretionary hyphen</dt>
|
||||
<dd>
|
||||
A symbol inserted between two syllables of a word that indicates
|
||||
to a typesetting program the valid hyphenation points in the
|
||||
word. Normally, if hyphenation is turned on, groff knows where
|
||||
to hyphenate words. However, hyphenation being what it is
|
||||
(in English, at any rate), groff doesn’t always get it right.
|
||||
Discretionary hyphens make sure it does. In the event that the
|
||||
word doesn’t need to be hyphenated at all, groff leaves them
|
||||
alone. In groff, the discretionary hyphen is entered with
|
||||
<kbd>\%</kbd> (i.e. a backslash followed by the percent sign).
|
||||
</dd>
|
||||
|
||||
<dt id="dropcap">Drop cap</dt>
|
||||
<dd>
|
||||
A large, usually upper-case letter that introduces the first
|
||||
paragraph of a document or section thereof. The top of the
|
||||
drop cap usually lines up with the top of the first line of the
|
||||
paragraph, and typically “drops” several lines lower.
|
||||
Text adjacent to the drop cap is indented to the right of the
|
||||
letter until the bottom of the drop cap is reached, at which
|
||||
point text reverts to the left margin.
|
||||
</dd>
|
||||
|
||||
<dt id="em">Em/en</dt>
|
||||
<dd>
|
||||
An em is a relative measurement equal to the width of the
|
||||
letter M at a given
|
||||
<a href="#ps">point size</a>
|
||||
in a given
|
||||
<a href="#font">font</a>.
|
||||
Since most Ms are designed square, an em is usually (but
|
||||
sometimes erroneously) considered to be the same size as the
|
||||
current point size (i.e., if the point size of the type is 12,
|
||||
one em equals 12 points). An en is equal to the width of a
|
||||
letter N (historically 2/3 of an em, although groff treats an en
|
||||
as 1/2 of an em). Typically, ems and ens are used to measure
|
||||
indents, or to define the length of dashes (long hyphens).
|
||||
</dd>
|
||||
|
||||
<dt id="family">Family</dt>
|
||||
<dd>
|
||||
The collective name by which a collection of
|
||||
<a href="#font">fonts</a>
|
||||
are known, e.g. Helvetica, Times Roman, Garamond.
|
||||
</dd>
|
||||
|
||||
<dt id="figurespace">Figure space/Digit space</dt>
|
||||
<dd>
|
||||
A
|
||||
<a href="#fixedwidthspace">fixed width space</a>
|
||||
that has the width of one digit. Used for aligning numerals in,
|
||||
say, columns or numbered lists. In groff, the figure space is
|
||||
entered with <kbd>\0</kbd> (i.e. a backslash followed by a zero)
|
||||
</dd>
|
||||
|
||||
<dt id="fixedwidthfont">Fixed-width font</dt>
|
||||
<dd>
|
||||
A family or font in which every character occupies exactly the
|
||||
same amount of horizontal space on the line. Courier is the
|
||||
best-known, if not the most elegant, fixed-width font.
|
||||
</dd>
|
||||
|
||||
<dt id="fixedwidthspace">Fixed width space</dt>
|
||||
<dd>
|
||||
Equal to
|
||||
<a href="#wordspace">word space</a>,
|
||||
but does not expand or contract when text is
|
||||
<a href="#just">justified</a>.
|
||||
In groff, fixed width space is entered with
|
||||
<kbd>\<space></kbd> (i.e. a backslash followed by a space)
|
||||
</dd>
|
||||
|
||||
<dt id="font">Font</dt>
|
||||
<dd>
|
||||
The specific
|
||||
<a href="#weight">weight</a>
|
||||
and
|
||||
<a href="#shape">shape</a>
|
||||
of type within a
|
||||
<a href="#family">family</a>,
|
||||
e.g. light, medium, bold (which are weights), and roman, italic,
|
||||
condensed (which are shapes). By default, groff knows of four
|
||||
fonts within its default set of families: R (medium roman), I
|
||||
(medium italic), B (bold roman) and BI (bold italic).
|
||||
Mom considerably extends this very basic list.
|
||||
</dd>
|
||||
|
||||
<dt id="force">Force justify</dt>
|
||||
<dd>
|
||||
Sometimes, in
|
||||
<a href="#just">justified</a>
|
||||
text, a line needs to be broken short of the right margin.
|
||||
Force justifying means telling a typesetting program (like
|
||||
groff) that you want the line broken early AND that you want the
|
||||
line’s word spacing stretched to force the line flush with the
|
||||
right margin.
|
||||
</dd>
|
||||
|
||||
<dt id="gutter">Gutter</dt>
|
||||
<dd>
|
||||
The vertical whitespace separating columns of type.
|
||||
</dd>
|
||||
|
||||
<dt id="just">Justify/justification</dt>
|
||||
<dd>
|
||||
Lines of type are justified when they’re flush at both the left
|
||||
and right margins. Justification is the act of making both
|
||||
margins flush. Some people use the terms "left justified" and
|
||||
"right justified" to mean type where only the left (or right)
|
||||
margins align. I don’t. See
|
||||
<a href="#quad">quad</a>.
|
||||
</dd>
|
||||
|
||||
<dt id="kern">Kerning</dt>
|
||||
<dd>
|
||||
Moving pairs of letters closer together to remove excess
|
||||
whitespace between them. In the days before phototypesetting,
|
||||
type was set from small, rectangular blocks of wood or metal,
|
||||
each block having exactly one letter. Because the edge of
|
||||
each block determined the edge of each letter, certain letter
|
||||
combinations (TA, for example) didn’t fit together well and had
|
||||
to be mortised by hand to bring them visually closer. Modern
|
||||
typesetting systems usually take care of kerning automatically,
|
||||
but they’re far from perfect. Professional typesetters still
|
||||
devote a lot of time to fitting letters and punctuation together
|
||||
properly.
|
||||
</dd>
|
||||
|
||||
<dt id="kernunit">Kern Units</dt>
|
||||
<dd>
|
||||
A relative distance, which, by default, is equal to 1/36 of the
|
||||
current
|
||||
<a href="#ps">point size</a>.
|
||||
Used between individual letters for
|
||||
<a href="#kern">kerning</a>.
|
||||
Different typesetting systems use different values (1/54 is
|
||||
popular), and sometimes call kern units by a different name.
|
||||
It is possible to change the default size of the kern unit with the
|
||||
<a href="inlines.html#kernunit">KERN_UNIT</a>
|
||||
macro.
|
||||
</dd>
|
||||
|
||||
<dt id="leading">Lead/leading</dt>
|
||||
<dd>
|
||||
The distance from the
|
||||
<a href="#baseline">baseline</a>
|
||||
of one line of type to the line of type immediately beneath
|
||||
it. Pronounced "ledding." Also called line spacing. Usually
|
||||
measured in
|
||||
<a href="#picaspoints">points</a>.
|
||||
|
||||
<p>
|
||||
<em>In case you’re interested...</em> In previous centuries,
|
||||
lines of type were separated by thin strips of—you guessed
|
||||
it—lead. Lines of type that had no lead between them were said
|
||||
to be “set solid.” Once you began separating them with
|
||||
strips of lead, they were said to be “leaded”, and the
|
||||
spacing was expressed in terms of the number of
|
||||
<a href="#picaspoints">points</a>
|
||||
of lead. For this reason, “leading” and “line
|
||||
spacing” aren’t, historically speaking, synonymous.
|
||||
If type was set 10 on 12, for example, the leading was 2
|
||||
points, not 12. Nowadays, however, the two terms are used
|
||||
interchangeably to mean the distance from baseline to baseline.
|
||||
</p>
|
||||
|
||||
</dd>
|
||||
|
||||
<dt id="leader">Leaders</dt>
|
||||
<dd>
|
||||
Single characters used to fill lines, usually to their end. So
|
||||
called because they “lead” the eye from one element
|
||||
of the page to another. For example, in the following (brief)
|
||||
Table of Contents, the periods (dots) are leaders.
|
||||
|
||||
<span class="pre" style="margin-bottom: -2em;">
|
||||
Foreword............... 2
|
||||
Chapter 1.............. 5
|
||||
Chapter 2.............. 38
|
||||
Chapter 3.............. 60
|
||||
</span>
|
||||
</dd>
|
||||
|
||||
<dt id="ligatures">Ligature</dt>
|
||||
<dd>
|
||||
Ligatures are letters joined together to form a single
|
||||
character. The commonest are fi, fl, ff, ffi and ffl. Others
|
||||
are ae and oe. Occasionally, one sees an st ligature, but this
|
||||
is archaic and quite rare.
|
||||
</dd>
|
||||
|
||||
<dt id="picaspoints">Picas/Points</dt>
|
||||
<dd>
|
||||
There are twelve points in a pica, and six picas in an inch
|
||||
(hence 72 points to the inch). In the same way that gem-dealers
|
||||
have always used their own system of measurement for weight
|
||||
(carats), typographers have always used their own system of
|
||||
measurement for type.
|
||||
</dd>
|
||||
|
||||
<dt id="ps">Point Size</dt>
|
||||
<dd>
|
||||
The nominal size of type, measured in
|
||||
<a href="#picaspoints">points</a>
|
||||
from the bottom of the longest
|
||||
<a href="#descender">descender</a>
|
||||
to the top of the highest
|
||||
<a href="#ascender">ascender</a>.
|
||||
In reality, type is always fractionally smaller than its point
|
||||
size.
|
||||
</dd>
|
||||
|
||||
<dt id="quad">Quad</dt>
|
||||
<dd>
|
||||
When only one margin of type is flush, lines of type are quadded
|
||||
in the direction of the flush margin. Therefore, quad left
|
||||
means the left margin is flush, the right isn’t. Quad right
|
||||
means the right margin is flush, the left isn’t. Quad centre
|
||||
means neither the left nor the right margin is flush; rather,
|
||||
lines of type are quadded on both sides so that type appears
|
||||
centred on the page.
|
||||
</dd>
|
||||
|
||||
<dt id="rag">Rag</dt>
|
||||
<dd>
|
||||
Describes a margin that isn’t flush. Rag right means the right
|
||||
margin isn’t flush. Rag left means the left margin isn’t flush.
|
||||
The expression "flush left/rag right" is sometimes used to
|
||||
describe type that is
|
||||
<a href="#quad">quadded</a>
|
||||
left.
|
||||
</dd>
|
||||
|
||||
<dt id="shape">Shape</dt>
|
||||
<dd>
|
||||
The degree of slant and/or the width of characters.
|
||||
(Technically speaking, this is not a proper typesetting term;
|
||||
however, it may help clarify some concepts presented in these
|
||||
documents.)
|
||||
|
||||
<p>
|
||||
Some typical shapes are:
|
||||
</p>
|
||||
|
||||
<ul style="margin-top: -.5em; margin-bottom: -.5em">
|
||||
<li>Roman, which has no slant, and has letterforms of
|
||||
average width</li>
|
||||
<li>Italic, which is slanted, and has letterforms
|
||||
of average width</li>
|
||||
<li>Condensed, which has no slant, but has
|
||||
letterforms narrower than the average represented by Roman</li>
|
||||
<li>Condensed Italic, which is slanted, with letterforms narrower
|
||||
than average</li>
|
||||
</ul>
|
||||
|
||||
<p>
|
||||
The term
|
||||
<a href="#font">font</a>,
|
||||
as it is used in these documents, refers to a combination of
|
||||
<a href="#weight">weight</a>
|
||||
and shape.
|
||||
</p>
|
||||
|
||||
</dd>
|
||||
|
||||
<dt id="solid">Solid/set solid</dt>
|
||||
<dd>
|
||||
When no
|
||||
<a href="#leading">lead</a>
|
||||
is added between lines of type (i.e., the
|
||||
<a href="#ps">point size</a>
|
||||
and linespacing are the same), the lines are said to be “set
|
||||
solid.”
|
||||
</dd>
|
||||
|
||||
<dt id="trackkerning">Track kerning/Line kerning</dt>
|
||||
<dd>
|
||||
Sometimes, it’s advantageous to increase or decrease the amount
|
||||
of space between every letter in a line by an equal (usually
|
||||
small) amount, in order to fit more (or fewer) characters on the
|
||||
line. The correct term is letter spacing, but track kerning and
|
||||
line kerning (and sometimes, just "kerning") have come to mean
|
||||
the same thing.
|
||||
</dd>
|
||||
|
||||
<dt id="unbreakablespace">Unbreakable space</dt>
|
||||
<dd>
|
||||
Equal to
|
||||
<a href="#wordspace">word space</a>,
|
||||
however words separated by an unbreakable space will always be
|
||||
kept together on the same line. Expands and contracts like word
|
||||
space. Useful for proper names, which one should, whenever
|
||||
possible, avoid splitting onto two lines. In groff, unbreakable
|
||||
space is entered with <kbd>\~</kbd> (i.e. a backslash followed by a
|
||||
tilde)
|
||||
</dd>
|
||||
|
||||
<dt id="weight">Weight</dt>
|
||||
<dd>
|
||||
The thickness of the strokes of letterforms. Medium and Book
|
||||
have average thicknesses and are the weights used for most
|
||||
of the text in books, magazines, newspapers, etc. Light has
|
||||
strokes slightly thinner than Medium or Book, but is still
|
||||
acceptable for most text. Semibold, Bold, Heavy and Black all
|
||||
have strokes of increasing thickness, making them suitable for
|
||||
headings and the like.
|
||||
</dd>
|
||||
|
||||
<dt id="wordspace">Word space</dt>
|
||||
<dd>
|
||||
The amount of whitespace between words. When text is
|
||||
<a href="#just">justified</a>,
|
||||
word space expands or contracts to make the margins flush.
|
||||
</dd>
|
||||
|
||||
<dt id="xheight">x-height</dt>
|
||||
<dd>
|
||||
The height of a lower case letter x in a given font at a given
|
||||
point size. Generally used to mean the average height of the
|
||||
bowl of lower case letters.
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<h3 id="groff-terms" class="docs">Groff terms</h3>
|
||||
|
||||
<dl>
|
||||
<dt id="alias">Alias</dt>
|
||||
<dd>
|
||||
A
|
||||
<a href="#macros">macro</a>
|
||||
invoked by a name different from its “official”
|
||||
name. For example, the official name of the macro to change
|
||||
<a href="#family">family</a>
|
||||
is <kbd>FAMILY</kbd>. Its alias is <kbd>FAM</kbd>.
|
||||
Aliases may be created for any macro (via the
|
||||
<a href="goodies.html#alias"><kbd>ALIAS</kbd></a>
|
||||
macro) provided the alias uses a name not already taken by the
|
||||
mom macros or one of the groff
|
||||
<a href="#primitives">primitives</a>.
|
||||
For a complete list of words or names you must not use, see the
|
||||
<a href="reserved.html#reserved">list of reserved words</a>.
|
||||
</dd>
|
||||
|
||||
<dt id="arguments">Arguments</dt>
|
||||
<dd>
|
||||
Parameters or information needed by a
|
||||
<a href="#macros">macro</a>
|
||||
to do its job. For example, in the macro
|
||||
|
||||
<span class="pre" style="margin-bottom: -2em;">
|
||||
.PT_SIZE 12
|
||||
</span>
|
||||
|
||||
<kbd>12</kbd> is the argument. In the macro
|
||||
|
||||
<span class="pre" style="margin-bottom: -2em;">
|
||||
.QUAD LEFT
|
||||
</span>
|
||||
|
||||
<kbd>LEFT</kbd> is the argument. Arguments are separated from
|
||||
macros by spaces. Some macros require several arguments; each
|
||||
is separated by a space.
|
||||
</dd>
|
||||
|
||||
<dt id="commentlines">Comment Lines</dt>
|
||||
<dd>
|
||||
<a href="#inputline">Input lines</a>
|
||||
introduced with the comment character <kbd>\#</kbd> (i.e. a
|
||||
backslash followed by the pound sign). When processing output,
|
||||
groff silently ignores everything on a line that begins with the
|
||||
comment character.
|
||||
</dd>
|
||||
|
||||
<dt id="controllines">Control Lines</dt>
|
||||
<dd>
|
||||
Instructions to groff that appear on a line by themselves, which
|
||||
means that “control lines” are either
|
||||
<a href="#macros">macros</a>
|
||||
or groff
|
||||
<a href="#primitives">primitives</a>.
|
||||
Control lines begin with a period or, occasionally, an apostrophe.
|
||||
</dd>
|
||||
|
||||
<dt id="filled">Filled lines/fill mode</dt>
|
||||
<dd>
|
||||
Automatic
|
||||
<a href="#just">justification</a>
|
||||
or
|
||||
<a href="#quad">quadding</a>.
|
||||
In fill mode, the ends of lines as they appear in your text
|
||||
editor are ignored. Instead, words from adjoining
|
||||
<a href="#inputline">input lines</a>
|
||||
are added one at a time to the output line until no more words
|
||||
fit. Then, depending whether text is to be
|
||||
<a href="#just">justified</a>
|
||||
or
|
||||
<a href="#quad">quadded</a>
|
||||
(left, right, or centre), and depending on whether automatic
|
||||
hyphenation is turned on, groff attempts to hyphenate the last
|
||||
word, or, barring that, spreads and breaks the line (when
|
||||
justification is turned on) or breaks and quads the line (when
|
||||
quadding is turned on).
|
||||
|
||||
<p id="no-fill">
|
||||
Nofill mode (non-filled text) means that groff respects the ends
|
||||
of lines exactly as they appear in your text editor.
|
||||
</p>
|
||||
|
||||
</dd>
|
||||
|
||||
<dt id="inlines">Inline escapes</dt>
|
||||
<dd>
|
||||
Instructions issued to groff that appear as part of an
|
||||
<a href="#inputline">input line</a>
|
||||
(as opposed to
|
||||
<a href="#macros">macros</a>,
|
||||
which must appear on a line by themselves). Inline escapes are
|
||||
always introduced by the backslash character. For example,
|
||||
|
||||
<span class="pre" style="margin-bottom: -2em;">
|
||||
A line of text with the word T\*[BU 2]oronto in it
|
||||
</span>
|
||||
|
||||
contains the inline escape <kbd>\*[BU 2]</kbd> (which means
|
||||
“move the letter ‘o’ 2
|
||||
<a href="#kernunit">kern units</a>
|
||||
closer to the letter ‘T’”).
|
||||
|
||||
<p style="margin-bottom: -2em;">
|
||||
Mom’s inline escapes always take the form
|
||||
<kbd>\*[<ESCAPE>]</kbd>, where <kbd>ESCAPE</kbd> is
|
||||
composed of capital letters, sometimes followed immediately by a
|
||||
digit, sometimes followed by a space and a
|
||||
<a href="#numericargument">numeric argument</a>.
|
||||
Groff’s escapes begin with the backslash
|
||||
character but typically have no star and are in lower case. For
|
||||
example, the mom escapes to move forward 6
|
||||
points on a line are either
|
||||
|
||||
<span class="pre" style="margin-bottom: -2em;">
|
||||
\*[FP6] or \*[FWD 6p]
|
||||
</span>
|
||||
|
||||
while the groff escape for the same thing is
|
||||
|
||||
<span class="pre" style="margin-bottom: -2em;">
|
||||
\h’6p’
|
||||
</span>
|
||||
</p>
|
||||
|
||||
</dd>
|
||||
|
||||
<dt id="inputline" style="margin-top: -1em;">Input line</dt>
|
||||
<dd>
|
||||
A line of text as it appears in your text editor.
|
||||
</dd>
|
||||
|
||||
<dt id="macros">Macros</dt>
|
||||
<dd>
|
||||
Instructions embedded in a document that determine how groff
|
||||
processes the text for output. mom’s macros
|
||||
always begin with a period, on a line by themselves, and must
|
||||
be typed in capital letters. Typically, macros contain complex
|
||||
commands issued to groff—behind the scenes—via
|
||||
groff
|
||||
<a href="#primitives">primitives</a>.
|
||||
</dd>
|
||||
|
||||
<dt id="units">Machine units</dt>
|
||||
<dd>
|
||||
A machine unit is 1/1000 of a
|
||||
<a href="#picaspoints">point</a>
|
||||
when the groff device is ps. (“ps” means
|
||||
“PostScript”—the default device for
|
||||
which groff prepares output, and the device for which
|
||||
mom was originally designed.)
|
||||
</dd>
|
||||
|
||||
<dt id="numericargument">Numeric argument</dt>
|
||||
<dd>
|
||||
An
|
||||
<a href="#arguments">argument</a>
|
||||
that has the form of a digit. Numeric arguments can be built
|
||||
out of arithmetic expressions using +, -, *, and / for plus,
|
||||
minus, times, and divided-by respectively. If a numeric
|
||||
argument requires a
|
||||
<a href="#unitofmeasure">unit of measure</a>,
|
||||
a unit of measure must be appended to <em>every</em> digit in
|
||||
the argument. For example:
|
||||
|
||||
<span class="pre" style="margin-bottom: -2em;">
|
||||
.ALD 1i-1v
|
||||
</span>
|
||||
|
||||
<div class="box-important" style="margin-right: 2.5em;">
|
||||
<p class="tip">
|
||||
<span class="important">IMPORTANT:</span> groff does not
|
||||
respect the order of operations, but rather evaluates
|
||||
arithmetic expressions from left to right. Parentheses must
|
||||
be used to circumvent this peculiarity. Not to worry, though.
|
||||
The likelihood of more than just the occasional plus or minus
|
||||
sign when using mom’s macros is slim.
|
||||
</p>
|
||||
</div>
|
||||
</dd>
|
||||
|
||||
<dt id="outputline">Output line</dt>
|
||||
<dd>
|
||||
A line of text as it appears in output copy.
|
||||
</dd>
|
||||
|
||||
<dt id="preprocessor">Pre-processor</dt>
|
||||
<dd>
|
||||
Pre-processors are used by groff to generate tables
|
||||
(<strong>tbl</strong>), diagrams (<strong>pic</strong>), graphs
|
||||
(<strong>grap</strong>), and equations (<strong>eqn</strong>).
|
||||
These pre-processors are fully supported by mom. In addition,
|
||||
the “refer” pre-processor is used to generate
|
||||
bibliographies and lists of cited works. The PDF_IMAGE macro,
|
||||
which allows insertion of graphics into a document, is not
|
||||
strictly a pre-processor but behaves similarly to tbl, pic, and
|
||||
eqn.
|
||||
</dd>
|
||||
|
||||
<dt id="primitives">Primitives</dt>
|
||||
<dd>
|
||||
The lowercase instructions, introduced with a period, that groff
|
||||
uses as its native command language, and out of which macros
|
||||
are built. The majority of groff’s primitive requests are two
|
||||
letters long.
|
||||
</dd>
|
||||
|
||||
<dt id="stringargument">String Argument</dt>
|
||||
<dd>
|
||||
Technically, any
|
||||
<a href="#arguments">argument</a>
|
||||
that is not numeric. In this documentation, string argument
|
||||
means an argument that requires the user to input text. For
|
||||
example, in the
|
||||
<a href="#macros">macro</a>
|
||||
|
||||
<span class="pre" style="margin-bottom: -2em;">
|
||||
.TITLE "My Pulitzer Novel"
|
||||
</span>
|
||||
|
||||
<kbd>"My Pulitzer Novel"</kbd> is a string argument.
|
||||
|
||||
<p>
|
||||
Because string arguments must be enclosed by double-quotes, you
|
||||
can’t use double-quotes as part of the string argument. If you
|
||||
need double-quotes to be part of a string argument, use the
|
||||
<a href="#inlines">inline escapes</a>
|
||||
<kbd>\(lq</kbd> and <kbd>\(rq</kbd> (leftquote and
|
||||
rightquote respectively) in place of the double-quote character
|
||||
(<kbd>"</kbd>).
|
||||
</p>
|
||||
|
||||
</dd>
|
||||
|
||||
<dt id="unitofmeasure">Unit of measure</dt>
|
||||
<dd>
|
||||
The single letter after a
|
||||
<a href="#numericargument">numeric argument</a>
|
||||
that tells mom what measurement scale the
|
||||
argument should use. Common valid units are:
|
||||
|
||||
<span class="pre" style="margin-bottom: -2em;">
|
||||
i (inches)
|
||||
p (points)
|
||||
P (Picas)
|
||||
c (centimetres)
|
||||
m (ems)
|
||||
n (ens)
|
||||
u (machine units)
|
||||
v (the current leading [line space])
|
||||
</span>
|
||||
|
||||
<p style="margin-top: -1em;">
|
||||
Units of measure must come immediately after the numeric
|
||||
argument (i.e. with no space between the argument and the unit
|
||||
of measure), like this:
|
||||
|
||||
<span class="pre" style="margin-bottom: -2em;">
|
||||
.ALD 2v
|
||||
.LL 39P
|
||||
.IL 1i
|
||||
</span>
|
||||
|
||||
The above example advances 2 line spaces and sets the line
|
||||
length to 39 picas with a left indent of 1 inch.
|
||||
</p>
|
||||
|
||||
<div class="box-important" style="margin-right: 2.5em;">
|
||||
<p class="tip">
|
||||
<span class="important">IMPORTANT:</span>
|
||||
Most mom macros that set the size or measure of something must
|
||||
be given a unit of measure since most of the macros do not have
|
||||
default units of measure. There are a couple of exceptions,
|
||||
the most notable of which are <kbd>PT_SIZE</kbd> and
|
||||
<kbd class="bold">LS</kbd>. Both use
|
||||
<a href="#picaspoints">points</a>
|
||||
as the default unit of measure, which means you don’t have to
|
||||
append “p” to their argument.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
You can enter decimal values for any unit of measure. Different
|
||||
units may be combined by adding them together (e.g. 1.5i+2m,
|
||||
which gives a measure of 1-1/2 inches plus 2 ems).
|
||||
</p>
|
||||
|
||||
<div class="box-tip" style="margin-right: 2.5em;">
|
||||
<p class="tip">
|
||||
<span class="note">Note:</span>
|
||||
a pica is composed of 12 points, therefore 12.5 picas is 12
|
||||
picas and 6 points, not 12 picas and 5 points. If you want 12
|
||||
picas and 5 points, you have to enter the measure as 12P+5p.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
</dd>
|
||||
|
||||
<dt id="zerowidthcharacter">Zero-width character</dt>
|
||||
<dd>
|
||||
The
|
||||
<a href="#inlines">inline escape</a>
|
||||
that allows you to print a literal period, apostrophe and, if
|
||||
<a href="#outputline">output lines</a>
|
||||
are
|
||||
<a href="#filled">filled</a>,
|
||||
a space that falls at the beginning of an
|
||||
<a href="#inputline">input line</a>.
|
||||
It looks like this:
|
||||
|
||||
<span class="pre" style="margin-bottom: -2em;">
|
||||
\& <span style="font-family: arial, sans-serif; font-weight: normal">(i.e. a backslash followed by an ampersand)</span>
|
||||
</span>
|
||||
|
||||
Normally, groff interprets a period (or an apostrophe) at the
|
||||
beginning of an input line as meaning that what follows is a
|
||||
<a href="#controllines">control line</a>.
|
||||
In fill modes, groff treats a space at the beginning of an input
|
||||
line as meaning “start a new line and put a space at the
|
||||
beginning of it.” If you want groff to interpret periods
|
||||
and apostrophes at the beginning of input lines literally (i.e.
|
||||
to print them), or spaces at the beginning of input lines as just
|
||||
garden variety word spaces, you must start the line with the
|
||||
zero-width character.
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<h3 id="mom-terms" class="docs">Mom terms</h3>
|
||||
<dl>
|
||||
<dt id="baseline-grid">Baseline grid</dt>
|
||||
<dd>
|
||||
Virtual guide lines spaced according to the
|
||||
<a href="#leading">leading</a>
|
||||
established for running text. Adherence to the grid ensures that
|
||||
text fills the page completely to the bottom margin. Uncorrected
|
||||
deviations from the grid result in bottom margins that fall short.
|
||||
</dd>
|
||||
|
||||
<dt id="controlmacro">Control macro</dt>
|
||||
<dd>
|
||||
Macros used in
|
||||
<a href="docprocessing.html#docprocessing">document processing</a>
|
||||
to control/alter the appearance of document elements (e.g.
|
||||
headings, quotes, footnotes,
|
||||
<a href="#header">headers</a>,
|
||||
etc.).
|
||||
</dd>
|
||||
|
||||
<dt id="docheader">Document header/docheader</dt>
|
||||
<dd>
|
||||
Document information (title, subtitle, author, etc) output at
|
||||
the top of page one.
|
||||
</dd>
|
||||
|
||||
<dt id="epigraph">Epigraph</dt>
|
||||
<dd>
|
||||
A short, usually cited passage that appears at the beginning of
|
||||
a chapter, story, or other document.
|
||||
</dd>
|
||||
|
||||
<dt id="float">Float</dt>
|
||||
<dd>
|
||||
A float is material intended to be kept together as a block.
|
||||
Floated material that fits on a page in position is output on that
|
||||
page. Floats that do not fit in position are deferred to the top
|
||||
of the next page.
|
||||
</dd>
|
||||
|
||||
<dt id="footer">Footer/page footer</dt>
|
||||
<dd>
|
||||
Document information (frequently author and title) output in
|
||||
the bottom margin of pages after page one. Not to be
|
||||
confused with footnotes, which are considered part of
|
||||
<a href="#running">running text</a>.
|
||||
</dd>
|
||||
|
||||
<dt id="head">Heading</dt>
|
||||
<dd>
|
||||
The title used to identify a section of a document. Headings
|
||||
are hierarchic, corresponding to the notion of head, subhead,
|
||||
subsubhead, etc.
|
||||
</dd>
|
||||
|
||||
<dt id="header">Header/page header</dt>
|
||||
<dd>
|
||||
Document information (frequently author and title) output in the
|
||||
top margin of pages after page one.
|
||||
|
||||
<div class="box-tip" style="margin-right: 2.5em;">
|
||||
<p class="tip">
|
||||
<span class="note">Note:</span> In terms of content and style,
|
||||
headers and
|
||||
<a href="#footer">footers</a>
|
||||
are the same; they differ only in their placement on the page.
|
||||
In most places in this documentation, references to the content
|
||||
or style of headers applies equally to footers.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
</dd>
|
||||
|
||||
<dt id="linebreak">Linebreak/author linebreak</dt>
|
||||
<dd>
|
||||
A gap in the vertical flow of
|
||||
<a href="#running">running text</a>,
|
||||
frequently set off by typographic symbols such as asterisks or
|
||||
daggers. Used to indicate a shift in the content of a document
|
||||
(e.g. a scene change in a short story). Also commonly called a
|
||||
scene break or a section break.
|
||||
</dd>
|
||||
|
||||
<dt id="parahead">Paragraph head</dt>
|
||||
<dd>
|
||||
A heading joined to the body of a paragraph.
|
||||
</dd>
|
||||
|
||||
<dt id="pdflink">PDF link</dt>
|
||||
<dd>
|
||||
A portion of text that, when clicked on in a PDF viewer, navigates
|
||||
to a bookmarked location in a document, generally but not
|
||||
exclusively a heading. It may also point to an external URL.
|
||||
PDF links are usually coloured to make them stand out from the
|
||||
surrounding text.
|
||||
</dd>
|
||||
|
||||
<dt id="pdfoutline">PDF outline</dt>
|
||||
<dd>
|
||||
The hierarchically-arranged navigation outline provided by most PDF
|
||||
viewers (e.g. Okular, Evince), typically in a panel to the left of
|
||||
the document window, and usually labelled “Contents”.
|
||||
</dd>
|
||||
|
||||
<dt id="quote">Quote</dt>
|
||||
<dd>
|
||||
A quote, to mom, is a line-for-line setting
|
||||
of quoted material (e.g. poetry, song lyrics, or a snippet of
|
||||
programming code). You don’t have to use
|
||||
<a href="typesetting.html#br"><kbd>BR</kbd></a>
|
||||
with quotes.
|
||||
</dd>
|
||||
|
||||
<dt id="running">Running text</dt>
|
||||
<dd>
|
||||
In a document formatted with mom, running
|
||||
text means text that forms the body of the document, including
|
||||
elements such as headings.
|
||||
<a href="#docheader">Docheaders</a>,
|
||||
<a href="#header">headers</a>,
|
||||
<a href="#footer">footers</a>
|
||||
and page numbers are not part of running text.
|
||||
</dd>
|
||||
|
||||
<dt id="toggle">Toggle</dt>
|
||||
<dd>
|
||||
A macro or tag that, when invoked without an argument, begins
|
||||
something or turns a feature on, and, when invoked with ANY
|
||||
argument, ends something or turns a feature off. See
|
||||
<a href="intro.html#toggle-example">Example 3</a>
|
||||
of the section
|
||||
<a href="intro.html#macro-args">How to read macro arguments</a>.
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<div class="rule-long"><hr/></div>
|
||||
|
||||
<!-- Navigation links -->
|
||||
<table style="width: 100%;">
|
||||
<tr>
|
||||
<td style="width: 33%;"><a href="toc.html">Back to Table of Contents</a></td>
|
||||
<td style="width: 33%; text-align: center;"><a href="#top">Top</a></td>
|
||||
<td style="width: 33%; text-align: right;"><a href="using.html#top">Next: Using mom</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="bottom-spacer"><br/></div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
6732
OGP64/usr/share/doc/groff-1.24.1/html/mom/docelement.html
Normal file
6732
OGP64/usr/share/doc/groff-1.24.1/html/mom/docelement.html
Normal file
File diff suppressed because it is too large
Load diff
4434
OGP64/usr/share/doc/groff-1.24.1/html/mom/docprocessing.html
Normal file
4434
OGP64/usr/share/doc/groff-1.24.1/html/mom/docprocessing.html
Normal file
File diff suppressed because it is too large
Load diff
1784
OGP64/usr/share/doc/groff-1.24.1/html/mom/goodies.html
Normal file
1784
OGP64/usr/share/doc/groff-1.24.1/html/mom/goodies.html
Normal file
File diff suppressed because it is too large
Load diff
689
OGP64/usr/share/doc/groff-1.24.1/html/mom/graphical.html
Normal file
689
OGP64/usr/share/doc/groff-1.24.1/html/mom/graphical.html
Normal file
|
|
@ -0,0 +1,689 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
This file is part of groff, the GNU roff type-setting system.
|
||||
|
||||
Copyright (C) 2004-2020 Free Software Foundation, Inc.
|
||||
Written by Peter Schaffter (peter@schaffter.ca).
|
||||
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.3 or
|
||||
any later version published by the Free Software Foundation; with no
|
||||
Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
|
||||
Texts.
|
||||
|
||||
A copy of the Free Documentation License is included as a file called
|
||||
FDL in the main directory of the groff source package.
|
||||
-->
|
||||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html;charset=utf-8"/>
|
||||
<title>Mom -- Graphical Objects</title>
|
||||
<link rel="stylesheet" type="text/css" href="stylesheet.css" />
|
||||
</head>
|
||||
|
||||
<body style="background-color: #f5faff;">
|
||||
|
||||
<!-- ==================================================================== -->
|
||||
|
||||
<div id="top" class="page">
|
||||
|
||||
<!-- Navigation links -->
|
||||
<table style="width: 100%;">
|
||||
<tr>
|
||||
<td><a href="toc.html">Back to Table of Contents</a></td>
|
||||
<td style="text-align: right;"><a href="docprocessing.html#top">Next: Document processing</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h1 class="docs">Graphical objects</h1>
|
||||
|
||||
<div style="text-align: center;">
|
||||
<ul class="no-enumerator" style="margin-left: -2.5em;">
|
||||
<li><a href="#intro-graphical">Introduction to graphical objects</a></li>
|
||||
<li><a href="#behaviour">Graphical objects behaviour</a></li>
|
||||
<li><a href="#order">Order of arguments</a></li>
|
||||
<li><a href="#index-graphical">Index of graphical objects macros</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="rule-medium"><hr/></div>
|
||||
|
||||
<h2 id="intro-graphical" class="docs">Introduction to graphical objects</h2>
|
||||
|
||||
<p>
|
||||
Groff has a number of
|
||||
<a href="definitions.html#inlines">inline escapes</a>
|
||||
for drawing rules, polygons, ellipses and splines. All begin with
|
||||
<kbd>\D</kbd> (presumably for “Draw”) and are documented
|
||||
in the groff info manual:
|
||||
<br/>
|
||||
<span class="pre-in-pp">
|
||||
info groff \D
|
||||
</span>
|
||||
The escapes allow you to draw just about any simple graphical object
|
||||
you can think of, but owing to their syntax they’re not always easy
|
||||
to read, which can make tweaking them difficult. Additionally,
|
||||
while they perform in a <i>consistent</i> manner, they don’t
|
||||
always perform in an <i>expected</i> manner.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Experience shows that the most common graphical elements typesetters
|
||||
need are rules (horizontal and vertical), boxes, and circles (or
|
||||
ellipses). For this reason, mom provides macros
|
||||
to draw these objects in an easy-to-understand way; the results are
|
||||
predictable, and mom’s syntax makes fixes or tweaks
|
||||
painless.
|
||||
</p>
|
||||
|
||||
<p id="graphical-example">
|
||||
For example, if you want to draw a 2-inch square outline box at the left
|
||||
margin using groff’s <kbd>\D</kbd> escapes, it looks like this:
|
||||
<br/>
|
||||
<span class="pre-in-pp">
|
||||
back up
|
||||
by
|
||||
weight
|
||||
+-------+
|
||||
| |
|
||||
\D't 500'\h'-500u'\D'p 2i 0 0 2i -2i 0 0 -2i'
|
||||
| | | |
|
||||
+-------+ +------------------------+
|
||||
set rule draw box, 1 line at a time
|
||||
weight
|
||||
</span>
|
||||
|
||||
Obviously, this isn’t very efficient for something as simple as a
|
||||
box.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Here’s the same box, drawn with mom’s box drawing
|
||||
macro
|
||||
<kbd><a href="#dbx">DBX</a></kbd>:
|
||||
<br/>
|
||||
<span class="pre-in-pp">
|
||||
left margin indent--+ +--box width
|
||||
| |
|
||||
.DBX .5 0 2i 2i
|
||||
| |
|
||||
rule weight--+ +--box depth
|
||||
(in points)
|
||||
</span>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Mom’s graphical object macros allow—in fact,
|
||||
require—giving the rule weight (“thickness”) for
|
||||
the object (or saying that you want it filled), an indent from the
|
||||
left margin where the object begins, the dimensions of the object,
|
||||
and optionally a colour for the object.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
There are no defaults for the arguments to mom’s graphical
|
||||
object macros, which means you must supply the arguments every time
|
||||
you invoke them.
|
||||
</p>
|
||||
|
||||
<div class="box-tip">
|
||||
<p class="tip">
|
||||
<span class="note">Note:</span>
|
||||
As stated above, mom only provides macros for commonly-used
|
||||
graphical objects (rules, boxes, circles). More complex objects
|
||||
(polygons, non-straight lines, splines) must be drawn using
|
||||
groff’s <kbd>\D</kbd> escapes.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<h3 id="behaviour" class="docs">Graphical object behaviour</h3>
|
||||
|
||||
<p>
|
||||
Mom’s graphical object macros all behave in the following,
|
||||
carved-in-stone ways:
|
||||
</p>
|
||||
<ol style="margin-top: -.5em; margin-bottom: -.5em;">
|
||||
<li>Objects are drawn from the
|
||||
<a href="definitions.html#baseline">baseline</a>
|
||||
down, including horizontal rules.</li>
|
||||
<li>Objects begin precisely at the left indent supplied as
|
||||
an argument to the macro.</li>
|
||||
<li>Objects are drawn from left to right.</li>
|
||||
<li>Enclosed objects (boxes, circles) are drawn from the
|
||||
perimeter <i>inward</i>.</li>
|
||||
<li>Objects return to their horizontal/vertical point of origin.</li>
|
||||
</ol>
|
||||
|
||||
<p>
|
||||
The consistency means that once you’ve mastered the very
|
||||
simple order of arguments that applies to invoking graphical
|
||||
object macros, you can draw objects with full confidence that you
|
||||
know exactly where they’re placed and how much room they
|
||||
occupy. Furthermore, because all return to their point of origin,
|
||||
you’ll know exactly where you are on the page.
|
||||
</p>
|
||||
|
||||
<h3 id="order" class="docs">Order of arguments</h3>
|
||||
|
||||
<p>
|
||||
The order of arguments to the graphical object macros is the same
|
||||
for every macro:
|
||||
</p>
|
||||
<ul style="margin-top: -.5em; margin-bottom: -.5em;">
|
||||
<li>the rule weight
|
||||
<ul style="margin-left: -.75em;">
|
||||
<li>the single word <kbd>SOLID</kbd> may be used in place
|
||||
of <kbd>weight</kbd> if you want boxes or circles filled</li>
|
||||
</ul></li>
|
||||
<li>the indent from the current left margin at which to begin
|
||||
the object
|
||||
</li>
|
||||
<li>the width of the object if applicable</li>
|
||||
<li>the depth of the object if applicable</li>
|
||||
<li>the colour of the object (optional)</li>
|
||||
</ul>
|
||||
|
||||
<div class="macro-list-container">
|
||||
<h3 id="index-graphical" class="macro-list">Graphical objects macros</h3>
|
||||
|
||||
<ul class="macro-list">
|
||||
<li><a href="#drh">DRH</a>
|
||||
– horizontal rules</li>
|
||||
<li><a href="#drv">DRV</a>
|
||||
– vertical rules</li>
|
||||
<li><a href="#dbx">DBX</a>
|
||||
– box</li>
|
||||
<li><a href="#dcl">DCL</a>
|
||||
– circles or ellipses</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<!-- -DRH- -->
|
||||
|
||||
<div class="macro-id-overline">
|
||||
<h3 id="drh" class="macro-id">Drawing horizontal rules</h3>
|
||||
</div>
|
||||
|
||||
<div class="box-macro-args">
|
||||
Macro: <b>DRH</b> <kbd class="macro-args"><none> | <weight> <indent> <width> [<colour>]</kbd>
|
||||
</div>
|
||||
|
||||
<p class="requires">
|
||||
•
|
||||
the argument to <kbd class="normal"><weight></kbd> is in
|
||||
<a href="definitions.html#picaspoints" class="normal">points</a>,
|
||||
but do <span class="normal">not</span> append the
|
||||
<a href="definitions.html#unitsofmeasure">unit of measure</a>,
|
||||
<kbd class="normal">p</kbd>
|
||||
<br/>
|
||||
•
|
||||
<kbd class="normal"><indent></kbd>
|
||||
and
|
||||
<kbd class="normal"><width></kbd>
|
||||
require a unit of measure
|
||||
<br/>
|
||||
•
|
||||
arithmetic expressions to
|
||||
<kbd class="normal"><indent></kbd>
|
||||
and
|
||||
<kbd class="normal"><width></kbd>
|
||||
must be surrounded by parentheses
|
||||
</p>
|
||||
|
||||
<p>
|
||||
If all you want is to draw a rule from your current left
|
||||
margin to your current right margin (in other words, a "full
|
||||
measure" rule), you may invoke <kbd>.DRH</kbd> without any
|
||||
arguments.
|
||||
</p>
|
||||
<div class="box-tip">
|
||||
<p class="tip">
|
||||
<span class="note">Note:</span>
|
||||
DRH is the only graphical object macro that may be invoked
|
||||
without arguments. The weight (“thickness”) of
|
||||
the rule is determined by the argument you last gave the
|
||||
macro
|
||||
<a href="inlines.html#rule-weight">RULE_WEIGHT</a>.
|
||||
DRH, used this way, is exactly equivalent to entering the
|
||||
<a href="definitions.html#inlines">inline escape</a>
|
||||
<a href="inlines.html#inline-rule-mom"><kbd><span class="nobr">\*[RULE]</span></kbd></a>.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<p style="margin-top: -.5em;">
|
||||
To draw horizontal rules of a specified width, you must, at
|
||||
a minimum, supply DRH with the arguments <kbd>weight,</kbd>
|
||||
<kbd>indent</kbd> (measured from the current left margin) and
|
||||
<kbd>width</kbd>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Optionally, you may give a <kbd>color</kbd> argument. The colour
|
||||
may be either one defined with
|
||||
<a href="color.html#newcolor">NEWCOLOR</a>,
|
||||
or a named X-color initialized with
|
||||
<a href="color.html#xcolor">XCOLOR</a>,
|
||||
or an X-color alias (again, initialized with XCOLOR).
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Say, for example, you want to draw a 1-1/4 point horizontal rule
|
||||
that starts 2 picas from the current left margin and runs for 3
|
||||
inches. To do so, you’d invoke <kbd>.DRH</kbd> like this:
|
||||
<br/>
|
||||
<span class="pre-in-pp">
|
||||
weight width
|
||||
| |
|
||||
.DRH 1.25 2P 3i
|
||||
|
|
||||
indent
|
||||
</span>
|
||||
(Note that the rule weight argument, which is expressed in points,
|
||||
must not have the unit of measure <kbd>p</kbd> appended to it.)
|
||||
</p>
|
||||
|
||||
<p>
|
||||
If, in addition, you want the rule blue:
|
||||
<br/>
|
||||
<span class="pre-in-pp">
|
||||
.DRH 1.25 2P 3i blue
|
||||
</span>
|
||||
</p>
|
||||
|
||||
<h3 class="docs">How mom handles the positioning of horizontal rules</h3>
|
||||
|
||||
<p>
|
||||
Horizontal rules are drawn from left to right, and from the baseline
|
||||
down. “From the baseline down” means that if you request
|
||||
a rule with a weight of four points, the four points of rule fall
|
||||
entirely below the baseline.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Furthermore, after the rule is drawn, mom returns you to the current
|
||||
left margin, at the same vertical position on the page as when DRH
|
||||
was invoked. In other words, DRH causes no movement on the page,
|
||||
either horizontal or vertical.
|
||||
</p>
|
||||
|
||||
<!-- -DRV- -->
|
||||
|
||||
<div class="macro-id-overline">
|
||||
<h3 id="drv" class="macro-id">Drawing vertical rules</h3>
|
||||
</div>
|
||||
|
||||
<div class="box-macro-args">
|
||||
Macro: <b>DRV</b> <kbd class="macro-args"><weight> <indent> <depth> [<colour>]</kbd>
|
||||
</div>
|
||||
|
||||
<p class="requires">
|
||||
•
|
||||
the argument to <kbd class="normal"><weight></kbd> is in
|
||||
<a href="definitions.html#picaspoints" class="normal">points</a>,
|
||||
but do <span class="normal">not</span> append the
|
||||
<a href="definitions.html#unitsofmeasure">unit of measure</a>,
|
||||
<kbd class="normal">p</kbd>
|
||||
<br/>
|
||||
•
|
||||
<kbd class="normal"><indent></kbd>
|
||||
and
|
||||
<kbd class="normal"><depth></kbd>
|
||||
require a unit of measure
|
||||
<br/>
|
||||
•
|
||||
arithmetic expressions to
|
||||
<kbd class="normal"><indent></kbd>
|
||||
and
|
||||
<kbd class="normal"><depth></kbd>
|
||||
must be surrounded by parentheses
|
||||
</p>
|
||||
|
||||
<p>
|
||||
To draw vertical rules of a specified depth, you must, at
|
||||
a minimum, supply DRV with the arguments <kbd>weight,</kbd>
|
||||
<kbd>indent</kbd> (measured from the current left margin) and
|
||||
<kbd>depth</kbd>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Optionally, you may give a <kbd>color</kbd> argument. The colour
|
||||
may be either one defined with
|
||||
<a href="color.html#newcolor">NEWCOLOR</a>,
|
||||
or a named X-color initialized with
|
||||
<a href="color.html#xcolor">XCOLOR</a>,
|
||||
or an X-color alias (again, initialized with XCOLOR).
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Say, for example, you want to draw a 3/4-point vertical rule that
|
||||
starts 19-1/2 picas from the current left margin and has a depth of
|
||||
6 centimetres. To do so, you’d invoke <kbd>.DRV</kbd> like
|
||||
this:
|
||||
<br/>
|
||||
<span class="pre-in-pp">
|
||||
weight depth
|
||||
| |
|
||||
.DRV .75 19P+6p 6c
|
||||
|
|
||||
indent
|
||||
</span>
|
||||
(Note that the rule weight argument, which is expressed in points,
|
||||
must not have the unit of measure <kbd>p</kbd> appended to it.)
|
||||
</p>
|
||||
|
||||
<p>
|
||||
If, in addition, you want the rule red:
|
||||
<br/>
|
||||
<span class="pre-in-pp">
|
||||
.DRV .75 19P+6p 6c red
|
||||
</span>
|
||||
</p>
|
||||
|
||||
<h3 class="docs">How mom handles the positioning of vertical rules</h3>
|
||||
|
||||
<p>
|
||||
Vertical rules are drawn from the baseline down, and from left to
|
||||
right. "Left to right" means that if you request a rule
|
||||
with a weight of four points, the four points of rule fall entirely
|
||||
to the right of the indent given to DRV.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Furthermore, after the rule is drawn, mom returns you to the current
|
||||
left margin, at the same vertical position on the page as when DRV
|
||||
was invoked. In other words, DRV causes no movement on the page,
|
||||
either horizontal or vertical.
|
||||
</p>
|
||||
|
||||
<!-- -DBX- -->
|
||||
|
||||
<div class="macro-id-overline">
|
||||
<h3 id="dbx" class="macro-id">Drawing boxes</h3>
|
||||
</div>
|
||||
|
||||
<div class="box-macro-args">
|
||||
Macro: <b>DBX</b> <kbd class="macro-args"><weight>|SOLID <indent> <width>|FULL_MEASURE <depth> [<color>]</kbd>
|
||||
</div>
|
||||
|
||||
<p class="requires">
|
||||
•
|
||||
the argument to <kbd class="normal"><weight></kbd> is in
|
||||
<a href="definitions.html#picaspoints" class="normal">points</a>,
|
||||
but do <span class="normal">not</span> append the
|
||||
<a href="definitions.html#unitsofmeasure">unit of measure</a>
|
||||
<kbd class="normal">p</kbd>
|
||||
<br/>
|
||||
• <kbd class="normal"><indent></kbd>,
|
||||
<kbd class="normal"><width></kbd>,
|
||||
and
|
||||
<kbd class="normal"><depth></kbd>
|
||||
require a unit of measure
|
||||
<br/>
|
||||
•
|
||||
arithmetic expressions to
|
||||
<kbd class="normal"><indent></kbd>,
|
||||
<kbd class="normal"><width></kbd>,
|
||||
and
|
||||
<kbd class="normal"><depth></kbd>
|
||||
must be enclosed in parentheses.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
To draw boxes you must, at a minimum, supply DBX with the arguments
|
||||
<kbd>weight</kbd> or <kbd>SOLID</kbd>, <kbd>indent</kbd>,
|
||||
<kbd>width</kbd> or <kbd>FULL_MEASURE</kbd>, and <kbd>depth</kbd>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<kbd>weight</kbd> is the rule weight of outlined boxes, given in
|
||||
points but without the
|
||||
<a href="definitions.html#unitsofmeasure">unit of measure</a>
|
||||
<kbd>p</kbd> appended.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
If <kbd>SOLID</kbd> is given as the first argument, the box is
|
||||
filled rather than outlined and no <kbd>weight</kbd> argument should
|
||||
be supplied.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<kbd>indent</kbd> is measured from the current left margin. If
|
||||
<kbd>FULL_MEASURE</kbd> is given, <kbd>indent</kbd> should be set to
|
||||
“0”.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<kbd>width</kbd> is the width of the box with a
|
||||
<a href="definitions.html#unitsofmeasure">unit of measure</a>
|
||||
appended, caclculated from <kbd>indent</kbd> argument.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
If <kbd>FULL_MEASURE</kbd> is given instead of <kbd>width</kbd>,
|
||||
it circumvents having to calculate the width when left and/or right
|
||||
indents are in effect; mom draws the box from the current left
|
||||
margin to the current right margin. When no indents are in effect,
|
||||
<kbd>FULL_MEASURE</kbd> or <kbd>\n[.l]u</kbd>—the groff
|
||||
way of saying “the current line length”—have the
|
||||
same effect.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Optionally, you may give a <kbd>color</kbd> argument. The colour
|
||||
may be either one defined with
|
||||
<a href="color.html#newcolor">NEWCOLOR</a>,
|
||||
or a named X-color initialized with
|
||||
<a href="color.html#xcolor">XCOLOR</a>,
|
||||
or an X-color alias (again, initialized with XCOLOR).
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Say, for example, you want to draw a 1/2 point outline box that
|
||||
starts one inch from the current left margin and has the dimensions
|
||||
12 picas x 6 picas. To do so, you’d invoke <kbd>.DBX</kbd>
|
||||
like this:
|
||||
<br/>
|
||||
<span class="pre-in-pp">
|
||||
indent depth
|
||||
| |
|
||||
.DBX .5 1i 12P 6P
|
||||
| |
|
||||
weight width
|
||||
</span>
|
||||
(Note that the box weight argument, which is expressed in points,
|
||||
must not have the unit of measure <kbd>p</kbd> appended to it.)
|
||||
</p>
|
||||
|
||||
<p>
|
||||
If you want the same box, but solid (“filled”) rather
|
||||
than drawn as an outline:
|
||||
<br/>
|
||||
<span class="pre-in-pp">
|
||||
.DBX SOLID 1i 12P 6P
|
||||
</span>
|
||||
Additionally, if you want the box green:
|
||||
<br/>
|
||||
<span class="pre-in-pp">
|
||||
.DBX .5 1i 12P 6P green
|
||||
</span>
|
||||
or
|
||||
<span class="pre-in-pp">
|
||||
.DBX SOLID 1i 12P 6P green
|
||||
</span>
|
||||
</p>
|
||||
|
||||
<h3 class="docs">How mom handles the positioning of boxes</h3>
|
||||
|
||||
<p>
|
||||
Boxes are drawn from the baseline down, from left to right, and
|
||||
from the perimeter <i>inward</i>. “From the perimeter
|
||||
inward” means that if you request a box weight of six points,
|
||||
the 6-point rules used to draw the outline of the box fall entirely
|
||||
<i>within</i> the dimensions of the box.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Furthermore, after the box is drawn, mom returns you to the current
|
||||
left margin, at the same vertical position on the page as when DBX
|
||||
was invoked. In other words, DBX causes no movement on the page,
|
||||
either horizontal or vertical.
|
||||
</p>
|
||||
|
||||
<!-- -DCL- -->
|
||||
|
||||
<div class="macro-id-overline">
|
||||
<h3 id="dcl" class="macro-id">Drawing circles (ellipses)</h3>
|
||||
</div>
|
||||
|
||||
<div class="box-macro-args">
|
||||
Macro: <b>DCL</b> <kbd class="macro-args"><weight>|SOLID <indent> <width>|FULL_MEASURE <depth> [<color>]</kbd>
|
||||
</div>
|
||||
|
||||
<p class="requires">
|
||||
•
|
||||
the argument to <kbd class="normal"><weight></kbd> is in
|
||||
<a href="definitions.html#picaspoints" class="normal">points</a>,
|
||||
but do <span class="normal">not</span> append the
|
||||
<a href="definitions.html#unitsofmeasure">unit of measure</a>
|
||||
<kbd class="normal">p</kbd>
|
||||
<br/>
|
||||
• <kbd class="normal"><indent></kbd>,
|
||||
<kbd class="normal"><width></kbd>,
|
||||
and
|
||||
<kbd class="normal"><depth></kbd>
|
||||
require a unit of measure
|
||||
<br/>
|
||||
•
|
||||
arithmetic expressions to
|
||||
<kbd class="normal"><indent></kbd>,
|
||||
<kbd class="normal"><width></kbd>,
|
||||
and
|
||||
<kbd class="normal"><depth></kbd>
|
||||
must be enclosed in parentheses.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
To draw circles you must, at a minimum, supply DCL with the arguments
|
||||
<kbd>weight</kbd> or <kbd>SOLID</kbd>, <kbd>indent</kbd>,
|
||||
<kbd>width</kbd> or <kbd>FULL_MEASURE</kbd>, and <kbd>depth</kbd>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<kbd>weight</kbd> is the rule weight of outlined circles, given in
|
||||
points but without the unit of measure
|
||||
<a href="definitions.html#unitsofmeasure">unit of measure</a>
|
||||
<kbd>p</kbd> appended.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
If <kbd>SOLID</kbd> is given as the first argument, the circle is
|
||||
filled rather than outlined and no <kbd>weight</kbd> argument should
|
||||
be supplied.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<kbd>indent</kbd> is measured from the current left margin. If
|
||||
<kbd>FULL_MEASURE</kbd> is given, <kbd>indent</kbd> should be set to
|
||||
“0”.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<kbd>width</kbd> is the width of the circle with a
|
||||
<a href="definitions.html#unitsofmeasure">unit of measure</a>
|
||||
appended, caclculated from <kbd>indent</kbd> argument.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
If <kbd>FULL_MEASURE</kbd> is given instead of <kbd>width</kbd>,
|
||||
it circumvents having to calculate the width when left and/or right
|
||||
indents are in effect; mom draws the circle from the current left
|
||||
margin to the current right margin. When no indents are in effect,
|
||||
<kbd>FULL_MEASURE</kbd> or <kbd>\n[.l]u</kbd>—the groff
|
||||
way of saying “the current line length”—have the
|
||||
same effect.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Optionally, you may give a <kbd>color</kbd> argument. The colour
|
||||
may be either one defined with
|
||||
<a href="color.html#newcolor">NEWCOLOR</a>,
|
||||
or a named X-color initialized with
|
||||
<a href="color.html#xcolor">XCOLOR</a>,
|
||||
or an X-color alias (again, initialized with XCOLOR).
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Say, for example, you want to draw a 1/2 point outline circle that
|
||||
starts one inch from the current left margin and has the dimensions
|
||||
12 picas x 6 picas. To do so, you’d invoke <kbd>.DCL</kbd>
|
||||
like this:
|
||||
<br/>
|
||||
<span class="pre-in-pp">
|
||||
indent depth
|
||||
| |
|
||||
.DCL .5 1i 12P 6P
|
||||
| |
|
||||
weight width
|
||||
</span>
|
||||
(Note that the circle weight argument, which is expressed in points,
|
||||
must not have the unit of measure <kbd>p</kbd> appended to it.)
|
||||
</p>
|
||||
|
||||
<p>
|
||||
If you want the same circle, but solid (“filled”) rather
|
||||
than drawn as an outline:
|
||||
<br/>
|
||||
<span class="pre-in-pp">
|
||||
.DCL SOLID 1i 12P 6P
|
||||
</span>
|
||||
Additionally, if you want the circle green:
|
||||
<br/>
|
||||
<span class="pre-in-pp">
|
||||
.DCL .5 1i 12P 6P green
|
||||
</span>
|
||||
or
|
||||
<span class="pre-in-pp">
|
||||
.DCL SOLID 1i 12P 6P green
|
||||
</span>
|
||||
</p>
|
||||
|
||||
|
||||
<h3 class="docs">How mom handles the positioning of circles (ellipses)</h3>
|
||||
|
||||
<p>
|
||||
Circles (ellipses) are drawn from the baseline down, from left
|
||||
to right, and from the perimeter <i>inward</i>. “From the
|
||||
perimeter inward” means that if you request a circle weight of
|
||||
six points, the 6-point rule used to draw the outline of the circle
|
||||
or ellipse falls entirely <i>within</i> the dimensions of the
|
||||
circle or ellipse.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Furthermore, after the circle is drawn, mom returns you to the
|
||||
current left margin, at the same vertical position on the page as
|
||||
when DCL was invoked. In other words, DCL causes no movement on the
|
||||
page, either horizontal or vertical.
|
||||
</p>
|
||||
|
||||
<div class="rule-long"><hr/></div>
|
||||
|
||||
<!-- Navigation links -->
|
||||
<table style="width: 100%; margin-top: 12px;">
|
||||
<tr>
|
||||
<td style="width: 33%;"><a href="toc.html">Back to Table of Contents</a></td>
|
||||
<td style="width: 33%; text-align: center;"><a href="#top">Top</a></td>
|
||||
<td style="width: 33%; text-align: right;"><a href="docprocessing.html#top">Next: Document processing</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="bottom-spacer"><br/></div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
2421
OGP64/usr/share/doc/groff-1.24.1/html/mom/headfootpage.html
Normal file
2421
OGP64/usr/share/doc/groff-1.24.1/html/mom/headfootpage.html
Normal file
File diff suppressed because it is too large
Load diff
3457
OGP64/usr/share/doc/groff-1.24.1/html/mom/images.html
Normal file
3457
OGP64/usr/share/doc/groff-1.24.1/html/mom/images.html
Normal file
File diff suppressed because it is too large
Load diff
1112
OGP64/usr/share/doc/groff-1.24.1/html/mom/inlines.html
Normal file
1112
OGP64/usr/share/doc/groff-1.24.1/html/mom/inlines.html
Normal file
File diff suppressed because it is too large
Load diff
487
OGP64/usr/share/doc/groff-1.24.1/html/mom/intro.html
Normal file
487
OGP64/usr/share/doc/groff-1.24.1/html/mom/intro.html
Normal file
|
|
@ -0,0 +1,487 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
This file is part of groff, the GNU roff type-setting system.
|
||||
|
||||
Copyright (C) 2004-2020 Free Software Foundation, Inc.
|
||||
Written by Peter Schaffter (peter@schaffter.ca).
|
||||
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.3 or
|
||||
any later version published by the Free Software Foundation; with no
|
||||
Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
|
||||
Texts.
|
||||
|
||||
A copy of the Free Documentation License is included as a file called
|
||||
FDL in the main directory of the groff source package.
|
||||
-->
|
||||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html;charset=utf-8"/>
|
||||
<title>What is mom?</title>
|
||||
<link rel="stylesheet" type="text/css" href="stylesheet.css" />
|
||||
</head>
|
||||
|
||||
<body style="background-color: #f5faff;">
|
||||
|
||||
<!-- ==================================================================== -->
|
||||
|
||||
<div id="top" class="page">
|
||||
|
||||
<!-- Navigation links -->
|
||||
<table style="width: 100%;">
|
||||
<tr>
|
||||
<td><a href="toc.html">Back to Table of Contents</a></td>
|
||||
<td style="text-align: right;"><a href="definitions.html#top">Next: Definitions</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h1 id="intro" class="docs">What is mom?</h1>
|
||||
|
||||
<div style="text-align: center;">
|
||||
<ul class="no-enumerator" style="margin-left: -2.5em;">
|
||||
<li ><a href="#intro-intro">Who is mom meant for?</a></li>
|
||||
<li ><a href="#intro-typesetting">Typesetting with mom</a></li>
|
||||
<li ><a href="#intro-docprocessing">Document processing with mom</a></li>
|
||||
<li ><a href="#intro-philosophy">Mom’s philosophy</a></li>
|
||||
<li ><a href="#intro-documentation">A note on mom’s documentation</a></li>
|
||||
<li ><a href="#canonical">Canonical reference materials</a></li>
|
||||
<li ><a href="#macro-args">How to read macro arguments</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="rule-short" style="margin-top: 18px;"><hr/></div>
|
||||
|
||||
<h2 id="intro-intro" class="docs">Who is mom meant for?</h2>
|
||||
|
||||
<p>
|
||||
Mom (“my own macros”, “my other macros”,
|
||||
“maximum overdrive macros”...) is a macro set for groff,
|
||||
designed to format documents in Portable Document Format (.pdf) and
|
||||
PostScript (.ps). She’s aimed at three kinds of users:
|
||||
</p>
|
||||
|
||||
<ol style="margin-top: -.5em; margin-bottom: -.5em;">
|
||||
<li>Typesetters who suspect groff might be the right
|
||||
tool for the job but who are frustrated,
|
||||
intimidated, or puzzled by groff’s terse,
|
||||
not-always-typographically-intuitive
|
||||
<a href="definitions.html#primitives">primitives</a>;
|
||||
</li>
|
||||
<li>Writers who need to format their work easily, with a
|
||||
minimum of clutter;
|
||||
</li>
|
||||
<li>Newcomers to groff, typesetting, or document processing
|
||||
who need a well-documented macro set to get them started.
|
||||
</li>
|
||||
</ol>
|
||||
|
||||
<p>
|
||||
Mom is actually two macro packages in one: a very complete set
|
||||
of typesetting macros, and an equally thorough set of document
|
||||
formatting macros. The typesetting macros afford fine-grained
|
||||
control over all visible aspects of page layout and design (margins,
|
||||
fonts, sizes, kerning, etc), while the document formatting macros
|
||||
focus on the logical structure of a document (titles, headings,
|
||||
paragraphs, lists, etc) and call on groff to render logical
|
||||
structure into pleasing type.
|
||||
</p>
|
||||
|
||||
<h2 id="intro-typesetting" class="docs">Typesetting with mom</h2>
|
||||
|
||||
<p>
|
||||
Mom’s typesetting macros control the basic parameters
|
||||
of type: margins, line lengths, type family, font, point size,
|
||||
linespacing, and so on. In addition, they allow you to move
|
||||
around on the page horizontally and vertically, and to set up
|
||||
tabs, indents, and columns. Finally, they let you adjust such
|
||||
typographic details as justification style, letter spacing, word
|
||||
spacing, hyphenation, and kerning.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The typesetting macros also provide the means to create horizontal
|
||||
and vertical rules, rectangles (boxes, frames), and ellipses
|
||||
(circles).
|
||||
</p>
|
||||
|
||||
<p>
|
||||
In terms of typographic control, the typesetting macros provide
|
||||
access to groff’s primitives in a way that’s consistent,
|
||||
sensible, and easy to use. With them, you can create individual
|
||||
pages designed from the ground up. Provided you have not signalled
|
||||
to mom that you want document processing (via the
|
||||
<a href="docprocessing.html#start">START</a>
|
||||
macro; see below), every typesetting macro is a literal command
|
||||
that remains in effect until you modify it or turn it off. This
|
||||
means that if you want to create flyers, surveys, tabulated forms,
|
||||
curricula vitae and so on, you may do so in the good old-fashioned
|
||||
way: one step at a time with complete control over every element on
|
||||
the page.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Years of experience have convinced me that no program can ever
|
||||
replace the human eye and human input when it comes to high quality
|
||||
typesetting. Words and punctuation on the printed page are too
|
||||
variable, too fluid, to be rendered flawlessly by any algorithm,
|
||||
no matter how clever.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Mom, therefore, does not try to guess solutions for issues like
|
||||
hanging punctuation, or left-margin adjustments for troublesome
|
||||
letters like T, V and W. Rather, she provides tools that allow
|
||||
knowledgeable typesetters to handle these typographic challenges in
|
||||
ways that are easier and more intuitive than manipulating groff at
|
||||
the primitive level.
|
||||
</p>
|
||||
|
||||
<h2 id="intro-docprocessing" class="docs">Document processing with mom</h2>
|
||||
|
||||
<p>
|
||||
Mom’s document processing macros let you format documents
|
||||
without having to worry about the typographic details. In this
|
||||
respect, mom is similar to other groff macro packages, as well as
|
||||
to html and LaTeX. Where mom differs is in the degree of control
|
||||
you have over the look and placement of the various elements of a
|
||||
document. For example, if you’d like your headings underlined,
|
||||
or in caps, or centred rather than flush left, you can make the
|
||||
changes easily and have them apply to the whole document. Temporary
|
||||
and one-off changes are easy, too.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Mom has some features other macro sets don’t provide. For
|
||||
example, you can switch between draft-style and final-copy output.
|
||||
If you regularly make submissions to publishers and editors who
|
||||
insist on "typewritten, double-spaced," there’s a special
|
||||
macro—
|
||||
<a href="docprocessing.html#printstyle">PRINTSTYLE <kbd>TYPEWRITE</kbd></a>—
|
||||
that changes typeset documents into ones that would make an
|
||||
old-school typing teacher proud. Footnotes, endnotes, tables of
|
||||
contents, multiple columns, nested lists, recto/verso printing and
|
||||
user designable headers and footers are also part of the fun.
|
||||
</p>
|
||||
|
||||
<h2 id="intro-philosophy" class="docs">Mom’s philosophy</h2>
|
||||
|
||||
<p>
|
||||
Formatting documents should be easy, from soup to nuts. Writers
|
||||
need to focus on what they’re writing, not on how it looks.
|
||||
From the moment you fire up an editor to the moment you add
|
||||
"FINIS" to your opus, nothing should interfere with the flow of
|
||||
your words. The commands needed to format your work should be
|
||||
easy to remember, comprehensible, and stand out well from the
|
||||
text. There shouldn’t be too much clutter. Your documents
|
||||
should be as readable inside a text editor as they are on the
|
||||
printed page.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Unfortunately, in computerland, “easy,”
|
||||
“comprehensible,” and “readable” often
|
||||
mean “you’re stuck with what you get.” No
|
||||
document formatting system can give you exactly what you want all
|
||||
the time, every time. Documents always need to be tweaked, either
|
||||
to satisfy a typographic whim or to clarify some aspect of their
|
||||
content.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Groff has traditionally solved the problem of formatting vs.
|
||||
tweaking by requiring users of the common macro packages (mm, ms,
|
||||
me and their offspring) to resort to groff
|
||||
<a href="definitions.html#primitives">primitives</a>
|
||||
and
|
||||
<a href="definitions.html#inlines">inline escapes</a>
|
||||
for their special typesetting needs. Not to put too fine a point
|
||||
on it, groff primitives tend toward the abstruse, and most inline
|
||||
escapes are about as readable as an encrypted password. This does
|
||||
not make for happy-camper writers, who either find themselves stuck
|
||||
with a formatting style they don’t like, or are forced to
|
||||
learn groff from the ground up—a daunting task, to say the
|
||||
least.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Mom aims to make creating documents a simple matter, but with no
|
||||
corresponding loss of user control. The document processing macros
|
||||
provide an initial set of reasonable defaults, but anything that
|
||||
is not to your liking can be changed. In combination with the
|
||||
typesetting macros, you have all the tools you need to massage
|
||||
passages and tweak pages until they look utterly professional.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
One rarely hears the term “user interface” in
|
||||
conjunction with document processing. Since formatting takes
|
||||
place inside a text editor, little thought is given to the
|
||||
look and feel of the formatting commands. Mom attempts to
|
||||
rectify this by providing users with a consistent, readable
|
||||
“coding” style. Most of the macros (especially in
|
||||
the document processing set) have humanly-readable names. Not
|
||||
only does this speed up learning the macros, it makes the sense
|
||||
of what’s going on in a document easier to decipher,
|
||||
typographically and structurally.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Mom does not try to be all things to all people. In contrast to
|
||||
the normal groff philosophy, she does not try to produce output
|
||||
that looks good no matter where it’s displayed. She’s
|
||||
designed for primarily for PDF or PostScript output, although
|
||||
with
|
||||
<a href="docprocessing.html#printstyle">PRINTSTYLE <kbd>TYPEWRITE</kbd></a>
|
||||
she produces acceptable terminal copy. No attempt is made to be
|
||||
compatible with older versions of troff.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
One special feature in mom’s design is the attention she pays
|
||||
to aligning the bottom margins of every page. Nothing screams
|
||||
shoddy in typeset documents louder than bottom margins that
|
||||
wander, or, in typesetter jargon, “hang.” There are,
|
||||
of course, situations where whitespace at the bottom of a page
|
||||
may be unavoidable (for example, you wouldn’t want a head
|
||||
to appear at the bottom of the page without some text underneath
|
||||
it), but in all cases where hanging bottom margins can be avoided,
|
||||
mom does avoid them, by clever adjustments to leading (“line
|
||||
spacing”) and the spacing between different elements on the
|
||||
page.
|
||||
</p>
|
||||
|
||||
<h2 id="intro-documentation" class="docs">A note on mom’s documentation</h2>
|
||||
|
||||
<p>
|
||||
Writing documentation is tough, no doubt about it. One is never
|
||||
quite sure of the user’s level of expertise. Is s/he new to
|
||||
the application, new to its underlying protocols and programs, new
|
||||
to the operating system? At some point, one has to decide for whom
|
||||
the documentation is intended. Making the wrong choice can mean the
|
||||
difference between a program that gets used and a program that gets
|
||||
tossed.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Mom’s documentation assumes users know their way around
|
||||
their own operating system (basic file management, how to use
|
||||
the command line, how to use a text editor, etc). I run GNU/Linux,
|
||||
and while the documentation may exhibit a GNU/Linux bias, mom
|
||||
and groff can, in fact, be run on other platforms.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The documentation further assumes users at least know what groff
|
||||
is, even if they don’t know much about it. Lastly,
|
||||
it assumes that everyone—groff newbies and experts
|
||||
alike—learns faster from a few well-placed examples than
|
||||
from manpage-style reference docs. What mom’s documentation
|
||||
doesn’t assume is that you know everything—not about
|
||||
groff, not about typesetting, not about document processing. Even
|
||||
experts have odd lacunae in their knowledge base. Therefore,
|
||||
whenever I suspect that a term or procedure will cause head
|
||||
scratching, I offer an explanation. And when explanations
|
||||
aren’t enough, I offer examples.
|
||||
</p>
|
||||
|
||||
<h3 id="canonical" class="docs">Canonical reference materials</h3>
|
||||
|
||||
<p>
|
||||
The canonical reference materials for groff are
|
||||
<strong>cstr54</strong> (a downloadable PostScript copy of which
|
||||
is available
|
||||
<a href="http://www.kohala.com/start/troff/cstr54.ps">here</a>)
|
||||
and the <strong>troff</strong> and <strong>groff_diff</strong>
|
||||
manpages. The most complete and up-to-date source of information is
|
||||
the groff info pages, available by typing <kbd>info groff</kbd> at
|
||||
the command line (assuming you have the TeXinfo standalone browser
|
||||
installed on your system, which is standard for most GNU/Linux
|
||||
distributions). And for inputting special characters, see <kbd>man
|
||||
groff_char</kbd>.
|
||||
</p>
|
||||
|
||||
<p style="margin-top: 24px;">
|
||||
I’ve tried to avoid reiterating the information contained
|
||||
in these documents; however, in a few places, this has proved
|
||||
impossible. But be forewarned: I have no qualms about
|
||||
sidestepping excruciating completeness concerning groff usage;
|
||||
I’m more interested in getting mom users up and running.
|
||||
<i>Mea culpa.</i>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Groff has ancillary programmes (pre-processors) for generating
|
||||
tables (<strong>tbl</strong>), diagrams (<strong>pic</strong>), and
|
||||
equations (<strong>eqn</strong>), which may be used in conjunction
|
||||
with mom. The manuals describing their usage are found at:
|
||||
<br/>
|
||||
<span style="display:block; margin-top: .5em">
|
||||
<kbd> tbl</kbd> <a href="http://www.kohala.com/start/troff/v7man/tbl/tbl.ps">http://www.kohala.com/start/troff/v7man/tbl/tbl.ps</a>
|
||||
<br/>
|
||||
<kbd> pic</kbd> <a href="http://www.kohala.com/start/troff/gpic.raymond.ps">http://www.kohala.com/start/troff/gpic.raymond.ps</a>
|
||||
<br/>
|
||||
<kbd> eqn</kbd> <a href="http://www.kohala.com/start/troff/v7man/eqn/eqn2e.ps">http://www.kohala.com/start/troff/v7man/eqn/eqn2e.ps</a>
|
||||
</span>
|
||||
</p>
|
||||
|
||||
<div class="box-tip">
|
||||
<p class="tip-top" style="padding-bottom: 9px;">
|
||||
<b>Note:</b> Mom’s macro file (om.tmac) is heavily
|
||||
commented. Each macro is preceded by a description of its
|
||||
arguments, function and usage, which may give you information in
|
||||
addition to what’s contained in this documentation.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="rule-short" style="padding-top: 6px; padding-bottom: 3px;"><hr/></div>
|
||||
|
||||
<h2 id="macro-args" class="docs">How to read macro arguments</h2>
|
||||
|
||||
<p>
|
||||
The concise descriptions of macros in this documentation typically
|
||||
look like this:
|
||||
</p>
|
||||
|
||||
<div class="box-macro-args">
|
||||
Macro: <b>MACRO_NAME</b> <kbd class="macro-args">arguments</kbd>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
<kbd>arguments</kbd> lists the macro’s
|
||||
arguments using conventions that should be familiar to anyone who
|
||||
has ever read a manpage. Briefly:
|
||||
</p>
|
||||
|
||||
<ol>
|
||||
<li>Macro arguments are separated from each other by spaces.</li>
|
||||
<li>If an argument is surrounded by chevrons
|
||||
(<kbd>< ></kbd>), it’s a description
|
||||
of the argument, not the argument itself.
|
||||
</li>
|
||||
<li>If an argument begins with or is surrounded by double-quotes, the
|
||||
double quotes must be included in the argument.
|
||||
</li>
|
||||
<li>If the user has a choice between several arguments, each of the
|
||||
choices is separated by the pipe character
|
||||
(<kbd>|</kbd>), which means “or.”
|
||||
</li>
|
||||
<li>Arguments that are optional are surrounded by square brackets.</li>
|
||||
<li><kbd><off></kbd> or <kbd><anything></kbd> in an argument
|
||||
list means that any argument other than those in the argument
|
||||
list turns the macro off.
|
||||
</li>
|
||||
</ol>
|
||||
|
||||
<h3 id="toggle-macro" class="docs">Toggle macros</h3>
|
||||
|
||||
<p>
|
||||
Some macros don’t require an argument. They simply start
|
||||
something. When you need to turn them off, the same macro with
|
||||
any argument will do the trick. That’s right: <em>any</em>
|
||||
argument (in caps, lowercase, or a mixture thereof). This permits
|
||||
choosing whatever works for you: <kbd>OFF</kbd>, <kbd>end</kbd>,
|
||||
<kbd>Quit</kbd>, <kbd>Q</kbd>, <kbd>X</kbd>, and so on.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Since these macros toggle things on and off, the argument list
|
||||
simply reads <kbd>toggle</kbd>.
|
||||
</p>
|
||||
|
||||
<div id="examples" class="examples-container">
|
||||
<h2 class="docs" style="margin-top: .5em;">Examples</h2>
|
||||
|
||||
<div class="examples">Example 1: An argument requiring double-quotes</div>
|
||||
|
||||
<div class="box-macro-args" style="max-width: 684px;">
|
||||
Macro: <b>TITLE</b> <kbd class="macro-args">"<title of document>"</kbd>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
The required argument to TITLE is the title of your document.
|
||||
Since it’s surrounded by double-quotes, you must include
|
||||
them in the argument, like this:
|
||||
<br/>
|
||||
<span class="pre-in-pp">
|
||||
.TITLE "My Pulitzer Novel"
|
||||
</span>
|
||||
</p>
|
||||
|
||||
<div class="examples" style="margin-top: -1em;">Example 2: A macro with required and optional arguments</div>
|
||||
|
||||
<div class="box-macro-args" style="width: 684px;">
|
||||
Macro: <b>TAB_SET</b> <kbd class="macro-args"><tab number> <indent> <length> [ L | R | C | J [ QUAD ] ] </kbd>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
The first required argument is a number that identifies the tab
|
||||
(say, "3"). The second required argument is an indent from the
|
||||
left margin (say, 6 picas). The third required argument is the
|
||||
length of the tab (say, 3 picas). Therefore, at a minimum, when
|
||||
using this macro, you would enter:
|
||||
<br/>
|
||||
<span class="pre-in-pp">
|
||||
.TAB_SET 3 6P 3P
|
||||
</span>
|
||||
The remaining two arguments are optional. The first is a
|
||||
single letter, either <kbd>L, R, C</kbd> or
|
||||
<kbd>J</kbd>. The second, which is itself
|
||||
optional after <kbd>L, R, C</kbd> or
|
||||
<kbd>J</kbd>, is the word <kbd>QUAD</kbd>.
|
||||
Therefore, depending on what additional information you wish to
|
||||
pass to the macro, you could enter:
|
||||
<br/>
|
||||
<span class="pre-in-pp">
|
||||
.TAB_SET 3 6P 3P L
|
||||
</span>
|
||||
or
|
||||
<br/>
|
||||
<span class="pre-in-pp">
|
||||
.TAB_SET 3 6P 3P L QUAD
|
||||
</span>
|
||||
</p>
|
||||
|
||||
<div id="toggle-example" class="examples" style="margin-top: -1em;">Example 3: A sample toggle macro:</div>
|
||||
|
||||
<div class="box-macro-args" style="max-width: 684px;">
|
||||
Macro: <b>QUOTE</b> <kbd class="macro-args">toggle</kbd>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
<kbd>QUOTE</kbd> begins a section of quoted text
|
||||
in a document and doesn’t require an argument. When the
|
||||
quote’s finished, you have to tell mom it’s done.
|
||||
<span class="pre">
|
||||
.QUOTE
|
||||
So runs my dream, but what am I?
|
||||
An infant crying in the night
|
||||
An infant crying for the light
|
||||
And with no language but a cry.
|
||||
.QUOTE OFF
|
||||
</span>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Alternatively, you could have turned the quote off with
|
||||
<kbd>END</kbd>, or <kbd>X</kbd>, or something else.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<!-- Navigation links -->
|
||||
<table style="width: 100%; margin-top: 12px;">
|
||||
<tr>
|
||||
<td style="width: 33%;"><a href="toc.html">Back to Table of Contents</a></td>
|
||||
<td style="width: 33%; text-align: center;"><a href="#top">Top</a></td>
|
||||
<td style="width: 33%; text-align: right;"><a href="definitions.html#top">Next: Definitions</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="bottom-spacer"><br/></div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
639
OGP64/usr/share/doc/groff-1.24.1/html/mom/letters.html
Normal file
639
OGP64/usr/share/doc/groff-1.24.1/html/mom/letters.html
Normal file
|
|
@ -0,0 +1,639 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
This file is part of groff, the GNU roff type-setting system.
|
||||
|
||||
Copyright (C) 2004-2024 Free Software Foundation, Inc.
|
||||
Written by Peter Schaffter (peter@schaffter.ca).
|
||||
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.3 or
|
||||
any later version published by the Free Software Foundation; with no
|
||||
Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
|
||||
Texts.
|
||||
|
||||
A copy of the Free Documentation License is included as a file called
|
||||
FDL in the main directory of the groff source package.
|
||||
-->
|
||||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html;charset=utf-8"/>
|
||||
<title>Mom -- Writing letters</title>
|
||||
<link rel="stylesheet" type="text/css" href="stylesheet.css" />
|
||||
</head>
|
||||
|
||||
<body style="background-color: #f5faff;">
|
||||
|
||||
<!-- ==================================================================== -->
|
||||
|
||||
<div id="top" class="page">
|
||||
|
||||
<!-- Navigation links -->
|
||||
<table style="width: 100%;">
|
||||
<tr>
|
||||
<td><a href="toc.html">Back to Table of Contents</a></td>
|
||||
<td style="text-align: right;"><a href="macrolist.html#top">Next: Quick reference guide</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h1 class="docs">Writing letters</h1>
|
||||
|
||||
<div style="width: 33%; margin: auto;">
|
||||
<ul class="no-enumerator">
|
||||
<li><a href="#letters-intro">Introduction</a></li>
|
||||
<li><a href="#letters-tutorial">Tutorial</a></li>
|
||||
<li><a href="#letters-defaults">Mom’s default letter style</a></li>
|
||||
<li><a href="#index-letters-macros">The letter macros</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="rule-medium"><hr/></div>
|
||||
|
||||
<h2 id="letters-intro" class="docs">Introduction</h2>
|
||||
|
||||
<p>
|
||||
Mom’s simple but effective letter-writing macros are a subset
|
||||
of the
|
||||
<a href="docprocessing.html#docprocessing">document processing macros</a>,
|
||||
designed to ease the creation of correspondence.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Because the letter macros are a subset of the document processing
|
||||
macros, you can use
|
||||
<a href="definitions.html#controlmacro">control macros</a>
|
||||
to design correspondence to your own specifications. However,
|
||||
mom makes no pretence of providing complete design flexibility in
|
||||
the matter of letters, which are, after all, simple communicative
|
||||
documents whose only real style requirements are that they be neat
|
||||
and professional-looking.
|
||||
</p>
|
||||
|
||||
<div class="examples-container" style="margin-top: 1.5em; margin-bottom: 1.5em;">
|
||||
<h3 id="letters-tutorial" class="docs">Tutorial – writing letters</h3>
|
||||
|
||||
<p>
|
||||
Mom letters begin, like all mom-processed documents, with
|
||||
<a href="docprocessing.html#reference-macros">reference macros</a>
|
||||
(in this case,
|
||||
<a href="docprocessing.html#author">AUTHOR</a>),
|
||||
a
|
||||
<a href="docprocessing.html#doctype">DOCTYPE</a>
|
||||
(LETTER, obviously), the essential
|
||||
<a href="docprocessing.html#printstyle">PRINTSTYLE</a>
|
||||
macro, and
|
||||
<a href="docprocessing.html#start">START</a>,
|
||||
like this:
|
||||
<br/>
|
||||
<span class="pre-in-pp">
|
||||
.AUTHOR "Yannick P. Guique"
|
||||
.DOCTYPE LETTER
|
||||
.PRINTSTYLE TYPESET
|
||||
.START
|
||||
</span>
|
||||
PRINTSTYLE, above, could also be <kbd>TYPEWRITE</kbd>. Mom has no
|
||||
objection to creating letters that look like they were typed on an
|
||||
Underwood by a shapely secretary with 1940s gams.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Please note that if you choose <kbd>PRINTSTYLE TYPEWRITE</kbd>,
|
||||
there’s no need to give the <kbd>SINGLESPACE</kbd> option, as
|
||||
this is the unalterable default for letters.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
After the START macro, you enter headers pertinent to your letter:
|
||||
the date, the addressee (in business correspondence, typically both
|
||||
name and address), the addresser (that’s you; in business
|
||||
correspondence, typically both name and address), and a greeting
|
||||
(in full, e.g. “Dear Mr. Smith,” or “Dear
|
||||
Mr. Smith:”).
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The macros for entering the headers are simple (they’re not even
|
||||
<a href="definitions.html#toggle">toggles</a>):
|
||||
<br/>
|
||||
<span class="pre-in-pp">
|
||||
.DATE
|
||||
.TO
|
||||
.CC
|
||||
.FROM
|
||||
.GREETING
|
||||
</span>
|
||||
You may enter them in any order you like, except for GREETING, which
|
||||
must come last. Mom ignores any headers you omit and spaces the
|
||||
letter’s opening according to what you do include. See
|
||||
<a href="#letters-defaults">Default for letters</a>
|
||||
to find out how mom formats the headers.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Once you’ve filled in what you need to get a letter started,
|
||||
simply type the letter, introducing each and every paragraph,
|
||||
including the first, with the
|
||||
<a href="docelement.html#pp">PP</a>
|
||||
macro.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Letters are concluded with the
|
||||
<a href="#closing">CLOSING</a>
|
||||
macro. If you want a complimentary closing (“Yours
|
||||
truly,” “Sincerely,” “Hugs and
|
||||
kisses”), invoke CLOSING on a line by itself and follow
|
||||
it with the text of the closing. <b>N.B.</b> Don’t
|
||||
add your name; mom supplies it automatically (from
|
||||
<a href="docprocessing.html#author">AUTHOR</a>),
|
||||
leaving room above it for your signature. If you'd prefer not to have a
|
||||
complimentary closing, place <kbd>\&</kbd> immediately underneath
|
||||
<kbd>.CLOSING</kbd>. Mom then just adds your name (from AUTHOR),
|
||||
again leaving room for your signature.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Assuming our tutorial letter is for business correspondence,
|
||||
here’s what the complete letter looks like.
|
||||
<br/>
|
||||
<span class="pre-in-pp">
|
||||
.AUTHOR "Yannick P. Guique"
|
||||
.DOCTYPE LETTER
|
||||
.PRINTSTYLE TYPESET
|
||||
.START
|
||||
.DATE
|
||||
August 25, 2010
|
||||
.TO
|
||||
GUILLAUME BARRIÈRES
|
||||
Minidoux Corporation
|
||||
5000 Pannes Drive
|
||||
Redmond, Virginia
|
||||
.CC
|
||||
John Doe
|
||||
Jane Deere
|
||||
Joe Blough
|
||||
.FROM
|
||||
Y.P. GUIQUE
|
||||
022 Umask Road
|
||||
St-Sauveur-en-dehors-de-la-mappe, Québec
|
||||
.GREETING
|
||||
Dear Mr. Barrières,
|
||||
.PP
|
||||
It has come to my attention that you have once again been
|
||||
lobbying the US government to prohibit the use of open source
|
||||
software by endeavouring to outlaw so-called "warranty
|
||||
free" applications.
|
||||
.PP
|
||||
I feel it is my duty to inform you that the success of your
|
||||
operating system relies heavily on open source programs and
|
||||
protocols, notably TCP/IP.
|
||||
.PP
|
||||
Therefore, in the interests of your corporation’s fiscal health,
|
||||
I strongly advise that you withdraw support for any US
|
||||
legislation that would cripple or render illegal open source
|
||||
development.
|
||||
.CLOSING
|
||||
Sincerely,
|
||||
</span>
|
||||
This produces a letter with headers that follow the North American
|
||||
standard for business correspondence. If you’d prefer another style
|
||||
of correspondence, for example, British, you’d set up the same
|
||||
letter like this:
|
||||
<br/>
|
||||
<span class="pre-in-pp">
|
||||
.AUTHOR "Yannick P. Guique"
|
||||
.DOCTYPE LETTER
|
||||
.PRINTSTYLE TYPESET
|
||||
.START
|
||||
.FROM
|
||||
.RIGHT
|
||||
Y.P. GUIQUE
|
||||
022 Umask Road
|
||||
St-Sauveur-en-dehors-de-la-mappe, Québec
|
||||
.TO
|
||||
GUILLAUME BARRIÈRES
|
||||
Minidoux Corporation
|
||||
5000 Pannes Drive
|
||||
Redmond, Virginia
|
||||
.CC
|
||||
John Doe
|
||||
Jane Deere
|
||||
Joe Blough
|
||||
.DATE
|
||||
.RIGHT
|
||||
August 25, 2010
|
||||
.GREETING
|
||||
Dear Mr. Barrières,
|
||||
</span>
|
||||
Notice the use of <kbd>.RIGHT</kbd> after <kbd>.FROM</kbd> and
|
||||
<kbd>.DATE</kbd> in this example, used to change the default quad
|
||||
for these macros.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<h2 id="letters-defaults" class="docs">Default letter style</h2>
|
||||
|
||||
<p>
|
||||
In letters, if the order of header macros is
|
||||
</p>
|
||||
<ol style="margin-top: -.5em;">
|
||||
<li><kbd>.DATE</kbd></li>
|
||||
<li><kbd>.TO</kbd> (the addressee)</li>
|
||||
<li><kbd>.FROM</kbd> (the addresser)</li>
|
||||
<li><kbd>.GREETING</kbd> (“Dear Whoever,” “To Whom It May Concern,” etc.)</li>
|
||||
</ol>
|
||||
<p style="margin-top: -.5em;">
|
||||
Mom sets
|
||||
</p>
|
||||
<ul style="margin-top: -.5em;">
|
||||
<li>the date flush right, page right, at the top of page one,
|
||||
with a gap of two linespaces underneath
|
||||
</li>
|
||||
<li>the addressee (<kbd>.TO</kbd>) in a block flush left, page
|
||||
left, with a gap of one linespace underneath
|
||||
</li>
|
||||
<li>the addresser (<kbd>.FROM</kbd>) in a block flush left, page
|
||||
left, with a gap of one linespace underneath
|
||||
</li>
|
||||
<li>the greeting flush left, with a gap of one linespace
|
||||
underneath
|
||||
</li>
|
||||
</ul>
|
||||
<p style="margin-top: -.5em;">
|
||||
which is the standard for North American business correspondence.
|
||||
The <kbd>.CC</kbd> macro, followed by a list of carbon copy
|
||||
recipients, may go anywhere before <kbd>.GREETING</kbd>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
If you switch the order of <kbd>.DATE</kbd>, <kbd>.TO</kbd> and/or
|
||||
<kbd>.FROM</kbd>, mom sets all the headers
|
||||
flush left, with a gap of one linespace underneath each. (The
|
||||
default left quad of any header can be changed by invoking the
|
||||
<kbd>.RIGHT</kbd> macro, on a line by itself, immediately before
|
||||
inputting the text of the header.)
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Following the headers, mom sets
|
||||
</p>
|
||||
<ul style="margin-top: -.5em;">
|
||||
<li>the body of the letter justified</li>
|
||||
<li>in multi-page letters:
|
||||
<ul style="margin-left: -.5em;">
|
||||
<li>a footer indicating there’s a next page (of the form <kbd>.../#</kbd>)</li>
|
||||
<li>the page number at the top of every page after page one</li>
|
||||
</ul></li>
|
||||
<li>the closing/signature lines flush left, indented halfway across the page</li>
|
||||
</ul>
|
||||
|
||||
<p>
|
||||
Other important style defaults are listed below, and may be changed
|
||||
via the
|
||||
<a href="typesetting.html#top">typesetting macros</a>
|
||||
or the document processing
|
||||
<a href="definitions.html#controlmacro">control macros</a>
|
||||
prior to
|
||||
<a href="docprocessing.html#start">START</a>.
|
||||
Assume that any style parameter not listed below is the same as for
|
||||
any document processed with
|
||||
<a href="docprocessing.html#typeset-defaults">PRINTSTYLE <kbd>TYPESET</kbd></a>
|
||||
or
|
||||
<a href="docprocessing.html#typewrite-defaults">PRINTSTYLE <kbd>TYPEWRITE</kbd></a>.
|
||||
</p>
|
||||
|
||||
<div class="defaults-container" style="padding-bottom: 8px;">
|
||||
<span class="pre defaults">
|
||||
PARAMETER PRINTSTYLE TYPESET PRINTSTYLE TYPEWRITE
|
||||
|
||||
Paper size 8.5 x 11 inches 8.5 x 11 inches
|
||||
Left/right margins 1.125 inches 1.125 inches
|
||||
Header margin 3.5 picas 3.5 picas
|
||||
(for page numbers)
|
||||
Header gap 3 picas 3 picas
|
||||
(for page numbers)
|
||||
Family Times Roman Courier
|
||||
Font roman roman
|
||||
Point size 12 12
|
||||
Line space 13.5 12 (i.e. singlespaced)
|
||||
Paragraph indent 3 ems 3 picas
|
||||
Spaced paragraphs yes no
|
||||
Footers* yes yes
|
||||
Footer margin 3 picas 3 picas
|
||||
Footer gap 3 picas 3 picas
|
||||
Page numbers top, centred top, centred
|
||||
|
||||
*Footers contain a "next page" number of the form .../#
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="rule-medium"><hr/></div>
|
||||
|
||||
|
||||
<div class="macro-list-container">
|
||||
<h3 id="index-letters-macros" class="macro-list">The letter macros</h3>
|
||||
<p style="margin-left: 9px; margin-top: -1.5em;">
|
||||
All letter macros must come after
|
||||
<a href="docprocessing.html#start">START</a>,
|
||||
except NO_SUITE, which must come after
|
||||
<a href="docprocessin.html#start">PRINTSTYLE</a>
|
||||
and before
|
||||
<a href="docprocessing.html#start">START</a>.
|
||||
</p>
|
||||
|
||||
<ul class="macro-list" style="margin-top: -.75em;">
|
||||
<li><a href="#date">DATE</a></li>
|
||||
<li><a href="#to">TO</a></li>
|
||||
<li><a href="#cc">CC</a></li>
|
||||
<li><a href="#from">FROM</a></li>
|
||||
<li><a href="#greeting">GREETING</a></li>
|
||||
<li><a href="#closing">CLOSING</a>
|
||||
<ul style="margin-left: -.5em;">
|
||||
<li><a href="#closing-indent">CLOSING_INDENT</a></li>
|
||||
<li><a href="#signature-indent">SIGNATURE_INDENT</a></li>
|
||||
</ul></li>
|
||||
<li><a href="#no-suite">NO_SUITE</a> – turn the “next page” footer off</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<!-- -DATE- -->
|
||||
|
||||
<div id="date" class="box-macro-args">
|
||||
Macro: <b>DATE</b>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
Invoke <kbd>.DATE</kbd> on a line by itself, with the date
|
||||
underneath, like this:
|
||||
<br/>
|
||||
<span class="pre-in-pp">
|
||||
.DATE
|
||||
October 31, 2024
|
||||
</span>
|
||||
You may also enter the date symbolically using groff’s
|
||||
<b>.pso</b> request and the system <b>date</b> command, like
|
||||
this:
|
||||
<br/>
|
||||
<span class="pre-in-pp">
|
||||
.DATE
|
||||
.pso date "+%B %-e, %Y%n"
|
||||
</span>
|
||||
Consult the date(1) manpage for details of date formatting. Note
|
||||
that you must pass <b>pdfmom</b> or <b>groff</b> the <b>-U</b> flag
|
||||
when you use the <b>.pso</b> request.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
If you wish to change the default quad direction for the date,
|
||||
enter <kbd>.LEFT</kbd> or <kbd>.RIGHT</kbd>, on a line by itself,
|
||||
immediately after <kbd>.DATE</kbd>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
If you want additional space between the date and any letter header
|
||||
that comes after it, do so after inputting the date, not at the top
|
||||
of the next header macro, like this:
|
||||
<br/>
|
||||
<span class="pre-in-pp">
|
||||
.DATE
|
||||
October 31, 2012
|
||||
.SPACE \"Or, more simply, .SP
|
||||
</span>
|
||||
If you wish to remove the default space,
|
||||
<br/>
|
||||
<span class="pre-in-pp">
|
||||
.SPACE -1v \"Or, more simply, .SP -1v
|
||||
</span>
|
||||
will do the trick.
|
||||
</p>
|
||||
|
||||
<!-- -TO- -->
|
||||
|
||||
<div id="to" class="box-macro-args">
|
||||
Macro: <b>TO</b>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
Invoke <kbd>.TO</kbd> on a line by itself, with the name and address
|
||||
of the addressee underneath, like this:
|
||||
<br/>
|
||||
<span class="pre-in-pp">
|
||||
.TO
|
||||
JOHN SMITH
|
||||
10 Roberts Crescent
|
||||
Bramladesh, Ont.
|
||||
</span>
|
||||
If you wish to change the default quad direction for the address,
|
||||
enter <kbd>.LEFT</kbd> or <kbd>.RIGHT</kbd>, on a line by itself,
|
||||
immediately after <kbd>.TO</kbd>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
If you want additional space between the address and any letter
|
||||
header that comes after it, do so after inputting the address, not
|
||||
at the top of the next header macro, like this:
|
||||
<br/>
|
||||
<span class="pre-in-pp">
|
||||
.TO
|
||||
JOHN SMITH
|
||||
10 Roberts Crescent
|
||||
Bramladesh, Ont.
|
||||
.SPACE \"Or, more simply, .SP
|
||||
</span>
|
||||
If you wish to remove the default space,
|
||||
<br/>
|
||||
<span class="pre-in-pp">
|
||||
.SPACE -1v \"Or, more simply, .SP -1v
|
||||
</span>
|
||||
will do the trick.
|
||||
</p>
|
||||
|
||||
<!-- -CC- -->
|
||||
|
||||
<div id="cc" class="box-macro-args">
|
||||
Macro: <b>CC</b>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
The <kbd>.CC</kbd> macro, invoked on a line by itself and followed
|
||||
by the names of carbon copy recipients, one to a line, creates a CC
|
||||
list that is set at the bottom of letters, underneath the signature
|
||||
line. If the list runs deep, mom shifts it to the next page.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Mom’s default is to introduce the list of CC recipients with
|
||||
<kbd>CC:</kbd>. The default can be changed with the CC_STRING
|
||||
macro, e.g.
|
||||
<br/>
|
||||
<span class="pre-in-pp">
|
||||
.CC_STRING "Copies to:"
|
||||
</span>
|
||||
|
||||
</p>
|
||||
<p>
|
||||
When setting up letter headers, the CC macro may go anywhere before
|
||||
<a href="#greeting">GREETING</a>.
|
||||
</p>
|
||||
|
||||
<!-- -FROM- -->
|
||||
|
||||
<div id="from" class="box-macro-args">
|
||||
Macro: <b>FROM</b>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
Invoke <kbd>.FROM</kbd> on a line by itself, with the name and
|
||||
address of the addresser underneath, like this:
|
||||
<br/>
|
||||
<span class="pre-in-pp">
|
||||
.FROM
|
||||
JOE BLOW
|
||||
15 Brunette Road
|
||||
Ste-Vieille-Andouille, Québec
|
||||
</span>
|
||||
If you wish to change the default quad direction for the address,
|
||||
enter <kbd>.LEFT</kbd> or <kbd>.RIGHT</kbd>, on a line by itself,
|
||||
immediately after <kbd>.FROM</kbd>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
If you want additional space between the address and any letter
|
||||
header that comes after it, do so after inputting the address, not
|
||||
at the top of the next header macro, like this:
|
||||
<br/>
|
||||
<span class="pre-in-pp">
|
||||
.FROM
|
||||
JOE BLOW
|
||||
15 Brunette Road
|
||||
Ste-Vieille-Andouille, Québec
|
||||
.SPACE \"Or, more simply, .SP
|
||||
</span>
|
||||
If you wish to remove the default space,
|
||||
<br/>
|
||||
<span class="pre-in-pp">
|
||||
.SPACE -1v \"Or, more simply, .SP -1v
|
||||
</span>
|
||||
will do the trick.
|
||||
</p>
|
||||
|
||||
<!-- -GREETING- -->
|
||||
|
||||
<div id="greeting" class="box-macro-args">
|
||||
Macro: <b>GREETING</b>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
Invoke <kbd>.GREETING</kbd> on a line by itself, with the full
|
||||
salutation you want for the letter underneath, like this:
|
||||
<br/>
|
||||
<span class="pre-in-pp">
|
||||
.GREETING
|
||||
Dear Mr. Smith,
|
||||
</span>
|
||||
</p>
|
||||
|
||||
<!-- -CLOSING- -->
|
||||
|
||||
<div id="closing" class="box-macro-args">
|
||||
Macro: <b>CLOSING</b>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
Mom-formatted letters must end with <kbd>.CLOSING</kbd>. Follow
|
||||
it on the next line with your preferred complimentary closing
|
||||
(e.g. “Yours truly,”), like this:
|
||||
<br/>
|
||||
<span class="pre-in-pp">
|
||||
.CLOSING
|
||||
Yours truly,
|
||||
</span>
|
||||
If you’d rather not have a complimentary closing, follow
|
||||
<kbd>.CLOSING</kbd> with <kbd>\&</kbd> on a line by itself. Mom
|
||||
will still automatically supply the signature line, whose position
|
||||
you may want to adjust with
|
||||
<a href="signature-space">SIGNATURE_SPACE</a>.
|
||||
</p>
|
||||
|
||||
<div class="box-tip" style="background-color: #E3D2B1;">
|
||||
<p class="tip">
|
||||
<span class="tip" style="display: inline-block; padding-bottom: .5em; color: #000056;">CLOSING control macros and defaults</span>
|
||||
<br/>
|
||||
Two macros control the behaviour of <kbd>.CLOSING</kbd>:
|
||||
</p>
|
||||
<ul style="margin-top: -1.25em;">
|
||||
<li>CLOSING_INDENT</li>
|
||||
<li>SIGNATURE_SPACE</li>
|
||||
</ul>
|
||||
|
||||
<p id="closing-indent" style="margin-top: -.25em;">
|
||||
The first, CLOSING_INDENT, indicates the distance from the left
|
||||
margin you’d like to have your closing indented. It takes a
|
||||
single
|
||||
<a href="definitions.html#numericargument">numeric argument</a>
|
||||
and must have a
|
||||
<a href="definitions.html#unitofmeasure">unit of measure</a>
|
||||
appended to it, unless you want an indent of 0 (zero). Mom’s
|
||||
default is one half the width of the letter’s line length
|
||||
(i.e. halfway across the page). If you wanted, instead, an indent of
|
||||
6
|
||||
<a href="definitions.html#picaspoints">picas</a>,
|
||||
you’d do it like this:
|
||||
<br/>
|
||||
<span class="pre-in-pp">
|
||||
.CLOSING_INDENT 6P
|
||||
</span>
|
||||
Or, if you wanted to have no indent at all:
|
||||
<br/>
|
||||
<span class="pre-in-pp">
|
||||
.CLOSING_INDENT 0
|
||||
</span>
|
||||
</p>
|
||||
|
||||
<p id="signature-space" style="margin-top: -1.25em;">
|
||||
The second, SIGNATURE_SPACE, controls how much room to leave for the
|
||||
signature. It takes a single
|
||||
<a href="definitions.html#numericargument">numeric argument</a>
|
||||
and must have a
|
||||
<a href="definitions.html#unitofmeasure">unit of measure</a>
|
||||
appended to it. Mom’s default is 3 line spaces, but if you
|
||||
wanted to change that to, say, 2 line spaces, you’d do:
|
||||
<br/>
|
||||
<span class="pre-in-pp">
|
||||
.SIGNATURE_SPACE 2v
|
||||
</span>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<!-- -NO_SUITE- -->
|
||||
|
||||
<div id="no-suite" class="box-macro-args" style="margin-top: 2em;">
|
||||
Macro: <b>NO_SUITE</b>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
If you don’t want mom to print a “next page”
|
||||
number at the bottom of multi-page letters, invoke
|
||||
<kbd>.NO_SUITE</kbd>, on a line by itself, prior to
|
||||
<a href="docprocessing.html#start">START</a>.
|
||||
</p>
|
||||
|
||||
<div class="rule-long"><hr/></div>
|
||||
|
||||
<!-- Navigation links -->
|
||||
<table style="width: 100%; margin-top: 12px;">
|
||||
<tr>
|
||||
<td style="width: 33%;"><a href="toc.html">Back to Table of Contents</a></td>
|
||||
<td style="width: 33%; text-align: center;"><a href="#top">Top</a></td>
|
||||
<td style="width: 33%; text-align: right;"><a href="macrolist.html">Next: Quick reference guide</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="bottom-spacer"><br/></div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
1545
OGP64/usr/share/doc/groff-1.24.1/html/mom/macrolist.html
Normal file
1545
OGP64/usr/share/doc/groff-1.24.1/html/mom/macrolist.html
Normal file
File diff suppressed because it is too large
Load diff
350
OGP64/usr/share/doc/groff-1.24.1/html/mom/rectoverso.html
Normal file
350
OGP64/usr/share/doc/groff-1.24.1/html/mom/rectoverso.html
Normal file
|
|
@ -0,0 +1,350 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
This file is part of groff, the GNU roff type-setting system.
|
||||
|
||||
Copyright (C) 2004-2020 Free Software Foundation, Inc.
|
||||
Written by Peter Schaffter (peter@schaffter.ca).
|
||||
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.3 or
|
||||
any later version published by the Free Software Foundation; with no
|
||||
Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
|
||||
Texts.
|
||||
|
||||
A copy of the Free Documentation License is included as a file called
|
||||
FDL in the main directory of the groff source package.
|
||||
-->
|
||||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html;charset=utf-8"/>
|
||||
<title>Mom -- Recto/verso printing, collating</title>
|
||||
<link rel="stylesheet" type="text/css" href="stylesheet.css" />
|
||||
</head>
|
||||
|
||||
<body style="background-color: #f5faff;">
|
||||
|
||||
<!-- ==================================================================== -->
|
||||
|
||||
<div id="top" class="page">
|
||||
|
||||
<!-- Navigation links -->
|
||||
<table style="width: 100%;">
|
||||
<tr>
|
||||
<td><a href="toc.html">Back to Table of Contents</a></td>
|
||||
<td style="text-align: right;"><a href="cover.html#top">Next: Cover pages</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h1 class="docs">Recto/verso printing, collating</h1>
|
||||
|
||||
<div style="width: 50%; margin: auto;">
|
||||
<ul class="no-enumerator" style="margin-left: -1em;">
|
||||
<li><a href="#rectoverso-intro">Introduction to recto/verso printing</a>
|
||||
<ul style="margin-left: -.5em; list-style-type: disc;">
|
||||
<li><a href="#rectoverso-list">Macro list</a></li>
|
||||
</ul></li>
|
||||
<li><a href="#collate-intro">Introduction to collating</a>
|
||||
<ul style="margin-left: -.5em; list-style-type: disc;">
|
||||
<li><a href="#collate">The COLLATE macro</a></li>
|
||||
</ul></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="rule-medium"><hr/></div>
|
||||
|
||||
<h2 id="rectoverso-intro" class="docs">Introduction to recto/verso printing</h2>
|
||||
|
||||
<p>
|
||||
Recto/verso printing allows you to set up a mom document in such
|
||||
a way that it can be printed on both sides of a printer sheet and
|
||||
subsequently bound.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
With recto/verso, mom automatically takes control of the following
|
||||
aspects of alternating page layout:
|
||||
</p>
|
||||
<ul style="margin-top: -.5em; margin-left: -.5em; margin-bottom: -.5em;">
|
||||
<li>switching left and right margins (if they’re not equal)</li>
|
||||
<li>switching the left and right parts of the default 3-part
|
||||
<a href="definitions.html#header">headers</a>
|
||||
or
|
||||
<a href="definitions.html#footer">footers</a>
|
||||
(see the
|
||||
<a href="headfootpage.html#description-general">General description of headers</a>)
|
||||
</li>
|
||||
<li>switching
|
||||
<a href="headfootpage.html#hdrftr-recto">HEADER_RECTO</a>
|
||||
and
|
||||
<a href="headfootpage.html#hdrftr-recto">HEADER_VERSO</a>
|
||||
if user-defined, single string recto/verso headers
|
||||
or footers are used in place of the default 3-part
|
||||
headers or footers
|
||||
</li>
|
||||
<li>switching the page number position (if page numbers are not centred)</li>
|
||||
</ul>
|
||||
<br/>
|
||||
|
||||
<div class="macro-list-container">
|
||||
<h3 id="rectoverso-list" class="macro-list">Recto/verso macros</h3>
|
||||
<ul class="macro-list">
|
||||
<li><a href="#recto-verso">RECTO_VERSO</a></li>
|
||||
<li><a href="#force-recto">FORCE_RECTO</a></li>
|
||||
<li><a href="#switch-hdrftr">SWITCH_HEADERS (also FOOTERS)</a>
|
||||
– switch starting position of the header parts (left and right)
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<!-- -RECTO_VERSO- -->
|
||||
|
||||
<div id="recto-verso" class="box-macro-args">
|
||||
Macro: <b>RECTO_VERSO</b>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
If you want mom to set up alternating pages for recto/verso
|
||||
printing, simply invoke RECTO_VERSO, with no argument, anywhere in
|
||||
your document (most likely before
|
||||
<a href="docprocessing.html#start">START</a>).
|
||||
</p>
|
||||
|
||||
<div class="box-tip">
|
||||
<p class="tip-top">
|
||||
<span class="note">Note:</span>
|
||||
Recto/verso always switches the left and right parts of
|
||||
<a href="definitions.html#header">headers</a>
|
||||
or
|
||||
<a href="definitions.html#footer">footers</a>
|
||||
on odd/even pages. However, it only switches the left and right
|
||||
margins if the margins aren’t equal. Consequently, it is
|
||||
your responsibility to set the appropriate differing left and right
|
||||
margins with
|
||||
<a href="typesetting.html#l-margin">L_MARGIN</a>
|
||||
and
|
||||
<a href="typesetting.html#r-margin">R_MARGIN</a>
|
||||
(prior to
|
||||
<a href="docprocessing.html#start">START</a>)
|
||||
or with
|
||||
<a href="docprocessing.html#doc-left-margin">DOC_LEFT_MARGIN</a>
|
||||
and
|
||||
<a href="docprocessing.html#doc-right-margin">DOC_RIGHT_MARGIN</a>
|
||||
(before or after START).
|
||||
</p>
|
||||
|
||||
<p class="tip-bottom">
|
||||
Equally, recto/verso only switches the page number position if page
|
||||
numbers aren’t centred, which means you have to set the page
|
||||
number position with
|
||||
<a href="headfootpage.html#pagenum-pos">PAGENUM_POS</a>
|
||||
(before or after START).
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<!-- -FORCE_RECTO- -->
|
||||
|
||||
<div id="force-recto" class="box-macro-args" style="margin-top: 1em;">
|
||||
Macro: <b>FORCE_RECTO</b>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
It is a common convention with two-sided printing to ensure that
|
||||
cover pages, title pages, and chapters or major sections of a document
|
||||
always begin on the recto side of a page. This sometimes
|
||||
necessitates inserting a blank page before the start of a new
|
||||
chapter or major section.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
If you would like mom to take care of this for you automatically,
|
||||
simply invoke <kbd>FORCE_RECTO</kbd> before the first
|
||||
<a href="docprocessing.html#start">START</a>
|
||||
of the document.
|
||||
</p>
|
||||
|
||||
<!-- -SWITCH_HDRFTR- -->
|
||||
|
||||
<div id="switch-hdrftr" class="box-macro-args" style="margin-top: 1em;">
|
||||
Macro: <b>SWITCH_HEADERS</b>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
SWITCH_HEADERS switches the location of the header left string
|
||||
(by default, the author) and the header right string (by default,
|
||||
the document title). If you don’t like mom’s default
|
||||
placement of author and title, use SWITCH_HEADERS to reverse it.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
SWITCH_HEADERS can also be useful in conjunction with
|
||||
<a href="#recto-verso">RECTO_VERSO</a>.
|
||||
The assumption of RECTO_VERSO is that the first page of a document
|
||||
(i.e. recto/odd) represents the norm for header-left and header-right,
|
||||
meaning that the second (and all subsequent verso/even) pages of the
|
||||
document will reverse the order of header-left and header-right.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
If mom’s behaviour in this matter is not what you want, simply
|
||||
invoke SWITCH_HEADERS on the first page of your recto/verso document
|
||||
to reverse her default treatment of header parts. The remainder of
|
||||
your document (with respect to headers) will come out as you want.
|
||||
</p>
|
||||
|
||||
<div class="rule-medium"><hr/></div>
|
||||
|
||||
<!-- ===================================================================== -->
|
||||
|
||||
<h2 id="collate-intro" class="docs">Introduction to collating</h2>
|
||||
|
||||
<p>
|
||||
Many people wisely keep chapters of a long work in separate
|
||||
files, previewing or printing them as needed during the draft
|
||||
phase. However, when it comes to the final version, mom requires
|
||||
a single, collated file in order to keep track of page numbering
|
||||
and recto/verso administration, generating tables of contents and
|
||||
endnotes, ensuring that
|
||||
<a href="definitions.html#docheader">docheaders</a>
|
||||
get printed correctly, and a host of other details.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The COLLATE macro, which can be used with any
|
||||
<a href="docprocessing.html#doctype">DOCTYPE</a>
|
||||
except <kbd>LETTER</kbd>, lets you glue mom-formatted input files
|
||||
together. You need only concatenate chapters into a single file
|
||||
(most likely with <kbd>cat(1)</kbd>), and put
|
||||
<kbd>.COLLATE</kbd> at the end of each concatenated chapter.
|
||||
Assuming all the files begin with the required
|
||||
<a href="docprocessing.html#reference-macros">reference macros</a>
|
||||
(metadata), style parameters, and
|
||||
<a href="docprocessing.html#start">START</a>,
|
||||
each chapter will begin on a fresh page and behave as expected.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Even if you work with monolithic, multi-chapter files, every
|
||||
chapter and its associated metadata plus <kbd>.START</kbd>
|
||||
still needs to be preceded by <kbd>.COLLATE</kbd>.
|
||||
</p>
|
||||
|
||||
<div class="box-tip">
|
||||
<p class="tip">
|
||||
<span class="note">Note:</span>
|
||||
COLLATE assumes you are collating documents/files with similar
|
||||
type-style parameters hence there’s no need for PRINTSTYLE
|
||||
to appear after COLLATE, although if you’re collating
|
||||
documents that were created as separate files, chances are the
|
||||
PRINTSTYLE’s already there.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="box-tip">
|
||||
<p id="caution" class="tip">
|
||||
<b>Two words of caution:</b>
|
||||
</p>
|
||||
<ol style="margin-top: -1.25em; padding-bottom: .5em;">
|
||||
<li>Do not collate documents of differing
|
||||
PRINTSTYLES (i.e., don’t try to
|
||||
collate a <kbd>TYPESET</kbd> document and <kbd>TYPEWRITE</kbd>
|
||||
document).
|
||||
</li>
|
||||
<li>Use <kbd>.DOC_FAMILY</kbd> instead of
|
||||
<kbd>.FAMILY</kbd> if, for some reason, you want to
|
||||
change the family of all the document elements after
|
||||
<kbd>.COLLATE</kbd>. <kbd>.FAMILY</kbd>, by itself, will
|
||||
change the family of paragraph text only.
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
<!-- -COLLATE- -->
|
||||
|
||||
<div class="macro-id-overline">
|
||||
<h3 id="collate" class="macro-id">collate</h3>
|
||||
</div>
|
||||
|
||||
<div class="box-macro-args">
|
||||
Macro: <b>COLLATE</b>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
The most basic (and most likely) collating situation looks like
|
||||
this:
|
||||
<br/>
|
||||
<span class="pre-in-pp">
|
||||
.COLLATE
|
||||
.CHAPTER 17
|
||||
.START
|
||||
</span>
|
||||
A slightly more complex version of the same thing, for chapters
|
||||
that require their own titles, looks like this:
|
||||
<br/>
|
||||
<span class="pre-in-pp">
|
||||
.COLLATE
|
||||
.CHAPTER_TITLE "Geek Fatigue: Symptoms and Causes"
|
||||
.START
|
||||
</span>
|
||||
</p>
|
||||
|
||||
<div class="box-tip" style="margin-top: -1em">
|
||||
<p class="tip">
|
||||
<span class="tip">Tip:</span>
|
||||
If the last line of text before <kbd>.COLLATE</kbd>
|
||||
falls too close to the bottom margin, or if the line is followed
|
||||
by a macro likely to cause a linebreak (e.g. <kbd>.LIST OFF</kbd> or
|
||||
<kbd>.IQ</kbd>), mom may output a superfluous blank page before
|
||||
the start of the following document.
|
||||
</p>
|
||||
|
||||
<p class="tip-bottom" style="margin-top: -1em">
|
||||
In order to avoid this, insert
|
||||
<a href="docprocessing.html#EL"><kbd>.EL</kbd></a>
|
||||
after the last line of text, before <kbd>.COLLATE</kbd> and/or any
|
||||
concluding macros. For example,
|
||||
<br/>
|
||||
<span class="pre-in-pp">
|
||||
some concluding text.\c
|
||||
.EL
|
||||
.COLLATE
|
||||
</span>
|
||||
or
|
||||
<br/>
|
||||
<span class="pre-in-pp">
|
||||
some concluding text.\c
|
||||
.EL
|
||||
.LIST OFF
|
||||
.COLLATE
|
||||
</span>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="box-tip">
|
||||
<p class="tip">
|
||||
<span class="note">Note:</span>
|
||||
See the
|
||||
<a href="#caution">two words of caution</a>,
|
||||
above.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="rule-long"><hr/></div>
|
||||
|
||||
<!-- Navigation links -->
|
||||
<table style="width: 100%; margin-top: 12px;">
|
||||
<tr>
|
||||
<td style="width: 33%;"><a href="toc.html">Back to Table of Contents</a></td>
|
||||
<td style="width: 33%; text-align: center;"><a href="#top">Top</a></td>
|
||||
<td style="width: 33%; text-align: right;"><a href="cover.html">Next: Cover pages</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="bottom-spacer"><br/></div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
2129
OGP64/usr/share/doc/groff-1.24.1/html/mom/refer.html
Normal file
2129
OGP64/usr/share/doc/groff-1.24.1/html/mom/refer.html
Normal file
File diff suppressed because it is too large
Load diff
2736
OGP64/usr/share/doc/groff-1.24.1/html/mom/reserved.html
Normal file
2736
OGP64/usr/share/doc/groff-1.24.1/html/mom/reserved.html
Normal file
File diff suppressed because it is too large
Load diff
691
OGP64/usr/share/doc/groff-1.24.1/html/mom/stylesheet.css
Normal file
691
OGP64/usr/share/doc/groff-1.24.1/html/mom/stylesheet.css
Normal file
|
|
@ -0,0 +1,691 @@
|
|||
/* Copyright (C) 2004-2020 Free Software Foundation, Inc. */
|
||||
/* This file is part of mom, which is part of groff, a free software */
|
||||
/* project. */
|
||||
|
||||
/* You can redistribute it and/or modify it under the terms of the */
|
||||
/* "GNU General Public License" as published by the "Free Software */
|
||||
/* Foundation", version 2.
|
||||
|
||||
/* The license text is available in the internet at */
|
||||
/* <http://www.gnu.org/licenses/gpl-2.0.html> */
|
||||
|
||||
/* stylesheet for the mom macros documentation */
|
||||
|
||||
a:link { color: blue; text-decoration: none; }
|
||||
a:hover { color: red; text-decoration: underline; }
|
||||
a:visited { color: purple; text-decoration: none; }
|
||||
a:visited:hover { color: purple; text-decoration: underline; }
|
||||
a.header-link:visited { color: #6e70cc ; }
|
||||
a.header-link:visited:hover { color: #6e70cc ; }
|
||||
|
||||
a:link.quick { text-decoration: underline; }
|
||||
.version /* version number for top of toc.html */
|
||||
{
|
||||
font-size: 90% ;
|
||||
text-align: center ;
|
||||
}
|
||||
|
||||
.page /* Page setup: page color, size and border */
|
||||
{
|
||||
width: 67% ;
|
||||
position: relative ;
|
||||
top: 12px ;
|
||||
bottom: 12px ;
|
||||
margin: auto ;
|
||||
padding: 12px ;
|
||||
border: solid 1px #ceac8d ;
|
||||
color: #302419 ;
|
||||
background-color: #ffffeb ;
|
||||
font: 1em/1.5em arial,sans-serif ;
|
||||
font-variant-ligatures: none;
|
||||
}
|
||||
|
||||
.nobr /* Make <nobr> a class property */
|
||||
{
|
||||
white-space: nowrap ;
|
||||
hyphens: none ;
|
||||
}
|
||||
|
||||
/* Heads */
|
||||
|
||||
h1.docs
|
||||
{
|
||||
font-family: arial,sans-serif ;
|
||||
font-size: 125% ;
|
||||
text-align: center ;
|
||||
color: #002b56 ;
|
||||
background-color: #e2f1ff ;
|
||||
outline: solid 1px #99cccc ;
|
||||
padding: 6px ;
|
||||
}
|
||||
h2.docs
|
||||
{
|
||||
margin-bottom: -.25em ;
|
||||
font-size: 105% ;
|
||||
color: #000056 ;
|
||||
}
|
||||
h2.macro-group /* ie "Page setup" or "Indents" or "Multi-columns" */
|
||||
{
|
||||
margin-top: 1em ;
|
||||
font-size: 120% ;
|
||||
color: #000056 ;
|
||||
background-color: #dfccad ;
|
||||
padding: 6px ;
|
||||
}
|
||||
h3.docs
|
||||
{
|
||||
margin-bottom: -.5em ;
|
||||
font-size: 95% ;
|
||||
color: #000056 ;
|
||||
text-transform: uppercase ;
|
||||
}
|
||||
h3.appendices
|
||||
{
|
||||
font-size: 100% ;
|
||||
text-transform: none ;
|
||||
}
|
||||
h3.notes
|
||||
{
|
||||
display: inline-block ;
|
||||
margin-top: .5em ;
|
||||
}
|
||||
h3.control
|
||||
{
|
||||
padding-top: .5em ;
|
||||
font-size: 100% ;
|
||||
text-transform: none ;
|
||||
}
|
||||
h3.numbered
|
||||
{
|
||||
font-size: 100% ;
|
||||
margin-bottom: -.5em ;
|
||||
}
|
||||
h3.macro-id
|
||||
{
|
||||
font-size: 105% ;
|
||||
color: #000056 ;
|
||||
text-transform: uppercase ;
|
||||
margin-top: 3px ;
|
||||
margin-bottom: 0px ;
|
||||
}
|
||||
h4.docs
|
||||
{
|
||||
font-size: 95% ;
|
||||
margin-bottom: -.5em ;
|
||||
color: #000056 ;
|
||||
}
|
||||
h4.doc-param-macros
|
||||
{
|
||||
margin-top: -.5em ;
|
||||
}
|
||||
h4.arg-list
|
||||
{
|
||||
margin-top: -.5em ;
|
||||
}
|
||||
h4.fields
|
||||
{
|
||||
color: #302419 ;
|
||||
}
|
||||
h5.docs
|
||||
{
|
||||
margin-bottom: -.5em ;
|
||||
font-size: 95% ;
|
||||
color: #000056 ;
|
||||
text-transform: uppercase ;
|
||||
}
|
||||
ul.doc-param-macros
|
||||
{
|
||||
margin-top: .75em ;
|
||||
margin-left: -.5em ;
|
||||
}
|
||||
.control-macros-header
|
||||
{
|
||||
display: inline-block ;
|
||||
margin-bottom: -.25em ;
|
||||
padding: 2px 6px 0 6px ;
|
||||
outline: 1px solid #000058 ;
|
||||
font-size: 100% ;
|
||||
background-color: #e2f1ff ;
|
||||
}
|
||||
.control-macro
|
||||
{
|
||||
font-size: 100% ;
|
||||
margin-bottom: -.75em ;
|
||||
color: #2f2f71 ;
|
||||
}
|
||||
.macro-id-overline
|
||||
{
|
||||
display: inline-block ;
|
||||
border-top: solid 2px #8d8775 ;
|
||||
margin-bottom: .5em ;
|
||||
}
|
||||
|
||||
/* Paragraphs */
|
||||
|
||||
p.no-indent
|
||||
{
|
||||
text-indent: 0px ;
|
||||
}
|
||||
p.requires
|
||||
{
|
||||
font-family: arial,sans-serif ;
|
||||
font-style: italic ;
|
||||
text-indent: 0px ;
|
||||
margin-top: .25em ;
|
||||
}
|
||||
p.alias
|
||||
{
|
||||
font-family: arial,sans-serif ;
|
||||
font-style: normal ;
|
||||
text-indent: 0px ;
|
||||
margin-top: .25em ;
|
||||
}
|
||||
|
||||
/* Horizontal rules */
|
||||
|
||||
hr /* horizontal rules need a border to be colorized) */
|
||||
{
|
||||
border: solid 1px #8d8775 ;
|
||||
}
|
||||
div.rule-short /* for section breaks; top/bottom margins set manually */
|
||||
{
|
||||
display: block ;
|
||||
width: 25% ;
|
||||
margin: auto;
|
||||
clear: both ;
|
||||
}
|
||||
div.rule-medium /* underneath mini-tocs; top/bottom margins set manually */
|
||||
{
|
||||
display: block ;
|
||||
width: 40% ;
|
||||
margin: auto;
|
||||
clear: both ;
|
||||
}
|
||||
div.rule-long /* precedes nav bar at bottom of page */
|
||||
{
|
||||
display: block ;
|
||||
width: 90% ;
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
/* Boxed text */
|
||||
|
||||
.box-macro-args /* Macro name+args */
|
||||
{
|
||||
display: block ;
|
||||
border: solid 1px #302419 ;
|
||||
padding-top: 5px ;
|
||||
padding-bottom: 3px ;
|
||||
padding-left: 15px ;
|
||||
padding-right: 15px ;
|
||||
background-color: #ffffff ;
|
||||
white-space: nowrap ;
|
||||
overflow: auto ;
|
||||
}
|
||||
.box-code
|
||||
{
|
||||
display: block ;
|
||||
width: 100% ;
|
||||
border: solid 1px #302419 ;
|
||||
padding-top: 5px ;
|
||||
padding-bottom: 18px ;
|
||||
padding-left: 15px ;
|
||||
padding-right: 15px ;
|
||||
color: #6f614a ;
|
||||
background-color: #ffffff ;
|
||||
white-space: nowrap ;
|
||||
}
|
||||
.box-tip
|
||||
{
|
||||
outline: solid 1px #ceac8d ;
|
||||
padding-left: 15px ;
|
||||
padding-right: 15px ;
|
||||
text-align: left ;
|
||||
background-color: #f9f9d9 ;
|
||||
margin-bottom: 1.5em ;
|
||||
}
|
||||
.box-example-layout
|
||||
{
|
||||
outline: solid 1px #ceac8d ;
|
||||
padding-left: 15px ;
|
||||
padding-right: 15px ;
|
||||
text-align: justify ;
|
||||
background-color: #f9f9d9 ;
|
||||
margin-bottom: 2.5em ;
|
||||
}
|
||||
.box-notes
|
||||
{
|
||||
outline: solid 1px #ceac8d ;
|
||||
padding-left: 15px ;
|
||||
padding-right: 15px ;
|
||||
text-align: justify ;
|
||||
background-color: #f9f9d9 ;
|
||||
margin-bottom: 1.5em ;
|
||||
}
|
||||
.box-important
|
||||
{
|
||||
outline: solid 1px #ce7a65 ;
|
||||
padding-left: 15px ;
|
||||
padding-right: 15px ;
|
||||
text-align: justify ;
|
||||
background-color: #f9f9d9 ;
|
||||
margin-bottom: 1.5em ;
|
||||
}
|
||||
p.tip
|
||||
{
|
||||
padding-top: 9px ;
|
||||
padding-bottom: 9px ;
|
||||
text-indent: 0px ;
|
||||
}
|
||||
p.tip-top
|
||||
{
|
||||
padding-top: 9px ;
|
||||
text-indent: 0px ;
|
||||
}
|
||||
p.tip-bottom
|
||||
{
|
||||
padding-bottom: 9px ;
|
||||
text-indent: 0px ;
|
||||
}
|
||||
|
||||
/* Pre-formatted code */
|
||||
|
||||
span.pre /* pre-formatted multi-line blocks; indent must be exactly 2 spaces */
|
||||
{
|
||||
display: block ;
|
||||
position: relative ;
|
||||
top: -1em ;
|
||||
margin-bottom: -1.5em ;
|
||||
font-family: "Lucida Console",monospace ;
|
||||
font-weight: bolder ;
|
||||
font-size: 95% ;
|
||||
white-space: pre ;
|
||||
overflow: auto ;
|
||||
}
|
||||
span.defaults
|
||||
{
|
||||
margin-left: 6px ;
|
||||
padding-bottom: 1em ;
|
||||
font-size: 95% ;
|
||||
}
|
||||
span.pre-in-pp
|
||||
{
|
||||
display: block ;
|
||||
position: relative ;
|
||||
top: -1em ;
|
||||
margin-bottom: -.5em ;
|
||||
font-family: "Lucida Console",monospace ;
|
||||
font-weight: bolder ;
|
||||
font-size: 95% ;
|
||||
white-space: pre ;
|
||||
overflow: auto ;
|
||||
}
|
||||
span.important
|
||||
{
|
||||
font-family: arial,sans-serif ;
|
||||
font-weight: bolder ;
|
||||
color: #8b0000 ;
|
||||
}
|
||||
span.note
|
||||
{
|
||||
font-family: arial,sans-serif ;
|
||||
font-weight: bolder ;
|
||||
color: #443526 ;
|
||||
}
|
||||
span.additional-note
|
||||
{
|
||||
font-family: arial,sans-serif ;
|
||||
font-weight: bolder ;
|
||||
font-style: italic ;
|
||||
color: #443526 ;
|
||||
}
|
||||
span.tip
|
||||
{
|
||||
font-family: arial,sans-serif ;
|
||||
font-weight: bolder ;
|
||||
color: #443526 ;
|
||||
}
|
||||
span.experts
|
||||
{
|
||||
font-family: arial,sans-serif ;
|
||||
font-weight: bolder ;
|
||||
color: #443526 ;
|
||||
}
|
||||
/* Mini-tocs (usually at top of page) */
|
||||
|
||||
/* 1-column, centered mini-toc */
|
||||
ul.mini-toc-centered
|
||||
{
|
||||
text-align: center ;
|
||||
list-style-type: none ;
|
||||
margin-left: -40px ;
|
||||
}
|
||||
|
||||
/* 2-column mini-toc column defs*/
|
||||
.mini-toc-col-1
|
||||
{
|
||||
float: left ;
|
||||
width: 49% ;
|
||||
margin-left: -10px ;
|
||||
}
|
||||
.mini-toc-col-2
|
||||
{
|
||||
float: left ;
|
||||
width: 51% ;
|
||||
clear: right ;
|
||||
}
|
||||
|
||||
/* 3-column mini-toc column defs */
|
||||
.col-1-definitions
|
||||
{
|
||||
float: left ;
|
||||
width: 32% ;
|
||||
height: 55em ;
|
||||
padding-bottom: 9px;
|
||||
background-color: #ded4bd ;
|
||||
margin-right: 2% ;
|
||||
}
|
||||
.col-2-definitions
|
||||
{
|
||||
float: left ;
|
||||
width: 32% ;
|
||||
height: 55em ;
|
||||
padding-bottom: 9px;
|
||||
background-color: #ded4bd ;
|
||||
margin-right: 2% ;
|
||||
}
|
||||
.col-3-definitions
|
||||
{
|
||||
float: left ;
|
||||
width: 32% ;
|
||||
height: 55em ;
|
||||
padding-bottom: 9px;
|
||||
background-color: #ded4bd ;
|
||||
margin-bottom: 24px ;
|
||||
}
|
||||
|
||||
/* List styles */
|
||||
|
||||
ul.toc
|
||||
{
|
||||
margin-top: .5em ;
|
||||
}
|
||||
ul.no-enumerator
|
||||
{
|
||||
list-style-type: none ;
|
||||
}
|
||||
.list-head
|
||||
{
|
||||
font-family: arial,sans-serif ;
|
||||
font-weight: bolder ;
|
||||
font-size: 110% ;
|
||||
color: #000056 ;
|
||||
}
|
||||
.list-head-goodies
|
||||
{
|
||||
font-family: arial,sans-serif ;
|
||||
font-weight: normal ;
|
||||
font-size: 110% ;
|
||||
color: #000056 ;
|
||||
}
|
||||
.no-anchor
|
||||
{
|
||||
color: #302419 ;
|
||||
font-weight: bold ;
|
||||
}
|
||||
.text-color
|
||||
{
|
||||
color: #302419 ;
|
||||
}
|
||||
li.item
|
||||
{
|
||||
font-family: arial,sans-serif ;
|
||||
font-weight: normal ;
|
||||
font-size: 100% ;
|
||||
margin-left: -10px ;
|
||||
list-style-type: disc ;
|
||||
}
|
||||
.mini-toc
|
||||
{
|
||||
margin-top: -1em ;
|
||||
font-size: 90% ;
|
||||
}
|
||||
.sublist
|
||||
{
|
||||
margin-left: -1em ;
|
||||
font-size: 90% ;
|
||||
color: #302419 ;
|
||||
list-style-type: disc ;
|
||||
}
|
||||
.sub
|
||||
{
|
||||
list-style-type: circle ;
|
||||
}
|
||||
.normal
|
||||
{
|
||||
font-style: normal ;
|
||||
font-size: 100% ;
|
||||
}
|
||||
.normal-smaller
|
||||
{
|
||||
font-weight: normal ;
|
||||
color: #302419 ;
|
||||
font-size: 90% ;
|
||||
}
|
||||
.normal-sub-sub
|
||||
{
|
||||
font-weight: normal ;
|
||||
color: #302419 ;
|
||||
font-size: 90% ;
|
||||
}
|
||||
|
||||
/* Macro lists / defaults */
|
||||
|
||||
div.macro-list-container
|
||||
{
|
||||
background-color: #ded4bd ;
|
||||
margin-bottom: 1.5em ;
|
||||
}
|
||||
h3.macro-list
|
||||
{
|
||||
font-size: 100% ;
|
||||
color: #000056 ;
|
||||
text-transform: uppercase ;
|
||||
padding: 9px ;
|
||||
}
|
||||
ul.macro-list
|
||||
{
|
||||
margin-left: -21px ;
|
||||
padding-right: 12px ;
|
||||
list-style-type: none ;
|
||||
font-family: arial,sans-serif ;
|
||||
margin-top: -1.25em ;
|
||||
padding-bottom: 6px ;
|
||||
}
|
||||
ol.macro-list
|
||||
{
|
||||
font-family: arial,sans-serif ;
|
||||
margin-top: -1.25em ;
|
||||
padding-bottom: 6px ;
|
||||
}
|
||||
|
||||
.defaults-container
|
||||
{
|
||||
background-color: #e3d2b1 ;
|
||||
border: 1px solid #3f2c00 ;
|
||||
margin-bottom: 2.5em ;
|
||||
}
|
||||
h3.defaults
|
||||
{
|
||||
font-size: 100% ;
|
||||
color: #000056 ;
|
||||
text-transform: uppercase ;
|
||||
padding: 9px ;
|
||||
}
|
||||
p.defaults
|
||||
{
|
||||
margin-top: .25em ;
|
||||
margin-left: 6px ;
|
||||
margin-right: 12px ;
|
||||
margin-bottom: 0 ;
|
||||
}
|
||||
#toc-title, #toc-head, #toc-subhead, #toc-parahead
|
||||
{
|
||||
display: block ;
|
||||
margin-top: -1em ;
|
||||
margin-bottom: -1em ;
|
||||
}
|
||||
|
||||
/* Bottom of page spacer */
|
||||
|
||||
div.bottom-spacer
|
||||
{
|
||||
display: block ;
|
||||
height: 24px ;
|
||||
}
|
||||
|
||||
/* General markup */
|
||||
|
||||
kbd
|
||||
{
|
||||
font-family: "Lucida Console",monospace ;
|
||||
font-weight: bold ;
|
||||
font-size: 98% ;
|
||||
}
|
||||
kbd.macro-args
|
||||
{
|
||||
margin-right: .5em ;
|
||||
color: #6f614a ;
|
||||
white-space: nowrap ;
|
||||
overflow: auto ;
|
||||
}
|
||||
|
||||
/* tocs */
|
||||
|
||||
h1.toc
|
||||
{
|
||||
font-family: arial,sans-serif ;
|
||||
font-size: 175% ;
|
||||
text-align: center ;
|
||||
color: #002b56 ;
|
||||
background-color: #e2f1ff ;
|
||||
outline: solid 1px #99cccc ;
|
||||
padding: 6px ;
|
||||
}
|
||||
h2.toc
|
||||
{
|
||||
font-size: 120% ;
|
||||
color: #000056 ;
|
||||
}
|
||||
h3.toc
|
||||
{
|
||||
margin-top: -.5em ;
|
||||
margin-bottom: -.5em ;
|
||||
font-size: 100% ;
|
||||
color: #6e70cc ;
|
||||
}
|
||||
.highlight
|
||||
{
|
||||
font-weight: bold ;
|
||||
}
|
||||
.fourth-level
|
||||
{
|
||||
margin-left: -1.25em ;
|
||||
list-style-type: none ;
|
||||
}
|
||||
ul.toc-docproc
|
||||
{
|
||||
margin-left: -1em ;
|
||||
}
|
||||
.toc-docproc-header
|
||||
{
|
||||
margin-top: -.5em ;
|
||||
text-transform: uppercase ;
|
||||
}
|
||||
a.header-link
|
||||
{
|
||||
color: #6e70cc ;
|
||||
font-size: 95% ;
|
||||
}
|
||||
|
||||
/* Examples */
|
||||
|
||||
.examples-container
|
||||
{
|
||||
border: solid 1px #917963 ;
|
||||
background-color: #f9f9d9 ;
|
||||
padding-left: 24px ;
|
||||
padding-right: 24px ;
|
||||
padding-top: 3px ;
|
||||
padding-bottom: 3px ;
|
||||
}
|
||||
|
||||
.examples
|
||||
{
|
||||
font-weight: bolder ;
|
||||
font-size: 98% ;
|
||||
color: #524b3f ;
|
||||
margin-top: 12px ;
|
||||
margin-bottom: 3px ;
|
||||
}
|
||||
|
||||
/* definitions.html */
|
||||
|
||||
table.definitions /* mini-toc is set up as a table */
|
||||
{
|
||||
margin-top: 12px ;
|
||||
text-align: left ;
|
||||
margin-left: 12px ;
|
||||
}
|
||||
th.definitions
|
||||
{
|
||||
padding-bottom: 6px ;
|
||||
font-size: 120% ;
|
||||
color: #000056 ;
|
||||
}
|
||||
dt /* definition terms in italic*/
|
||||
{
|
||||
font-style: italic ;
|
||||
}
|
||||
dt.no-italic
|
||||
{
|
||||
font-style: normal ;
|
||||
}
|
||||
|
||||
/* Tables */
|
||||
table.quick-ref
|
||||
{
|
||||
margin-top: .25em ;
|
||||
}
|
||||
table.quick-ref, th.quick-ref
|
||||
{
|
||||
padding-bottom: .25em ;
|
||||
font-family: "Lucida Console",monospace ;
|
||||
font-weight: bold ;
|
||||
text-align: left ;
|
||||
}
|
||||
|
||||
td
|
||||
{
|
||||
padding: 0 ;
|
||||
padding-left: .5em ;
|
||||
}
|
||||
|
||||
/* Misc */
|
||||
|
||||
span.book-title
|
||||
{
|
||||
font-style: italic ;
|
||||
}
|
||||
|
||||
dt.params
|
||||
{
|
||||
font-style: normal ;
|
||||
font-weight: bold ;
|
||||
}
|
||||
|
||||
dd.cover-args
|
||||
{
|
||||
margin-bottom: .25em;
|
||||
margin-left: 1.25em ;
|
||||
}
|
||||
1272
OGP64/usr/share/doc/groff-1.24.1/html/mom/tables-of-contents.html
Normal file
1272
OGP64/usr/share/doc/groff-1.24.1/html/mom/tables-of-contents.html
Normal file
File diff suppressed because it is too large
Load diff
476
OGP64/usr/share/doc/groff-1.24.1/html/mom/toc.html
Normal file
476
OGP64/usr/share/doc/groff-1.24.1/html/mom/toc.html
Normal file
|
|
@ -0,0 +1,476 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
This file is part of groff, the GNU roff type-setting system.
|
||||
|
||||
Copyright (C) 2004-2023 Free Software Foundation, Inc.
|
||||
Written by Peter Schaffter (peter@schaffter.ca).
|
||||
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.3 or
|
||||
any later version published by the Free Software Foundation; with no
|
||||
Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
|
||||
Texts.
|
||||
|
||||
A copy of the Free Documentation License is included as a file called
|
||||
FDL in the main directory of the groff source package.
|
||||
-->
|
||||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html;charset=utf-8"/>
|
||||
<title>Mom, version 2.6_d -- Table of Contents</title>
|
||||
<link rel="stylesheet" type="text/css" href="stylesheet.css" />
|
||||
</head>
|
||||
|
||||
<body style="background-color: #f5faff;">
|
||||
|
||||
<!-- ==================================================================== -->
|
||||
|
||||
<div class="page">
|
||||
|
||||
<div class="version">
|
||||
mom, version 2.6_d
|
||||
</div>
|
||||
|
||||
<h1 class="toc" style="margin-top: 9px;">Table of Contents</h1>
|
||||
|
||||
<p style="margin-left: 2.75em; margin-right: 2.75em; text-align:center ">
|
||||
The table of contents is large. To ease navigation,
|
||||
click on any link in the
|
||||
<br/>
|
||||
<a href="#quick-toc">Quick Table of Contents</a>
|
||||
<br/>
|
||||
which will take you to the corresponding entry in the
|
||||
<br/>
|
||||
<a href="#detailed-toc">Detailed Table of Contents</a>.
|
||||
<br/>
|
||||
If you’ve been using mom for a while, you may prefer the
|
||||
<br/>
|
||||
<a href="macrolist.html#top">Quick Reference Guide</a>,
|
||||
<br/>
|
||||
which gives a convenient, categorized list of mom’s
|
||||
user-space macros with links to corresponding entries in the
|
||||
documentation.
|
||||
</p>
|
||||
|
||||
<div class="rule-medium"><hr/></div>
|
||||
|
||||
<!-- -QUICK TABLE OF CONTENTS- -->
|
||||
|
||||
<h2 id="quick-toc" class="toc" style="margin-top: 18px; text-align: center;">Quick Table of Contents</h2>
|
||||
|
||||
<div style="width: 50%; margin-top: .75em; margin-left: 12px; float: left;">
|
||||
<h3 id="version-2" class="toc"><a style="color: #6e70cc" href="#v2-notes">VERSION 2.0 NOTES</a></h3>
|
||||
<br/>
|
||||
|
||||
<h3 id="introductory" class="toc"><a style="color: #6e70cc" href="#what">INTRODUCTION TO MOM</a></h3>
|
||||
|
||||
<ul class="toc">
|
||||
<li><a href="#what">What is mom?</a></li>
|
||||
<li><a href="#defs">Definitions of terms used in this manual</a></li>
|
||||
<li><a href="#using">Using mom</a></li>
|
||||
</ul>
|
||||
|
||||
<h3 id="typesetting" class="toc"><a style="color: #6e70cc" href="#typeset">TYPESETTING WITH MOM</a></h3>
|
||||
|
||||
<ul class="toc">
|
||||
<li><a href="#type-intro">Introduction to the typesetting macros</a></li>
|
||||
<li><a href="#page">Page setup</a></li>
|
||||
<li><a href="#param">Basic typesetting parameters</a></li>
|
||||
<li><a href="#just">Justifying, quadding, etc.</a></li>
|
||||
<li><a href="#refine">Refinements</a></li>
|
||||
<li><a href="#mod">Modifying type</a></li>
|
||||
<li><a href="#vert">Vertical movements</a></li>
|
||||
<li><a href="#tab">Tabs</a></li>
|
||||
<li><a href="#col">Multiple columns</a></li>
|
||||
<li><a href="#ind">Indents</a></li>
|
||||
<li><a href="#goodies">Goodies</a></li>
|
||||
<li><a href="#escapes">Inline escapes</a></li>
|
||||
<li><a href="#color">Coloured text</a></li>
|
||||
<li><a href="#graphical">Graphical objects</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div style="margin-left: 332px;">
|
||||
<h3 id="document-processing" class="toc" style="margin-top: 1.25em;"><a style="color: #6e70cc" href="#doc-proc">DOCUMENT PROCESSING WITH MOM</a></h3>
|
||||
|
||||
<ul class="toc" style="margin-left: 3em;">
|
||||
<li><a href="#doc-proc">Introduction to document processing</a></li>
|
||||
<li><a href="#doc-defaults">Document defaults</a></li>
|
||||
<li><a href="#vert-ws">Vertical whitespace management</a></li>
|
||||
<li><a href="#prelim">Preliminary document setup</a></li>
|
||||
<li><a href="#typemacdoc">Behaviour of the typesetting macros during document processing</a></li>
|
||||
<li><a href="#tags">The document element tags</a> – headings, paragraphs, quotes, etc.</li>
|
||||
<li><a href="#images">Graphics, floats, and preprocessor support</a></li>
|
||||
<li><a href="#box">Shaded backgrounds and frames</a></li>
|
||||
<li><a href="#hdrftr">Page headers and footers</a></li>
|
||||
<li><a href="#paginate">Pagination</a></li>
|
||||
<li><a href="#rv">Recto/verso printing and collating</a></li>
|
||||
<li><a href="#cover">Cover pages</a></li>
|
||||
<li><a href="#tocs">Tables of contents</a></li>
|
||||
<li><a href="#ref">Bibliographies and references</a></li>
|
||||
<li><a href="#letter">Writing letters</a>
|
||||
<ul style="list-style-type: none;">
|
||||
<li style="display: inline-block; width: 212px; height: 0; margin-top: .5em; margin-left: -2.5em; border: solid 1px #8d8775;"> </li>
|
||||
</ul></li>
|
||||
<li style="margin-top: -1em;"><a href="#quick">Quick reference guide</a></li>
|
||||
<li><a href="#appendices">Appendices</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="rule-long" style="clear: both;"><hr/></div>
|
||||
|
||||
<!-- -FULL TABLE OF CONTENTS- -->
|
||||
|
||||
<h2 id="detailed-toc" class="toc" style="margin-top: 24px; text-align: center;">Detailed Table of Contents</h2>
|
||||
|
||||
<div style="margin-left: 12px;">
|
||||
<h3 id="v2-notes" class="toc"><a style="color: #6e70cc" href="version-2.html#top">VERSION 2.0 NOTES</a></h3>
|
||||
|
||||
<ul class="toc">
|
||||
<li><a href="version-2.html#prefatory">Prefatory comments</a></li>
|
||||
<li><a href="version-2.html#differences">Differences between 2.0 and 1.x</a>
|
||||
<ul>
|
||||
<li><a href="version-2.html#pdf-support">PDF Support</a></li>
|
||||
<li><a href="version-2.html#covers">Covers</a></li>
|
||||
<li><a href="version-2.html#headings">Headings</a></li>
|
||||
<li><a href="version-2.html#margin-notes">Margin notes</a></li>
|
||||
<li><a href="version-2.html#floats">Floats</a></li>
|
||||
<li><a href="version-2.html#table-of-contents">Table of Contents</a></li>
|
||||
</ul></li>
|
||||
<li><a href="version-2.html#pdfmom">The <strong>pdfmom</strong> wrapper around groff</a></li>
|
||||
<li><a href="version-2.html#install-font">The <strong>install-font</strong> script</a></li>
|
||||
</ul>
|
||||
|
||||
<h3 id="what" class="toc"><a style="color: #6e70cc" href="intro.html#top">1. WHAT IS MOM?</a></h3>
|
||||
|
||||
<ul class="toc">
|
||||
<li><a href="intro.html#intro-intro">1.1 Who is mom meant for?</a></li>
|
||||
<li><a href="intro.html#intro-typesetting">1.2 Typesetting with mom</a></li>
|
||||
<li><a href="intro.html#intro-docprocessing">1.3 Document processing with mom</a></li>
|
||||
<li><a href="intro.html#intro-philosophy">1.4 Mom’s philosophy</a></li>
|
||||
<li><a href="intro.html#intro-documentation">1.5 A note on mom’s documentation</a>
|
||||
<ul>
|
||||
<li><a href="intro.html#canonical">1.5.1 Canonical reference materials</a></li>
|
||||
<li><a href="intro.html#macro-args">1.5.2 How to read macro arguments</a></li>
|
||||
<li><a href="intro.html#toggle-macro">1.5.3 “Toggle” macros</a></li>
|
||||
<li><a href="intro.html#examples">1.5.4 Examples</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3 id="defs" class="toc"><a style="color: #6e70cc" href="definitions.html#top">2. DEFINITIONS OF TERMS USED IN THIS MANUAL</a></h3>
|
||||
|
||||
<ul class="toc">
|
||||
<li><a href="definitions.html#typesetting-terms">2.1 Typesetting terms</a></li>
|
||||
<li><a href="definitions.html#groff-terms">2.2 Groff terms</a></li>
|
||||
<li><a href="definitions.html#mom-terms">2.3 Mom’s document processing terms</a></li>
|
||||
</ul>
|
||||
|
||||
<h3 id="using" class="toc"><a style="color: #6e70cc" href="using.html#top">3. USING MOM</a></h3>
|
||||
|
||||
<ul class="toc">
|
||||
<li><a href="using.html#using-intro">3.1 Introduction</a></li>
|
||||
<li><a href="using.html#using-macros">3.2 How to input mom’s macros</a></li>
|
||||
<li><a href="using.html#viewing">3.3 Processing and viewing documents</a>
|
||||
<ul>
|
||||
<li><a href="using.html#pdf">Mom and pdf</a></li>
|
||||
<li><a href="using.html#pdfmom">pdfmom</a></li>
|
||||
</ul></li>
|
||||
<li><a href="using.html#previewing">3.4 Automatic previewing of documents</a></li>
|
||||
</ul>
|
||||
|
||||
<!-- -TYPESETTING MACROS- -->
|
||||
|
||||
<h3 id="typeset" class="toc"><a style="color: #6e70cc" href="typesetting.html#top">4. TYPESETTING WITH MOM</a></h3>
|
||||
|
||||
<ul class="toc">
|
||||
<li><a id="type-intro" href="typesetting.html#typesetting-intro">4.1 Introduction to the typesetting macros</a></li>
|
||||
<li><a id="page" href="typesetting.html#page-setup-intro">4.2 Page setup</a> – paper size and page margins
|
||||
<ul>
|
||||
<li><a href="typesetting.html#index-page-setup">4.2.1 Macro list</a></li>
|
||||
</ul></li>
|
||||
<li><a id="param" href="typesetting.html#basic-params-intro">4.3 Basic typesetting parameters</a> – family, font, fallback font, point size, line space, line length, autolead
|
||||
<ul>
|
||||
<li><a href="typesetting.html#index-basic">4.3.1 Macro list</a></li>
|
||||
</ul></li>
|
||||
<li><a id="just" href="typesetting.html#justification-intro">4.4 Justifying, quadding, filling and breaking lines</a>
|
||||
<ul>
|
||||
<li><a href="typesetting.html#index-justification">4.4.1 Macro list</a></li>
|
||||
</ul></li>
|
||||
<li><a id="refine" href="typesetting.html#refinements-intro">4.5 Refinements</a> – word space, sentence space, letter spacing (track kerning), hyphenation, kerning, ligatures
|
||||
<ul>
|
||||
<li><a href="typesetting.html#index-refinements">4.5.1 Macro list</a></li>
|
||||
</ul></li>
|
||||
<li><a id="mod" href="typesetting.html#modifications-intro">4.6 Modifying Type</a> – pseudo-italic, -bold, -condensed, and -extended
|
||||
<ul>
|
||||
<li><a href="typesetting.html#index-modifications">4.6.1 Macro list</a></li>
|
||||
</ul></li>
|
||||
<li><a id="vert" href="typesetting.html#aldrld-intro">4.7 Vertical Movements</a> – moving up and down on the page
|
||||
<ul>
|
||||
<li><a href="typesetting.html#index-aldrld">4.7.1 Macro list</a></li>
|
||||
</ul></li>
|
||||
<li><a id="tab" href="typesetting.html#tabs-intro">4.8 Tabs</a>
|
||||
<ul>
|
||||
<li><a href="typesetting.html#typesetting-tabs">4.8.1 Typesetting tabs</a>
|
||||
<ul>
|
||||
<li><a href="typesetting.html#typesetting-tabs-tut">4.8.1.1 Quickie tutorial</a></li>
|
||||
</ul></li>
|
||||
<li><a href="typesetting.html#string-tabs">4.8.2 String tabs (autotabs)</a>
|
||||
<ul>
|
||||
<li><a href="typesetting.html#string-tabs-tut">4.8.2.1 Quickie tutorial</a></li>
|
||||
</ul></li>
|
||||
<li><a href="typesetting.html#index-tabs">4.8.3 Macro list</a></li>
|
||||
</ul></li>
|
||||
<li><a id="col" href="typesetting.html#multicolumns-intro">4.9 Multiple columns</a>
|
||||
<ul>
|
||||
<li><a href="typesetting.html#index-multicolumns">4.9.1 Macro list</a></li>
|
||||
</ul></li>
|
||||
<li><a id="ind" href="typesetting.html#indents-intro">4.10 Indents</a>
|
||||
<ul>
|
||||
<li><a href="typesetting.html#indents-handling">4.10.1 A brief explanation of how mom handles indents</a></li>
|
||||
<li><a href="typesetting.html#index-indents">4.10.2 Macro list</a></li>
|
||||
</ul></li>
|
||||
<li><a id="goodies" href="goodies.html#top">4.11 Goodies</a>
|
||||
– aliases, transparent (comment) lines, smartquotes, caps,
|
||||
underscoring/underlining, padding lines, leaders, drop
|
||||
caps, superscripts, user-definable strings, changing the
|
||||
escape character
|
||||
<ul>
|
||||
<li><a href="goodies.html#index-goodies">4.11.1 Macro list</a></li>
|
||||
</ul></li>
|
||||
<li><a id="escapes" href="inlines.html#top">4.12 Inline Escapes</a>
|
||||
<ul>
|
||||
<li><a href="inlines.html#intro-inlines">4.12.1 Introduction to inline escapes</a></li>
|
||||
<li><a href="inlines.html#index-inlines">4.12.2 List of inline escapes</a></li>
|
||||
<li><a href="inlines.html#inlines-mom-top">4.12.3 Mom’s personal inline escapes</a></li>
|
||||
<li><a href="inlines.html#inlines-groff-top">4.12.4 Commonly-used groff inline escapes</a>
|
||||
<ul>
|
||||
<li><a href="inlines.html#inline-characters-groff">4.12.4.1 Special characters and symbols</a></li>
|
||||
</ul></li>
|
||||
</ul></li>
|
||||
<li><a id="color" href="color.html#top">4.13 Coloured text</a>
|
||||
<ul>
|
||||
<li><a href="color.html#intro-color">4.13.1 Introduction to coloured text</a></li>
|
||||
<li><a href="color.html#index-color">4.13.2 Macro list</a></li>
|
||||
</ul></li>
|
||||
<li><a id="graphical" href="graphical.html#top">4.14 Graphical objects</a>
|
||||
– horizontal and vertical rules, boxes, ellipses (circles)
|
||||
<ul>
|
||||
<li><a href="graphical.html#intro-graphical">4.14.1 Introduction to graphical objects</a></li>
|
||||
<li><a href="graphical.html#index-graphical">4.13.2 Macro list</a></li>
|
||||
</ul></li>
|
||||
</ul>
|
||||
|
||||
<!-- -DOCUMENT PROCESSING MACORS- -->
|
||||
|
||||
<h3 id="doc-proc" class="toc"><a style="color: #6e70cc" href="docprocessing.html#top">5. DOCUMENT PROCESSING WITH MOM</a></h3>
|
||||
<ul class="toc">
|
||||
<li><a href="docprocessing.html#docprocessing-intro">5.1 Introduction to document processing</a></li>
|
||||
<li><a id="doc-defaults" href="docprocessing.html#defaults">5.2 Document defaults</a> – papersize, margins, etc.
|
||||
<ul>
|
||||
<li><a id="vert-ws" href="docprocessing.html#vertical-whitespace-management">5.2.1 Vertical whitespace management</a>
|
||||
<ul>
|
||||
<li><a href="docprocessing.html#shim">5.2.1.1 SHIM</a></li>
|
||||
<li><a href="docprocessing.html#flex">5.2.1.2 FLEX</a></li>
|
||||
</ul></li>
|
||||
</ul></li>
|
||||
<li><a id="prelim" href="docprocessing.html#setup" class="highlight">5.3 PRELIMINARY DOCUMENT SETUP</a>
|
||||
<ul>
|
||||
<li><a href="docprocessing.html#docprocessing-tut">5.3.1 Tutorial</a> – setting up a mom document</li>
|
||||
<li><a href="docprocessing.html#reference-macros">5.3.2 The reference macros</a> – metadata mom needs to do her job
|
||||
<ul>
|
||||
<li><a href="docprocessing.html#title">5.3.2.1 TITLE</a></li>
|
||||
<li><a href="docprocessing.html#doc-title">5.3.2.2 DOCTITLE</a></li>
|
||||
<li><a href="docprocessing.html#subtitle">5.3.2.3 SUBTITLE</a></li>
|
||||
<li><a href="docprocessing.html#author">5.3.2.4 AUTHOR</a></li>
|
||||
<li><a href="docprocessing.html#chapter">5.3.2.5 CHAPTER</a></li>
|
||||
<li><a href="docprocessing.html#chapter-title">5.3.2.6 CHAPTER_TITLE</a></li>
|
||||
<li><a href="docprocessing.html#draft">5.3.2.7 DRAFT</a></li>
|
||||
<li><a href="docprocessing.html#revision">5.3.2.8 REVISION</a></li>
|
||||
<li><a href="docprocessing.html#copyright">5.3.2.9 COPYRIGHT</a></li>
|
||||
<li><a href="docprocessing.html#misc">5.3.2.10 MISC</a></li>
|
||||
<li><a href="docprocessing.html#covertitle">5.3.2.11 COVERTITLE</a></li>
|
||||
<li><a href="docprocessing.html#covertitle">5.3.2.12 DOC_COVERTITLE</a></li>
|
||||
<li><a href="docprocessing.html#pdftitle">5.3.2.13 PDF_TITLE</a></li>
|
||||
<li><a href="docprocessing.html#toc-heading">5.3.2.14 TOC_HEADING</a></li>
|
||||
</ul></li>
|
||||
<li><a href="docprocessing.html#docstyle-macros">5.3.3 The docstyle macros</a> – base templates; what kind of document you’re creating, how you want it to look overall
|
||||
<ul>
|
||||
<li><a href="docprocessing.html#doctype">5.3.3.1 DOCTYPE</a> – the kind of document (default, chapter, named, letter)
|
||||
<ul style="list-style-type: circle">
|
||||
<li><a href="docprocessing.html#slides">DOCTYPE SLIDES</a></li>
|
||||
</ul></li>
|
||||
<li><a href="docprocessing.html#printstyle">5.3.3.2 PRINTSTYLE</a> – typeset or “typewritten, double-spaced”</li>
|
||||
<li><a href="docprocessing.html#copystyle">5.3.3.3 COPYSTYLE</a> – draft or final</li>
|
||||
</ul></li>
|
||||
<li><a href="docprocessing.html#start-macro">5.3.4 Initiate document processing</a>
|
||||
<ul>
|
||||
<li><a href="docprocessing.html#start">5.3.4.1 START</a> – the required macro to initiate document processing</li>
|
||||
</ul></li>
|
||||
<li><a href="docprocessing.html#docheader">5.3.5 Managing the DOCHEADER</a> – title, author, etc. on first page
|
||||
<ul>
|
||||
<li><a href="docprocessing.html#docheader-control">5.3.5.1 DOCHEADER control</a></li>
|
||||
</ul></li>
|
||||
<li><a href="docprocessing.html#columns-intro">5.3.6 Setting documents in columns</a></li>
|
||||
<li><a href="docprocessing.html#style-before-start">5.3.7 Establishing type and formatting parameters <span style="font-style: italic">before</span> START</a>
|
||||
<ul>
|
||||
<li><a href="docprocessing.html#type-before-start">5.3.7.1 Use of the typesetting macros before START</a>
|
||||
<ul class="fourth-level">
|
||||
<li>– <a href="docprocessing.html#include">5.3.7.1.1 Including (sourcing) style sheets and files</a></li>
|
||||
<li>– <a href="docprocessing.html#color">5.3.7.1.2 Initializing colours</a></li>
|
||||
</ul></li>
|
||||
<li><a href="docprocessing.html#doc-lead-adjust">5.3.7.2 DOC_LEAD_ADJUST</a> – adjust document
|
||||
<a href="definitions.html#leading">leading</a>
|
||||
to fill pages</li>
|
||||
</ul></li>
|
||||
<li><a href="docprocessing.html#style-after-start">5.3.8 Changing basic type and formatting parameters <span style="font-style: italic">after</span> START</a></li>
|
||||
<li><ul>
|
||||
<li><a id="typemacdoc" href="docprocessing.html#behaviour">5.3.8.1 Behaviour of the typesetting macros during document processing</a></li>
|
||||
<li><a href="docprocessing.html#intro-doc-param">5.3.8.2 Post-START global style-change macros</a></li>
|
||||
</ul></li>
|
||||
</ul></li>
|
||||
<li><a id="tags" class="highlight" href="docelement.html#top">5.4 THE DOCUMENT ELEMENT TAGS</a>
|
||||
<ul>
|
||||
<li><a href="docelement.html#docelement-intro">5.4.1 Introduction to the document element tags</a>
|
||||
<ul>
|
||||
<li><a href="docelement.html#docelement-control">5.4.1.1 Control macros</a> – changing style defaults for document element tags</li>
|
||||
<li><a href="docelement.html#control-macro-args">5.4.1.2 Arguments to the control macros</a></li>
|
||||
</ul></li>
|
||||
<li><a href="docelement.html#epigraph-intro">5.4.2 Epigraphs</a></li>
|
||||
<li><a href="docelement.html#pp-intro">5.4.3 Paragraphs</a></li>
|
||||
<li><a href="docelement.html#heading-intro">5.4.4 Headings</a></li>
|
||||
<li><a href="docelement.html#linebreak-intro">5.4.5 Linebreaks</a> – author linebreaks (section breaks)</li>
|
||||
<li><a href="docelement.html#quote-intro">5.4.6 Quotes</a> – line for line poetic quotes or unformatted, verbatim text (e.g. blocks of code)</li>
|
||||
<li><a href="docelement.html#blockquote-intro">5.4.7 Blockquotes</a> – cited material</li>
|
||||
<li><a href="docelement.html#code">5.4.8 Code</a> – inserting code snippets</li>
|
||||
<li><a href="docelement.html#list-intro">5.4.9 Lists</a> – nested lists</li>
|
||||
<li><a href="docelement.html#number-lines-intro">5.4.10 Line numbering</a></li>
|
||||
<li><a href="docelement.html#footnote-intro">5.4.11 Footnotes</a></li>
|
||||
<li><a href="docelement.html#endnote-intro">5.4.12 Endnotes</a></li>
|
||||
<li><a href="docelement.html#margin-notes-intro">5.4.13 Margin notes</a></li>
|
||||
<li><a href="docelement.html#finis-intro">5.4.14 Document termination string</a> – FINIS</li>
|
||||
</ul></li>
|
||||
<li><a id="images" class="highlight" href="images.html#top">5.5 GRAPHICS, FLOATS, AND PREPROCESSOR SUPPORT</a>
|
||||
<ul>
|
||||
<li><a href="images.html#images-intro">5.5.1 Inserting images and graphics</a></li>
|
||||
<li><a href="images.html#converting">5.5.2 Image conversion and file processing</a></li>
|
||||
<li><a href="images.html#pdf-image">5.5.3 PDF_IMAGE</a>
|
||||
<ul>
|
||||
<li><a href="images.html#pdf-image-frame">5.5.3.1 PDF_IMAGE_FRAME</a></li>
|
||||
</ul></li>
|
||||
<li><a href="images.html#pspic">5.5.4 PSPIC</a></li>
|
||||
<li><a href="images.html#floats-intro">5.5.5 Floats</a>
|
||||
<ul>
|
||||
<li><a href="images.html#float">5.5.5.1 FLOAT</a></li>
|
||||
</ul></li>
|
||||
<li><a href="images.html#preprocessor-support">5.5.6 Preprocessor support</a>
|
||||
<ul>
|
||||
<li><a href="images.html#tbl">5.5.6.1 tbl support</a></li>
|
||||
<li><a href="images.html#eqn">5.5.6.2 eqn support</a></li>
|
||||
<li><a href="images.html#pic">5.5.6.3 pic support</a></li>
|
||||
<ul style="list-style-type: disc">
|
||||
<li><a href="images.html#pic-text-style">5.5.6.3.1 PIC_TEXT_STYLE</a></li>
|
||||
</ul></li>
|
||||
<li><a href="images.html#grap">5.5.6.4 grap support</a>
|
||||
<li><a href="images.html#refer">5.5.6.4 refer support</a></li>
|
||||
</ul></li>
|
||||
<li><a href="images.html#captions-and-labels">5.5.7 Captions and labels</a>
|
||||
<ul>
|
||||
<li><a href="images.html#autolabel">5.5.7.1 AUTOLABEL</a></li>
|
||||
<li><a href="images.html#caption-after-label">5.5.7.2 CAPTION_AFTER_LABEL</a></li>
|
||||
<li><a href="images.html#captions-labels-sources">5.5.7.3 CAPTIONS / LABELS / SOURCES—set style parameters</a></li>
|
||||
<li><a href="images.html#mla">5.5.7.4 MLA</a></li>
|
||||
</ul></li>
|
||||
<li><a href="images.html#lists-of">5.5.8 Lists of Figures, Tables, and Equations</a>
|
||||
<ul>
|
||||
<li><a href="images.html#lists-placement">5.5.8.1 Placement of Lists</a></li>
|
||||
<li><a href="images.html#lists-macros">5.5.8.2 Macros to generate Lists</a></li>
|
||||
<li><a href="images.html#formatting-lists">5.5.8.3 Formatting and style parameters for Lists</a>
|
||||
<ul>
|
||||
<li><a href="#lists-style">5.5.8.3.1 LISTS_STYLE</a></li>
|
||||
</ul></li>
|
||||
</ul></li>
|
||||
</ul></li>
|
||||
<li><a id="box" class="highlight" href="headfootpage.html#top">5.6 SHADED BACKGROUNDS AND FRAMES</a>
|
||||
<ul>
|
||||
<li><a href="images.html#box-intro">5.6.1 Introduction</a></li>
|
||||
<li><a href="images.html#box-macro">5.6.2 The BOX macro</a></li>
|
||||
<li><a href="images.html#box-notes">5.6.3 Additional notes on BOX usage and behaviour</a></li>
|
||||
<li><a href="images.html#page-color">5.6.4 PAGE_COLOR</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a id="hdrftr" class="highlight" href="headfootpage.html#top">5.7 PAGE HEADERS AND FOOTERS</a>
|
||||
<ul>
|
||||
<li><a href="headfootpage.html#headfootpage-intro">5.7.1 Introduction</a></li>
|
||||
<li><a href="headfootpage.html#description-general">5.7.2 General description of headers/footers</a></li>
|
||||
<li><a href="headfootpage.html#header-style">5.7.3 Default specs for headers/footers</a></li>
|
||||
<li><a href="headfootpage.html#vertical-spacing">5.7.4 Vertical placement and spacing of headers/footers</a></li>
|
||||
<li><a href="headfootpage.html#headfoot-management">5.7.5 Managing page headers and footers</a></li>
|
||||
<li><a href="headfootpage.html#headfoot-control">5.7.6 Control macros for headers/footers</a></li>
|
||||
<li><a href="headfootpage.html#userdef-hdrftr-rv">5.7.7 User-defined, single string recto/verso headers/footers</a>
|
||||
<ul>
|
||||
<li><a href="headfootpage.html#userdef-hdrftr">5.7.7.1 User-defined, single string headers/footers (no recto/verso)</a></li>
|
||||
</ul></li>
|
||||
<li><a href="headfootpage.html#headers-and-footers-intro">5.7.8 Headers and footers on the same page</a></li>
|
||||
</ul></li>
|
||||
<li><a id="paginate" class="highlight" href="headfootpage.html#pagination-intro">5.8 PAGINATION</a>
|
||||
<ul>
|
||||
<li><a href="headfootpage.html#pagination">5.8.1 Introduction</a></li>
|
||||
<li><a href="headfootpage.html#index-pagination">5.8.2 Pagination macros list</a></li>
|
||||
<li><a href="headfootpage.html#blank-pages">5.8.3 Blank pages</a></li>
|
||||
</ul></li>
|
||||
<li><a id="rv" class="highlight" href="rectoverso.html#top">5.9 RECTO/VERSO PRINTING, COLLATING</a>
|
||||
<ul>
|
||||
<li><a href="rectoverso.html#rectoverso-intro">5.9.1 Introduction to recto/verso printing</a>
|
||||
<ul>
|
||||
<li><a href="rectoverso.html#rectoverso-list">5.9.1.1 Macro list</a></li>
|
||||
</ul></li>
|
||||
<li><a href="rectoverso.html#collate-intro">5.9.2 Introduction to collating</a>
|
||||
<ul>
|
||||
<li><a href="rectoverso.html#collate">5.9.2.1 The COLLATE macro</a></li>
|
||||
</ul></li>
|
||||
</ul></li>
|
||||
<li><a id="cover" class="highlight" href="cover.html#top">5.10 COVER PAGES</a></li>
|
||||
<li><a id="tocs" class="highlight" href="tables-of-contents.html#top">5.11 TABLES OF CONTENTS</a>
|
||||
<ul>
|
||||
<li><a href="tables-of-contents.html#toc-intro">5.11.1 Introduction</a> – the TOC macro</li>
|
||||
<li><a href="tables-of-contents.html#toc-appearance">5.11.2 Table of contents appearance and behaviour</a></li>
|
||||
<li><a href="tables-of-contents.html#pdf-output">5.11.3 PDF output</a></li>
|
||||
<li><a href="tables-of-contents.html#positioning">5.11.4 Positioning the table of contents</a>
|
||||
<ul>
|
||||
<li><a href="tables-of-contents.html#auto-relocate-toc">5.11.2 Automatic PDF relocation of the Table of Contents</a></li>
|
||||
<li><a href="tables-of-contents.html#psselect">5.11.2 Using psselect to relocate the TOC in PostScript documents</a></li>
|
||||
</ul></li>
|
||||
<li><a href="tables-of-contents.html#index-toc-control">5.11.5 Table of contents control macros</a></li>
|
||||
</ul></li>
|
||||
<li><a id="ref" class="highlight" href="refer.html#top">5.12 BIBLIOGRAPHIES AND REFERENCES</a></li>
|
||||
<li><a id="letter" class="highlight" href="letters.html#top">5.13 WRITING LETTERS</a>
|
||||
<ul>
|
||||
<li><a href="letters.html#letters-intro">5.13.1 Introduction to writing letters</a></li>
|
||||
<li><a href="letters.html#letters-tutorial">5.13.2 Tutorial on writing letters</a></li>
|
||||
<li><a href="letters.html#letters-defaults">5.13.3 Default letter style</a></li>
|
||||
<li><a href="letters.html#index-letters-macros">5.13.4 The letter macros</a></li>
|
||||
</ul></li>
|
||||
</ul>
|
||||
<h3 id="quick" class="toc highlight"><a style="color: #6e70cc" href="macrolist.html#top">6. QUICK REFERENCE GUIDE</a></h3>
|
||||
<h3 id="appendices" class="toc" style="margin-top: .5em;"><a style="color: #6e70cc" href="appendices.html#top">7. APPENDICES</a></h3>
|
||||
<ul class="toc">
|
||||
<li><a href="appendices.html#fonts">7.1 Adding fonts to groff</a>
|
||||
<ul>
|
||||
<li><a href="appendices.html#steps">7.1.1 Step-by-step instructions</a></li>
|
||||
</ul></li>
|
||||
<li><a href="appendices.html#codenotes">7.2 Some reflections on mom</a></li>
|
||||
<li><a href="reserved.html">7.3 List of reserved words (macros, registers, strings)</a></li>
|
||||
<li><a href="appendices.html#contact">7.4 Contact the author</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="bottom-spacer"><br/></div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
4971
OGP64/usr/share/doc/groff-1.24.1/html/mom/typesetting.html
Normal file
4971
OGP64/usr/share/doc/groff-1.24.1/html/mom/typesetting.html
Normal file
File diff suppressed because it is too large
Load diff
319
OGP64/usr/share/doc/groff-1.24.1/html/mom/using.html
Normal file
319
OGP64/usr/share/doc/groff-1.24.1/html/mom/using.html
Normal file
|
|
@ -0,0 +1,319 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
This file is part of groff, the GNU roff type-setting system.
|
||||
|
||||
Copyright (C) 2004-2020 Free Software Foundation, Inc.
|
||||
Written by Peter Schaffter (peter@schaffter.ca).
|
||||
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.3 or
|
||||
any later version published by the Free Software Foundation; with no
|
||||
Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
|
||||
Texts.
|
||||
|
||||
A copy of the Free Documentation License is included as a file called
|
||||
FDL in the main directory of the groff source package.
|
||||
-->
|
||||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html;charset=utf-8"/>
|
||||
<title>Using mom</title>
|
||||
<link rel="stylesheet" type="text/css" href="stylesheet.css" />
|
||||
</head>
|
||||
|
||||
<body style="background-color: #f5faff;">
|
||||
|
||||
<!-- ==================================================================== -->
|
||||
|
||||
<div id="top" class="page">
|
||||
|
||||
<!-- Navigation links -->
|
||||
<table style="width: 100%;">
|
||||
<tr>
|
||||
<td><a href="toc.html">Back to Table of Contents</a></td>
|
||||
<td style="text-align: right;"><a href="typesetting.html#top">Next: The typesetting macros</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h1 id="using" class="docs">Using mom</h1>
|
||||
|
||||
<div style="text-align: left; margin-left: 33%">
|
||||
<ul class="no-enumerator" style="margin-left: -2.5em;">
|
||||
<li><a href="#using-intro">Introduction</a></li>
|
||||
<li><a href="#using-macros">How to input mom’s macros</a></li>
|
||||
<li><a href="#viewing">Processing and viewing documents</a>
|
||||
<ul>
|
||||
<li class="item"><a href="#pdf">Mom and PDF</a></li>
|
||||
<li class="item"><a href="#pdfmom">pdfmom</a></li>
|
||||
</ul></li>
|
||||
<li><a href="#previewing">Automatic previewing of documents</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="rule-short" style="margin-top: 18px;"><hr/></div>
|
||||
|
||||
<h2 id="using-intro" class="docs">Introduction</h2>
|
||||
|
||||
<p>
|
||||
As explained in the section
|
||||
<a href="intro.html#top">What is mom?</a>,
|
||||
mom can be used in two ways: for straightforward typesetting or for
|
||||
document processing. The difference between the two is that in
|
||||
straightforward typesetting, every macro is a literal instruction
|
||||
that determines precisely how text following it will look. Document
|
||||
processing, on the other hand, uses markup tags (e.g. <kbd>.PP</kbd>
|
||||
for paragraphs, <kbd>.HEADING</kbd> for different levels of heads,
|
||||
<kbd>.FOOTNOTE</kbd> for footnotes, etc.) that perform typesetting
|
||||
operations automatically.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
You tell mom that you want to use the document processing macros
|
||||
with the
|
||||
<a href="docprocessing.html#start">START</a>
|
||||
macro. After START, mom determines the appearance of
|
||||
text following the markup tags automatically, although you, the
|
||||
user, can easily change how the tags are interpreted.
|
||||
</p>
|
||||
|
||||
<h2 id="using-macros" class="docs">How to input mom’s macros</h2>
|
||||
|
||||
<p>
|
||||
Regardless of whether you’re preparing a term paper or making a
|
||||
flyer for your lost dog, the following apply.
|
||||
</p>
|
||||
|
||||
<ol style="margin-top: -.5em; margin-bottom: -.5em;">
|
||||
<li>
|
||||
You need a good text editor for inputting mom files.
|
||||
<br/>
|
||||
<span style="display: block; margin-top: .25em; margin-bottom: .5em;">
|
||||
I cannot recommend highly enough that you use an editor that
|
||||
lets you write syntax highlighting rules for mom’s
|
||||
macros and
|
||||
<a href="definitions.html#inlines">inline escapes</a>.
|
||||
Simply colourizing macros and inlines to half-intensity can be
|
||||
enough to make text stand out clearly from formatting commands.
|
||||
Mom herself comes with a complete set of syntax highlighting
|
||||
rules for the vim editor. A number of freely available editors
|
||||
come with groff syntax highlighting rules, which are sufficient
|
||||
for mom files, though not as colourful or complete as the vim
|
||||
rules that ship with mom.
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
Macros begin with a period (dot) at the left margin of your text
|
||||
editor’s screen, and must be entered in upper case (capital)
|
||||
letters.
|
||||
</li>
|
||||
<li>
|
||||
Macro
|
||||
<a href="definitions.html#arguments">arguments</a>
|
||||
are separated from the macro itself by spaces. Multiple
|
||||
arguments to the same macro are separated from each
|
||||
other by spaces. Any number of spaces may be used.
|
||||
</li>
|
||||
<li>
|
||||
Arguments to a macro must appear on the same line as the
|
||||
macro.
|
||||
<br/>
|
||||
<span style="display: block; margin-top: .25em; margin-bottom: .5em;">
|
||||
If the argument list is very long, you may use the
|
||||
backslash character (<kbd>\</kbd>) to break the line visually.
|
||||
From groff’s point of view, the backslash and newline are
|
||||
invisible. Thus, for example,
|
||||
<span class="pre" style="margin-bottom: -2.25em">
|
||||
.HEADING_STYLE 1 FAMILY Garamond FONT B SIZE +2
|
||||
</span>
|
||||
and
|
||||
<span class="pre" style="margin-bottom: -2.25em">
|
||||
.HEADING_STYLE 1 \
|
||||
FAMILY Garamond \
|
||||
FONT B \
|
||||
SIZE +2
|
||||
</span>
|
||||
</span>
|
||||
are exactly equivalent.
|
||||
</li>
|
||||
<li>
|
||||
Any argument (except a
|
||||
<a href="definitions.html#stringargument">string argument</a>)
|
||||
that is not a digit must be entered in upper case
|
||||
(capital) letters.
|
||||
</li>
|
||||
<li>
|
||||
Any argument that requires a plus or minus sign must
|
||||
have the plus or minus sign prepended to the argument
|
||||
with no intervening space (e.g. <kbd>+2</kbd>).
|
||||
</li>
|
||||
<li>
|
||||
Any argument that requires a
|
||||
<a href="definitions.html#unitofmeasure">unit of measure</a>
|
||||
must have the unit appended directly to the argument, with no
|
||||
intervening space (e.g. <kbd>.5i</kbd>).
|
||||
</li>
|
||||
<li>
|
||||
<a href="definitions.html#stringargument">String arguments</a>,
|
||||
in the sense of this manual, must be surrounded by double-quotes
|
||||
(e.g. <kbd>"text"</kbd>). Multiple
|
||||
string arguments are separated from each other by spaces (with
|
||||
each argument surrounded by double-quotes).
|
||||
<br/>
|
||||
<span style="display: block; margin-top: .25em; margin-bottom: .5em;">
|
||||
If a string argument becomes
|
||||
uncomfortably long, you may break it into two or more lines
|
||||
with the backslash character.
|
||||
<span class="pre">
|
||||
.SUBTITLE "An In-Depth Consideration of the \
|
||||
Implications of Forty-Two as the Answer to Life, \
|
||||
The Universe, and Everything"
|
||||
</span>
|
||||
</span>
|
||||
</li>
|
||||
</ol>
|
||||
|
||||
<div class="box-tip">
|
||||
<p class="tip">
|
||||
<span class="tip">Tip:</span>
|
||||
It’s important that your documents be easy to read and
|
||||
understand in a text editor. One way to achieve this is to group
|
||||
macros that serve a similar purpose together, and separate them from
|
||||
other groups of macros with a comment line. In groff, that’s
|
||||
done with <kbd>\#</kbd> (backslash-pound) or <kbd>.\"</kbd>
|
||||
(period-backslash-doublequote) on a line by itself. Either
|
||||
instructs groff to ignore the remainder of the line, which may or
|
||||
may not contain text. Consider the following, which is a template
|
||||
for starting the chapter of a book.
|
||||
<br/>
|
||||
<span class="pre-in-pp">
|
||||
\# Reference/meta-data
|
||||
.TITLE "My Pulitzer Novel"
|
||||
.AUTHOR "Joe Blow"
|
||||
.CHAPTER 1
|
||||
\# Template
|
||||
.DOCTYPE CHAPTER
|
||||
.PRINTSTYLE TYPESET
|
||||
\# Type style
|
||||
.FAM P
|
||||
.PT_SIZE 10
|
||||
.LS 12
|
||||
\#
|
||||
.START
|
||||
</span>
|
||||
You may also, if you wish, add a comment to the end of a line with
|
||||
<kbd>\"</kbd> (no period), like this:
|
||||
<br/>
|
||||
<span class="pre-in-pp">
|
||||
.FAMILY P \" Maybe Garamond instead?
|
||||
</span>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<h2 id="viewing" class="docs">Processing and viewing documents</h2>
|
||||
|
||||
<p>
|
||||
The most basic command-line usage for processing a file formatted
|
||||
with the mom macros is
|
||||
<br/>
|
||||
<span class="pre-in-pp">
|
||||
groff -mom filename.mom > filename.ps
|
||||
</span>
|
||||
which processes the .mom file and dumps the output into a
|
||||
viewable/printable PostScript file.
|
||||
</p>
|
||||
|
||||
<h3 id="pdf" class="docs">Mom and PDF</h3>
|
||||
|
||||
<p>
|
||||
Adobe’s Portable Document Format (PDF) has largely supplanted
|
||||
PostScript, of which it is a subset, as the standard for typeset
|
||||
documents. While printed versions of documents in either format
|
||||
will be identical, PDF documents, when viewed at the screen, may
|
||||
also contain clickable links and a number of other special features.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
As of version 2.0, mom supports full PDF integration. The creation
|
||||
and processing of mom files into PostScript documents remains
|
||||
unchanged from 1.x, but the expected and recommended format of final
|
||||
documents is now PDF.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The manual,
|
||||
<a href="http://www.schaffter.ca/mom/pdf/mom-pdf.pdf"><span class="book-title">Producing PDFs with groff and mom</span></a>,
|
||||
explains and demonstrates the PDF-specific macros that are available
|
||||
in mom, as well as the use of <strong>pdfmom</strong>, the
|
||||
recommended way to process mom files.
|
||||
</p>
|
||||
|
||||
<h4 id="pdfmom" class="docs">pdfmom</h4>
|
||||
|
||||
<p>
|
||||
Groff provides more than one way to generate PDF documents,
|
||||
but when processing files formatted with the mom macros,
|
||||
<strong>pdfmom</strong> is the recommended and most robust way to do
|
||||
it:
|
||||
<br/>
|
||||
<span class="pre-in-pp">
|
||||
pdfmom filename.mom > filename.pdf
|
||||
</span>
|
||||
<strong>pdfmom</strong> is a wrapper around groff, and accepts all
|
||||
groff’s command-line options as listed in the groff manpage.
|
||||
Full usage is explained in the manual,
|
||||
<a href="http://www.schaffter.ca/mom/pdf/mom-pdf.pdf"><span class="book-title">Producing PDFs with groff and mom</span></a>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
PDF links in a document, including linked entries in the
|
||||
Table of Contents, are identified by colour. When printing
|
||||
documents with links, you will most likely not want the link
|
||||
text coloured. The groff option, <kbd>-c</kbd>, disables colour
|
||||
throughout a document; thus, when preparing a document for printing,
|
||||
you should use:
|
||||
<br/>
|
||||
<span class="pre-in-pp">
|
||||
pdfmom -c filename.mom > filename.pdf
|
||||
</span>
|
||||
<strong>pdfmom</strong> tends to produce large files. You may
|
||||
reduce their size by piping them through ps2pdf:
|
||||
<br/>
|
||||
<span class="pre-in-pp">
|
||||
pdfmom -c filename.mom | ps2pdf - filename.pdf
|
||||
</span>
|
||||
Be aware, though, that files piped through ps2pdf will lose some pdf
|
||||
metadata, notably the document window title set with PDF_TITLE.
|
||||
</p>
|
||||
|
||||
<h2 id="previewing" class="docs">Automatic previewing of documents</h2>
|
||||
|
||||
<p>
|
||||
Most PDF viewers have a “Watch File” option, which
|
||||
automatically updates a displayed document whenever there’s
|
||||
a change. This is useful when preparing documents that require
|
||||
judgment calls. I recommend creating a keymapping in your
|
||||
text editor that both saves the mom file and processes it with
|
||||
<strong>pdfmom</strong>. The displayed PDF then automatically
|
||||
reflects whatever changes you save to the mom file.
|
||||
</p>
|
||||
|
||||
<div class="rule-long"><hr/></div>
|
||||
|
||||
<!-- Navigation links -->
|
||||
<table style="width: 100%; margin-top: 12px;">
|
||||
<tr>
|
||||
<td style="width: 33%;"><a href="toc.html">Back to Table of Contents</a></td>
|
||||
<td style="width: 33%; text-align: center;"><a href="#top">Top</a></td>
|
||||
<td style="width: 33%; text-align: right;"><a href="typesetting.html#top">Next: The typesetting macros</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="bottom-spacer"><br/></div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
434
OGP64/usr/share/doc/groff-1.24.1/html/mom/version-2.html
Normal file
434
OGP64/usr/share/doc/groff-1.24.1/html/mom/version-2.html
Normal file
|
|
@ -0,0 +1,434 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
This file is part of groff, the GNU roff type-setting system.
|
||||
|
||||
Copyright (C) 2004-2020 Free Software Foundation, Inc.
|
||||
Written by Peter Schaffter (peter@schaffter.ca).
|
||||
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.3 or
|
||||
any later version published by the Free Software Foundation; with no
|
||||
Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
|
||||
Texts.
|
||||
|
||||
A copy of the Free Documentation License is included as a file called
|
||||
FDL in the main directory of the groff source package.
|
||||
-->
|
||||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html;charset=utf-8"/>
|
||||
<title>Mom -- Version 2.0 notes</title>
|
||||
<link rel="stylesheet" type="text/css" href="stylesheet.css" />
|
||||
</head>
|
||||
|
||||
<body style="background-color: #f5faff;">
|
||||
|
||||
<!-- ==================================================================== -->
|
||||
|
||||
<div id="top" class="page">
|
||||
|
||||
<!-- Navigation links -->
|
||||
<table style="width: 100%;">
|
||||
<tr>
|
||||
<td><a href="toc.html">Back to Table of Contents</a></td>
|
||||
<td style="text-align: right;"><a href="intro.html#top">Next: Introduction to mom</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h1 class="docs">Version 2.0 notes</h1>
|
||||
|
||||
<div style="width: 70%; margin: auto;">
|
||||
<ol style="margin-left: -1em;">
|
||||
<li><a href="#prefatory">Prefatory comments</a></li>
|
||||
<li><a href="#differences">Differences between 2.0 and 1.x</a>
|
||||
<ul class="no-enumerator" style="padding-left: 0">
|
||||
<li><a href="#pdf-support">2.1 PDF support</a>
|
||||
<ul class="no-enumerator" style="padding-left: 1em">
|
||||
<li><a href="#mom-pdf">2.1.1 The manual, <span class="book-title">Producing PDFs with groff and mom</span></a></li>
|
||||
<li><a href="#pdf-image">2.1.2 PDF_IMAGE</a></li>
|
||||
</ul></li>
|
||||
<li><a href="#covers">2.2 Covers</a></li>
|
||||
<li><a href="#headings">2.3 Headings</a></li>
|
||||
<li><a href="#margin-notes">2.4 Margin notes</a></li>
|
||||
<li><a href="#floats">2.5 Floats</a></li>
|
||||
<li><a href="#table-of-contents">2.5 Tables of contents</a></li>
|
||||
</ul></li>
|
||||
<li><a href="#v2.1-changes">Version 2.1 changes</a></li>
|
||||
<li><a href="#v2.2-changes">Version 2.2 changes</a></li>
|
||||
<li><a href="#v2.5-changes">Version 2.5 changes</a></li>
|
||||
<li><a href="#pdfmom">The <strong>pdfmom</strong> wrapper around groff</a></li>
|
||||
<li><a href="#install-font">The <strong>install-font.sh</strong> script</a></li>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
<div class="rule-medium"><hr/></div>
|
||||
|
||||
<h2 id="prefatory" class="docs">1. Prefatory comments</h2>
|
||||
|
||||
<p>
|
||||
Version 2.0 comes about as a result of Deri James’
|
||||
contribution of <strong>gropdf</strong> to <strong>groff</strong>,
|
||||
and his subsequent work integrating the device with
|
||||
<strong>mom</strong>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Whereas the 1.x releases were oriented toward PostScript output,
|
||||
2.0 focuses on PDF output, a bias reflected throughout this
|
||||
documentation. Users are strongly encouraged to process their files
|
||||
with
|
||||
<a href="#pdfmom"><strong>pdfmom</strong></a>,
|
||||
a wrapper around <strong>groff -Tpdf</strong>, in order to take
|
||||
full advantage of all PDF has to offer.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
While portions of mom have been rewritten, and new features
|
||||
introduced, 2.0 is backwardly compatible with 1.x releases. Changes
|
||||
are either transparent, or accompanied by notifications on stderr.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The implementation of nested heads has been completely rethought,
|
||||
as has the manner of styling of them. There are no limits on
|
||||
how deep the nesting can go. The 1.x macros <kbd>HEAD</kbd>,
|
||||
<kbd>SUBHEAD</kbd>, and <kbd>SUBSUBHEAD</kbd> may still be used, but
|
||||
must be re-designed with the new <kbd>HEADING_STYLE</kbd> macro
|
||||
if their 1.x defaults are not desired.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
In conjunction with the changes to nested heads, Table of Contents
|
||||
generation has also been rethought. Greater flexibility in the
|
||||
inclusion of toc entry numbering been added. Like nested heads,
|
||||
there’s a new macro <kbd>TOC_ENTRY_STYLE</kbd> that permits
|
||||
styling of each level in the toc hierarchy separately. The default
|
||||
overall layout has also been significantly improved, achieving a
|
||||
level of typographical elegance formerly lacking. Best of all, the
|
||||
Table of Contents can now be repositioned to the correct spot at the
|
||||
top of a document from within the mom source file.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
When mom files are processed with <strong>pdfmom</strong>, a PDF
|
||||
outline for the Contents panel of PDF viewers is automatically
|
||||
generated. In addition, entries in the Table of Contents
|
||||
are clickable links when a document is viewed at the screen.
|
||||
<strong>pdfmom</strong> also permits setting a document’s
|
||||
papersize within the source file without the corresponding need for
|
||||
<kbd>-P-p<papersize></kbd> on the command line.
|
||||
</p>
|
||||
|
||||
<h3 id="install-font" class="docs">The install-font.sh script</h3>
|
||||
|
||||
<p>
|
||||
Lastly, while not strictly part of mom, a bash script,
|
||||
<strong>install-font.sh</strong>, has been posted at the
|
||||
<a href="https://www.schaffter.ca/mom/">mom site</a>.
|
||||
The script significantly eases the installation of new
|
||||
groff families and fonts, with conversion to .pfa
|
||||
and .t42 being performed by <strong>fontforge</strong>.
|
||||
</p>
|
||||
|
||||
<h2 id="differences" class="docs">2. Differences between v2.0 and v1.x</h2>
|
||||
|
||||
<h3 id="pdf-support" class="docs">2.1. PDF support</h3>
|
||||
|
||||
<p>
|
||||
PDF support has been added, with features including the automatic
|
||||
generation of PDF outlines, embedding of images in PDF format (via
|
||||
the
|
||||
<a href="images.html#pdf-image">PDF_IMAGE</a>
|
||||
macro) and PDF linking (internal and external).
|
||||
</p>
|
||||
|
||||
<h4 id="mom-pdf" class="docs">2.1.1. Producing PDFs with groff and mom</h4>
|
||||
|
||||
<p>
|
||||
A manual in PDF format,
|
||||
<span class="book-title">Producing PDFs with groff and mom</span>,
|
||||
has been added to the documentation. The file,
|
||||
<strong>mom-pdf.pdf</strong> can be found in
|
||||
<br/>
|
||||
<span class="pre-in-pp">
|
||||
/usr/local/share/doc/groff-<version>/pdf/
|
||||
</span>
|
||||
or
|
||||
<br/>
|
||||
<span class="pre-in-pp">
|
||||
/usr/share/doc/groff-base/pdf/
|
||||
</span>
|
||||
or at
|
||||
<br/>
|
||||
<span class="pre-in-pp">
|
||||
<a href="http://www.schaffter.ca/mom/momdoc/mom-pdf.pdf">http://www.schaffter.ca/mom/momdoc/mom-pdf.pdf</a>
|
||||
</span>
|
||||
PDF usage, and all associated macros except
|
||||
<a href="#pdf-image">PDF_IMAGE</a>,
|
||||
are fully explained in the manual, which should be considered an
|
||||
integral part of the present documentation. In addition, the mom
|
||||
source file for the manual can be found in
|
||||
<br/>
|
||||
<span class="pre-in-pp">
|
||||
/usr/local/share/doc/groff-<version>/examples/mom
|
||||
</span>
|
||||
or
|
||||
<br/>
|
||||
<span class="pre-in-pp">
|
||||
/usr/share/doc/groff-base/examples/mom/
|
||||
</span>
|
||||
and provides an excellent demonstration of mom usage.
|
||||
</p>
|
||||
|
||||
<h4 id="pdf-image" class="docs">2.1.2. PDF_IMAGE</h4>
|
||||
|
||||
<p>
|
||||
A new macro for embedding PDF images has been added,
|
||||
<a href="images.html#pdf-image">PDF_IMAGE</a>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
PDF_IMAGE functions similarly to PSPIC and accepts the same
|
||||
arguments. Differences in implementation are that PDF_IMAGE
|
||||
requires the image dimensions (the bounding box) to be supplied.
|
||||
Instructions for getting the bounding box are included in the
|
||||
documentation entry for PDF_IMAGE. Two additional options,
|
||||
<kbd>SCALE</kbd> and <kbd>ADJUST</kbd>, allow scaling of the image
|
||||
and optical centering.
|
||||
</p>
|
||||
|
||||
<h3 id="covers" class="docs">2.2. Covers</h3>
|
||||
|
||||
<p>
|
||||
Arguments to
|
||||
<a href="cover.html#cover">COVER</a>
|
||||
and
|
||||
<a href="cover.html#doc-cover">DOC_COVER</a>
|
||||
may now be given in any order.
|
||||
</p>
|
||||
|
||||
<h3 id="headings" class="docs">2.3. Headings</h3>
|
||||
|
||||
<p>
|
||||
The 1.x macros HEAD, SUBHEAD, SUBSUBHEAD, are now deprecated and
|
||||
have been replaced by the single macro
|
||||
<a href="docelement.html#heading">HEADING <kbd><n></kbd></a>,
|
||||
where <kbd><n></kbd> is the heading level. The deprecated
|
||||
macros may still be used, and conform in style to their original
|
||||
defaults; they are, however, wrappers around HEADING levels 1
|
||||
– 3. Both the wrappers and HEADING itself can take a
|
||||
<kbd>NAMED <id></kbd> argument, specifying a PDF link
|
||||
destination.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Styling of headings is managed by the single macro <a
|
||||
href="docelement.html#heading">HEADING_STYLE <n></a> where
|
||||
<kbd><n></kbd> conforms to a heading level. The control
|
||||
macros for HEAD, SUBHEAD and SUBSUBHEAD have been removed. Users
|
||||
wishing to style the wrappers must use HEADING_STYLE.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
PARAHEAD is no longer valid. Paragraph heads in 2.0 are created
|
||||
by passing the <kbd>PARAHEAD</kbd> argument to HEADING. Mom
|
||||
will abort with an informational message whenever she encounters
|
||||
<kbd>.PARAHEAD</kbd>.
|
||||
</p>
|
||||
|
||||
<h3 id="margin-notes" class="docs">2.4. Margin notes</h3>
|
||||
|
||||
<p>
|
||||
The macro for setting margin note parameters,
|
||||
<a href="docelement.html#mn-init">MN_INIT</a>,
|
||||
has been re-written such that each parameter now has the form
|
||||
<kbd><PARAMETER> <value></kbd>. This differs
|
||||
from 1.x where parameters were entered without a preceding
|
||||
<kbd><PARAMETER></kbd> flag. Parameters may be entered in any
|
||||
order. Any that are skipped are set to default values. Documents
|
||||
created with 1.x will have to have their <kbd>MN_INIT</kbd> updated
|
||||
accordingly.
|
||||
</p>
|
||||
|
||||
<h3 id="floats" class="docs">2.5. Floats</h3>
|
||||
|
||||
<p>
|
||||
A
|
||||
<a href="images.html#floats-intro">FLOAT</a>
|
||||
macro has been added, which functions similarly to the <kbd>ms</kbd>
|
||||
macros’ <kbd>.KF/.KE</kbd>, i.e., the contents of the float are
|
||||
output immediately if there’s room on the page, otherwise
|
||||
normal text processing continues and the contents are output at the
|
||||
top of the next page. An <kbd>ADJUST</kbd> argument to FLOAT allows
|
||||
for optical centering.
|
||||
</p>
|
||||
|
||||
<h3 id="table-of-contents" class="docs">2.6. Tables of contents</h3>
|
||||
|
||||
<p>
|
||||
The default look of the Table of Contents has been overhauled to
|
||||
produce a more typographically pleasing result. All control macros
|
||||
for TOC title and entry styles have been removed, replaced by
|
||||
<a href="tables-of-contents.html#toc-title-style">TOC_TITLE_STYLE</a>
|
||||
and
|
||||
<a href="tables-of-contents.html#toc-title-style">TOC_ENTRY_STYLE <kbd><n></kbd></a>
|
||||
where <kbd><n></kbd> corresponds to a heading level. Both
|
||||
macros permit setting any or all of the style parameters for TOC
|
||||
titles (i.e. chapters or major sections/divisions of a collated
|
||||
document) and TOC entries (nested heading levels) at once.
|
||||
Documents created with 1.x that contain TOCs will need to have their
|
||||
TOC style updated if the new defaults are unsatisfactory.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Two new TOC control macros have been added,
|
||||
<a href="tables-of-contents.html#space-toc-items">SPACE_TOC_ITEMS</a>
|
||||
and
|
||||
<a href="tables-of-contents.html#auto-relocate-toc">AUTO_RELOCATE_TOC</a>.
|
||||
SPACE_TOC_ITEMS groups TOC entry levels and separates them with a
|
||||
discrete amount of whitespace. This leads to improved legibility,
|
||||
and is highly recommended even though it is not mom’s
|
||||
default. AUTO_RELOCATE_TOC intelligently repositions the Table
|
||||
of Contents to the top of a document when the mom source file is
|
||||
processed with
|
||||
<a href="pdfmom">pdfmom</a>.
|
||||
</p>
|
||||
|
||||
<h2 id="v2.1-changes" class="docs">3. Version 2.1 changes</h2>
|
||||
<p> Version 2.1 adds these features: </p> <ul style="margin-top: -.5em; width: 90%">
|
||||
<li>expansion of cover, docheader, page header, and heading
|
||||
control macros to permit caps, smallcaps, color, and
|
||||
underscoring</li>
|
||||
<li>the ability to style every element appearing in docheaders and
|
||||
automatically-generated cover/title pages separately</li>
|
||||
<li>macros to place images on cover/title pages</li>
|
||||
<li>a new macro COVERTEXT that allows adding text (e.g. an
|
||||
Abstract) to automatically-generated cover/title pages or to
|
||||
create cover/title pages entirely by hand</li>
|
||||
<li>separate indent control macros for QUOTES and BLOCKQUOTES</li>
|
||||
<li>pseudo-smallcaps, including a control macro to choose the
|
||||
size, weight, and width of the small caps</li>
|
||||
<li>new <element>_STYLE macros that allow setting
|
||||
parameters for <element> with a single macro using
|
||||
keyword/value pairs</li>
|
||||
</ul>
|
||||
|
||||
<p>
|
||||
The following changes have been made:
|
||||
</p>
|
||||
|
||||
<ul style="margin-top: -.5em; width: 90%">
|
||||
<li>MISC_AUTOLEAD (including COVER_MISC_AUTOLEAD and
|
||||
DOC_COVER_MISC_AUTOLEAD) has been replaced in favour of MISC_LEAD,
|
||||
which takes an absolute leading value rather than one derived
|
||||
from the point size.</li>
|
||||
<li>COVER_UNDERLINE and DOC_COVER_UNDERLINE have been
|
||||
removed in favour of COVER_DOCTYPE_UNDERLINE and
|
||||
DOC_COVER_DOCTYPE_UNDERLINE.</li>
|
||||
<li>DOCTYPE NAMED <kbd><string></kbd> no longer accepts a
|
||||
<kbd>color</kbd> argument; setting the colour for
|
||||
<kbd><string></kbd> is accomplished with DOCTYPE_COLOR
|
||||
<kbd><color></kbd>. In addition, the string now has a
|
||||
complete set of control macros.</li>
|
||||
<li>Default underscoring of the DOCTYPE NAMED string has been
|
||||
removed, both in the docheader and on cover/title pages.</li>
|
||||
<li>No cover/title page data persists, however formatting for the
|
||||
elements on them does.</li>
|
||||
</ul>
|
||||
|
||||
<h2 id="v2.2-changes" class="docs">4. Version 2.2 changes</h2>
|
||||
|
||||
<p>
|
||||
Version 2.2 adds these features:
|
||||
</p>
|
||||
<ul style="margin-top: -.5em; width: 90%">
|
||||
<li>flex-spacing, an alternative to mom’s default shimming
|
||||
policy; flex-spacing balances vertical whitespace on the page by
|
||||
distributing any excess equally at sensible points so that running
|
||||
text always fills the page to the bottom margin (see
|
||||
<a href="docprocessing.html#vertical-whitespace-management">
|
||||
vertical whitespace management</a>)
|
||||
</li>
|
||||
<li>improvements to auto-labelling, such that it is now possible
|
||||
to link symbolically to auto-labelled preprocessor material and
|
||||
PDF images (note that you must be running groff 1.22.4 or higher
|
||||
for this feature)
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h2 id="v2.5-changes" class="docs">5. Version 2.5 changes</h2>
|
||||
|
||||
<p>
|
||||
Version 2.5 adds shaded backgrounds and frames that span pages
|
||||
appropriately when necessary, and a macro to set page or slide
|
||||
background colour.
|
||||
</p>
|
||||
|
||||
<h2 id="v2.6-changes" class="docs">6. Version 2.6 changes</h2>
|
||||
|
||||
<p>
|
||||
Version 2.6 improves Table of Contents handling so that entries may
|
||||
span multiple lines. PDF outline page numbers now map correctly to
|
||||
printed page numbers.
|
||||
</p>
|
||||
|
||||
<h2 id="pdfmom" class="docs">6. pdfmom</h2>
|
||||
|
||||
<p>
|
||||
Deri James has provided <strong>pdfmom</strong>, a wrapper around
|
||||
groff that processes mom source files with all the PDF bells and
|
||||
whistles. Its use is highly recommended. Usage is explained in the
|
||||
manual,
|
||||
<a href="http://www.schaffter.ca/mom/pdf/mom-pdf.pdf">
|
||||
<span class="book-title">Producing PDFs with groff and mom</span>
|
||||
</a>.
|
||||
A significant convenience of pdfmom is that it can, with the
|
||||
<kbd>-Tps</kbd> flag, be used to pass processing over to Keith
|
||||
Marshall’s <strong>pdfroff</strong>. This is useful when
|
||||
processing files that contain PostScript images embedded with
|
||||
<a href="images.html#pspic">PSPIC</a>.
|
||||
pdfmom, without the flag, uses groff’s PDF device
|
||||
(<strong>gropdf</strong>), which only recognizes PDF images that
|
||||
have been embedded with
|
||||
<a href="images.html#pdf-image">PDF_IMAGE</a>.
|
||||
</p>
|
||||
|
||||
<h2 id="install-font" class="docs">7. install-font.sh</h2>
|
||||
|
||||
<p>
|
||||
A bash script, <strong>install-font.sh</strong>, has been posted at the
|
||||
<a href="http://www.schaffter.ca/mom/mom-01.html">mom site</a>.
|
||||
There’s nothing mom-specific about the script, and it is not
|
||||
an official part of groff.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Installing groff fonts is a multi-step procedure, which, while not
|
||||
difficult, can be a nuisance. install-font.sh takes
|
||||
care of all the details, including converting fonts to formats
|
||||
acceptable to <strong>grops</strong> and <strong>gropdf</strong>,
|
||||
creating and installing the groff fonts in the appropriate
|
||||
directories, updating the download files, and installing the
|
||||
original fonts in a system-wide directory, if desired.
|
||||
</p>
|
||||
|
||||
<div class="rule-long"><hr/></div>
|
||||
|
||||
<!-- Navigation links -->
|
||||
<table style="width: 100%; margin-top: 12px;">
|
||||
<tr>
|
||||
<td style="width: 33%;"><a href="toc.html">Back to Table of Contents</a></td>
|
||||
<td style="width: 20%; text-align: center;"><a href="#top">Top</a></td>
|
||||
<td style="width: 46%; text-align: right;"><a href="intro.html">Next: Introduction to mom</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="bottom-spacer"><br/></div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Add table
Add a link
Reference in a new issue