groff_mom (7) Linux Manual Page
groff_mom – groff “mom” macros; “mom” is a “roff” language, part of “groff”
Synopsis
[-Tps [pdfroff-option ]] [groff-option ] file -mom [option ] file -m mom [option ] file
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’s typesetting capabilities in ways that are simpler to master than groff’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 ‘Contents’ panel of document viewers, and may contain clickable internal and external links.
When -Tps is absent, groff’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’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
- /usr/:share/:groff/:1.22.4/:tmac/:om.tmac
- – the main macro file /usr/:share/:groff/:1.22.4/:tmac/:mom.tmac – a wrapper file that calls om.tmac directly.
- /usr/:share/:doc/:groff-base/:html/:mom/:toc.html
- – entry point to the HTML documentation
- /usr/:share/:doc/:groff-base/:pdf/:mom-pdf.pdf
- – the PDF manual, Producing PDFs with groff and mom
- /usr/:share/:doc/:groff-base/:examples/:mom/:*.mom
- – example files using mom
Documentation In Alphabetical Order
This part of the man page contains information just as in groff(7), mom macros and mom escape sequences in alphabetical order.
The logical order of mom macros and mom escape sequences is very well documented in
- /usr/:share/:doc/:groff-base/:html/:mom/:toc.html
- – 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
\*[BOLDER]- invoke pseudo bold inline (related to macro
.SETBOLDER) \*[BOLDERX]- off pseudo bold inline (related to macro
.SETBOLDER)- move characters pairs closer together inline (related to macro
.KERN) - move characters pairs closer together inline (related to macro
\*[COND]- invoke pseudo condensing inline (related to macro
.CONDENSE) \*[CONDX]- off pseudo condensing inline (related to macro
.CONDENSE)- pseudo-condensed superscript
- temporarily move downwards in a line
- pseudo-condensed superscript
\*[EN-MARK]- mark initial line of a range of line numbers (for use with line numbered endnotes)
\*[EXT]- invoke pseudo extending inline (related to macro
.EXTEND) \*[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
- pseudo extended superscript
\*[LEADER]- insert leaders at the end of a line
\*[RULE]- draw a full measure rule
- change the point size inline (related to macro
.PT_SIZE) - change the point size inline (related to macro
\*[SLANT]- invoke pseudo italic inline (related to macro
.SETSLANT) \*[SLANTX]- off pseudo italic inline (related to macro
.SETSLANT)- string tabs (mark tab positions inline)
- superscript
- string tabs (mark tab positions inline)
\*[TB+]- inline escape for
.TN(Tab Next)- invoke underlining inline (fixed width fonts only)
- temporarily move upwards in a line
- invoke underlining inline (fixed width fonts only)
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
\*[BOLDER]\*[BOLDERX]Emboldening on/off\*[BOLDER]begins emboldening type.\*[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:Alternatively, if you wanted the whole line emboldened, you should do
Once
\*[BOLDER]is invoked, it remains in effect until turned off.Note: If you’re using the document processing macros with
.PRINTSTYLE TYPEWRITE,momignores\*[BOLDER]requests.
- move characters pairs closer together inline (related to macro
.KERN)\*[COND]\*[CONDX]Pseudo-condensing on/off\*[COND]begins pseudo-condensing type.\*[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:\*[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.PT_SIZEmacro or with the\sinline 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.Note: If you’re using the document processing macros with
.PRINTSTYLE TYPEWRITE,momignores\*[COND]requests.
- pseudo-condensed superscript
- temporarily move downwards in a line
\*[EN-MARK]- mark initial line of a range of line numbers (for use with line numbered endnotes)
\*[EXT]\*[EXTX]Pseudo-extending on/off\*[EXT]begins pseudo-extending type.\*[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:\*[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.PT_SIZEmacro or with the\sinline 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.Note: If you are using the document processing macros with
.PRINTSTYLE TYPEWRITE,momignores\*[EXT]requests.
- pseudo extended superscript
- move characters pairs further apart inline (related to macro
.KERN)- move forward in a line
\*[LEADER]- insert leaders at the end of a line
\*[RULE]- draw a full measure rule
- change the point size inline (related to macro
.PT_SIZE) - change the point size inline (related to macro
\*[SLANT]\*[SLANTX]Pseudo italic on/off\*[SLANT]begins pseudo-italicizing type.\*[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:Alternatively, if you wanted the whole line pseudo-italicized, you’d do
Once
\*[SLANT]is invoked, it remains in effect until turned off.Note: If you’re using the document processing macros with
.PRINTSTYLE TYPEWRITE,momunderlines pseudo-italics by default. To change this behaviour, use the special macro.SLANT_MEANS_SLANT.
- Mark positions of string tabs
- The quad direction must be
LEFTorJUSTIFY(see.QUADand.JUSTIFY) or the no-fill mode set toLEFTin 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
.STmacro. 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.
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 padding) are taken into account when
momdetermines 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, after which they may be called, by number, with.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
.SILENTmacro.IMPORTANT: Owing to the way
groffprocesses input lines and turns them into output lines, it is not possible formomto guess the correct starting position of string tabs marked off in lines that are centered or set flush right.Equally, she cannot guess the starting position if a line is fully justified and broken with
.SPREAD.In other words, in order to use string tabs,
LEFTmust be active, or, if.QUAD LEFTorJUSTIFYare active, the line on which the string tabs are marked must be broken manually with.BR(but not.SPREAD).To circumvent this behaviour, I recommend using the
PADto set up string tabs in centered or flush right lines. Say, for example, you want to use a string tab to underscore the text of a centered line with a rule. Rather than this,.CENTER\*[ST1]A line of text\*[ST1X]
