goodies.html#TOP
Next
definitions.html#TOP
Prev
toc.html
Back to Table of Contents
THE TYPESETTING MACROS
#INTRO_MACROS_TYPESETTING
Introduction to the typesetting macros
PAGE SETUP
#INTRO_SETUP
Introduction to Page Setup
#INDEX_SETUP
List of macros
BASIC TYPESETTING PARAMETERS
#INTRO_BASIC_PARAMS
Introduction to Basic Parameters
#INDEX_BASIC
List of macros
JUSTIFYING, QUADDING, FILLING, BREAKING LINES
#INTRO_JUST_QUAD_FILL
Introduction to justify, quad, fill, break
#INDEX_JUST
List of macros
TYPOGRAPHIC REFINEMENTS
#INTRO_REFINEMENTS
Introduction to typographic refinements
#INDEX_REFINEMENTS
List of macros
TYPE MODIFICATIONS -- pseudo italic, bold, condense, extend
#INTRO_MODIFICATIONS
Introduction to type modifications
#INDEX_MODIFICATIONS
List of macros
VERTICAL MOVEMENTS
#INTRO_ALDRLD
Introduction to vertical movements
#INDEX_ALDRLD
List of macros
TABS
#INTRO_TABS
Introduction to tabs
#TYPESETTING_TABS
Typesetting tabs
#TYPESETTING_TABS_TUT
Quickie tutorial
#STRING_TABS
String tabs
#STRING_TABS_TUT
Quickie tutorial
#INDEX_TABS
List of macros
MULTI-COLUMNS
#INTRO_MULTI_COLUMNS
Introduction to multi-columns
#INDEX_MULTI_COLUMNS
List of macros
INDENTS
#INTRO_INDENTS
Introduction to indents
#INDEX_INDENTS
List of macros
GOODIES
goodies.html#GOODIES
Introduction to goodies
goodies.html#INDEX_GOODIES
List of macros
INLINE ESCAPES
inlines.html#INLINE_ESCAPES_INTRO
Introduction to inline escapes
inlines.html#INDEX_INLINES
List of inline escapes
Introduction to the typesetting macros
Mom
's typesetting macros provide access to
groff's typesetting capabilities.  Aside from controlling basic
type parameters (family, font, line length, point size, leading),
mom
's macros fine-tune wordspacing, letterspacing,
kerning, hyphenation, and so on.  In addition,
mom
has true typesetting tabs, string tabs, multiple indent styles,
line padding, and a batch of other goodies.
In some cases,
mom
's typesetting macros merely imitate
groff primitives.  In others, they approach typesetting concerns in
conceptually new ways (for groff, at least).  This should present no
problem for newcomers to groff who are learning
mom
.
Old groff hands should be careful.  Just because it looks like a
duck and walks like a duck does not, in this instance, mean that it
is a duck.  When using
mom
, stay away from groff
primitives if
mom
provides a macro that accomplishes
the same thing.
Mom
's typesetting macros can be used as a standalone
package, independent of the
docprocessing.html#DOCPROCESSING
document processing macros
.
With them, you can typeset on-the-fly.  Document covers, your best
friend's r?sum?, a poster for a lost dog -- none of these requires
structured document processing (page headers, paragraphs, heads,
footnotes, etc).  What they do demand is precise control over every
element on the page.  The typesetting macros give you that control.
Page setup: paper size and page margins
The page setup macros establish the physical dimensions of your
page and the margins you want it to have.
Groff
has defaults for these, but I recommend setting them at the top
of your files anyway unless you're using
mom
's
docprocessing.html#DOCPROCESSING
document processing macros
and are content with her defaults.
The
#PAPER
PAPER
macro provides a shortcut for setting the page to the correct dimensions
for a number of well-known, established paper sizes.  The
#PAGE
PAGE
macro provides a convenient way of setting the page dimensions and
some or all of the page margins with a single macro.
Page setup macros list
#PAGEWIDTH
PAGEWIDTH
(page width)
#PAGELENGTH
PAGELENGTH
(page length)
#PAPER
PAPER
(common paper sizes)
#L_MARGIN
L_MARGIN
(left margin)
#R_MARGIN
R_MARGIN
(right margin)
#T_MARGIN
T_MARGIN
(top margin)
#B_MARGIN
B_MARGIN
(bottom margin)
#PAGE
PAGE
(page dimensions and margins all in one fell swoop)
#NEWPAGE
NEWPAGE
(start a new page)
Page width
Macro:
PAGEWIDTH
<width of printer sheet>
*Requires a
definitions.html#TERMS_UNITOFMEASURE
unit of measure
The argument to
PAGEWIDTH
is the width of your
printer sheet.
PAGEWIDTH
requires a unit of measure.
Decimal fractions are allowed.  Hence, to tell
mom
the width of your printer sheet is 8-1/2 inches, you enter
.PAGEWIDTH 8.5i
Page length
Macro:
PAGELENGTH
<length of printer sheet>
*Requires a
definitions.html#TERMS_UNITOFMEASURE
unit of measure
PAGELENGTH
tells
mom
how long your
printer sheet is.  It works just like
PAGEWIDTH
.  Therefore, to tell
mom
your printer sheet is 11 inches long, you
enter
.PAGELENGTH 11i
Paper
Macro:
PAPER
<paper type>
PAPER
provides a convenient way to set the page
dimensions for some common printer sheet sizes.
<paper
type>
can be one of:
LETTER
LEGAL
STATEMENT
TABLOID
LEDGER
FOLIO
QUARTO
10x14
EXECUTIVE
A3
A4
A5
B4
B5
Say, for example, you have A4-sized sheets in your printer.
It's shorter (and easier) to enter
.PAPER A4
than to remember the correct dimensions and enter
.PAGEWIDTH  595p
.PAGELENGTH 842p
Left margin
Macro:
L_MARGIN
<left margin>
*Requires a
definitions.html#TERMS_UNITOFMEASURE
unit of measure
L_MARGIN
establishes the distance from the left edge
of the printer sheet at which you want your type to start.  It may
be used any time, and remains in effect until you enter a new value.
#IL
Left indents
and
#TABS
tabs
are calculated from the value you pass to
L_MARGIN
,
hence it's always a good idea to invoke it before starting any serious
typesetting.  A unit of measure is required.  Decimal fractions are
allowed.  Therefore, to set the left margin at 3 picas (1/2 inch),
you'd enter either
.L_MARGIN 3P
or
.L_MARGIN .5i
If you use the macros
#PAGE
PAGE
,
#PAGEWIDTH
PAGEWIDTH
or
#PAPER
PAPER
without invoking
L_MARGIN
(either before
or afterwards),
mom
automatically sets
L_MARGIN
to 1 inch.
NOTE:
L_MARGIN behaves in a special way when you're
using the
docprocessing.html#DOCPROCESSING
document processing macros
.
See
typemacdoc.html#TYPESETTING
Typesetting Macros in Document Processing
for an explanation.
Right margin
Macro:
R_MARGIN
<right margin>
*Requires a
definitions.html#TERMS_UNITOFMEASURE
unit of measure
R_MARGIN
establishes the amount of space you
want between the end of typeset lines and the right hand edge
of the printer sheet.  In other words, it sets the line length.
R_MARGIN
requires a unit of measure.  Decimal
fractions are allowed.
The
#LINELENGTH
line length macro
(
LL
) can
be used in place of
R_MARGIN
.  In either case, the
last one invoked sets the line length.  The choice of which to use is
up to you.  In some instances, you may find it easier to think of a
section of type as having a right margin.  In others, giving a line
length may make more sense.
For example, if you're setting a page of type you know should have
6-pica margins left and right, it makes sense to enter a left and
right margin, like this:
.L_MARGIN 6P
.R_MARGIN 6P
That way, you don't have to worry about calculating the line
length.  On the other hand, if you know the line length for a
patch of type should be 17 picas and 3 points, entering the line
length with
LL
is much easier than calculating the
right margin.
.LL 17P+3p
If you use the macros
#PAGE
PAGE
,
#PAGEWIDTH
PAGEWIDTH
or
#PAPER
PAPER
without invoking
R_MARGIN
afterwards,
mom
automatically sets
R_MARGIN
to 1 inch.  If you set a line length after these macros (with
#LINELENGTH
LL
),
the line length calculated by
R_MARGIN
is, of course,
overridden.
IMPORTANT: R_MARGIN
, if used, MUST come after
#PAPER
PAPER
,
#PAGEWIDTH
PAGEWIDTH
,
#L_MARGIN
L_MARGIN
and/or
#PAGE
PAGE
(if a right margin isn't given to
PAGE
).
The reason is that
R_MARGIN
calculates line
length from the overall page dimensions and the left margin.
Obviously, it can't make the calculation if it doesn't know the page
width and the left margin.
NOTE: R_MARGIN
behaves in a special way
when you're using the
docprocessing.html#DOCPROCESSING
document processing macros
.
See
typemacdoc.html#TYPESETTING
Typesetting Macros in Document Processing
for an explanation.
Top margin
Macro:
T_MARGIN
<top margin>
*Requires a
definitions.html#TERMS_UNITOFMEASURE
unit of measure
T_MARGIN
establishes the distance from the top of
the printer sheet at which you want your type to start.  It requires
a unit of measure, and decimal fractions are allowed.  To set a top
margin of 2-1/2 centimeters, you'd enter
.T_MARGIN 2.5c
T_MARGIN
calculates the vertical position of the
first line of type on a page by treating the top edge of the printer
sheet as a
definitions.html#TERMS_BASELINE
baseline
.  Therefore,
.T_MARGIN 1.5i
puts the baseline of the first line of type 1-1/2 inches beneath
the top of the page.
IMPORTANT:
T_MARGIN
does two
things: it establishes the top margin for pages that come after
it AND it moves to that position on the current page.  Therefore,
T_MARGIN
should only be used at the top of a file
(prior to entering text) or after
#NEWPAGE
NEWPAGE
,
like this:
.NEWPAGE
.T_MARGIN 6P
<text>
NOTE:
T_MARGIN
means something
slightly different when you're using the
docprocessing.html#DOCPROCESSING
document processing macros
.
See
typemacdoc.html#TB_MARGINS
Top and bottom margins in document processing
for an explanation.
Bottom margin
Macro:
B_MARGIN
<bottom margin>
*Requires a
definitions.html#TERMS_UNITOFMEASURE
unit of measure
B_MARGIN
sets a nominal position at the bottom
of the page beyond which you don't want your type to go.  When the
bottom margin is reached,
mom
starts a new page.
B_MARGIN
requires a unit of measure.  Decimal
fractions are allowed.  To set a nominal bottom margin of 3/4 inch,
enter
.B_MARGIN .75i
Obviously, if you haven't spaced the type on your pages so that
the last lines fall perfectly at the bottom margin, the margin will
vary from page to page.  Usually, but not always, the last line of
type that fits on a page
before
the bottom margin causes
mom
to start a new page.
Occasionally, owing to a peculiarity in
groff
,
an extra line will fall below the nominal bottom margin.  If you're
using the
docprocessing.html#DOCPROCESSING
document processing macros
,
this is unlikely to happen; the document processing macros are very
hard-nosed about aligning bottom margins.
NOTE:
The meaning of
B_MARGIN
is
slightly different when you're using the document processing macros.
See
typemacdoc.html#TB_MARGINS
Top and bottom margins in document processing
for an explanation.
Page
Macro:
PAGE
<width> [ <length> [ <lm> [ <rm> [ <tm> [ <bm> ] ] ] ] ]
*All arguments require a
definitions.html#TERMS_UNITOFMEASURE
unit of measure
PAGE
lets you establish paper dimensions and page
margins with a single macro.  The only required argument is page width.
The rest are optional,
but they must appear in order and you can't
skip over any.
<lm>, <rm>, <tm>
and
<bm>
refer to the left, right, top and bottom
margins respectively.
Assuming your page dimensions are 11 inches by 17 inches, and that's
all you want to set, enter
.PAGE 11i 17i
If you want to set the left margin as well, say, at 1 inch,
PAGE
would look like this:
.PAGE 11i 17i 1i
Now suppose you also want to set the top margin, say, at 1-1/2
inches.
<tm>
comes after
<rm>
in the optional arguments, but you can't skip over any arguments,
therefore to set the top margin, you must also give a right margin.
The
PAGE
macro would look like this:
.PAGE 11i 17i 1i 1i 1.5i
|   |
required right___|   |___top margin
margin
Clearly,
PAGE
is best used when you want a convenient
way to tell
mom
just the dimensions of your printer
sheet (width and length), or when you want to tell her everything
about the page (dimensions and all the margins), for example
.PAGE 8.5i 11i 45p 45p 45p 45p
This sets up an 8-1/2 by 11 inch page with margins of 45 points
(5/8-inch) all around.
NOTE:
Only use
PAGE
at the
start of a document, before entering any text.  And remember,
when you're using the
docprocessing.html#DOCPROCESSING
document processing macros
,
top margin and bottom margin mean something slightly different than
when you're  using just the typesetting macros (see
typemacdoc.html#TB_MARGINS
Top and bottom margins in document processing
).
Additionally, if you invoke
PAGE
with a top margin
argument, any macros you invoke after
PAGE
will
almost certainly move the
definitions.html#TERMS_BASELINE
baseline
of the first line of text down by one linespace.  To compensate, do
.RLD 1v
immediately before entering any text, or, if it's feasible, make
PAGE
the last macro you invoke prior to entering text.
Start a new page
Macro:
NEWPAGE
Whenever you want to start a new page, use
NEWPAGE
, by
itself with no argument.
Mom
will finish up
processing the current page and move you to the top of a new one
(subject to the top margin set with
#T_MARGIN
T_MARGIN
.
Experts:
NEWPAGE
is an alias of
.bp
.  You can use either, or mix 'n' match with
impunity.
Basic Typesetting Parameters
Basic parameter macros deal with the fundamental requirements
for setting type: family, font, point size, leading and line length.
If you're using the typesetting macros only, the arguments passed
to the basic parameter macros remain in effect until you change them.
The document processing macros handle things differently.  See
typemacdoc.html#TYPESETTING
Typesetting Macros in Document Processing
for an explanation.
Basic parameter macros list
#FAMILY
FAMILY
(type family)
#FONT
FONT
(font)
#PS
PT_SIZE
(point size of type)
#LEADING
LS
(line spacing/leading)
#AUTOLEAD
AUTOLEAD
(automatic line spacing)
#LINELENGTH
LL
(line length)
Type family
Macro:
FAMILY
<family>
Alias:
FAM
FAMILY
takes one argument: the name of the type family
you want.  Groff comes with a number of PostScript families, each
identified by a 1-, 2- or 3-letter mnemonic.  The standard families
are:
A
Avant Garde
BM
Bookman
H
Helvetica
N
New Century Schoolbook
P
Palatino
T
Times Roman
The argument you pass to
FAMILY
is the identifier at
left above.  For example, if you want Helvetica, enter
.FAMILY H
NOTE:
The
#FONT
font macro
(
FT
) lets you to specify both the type family
and the desired font with a single macro.  While this saves a few
keystrokes, I recommend using
FAMILY
for family,
and
FT
for font, except where doing so is genuinely
inconvenient.
Experts:
If you add other PostScript families to groff's /font/devps directory,
be sure to follow the groff standard for naming families and fonts.
For example, if you add the Garamond family, name the font files
GARAMONDR
GARAMONDI
GARAMONDB
GARAMONDBI
GARAMOND then becomes a legal family name you can pass to
FAMILY
.  (You could, of course, shorten GARAMOND to just
G, or GD.)  R, I, B, and BI after GARAMOND are the roman, italic,
bold and bold-italic fonts respectively.
Font
Macro:
FT
R | I | B | BI
FT
takes one of four possible arguments specifying the
desired font:
R
=
roman
I
=
italic
B
=
bold
BI
=
bold-italic
For example, if your family is Helvetica, entering
.FT B
will give you the Helvetica bold font.  If your family were
Palatino, you'd get the Palatino bold font.
You can specify both family and font in the
FT
macro.
As an example,
.FT HB
sets the font to Helvetica bold.  I strongly recommend keeping
family and font separate.
Fonts can also be changed inline.  See
inlines.html#INLINE_FONTS_MOM
Inline Escapes, font control
.
Point size of type
Macro:
PT_SIZE
<size of type in points>
*Does not require a
definitions.html#TERMS_UNITOFMEASURE
unit of measure
PT_SIZE
(Point Size) takes one argument: the size of type
in points.  Unlike most other macros that establish the size or measure
of something,
PT_SIZE
does not require that you supply a
unit of measure since it's a near universal convention that type size
is measured in points.  Therefore, to change the type size to, say,
11 points, enter
.PT_SIZE 11
Point sizes may be fractional (e.g.  10.25 or 12.5).
You can prepend a plus or a minus sign to the argument to
PT_SIZE
, in which case the point size will be changed by +
or - the original value.  For example, if the point size is 12,
and you want 14, you can do
.PT_SIZE +2
then later reset it to 12 with
.PT_SIZE -2
The size of type can also be changed inline.  See
inlines.html#INLINE_SIZE_MOM
Inline Escapes, changing point size
.
Line spacing/leading
Macro:
LS
<distance between lines>
*Does not require a
definitions.html#TERMS_UNITOFMEASURE
unit of measure
LS
(Line Space) takes one argument: the distance you want, typically
in points, from baseline to baseline of type.  The argument may
be fractional (e.g. 12.25 or 14.5).  Like
PT_SIZE
,
LS
does not require a unit of measure, since
definitions.html#TERMS_LEADING
leading
is most often given in points.  Therefore, to set the linespace to
14 points, you would enter
.LS 14
However, if you wish, you may specify a unit of measure by appending
it directly to the argument passed to
LS
.  For example,
if you want a linespace of 1/4 of an inch, enter
.LS .25i
You can prepend a plus or a minus sign to the argument to
LS
, in which case the line spacing will be changed
by + or - the original value.  For example, if the line spacing is
14 points, and you want 17 points, you can do
.LS +3
then later reset it to 14 points with
.LS -3
Experts:
LS
should not be confused with the groff primitive
ls
.
LS
acts like
vs
.
mom
does not provide a macro analogous to
ls
.
Automatic line spacing
Macro:
AUTOLEAD
<amount of automatic leading> [FACTOR]
*Does not require a
definitions.html#TERMS_UNITOFMEASURE
unit of measure
Without the
FACTOR
argument,
AUTOLEAD
calculates the linespace for you by adding its argument to the
current point size of type. All subsequent
PT_SIZE
requests automatically update the linespacing by the autolead amount.
Used in this way,
AUTOLEAD
does not require a unit
of measure; points is assumed.  However, you may use an alternate
unit of measure by appending it to the argument.  The argument may
be a decimal fraction (e.g. .5 or 2.75).
As an example, if your current point size of type is 12, entering
.AUTOLEAD 2
changes the linespace to 14 points, regardless any linespacing
already in effect.  From here on, every change to the size of type
(with
PT_SIZE
, not
definitions.html#TERMS_INLINES
inline
)
changes the linespace as well.  If you decrease the type size to 9
points, the leading decreases to 11 points.  If you increase the type
size to 16 points, the leading increases to 18 points.
Automatic updating of the linespacing continues until you enter a
"manual" line space value with
LS
.
If you give
AUTOLEAD
the optional
FACTOR
argument,
AUTOLEAD
calculates the line space as a factor of the
definitions.html#TERMS_NUMERICARGUMENT
numeric argument
you gave
AUTOLEAD
.  For example, if your point
size is 12,
.AUTOLEAD 1.125 FACTOR
sets the leading at 13.5 points.  If you change the point size
to 14, the leading automatically changes to 15.75 (14 x 1.125).
NOTE:
There's no need to prepend a plus sign (+)
to
AUTOLEAD
's argument, although you may do so if you
wish.
Line length
Macro:
LL
<line length>
*Requires a
definitions.html#TERMS_UNITOFMEASURE
unit of measure
LL
(Line Length) takes one argument: the distance from the
left margin of the page to the maximum allowable point on the
right at which groff should place type.  The line length, in
other words, as the macro suggests.
LL
requires a unit of measure.  Therefore, to set the line
length to 39 picas, you would enter
.LL 39P
As with other macros that require a unit of measure, the argument to
LL
may be fractional.  For example,
.LL 4.5i
sets the line length to 4-1/2 inches.
NOTE:
The
#R_MARGIN
right margin
macro
(
R_MARGIN
) can also be used to set line
length.
Justifying, quadding, filling and breaking lines
The justification and quadding macros deal with how type aligns along
the left and right margins.  In a nutshell, type either aligns at the
left margin, at the right margin, at both margins, or at neither margin
(centered).
These macros also determine whether or not
definitions.html#TERMS_INPUTLINE
input lines
are joined and
definitions.html#TERMS_FILLED
filled
during output.
Additionally, macros that deal with how to break
definitions.html#TERMS_OUTPUTLINE
output lines
are covered in this
section, as is the
definitions.html#TERMS_INLINES
inline escape
for joining output lines.
You may encounter some words here that are unfamiliar.  Refer to
definitions.html#TERMS_TYPESETTING
Typesetting terms
and
definitions.html#TERMS_GROFF
Groff terms
for an explanation.
Justification, quad, fill, and break macro list
Fill modes
#JUSTIFY
JUSTIFY
(set lines justified)
#QUAD
QUAD
(set filled lines flush left, right or centered)
Nofill modes
#LRC
LEFT
(set non-filled lines flush left)
#LRC
RIGHT
(set non-filled lines flush right)
#LRC
CENTER
(set non-filled lines centered)
Breaking lines
#BR
BR
(manually break an output line)
#EL
EL
(break a line without advancing to the next output line)
#SPACE
SPACE
(break a line and add space before the next output line)
#SPREAD
SPREAD
(break and force-justify an output line)
Joining lines
#JOIN
\c
inline escape
Justify lines
Macro:
JUSTIFY
definitions.html#TERMS_FILLED
Fill mode
JUSTIFY
doesn't take an argument.
definitions.html#TERMS_INPUTLINE
Input lines
after
JUSTIFY
are
definitions.html#TERMS_FILLED
filled
and
definitions.html#TERMS_JUST
justified
upon output.
To break lines and prevent them from being filled and justified,
use the
#BR
BR
macro.
Quad lines left, right, or center
Macro:
QUAD
L | LEFT | R | RIGHT | C | CENTER | J | JUSTIFY
Alias:
FILL
definitions.html#TERMS_FILLED
Fill mode
QUAD
takes one argument: the direction in which lines
should be
definitions.html#TERMS_QUAD
quadded
.
definitions.html#TERMS_INPUTLINE
Input lines
after
QUAD
are
definitions.html#TERMS_FILLED
filled
upon output.
If
L
or
LEFT
, type is set flush
along the left margin.
If
R
or
RIGHT
, type is
set flush along the right margin.
If
C
or
CENTER
type is set centered
on the current line length.
J
and
JUSTIFY
justify text,
and are included as a convenience only.  Obviously, if text is
justified, it isn't quadded.
QUAD J
and
QUAD JUSTIFY
have exactly the same effect as
#JUSTIFY
JUSTIFY
.
To break lines and prevent them from being filled, use the
#BR
BR
macro.
Set non-filled lines flush left, right, or centered
Macro:
LEFT
Macro:
RIGHT
Macro:
CENTER
(alias
CENTRE
)
definitions.html#TERMS_NOFILL
Nofill mode
LEFT
,
RIGHT
and
CENTER
let you enter text on a line for line basis
without having to use the
#BR
BR
macro after each line.
Consider the following:
.QUAD LEFT
So runs my dream, but what am I?
.BR
An infant crying in the night
.BR
An infant crying for the light
.BR
And with no language but a cry.
.BR
Because text after
QUAD
is
definitions.html#TERMS_FILLED
filled
, you have to use the
#BR
BR
macro to prevent the lines from running together.  Not only is this
annoying to type, it's awkward to read in a text editor.  Much better
to do
.LEFT
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.
IMPORTANT:
Because
LEFT
,
RIGHT
and
CENTER
are nofill
modes, groff does not always respect the current line length.
definitions.html#TERMS_INPUTLINE
Input lines
that run long may exceed it, or get broken in undesirable ways.
Therefore, when using these three macros, you should preview your
work to ensure that all lines fit as expected.
Manually break lines
Macro:
BR
When using
JUSTIFY
or
QUAD
,
BR
tells
mom
about partial lines
that you want broken (as opposed to
definitions.html#TERMS_FILLED
filled
).
Any partial
definitions.html#TERMS_OUTPUTLINE
output line
that immediately precedes
BR
will be
definitions.html#TERMS_QUAD
quadded
in the direction of the current quad, or set flush left if text is
definitions.html#TERMS_JUST
justified
.
Most of the time, you won't need the
BR
macro.
In fill modes,
mom
tries to be sensible about
where breaks are needed.  If the nature of a macro is such that under
most circumstances you'd expect a break,
mom
puts
it in herself.  Equally, in macros where a break isn't normally
desirable, no break occurs.  This means text files don't get cluttered
with annoying
BR
's.
NOTE:
Lines of text in
definitions.html#TERMS_NOFILL
nofill mode
never require a
BR
.  Furthermore, in nofill mode,
ALL macros cause a break.  If a break is not desired, use the
#JOIN
\c
definitions.html#TERMS_INLINES
inline escape
.
Experts: BR
is an alias for
br
.
You can use either, or mix 'n' match with impunity.
Manually break a line without advancing on the page
Macro:
EL
The mnemonic "EL" is borrowed from old Compugraphic typesetting
systems, where it stood for "End Line."  Conceptually,
EL
is equivalent to the notion of a carriage return
with no linefeed.
Every once in a while, the need arises for breaking a line without
advancing on the page.  Imagine, for example, that you're working from
marked-up copy.  The markup indicates 24 points of space between
two given lines, but the prevailing line spacing is 12.5 points.
You may find it more convenient to break the first line with
EL
and instruct
mom
to advance 24
points to the next line, rather than calculating the lead that needs
to be added to 12.5 to get 24.  To demonstrate:
.LS 12.5
A line of text.
.EL
.ALD 24p
The next line of text.
may be more instuitive than
.LS 12.5
A line of text.
.ALD 11.5p
The next line of text.
The first example has the further advantage that should you wish
to change the prevailing line space but keep the 24 points lead,
you don't have to recalculate the extra space.
"ALD" in the above examples stands for "
A
dvance
L
ea
D
" (another mnemonic borrowed
from Compugraphic), which is covered in the section
#ALDRLD
Vertical movement
.
IMPORTANT:
EL
does not work as advertised on the last
output line
of pages that contain a footer trap (e.g. one set with
#B_MARGIN
B_MARGIN
or in  documents formatted using the
docprocessing.html#DOCPROCESSING
document processing macros
).
The reason is that the
EL
macro itself deposits
a line break that trips the trap (hey, I like that --
"trips the trap"), and once the trap has been sprung,
mom
can't recover.  She places the line after
the
EL
on the next page.
If you need
EL
functionality on the last line of
a page with a footer trap, turn the trap off with
goodies.html#TRAP
TRAP
,
as in this example:
3.
.TRAP OFF
.EL
.TRAP
\*[FP12]Establish, once and for all, if 42 really is the answer.
The above looks something like this upon output:
3.  Establish, once and for all, if 42 really is the answer.
with "3." flush at the left margin, and "Establish,
once and for all..." on the same line as "3." but
starting 12 points in from the left margin.
If you hadn't turned the trap off for
.EL
,
"3." would have appeared at the bottom of the page by
itself, with "Establish, once and for all..."
appearing at the top of the next page.
Break lines and add space between
Macro:
SPACE
<space to add between lines>
Alias:
SP
SPACE
breaks a line, just like
BR
, then adds space after the line.  With no
argument, it adds an extra line space.  If you pass it a numeric
argument without supplying a
definitions.html#TERMS_UNITOFMEASURE
unit of measure
,
it advances that number of extra line spaces.  For example:
.SPACE
breaks the line then adds an extra linespace, whereas
.SPACE 2
breaks the line and adds two extra linespaces.
If you supply a unit of measure,
SPACE
breaks the
line then adds the specified amount of extra space to the current
linespace, as in
.SPACE 6p
which breaks the line then adds six points of space to the current
linespace.
SUGGESTION: SPACE
and
#ALD
ALD
can be used interchangeably (
.SPACE 6p
and
.ALD 6p
are equivalent).  However,
ALD
without an argument does nothing, whereas
SPACE
without an argument adds an extra line
space.  I recommend using
SPACE
when you
want an extra line space (or multiple thereof), and
ALD
whenever you want some other value of space
after a line.
Experts: SPACE
is an alias of
sp
.
You can use either, or mix 'n' match with impunity.
Break and force justify (spread) lines
Macro:
SPREAD
Sometimes, you need to break a line of
definitions.html#TERMS_JUST
justified
text and have it come out fully justified, not
definitions.html#TERMS_QUAD
quadded
left the way it would be with the
BR
macro.
An example of where you'd do this would be when you want to prevent a
word at the end of a line from being hyphenated (say, a proper name).
SPREAD
is the macro that lets you break the line
and have it came out fully justified.
Experts: SPREAD
is an alias for
brp
.
You can use either, or mix 'n' match with impunity.
Join input lines
Inline:
\c
Sometimes, especially when in one of the
definitions.html#TERMS_NOFILL
nofill modes
,
a macro will cause a break where you don't want one.  In order
to prevent this from happening (in other words, to join
definitions.html#TERMS_INPUTLINE
input lines
together, forming one
definitions.html#TERMS_OUTPUTLINE
output line
),
use the groff
definitions.html#TERMS_INLINES
inline escape
\c
at the end of each input line to
be joined to another, like this:
.LEFT
.FAMILY T
.FT R
Some lines of text to be \c
.FAMILY H
.FT B
joined \c
.FAMILY T
.FT R
together.
Upon output, the lines will be joined together to read
Some lines of text to be joined together.
with the word "joined" in Helvetica bold.  Note the
space before
\c
.  Without it, the last three
words of the output line would read
bejoinedtogether
Please also note that had the example been in one of the
definitions.html#TERMS_FILLED
fill modes
,
there'd have been no need for the
\c
.
Typographic refinements
The macros in this section help you tweak groff's behaviour,
ensuring that your documents look typographically professional.
Typographic refinements macro list
Word and sentence spacing
#WS
WS
(word spacing)
#SS
SS
(sentence space)
Letter spacing (track kerning)
#RW
RW
(reduce whitespace)
#EW
EW
(expand whitespace)
#BR_AT_LINE_KERN
BR_AT_LINE_KERN
Hyphenation
#HY
HY
(turn auto hyphenation on/off, or set specific hyphenation parameters)
#HY_SET
HY_SET
(set all hyphenation parameters)
Automatic kerning and ligatures
#KERN
KERN
(turn automatic pairwise kerning on or off)
#LIGATURES
LIGATURES
(turn automatic generation of ligatures on or off)
Word spacing
Macro:
WS
<+|-wordspace> | DEFAULT
WS
(Word Space) increases or decreases the amount
of space between words.  In
definitions.html#TERMS_NOFILL
nofill modes
,
or if
#QUAD
QUAD
is in effect, the space between words is fixed.  Therefore, if you
change the word spacing with
WS
, the change applies
uniformly to the space between every word on every line.  However,
when text is
definitions.html#TERMS_JUST
justified
,
the space between words varies from line to line (in order to justify
the text).  Consequently, the change you make with
WS
represents the minimum (and ideal) space groff will try to put between
words before deciding whether to hyphenate a final word or to stretch
the word spacing.
Word space is relative to type size.  Knowing how it's calculated is
unimportant. What matters is having a sense of how the value passed
to
WS
affects the look of your type.  Generally,
in/decreasing the word space by a value of 1 or 2 produces a difference
that in many cases is scarcely visible; in/decreasing by a value of 5
or so produces a subtle but noticeable difference; and in/decreasing
by a value greater than 10 is always apparent.  You should preview
your work to assess the effect of
WS
.
WS
takes as its argument a whole number preceded by a plus or minus sign.
Therefore, to decrease the word space slightly, you might enter
.WS -4
To increase it by a noticeable amount, you might enter
.WS +12
You can reset the word spacing to its previous value by switching
the plus or minus sign, like this:
.WS +4
A line of text
.WS -4
The
.WS -4
undoes the effect of
.WS
+4
.  You can also reset
WS
to
its groff default by entering
.WS DEFAULT
This can be particularly useful if you've been playing around
with plus and minus values, and can't remember by how much you
have to in/decrease the word space to get it back to normal.
Sentence space
Macro:
SS
<+sentence space> | 0 | DEFAULT
SS
(Sentence Space) tells groff how to treat double
spaces it encounters between sentences in
definitions.html#TERMS_INPUTLINE
input lines
.
If you use
SS
, input sentences with two spaces
after them AND input sentences that fall at the end of input lines
all receive a normal word space plus an additional amount of space
whose size is determined by the + value passed as an argument to
SS
.  Thus,
.SS +2
means that input sentences with two spaces after them receive a normal
word space PLUS the +2 value passed to
SS
.
Like
WS
, increasing the sentence space by a value of
1 or 2 produces a difference that in many cases is scarcely visible;
increasing by a value of 5 or so produces a subtle but noticeable
difference (i.e. the space between double-spaced input sentences will
be slightly but visibly greater than the space between words); and
increasing by a value greater than 10 is always apparent.  You should
preview your work to assess the effect of
SS
.
There's an additional argument you can pass
SS
:
the number zero (without the + sign).  It's the argument you'll
use most often.  Typeset copy should never have two spaces between
sentences, and the "zero" argument tells groff to give the extra
spaces no space at all (effectively removing them).  Therefore,
if you double-space your sentences (as you should when writing in a
text editor), get in the habit of putting
.SS 0
at the top of your files.
If you do use
SS
for something other than ensuring
that you don't get unwanted sentence spaces in output copy, you
can set or reset the sentence space to the groff default (the same
width as a word space, i.e. double-spaced input sentences will appear
double-spaced on output as well) with
.SS DEFAULT
If you're using the
docprocessing.html
document processing macros
and your
docprocessing.html#PRINTSTYLE
PRINTSTYLE
is
TYPEWRITE
,
.SS DEFAULT
is the default,
because you
do
want double spaces between sentences in copy
that imitates the look of a typewritten document.
IMPORTANT: SS
with an argument other than
"0" should only be used if you're of the old (and wise)
school of typists that puts two spaces between sentences.  If you
ignore this advice and use
SS
when you habitually
put only one space between sentences, you risk producing output where
the space between sentences is not equal.
Automatic hyphenation control
Macro:
HY
toggle
Macro:
HY
LINES <max. number of consecutive hyphenated lines>
Macro:
HY
MARGIN <size of hyphenation margin>
Macro:
HY
SPACE <extra interword spacing to prevent hyphenation>
Macro:
HY
DEFAULT
Aliases:
HYPHENATE, HYPHENATION
HY
, as you can see, can be invoked with a number of
arguments.  In all cases, the aliases
HYPHENATE
or
HYPHENATION
can be used in place of
HY
.  To aid in understanding the various arguments
you can pass to
HY
, I've broken them down into
separate sections.
1. HY
HY
by itself (i.e. with no argument) simply turns
automatic hyphenation on.  Any argument other than
LINES,
MARGIN, SPACE
or
DEFAULT
, turns automatic
hyphenation off.  For example, as explained in
intro.html#MACRO_ARGS
How to read macro arguments
,
you could turn
HY
off by entering
.HY OFF
or
.HY X
or
.HY END
HY
observes the following default hyphenation rules:
Last lines (i.e. ones that will spring a trap -- typically
the last line on a page) will not be hyphenated.
The first and last two characters of a word are never
split off.
2. HY LINES
HY LINES
sets the maximum number of consecutive
hyphenated lines that will appear in output copy.  2 is a very
good choice, and you'd set it with
.HY LINES 2
By default, when you turn automatic hyphenation on, there is no
limit to the number of consecutive hyphenated lines.
NOTE:
definitions.html#TERMS_DISCRETIONARYHYPHEN
Discretionary hyphens
count when groff is figuring out how many lines to hyphenate;
explicit hyphens do not.
3. HY MARGIN
HY MARGIN
sets the amount of room allowed at
the end of a line before hyphenation is tripped (e.g. if there's
only 6 points left at the end of a line, groff won't try to hyphenate
the next word).
HY MARGIN
only applies if you're
using
#QUAD
QUAD
, and is really only useful if you're
using
QUAD LEFT
.
As an example, if you don't want groff to hyphenate words when there's
only 18 points of space left at the end of a left-quadded line,
you'd enter
.HY MARGIN 18p
NOTE:
The numeric argument after
HY
MARGIN
requires a
definitions.html#TERMS_UNITOFMEASURE
unit of measure
.
4. HY SPACE
HY SPACE
sets an amount of extra interword
space that groff will
try
to put between words on a
line in order to PREVENT hyphenation.
HY SPACE
applies only to
definitions.html#TERMS_JUST
justified lines
.  Generally speaking,
you'll want this value to be quite small, since too big a value
will result in lines with gaping holes between the words.  A reasonable
value might be half a point, or one point, which you'd set with
.HY SPACE .5p
or
.HY SPACE 1p
NOTE:
The numeric argument after
HY
SPACE
requires a
definitions.html#TERMS_UNITOFMEASURE
unit of measure
.
4. HY DEFAULT
HY DEFAULT
resets automatic hyphenation to its
default behaviour, cancelling any changes made with
LINES,
MARGIN,
and/or
SPACE
.
A note on hyphenation in general
Hyphenation is a necessary evil.  If it can be avoided, it should be.
If it can't be, it should occur infrequently.  That's the reason for
number of parameters you can set with
HY
.
Furthermore, hyphenation in
definitions.html#TERMS_RAG
rag
copy requires a great deal of attention.  At best, it should be
avoided completely by individually adjusting the number of words
on consecutive lines to achieve a pleasing, natural-looking rag.
Since such adjustments are often too fussy for document
processing, I recommend playing around with
HY MARGIN
a bit if your copy looks hyphen-heavy.
Set hyphenation parameters all at once
Macro:
HY_SET
<lines> [ <margin> [ <space> ] ]
Alias:
HYSET
HY_SET
lets you set the parameters for hyphenation
with a single macro.  <lines>, <margin> and <space>
correspond to the numeric values required by
LINES
,
MARGIN
and
SPACE
as described
#HY
above
.
To set just the maximum number of consecutive hyphenated lines,
you'd enter
.HY_SET 2
If you wanted the same number of maximum consecutive hyphenated lines
and a hyphenation margin for use with
definitions.html#TERMS_RAG
rag
copy,
.HY_SET 2 36p
would set the hyphenation margin to 36 points.
If you wanted the same number of maximum consecutive hyphenated
lines and a hyphenation space of 2 points for use with
definitions.html#TERMS_JUST
justified
copy,
.HYSET 2 0 2p
is how you'd do it.
Reduce whitespace
Macro:
RW
<amount of whitespace reduction between letters>
RW
(Reduce Whitespace) and its corresponding macro,
EW
(Expand Whitespace), allow you to tighten
(or loosen)
definitions.html#TERMS_OUTPUTLINE
output lines
by uniformly reducing or expanding the space between characters.
This is particularly useful when you want to squeeze or stretch
lines on a narrow measure.
The value passed to
RW
may be a whole number or a
decimal fraction.  Since a value of 1 produces a noticeable reduction
in the space between letters at text sizes, you'll most likely use
small decimal values when tightening lines.  For example,
.RW .1
or
.RW .2
may be just enough to squeeze an extra character or two on a
line without the change in letter spacing being obvious.  I
highly recommend previewing your work to assess the effect of
RW
.
IMPORTANT:
RW
affects all
definitions.html#TERMS_FONT
fonts
in the
definitions.html#TERMS_FAMILY
family
current at the time it's invoked.  It must be reset to zero to
cancel its effect (
.RW 0
) on those fonts, or reinvoked
(possibly with a different value) if you change family.
NOTE:
By default,
RW
does not deposit a
#BR
break
(
BR
) when it's invoked.  If you want
RW
to break at the ends of the previous
definitions.html#TERMS_INPUTLINE
input lines
,
you can tell
mom
that's what you want by invoking the
#BR_AT_LINE_KERN
BR_AT_LINE_KERN
toggle macro.
Expand whitespace
Macro:
EW
<amount of whitespace expansion between letters>
EW
(Expand Whitespace) expands the amount of
whitespace between letters, effectively "loosening" lines
of type.
The value passed to
EW
may be a whole number or a
decimal fraction.  Since a value of 1 produces a noticeable
expansion in the space between letters at text sizes, you'll most likely use
small decimal values when loosening lines.  For example,
.EW .1
or
.EW .2
may be just enough to open up a line without the change in letter
spacing being obvious.  I highly recommend previewing your work to
assess the effect of
EW
.
NOTE:
By default,
EW
does not deposit a
#BR
break
(
BR
) when it's invoked.  If you want
EW
to break at the ends of the previous
definitions.html#TERMS_INPUTLINE
input lines
,
you can tell
mom
that's what you want by invoking the
#BR_AT_LINE_KERN
BR_AT_LINE_KERN
toggle macro.
Break before line kerning
Macro:
BR_AT_LINE_KERN
toggle
By default,
mom
does not break
definitions.html#TERMS_INPUTLINE
input lines
when you invoke
RW
or
EW
.
If you'd like
mom
to break input lines prior
to
RW
or
EW
, invoke
BR_AT_INPUT_LINE
without any argument.  To
disable the breaks, invoke
BR_AT_INPUT_LINE
with any argument (
OFF, QUIT, Q, X
...), like
this
.BR_AT_LINE_KERN OFF
or
.BR_AT_LINE_KERN X
Automatic kerning
Macro:
KERN
toggle
By itself (i.e. with no argument),
KERN
turns
automatic pairwise
definitions.html#TERMS_KERN
kerning
on.  With any argument (e.g. OFF, Q, X), pairwise kerning is turned
off.
Kerning of individual character pairs can be controlled with the
definitions.html#TERMS_INLINES
inline escapes
\*[BU #]
and
\*[FU #]
.  See
inlines.html#INLINE_KERNING_MOM
Inline Escapes, kerning
.
Automatic ligature generation
Macro:
LIGATURES
toggle
Alias:
LIG
Provided your current font has
definitions.html#TERMS_LIGATURES
ligatures
,
LIGATURES
, by itself, turns on automatic
generation of ligatures.  When automatic ligature generation is
on, simply typing the letters of a ligature combination will
produce the correct ligature upon output.  For example, if you
type the word "finally", the fi combination will be
output as an fi ligature.  Generally speaking, ligatures are A
Good Thing, hence
mom
has them on by default.
LIGATURES
with any argument turns automatic
ligature generation off.
NOTE:
Not all fonts support ligatures.
Type modifications: pseudo-italic, -bold, -condensed, -extended
It sometimes happens that a PostScript
definitions.html#TERMS_FAMILY
family
doesn't contain all the fonts you need.  You might, for example,
be missing an italic font, or a bold font.  Or you might not be able
to get your hands on a condensed family.  That's where these macros
and inline escapes come in.  With them, you can fake the fonts
you're missing.  A word of caution, though: "faked"
fonts are just that -- faked.  You should only use them as a
last resort, and then only sparingly.  A word or two or a line
or two in a faked font will pass unnoticed; large patches of
type in a faked font look typographically cheap.
Type modifications macro list
Pseudo italic
#SETSLANT
SETSLANT
-- degree of pseudo-italicising
#SLANT_INLINE
\*[SLANT]
-- inline escape for pseudo-italicising type
Pseudo bold
#SETBOLDER
SETBOLDER
-- amount of emboldening
#BOLDER_INLINE
\*[BOLDER]
-- inline escape for emboldening type
Pseudo condensed
#CONDENSE
CONDENSE
-- percentage for pseudo-condensed type
#COND_INLINE
\*[COND]
-- inline escape for pseudo-condensed type
Pseudo extended
#EXTEND
EXTEND
-- percentage for pseudo-extended type
#EXT_INLINE
\*[EXT]
-- inline escape for pseudo-extending
Set degree of slant for pseudo-italicising
Macro:
SETSLANT
<degrees to slant type> | RESET
Pseudo-italicising of type is accomplished by slanting a roman font
a certain number of degrees to the right.
SETSLANT
lets you fix the number of degrees.
Mom
's
default is 15, which produces an acceptable approximation of an
italic font.  If you want another value -- say, 13 degrees --
you'd set it by entering
.SETSLANT 13
If you change the degree of slant and later want to set it back
to the
mom
default, do
.SETSLANT RESET
NOTE:
By itself,
SETSLANT
will not start pseudo-italicising type; it merely tells
mom
what degree of slant you want.  To start
pseudo-italicising, use the
definitions.html#TERMS_INLINES
inline escape
\*[SLANT]
.
Pseudo italic on/off
Inline:
\*[SLANT] -- turn pseudo-italic on
Inline:
\*[SLANTX] -- turn pseudo-italic off
\*[SLANT]
begins pseudo-italicising type.
\*[SLANTX]
turns the feature off.  Both are
definitions.html#TERMS_INLINES
inline escapes
,
therefore they should not appear as separate lines, but rather
be embedded in text lines, like this:
Not \*[SLANT]everything\*[SLANTX] is as it seems.
Alternatively, if you wanted the whole line pseudo-italicised,
you'd do
\*[SLANT]Not everything is as it seems.\*[SLANTX]
Once
\*[SLANT]
is invoked, it remains in effect
until turned off.
NOTE:
If you're using the
docprocessing.html#DOCPROCESSING
document processing macros
with
docprocessing.html#PRINTSTYLE
PRINTSTYLE TYPEWRITE
,
mom
underlines pseudo-italics by default.  To
change this behaviour, use the special macro
docprocessing.html#SLANT_MEANS_SLANT
SLANT_MEANS_SLANT
.
Set amount of emboldening
Macro:
SETBOLDER
<amount of emboldening, in machine units> | RESET
Emboldening of type is accomplished by printing characters
twice; the second printing is slightly offset from the first,
effectively "thickening" the character.
SETBOLDER
lets you set the number of
definitions.html#TERMS_UNITS
machine units
for the offset.
Mom
's default is 700 units, which
produces an acceptable approximation of a bold font.  If you want
another value -- say, 500 units -- you'd set it by entering
.SETBOLDER 500
If you change the emboldening offset and later want to set it back
to the
mom
default, do
.SETBOLDER RESET
NOTE:
By itself,
SETBOLDER
will not start emboldening type; it merely tells
mom
what you want the emboldening offset to be.
To start emboldening, use the
definitions.html#TERMS_INLINES
inline escape
\*[BOLDER]
.
Emboldening on/off
Inline:
\*[BOLDER] -- turn emboldening on
Inline:
\*[BOLDERX] -- turn emboldening off
\*[BOLDER]
begins emboldening type.
\*[BOLDERX]
turns the feature off.  Both are
definitions.html#TERMS_INLINES
inline escapes
,
therefore they should not appear as separate lines, but rather
be embedded in text lines, like this:
Not \*[BOLDER]everything\*[BOLDERX] is as it seems.
Alternatively, if you wanted the whole line emboldened,
you'd do
\*[BOLDER]Not everything is as it seems.\*[BOLDERX]
Once
\*[BOLDER]
is invoked, it remains in effect
until turned off.
NOTE:
If you're using the
docprocessing.html#DOCPROCESSING
document processing macros
with
docprocessing.html#PRINTSTYLE
PRINTSTYLE TYPEWRITE
,
mom
ignores
\*[BOLDER]
requests.
Set percentage for pseudo-condensed type
Macro:
CONDENSE
<pseudo-condense percentage>
Pseudo-condensing of type is accomplished by reducing the width of
characters at a given point size without reducing their height,
effectively narrowing them so they look like condensed type.
CONDENSE
tells
mom
what
percentage of the normal character width you want the characters
to be condensed.
Mom
has no default value for
CONDENSE
, therefore you must set it before using the
definitions.html#TERMS_INLINES
inline escape
#COND_INLINE
\*[COND]
.
80 percent of the normal character width is a good value, and
you'd set it like this:
.CONDENSE 80
NOTE:
By itself,
CONDENSE
will not start pseudo-condensing type; it merely tells
mom
what percentage of the normal character
width you want characters to be condensed.
To start pseudo-condensing, use the
definitions.html#TERMS_INLINES
inline escape
\*[COND]
.
Additional note:
Make sure that pseudo-condensing
is off (with
#COND_INLINE
\*[CONDX]
)
before before making any changes to the pseudo-condense percentage
with
CONDENSE
.
Pseudo-condensing on/off
Inline:
\*[COND] -- turn pseudo-condensing on
Inline:
\*[CONDX] -- turn pseudo-condensing off
\*[COND]
begins pseudo-condensing type.
\*[CONDX]
turns the feature off.  Both are
definitions.html#TERMS_INLINES
inline escapes
,
therefore they should not appear as separate lines, but rather
be embedded in text lines, like this:
\*[COND]Not everything is as it seems.\*[CONDX]
\*[COND]
remains in effect until you turn it
off with
\*[CONDX]
.
IMPORTANT:
You MUST turn
\*[COND]
off before making any changes to the point size of your type, either
via the
#PS
PT_SIZE
macro or with the
\s
inline escape.  If you wish
the new point size to be pseudo-condensed, simply reinvoke
\*[COND]
afterwards.  Equally,
\*[COND]
must be turned off before changing the
condense percentage with
#CONDENSE
CONDENSE
.
NOTE:
If you're using the
docprocessing.html#DOCPROCESSING
document processing macros
with
docprocessing.html#PRINTSTYLE
PRINTSTYLE TYPEWRITE
,
mom
ignores
\*[COND]
requests.
Set percentage for pseudo-extended type
Macro:
EXTEND
<pseudo-extend percentage>
Pseudo-extending of type is accomplished by increasing the width of
characters at a given point size without increasing their height,
effectively widening them so they look like extended type.
EXTEND
tells
mom
what
percentage of the normal character width you want the characters
to be extended.
Mom
has no default value for
EXTEND
, therefore you must set it before using the
definitions.html#TERMS_INLINES
inline escape
#EXT_INLINE
\*[EXT]
.
120 percent of the normal character width is a good value, and
you'd set it like this:
.EXTEND 120
NOTE:
By itself,
EXTEND
will not start pseudo-extending type; it merely tells
mom
what percentage of the normal character
width you want characters to be extended.
To start pseudo-extending, use the
definitions.html#TERMS_INLINES
inline escape
\*[EXT]
.
Additional note:
Make sure that
pseudo-extending is off (with
#EXT_INLINE
\*[EXTX]
)
before before making any changes to the pseudo-extend percentage
with
EXTEND
.
Pseudo-extending on/off
Inline:
\*[EXT] -- turn pseudo-extending on
Inline:
\*[EXTX] -- turn pseudo-extending off
\*[EXT]
begins pseudo-extending type.
\*[EXTX]
turns the feature off.  Both are
definitions.html#TERMS_INLINES
inline escapes
,
therefore they should not appear as separate lines, but rather
be embedded in text lines, like this:
\*[EXT]Not everything is as it seems.\*[EXTX]
\*[EXT]
remains in effect until you turn it
off with
\*[EXTX]
.
IMPORTANT:
You MUST turn
\*[EXT]
off before making any changes to the point size of your type, either
via the
#PS
PT_SIZE
macro or with the
\s
inline escape.  If you wish
the new point size to be pseudo-extended, simply reinvoke
\*[EXT]
afterwards.  Equally,
\*[EXT]
must be turned off before changing the
extend percentage with
#EXTEND
EXTEND
.
NOTE:
If you're using the
docprocessing.html#DOCPROCESSING
document processing macros
with
docprocessing.html#PRINTSTYLE
PRINTSTYLE TYPEWRITE
,
mom
ignores
\*[EXT]
requests.
Vertical movement
The two macros in this section allow you to move down or up on the page
relative to the current
definitions.html#TERMS_BASELINE
baseline
.
Vertical movement macro list
#ALD
ALD
-- Advance Lead
#RLD
RLD
-- Reverse Lead
Advance Lead (move downward)
Macro:
ALD
<distance to move downward>
*Requires a
definitions.html#TERMS_UNITOFMEASURE
unit of measure
ALD
takes one argument: the distance to move downward
on the page relative to the current vertical position.
Used by itself, or preceded by
#BR
BR
,
ALD
will advance by one line space plus the
distance you specify.  Preceded by
#EL
EL
,
it will advance by exactly the distance you specify.
ALD
requires a unit of measure.  Decimal fractions
are allowed, and values may be combined.  Therefore, to move down
on the page by 1/4 of an inch, you could enter either
.ALD .25i
or
.ALD 1P+6p
As the mnemonic (
A
dvance
L
ea
D
) suggests, you'll most often
use
ALD
with
definitions.html#TERMS_PICASPOINTS
points
of lead.
NOTE:
if you want to use
ALD
at the top of a page (i.e. to advance to the starting position
of type on a page), combine the value you want with -1v (minus
one line space), like this:
.ALD 1i-1v
At the top of a page, this will advance one inch from the
top edge of the paper.  Without the -1v, the same command would
advance one inch from the top of the page plus the distance of
one line space.
Important:
Do NOT use
ALD
in this
way if you have set a top margin with
#T_MARGIN
T_MARGIN
or
#PAGE
PAGE
.
Reverse Lead (move upward)
Macro:
RLD
<distance to move upward>
*Requires a
definitions.html#TERMS_UNITOFMEASURE
unit of measure
RLD
takes one argument: the distance to move
upward on the page relative to the current vertical position.
Used by itself, or preceded by
#BR
BR
,
RLD
will advance by one line space, then
reverse by the distance you specify.  Preceded by
#EL
EL
,
it will reverse by exactly the distance you specify.
RLD
requires a unit of measure.  Decimal fractions
are allowed, and values may be combined.  Therefore, to move up
on the page by 1/4 of an inch, you could enter either
.RLD .25i
or
.RLD 1P+6p
As the mnemonic (
R
dvance
L
ea
D
) suggests, you'll most often
use
RLD
with
definitions.html#TERMS_PICASPOINTS
points
of lead.
Tabs
Mom
provides two different kinds of tab setup:
typesetting tabs and string tabs.  Neither one has anything to
do with the tab key on your keyboard, and both are utterly
divorced from groff's notion of tabs.  I recommend reading this
section carefully in order to understand how
mom
handles tabs.
Typesetting tabs
Typesetting tabs are defined by both an indent from the left margin and
a line length.  This is quite different from typewriter-style tab stops
(the groff norm) that only define the left indent.  In conjunction
with the multi-column macros, typesetting tabs significantly facilitate
tabular and columnar work.
Typesetting tabs are created with the
TAB_SET
macro.
TAB_SET
identifies the tab (by number),
establishes its left indent and line length, and optionally sets
a quad direction and fill mode.  After tabs have been created with
TAB_SET
, they can be called at any time with the
TAB
macro.
NOTE:
see the section
typemacdoc.html#TYPESETTING
Typesetting Macros in Document Processing
for information and advice on using tabs with the
docprocessing.html#DOCPROCESSING
document processing macros
.
Quickie tutorial on typesetting tabs
Say you want to set up three tabs to produce an employee evaluation
that looks something like this:
CRITERION       EVALUATION     COMMENTS
Service           Good         Many clients specifically request
support from Joe by name.
Punctuality    Satisfactory    Tends to arrive after 8:00am, but
often works through lunch hour.
Team spirit     Needs work     Persistently gives higher priority
to helping clients than respecting
organizational hierarchy.
You want the first tab ("CRITERION")
to begin at the left margin of the page (i.e. no indent)
to have a line length of 5 picas
to be set flush left
Tabs must be numbered, and each has to be set up with a separate
#TAB_SET
TAB_SET
line.  Therefore, to set up tab 1, you enter
.TAB_SET  1  0  5P  L
|  |  |   |
tab #__|  |  |   |__direction
|  |
indent__|  |__length
You want the second tab ("EVALUATION")
to begin 8 picas from the left margin
to have a length of 9 picas
to be set centered.
You set it up like this:
.TAB_SET  2  8P  9P  C
|  |   |   |
tab #__|  |   |   |__direction
|   |
indent__|   |__length
You want the third tab ("COMMENTS")
to begin 19 picas from the left margin
to have a length of 17 picas
to be set flush left,
definitions.html#TERMS_FILLED
filled
The setup looks like this:
.TAB_SET  3  19P  17P  L  QUAD
|   |    |   |    |
|   |    |   |    |__fill output lines
|   |    |   |
tab #__|   |    |   |__direction
|    |
indent__|    |__length
Once the tabs are set up, you can call them in one of two ways:
#TAB
TAB
(with the tab
number as an argument) breaks the current line,
advances one linespace, and calls the tab.
#TN
TN
(Tab Next) keeps
you on the current line and moves over to the next
tab in sequence (i.e. from 1 to 2, 2 to 3, etc.).
To exit from tabs and restore your original left margin, line length,
quad direction and fill mode,  use
#TQ
TQ
(Tab Quit).
Here's how the input for our sample employee evaluation looks
(with some introductory parameters):
.PAGE 8.5i 11i 1i 1i 1i
.FAMILY  T
.FT      R
.PT_SIZE 14
.LS      16
.QUAD    LEFT
.KERN
.HY OFF
.SS 0
.TAB_SET 1 0   5P  L
.TAB_SET 2 8P  9P  C
.TAB_SET 3 19P 17P L QUAD
.TAB 1
CRITERION
.TN
EVALUATION
.TN
COMMENTS
.SP
.TAB 1
Service
.TN
Good
.TN
Many clients specifically request support from Joe by name.
.SP
.TAB 1
Punctuality
.TN
Satisfactory
.TN
Tends to arrive after 8:00am, but often works through lunch hour.
.SP
.TAB 1
Team spirit
.TN
Needs work
.TN
Persistently gives higher priority to helping clients
than respecting organizational hierarchy.
.TQ
Try setting this up and previewing it with
groff -mom -X <filename>
Notice how
.TN
simply moves over to the next tab,
while the combination
.SP/.TAB 1
breaks the
line, advances by one extra linespace, and calls the first tab.
Notice, too, how the
QUAD
argument passed to
tab 3 means you don't have to worry about the length of
definitions.html#TERMS_INPUTLINE
input lines
;
mom
definitions.html#TERMS_FILLED
fills
the tab and sets the type flush left.
String tabs (autotabs)
String tabs let you mark off tab positions inline.  Left indents
and line lengths are calculated from the beginning and end positions of
the marks.  This is especially useful when tab indents and lengths
need to be determined from the text that goes in each tab.
Setting up string tabs is a two-step procedure.  First, you enter an
input line in which you mark off where you want tabs to begin and end.
(This is often best done in conjunction with the
goodies.html#SILENT
SILENT
macro.)
Next, you invoke the
#ST
ST
macro for every string tab you defined, and optionally pass quad and
fill information to it.  That done, string tabs are called with
the
#TAB
TAB
macro, just like typesetting tabs.
In combination with the
goodies.html#PAD
PAD
macro and the groff inline escape
inlines.html#INLINE_HORIZONTAL_GROFF
\h
(move horizontally across the page) or
mom
's
inlines.html#INLINE_HORIZONTAL_MOM
\*[FP#]
(Forward Points) inline, string tabs provide
tremendous flexibility in setting up complex tab structures.
Quickie tutorial on string tabs
Say you want to set up tabs for the
#TYPSETTING_TABS_SAMPLE
employee evaluation form
used as an example in the
#TYPESETTING_TABS_TUT
typesetting tabs tutorial
.
This time, though, you want to play around with the point size of
type, so you can't know exactly how long the tabs will be or where
they should start.  All you know is
CRITERION is the longest line in tab 1
EVALUATION is the longest line in tab 2
tab 3 should extend to the current right margin
you want a 1 pica gutter between each tab
This is an ideal job for string tabs.
The first thing you need for string tabs is an
definitions.html#TERMS_INPUTLINE
input line
with tab positions marked on it.  Tabs are marked with the
definitions.html#TERMS_INLINES
inline escapes
\*[ST#]
and
\*[ST#X]
.  (In this
example, we enclose the input line with the
goodies.html#SILENT
SILENT
macro so the line doesn't print.  We also use the
goodies.html#PAD
PAD
macro to permit defining tab 3 as simply "the amount of
space remaining on the input line.")
The setup looks like this:
.SILENT
.PAD "\*[ST1]CRITERION\*[ST1X]\*[FP12]\*[ST2]EVALUATION\*[ST2X]\*[FP12]\*[ST3]#\*[ST3X]"
.SILENT OFF
The long line after
.PAD
looks scary, but it isn't.
Here's what it means when broken down into its component parts:
The longest line in tab 1 is "CRITERION", so we
enclose CRITERION with begin/end markers for string tab 1:
\*[ST1]CRITERION\*[ST1X]
We want a 1 pica (12 points) gutter between tab 1 and 2,
so we insert 12 points of space with \*[FP12]
(
F
orward
P
oints 12):
\*[FP12]
The longest line in tab 2 is "EVALUATION", so
we enclose EVALUATION with begin/end markers for string
tab 2:
\*[ST2]EVALUATION\*[ST2X]
We want 1 pica (12 points) between tab 2 and 3, so we
insert 12 points of space with another \*[FP12]:
\*[FP12]
We want tab 3 to be as long as whatever space remains on
the current line length, so we enclose the
goodies.html#PAD_MARKER
pad marker
(#) with begin/end markers for string tab 3:
\*[ST3]#\*[ST3X]
The tabs are now defined, but they require
definitions.html#TERMS_QUAD
quad direction
and
definitions.html#TERMS_FILLED
fill
information.  For each string tab defined above, enter a
separate
#ST
ST
line, like this:
.ST  1  L
.ST  2  L
.ST  3  L  QUAD
|  |   |
|  |   |__fill output lines
|  |
tab__|  |__direction
number
From here on in, you call the tabs with
#TAB
TAB
and
#TN
TN
just like typesetting tabs (see
#TYPESETTING_TABS_TUT
typesetting tabs tutorial
).
Here's the complete setup and entry for the sample employee
evaluation form utilising string tabs.
.PAGE 8.5i 11i 1i 1i 1i
.FAMILY  T
.FT      R
.PT_SIZE 14
.LS      16
.QUAD    LEFT
.KERN
.HY OFF
.SS 0
.SILENT
.PAD "\*[ST1]CRITERION\*[ST1X]\*[FP12]\*[ST2]EVALUATION\*[ST2X]\*[FP12]\*[ST3]#\*[ST3X]"
.SILENT OFF
.ST  1  L
.ST  2  L
.ST  3  L  QUAD
.TAB 1
CRITERION
.TN
EVALUATION
.TN
COMMENTS
.SP
.TAB 1
Service
.TN
Good
.TN
Many clients specifically request support from Joe by name.
.SP
.TAB 1
Punctuality
.TN
Satisfactory
.TN
Tends to arrive after 8:00am, but often works through lunch hour.
.SP
.TAB 1
Team spirit
.TN
Needs work
.TN
Persistently gives higher priority to helping clients
than respecting organizational hierarchy.
.TQ
Try setting this up and previewing it with
groff -mom -X <filename>
Now, change the point size of the above sample to 12 and preview
it again.  You'll see that the tab structure remains identical (tab
1=CRITERION, tab 2=EVALUATION, tab 3=space remaining, and the gutter
between tabs is still 1 pica), while the position and length
of the tabs have altered because of the new point size.
Now try increasing the gutters to 2 picas (put an additional
\*[FP12]
after each
\*[FP12]
).  Preview the
file again, and notice how the tab structure remains the same, but
the gutters are wider.
Tabs macro list
#TAB_SET
TAB_SET
(create typesetting tabs)
#INLINE_ST
\*[ST]...\*[STX]
(inline escapes for marking String Tabs)
#ST
ST
(set String Tabs)
#TAB
TAB
(call tabs)
#TN
TN
(Tab Next; call next tab in a sequence)
#TQ
TQ
(Tab Quit)
Set up typsetting tabs
Macro:
TAB_SET
<tab number> <indent> <length>  L | R | C | J [ QUAD ]
*<indent> and <length> require a
definitions.html#TERMS_UNITOFMEASURE
unit of measure
TAB_SET
creates typesetting tabs that later can be
called with
#TAB
TAB
.
Typesetting tabs are numbered, and defined by an indent, a length,
and a "direction", hence
TAB_SET
has
four required arguments:
a tab number
an indent (measured from the left margin of the page,
or, if you're already in a tab, from the left margin of the tab)
a length
a direction
To set up a centered tab 6 picas long and 9 points from the left
margin, you'd enter
.TAB_SET 1 9p 6P C
The tab number in the above ("1") is simply an
identifier.  It could have been 4, or 17, or 296.  There's no
need to set up tabs in numerical sequence.
By default, tabs are in
definitions.html#TERMS_NOFILL
nofill
mode, meaning you can enter text in tabs on a line for line basis
without having to use the
#BR
BR
macro.  If you want a tab to be
definitions.html#TERMS_FILLED
filled
,
pass the optional argument
QUAD
, which will
make the tab behave as if you'd entered
.QUAD L | R |
C
.
For
definitions.html#TERMS_JUST
justified
tabs, simply pass the argument
J
(without the
QUAD
argument), like this:
.TAB 1 9p 6P J
Once tabs are set, they can be called at any time with the
#TAB
TAB #
macro, where "#" is the number of the desired tab.
You can set up any number of typesetting tabs.  However, be
aware that
#STRING_TABS
string tabs
are also called with
TAB #
, so be careful that you
don't set up a typesetting tab numbered, say, 4, when you already
have a string tab numbered 4.  Every tab, typesetting or string,
must have a unique numeric identifier.
NOTE:
If you use
TAB_SET
while
you're currently inside a tab, the indent argument is the distance from
the tab's left margin, not the left margin of the page.  Therefore,
you should exit tabs (with
#TQ
TQ
)
before creating new tabs (unless, of course, you want to set
up a tab structure within the confines of an existing tab).
IMPORTANT:
Turn all indents off (see
#INDENTS
Indents
)
before setting up tabs with
TAB_SET
, or
mom
may get confused.
Mark positions of string tabs
Inlines:
\*[ST<number>]...\*[ST<number>X]
String tabs need to be marked off with
definitions.html#TERMS_INLINES
inline escapes
before being set up with the
#ST
ST
macro.  Any input line may contain string tab markers.
<number>
, above, means the numeric identifier of
the tab.  The following shows a sample input line with string
tab markers.
\*[ST1]Now is the time\*[ST1X] for all \*[ST2]good men\*ST2X] to come to the aid of the party.
String tab 1 begins at the start of the line and ends after the word
"time".  String tab 2 starts at "good" and ends
after "men".  Inline escapes (e.g. font or point size
changes, or horizontal movements, including
goodies.html#PAD
padding
)
are taken into account when
mom
determines the
position and length of string tabs.
Up to nineteen string tabs may be marked (not necessarily all on
the same line, of course), and they must be numbered between 1
and 19.
Once string tabs have been marked in input lines, they have to
be "set" with
#ST
ST
,
after which they may be called, by number, with
#TAB
TAB
.
NOTE:
Lines with string tabs marked off in them
are normal input lines, i.e. they get printed, just like any
input line.  If you want to set up string tabs without the line
printing, use the
#SILENT
SILENT
macro.
IMPORTANT:
Do not try to set up string tabs on
a line that is broken with
#SPREAD
SPREAD
.
Mom
calculates string tab positions and lengths
as she reads the input line, not after the line has undergone
manipulations to the word spacing.
Set string tabs
Macro:
ST
<tab number>  L | R | C | J [ QUAD ]
After string tabs have been marked off on an input line (see
#INLINE_ST
\*[ST]...\*[STX]
),
you need to "set" them by giving them a direction
and, optionally, the
QUAD
argument.  In this
respect,
ST
is like
#TAB_SET
TAB_SET
except that you don't have to give
ST
an indent
or a line length (that's already taken care of, inline, by
\*[ST]...\*[STX]
).  If you want string tab 1 to be
left, enter
.ST 1 L
If you want it to be left and
definitions.html#TERMS_FILLED
filled
, enter
.ST 1 L QUAD
If you want it to be justified, enter
.ST 1 J
See the
#STRING_TABS_TUT
Quickie tutorial on string tabs
for a full explanation of setting up string tabs.
Call tabs
Macro:
TAB
<tab number>
Alias:
TB
After tabs have been defined (either with
#TAB_SET
TAB_SET
or
#ST
ST
),
TAB
moves to whatever tab number you pass it as
an argument.  For example,
.TAB 3
moves you to tab 3.
NOTE:
TAB
breaks the line preceding
it and advances 1 linespace.  Hence,
.TAB 1
A line of text in tab 1.
.TAB 2
A line of text in tab 2.
produces, on output
A line of text in tab 1.
A line of text in tab 2.
If you want the tabs to line up, use
#TN
TN
(Tab Next), like this:
.TAB 1
A line of text in tab 1.
.TN
A line of text in tab 2.
which produces
A line of text in tab 1.   A line of text in tab 2.
If the text in your tabs runs to several lines, and you want the
first lines of each tab to align, you must use the
#MULTI_COLUMNS
multi-column
macros.
ADDITIONAL NOTE:
Any indents in effect prior to
calling a tab are automatically turned off by
TAB
.
If you were happily zipping down the page with a left indent of 2
picas turned on, and you call a tab whose indent from the left margin
is 6 picas, your new distance from the left margin will be 6 picas,
not 6 picas plus the 2 pica indent.
Tab Next
Macro:
TN
TN
moves over to the next tab in numeric
sequence (tab n+1) without advancing on the page.  See the
#NOTE_TN
NOTE
in the description of the
TAB
macro for an
example of how
TN
works.
NOTE:
TN
is like
#EL
EL
in that it doesn't work as advertised on the last line before a
footer trap is sprung.  If you need to use
TN
on the last line of a page with a footer trap, turn the trap off with
goodies.html#TRAP
TRAP
,
as in this example:
.TAB_SET 1 0  1P  L
.TAB_SET 2 1P 20P L
.TAB 1
.TRAP OFF
1.
.TN
The first rule of survival is "make and keep good friends."
.TRAP
The above, at the bottom of a page, will look something like this:
1.  The first rule of survival is "make and keep good friends."
If you hadn't turned the trap off before
.TN
,
"1." would have appeared as the last line on the page,
with "The first rule of survival..." being the first
line on the next page.
Tab Quit
Macro:
TQ
TQ
takes you out of whatever tab you were in,
advances 1 linespace, and restores the left margin, line length,
quad direction and
definitions.html#TERMS_FILLED
fill mode
that were in effect prior to invoking any tabs.
Multi-Columns
Tabs are not by nature columnar, which is to say that if the text
inside a tab runs to several lines, calling another tab does not
automatically move to the
definitions.html#TERMS_BASELINE
baseline
of the first line in the previous tab.  To demonstrate:
.TAB 1
Carrots
Potatoes
Broccoli
.TAB 2
$1.99/5 lbs
$0.25/lb
$0.99/bunch
produces, on output
Carrots
Potatoes
Broccoli
$1.99/5 lbs
$0.25/lb
$0.99/bunch
The multi-column macros allow you to set tabs in columnar
fashion, rather than line by line.  When you invoke multi-column
mode (with
#MCO
MCO
),
mom
saves the position of the current baseline.
#MCR
MCR
(Multi-column return) at any point while multi-columns are on
returns you to the saved position.  Exiting multi-columns
(
#MCX
MCX
)
quits the current tab (if you're in one) and moves you to the
bottom of the longest column.  (Note that you do not have to use
multi-columns in conjunction with tabs.)
Using our example above, but setting it in multi-column mode,
.MCO
.TAB 1
Carrots
Potatoes
Broccoli
.MCR
.TAB 2
$1.99/5 lbs
$0.25/lb
$0.99/bunch
.MCX
produces
Carrots   $1.99/5 lbs
Potatoes  $0.25/lb
Broccoli  $0.99/bunch
NOTE:
Do not confuse
MCO
with
the
docprocessing.html#COLUMNS
COLUMNS
macro in the
docprocessing.html#DOCPROCESSING
document processing macros
.
Columns macro list
#MCO
MCO (begin multi-column setting)
#MCR
MCR (return to top of column)
#MCX
MCX (exit multi-columns)
Begin multi-column setting
Macro:
MCO
MCO
(
M
ulti-
C
olumn
O
n)
is the macro you use to begin multi-column setting.  It marks
the current
definitions.html#TERMS_BASELINE
baseline
as the top of your columns, for use late with
#MCR
MCR
.  See the
#MULTI_COLUMNS
introduction to columns
for an explanation of multi-columns and some sample
input.
NOTE:
Do not confuse
MCO
with
the
docprocessing.html#COLUMNS
COLUMNS
macro in the
docprocessing.html#DOCPROCESSING
document processing macros
.
Return to top of column
Macro:
MCR
Once you've turned multi-columns on (with
#MCO
MCO
),
MCR
, at any time, returns you to the top of
your columns.
Exit multi-columns
Macro:
MCX
[ <distance to advance below longest column> ]
*Optional argument requires a
definitions.html#TERMS_UNITOFMEASURE
unit of measure
MCX
takes you out of any tab you were in (by silently
invoking
#TQ
TQ
) and advances to the bottom of the longest
column.
Without an argument,
MCX
advances 1 linespace
below the longest column.  Linespace, in this instance, is the
definitions.html#TERMS_LEADING
leading
in effect
at the moment
MCX
is
invoked.
If you pass the
<distance>
argument to
MCX
, it advances 1 linespace below the longest
column (see above) PLUS the distance specified by the argumemnt.
The argument requires a unit of measure; therefore, to advance
an extra 6 points below where
MCX
would
normally place you, you'd enter
.MCX 6p
NOTE:
If you wish to advance a precise distance
below the
definitions.html#TERMS_BASELINE
baseline
of the longest column, use
MCX
with an
argument of 0 (zero; no unit of measure required) in conjunction
with the
#ALD
ALD
macro, like this:
.MCX 0
.ALD 24p
The above advances to precisely 24 points below the baseline
of the longest column.
Indents
With
mom
's indents, you can indent from the left,
the right, or both margins.  In addition,
mom
provides temporary left indents (i.e. only one line is indented,
as at the start of a paragraph) and "hanging" left indents
(the reverse of a temporary indent; the first line isn't indented,
subsequent lines are).
A brief explanation of how mom handles indents
Mom
provides five kinds of indents: left, right,
both, temporary, and hanging.  Each is invoked by its own name:
IL
=
I
ndent
L
eft
IR
=
I
ndent
R
ight
IB
=
I
ndent
B
oth
HI
=
H
anging
I
ndent
TI
=
T
emporary
I
ndent
In addition, there are four macros to control exiting from
indents:
IQ
= quit all active indents
ILX
= exit indent style left
IRX
= exit indent style right
IBX
= exit indent style both
This section deals exclusively with
IL, IR
and
IB
.  For an explanation
of hanging and temporary indents -- how they work and how to use
them -- see
#HI
Hanging indents
and
#TI
Temporary indents
.
The first time you invoke any of
mom
's indents,
you must supply a measure.  For example,
.IL 2P
indents text 2 picas from the left margin (or current tab
indent).
When you want to exit the above indent, use either
.IQ
or
.ILX
The next time you want the same indent, invoke it without the
argument, like this:
.IL
As you can see, once you've supplied a measure to an indent macro
mom
stores the value, obviating the need to repeat
it on subsequent invocations.  And
mom
doesn't just
store the measure -- she hangs on to it tenaciously.  Arguments passed
to
IL, IR
and
IB
are additive.
Consider the following:
.LL 20P
.IR 2P    \"Indent right by 2 picas
A first block of text...
...
...
.IQ       \"Turn indent off
A second block of text...
...
...
.IR 2P    \"Indent right by an additional 2 picas (i.e. 4 picas)
A third block of text...
...
...
The first block of text is right indented by 2 picas (i.e. the line
length is shortened by 2 picas to 18 picas).  The second block of
text, after
IQ
, is, as you'd expect, set to the full
measure.  The third block of text -- the one to pay attention to --
is not right indented by 2 picas, but rather by 4 picas.
Mom
adds the value of arguments to
IL,
IR
and
IB
to whatever value is already
in effect.
If you wanted the third block of text in the example above to
be right indented by just 2 picas (the original measure given to
IR
), you would enter
.IR
without an
argument.
Because indent arguments are additive, putting a minus sign in front
of the argument can be used to subtract from the current value.
In the following example, the first line is indented 18 points, the
second is indented 36 points (18+18), and the third is again indented
18 points (36-18).
.IL 18p     \"Indent left by 18 points      = 18 points
Now is the time
.IL 18p     \"Indent left by 18 points more = 36 points
for all good men to come
.IL -18p    \"Indent left by 18 points less = 18 points
to the aid of the party.
Sometimes, you may want to clear out the stored indent values -- let
mom
start indenting with a clean slate, as it were.
Giving the optional argument
CLEAR
to any of the
"indent quit" macros resets them to zero.
IQ CLEAR
= quit and clear all indents
ILX CLEAR
= quit and clear indent style left
IRX CLEAR
= quit and clear indent style right
IBX CLEAR
= quit and clear indent style both
Indent styles may be combined and manipulated separately.  You could,
for example, have a left indent of 4 picas and a right indent of 6
picas and control each separately, as in the following example.
.IL 4P     \"Indent left 4 picas
.IR 6P     \"Indent right 6 picas
Some text
.IRX       \"Turn off the right indent only
More text  \"Text is still indented 4 picas left
If, at
.IRX
, you wanted the text afterward to have no
indents (either left or right), you would enter
.IQ
,
which exits all indent styles at once.
A word of advice:
Indents are best used only when
you have a compelling reason not to change the current left margin or
line length.  In many instances where indents might seem expedient,
it's better to use tabs, or actually change the left margin or the
line length.
Mom
's indenting macros are flexible
and powerful, but easy to get tangled up in.  Personally, I don't
use them much, except for cutarounds and multi-level lists ? la html,
at which they excel.
NOTE:
see the section
typemacdoc.html#TYPESETTING
Typesetting Macros in Document Processing
for information and advice on using idents with the
docprocessing.html#DOCPROCESSING
document processing macros
.
Indents macro list
#IL
IL
(Indent left)
#IR
IR
(Indent right)
#IB
IB
(Indent both)
#TI
TI
(Temporary indent, left)
#HI
HI
(Hanging Indent)
#NUM_LISTS
A recipe for numbered lists
#IQ
IQ
(Quit indents, all)
#IQ
ILX
(Exit indent style left)
#IQ
IRX
(Exit indent style right)
#IQ
IBX
(Exit indent style both)
Indent left
Macro:
IL
[ <measure> ]
*The optional argument requires a
definitions.html#TERMS_UNITOFMEASURE
unit of measure
IL
indents text from the left margin of the page,
or if you're in a tab, from the left edge of the tab.  Once
IL
is on, the left indent is applied uniformly to
every subsequent line of text, even if you change the line length.
The first time you invoke
IL
, you must give it a
measure.  Subsequent invocations with a measure add to the previous
measure.  A minus sign may be prepended to the argument to subtract
from the current measure.  The
inlines.html#INLINE_STRINGWIDTH_GROFF
\w
definitions.html#TERMS_INLINES
inline escape
may be used to specify a text-dependent measure, in which case
no unit of measure is required.  For example,
.IL \w'margarine'
indents text by the width of the word "margarine".
With no argument,
IL
indents by its last
active value.  See the
#INDENTS_TUT
brief explanation of how mom handles indents
for more details.
NOTE:
Calling a tab (with
#TAB
TAB
)
automatically cancels any active indents.
ADDITIONAL NOTE:
Invoking
IL
automtically turns off
IB
.
Indent right
Macro:
IR
[ <measure> ]
*The optional argument requires a
definitions.html#TERMS_UNITOFMEASURE
unit of measure
IR
indents text from the right margin of the
page, or if you're in a tab, from the end of the tab.
The first time you invoke
IR
, you must give it a
measure.  Subsequent invocations with a measure add to the previous
indent measure.  A minus sign may be prepended to the argument to
subtract from the current indent measure.  The
inlines.html#INLINE_STRINGWIDTH_GROFF
\w
definitions.html#TERMS_INLINES
inline esacpe
may be used to specify a text-dependent measure, in which case
no unit of measure is required.  For example,
.IR \w'jello'
indents text by the width of the word "jello".
With no argument,
IR
indents by its last
active value.  See the
#INDENTS_TUT
brief explanation of how mom handles indents
for more details.
NOTE:
Calling a tab (with
#TAB
TAB
)
automatically cancels any active indents.
ADDITIONAL NOTE:
Invoking
IR
automtically turns off
IB
.
Indent both
Macro:
IB
[ <left measure> <right measure> ]
*The optional arguments require a
definitions.html#TERMS_UNITOFMEASURE
unit of measure
IB
allows you to set or invoke a left and a right
indent at the same time.
At its first invocation, you must supply a measure for both indents;
at subsequent invocations when you wish to supply a measure, both must
be given again.  As with
IL
and
IR
,
the measures are added to the values previously passed to the macro.
Hence, if you wish to change just one of the values, you must
give an argument of zero to the other.
A word of advice:
If you need to manipulate left and
right indents separately, use a combination of
IL
and
IR
instead of
IB
.  You'll
save yourself a lot of grief.
A minus sign may be prepended to the arguments to subtract from their
current values.  The
inlines.html#INLINE_STRINGWIDTH_GROFF
\w
definitions.html#TERMS_INLINES
inline esacpe
may be used to specify text-dependent measures, in which case
no unit of measure is required.  For example,
.IB \w'margaraine' \w'jello'
left indents text by the width of the word "margarine"
and right indents by the width of "jello".
Like
IL
and
IR
,
IB
with no argument indents by its last active values.  See the
#INDENTS_TUT
brief explanation of how mom handles indents
for more details.
NOTE:
Calling a tab (with
#TAB
TAB
)
automatically cancels any active indents.
ADDITIONAL NOTE:
Invoking
IB
automtically turns off
IL
and
IR
.
Temporary (left) indent
Macro:
TI
[ <measure> ]
*The optional argument requires a
definitions.html#TERMS_UNITOFMEASURE
unit of measure
A temporary indent is one that applies only to the first line of
text that comes after it.  It's chief use is indenting the first
line of paragraphs.  (
Mom
's
docprocessing.html#PP
PP
macro, for example, uses a temporary indent.)
The first time you invoke
TI
, you must give it
a measure.  If you want to indent the first line of a
paragraph by, say, 2
definitions.html#TERMS_EM
ems
,
do
.TI 2m
Subsequent invocations of
TI
do not require you
to supply a measure;
mom
keeps track of the
last measure you gave it.
Because temporary indents are temporary, there's no need to turn
them off.
IMPORTANT:
Unlike
IL, IR
and
IB
, measures given to
TI
are NOT additive.  In the following example, the second
.TI
2P
is exactly 2 picas.
.TI 1P
The beginning of a paragraph...
.TI 2P
The beginning of another paragraph...
Hanging indent
Macro:
HI
[ <measure> ]
*The optional argument requires a
definitions.html#TERMS_UNITOFMEASURE
unit of measure
A hanging indent looks like this:
The thousand injuries of Fortunato I had borne as best I
could, but when he ventured upon insult, I vowed
revenge.  You who so well know the nature of my soul
will not suppose, however, that I gave utterance to a
threat, at length I would be avenged...
The first line of text "hangs" outside the left
margin.
In order to use hanging indents, you must first have a left indent
active (set with either
#IL
IL
or
#IB
IB
).
Mom
will not hang text outside the left margin set with
#L_MARGIN
L_MARGIN
or outside the left margin of a tab.
The first time you invoke
HI
, you must give it
a measure.  If you want the first line of a paragraph to hang by,
say, 1 pica, do
.IL 1P
.HI 1P
Subsequent invocations of
HI
do not require you
to supply a measure;
mom
keeps track of the
last measure you gave it.
Generally speaking, you should invoke
HI
immediately
prior to the line you want hung (i.e. without any intervening
definitions.html#TERMS_CONTROLLINES
control lines
).
And because hanging indents affect only one line, there's no need to turn
them off.
A recipe for numbered lists
A common use for hanging indents is setting numbered lists.
Consider the following example:
.PAGE 8.5i 11i 1i 1i 1i 1i
.FAMILY  T
.FT      R
.PT_SIZE 12
.LS      14
.JUSTIFY
.KERN
.SS 0
.IL \w'\0\0.'    \"Indent left by 2 figure spaces and a period
.HI \w'\0\0.'    \"Hang first line of text back by 2 figure spaces and a period
1.\0The most important point to be considered is whether the
answer to the meaning of life, the universe, and everything
really is 42.  We have no-one's word on the subject except
Mr. Adams'.
.HI
2.\0If the answer to the meaning of life, the universe,
and everything is indeed 42, what impact does this have on
the politics of representation?  42 is, after all not a
prime number.  Are we to infer that prime numbers don't
deserve equal rights and equal access in the universe?
.HI
3.\0If 42 is deemed non-exclusionary, how do we present it
as the answer and, at the same time, forestall debate on its
exclusionary implications?
First, we invoke a left indent with a measure equal to the width
of 2
definitions.html#TERMS_FIGURESPACE
figures spaces
plus a period (using the
inlines.html#INLINE_STRINGWIDTH_GROFF
\w
inline escape).  At this point, the left indent is active; text
afterward would normally be indented.  However, we invoke a hanging
indent of exactly the same width, which hangs the first line (and
first line only!) to the left of the indent by the same distance
(in this case, that means "out to the left margin").
Because we begin the first line with a number, a period, and a
figure space, the actual text ("The most important point...")
starts at exactly the same spot as the indented lines that
follow.
Notice that subsequent invocations of
HI
without a
measure produce exactly the same effect.
Paste the example above into a file and preview it with
groff -mom -X
<filename>
to see hanging indents in action.
IMPORTANT:
Unlike
IL, IR
and
IB
, measures given to
HI
are NOT additive.  Each time you pass a measure to
HI
, the measure is treated literally.
Quitting indents
Macro:
IQ
[ CLEAR ]
(quit any/all indents -- see
*IMPORTANT NOTE
)
Macro:
ILX
[ CLEAR ]
(exit
I
ndent
L
eft)
Macro:
IRX
[ CLEAR ]
(exit
I
ndent
R
ight)
Macro:
IBX
[ CLEAR ]
(exit
I
ndent
B
oth)
*IMPORTANT NOTE:
Formerly, the macro for quitting all indents was
.IX
.  This usage is now deprecated, in favour
of
.IQ
.
.IX
will
continue to behave as before, but
mom
will
issue a warning to stderr indicating that you should update your
documents.
As a consequence of this change,
ILX, IRX
and
IBX
may
now also be invoked as
ILQ, IRQ
and
IBQ
.  Both forms are acceptable.
Without an argument, the macros to quit indents merely restore your
original left margin and line length.  The measures stored in the
indent macros themselves are saved so you can call them again without
having to supply a measure.
If you pass these macros the optional argument
CLEAR
,
they not only restore your original left margin and line length,
but also clear any values associated with a  particular indent style.
The next time you need an indent of the same style, you have to supply
a measure again.
IQ CLEAR
, as you'd suspect, quits and clears
the values for all indent styles at once.
goodies.html#TOP
Next
definitions.html#TOP
Prev
#TOP
Top
toc.html
Back to Table of Contents
