www.LinuxHowtos.org
GROFF_MOM
Section: Environments, Tables, and Troff Macros (7)Updated: 4 November 2014
Index Return to Main Contents
NAME
groff_mom - groff `mom' macros, `mom' is a `roff' language, part of `groff'SYNOPSIS
[ -Tps [pdfroff options] ] [groff options] files Ellipsis] [ -mom ] files Ellipsis] [ -m mom ] files ...CALLING MOM
mom is a macro set for groff, designed primarily to format documents for PDF and PostScript output. mom provides two categories of macros: macros for typesetting, and macros for document processing. The typesetting macros provide access to groff[aq]s typesetting capabilities in ways that are simpler to master than groff[aq]s primitives. The document processing macros provide highly customizable markup tags that allow the user to design and output professional-looking documents with a minimum of typesetting intervention. Files processed with pdfmom(1) with or without the -Tps option, produce PDF documents. The documents include a PDF outline that appears in the [oq]Contents[cq] panel of document viewers, and may contain clickable internal and external links. When -Tps is absent, groff[aq]s native PDF driver, gropdf, is used to generate the output. When given, the output is still PDF, but processing is passed over to pdfroff, which uses groff[aq]s PostScript driver, grops. Not all PDF features are available when -Tps is given; its primary use is to allow processing of files with embedded PostScript images. Files processed with groff -mom (or -m mom) produce PostScript output by default. mom comes with her own very complete documentation in HTML format. A separate PDF manual, Producing PDFs with groff and mom, covers full mom or PDF usage.FILES
- om.tmac
-
[en] the main macro file
-
mom.tmac
[en] a wrapper file that calls om.tmac directly.
- /usr/share/doc/groff-1.22.3/html/:mom/:toc.html
- [en] entry point to the HTML documentation
- /usr/share/doc/groff-1.22.3/pdf/:mom-pdf.pdf
- [en] the PDF manual, Producing PDFs with groff and mom
- /usr/share/doc/groff-1.22.3/examples/mom/*.mom
- [en] example files using mom
DOCUMENTATION IN ALPHABETICAL ORDER
- /usr/share/doc/groff-1.22.3/html/:mom/:toc.html
- [en] entry point to the HTML documentation That document is quite good for beginners, but other users should be happy to have some documentation in reference style. So we restrict this part to the alphabetical order of macros and escape sequences. But, so far, we took all documentation details from the toc.html file, just in a more useful alphabetical order. So this part of the man-page is nothing new, but only a logical arrangement.
QUICK REFERENCE
Quick Reference of Inline Escape Sequences in alphabetical Order
- begin using an initialized colour inline
- move backwards in a line
- [rs]*[BOLDER]
- invoke pseudo bold inline (related to macro .SETBOLDER)
- [rs]*[BOLDERX]
- off pseudo bold inline (related to macro .SETBOLDER)
- move characters pairs closer together inline (related to macro .KERN)
- [rs]*[COND]
- invoke pseudo condensing inline (related to macro .CONDENSE)
- [rs]*[CONDX]
- off pseudo condensing inline (related to macro .CONDENSE)
- pseudo-condensed superscript
- temporarily move downwards in a line
- [rs]*[EN-MARK]
- mark initial line of a range of line numbers (for use with line numbered endnotes)
- [rs]*[EXT]
- invoke pseudo extending inline (related to macro .EXTEND)
- [rs]*[EXTX]
- off pseudo condensing inline (related to macro .EXTEND)
- pseudo extended superscript
- move characters pairs further apart inline (related to macro .KERN)
- move forward in a line
- [rs]*[LEADER]
- insert leaders at the end of a line
- [rs]*[RULE]
- draw a full measure rule
- change the point size inline (related to macro .PT_SIZE)
- [rs]*[SLANT]
- invoke pseudo italic inline (related to macro .SETSLANT)
- [rs]*[SLANTX]
- off pseudo italic inline (related to macro .SETSLANT)
- string tabs (mark tab positions inline)
- superscript
- [rs]*[TB+]
- inline escape for .TN (Tab Next)
- invoke underlining inline (fixed width fonts only)
- temporarily move upwards in a line
Quick Reference of Macros in alphabetical Order
- .AUTOLEAD
- set the linespacing relative to the point size
- .B_MARGIN
- set a bottom margin
- .BR
- break a justified line
- .CENTER
- set line-by-line quad centre
- .CONDENSE
- set the amount to pseudo condense
- .EL
- break a line without advancing on the page
- .EXTEND
- set the amount to pseudo extend
- .FALLBACK_FONT
- establish a fallback font (for missing fonts)
- .FAM
- alias to .FAMILY
- .FAMILY <family>
- set the family type
- .FT
- set the font style (roman, italic, etc.)
- .HI [ <measure> ]
- hanging indent
- .HY
- automatic hyphenation on/off
- .HY_SET
- set automatic hyphenation parameters
- .IB [ <left measure> <right measure> ]
- indent both
- .IBX [ CLEAR ]
- exit indent both
- .IL [ <measure> ]
- indent left
- .ILX [ CLEAR ]
- exit indent left
- .IQ [ CLEAR ]
- quit any/all indents
- .IR [ <measure> ]
- indent right
- .IRX [ CLEAR ]
- exit indent right
- .JUSTIFY
- justify text to both margins
- .KERN
- automatic character pair kerning on/off
- .L_MARGIN
- set a left margin (page offset)
- .LEFT
- set line-by-line quad left
- .LL
- set a line length
- .LS
- set a linespacing (leading)
- .PAGE
- set explicit page dimensions and margins
- .PAGEWIDTH
- set a custom page width
- .PAGELENGTH
- set a custom page length
- .PAPER <paper_type>
- set common paper sizes (letter, A4, etc)
- .PT_SIZE
- set the point size
- .QUAD
- "justify" text left, centre, or right
- .R_MARGIN
- set a right margin
- .RIGHT
- set line-by-line quad right
- .SETBOLDER
- set the amount of emboldening
- .SETSLANT
- set the degree of slant
- .SPREAD
- force justify a line
- .SS
- set the sentence space size
- .T_MARGIN
- set a top margin
- .TI [ <measure> ]
- temporary left indent
- .WS
- set the minimum word space size
DOCUMENTATION OF DETAILS
Details of Inline Escape Sequences in alphabetical Order
- begin using an initialized colour inline
- move wards in a line
- [rs]*[BOLDER]
-
- [rs]*[BOLDERX]
- Emboldening on/off
-
[rs]*[BOLDER]
begins emboldening type.
[rs]*[BOLDERX]
turns the feature off.
Both are inline escapes, therefore they should not appear as separate
lines, but rather be embedded in text lines, like this:
-
[rs]*[BOLDER]
begins emboldening type.
[rs]*[BOLDERX]
turns the feature off.
Both are inline escapes, therefore they should not appear as separate
lines, but rather be embedded in text lines, like this:
- move characters pairs closer together inline (related to macro .KERN)
- [rs]*[COND]
-
- [rs]*[CONDX]
- Pseudo-condensing on/off
-
[rs]*[COND]
begins pseudo-condensing type.
[rs]*[CONDX]
turns the feature off.
Both are inline escapes, therefore they should not appear as separate
lines, but rather be embedded in text lines, like this:
-
[rs]*[COND]
begins pseudo-condensing type.
[rs]*[CONDX]
turns the feature off.
Both are inline escapes, therefore they should not appear as separate
lines, but rather be embedded in text lines, like this:
- pseudo-condensed superscript
- temporarily move downwards in a line
- [rs]*[EN-MARK]
- mark initial line of a range of line numbers (for use with line numbered endnotes)
- [rs]*[EXT]
-
- [rs]*[EXTX]
- Pseudo-extending on/off
-
[rs]*[EXT]
begins pseudo-extending type.
[rs]*[EXTX]
turns the feature off.
Both are inline escapes, therefore they should not appear as separate
lines, but rather be embedded in text lines, like this:
-
[rs]*[EXT]
begins pseudo-extending type.
[rs]*[EXTX]
turns the feature off.
Both are inline escapes, therefore they should not appear as separate
lines, but rather be embedded in text lines, like this:
- pseudo extended superscript
- move characters pairs further apart inline (related to macro .KERN)
- move forward in a line
- [rs]*[LEADER]
- insert leaders at the end of a line
- [rs]*[RULE]
- draw a full measure rule
- change the point size inline (related to macro .PT_SIZE)
- [rs]*[SLANT]
-
- [rs]*[SLANTX]
- Pseudo italic on/off
-
[rs]*[SLANT]
begins
pseudo-italicizing
type.
[rs]*[SLANTX]
turns the feature off.
Both are
inline
escapes,
therefore they should not appear as separate lines, but rather be
embedded in text lines, like this:
-
[rs]*[SLANT]
begins
pseudo-italicizing
type.
[rs]*[SLANTX]
turns the feature off.
Both are
inline
escapes,
therefore they should not appear as separate lines, but rather be
embedded in text lines, like this:
-
Mark positions of string tabs
-
The
quad
direction must be
LEFT
or
JUSTIFY
(see
.QUAD
and
.JUSTIFY)
or the
no-fill mode
set to
LEFT
in order for these inlines to function properly.
Please see
IMPORTANT,
below.
String tabs need to be marked off with inline escapes before being set
up with the
.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.
- .CENTER [rs]*[ST1]A line of text[rs]*[ST1X][rs]c .EL .ST 1 .TAB 1 .PT_SIZE 24 .ALD 3p [rs]*[RULE] .RLD 3p .TQ
- .QUAD CENTER .PAD #[rs]*[ST1]A line of text[rs]*[ST1X]# .EL .ST 1 .TAB 1 .PT_SIZE 24 .ALD 3p [rs]*[RULE] [rs] Note that you can[aq]t use [rs]*[UP] or [rs]*[DOWN] with [rs]*[RULE].RLD 3p .TQ
-
The
quad
direction must be
LEFT
or
JUSTIFY
(see
.QUAD
and
.JUSTIFY)
or the
no-fill mode
set to
LEFT
in order for these inlines to function properly.
Please see
IMPORTANT,
below.
String tabs need to be marked off with inline escapes before being set
up with the
.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.
- superscript
- [rs]*[TB+]
- Inline escape for .TN (Tab Next)
- invoke underlining inline (fixed width fonts only)
- temporarily move upwards in a line
Details of Macros in alphabetical Order
- .AUTOLEAD
- set the linespacing relative to the point size
- .B_MARGIN <bottom margin>
-
Bottom Margin
-
Requires a unit of measure
.B_MARGIN
sets a nominal position at the bottom of the page beyond which you
don[aq]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
-
Requires a unit of measure
.B_MARGIN
sets a nominal position at the bottom of the page beyond which you
don[aq]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
- .FALLBACK_FONT <fallback font> [ ABORT | WARN ]
-
Fallback Font
-
In the event that you pass an invalid argument to
.FAMILY
(i.e. a non-existent
family),
mom,
by default, uses the
fallback font,
Courier Medium Roman
(CR),
in order to continue processing your file.
If you[aq]d prefer another
fallback font,
pass
.FALLBACK_FONT
the full
family+font name
of the
font
you[aq]d like.
For example, if you[aq]d rather the
fallback font
were
Times Roman Medium Roman,
- .FALLBACK_FONT TR
- .FALLBACK_FONT WARN
- mom will issue a warning whenever you try to access a non-existent font but will continue processing your file with the default fallback font, Courier Medium Roman.
- .FALLBACK_FONT TR WARN
- mom will issue a warning whenever you try to access a non-existent font but will continue processing your file with a fallback font of Times Roman Medium Roman; additionally, TR will be the fallback font whenever you try to access a family that does not exist.
- .FALLBACK_FONT TR ABORT
- mom will abort whenever you try to access a non-existent font, and will use the fallback font TR whenever you try to access a family that does not exist. If, for some reason, you want to revert to ABORT, just enter .FALLBACK_FONT ABORT and mom will once again abort on font errors.
-
In the event that you pass an invalid argument to
.FAMILY
(i.e. a non-existent
family),
mom,
by default, uses the
fallback font,
Courier Medium Roman
(CR),
in order to continue processing your file.
If you[aq]d prefer another
fallback font,
pass
.FALLBACK_FONT
the full
family+font name
of the
font
you[aq]d like.
For example, if you[aq]d rather the
fallback font
were
Times Roman Medium Roman,
- .FAM <family>
- Type Family, alias of .FAMILY
- .FAMILY <family>
-
Type Family, alias .FAM
-
.FAMILY
takes one argument: the name of the
family
you want.
Groff
comes with a small set of basic families, each identified by a 1-,
2- or 3-letter mnemonic.
The standard families are:
- A = Avant Garde BM = Bookman H = Helvetica HN = Helvetica Narrow N = New Century Schoolbook P = Palatino T = Times Roman ZCM = Zapf Chancery
- .FAMILY H
- .FT ZCMI
- .FAMILY BM [rs] Bookman family .FT I [rs] Medium Italic <some text> [rs] Bookman Medium Italic .FAMILY H [rs] Helvetica family <more text> [rs] Helvetica Medium Italic
- .FAMILY UN [rs] Univers family .FT CD [rs] Medium Condensed <some text> [rs] Univers Medium Condensed .FAMILY H [rs] Helvetica family <more text> [rs] Courier Medium Roman!
- GARAMONDR GARAMONDI GARAMONDB GARAMONDBI
-
.FAMILY
takes one argument: the name of the
family
you want.
Groff
comes with a small set of basic families, each identified by a 1-,
2- or 3-letter mnemonic.
The standard families are:
- .FONT R | B | BI | <any other valid font style>
- Alias to .FT
- .FT R | B | BI | <any other valid font style>
-
Set font
-
By default,
groff
permits
.FT
to take one of four possible arguments specifying the desired font:
- R = (Medium) Roman I = (Medium) Italic B = Bold (Roman) BI = Bold Italic
- .FT B
- .FT HB
-
By default,
groff
permits
.FT
to take one of four possible arguments specifying the desired font:
- .HI [ <measure> ]
-
Hanging indent [em] the optional argument requires a 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 avengedEllipsis]
- .IL 1P .HI 1P
- .PAGE 8.5i 11i 1i 1i 1i 1i .FAMILY T .FT R .PT_SIZE 12 .LS 14 .JUSTIFY .KERN .SS 0 .IL [rs]w'[rs]0[rs]0.' .HI [rs]w'[rs]0[rs]0.' 1.[rs]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[aq]s word on the subject except Mr. Adams[aq]. .HI 2.[rs]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[aq]t deserve equal rights and equal access in the universe? .HI 3.[rs]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?
- pdfmom filename.mom | ps2pdf - filename.pdf
-
The thousand injuries of Fortunato I had borne as best I
-
A hanging indent looks like this:
- .IB [ <left measure> <right measure> ]
-
Indent both [em] the optional argument requires a 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[aq]ll save yourself a lot of grief.
A
minus sign
may be prepended to the arguments to subtract from their current
values.
The [rs]w inline escape may be used to specify text-dependent
measures, in which case no unit of measure is required.
For example,
- .IB [rs]w[aq]margarine[aq] [rs]w[aq]jello[aq]
-
.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[aq]ll save yourself a lot of grief.
A
minus sign
may be prepended to the arguments to subtract from their current
values.
The [rs]w inline escape may be used to specify text-dependent
measures, in which case no unit of measure is required.
For example,
- .IL [ <measure> ]
-
Indent left [em] the optional argument requires a unit of measure
-
.IL
indents text from the left margin of the page, or if you[aq]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
[rs]w
inline escape may be used to specify a text-dependent measure, in
which case no unit of measure is required.
For example,
- .IL [rs]w'margarine'
-
.IL
indents text from the left margin of the page, or if you[aq]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
[rs]w
inline escape may be used to specify a text-dependent measure, in
which case no unit of measure is required.
For example,
- .IQ [ <measure> ]
-
IQ [em] quit any/all indents
- IMPORTANT NOTE: The original macro for quitting all indents was .IX. This usage has been 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 margins 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[aq]d suspect, quits and clears the values for all indent styles at once.
- .IR [ <measure> ]
-
Indent right [em] the optional argument requires a unit of measure
-
.IR
indents text from the
right margin
of the page, or if you[aq]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 [rs]w inline escape may be used to specify a text-dependent
measure, in which case no
unit of measure
is required.
For example,
- .IR [rs]w'jello'
-
.IR
indents text from the
right margin
of the page, or if you[aq]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 [rs]w inline escape may be used to specify a text-dependent
measure, in which case no
unit of measure
is required.
For example,
- .L_MARGIN <left margin>
-
Left Margin
-
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.
Left indents and tabs are calculated from the value you pass to
.L_MARGIN,
hence it[aq]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[aq]d enter either
- .L_MARGIN 3P
- .L_MARGIN .5i
-
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.
Left indents and tabs are calculated from the value you pass to
.L_MARGIN,
hence it[aq]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[aq]d enter either
- .MCO
-
Begin multi-column setting.
- .MCO (Multi-Column On) is the macro you use to begin multi-column setting. It marks the current baseline as the top of your columns, for use later with .MCR. See the introduction to columns for an explanation of multi-columns and some sample input. Note: Do not confuse .MCO with the .COLUMNS macro in the document processing macros.
- .MCR
- Once you[aq]ve turned multi-columns on (with .MCO), .MCR, at any time, returns you to the top of your columns.
- .MCX [ <distance to advance below longest column> ]
-
Optional argument requires a unit of measure.
-
.MCX
takes you out of any
tab
you were in (by silently invoking
.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 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 argument.
The argument requires a unit of measure; therefore, to advance an
extra 6 points below where
.MCX
would normally place you, you[aq]d enter
- .MCX 6p
- .MCX 0 .ALD 24p
-
.MCX
takes you out of any
tab
you were in (by silently invoking
.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 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 argument.
The argument requires a unit of measure; therefore, to advance an
extra 6 points below where
.MCX
would normally place you, you[aq]d enter
- .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).
- .PAGE <width> [ <length> [ <lm> [ <rm> [ <tm> [ <bm> ] ] ] ] ]
-
-
All arguments require a unit of measure
IMPORTANT:
If you[aq]re using the document processing macros,
.PAGE
must come after
.START.
Otherwise, it should go at the top of a document, prior to any text.
And remember, when you[aq]re using the document processing macros, top
margin and bottom margin mean something slightly different than when
you[aq]re using just the typesetting macros (see Top and bottom margins
in document processing).
.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[aq]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[aq]s
all you want to set, enter
- .PAGE 11i 17i
- .PAGE 11i 17i 1i
-
CB].PAGE 11i 17i 1i 1i 1.5i
| | required right---+ +---top margin
marginR]
- .PAGE 8.5i 11i 45p 45p 45p 45p
- .RLD 1v
-
All arguments require a unit of measure
IMPORTANT:
If you[aq]re using the document processing macros,
.PAGE
must come after
.START.
Otherwise, it should go at the top of a document, prior to any text.
And remember, when you[aq]re using the document processing macros, top
margin and bottom margin mean something slightly different than when
you[aq]re using just the typesetting macros (see Top and bottom margins
in document processing).
.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[aq]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[aq]s
all you want to set, enter
- .PAGELENGTH <length of printer sheet>
-
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
-
Therefore, to tell
mom
your printer sheet is 11 inches long, you enter
- .PAGEWIDTH <width of printer sheet>
-
-
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
that the width of your printer sheet is 8½ inches, you enter
- .PAGEWIDTH 8.5i
-
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
that the width of your printer sheet is 8½ inches, you enter
- .PAPER <paper type>
- provides a convenient way to set the page dimensions for some common printer sheet sizes. The argument <paper type> can be one of: LETTER, LEGAL, STATEMENT, TABLOID, LEDGER, FOLIO, QUARTO, EXECUTIVE, 10x14, A3, A4, A5, B4, B5.
- .PRINTSTYLE
- .PT_SIZE <size of type in points>
-
Point size of type, does not require a
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[aq]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
- .PT_SIZE +2
- .PT_SIZE -2
- .ALIAS PS PT_SIZE
-
.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[aq]s a near universal convention that
type size
is measured in
points.
Therefore, to change the
type size
to, say,
11 points,
enter
- .R_MARGIN <right margin>
-
Right Margin
-
Requires a unit of measure.
IMPORTANT:
.R_MARGIN,
if used, must come after
.PAPER,
.PAGEWIDTH,
.L_MARGIN,
and/or
.PAGE
(if a right margin isn[aq]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[aq]t make the calculation if it doesn[aq]t know the page
width and the left margin.
.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 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[aq]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
- .LL 17P+3p
-
Requires a unit of measure.
IMPORTANT:
.R_MARGIN,
if used, must come after
.PAPER,
.PAGEWIDTH,
.L_MARGIN,
and/or
.PAGE
(if a right margin isn[aq]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[aq]t make the calculation if it doesn[aq]t know the page
width and the left margin.
.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 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[aq]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:
-
-
After
string tabs
have been marked off on an input line (see
[rs]*[ST]Ellipsis][rs]*[STX]),
you need to
set
them by giving them a direction and, optionally, the
QUAD
argument.
In this respect,
.ST
is like
.TAB_SET
except that you don[aq]t have to give
.ST
an indent or a line length (that[aq]s already taken care of, inline,
by
[rs]*[ST]Ellipsis][rs]*[STX]).
If you want string
tab 1
to be
left,
enter
- .ST 1 L
- .ST 1 L QUAD
- .ST 1 J
-
After
string tabs
have been marked off on an input line (see
[rs]*[ST]Ellipsis][rs]*[STX]),
you need to
set
them by giving them a direction and, optionally, the
QUAD
argument.
In this respect,
.ST
is like
.TAB_SET
except that you don[aq]t have to give
.ST
an indent or a line length (that[aq]s already taken care of, inline,
by
[rs]*[ST]Ellipsis][rs]*[STX]).
If you want string
tab 1
to be
left,
enter
- .TAB <tab number>
-
After
tabs
have been defined (either with
.TAB_SET
or
.ST),
.TAB
moves to whatever
tab number
you pass it as an argument.
-
For example,
- .TAB 3
- .TAB 1 A line of text in tab 1. .TAB 2 A line of text in tab 2.
- A line of text in tab 1. A line of text in tab 2.
- .TAB 1 A line of text in tab 1.[rs]*[TB+] A line of text in tab 2.
- A line of text in tab 1. A line of text in tab 2.
- B]TAB 1 Carrots Potatoes Broccoli .TAB 2 $1.99/5 lbs $0.25/lb $0.99/bunch
-
Carrots
Potatoes
Broccoli
$1.99/5 lbs
$0.25/lb
$0.99/bunch
-
For example,
- .TB <tab number>
- Alias to .TAB
- .TI [ <measure> ]
-
Temporary left indent [em] the optional argument requires a
unit of measure
-
A temporary indent is one that applies only to the first line of text
that comes after it.
Its chief use is indenting the first line of paragraphs.
(Mom[aq]s
.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 ems, do
- .TI 2m
- .TI 1P The beginning of a paragraphEllipsis] .TI 2P The beginning of another paragraphEllipsis]
-
A temporary indent is one that applies only to the first line of text
that comes after it.
Its chief use is indenting the first line of paragraphs.
(Mom[aq]s
.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 ems, do
- .TN
-
Tab Next
-
Inline escape
[rs]*[TB+]
TN
moves over to the
next tab
in numeric sequence
(tab n+1)
without advancing on the page.
See the
NOTE
in the description of the
.TAB
macro for an example of how
TN
works.
In
tabs
that aren[aq]t given the
QUAD
argument when they[aq]re set up with
.TAB_SET
or
ST,
you must terminate the line preceding
.TN
with the
[rs]c
inline escape.
Conversely, if you did give a
QUAD
argument to
.TAB_SET
or
ST,
the
[rs]c must not be used.
If you find remembering whether to put in the
[rs]c
bothersome, you may prefer to use the inline escape alternative
to
.TN,
[rs]*[TB+],
which works consistently regardless of the fill mode.
Note:
You must put text in the input line immediately after
.TN.
Stacking of
.TN[aq]s
is not allowed.
In other words, you cannot do
- .TAB 1 Some text[rs]c .TN Some more text[rs]c .TN .TN Yet more text
- .TAB 1 Some text[rs]c .TN Some more text[rs]c .TN [rs]&[rs]c .TN Yet more text
-
Inline escape
[rs]*[TB+]
TN
moves over to the
next tab
in numeric sequence
(tab n+1)
without advancing on the page.
See the
NOTE
in the description of the
.TAB
macro for an example of how
TN
works.
In
tabs
that aren[aq]t given the
QUAD
argument when they[aq]re set up with
.TAB_SET
or
ST,
you must terminate the line preceding
.TN
with the
[rs]c
inline escape.
Conversely, if you did give a
QUAD
argument to
.TAB_SET
or
ST,
the
[rs]c must not be used.
If you find remembering whether to put in the
[rs]c
bothersome, you may prefer to use the inline escape alternative
to
.TN,
[rs]*[TB+],
which works consistently regardless of the fill mode.
Note:
You must put text in the input line immediately after
.TN.
Stacking of
.TN[aq]s
is not allowed.
In other words, you cannot do
- .TQ
- TQ takes you out of whatever tab you were in, advances 1 linespace, and restores the left margin, line length, quad direction and fill mode that were in effect prior to invoking any tabs.
- .T_MARGIN <top margin>
-
Top margin
-
Requires a 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½ centimetres, you[aq]d enter
- .T_MARGIN 2.5c
- .T_MARGIN 1.5i
- .NEWPAGE .T_MARGIN 6P <text>
-
Requires a 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½ centimetres, you[aq]d enter
SEE ALSO
groff(1), groff_mom(7),- /usr/share/doc/groff-1.22.3/html/:mom/:toc.html
- [en] entry point to the HTML documentation
- [en] HTML documentation online
- [en] the mom macros homepage
BUGS
Please send bug reports to the groff-bug mailing list or directly to the authors.COPYING
Copyright [co] 2002-2014 Free Software Foundation, Inc.This file 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", either version 3 of the License, or (at your option) any later version.
You should have received a copy of the GNU General Public License along with groff, see the files COPYING and LICENSE in the top directory of the groff Text source package.
Or read the manpage gpl(1). You can also visit <http://www.gnu.org/licenses/>.
AUTHORS
mom was written by Peter Schaffter and revised by Werner LembergPDF support was provided by Deri James
The alphabetical documentation of macros and escape seqauences in this man-page were written by the mom team.