summaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 19:44:05 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 19:44:05 +0000
commitd318611dd6f23fcfedd50e9b9e24620b102ba96a (patch)
tree8b9eef82ca40fdd5a8deeabf07572074c236095d /contrib
parentInitial commit. (diff)
downloadgroff-d318611dd6f23fcfedd50e9b9e24620b102ba96a.tar.xz
groff-d318611dd6f23fcfedd50e9b9e24620b102ba96a.zip
Adding upstream version 1.23.0.upstream/1.23.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'contrib')
-rw-r--r--contrib/chem/ChangeLog373
-rw-r--r--contrib/chem/README.txt50
-rw-r--r--contrib/chem/chem.1.man925
-rw-r--r--contrib/chem/chem.am120
-rw-r--r--contrib/chem/chem.pic89
-rwxr-xr-xcontrib/chem/chem.pl1231
-rw-r--r--contrib/chem/examples/122/README.txt57
-rw-r--r--contrib/chem/examples/122/ch2a_ethyl.chem43
-rw-r--r--contrib/chem/examples/122/ch2b_benzene.chem38
-rw-r--r--contrib/chem/examples/122/ch2c_benzene_right.chem36
-rw-r--r--contrib/chem/examples/122/ch4a_stick.chem45
-rw-r--r--contrib/chem/examples/122/ch4b_methyl_acetate.chem47
-rw-r--r--contrib/chem/examples/122/ch4c_colon.chem42
-rw-r--r--contrib/chem/examples/122/ch4d_HCl.H2O.chem38
-rw-r--r--contrib/chem/examples/122/ch4e_CaSO4.2H2O.chem38
-rw-r--r--contrib/chem/examples/122/ch4f_C.chem48
-rw-r--r--contrib/chem/examples/122/ch4g_BP.chem48
-rw-r--r--contrib/chem/examples/122/ch4h_methacrylate.chem65
-rw-r--r--contrib/chem/examples/122/ch4i_cyclo.chem45
-rw-r--r--contrib/chem/examples/122/ch4j_ring4.chem40
-rw-r--r--contrib/chem/examples/122/ch4k_ring3.chem40
-rw-r--r--contrib/chem/examples/122/ch4l_vertex.chem45
-rw-r--r--contrib/chem/examples/122/ch4m_double.chem38
-rw-r--r--contrib/chem/examples/122/ch4n_triple.chem38
-rw-r--r--contrib/chem/examples/122/ch4o_aromatic.chem37
-rw-r--r--contrib/chem/examples/122/ch4p_cholestanol.chem60
-rw-r--r--contrib/chem/examples/122/ch4q_rings.chem46
-rw-r--r--contrib/chem/examples/122/ch4r_spiro.chem42
-rw-r--r--contrib/chem/examples/122/ch4s_heteroatoms.chem38
-rw-r--r--contrib/chem/examples/122/ch4t_polycyclic.chem49
-rw-r--r--contrib/chem/examples/122/ch4u_nicotine.chem42
-rw-r--r--contrib/chem/examples/122/ch4v_histidine.chem44
-rw-r--r--contrib/chem/examples/122/ch4w_lsd.chem50
-rw-r--r--contrib/chem/examples/122/ch4x_anisole.chem42
-rw-r--r--contrib/chem/examples/122/ch4y_reserpine.chem62
-rw-r--r--contrib/chem/examples/122/ch4z1_eqn_glutamic.chem78
-rw-r--r--contrib/chem/examples/122/ch4z2_text.chem53
-rw-r--r--contrib/chem/examples/122/ch5a_size.chem45
-rw-r--r--contrib/chem/examples/122/ch6a_pic.chem43
-rw-r--r--contrib/chem/examples/122/ch6b_dna.chem59
-rw-r--r--contrib/chem/examples/122/chAa_polymer.chem72
-rw-r--r--contrib/chem/examples/122/chAb_vinyl_chloro.chem62
-rw-r--r--contrib/chem/examples/122/chAc_morphine.chem52
-rw-r--r--contrib/chem/examples/122/chAd_chlorophyll.chem69
-rw-r--r--contrib/chem/examples/122/chAe_chair.chem49
-rw-r--r--contrib/chem/examples/122/chAf_arrow.chem68
-rw-r--r--contrib/chem/examples/122/chAg_circle.chem54
-rw-r--r--contrib/chem/examples/122/chAh_brackets.chem60
-rw-r--r--contrib/chem/examples/122/chAi_poly_vinyl_chloride.chem141
-rw-r--r--contrib/chem/examples/122/chBa_jump.chem41
-rw-r--r--contrib/chem/examples/122/chBb_bonds.chem42
-rw-r--r--contrib/chem/examples/122/chBc_rings.chem43
-rw-r--r--contrib/chem/examples/README.txt47
-rw-r--r--contrib/chem/examples/atp.chem58
-rw-r--r--contrib/chem/examples/cholesterin.chem47
-rw-r--r--contrib/chem/examples/ethamivan.chem43
-rw-r--r--contrib/chem/examples/lsd.chem46
-rw-r--r--contrib/chem/examples/morphine.chem51
-rw-r--r--contrib/chem/examples/penicillin.chem52
-rw-r--r--contrib/chem/examples/reserpine.chem63
-rw-r--r--contrib/eqn2graph/eqn2graph.1.man188
-rw-r--r--contrib/eqn2graph/eqn2graph.am40
-rw-r--r--contrib/eqn2graph/eqn2graph.sh108
-rw-r--r--contrib/gdiffmk/ChangeLog212
-rw-r--r--contrib/gdiffmk/README53
-rw-r--r--contrib/gdiffmk/gdiffmk.1.man304
-rw-r--r--contrib/gdiffmk/gdiffmk.am59
-rw-r--r--contrib/gdiffmk/gdiffmk.sh367
-rw-r--r--contrib/gdiffmk/tests/baseline17
-rw-r--r--contrib/gdiffmk/tests/baseline.1026
-rw-r--r--contrib/gdiffmk/tests/baseline.617
-rw-r--r--contrib/gdiffmk/tests/baseline.6a17
-rw-r--r--contrib/gdiffmk/tests/baseline.72
-rw-r--r--contrib/gdiffmk/tests/baseline.826
-rw-r--r--contrib/gdiffmk/tests/baseline.926
-rw-r--r--contrib/gdiffmk/tests/baseline.9a26
-rw-r--r--contrib/gdiffmk/tests/file111
-rw-r--r--contrib/gdiffmk/tests/file211
-rwxr-xr-xcontrib/gdiffmk/tests/runtests.sh187
-rw-r--r--contrib/glilypond/ChangeLog290
-rw-r--r--contrib/glilypond/ChangeLog.0x104
-rw-r--r--contrib/glilypond/README.txt43
-rw-r--r--contrib/glilypond/examples/example.groff46
-rw-r--r--contrib/glilypond/glilypond.1.man881
-rw-r--r--contrib/glilypond/glilypond.am64
-rwxr-xr-xcontrib/glilypond/glilypond.pl1907
-rw-r--r--contrib/gperl/ChangeLog142
-rw-r--r--contrib/gperl/gperl.1.man491
-rw-r--r--contrib/gperl/gperl.am48
-rwxr-xr-xcontrib/gperl/gperl.pl257
-rw-r--r--contrib/gpinyin/ChangeLog200
-rw-r--r--contrib/gpinyin/gpinyin.1.man378
-rw-r--r--contrib/gpinyin/gpinyin.am56
-rwxr-xr-xcontrib/gpinyin/gpinyin.pl725
-rw-r--r--contrib/grap2graph/grap2graph.1.man205
-rw-r--r--contrib/grap2graph/grap2graph.am40
-rw-r--r--contrib/grap2graph/grap2graph.sh107
-rw-r--r--contrib/hdtbl/ChangeLog548
-rw-r--r--contrib/hdtbl/TODO21
-rw-r--r--contrib/hdtbl/examples/chess_board.roff64
-rw-r--r--contrib/hdtbl/examples/col_rowspan_colors.roff82
-rw-r--r--contrib/hdtbl/examples/color_boxes.roff52
-rw-r--r--contrib/hdtbl/examples/color_nested_tables.roff60
-rw-r--r--contrib/hdtbl/examples/color_table_cells.roff54
-rw-r--r--contrib/hdtbl/examples/color_transitions.roff58
-rw-r--r--contrib/hdtbl/examples/common.roff295
-rw-r--r--contrib/hdtbl/examples/fonts_n.in149
-rw-r--r--contrib/hdtbl/examples/fonts_x.in160
-rw-r--r--contrib/hdtbl/examples/mixed_pickles.roff104
-rw-r--r--contrib/hdtbl/examples/rainbow.roff86
-rw-r--r--contrib/hdtbl/examples/short_reference.roff86
-rw-r--r--contrib/hdtbl/examples/test-hdtbl.sh.in47
-rw-r--r--contrib/hdtbl/groff_hdtbl.7.man1346
-rw-r--r--contrib/hdtbl/hdmisc.tmac327
-rw-r--r--contrib/hdtbl/hdtbl.am136
-rw-r--r--contrib/hdtbl/hdtbl.tmac1003
-rw-r--r--contrib/mm/ChangeLog1672
-rw-r--r--contrib/mm/Makefile.sim84
-rw-r--r--contrib/mm/NOTES116
-rw-r--r--contrib/mm/README27
-rw-r--r--contrib/mm/examples/APP359
-rw-r--r--contrib/mm/examples/B1B298
-rw-r--r--contrib/mm/examples/COVER242
-rw-r--r--contrib/mm/examples/IND4198
-rw-r--r--contrib/mm/examples/LT1065
-rw-r--r--contrib/mm/examples/LT.se1069
-rw-r--r--contrib/mm/examples/ML176
-rw-r--r--contrib/mm/examples/MOVE182
-rw-r--r--contrib/mm/examples/MUL542
-rw-r--r--contrib/mm/examples/NCOL203
-rw-r--r--contrib/mm/examples/ND24
-rw-r--r--contrib/mm/examples/README40
-rw-r--r--contrib/mm/examples/References982
-rw-r--r--contrib/mm/examples/SETR116
-rw-r--r--contrib/mm/examples/letter.mm51
-rw-r--r--contrib/mm/groff_mm.7.man5428
-rw-r--r--contrib/mm/groff_mmse.7.man183
-rw-r--r--contrib/mm/m.tmac3734
-rw-r--r--contrib/mm/mm.am128
-rw-r--r--contrib/mm/mm.tmac4
-rw-r--r--contrib/mm/mm/0.MT175
-rw-r--r--contrib/mm/mm/4.MT110
-rw-r--r--contrib/mm/mm/5.MT61
-rw-r--r--contrib/mm/mm/ms.cov121
-rw-r--r--contrib/mm/mm/se_ms.cov3
-rw-r--r--contrib/mm/mmroff.1.man171
-rw-r--r--contrib/mm/mmroff.pl179
-rw-r--r--contrib/mm/mmse.tmac4
-rw-r--r--contrib/mm/mse.tmac166
-rw-r--r--contrib/mm/refer-mm.tmac109
-rwxr-xr-xcontrib/mm/tests/LT_SP_AU_without_AT_works.sh50
-rwxr-xr-xcontrib/mm/tests/LT_SP_multi-word_LO_SJ_works.sh49
-rwxr-xr-xcontrib/mm/tests/MT-1-reports-all-TM-numbers.sh53
-rwxr-xr-xcontrib/mm/tests/MT_5_includes_AT_in_SG.sh43
-rwxr-xr-xcontrib/mm/tests/P-indentation-works.sh135
-rw-r--r--contrib/mm/tests/artifacts/60657.ref11
-rwxr-xr-xcontrib/mm/tests/ms_cover_sheet_robust_to_missing_AF.sh39
-rwxr-xr-xcontrib/mm/tests/mse_has-sufficient-footnote-space.sh77
-rwxr-xr-xcontrib/mm/tests/place-equation-labels-correctly-in-displays.sh62
-rwxr-xr-xcontrib/mm/tests/remove-stale-bib-entry-data.sh72
-rwxr-xr-xcontrib/mm/tests/short-pages-do-not-overflow-stack.sh59
-rw-r--r--contrib/mom/BUGS985
-rw-r--r--contrib/mom/ChangeLog1788
-rw-r--r--contrib/mom/NEWS710
-rw-r--r--contrib/mom/TODO10
-rw-r--r--contrib/mom/copyright24
-rw-r--r--contrib/mom/examples/README-fr.txt126
-rw-r--r--contrib/mom/examples/README.txt119
-rw-r--r--contrib/mom/examples/copyright-chapter.mom160
-rw-r--r--contrib/mom/examples/copyright-default.mom149
-rw-r--r--contrib/mom/examples/elvis_syntax96
-rw-r--r--contrib/mom/examples/elvis_syntax.new116
-rw-r--r--contrib/mom/examples/letter.mom46
-rw-r--r--contrib/mom/examples/mom-pdf.mom620
-rw-r--r--contrib/mom/examples/mom.vim140
-rw-r--r--contrib/mom/examples/mon_premier_doc.mom140
-rw-r--r--contrib/mom/examples/penguin.pdf148
-rw-r--r--contrib/mom/examples/penguin.ps461
-rw-r--r--contrib/mom/examples/sample_docs.mom713
-rw-r--r--contrib/mom/examples/slide-demo.mom438
-rw-r--r--contrib/mom/examples/test-mom.sh.in92
-rw-r--r--contrib/mom/examples/typesetting.mom707
-rw-r--r--contrib/mom/groff_mom.7.man3427
-rw-r--r--contrib/mom/mom.am182
-rw-r--r--contrib/mom/mom.tmac3
-rw-r--r--contrib/mom/momdoc/appendices.html901
-rw-r--r--contrib/mom/momdoc/color.html505
-rw-r--r--contrib/mom/momdoc/cover.html851
-rw-r--r--contrib/mom/momdoc/definitions.html995
-rw-r--r--contrib/mom/momdoc/docelement.html6639
-rw-r--r--contrib/mom/momdoc/docprocessing.html4420
-rw-r--r--contrib/mom/momdoc/goodies.html1785
-rw-r--r--contrib/mom/momdoc/graphical.html689
-rw-r--r--contrib/mom/momdoc/headfootpage.html2341
-rw-r--r--contrib/mom/momdoc/images.html3515
-rw-r--r--contrib/mom/momdoc/inlines.html1112
-rw-r--r--contrib/mom/momdoc/intro.html487
-rw-r--r--contrib/mom/momdoc/letters.html577
-rw-r--r--contrib/mom/momdoc/macrolist.html1529
-rw-r--r--contrib/mom/momdoc/rectoverso.html350
-rw-r--r--contrib/mom/momdoc/refer.html2129
-rw-r--r--contrib/mom/momdoc/reserved.html2736
-rw-r--r--contrib/mom/momdoc/stylesheet.css691
-rw-r--r--contrib/mom/momdoc/tables-of-contents.html1224
-rw-r--r--contrib/mom/momdoc/toc.html476
-rw-r--r--contrib/mom/momdoc/typesetting.html4988
-rw-r--r--contrib/mom/momdoc/using.html319
-rw-r--r--contrib/mom/momdoc/version-2.html424
-rw-r--r--contrib/mom/om.tmac24571
-rw-r--r--contrib/pdfmark/ChangeLog683
-rw-r--r--contrib/pdfmark/PROBLEMS32
-rw-r--r--contrib/pdfmark/README57
-rw-r--r--contrib/pdfmark/TODO60
-rw-r--r--contrib/pdfmark/cover.ms70
-rw-r--r--contrib/pdfmark/pdfmark.am99
-rw-r--r--contrib/pdfmark/pdfmark.ms2831
-rw-r--r--contrib/pdfmark/pdfmark.tmac1953
-rw-r--r--contrib/pdfmark/pdfroff.1.man981
-rw-r--r--contrib/pdfmark/pdfroff.sh682
-rw-r--r--contrib/pdfmark/sanitize.tmac170
-rw-r--r--contrib/pdfmark/spdf.tmac328
-rw-r--r--contrib/pic2graph/pic2graph.1.man234
-rw-r--r--contrib/pic2graph/pic2graph.am40
-rw-r--r--contrib/pic2graph/pic2graph.sh122
-rw-r--r--contrib/rfc1345/COPYRIGHT23
-rw-r--r--contrib/rfc1345/groff_rfc1345.7.man265
-rw-r--r--contrib/rfc1345/rfc1345.am41
-rw-r--r--contrib/rfc1345/rfc1345.tmac1705
-rwxr-xr-xcontrib/rfc1345/tests/rfc1345-smoke-test.sh31
-rw-r--r--contrib/sboxes/ChangeLog202
-rw-r--r--contrib/sboxes/msboxes.ms.in272
-rw-r--r--contrib/sboxes/notquine.sed18
-rw-r--r--contrib/sboxes/sboxes.am74
-rw-r--r--contrib/sboxes/sboxes.tmac147
234 files changed, 127134 insertions, 0 deletions
diff --git a/contrib/chem/ChangeLog b/contrib/chem/ChangeLog
new file mode 100644
index 0000000..ad40944
--- /dev/null
+++ b/contrib/chem/ChangeLog
@@ -0,0 +1,373 @@
+2022-08-18 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * chem.pl: Refactor.
+ - Rename scalars.
+ Copyright -> copyright
+ Program_Version -> chem_version
+ Groff_Version -> groff_version
+ Chem_Name -> chem
+ before_make -> is_in_source_tree
+ - Rename hash.
+ at_at -> makevar
+ - Drop unused hash member `$makevar{'BINDIR'}`.
+ - Drop scalar `Groff_Version_Preset`, which apparently hadn't
+ been updated since groff 1.20. Instead, follow grog(1) and
+ set the `groff_version` scalar to "DEVELOPMENT" if this is
+ the version from the groff source tree. Overwrite its value
+ with that determined by make(1) if available.
+ - Tighten usage and version messages; make the latter more
+ conformant with the format recommended in the GNU Coding
+ Standards. Explicitly identify license as GNU GPLv2.
+ (usage): Refer to "pic" with its command prefix if it is known
+ to have one. (If running "unbuilt", we have no way to know.)
+
+2022-08-18 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * chem.pl: Stop copying "pic.tmac" (fallback troff macro
+ definitions) into the output. It might not be necessary and it
+ is inappropriate to do so if a macro package offers its own
+ definitions or the user has made other arrangements on the
+ command line. (The same thing can be achieved with the "-mpic"
+ argument to the formatter or a front end.) Bump version number.
+
+2022-06-15 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * chem.1.man: Fix markup nits. Use idiomatic input style,
+ placing newlines after sentences and commas. Also put an empty
+ request between sentences.
+
+ Fixes <https://savannah.gnu.org/bugs/?51328>.
+
+2022-04-12 Ingo Schwarze <schwarze@openbsd.org>
+
+ Delete the harmful, ill-designed, buggy, and essentially
+ unmaintained and untested --with-doc option of the configure
+ script. See the NEWS file for more details on the rationale.
+
+ * chem.am: Delete three BUILD_EXAMPLES conditionals.
+
+2020-04-22 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * chem.1.man:
+ * examples/122/README.txt:
+ * examples/README.txt: Delete references to groffer.
+
+2018-02-28 Werner LEMBERG <wl@gnu.org>
+
+ * chem.am (chem, README): Use $(AM_V_GEN) to silence file generation.
+
+2015-08-22 Bernd Warken <bernd.warken@web.de>
+
+ * chem.1.man: Rename `chem.man'.
+
+ * chem.am: Include renaming.
+
+2015-08-05 Bernd Warken <bernd.warken@web.de>
+
+ * chem.am: Add `Last update'. Setup Emacs makefile-automake-mode.
+
+2015-04-03 Werner LEMBERG <wl@gnu.org>
+
+ * chem.man: Make it work in compatibility mode.
+ (EL): Fix typo.
+
+2014-09-25 Bernd Warken <bernd.warken@web.de>
+
+ * chem.pl: New chem version 1.0.5.
+
+ * Makefile.sub: Add .PHONY. Restructure install and uninstall.
+
+2014-09-03 Bernd Warken <bernd.warken@web.de>
+
+ * chem.pl: New chem version 1.0.4. Change version().
+
+ * all `chem' source files: Add and improve the copying
+ information. Remove last update. Add Emacs setting if necessary.
+
+2014-07-05 Bernd Warken <bernd.warken@web.de>
+ ________________________________________________________________
+ * chem.pl: New chem version 1.0.3
+
+ * chem.man: Make file doclifter compatible.
+
+2014-07-04 Bernd Warken <bernd.warken@web.de>
+ ________________________________________________________________
+ * release of chem 1.0.2
+
+ * chem.man: Remove definition of `.FONT'.
+
+2014-07-04 Bernd Warken <bernd.warken@web.de>
+
+ * chem.man: Transform into classical man-page style.
+
+2014-07-04 Bernd Warken <bernd.warken@web.de>
+
+ * chem.man: Remove definition of .Env-var.
+
+2014-07-03 Bernd Warken <bernd.warken@web.de>
+ ________________________________________________________________
+ * release of chem 1.0.1
+
+ * chem.man: Add `.mso' for `groffer.man'.
+
+2014-06-17 Bernd Warken <bernd.warken@web.de>
+ ________________________________________________________________
+ * release of chem 1.0.0
+
+ * Makefile.sub: Add Emacs final part.
+
+ * ChangeLog: Correct the space characters in this file as Emacs
+ style.
+
+2014-03-29 Steffen Nurpmeso <sdaoden@yandex.com>
+
+ * Makefile.sub (uninstall_examples): Remove superfluous `rmdir'.
+
+2014-03-29 Steffen Nurpmeso <sdaoden@yandex.com>
+
+ * Makefile.sub (install_examples): Use `find', not shell globs.
+
+ Instead of using rm(1) two times with shell globs the expansion of
+ which will include subdirectories (thus resulting in error
+ messages), use find(1) and its `-exec' operand.
+
+2014-03-29 Steffen Nurpmeso <sdaoden@yandex.com>
+
+ * Makefile.sub: Handle examples separately, controlled by
+ $(make{_,_install_,_uninstall_}examples).
+
+2013-01-29 Bernd Warken <bernd.warken@web.de>
+
+ * all: Change license into GPL2.
+
+2013-01-29 Werner LEMBERG <wl@gnu.org>
+
+ * Makefile.sub (MOSTLYCLEANADD): Fix typo.
+
+2010-12-13 Werner LEMBERG <wl@gnu.org>
+
+ Really fix handling of examples/122.
+
+ * examples/122/README: Renamed to...
+ * examples/122/README.txt: This.
+
+ * Makefile.sub (all, MOSTLYCLEANADD): Add `examples/122/README'.
+ (examples/122/README): New target.
+ (install_data): Fix typo.
+
+2010-06-02 Larry Jones <lawrence.jones@siemens.com>
+
+ * Makefile.sub (install): Fix handling of examples/122.
+ It tried to process the CVS subdirectory as a file.
+
+2009-01-03 Werner LEMBERG <wl@gnu.org>
+
+ * chem.pl: Prepare for groff version 1.20.
+
+2008-01-04 Werner LEMBERG <wl@gnu.org>
+
+ * chem.man: Insert `\:' in URLs where appropriate.
+
+2007-02-06 Eric S. Raymond <esr@snark.thyrsus.com>
+
+ * chem.man: Change .UR/.UE and .MT/.ME so the start macro no
+ longer takes a second argument that is pasted to the end of the
+ generated text. Instead, the end macro takes an argument that
+ does the same thing.
+
+2007-02-02 Werner LEMBERG <wl@gnu.org>
+
+ * chem.man: Further refinements and normalizations.
+
+2007-02-02 Eric S. Raymond <esr@snark.thyrsus.com>
+
+ * chem.man: Converted to use .SY/.OP/.YS and for cross-viewer
+ portability. Conversion checked using the protocol described in
+ tmac/TESTING-HINTS.
+
+2006-11-10 Bernd Warken <groff-bernd.warken-72@web.de>
+ ________________________________________________________________
+ * release of chem 0.3.1
+
+ * chem.man: Add information about example files.
+
+2006-11-10 Werner LEMBERG <wl@gnu.org>
+
+ * chem.man1: Rename back to...
+ * chem.man: This.
+ Use @G@, @MACRODIR@, and @DATASUBDIR@.
+
+ * Makefile.sub (CLEANADD, all): Don't handle chem.man.
+ (chem.man): Remove rule.
+ (chem): s/tmacdir/MACRODIR/, s/picdir/PICDIR/.
+
+ * chem.pl: s/tmacdir/MACRODIR/, s/picdir/PICDIR/.
+
+2006-11-10 Bernd Warken <groff-bernd.warken-72@web.de>
+ ________________________________________________________________
+ * release of chem 0.3.0
+
+ * chem.man1: Rename `chem.man' to translate some `@...@'
+ constructs. Some minor corrections. Remove some unused macros.
+
+ * examples/README.txt, examples/122/README: Add information on
+ `roff2*' programs.
+
+ * chem.pic: Rename `macros.pic'.
+
+ * Makefile.sub, chem.pl: Replace `macros.pic' by `chem.pic'.
+
+2006-11-09 Werner LEMBERG <wl@gnu.org>
+
+ * chem.man: Revised.
+
+2006-11-08 Bernd Warken <groff-bernd.warken-72@web.de>
+ ________________________________________________________________
+ * release of chem 0.2.0
+
+ * pic.tmac: Remove this file. Use instead the installed pic.tmac
+ in $(tmacdir).
+
+ * Makefile.sub, chem.pl:
+ - Install macros.pic to $(tmacdir)/pic/chem.pic.
+ - Remove parts with `libdir'.
+
+2006-11-07 Werner LEMBERG <wl@gnu.org>
+
+ * Makefile.sub: Add and fix $(srcdir) where necessary to make it
+ compile with srcdir != builddir. Other minor fixes improvements.
+
+2006-11-07 Bernd Warken <groff-bernd.warken-72@web.de>
+ ________________________________________________________________
+ * release of chem 0.1.2
+
+ ### `chem' works now with all example files (examples/*.chem and
+ examples/122/*.chem).
+
+ * examples/122/README: Add some information on the example files.
+
+ * examples/122/chAi_poly_vinyl_chloride.chem: Use .ps with
+ argument `-2' and recall `.ps +2' at the end of the file. This
+ stops the size shift in the following files.
+
+ * examples/122/ch6b_dna.chem: Make the file runnable, it works
+ now.
+
+ * examples/reserpine.chem: Change access to `begin chem'.
+
+ * chem.man:
+ - Fix the BUGS section.
+ - Correct the name of the macro file to `macros.pic'.
+ - Extent section DESCRIPTION and LANGUAGE.
+ - Moieties and Strings: Rewritten section about moieties and
+ double quoted strings.
+
+ * chem.pl:
+ - parameter check: Add filespecs only when non-empty file.
+ - Set $Last_Type to $OTHER for the `pic' command.
+ - joinring(), label(), labsave(), reduce(): Remove these functions.
+ - `[', `]', `{', `}', `define': Make these and the defined
+ functions commands for `chem' without using the `pic' word.
+ - @Words: Fix it such that all double quoted strings are
+ completely in an element.
+ - `Last: ': Remove this prefix from all commands that are related
+ to `pic'.
+
+ ### global variables
+
+ * chem.pl:
+ - $Line: Add this variable to store the unchanged input line.
+ - %Params: Add the variables from setparams() to this hash.
+ - %Types: Add BOND, MOL, RING, OTHER from init() to this hash.
+ - %Put: Move %put to this.
+ - %Dbl: Move %dbl to this.
+ - %Labtype: Move %labtype to this.
+ - %Aromatic: Move $aromatic to this.
+ - %Dc: Move %dc to this.
+ - %Nput: Move $nput to this.
+ - %Define: New hash for storing the names of the `define'
+ constructs during `chem'. Use the elements in `%Define' as `chem'
+ commands.
+
+2006-10-27 Bernd Warken <groff-bernd.warken-72@web.de>
+ ________________________________________________________________
+ * release of chem 0.1.1
+
+ * chem.pl:
+ - Add handling of `[' and `]' (extension of chem awk).
+ - Restrict line break after labels.
+
+ * ChangeLog: Correct the former entry.
+
+2006-10-26 Bernd Warken <groff-bernd.warken-72@web.de>
+ ________________________________________________________________
+ * release of chem 0.1.0
+
+ ### Extensions to the chem awk version.
+
+ * chem.pl:
+ - parameters: -h, --help, -v, --version, -- are added as options.
+ The minus character - is added as filespec for standard input, it
+ may be used several times.
+ - remove the functions `inline', `shiftfields', and `set'.
+ - Fix the handling of the initialization commands .PS, .cstart,
+ `begin chem', and `end'.
+ - Add error massages.
+ - error(): Add file name.
+ - Add concatenation of lines with final backslash `\'.
+ - Add pic.tmac to guarantee that each pic display is centered.
+ - Warnings and strict are active.
+
+ ### Source files of the chem Perl version
+
+ * chem.pl: Source file for the Perl version of chem.
+
+ * macros.pic: Pic macro file that is loaded by each run of chem.
+
+ * pic.tmac: Macro file for .PS and .PE; taken over from the groff
+ source file <groff-top-source>/tmac/pic.tmac.
+
+ * Makefile.sub: Make file for the groff system.
+
+ * ChangeLog: This file.
+
+ * chem.man: Manual page for the Perl version of chem.
+
+ * README.txt: File for information on this chem version.
+
+ * examples/*.chem: Self-constructed example files for chem.
+
+ * examples/README.txt: Information on the example files.
+
+ * examples/122/*.chem: Example files from the classical chem book
+ 122.ps at <http://cm.bell-labs.com/cm/cs/cstr/122.ps.gz>.
+
+ * examples/122/README: Information on the example files in this
+ directory.
+
+2006-10-16 Bernd Warken <groff-bernd.warken-72@web.de>
+
+ * awk version of chem
+ chem is a roff preprocessor that generates chemical structure
+ diagrams suitable for the pic preprocessor. The original version
+ of chem is an awk script written by Brian Kernighan. This project
+ is a rewrite of chem in Perl.
+
+2006-10-15 Bernd Warken <groff-bernd.warken-72@web.de>
+________________________________________________________________
+License
+
+Copyright (C) 2006-2020 Free Software Foundation, Inc.
+Written by Bernd Warken <groff-bernd.warken-72@web.de>.
+
+Copying and distribution of this file, with or without
+modification, are permitted provided the copyright notice and this
+notice are preserved.
+
+This file is part of `chem', which is part of the `groff' project.
+
+
+##### Editor settings
+Local Variables:
+mode: change-log
+End:
diff --git a/contrib/chem/README.txt b/contrib/chem/README.txt
new file mode 100644
index 0000000..06baed2
--- /dev/null
+++ b/contrib/chem/README.txt
@@ -0,0 +1,50 @@
+'chem' is a 'roff' language to generate chemical structure diagrams.
+'@g@chem' is a 'groff' preprocessor that produces output suitable for
+the '@g@pic' preprocessor.
+
+The original version of 'chem' is an 'awk' script written by Brian
+Kernighan <http://cm.bell-labs.com/cm/cs/who/bwk/index.html>. The
+source files of the 'awk' version of 'chem' are available at
+<http://cm.bell-labs.com/netlib/typesetting/chem.gz>.
+
+This project is a rewrite of 'chem' in Perl for the GNU 'roff' project
+'groff'. It was written under Perl v5.8.8, but at least Perl v5.6 is
+needed to run the Perl version of 'chem'.
+
+In comparison to the original 'awk' version of 'chem', the Perl
+version does the following changements:
+- the options -h, --help, -v, --version to output usage and version
+information are added.
+- remove some functions 'inline', 'shiftfields', and 'set' and some
+variables that are used only once.
+
+The subdirectory 'examples/' contains example files for chem. They
+are written in the 'chem' language. The file names end with .chem.
+
+
+####### License
+
+Copyright (C) 2006-2020 Free Software Foundation, Inc.
+Written by Bernd Warken <groff-bernd.warken-72@web.de>.
+
+This file is part of 'chem', which is part of 'groff'.
+
+'groff' is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License (GPL) version 2 as
+published by the Free Software Foundation.
+
+'groff' is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+for more details.
+
+The GPL2 license text is available in the internet at
+<http://www.gnu.org/licenses/gpl-2.0.html>.
+
+
+##### Editor settings
+Local Variables:
+fill-column: 72
+mode: text
+End:
+vim: set textwidth=72:
diff --git a/contrib/chem/chem.1.man b/contrib/chem/chem.1.man
new file mode 100644
index 0000000..a02242f
--- /dev/null
+++ b/contrib/chem/chem.1.man
@@ -0,0 +1,925 @@
+.TH @g@chem @MAN1EXT@ "@MDATE@" "groff @VERSION@"
+.SH Name
+@g@chem \- embed chemical structure diagrams in
+.I groff
+documents
+.
+.
+.\" ====================================================================
+.\" Legal Terms
+.\" ====================================================================
+.\"
+.\" Copyright (C) 2006-2020 Free Software Foundation, Inc.
+.\"
+.\" This file is part of chem, which is part of groff, a free software
+.\" project.
+.\"
+.\" You can redistribute it and/or modify it under the terms of the GNU
+.\" General Public License version 2 (GPL2) as published by the Free
+.\" Software Foundation.
+.\"
+.\" The license text for GPL2 is available in the internet at
+.\" <http://www.gnu.org/licenses/gpl-2.0.html>.
+.
+.
+.\" Save and disable compatibility mode (for, e.g., Solaris 10/11).
+.do nr *groff_chem_1_man_C \n[.cp]
+.cp 0
+.
+.\" Define fallback for groff 1.23's MR macro if the system lacks it.
+.nr do-fallback 0
+.if !\n(.f .nr do-fallback 1 \" mandoc
+.if \n(.g .if !d MR .nr do-fallback 1 \" older groff
+.if !\n(.g .nr do-fallback 1 \" non-groff *roff
+.if \n[do-fallback] \{\
+. de MR
+. ie \\n(.$=1 \
+. I \%\\$1
+. el \
+. IR \%\\$1 (\\$2)\\$3
+. .
+.\}
+.rr do-fallback
+.
+.
+.\" ====================================================================
+.SH Synopsis
+.\" ====================================================================
+.
+.SY @g@chem
+.RB [ \-\- ]
+.RI [ file\~ .\|.\|.]
+.YS
+.
+.
+.SY @g@chem
+.B \-h
+.
+.SY @g@chem
+.B \-\-help
+.YS
+.
+.
+.SY @g@chem
+.B \-v
+.
+.SY @g@chem
+.B \-\-version
+.YS
+.
+.
+.\" ====================================================================
+.SH Description
+.\" ====================================================================
+.
+.I chem
+produces chemical structure diagrams.
+.
+Today's version is best suited for organic chemistry (bonds, rings).
+.
+The
+.I @g@chem
+program is a
+.I groff
+preprocessor like
+.IR @g@eqn ,
+.IR @g@pic ,
+.IR @g@tbl ,
+etc.
+.
+It generates
+.I pic
+output such that all
+.I chem
+parts are translated into diagrams of the
+.I pic
+language.
+.
+.
+.P
+If no operands are given,
+or if
+.I file
+is
+.RB \[lq] \- \[rq],
+.I @g@chem
+reads the standard input stream.
+.
+.B \-h
+and
+.B \-\-help
+display a usage message,
+whereas
+.B \-v
+and
+.B \-\-version
+display version information;
+all exit.
+.
+.
+.P
+The program
+.I @g@chem
+originates from the Perl source file
+.IR chem.pl .
+.
+It tells
+.I @g@pic
+to include a copy of the macro file
+.IR chem.pic .
+.
+Moreover the
+.I groff
+source file
+.I pic.tmac
+is loaded.
+.
+.
+.P
+In a style reminiscent of
+.I eqn
+and
+.IR pic ,
+the
+.I chem
+diagrams are written in a special language.
+.
+.
+.P
+A set of
+.I chem
+lines looks like this
+.
+.
+.IP
+.EX
+\&.cstart
+.I chem data
+\&.cend
+.EE
+.
+.
+.P
+Lines containing the keywords
+.B .cstart
+and
+.B .cend
+start and end the input for
+.IR @g@chem ,
+respectively.
+.
+In
+.I pic
+context, i.e., after the call of
+.BR .PS ,
+.I chem
+input can optionally be started by the line
+.B \%begin\~chem
+and ended by the line with the single word
+.B end
+instead.
+.
+.
+.P
+Anything outside these initialization lines is copied through
+without modification;
+all data between the initialization lines is converted into
+.I pic
+commands to draw the diagram.
+.
+.
+.P
+As an example,
+.
+.IP
+.EX
+\&.cstart
+CH3
+bond
+CH3
+\&.cend
+.EE
+.
+.
+.P
+prints two
+.B CH3
+groups with a bond between them.
+.
+.
+.P
+If you want to create just
+.I groff
+output, you must run
+.I @g@chem
+followed by
+.I groff
+with the option
+.B \-p
+for the activation of
+.IR @g@pic :
+.IP
+.I @g@chem
+.RI [ file\~ .\|.\|.\&]
+.BR "| groff \-p\~" .\|.\|.
+.
+.
+.\" ====================================================================
+.SH Language
+.\" ====================================================================
+.
+The
+.I chem
+input language is rather small.
+.
+It provides rings of several styles and a way to glue them together as
+desired,
+bonds of several styles,
+moieties
+(e.g.,
+.BR C ,
+.BR NH3 ,
+\&.\|.\|.,
+and strings.
+.
+.
+.\" ====================================================================
+.SS "Setting variables"
+.\" ====================================================================
+.
+There are some variables that can be set by commands.
+.
+Such commands have two possible forms, either
+.
+.RS
+.P
+.I "variable value"
+.RE
+.
+.P
+or
+.
+.RS
+.P
+.IB "variable " = " value"
+.RE
+.
+.P
+This sets the given
+.I variable
+to the argument
+.IR value .
+If more arguments are given only the last argument is taken, all other
+arguments are ignored.
+.
+.
+.P
+There are only a few variables to be set by these commands:
+.
+.TP
+.BI textht " arg"
+Set the height of the text to
+.IR arg ;
+default is 0.16.
+.
+.TP
+.BI cwid " arg"
+Set the character width to
+.IR arg ;
+default is 0.12.
+.
+.TP
+.BI db " arg"
+Set the bond length to
+.IR arg ;
+default is 0.2.
+.
+.TP
+.BI size " arg"
+Scale the diagram to make it look plausible at point size
+.IR arg ;
+default is 10 point.
+.
+.
+.\" ====================================================================
+.SS Bonds
+.\" ====================================================================
+.
+This
+.
+.RS
+.SY bond
+.RI [ direction ]
+.RI [ length\ n ]
+.RB [ from\ \c
+.IR Name | picstuff ]
+.YS
+.RE
+.
+.P
+draws a single bond in direction from nearest corner of
+.IR Name .
+.B bond
+can also be
+.BR "double bond" ,
+.BR "front bond" ,
+.BR "back bond" ,
+etc.
+.
+(We will get back to
+.I Name
+soon.)
+.
+.
+.P
+.I direction
+is the angle in degrees (0\~up, positive clockwise)
+or a direction word like
+.BR up ,
+.BR down ,
+.B sw
+(=\~southwest), etc.
+.
+If no direction is specified, the bond goes in the current direction
+(usually that of the last bond).
+.
+.
+.P
+Normally the bond begins at the last object placed; this
+can be changed by naming a
+.B from
+place.
+.
+For instance, to make a simple alkyl chain:
+.
+.RS
+.TS
+tab (@);
+lb l.
+CH3
+bond@(this one goes right from the CH3)
+C@(at the right end of the bond)
+double bond up@(from the C)
+O@(at the end of the double bond)
+bond right from C
+CH3
+.TE
+.RE
+.
+.
+.P
+A length in inches may be specified to override the default length.
+.
+Other
+.I pic
+commands can be tacked on to the end of a bond command, to created
+dotted or dashed bonds or to specify a
+.B to
+place.
+.
+.
+.\" ====================================================================
+.SS Rings
+.\" ====================================================================
+.
+There are lots of rings,
+but only five- and six-sided rings get much support.
+.
+.B ring
+by itself is a six-sided ring;
+.B benzene
+is the benzene ring with a circle inside.
+.B aromatic
+puts a circle into any kind of ring.
+.
+.RS
+.SY ring
+.RB [ \%pointing\ ( up | right | left | down )]
+.RB [ \%aromatic ]
+.RB [ put\ Mol\ at\ \fIn\/\fP ]
+.RB [ \%double\ \c
+.IR i , j\ \/\c
+.IR k , l\ \/\c
+\&.\|.\|.\&
+.RI [ picstuff ]
+.YS
+.RE
+.
+.
+.P
+The vertices of a ring are numbered 1, 2, \&.\|.\|.\& from the
+vertex that points in the natural compass direction.
+.
+So for a hexagonal ring with the point at the top, the top vertex
+is\~1, while if the ring has a point at the east side, that is
+vertex\~1.
+.
+This is expressed as
+.
+.IP
+.EX
+R1: ring pointing up
+R2: ring pointing right
+.EE
+.
+.
+.P
+The ring vertices are named
+.BR .V1 ,
+\&.\|.\|.,
+.BI .V n\fR,\fP
+with
+.B .V1
+in the pointing direction.
+.
+So the corners of
+.B R1
+are
+.B R1.V1
+(the
+.IR top ),
+.BR R1.V2 ,
+.BR R1.V3 ,
+.B R1.V4
+(the
+.IR bottom ),
+etc., whereas for
+.BR R2 ,
+.B R2.V1
+is the rightmost vertex and
+.B R2.V4
+the leftmost.
+.
+These vertex names are used for connecting bonds or other rings.
+.
+For example,
+.
+.IP
+.EX
+R1: benzene pointing right
+R2: benzene pointing right with .V6 at R1.V2
+.EE
+.
+.
+.P
+creates two benzene rings connected along a side.
+.
+.
+.P
+Interior double bonds are specified as
+.B \%double
+.IB n1 , "n2 n3" , n4
+.RB .\|.\|. ;
+each number pair adds an interior bond.
+.
+So the alternate form of a benzene ring is
+.
+.IP
+.B "ring double 1,2 3,4 5,6"
+.
+.
+.P
+Heterocycles (rings with something other than carbon at a vertex) are
+written as
+.BI put\ X\ at\ V\fR,\fP
+as in
+.
+.IP
+.B "R: ring put N at 1 put O at 2"
+.
+.
+.P
+In this heterocycle,
+.B R.N
+and
+.B R.O
+become synonyms for
+.B R.V1
+and
+.BR R.V2 .
+.
+.
+.P
+There are two five-sided rings.
+.
+.B ring5
+is pentagonal with a side that matches the six-sided ring;
+it has four natural directions.
+.
+A
+.B \%flatring
+is a five-sided ring created by chopping one corner of a six-sided ring
+so that it exactly matches the six-sided rings.
+.
+.
+.P
+The description of a ring has to fit on a single line.
+.
+.
+.\" ====================================================================
+.SS "Moieties and strings"
+.\" ====================================================================
+.
+A moiety is a string of characters beginning with a capital letter,
+such as N(C2H5)2.
+.
+Numbers are converted to subscripts (unless they appear to be
+fractional values, as in N2.5H).
+.
+The name of a moiety is determined from the moiety after special
+characters have been stripped out: e.g., N(C2H5)2) has the name NC2H52.
+.
+.
+.P
+Moieties can be specified in two kinds.
+.
+Normally a moiety is placed right after the last thing mentioned,
+separated by a semicolon surrounded by spaces, e.g.,
+.
+.IP
+.B "B1: bond ; OH"
+.
+.P
+Here the moiety is
+.BR OH ;
+it is set after a bond.
+.
+.
+.P
+As the second kind a moiety can be positioned as the first word in a
+.IR pic -like
+command, e.g.,
+.
+.IP
+.B "CH3 at C + (0.5,0.5)"
+.
+.P
+Here the moiety is
+.BR CH3 .
+It is placed at a position relative to
+.BR C ,
+a moiety used earlier in the chemical structure.
+.
+.
+.P
+So moiety names can be specified as
+.I chem
+positions everywhere in the
+.I chem
+code.
+.
+Beneath their printing moieties are names for places.
+.
+.
+.P
+The moiety
+.B BP
+is special.
+.
+It is not printed but just serves as a mark to be referred to in later
+.I chem
+commands.
+.
+For example,
+.
+.IP
+.B "bond ; BP"
+.
+.P
+sets a mark at the end of the bond.
+.
+This can be used then for specifying a place.
+.
+The name
+.B BP
+is derived from
+.I branch point
+(i.e., line crossing).
+.
+.
+.P
+A string within double quotes
+.B \(dq
+is interpreted as a part of a
+.I chem
+command.
+.
+It represents a string that should be printed (without the quotes).
+.
+Text within quotes
+.BR \(dq .\|.\|.\& \(dq
+is treated more or less like a moiety except that no changes are made to
+the quoted part.
+.
+.
+.\" ====================================================================
+.SS Names
+.\" ====================================================================
+.
+In the alkyl chain above, notice that the carbon atom
+.B C
+was used both to draw something and as the name for a place.
+.
+A moiety always defines a name for a place; you can use
+your own names for places instead, and indeed, for rings
+you will have to.
+.
+A name is just
+.
+.IP
+.IB Name :
+\&.\|.\|.
+.
+.
+.P
+.I Name
+is often the name of a moiety like
+.BR CH3 ,
+but it need not to be.
+.
+Any name that begins with a capital letter and which contains
+only letters and numbers is valid:
+.
+.RS
+.TP
+.B First:
+.B bond
+.TQ
+\&
+.B "bond 30 from First"
+.RE
+.
+.
+.\" ====================================================================
+.SS Miscellaneous
+.\" ====================================================================
+.
+The specific construction
+.RS
+.TP
+.BR bond \~.\|.\|.\&\~ "; moiety"
+.RE
+.P
+is equivalent to
+.IP
+.EX
+bond
+moiety
+.EE
+.
+.
+.P
+Otherwise, each item has to be on a separate line (and only one line).
+Note that there must be whitespace after the semicolon which separates
+the commands.
+.
+.
+.P
+A period character
+.B .\&
+or a single quote
+.B \[aq]
+in the first column of a line signals a
+.I troff
+command, which is copied through as-is.
+.
+.
+.P
+A line whose first non-blank character is a hash character
+.RB ( # )
+is treated as a comment and thus ignored.
+.
+However, hash characters within a word are kept.
+.
+.
+.P
+A line whose first word is
+.B pic
+is copied through as-is after the word
+.B pic
+has been removed.
+.
+.
+.P
+The command
+.IP
+.B size
+.I n
+.P
+scales the diagram to make it look plausible at point size\~\c
+.I n
+(default is 10\~point).
+.
+.
+.P
+Anything else is assumed to be
+.I pic
+code, which is copied through with a label.
+.
+.
+.P
+Since
+.I @g@chem
+is a
+.I @g@pic
+preprocessor, it is possible to include
+.I pic
+statements in the middle of a diagram to draw things not provided for
+by
+.I chem
+itself.
+.
+Such
+.I pic
+statements should be included in
+.I chem
+code by adding
+.B pic
+as the first word of this line for clarity.
+.
+.
+.P
+The following
+.I pic
+commands are accepted as
+.I chem
+commands, so no
+.B pic
+command word is needed:
+.
+.IP
+.B define
+Start the definition of
+.I pic
+macro within
+.IR chem .
+.
+.RS
+.TP
+.B [
+Start a block composite.
+.
+.TP
+.B ]
+End a block composite.
+.
+.TP
+.B {
+Start a macro definition block.
+.
+.TP
+.B }
+End a macro definition block.
+.RE
+.
+.P
+The macro names from
+.B define
+statements are stored and their call is accepted as a
+.I chem
+command as well.
+.
+.
+.\" ====================================================================
+.SS "Wish list"
+.\" ====================================================================
+.
+.P
+This TODO list was collected by Brian Kernighan.
+.
+.
+.P
+Error checking is minimal; errors are usually detected and reported in
+an oblique fashion by
+.IR pic .
+.
+.
+.P
+There is no library or file inclusion mechanism, and there is no
+shorthand for repetitive structures.
+.
+.
+.P
+The extension mechanism is to create
+.I pic
+macros, but these are tricky to get right and don't have all the
+properties of built-in objects.
+.
+.
+.P
+There is no in-line chemistry yet
+(e.g.,
+analogous to the
+.BR $ .\|.\|. $
+construct of
+.IR eqn ).
+.
+.
+.P
+There is no way to control entry point for bonds on groups.
+.
+Normally a bond connects to the carbon atom if entering from
+the top or bottom and otherwise to the nearest corner.
+.
+.
+.P
+Bonds from substituted atoms on heterocycles do not join at the proper
+place without adding a bit of
+.IR pic .
+.
+.
+.P
+There is no decent primitive for brackets.
+.
+.
+.P
+Text (quoted strings) doesn't work very well.
+.
+.
+.P
+A squiggle bond is needed.
+.
+.
+.\" ====================================================================
+.SH Files
+.\" ====================================================================
+.
+.TP
+.I @DATASUBDIR@/\:pic/\:chem\:.pic
+A collection of
+.I pic
+macros needed by
+.IR @g@chem .
+.
+.TP
+.I @MACRODIR@/\:pic\:.tmac
+A macro file which redefines
+.BR .PS ,
+.BR .PE ,
+and
+.B .PF
+to center
+.I pic
+diagrams.
+.
+.TP
+.IR @DOCDIR@/\:\%examples/\:chem/\: * .chem
+Example files for
+.IR chem .
+.
+.TP
+.IR @DOCDIR@/\:\%examples/\:chem/\:122/\: * .chem
+Example files from the
+.I chem
+article by its authors,
+\[lq]CHEM\[em]A Program for Typesetting Chemical Structure Diagrams:
+User Manual\[rq]
+(CSTR\~#122).
+.
+.
+.\" ====================================================================
+.SH Authors
+.\" ====================================================================
+.
+The GNU version of
+.I chem
+was written by
+.MT groff\-bernd\:.warken\-72@\:web\:.de
+Bernd Warken
+.ME .
+.
+It is based on the documentation of Brian Kernighan's original
+.I awk
+version of
+.IR chem .
+.
+.
+.\" ====================================================================
+.SH "See also"
+.\" ====================================================================
+.
+\[lq]CHEM\[em]A Program for Typesetting Chemical Diagrams: User
+Manual\[rq]
+by Jon L.\& Bentley,
+Lynn W.\& Jelinski,
+and
+Brian W.\& Kernighan,
+1992,
+AT&T Bell Laboratories Computing Science Technical Report No.\& 122
+.
+.
+.P
+.MR groff @MAN1EXT@ ,
+.MR @g@pic @MAN1EXT@
+.
+.
+.\" Restore compatibility mode (for, e.g., Solaris 10/11).
+.cp \n[*groff_chem_1_man_C]
+.do rr *groff_chem_1_man_C
+.
+.
+.\" Local Variables:
+.\" fill-column: 72
+.\" mode: nroff
+.\" End:
+.\" vim: set filetype=groff textwidth=72:
diff --git a/contrib/chem/chem.am b/contrib/chem/chem.am
new file mode 100644
index 0000000..abee480
--- /dev/null
+++ b/contrib/chem/chem.am
@@ -0,0 +1,120 @@
+# Automake rules for 'chem'
+
+# Copyright (C) 2006-2020 Free Software Foundation, Inc.
+# Written by Bernd Warken <groff-bernd.warken-72@web.de>.
+# Moved to automake by Bertrand Garrigues
+#
+# This file is part of 'chem' which is part of 'groff'.
+#
+# 'groff' is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License (GPL) version 2 as
+# published by the Free Software Foundation.
+#
+# 'groff' is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# The GPL2 license text is available in the internet at
+# <http://www.gnu.org/licenses/gpl-2.0.html>.
+
+########################################################################
+
+chem_srcdir = $(top_srcdir)/contrib/chem
+prefixexecbin_SCRIPTS += chem
+
+# Files installed in $(datasubdir)/pic
+chempicdir = $(datasubdir)/pic
+dist_chempic_DATA = contrib/chem/chem.pic
+
+
+CHEM_GENEXAMPLES = contrib/chem/examples/README
+CHEM_EXAMPLES = \
+ contrib/chem/examples/atp.chem \
+ contrib/chem/examples/cholesterin.chem \
+ contrib/chem/examples/ethamivan.chem \
+ contrib/chem/examples/lsd.chem \
+ contrib/chem/examples/morphine.chem \
+ contrib/chem/examples/penicillin.chem \
+ contrib/chem/examples/reserpine.chem
+
+# Files installed in $(exampledir)/chem
+chemexampledir = $(exampledir)/chem
+nodist_chemexample_DATA = $(CHEM_GENEXAMPLES)
+dist_chemexample_DATA = $(CHEM_EXAMPLES)
+
+# Files installed in $(exampledir)/chem/122. All the .chem files in 122 are
+# lazily installed by the local install target
+chemexample122dir = $(chemexampledir)/122
+nodist_chemexample122_DATA = contrib/chem/examples/122/README
+EXTRA_DIST += \
+ contrib/chem/ChangeLog \
+ contrib/chem/chem.1.man \
+ contrib/chem/chem.pic \
+ contrib/chem/chem.pl \
+ contrib/chem/README.txt \
+ contrib/chem/examples/README.txt \
+ contrib/chem/examples/122/README.txt
+
+man1_MANS += contrib/chem/chem.1
+MOSTLYCLEANFILES += $(CHEM_GENEXAMPLES) $(nodist_chemexample122_DATA) \
+ contrib/chem/README
+
+# This is strangely built but not installed
+all: contrib/chem/README
+
+contrib/chem/README: $(chem_srcdir)/README.txt
+ $(AM_V_GEN)$(MKDIR_P) contrib/chem/ \
+ && sed -e "s|[@]g[@]|$(g)|g" $? >$@
+
+contrib/chem/examples/README: $(chem_srcdir)/examples/README.txt
+ $(AM_V_GEN)$(MKDIR_P) contrib/chem/examples \
+ && sed -e "s|[@]g[@]|$(g)|g" $? >$@
+
+contrib/chem/examples/122/README: $(chem_srcdir)/examples/122/README.txt
+ $(AM_V_GEN)$(MKDIR_P) contrib/chem/examples/122 \
+ && sed -e "s|[@]g[@]|$(g)|g" $? >$@
+
+chem: $(chem_srcdir)/chem.pl $(SH_DEPS_SED_SCRIPT)
+ $(AM_V_GEN)$(RM) $@ \
+ && sed -f "$(SH_DEPS_SED_SCRIPT)" \
+ -e "s|[@]g[@]|$(g)|g" \
+ -e "s|[@]BINDIR[@]|$(DESTDIR)$(bindir)|g" \
+ -e "s|[@]MACRODIR[@]|$(DESTDIR)$(tmacdir)|g" \
+ -e "s|[@]PICDIR[@]|$(DESTDIR)$(datasubdir)/pic|g" \
+ -e "s|[@]VERSION[@]|$(VERSION)|g" \
+ -e "$(SH_SCRIPT_SED_CMD)" \
+ $(chem_srcdir)/chem.pl \
+ >$@ \
+ && chmod +x $@
+
+install-data-local: install_chem_extra
+install_chem_extra:
+ -test -d $(DESTDIR)$(chemexample122dir) \
+ || $(mkinstalldirs) $(DESTDIR)$(chemexample122dir);
+ for i in $(chem_srcdir)/examples/122/*.chem; do \
+ n=`echo $$i | sed 's|$(chem_srcdir)/examples/122/||g'`; \
+ $(INSTALL_DATA) $$i $(DESTDIR)$(chemexample122dir)/$$n; \
+ done
+
+uninstall-local: uninstall_chem_extra
+uninstall_chem_extra:
+ $(RM) $(DESTDIR)$(exampledir)/chem/122/*
+ -rmdir $(DESTDIR)$(exampledir)/chem/122
+ $(RM) $(DESTDIR)$(exampledir)/chem/*
+ -rmdir $(DESTDIR)$(exampledir)/chem
+ -rmdir $(DESTDIR)$(datasubdir)/pic
+
+dist-hook: dist_chem
+dist_chem:
+ chmod u+w $(distdir)/contrib/chem/examples/122
+ for i in $(chem_srcdir)/examples/122/*.chem; do \
+ cp -f $$i $(distdir)/contrib/chem/examples/122; \
+ done
+
+
+# Local Variables:
+# mode: makefile-automake
+# fill-column: 72
+# End:
+# vim: set autoindent filetype=automake textwidth=72:
diff --git a/contrib/chem/chem.pic b/contrib/chem/chem.pic
new file mode 100644
index 0000000..33e932c
--- /dev/null
+++ b/contrib/chem/chem.pic
@@ -0,0 +1,89 @@
+# macros for chem
+
+# Copyright (C) 2006-2020 Free Software Foundation, Inc.
+# Written by Brian Kernighan <http://cm.bell-labs.com/cm/cs/who/bwk>,
+# modified by Bernd Warken <groff-bernd.warken-72@web.de>.
+
+# This file is part of 'chem', which is part of 'groff'.
+
+# 'groff' is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License (GPL) version 2 as
+# published by the Free Software Foundation.
+
+# 'groff' is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+
+# The license text for GPL2 is available in the internet at
+# <http://www.gnu.org/licenses/gpl-2.0.html>.
+
+########################################################################
+
+pi = 3.141592654
+deg = 57.29578
+# cr = 0.08 # radius of invis circle at ring vertices (see cr[vh])
+# crh = 0.16; crw = 0.12 # ht & wid of invis ellipse around atoms at ring vertices
+# dav = 0.015 # vertical shift up for atoms in atom macro
+
+# atom(text, wid, ht, carbon position, crh, crw, dav)
+define atom { [
+ T: $1 wid $2 ht $3-2*$7
+ C: ellipse invis ht $5 wid $6 at T.w + ($4,$7)
+ L: ellipse invis ht $5 wid $6 at T.w + (cwid/2,$7)
+ R: ellipse invis ht $5 wid $6 at T.e + (-cwid/2,$7)
+] }
+
+# bond(length, angle in degrees, whatever)
+define bond {
+ line $3 by ($1) * sin(($2)/deg), ($1) * cos(($2)/deg)
+}
+
+# fancy bonds: r, theta, from/at
+define doublebond {
+ line $3 invis by ($1) * sin(($2)/deg), ($1) * cos(($2)/deg)
+ V1: last line.start; V2: last line.end; dx = V2.x-V1.x; dy = V2.y-V1.y
+ norm = sqrt(dx*dx + dy*dy)
+ ny = dx * .02 / norm
+ nx = -dy * .02 / norm
+ line from V1 + (nx,ny) to V2 + (nx,ny)
+ line from V1 - (nx,ny) to V2 - (nx,ny)
+ move to V2
+}
+define triplebond {
+ line $3 invis by ($1) * sin(($2)/deg), ($1) * cos(($2)/deg)
+ V1: last line.start; V2: last line.end; dx = V2.x-V1.x; dy = V2.y-V1.y
+ norm = sqrt(dx*dx + dy*dy)
+ ny = dx * .025 / norm
+ nx = -dy * .025 / norm
+ line from V1 + (nx,ny) to V2 + (nx,ny)
+ line from V1 - (nx,ny) to V2 - (nx,ny)
+ line from V1 to V2
+ move to V2
+}
+define backbond {
+ line $3 invis by ($1) * sin(($2)/deg), ($1) * cos(($2)/deg)
+ V1: last line.start; V2: last line.end; dx = V2.x-V1.x; dy = V2.y-V1.y
+ norm = sqrt(dx*dx + dy*dy)
+ n = norm / .025
+ ny = dx * .02 / norm
+ nx = -dy * .02 / norm
+ for i = 1 to n-1 do {
+ XZ: i/n <V1,V2>
+ line from XZ + (nx,ny) to XZ - (nx,ny)
+ }
+ move to V2
+}
+define frontbond {
+ line $3 invis by ($1) * sin(($2)/deg), ($1) * cos(($2)/deg)
+ V1: last line.start; V2: last line.end; dx = V2.x-V1.x; dy = V2.y-V1.y
+ ah = arrowht; aw = arrowwid; ahead = arrowhead
+ arrowht = sqrt(dx*dx + dy*dy)
+ arrowwid = 0.05
+ arrowhead = 7
+ line <- from V1 to V2
+ arrowht = ah; arrowwid = aw; arrowhead = ahead
+}
+# Local Variables:
+# mode: Nroff
+# End:
diff --git a/contrib/chem/chem.pl b/contrib/chem/chem.pl
new file mode 100755
index 0000000..5ca3fa2
--- /dev/null
+++ b/contrib/chem/chem.pl
@@ -0,0 +1,1231 @@
+#! /usr/bin/env perl
+
+# chem - a groff preprocessor for producing chemical structure diagrams
+
+my $copyright = 'Copyright (C) 2006-2014, 2022'
+ . ' Free Software Foundation, Inc.';
+# Written by Bernd Warken <groff-bernd.warken-72@web.de>.
+
+# This file is part of 'chem', which is part of 'groff'.
+
+# 'groff' is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License (GPL) version 2 as
+# published by the Free Software Foundation.
+
+# 'groff' is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+
+# The GPL2 license text is available in the internet at
+# <http://www.gnu.org/licenses/gpl-2.0.html>.
+
+########################################################################
+# settings
+########################################################################
+
+my $chem_version = '1.0.6';
+my $groff_version = 'DEVELOPMENT';
+
+require v5.6;
+
+
+########################################################################
+# begin
+########################################################################
+
+use warnings;
+use strict;
+use Math::Trig;
+
+# for catfile()
+use File::Spec;
+
+# $Bin is the directory where this script is located
+use FindBin;
+
+my $chem;
+my $File_chem_pic;
+
+my $is_in_source_tree;
+{
+ $is_in_source_tree = 1 if '@VERSION@' eq '@' . 'VERSION' . '@';
+}
+
+my %makevar;
+
+if ($is_in_source_tree) {
+ my $chem_dir = $FindBin::Bin;
+ $makevar{'G'} = '';
+ $File_chem_pic = File::Spec->catfile($chem_dir, 'chem.pic');
+ $chem = 'chem';
+} else {
+ $groff_version = '@VERSION@';
+ $makevar{'G'} = '@g@';
+ $makevar{'PICDIR'} = '@PICDIR@';
+ $File_chem_pic = File::Spec->catfile($makevar{'PICDIR'}, 'chem.pic');
+ $chem = $makevar{'G'} . 'chem';
+}
+
+
+########################################################################
+# check the parameters
+########################################################################
+
+if (@ARGV) {
+ # process any FOO=bar switches
+ # eval '$'.$1.'$2;' while $ARGV[0] =~ /^([A-Za-z_0-9]+=)(.*)/ && shift;
+ my @filespec = ();
+ my $dbl_minus;
+ my $wrong;
+ foreach (@ARGV) {
+ next unless $_;
+ if (/=/) {
+ # ignore FOO=bar switches
+ push @filespec, $_ if -f;
+ next;
+ }
+ if ($dbl_minus) {
+ if (-f $_) {
+ push @filespec, $_ if -s $_;
+ } else {
+ warn "chem: argument $_ is not an existing file.\n";
+ $wrong = 1;
+ }
+ next;
+ }
+ if (/^--$/) {
+ $dbl_minus = 1;
+ next;
+ }
+ if (/^-$/) {
+ push @filespec, $_;
+ next;
+ }
+ if (/^-h$/ or '--help' =~ /^$_/) {
+ &usage();
+ exit 0;
+ }
+ if (/^-v$/ or '--version' =~ /^$_/) {
+ &version();
+ exit 0;
+ }
+ if (-f $_) {
+ push @filespec, $_ if -s $_;
+ } else {
+ $wrong = 1;
+ if (/^-/) {
+ warn "chem: wrong option ${_}.\n";
+ } else {
+ warn "chem: argument $_ is not an existing file.\n";
+ }
+ }
+ }
+ if (@filespec) {
+ @ARGV = @filespec;
+ } else {
+ exit 0 if $wrong;
+ @ARGV = ('-');
+ }
+} else { # @ARGV is empty
+ @ARGV = ('-') unless @ARGV;
+}
+
+
+########################################################################
+# main process
+########################################################################
+
+my %Dc = ( 'up' => 0, 'right' => 90, 'down' => 180, 'left' => 270,
+ 'ne' => 45, 'se' => 135, 'sw' => 225, 'nw' => 315,
+ 0 => 'n', 90 => 'e', 180 => 's', 270 => 'w',
+ 30 => 'ne', 45 => 'ne', 60 => 'ne',
+ 120 => 'se', 135 => 'se', 150 => 'se',
+ 210 => 'sw', 225 => 'sw', 240 => 'sw',
+ 300 => 'nw', 315 => 'nw', 330 => 'nw',
+ );
+
+my $Word_Count;
+my @Words;
+
+my $Line_No;
+my $Last_Name = '';
+
+# from init()
+my $First_Time = 1;
+my $Last_Type;
+my $Dir; # direction
+my %Types = (
+ 'RING' => 'R',
+ 'MOL' => 'M',
+ 'BOND' => 'B',
+ 'OTHER' => 'O' # manifests
+ );
+
+# from setparams()
+my %Params;
+
+# from ring()
+my $Nput;
+my $Aromatic;
+my %Put;
+my %Dbl;
+
+my %Labtype;
+my %Define = ();
+
+my $File_Name = '';
+my $Line = '';
+
+&main();
+
+{
+ my $is_pic = '';
+ my $is_chem = '';
+ my $former_line = '';
+
+ ##########
+ # main()
+ #
+ sub main {
+ my $count_minus = 0;
+ my @stdin = ();
+ my $stdin = 0;
+
+ foreach (@ARGV) {
+ $count_minus++ if /^-$/;
+ }
+
+ foreach my $arg (@ARGV) {
+ &setparams(1.0);
+ next unless $arg;
+ $Line_No = 0;
+ $is_pic = '';
+ $is_chem = '';
+ if ($arg eq '-') {
+ $File_Name = 'standard input';
+ if ($stdin) {
+ &main_line($_) foreach @stdin;
+ } else {
+ $stdin = 1;
+ if ($count_minus <= 1) {
+ while (<STDIN>) {
+ &main_line($_);
+ }
+ } else {
+ @stdin = ();
+ while (<STDIN>) {
+ push @stdin, $_;
+ &main_line($_);
+ }
+ }
+ }
+### main()
+ } else { # $arg is not -
+ $File_Name = $arg;
+ open FILE, "<$arg";
+ &main_line($_) while <FILE>;
+ close FILE;
+ } # if $arg
+ if ($is_pic) {
+ printf ".PE\n";
+ }
+ }
+ } # main()
+
+
+ ##########
+ # main_line()
+ #
+ sub main_line {
+ my $line = $_[0];
+# $Last_Type = $Types{'OTHER'};
+# $Last_Type = '';
+ my $stack;
+ $Line_No++;
+ chomp $line;
+
+ $line = $former_line . $line if $former_line;
+ if ($line =~ /^(.*)\\$/) {
+ $former_line = $1;
+ return 1;
+ } else {
+ $former_line = '';
+ }
+ $Line = $line;
+
+ {
+ @Words = ();
+ my $s = $line;
+ $s =~ s/^\s*//;
+ $s =~ s/\s+$//;
+ return 1 unless $s;
+ $s = " $s";
+ $s =~ s/\s+#.*$// if $is_pic;
+ return 1 unless $s;
+ $line = $s;
+ $line =~ s/^\s*|\s*$//g;
+ my $bool = 1;
+ while ($bool) {
+ $s =~ /^([^"]*)\s("[^"]*"?\S*)(.*)$/;
+ if (defined $1) {
+ my $s1 = $1;
+ my $s2 = $2;
+ $s = $3;
+ $s1 =~ s/^\s*|\s*$//g;
+ push @Words, split(/\s+/, $s1) if $s1;
+ push @Words, $s2;
+ }
+ if ($s !~ /\s"/) {
+ $s =~ s/^\s*|\s*$//g;
+ push @Words, split(/\s+/, $s) if $s;
+ $bool = 0;
+ }
+ }
+
+# @Words = split(/\s+/, $s);
+ return 1 unless @Words;
+# foreach my $i (0..$#Words) {
+# if ($Words[$i] =~ /^\s*#/) {
+# $#Words = $i - 1;
+# last;
+# }
+# }
+# return 1 unless @Words;
+ }
+
+ if ($line =~ /^([\.']\s*PS\s*)|([\.']\s*PS\s.+)$/) {
+ # .PS
+ unless ($is_pic) {
+ $is_pic = 'running';
+ print "$line\n";
+ }
+ return 1;
+ }
+### main_line()
+ if ( $line =~ /^([\.']\s*PE\s*)|([\.']\s*PE\s.+)$/ ) {
+ # .PE
+ $is_chem = '';
+ if ($is_pic) {
+ $is_pic = '';
+ print "$line\n";
+ }
+ return 1;
+ }
+ if ($line =~ /^[\.']\s*cstart\s*$/) {
+ # line: '.cstart'
+ if ($is_chem) {
+ &error("additional '.cstart'; chem is already active.");
+ return 1;
+ }
+ unless ($is_pic) {
+ &print_ps();
+ $is_pic = 'by chem';
+ }
+ $is_chem = '.cstart';
+ &init();
+ return 1;
+ }
+### main_line()
+ if ($line =~ /^\s*begin\s+chem\s*$/) {
+ # line: 'begin chem'
+ if ($is_pic) {
+ if ($is_chem) {
+ &error("additional 'begin chem'; chem is already active.");
+ return 1;
+ }
+ $is_chem = 'begin chem';
+ &init();
+ } else {
+ print "$line\n";
+ }
+ return 1;
+ }
+ if ($line =~ /^[\.']\s*cend\s*/) {
+ # line '.cend'
+ if ($is_chem) {
+ &error("you end chem with '.cend', but started it with 'begin chem'.")
+ if $is_chem eq 'begin chem';
+ if ($is_pic eq 'by chem') {
+ &print_pe();
+ $is_pic = '';
+ }
+ $is_chem = '';
+ } else {
+ print "$line\n";
+ }
+ return 1;
+ }
+ if ($line =~ /^\s*end\s*$/) {
+ # line: 'end'
+ if ($is_chem) {
+ &error("you end chem with 'end', but started it with '.cstart'.")
+ if $is_chem eq '.cstart';
+ if ($is_pic eq 'by chem') {
+ &print_pe();
+ $is_pic = '';
+ }
+ $is_chem = '';
+ } else {
+ print "$line\n";
+ }
+ return 1;
+ }
+
+### main_line()
+ if (! $is_chem) {
+ print "$line\n";
+ return 1;
+ }
+ if ($line =~ /^[.']/) {
+ # groff request line
+ print "$line\n";
+ return 1;
+ }
+
+ if ($Words[0] eq 'pic') {
+ # pic pass-through
+ return 1 if $#Words == 0;
+ my $s = $line;
+ $s =~ /^\s*pic\s*(.*)$/;
+ $s = $1;
+ print "$s\n" if $s;
+ $Last_Type = $Types{'OTHER'};
+ $Define{ $Words[2] } = 1 if $#Words >= 2 && $Words[1] eq 'define';
+ return 1;
+ }
+
+ if ($Words[0] eq 'textht') {
+ if ($#Words == 0) {
+ &error("'textht' needs a single argument.");
+ return 0;
+ }
+ &error("only the last argument is taken for 'textht', " .
+ "all others are ignored.")
+ unless $#Words <= 1 or ($#Words == 2 && $Words[1] =~ /^=/);
+ $Params{'textht'} = $Words[$#Words];
+ return 1;
+ }
+### main_line()
+ if ($Words[0] eq 'cwid') { # character width
+ if ($#Words == 0) {
+ &error("'cwid' needs a single argument.");
+ return 0;
+ }
+ &error("only the last argument is taken for 'cwid', " .
+ "all others are ignored.")
+ unless $#Words <= 1 or ($#Words == 2 && $Words[1] =~ /^=/);
+ $Params{'cwid'} = $Words[$#Words];
+ return 1;
+ }
+ if ($Words[0] eq 'db') { # bond length
+ if ($#Words == 0) {
+ &error("'db' needs a single argument.");
+ return 0;
+ }
+ &error("only the last argument is taken for 'db', " .
+ "all others are ignored.")
+ unless $#Words <= 1 or ($#Words == 2 && $Words[1] =~ /^=/);
+ $Params{'db'} = $Words[$#Words];
+ return 1;
+ }
+ if ($Words[0] eq 'size') { # size for all parts of the whole diagram
+ my $size;
+ if ($#Words == 0) {
+ &error("'size' needs a single argument.");
+ return 0;
+ }
+ &error("only the last argument is taken for 'size', " .
+ "all others are ignored.")
+ unless $#Words <= 1 or ($#Words == 2 && $Words[1] =~ /^=/);
+ if ($Words[$#Words] <= 4) {
+ $size = $Words[$#Words];
+ } else {
+ $size = $Words[$#Words] / 10;
+ }
+ &setparams($size);
+ return 1;
+ }
+
+### main_line()
+ print "\n#", $Line, "\n"; # debugging, etc.
+ $Last_Name = '';
+# $Last_Type = $Types{'OTHER'};
+# $Last_Type = '';
+
+ if ($Words[0] =~ /^[A-Z].*:$/) {
+ # label; falls thru after shifting left
+ my $w = $Words[0];
+ $Last_Name = $w;
+ $Last_Name =~ s/:$//;
+ print "$w";
+ shift @Words;
+ if (@Words) {
+ print " ";
+ $line =~ s/^\s*$w\s*//;
+ } else {
+ print "\n";
+ return 1;
+ }
+ }
+
+ if ($Words[0] eq 'define') {
+ print "$line\n";
+ $Define{ $Words[1] } = 1 if $#Words >= 1;
+ $Last_Type = $Types{'OTHER'};
+ return 1;
+ }
+ if ($Words[0] =~ /^[\[\]{}]/) {
+ print "$line\n";
+ $Last_Type = $Types{'OTHER'};
+ return 1;
+ }
+
+ if ($Words[0] =~ /^"/) {
+ print 'Last: ', $line, "\n";
+ $Last_Type = $Types{'OTHER'};
+ return 1;
+ }
+
+ if ($Words[0] =~ /bond/) {
+ &bond($Words[0]);
+ return 1;
+ }
+
+ if ($#Words >= 1) {
+ if ($Words[0] =~ /^(double|triple|front|back)$/ &&
+ $Words[1] eq 'bond') {
+ my $w = shift @Words;
+ $Words[0] = $w . $Words[0];
+ &bond($Words[0]);
+ return 1;
+ }
+ if ($Words[0] eq 'aromatic') {
+ my $temp = $Words[0];
+ $Words[0] = $Words[1] ? $Words[1] : '';
+ $Words[1] = $temp;
+ }
+ }
+
+ if ($Words[0] =~ /ring|benz/) {
+ &ring($Words[0]);
+ return 1;
+ }
+ if ($Words[0] eq 'methyl') {
+ # left here as an example
+ $Words[0] = 'CH3';
+ }
+### main_line()
+ if ($Words[0] =~ /^[A-Z]/) {
+ &molecule();
+ return 1;
+ }
+ if ($Words[0] eq 'left') {
+ my %left; # not used
+ $left{++$stack} = &fields(1, $#Words);
+ printf (("Last: [\n"));
+ return 1;
+ }
+ if ($Words[0] eq 'right') {
+ &bracket();
+ $stack--;
+ return 1;
+ }
+ if ($Words[0] eq 'label') { # prints the vertex numbers in a ring
+ if ( exists $Labtype{$Words[1]} and
+ $Labtype{$Words[1]} =~ /^$Types{'RING'}/ ) {
+ my $v = substr($Labtype{$Words[1]}, 1, 1);
+ $Words[1] = '' unless $Words[1];
+ foreach my $i ( 1..$v ) {
+ printf "\"\\s-3%d\\s0\" at 0.%d<%s.C,%s.V%d>\n", $i, $v + 2,
+ $Words[1], $Words[1], $i;
+ }
+ } else {
+ &error("$Words[1] is not a ring.");
+ }
+ return 1;
+ }
+
+ if ( exists $Define{ $Words[0] } ) {
+ print $line, "\n";
+ $Last_Type = $Types{'OTHER'};
+ return 1;
+ }
+ return 1 unless $line;
+# print STDERR "# $Line\n";
+# &error('This is not a chem command. To include a command for pic, ' .
+# "add 'pic' as the first word to the command.");
+ print $line, "\n";
+ $Last_Type = $Types{'OTHER'};
+ 1;
+ } # main_line()
+
+}
+
+########################################################################
+# functions
+########################################################################
+
+##########
+# atom(<string>)
+#
+sub atom {
+ # convert CH3 to atom(...)
+ my ($s) = @_;
+ my ($i, $n, $nsub, $cloc, $nsubc, @s);
+ if ($s eq "\"\"") {
+ return $s;
+ }
+ $n = length($s);
+ $nsub = $nsubc = 0;
+ $cloc = index($s, 'C');
+ if (! defined($cloc) || $cloc < 0) {
+ $cloc = 0;
+ }
+ @s = split('', $s);
+ $i = 0;
+ foreach (@s) {
+ unless (/[A-Z]/) {
+ $nsub++;
+ $nsubc++ if $i < $cloc;
+ $i++;
+ }
+ }
+ $s =~ s/([0-9]+\.[0-9]+)|([0-9]+)/\\s-3\\d$&\\u\\s+3/g;
+ if ($s =~ /([^0-9]\.)|(\.[^0-9])/) { # centered dot
+ $s =~ s/\./\\v#-.3m#.\\v#.3m#/g;
+ }
+ sprintf( "atom(\"%s\", %g, %g, %g, %g, %g, %g)",
+ $s, ($n - $nsub / 2) * $Params{'cwid'}, $Params{'textht'},
+ ($cloc - $nsubc / 2 + 0.5) * $Params{'cwid'}, $Params{'crh'},
+ $Params{'crw'}, $Params{'dav'}
+ );
+} # atom()
+
+
+##########
+# bond(<type>)
+#
+sub bond {
+ my ($type) = @_;
+ my ($i, $moiety, $from, $leng);
+ $moiety = '';
+ for ($i = 1; $i <= $#Words; $i++) {
+ if ($Words[$i] eq ';') {
+ &error("a colon ';' must be followed by a space and a single word.")
+ if $i != $#Words - 1;
+ $moiety = $Words[$i + 1] if $#Words > $i;
+ $#Words = $i - 1;
+ last;
+ }
+ }
+ $leng = $Params{'db'}; # bond length
+ $from = '';
+ for ($Word_Count = 1; $Word_Count <= $#Words; ) {
+ if ($Words[$Word_Count] =~
+ /(\+|-)?\d+|up|down|right|left|ne|se|nw|sw/) {
+ $Dir = &cvtdir($Dir);
+ } elsif ($Words[$Word_Count] =~ /^leng/) {
+ $leng = $Words[$Word_Count + 1] if $#Words > $Word_Count;
+ $Word_Count += 2;
+ } elsif ($Words[$Word_Count] eq 'to') {
+ $leng = 0;
+ $from = &fields($Word_Count, $#Words);
+ last;
+ } elsif ($Words[$Word_Count] eq 'from') {
+ $from = &dofrom();
+ last;
+ } elsif ($Words[$Word_Count] =~ /^#/) {
+ $Word_Count = $#Words + 1;
+ last;
+ } else {
+ $from = &fields($Word_Count, $#Words);
+ last;
+ }
+ }
+### bond()
+ if ($from =~ /( to )|^to/) { # said "from ... to ...", so zap length
+ $leng = 0;
+ } elsif (! $from) { # no from given at all
+ $from = 'from Last.' . &leave($Last_Type, $Dir) . ' ' .
+ &fields($Word_Count, $#Words);
+ }
+ printf "Last: %s(%g, %g, %s)\n", $type, $leng, $Dir, $from;
+ $Last_Type = $Types{'BOND'};
+ $Labtype{$Last_Name} = $Last_Type if $Last_Name;
+ if ($moiety) {
+ @Words = ($moiety);
+ &molecule();
+ }
+} # bond()
+
+
+##########
+# bracket()
+#
+sub bracket {
+ my $t;
+ printf (("]\n"));
+ if ($Words[1] && $Words[1] eq ')') {
+ $t = 'spline';
+ } else {
+ $t = 'line';
+ }
+ printf "%s from last [].sw+(%g,0) to last [].sw to last [].nw to last " .
+ "[].nw+(%g,0)\n", $t, $Params{'dbrack'}, $Params{'dbrack'};
+ printf "%s from last [].se-(%g,0) to last [].se to last [].ne to last " .
+ "[].ne-(%g,0)\n", $t, $Params{'dbrack'}, $Params{'dbrack'};
+ if ($Words[2] && $Words[2] eq 'sub') {
+ printf "\" %s\" ljust at last [].se\n", &fields(3, $#Words);
+ }
+} # bracket()
+
+
+##########
+# corner(<dir>)
+#
+# Return the corner name next to the given angle.
+#
+sub corner {
+ my ($d) = @_;
+ $Dc{ (45 * int(($d + 22.5) / 45)) % 360 };
+} # corner()
+
+
+##########
+# cvtdir(<dir>)
+#
+# Maps "[pointing] somewhere" to degrees.
+#
+sub cvtdir {
+ my ($d) = @_;
+ if ($Words[$Word_Count] eq 'pointing') {
+ $Word_Count++;
+ }
+ if ($Words[$Word_Count] =~ /^[+\\-]?\d+/) {
+ return ( $Words[$Word_Count++] % 360 );
+ } elsif ($Words[$Word_Count] =~ /left|right|up|down|ne|nw|se|sw/) {
+ return ( $Dc{$Words[$Word_Count++]} % 360 );
+ } else {
+ $Word_Count++;
+ return $d;
+ }
+} # cvtdir()
+
+
+##########
+# dblring(<v>)
+#
+sub dblring {
+ my ($v) = @_;
+ my ($d, $v1, $v2);
+ # should canonicalize to i,i+1 mod v
+ $d = $Words[$Word_Count];
+ for ($Word_Count++; $Word_Count <= $#Words &&
+ $Words[$Word_Count] =~ /^[1-9]/; $Word_Count++) {
+ $v1 = substr($Words[$Word_Count], 0, 1);
+ $v2 = substr($Words[$Word_Count], 2, 1);
+ if ($v2 == $v1 + 1 || $v1 == $v && $v2 == 1) { # e.g., 2,3 or 5,1
+ $Dbl{$v1} = $d;
+ } elsif ($v1 == $v2 + 1 || $v2 == $v && $v1 == 1) { # e.g., 3,2 or 1,5
+ $Dbl{$v2} = $d;
+ } else {
+ &error(sprintf("weird %s bond in\n\t%s", $d, $_));
+ }
+ }
+} # dblring()
+
+
+##########
+# dofrom()
+#
+sub dofrom {
+ my $n;
+ $Word_Count++; # skip "from"
+ $n = $Words[$Word_Count];
+ if (defined $Labtype{$n}) { # "from Thing" => "from Thing.V.s"
+ return 'from ' . $n . '.' . &leave($Labtype{$n}, $Dir);
+ }
+ if ($n =~ /^\.[A-Z]/) { # "from .V" => "from Last.V.s"
+ return 'from Last' . $n . '.' . &corner($Dir);
+ }
+ if ($n =~ /^[A-Z][^.]*\.[A-Z][^.]*$/) { # "from X.V" => "from X.V.s"
+ return 'from ' . $n . '.' . &corner($Dir);
+ }
+ &fields($Word_Count - 1, $#Words);
+} # dofrom()
+
+
+##########
+# error(<string>)
+#
+sub error {
+ my ($s) = @_;
+ printf STDERR "chem: error in %s on line %d: %s\n",
+ $File_Name, $Line_No, $s;
+} # error()
+
+
+##########
+# fields(<n1>, <n2>)
+#
+sub fields {
+ my ($n1, $n2) = @_;
+ if ($n1 > $n2) {
+ return '';
+ }
+ my $s = '';
+ foreach my $i ($n1..$n2) {
+ if ($Words[$i] =~ /^#/) {
+ last;
+ }
+ $s = $s . $Words[$i] . ' ';
+ }
+ $s;
+} # fields()
+
+
+##########
+# init()
+#
+sub init {
+ if ($First_Time) {
+ printf "copy \"%s\"\n", $File_chem_pic;
+ printf "\ttextht = %g; textwid = .1; cwid = %g\n",
+ $Params{'textht'}, $Params{'cwid'};
+ printf "\tlineht = %g; linewid = %g\n",
+ $Params{'lineht'}, $Params{'linewid'};
+ $First_Time = 0;
+ }
+ printf "Last: 0,0\n";
+ $Last_Type = $Types{'OTHER'};
+ $Dir = 90;
+} # init()
+
+
+##########
+# leave(<last>, <d>)
+#
+sub leave {
+ my ($last, $d) = @_;
+ my ($c, $c1);
+ # return vertex of $last in direction $d
+ if ( $last eq $Types{'BOND'} ) {
+ return 'end';
+ }
+ $d %= 360;
+ if ( $last =~ /^$Types{'RING'}/ ) {
+ return &ringleave($last, $d);
+ }
+ if ( $last eq $Types{'MOL'} ) {
+ if ($d == 0 || $d == 180) {
+ $c = 'C';
+ } elsif ($d > 0 && $d < 180) {
+ $c = 'R';
+ } else {
+ $c = 'L';
+ }
+ if (defined $Dc{$d}) {
+ $c1 = $Dc{$d};
+ } else {
+ $c1 = &corner($d);
+ }
+ return sprintf('%s.%s', $c, $c1);
+ }
+ if ( $last eq $Types{'OTHER'} ) {
+ return &corner($d);
+ }
+ 'c';
+} # leave()
+
+
+##########
+# makering(<type>, <pt>, <v>)
+#
+sub makering {
+ my ($type, $pt, $v) = @_;
+ my ($i, $j, $a, $r, $rat, $fix, $c1, $c2);
+ if ($type =~ /flat/) {
+ $v = 6;
+ # vertices
+ ;
+ }
+ $r = $Params{'ringside'} / (2 * sin(pi / $v));
+ printf "\tC: 0,0\n";
+ for ($i = 0; $i <= $v + 1; $i++) {
+ $a = (($i - 1) / $v * 360 + $pt) / 57.29578; # 57. is $deg
+ printf "\tV%d: (%g,%g)\n", $i, $r * sin($a), $r * cos($a);
+ }
+ if ($type =~ /flat/) {
+ printf "\tV4: V5; V5: V6\n";
+ $v = 5;
+ }
+ # sides
+ if ($Nput > 0) {
+ # hetero ...
+ for ($i = 1; $i <= $v; $i++) {
+ $c1 = $c2 = 0;
+ if ($Put{$i} ne '') {
+ printf "\tV%d: ellipse invis ht %g wid %g at V%d\n",
+ $i, $Params{'crh'}, $Params{'crw'}, $i;
+ printf "\t%s at V%d\n", $Put{$i}, $i;
+ $c1 = $Params{'cr'};
+ }
+ $j = $i + 1;
+ if ($j > $v) {
+ $j = 1;
+ }
+### makering()
+ if ($Put{$j} ne '') {
+ $c2 = $Params{'cr'};
+ }
+ printf "\tline from V%d to V%d chop %g chop %g\n", $i, $j, $c1, $c2;
+ if ($Dbl{$i} ne '') {
+ # should check i<j
+ if ($type =~ /flat/ && $i == 3) {
+ $rat = 0.75;
+ $fix = 5;
+ } else {
+ $rat = 0.85;
+ $fix = 1.5;
+ }
+ if ($Put{$i} eq '') {
+ $c1 = 0;
+ } else {
+ $c1 = $Params{'cr'} / $fix;
+ }
+ if ($Put{$j} eq '') {
+ $c2 = 0;
+ } else {
+ $c2 = $Params{'cr'} / $fix;
+ }
+ printf "\tline from %g<C,V%d> to %g<C,V%d> chop %g chop %g\n",
+ $rat, $i, $rat, $j, $c1, $c2;
+ if ($Dbl{$i} eq 'triple') {
+ printf "\tline from %g<C,V%d> to %g<C,V%d> chop %g chop %g\n",
+ 2 - $rat, $i, 2 - $rat, $j, $c1, $c2;
+ }
+ }
+ }
+### makering()
+ } else {
+ # regular
+ for ($i = 1; $i <= $v; $i++) {
+ $j = $i + 1;
+ if ($j > $v) {
+ $j = 1;
+ }
+ printf "\tline from V%d to V%d\n", $i, $j;
+ if ($Dbl{$i} ne '') {
+ # should check i<j
+ if ($type =~ /flat/ && $i == 3) {
+ $rat = 0.75;
+ } else {
+ $rat = 0.85;
+ }
+ printf "\tline from %g<C,V%d> to %g<C,V%d>\n",
+ $rat, $i, $rat, $j;
+ if ($Dbl{$i} eq 'triple') {
+ printf "\tline from %g<C,V%d> to %g<C,V%d>\n",
+ 2 - $rat, $i, 2 - $rat, $j;
+ }
+ }
+ }
+ }
+### makering()
+ # punt on triple temporarily
+ # circle
+ if ($type =~ /benz/ || $Aromatic > 0) {
+ if ($type =~ /flat/) {
+ $r *= .4;
+ } else {
+ $r *= .5;
+ }
+ printf "\tcircle rad %g at 0,0\n", $r;
+ }
+} # makering()
+
+
+##########
+# molecule()
+#
+sub molecule {
+ my ($n, $type);
+ if ($#Words >= 0) {
+ $n = $Words[0];
+ if ($n eq 'BP') {
+ $Words[0] = "\"\" ht 0 wid 0";
+ $type = $Types{'OTHER'};
+ } else {
+ $Words[0] = &atom($n);
+ $type = $Types{'MOL'};
+ }
+ }
+ $n =~ s/[^A-Za-z0-9]//g; # for stuff like C(OH3): zap non-alnum
+ if ($#Words < 1) {
+ printf "Last: %s: %s with .%s at Last.%s\n",
+ $n, join(' ', @Words), &leave($type, $Dir + 180),
+ &leave($Last_Type, $Dir);
+### molecule()
+ } else {
+ if (! $Words[1]) {
+ printf "Last: %s: %s with .%s at Last.%s\n",
+ $n, join(' ', @Words), &leave($type, $Dir + 180),
+ &leave($Last_Type, $Dir);
+ } elsif ($#Words >= 1 and $Words[1] eq 'below') {
+ $Words[2] = '' if ! $Words[2];
+ printf "Last: %s: %s with .n at %s.s\n", $n, $Words[0], $Words[2];
+ } elsif ($#Words >= 1 and $Words[1] eq 'above') {
+ $Words[2] = '' if ! $Words[2];
+ printf "Last: %s: %s with .s at %s.n\n", $n, $Words[0], $Words[2];
+ } elsif ($#Words >= 2 and $Words[1] eq 'left' && $Words[2] eq 'of') {
+ $Words[3] = '' if ! $Words[3];
+ printf "Last: %s: %s with .e at %s.w+(%g,0)\n",
+ $n, $Words[0], $Words[3], $Params{'dew'};
+ } elsif ($#Words >= 2 and $Words[1] eq 'right' && $Words[2] eq 'of') {
+ $Words[3] = '' if ! $Words[3];
+ printf "Last: %s: %s with .w at %s.e-(%g,0)\n",
+ $n, $Words[0], $Words[3], $Params{'dew'};
+ } else {
+ printf "Last: %s: %s\n", $n, join(' ', @Words);
+ }
+ }
+
+ $Last_Type = $type;
+ if ($Last_Name) {
+ # $Last_Type = '';
+ $Labtype{$Last_Name} = $Last_Type;
+ }
+ $Labtype{$n} = $Last_Type;
+} # molecule()
+
+
+##########
+# print_hash(<hash_or_ref>)
+#
+# print the elements of a hash or hash reference
+#
+sub print_hash {
+ my $hr;
+ my $n = scalar @_;
+ if ($n == 0) {
+ print STDERR "empty hash\n;";
+ return 1;
+ } elsif ($n == 1) {
+ if (ref($_[0]) eq 'HASH') {
+ $hr = $_[0];
+ } else {
+ warn 'print_hash(): the argument is not a hash or hash reference;';
+ return 0;
+ }
+ } else {
+ if ($n % 2) {
+ warn 'print_hash(): the arguments are not a hash;';
+ return 0;
+ } else {
+ my %h = @_;
+ $hr = \%h;
+ }
+ }
+
+### print_hash()
+ unless (%$hr) {
+ print STDERR "empty hash\n";
+ return 1;
+ }
+ print STDERR "hash (ignore the ^ characters):\n";
+ for my $k (sort keys %$hr) {
+ my $hk = $hr->{$k};
+ print STDERR " $k => ";
+ if (defined $hk) {
+ print STDERR "^$hk^";
+ } else {
+ print STDERR "undef";
+ }
+ print STDERR "\n";
+ }
+
+ 1;
+} # print_hash()
+
+
+##########
+# print_pe()
+#
+sub print_pe {
+ print ".PE\n";
+} # print_pe()
+
+
+##########
+# print_ps()
+#
+sub print_ps {
+ print ".PS\n";
+} # print_ps()
+
+##########
+# putring(<v>)
+#
+sub putring {
+ # collect "put Mol at n"
+ my ($v) = @_;
+ my ($m, $mol, $n);
+ $Word_Count++;
+ $mol = $Words[$Word_Count++];
+ if ($Words[$Word_Count] eq 'at') {
+ $Word_Count++;
+ }
+ $n = $Words[$Word_Count];
+ if ($n !~ /^\d+$/) {
+ $n =~ s/(\d)+$/$1/;
+ $n = 0 if $n !~ /^\d+$/;
+ error('use single digit as argument for "put at"');
+ }
+ if ($n >= 1 && $n <= $v) {
+ $m = $mol;
+ $m =~ s/[^A-Za-z0-9]//g;
+ $Put{$n} = $m . ':' . &atom($mol);
+ } elsif ($n == 0) {
+ error('argument of "put at" must be a single digit');
+ } else {
+ error('argument of "put at" is too large');
+ }
+ $Word_Count++;
+} # putring()
+
+
+##########
+# ring(<type>)
+#
+sub ring {
+ my ($type) = @_;
+ my ($typeint, $pt, $verts, $i, $other, $fused, $withat);
+ $pt = 0; # points up by default
+ if ($type =~ /([1-8])$/) {
+ $verts = $1;
+ } elsif ($type =~ /flat/) {
+ $verts = 5;
+ } else {
+ $verts = 6;
+ }
+ $fused = $other = '';
+ for ($i = 1; $i <= $verts; $i++) {
+ $Put{$i} = $Dbl{$i} = '';
+ }
+ $Nput = $Aromatic = $withat = 0;
+ for ($Word_Count = 1; $Word_Count <= $#Words; ) {
+ if ($Words[$Word_Count] eq 'pointing') {
+ $pt = &cvtdir(0);
+ } elsif ($Words[$Word_Count] eq 'double' ||
+ $Words[$Word_Count] eq 'triple') {
+ &dblring($verts);
+ } elsif ($Words[$Word_Count] =~ /arom/) {
+ $Aromatic++;
+ $Word_Count++; # handled later
+### ring()
+ } elsif ($Words[$Word_Count] eq 'put') {
+ &putring($verts);
+ $Nput++;
+ } elsif ($Words[$Word_Count] =~ /^#/) {
+ $Word_Count = $#Words + 1;
+ last;
+ } else {
+ if ($Words[$Word_Count] eq 'with' || $Words[$Word_Count] eq 'at') {
+ $withat = 1;
+ }
+ $other = $other . ' ' . $Words[$Word_Count];
+ $Word_Count++;
+ }
+ }
+ $typeint = $Types{'RING'} . $verts . $pt; # RING | verts | dir
+ if ($withat == 0) {
+ # join a ring to something
+ if ( $Last_Type =~ /^$Types{'RING'}/ ) {
+ # ring to ring
+ if (substr($typeint, 2) eq substr($Last_Type, 2)) {
+ # fails if not 6-sided
+ $fused = 'with .V6 at Last.V2';
+ }
+ }
+ # if all else fails
+ $fused = sprintf('with .%s at Last.%s',
+ &leave($typeint, $Dir + 180), &leave($Last_Type, $Dir));
+ }
+ printf "Last: [\n";
+ &makering($type, $pt, $verts);
+ printf "] %s %s\n", $fused, $other;
+ $Last_Type = $typeint;
+ $Labtype{$Last_Name} = $Last_Type if $Last_Name;
+} # ring()
+
+
+##########
+# ringleave(<last>, <d>)
+#
+sub ringleave {
+ my ($last, $d) = @_;
+ my ($rd, $verts);
+ # return vertex of ring in direction d
+ $verts = substr($last, 1, 1);
+ $rd = substr($last, 2);
+ sprintf('V%d.%s', int( (($d - $rd) % 360) / (360 / $verts)) + 1,
+ &corner($d));
+} # ringleave()
+
+
+##########
+# setparams(<scale>)
+#
+sub setparams {
+ my ($scale) = @_;
+ $Params{'lineht'} = $scale * 0.2;
+ $Params{'linewid'} = $scale * 0.2;
+ $Params{'textht'} = $scale * 0.16;
+ $Params{'db'} = $scale * 0.2; # bond length
+ $Params{'cwid'} = $scale * 0.12; # character width
+ $Params{'cr'} = $scale * 0.08; # rad of invis circles at ring vertices
+ $Params{'crh'} = $scale * 0.16; # ht of invis ellipse at ring vertices
+ $Params{'crw'} = $scale * 0.12; # wid
+ $Params{'dav'} = $scale * 0.015; # vertical shift up for atoms in atom macro
+ $Params{'dew'} = $scale * 0.02; # east-west shift for left of/right of
+ $Params{'ringside'} = $scale * 0.3; # side of all rings
+ $Params{'dbrack'} = $scale * 0.1; # length of bottom of bracket
+} # setparams()
+
+
+sub usage {
+ print <<EOF;
+usage: $chem [file ...]
+usage: $chem { -h | --help | -v | --version }
+
+$chem is a groff preprocessor for producing chemical structure
+diagrams. It produces input for the $makevar{'G'}pic preprocessor. If
+no file operands are given, or if file is "-", the standard input stream
+is read.
+
+Options:
+ -h, --help Display this message and exit.
+ -v, --version Display version information and exit.
+EOF
+}
+
+
+sub version {
+ print <<EOF;
+$chem (groff $groff_version) $chem_version
+$copyright
+License GPLv2: GNU GPL version 2
+<https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html>
+This is free software: you are free to change and redistribute it.
+There is NO WARRANTY, to the extent permitted by law.
+EOF
+}
+
+1;
+
+# Local Variables:
+# fill-column: 72
+# mode: CPerl
+# End:
+# vim: set cindent noexpandtab shiftwidth=2 softtabstop=2 textwidth=72:
diff --git a/contrib/chem/examples/122/README.txt b/contrib/chem/examples/122/README.txt
new file mode 100644
index 0000000..6f3809b
--- /dev/null
+++ b/contrib/chem/examples/122/README.txt
@@ -0,0 +1,57 @@
+This directory contains the examples for the 'chem' language written
+in the book:
+
+ Computing Science Technical Report No. 122
+ CHEM - A Program for Typesetting Chemical Diagrams: User Manual
+ by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan
+
+The book is available in the internet at
+<http://cm.bell-labs.com/cm/cs/cstr/122.ps.gz>.
+
+Many of the examples had to be fixed. Unfortunately, the 'chem' akw
+version does not run on many of these programs. But the Perl version
+of 'chem' works on all examples.
+
+Most examples do not use the modern chemical display. They have C
+atoms added, whereas the modern method omits all C atoms and their
+directly appended H atoms.
+
+The examples are named and sorted by the chapter where they are found
+in the book. For example, the file 'ch4c_colon.chem' means a 'chem'
+example in chapter 4; according to 'c', it is the third example in
+this chapter; the name 'colon' is used to describe the context of the
+example.
+
+You can view the graphical display of the examples by calling
+
+ @g@chem <file> | groff -p ...
+
+
+####### License
+
+Copyright (C) 2006-2020 Free Software Foundation, Inc.
+Written by Bernd Warken <groff-bernd.warken-72@web.de>.
+
+This file is part of 'chem', which is part of 'groff'.
+
+'groff' is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License (GPL) version 2 as
+published by the Free Software Foundation.
+
+'groff' is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+The GPL2 license text is available in the internet at
+<http://www.gnu.org/licenses/gpl-2.0.html>.
+
+
+##### Editor settings
+
+Local Variables:
+mode: text
+End:
diff --git a/contrib/chem/examples/122/ch2a_ethyl.chem b/contrib/chem/examples/122/ch2a_ethyl.chem
new file mode 100644
index 0000000..089de73
--- /dev/null
+++ b/contrib/chem/examples/122/ch2a_ethyl.chem
@@ -0,0 +1,43 @@
+ch2a_ethyl.chem:
+.br
+.cstart
+
+# Example file for 'chem':
+
+# This originates from Computing Science Technical Report No. 122
+# CHEM - A Program for Typesetting Chemical Diagrams: User Manual
+# by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan
+# <http://cm.bell-labs.com/cm/cs/cstr/122.ps.gz>.
+
+# Copyright (C) 2006-2020 Free Software Foundation, Inc.
+
+# This file is part of 'chem', which is part of 'groff'.
+
+# 'groff' is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License (GPL) version 2 as
+# published by the Free Software Foundation.
+
+# 'groff' is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# The GPL2 license text is available in the internet at
+# <http://www.gnu.org/licenses/gpl-2.0.html>.
+
+########################################################################
+
+ CH3
+ bond
+ CH2
+ bond
+
+# Local Variables:
+# fill-column: 72
+# mode: Nroff
+# End:
+# vim: set textwidth=72:
+.cend
diff --git a/contrib/chem/examples/122/ch2b_benzene.chem b/contrib/chem/examples/122/ch2b_benzene.chem
new file mode 100644
index 0000000..0af1c9f
--- /dev/null
+++ b/contrib/chem/examples/122/ch2b_benzene.chem
@@ -0,0 +1,38 @@
+ch2b_benzene.chem:
+.br
+.cstart
+
+# Example file for 'chem':
+
+# This originates from Computing Science Technical Report No. 122
+# CHEM - A Program for Typesetting Chemical Diagrams: User Manual
+# by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan
+# <http://cm.bell-labs.com/cm/cs/cstr/122.ps.gz>.
+
+# Copyright (C) 2006-2020 Free Software Foundation, Inc.
+
+# This file is part of 'chem', which is part of 'groff'.
+
+# 'groff' is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License (GPL) version 2 as
+# published by the Free Software Foundation.
+
+# 'groff' is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# The GPL2 license text is available in the internet at
+# <http://www.gnu.org/licenses/gpl-2.0.html>.
+
+########################################################################
+
+ benzene
+
+# Local Variables:
+# mode: Nroff
+# End:
+.cend
diff --git a/contrib/chem/examples/122/ch2c_benzene_right.chem b/contrib/chem/examples/122/ch2c_benzene_right.chem
new file mode 100644
index 0000000..d9f29b5
--- /dev/null
+++ b/contrib/chem/examples/122/ch2c_benzene_right.chem
@@ -0,0 +1,36 @@
+ch2c_benzene_right.chem:
+.br
+.cstart
+
+# Example file for 'chem':
+
+# This originates from Computing Science Technical Report No. 122
+# CHEM - A Program for Typesetting Chemical Diagrams: User Manual
+# by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan
+# <http://cm.bell-labs.com/cm/cs/cstr/122.ps.gz>.
+
+# Copyright (C) 2006-2020 Free Software Foundation, Inc.
+
+# 'groff' is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License (GPL) version 2 as
+# published by the Free Software Foundation.
+
+# 'groff' is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# The GPL2 license text is available in the internet at
+# <http://www.gnu.org/licenses/gpl-2.0.html>.
+
+########################################################################
+
+ benzene pointing right # a rotated benzene ring
+
+# Local Variables:
+# mode: Nroff
+# End:
+.cend
diff --git a/contrib/chem/examples/122/ch4a_stick.chem b/contrib/chem/examples/122/ch4a_stick.chem
new file mode 100644
index 0000000..f4caef3
--- /dev/null
+++ b/contrib/chem/examples/122/ch4a_stick.chem
@@ -0,0 +1,45 @@
+ch4a_stick.chem:
+.br
+.cstart
+
+# Example file for 'chem':
+
+# This originates from Computing Science Technical Report No. 122
+# CHEM - A Program for Typesetting Chemical Diagrams: User Manual
+# by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan
+# <http://cm.bell-labs.com/cm/cs/cstr/122.ps.gz>.
+
+# Copyright (C) 2006-2020 Free Software Foundation, Inc.
+
+# This file is part of 'chem', which is part of 'groff'.
+
+# 'groff' is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License (GPL) version 2 as
+# published by the Free Software Foundation.
+
+# 'groff' is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# The GPL2 license text is available in the internet at
+# <http://www.gnu.org/licenses/gpl-2.0.html>.
+
+########################################################################
+
+ bond right
+ bond 60
+ bond 120
+ bond 60
+ bond 120
+ bond down
+
+# Local Variables:
+# fill-column: 72
+# mode: Nroff
+# End:
+# vim: set textwidth=72:
+.cend
diff --git a/contrib/chem/examples/122/ch4b_methyl_acetate.chem b/contrib/chem/examples/122/ch4b_methyl_acetate.chem
new file mode 100644
index 0000000..31625a3
--- /dev/null
+++ b/contrib/chem/examples/122/ch4b_methyl_acetate.chem
@@ -0,0 +1,47 @@
+ch4b_methyl_acetate.chem:
+.br
+.cstart
+
+# Example file for 'chem':
+
+# This originates from Computing Science Technical Report No. 122
+# CHEM - A Program for Typesetting Chemical Diagrams: User Manual
+# by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan
+# <http://cm.bell-labs.com/cm/cs/cstr/122.ps.gz>.
+
+# Copyright (C) 2006-2020 Free Software Foundation, Inc.
+
+# This file is part of 'chem', which is part of 'groff'.
+
+# 'groff' is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License (GPL) version 2 as
+# published by the Free Software Foundation.
+
+# 'groff' is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# The GPL2 license text is available in the internet at
+# <http://www.gnu.org/licenses/gpl-2.0.html>.
+
+########################################################################
+
+CH3 # the 3 is automatically turned into a subscript
+bond # the implicit direction is right
+ # implicit connection is to right side of CH3
+C
+double bond 30 # by default, from the substituent C
+O
+bond 120 from C # must be "from C"; otherwise would leave from O
+O
+bond right
+CH3
+
+# Local Variables:
+# mode: Nroff
+# End:
+.cend
diff --git a/contrib/chem/examples/122/ch4c_colon.chem b/contrib/chem/examples/122/ch4c_colon.chem
new file mode 100644
index 0000000..5e42f6b
--- /dev/null
+++ b/contrib/chem/examples/122/ch4c_colon.chem
@@ -0,0 +1,42 @@
+ch4c_colon.chem:
+.br
+.cstart
+
+# Example file for 'chem':
+
+# This originates from Computing Science Technical Report No. 122
+# CHEM - A Program for Typesetting Chemical Diagrams: User Manual
+# by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan
+# <http://cm.bell-labs.com/cm/cs/cstr/122.ps.gz>.
+
+# Copyright (C) 2006-2020 Free Software Foundation, Inc.
+
+# This file is part of 'chem', which is part of 'groff'.
+
+# 'groff' is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License (GPL) version 2 as
+# published by the Free Software Foundation.
+
+# 'groff' is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# The GPL2 license text is available in the internet at
+# <http://www.gnu.org/licenses/gpl-2.0.html>.
+
+########################################################################
+
+ CH3
+ bond ; C
+ double bond 30 ; O
+ bond 120 from C ; O
+ bond right ; CH3
+
+# Local Variables:
+# mode: Nroff
+# End:
+.cend
diff --git a/contrib/chem/examples/122/ch4d_HCl.H2O.chem b/contrib/chem/examples/122/ch4d_HCl.H2O.chem
new file mode 100644
index 0000000..b6ac99d
--- /dev/null
+++ b/contrib/chem/examples/122/ch4d_HCl.H2O.chem
@@ -0,0 +1,38 @@
+ch4d_HCl.H2O.chem:
+.br
+.cstart
+
+# Example file for 'chem':
+
+# This originates from Computing Science Technical Report No. 122
+# CHEM - A Program for Typesetting Chemical Diagrams: User Manual
+# by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan
+# <http://cm.bell-labs.com/cm/cs/cstr/122.ps.gz>.
+
+# Copyright (C) 2006-2020 Free Software Foundation, Inc.
+
+# This file is part of 'chem', which is part of 'groff'.
+
+# 'groff' is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License (GPL) version 2 as
+# published by the Free Software Foundation.
+
+# 'groff' is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# The GPL2 license text is available in the internet at
+# <http://www.gnu.org/licenses/gpl-2.0.html>.
+
+########################################################################
+
+ HCl.H2O
+
+# Local Variables:
+# mode: Nroff
+# End:
+.cend
diff --git a/contrib/chem/examples/122/ch4e_CaSO4.2H2O.chem b/contrib/chem/examples/122/ch4e_CaSO4.2H2O.chem
new file mode 100644
index 0000000..b2f8bc0
--- /dev/null
+++ b/contrib/chem/examples/122/ch4e_CaSO4.2H2O.chem
@@ -0,0 +1,38 @@
+ch4e_CaSO4.2H2O.chem:
+.br
+.cstart
+
+# Example file for 'chem':
+
+# This originates from Computing Science Technical Report No. 122
+# CHEM - A Program for Typesetting Chemical Diagrams: User Manual
+# by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan
+# <http://cm.bell-labs.com/cm/cs/cstr/122.ps.gz>.
+
+# Copyright (C) 2006-2020 Free Software Foundation, Inc.
+
+# This file is part of 'chem', which is part of 'groff'.
+
+# 'groff' is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License (GPL) version 2 as
+# published by the Free Software Foundation.
+
+# 'groff' is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# The GPL2 license text is available in the internet at
+# <http://www.gnu.org/licenses/gpl-2.0.html>.
+
+########################################################################
+
+ CaSO4.2H2O
+
+# Local Variables:
+# mode: Nroff
+# End:
+.cend
diff --git a/contrib/chem/examples/122/ch4f_C.chem b/contrib/chem/examples/122/ch4f_C.chem
new file mode 100644
index 0000000..d54461f
--- /dev/null
+++ b/contrib/chem/examples/122/ch4f_C.chem
@@ -0,0 +1,48 @@
+ch4f_C.chem:
+.br
+.cstart
+
+# Example file for 'chem':
+
+# This originates from Computing Science Technical Report No. 122
+# CHEM - A Program for Typesetting Chemical Diagrams: User Manual
+# by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan
+# <http://cm.bell-labs.com/cm/cs/cstr/122.ps.gz>.
+
+# Copyright (C) 2006-2020 Free Software Foundation, Inc.
+
+# This file is part of 'chem', which is part of 'groff'.
+
+# 'groff' is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License (GPL) version 2 as
+# published by the Free Software Foundation.
+
+# 'groff' is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# The GPL2 license text is available in the internet at
+# <http://www.gnu.org/licenses/gpl-2.0.html>.
+
+########################################################################
+
+ bond ; C # 1st definition of C
+ bond up from C
+ bond down from C
+ bond right from C ; C # 2nd definition of C
+ bond up from C
+ bond down from C
+ bond right from C ; C # 3rd definition of C
+ bond up from C
+ bond down from C
+ bond right from C
+
+
+# Local Variables:
+# mode: Nroff
+# End:
+.cend
diff --git a/contrib/chem/examples/122/ch4g_BP.chem b/contrib/chem/examples/122/ch4g_BP.chem
new file mode 100644
index 0000000..9c6af4b
--- /dev/null
+++ b/contrib/chem/examples/122/ch4g_BP.chem
@@ -0,0 +1,48 @@
+ch4g_BP.chem:
+.br
+.cstart
+
+# Example file for 'chem':
+
+# This originates from Computing Science Technical Report No. 122
+# CHEM - A Program for Typesetting Chemical Diagrams: User Manual
+# by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan
+# <http://cm.bell-labs.com/cm/cs/cstr/122.ps.gz>.
+
+# Copyright (C) 2006-2020 Free Software Foundation, Inc.
+
+# This file is part of 'chem', which is part of 'groff'.
+
+# 'groff' is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License (GPL) version 2 as
+# published by the Free Software Foundation.
+
+# 'groff' is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# The GPL2 license text is available in the internet at
+# <http://www.gnu.org/licenses/gpl-2.0.html>.
+
+########################################################################
+
+# this is the isopropyl group
+ bond 120 ; BP # BP is right end of this bond
+ bond -120 from BP
+ bond right from BP ; C
+ front bond up ; CH3
+ back bond down from C ; D
+ bond right from C ; BP
+# redefine BP to mean the center carbon of this t-butyl group
+ bond up from BP
+ bond right from BP
+ bond down from BP
+
+# Local Variables:
+# mode: Nroff
+# End:
+.cend
diff --git a/contrib/chem/examples/122/ch4h_methacrylate.chem b/contrib/chem/examples/122/ch4h_methacrylate.chem
new file mode 100644
index 0000000..8300d25
--- /dev/null
+++ b/contrib/chem/examples/122/ch4h_methacrylate.chem
@@ -0,0 +1,65 @@
+ch4h_methacrylate.chem:
+.br
+.cstart
+
+# Example file for 'chem':
+
+# This originates from Computing Science Technical Report No. 122
+# CHEM - A Program for Typesetting Chemical Diagrams: User Manual
+# by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan
+# <http://cm.bell-labs.com/cm/cs/cstr/122.ps.gz>.
+
+# Copyright (C) 2006-2020 Free Software Foundation, Inc.
+
+# This file is part of 'chem', which is part of 'groff'.
+
+# 'groff' is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License (GPL) version 2 as
+# published by the Free Software Foundation.
+
+# 'groff' is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# The GPL2 license text is available in the internet at
+# <http://www.gnu.org/licenses/gpl-2.0.html>.
+
+########################################################################
+
+ bond dotted
+ bond right ; BP
+ bond up from BP ; C
+ double bond -60 from C ; O
+ bond 60 length .1 from C ; OCH3
+ bond down from BP ; CH3
+# begin second segment of polymer
+ bond right length .5 from BP ; BP
+ bond up length .1 from BP ; H
+ bond down length .1 from BP ; H
+# begin third segment of polymer
+ bond right length .5 from BP ; BP
+ bond up from BP ; C
+ double bond -60 from C ; O
+ bond 60 length .1 from C ; OCH3
+ bond down from BP ; CH3
+# begin fourth segment of polymer
+ bond right length .5 from BP ; BP
+ bond up length .1 from BP ; H
+ bond down length .1 from BP ; H
+# begin fifth segment of polymer
+ bond right length .5 from BP ; BP
+ bond up from BP ; C
+ double bond -60 from C ; O
+ bond 60 length .1 from C ; OCH3
+ bond down from BP ; CH3
+ bond right from BP
+ bond dotted
+
+# Local Variables:
+# mode: Nroff
+# End:
+.cend
diff --git a/contrib/chem/examples/122/ch4i_cyclo.chem b/contrib/chem/examples/122/ch4i_cyclo.chem
new file mode 100644
index 0000000..866e6f7
--- /dev/null
+++ b/contrib/chem/examples/122/ch4i_cyclo.chem
@@ -0,0 +1,45 @@
+ch4i_cyclo.chem:
+.br
+.cstart
+
+# Example file for 'chem':
+
+# This originates from Computing Science Technical Report No. 122
+# CHEM - A Program for Typesetting Chemical Diagrams: User Manual
+# by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan
+# <http://cm.bell-labs.com/cm/cs/cstr/122.ps.gz>.
+
+# Copyright (C) 2006-2020 Free Software Foundation, Inc.
+
+# This file is part of 'chem', which is part of 'groff'.
+
+# 'groff' is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License (GPL) version 2 as
+# published by the Free Software Foundation.
+
+# 'groff' is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# The GPL2 license text is available in the internet at
+# <http://www.gnu.org/licenses/gpl-2.0.html>.
+
+########################################################################
+
+R3: ring3
+R4: ring4 at R3 + (.75,0)
+R5: ring5 at R4 + (.75,0)
+R6: ring6 at R5 + (.75,0)
+B: benzene at R6 + (.75,0)
+R7: ring7 at B + (.75,0)
+R8: ring8 at R7 + (.75,0)
+
+
+# Local Variables:
+# mode: Nroff
+# End:
+.cend
diff --git a/contrib/chem/examples/122/ch4j_ring4.chem b/contrib/chem/examples/122/ch4j_ring4.chem
new file mode 100644
index 0000000..9caf718
--- /dev/null
+++ b/contrib/chem/examples/122/ch4j_ring4.chem
@@ -0,0 +1,40 @@
+ch4j_ring4.chem:
+.br
+.cstart
+
+# Example file for 'chem':
+
+# This originates from Computing Science Technical Report No. 122
+# CHEM - A Program for Typesetting Chemical Diagrams: User Manual
+# by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan
+# <http://cm.bell-labs.com/cm/cs/cstr/122.ps.gz>.
+
+# Copyright (C) 2006-2020 Free Software Foundation, Inc.
+
+# This file is part of 'chem', which is part of 'groff'.
+
+# 'groff' is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License (GPL) version 2 as
+# published by the Free Software Foundation.
+
+# 'groff' is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# The GPL2 license text is available in the internet at
+# <http://www.gnu.org/licenses/gpl-2.0.html>.
+
+########################################################################
+
+ ring4 pointing 45
+
+# Local Variables:
+# fill-column: 72
+# mode: Nroff
+# End:
+# vim: set textwidth=72:
+.cend
diff --git a/contrib/chem/examples/122/ch4k_ring3.chem b/contrib/chem/examples/122/ch4k_ring3.chem
new file mode 100644
index 0000000..2a2d856
--- /dev/null
+++ b/contrib/chem/examples/122/ch4k_ring3.chem
@@ -0,0 +1,40 @@
+ch4k_ring3.chem:
+.br
+.cstart
+
+# Example file for 'chem':
+
+# This originates from Computing Science Technical Report No. 122
+# CHEM - A Program for Typesetting Chemical Diagrams: User Manual
+# by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan
+# <http://cm.bell-labs.com/cm/cs/cstr/122.ps.gz>.
+
+# Copyright (C) 2006-2020 Free Software Foundation, Inc.
+
+# This file is part of 'chem', which is part of 'groff'.
+
+# 'groff' is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License (GPL) version 2 as
+# published by the Free Software Foundation.
+
+# 'groff' is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# The GPL2 license text is available in the internet at
+# <http://www.gnu.org/licenses/gpl-2.0.html>.
+
+########################################################################
+
+R: ring3
+ back bond 120 from R.V2 ; C2H5
+ front bond -120 from R.V3 ; HO
+
+# Local Variables:
+# mode: Nroff
+# End:
+.cend
diff --git a/contrib/chem/examples/122/ch4l_vertex.chem b/contrib/chem/examples/122/ch4l_vertex.chem
new file mode 100644
index 0000000..d9fcb07
--- /dev/null
+++ b/contrib/chem/examples/122/ch4l_vertex.chem
@@ -0,0 +1,45 @@
+ch4l_vertex.chem:
+.br
+.cstart
+
+# Example file for 'chem':
+
+# This originates from Computing Science Technical Report No. 122
+# CHEM - A Program for Typesetting Chemical Diagrams: User Manual
+# by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan
+# <http://cm.bell-labs.com/cm/cs/cstr/122.ps.gz>.
+
+# Copyright (C) 2006-2020 Free Software Foundation, Inc.
+
+# This file is part of 'chem', which is part of 'groff'.
+
+# 'groff' is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License (GPL) version 2 as
+# published by the Free Software Foundation.
+
+# 'groff' is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# The GPL2 license text is available in the internet at
+# <http://www.gnu.org/licenses/gpl-2.0.html>.
+
+########################################################################
+
+R: benzene pointing right
+ bond left from R.V4 ; HO
+ bond -150 from R.V3 ; CH3O
+ bond right from R.V1 ; C
+ double bond up from C ; O
+ bond right from C ; N
+ bond 45 ; C2H5
+ bond 135 from N ; C2H5
+
+# Local Variables:
+# mode: Nroff
+# End:
+.cend
diff --git a/contrib/chem/examples/122/ch4m_double.chem b/contrib/chem/examples/122/ch4m_double.chem
new file mode 100644
index 0000000..c5b1373
--- /dev/null
+++ b/contrib/chem/examples/122/ch4m_double.chem
@@ -0,0 +1,38 @@
+ch4m_double.chem:
+.br
+.cstart
+
+# Example file for 'chem':
+
+# This originates from Computing Science Technical Report No. 122
+# CHEM - A Program for Typesetting Chemical Diagrams: User Manual
+# by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan
+# <http://cm.bell-labs.com/cm/cs/cstr/122.ps.gz>.
+
+# Copyright (C) 2006-2020 Free Software Foundation, Inc.
+
+# This file is part of 'chem', which is part of 'groff'.
+
+# 'groff' is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License (GPL) version 2 as
+# published by the Free Software Foundation.
+
+# 'groff' is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# The GPL2 license text is available in the internet at
+# <http://www.gnu.org/licenses/gpl-2.0.html>.
+
+########################################################################
+
+ ring double 1,2 3,4 5,6
+
+# Local Variables:
+# mode: Nroff
+# End:
+.cend
diff --git a/contrib/chem/examples/122/ch4n_triple.chem b/contrib/chem/examples/122/ch4n_triple.chem
new file mode 100644
index 0000000..5766f85
--- /dev/null
+++ b/contrib/chem/examples/122/ch4n_triple.chem
@@ -0,0 +1,38 @@
+ch4n_triple.chem:
+.br
+.cstart
+
+# Example file for 'chem':
+
+# This originates from Computing Science Technical Report No. 122
+# CHEM - A Program for Typesetting Chemical Diagrams: User Manual
+# by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan
+# <http://cm.bell-labs.com/cm/cs/cstr/122.ps.gz>.
+
+# Copyright (C) 2006-2020 Free Software Foundation, Inc.
+
+# This file is part of 'chem', which is part of 'groff'.
+
+# 'groff' is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License (GPL) version 2 as
+# published by the Free Software Foundation.
+
+# 'groff' is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# The GPL2 license text is available in the internet at
+# <http://www.gnu.org/licenses/gpl-2.0.html>.
+
+########################################################################
+
+ ring8 triple 3,4
+
+# Local Variables:
+# mode: Nroff
+# End:
+.cend
diff --git a/contrib/chem/examples/122/ch4o_aromatic.chem b/contrib/chem/examples/122/ch4o_aromatic.chem
new file mode 100644
index 0000000..aa303c7
--- /dev/null
+++ b/contrib/chem/examples/122/ch4o_aromatic.chem
@@ -0,0 +1,37 @@
+ch4o_aromatic.chem:
+.br
+.cstart
+
+# Example file for 'chem':
+
+# This originates from Computing Science Technical Report No. 122
+# CHEM - A Program for Typesetting Chemical Diagrams: User Manual
+# by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan
+# <http://cm.bell-labs.com/cm/cs/cstr/122.ps.gz>.
+
+# Copyright (C) 2006-2020 Free Software Foundation, Inc.
+
+# 'groff' is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License (GPL) version 2 as
+# published by the Free Software Foundation.
+
+# 'groff' is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# The GPL2 license text is available in the internet at
+# <http://www.gnu.org/licenses/gpl-2.0.html>.
+
+########################################################################
+
+R: aromatic ring7
+ "+" at R
+
+# Local Variables:
+# mode: Nroff
+# End:
+.cend
diff --git a/contrib/chem/examples/122/ch4p_cholestanol.chem b/contrib/chem/examples/122/ch4p_cholestanol.chem
new file mode 100644
index 0000000..e292bea
--- /dev/null
+++ b/contrib/chem/examples/122/ch4p_cholestanol.chem
@@ -0,0 +1,60 @@
+ch4p_cholestanol.chem:
+.br
+.cstart
+
+# Example file for 'chem':
+
+# This originates from Computing Science Technical Report No. 122
+# CHEM - A Program for Typesetting Chemical Diagrams: User Manual
+# by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan
+# <http://cm.bell-labs.com/cm/cs/cstr/122.ps.gz>.
+
+# Copyright (C) 2006-2020 Free Software Foundation, Inc.
+
+# This file is part of 'chem', which is part of 'groff'.
+
+# 'groff' is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License (GPL) version 2 as
+# published by the Free Software Foundation.
+
+# 'groff' is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# The GPL2 license text is available in the internet at
+# <http://www.gnu.org/licenses/gpl-2.0.html>.
+
+########################################################################
+
+R1: ring6
+ "R1" at R1 # this puts a label at R1
+ front bond -120 from R1.V5 ; HO
+ # the following line says "fuse the next six-
+ # membered ring with its 6th vertex joining
+ # the second vertex of R1"
+R2: ring6 with .V6 at R1.V2
+ front bond up from R2.V6 ; CH3
+ back bond down from R2.V4 ; H
+ back bond down from R2.V1 ; H
+ front bond up from R2.V2 ; H
+R3: ring6 with .V4 at R2.V2
+R4: flatring with .V5 at R3.V2
+ front bond up from R4.V5 ; CH3
+ back bond down from R4.V4 ; H # this is the alkyl chain
+ bond up from R4.V1 ; BP
+ bond -60 from BP
+ bond 60 from BP
+ bond 120
+ bond 60
+ bond 120 ; BP
+ bond down from BP
+ bond 60 from BP
+
+# Local Variables:
+# mode: Nroff
+# End:
+.cend
diff --git a/contrib/chem/examples/122/ch4q_rings.chem b/contrib/chem/examples/122/ch4q_rings.chem
new file mode 100644
index 0000000..bafdd92
--- /dev/null
+++ b/contrib/chem/examples/122/ch4q_rings.chem
@@ -0,0 +1,46 @@
+ch4q_rings.chem:
+.br
+.cstart
+
+# Example file for 'chem':
+
+# This originates from Computing Science Technical Report No. 122
+# CHEM - A Program for Typesetting Chemical Diagrams: User Manual
+# by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan
+# <http://cm.bell-labs.com/cm/cs/cstr/122.ps.gz>.
+
+# Copyright (C) 2006-2020 Free Software Foundation, Inc.
+
+# This file is part of 'chem', which is part of 'groff'.
+
+# 'groff' is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License (GPL) version 2 as
+# published by the Free Software Foundation.
+
+# 'groff' is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# The GPL2 license text is available in the internet at
+# <http://www.gnu.org/licenses/gpl-2.0.html>.
+
+########################################################################
+
+R3: ring3
+R4: ring4 pointing 45 with .V1 at R3.V2
+R5: ring5 pointing down with .V4 at R4.V2
+R6: ring6 pointing 54 with .V6 at R5.V5
+ # the following lines specify the labels inside the rings
+ "3" at R3
+ "4" at R4
+ "5" at R5
+ "6" at R6
+
+# Local Variables:
+# mode: Nroff
+# End:
+.cend
diff --git a/contrib/chem/examples/122/ch4r_spiro.chem b/contrib/chem/examples/122/ch4r_spiro.chem
new file mode 100644
index 0000000..24ec050
--- /dev/null
+++ b/contrib/chem/examples/122/ch4r_spiro.chem
@@ -0,0 +1,42 @@
+ch4r_spiro.chem:
+.br
+.cstart
+
+# Example file for 'chem':
+
+# This originates from Computing Science Technical Report No. 122
+# CHEM - A Program for Typesetting Chemical Diagrams: User Manual
+# by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan
+# <http://cm.bell-labs.com/cm/cs/cstr/122.ps.gz>.
+
+# Copyright (C) 2006-2020 Free Software Foundation, Inc.
+
+# This file is part of 'chem', which is part of 'groff'.
+
+# 'groff' is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License (GPL) version 2 as
+# published by the Free Software Foundation.
+
+# 'groff' is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# The GPL2 license text is available in the internet at
+# <http://www.gnu.org/licenses/gpl-2.0.html>.
+
+########################################################################
+
+R1: ring6
+R2: ring6 with .V1 at R1.V4
+R3: ring5 with .V5 at R2.V3
+ back bond 60 from R3.V2 ; OH
+ front bond 150 from R3.V3 ; OH
+
+# Local Variables:
+# mode: Nroff
+# End:
+.cend
diff --git a/contrib/chem/examples/122/ch4s_heteroatoms.chem b/contrib/chem/examples/122/ch4s_heteroatoms.chem
new file mode 100644
index 0000000..7dc8ba7
--- /dev/null
+++ b/contrib/chem/examples/122/ch4s_heteroatoms.chem
@@ -0,0 +1,38 @@
+ch4s_heteroatoms.chem:
+.br
+.cstart
+
+# Example file for 'chem':
+
+# This originates from Computing Science Technical Report No. 122
+# CHEM - A Program for Typesetting Chemical Diagrams: User Manual
+# by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan
+# <http://cm.bell-labs.com/cm/cs/cstr/122.ps.gz>.
+
+# Copyright (C) 2006-2020 Free Software Foundation, Inc.
+
+# This file is part of 'chem', which is part of 'groff'.
+
+# 'groff' is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License (GPL) version 2 as
+# published by the Free Software Foundation.
+
+# 'groff' is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# The GPL2 license text is available in the internet at
+# <http://www.gnu.org/licenses/gpl-2.0.html>.
+
+########################################################################
+
+ ring put N at 2 put S at 4 double 2,3 4,5 6,1
+
+# Local Variables:
+# mode: Nroff
+# End:
+.cend
diff --git a/contrib/chem/examples/122/ch4t_polycyclic.chem b/contrib/chem/examples/122/ch4t_polycyclic.chem
new file mode 100644
index 0000000..fc6b580
--- /dev/null
+++ b/contrib/chem/examples/122/ch4t_polycyclic.chem
@@ -0,0 +1,49 @@
+ch4t_polycyclic.chem:
+.br
+.cstart
+
+# Example file for 'chem':
+
+# This originates from Computing Science Technical Report No. 122
+# CHEM - A Program for Typesetting Chemical Diagrams: User Manual
+# by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan
+# <http://cm.bell-labs.com/cm/cs/cstr/122.ps.gz>.
+
+# Copyright (C) 2006-2020 Free Software Foundation, Inc.
+
+# This file is part of 'chem', which is part of 'groff'.
+
+# 'groff' is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License (GPL) version 2 as
+# published by the Free Software Foundation.
+
+# 'groff' is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# The GPL2 license text is available in the internet at
+# <http://www.gnu.org/licenses/gpl-2.0.html>.
+
+########################################################################
+
+R1: benzene pointing right
+ bond 30 from R1.V6 ; Br
+R2: benzene pointing right with .V5 at R1.V1
+R3: benzene pointing right with .V1 at R2.V3
+ bond 150 from R3.V2 ; CO2H
+R4: benzene pointing right with .V1 at R1.V3
+# next line names bond B1 so we can refer to its end
+B1: bond left from R4.V4
+ ring6 put N at 4 double 2,3 4,5 6,1 with .V3 at B1.end
+B2: bond right from R2.V1
+R5: benzene with .V5 at B2.end
+ ring6 put N at 4 double 1,2 3,4 with .V5 at R5.V3
+
+# Local Variables:
+# mode: Nroff
+# End:
+.cend
diff --git a/contrib/chem/examples/122/ch4u_nicotine.chem b/contrib/chem/examples/122/ch4u_nicotine.chem
new file mode 100644
index 0000000..d38a7c8
--- /dev/null
+++ b/contrib/chem/examples/122/ch4u_nicotine.chem
@@ -0,0 +1,42 @@
+ch4u_nicotine.chem:
+.br
+.cstart
+
+# Example file for 'chem':
+
+# This originates from Computing Science Technical Report No. 122
+# CHEM - A Program for Typesetting Chemical Diagrams: User Manual
+# by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan
+# <http://cm.bell-labs.com/cm/cs/cstr/122.ps.gz>.
+
+# Copyright (C) 2006-2020 Free Software Foundation, Inc.
+
+# This file is part of 'chem', which is part of 'groff'.
+
+# 'groff' is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License (GPL) version 2 as
+# published by the Free Software Foundation.
+
+# 'groff' is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# The GPL2 license text is available in the internet at
+# <http://www.gnu.org/licenses/gpl-2.0.html>.
+
+########################################################################
+
+ benzene put N at 4
+ bond right
+ ring5 pointing down put N at 1
+ bond down from .N ; CH3 # or .V1
+
+
+# Local Variables:
+# mode: Nroff
+# End:
+.cend
diff --git a/contrib/chem/examples/122/ch4v_histidine.chem b/contrib/chem/examples/122/ch4v_histidine.chem
new file mode 100644
index 0000000..33a4e9d
--- /dev/null
+++ b/contrib/chem/examples/122/ch4v_histidine.chem
@@ -0,0 +1,44 @@
+ch4v_histidine.chem:
+.br
+.cstart
+
+# Example file for 'chem':
+
+# This originates from Computing Science Technical Report No. 122
+# CHEM - A Program for Typesetting Chemical Diagrams: User Manual
+# by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan
+# <http://cm.bell-labs.com/cm/cs/cstr/122.ps.gz>.
+
+# Copyright (C) 2006-2020 Free Software Foundation, Inc.
+
+# This file is part of 'chem', which is part of 'groff'.
+
+# 'groff' is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License (GPL) version 2 as
+# published by the Free Software Foundation.
+
+# 'groff' is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# The GPL2 license text is available in the internet at
+# <http://www.gnu.org/licenses/gpl-2.0.html>.
+
+########################################################################
+
+R1: flatring pointing down put N at 2 put N at 5 double 1,2 3,4
+ H right of R1.V5
+ bond right from R1.V4 ; CH2
+ bond right ; C
+ bond up from C ; H
+ bond down from C ; NH2
+ bond right from C ; CO2H
+
+# Local Variables:
+# mode: Nroff
+# End:
+.cend
diff --git a/contrib/chem/examples/122/ch4w_lsd.chem b/contrib/chem/examples/122/ch4w_lsd.chem
new file mode 100644
index 0000000..aa68b00
--- /dev/null
+++ b/contrib/chem/examples/122/ch4w_lsd.chem
@@ -0,0 +1,50 @@
+ch4w_lsd.chem:
+.br
+.cstart
+
+# Example file for 'chem':
+
+# This originates from Computing Science Technical Report No. 122
+# CHEM - A Program for Typesetting Chemical Diagrams: User Manual
+# by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan
+# <http://cm.bell-labs.com/cm/cs/cstr/122.ps.gz>.
+
+# Copyright (C) 2006-2020 Free Software Foundation, Inc.
+
+# This file is part of 'chem', which is part of 'groff'.
+
+# 'groff' is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License (GPL) version 2 as
+# published by the Free Software Foundation.
+
+# 'groff' is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# The GPL2 license text is available in the internet at
+# <http://www.gnu.org/licenses/gpl-2.0.html>.
+
+########################################################################
+
+B: benzene pointing right
+F: flatring pointing left put N at 5 double 3,4 with .V1 at B.V2
+ H below F.N
+R: ring pointing right with .V4 at B.V6
+ front bond right from R.V6 ; H
+W: ring pointing right with .V2 at R.V6 put N at 1 double 3,4
+ bond right from W.N ; CH3
+ back bond -60 from W.V5 ; H
+ bond up from W.V5 ; C
+ double bond up from C ; O
+ bond right from C ; N
+ bond 45 from N ; C2H5
+ bond 135 from N ; C2H5
+
+# Local Variables:
+# mode: Nroff
+# End:
+.cend
diff --git a/contrib/chem/examples/122/ch4x_anisole.chem b/contrib/chem/examples/122/ch4x_anisole.chem
new file mode 100644
index 0000000..ec78417
--- /dev/null
+++ b/contrib/chem/examples/122/ch4x_anisole.chem
@@ -0,0 +1,42 @@
+ch4x_anisole.chem:
+.br
+.cstart
+
+# Example file for 'chem':
+
+# This originates from Computing Science Technical Report No. 122
+# CHEM - A Program for Typesetting Chemical Diagrams: User Manual
+# by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan
+# <http://cm.bell-labs.com/cm/cs/cstr/122.ps.gz>.
+
+# Copyright (C) 2006-2020 Free Software Foundation, Inc.
+
+# This file is part of 'chem', which is part of 'groff'.
+
+# 'groff' is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License (GPL) version 2 as
+# published by the Free Software Foundation.
+
+# 'groff' is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# The GPL2 license text is available in the internet at
+# <http://www.gnu.org/licenses/gpl-2.0.html>.
+
+########################################################################
+
+R1: benzene
+ bond down from R1.V4 ; OCH3
+R2: benzene at R1 + (1.5,0)
+ bond down from R2.V4 ; O
+ CH3 right of O
+
+# Local Variables:
+# mode: Nroff
+# End:
+.cend
diff --git a/contrib/chem/examples/122/ch4y_reserpine.chem b/contrib/chem/examples/122/ch4y_reserpine.chem
new file mode 100644
index 0000000..fb5d1ca
--- /dev/null
+++ b/contrib/chem/examples/122/ch4y_reserpine.chem
@@ -0,0 +1,62 @@
+ch4y_reserpine.chem:
+.br
+.cstart
+
+# Example file for 'chem':
+
+# This originates from Computing Science Technical Report No. 122
+# CHEM - A Program for Typesetting Chemical Diagrams: User Manual
+# by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan
+# <http://cm.bell-labs.com/cm/cs/cstr/122.ps.gz>.
+# Some corrections were added.
+
+# Copyright (C) 2006-2020 Free Software Foundation, Inc.
+
+# This file is part of 'chem', which is part of 'groff'.
+
+# 'groff' is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License (GPL) version 2 as
+# published by the Free Software Foundation.
+
+# 'groff' is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# The GPL2 license text is available in the internet at
+# <http://www.gnu.org/licenses/gpl-2.0.html>.
+
+########################################################################
+
+ CH3O
+ bond 60
+R1: benzene
+R2: aromatic flatring5 pointing down put N at 1 with .V3 at R1.V2
+ H below R2.V1
+R3: ring put N at 3 with .V5 at R2.V5
+R4: ring put N at 1 with .V1 at R3.V3
+ back bond -120 from R4.V4 ; H
+ back bond 60 from R4.V3 ; H
+R5: ring with .V1 at R4.V3
+ bond -120 ; C
+ double bond down from C ; O
+ CH3O left of C
+ back bond 60 from R5.V3 ; H
+ back bond down from R5.V4 ; O
+ CH3 right of O
+ bond 120 from R5.V3 ; O
+ bond right length .1 from O ; C
+ double bond down ; O
+ bond right length .1 from C
+B: benzene pointing right
+ bond 30 from B.V6 ; OCH3
+ bond right from B.V1 ; OCH3
+ bond 150 from B.V2 ; OCH3
+
+# Local Variables:
+# mode: Nroff
+# End:
+.cend
diff --git a/contrib/chem/examples/122/ch4z1_eqn_glutamic.chem b/contrib/chem/examples/122/ch4z1_eqn_glutamic.chem
new file mode 100644
index 0000000..6cecd7c
--- /dev/null
+++ b/contrib/chem/examples/122/ch4z1_eqn_glutamic.chem
@@ -0,0 +1,78 @@
+ch4z1_eqn_glutamic.chem:
+.br
+.EQ
+delim $$
+.EN
+.cstart
+
+# Example file for 'chem':
+
+# This originates from Computing Science Technical Report No. 122
+# CHEM - A Program for Typesetting Chemical Diagrams: User Manual
+# by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan
+# <http://cm.bell-labs.com/cm/cs/cstr/122.ps.gz>.
+# Some corrections were added.
+
+# Copyright (C) 2006-2020 Free Software Foundation, Inc.
+
+# This file is part of 'chem', which is part of 'groff'.
+
+# 'groff' is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License (GPL) version 2 as
+# published by the Free Software Foundation.
+
+# 'groff' is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# The GPL2 license text is available in the internet at
+# <http://www.gnu.org/licenses/gpl-2.0.html>.
+
+########################################################################
+
+# a left bracket
+ bond right length .1 ; BP
+ bond up length .3
+ bond right length .1
+ bond down length .3 from BP
+ bond right length .1
+# this is the mainchain amide structure
+ bond right length .1 from BP ; NH
+ bond right ; CH
+# label the CH with an alpha, intended for eqn.
+# this line says "put the north edge of the alpha at the
+# south edge of the CH"
+ "$alpha$" with .n at CH.s
+ bond right from CH ; C
+ double bond up from C ; O
+ bond right length .1 from C ; BP
+# a right bracket
+ bond up length .3
+ bond left length .1
+ bond right length .1 from BP
+ bond down length .3 from BP ; BP
+ bond left length .1
+# label the degree of polymerization
+ "$n$" with .w at BP.se
+# this is the sidechain
+ bond up from CH ; CH2
+ "$beta$" with .e at CH2.w
+ bond up from CH2 ; CH2
+ "$gamma$" with .e at CH2.w
+ bond up from CH2 ; C
+# this is the benzyl ester part
+ double bond -60 from C ; O
+ bond 60 from C ; O
+ bond right ; CH2C6H5
+
+# Local Variables:
+# mode: Nroff
+# End:
+.cend
+.EQ
+delim off
+.EN
diff --git a/contrib/chem/examples/122/ch4z2_text.chem b/contrib/chem/examples/122/ch4z2_text.chem
new file mode 100644
index 0000000..2000636
--- /dev/null
+++ b/contrib/chem/examples/122/ch4z2_text.chem
@@ -0,0 +1,53 @@
+ch4z2_text.chem:
+.br
+.cstart
+
+# Example file for 'chem':
+
+# This originates from Computing Science Technical Report No. 122
+# CHEM - A Program for Typesetting Chemical Diagrams: User Manual
+# by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan
+# <http://cm.bell-labs.com/cm/cs/cstr/122.ps.gz>.
+
+# Copyright (C) 2006-2020 Free Software Foundation, Inc.
+
+# This file is part of 'chem', which is part of 'groff'.
+
+# 'groff' is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License (GPL) version 2 as
+# published by the Free Software Foundation.
+
+# 'groff' is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# The GPL2 license text is available in the internet at
+# <http://www.gnu.org/licenses/gpl-2.0.html>.
+
+########################################################################
+
+ bond 120 dotted
+ bond 120 length .3 ; BP
+ back bond -120 length .25 from BP ; H
+ front bond 120 length .25 from BP ; CH3
+ bond 60 length .5 from BP ; BP
+ bond -60 length .25 from BP ; H
+# note the pic move command to position the text
+ move left .35 ; "(ANTI)"
+ front bond 60 length .25 from BP ; H
+# another positioning of text
+ move right .35 ; "(SYN)"
+ bond 120 length .4 from BP ; BP
+ back bond -120 length .25 from BP ; H
+ front bond 120 length .25 from BP ; CH3
+ bond 60 length .5 from BP
+ bond 60 dotted
+
+# Local Variables:
+# mode: Nroff
+# End:
+.cend
diff --git a/contrib/chem/examples/122/ch5a_size.chem b/contrib/chem/examples/122/ch5a_size.chem
new file mode 100644
index 0000000..d4eb33f
--- /dev/null
+++ b/contrib/chem/examples/122/ch5a_size.chem
@@ -0,0 +1,45 @@
+ch5a_size.chem:
+.br
+.cstart
+
+# Example file for 'chem':
+
+# This originates from Computing Science Technical Report No. 122
+# CHEM - A Program for Typesetting Chemical Diagrams: User Manual
+# by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan
+# <http://cm.bell-labs.com/cm/cs/cstr/122.ps.gz>.
+
+# Copyright (C) 2006-2020 Free Software Foundation, Inc.
+
+# This file is part of 'chem', which is part of 'groff'.
+
+# 'groff' is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License (GPL) version 2 as
+# published by the Free Software Foundation.
+
+# 'groff' is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# The GPL2 license text is available in the internet at
+# <http://www.gnu.org/licenses/gpl-2.0.html>.
+
+########################################################################
+
+.ps 14
+size 16
+R: ring6 put O at 1 put C at 2 put O at 3 put C at 4 put O at 5 put C at 6
+ double bond 60 from R.V2 ; NH
+ double bond down from R.V4 ; NH
+ double bond -60 from R.V6 ; HN
+size 10 # if you are doing more than one
+.ps 10
+
+# Local Variables:
+# mode: Nroff
+# End:
+.cend
diff --git a/contrib/chem/examples/122/ch6a_pic.chem b/contrib/chem/examples/122/ch6a_pic.chem
new file mode 100644
index 0000000..ad6dea6
--- /dev/null
+++ b/contrib/chem/examples/122/ch6a_pic.chem
@@ -0,0 +1,43 @@
+ch6a_pic.chem:
+.br
+.cstart
+
+# Example file for 'chem':
+
+# This originates from Computing Science Technical Report No. 122
+# CHEM - A Program for Typesetting Chemical Diagrams: User Manual
+# by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan
+# <http://cm.bell-labs.com/cm/cs/cstr/122.ps.gz>.
+
+# Copyright (C) 2006-2020 Free Software Foundation, Inc.
+
+# This file is part of 'chem', which is part of 'groff'.
+
+# 'groff' is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License (GPL) version 2 as
+# published by the Free Software Foundation.
+
+# 'groff' is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# The GPL2 license text is available in the internet at
+# <http://www.gnu.org/licenses/gpl-2.0.html>.
+
+########################################################################
+
+R: ring double 2,3
+ line from R.V6 to R.C
+ line from R.C to R.V4
+ X1: 1/2 <R.V5,R.C>
+ X2: 1/2 <R.C,R.V2>
+ bond from X1 to X2
+
+# Local Variables:
+# mode: Nroff
+# End:
+.cend
diff --git a/contrib/chem/examples/122/ch6b_dna.chem b/contrib/chem/examples/122/ch6b_dna.chem
new file mode 100644
index 0000000..00abbba
--- /dev/null
+++ b/contrib/chem/examples/122/ch6b_dna.chem
@@ -0,0 +1,59 @@
+ch6b_dna.chem:
+.br
+.cstart
+
+# Example file for 'chem':
+
+# This originates from Computing Science Technical Report No. 122
+# CHEM - A Program for Typesetting Chemical Diagrams: User Manual
+# by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan
+# <http://cm.bell-labs.com/cm/cs/cstr/122.ps.gz>.
+
+# Copyright (C) 2006-2020 Free Software Foundation, Inc.
+
+# This file is part of 'chem', which is part of 'groff'.
+
+# 'groff' is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License (GPL) version 2 as
+# published by the Free Software Foundation.
+
+# 'groff' is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# The GPL2 license text is available in the internet at
+# <http://www.gnu.org/licenses/gpl-2.0.html>.
+
+########################################################################
+
+P: [
+R1: flatring pointing up put N at 1 put N at 4 double 5,1
+ bond -135 from R1.V4 ; BP
+ "deoxyribose" rjust with .e at BP.w
+R2: ring6 put N at 2 put N at 4 double 1,2 3,4 5,6 with .V6 at R1.V2
+ pic Conn: R2.V2.ne #because naming is too restricted in pic
+ bond up from R2.V1 ; N
+ bond -60 from N ; H
+ bond 60 from N ; H
+]
+ # thymine
+Q: [
+R3: ring6 put N at 3 put N at 5 double 1,2
+ bond up from R3.V1 ; CH3
+ bond 120 from R3.V3 ; BP
+ "deoxyribose" ljust with .w at BP.e
+ double bond down from R3.V4 ; O
+ double bond -60 from R3.V6 ; O
+ bond -120 from R3.V5 ; H
+] with .O at P.H + (.3,.3)
+ bond from Q.O.sw to P.H.ne dotted
+ bond from Q.H.sw to P.Conn dotted
+
+# Local Variables:
+# mode: Nroff
+# End:
+.cend
diff --git a/contrib/chem/examples/122/chAa_polymer.chem b/contrib/chem/examples/122/chAa_polymer.chem
new file mode 100644
index 0000000..3293454
--- /dev/null
+++ b/contrib/chem/examples/122/chAa_polymer.chem
@@ -0,0 +1,72 @@
+chAa_polymer.chem:
+.br
+.cstart
+
+# Example file for 'chem':
+
+# This originates from Computing Science Technical Report No. 122
+# CHEM - A Program for Typesetting Chemical Diagrams: User Manual
+# by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan
+# <http://cm.bell-labs.com/cm/cs/cstr/122.ps.gz>.
+
+# Copyright (C) 2006-2020 Free Software Foundation, Inc.
+
+# This file is part of 'chem', which is part of 'groff'.
+
+# 'groff' is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License (GPL) version 2 as
+# published by the Free Software Foundation.
+
+# 'groff' is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# The GPL2 license text is available in the internet at
+# <http://www.gnu.org/licenses/gpl-2.0.html>.
+
+########################################################################
+
+# epoxy based on the m-phenyldiamine cured bisphenol-A
+ size 8
+ bond dotted
+ bond ; N
+ bond ; CH2
+ bond down from N
+R1: benzene
+ bond 120 length .1 from R1.V3 ; N
+ bond right length .1 from N
+ bond down length .1 from N
+# back to the CH2
+ bond right from CH2 ; CH
+ bond down from CH ; OH
+ bond right from CH ; CH2
+ bond right ; O
+ bond right
+ benzene pointing right
+ bond right ; C
+ bond up from C ; CH3
+ bond down from C ; CH3
+ bond right from C
+ benzene pointing right
+ bond right ; O
+ bond right from O ; CH2
+ bond right ; CH
+ bond down from CH ; OH
+ bond right from CH ; CH2
+ bond right ; N
+ bond right from N
+ bond dotted
+ bond down from N
+R2: benzene
+ bond 120 length .1 from R2.V3 ; N
+ bond right length .1 from N
+ bond down length .1 from N
+
+# Local Variables:
+# mode: Nroff
+# End:
+.cend
diff --git a/contrib/chem/examples/122/chAb_vinyl_chloro.chem b/contrib/chem/examples/122/chAb_vinyl_chloro.chem
new file mode 100644
index 0000000..dff97fc
--- /dev/null
+++ b/contrib/chem/examples/122/chAb_vinyl_chloro.chem
@@ -0,0 +1,62 @@
+chAb_vinyl_chloro.chem:
+.br
+.cstart
+
+# Example file for 'chem':
+
+# This originates from Computing Science Technical Report No. 122
+# CHEM - A Program for Typesetting Chemical Diagrams: User Manual
+# by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan
+# <http://cm.bell-labs.com/cm/cs/cstr/122.ps.gz>.
+
+# Copyright (C) 2006-2020 Free Software Foundation, Inc.
+
+# This file is part of 'chem', which is part of 'groff'.
+
+# 'groff' is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License (GPL) version 2 as
+# published by the Free Software Foundation.
+
+# 'groff' is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# The GPL2 license text is available in the internet at
+# <http://www.gnu.org/licenses/gpl-2.0.html>.
+
+########################################################################
+
+ Cl
+ bond 120 length .25 ; BP
+ bond 60 length .25 from BP ; Cl
+B1: double bond down length .3 from BP
+ bond 120 length .35 ; BP
+# now comes the ring
+R1: ring6 double 1,2 3,4 5,6 with .V6 at BP
+ bond up length .1 from R1.V1 ; H
+ bond 60 length .1 from R1.V2 ; H
+ bond 120 from R1.V3 ; O
+ bond 60 from O ; C
+ double bond up from C ; O
+ bond 120 from C
+# continue decorating the ring
+ bond down length .1 from R1.V4 ; H
+ bond -120 length .1 from R1.V5 ; H
+# now go back and do the left hand ring
+ bond -120 length .35 from B1.end ; BP
+R2: ring6 double 1,2 3,4 5,6 with .V2 at BP
+ bond up length .1 from R2.V1 ; H
+ bond -60 length .1 from R2.V6 ; H
+ bond -120 from R2.V5 ; O
+ bond -60 from O
+ bond down length .1 from R2.V4 ; H
+ bond 120 length .1 from R2.V3 ; H
+
+# Local Variables:
+# mode: Nroff
+# End:
+.cend
diff --git a/contrib/chem/examples/122/chAc_morphine.chem b/contrib/chem/examples/122/chAc_morphine.chem
new file mode 100644
index 0000000..c9fbf10
--- /dev/null
+++ b/contrib/chem/examples/122/chAc_morphine.chem
@@ -0,0 +1,52 @@
+chAc_morphine.chem:
+.br
+.cstart
+
+# Example file for 'chem':
+
+# This originates from Computing Science Technical Report No. 122
+# CHEM - A Program for Typesetting Chemical Diagrams: User Manual
+# by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan
+# <http://cm.bell-labs.com/cm/cs/cstr/122.ps.gz>.
+
+# Copyright (C) 2006-2020 Free Software Foundation, Inc.
+
+# This file is part of 'chem', which is part of 'groff'.
+
+# 'groff' is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License (GPL) version 2 as
+# published by the Free Software Foundation.
+
+# 'groff' is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# The GPL2 license text is available in the internet at
+# <http://www.gnu.org/licenses/gpl-2.0.html>.
+
+########################################################################
+
+R1: ring6 double 1,2
+ bond -60 from R1.V6 ; HO
+R2: ring6 with .V1 at R1.V3
+ bond 60 from R2.V2 ; N
+ bond right from N ; CH3
+R3: benzene with .V1 at R2.V5
+ bond -120 from R3.V5 ; HO
+# this is the furan ring
+ bond -135 length .33 from R1.V5 ; O
+ bond -45 length .33 from R3.V6
+# this is the odd ring
+ bond up length .1 from N ; BP
+B1: bond up length .33 from R1.V4
+ bond to BP
+
+
+# Local Variables:
+# mode: Nroff
+# End:
+.cend
diff --git a/contrib/chem/examples/122/chAd_chlorophyll.chem b/contrib/chem/examples/122/chAd_chlorophyll.chem
new file mode 100644
index 0000000..e2acb22
--- /dev/null
+++ b/contrib/chem/examples/122/chAd_chlorophyll.chem
@@ -0,0 +1,69 @@
+chAd_chlorophyll.chem:
+.br
+.cstart
+
+# Example file for 'chem':
+
+# This originates from Computing Science Technical Report No. 122
+# CHEM - A Program for Typesetting Chemical Diagrams: User Manual
+# by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan
+# <http://cm.bell-labs.com/cm/cs/cstr/122.ps.gz>.
+
+# Copyright (C) 2006-2020 Free Software Foundation, Inc.
+
+# This file is part of 'chem', which is part of 'groff'.
+
+# 'groff' is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License (GPL) version 2 as
+# published by the Free Software Foundation.
+
+# 'groff' is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# The GPL2 license text is available in the internet at
+# <http://www.gnu.org/licenses/gpl-2.0.html>.
+
+########################################################################
+
+ Mg
+ bond 45 ; N
+R1: ring5 pointing up put N at 4 double 1,2 4,5 with .V4 at N
+ bond up from R1.V1 ; CH3
+ bond right from R1.V2 ; CH2CH3
+ bond 135 from Mg ; N
+R2: ring5 pointing down put N at 3 double 1,2 4,5 with .V3 at N
+ bond right from R2.V5 ; CH3
+ bond 225 from Mg ; N
+R3: ring5 pointing down put N at 4 double 3,4 with .V4 at N
+ bond -45 from Mg ; N
+R4: ring5 pointing up put N at 3 double 1,5 with .V3 at N
+ bond left from R4.V5 ; H3C
+ bond up from R4.V1 ; CH
+ double bond right length .1 from CH ; CH2
+ double bond 150 length .3 from R1.V3
+ bond to R2.V4
+R5: ring5 pointing 72 with .V5 at R2.V2
+ double bond 135 from R5.V2 ; O
+ bond down from R5.V3 ; C
+ double bond left length .1 from C ; O
+ bond down from C ; O
+ CH3 left of O
+ double bond -25 from R5.V4
+ bond down from R3.V1 ; CH2
+ CH2 left of CH2
+ bond left ; C
+ double bond -45 ; O
+ bond -135 from C ; C20H39O
+ bond left from R3.V2 ; H3C
+ double bond -150 length .3 from R4.V4
+ bond to R3.V3
+
+# Local Variables:
+# mode: Nroff
+# End:
+.cend
diff --git a/contrib/chem/examples/122/chAe_chair.chem b/contrib/chem/examples/122/chAe_chair.chem
new file mode 100644
index 0000000..27b046a
--- /dev/null
+++ b/contrib/chem/examples/122/chAe_chair.chem
@@ -0,0 +1,49 @@
+chAe_chair.chem:
+.br
+.cstart
+
+# Example file for 'chem':
+
+# This originates from Computing Science Technical Report No. 122
+# CHEM - A Program for Typesetting Chemical Diagrams: User Manual
+# by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan
+# <http://cm.bell-labs.com/cm/cs/cstr/122.ps.gz>.
+
+# Copyright (C) 2006-2020 Free Software Foundation, Inc.
+
+# This file is part of 'chem', which is part of 'groff'.
+
+# 'groff' is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License (GPL) version 2 as
+# published by the Free Software Foundation.
+
+# 'groff' is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# The GPL2 license text is available in the internet at
+# <http://www.gnu.org/licenses/gpl-2.0.html>.
+
+########################################################################
+
+pic define chair { [
+ V1: bond 120 length .25
+ V2: bond right length .35
+ V3: bond 150 length .35
+ V4: bond -60 length .25
+ V5: bond left length .35
+ V6: bond to V1.start
+pic ] }
+R1: chair
+R2: chair with .V1 at R1.V4.start
+bond 60 from R2.V4.start ; CH3
+bond down from R2.V4.start ; OH
+
+# Local Variables:
+# mode: Nroff
+# End:
+.cend
diff --git a/contrib/chem/examples/122/chAf_arrow.chem b/contrib/chem/examples/122/chAf_arrow.chem
new file mode 100644
index 0000000..f135ecb
--- /dev/null
+++ b/contrib/chem/examples/122/chAf_arrow.chem
@@ -0,0 +1,68 @@
+chAf_arrow.chem:
+.br
+.EQ
+delim $$
+.EN
+.cstart
+
+# Example file for 'chem':
+
+# This originates from Computing Science Technical Report No. 122
+# CHEM - A Program for Typesetting Chemical Diagrams: User Manual
+# by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan
+# <http://cm.bell-labs.com/cm/cs/cstr/122.ps.gz>.
+
+# Copyright (C) 2006-2020 Free Software Foundation, Inc.
+
+# This file is part of 'chem', which is part of 'groff'.
+
+# 'groff' is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License (GPL) version 2 as
+# published by the Free Software Foundation.
+
+# 'groff' is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# The GPL2 license text is available in the internet at
+# <http://www.gnu.org/licenses/gpl-2.0.html>.
+
+########################################################################
+
+ bond length .1 ; BP
+ bond up length .5
+ bond right
+ bond down length .5 from BP
+ bond right
+ bond right from BP ; C
+ double bond up ; O
+ bond right from C
+ benzene pointing right
+ bond right ; C
+ double bond up from C ; O
+ bond right from C ; O
+ bond right ; CH2
+# this is the statement to make the arrow
+ line <- from CH2.s down
+ move down .1 ; "0.085"
+ CH2CH2CH2 right of CH2
+ bond right ; O
+ bond right length .1 ; BP
+ bond up length .5 from BP
+ bond left
+ bond right length .1 from BP
+ bond down length .5 from BP ; BP
+ bond left
+ "$n$" with .w at BP.se
+
+# Local Variables:
+# mode: Nroff
+# End:
+.cend
+.EQ
+delim off
+.EN
diff --git a/contrib/chem/examples/122/chAg_circle.chem b/contrib/chem/examples/122/chAg_circle.chem
new file mode 100644
index 0000000..576c926
--- /dev/null
+++ b/contrib/chem/examples/122/chAg_circle.chem
@@ -0,0 +1,54 @@
+chAg_circle.chem:
+.br
+.cstart
+
+# Example file for 'chem':
+
+# This originates from Computing Science Technical Report No. 122
+# CHEM - A Program for Typesetting Chemical Diagrams: User Manual
+# by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan
+# <http://cm.bell-labs.com/cm/cs/cstr/122.ps.gz>.
+
+# Copyright (C) 2006-2020 Free Software Foundation, Inc.
+
+# This file is part of 'chem', which is part of 'groff'.
+
+# 'groff' is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License (GPL) version 2 as
+# published by the Free Software Foundation.
+
+# 'groff' is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# The GPL2 license text is available in the internet at
+# <http://www.gnu.org/licenses/gpl-2.0.html>.
+
+########################################################################
+
+bond 120 ; C
+bond 60 ; C
+bond up ; Cl
+double bond 120 from C ; C
+bond 60 ; C
+bond 120 ; C
+bond 60 ; C
+bond up ; Cl
+double bond 120 from C ; C
+circle at C rad .08
+bond 60 from C ; C
+bond 120 ; C
+bond 60 ; C
+double bond 120 ; C
+bond down ; Cl
+bond 60 from C ; C
+bond 120
+
+# Local Variables:
+# mode: Nroff
+# End:
+.cend
diff --git a/contrib/chem/examples/122/chAh_brackets.chem b/contrib/chem/examples/122/chAh_brackets.chem
new file mode 100644
index 0000000..7605a38
--- /dev/null
+++ b/contrib/chem/examples/122/chAh_brackets.chem
@@ -0,0 +1,60 @@
+chAh_brackets.chem:
+.br
+.EQ
+delim $$
+.EN
+.cstart
+
+# Example file for 'chem':
+
+# This originates from Computing Science Technical Report No. 122
+# CHEM - A Program for Typesetting Chemical Diagrams: User Manual
+# by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan
+# <http://cm.bell-labs.com/cm/cs/cstr/122.ps.gz>.
+
+# Copyright (C) 2006-2020 Free Software Foundation, Inc.
+
+# This file is part of 'chem', which is part of 'groff'.
+
+# 'groff' is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License (GPL) version 2 as
+# published by the Free Software Foundation.
+
+# 'groff' is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# The GPL2 license text is available in the internet at
+# <http://www.gnu.org/licenses/gpl-2.0.html>.
+
+########################################################################
+
+[
+ bond right ; CH2
+ bond 120 ; (CH2)
+ "$nothing sub n$"
+ bond 60 ; .CH2
+]
+# now put the arrow in
+ move right .3
+ arrow .5
+ move right .3
+# begin second structure
+[
+ bond right ; CH.
+ bond 120 ; (CH2)
+ "$nothing sub n$"
+ bond 60 ; CH3
+]
+
+# Local Variables:
+# mode: Nroff
+# End:
+.cend
+.EQ
+delim $$
+.EN
diff --git a/contrib/chem/examples/122/chAi_poly_vinyl_chloride.chem b/contrib/chem/examples/122/chAi_poly_vinyl_chloride.chem
new file mode 100644
index 0000000..e4539bb
--- /dev/null
+++ b/contrib/chem/examples/122/chAi_poly_vinyl_chloride.chem
@@ -0,0 +1,141 @@
+chAi_poly_vinyl_chloride.chem:
+.br
+.ps -2
+.cstart
+
+# Example file for 'chem':
+
+# This originates from Computing Science Technical Report No. 122
+# CHEM - A Program for Typesetting Chemical Diagrams: User Manual
+# by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan
+# <http://cm.bell-labs.com/cm/cs/cstr/122.ps.gz>.
+
+# Copyright (C) 2006-2020 Free Software Foundation, Inc.
+
+# This file is part of 'chem', which is part of 'groff'.
+
+# 'groff' is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License (GPL) version 2 as
+# published by the Free Software Foundation.
+
+# 'groff' is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# The GPL2 license text is available in the internet at
+# <http://www.gnu.org/licenses/gpl-2.0.html>.
+
+########################################################################
+
+db = .12
+cwid = .095
+A: [
+ bond dotted
+ bond right ; CH
+ bond down ; Cl
+ bond right from CH ; CH2
+ bond ; CH
+ bond down ; Cl
+ bond right from CH ; CH2
+ bond ; C.
+ bond down ; Cl
+ bond right from C ; CH2
+ bond ; CH2
+ bond down ; Cl
+]
+" (6.13a)" ljust at A.e
+arrow down .5 from A.s
+[
+ CH2
+ double bond right ; CHCl
+] with .w at last arrow.c
+B: [
+ bond dotted
+ bond right ; CH
+ bond down ; Cl
+ bond right from CH ; CH2
+ bond ; CH
+ bond down ; Cl
+ bond right from CH ; CH2
+ bond ; C
+ bond up ; Cl
+ bond down from C ; CH2
+ bond ; CH2Cl
+ bond right from C ; CH2
+ bond ; CH
+ bond down ; Cl
+ bond right from CH
+ bond dotted
+] with .n at end of last arrow
+" (6.13b)" ljust at B.e
+C: [
+ bond dotted
+ bond right ; CH
+ bond down ; Cl
+ bond right from CH ; CH2
+ bond ; C.
+ bond down ; Cl
+ bond right from C ; CH2
+ bond ; CH
+ bond down ; Cl
+ bond right from CH ; CH2
+ bond ; CH2
+ bond down ; Cl
+] with .n at B.s - (0,.5)
+" (6.14a)" ljust at C.e
+arrow down .3 from C.s
+[
+ CH2
+ double bond right
+ CHCl
+] with .w at last arrow.s
+arrow down .3 from last arrow.s
+
+D: [
+ bond dotted
+ bond right ; CH
+ bond down ; Cl
+ bond right from CH ; CH2
+ bond ; C
+ bond up ; Cl
+ bond down from C ; CH2
+ bond ; CHCl
+ bond ; CH2
+ bond ; CH2Cl
+ bond right from C ; CH2
+ bond ; CH
+ bond down ; Cl
+ bond right from CH ; CH2
+ bond ; CH
+ bond down ; Cl
+ bond right from CH
+ bond dotted
+] with .n at last arrow.s
+" (6.14b)" ljust at D.e
+E: [
+ bond dotted
+ bond ; CH
+ bond down ; Cl
+ bond right from CH ; CH2
+ bond ; CH
+ bond down ; Cl
+ bond right from CH ; CH2
+ bond ; CH
+ bond down ; Cl
+ bond right from CH ; CH2
+ bond ; CH
+ bond down ; Cl
+] with .e at B.w - (.5,0)
+
+arrow from E.ne to A.sw
+arrow from E.se to C.nw
+
+# Local Variables:
+# mode: Nroff
+# End:
+.cend
+.ps +2
diff --git a/contrib/chem/examples/122/chBa_jump.chem b/contrib/chem/examples/122/chBa_jump.chem
new file mode 100644
index 0000000..cd40a3a
--- /dev/null
+++ b/contrib/chem/examples/122/chBa_jump.chem
@@ -0,0 +1,41 @@
+chBa_jump.chem:
+.br
+.cstart
+
+# Example file for 'chem':
+
+# This originates from Computing Science Technical Report No. 122
+# CHEM - A Program for Typesetting Chemical Diagrams: User Manual
+# by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan
+# <http://cm.bell-labs.com/cm/cs/cstr/122.ps.gz>.
+
+# Copyright (C) 2006-2020 Free Software Foundation, Inc.
+
+# This file is part of 'chem', which is part of 'groff'.
+
+# 'groff' is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License (GPL) version 2 as
+# published by the Free Software Foundation.
+
+# 'groff' is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# The GPL2 license text is available in the internet at
+# <http://www.gnu.org/licenses/gpl-2.0.html>.
+
+########################################################################
+
+SiO2 # name = SiO2
+move right 1
+CH3CH2NH2.HCl # name = CH3CH2NH2HCl
+
+
+# Local Variables:
+# mode: Nroff
+# End:
+.cend
diff --git a/contrib/chem/examples/122/chBb_bonds.chem b/contrib/chem/examples/122/chBb_bonds.chem
new file mode 100644
index 0000000..bc29895
--- /dev/null
+++ b/contrib/chem/examples/122/chBb_bonds.chem
@@ -0,0 +1,42 @@
+chBb_bonds.chem:
+.br
+.cstart
+
+# Example file for 'chem':
+
+# This originates from Computing Science Technical Report No. 122
+# CHEM - A Program for Typesetting Chemical Diagrams: User Manual
+# by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan
+# <http://cm.bell-labs.com/cm/cs/cstr/122.ps.gz>.
+
+# Copyright (C) 2006-2020 Free Software Foundation, Inc.
+
+# This file is part of 'chem', which is part of 'groff'.
+
+# 'groff' is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License (GPL) version 2 as
+# published by the Free Software Foundation.
+
+# 'groff' is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# The GPL2 license text is available in the internet at
+# <http://www.gnu.org/licenses/gpl-2.0.html>.
+
+########################################################################
+
+C
+frontbond -170 from C ; H
+backbond 10 from C ; CO2H
+bond left length .15 from C ; H2N
+bond right from C ; CH3
+
+# Local Variables:
+# mode: Nroff
+# End:
+.cend
diff --git a/contrib/chem/examples/122/chBc_rings.chem b/contrib/chem/examples/122/chBc_rings.chem
new file mode 100644
index 0000000..950cd0b
--- /dev/null
+++ b/contrib/chem/examples/122/chBc_rings.chem
@@ -0,0 +1,43 @@
+chBc_rings.chem:
+.br
+.cstart
+
+# Example file for 'chem':
+
+# This originates from Computing Science Technical Report No. 122
+# CHEM - A Program for Typesetting Chemical Diagrams: User Manual
+# by Jon L. Bentley, Lynn W. Jelinski, Brian W. Kernighan
+# <http://cm.bell-labs.com/cm/cs/cstr/122.ps.gz>.
+
+# Copyright (C) 2006-2020 Free Software Foundation, Inc.
+
+# This file is part of 'chem', which is part of 'groff'.
+
+# 'groff' is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License (GPL) version 2 as
+# published by the Free Software Foundation.
+
+# 'groff' is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# The GPL2 license text is available in the internet at
+# <http://www.gnu.org/licenses/gpl-2.0.html>.
+
+########################################################################
+
+R1: benzene
+ bond -120 from R1.V5 ; CH3O
+R2: ring4 pointing 45 with .V4 at R1.V2
+R3: aromatic ring6 put N at 4 put S at 2 at R2 + (.75,0)
+R4: ring5 pointing left at R3 + (.75,0)
+ label R4
+
+# Local Variables:
+# mode: Nroff
+# End:
+.cend
diff --git a/contrib/chem/examples/README.txt b/contrib/chem/examples/README.txt
new file mode 100644
index 0000000..6786705
--- /dev/null
+++ b/contrib/chem/examples/README.txt
@@ -0,0 +1,47 @@
+This directory contains examples for the 'chem' language.
+
+You can view the graphical display of the examples by calling
+
+ @g@chem <file> | groff -p ...
+
+On the displays, you can see rings consisting of several lines and
+bonds (lines). All points on rings and bonds that do not have a
+notation mean a C atom (carbon) filled with H atoms (hydrogen) such
+that the valence of 4 is satisfied.
+
+For example, suppose you have just a single line without any
+characters. That means a bond. It has two points, one at each end of
+the line. So each of these points stands for a C atom, the bond
+itself connects these 2 C atoms. To fulfill the valence of 4, each
+points has to carry additionally 3 H atoms. So the single empty bond
+stands for CH3-CH3, though this combination doesn't make much sense
+chemically.
+
+
+####### License
+
+Copyright (C) 2006-2020 Free Software Foundation, Inc.
+Written by Bernd Warken <groff-bernd.warken-72@web.de>.
+
+This file is part of 'chem', which is part of 'groff'.
+
+'groff' is free software; 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.
+
+'groff' is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+for more details.
+
+The GPL2 license text is available in the internet at
+<http://www.gnu.org/licenses/gpl-2.0.html>.
+
+
+##### Editor settings
+Local Variables:
+fill-column: 72
+mode: text
+End:
+vim: set textwidth=72:
diff --git a/contrib/chem/examples/atp.chem b/contrib/chem/examples/atp.chem
new file mode 100644
index 0000000..738c4da
--- /dev/null
+++ b/contrib/chem/examples/atp.chem
@@ -0,0 +1,58 @@
+atp.chem:
+.cstart
+
+# Example file for 'chem':
+# ATP or C10_H16_N5_O13_P3 or
+# [[[5-(6-aminopurin-9-yl)-3,4-dihydroxy-oxolan-2-yl]methoxy-hydroxy-
+# phosphoryl]oxy-hydroxy-phosphoryl]oxyphosphonic acid
+
+# Found at http://www.chemindustry.com/apps/chemicals.
+
+# Copyright (C) 2006-2020 Free Software Foundation, Inc.
+# Written by Bernd Warken <groff-bernd.warken-72@web.de>.
+
+# This file is part of 'chem', which is part of 'groff'.
+
+# 'groff' is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License (GPL) version 2 as
+# published by the Free Software Foundation.
+
+# 'groff' is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+
+# The GPL2 license text is available in the internet at
+# <http://www.gnu.org/licenses/gpl-2.0.html>.
+
+R1: ring5 pointing left double 1,2 3,4 put N at 2 put N at 5
+B: benzene put N at 2 with .V6 at R1.V3 with .V5 at R1.V4
+ bond up ; NH2
+ backbond 170 length .7 from R1.V5
+R2: ring5 pointing down with .V2 put O at 1
+ bond down at R2.V2 ; H
+ bond down length .1 at R2.V3 ; H
+ bond up length .1 at R2.V3 ; OH
+ bond down length .1 at R2.V4 ; H
+ bond up length .1 at R2.V4 ; OH
+ frontbond 70 at R2.V5
+ bond 110 ; O
+ bond right ; P
+ doublebond up ; O
+ bond down from P ; OH
+ bond right from P ; O
+ bond right ; P
+ doublebond up ; O
+ bond down from P ; OH
+ bond right from P ; O
+ bond right ; P
+ doublebond up ; O
+ bond down from P ; OH
+ bond right from P ; OH
+
+# Local Variables:
+# fill-column: 72
+# mode: Nroff
+# End:
+# vim: set textwidth=72:
+.cend
diff --git a/contrib/chem/examples/cholesterin.chem b/contrib/chem/examples/cholesterin.chem
new file mode 100644
index 0000000..12ac076
--- /dev/null
+++ b/contrib/chem/examples/cholesterin.chem
@@ -0,0 +1,47 @@
+cholesterin.chem:
+.cstart
+
+# Example file for 'chem':
+# Cholesterin or C27_H46O or
+# 10,13-dimethyl-17-(6-methylheptan-2-yl)-2,3,4,5,6,9,11,12,14,15,16,17-
+# dodecahydro-1H-cyclopenta[a]phenanthren-3-ol
+
+# Copyright (C) 2006-2020 Free Software Foundation, Inc.
+# Written by Bernd Warken <groff-bernd.warken-72@web.de>.
+
+# This file is part of 'chem', which is part of 'groff'.
+
+# 'groff' is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License (GPL) version 2 as
+# published by the Free Software Foundation.
+
+# 'groff' is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+R1: ring6
+ bond -120 ; HO
+R2: ring6 with .V5 at R1.V3 with .V6 at R1.V2 double 4,5
+ bond up at R2.V6
+R3: ring6 with .V5 at R2.V1 with .V4 at R2.V2
+R4: flatring5 pointing up with .V4 at R3.V3 with .V5 at R3.V2
+ bond up at R4.V5
+ bond up at R4.V1
+B1: bond -60
+ bond 60 at B1.start
+ bond 120
+ bond 60
+ bond 120
+B2: bond 60
+ bond down at B2.start
+
+# Local Variables:
+# fill-column: 72
+# mode: Nroff
+# End:
+# vim: set textwidth=72:
+.cend
diff --git a/contrib/chem/examples/ethamivan.chem b/contrib/chem/examples/ethamivan.chem
new file mode 100644
index 0000000..a0a8aa2
--- /dev/null
+++ b/contrib/chem/examples/ethamivan.chem
@@ -0,0 +1,43 @@
+ethamivan.chem:
+.cstart
+
+# Example file for 'chem':
+# Ethamivan or Analepticon or C12_H17_N_O3 or
+# N,N-diethyl-4-hydroxy-3-methoxy-benzamide
+
+# Copyright (C) 2006-2020 Free Software Foundation, Inc.
+# Written by Bernd Warken <groff-bernd.warken-72@web.de>.
+
+# This file is part of 'chem', which is part of 'groff'.
+
+# 'groff' is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License (GPL) version 2 as
+# published by the Free Software Foundation.
+
+# 'groff' is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+
+# The GPL2 license text is available in the internet at
+# <http://www.gnu.org/licenses/gpl-2.0.html>.
+
+R: ring pointing left double 2,3 4,5 6,1
+ bond left from R.V1 ; O
+ bond left ; H
+ bond -150 from R.V6 ; O
+ bond left
+ bond 60 from R.V4
+B1: double bond up ; O
+ bond 120 from B1.start ; N
+ bond 45
+ bond right
+ bond 135 from N
+ bond right
+
+# Local Variables:
+# fill-column: 72
+# mode: Nroff
+# End:
+# vim: set textwidth=72:
+.cend
diff --git a/contrib/chem/examples/lsd.chem b/contrib/chem/examples/lsd.chem
new file mode 100644
index 0000000..4879ea8
--- /dev/null
+++ b/contrib/chem/examples/lsd.chem
@@ -0,0 +1,46 @@
+lsd.chem:
+.cstart
+
+# Example file for 'chem':
+# LSD or Lysergic acid dethylamide or C20_H25_N3O or
+# 9,10-Didehydro-N,N-diethyl-6-methyl-ergoline-8-beta-carboxamide
+
+# Copyright (C) 2006-2020 Free Software Foundation, Inc.
+# Written by Bernd Warken <groff-bernd.warken-72@web.de>.
+
+# This file is part of 'chem', which is part of 'groff'.
+
+# 'groff' is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License (GPL) version 2 as
+# published by the Free Software Foundation.
+
+# 'groff' is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+F: flatring5 pointing left put N at 5 double 3,4
+ H below F.N
+B: benzene pointing right with .V1 at F.V2
+R1: ring pointing right with .V4 at B.V6
+ front bond right from R1.V6 ; H
+R2: ring pointing right with .V2 at R1.V6 put N at 1 double 3,4
+ bond right from R2.N
+ back bond -60 from R2.V5 ; H
+ bond up from R2.V5
+B1: double bond up ; O
+ bond right from B1.start ; N
+ bond 45
+ bond right
+ bond 135 from N
+ bond right
+
+# Local Variables:
+# fill-column: 72
+# mode: Nroff
+# End:
+# vim: set textwidth=72:
+.cend
diff --git a/contrib/chem/examples/morphine.chem b/contrib/chem/examples/morphine.chem
new file mode 100644
index 0000000..5c236ca
--- /dev/null
+++ b/contrib/chem/examples/morphine.chem
@@ -0,0 +1,51 @@
+morphine.chem:
+.cstart
+
+# Example file for 'chem':
+# Morphine or C23_H31_N3O or
+# N,N-diethyl-N'-(2-methoxyacridin-9-yl)-pentane-1,4-diamine
+
+# Found at http://www.chemindustry.com/apps/chemicals.
+
+# Copyright (C) 2006-2020 Free Software Foundation, Inc.
+# Written by Bernd Warken <groff-bernd.warken-72@web.de>.
+
+# This file is part of 'chem', which is part of 'groff'.
+
+# 'groff' is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License (GPL) version 2 as
+# published by the Free Software Foundation.
+
+# 'groff' is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# The GPL2 license text is available in the internet at
+# <http://www.gnu.org/licenses/gpl-2.0.html>.
+
+R1: benzene
+R2: benzene with .V6 at R1.V2 with .V5 at R1.V3 put N at 4
+R3: benzene with .V6 at R2.V2 with .V5 at R2.V3
+ bond 60 at R3.V2 ; O
+ bond 120
+ bond up at R2.V1 ; N
+ bond 60 ; H
+ bond -60 at N
+B1: backbond -120
+ bond up at B1.start
+ bond -60
+ bond up
+ bond -60 ; N
+ bond up
+ bond -60
+ bond -120 at N
+ bond -60
+
+# Local Variables:
+# mode: Nroff
+# End:
+.cend
diff --git a/contrib/chem/examples/penicillin.chem b/contrib/chem/examples/penicillin.chem
new file mode 100644
index 0000000..ef522bc
--- /dev/null
+++ b/contrib/chem/examples/penicillin.chem
@@ -0,0 +1,52 @@
+penicillin.chem:
+.cstart
+
+# Example file for 'chem':
+# Penicillin or C16_H18_N2_O4_S or
+# 3,3-dimethyl-6-oxo-7-(2-phenylacetyl)amino-2-thia-5-
+# azabicyclo[3.2.0]heptane-4-carboxylic acid
+
+# Found at http://www.chemindustry.com/apps/chemicals.
+
+# Copyright (C) 2006-2020 Free Software Foundation, Inc.
+# Written by Bernd Warken <groff-bernd.warken-72@web.de>.
+
+# This file is part of 'chem', which is part of 'groff'.
+
+# 'groff' is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License (GPL) version 2 as
+# published by the Free Software Foundation.
+
+# 'groff' is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# The GPL2 license text is available in the internet at
+# <http://www.gnu.org/licenses/gpl-2.0.html>.
+
+R1: flatring5 pointing up put S at 1 put N at 4
+ bond 45 at R1.V2
+ bond 135 at R1.V2
+ bond 120 at R1.V3
+D1: doublebond 45 ; O
+ bond 135 at D1.start ; OH
+ bond left at R1.N
+ doublebond -135 ; O
+ bond left at R1.V5
+B1: bond down length .3
+ bond -60 at B1.start ; N
+ bond up ; H
+ bond -120 at N
+D2: doublebond down ; O
+ bond -60 at D2.start
+ bond -120
+ benzene
+
+# Local Variables:
+# mode: Nroff
+# End:
+.cend
diff --git a/contrib/chem/examples/reserpine.chem b/contrib/chem/examples/reserpine.chem
new file mode 100644
index 0000000..d1b4046
--- /dev/null
+++ b/contrib/chem/examples/reserpine.chem
@@ -0,0 +1,63 @@
+reserpine.chem:
+.PS
+begin chem
+
+# Example file for 'chem':
+# Reserpine or C33H40N2O9
+
+# Copyright (C) 2006-2020 Free Software Foundation, Inc.
+# Written by Bernd Warken <groff-bernd.warken-72@web.de>.
+
+# This file is part of 'chem', which is part of 'groff'.
+
+# 'groff' is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License (GPL) version 2 as
+# published by the Free Software Foundation.
+
+# 'groff' is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# The GPL2 license text is available in the internet at
+# <http://www.gnu.org/licenses/gpl-2.0.html>.
+
+R1: benzene pointing up
+ bond -120 from R1.V5 ; O
+ bond left
+R2: flatring5 pointing down double 4,5 with .V2 at R1.V3 with .V3 at R1.V2 put N at 1
+ H below R2.V1
+R3: ring put N at 3 with .V5 at R2.V5
+R4: ring put N at 1 with .V1 at R3.V3
+ back bond -120 from R4.V4 ; H
+ back bond 60 from R4.V3 ; H
+R5: ring with .V1 at R4.V3
+ bond -120
+D1: double bond down ; O
+ bond left from D1.start ; O
+ bond left
+ back bond 60 from R5.V3 ; H
+ back bond down from R5.V4 ; O
+ bond down from O
+ bond 120 from R5.V3 ; O
+ bond 50 from O
+D2: double bond up ; O
+ bond right length .1 from D2.start
+B: benzene pointing right
+ bond 45 from B.V6 ; O
+ bond right
+ bond right from B.V1 ; O
+ bond right
+ bond 135 from B.V2 ; O
+ bond right
+
+# Local Variables:
+# fill-column: 72
+# mode: Nroff
+# End:
+# vim: set textwidth=72:
+end
+.PE
diff --git a/contrib/eqn2graph/eqn2graph.1.man b/contrib/eqn2graph/eqn2graph.1.man
new file mode 100644
index 0000000..c059190
--- /dev/null
+++ b/contrib/eqn2graph/eqn2graph.1.man
@@ -0,0 +1,188 @@
+.TH eqn2graph @MAN1EXT@ "@MDATE@" "groff @VERSION@"
+.SH Name
+eqn2graph \- convert an
+.I eqn \" generic
+equation into a cropped image
+.
+.
+.\" ====================================================================
+.\" Legal Terms
+.\" ====================================================================
+.\"
+.\" This documentation is released to the public domain.
+.
+.
+.\" Save and disable compatibility mode (for, e.g., Solaris 10/11).
+.do nr *groff_eqn2graph_1_man_C \n[.cp]
+.cp 0
+.
+.\" Define fallback for groff 1.23's MR macro if the system lacks it.
+.nr do-fallback 0
+.if !\n(.f .nr do-fallback 1 \" mandoc
+.if \n(.g .if !d MR .nr do-fallback 1 \" older groff
+.if !\n(.g .nr do-fallback 1 \" non-groff *roff
+.if \n[do-fallback] \{\
+. de MR
+. ie \\n(.$=1 \
+. I \%\\$1
+. el \
+. IR \%\\$1 (\\$2)\\$3
+. .
+.\}
+.rr do-fallback
+.
+.
+.\" ====================================================================
+.SH Synopsis
+.\" ====================================================================
+.
+.SY eqn2graph
+.RB [ \-format\~\c
+.IR output-format ]
+.RI [ convert-argument \~.\|.\|.]
+.YS
+.
+.
+.SY eqn2graph
+.B \-\-help
+.YS
+.
+.
+.SY eqn2graph
+.B \-v
+.
+.SY eqn2graph
+.B \-\-version
+.YS
+.
+.
+.\" ====================================================================
+.SH Description
+.\" ====================================================================
+.
+.I eqn2graph
+reads a one-line
+.MR @g@eqn @MAN1EXT@
+equation from the standard input and writes an image file,
+by default in Portable Network Graphics (PNG) format,
+to the standard output.
+.
+.
+.PP
+The input EQN code should
+.I not
+be preceded by the
+.B .EQ
+macro that normally precedes it within
+.MR groff @MAN1EXT@
+macros;
+nor do you need to have dollar-sign or other delimiters around the
+equation.
+.
+.
+.\" FIXME: How old? This text hasn't been touched since 2008 at latest.
+.\" Older versions of
+.\" .I \%convert
+.\" will produce a black-on-white graphic; newer ones may produce a
+.\" black-on-transparent graphic.
+.
+.PP
+Arguments not recognized by
+.I eqn2graph
+are passed to the ImageMagick or GraphicsMagick program
+.MR convert 1 .
+.
+.
+By specifying these, you can give your image a border,
+.\" Transparent backgrounds are the default in 2018.
+.\" force the background transparent,
+set the image's pixel density,
+or perform other useful transformations.
+.
+.
+.PP
+The output image is clipped using
+.IR \%convert 's
+.B \-trim
+option to the smallest possible bounding box that contains all the black
+pixels.
+.
+.
+.\" ====================================================================
+.SH Options
+.\" ====================================================================
+.
+.B \-\-help
+displays a usage message,
+while
+.B \-v
+and
+.B \-\-version
+show version information;
+all exit afterward.
+.
+.
+.TP
+.BI \-format\~ output-format
+Write the image in
+.IR output-format ,
+which must be understood by
+.IR \%convert ;
+the default is PNG.
+.
+.
+.\" ====================================================================
+.SH Environment
+.\" ====================================================================
+.
+.TP
+.I \%GROFF_TMPDIR
+.TQ
+.I \%TMPDIR
+.TQ
+.I TMP
+.TQ
+.I TEMP
+These environment variables are searched in the given order to determine
+the directory where temporary files will be created.
+.
+If none are set,
+.I /tmp
+is used.
+.
+.
+.\" ====================================================================
+.SH Authors
+.\" ====================================================================
+.
+.I eqn2graph
+was written by
+.MT esr@\:thyrsus\:.com
+Eric S.\& Raymond
+.ME ,
+based on a recipe for
+.MR pic2graph @MAN1EXT@ ,
+by W.\& Richard Stevens.
+.
+.
+.\" ====================================================================
+.SH "See also"
+.\" ====================================================================
+.
+.MR pic2graph @MAN1EXT@ ,
+.MR grap2graph @MAN1EXT@ ,
+.MR @g@eqn @MAN1EXT@ ,
+.MR groff @MAN1EXT@ ,
+.MR convert 1
+.
+.
+.\" Restore compatibility mode (for, e.g., Solaris 10/11).
+.cp \n[*groff_eqn2graph_1_man_C]
+.do rr *groff_eqn2graph_1_man_C
+.
+.
+.\" Local Variables:
+.\" fill-column: 72
+.\" mode: nroff
+.\" End:
+.\" vim: set filetype=groff textwidth=72:
diff --git a/contrib/eqn2graph/eqn2graph.am b/contrib/eqn2graph/eqn2graph.am
new file mode 100644
index 0000000..2870d13
--- /dev/null
+++ b/contrib/eqn2graph/eqn2graph.am
@@ -0,0 +1,40 @@
+# Copyright (C) 2002-2020 Free Software Foundation, Inc.
+#
+# This file is part of groff.
+#
+# groff is free software; 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.
+#
+# groff is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+# eqn2graph.am
+#
+
+eqn2graph_srcdir = $(top_srcdir)/contrib/eqn2graph
+bin_SCRIPTS += eqn2graph
+man1_MANS += contrib/eqn2graph/eqn2graph.1
+EXTRA_DIST += \
+ contrib/eqn2graph/eqn2graph.1.man \
+ contrib/eqn2graph/eqn2graph.sh
+
+eqn2graph: $(top_srcdir)/contrib/eqn2graph/eqn2graph.sh
+ $(AM_V_GEN)sed -e "s|[@]g[@]|$(g)|g" \
+ -e "s|[@]VERSION[@]|$(VERSION)|" \
+ -e $(SH_SCRIPT_SED_CMD) $(eqn2graph_srcdir)/eqn2graph.sh \
+ >$@ \
+ && chmod +x $@
+
+
+# Local Variables:
+# fill-column: 72
+# mode: makefile-automake
+# End:
+# vim: set autoindent filetype=automake textwidth=72:
diff --git a/contrib/eqn2graph/eqn2graph.sh b/contrib/eqn2graph/eqn2graph.sh
new file mode 100644
index 0000000..3e9c374
--- /dev/null
+++ b/contrib/eqn2graph/eqn2graph.sh
@@ -0,0 +1,108 @@
+#! /bin/sh
+#
+# eqn2graph -- compile EQN equation descriptions to bitmap images
+#
+# by Eric S. Raymond <esr@thyrsus.com>, July 2002
+#
+# In Unixland, the magic is in knowing what to string together...
+#
+# Take an eqn equation on stdin, emit cropped bitmap on stdout.
+# The eqn markup should *not* be wrapped in .EQ/.EN, this script will do that.
+# A -format FOO option changes the image output format to any format
+# supported by convert(1). All other options are passed to convert(1).
+# The default format is PNG.
+#
+# This is separate from pic2graph because pic processing has some weird
+# clipping effect on the output, mangling equations that are very wide
+# or deep. Besides, this tool can supply its own delimiters.
+#
+
+# Requires the groff suite and the ImageMagick tools. Both are open source.
+# This code is released to the public domain.
+#
+# Here are the assumptions behind the option processing:
+#
+# 1. None of the options of eqn(1) are relevant.
+#
+# 2. Many options of convert(1) are potentially relevant, (especially
+# -density, -interlace, -transparency, -border, and -comment).
+#
+# Thus, we pass everything except -format to convert(1).
+#
+convert_opts=""
+convert_trim_arg="-trim"
+format="png"
+
+while [ "$1" ]
+do
+ case $1 in
+ -format)
+ format=$2
+ shift;;
+ -v | --version)
+ echo "GNU eqn2graph (groff) version @VERSION@"
+ exit 0;;
+ --help)
+ echo "usage: eqn2graph [ option ...] < in > out"
+ exit 0;;
+ *)
+ convert_opts="$convert_opts $1";;
+ esac
+ shift
+done
+
+# create temporary directory
+tmp=
+for d in "$GROFF_TMPDIR" "$TMPDIR" "$TMP" "$TEMP" /tmp
+do
+ test -n "$d" && break
+done
+
+if ! test -d "$d"
+then
+ echo "$0: error: temporary directory \"$d\" does not exist or is" \
+ "not a directory" >&2
+ exit 1
+fi
+
+if ! tmp=`(umask 077 && mktemp -d -q "$d/eqn2graph-XXXXXX") 2> /dev/null`
+then
+ # mktemp failed--not installed or is a version that doesn't support those
+ # flags? Fall back to older method which uses more predictable naming.
+ #
+ # $RANDOM is a Bashism. The fallback of $PPID is not good pseudorandomness,
+ # but is supported by the stripped-down dash shell, for instance.
+ tmp="$d/eqn2graph$$-${RANDOM:-$PPID}"
+ (umask 077 && mkdir "$tmp") 2> /dev/null
+fi
+
+if ! test -d "$tmp"
+then
+ echo "$0: error: cannot create temporary directory \"$tmp\"" >&2
+ exit 1
+fi
+
+# See if the installed version of convert(1) is new enough to support the -trim
+# option. Versions that didn't were described as "old" as early as 2008.
+is_convert_recent=`convert -help | grep -e -trim`
+if test -z "$is_convert_recent"
+then
+ echo "$0: warning: falling back to old '-crop 0x0' trim method" >&2
+ convert_trim_arg="-crop 0x0"
+fi
+
+trap 'exit_status=$?; rm -rf "$tmp" && exit $exit_status' EXIT INT TERM
+
+# Here goes:
+# 1. Add .EQ/.EN.
+# 2. Process through eqn(1) to emit troff markup.
+# 3. Process through groff(1) to emit Postscript.
+# 4. Use convert(1) to crop the Postscript and turn it into a bitmap.
+read equation
+(echo ".EQ"; echo 'delim $$'; echo ".EN"; echo '$'"$equation"'$') | \
+ groff -e -Tps -P-pletter > "$tmp"/eqn2graph.ps \
+ && convert $convert_trim_arg $convert_opts "$tmp"/eqn2graph.ps \
+ "$tmp"/eqn2graph.$format \
+ && cat "$tmp"/eqn2graph.$format
+
+# End
diff --git a/contrib/gdiffmk/ChangeLog b/contrib/gdiffmk/ChangeLog
new file mode 100644
index 0000000..bc968bb
--- /dev/null
+++ b/contrib/gdiffmk/ChangeLog
@@ -0,0 +1,212 @@
+2023-02-09 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ Revise test regime. Reduce amount of indirection required to
+ run a test, and directly use the same script for standalone and
+ Automake-integrated testing.
+
+ * tests/gdiffmk_tests.sh: Delete.
+ * tests/runtests.sh: Revise to search for test artifact input
+ and output directories (source vs. build). Drop argument
+ processing, converting two modes ("run" and "clean") into one
+ {run, with cleaning afterward}. Also ensure we use the build
+ directory to construct "tmp_file.7". Update authorship credit
+ so that Mike Bianchi isn't asked to support it.
+
+ * tests/baseline.7: Update expected test output.
+
+ * gdiffmk.am (TESTS): Run "runtests.sh" instead of
+ "gdiffmk_tests.sh".
+ (clean-local, clean_gdiffmk_check): Drop targets now that the
+ test script cleans up after itself.
+
+2023-02-06 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * tests/runtests.sh: Refactor file handling. Use narrower globs
+ to match the file names actually used; they are suffixed with a
+ dot and a number, not a number alone. Honor $TMPDIR when
+ creating the even-more-temporary file. Revise trap setup so
+ that the trap handler cannot be interrupted if it is already
+ running. Call the handler, then commit suicide with SIGINT.
+ Use symbolic names for signals, not numbers. Call new CleanUp
+ function before exiting normally.
+ (CleanUp): Pull temporary file clean-up logic into new function.
+ Also delete the even-more-temporary file used in test 1.
+
+2022-10-18 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * gdiffmk.sh: Drop "GNU" from version information, since this
+ program resides in groff's "contrib" directory.
+
+2018-02-28 Werner LEMBERG <wl@gnu.org>
+
+ * gdiffmk.am (gdiffmk): Use $(AM_V_GEN) to silence file generation.
+
+2015-08-22 Bernd Warken <groff-bernd.warken-72@web.de>
+
+ * gdiffmk.1.man: Rename `gdiffmk.man'.
+
+ * gdiffmk.am: Include renaming.
+
+2015-08-05 Bernd Warken <groff-bernd.warken-72@web.de>
+
+ * gdiffmk.am: Add `Last update'. Setup Emacs mode.
+
+2015-04-13 Mike Bianchi <MBianchi@Foveal.com>
+ More fixes to Savannah bug #44768.
+
+ * gdiffmk.sh:
+ replace
+ for OPTION with while [ $# -gt 0 ]
+
+ test -e ... with test -f
+
+ use ${DIFFCMD} for the last diff
+ add
+ -s SEDCMD option
+ OPTION="$1"
+
+ many other cosmetic changes documented in the bug Discussion.
+ especially:
+ capitalize variables e.g. CMD=`basename $0`
+
+ fix make check tests within gdiffmk
+ * tests/gdiffmk_tests.sh
+ add set -e
+ fails if ${abs_top_builddir} not set or incorrect
+
+ * tests/runtests.sh
+ add test 6a
+ # Different values for addmark, changemark, deletemark
+ # Alternate format of -a -c and -d flag arguments
+
+ add test 9a
+ # Test -D and -M options
+ # Alternate format of -M argument.
+
+ add printout of failure count
+ add exit with failure exit_code if any test fails
+
+2015-04-10 Werner LEMBERG <wl@gnu.org>
+
+ Fix Savannah bug #44768.
+
+ * gdiffmk.sh: Remove bash's $(...) with classic `...`.
+ Patch by Peter Bray.
+
+2015-04-03 Werner LEMBERG <wl@gnu.org
+
+ * gdiffmk.man: Make it work in compatibility mode.
+
+2014-09-03 Bernd Warken <groff-bernd.warken-72@web.de>
+
+ * all `gdiffmk' source files: Add and improve the copying
+ information. Remove last update. Add Emacs setting if necessary.
+
+2014-03-30 Steffen Nurpmeso <sdaoden@yandex.com>
+
+ * Makefile.sub: Put straight error-prevention prefixes for `rm'.
+
+2009-09-22 Colin Watson <cjwatson@debian.org>
+
+ * gdiffmk.sh: Don't use bash specific syntax.
+
+2008-01-04 Werner LEMBERG <wl@gnu.org>
+
+ * gdiffmk.man: Replace .URL with .UR/.UE.
+ Replace .MTO with .MT/.ME.
+ Don't include www.tmac.
+
+2006-09-13 Werner LEMBERG <wl@gnu.org>
+
+ * tests/test_baseline*: Renamed to...
+ * tests/baseline.*: This.
+
+ * tests/runtests.in: Updated.
+
+2006-02-26 Claudio Fontana <claudio@gnu.org>
+
+ * Makefile.sub: Add DESTDIR to install and uninstall targets
+ to support staged installations.
+
+2005-05-16 Keith Marshall <keith.d.marshall@ntlworld.com>
+
+ * gdiffmk.sh: Add space in shebang, conforming
+ to portability recommendation in autoconf docs.
+ * tests/runtests.in: Likewise.
+
+2005-01-16 Mike Bianchi <MBianchi@Foveal.com>
+
+ * gdiffmk.sh (Usage): Fix typos.
+ <top>: Allow `-M<arg1> <arg2>' also.
+
+ * gdiffmk.man: Updated.
+
+2005-01-13 Mike Bianchi <MBianchi@Foveal.com>
+
+ * gdiffmk.sh: Add the -D, -M, and -B options, which provide actions
+ akin to nrchbar.
+ Thanks to Larry Kollar (http://home.alltel.net/kollar/groff/).
+
+ * gdiffmk.man: Updated.
+
+ * tests/runtests.in: Added tests for gdiffmk's -D, -M, and -B
+ options.
+
+ * tests/baseline8, tests/baseline9, tests/baseline10: New files.
+
+2004-12-16 Mike Bianchi <MBianchi@Foveal.com>
+
+ * tests/runtests.in: Fix typo (s/$(srcdir)/${srcdir}/).
+
+2004-12-15 Werner LEMBERG <wl@gnu.org>
+
+ The configure script now generates tests/runtests.
+
+ * tests/tests.sh: Renamed to...
+ * tests/runtests.in: This.
+ Add proper $srcdir prefixes to make it run from build directory.
+ * README, Makefile.sub (CLEANADD), tests/test_baseline7: Updated.
+
+2004-12-14 Werner LEMBERG <wl@gnu.org>
+
+ * gdiffmk.sh: Make sed pattern work with alternate result of GNU
+ diff's -D option, using `!' instead of `not' in #endif comments.
+ (Exit): Use prefix for each emitted message line.
+
+2004-12-14 Mike Bianchi <MBianchi@Foveal.com>
+
+ * tests/*: New files for testing gdiffmk.
+
+ * README, gdiffmk.man, gdiffmk.sh: Updated.
+ Minor fixes.
+
+2004-12-13 Mike Bianchi <MBianchi@Foveal.com>
+
+ Add `-x' command line option to select a diff program.
+
+ * gdiffmk.sh: Add code to handle `-x'.
+ Move test for working `diff' down.
+ Fix sed pattern -- `.mc *' needs to be followed by `.mc .'.
+ (Usage): Updated.
+ * gdiffmk.man: Updated.
+
+2004-12-12 Mike Bianchi <MBianchi@Foveal.com>
+
+ * README: New file.
+
+2004-12-11 Mike Bianchi <MBianchi@Foveal.com>
+
+ First import of gdiffmk files.
+
+Copyright 2004-2020 Free Software Foundation, Inc.
+
+Copying and distribution of this file, with or without modification,
+are permitted in any medium without royalty provided the copyright
+notice and this notice are preserved.
+
+Local Variables:
+fill-column: 72
+mode: change-log
+version-control: never
+End:
+vim:set autoindent textwidth=72:
diff --git a/contrib/gdiffmk/README b/contrib/gdiffmk/README
new file mode 100644
index 0000000..d2214dd
--- /dev/null
+++ b/contrib/gdiffmk/README
@@ -0,0 +1,53 @@
+gdiffmk is approximately a recreation of the original Bell Labs/AT&T diffmk
+command for troff/nroff documents, with enhancements.
+
+It should not be confused with 'diffmk' commands that operate on XML.
+
+The inspiration for this code was a Perl 2 version written in 1989 by Randal
+L. Schwartz. See
+ landfield.com/software/comp.sources.misc/archive-name/volume06/diffmk.p.gz
+
+The command also attempts to reproduce some of the functionality of the old
+'nrchbar' command. See
+ open-systems.ufl.edu/mirrors/ftp.isc.org/usenet/comp.sources.unix/volume10/nrchbar.Z
+
+Thanks to Werner Lemberg for help in making the package more portable and
+fit into the GNU groff source structure.
+
+Gnu diff(1) with the -Dname option does all of the work and sed(1)
+translates the output into something groff/troff/nroff can handle.
+
+Note the BUGS on the man page.
+
+The 'tests' directory contains simple tests. 'runtests run' runs them and
+compares the output against baseline files. Calling 'runtests' without
+argument gives the usage.
+
+----------------------------------------------------------------------------
+
+Copyright (C) 2004-2020 Free Software Foundation, Inc.
+Written by Mike Bianchi <MBianchi@Foveal.com <mailto:MBianchi@Foveal.com>>
+
+This file is part of the gdiffmk utility, which is part of groff.
+
+groff is free software; 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.
+
+groff is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
+License for more details.
+
+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 source. If not, write to the Free Software
+Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA.
+
+##### Editor settings
+Local Variables:
+fill-column: 72
+mode: text
+End:
+vim: set textwidth=72:
diff --git a/contrib/gdiffmk/gdiffmk.1.man b/contrib/gdiffmk/gdiffmk.1.man
new file mode 100644
index 0000000..36f30b7
--- /dev/null
+++ b/contrib/gdiffmk/gdiffmk.1.man
@@ -0,0 +1,304 @@
+.TH gdiffmk @MAN1EXT@ "@MDATE@" "groff @VERSION@"
+.SH Name
+gdiffmk \- mark differences between
+.IR groff / nroff / troff
+files
+.
+.
+.\" ====================================================================
+.\" Legal Terms
+.\" ====================================================================
+.\"
+.\" Copyright (C) 2004-2020 Free Software Foundation, Inc.
+.\"
+.\" This file is part of gdiffmk, which is part of groff, the GNU roff
+.\" type-setting system.
+.\"
+.\" This program is free software: 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.
+.\"
+.\" This program is distributed in the hope that it will be useful, but
+.\" WITHOUT ANY WARRANTY; without even the implied warranty of
+.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+.\" General Public License for more details.
+.\"
+.\" You should have received a copy of the GNU General Public License
+.\" along with this program. If not, see
+.\" <http://www.gnu.org/licenses/>.
+.
+.
+.\" Save and disable compatibility mode (for, e.g., Solaris 10/11).
+.do nr *groff_gdiffmk_1_man_C \n[.cp]
+.cp 0
+.
+.\" Define fallback for groff 1.23's MR macro if the system lacks it.
+.nr do-fallback 0
+.if !\n(.f .nr do-fallback 1 \" mandoc
+.if \n(.g .if !d MR .nr do-fallback 1 \" older groff
+.if !\n(.g .nr do-fallback 1 \" non-groff *roff
+.if \n[do-fallback] \{\
+. de MR
+. ie \\n(.$=1 \
+. I \%\\$1
+. el \
+. IR \%\\$1 (\\$2)\\$3
+. .
+.\}
+.rr do-fallback
+.
+.
+.\" ====================================================================
+.SH Synopsis
+.\" ====================================================================
+.
+.SY gdiffmk
+.RB [ \-a\~\c
+.IR add-mark ]
+.RB [ \-c\~\c
+.IR change-mark ]
+.RB [ \-d\~\c
+.IR delete-mark ]
+.RB [ \-x\~\c
+.IR diff-command ]
+.RB [ \-D
+.RB [ \-B ]
+.RB [ \-M
+.IR "mark1 mark2" ]]
+.RB [ \-\- ]
+.I file1
+.I file2
+.RI [ output ]
+.YS
+.
+.
+.SY gdiffmk
+.B \-\-help
+.YS
+.
+.
+.SY gdiffmk
+.B \-\-version
+.YS
+.
+.
+.\" ====================================================================
+.SH Description
+.\" ====================================================================
+.
+.I gdiffmk
+compares two
+.MR roff @MAN7EXT@
+documents,
+.I file1
+and
+.IR file2 ,
+and creates a
+.I roff
+document consisting of
+.I file2
+with added margin character
+.RB ( .mc )
+requests indicating output lines that differ from
+.I file1.
+.
+If the
+.I file1
+or
+.I file2
+argument is
+.RB \[lq] \- \[rq],
+.I gdiffmk
+reads the standard input stream for that input.
+.
+If the
+.I output
+operand is present,
+.I gdiffmk
+writes output to a file of that name.
+.
+If it is
+.RB \[lq] \- \[rq]
+or absent,
+.I gdiffmk
+writes output to the standard output stream.
+.
+.RB \[lq] \- \[rq]
+cannot be both an input and output operand.
+.
+.
+.\" ====================================================================
+.SH Options
+.\" ====================================================================
+.
+.B \-\-help
+displays a usage message
+and
+.B \-\-version
+shows version information;
+both exit afterward.
+.
+.
+.TP
+.BI \-a\~ add-mark
+Use
+.I add-mark
+for source lines not in
+.I file1
+but present in
+.IR file2 .
+.
+Default:
+.RB \[lq] + \[rq].
+.
+.
+.TP
+.B \-B
+By default,
+the deleted texts marked by the
+.B \-D
+option end with an added
+.I roff
+break request,
+.BR .br ,
+to ensure that the deletions are marked properly.
+.
+This is the only way to guarantee that deletions and small
+changes get flagged.
+.
+This option directs the program not to insert these breaks;
+it makes no sense to use it without
+.BR \-D .
+.
+.
+.TP
+.BI \-c\~ change-mark
+Use
+.I change-mark
+for changed source lines.
+.
+Default:
+.RB \[lq] | \[rq].
+.
+.
+.TP
+.BI \-d\~ delete-mark
+Use the
+.I delete-mark
+for deleted source lines.
+.
+Default:
+.RB \[lq] * \[rq].
+.
+.TP
+.B \-D
+Show the deleted portions from changed and deleted text.
+.
+.
+.TP
+.BI \-M\~ "mark1 mark2"
+Change the delimiting marks for the
+.B \-D
+option.
+.
+It makes no sense to use this option without
+.BR \-D .
+.
+Default delimiting marks:
+.RB \[lq] [[ "\[rq] .\|.\|.\& \[lq]" ]] \[rq].
+.
+.
+.TP
+.BI \-x\~ diff-command
+Use the
+.I diff-command
+command to perform the comparison of
+.I file1
+and
+.IR file2 .
+.
+In particular,
+.I diff-command
+should accept the GNU
+.MR diff 1
+.B \-D
+option.
+.
+Default:
+.BR diff .
+.
+.
+.TP
+.B \-\-
+Treat all subsequent arguments as file names,
+even if they begin with
+.RB \[lq] \- \[rq].
+.
+.
+.\" ====================================================================
+.SH Bugs
+.\" ====================================================================
+.
+The output is not necessarily compatible with all macro packages
+and all preprocessors.
+.
+A workaround that often overcomes preprocessor problems is to run
+.I gdiffmk
+on the output of all the preprocessors instead of the input source.
+.
+.
+.LP
+.I gdiffmk
+relies on the
+.B \-D
+option of GNU
+.I diff
+to make a merged \[lq]#ifdef\[rq] output format.
+.
+Busybox
+.I diff
+is known to not support it.
+.
+Also see the
+.BI \-x\~ diff-command
+option.
+.
+.
+.\" ====================================================================
+.SH Authors
+.\" ====================================================================
+.
+.I gdiffmk
+was written by
+.MT MBianchi@\:Foveal\:.com
+Mike Bianchi
+.ME ,
+now retired.
+.
+It is maintained by the
+.I groff
+developers.
+.
+.
+.\" ====================================================================
+.SH "See also"
+.\" ====================================================================
+.
+.MR groff @MAN1EXT@ ,
+.MR nroff @MAN1EXT@ ,
+.MR gtroff @MAN1EXT@ ,
+.MR roff @MAN7EXT@ ,
+.MR diff @MAN1EXT@
+.
+.
+.\" Restore compatibility mode (for, e.g., Solaris 10/11).
+.cp \n[*groff_gdiffmk_1_man_C]
+.do rr *groff_gdiffmk_1_man_C
+.
+.
+.\" Local Variables:
+.\" fill-column: 72
+.\" mode: nroff
+.\" End:
+.\" vim: set filetype=groff textwidth=72:
diff --git a/contrib/gdiffmk/gdiffmk.am b/contrib/gdiffmk/gdiffmk.am
new file mode 100644
index 0000000..46f224b
--- /dev/null
+++ b/contrib/gdiffmk/gdiffmk.am
@@ -0,0 +1,59 @@
+# Automake rules for 'gdiffmk' (integration into the groff source tree)
+#
+# Copyright (C) 2004-2020 Free Software Foundation, Inc.
+# Written by Mike Bianchi <MBianchi@Foveal.com <mailto:MBianchi@Foveal.com>>
+# Automake migration by Bertrand Garrigues
+#
+# This file is part of the gdiffmk utility, which is part of groff.
+#
+# groff is free software; 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.
+
+# groff is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
+# License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+########################################################################
+gdiffmk_srcdir = $(top_srcdir)/contrib/gdiffmk
+bin_SCRIPTS += gdiffmk
+TESTS += contrib/gdiffmk/tests/runtests.sh
+man1_MANS += contrib/gdiffmk/gdiffmk.1
+EXTRA_DIST += \
+ contrib/gdiffmk/gdiffmk.1.man \
+ contrib/gdiffmk/ChangeLog \
+ contrib/gdiffmk/README \
+ contrib/gdiffmk/gdiffmk.sh \
+ contrib/gdiffmk/tests/runtests.sh \
+ contrib/gdiffmk/tests/baseline \
+ contrib/gdiffmk/tests/baseline.6 \
+ contrib/gdiffmk/tests/baseline.6a \
+ contrib/gdiffmk/tests/baseline.7 \
+ contrib/gdiffmk/tests/baseline.8 \
+ contrib/gdiffmk/tests/baseline.9 \
+ contrib/gdiffmk/tests/baseline.9a \
+ contrib/gdiffmk/tests/baseline.10 \
+ contrib/gdiffmk/tests/file1 \
+ contrib/gdiffmk/tests/file2
+
+gdiffmk: $(gdiffmk_srcdir)/gdiffmk.sh
+ $(AM_V_GEN)sed -e "s|[@]BINDIR[@]|$(bindir)|g" \
+ -e "s|[@]VERSION[@]|$(VERSION)|g" \
+ -e "s|[@]HAVE_TEST_EF_OPTION[@]|$(HAVE_TEST_EF_OPTION)|g" \
+ -e "s|[@]BASH_PROG[@]|$(BASH_PROG)|g" \
+ -e "s|[@]DIFF_PROG[@]|$(DIFF_PROG)|g" \
+ -e $(SH_SCRIPT_SED_CMD) $(gdiffmk_srcdir)/gdiffmk.sh \
+ >$@ \
+ && chmod +x $@
+
+
+# Local Variables:
+# mode: makefile-automake
+# fill-column: 72
+# End:
+# vim: set autoindent filetype=automake textwidth=72:
diff --git a/contrib/gdiffmk/gdiffmk.sh b/contrib/gdiffmk/gdiffmk.sh
new file mode 100644
index 0000000..2473fb1
--- /dev/null
+++ b/contrib/gdiffmk/gdiffmk.sh
@@ -0,0 +1,367 @@
+#!@BASH_PROG@
+# Copyright (C) 2004-2020 Free Software Foundation, Inc.
+# Written by Mike Bianchi <MBianchi@Foveal.com <mailto:MBianchi@Foveal.com>>
+# Thanks to Peter Bray for debugging.
+
+# This file is part of the gdiffmk utility, which is part of groff.
+
+# groff is free software; 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.
+
+# groff is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
+# License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# This file is part of GNU gdiffmk.
+
+
+CMD=`basename $0`
+
+Usage () {
+ if test $# -gt 0
+ then
+ echo >&2 "${CMD}: $@"
+ fi
+ echo >&2 "\
+
+Usage: ${CMD} [ OPTIONS ] FILE1 FILE2 [ OUTPUT ]
+Place difference marks into the new version of a groff/nroff/troff document.
+FILE1 and FILE2 are compared, using 'diff', and FILE2 is output with
+groff '.mc' requests added to indicate how it is different from FILE1.
+
+ FILE1 Previous version of the groff file. '-' means standard input.
+ FILE2 Current version of the groff file. '-' means standard input.
+ Either FILE1 or FILE2 can be standard input, but not both.
+ OUTPUT Copy of FILE2 with '.mc' commands added.
+ '-' means standard output (the default).
+ If the shell's 'test' does not support option -ef, OUTPUT
+ can only be the standard output.
+
+OPTIONS:
+ -a ADDMARK Mark for added groff source lines. Default: '+'.
+ -c CHANGEMARK Mark for changed groff source lines. Default: '|'.
+ -d DELETEMARK Mark for deleted groff source lines. Default: '*'.
+
+ -D Show the deleted portions from changed and deleted text.
+ Default delimiting marks: '[[' .... ']]'.
+ -B By default, the deleted texts marked by the '-D' option end
+ with an added troff '.br' command. This option prevents
+ the added '.br'.
+ -M MARK1 MARK2 Change the delimiting marks for the '-D' option.
+
+ -x DIFFCMD Use a different diff(1) command;
+ one that accepts the '-Dname' option, such as GNU diff.
+ -s SEDCMD Use a different sed(1) command;
+ such as GNU sed.
+ --version Print version information on the standard output and exit.
+ --help Print this message on the standard error.
+"
+ exit 255
+}
+
+
+Exit () {
+ exitcode=$1
+ shift
+ for arg
+ do
+ echo >&2 "${CMD}: $1"
+ shift
+ done
+ exit ${exitcode}
+}
+
+# Usage: FileRead exit_code filename
+#
+# Check for existence and readability of given file name.
+# If not found or not readable, print message and exit with EXIT_CODE.
+FileRead () {
+ case "$2" in
+ -)
+ return
+ ;;
+ esac
+
+ if test ! -f "$2"
+ then
+ Exit $1 "File '$2' not found."
+ fi
+ if test ! -r "$2"
+ then
+ Exit $1 "File '$2' not readable."
+ fi
+}
+
+
+# Usage: FileCreate exit_code filename
+#
+# Create the given filename if it doesn't exist.
+# If unable to create or write, print message and exit with EXIT_CODE.
+FileCreate () {
+ case "$2" in
+ -)
+ return
+ ;;
+ esac
+
+ touch "$2" 2>/dev/null
+ if test $? -ne 0
+ then
+ if test ! -f "$2"
+ then
+ Exit $1 "File '$2' not created; " \
+ "Cannot write directory '`dirname "$2"`'."
+ fi
+ Exit $1 "File '$2' not writeable."
+ fi
+}
+
+WouldClobber () {
+ case "$2" in
+ -)
+ return
+ ;;
+ esac
+
+ # BASH_PROG is set to /bin/sh if bash was not found
+ if test "$HAVE_TEST_EF_OPTION" = "no" -a "$BASH_PROG" = "/bin/sh"
+ then
+ Exit 3 \
+ "Your shell does support test -ef, [OUTPUT] can only be the" \
+ "standard output."
+ else
+ if test "$1" -ef "$3"
+ then
+ Exit 3 \
+ "The $2 and OUTPUT arguments both point to the same file," \
+ "'$1', and it would be overwritten."
+ fi
+ fi
+}
+
+ADDMARK='+'
+CHANGEMARK='|'
+DELETEMARK='*'
+MARK1='[['
+MARK2=']]'
+
+RequiresArgument () {
+ # Process flags that take either concatenated or
+ # separated values.
+ case "$1" in
+ -??*)
+ expr "$1" : '-.\(.*\)'
+ return 1
+ ;;
+ esac
+
+ if test $# -lt 2
+ then
+ Exit 255 "Option '$1' requires a value."
+ fi
+
+ echo "$2"
+ return 0
+}
+
+HAVE_TEST_EF_OPTION=@HAVE_TEST_EF_OPTION@
+BASH_PROG=@BASH_PROG@
+BADOPTION=
+DIFFCMD=@DIFF_PROG@
+SEDCMD=sed
+D_option=
+br=.br
+while [ $# -gt 0 ]
+do
+ OPTION="$1"
+ case "${OPTION}" in
+ -a*)
+ ADDMARK=`RequiresArgument "${OPTION}" "$2"` &&
+ shift
+ ;;
+ -c*)
+ CHANGEMARK=`RequiresArgument "${OPTION}" "$2"` &&
+ shift
+ ;;
+ -d*)
+ DELETEMARK=`RequiresArgument "${OPTION}" "$2"` &&
+ shift
+ ;;
+ -D )
+ D_option=D_option
+ ;;
+ -M* )
+ MARK1=`RequiresArgument "${OPTION}" "$2"` &&
+ shift
+ if [ $# -lt 2 ]
+ then
+ Usage "Option '-M' is missing the MARK2 value."
+ fi
+ MARK2="$2"
+ shift
+ ;;
+ -B )
+ br=.
+ ;;
+ -s* )
+ SEDCMD=`RequiresArgument "${OPTION}" "$2"` &&
+ shift
+ ;;
+ -x* )
+ DIFFCMD=`RequiresArgument "${OPTION}" "$2"` &&
+ shift
+ ;;
+ --version)
+ echo "${CMD} (groff) version @VERSION@"
+ exit 0
+ ;;
+ --help)
+ Usage
+ ;;
+ --)
+ # What follows -- are file arguments
+ shift
+ break
+ ;;
+ -)
+ break
+ ;;
+ -*)
+ BADOPTION="${CMD}: invalid option '$1'"
+ ;;
+ *)
+ break
+ ;;
+ esac
+ shift
+done
+
+${DIFFCMD} -Dx /dev/null /dev/null >/dev/null 2>&1 ||
+ Usage "The '${DIFFCMD}' program does not accept" \
+ "the required '-Dname' option.
+Use GNU diff instead. See the '-x DIFFCMD' option. You can also
+install GNU diff as gdiff on your system"
+
+if test -n "${BADOPTION}"
+then
+ Usage "${BADOPTION}"
+fi
+
+if test $# -lt 2 -o $# -gt 3
+then
+ Usage "Incorrect number of arguments."
+fi
+
+if test "1$1" = "1-" -a "2$2" = "2-"
+then
+ Usage "Both FILE1 and FILE2 are '-'."
+fi
+
+FILE1="$1"
+FILE2="$2"
+
+FileRead 1 "${FILE1}"
+FileRead 2 "${FILE2}"
+
+if test $# = 3
+then
+ case "$3" in
+ -)
+ # output goes to standard output
+ ;;
+ *)
+ # output goes to a file
+ WouldClobber "${FILE1}" FILE1 "$3"
+ WouldClobber "${FILE2}" FILE2 "$3"
+
+ FileCreate 3 "$3"
+ exec >$3
+ ;;
+ esac
+fi
+
+# To make a very unlikely LABEL even more unlikely ...
+LABEL=__diffmk_$$__
+
+SED_SCRIPT='
+ /^#ifdef '"${LABEL}"'/,/^#endif \/\* '"${LABEL}"'/ {
+ /^#ifdef '"${LABEL}"'/ s/.*/.mc '"${ADDMARK}"'/
+ /^#endif \/\* '"${LABEL}"'/ s/.*/.mc/
+ p
+ d
+ }
+ /^#ifndef '"${LABEL}"'/,/^#endif \/\* [!not ]*'"${LABEL}"'/ {
+ /^#else \/\* '"${LABEL}"'/,/^#endif \/\* '"${LABEL}"'/ {
+ /^#else \/\* '"${LABEL}"'/ s/.*/.mc '"${CHANGEMARK}"'/
+ /^#endif \/\* '"${LABEL}"'/ s/.*/.mc/
+ p
+ d
+ }
+ /^#endif \/\* [!not ]*'"${LABEL}"'/ {
+ s/.*/.mc '"${DELETEMARK}"'/p
+ a\
+.mc
+ }
+ d
+ }
+ p
+ '
+
+if [ ${D_option} ]
+then
+ SED_SCRIPT='
+ /^#ifdef '"${LABEL}"'/,/^#endif \/\* '"${LABEL}"'/ {
+ /^#ifdef '"${LABEL}"'/ s/.*/.mc '"${ADDMARK}"'/
+ /^#endif \/\* '"${LABEL}"'/ s/.*/.mc/
+ p
+ d
+ }
+ /^#ifndef '"${LABEL}"'/,/^#endif \/\* [!not ]*'"${LABEL}"'/ {
+ /^#ifndef '"${LABEL}"'/ {
+ i\
+'"${MARK1}"'
+ d
+ }
+ /^#else \/\* '"${LABEL}"'/ !{
+ /^#endif \/\* [!not ]*'"${LABEL}"'/ !{
+ p
+ d
+ }
+ }
+ /^#else \/\* '"${LABEL}"'/,/^#endif \/\* '"${LABEL}"'/ {
+ /^#else \/\* '"${LABEL}"'/ {
+ i\
+'"${MARK2}"'\
+'"${br}"'
+ s/.*/.mc '"${CHANGEMARK}"'/
+ a\
+.mc '"${CHANGEMARK}"'
+ d
+ }
+ /^#endif \/\* '"${LABEL}"'/ s/.*/.mc/
+ p
+ d
+ }
+ /^#endif \/\* [!not ]*'"${LABEL}"'/ {
+ i\
+'"${MARK2}"'\
+'"${br}"'
+ s/.*/.mc '"${DELETEMARK}"'/p
+ a\
+.mc
+ }
+ d
+ }
+ p
+ '
+fi
+
+${DIFFCMD} -D"${LABEL}" -- "${FILE1}" "${FILE2}" |
+ ${SEDCMD} -n "${SED_SCRIPT}"
+
+# EOF
diff --git a/contrib/gdiffmk/tests/baseline b/contrib/gdiffmk/tests/baseline
new file mode 100644
index 0000000..6b32992
--- /dev/null
+++ b/contrib/gdiffmk/tests/baseline
@@ -0,0 +1,17 @@
+.ll 25
+.pl 20
+.nf
+file1 and file2 #1
+.mc |
+file2 only
+file2 only
+.mc
+file1 and file2 #2
+.mc +
+file2 only
+.mc
+file1 and file2 #3
+.mc *
+.mc
+file1 and file2 #4
+file1 and file2 #5
diff --git a/contrib/gdiffmk/tests/baseline.10 b/contrib/gdiffmk/tests/baseline.10
new file mode 100644
index 0000000..b523f45
--- /dev/null
+++ b/contrib/gdiffmk/tests/baseline.10
@@ -0,0 +1,26 @@
+.ll 25
+.pl 20
+.nf
+file1 and file2 #1
+[[
+file1 only
+]]
+.
+.mc |
+file2 only
+file2 only
+.mc
+file1 and file2 #2
+.mc +
+file2 only
+.mc
+file1 and file2 #3
+[[
+file1 only
+file1 only
+]]
+.
+.mc *
+.mc
+file1 and file2 #4
+file1 and file2 #5
diff --git a/contrib/gdiffmk/tests/baseline.6 b/contrib/gdiffmk/tests/baseline.6
new file mode 100644
index 0000000..3156961
--- /dev/null
+++ b/contrib/gdiffmk/tests/baseline.6
@@ -0,0 +1,17 @@
+.ll 25
+.pl 20
+.nf
+file1 and file2 #1
+.mc C
+file2 only
+file2 only
+.mc
+file1 and file2 #2
+.mc A
+file2 only
+.mc
+file1 and file2 #3
+.mc D
+.mc
+file1 and file2 #4
+file1 and file2 #5
diff --git a/contrib/gdiffmk/tests/baseline.6a b/contrib/gdiffmk/tests/baseline.6a
new file mode 100644
index 0000000..3156961
--- /dev/null
+++ b/contrib/gdiffmk/tests/baseline.6a
@@ -0,0 +1,17 @@
+.ll 25
+.pl 20
+.nf
+file1 and file2 #1
+.mc C
+file2 only
+file2 only
+.mc
+file1 and file2 #2
+.mc A
+file2 only
+.mc
+file1 and file2 #3
+.mc D
+.mc
+file1 and file2 #4
+file1 and file2 #5
diff --git a/contrib/gdiffmk/tests/baseline.7 b/contrib/gdiffmk/tests/baseline.7
new file mode 100644
index 0000000..4a83af6
--- /dev/null
+++ b/contrib/gdiffmk/tests/baseline.7
@@ -0,0 +1,2 @@
+gdiffmk: The FILE2 and OUTPUT arguments both point to the same file,
+gdiffmk: './contrib/gdiffmk/tests/tmp_file.7', and it would be overwritten.
diff --git a/contrib/gdiffmk/tests/baseline.8 b/contrib/gdiffmk/tests/baseline.8
new file mode 100644
index 0000000..9846dd5
--- /dev/null
+++ b/contrib/gdiffmk/tests/baseline.8
@@ -0,0 +1,26 @@
+.ll 25
+.pl 20
+.nf
+file1 and file2 #1
+[[
+file1 only
+]]
+.br
+.mc |
+file2 only
+file2 only
+.mc
+file1 and file2 #2
+.mc +
+file2 only
+.mc
+file1 and file2 #3
+[[
+file1 only
+file1 only
+]]
+.br
+.mc *
+.mc
+file1 and file2 #4
+file1 and file2 #5
diff --git a/contrib/gdiffmk/tests/baseline.9 b/contrib/gdiffmk/tests/baseline.9
new file mode 100644
index 0000000..50fe57d
--- /dev/null
+++ b/contrib/gdiffmk/tests/baseline.9
@@ -0,0 +1,26 @@
+.ll 25
+.pl 20
+.nf
+file1 and file2 #1
+<<<<
+file1 only
+>>>>
+.br
+.mc |
+file2 only
+file2 only
+.mc
+file1 and file2 #2
+.mc +
+file2 only
+.mc
+file1 and file2 #3
+<<<<
+file1 only
+file1 only
+>>>>
+.br
+.mc *
+.mc
+file1 and file2 #4
+file1 and file2 #5
diff --git a/contrib/gdiffmk/tests/baseline.9a b/contrib/gdiffmk/tests/baseline.9a
new file mode 100644
index 0000000..50fe57d
--- /dev/null
+++ b/contrib/gdiffmk/tests/baseline.9a
@@ -0,0 +1,26 @@
+.ll 25
+.pl 20
+.nf
+file1 and file2 #1
+<<<<
+file1 only
+>>>>
+.br
+.mc |
+file2 only
+file2 only
+.mc
+file1 and file2 #2
+.mc +
+file2 only
+.mc
+file1 and file2 #3
+<<<<
+file1 only
+file1 only
+>>>>
+.br
+.mc *
+.mc
+file1 and file2 #4
+file1 and file2 #5
diff --git a/contrib/gdiffmk/tests/file1 b/contrib/gdiffmk/tests/file1
new file mode 100644
index 0000000..ba6a4be
--- /dev/null
+++ b/contrib/gdiffmk/tests/file1
@@ -0,0 +1,11 @@
+.ll 25
+.pl 20
+.nf
+file1 and file2 #1
+file1 only
+file1 and file2 #2
+file1 and file2 #3
+file1 only
+file1 only
+file1 and file2 #4
+file1 and file2 #5
diff --git a/contrib/gdiffmk/tests/file2 b/contrib/gdiffmk/tests/file2
new file mode 100644
index 0000000..54e95ee
--- /dev/null
+++ b/contrib/gdiffmk/tests/file2
@@ -0,0 +1,11 @@
+.ll 25
+.pl 20
+.nf
+file1 and file2 #1
+file2 only
+file2 only
+file1 and file2 #2
+file2 only
+file1 and file2 #3
+file1 and file2 #4
+file1 and file2 #5
diff --git a/contrib/gdiffmk/tests/runtests.sh b/contrib/gdiffmk/tests/runtests.sh
new file mode 100755
index 0000000..51cf855
--- /dev/null
+++ b/contrib/gdiffmk/tests/runtests.sh
@@ -0,0 +1,187 @@
+#! /bin/sh
+#
+# A very simple function test for gdiffmk.sh.
+#
+# Copyright (C) 2004-2020, 2023 Free Software Foundation, Inc.
+# Written by Mike Bianchi <MBianchi@Foveal.com>.
+# Subsequent modifications by G. Branden Robinson.
+
+# This file is part of the gdiffmk utility, which is part of groff.
+
+# groff is free software; 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.
+
+# groff is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
+# License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# This file is part of GNU gdiffmk.
+
+# abs_top_out_dir is set by AM_TESTS_ENVIRONMENT (defined in
+# Makefile.am) when running "make check".
+
+gdiffmk=${abs_top_out_dir:-.}/gdiffmk
+
+# Locate directory containing our test artifacts.
+in_dir=
+
+for srcroot in . .. ../..
+do
+ # Look for a source file characteristic of the groff source tree.
+ if ! [ -f "$srcroot"/ChangeLog.115 ]
+ then
+ continue
+ fi
+
+ d=$srcroot/contrib/gdiffmk/tests
+ if [ -d "$d" ]
+ then
+ in_dir=$d
+ break
+ fi
+done
+
+# If we can't find it, we can't test.
+if [ -z "$in_dir" ]
+then
+ echo "$0: cannot locate test artifact input directory" >&2
+ exit 77 # skip
+fi
+
+# Locate directory where we'll put the test output.
+out_dir=
+
+for buildroot in . .. ../..
+do
+ d=$buildroot/contrib/gdiffmk/tests
+ if [ -d "$d" ]
+ then
+ out_dir=$d
+ break
+ fi
+done
+
+# If we can't find it, we can't test.
+if [ -z "$out_dir" ]
+then
+ echo "$0: cannot locate test artifact output directory" >&2
+ exit 77 # skip
+fi
+
+exit_code=0 # Success
+failure_count=0
+
+TestResult () {
+ if cmp -s $1 $2
+ then
+ echo $2 PASSED
+ else
+ echo ''
+ echo $2 TEST FAILED
+ diff $1 $2
+ echo ''
+ exit_code=1 # Failure
+ failure_count=`expr ${failure_count} + 1`
+ fi
+}
+
+CleanUp () {
+ rm -f ${out_dir}/result.* ${out_dir}/tmp_file.* ${tmpfile}
+}
+
+tmpfile=${TMPDIR:-/tmp}/$$
+trap 'trap "" HUP INT QUIT TERM; CleanUp; kill -s INT $$' \
+ HUP INT QUIT TERM
+
+# Run tests.
+
+# 3 file arguments
+ResultFile=${out_dir}/result.1
+${gdiffmk} ${in_dir}/file1 ${in_dir}/file2 ${ResultFile} 2>${tmpfile}
+cat ${tmpfile} >>${ResultFile}
+TestResult ${in_dir}/baseline ${ResultFile}
+
+# OUTPUT to stdout by default
+ResultFile=${out_dir}/result.2
+${gdiffmk} ${in_dir}/file1 ${in_dir}/file2 >${ResultFile} 2>&1
+TestResult ${in_dir}/baseline ${ResultFile}
+
+# OUTPUT to stdout via - argument
+ResultFile=${out_dir}/result.3
+${gdiffmk} ${in_dir}/file1 ${in_dir}/file2 - >${ResultFile} 2>&1
+TestResult ${in_dir}/baseline ${ResultFile}
+
+# FILE1 from standard input via - argument
+ResultFile=${out_dir}/result.4
+${gdiffmk} - ${in_dir}/file2 <${in_dir}/file1 >${ResultFile} 2>&1
+TestResult ${in_dir}/baseline ${ResultFile}
+
+
+# FILE2 from standard input via - argument
+ResultFile=${out_dir}/result.5
+${gdiffmk} ${in_dir}/file1 - <${in_dir}/file2 >${ResultFile} 2>&1
+TestResult ${in_dir}/baseline ${ResultFile}
+
+
+# Different values for addmark, changemark, deletemark
+ResultFile=${out_dir}/result.6
+${gdiffmk} -aA -cC -dD ${in_dir}/file1 ${in_dir}/file2 >${ResultFile} 2>&1
+TestResult ${in_dir}/baseline.6 ${ResultFile}
+
+
+# Different values for addmark, changemark, deletemark
+# Alternate format of -a -c and -d flag arguments
+ResultFile=${out_dir}/result.6a
+${gdiffmk} -a A -c C -d D ${in_dir}/file1 ${in_dir}/file2 >${ResultFile} 2>&1
+TestResult ${in_dir}/baseline.6a ${ResultFile}
+
+
+# Test for accidental file overwrite.
+ResultFile=${out_dir}/result.7
+TempFile=${out_dir}/tmp_file.7
+cp ${in_dir}/file2 "$TempFile"
+${gdiffmk} -aA -dD -cC ${in_dir}/file1 "$TempFile" "$TempFile" \
+ >${ResultFile} 2>&1
+TestResult ${in_dir}/baseline.7 ${ResultFile}
+
+
+# Test -D option
+ResultFile=${out_dir}/result.8
+${gdiffmk} -D ${in_dir}/file1 ${in_dir}/file2 >${ResultFile} 2>&1
+TestResult ${in_dir}/baseline.8 ${ResultFile}
+
+
+# Test -D and -M options
+ResultFile=${out_dir}/result.9
+${gdiffmk} -D -M '<<<<' '>>>>' \
+ ${in_dir}/file1 ${in_dir}/file2 >${ResultFile} 2>&1
+TestResult ${in_dir}/baseline.9 ${ResultFile}
+
+
+# Test -D and -M options
+# Alternate format of -M argument.
+ResultFile=${out_dir}/result.9a
+${gdiffmk} -D -M'<<<<' '>>>>' \
+ ${in_dir}/file1 ${in_dir}/file2 >${ResultFile} 2>&1
+TestResult ${in_dir}/baseline.9a ${ResultFile}
+
+
+# Test -D and -B options
+ResultFile=${out_dir}/result.10
+${gdiffmk} -D -B ${in_dir}/file1 ${in_dir}/file2 >${ResultFile} 2>&1
+TestResult ${in_dir}/baseline.10 ${ResultFile}
+
+
+echo failure_count ${failure_count}
+
+# You can comment out the following line to examine failing cases.
+CleanUp
+
+exit ${exit_code}
+
+# vim:set ai et sw=4 ts=4 tw=72:
diff --git a/contrib/glilypond/ChangeLog b/contrib/glilypond/ChangeLog
new file mode 100644
index 0000000..c218610
--- /dev/null
+++ b/contrib/glilypond/ChangeLog
@@ -0,0 +1,290 @@
+2022-10-19 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * glilypond.pl (version): Report version information in format
+ recommended by GNU coding standards. Bump micro version number
+ to reflect this and the restructuring immediately previous.
+
+2022-10-19 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ Make glilypond script stand alone.
+
+ * args.pl:
+ * oop_fh.pl
+ * subs.pl: Delete, moving their content into...
+ * glilypond.pl: ...here. Also bump overall license to GPLv3
+ from GPLv2 because all of the deleted files were GPLv3.
+ * glilypond.am (dist_glilypond_DATA): Delete.
+
+2022-05-03 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * glilypond.am (glilypond): Spell dependency on
+ `$(SH_DEPS_SED_SCRIPT)` using that macro expansion instead of a
+ literal file name. See groff's doc/automake.mom.
+
+2021-01-06 Colin Watson <cjwatson@debian.org>
+
+ * glilypond.pl: Avoid Perl's unsafe "<>" operator.
+
+ The "<>" operator is implemented using the two-argument form of
+ "open", which interprets magic such as pipe characters, allowing
+ execution of arbitrary commands which is unlikely to be
+ expected. Perl >= 5.22 has a "<<>>" operator which avoids this,
+ but also forbids the use of "-" to mean the standard input,
+ which is a facility that the affected groff programs document.
+
+ ARGV::readonly would probably also fix this, but I fundamentally
+ dislike the approach of escaping data in preparation for a
+ language facility to unescape it, especially when the required
+ escaping is as non-obvious as it is here. (For the same reason,
+ I prefer to use subprocess invocation facilities that allow
+ passing the argument list as a list rather than as a string to
+ be interpreted by the shell.) So I've abandoned this dubious
+ convenience and changed the affected programs to iterate over
+ command-line arguments manually using the three-argument form of
+ open.
+
+ glilypond doesn't need the initial unshift since that's already
+ handled in args.pl.
+
+ Fixes <https://savannah.gnu.org/bugs/?55557>.
+
+2020-04-22 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * glilypond.1.man: Delete references to groffer.
+
+2018-02-28 Werner LEMBERG <wl@gnu.org>
+
+ * glilypond.am (glilypond): Use $(AM_V_GEN) to silence file generation.
+
+2017-10-22 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * args.pl: Fix grammar in usage message.
+
+ When used attributively, e.g. as an adjectival phrase,
+ "command-line" should be hyphenated.
+
+2015-09-10 Bernd Warken <groff-bernd.warken-72@web.de>
+
+ * glilypond.pl, args.pl, subs.pl: New default `eps_func' as `pdf'.
+
+2015-09-10 Bernd Warken <groff-bernd.warken-72@web.de>
+
+ * glilypond.1.man: New default `pdf2eps'. Several fixes.
+
+ * subs.pl: Replace `.PSPIC' by `$P_PIC'. Set new default sub on
+ top.
+
+2015-08-22 Bernd Warken <groff-bernd.warken-72@web.de>
+
+ * glilypond.1.man: Rename `glilypond.man'.
+
+ * glilypond.am: Include renaming.
+
+2015-08-05 Bernd Warken <groff-bernd.warken-72@web.de>
+
+ * glilypond.am: Add `Last update'. Setup Emacs mode.
+
+2015-04-03 Werner LEMBERG <wl@gnu.org>
+
+ * glilypond.man: Make it work in compatibility mode.
+ (EL): Fix typo.
+
+2015-03-20 Ralph Corderoy <ralph@inputplus.co.uk>
+
+ * glilypond.pl: Minor syntax fixes.
+
+2015-03-20 Werner LEMBERG <wl@gnu.org>
+
+ * glilypond.pl <read files or stdin>: Fix typo.
+
+ Problem reported by Grégoire Babey <gibux@gmx.ch>.
+
+2014-09-03 Bernd Warken <groff-bernd.warken-72@web.de>
+
+ * glilypond.pl: New version 1.3.1
+
+ * all `glilypond' files: Copying and Emacs setting.
+
+2014-07-06 Bernd Warken <groff-bernd.warken-72@web.de>
+
+ * glilypond.pl: New version 1.3
+
+ * glilypond.man: Make man-page compatible with doclifter.
+
+2014-07-04 Bernd Warken <groff-bernd.warken-72@web.de>
+
+ * glilypond.man: Transform to classical man-page style.
+
+2014-07-03 Bernd Warken <groff-bernd.warken-72@web.de>
+
+ * glilypond.man: Improve definitions.
+
+2014-03-30 Steffen Nurpmeso <sdaoden@yandex.com>
+
+ * Makefile.sub: Put straight error-prevention prefixes for `rm'.
+
+2014-03-30 Steffen Nurpmeso <sdaoden@yandex.com>
+
+ * Makefile.sub (uninstall_sub): Typo.
+
+2014-03-11 Ingo Schwarze <schwarze@openbsd.org> (tiny change)
+
+ * Makefile.sub (install_data): POSIX conformance.
+
+ Do not use $< outside inference rules, and even less when there
+ are multiple targets.
+
+2014-02-14 Bernd Warken <groff-bernd.warken-72@web.de>
+
+ * examples/example.groff: Add this directory and this file.
+
+2014-01-06 Bernd Warken <groff-bernd.warken-72@web.de>
+
+ Remove archive git@github.com:RUNOFF/groff_lilypond.git
+
+2013-10-30 Bernd Warken <groff-bernd.warken-72@web.de>
+
+ * glilypond.man: Correct writing.
+
+2013-05-10 Bernd Warken <groff-bernd.warken-72@web.de>
+
+ * glilypond.pl: Correct position information. Add debug code.
+
+ * args.pl, oop_fh.pl, subs.pl: Correct position information.
+
+2013-04-25 Bernd Warken <groff-bernd.warken-72@web.de>
+
+ * Makefile.sub: minor corrections.
+
+2013-04-24 Bernd Warken <groff-bernd.warken-72@web.de>
+
+ Public `glilypond' version `v1.1'.
+
+ * args.pl, sub.pl, glilypond.man: Change option `-v' to mean
+ `--verbose' instead of former `--version' such as many GNU
+ programs do. Correct sub `&usage()' and man-page.
+
+ * args.pl, glilypond.pl, oop_fh.pl, subs.pl: Remove spaces in
+ ` -> ', some `( ... )', and some `{ ... }' places for better
+ readability of the Perl source code.
+
+2013-04-24 Bernd Warken <groff-bernd.warken-72@web.de>
+
+ * args.pl, oop_fh.pl: Remove 1st line calling `perl'.
+
+ * subs.pl: Remove 1st line calling `perl'. Remove sub
+ `&perl_version()'. Adjust sub `&usage()'.
+
+ * glilypond.pl: Keep 1st line, which will be reset by running
+ `make'. Remove all parts of Perl testing.
+
+ * perl_test.pl: Remove this file.
+
+ * README.txt: Add information about needed Perl version.
+
+ * Makefile.sub: Corrections for removing Perl test. Use `$<'.
+
+2013-04-24 Bernd Warken <groff-bernd.warken-72@web.de>
+
+ * Makefile.sub: Remove Perl test.
+
+2013-04-12 Bernd Warken <groff-bernd.warken-72@web.de>
+
+ * glilypond.pl: Fix END for early exit of `--version'.
+
+2013-04-12 Bernd Warken <groff-bernd.warken-72@web.de>
+
+ * subs.pl: Replace `state' by global variable. So the Perl
+ version can be older.
+
+ * perl_test.pl: Replace the Perl version by `v5.6', analogously to
+ `groffer'.
+
+2013-04-11 Bernd Warken <groff-bernd.warken-72@web.de>
+
+ * Makefile.sub: Corrections for Emacs.
+
+2013-04-11 Bernd Warken <groff-bernd.warken-72@web.de>
+
+ * old groff_lilypond: There is now a free `git' package containing
+ all old versions of the former name `groff_lilypond v0.*'. They
+ work with `lilypond' parts in `roff' files, but were not
+ installed. This package can be got at:
+
+ $ git clone git@github.com:RUNOFF/groff_lilypond.git
+
+ The new versions `glilypond 1.*' are not included there.
+
+2013-03-29 Bernd Warken <groff-bernd.warken-72@web.de>
+
+ Published version is `v1.0'.
+
+ Run `autoconf' again.
+
+2013-03-29 Bernd Warken <groff-bernd.warken-72@web.de>
+
+ * <groff_src_dir>/m4/groff.m4, <groff_src_dir>/configure.ac: Add
+ libdir information for `glilypond'.
+
+ * <groff_src_dir>/Makefile.in: Add
+ `<groff_src_dir>/contrib/glilypond'.
+
+ Run `autoconf'.
+
+ `glilypond' can now be installed to the system.
+
+2013-03-29 Bernd Warken <groff-bernd.warken-72@web.de>
+
+ Rename `groff_lilypond' to `glilypond'. So remove the former
+ source directory `<groff_src_dir>/contrib/lilypond' and newly
+ install `<groff_src_dir>/contrib/glilypond', which now has many
+ files. The new version starts at `v1.0'.
+
+ Version will now be v1.*. All former files of versions v0.*
+ vanished or were renamed. This is not yet an information about
+ publishing.
+
+ * ChangeLog.0x: old `ChangeLog' file for the old `groff_lilypond'
+ versions v0.*. In the future, this file won't be changed any
+ more.
+
+ * ChangeLog: New file. It is this file. It displays the history
+ of `glilypond' versions v1.* or later.
+
+ * glilypond.pl: New main Perl file written from
+ `groff_lilypond.pl' in a totally different way. It is split now
+ into 4 Perl files.
+
+ * args.pl: New Perl file. It handles the command line options for
+ a run of `glilypond.pl'.
+
+ * oop_fh.pl: New Perl file. OOP handling of file handles.
+
+ * perl_test.pl: Test whether the actual Perl program has a
+ suitable versions. For `Makefile.sub' and `glilypond.pl'.
+
+ * subs.pl: New Perl file. Defines the global subs for
+ `glilypond.pl'.
+
+ * Makefile.sub: Newly written `Makefile' for this subdirectory of
+ `groff'. `glilypond' should be able to be installed by `make'
+ with this file.
+
+ * glilypond.man: Newly written man-page for `glilypond'.
+
+ * README.txt: New file about the installation.
+
+########################################################################
+
+Copyright 2013-2020 Free Software Foundation, Inc.
+
+Copying and distribution of this file, with or without modification,
+are permitted in any medium without royalty provided the copyright
+notice and this notice are preserved.
+
+Local Variables:
+fill-column: 72
+mode: change-log
+version-control: never
+End:
+vim:set autoindent textwidth=72:
diff --git a/contrib/glilypond/ChangeLog.0x b/contrib/glilypond/ChangeLog.0x
new file mode 100644
index 0000000..b1dc833
--- /dev/null
+++ b/contrib/glilypond/ChangeLog.0x
@@ -0,0 +1,104 @@
+2013-04-11 Bernd Warken <groff-bernd.warken-72@web.de>
+
+ * old groff_lilypond: There is now a free `git' package containing
+ all old versions of the former name `groff_lilypond v0.*'. They
+ work with `lilypond' parts in `roff' files, but were not
+ installed. This package can be got at:
+
+ $ git clone git@github.com:RUNOFF/groff_lilypond.git
+
+ The new versions `glilypond 1.*' are not included there.
+
+2013-03-28 Bernd Warken <groff-bernd.warken-72@web.de>
+
+ Rename `groff_lilypond' to `glilypond' for *.pl and *.man files.
+ Split the single Perl script into several minor *.pl files.
+ Construct `Makefile.sub' in order to have installed `glilypond'.
+ Public versions will be v1.x.
+ Rename `ChangeLog' to `ChangeLog.0x' for the old versions of
+ `groff_lilypond' v0.*. New `ChangeLog' for the new versions
+ `glilypond' 1.*.
+
+ * groff_lilypond.pl: Vanished. Renamed to `glilypond.pl'.
+ * groff_lilypond.man: Vanished. Renamed to `glilypond.man'.
+ * ChangeLog.0x: Moved from `ChangeLog'. It is this file. It
+ describes only the old `groff_lilypond' versions v0.*. See file
+ `ChangeLog' for the files of the new `glilypond' v1.*.
+
+2013-03-11 Bernd Warken <groff-bernd.warken-72@web.de>
+
+ * groff_lilypond.pl: Publishing groff_lilypond version v0.6.
+ New options: -e|--eps_dir, -l|--license, -k|--keep_files,
+ -p|--prefix=..., -t|--temp_dir=...
+ Install --eps_dir as directory for the useful EPS files.
+ * groff_lilypond.man: Include the new options. Add section
+ SEE ALSO.
+
+2013-03-03 Bernd Warken <groff-bernd.warken-72@web.de>
+
+ * groff_lilypond.pl: New code with Perl references.
+ Publishing groff_lilypond version v0.5.
+ New options: --usage, -V|--Verbose|--verbose, --file_prefix=...,
+ -o|--output=..., --temp_dir=...
+ Perl >=5.10.0 needed.
+ * groff_lilypond.man: Include the new options.
+
+2013-02-23 Bernd Warken <groff-bernd.warken-72@web.de>
+
+ * groff_lilypond_pl: Remove `.lilypond include' for lilypond
+ regions. Within `groff' mode. it is still allowed.
+ * groff_lilypond.man: Update `.lilypond include'.
+
+2013-02-23 Bernd Warken <groff-bernd.warken-72@web.de>
+
+ New version v0.4 of groff_lilypond.
+ * groff_lilypond_pl: Major rewrite.
+ New options: --file_prefix, --temp_dir, and --license.
+ * groff_lilypond.man: documents the new features.
+
+2013-02-16 Bernd Warken <groff-bernd.warken-72@web.de>
+
+ * groff_lilypond.man: Minor corrections.
+
+2013-02-12 Bernd Warken <groff-bernd.warken-72@web.de>
+
+ * groff_lilypond.pl: Add deletion of unused temporary files.
+
+2013-02-12 Bernd Warken <groff-bernd.warken-72@web.de>
+
+ * contrib/lilypond: Version v0.3 for groff_lilypond
+ * groff_lilypond.pl: A new request was added for importing
+ lilypond files:
+ .lilypond include ...
+ The argument handling was improved.
+
+2013-02-11 Bernd Warken <groff-bernd.warken-72@web.de>
+
+ * contrib/lilypond: Version v0.2 for groff_lilypond
+ * groff_lilypond.pl: Now there are 2 modes for generationg the EPS
+ files: --ly2eps (the default) and --pdf2eps (that's the old mode
+ from version v0.1 with pdf to ps to eps). With ly2eps mode,
+ lilypond generates the EPS files itself, for each page one EPS
+ file.
+ * groff_lilypond.man: Corresponding updated man-page
+
+2013-02-10 Bernd Warken <groff-bernd.warken-72@web.de>
+
+ * contrib/lilypond: New files for adding lilypond parts into groff
+ files. These files will not yet be installed.
+ * groff_lilypond.pl: Program written in Perl, version v0.1
+ * groff_lilypond.man: Corresponding man-page
+
+Copyright 2013-2020 Free Software Foundation, Inc.
+
+Copying and distribution of this file, with or without modification,
+are permitted in any medium without royalty provided the copyright
+notice and this notice are preserved.
+
+Local Variables:
+coding: utf-8
+fill-column: 72
+mode: change-log
+version-control: never
+End:
+vim:set autoindent textwidth=72:
diff --git a/contrib/glilypond/README.txt b/contrib/glilypond/README.txt
new file mode 100644
index 0000000..f47e824
--- /dev/null
+++ b/contrib/glilypond/README.txt
@@ -0,0 +1,43 @@
+ Copyright (C) 2013-2020 Free Software Foundation, Inc.
+
+ Written by Bernd Warken <groff-bernd.warken-72@web.de>
+
+ Copying and distribution of this file, with or without modification,
+ are permitted in any medium without royalty provided the copyright
+ notice and this notice are preserved.
+
+ This file is part of 'glilypond', which is part of 'groff'.
+
+
+########################################################################
+
+In order to run 'glilypond', your system must have installed Perl of at
+least version 'v5.6'.
+
+
+########################################################################
+
+In order to have this program installed by 'make', the creation of a
+libdir (library directory) must be programmed in some system files.
+The following actions must be taken:
+
+1) <groff_src_dir>/m4/groff.m4:
+Add 'AC_DEFUN([GROFF_GROFFERDIR_DEFAULT])'.
+
+2) <groff_src_dir>/configure.ac:
+Add 'GROFF_GROFFERDIR_DEFAULT'.
+
+3) <groff_src_dir>/Makefile.in:
+Add several information of 'glilypond_dir'
+
+With that, the program 'autoconf' can be run in order to update the
+configure files and Makefile's.
+
+Now '$glilypond_dir' can be used as libdir.
+
+##### Editor settings
+Local Variables:
+fill-column: 72
+mode: text
+End:
+vim: set textwidth=72:
diff --git a/contrib/glilypond/examples/example.groff b/contrib/glilypond/examples/example.groff
new file mode 100644
index 0000000..856474e
--- /dev/null
+++ b/contrib/glilypond/examples/example.groff
@@ -0,0 +1,46 @@
+.\" --------------------------------------------------------------------
+.\" Legalese
+.\" --------------------------------------------------------------------
+.
+.ig
+glilypond - integrate 'lilypond' parts into 'groff' files
+
+This file was written by Bernd Warken <groff\-bernd.warken\-72@web.de>.
+.
+Copyright (C) 2013-2020 Free Software Foundation, Inc.
+
+This file is part of glilypond, which is part of GNU groff, a free
+software project.
+
+You can redistribute it and/or modify it under the terms of the GNU
+General Public License version 2 as published by the Free Software
+Foundation.
+
+The license text is available in the internet at
+.UR http://\%www.gnu.org/\%licenses/\%gpl-2.0.html
+.UE .
+..
+.
+.\" --------------------------------------------------------------------
+.\" Groff Part
+.\" --------------------------------------------------------------------
+.
+before
+.lilypond start
+\version "2.14.2"
+\relative c' {
+ \key c \minor
+ c d e f
+ g(
+ <ees c'>)
+ <d f gis b>-.
+ <ees g bes>-.
+}
+\paper {
+ oddHeaderMarkup = #f
+ evenHeaderMarkup = #f
+ oddFooterMarkup = #f
+ evenFooterMarkup = #f
+}
+.lilypond end
+after
diff --git a/contrib/glilypond/glilypond.1.man b/contrib/glilypond/glilypond.1.man
new file mode 100644
index 0000000..a81174e
--- /dev/null
+++ b/contrib/glilypond/glilypond.1.man
@@ -0,0 +1,881 @@
+.TH glilypond @MAN1EXT@ "@MDATE@" "groff @VERSION@"
+.SH Name
+glilypond \- embed LilyPond musical notation in
+.I groff
+documents
+.
+.
+.\" TODO: This page needs a thorough edit by a fluent English speaker.
+.
+.\" ====================================================================
+.\" Legal Terms
+.\" ====================================================================
+.\"
+.\" Copyright (C) 2013-2020 Free Software Foundation, Inc.
+.\"
+.\" This file is part of glilypond, which is part of GNU groff, a free
+.\" software project.
+.\"
+.\" You can redistribute it and/or modify it under the terms of the GNU
+.\" General Public License version 2 (GPL2) as published by the Free
+.\" Software Foundation.
+.\"
+.\" The license text is available in the internet at
+.\" <http://www.gnu.org/licenses/gpl-2.0.html>.
+.
+.
+.\" Save and disable compatibility mode (for, e.g., Solaris 10/11).
+.do nr *groff_glilypond_1_man_C \n[.cp]
+.cp 0
+.
+.\" Define fallback for groff 1.23's MR macro if the system lacks it.
+.nr do-fallback 0
+.if !\n(.f .nr do-fallback 1 \" mandoc
+.if \n(.g .if !d MR .nr do-fallback 1 \" older groff
+.if !\n(.g .nr do-fallback 1 \" non-groff *roff
+.if \n[do-fallback] \{\
+. de MR
+. ie \\n(.$=1 \
+. I \%\\$1
+. el \
+. IR \%\\$1 (\\$2)\\$3
+. .
+.\}
+.rr do-fallback
+.
+.
+.\" ====================================================================
+.SH Synopsis
+.\" ====================================================================
+.
+.SY glilypond
+.RB [ \-k ]
+.RB [{ \-\-ly2eps | \-\-pdf2eps }]
+.RB [ \-e
+.IR directory ]
+.RB [ \-o
+.IR output-file ]
+.RB [ \-p
+.IR filename-prefix ]
+.RB [ \-t
+.IR tdir ]
+.RB [{ \-v | \-V }]
+.RB [ \-\- ]
+.RI [ file\~ .\|.\|.]
+.
+.
+.SY glilypond
+.RB [{ \-\-ly2eps | \-\-pdf2eps }]
+.RB [ \-\-eps_dir
+.IR directory ]
+.RB [ \-\-keep_all ]
+.RB [ \-\-output
+.IR output-file ]
+.RB [ \-\-prefix
+.IR filename-prefix ]
+.RB [ \-\-temp_dir
+.IR tdir ]
+.RB [ \-\-verbose ]
+.RB [ \-\- ]
+.RI [ file\~ .\|.\|.]
+.YS
+.
+.
+.SY glilypond
+.B \-?
+.SY glilypond
+.B \-h
+.SY glilypond
+.B \-\-help
+.SY glilypond
+.B \-\-usage
+.YS
+.
+.
+.SY glilypond
+.B \-l
+.SY glilypond
+.B \-\-license
+.YS
+.
+.
+.SY glilypond
+.B \-\-version
+.YS
+.
+.
+.\" ====================================================================
+.SH Description
+.\" ====================================================================
+.
+.I glilypond
+is a
+.MR groff @MAN7EXT@
+preprocessor that enables the embedding of LilyPond music scores in
+.I groff
+documents.
+.\".
+.\".B .PDFPIC
+.\"is available, but does not yet work with lilypond.
+.
+If no operands are given,
+or if
+.I file
+is
+.RB \[lq] \- \[rq],
+.I glilypond
+reads the standard input stream.
+.
+A double-dash argument
+.RB (\[lq] \-\- \[rq])
+causes all subsequent arguments to be interpreted as
+.I file
+operands,
+even if their names start with a dash.
+.
+.
+.\" ====================================================================
+.SH Usage
+.\" ====================================================================
+.
+At present,
+.I glilypond
+works with the
+.I groff
+.BR ps ,
+.BR dvi ,
+.BR html ,
+and
+.B xhtml
+devices.
+.
+The
+.B lbp
+and
+.B lj4
+devices are untested.
+.
+Unfortunately,
+the
+.B pdf
+device does not yet work.
+.
+.
+.\" ====================================================================
+.SH "Option overview"
+.\" ====================================================================
+.
+.
+.TP
+.BR \-? | \-h | \-\-help | \-\-usage
+Display usage information and exit.
+.
+.TP
+.B \-\-version
+Display version information and exit.
+.
+.TP
+.BR \-l | \-\-license
+Display copyright license information and exit.
+.
+.
+.\" ====================================================================
+.SS "Options for building EPS files"
+.\" ====================================================================
+.
+.TP
+.B \-\-ly2eps
+Direct
+.MR lilypond 1
+to create Encapsulated PostScript (EPS) files.
+.
+This is the default.
+.
+.
+.TP
+.B \-\-pdf2eps
+The program
+.I glilypond
+generates a PDF file using
+.IR lilypond .
+.
+Then the EPS file is generated by
+.I pdf2ps
+and
+.IR ps2eps .
+.
+.
+.\" ====================================================================
+.SS "Directories and files"
+.\" ====================================================================
+.
+.TP
+.BR \-e | \-\-eps_dir "\fI directory_name\fP"
+Normally all
+.I EPS
+files are sent to the temporary directory.
+.
+With this option,
+you can generate your own directory,
+in which all useful
+.I EPS
+files are send.
+.
+So at last, the temporary directory can be removed.
+.
+.
+.TP
+.BR \-p | \-\-prefix "\fI begin_of_name\fP"
+Normally all temporary files get names that start with the
+.BI ly .\|.\|.\&
+prefix.
+.
+With this option, you can freely change this prefix.
+.
+.
+.TP
+.BR \-k | \-\-keep_all
+Normally all temporary files without the
+.I eps
+files are deleted.
+.
+With this option, all generated files either by the
+.I lilypond
+program or other format transposers are kept.
+.
+.
+.TP
+.BR \-t | \-\-temp_dir "\fI dir\fP"
+With this option, you call a directory that is the base for the
+temporary directory.
+.
+This directory name is used as is without any extensions.
+.
+If this directory does not exist it is be created.
+.
+The temporary directory is created by Perl's security operations
+directly under this directory.
+.
+In this temporary directory, the temporary files are stored.
+.
+.
+.\" ====================================================================
+.SS Output
+.\" ====================================================================
+.
+.TP
+.BR \-o | \-\-output "\fI file_name\fP"
+Normally all
+.I groff
+output of this program is sent to
+.BR STDOUT .
+.
+With this option, that can be changed, such that the output is stored
+into a file named in the option argument
+.IR file_name .
+.
+.
+.TP
+.BR \-v | \-V | \-\-verbose
+A lot more of information is sent to STDERR.
+.
+.
+.\" ====================================================================
+.SS "Short option collections"
+.\" ====================================================================
+.
+The argument handling of options
+.
+.
+.P
+.I "Short options"
+are arguments that start with a single dash
+.BR \- .
+.
+Such an argument can consist of arbitrary many options without option
+argument, composed as a collection of option characters following the
+single dash.
+.
+.
+.P
+Such a collection can be terminated by an option character that
+expects an option argument.
+.
+If this option character is not the last character of the argument,
+the following final part of the argument is the option argument.
+.
+If it is the last character of the argument, the next argument is
+taken as the option argument.
+.
+.
+.P
+This is the standard for
+.I POSIX
+and
+.I GNU
+option management.
+.
+.
+.P
+For example,
+.
+.TP
+.BI \-kVe " some_dir"
+is a collection of the short options
+.B \-k
+and
+.B \-V
+without option argument, followed by the short option
+.B \-e
+with option argument that is the following part of the argument
+.IR some_dir .
+.
+So this argument could also be written as several arguments
+.B \-k \-V \-e
+.IR some_dir .
+.
+.
+.\" ====================================================================
+.SS "Handling of long options"
+.\" ====================================================================
+.
+Arguments that start with a double dash
+.B \-\-
+are so-called
+.I "long options" R .
+.
+Each double dash argument can only have a single long option.
+.
+.
+.P
+.I "Long options"
+have or have not an option argument.
+.
+An option argument can be the next argument or can be appended with an
+equal sign
+.B =
+to the same argument as the long option.
+.
+.
+.TP
+.B \-\-help
+is a long option without an option argument.
+.
+.TP
+.BI \-\-eps_dir " some_dir"
+.TQ
+.BI \-\-eps_dir= some_dir
+is the long option
+.B \-\-eps_dir
+with the option argument
+.IR some_dir .
+.
+.
+.P
+Moreover the program allows abbreviations of long options, as much as
+possible.
+.
+.
+.P
+The
+.I "long option"
+.B \-\-keep_all
+can be abbreviated from
+.B \-\-keep_al
+up to
+.B \-\-k
+because the program does not have another
+.I "long option"
+whose name starts with the character
+.BR k .
+.
+.
+.P
+On the other hand, the option
+.B \-\-version
+cannot be abbreviated further than
+.B \-\-vers
+because there is also the
+.I long option
+.B \-\-verbose
+that can be abbreviated up to
+.BR \-\-verb .
+.
+.
+.P
+An option argument can also be appended to an abbreviation.
+.
+So is
+.BI \-\-e= some_dir
+the same as
+.B \-\-eps_dir
+.IR some_dir .
+.
+.
+.P
+Moreover the program allows an arbitrary usage of upper and lower case
+in the option name.
+.
+This is
+.I Perl
+style.
+.
+.
+.P
+For example, the
+.I "long option"
+.B \-\-keep_all
+can as well be written as
+.B \-\-Keep_All
+or even as an abbreviation like
+.BR \-\-KeE .
+.
+.
+.br
+.ne 6v
+.\" ====================================================================
+.SH "LilyPond regions in \f[I]roff\f[] input"
+.\" ====================================================================
+.
+.\" ====================================================================
+.SS "Integrated LilyPond code"
+.\" ====================================================================
+.
+A
+.I lilypond
+part within a structure written in the
+.I groff
+language is the whole part between the marks
+.RS
+.EX
+.B ".lilypond start"
+.EE
+.RE
+and
+.RS
+.EX
+.B ".lilypond end"
+.EE
+.RE
+.
+A
+.I groff
+input can have several of these
+.I lilypond
+parts.
+.
+.
+.P
+When processing such a
+.I lilypond
+part between
+.B ".lilypond start"
+and
+.B ".lilypond end"
+we say that the
+.B glilypond
+program is in
+.IR "lilypond mode" .
+.
+.
+.P
+These
+.I lilypond
+parts are sent into temporary
+.I lilypond
+files with the file name extension
+.BR .ly .
+.
+These files are transformed later on into
+.I EPS
+files.
+.
+.
+.\" ====================================================================
+.SS "Inclusion of \f[I].ly\f[] files"
+.\" ====================================================================
+.
+An additional command line for file inclusion of
+.I lilypond
+files is given by
+.EX
+.BI ".lilypond include" " file_name"
+.EE
+in
+.I groff
+input.
+.
+For each such
+.I include
+command, one file of
+.I lilypond
+code can be included into the
+.I groff
+code.
+.
+Arbitrarily many of these commands can be included in the
+.I groff
+input.
+.
+.
+.P
+These include commands can only be used outside the
+.I lilypond
+parts.
+.
+Within the
+.IR "lilypond mode" ,
+this inclusion is not possible.
+.
+So
+.B ".lilypond include"
+may not be used in
+.IR "lilypond mode" ,
+i.e.\& between
+.B ".lilypond start"
+and
+.BR ".lilypond end" .
+.
+.
+These included
+.IR ly -files
+are also transformed into
+.I EPS
+files.
+.
+.
+.\" ====================================================================
+.SH "Generated files"
+.\" ====================================================================
+.
+By the transformation process of
+.I lilypond
+parts into
+.I EPS
+files, there are many files generated.
+.
+By default, these files are regarded as temporary files and as such
+stored in a temporary directory.
+.
+.
+.P
+This process can be changed by command-line options.
+.
+.
+.\" ====================================================================
+.SS "Command-line options for directories"
+.\" ====================================================================
+.
+The temporary directory for this program is either created
+automatically or can be named by the option
+.BR \-t | \-\-temp_dir
+.IR dir .
+.
+.
+.P
+Moreover, the
+.I EPS
+files that are later on referred by
+.B .PSPIC
+command in the final
+.I groff
+output can be stored in a different directory that can be set by the
+command-line option
+.BR \-e | \-\-eps_dir
+.IR directory_name .
+.
+With this option, the temporary directory can be removed completely at
+the end of the program.
+.
+.
+.P
+The beginning of the names of the temporary files can be set by the
+command-line options
+.B \-p
+or
+.BR \-\-prefix .
+.
+.
+.P
+All of the temporary files except the
+.I EPS
+files are deleted finally.
+.
+This can be changed by setting the command-line options
+.B \-k
+or
+.BR \-\-keep_files .
+.
+With this, all temporary files and directories are kept, not deleted.
+.
+.
+.P
+These
+.I EPS
+files are stored in a temporary or
+.I EPS
+directory.
+.
+But they cannot be deleted by the transformation process because they
+are needed for the display which can take a long time.
+.
+.
+.\" ====================================================================
+.SH "Transformation processes for generating EPS files"
+.\" ====================================================================
+.
+.\" ====================================================================
+.SS "Mode pdf2eps"
+.\" ====================================================================
+.
+This mode is the actual default and can also be chosen by the option
+.BR \-\-pdf2eps .
+.
+.
+.P
+In this mode, the
+.B .ly
+files are transformed by the
+.MR lilypond 1
+program into
+.I PDF
+files, using
+.RS
+.EX
+.BI "lilypond \-\-pdf \-\-output=" file-name
+.EE
+.RE
+for each
+.B .ly
+file.
+.
+The
+.I file-name
+must be provided without the extension
+.BR .pdf .
+.
+By this process, a file
+.IB file-name .pdf
+is generated.
+.
+.
+.P
+The next step is to transform these
+.I PDF
+files into a
+.I PS
+file.
+.
+This is done by the
+.MR pdf2ps 1
+program using
+.RS
+.EX
+$\~\c
+.B pdf2ps\~\c
+.IB file-name .pdf\~\c
+.IB file-name .pds
+.EE
+.RE
+.
+.
+The next step creates an
+.I EPS
+file from the
+.I PS
+file.
+.
+This is done by the
+.MR ps2eps 1
+program using
+.RS
+.EX
+.RB "$ " "ps2eps " \fIfile-name\fP ".ps"
+.EE
+.RE
+.
+.
+.P
+By that, a file
+.IB file-name .eps
+is created for each
+.I lilypond
+part in the
+.I groff
+file or standard input.
+.
+.
+.P
+The last step to be done is replacing all
+.I lilypond
+parts by the
+.I groff
+command
+.RS
+.EX
+.BI ".PSPIC " file-name .eps
+.EE
+.RE
+.
+.
+.\" ====================================================================
+.SS "Mode ly2eps"
+.\" ====================================================================
+.
+In earlier time, this mode was the default.
+.
+But now it does not work any more, so accept the new default
+.IR pdf2eps .
+.
+For testing, this mode can also be chosen by the
+.I glilypond
+option
+.BR \-\-ly2eps .
+.
+.
+.P
+In this mode, the
+.B .ly
+files are transformed by the
+.I lilypond
+program into many files of different formats, including
+.I eps
+files, using
+.RS
+.EX
+$\~\c
+.B lilypond \-\-ps \-dbackend=eps \-dgs\-load\-fonts \-\-output=\c
+.I file-name
+.EE
+.RE
+for each
+.B .ly
+file.
+.
+The output
+.I file\-name
+must be provided without an extension, its directory is temporary.
+.
+.
+.P
+There are many
+.I EPS
+files created.
+.
+One having the complete transformed
+.B ly
+file, named
+.IB file\-name .eps \fR.\fP
+.
+.
+.P
+Moreover there are
+.I EPS
+files for each page, named
+.IB file\-name \- digit .eps \fR.\fP
+.
+.
+.P
+The last step to be done is replacing all
+.I lilypond
+parts by the collection of the corresponding
+.I EPS
+page files.
+.
+This is done by
+.I groff
+commands
+.EX
+.BI ".PSPIC " file-name \- digit .eps
+.EE
+.
+.
+.\" ====================================================================
+.SH "Generated \f[I]groff\f[] output"
+.\" ====================================================================
+.
+The new
+.MR groff @MAN7EXT@
+structure generated by
+.I glilypond
+is either
+.
+.TP
+1)
+sent to standard output and can there be saved into a file or piped into
+.MR groff @MAN1EXT@
+or
+.
+.TP
+2)
+stored into a file by given the option
+.BR \-o\ \~| \~\-\-output
+.I file_name
+.
+.
+.\" ====================================================================
+.SH Authors
+.\" ====================================================================
+.
+.I glilypond
+was written by
+.MT groff\-bernd\:.warken\-72@\:web\:.de
+Bernd Warken
+.ME .
+.
+.
+.\" ====================================================================
+.SH "See also"
+.\" ====================================================================
+.
+.TP
+.MR groff @MAN1EXT@
+describes the usage of the
+.I groff
+command and contains pointers to further documentation of the
+.I groff
+system.
+.
+.
+.TP
+.MR groff_tmac @MAN5EXT@
+describes the
+.B .PSPIC
+request.
+.
+.
+.TP
+.MR lilypond 1
+briefly describes the
+.I lilypond
+command and contains pointers to further documentation.
+.
+.
+.TP
+.MR pdf2ps 1
+transforms a
+.I PDF
+file into a
+.I PostScript
+format.
+.
+.
+.TP
+.MR ps2eps 1
+transforms a
+.I PS
+file into an
+.I EPS
+format.
+.
+.
+.\" Restore compatibility mode (for, e.g., Solaris 10/11).
+.cp \n[*groff_glilypond_1_man_C]
+.do rr *groff_glilypond_1_man_C
+.
+.
+.\" Local Variables:
+.\" fill-column: 72
+.\" mode: nroff
+.\" End:
+.\" vim: set filetype=groff textwidth=72:
diff --git a/contrib/glilypond/glilypond.am b/contrib/glilypond/glilypond.am
new file mode 100644
index 0000000..d18049f
--- /dev/null
+++ b/contrib/glilypond/glilypond.am
@@ -0,0 +1,64 @@
+# Automake rules for 'glilypond'
+
+# Copyright (C) 2013-2020 Free Software Foundation, Inc.
+# Written by Werner Lemberg <wl@gnu.org> and
+# Bernd Warken <groff-bernd.warken-72@web.de>.
+# Automake migration by Bertrand Garrigues
+
+# This file is part of 'glilypond' which is part of 'groff'.
+
+# 'groff' is free software; 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.
+
+# 'groff' is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+########################################################################
+glilypond_srcdir = $(top_srcdir)/contrib/glilypond
+bin_SCRIPTS += glilypond
+man1_MANS += contrib/glilypond/glilypond.1
+
+# files going to lib directory '$(glilypond_dir)'
+# TODO glilypond_dir is subsitued by configure.ac, check if this could be removed
+glilyponddir = $(glilypond_dir)
+
+EXTRA_DIST += \
+ contrib/glilypond/ChangeLog \
+ contrib/glilypond/ChangeLog.0x \
+ contrib/glilypond/glilypond.1.man \
+ contrib/glilypond/glilypond.pl \
+ contrib/glilypond/README.txt \
+ contrib/glilypond/examples/example.groff
+
+
+# create perl executable 'glilypond', being stored into 'bindir'
+glilypond: $(glilypond_srcdir)/glilypond.pl $(SH_DEPS_SED_SCRIPT)
+ $(AM_V_GEN)$(RM) $@ \
+ && sed -f "$(SH_DEPS_SED_SCRIPT)" \
+ -e "s|[@]g[@]|$(g)|g" \
+ -e "s|[@]BINDIR[@]|$(DESTDIR)$(bindir)|g" \
+ -e "s|[@]glilypond_dir[@]|$(DESTDIR)$(glilypond_dir)|g" \
+ -e "s|[@]VERSION[@]|$(VERSION)|g" \
+ $(glilypond_srcdir)/glilypond.pl \
+ >$@ \
+ && chmod +x $@
+
+uninstall_groffdirs: uninstall-glilypond-hook
+uninstall-glilypond-hook:
+ if test -d $(DESTDIR)$(glilyponddir); then \
+ rmdir $(DESTDIR)$(glilyponddir); \
+ fi
+
+
+# Local Variables:
+# mode: makefile-automake
+# fill-column: 72
+# End:
+# vim: set autoindent filetype=automake textwidth=72:
diff --git a/contrib/glilypond/glilypond.pl b/contrib/glilypond/glilypond.pl
new file mode 100755
index 0000000..e97ed24
--- /dev/null
+++ b/contrib/glilypond/glilypond.pl
@@ -0,0 +1,1907 @@
+#! /usr/bin/env perl
+
+package main;
+
+########################################################################
+# debugging
+########################################################################
+
+# See 'Mastering Perl', chapter 4.
+
+# use strict;
+# use warnings;
+# use diagnostics;
+
+use Carp;
+$SIG{__DIE__} = sub { &Carp::croak; };
+
+use Data::Dumper;
+
+########################################################################
+# Legalese
+########################################################################
+
+our $Legalese;
+
+{
+ use constant VERSION => '1.3.2'; # version of glilypond
+
+### This constant 'LICENSE' is the license for this file 'GPL' >= 3
+ use constant LICENSE => q*
+glilypond - integrate 'lilypond' into 'groff' files
+
+Copyright (C) 2013-2020 Free Software Foundation, Inc.
+ Written by Bernd Warken <groff-bernd.warken-72@web.de>
+
+This file is part of 'GNU groff'.
+
+ 'GNU groff' is free software: 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.
+
+ 'GNU groff' is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 'GNU
+General Public License' for more details.
+
+ 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' source package. If not, see
+<http://www.gnu.org/licenses/>.
+*;
+
+
+ $Legalese =
+ {
+ 'version' => VERSION,
+ 'license' => LICENSE,
+ }
+
+}
+
+##### end legalese
+
+
+########################################################################
+# global variables and BEGIN
+########################################################################
+
+use integer;
+use utf8;
+
+use Cwd qw[];
+use File::Basename qw[];
+use File::Copy qw[];
+use File::HomeDir qw[];
+use File::Spec qw[];
+use File::Path qw[];
+use File::Temp qw[];
+use FindBin qw[];
+use POSIX qw[];
+
+
+BEGIN {
+
+ use constant FALSE => 0;
+ use constant TRUE => 1;
+ use constant EMPTYSTRING => '';
+ use constant EMPTYARRAY => ();
+ use constant EMPTYHASH => ();
+
+ our $Globals =
+ {
+ 'before_make' => FALSE,
+ 'groff_version' => EMPTYSTRING,
+ 'prog' => EMPTYSTRING,
+ };
+
+ {
+ ( my $volume, my $directory, $Globals->{'prog'} ) =
+ File::Spec->splitpath($0);
+ # $Globals->{'prog'} is 'glilypond' when installed,
+ # 'glilypond.pl' when not
+ }
+
+
+ $\ = "\n"; # adds newline at each print
+ $/ = "\n"; # newline separates input
+ $| = 1; # flush after each print or write command
+
+
+ {
+ {
+ # script before run of 'make'
+ my $at = '@';
+ $Globals->{'before_make'} = TRUE if '@VERSION@' eq "${at}VERSION${at}";
+ }
+
+ my $file_test_pl;
+ my $glilypond_libdir;
+
+ if ( $Globals->{'before_make'} ) { # in source, not yet installed
+ my $glilypond_dir = $FindBin::Bin;
+ $glilypond_dir = Cwd::realpath($glilypond_dir);
+ $glilypond_libdir = $glilypond_dir;
+
+ } else { # already installed
+ $Globals->{'groff_version'} = '@VERSION@';
+ $glilypond_libdir = '@glilypond_dir@';
+ }
+
+ unshift(@INC, $glilypond_libdir);
+
+ umask 0077; # octal output: 'printf "%03o", umask;'
+ }
+
+ use integer;
+ use utf8;
+ use feature 'state';
+
+ my $P_PIC;
+ # $P_PIC = '.PDFPIC';
+ $P_PIC = '.PSPIC';
+
+ ######################################################################
+ # subs for using several times
+ ######################################################################
+
+ sub create_ly2eps { # '--ly2eps' default
+ our ( $out, $Read, $Temp );
+
+ my $prefix = $Read->{'file_numbered'}; # w/ dir change to temp dir
+
+ # '$ lilypond --ps -dbackend=eps -dgs-load-fonts \
+ # output=file_without_extension file.ly'
+ # extensions are added automatically
+ my $opts = '--ps -dbackend=eps -dinclude-eps-fonts -dgs-load-fonts'
+ . " --output=$prefix $prefix";
+ &run_lilypond("$opts");
+
+ Cwd::chdir $Temp->{'cwd'} or
+ die "Could not change to former directory '" .
+ $Temp->{'cwd'} . "': $!";
+
+ my $eps_dir = $Temp->{'eps_dir'};
+ my $dir = $Temp->{'temp_dir'};
+ opendir( my $dh, $dir ) or
+ die "could not open temporary directory '$dir': $!";
+
+ my $re = qr<
+ ^
+ $prefix
+ -
+ .*
+ \.eps
+ $
+ >x;
+ my $file;
+ while ( readdir( $dh ) ) {
+ chomp;
+ $file = $_;
+ if ( /$re/ ) {
+ my $file_path = File::Spec->catfile($dir, $file);
+ if ( $eps_dir ) {
+ my $could_copy = FALSE;
+ File::Copy::copy($file_path, $eps_dir)
+ and $could_copy = TRUE;
+ if ( $could_copy ) {
+ unlink $file_path;
+ $file_path = File::Spec->catfile($eps_dir, $_);
+ }
+ }
+ $out->print( $P_PIC . ' ' . $file_path );
+ }
+ } # end while readdir
+ closedir( $dh );
+ } # end sub create_ly2eps()
+
+
+ sub create_pdf2eps { # '--pdf2eps'
+ our ( $v, $stdout, $stderr, $out, $Read, $Temp );
+
+ my $prefix = $Read->{'file_numbered'}; # w/ dir change to temp dir
+
+ &run_lilypond("--pdf --output=$prefix $prefix");
+
+ my $file_pdf = $prefix . '.pdf';
+ my $file_ps = $prefix . '.ps';
+
+ # pdf2ps in temp dir
+ my $temp_file = &next_temp_file;
+ $v->print( "\n##### run of 'pdf2ps'" );
+ # '$ pdf2ps file.pdf file.ps'
+ my $output = `pdf2ps $file_pdf $file_ps 2> $temp_file`;
+ die 'Program pdf2ps does not work.' if ( $? );
+ &shell_handling($output, $temp_file);
+ $v->print( "##### end run of 'pdf2ps'\n" );
+
+ # ps2eps in temp dir
+ $temp_file = &next_temp_file;
+ $v->print( "\n##### run of 'ps2eps'" );
+ # '$ ps2eps file.ps'
+ $output = `ps2eps $file_ps 2> $temp_file`;
+ die 'Program ps2eps does not work.' if ( $? );
+ &shell_handling($output, $temp_file);
+ $v->print( "##### end run of 'ps2eps'\n" );
+
+ # change back to former dir
+ Cwd::chdir $Temp->{'cwd'} or
+ die "Could not change to former directory '" .
+ $Temp->{'cwd'} . "': $!";
+
+ # handling of .eps file
+ my $file_eps = $prefix . '.eps';
+ my $eps_path = File::Spec->catfile($Temp->{'temp_dir'}, $file_eps);
+ if ( $Temp->{'eps_dir'} ) {
+ my $has_copied = FALSE;
+ File::Copy::copy( $eps_path, $Temp->{'eps_dir'} )
+ and $has_copied = TRUE;
+ if ( $has_copied ) {
+ unlink $eps_path;
+ $eps_path = File::Spec->catfile( $Temp->{'eps_dir'}, $file_eps );
+ } else {
+ $stderr->print( "Could not use EPS-directory." );
+ } # end Temp->{'eps_dir'}
+ }
+ # print into groff output
+ $out->print( $P_PIC . ' ' . $eps_path );
+ } # end sub create_pdf2eps()
+
+
+ sub is_subdir { # arg1 is subdir of arg2 (is longer)
+ my ( $dir1, $dir2 ) = @_;
+ $dir1 = &path2abs( $dir1 );;
+ $dir2 = &path2abs( $dir2 );;
+ my @split1 = File::Spec->splitdir($dir1);
+ my @split2 = File::Spec->splitdir($dir2);
+ for ( @split2 ) {
+ next if ( $_ eq shift @split1 );
+ return FALSE;
+ }
+ return TRUE;
+ }
+
+
+ sub license {
+ our ( $Legalese, $stdout );
+ &version;
+ $stdout->print( $Legalese->{'license'} );
+ } # end sub license()
+
+
+ sub make_dir { # make directory or check if it exists
+ our ( $v, $Args );
+
+ my $dir_arg = shift;
+ chomp $dir_arg;
+ $dir_arg =~ s/^\s*(.*)\s*$/$1/;
+
+ unless ( $dir_arg ) {
+ $v->print( "make_dir(): empty argument" );
+ return FALSE;
+ }
+
+ unless ( File::Spec->file_name_is_absolute($dir_arg) ) {
+ my $res = Cwd::realpath($dir_arg);
+ $res = File::Spec->canonpath($dir_arg) unless ( $res );
+ $dir_arg = $res if ( $res );
+ }
+
+ return $dir_arg if ( -d $dir_arg && -w $dir_arg );
+
+
+ # search thru the dir parts
+ my @dir_parts = File::Spec->splitdir($dir_arg);
+ my @dir_grow;
+ my $dir_grow;
+ my $can_create = FALSE; # dir could be created if TRUE
+
+ DIRPARTS: for ( @dir_parts ) {
+ push @dir_grow, $_;
+ next DIRPARTS unless ( $_ ); # empty string for root directory
+
+ # from array to path dir string
+ $dir_grow = File::Spec->catdir(@dir_grow);
+
+ next DIRPARTS if ( -d $dir_grow );
+
+ if ( -e $dir_grow ) { # exists, but not a dir, so must be removed
+ die "Couldn't create dir '$dir_arg', it is blocked by "
+ . "'$dir_grow'." unless ( -w $dir_grow );
+
+ # now it's writable, but not a dir, so it can be removed
+ unlink ( $dir_grow ) or
+ die "Couldn't remove '$dir_grow', " .
+ "so I cannot create dir '$dir_arg': $!";
+ }
+
+ # $dir_grow no longer exists, so the former dir must be writable
+ # in order to create the directory
+ pop @dir_grow;
+ $dir_grow = File::Spec->catdir(@dir_grow);
+
+ die "'$dir_grow' is not writable, " .
+ "so directory '$dir_arg' can't be created."
+ unless ( -w $dir_grow );
+
+ # former directory is writable, so '$dir_arg' can be created
+
+ File::Path::make_path( $dir_arg,
+ {
+ mask => oct('0700'),
+ verbose => $Args->{'verbose'},
+ }
+ ) # 'mkdir -P'
+ or die "Could not create directory '$dir_arg': $!";
+
+ last DIRPARTS;
+ }
+
+ die "'$dir_arg' is not a writable directory"
+ unless ( -d $dir_arg && -w $dir_arg );
+
+ return $dir_arg;
+
+ } # end sub make_dir()
+
+
+ my $number = 0;
+ sub next_temp_file {
+ our ( $Temp, $v, $Args );
+ ++$number;
+ my $temp_basename = $Args->{'prefix'} . '_temp_' . $number;
+ my $temp_file = File::Spec->catfile( $Temp->{'temp_dir'} ,
+ $temp_basename );
+ $v->print( "next temporary file: '$temp_file'" );
+ return $temp_file;
+ } # end sub next_temp_file()
+
+
+ sub path2abs {
+ our ( $Temp, $Args );
+
+ my $path = shift;
+ $path =~ s/
+ ^
+ \s*
+ (
+ .*
+ )
+ \s*
+ $
+ /$1/x;
+
+ die "path2abs(): argument is empty." unless ( $path );
+
+ # Perl does not support shell '~' for home dir
+ if ( $path =~ /
+ ^
+ ~
+ /x ) {
+ if ( $path eq '~' ) { # only own home
+ $path = File::HomeDir->my_home;
+ } elsif ( $path =~ m<
+ ^
+ ~ /
+ (
+ .*
+ )
+ $
+ >x ) { # subdir of own home
+ $path = File::Spec->catdir( $Temp->{'cwd'}, $1 );
+ } elsif ( $path =~ m<
+ ^
+ ~
+ (
+ [^/]+
+ )
+ $
+ >x ) { # home of other user
+ $path = File::HomeDir->users_home($1);
+ } elsif ( $path =~ m<
+ ^
+ ~
+ (
+ [^/]+
+ )
+ /+
+ (
+ .*
+ )
+ $
+ >x ) { # subdir of other home
+ $path = File::Spec->
+ catdir( File::HomeDir->users_home($1), $2 );
+ }
+ }
+
+ $path = File::Spec->rel2abs($path);
+
+ # now $path is absolute
+ return $path;
+ } # end sub path2abs()
+
+
+ sub run_lilypond {
+ # arg is the options collection for 'lilypond' to run
+ # either from ly or pdf
+
+ our ( $Temp, $v );
+
+ my $opts = shift;
+ chomp $opts;
+
+ my $temp_file = &next_temp_file;
+ my $output = EMPTYSTRING;
+
+ # change to temp dir
+ Cwd::chdir $Temp->{'temp_dir'} or
+ die "Could not change to temporary directory '" .
+ $Temp->{'temp_dir'} . "': $!";
+
+ $v->print( "\n##### run of 'lilypond " . $opts . "'" );
+ $output = `lilypond $opts 2>$temp_file`;
+ die "Program lilypond does not work, see '$temp_file': $?"
+ if ( $? );
+ chomp $output;
+ &shell_handling($output, $temp_file);
+ $v->print( "##### end run of 'lilypond'\n" );
+
+ # stay in temp dir
+ } # end sub run_lilypond()
+
+
+ sub shell_handling {
+ # Handle ``-shell-command output in a string (arg1).
+ # stderr goes to temporary file $TempFile.
+
+ our ( $out, $v, $Args );
+
+ my $out_string = shift;
+ my $temp_file = shift;
+
+ my $a = &string2array($out_string); # array ref
+ for ( @$a ) {
+ $out->print( $_ );
+ }
+
+ $temp_file && -f $temp_file && -r $temp_file ||
+ die "shell_handling(): $temp_file is not a readable file.";
+ my $temp = new FH_READ_FILE($temp_file);
+ my $res = $temp->read_all();
+ for ( @$res ) {
+ chomp;
+ $v->print($_);
+ }
+
+ unlink $temp_file unless ( $Args->{'keep_all'} );
+ } # end sub shell_handling()
+
+
+ sub string2array {
+ my $s = shift;
+ my @a = ();
+ for ( split "\n", $s ) {
+ chomp;
+ push @a, $_;
+ }
+ return \@a;
+ } # end string2array()
+
+
+ sub usage { # for '--help'
+ our ( $Globals, $Args );
+
+ my $p = $Globals->{'prog'};
+ my $usage = EMPTYSTRING;
+ $usage = '###### usage:' . "\n" if ( $Args->{'verbose'} );
+ $usage .= qq*Options for $p:
+Read a 'roff' file or standard input and transform 'lilypond' parts
+(everything between '.lilypond start' and '.lilypond end') into
+'EPS'-files that can be read by groff using '.PSPIC'.
+
+There is also a command '.lilypond include <file_name>' that can
+include a complete 'lilypond' file into the 'groff' document.
+
+
+# Breaking options:
+$p -?|-h|--help|--usage # usage
+$p --version # version information
+$p --license # the license is GPL >= 3
+
+
+# Normal options:
+$p [options] [--] [filename ...]
+
+There are 2 options for influencing the way how the 'EPS' files for the
+'roff' display are generated:
+--ly2eps 'lilypond' generates 'EPS' files directly (default)
+--pdf2eps 'lilypond' generates a 'PDF' file that is transformed
+
+-k|--keep_all do not delete any temporary files
+-v|--verbose print much information to STDERR
+
+Options with an argument:
+-e|--eps_dir=... use a directory for the EPS files
+-o|--output=... sent output in the groff language into file ...
+-p|--prefix=... start for the names of temporary files
+-t|--temp_dir=... provide the directory for temporary files.
+
+The directories set are created when they do not exist.
+*;
+
+ # old options:
+ # --keep_files -k: do not delete any temporary files
+ # --file_prefix=... -p: start for the names of temporary files
+
+ $main::stdout->print( $usage );
+ } # end sub usage()
+
+
+ sub version { # for '--version'
+ our ( $Globals, $Legalese, $stdout, $Args );
+ my $groff_version = '';
+ if ( $Globals->{'groff_version'} ) {
+ $groff_version = "(groff $Globals->{'groff_version'}) ";
+ }
+
+ my $output = EMPTYSTRING;
+ $output = "$Globals->{'prog'} ${groff_version}version "
+ . $Legalese->{'version'};
+
+ $stdout->print($output);
+ } # end sub version()
+}
+
+#die "test: ";
+########################################################################
+# OOP declarations for some file handles
+########################################################################
+
+use integer;
+
+########################################################################
+# OOP for writing file handles that are open by default, like STD*
+########################################################################
+
+# -------------------------- _FH_WRITE_OPENED --------------------------
+
+{ # FH_OPENED: base class for all opened file handles, like $TD*
+
+ package _FH_WRITE_OPENED;
+ use strict;
+
+ sub new {
+ my ( $pkg, $std ) = @_;
+ bless {
+ 'fh' => $std,
+ }
+ }
+
+ sub open {
+ }
+
+ sub close {
+ }
+
+ sub print {
+ my $self = shift;
+ for ( @_ ) {
+ print { $self->{'fh'} } $_;
+ }
+ }
+
+}
+
+
+# ------------------------------ FH_STDOUT ----------------------------
+
+{ # FH_STDOUT: print to normal output STDOUT
+
+ package FH_STDOUT;
+ use strict;
+ @FH_STDOUT::ISA = qw( _FH_WRITE_OPENED );
+
+ sub new {
+ &_FH_WRITE_OPENED::new( '_FH_WRITE_OPENED', *STDOUT );
+ }
+
+} # end FH_STDOUT
+
+
+# ------------------------------ FH_STDERR -----------------------------
+
+{ # FH_STDERR: print to STDERR
+
+ package FH_STDERR;
+ use strict;
+ @FH_STDERR::ISA = qw( _FH_WRITE_OPENED );
+
+ sub new {
+ &_FH_WRITE_OPENED::new( 'FH_OPENED', *STDERR );
+ }
+
+} # end FH_STDERR
+
+
+########################################################################
+# OOP for file handles that write into a file or string
+########################################################################
+
+# ------------------------------- FH_FILE ------------------------------
+
+{ # FH_FILE: base class for writing into a file or string
+
+ package FH_FILE;
+ use strict;
+
+ sub new {
+ my ( $pkg, $file ) = @_;
+ bless {
+ 'fh' => undef,
+ 'file' => $file,
+ 'opened' => main::FALSE,
+ }
+ }
+
+ sub DESTROY {
+ my $self = shift;
+ $self->close();
+ }
+
+ sub open {
+ my $self = shift;
+ my $file = $self->{'file'};
+ if ( $file && -e $file ) {
+ die "file $file is not writable" unless ( -w $file );
+ die "$file is a directory" if ( -d $file );
+ }
+ open $self->{'fh'}, ">", $self->{'file'}
+ or die "could not open file '$file' for writing: $!";
+ $self->{'opened'} = main::TRUE;
+ }
+
+ sub close {
+ my $self = shift;
+ close $self->{'fh'} if ( $self->{'opened'} );
+ $self->{'opened'} = main::FALSE;
+ }
+
+ sub print {
+ my $self = shift;
+ $self->open() unless ( $self->{'opened'} );
+ for ( @_ ) {
+ print { $self->{'fh'} } $_;
+ }
+ }
+
+} # end FH_FILE
+
+
+# ------------------------------ FH_STRING -----------------------------
+
+{ # FH_STRING: write into a string
+
+ package FH_STRING; # write to \string
+ use strict;
+ @FH_STRING::ISA = qw( FH_FILE );
+
+ sub new {
+ my $pkg = shift; # string is a reference to scalar
+ bless
+ {
+ 'fh' => undef,
+ 'string' => '',
+ 'opened' => main::FALSE,
+ }
+ }
+
+ sub open {
+ my $self = shift;
+ open $self->{'fh'}, ">", \ $self->{'string'}
+ or die "could not open string for writing: $!";
+ $self->{'opened'} = main::TRUE;
+ }
+
+ sub get { # get string, move to array ref, close, and return array ref
+ my $self = shift;
+ return '' unless ( $self->{'opened'} );
+ my $a = &string2array( $self->{'string'} );
+ $self->close();
+ return $a;
+ }
+
+} # end FH_STRING
+
+
+# -------------------------------- FH_NULL -----------------------------
+
+{ # FH_NULL: write to null device
+
+ package FH_NULL;
+ use strict;
+ @FH_NULL::ISA = qw( FH_FILE FH_STRING );
+
+ use File::Spec;
+
+ my $devnull = File::Spec->devnull();
+ $devnull = '' unless ( -e $devnull && -w $devnull );
+
+ sub new {
+ my $pkg = shift;
+ if ( $devnull ) {
+ &FH_FILE::new( $pkg, $devnull );
+ } else {
+ &FH_STRING::new( $pkg );
+ }
+ } # end new()
+
+} # end FH_NULL
+
+
+########################################################################
+# OOP for reading file handles
+########################################################################
+
+# ---------------------------- FH_READ_FILE ----------------------------
+
+{ # FH_READ_FILE: read a file
+
+ package FH_READ_FILE;
+ use strict;
+
+ sub new {
+ my ( $pkg, $file ) = @_;
+ die "File '$file' cannot be read." unless ( -f $file && -r $file );
+ bless {
+ 'fh' => undef,
+ 'file' => $file,
+ 'opened' => main::FALSE,
+ }
+ }
+
+ sub DESTROY {
+ my $self = shift;
+ $self->close();
+ }
+
+ sub open {
+ my $self = shift;
+ my $file = $self->{'file'};
+ if ( $file && -e $file ) {
+ die "file $file is not writable" unless ( -r $file );
+ die "$file is a directory" if ( -d $file );
+ }
+ open $self->{'fh'}, "<", $self->{'file'}
+ or die "could not read file '$file': $!";
+ $self->{'opened'} = main::TRUE;
+ }
+
+ sub close {
+ my $self = shift;
+ close $self->{'fh'} if ( $self->{'opened'} );
+ $self->{'opened'} = main::FALSE;
+ }
+
+ sub read_line {
+ # Read 1 line of the file into a chomped string.
+ # Do not close the read handle at the end.
+ my $self = shift;
+ $self->open() unless ( $self->{'opened'} );
+
+ my $res;
+ if ( defined($res = CORE::readline($self->{'fh'}) ) ) {
+ chomp $res;
+ return $res;
+ } else {
+ $self->close();
+ return undef;
+ }
+ }
+
+ sub read_all {
+ # Read the complete file into an array reference.
+ # Close the read handle at the end.
+ # Return array reference.
+ my $self = shift;
+ $self->open() unless ( $self->{'opened'} );
+
+ my $res = [];
+ my $line;
+ while ( defined ( $line = CORE::readline $self->{'fh'} ) ) {
+ chomp $line;
+ push @$res, $line;
+ }
+ $self->close();
+ $self->{'opened'} = main::FALSE;
+ return $res;
+ }
+
+}
+
+# end of OOP definitions
+
+
+our $stdout = new FH_STDOUT();
+our $stderr = new FH_STDERR();
+
+# verbose printing, not clear whether this will be set by '--verbose',
+# so store this now into a string, which can be gotten later on, when
+# it will become either STDERR or /dev/null
+our $v = new FH_STRING();
+
+# for standard output, either STDOUT or output file
+our $out;
+
+# end of FH
+
+
+########################################################################
+# Args: command-line arguments
+########################################################################
+
+# command-line arguments are handled in 2 runs:
+# 1) split short option collections, '=' optargs, and transfer abbrevs
+# 2) handle the transferred options with subs
+
+our $Args =
+ {
+ 'eps_dir' => EMPTYSTRING, # can be overwritten by '--eps_dir'
+
+ # 'eps-func' has 2 possible values:
+ # 1) 'pdf' '--pdf2eps' (default)
+ # 2) 'ly' from '--ly2eps'
+ 'eps_func' => 'pdf',
+
+ # files names of temporary files start with this string,
+ # can be overwritten by '--prefix'
+ 'prefix' => 'ly',
+
+ # delete or do not delete temporary files
+ 'keep_all' => FALSE,
+
+ # the roff output goes normally to STDOUT, can be a file with '--output'
+ 'output' => EMPTYSTRING,
+
+ # temporary directory, can be overwritten by '--temp_dir',
+ # empty for default of the program
+ 'temp_dir' => EMPTYSTRING,
+
+ # regulates verbose output (on STDERR), overwritten by '--verbose'
+ 'verbose' => FALSE,
+ };
+
+{ # 'Args'
+ use integer;
+
+ our ( $Globals, $Args, $stderr, $v, $out );
+
+ # ----------
+ # subs for second run, for remaining long options after splitting and
+ # transfer
+ # ----------
+
+ my %opts_with_arg =
+ (
+
+ '--eps_dir' => sub {
+ $Args->{'eps_dir'} = shift;
+ },
+
+ '--output' => sub {
+ $Args->{'output'} = shift;
+ },
+
+ '--prefix' => sub {
+ $Args->{'prefix'} = shift;
+ },
+
+ '--temp_dir' => sub {
+ $Args->{'temp_dir'} = shift;
+ },
+
+ ); # end of %opts_with_arg
+
+
+ my %opts_noarg =
+ (
+
+ '--help' => sub {
+ &usage;
+ exit;
+ },
+
+ '--keep_all' => sub {
+ $Args->{'keep_all'} = TRUE;
+ },
+
+ '--license' => sub {
+ &license;
+ exit;
+ },
+
+ '--ly2eps' => sub {
+ $Args->{'eps_func'} = 'ly';
+ },
+
+ '--pdf2eps' => sub {
+ $Args->{'eps_func'} = 'pdf';
+ },
+
+ '--verbose' => sub {
+ $Args->{'verbose'} = TRUE;
+ },
+
+ '--version' => sub {
+ &version;
+ exit;
+ },
+
+ ); # end of %opts_noarg
+
+
+ # used variables in both runs
+
+ my @files = EMPTYARRAY;
+
+
+ #----------
+ # first run for command-line arguments
+ #----------
+
+ # global variables for first run
+
+ my @splitted_args;
+ my $double_minus = FALSE;
+ my $arg = EMPTYSTRING;
+ my $has_arg = FALSE;
+
+
+ # Split short option collections and transfer these to suitable long
+ # options from above. Note that '-v' now means '--verbose' in version
+ # 'v1.1', earlier versions had '--version' for '-v'.
+
+ my %short_opts =
+ (
+ '?' => '--help',
+ 'e' => '--eps_dir',
+ 'h' => '--help',
+ 'l' => '--license',
+ 'k' => '--keep_all',
+ 'o' => '--output',
+ 'p' => '--prefix',
+ 't' => '--temp_dir',
+ 'v' => '--verbose',
+ 'V' => '--verbose',
+ );
+
+
+ # transfer long option abbreviations to the long options from above
+
+ my @long_opts;
+
+ $long_opts[3] =
+ { # option abbreviations of 3 characters
+ '--e' => '--eps_dir',
+ '--f' => '--prefix', # --f for --file_prefix
+ '--h' => '--help',
+ '--k' => '--keep_all', # and --keep_files
+ '--o' => '--output',
+ '--p' => '--prefix', # and --file_prefix
+ '--t' => '--temp_dir',
+ '--u' => '--help', # '--usage' is mapped to '--help'
+ };
+
+ $long_opts[4] =
+ { # option abbreviations of 4 characters
+ '--li' => '--license',
+ '--ly' => '--ly2eps',
+ '--pd' => '--pdf2eps',
+ '--pr' => '--prefix',
+ };
+
+ $long_opts[6] =
+ { # option abbreviations of 6 characters
+ '--verb' => '--verbose',
+ '--vers' => '--version',
+ };
+
+
+ # subs for short splitting and replacing long abbreviations
+
+ my $split_short = sub {
+
+ my @chars = split //, $1; # omit leading dash
+
+ # if result is TRUE: run 'next SPLIT' afterwards
+
+ CHARS: while ( @chars ) {
+ my $c = shift @chars;
+
+ unless ( exists $short_opts{$c} ) {
+ $stderr->print( "Unknown short option '-$c'." );
+ next CHARS;
+ }
+
+ # short option exists
+
+ # map or transfer to special long option from above
+ my $transopt = $short_opts{$c};
+
+ if ( exists $opts_noarg{$transopt} ) {
+ push @splitted_args, $transopt;
+ $Args->{'verbose'} = TRUE if ( $transopt eq '--verbose' );
+ next CHARS;
+ }
+
+ if ( exists $opts_with_arg{$transopt} ) {
+ push @splitted_args, $transopt;
+
+ if ( @chars ) {
+ # if @chars is not empty, option $transopt has argument
+ # in this arg, the rest of characters in @chars
+ push @splitted_args, join "", @chars;
+ @chars = EMPTYARRAY;
+ return TRUE; # use 'next SPLIT' afterwards
+ }
+
+ # optarg is the next argument
+ $has_arg = $transopt;
+ return TRUE; # use 'next SPLIT' afterwards
+ } # end of if %opts_with_arg
+ } # end of while CHARS
+ return FALSE; # do not do anything
+ }; # end of sub for short_opt_collection
+
+
+ my $split_long = sub {
+ my $from_arg = shift;
+ $from_arg =~ /^([^=]+)/;
+ my $opt_part = lc($1);
+ my $optarg = undef;
+ if ( $from_arg =~ /=(.*)$/ ) {
+ $optarg = $1;
+ }
+
+ N: for my $n ( qw/6 4 3/ ) {
+ $opt_part =~ / # match $n characters
+ ^
+ (
+ .{$n}
+ )
+ /x;
+ my $argn = $1; # get the first $n characters
+
+ # no match, so luck for fewer number of chars
+ next N unless ( $argn );
+
+ next N unless ( exists $long_opts[$n]->{$argn} );
+ # not in $n hash, so go on to next loop for $n
+
+ # now $n-hash has arg
+
+ # map or transfer to special long opt from above
+ my $transopt = $long_opts[$n]->{$argn};
+
+ # test on option without arg
+ if ( exists $opts_noarg{$transopt} ) { # opt has no arg
+ $stderr->print( 'Option ' . $transopt . 'has no argument: ' .
+ $from_arg . '.' ) if ( defined($optarg) );
+ push @splitted_args, $transopt;
+ $Args->{'verbose'} = TRUE if ( $transopt eq '--verbose' );
+ return TRUE; # use 'next SPLIT' afterwards
+ } # end of if %opts_noarg
+
+ # test on option with arg
+ if ( exists $opts_with_arg{$transopt} ) { # opt has arg
+ push @splitted_args, $transopt;
+
+ # test on optarg in arg
+ if ( defined($optarg) ) {
+ push @splitted_args, $1;
+ return TRUE; # use 'next SPLIT' afterwards
+ } # end of if optarg in arg
+
+ # has optarg in next arg
+ $has_arg = $transopt;
+ return TRUE; # use 'next SPLIT' afterwards
+ } # end of if %opts_with_arg
+
+ # not with and without option, so is not permitted
+ $stderr->print( "'" . $transopt .
+ "' is unknown long option from '" . $from_arg . "'" );
+ return TRUE; # use 'next SPLIT' afterwards
+ } # end of for N
+ return FALSE; # do nothing
+ }; # end of split_long()
+
+
+ #----------
+ # do split and transfer arguments
+ #----------
+ sub run_first {
+
+ SPLIT: foreach (@ARGV) {
+ # Transform long and short options into some given long options.
+ # Split long opts with arg into 2 args (no '=').
+ # Transform short option collections into given long options.
+ chomp;
+
+ if ( $has_arg ) {
+ push @splitted_args, $_;
+ $has_arg = EMPTYSTRING;
+ next SPLIT;
+ }
+
+ if ( $double_minus ) {
+ push @files, $_;
+ next SPLIT;
+ }
+
+ if ( $_ eq '-' ) { # file arg '-'
+ push @files, $_;
+ next SPLIT;
+ }
+
+ if ( $_ eq '--' ) { # POSIX arg '--'
+ push @splitted_args, $_;
+ $double_minus = TRUE;
+ next SPLIT;
+ }
+
+ if ( / # short option or collection of short options
+ ^
+ -
+ (
+ [^-]
+ .*
+ )
+ $
+ /x ) {
+ $split_short->($1);
+ next SPLIT;
+ } # end of short option
+
+ if ( /^--/ ) { # starts with 2 dashes, a long option
+ $split_long->($_);
+ next SPLIT;
+ } # end of long option
+
+ # unknown option without leading dash is a file name
+ push @files, $_;
+ next SPLIT;
+ } # end of foreach SPLIT
+
+ # all args are considered
+ $stderr->print( "Option '$has_arg' needs an argument." )
+ if ( $has_arg );
+
+
+ push @files, '-' unless ( @files );
+ @ARGV = @splitted_args;
+
+ }; # end of first run, splitting with map or transfer
+
+
+ #----------
+ # open or ignore verbose output
+ #----------
+ sub install_verbose {
+ if ( $Args->{'verbose'} ) { # '--verbose' was used
+ # make verbose output into $v
+ # get content of string so far as array ref, close
+ my $s = $v->get();
+
+ $v = new FH_STDERR(); # make verbose output into STDERR
+ if ( $s ) {
+ for ( @$s ) {
+ # print the file content into new verbose output
+ $v->print($_);
+ }
+ }
+ # verbose output is now active (into STDERR)
+ $v->print( "Option '-v' means '--verbose'." );
+ $v->print( "Version information is printed by option"
+ . " '--version'."
+ );
+ $v->print( "#" x 72 );
+
+ } else { # '--verbose' was not used
+ # do not be verbose, make verbose invisible
+
+ $v->close(); # close and ignore the string content
+
+ $v = new FH_NULL();
+ # this is either into /dev/null or in an ignored string
+
+ } # end if-else about verbose
+ # '$v->print' works now in any case
+
+ $v->print( "Verbose output was chosen." );
+
+ my $s = $Globals->{'prog_is_installed'} ? '' : ' not';
+ $v->print( $Globals->{'prog'} . " is" . $s .
+ " installed." );
+
+ $v->print( 'The command-line options are:' );
+
+ $s = " options:";
+ $s .= " '" . $_ . "'" for ( @ARGV );
+ $v->print( $s );
+
+ $s = " file names:";
+ $s .= " '" . $_ . "'\n" for ( @files );
+ $v->print( $s );
+ } # end install_verbose()
+
+
+ #----------
+ # second run of command-line arguments
+ #----------
+ sub run_second {
+ # Second run of args with new @ARGV from the former splitting.
+ # Arguments are now split and transformed into special long
+ # options.
+
+ my $double_minus = FALSE;
+ my $has_arg = FALSE;
+
+ ARGS: for my $arg ( @ARGV ) {
+
+ # ignore '--', file names are handled later on
+ last ARGS if ( $arg eq '--' );
+
+ if ( $has_arg ) {
+ unless ( exists $opts_with_arg{$has_arg} ) {
+ $stderr->print( "'\%opts_with_args' does not have key '" .
+ $has_arg . "'." );
+ next ARGS;
+ }
+
+ $opts_with_arg{$has_arg}->($arg);
+ $has_arg = FALSE;
+ next ARGS;
+ } # end of $has_arg
+
+ if ( exists $opts_with_arg{$arg} ) {
+ $has_arg = $arg;
+ next ARGS;
+ }
+
+ if ( exists $opts_noarg{$arg} ) {
+ $opts_noarg{$arg}->();
+ next ARGS;
+ }
+
+ # not a suitable option
+ $stderr->print( "Wrong option '" . $arg . "'." );
+ next ARGS;
+
+ } # end of for ARGS:
+
+
+ if ( $has_arg ) { # after last argument
+ die "Option '$has_arg' needs an argument.";
+ }
+
+ }; # end of second run
+
+
+ sub handle_args {
+ # handling the output of args
+
+ if ( $Args->{'output'} ) { # '--output' was set in the arguments
+ my $out_path = &path2abs($Args->{'output'});
+ die "Output file name $Args->{'output'} cannot be used."
+ unless ( $out_path );
+
+ my ( $file, $dir );
+ ( $file, $dir ) = File::Basename::fileparse($out_path)
+ or die "Could not handle output file path '" . $out_path
+ . "': directory name '" . $dir . "' and file name '" . $file
+ . "'.";
+
+ die "Could not find output directory for '" . $Args->{'output'}
+ . "'" unless ( $dir );
+ die "Could not find output file: '" . $Args->{'output'} .
+ "'" unless ( $file );
+
+ if ( -d $dir ) {
+ die "Could not write to output directory '" . $dir . "'."
+ unless ( -w $dir );
+ } else {
+ $dir = &make_dir($dir);
+ die "Could not create output directory in: '" . $out_path . "'."
+ unless ( $dir );
+ }
+
+ # now $dir is a writable directory
+
+ if ( -e $out_path ) {
+ die "Could not write to output file '" . $out_path . "'."
+ unless ( -w $out_path );
+ }
+
+ $out = new FH_FILE( $out_path );
+ $v->print( "Output goes to file '" . $out_path . "'." );
+ } else { # '--output' was not set
+ $out = new FH_STDOUT();
+ }
+ # no $out is the right behavior for standard output
+
+ # $Args->{'prefix'} .= '_' . $Args->{'eps_func'} . '2eps';
+
+ @ARGV = @files;
+ }
+
+ &run_first();
+ &install_verbose();
+ &run_second();
+ &handle_args();
+}
+
+# end 'Args'
+
+
+########################################################################
+# temporary directory .../tmp/groff/USER/lilypond/TIME
+########################################################################
+
+our $Temp =
+ {
+ # store the current directory
+ 'cwd' => Cwd::getcwd(),
+
+ # directory for EPS files
+ 'eps_dir' => EMPTYSTRING,
+
+ # temporary directory
+ 'temp_dir' => EMPTYSTRING,
+ };
+
+{ # 'Temp'
+
+ if ( $Args->{'temp_dir'} ) {
+
+ #----------
+ # temporary directory was set by '--temp_dir'
+ #----------
+
+ my $dir = $Args->{'temp_dir'};
+
+ $dir = &path2abs($dir);
+ $dir = &make_dir($dir) or
+ die "The directory '$dir' cannot be used temporarily: $!";
+
+
+ # now '$dir' is a writable directory
+
+ opendir( my $dh, $dir ) or
+ die "Could not open temporary directory '$dir': $!";
+ my $file_name;
+ my $found = FALSE;
+ my $prefix = $Args->{'prefix'};
+ my $re = qr<
+ ^
+ $prefix
+ _
+ >x;
+
+ READDIR: while ( defined($file_name = readdir($dh)) ) {
+ chomp $file_name;
+ if ( $file_name =~ /$re/ ) { # file name starts with $prefix_
+ $found = TRUE;
+ last READDIR;
+ }
+ next;
+ }
+
+ $Temp->{'temp_dir'} = $dir;
+ my $n = 0;
+ while ( $found ) {
+ $dir = File::Spec->catdir( $Temp->{'temp_dir'}, ++$n );
+ next if ( -e $dir );
+
+ $dir = &make_dir($dir) or next;
+
+ $found = FALSE;
+ last;
+ }
+
+ $Temp->{'temp_dir'} = $dir;
+
+
+ } else { # $Args->{'temp_dir'} not given by '--temp_dir'
+
+ #----------
+ # temporary directory was not set
+ #----------
+
+ { # search for or create a temporary directory
+
+ my @tempdirs = EMPTYARRAY;
+ {
+ my $tmpdir = File::Spec->tmpdir();
+ push @tempdirs, $tmpdir
+ if ( $tmpdir && -d $tmpdir && -w $tmpdir );
+
+ my $root_dir = File::Spec->rootdir(); # '/' in Unix
+ my $root_tmp = File::Spec->catdir($root_dir, 'tmp');
+ push @tempdirs, $root_tmp
+ if ( $root_tmp ne $tmpdir && -d $root_tmp && -w $root_tmp );
+
+ # home directory of the actual user
+ my $home = File::HomeDir->my_home;
+ my $home_tmp = File::Spec->catdir($home, 'tmp');
+ push @tempdirs, $home_tmp if ( -d $home_tmp && -w $home_tmp );
+
+ # '/var/tmp' in Unix
+ my $var_tmp = File::Spec->catdir('', 'var', 'tmp');
+ push @tempdirs, $var_tmp if ( -d $var_tmp && -w $var_tmp );
+ }
+
+
+ my @path_extension = qw( groff ); # TEMPDIR/groff/USER/lilypond/N
+ {
+ # '$<' is UID of actual user,
+ # 'getpwuid' gets user name in scalar context
+ my $user = getpwuid($<);
+ push @path_extension, $user if ( $user );
+
+ push @path_extension, qw( lilypond );
+ }
+
+
+ TEMPS: foreach ( @tempdirs ) {
+
+ my $dir; # final directory name in 'while' loop
+ $dir = &path2abs($_);
+ next TEMPS unless ( $dir );
+
+ # beginning of directory name
+ my @dir_begin =
+ ( File::Spec->splitdir($dir), @path_extension );
+
+
+ my $n = 0;
+ my $dir_blocked = TRUE;
+ BLOCK: while ( $dir_blocked ) {
+ # should become the final dir name
+ $dir = File::Spec->catdir(@dir_begin, ++$n);
+ next BLOCK if ( -d $dir );
+
+ # dir name is now free, create it, and end the blocking
+ my $res = &make_dir( $dir );
+ die "Could not create directory: $dir" unless ( $res );
+
+ $dir = $res;
+ $dir_blocked = FALSE;
+ }
+
+ next TEMPS unless ( -d $dir && -w $dir );
+
+ # $dir is now a writable directory
+ $Temp->{'temp_dir'} = $dir; # tmp/groff/USER/lilypond/TIME
+ last TEMPS;
+ } # end foreach tmp directories
+ } # end to create a temporary directory
+
+ die "Could not find a temporary directory" unless
+ ( $Temp->{'temp_dir'} && -d $Temp->{'temp_dir'} &&
+ -w $Temp->{'temp_dir'} );
+
+ } # end temporary directory
+
+ $v->print( "Temporary directory: '" . $Temp->{'temp_dir'} . "'\n" );
+ $v->print( "file_prefix: '" . $Args->{'prefix'} . "'" );
+
+
+ #----------
+ # EPS directory
+ #----------
+
+ my $make_dir = FALSE;
+ if ( $Args->{'eps_dir'} ) { # set by '--eps_dir'
+ my $dir = $Args->{'eps_dir'};
+
+ $dir = &path2abs($dir);
+
+ if ( -e $dir ) {
+ goto EMPTY unless ( -w $dir );
+
+ # '$dir' is writable
+ if ( -d $dir ) {
+ my $upper_dir = $dir;
+
+ my $found = FALSE;
+ opendir( my $dh, $upper_dir ) or $found = TRUE;
+ my $prefix = $Args->{'prefix'};
+ my $re = qr<
+ ^
+ $prefix
+ _
+ >x;
+ while ( not $found ) {
+ my $file_name = readdir($dh);
+ if ( $file_name =~ /$re/ ) { # file name starts with $prefix_
+ $found = TRUE;
+ last;
+ }
+ next;
+ }
+
+ my $n = 0;
+ while ( $found ) {
+ $dir = File::Spec->catdir($upper_dir, ++$n);
+ next if ( -d $dir );
+ $found = FALSE;
+ }
+ $make_dir = TRUE;
+ $Temp->{'eps_dir'} = $dir;
+ } else { # '$dir' is not a dir, so unlink it to create it as dir
+ if ( unlink $dir ) { # could remove '$dir'
+ $Temp->{'eps_dir'} = $dir;
+ $make_dir = TRUE;
+ } else { # could not remove
+ $stderr->print( "Could not use EPS dir '" . $dir .
+ "', use temp dir." );
+ } # end of unlink
+ } # end test of -d $dir
+ } else {
+ $make_dir = TRUE;
+ } # end of if -e $dir
+
+
+ if ( $make_dir ) { # make directory '$dir'
+ my $made = FALSE;
+ $dir = &make_dir($dir) and $made = TRUE;
+
+ if ( $made ) {
+ $Temp->{'eps_dir'} = $dir;
+ $v->print( "Directory for useful EPS files is '" . $dir . "'." );
+ } else {
+ $v->print( "The EPS directory '" . $dir . "' cannot be used: $!" );
+ }
+ } else { # '--eps_dir' was not set, so take the temporary directory
+ $Temp->{'eps_dir'} = $Args->{'temp_dir'};
+ } # end of make dir
+ }
+
+ EMPTY: unless ( $Temp->{'eps_dir'} ) {
+ # EPS-dir not set or available, use temp dir,
+ # but leave $Temp->{'}eps_dir'} empty
+ $v->print( "Directory for useful EPS files is the " .
+ "temporary directory '" . $Temp->{'temp_dir'} . "'." );
+ }
+
+} # end 'Temp'
+
+
+########################################################################
+# Read: read files or stdin
+########################################################################
+
+our $Read =
+ {
+ 'file_numbered' => EMPTYSTRING,
+ 'file_ly' => EMPTYSTRING, # '$file_numbered.ly'
+ };
+
+{ # read files or stdin
+
+ my $ly_number = 0; # number of lilypond file
+
+ # '$Args->{'prefix'}_[0-9]'
+
+ my $lilypond_mode = FALSE;
+
+ my $arg1; # first argument for '.lilypond'
+ my $arg2; # argument for '.lilypond include'
+
+ my $path_ly; # path of ly-file
+
+
+ my $check_file = sub { # for argument of '.lilypond include'
+ my $file = shift; # argument is a file name
+ $file = &path2abs($file);
+ unless ( $file ) {
+ die "Line '.lilypond include' without argument";
+ return '';
+ }
+ unless ( -f $file && -r $file ) {
+ die "Argument '$file' in '.lilypond include' is not a readable file";
+ }
+
+ return $file;
+ }; # end sub &$check_file()
+
+
+ my $increase_ly_number = sub {
+ ++$ly_number;
+ $Read->{'file_numbered'} = $Args->{'prefix'} . '_' . $ly_number;
+ $Read->{'file_ly'} = $Read->{'file_numbered'} . '.ly';
+ $path_ly = File::Spec->catdir($Temp->{'temp_dir'}, $Read->{'file_ly'} );
+ };
+
+
+ my %eps_subs =
+ (
+ 'ly' => \&create_ly2eps, # lilypond creates EPS files
+ 'pdf' => \&create_pdf2eps, # lilypond creates PDF file
+ );
+
+ # about lines starting with '.lilypond'
+
+ my $ly;
+ my $fh_include_file;
+ my %lilypond_args =
+ (
+
+ 'start' => sub {
+ $v->print( "\nline: '.lilypond start'" );
+ die "Line '.lilypond stop' expected." if ( $lilypond_mode );
+
+ $lilypond_mode = TRUE;
+ &$increase_ly_number;
+
+ $v->print( "ly-file: '" . $path_ly . "'" );
+
+ $ly = new FH_FILE($path_ly);
+ },
+
+
+ 'end' => sub {
+ $v->print( "line: '.lilypond end'\n" );
+ die "Expected line '.lilypond start'." unless ( $lilypond_mode );
+
+ $lilypond_mode = FALSE;
+ $ly->close();
+
+ if ( exists $eps_subs{ $Args->{'eps_func'} } ) {
+ $eps_subs{ $Args->{'eps_func'} }->();
+ } else {
+ die "Wrong argument for \%eps_subs: " . $Args->{'eps_func'} . "'";
+ }
+ },
+
+
+ 'include' => sub { # '.lilypond include file...'
+
+ # this may not be used within lilypond mode
+ next LILYPOND if ( $lilypond_mode );
+
+ my $file_arg = shift;
+
+ my $file = &$check_file($file_arg);
+ next LILYPOND unless ( $file );
+ # file can be read now
+
+
+ # '$fh_write_ly' must be opened
+ &$increase_ly_number;
+
+ $ly = new FH_FILE($path_ly);
+
+ my $include = new FH_READ_FILE($file);
+ my $res = $include->read_all(); # is a reference to an array
+ foreach ( @$res ) {
+ chomp;
+ $ly->print($_);
+ }
+ $ly->close();
+
+ if ( exists $eps_subs{ $Args->{'eps_func'} } ) {
+ $eps_subs{ $Args->{'eps_func'} }->();
+ } else {
+ die "Wrong argument for \$eps_subs: '" . $Args->{'eps_func'} . "'";
+ }
+ }, # end '.lilypond include'
+
+ ); # end definition %lilypond_args
+
+
+ LILYPOND: foreach my $filename (@ARGV) {
+ my $input;
+ if ($filename eq '-') {
+ $input = \*STDIN;
+ } elsif (not open $input, '<', $filename) {
+ warn $!;
+ next;
+ }
+ while (<$input>) {
+ chomp;
+ my $line = $_;
+
+
+ # now the lines with '.lilypond ...'
+
+ if ( /
+ ^
+ [.']
+ \s*
+ lilypond
+ (
+ .*
+ )
+ $
+ /x ) { # .lilypond ...
+ my $args = $1;
+ $args =~ s/
+ ^
+ \s*
+ //x;
+ $args =~ s/
+ \s*
+ $
+ //x;
+ $args =~ s/
+ ^
+ (
+ \S*
+ )
+ \s*
+ //x;
+ my $arg1 = $1; # 'start', 'end' or 'include'
+ $args =~ s/["'`]//g;
+ my $arg2 = $args; # file argument for '.lilypond include'
+
+ if ( exists $lilypond_args{$arg1} ) {
+ $lilypond_args{$arg1}->($arg2);
+ next;
+ } else {
+ # not a suitable argument of '.lilypond'
+ $stderr->print( "Unknown command: '$arg1' '$arg2': '$line'" );
+ }
+
+ next LILYPOND;
+ } # end if for .lilypond
+
+
+ if ( $lilypond_mode ) { # do lilypond-mode
+ # see '.lilypond start'
+ $ly->print( $line );
+ next LILYPOND;
+ } # do lilypond-mode
+
+ # unknown line without lilypond
+ unless ( /
+ ^
+ [.']
+ \s*
+ lilypond
+ /x ) { # not a '.lilypond' line
+ $out->print($line);
+ next LILYPOND;
+ }
+ } # end while <$input>
+ } # end foreach $filename
+} # end Read
+
+
+########################################################################
+# clean up
+########################################################################
+
+END {
+
+ exit unless ( defined($Temp->{'temp_dir'}) );
+
+ if ( $Args->{'keep_all'} ) {
+ # With --keep_all, no temporary files are removed.
+ $v->print( "keep_all: 'TRUE'" );
+ $v->print( "No temporary files will be deleted:" );
+
+ opendir my $dh_temp, $Temp->{'temp_dir'} or
+ die "Cannot open " . $Temp->{'temp_dir'} . ": $!";
+ for ( sort readdir $dh_temp ) {
+ next if ( / # omit files starting with a dot
+ ^
+ \.
+ /x );
+ if ( /
+ ^
+ $Args->{'prefix'}
+ _
+ /x ) {
+ my $file = File::Spec->catfile( $Temp->{'temp_dir'}, $_ );
+ $v->print( "- " . $file );
+ next;
+ }
+ next;
+ } # end for sort readdir
+ closedir $dh_temp;
+
+ } else { # keep_all is not set
+ # Remove all temporary files except the eps files.
+
+ $v->print( "keep_all: 'FALSE'" );
+ $v->print( "All temporary files except *.eps will be deleted" );
+
+
+ if ( $Temp->{'eps_dir'} ) {
+ # EPS files are in another dir, remove temp dir
+
+ if ( &is_subdir( $Temp->{'eps_dir'}, $Temp->{'temp_dir'} ) ) {
+ $v->print( "EPS dir is subdir of temp dir, so keep both." );
+ } else { # remove temp dir
+ $v->print( "Try to remove temporary directory '" .
+ $Temp->{'temp_dir'} ."':" );
+ if ( File::Path::remove_tree($Temp->{'temp_dir'}) ) {
+ # remove succeeds
+ $v->print( "...done." );
+ } else { # did not remove
+ $v->print( "Failure to remove temporary directory." );
+ } # end test on remove
+ } # end is subdir
+
+ } else { # no EPS dir, so keep EPS files
+
+ opendir my $dh_temp, $Temp->{'temp_dir'} or
+ die "Cannot open " . $Temp->{'temp_dir'} . ": $!";
+ for ( sort readdir $dh_temp ) {
+ next if ( / # omit files starting with a dot
+ ^
+ \.
+ /x );
+ next if ( / # omit EPS-files
+ \.eps
+ $
+ /x );
+ if ( /
+ ^
+ $Args->{'prefix'}
+ _
+ /x ) { # this includes 'PREFIX_temp*'
+ my $file = File::Spec->catfile( $Temp->{'temp_dir'}, $_ );
+ $v->print( "Remove '" . $file . "'" );
+ unlink $file or $stderr->print( "Could not remove '$file': $!" );
+ next;
+ } # end if prefix
+ next;
+ } # end for readdir temp dir
+ closedir $dh_temp;
+ } # end if-else EPS files
+ } # end if-else keep files
+
+
+ if ( $Temp->{'eps_dir'} ) {
+ # EPS files in $Temp->{'eps_dir'} are always kept
+ $v->print( "As EPS directory is set as '" .
+ $Temp->{'eps_dir'} . "', no EPS files there will be deleted." );
+
+ opendir my $dh_temp, $Temp->{'eps_dir'} or
+ die "Cannot open '" . $Temp->{'eps_dir'} . ": $!";
+ for ( sort readdir $dh_temp ) {
+ next if ( / # omit files starting with a dot
+ ^
+ \.
+ /x );
+ if ( /
+ ^
+ $Args->{'prefix'}
+ _
+ .*
+ \.eps
+ $
+ /x ) {
+ my $file = File::Spec->catfile( $Temp->{'eps_dir'}, $_ );
+ $v->print( "- " . $file );
+ next;
+ } # end if *.eps
+ next;
+ } # end for sort readdir
+ closedir $dh_temp;
+
+ }
+
+ 1;
+} # end package Clean
+
+
+1;
+# Local Variables:
+# fill-column: 72
+# mode: CPerl
+# End:
+# vim: set autoindent textwidth=72:
diff --git a/contrib/gperl/ChangeLog b/contrib/gperl/ChangeLog
new file mode 100644
index 0000000..813c320
--- /dev/null
+++ b/contrib/gperl/ChangeLog
@@ -0,0 +1,142 @@
+2022-10-09 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * gperl.pl: Include groff version information when reporting our
+ own (as recommended by GNU coding standards). Also drop
+ gratuitous quotation of program's own name.
+
+2022-05-03 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * gperl.am (gperl): Spell dependency on `$(SH_DEPS_SED_SCRIPT)`
+ using that macro expansion instead of a literal file name. See
+ groff's doc/automake.mom.
+
+2021-01-06 Colin Watson <cjwatson@debian.org>
+
+ * gperl.pl: Avoid Perl's unsafe "<>" operator.
+
+ The "<>" operator is implemented using the two-argument form of
+ "open", which interprets magic such as pipe characters, allowing
+ execution of arbitrary commands which is unlikely to be
+ expected. Perl >= 5.22 has a "<<>>" operator which avoids this,
+ but also forbids the use of "-" to mean the standard input,
+ which is a facility that the affected groff programs document.
+
+ ARGV::readonly would probably also fix this, but I fundamentally
+ dislike the approach of escaping data in preparation for a
+ language facility to unescape it, especially when the required
+ escaping is as non-obvious as it is here. (For the same reason,
+ I prefer to use subprocess invocation facilities that allow
+ passing the argument list as a list rather than as a string to
+ be interpreted by the shell.) So I've abandoned this dubious
+ convenience and changed the affected programs to iterate over
+ command-line arguments manually using the three-argument form of
+ open.
+
+ Fixes <https://savannah.gnu.org/bugs/?55557>.
+
+2020-04-22 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * gperl.1.man: Delete references to groffer.
+
+2018-02-28 Werner LEMBERG <wl@gnu.org>
+
+ * gperl.am (gperl): Use $(AM_V_GEN) to silence file generation.
+
+2015-08-22 Bernd Warken <groff-bernd.warken-72@web.de>
+
+ * gperl.1.man: Rename `gperl.man'.
+
+ * gperl.am: Include renaming.
+
+2015-08-05 Bernd Warken <groff-bernd.warken-72@web.de>
+
+ * gperl.am: Add `Last update'. Setup Emacs mode.
+
+2015-04-03 Werner LEMBERG <wl@gnu.org>
+
+ * gperl.man: Make it work in compatibility mode.
+ (EL): Fix typo.
+
+2014-10-11 Bernd Warken <groff-bernd.warken-72@web.de>
+
+ * gperl.pl: Version 1.2.6
+ Replace `capturex' with backtics, so `use IPC::System::Simple'
+ can be removed.
+
+2014-09-03 Bernd Warken <groff-bernd.warken-72@web.de>
+
+ * gperl.pl: Version 1.2.5
+
+ * all files in `gperl': Copying and Emacs setting.
+
+2014-07-06 Bernd Warken <groff-bernd.warken-72@web.de>
+
+ * gperl.pl: Version 1.2.4
+ Improve handling of `.Perl' lines.
+
+2014-07-06 Bernd Warken <groff-bernd.warken-72@web.de>
+
+ * gperl.pl: Version 1.2.3
+
+ * gperl.man: Compatioble to `doclifter'.
+
+2014-07-04 Bernd Warken <groff-bernd.warken-72@web.de>
+
+ * gperl.pl: Version 1.2.2
+
+ * gperl.man: Transform to classical man-page style.
+
+2014-07-03 Bernd Warken <groff-bernd.warken-72@web.de>
+
+ * gperl.pl: Improve definitions.
+
+2014-06-15 Bernd Warken <groff-bernd.warken-72@web.de>
+
+ * gperl.pl: Version 1.2.1.
+
+ * gperl.man: Correct the Legalese and documentation of options.
+
+2014-06-15 Bernd Warken <groff-bernd.warken-72@web.de>
+
+ * gperl.pl: Version 1.2. Getting several storage variables from
+ printing in `Perl' with several lines. Accept string and number
+ register variable names for `.ds' and `.nr'.
+
+ * gperl.man: Rewrite with the actual additions.
+
+2014-06-14 Bernd Warken <groff-bernd.warken-72@web.de>
+
+ * gperl.pl: Version 1.1. New structure without subs. Restrict
+ storage to only strings by creating only `.ds'.
+
+ * gperl.man: Major rewrite. Omit `.nr'.
+
+2014-02-27 Bernd Warken <groff-bernd.warken-72@web.de>
+
+ * gperl.pl: Admit file name arguments. Handle correct temporary
+ file.
+
+2014-02-25 Bernd Warken <groff-bernd.warken-72@web.de>
+
+ * gperl.pl, gperl.man, ChangeLog, Makefile.sub:
+ first version 1.0
+
+2014-02-25 Bernd Warken <groff-bernd.warken-72@web.de>
+________________________________________________________________________
+License
+
+Copyright (C) 2014-2020 Free Software Foundation, Inc.
+Written by Bernd Warken <groff-bernd.warken-72@web.de>.
+
+Copying and distribution of this file, with or without
+modification, are permitted provided the copyright notice and this
+notice are preserved.
+
+This file is part of `gperl', which is part of the `groff'
+project.
+
+##### Editor settings
+
+Local Variables:
+mode: change-log
+End:
diff --git a/contrib/gperl/gperl.1.man b/contrib/gperl/gperl.1.man
new file mode 100644
index 0000000..14afdcf
--- /dev/null
+++ b/contrib/gperl/gperl.1.man
@@ -0,0 +1,491 @@
+.TH gperl @MAN1EXT@ "@MDATE@" "groff @VERSION@"
+.SH Name
+gperl \- execute Perl commands in
+.I groff
+documents
+.
+.
+.\" ====================================================================
+.\" Legal Terms
+.\" ====================================================================
+.\"
+.\" Copyright (C) 2014-2020 Free Software Foundation, Inc.
+.\"
+.\" This file is part of gperl, which is part of groff, a free software
+.\" project.
+.\"
+.\" You can redistribute it and/or modify it under the terms of the GNU
+.\" General Public License as published by the Free Software Foundation,
+.\" version 2.
+.\"
+.\" The license text is available in the internet at
+.\" <http://www.gnu.org/licenses/gpl-2.0.html>.
+.
+.
+.\" Save and disable compatibility mode (for, e.g., Solaris 10/11).
+.do nr *groff_gperl_1_man_C \n[.cp]
+.cp 0
+.
+.\" Define fallback for groff 1.23's MR macro if the system lacks it.
+.nr do-fallback 0
+.if !\n(.f .nr do-fallback 1 \" mandoc
+.if \n(.g .if !d MR .nr do-fallback 1 \" older groff
+.if !\n(.g .nr do-fallback 1 \" non-groff *roff
+.if \n[do-fallback] \{\
+. de MR
+. ie \\n(.$=1 \
+. I \%\\$1
+. el \
+. IR \%\\$1 (\\$2)\\$3
+. .
+.\}
+.rr do-fallback
+.
+.
+.\" ====================================================================
+.SH Synopsis
+.\" ====================================================================
+.
+.SY gperl
+.RI [ file\~ .\|.\|.]
+.YS
+.
+.
+.SY gperl
+.B \-h
+.
+.SY gperl
+.B \-\-help
+.YS
+.
+.SY gperl
+.B \-v
+.
+.SY gperl
+.B \-\-version
+.YS
+.
+.
+.\" ====================================================================
+.SH Description
+.\" ====================================================================
+.
+This is a preprocessor for
+.MR groff @MAN1EXT@ .
+.
+It allows the use of
+.MR perl 7
+code in
+.MR groff @MAN7EXT@
+files.
+.
+The result of a
+.I Perl part
+can be stored in groff
+.I strings
+or
+.I numerical registers
+based on the arguments at a final line of a
+.IR "Perl part" .
+.
+.
+.P
+If no operands are given,
+or if
+.I file
+is
+.RB \[lq] \- \[rq],
+.I gperl
+reads the standard input stream.
+.
+A double-dash argument
+.RB (\[lq] \-\- \[rq])
+causes all subsequent arguments to be interpreted as
+.I file
+operands,
+even if their names start with a dash.
+.
+.B \-h
+and
+.B \-\-help
+display a usage message,
+whereas
+.B \-v
+and
+.B \-\-version
+display version information;
+all exit afterward.
+.
+.
+.\" ====================================================================
+.SH "Perl regions"
+.\" ====================================================================
+.
+.I Perl
+parts in
+.I groff files
+are enclosed by two
+.B .Perl
+requests with different arguments, a
+.I starting
+and an
+.I ending
+command.
+.
+.
+.\" ====================================================================
+.SS "Starting Perl mode"
+.\" ====================================================================
+.
+The starting
+.I Perl request
+can either be without arguments, or by a request that has the term
+.B start
+as its only argument.
+.RS
+.IP \(bu
+.B .Perl
+.IP \(bu
+.B .Perl start
+.RE
+.
+.
+.\" ====================================================================
+.SS "Ending Perl mode without storage"
+.\" ====================================================================
+.
+A
+.B .Perl
+command line with an argument different from
+.B start
+finishes a running
+.IR "Perl part" .
+.
+Of course, it would be reasonable to add the argument
+.BR stop ;
+that's possible, but not necessary.
+.
+.RS
+.IP \(bu
+.B .Perl stop
+.IP \(bu
+.BI .Perl " other_than_start"
+.RE
+.
+The argument
+.I other_than_start
+can additionally be used as a
+.I groff
+string variable name for storage \(em see next section.
+.
+.
+.\" ====================================================================
+.SS "Ending Perl mode with storage"
+.\" ====================================================================
+.
+A useful feature of
+.I gperl
+is to store one or more results from the
+.IR "Perl mode" .
+.
+.
+.P
+The output of a
+.I Perl part
+can be got with backticks
+.BR \[ga]...\[ga] .
+.
+.
+.P
+This program collects all printing to STDOUT (normal standard output)
+by the Perl
+.B print
+program.
+.
+This pseudo-printing output can have several lines, due to printed
+line breaks with
+.BR \(rsn .
+.
+By that, the output of a Perl run should be stored into a Perl array,
+with a single line for each array member.
+.
+.
+.P
+This Perl array output can be stored by
+.I gperl
+in either
+.TP
+.I groff strings
+by creating a groff command
+.B .ds
+.
+.TP
+.I groff register
+by creating a groff command
+.B .rn
+.
+.
+.P
+The storage modes can be determined by arguments of a final stopping
+.B .Perl
+command.
+.
+Each argument
+.B .ds
+changes the mode into
+.I groff string
+and
+.B .nr
+changes the mode into
+.I groff register
+for all following output parts.
+.
+.
+.br
+.ne 2v
+.P
+By default, all output is saved as strings, so
+.B .ds
+is not really needed before the first
+.B .nr
+command.
+.
+That suits to
+.MR groff @MAN7EXT@ ,
+because every output can be saved as
+.I groff
+string, but the registers can be very restrictive.
+.
+.
+.P
+In
+.IR "string mode" ,
+.I gperl
+generates a
+.I groff string
+storage line
+.RS
+.EX
+.BI .ds " var_name content"
+.EE
+.RE
+.
+In
+.I register mode
+the following groff command is generated
+.RS
+.EX
+.BI .nr " var_name content"
+.EE
+.RE
+.
+.
+.P
+We present argument collections in the following.
+.
+You can add as first argument for all
+.BR stop .
+.
+We omit this additional element.
+.
+.
+.P
+.TP
+.BI ".Perl .ds " var_name
+This will store 1 output line into the groff string named
+.I var_name
+by the automatically created command
+.RS
+.RS
+.EX
+.BI .ds " var_name output"
+.EE
+.RE
+.RE
+.
+.
+.TP
+.BI .Perl " var_name"
+If
+.I var_name
+is different from
+.B start
+this is equivalent to the former command, because the string mode is
+string with
+.B .ds
+command.
+default.
+.
+.
+.TP
+.BI .Perl " var_name1 var_name2"
+This will store 2 output lines into groff string names
+.I var_name1
+and
+.IR var_name2 ,
+because the default mode
+.B .ds
+is active, such that no
+.B .ds
+argument is needed.
+.
+Of course, this is equivalent to
+.RS
+.RS
+.EX
+.BI ".Perl .ds " "var_name1 var_name2"
+.EE
+.RE
+and
+.RS
+.EX
+.BI ".Perl .ds " "var_name1 " ".ds" " var_name2"
+.EE
+.RE
+.RE
+.
+.
+.TP
+.BI ".Perl .nr" " var_name1 varname2"
+stores both variables as register variables.
+.
+.I gperl
+generates
+.RS
+.EX
+.BI .nr " var_name1 output_line1"
+.BI .nr " var_name2 output_line2"
+.EE
+.RE
+.
+.
+.TP
+.BI ".Perl .nr " var_name1 " .ds " var_name2
+stores the 1st argument as
+.I register
+and the second as
+.I string
+by
+.RS
+.EX
+.BI .nr " var_name1 output_line1"
+.BI .ds " var_name2 output_line2"
+.EE
+.RE
+.
+.
+.\" ====================================================================
+.SH Example
+.\" ====================================================================
+.
+A possible
+.I Perl part
+in a
+.I roff file
+could look like that:
+.RS
+.EX
+before
+\&.Perl start
+my $result = \[aq]some data\[aq];
+print $result;
+\&.Perl stop .ds string_var
+after
+.EE
+.RE
+.
+.
+.P
+This stores the result
+.B \(rqsome data\(rq
+into the
+.I roff string
+called
+.BR string_var ,
+such that the following line is printed:
+.RS
+.EX
+\&.ds string_var some data
+.EE
+.RE
+by
+.I gperl
+as food for the coming
+.I groff
+run.
+.
+.
+.P
+A
+.I Perl part
+with several outputs is:
+.RS
+.EX
+\&.Perl start
+print \(rqfirst\(rsn\(rq;
+print \(rqsecond line\(rsn\(rq;
+print \(rq3\(rsn\(rq;
+\&.Perl var1 var2 .nr var3
+.EE
+.RE
+.
+This stores 3 printed lines into 3
+.I groff
+strings.
+.BR var1 , var2 , var3 .
+.
+So the following
+.I groff
+command lines are created:
+.RS
+.EX
+\&.ds var1 first
+\&.ds var2 second line
+\&.nr var3 3
+.EE
+.RE
+.
+.
+.\" ====================================================================
+.SH Authors
+.\" ====================================================================
+.
+.I gperl
+was written by
+.MT groff\-bernd\:.warken\-72@\:web\:.de
+Bernd Warken
+.ME .
+.
+.
+.\" ====================================================================
+.SH "See also"
+.\" ====================================================================
+.
+.P
+Man pages related to
+.I groff
+are
+.MR groff @MAN1EXT@ ,
+.MR groff @MAN7EXT@ ,
+and
+.MR grog @MAN1EXT@ .
+.
+.
+.P
+Documents related to
+.I Perl
+are
+.MR perl 1 ,
+.MR perl 7 .
+.
+.
+.\" Restore compatibility mode (for, e.g., Solaris 10/11).
+.cp \n[*groff_gperl_1_man_C]
+.do rr *groff_gperl_1_man_C
+.
+.
+.\" Local Variables:
+.\" fill-column: 72
+.\" mode: nroff
+.\" End:
+.\" vim: set filetype=groff textwidth=72:
diff --git a/contrib/gperl/gperl.am b/contrib/gperl/gperl.am
new file mode 100644
index 0000000..4d275c2
--- /dev/null
+++ b/contrib/gperl/gperl.am
@@ -0,0 +1,48 @@
+# Automake rules for 'gperl' (preprocessor for added Perl parts)
+
+# Copyright (C) 2014-2020 Free Software Foundation, Inc.
+# Written by Bernd Warken <groff-bernd.warken-72@web.de>.
+# Automake migration by Bertrand Garrigues
+
+# This file is part of 'gperl' which is part of 'groff'.
+
+# 'groff' is free software; 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 2 of the License, or
+# (at your option) any later version.
+
+# 'groff' is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see
+# <http://www.gnu.org/licenses/gpl-2.0.html>.
+
+########################################################################
+
+bin_SCRIPTS += gperl
+man1_MANS += contrib/gperl/gperl.1
+EXTRA_DIST += \
+ contrib/gperl/ChangeLog \
+ contrib/gperl/gperl.1.man \
+ contrib/gperl/gperl.pl
+
+gperl: $(top_srcdir)/contrib/gperl/gperl.pl $(SH_DEPS_SED_SCRIPT)
+ $(AM_V_GEN)$(RM) $@ \
+ && sed -f "$(SH_DEPS_SED_SCRIPT)" \
+ -e "s|[@]g[@]|$(g)|g" \
+ -e "s|[@]BINDIR[@]|$(DESTDIR)$(bindir)|g" \
+ -e "s|[@]VERSION[@]|$(VERSION)|g" \
+ -e "$(SH_SCRIPT_SED_CMD)" \
+ $(top_srcdir)/contrib/gperl/gperl.pl \
+ >$@ \
+ && chmod +x $@
+
+
+# Local Variables:
+# mode: makefile-automake
+# fill-column: 72
+# End:
+# vim: set autoindent filetype=automake textwidth=72:
diff --git a/contrib/gperl/gperl.pl b/contrib/gperl/gperl.pl
new file mode 100755
index 0000000..2f9f7d1
--- /dev/null
+++ b/contrib/gperl/gperl.pl
@@ -0,0 +1,257 @@
+#! /usr/bin/env perl
+
+# gperl - add Perl part to groff files, this is the preprocessor for that
+
+# Copyright (C) 2014-2020 Free Software Foundation, Inc.
+
+# Written by Bernd Warken <groff-bernd.warken-72@web.de>.
+
+my $version = '1.2.6';
+
+# This file is part of 'gperl', which is part of 'groff'.
+
+# 'groff' is free software; 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 2 of the License, or
+# (at your option) any later version.
+
+# 'groff' is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+
+# You can find a copy of the GNU General Public License in the internet
+# at <http://www.gnu.org/licenses/gpl-2.0.html>.
+
+########################################################################
+
+use strict;
+use warnings;
+#use diagnostics;
+
+# temporary dir and files
+use File::Temp qw/ tempfile tempdir /;
+
+# needed for temporary dir
+use File::Spec;
+
+# for 'copy' and 'move'
+use File::Copy;
+
+# for fileparse, dirname and basename
+use File::Basename;
+
+# current working directory
+use Cwd;
+
+# $Bin is the directory where this script is located
+use FindBin;
+
+
+########################################################################
+# system variables and exported variables
+########################################################################
+
+$\ = "\n"; # final part for print command
+
+########################################################################
+# read-only variables with double-@ construct
+########################################################################
+
+our $File_split_env_sh;
+our $File_version_sh;
+our $Groff_Version;
+
+my $before_make; # script before run of 'make'
+{
+ my $at = '@';
+ $before_make = 1 if '@VERSION@' eq "${at}VERSION${at}";
+}
+
+my %at_at;
+my $file_perl_test_pl;
+my $groffer_libdir;
+
+if ($before_make) {
+ my $gperl_source_dir = $FindBin::Bin;
+ $at_at{'BINDIR'} = $gperl_source_dir;
+ $at_at{'G'} = '';
+} else {
+ $at_at{'BINDIR'} = '@BINDIR@';
+ $at_at{'G'} = '@g@';
+}
+
+
+########################################################################
+# options
+########################################################################
+
+foreach (@ARGV) {
+ if ( /^(-h|--h|--he|--hel|--help)$/ ) {
+ print q(Usage for the 'gperl' program:);
+ print 'gperl [-] [--] [filespec...] normal file name arguments';
+ print 'gperl [-h|--help] gives usage information';
+ print 'gperl [-v|--version] displays the version number';
+ print q(This program is a 'groff' preprocessor that handles Perl ) .
+ q(parts in 'roff' files.);
+ exit;
+ } elsif ( /^(-v|--v|--ve|--ver|--vers|--versi|--versio|--version)$/ ) {
+ print "gperl (groff @VERSION@) version $version";
+ exit;
+ }
+}
+
+
+#######################################################################
+# temporary file
+#######################################################################
+
+my $out_file;
+{
+ my $template = 'gperl_' . "$$" . '_XXXX';
+ my $tmpdir;
+ foreach ($ENV{'GROFF_TMPDIR'}, $ENV{'TMPDIR'}, $ENV{'TMP'}, $ENV{'TEMP'},
+ $ENV{'TEMPDIR'}, 'tmp', $ENV{'HOME'},
+ File::Spec->catfile($ENV{'HOME'}, 'tmp')) {
+ if ($_ && -d $_ && -w $_) {
+ eval { $tmpdir = tempdir( $template,
+ CLEANUP => 1, DIR => "$_" ); };
+ last if $tmpdir;
+ }
+ }
+ $out_file = File::Spec->catfile($tmpdir, $template);
+}
+
+
+########################################################################
+# input
+########################################################################
+
+my $perl_mode = 0;
+
+unshift @ARGV, '-' unless @ARGV;
+foreach my $filename (@ARGV) {
+ my $input;
+ if ($filename eq '-') {
+ $input = \*STDIN;
+ } elsif (not open $input, '<', $filename) {
+ warn $!;
+ next;
+ }
+ while (<$input>) {
+ chomp;
+ s/\s+$//;
+ my $line = $_;
+ my $is_dot_Perl = $line =~ /^[.']\s*Perl(|\s+.*)$/;
+
+ unless ( $is_dot_Perl ) { # not a '.Perl' line
+ if ( $perl_mode ) { # is running in Perl mode
+ print OUT $line;
+ } else { # normal line, not Perl-related
+ print $line;
+ }
+ next;
+ }
+
+
+ ##########
+ # now the line is a '.Perl' line
+
+ my $args = $line;
+ $args =~ s/\s+$//; # remove final spaces
+ $args =~ s/^[.']\s*Perl\s*//; # omit .Perl part, leave the arguments
+
+ my @args = split /\s+/, $args;
+
+ ##########
+ # start Perl mode
+ if ( @args == 0 || @args == 1 && $args[0] eq 'start' ) {
+ # For '.Perl' no args or first arg 'start' means opening 'Perl' mode.
+ # Everything else means an ending command.
+ if ( $perl_mode ) {
+ # '.Perl' was started twice, ignore
+ print STDERR q('.Perl' starter was run several times);
+ next;
+ } else { # new Perl start
+ $perl_mode = 1;
+ open OUT, '>', $out_file;
+ next;
+ }
+ }
+
+ ##########
+ # now the line must be a Perl ending line (stop)
+
+ unless ( $perl_mode ) {
+ print STDERR 'gperl: there was a Perl ending without being in ' .
+ 'Perl mode:';
+ print STDERR ' ' . $line;
+ next;
+ }
+
+ $perl_mode = 0; # 'Perl' stop calling is correct
+ close OUT; # close the storing of 'Perl' commands
+
+ ##########
+ # run this 'Perl' part, later on about storage of the result
+ # array stores prints with \n
+ my @print_res = `perl $out_file`;
+
+ # remove 'stop' arg if exists
+ shift @args if ( $args[0] eq 'stop' );
+
+ if ( @args == 0 ) {
+ # no args for saving, so @print_res doesn't matter
+ next;
+ }
+
+ my @var_names = ();
+ my @mode_names = ();
+
+ my $mode = '.ds';
+ for ( @args ) {
+ if ( /^\.?ds$/ ) {
+ $mode = '.ds';
+ next;
+ }
+ if ( /^\.?nr$/ ) {
+ $mode = '.nr';
+ next;
+ }
+ push @mode_names, $mode;
+ push @var_names, $_;
+ }
+
+ my $n_res = @print_res;
+ my $n_vars = @var_names;
+
+ if ( $n_vars < $n_res ) {
+ print STDERR 'gperl: not enough variables for Perl part: ' .
+ $n_vars . ' variables for ' . $n_res . ' output lines.';
+ } elsif ( $n_vars > $n_res ) {
+ print STDERR 'gperl: too many variablenames for Perl part: ' .
+ $n_vars . ' variables for ' . $n_res . ' output lines.';
+ }
+ if ( $n_vars < $n_res ) {
+ print STDERR 'gperl: not enough variables for Perl part: ' .
+ $n_vars . ' variables for ' . $n_res . ' output lines.';
+ }
+
+ my $n_min = $n_res;
+ $n_min = $n_vars if ( $n_vars < $n_res );
+ exit unless ( $n_min );
+ $n_min -= 1; # for starting with 0
+
+ for my $i ( 0..$n_min ) {
+ my $value = $print_res[$i];
+ chomp $value;
+ print $mode_names[$i] . ' ' . $var_names[$i] . ' ' . $value;
+ }
+ }
+}
+
+
+1;
+# Local Variables:
+# mode: CPerl
+# End:
diff --git a/contrib/gpinyin/ChangeLog b/contrib/gpinyin/ChangeLog
new file mode 100644
index 0000000..53cc228
--- /dev/null
+++ b/contrib/gpinyin/ChangeLog
@@ -0,0 +1,200 @@
+2022-10-09 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * gpinyin.pl: Report groff version number along with this
+ program's own when not run from source tree. Drop dead code.
+ Bump micro version number to reflect recent restructuring.
+
+2022-10-09 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ Make gpinyin script stand alone.
+
+ * subs.pl: Delete, moving its content into...
+ * gpinyin.pl: ...here.
+ (vowel_t): Use explicit list with `my`.
+ (vowel_n, vowel_t): Declare local scalar `$vowel_with_tone`
+ using `my`.
+ * gpinyin.am (dist_gpinyin_DATA): Delete.
+
+2022-05-03 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * gpinyin.am (gpinyin): Fix missing dependency on
+ `$(SH_DEPS_SED_SCRIPT)`.
+
+2021-05-11 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * gpinyin.1.man: Render the tone mark table only if the output
+ device might be capable.
+
+ Fixes <https://savannah.gnu.org/bugs/index.php?55215>.
+
+2021-05-10 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * gpinyin.1.man: Work around inability of grops and gropdf to
+ construct some Unicode composite characters. Use groff
+ composite special characters for "a" with acute and grave
+ accents, and define strings for "a" with macron (overline) and
+ with háček/caron accents. Use different string definitions for
+ nroff and troff modes so we don't regress UTF-8 terminal output.
+
+2021-05-10 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * subs.pl (vowel_t): Fix incorrect rendering of base glyph 'U',
+ which was being forced to lowercase when a dieresis and tone
+ mark were both being applied. This caused the tone mark to
+ overlap the dieresis, so decrease the font size of the base
+ glyph even more to compensate. The result is ugly but
+ comprehensible.
+
+ See <https://savannah.gnu.org/bugs/?57524>, partially mitigated
+ but not completely resolved.
+
+2021-05-09 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * subs.pl (%tones1_Unicode): Fix copy and paste error. Emit
+ U+01D5 (Latin capital letter u with dieresis and macron) for Ü
+ with tone 1, instead of U+016A (Latin capital letter u with
+ macron).
+
+ Fixes <https://savannah.gnu.org/bugs/?60562>.
+
+2021-05-09 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * subs.pl (handle_word): Emit \[cq] instead of \[aq] when
+ interpolating an apostrophe before a vowel.
+
+ Fixes <https://savannah.gnu.org/bugs/?60561>.
+
+2021-05-09 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * subs.pl (%tones_glyphs, %tones4_glyphs): Fix hash keys to use
+ the groff dotless i special character into which a lowercase "i"
+ has already been transformed instead of 'i' itself.
+ (vowel_n, vowel_t): Rename variable so that tone-transformed
+ vowel is stored separately. Add "or warn" to test the result
+ and cheaply assert that we got a string back from our hash
+ lookup on the vowel.
+
+ Fixes <https://savannah.gnu.org/bugs/?60560>.
+
+2021-01-06 Colin Watson <cjwatson@debian.org>
+
+ * gpinyin.pl: Avoid Perl's unsafe "<>" operator.
+
+ The "<>" operator is implemented using the two-argument form of
+ "open", which interprets magic such as pipe characters, allowing
+ execution of arbitrary commands which is unlikely to be
+ expected. Perl >= 5.22 has a "<<>>" operator which avoids this,
+ but also forbids the use of "-" to mean the standard input,
+ which is a facility that the affected groff programs document.
+
+ ARGV::readonly would probably also fix this, but I fundamentally
+ dislike the approach of escaping data in preparation for a
+ language facility to unescape it, especially when the required
+ escaping is as non-obvious as it is here. (For the same reason,
+ I prefer to use subprocess invocation facilities that allow
+ passing the argument list as a list rather than as a string to
+ be interpreted by the shell.) So I've abandoned this dubious
+ convenience and changed the affected programs to iterate over
+ command-line arguments manually using the three-argument form of
+ open.
+
+ Fixes <https://savannah.gnu.org/bugs/?55557>.
+
+2020-04-22 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * gpinyin.1.man: Delete references to groffer.
+
+2018-02-28 Werner LEMBERG <wl@gnu.org>
+
+ * gpinyin.am (gpinyin): Use $(AM_V_GEN) to silence file generation.
+
+2015-08-22 Bernd Warken <groff-bernd.warken-72@web.de>
+
+ * gpinyin.1.man: Rename `gpinyin.man'.
+
+ * gpinyin.am: include renaming.
+
+2015-08-05 Bernd Warken <groff-bernd.warken-72@web.de>
+
+ * gpinyin.am: Add `Last update'. Setup Emacs mode.
+
+2015-04-03 Werner LEMBERG <wl@gnu.org>
+
+ * gpinyin.man: Make it work in compatibility mode.
+ (EL): Fix typo.
+
+2014-10-11 Werner LEMBERG <wl@gnu.org>
+
+ * Makefile.sub (gpinyin): Handle `gpinyin_dir'.
+
+2014-10-11 Bernd Warken <groff-bernd.warken-72@web.de>
+
+ * gpinyin.pl: Version 1.0.4
+ Remove `use IPC::System::Simple'.
+
+2014-10-10 Bernd Warken <groff-bernd.warken-72@web.de>
+
+ * gpinyin.pl: Version 1.0.3
+ Remove beginning empty line for `pinyin' parts.
+
+2014-09-25 Bernd Warken <groff-bernd.warken-72@web.de>
+
+ * gpinyin.pl: Version 1.0.2
+
+ * Makefile.sub: Add .PHONY. Restructure install and uninstall.
+
+2014-09-03 Bernd Warken <groff-bernd.warken-72@web.de>
+
+ Version 1.0.1
+
+ * all `gpinyin' files: Copying and Emacs settings.
+
+2014-08-27 Bernd Warken <groff-bernd.warken-72@web.de>
+
+ Version 1.0.0
+
+ * gpinyin.pl, subs.pl, gpinyin.man: Make `gpinyin' runnable.
+
+2014-08-08 Bernd Warken <groff-bernd.warken-72@web.de>
+
+ * gpinyin.pl: Version 0.9.2
+
+ * subs.pl: Rename `sub.pl'.
+
+ * Makefile.sub: Change `sub.pl' to `subs.pl'.
+
+2014-08-08 Bernd Warken <groff-bernd.warken-72@web.de>
+
+ * gpinyin.pl: Version 0.9.1
+
+ * sub.pl: New file for storing subs later on.
+
+ * Makefile.sub: Add new gpinyin path for sub.pl.
+
+2014-08-01 Bernd Warken <groff-bernd.warken-72@web.de>
+
+ * gpinyin.pl, gpinyin.man, ChangeLog, Makefile.sub:
+ First version 0.9.0 of gpinyin
+
+2014-08-01 Bernd Warken <groff-bernd.warken-72@web.de>
+________________________________________________________________________
+License
+
+Copyright (C) 2014-2020 Free Software Foundation, Inc.
+Written by Bernd Warken <groff-bernd.warken-72@web.de>.
+
+Copying and distribution of this file, with or without
+modification, are permitted provided the copyright notice and this
+notice are preserved.
+
+This file is part of `gpinyin', which is part of the `groff'
+project.
+
+##### Editor settings
+
+Local Variables:
+fill-column: 72
+mode: change-log
+version-control: never
+End:
+vim:set autoindent textwidth=72:
diff --git a/contrib/gpinyin/gpinyin.1.man b/contrib/gpinyin/gpinyin.1.man
new file mode 100644
index 0000000..3c3884e
--- /dev/null
+++ b/contrib/gpinyin/gpinyin.1.man
@@ -0,0 +1,378 @@
+'\" t
+.TH gpinyin @MAN1EXT@ "@MDATE@" "groff @VERSION@"
+.SH Name
+gpinyin \- use Hanyu Pinyin Chinese in
+.I groff
+documents
+.
+.
+.\" ====================================================================
+.\" Legal Terms
+.\" ====================================================================
+.\"
+.\" Copyright (C) 2014-2020 Free Software Foundation, Inc.
+.\"
+.\" This file is part of gpinyin, which is part of groff, a free
+.\" software project.
+.\"
+.\" You can redistribute it and/or modify it under the terms of the GNU
+.\" General Public License version 2 as published by the Free Software
+.\" Foundation.
+.\"
+.\" The license text is available in the internet at
+.\" <http://www.gnu.org/licenses/gpl-2.0.html>.
+.
+.
+.\" Save and disable compatibility mode (for, e.g., Solaris 10/11).
+.do nr *groff_gpinyin_1_man_C \n[.cp]
+.cp 0
+.
+.\" Define fallback for groff 1.23's MR macro if the system lacks it.
+.nr do-fallback 0
+.if !\n(.f .nr do-fallback 1 \" mandoc
+.if \n(.g .if !d MR .nr do-fallback 1 \" older groff
+.if !\n(.g .nr do-fallback 1 \" non-groff *roff
+.if \n[do-fallback] \{\
+. de MR
+. ie \\n(.$=1 \
+. I \%\\$1
+. el \
+. IR \%\\$1 (\\$2)\\$3
+. .
+.\}
+.rr do-fallback
+.
+.
+.\" ====================================================================
+.\" Local definitions
+.\" ====================================================================
+.
+.\" Define a string for the TeX logo.
+.ie t .ds TeX T\h'-.1667m'\v'.224m'E\v'-.224m'\h'-.125m'X
+.el .ds TeX TeX
+.
+.
+.\" ====================================================================
+.SH Synopsis
+.\" ====================================================================
+.
+.SY gpinyin
+.RI [ file\~ .\|.\|.]
+.YS
+.
+.
+.SY gpinyin
+.B \-h
+.
+.SY gpinyin
+.B \-\-help
+.YS
+.
+.SY gpinyin
+.B \-v
+.
+.SY gpinyin
+.B \-\-version
+.YS
+.
+.
+.\" ====================================================================
+.SH Description
+.\" ====================================================================
+.
+.I gpinyin
+is a preprocessor for
+.MR groff @MAN1EXT@
+that facilitates use of Hanyu Pinyin in
+.MR groff @MAN7EXT@
+files.
+.
+Pinyin is a method for writing the Mandarin Chinese language with the
+Latin alphabet.
+.
+Mandarin consists of more than four hundred base syllables,
+each spoken with one of five different tones.
+.
+Changing the tone applied to the syllable generally alters the meaning
+of the word it forms.
+.
+In Pinyin,
+a syllable is written in the Latin alphabet and a numeric tone indicator
+can be appended to each syllable.
+.
+.
+.P
+Each
+.I input-file
+is a file name or the character
+.RB \[lq] \- \[rq]
+to indicate that the standard input stream should be read.
+.
+As usual,
+the argument
+.RB \[lq] \-\- \[rq]
+can be used in order to force interpretation of all remaining arguments
+as file names,
+even if an
+.I input-file
+argument begins with a
+.RB \[lq] \- \[rq].
+.
+.B \-h
+and
+.B \-\-help
+display a usage message,
+while
+.B \-v
+and
+.B \-\-version
+show version information;
+all exit afterward.
+.
+.
+.\" ====================================================================
+.SS "Pinyin sections"
+.\" ====================================================================
+.
+Pinyin sections in
+.I groff
+files are enclosed by two
+.B .pinyin
+requests with different arguments.
+.
+The starting request is
+.RS
+.EX
+\&.pinyin start
+.EE
+.RE
+or
+.RS
+.EX
+\&.pinyin begin
+.EE
+.RE
+and the ending request is
+.RS
+.EX
+\&.pinyin stop
+.EE
+.RE
+or
+.RS
+.EX
+\&.pinyin end
+.EE
+.RE
+\&.
+.
+.
+.\" ====================================================================
+.SS Syllables
+.\" ====================================================================
+.
+In Pinyin,
+each syllable is represented by one to six letters drawn from the
+fifty-two upper- and lowercase letters of the Unicode basic Latin
+character set,
+plus the letter \[lq]U\[rq] with dieresis (umlaut) in both cases\[em]in
+other words,
+the members of the set \[lq][a\[en]zA\[en]Z\[:u]\[:U]]\[rq].
+.
+.
+.P
+In
+.I groff
+input,
+all basic Latin letters are written as themselves.
+.
+The \[lq]u with dieresis\[rq] can be written as
+\[lq]\e[:u]\[rq]
+in lowercase or
+\[lq]\e[:U]\[rq]
+in uppercase.
+.
+Within
+.B .pinyin
+sections,
+.I gpinyin
+supports the form
+\[lq]ue\[rq]
+for lowercase and the forms
+\[lq]Ue\[rq]
+and
+\[lq]UE\[rq]
+for uppercase.
+.
+.
+.\" ====================================================================
+.SS Tones
+.\" ====================================================================
+.
+Each syllable has exactly one of five
+.IR tones .
+.
+The fifth tone is not explicitly written at all,
+but each of the first through fourth tones is indicated with a diacritic
+above a specific vowel within the syllable.
+.
+.
+.P
+In a
+.I gpinyin
+source file,
+these tones are written by adding a numeral in the range 0 to 5 after
+the syllable.
+.
+The tone numbers 1 to 4 are transformed into accents above vowels in the
+output.
+.
+The tone numbers 0 and 5 are synonymous.
+.
+.
+.P
+.nr gpinyin*do-table 0
+.if t .nr gpinyin*do-table 1
+.if n .if '\*[.T]'utf8' .nr gpinyin*do-table 1
+.\" XXX: One hack necessitates another; since our table is conditional,
+.\" we need to save the input line counter.
+.nr gpinyin*.c \n[.c]
+.ie \n[gpinyin*do-table] \{\
+The tones are written as follows.
+.
+.
+.P
+.\" XXX: This is so gross. Why can't grops and gropdf figure this out?
+.if t .ds a- \za\[a-]
+.if n .ds a- \[a a-]
+.if t .ds a< \za\[ah]
+.if n .ds a< \[a ah]
+.if t .ne 8 \" Try to keep the table on one page for printed output.
+.TS
+l l l l l.
+Tone Description Diacritic Example Input Example Output
+_
+first flat \[a-] ma1 m\*[a-]
+second rising \[aa] ma2 m\[a aa]
+third falling-rising \[ah] ma3 m\*[a<]
+fourth falling \[ga] ma4 m\[a ga]
+fifth neutral (none) ma0 ma
+\^ \^ \^ ma5 \^
+.TE
+.\}
+.lf (\n[gpinyin*.c] + 25) \" XXX part 2: Restore input line counter.
+.el \{\
+[The tone mark table is omitted from this rendering of the man page
+because the selected output device \[lq]\*[.T]\[rq] lacks the character
+repertoire to display it.
+.
+Try another output device.]
+.\}
+.rm a-
+.rm a<
+.rr gpinyin*do-table
+.
+.
+.P
+The neutral tone number can be omitted from a word-final syllable,
+but not otherwise.
+.
+.
+.\" ====================================================================
+.SH Authors
+.\" ====================================================================
+.
+.I gpinyin
+was written by
+.MT groff\-bernd\:.warken\-72@\:web\:.de
+Bernd Warken
+.ME .
+.
+.
+.\" ====================================================================
+.SH "See also"
+.\" ====================================================================
+.
+Useful documents on the World Wide Web related to Pinyin include
+.RS 4n
+.UR http://\:www\:.foolsworkshop\:.com/\:ptou/\:index\:.html
+.I Pinyin to Unicode
+.UE ,
+.
+.br
+.UR http://\:www\:.mandarintools\:.com/
+.I On-line Chinese Tools \" sic: On-line
+.UE ,
+.
+.br
+.\" XXX: Turning off adjustment like this is ugly; thanks to meter-long
+.\" URLs we need an escape sequence that selectively disables adjustment
+.\" at the end of a word.
+.na
+.UR http://\:www\:.pinyin\:.info/\:index\:.html
+.I Pinyin.info: a guide to the writing of Mandarin Chinese in \
+romanization
+.UE ,
+.ad \*[AD]
+.
+.br
+.UR http://\:www\:.pinyin\:.info/\:rules/\:where.html
+\[lq]Where do the tone marks go?\[rq]
+.UE ,
+.
+.br
+.UR http://\:git\:.savannah\:.gnu\:.org/\:gitweb/\:\
+?p=cjk\:.git\:;a=blob_plain\:;f=doc/\:pinyin\:.txt\:;hb=HEAD
+.I pinyin.txt
+from the CJK macro package for \*[TeX]
+.UE ,
+.br
+.RS -4n
+and
+.RE
+.
+.br
+.\" XXX: Same ugliness as before.
+.na
+.UR http://\:git\:.savannah\:.gnu\:.org/\:gitweb/\:\
+?p=cjk\:.git\:;a=blob_plain\:;f=texinput/\:pinyin\:.sty\:;hb=HEAD
+.I pinyin.sty
+from the CJK macro package for \*[TeX]
+.UE .
+.ad \*[AD]
+.
+.RE
+.
+.
+.P
+.MR groff @MAN1EXT@
+and
+.MR grog @MAN1EXT@
+explain how to view
+.I roff
+documents.
+.
+.
+.P
+.MR groff @MAN7EXT@
+and
+.MR groff_char @MAN7EXT@
+are comprehensive references covering the language elements of GNU
+.I troff \" GNU
+and the available glyph repertoire,
+respectively.
+.
+.
+.\" Clean up.
+.rm TeX
+.
+.\" Restore compatibility mode (for, e.g., Solaris 10/11).
+.cp \n[*groff_gpinyin_1_man_C]
+.do rr *groff_gpinyin_1_man_C
+.
+.
+.\" Local Variables:
+.\" fill-column: 72
+.\" mode: nroff
+.\" End:
+.\" vim: set filetype=groff textwidth=72:
diff --git a/contrib/gpinyin/gpinyin.am b/contrib/gpinyin/gpinyin.am
new file mode 100644
index 0000000..78cc35a
--- /dev/null
+++ b/contrib/gpinyin/gpinyin.am
@@ -0,0 +1,56 @@
+# Automake rules for 'gpinyin' (preprocessor for added Perl parts)
+
+# Copyright (C) 2014-2020 Free Software Foundation, Inc.
+# Written by Bernd Warken <groff-bernd.warken-72@web.de>.
+# Moved to automake by Bertrand Garrigues
+
+# This file is part of 'gpinyin' which is part of 'groff'.
+
+# 'groff' is free software; 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 2 of the License, or
+# (at your option) any later version.
+
+# 'groff' is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see
+# <http://www.gnu.org/licenses/gpl-2.0.html>.
+
+########################################################################
+
+gpinyin_srcdir = $(top_srcdir)/contrib/gpinyin
+bin_SCRIPTS += gpinyin
+gpinyindir = $(gpinyin_dir)
+man1_MANS += contrib/gpinyin/gpinyin.1
+EXTRA_DIST += \
+ contrib/gpinyin/ChangeLog \
+ contrib/gpinyin/gpinyin.1.man \
+ contrib/gpinyin/gpinyin.pl
+
+gpinyin: contrib/gpinyin/gpinyin.pl $(SH_DEPS_SED_SCRIPT)
+ $(AM_V_GEN)sed -f "$(SH_DEPS_SED_SCRIPT)" \
+ -e "s|[@]g[@]|$(g)|g" \
+ -e "s|[@]BINDIR[@]|$(DESTDIR)$(bindir)|g" \
+ -e "s|[@]gpinyin_dir[@]|$(DESTIR)$(gpinyin_dir)|" \
+ -e "s|[@]VERSION[@]|$(VERSION)|g" \
+ -e "$(SH_SCRIPT_SED_CMD)" \
+ $(gpinyin_srcdir)/gpinyin.pl \
+ >$@ \
+ && chmod +x $@
+
+uninstall_groffdirs: uninstall-gpinyin-hook
+uninstall-gpinyin-hook:
+ if test -d $(DESTDIR)$(gpinyindir); then \
+ rmdir $(DESTDIR)$(gpinyindir); \
+ fi
+
+
+# Local Variables:
+# mode: makefile-automake
+# fill-column: 72
+# End:
+# vim: set autoindent filetype=automake textwidth=72:
diff --git a/contrib/gpinyin/gpinyin.pl b/contrib/gpinyin/gpinyin.pl
new file mode 100755
index 0000000..73b3034
--- /dev/null
+++ b/contrib/gpinyin/gpinyin.pl
@@ -0,0 +1,725 @@
+#! /usr/bin/env perl
+
+# gpinyin - European-like Chinese writing 'pinyin' into 'groff'
+
+# Copyright (C) 2014-2020 Free Software Foundation, Inc.
+
+# Written by Bernd Warken <groff-bernd.warken-72@web.de>.
+
+my $version = '1.0.5';
+my $groff_version = '(groff @VERSION@) '; # with trailing space
+
+# This file is part of 'gpinyin', which is part of 'groff'.
+
+# 'groff' is free software; 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 2 of the License, or
+# (at your option) any later version.
+
+# 'groff' is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+
+# You can find a copy of the GNU General Public License in the internet
+# at <http://www.gnu.org/licenses/gpl-2.0.html>.
+
+########################################################################
+
+use strict;
+use warnings;
+#use diagnostics;
+
+# temporary dir and files
+use File::Temp qw/ tempfile tempdir /;
+
+# needed for temporary dir
+use File::Spec;
+
+# for 'copy' and 'move'
+use File::Copy;
+
+# for fileparse, dirname and basename
+use File::Basename;
+
+# current working directory
+use Cwd;
+
+# $Bin is the directory where this script is located
+use FindBin;
+
+
+########################################################################
+# system variables and exported variables
+########################################################################
+
+$\ = "\n"; # final part for print command
+
+{
+ my $at = '@';
+ $groff_version = '' if '@VERSION@' eq "${at}VERSION${at}";
+}
+
+########################################################################
+# All Pinyin syllables from wikipedia
+########################################################################
+
+my %syllables =
+ (
+ 'a' => 1, 'ai' => 1, 'an' => 1, 'ang' => 1, 'ao' => 1,
+ 'ba' => 1, 'bai' => 1, 'ban' => 1, 'bang' => 1, 'bao' => 1,
+ 'bei' => 1, 'ben' => 1, 'beng' => 1,
+ 'bi' => 1, 'bian' => 1, 'biao' => 1, 'bie' => 1, 'bin' => 1,
+ 'bing' => 1, 'bo' => 1, 'bu' => 1,
+ 'ca' => 1, 'cai' => 1, 'can' => 1, 'cang' => 1, 'cao' => 1,
+ 'ce' => 1, 'cen' => 1, 'ceng' => 1,
+ 'cha' => 1, 'chai' => 1, 'chan' => 1, 'chang' => 1, 'chao' => 1,
+ 'che' => 1, 'chen' => 1, 'cheng' => 1, 'chi' => 1,
+ 'chong' => 1, 'chou' => 1, 'chu' => 1,
+ 'chua' => 1, 'chuai' => 1, 'chuan' => 1, 'chuang' => 1,
+ 'chui' => 1, 'chun' => 1, 'chuo' => 1,
+ 'ci' => 1, 'cong' => 1, 'cou' => 1,
+ 'cu' => 1, 'cuan' => 1, 'cui' => 1, 'cun' => 1, 'cuo' => 1,
+ 'da' => 1, 'dai' => 1, 'dan' => 1, 'dang' => 1, 'dao' => 1,
+ 'de' => 1, 'dei' => 1, 'den' => 1, 'deng' => 1,
+ 'di' => 1, 'dian' => 1, 'diao' => 1, 'die' => 1,
+ 'ding' => 1, 'diu' => 1, 'dong' => 1, 'dou' => 1,
+ 'du' => 1, 'duan' => 1, 'dui' => 1, 'dun' => 1, 'duo' => 1,
+ 'e' => 1, 'ei' => 1, 'en' => 1, 'eng' => 1, 'er' => 1,
+ 'fa' => 1, 'fan' => 1, 'fang' => 1,
+ 'fei' => 1, 'fen' => 1, 'feng' => 1, 'fiao' => 1,
+ 'fo' => 1, 'fou' => 1, 'fu' => 1,
+ 'ga' => 1, 'gai' => 1, 'gan' => 1, 'gang' => 1, 'gao' => 1,
+ 'ge' => 1, 'gei' => 1, 'gen' => 1, 'geng' => 1,
+ 'gong' => 1, 'gou' => 1, 'gu' => 1,
+ 'gua' => 1, 'guai' => 1, 'guan' => 1, 'guang' => 1, 'gui' => 1,
+ 'gun' => 1, 'guo' => 1,
+ 'ha' => 1, 'hai' => 1, 'han' => 1, 'hang' => 1, 'hao' => 1,
+ 'he' => 1, 'hei' => 1, 'hen' => 1, 'heng' => 1,
+ 'hong' => 1, 'hou' => 1,
+ 'hu' => 1, 'hua' => 1, 'huai' => 1, 'huan' => 1, 'huang' => 1,
+ 'hui' => 1, 'hun' => 1, 'huo' => 1,
+ 'ji' => 1, 'jia' => 1, 'jian' => 1, 'jiang' => 1, 'jiao' => 1,
+ 'jie' => 1, 'jin' => 1, 'jing' => 1, 'jiong' => 1, 'jiu' => 1,
+ 'ju' => 1, 'juan' => 1, 'jue' => 1, 'jun' => 1,
+ 'ka' => 1, 'kai' => 1, 'kan' => 1, 'kang' => 1, 'kao' => 1,
+ 'ke' => 1, 'kei' => 1, 'ken' => 1, 'keng' => 1,
+ 'kong' => 1, 'kou' => 1, 'ku' => 1, 'kua' => 1, 'kuai' => 1,
+ 'kuan' => 1, 'kuang' => 1, 'kui' => 1, 'kun' => 1, 'kuo' => 1,
+ 'la' => 1, 'lai' => 1, 'lan' => 1, 'lang' => 1, 'lao' => 1,
+ 'le' => 1, 'lei' => 1, 'leng' => 1,
+ 'li' => 1, 'lia' => 1, 'lian' => 1, 'liang' => 1, 'liao' => 1,
+ 'lie' => 1, 'lin' => 1, 'ling' => 1, 'liu' => 1,
+ 'lo' => 1, 'long' => 1, 'lou' => 1,
+ 'lu' => 1, 'luan' => 1, 'lun' => 1, 'luo' => 1,
+ 'lü' => 1, 'lüe' => 1,
+ 'ma' => 1, 'mai' => 1, 'man' => 1, 'mang' => 1, 'mao' => 1,
+ 'me' => 1, 'mei' => 1, 'men' => 1, 'meng' => 1,
+ 'mi' => 1, 'mian' => 1, 'miao' => 1, 'mie' => 1,
+ 'min' => 1, 'ming' => 1, 'miu' => 1,
+ 'mo' => 1, 'mou' => 1, 'mu' => 1,
+ 'na' => 1, 'nai' => 1, 'nan' => 1, 'nang' => 1, 'nao' => 1,
+ 'ne' => 1, 'nei' => 1, 'nen' => 1, 'neng' => 1,
+ 'ni' => 1, 'nian' => 1, 'niang' => 1, 'niao' => 1, 'nie' => 1,
+ 'nin' => 1, 'ning' => 1, 'niu' => 1, 'nong' => 1, 'nou' => 1,
+ 'nu' => 1, 'nuan' => 1, 'nun' => 1, 'nuo' => 1,
+ 'nü' => 1, 'nüe' => 1,
+ 'o' => 1, 'ong' => 1, 'ou' => 1,
+ 'pa' => 1, 'pai' => 1, 'pan' => 1, 'pang' => 1, 'pao' => 1,
+ 'pei' => 1, 'pen' => 1, 'peng' => 1,
+ 'pi' => 1, 'pian' => 1, 'piao' => 1, 'pie' => 1, 'pin' => 1,
+ 'ping' => 1, 'po' => 1, 'pou' => 1, 'pu' => 1,
+ 'qi' => 1, 'qia' => 1, 'qian' => 1, 'qiang' => 1, 'qiao' => 1, 'qie' => 1,
+ 'qin' => 1, 'qing' => 1, 'qiong' => 1, 'qiu' => 1,
+ 'qu' => 1, 'quan' => 1, 'que' => 1, 'qun' => 1,
+ 'ran' => 1, 'rang' => 1, 'rao' => 1, 're' => 1, 'ren' => 1,
+ 'ri' => 1, 'rong' => 1, 'rou' => 1,
+ 'ru' => 1, 'ruan' => 1, 'rui' => 1, 'run' => 1, 'ruo' => 1,
+ 'sa' => 1, 'sai' => 1, 'san' => 1, 'sang' => 1, 'sao' => 1,
+ 'se' => 1, 'sen' => 1, 'seng' => 1,
+ 'sha' => 1, 'shai' => 1, 'shan' => 1, 'shang' => 1, 'shao' => 1,
+ 'she' => 1, 'shei' => 1, 'shen' => 1, 'sheng' => 1, 'shi' => 1,
+ 'shou' => 1, 'shu' => 1, 'shua' => 1, 'shuai' => 1, 'shuan' => 1,
+ 'shuang' => 1, 'shui' => 1, 'shun' => 1, 'shuo' => 1,
+ 'si' => 1, 'song' => 1, 'sou' => 1, 'su' => 1, 'suan' => 1, 'sui' => 1,
+ 'sun' => 1, 'suo' => 1,
+ 'ta' => 1, 'tai' => 1, 'tan' => 1, 'tang' => 1, 'tao' => 1,
+ 'te' => 1, 'teng' => 1,
+ 'ti' => 1, 'tian' => 1, 'tiao' => 1, 'tie' => 1, 'ting' => 1,
+ 'tong' => 1, 'tou' => 1,
+ 'tu' => 1, 'tuan' => 1, 'tui' => 1, 'tun' => 1, 'tuo' => 1,
+ 'wa' => 1, 'wai' => 1, 'wan' => 1, 'wang' => 1,
+ 'wei' => 1, 'wen' => 1, 'weng' => 1, 'wo' => 1, 'wu' => 1,
+ 'xi' => 1, 'xia' => 1, 'xian' => 1, 'xiang' => 1, 'xiao' => 1,
+ 'xie' => 1, 'xin' => 1, 'xing' => 1, 'xiong' => 1, 'xiu' => 1,
+ 'xu' => 1, 'xuan' => 1, 'xue' => 1, 'xun' => 1,
+ 'ya' => 1, 'yai' => 1, 'yan' => 1, 'yang' => 1, 'yao' => 1,
+ 'ye' => 1, 'yi' => 1, 'yin' => 1, 'ying' => 1,
+ 'yo' => 1, 'yong' => 1, 'you' => 1,
+ 'yu' => 1, 'yuan' => 1, 'yue' => 1, 'yun' => 1,
+ 'za' => 1, 'zai' => 1, 'zan' => 1, 'zang' => 1, 'zao' => 1,
+ 'ze' => 1, 'zei' => 1, 'zen' => 1, 'zeng' => 1,
+ 'zha' => 1, 'zhai' => 1, 'zhan' => 1, 'zhang' => 1, 'zhao' => 1,
+ 'zhe' => 1, 'zhei' => 1, 'zhen' => 1, 'zheng' => 1, 'zhi' => 1,
+ 'zhong' => 1, 'zhou' => 1, 'zhu' => 1, 'zhua' => 1, 'zhuai' => 1,
+ 'zhuan' => 1, 'zhuang' => 1, 'zhui' => 1, 'zhun' => 1, 'zhuo' => 1,
+ 'zi' => 1, 'zong' => 1, 'zou' => 1, 'zu' => 1, 'zuan' => 1,
+ 'zui' => 1, 'zun' => 1, 'zuo' => 1,
+ );
+
+########################################################################
+# Unicode variables for utf8 tty (nroff)
+########################################################################
+
+my %tones1_Unicode =
+ (
+ 'A' => q(\\[u0100]),
+ 'E' => q(\\[u0112]),
+ 'I' => q(\\[u012A]),
+ 'O' => q(\\[u014C]),
+ 'U' => q(\\[u016A]),
+ 'Ü' => q(\\[u01D5]),
+ 'a' => q(\\[u0101]),
+ 'e' => q(\\[u0113]),
+ 'i' => q(\\[u012B]),
+ 'o' => q(\\[u014D]),
+ 'u' => q(\\[u016B]),
+ 'ü' => q(\\[u01D6]),
+ );
+
+my %tones2_Unicode =
+ (
+ 'A' => q(\\[u00C1]),
+ 'E' => q(\\[u00C9]),
+ 'I' => q(\\[u00CD]),
+ 'O' => q(\\[u00D3]),
+ 'U' => q(\\[u00DA]),
+ 'Ü' => q(\\[u01D7]),
+ 'a' => q(\\[u00E1]),
+ 'e' => q(\\[u00E9]),
+ 'i' => q(\\[u00ED]),
+ 'o' => q(\\[u00F3]),
+ 'u' => q(\\[u00FA]),
+ 'ü' => q(\\[u01D8]),
+ );
+
+my %tones3_Unicode =
+ (
+ 'A' => q(\\[u01CD]),
+ 'E' => q(\\[u011A]),
+ 'I' => q(\\[u01CF]),
+ 'O' => q(\\[u01D1]),
+ 'U' => q(\\[u01D3]),
+ 'Ü' => q(\\[u01D9]),
+ 'a' => q(\\[u01CE]),
+ 'e' => q(\\[u011B]),
+ 'i' => q(\\[u01D0]),
+ 'o' => q(\\[u01D2]),
+ 'u' => q(\\[u01D4]),
+ 'ü' => q(\\[u01DA]),
+ );
+
+my %tones4_Unicode =
+ (
+ 'A' => q(\\[u00C0]),
+ 'E' => q(\\[u00C8]),
+ 'I' => q(\\[u00CC]),
+ 'O' => q(\\[u00D2]),
+ 'U' => q(\\[u00D9]),
+ 'Ü' => q(\\[u01DB]),
+ 'a' => q(\\[u00E0]),
+ 'e' => q(\\[u00E8]),
+ 'i' => q(\\[u00EC]),
+ 'o' => q(\\[u00F2]),
+ 'u' => q(\\[u00F9]),
+ 'ü' => q(\\[u01DC]),
+ );
+
+
+########################################################################
+# glyph variables for troff
+########################################################################
+
+#my $tone1_macron = '\\[a-]';
+#my $tone2_acute = '\\[aa]';
+#my $tone3_caron = '\\[ah]';
+#my $tone4_grave = '\\[ga]';
+my @accents = ( '', '\\[a-]', '\\[aa]', '\\[ah]', '\\[ga]', );
+
+my %tones2_glyphs =
+ (
+ 'A' => q(\\['A]),
+ 'E' => q(\\['E]),
+ 'I' => q(\\['I]),
+ 'O' => q(\\['O]),
+ 'U' => q(\\['U]),
+ 'a' => q(\\['a]),
+ 'e' => q(\\['e]),
+ '\\[.i]' => q(\\['i]),
+ 'o' => q(\\['o]),
+ 'u' => q(\\['u]),
+ );
+
+my %tones4_glyphs =
+ (
+ 'A' => q(\\[`A]),
+ 'E' => q(\\[`E]),
+ 'I' => q(\\[`I]),
+ 'O' => q(\\[`O]),
+ 'U' => q(\\[`U]),
+ 'a' => q(\\[`a]),
+ 'e' => q(\\[`e]),
+ '\\[.i]' => q(\\[`i]),
+ 'o' => q(\\[`o]),
+ 'u' => q(\\[`u]),
+ );
+
+
+
+########################################################################
+# subs
+########################################################################
+
+# Pinyin consists of syllables with a final number to be translated
+# into an accent. Such numbered syllables are combined into words.
+# Such words can have a final punctuation. A line is a collection of
+# such words.
+
+my @roffs = ( 'n',
+ 't',
+ );
+
+########################################################################
+sub err {
+ my $s = shift;
+ print STDERR $s;
+ 1;
+} # err()
+
+
+########################################################################
+sub handle_line {
+ my $starting_blanks = shift;
+ my $line = shift;
+
+#&err('handle_line start: ' . $line);
+
+ my %outline = ( 'n' => $starting_blanks, 't' => $starting_blanks, );
+
+ # transform to Ü only for inside of Perl
+ $line =~ s/\\
+ \(:U
+ /Ü/gx;
+ $line =~ s/\\
+ \[:U\]
+ /Ü/gx;
+
+# handle_line()
+
+ # transform to ü only for inside of Perl
+ $line =~ s/\\
+ \(:u
+ /ü/gx;
+ $line =~ s/\\
+ \[:u\]
+ /ü/gx;
+
+ $line =~ s/U[eE]/Ü/g;
+ $line =~ s/u[eE]/ü/g;
+
+ $line =~ s/\\\(aq/'/g; # \(aq is an apostrophe
+ $line =~ s/\\\[aq\]/'/g; # \[aq] is an apostrophe
+ $line =~ s/^[']//; # remove leading apostrophe
+ $line =~ s/[']$//; # remove final apostrophe
+ $line =~ s/['][']+/'/g; # combine apostrophe groups
+ $line =~ s/([0-4])'/$1/;
+ $line =~ s/([^0-4])'/${1}0/;
+
+ my @words = split /\s+/, $line;
+
+
+# handle_line()
+ for my $word ( @words ) {
+#&err('handle_line word: ' . $word);
+
+ next unless ( $word );
+
+ # this is a word, maybe composed of several syllables
+ my $punctuation = $1 if ( $word =~ s/([,.?!:;]*)$// );
+ # '$word' is now without punctuation
+
+ my %outword = &handle_word($word);
+ next unless ( %outword );
+
+ for my $roff ( @roffs ) {
+#&err('handle_line roff ' . $roff . ': ' . $outword{$roff});
+
+ # combine words to line
+ next unless ( $outword{$roff} );
+
+ # non-initial space
+ $outline{$roff} .= ' ' if ( $outline{$roff} );
+
+ $outline{$roff} .= $outword{$roff};
+ $outline{$roff} .= $punctuation;
+ }
+ }
+#for my $roff ( @roffs ) {
+#&err('handle_line end ' . $roff . ': ' . $outline{$roff});
+#}
+ return %outline;
+} # handle_line()
+
+
+########################################################################
+sub handle_word {
+ my $word = shift;
+#&err('handle_word start: ' . $word);
+
+ $word =~ s/5/0/g; # transform 5 to 0
+ $word =~ s/([^0-4])$/${1}0/; # add lacking final no-tone
+
+ # remove apostrophes with tone
+ $word =~ s/
+ ([0-4])
+ [']
+ /$1/gx;
+ # replace apostrophes without tone by 0
+ $word =~ s/
+ ([^0-4])
+ [']
+ /${1}0/gx;
+
+# handle_word()
+ # detect wrong tone numbers
+ if ( $word =~ s/[5-9]/0/g ) {
+ &err('word ' . $word . ': wrong tone number ' . $1);
+ return {};
+ }
+
+ $word =~ s/[']//g; # remove apostrophes
+
+ # remove starting apostrophe or number
+ $word =~ s/^(['0-4])+//;
+
+ # add 0 for final no-tone
+ $word .= '0' if ( $word =~ /[^0-4]$/ );
+
+ if ( $word =~ /^[0-9]/ ) { # word starts with number
+ print 'word: ' . $word . ' starts with tone number';
+ $word =~ s/^[0-9]+//;
+ }
+#&err('handle_word 0: ' . $word);
+
+# handle_word()
+
+ my %outword = ( 'n' => '', 't' => '', );
+
+ # split word into syllables
+ while ( $word =~ /^[a-zA-ZüÜ']/ ) {
+ $word =~ s/^([a-zA-ZüÜ']+)([0-4])//;
+ my $syll = $1;
+ my $tone = $2;
+#err('handle_word split: ' . $syll . ' ' . $tone);
+ my %outsyll = &handle_syll( $syll, $tone );
+ next unless ( %outsyll );
+ for my $roff ( @roffs ) {
+ my $out = $outsyll{$roff};
+ $out = '\\[cq]' . $out if ( $out && $out =~ /^[aeo]/ );
+ $outword{$roff} .= $out;
+#&err('handle_word ' . $roff . ': ' . $outword{$roff});
+ }
+ }
+ return %outword;
+} # handle_word()
+
+
+########################################################################
+sub handle_syll {
+ my $syll = shift;
+ my $tone = shift;
+#&err( 'handle_syll start: ' . $syll . ' ' . $tone);
+
+ my $lower_case = lc($syll);
+ $lower_case =~ s/Ü/ü/g;
+ unless ( exists($syllables{$lower_case}) ) {
+ err('The syllable ' . $syll . ' is not a Chinese syllable.');
+ return {};
+ }
+
+ my %outsyll = ( 'n' => '', 't' => '', );
+
+ if ( $tone == 0 ) { # no accent
+ # use u umlaut without accent
+ $syll =~ s/Ü/\\[:U]/g;
+ $syll =~ s/ü/\\[:u]/g;
+
+ for my $roff ( @roffs ) {
+ $outsyll{$roff} = $syll;
+#&err('handle_syll 0 outsyll ' . $roff . ': ' . $outsyll{$roff});
+ }
+ return %outsyll;
+ } # end of tone 0
+
+# handle_syll()
+
+ # split syllable
+ $syll =~
+ /^
+ ([a-zA-Z]*)
+ ([aeiouAEIOUüÜ]+)
+ ([a-zA-Z]*)
+ $/x;
+ my $initial = $1;
+ my $vowels = $2;
+ my $final = $3;
+ unless ( $vowels ) {
+ &err( 'Syllable ' . $syll . ' does not have vowels' );
+ return {};
+ }
+
+ # split vowels
+ my $vowels_before = '';
+ my $vowel = '';
+ my $vowels_after = '';
+
+# handle_syll()
+
+ # find vowel for accent
+ if ( $vowels =~ /^[aeiouAEIOU]$/ ) { # only 1 vowel
+#&err('handle_syll single vowel ' . $vowels);
+ $vowel = $vowels;
+ } elsif ( $vowels eq 'ü' ) {
+ $vowel = $vowels;
+ } elsif ( $vowels eq 'Ü' ) {
+ $vowel = $vowels;
+ } elsif ( $vowels =~ /^([^aeAE]*)([aeAE])(.*)$/ ) { # a, A, e or E
+ $vowels_before = $1;
+ $vowel = $2;
+ $vowels_after = $3;
+ } elsif ( $vowels =~ /^([^oO]*)(oO)(.*)$/ ) { # o or O
+ $vowels_before = $1;
+ $vowel = $2;
+ $vowels_after = $3;
+ } elsif ( $vowels =~ /^(\w)(\w)(.*)$/ ) { # take 2nd vowel
+ $vowels_before = $1;
+ $vowel = $2;
+ $vowels_after = $3;
+ } else {
+ &err( 'Unknown vowels: ' . $vowels . ' in syllable: ' . $syll );
+ return {};
+ }
+
+# unless ( $vowel =~ /^[aeiouAEIOU]$/ ) {
+# print STDERR q(The argument ') . $vowel . q(' is not a vowel!);
+# return {};
+# }
+
+# handle_syll()
+
+ $outsyll{'n'} = &vowel_n($vowel, $tone);
+ $outsyll{'t'} = &vowel_t($vowel, $tone);
+
+ for my $roff ( @roffs ) {
+ $outsyll{$roff} = $initial . $vowels_before .
+ $outsyll{$roff} . $vowels_after . $final;
+#&err('handle_syll out ' . $roff . ': ' . $outsyll{$roff});
+ }
+
+ return %outsyll;
+} # handle_syll()
+
+
+########################################################################
+sub vowel_n { # Unicode for nroff
+ my $vowel = shift;
+ my $tone = shift;
+#&err('vowel_n: ' . $vowel . ' ' . $tone);
+
+ return '' unless ( $vowel );
+
+ my $vowel_with_tone;
+ if ( $tone == 1 ) { # macron
+ $vowel_with_tone = $tones1_Unicode{$vowel};
+ } elsif ( $tone == 2 ) { # acute
+ $vowel_with_tone = $tones2_Unicode{$vowel};
+ } elsif ( $tone == 3 ) { # caron
+ $vowel_with_tone = $tones3_Unicode{$vowel};
+ } elsif ( $tone == 4 ) { # grave
+ $vowel_with_tone = $tones4_Unicode{$vowel};
+ }
+ $vowel_with_tone or warn "failed to apply tone $tone to vowel $vowel";
+ return $vowel_with_tone;
+} # vowel_nr()
+
+
+########################################################################
+sub vowel_t { # named glyphs for troff
+ my $vowel = shift;
+ my $tone = shift;
+#&err( 'vowel_t: ' . $vowel . ' ' . $tone);
+
+ return '' unless ( $vowel );
+
+ # \o'\s-2\[:u]\s0\[a-]'
+ if ( $vowel =~ /[üÜ]/ ) {
+ my ($ue, $smaller);
+ if ($vowel eq 'ü') {
+ $ue = q(\\[:u]);
+ $smaller = 2;
+ } else {
+ $ue = q(\\[:U]);
+ $smaller = 4;
+ }
+ $vowel = q(\\o'\\s-) . $smaller . $ue . q(\\s0) .
+ $accents[$tone] . q(');
+ return $vowel;
+ }
+
+ $vowel = q(\\[.i]) if ( $vowel eq 'i' );
+
+ my $vowel_with_tone;
+ if ( $tone == 1 ) { # macron
+ $vowel_with_tone = q(\\o') . $vowel . $accents[$tone] . q(');
+ } elsif ( $tone == 2 ) { # acute
+ $vowel_with_tone = $tones2_glyphs{$vowel};
+ } elsif ( $tone == 3 ) { # caron
+ $vowel_with_tone = q(\\o') . $vowel . $accents[$tone] . q(');
+ } elsif ( $tone == 4 ) { # grave
+ $vowel_with_tone = $tones4_glyphs{$vowel};
+ }
+ $vowel_with_tone or warn "failed to apply tone $tone to vowel $vowel";
+ return $vowel_with_tone;
+} # vowel_t()
+
+
+########################################################################
+sub finish_pinyin_mode {
+#&err( 'finish' );
+ my $n = shift;
+ my $t = shift;
+ push @$n, '\\}';
+ push @$t, '\\}';
+
+ for ( @$n ) { # Unicode for nroff
+ print;
+ }
+
+ for ( @$t ) { # glyphs for troff
+ print;
+ }
+
+ 1;
+} # finish_pinyin_mode()
+
+
+########################################################################
+# options
+########################################################################
+
+foreach (@ARGV) {
+ if ( /^(-h|--h|--he|--hel|--help)$/ ) {
+ print q(Usage for the 'gpinyin' program:);
+ print 'gpinyin [-] [--] [filespec...] normal file name arguments';
+ print 'gpinyin [-h|--help] gives usage information';
+ print 'gpinyin [-v|--version] displays the version number';
+ print q(This program is a 'groff' preprocessor that handles ) .
+ q(pinyin parts in 'roff' files.);
+ exit;
+ } elsif (/^(-v|--v|--ve|--ver|--vers|--versi|--versio|--version)$/) {
+ print "gpinyin ${groff_version}version $version";
+ exit;
+ }
+}
+
+
+########################################################################
+# input
+########################################################################
+
+my $pinyin_mode = 0; # not in Pinyin mode
+
+my @output_n = # nroff
+ (
+ '.ie n \\{\\',
+ );
+
+my @output_t = # troff
+ (
+ '.el \\{\\',
+ );
+
+unshift @ARGV, '-' unless @ARGV;
+foreach my $filename (@ARGV) {
+ my $input;
+ if ($filename eq '-') {
+ $input = \*STDIN;
+ } elsif (not open $input, '<', $filename) {
+ warn $!;
+ next;
+ }
+ while (<$input>) {
+ chomp;
+ s/\s+$//; # remove final spaces
+# &err('gpinyin: ' . $_);
+
+ my $line = $_; # with starting blanks
+
+ # .pinyin start or begin line
+ if ( $line =~ /^[.']\s*pinyin\s+(start|begin)$/ ) {
+ if ( $pinyin_mode ) {
+ # '.pinyin' was started twice, ignore
+ &err( q['.pinyin' starter was run several times] );
+ } else { # new pinyin start
+ $pinyin_mode = 1;
+ }
+ next;
+ }
+
+ # .pinyin stop or end line
+ if ( $line =~ /^[.']\s*pinyin\s+(stop|end)$/ ) {
+ if ( $pinyin_mode ) { # normal stop
+ $pinyin_mode = 0;
+ &finish_pinyin_mode( \@output_n, \@output_t );
+ } else { # ignore
+ &err( 'gpinyin: there was a .pinyin stop without ' .
+ 'being in pinyin mode' );
+ }
+ next;
+ }
+
+ # now not a .pinyin line
+
+
+ if ( $pinyin_mode ) { # within Pinyin
+ my $starting_blanks = '';
+ $starting_blanks = $1 if ( s/^(s+)// ); # handle starting spaces
+
+ my %outline = &handle_line($starting_blanks, $line);
+# &err('gpinyin outline n: ' . $outline{'n'} );
+# &err('gpinyin outline t: ' . $outline{'t'} );
+ push @output_n, $outline{'n'};
+ push @output_t, $outline{'t'};
+ } else { # normal roff line, not within Pinyin
+ print $line;
+ }
+ next;
+ } # end of input line
+}
+
+
+########################################################################
+# end of file without stopping 'pinyin' mode
+if ( $pinyin_mode ) {
+ &finish_pinyin_mode( \@output_n, \@output_t );
+}
+
+########################################################################
+
+
+1;
+# Local Variables:
+# fill-column: 72
+# mode: CPerl
+# End:
+# vim: set autoindent textwidth=72:
diff --git a/contrib/grap2graph/grap2graph.1.man b/contrib/grap2graph/grap2graph.1.man
new file mode 100644
index 0000000..e7e87f3
--- /dev/null
+++ b/contrib/grap2graph/grap2graph.1.man
@@ -0,0 +1,205 @@
+.TH grap2graph @MAN1EXT@ "@MDATE@" "groff @VERSION@"
+.SH Name
+grap2graph \- convert a
+.I grap
+diagram into a cropped image
+.
+.
+.\" ====================================================================
+.\" Legal Terms
+.\" ====================================================================
+.\"
+.\" This documentation is released to the public domain.
+.
+.
+.\" Save and disable compatibility mode (for, e.g., Solaris 10/11).
+.do nr *groff_grap2graph_1_man_C \n[.cp]
+.cp 0
+.
+.\" Define fallback for groff 1.23's MR macro if the system lacks it.
+.nr do-fallback 0
+.if !\n(.f .nr do-fallback 1 \" mandoc
+.if \n(.g .if !d MR .nr do-fallback 1 \" older groff
+.if !\n(.g .nr do-fallback 1 \" non-groff *roff
+.if \n[do-fallback] \{\
+. de MR
+. ie \\n(.$=1 \
+. I \%\\$1
+. el \
+. IR \%\\$1 (\\$2)\\$3
+. .
+.\}
+.rr do-fallback
+.
+.
+.\" ====================================================================
+.SH Synopsis
+.\" ====================================================================
+.
+.SY grap2graph
+.RB [ \-unsafe ]
+.RB [ \-format\~\c
+.IR output-format ]
+.RI [ convert-argument \~.\|.\|.]
+.YS
+.
+.
+.SY grap2graph
+.B \-\-help
+.YS
+.
+.
+.SY grap2graph
+.B \-v
+.
+.SY grap2graph
+.B \-\-version
+.YS
+.
+.
+.\" ====================================================================
+.SH Description
+.\" ====================================================================
+.
+.I grap2graph
+reads a
+.MR grap 1
+program from the standard input and writes an image file,
+by default in Portable Network Graphics (PNG) format,
+to the standard output.
+.
+.
+.PP
+The input GRAP code should
+.I not
+be wrapped with the
+.B .G1
+and
+.B .G2
+macros that normally guard it within
+.MR groff @MAN1EXT@
+documents.
+.
+.
+.\" FIXME: How old? This text hasn't been touched since 2008 at latest.
+.\" Older versions of
+.\" .I \%convert
+.\" will produce a black-on-white graphic; newer ones may produce a
+.\" black-on-transparent graphic.
+.
+.PP
+Arguments not recognized by
+.I grap2graph
+are passed to the ImageMagick or GraphicsMagick program
+.MR convert 1 .
+.
+.
+By specifying these, you can give your image a border,
+.\" Transparent backgrounds are the default in 2018.
+.\" force the background transparent,
+set the image's pixel density,
+or perform other useful transformations.
+.
+.
+.PP
+The output image is clipped using
+.IR \%convert 's
+.B \-trim
+option to the smallest possible bounding box that contains all the black
+pixels.
+.
+.
+.\" ====================================================================
+.SH Options
+.\" ====================================================================
+.
+.B \-\-help
+displays a usage message,
+while
+.B \-v
+and
+.B \-\-version
+show version information;
+all exit afterward.
+.
+.
+.TP
+.BI \-format\~ output-format
+Write the image in
+.IR output-format ,
+which must be understood by
+.IR \%convert ;
+the default is PNG.
+.
+.
+.TP
+.B \-unsafe
+Run
+.I groff
+in
+.I unsafe
+mode, enabling the PIC command
+.B sh
+to execute arbitrary Unix shell commands.
+.
+The
+.I groff
+default is to forbid this.
+.
+.
+.\" ====================================================================
+.SH Environment
+.\" ====================================================================
+.
+.TP
+.I \%GROFF_TMPDIR
+.TQ
+.I \%TMPDIR
+.TQ
+.I TMP
+.TQ
+.I TEMP
+These environment variables are searched in the given order to determine
+the directory where temporary files will be created.
+.
+If none are set,
+.I /tmp
+is used.
+.
+.
+.\" ====================================================================
+.SH Authors
+.\" ====================================================================
+.
+.I grap2graph
+was written by
+.MT esr@\:thyrsus\:.com
+Eric S.\& Raymond
+.ME ,
+based on a recipe for
+.MR pic2graph @MAN1EXT@ ,
+by W.\& Richard Stevens.
+.
+.
+.\" ====================================================================
+.SH "See also"
+.\" ====================================================================
+.
+.MR pic2graph @MAN1EXT@ ,
+.MR eqn2graph @MAN1EXT@ ,
+.MR grap 1 ,
+.MR @g@pic @MAN1EXT@ ,
+.MR groff @MAN1EXT@ ,
+.MR convert 1
+.
+.
+.\" Restore compatibility mode (for, e.g., Solaris 10/11).
+.cp \n[*groff_grap2graph_1_man_C]
+.do rr *groff_grap2graph_1_man_C
+.
+.
+.\" Local Variables:
+.\" fill-column: 72
+.\" mode: nroff
+.\" End:
+.\" vim: set filetype=groff textwidth=72:
diff --git a/contrib/grap2graph/grap2graph.am b/contrib/grap2graph/grap2graph.am
new file mode 100644
index 0000000..6025aa2
--- /dev/null
+++ b/contrib/grap2graph/grap2graph.am
@@ -0,0 +1,40 @@
+# Copyright (C) 2003-2020 Free Software Foundation, Inc.
+#
+# This file is part of groff.
+#
+# groff is free software; 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.
+#
+# groff is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+# grap2graph.am
+#
+
+grap2graph_srcdir = $(top_srcdir)/contrib/grap2graph
+bin_SCRIPTS += grap2graph
+man1_MANS += contrib/grap2graph/grap2graph.1
+EXTRA_DIST += \
+ $(grap2graph_srcdir)/grap2graph.sh \
+ $(grap2graph_srcdir)/grap2graph.1.man
+
+grap2graph: $(grap2graph_srcdir)/grap2graph.sh
+ $(AM_V_GEN)sed -e "s|[@]g[@]|$(g)|g" \
+ -e "s|[@]VERSION[@]|$(VERSION)|" \
+ -e $(SH_SCRIPT_SED_CMD) $(grap2graph_srcdir)/grap2graph.sh \
+ >$@ \
+ && chmod +x $@
+
+
+# Local Variables:
+# fill-column: 72
+# mode: makefile-automake
+# End:
+# vim: set autoindent filetype=automake textwidth=72:
diff --git a/contrib/grap2graph/grap2graph.sh b/contrib/grap2graph/grap2graph.sh
new file mode 100644
index 0000000..29df25b
--- /dev/null
+++ b/contrib/grap2graph/grap2graph.sh
@@ -0,0 +1,107 @@
+#! /bin/sh
+#
+# grap2graph -- compile graph description descriptions to bitmap images
+#
+# by Eric S. Raymond <esr@thyrsus.com>, May 2003
+#
+# In Unixland, the magic is in knowing what to string together...
+#
+# Take grap description on stdin, emit cropped bitmap on stdout.
+# The grap markup should *not* be wrapped in .G1/.G2, this script will do that.
+# A -U option on the command line enables gpic/groff "unsafe" mode.
+# A -format FOO option changes the image output format to any format
+# supported by convert(1). All other options are passed to convert(1).
+# The default format is PNG.
+#
+
+# Requires the groff suite and the ImageMagick tools. Both are open source.
+# This code is released to the public domain.
+#
+# Here are the assumptions behind the option processing:
+#
+# 1. None of the options of grap(1) are relevant.
+#
+# 2. Only the -U option of groff(1) is relevant.
+#
+# 3. Many options of convert(1) are potentially relevant, (especially
+# -density, -interlace, -transparency, -border, and -comment).
+#
+# Thus, we pass -U to groff(1), and everything else to convert(1).
+#
+groff_opts=""
+convert_opts=""
+convert_trim_arg="-trim"
+format="png"
+
+while [ "$1" ]
+do
+ case $1 in
+ -unsafe)
+ groff_opts="-U";;
+ -format)
+ format=$2
+ shift;;
+ -v | --version)
+ echo "GNU grap2graph (groff) version @VERSION@"
+ exit 0;;
+ --help)
+ echo "usage: grap2graph [ option ...] < in > out"
+ exit 0;;
+ *)
+ convert_opts="$convert_opts $1";;
+ esac
+ shift
+done
+
+# create temporary directory
+tmp=
+for d in "$GROFF_TMPDIR" "$TMPDIR" "$TMP" "$TEMP" /tmp
+do
+ test -n "$d" && break
+done
+
+if ! test -d "$d"
+then
+ echo "$0: error: temporary directory \"$d\" does not exist or is" \
+ "not a directory" >&2
+ exit 1
+fi
+
+if ! tmp=`(umask 077 && mktemp -d -q "$d/grap2graph-XXXXXX") 2> /dev/null`
+then
+ # mktemp failed--not installed or is a version that doesn't support those
+ # flags? Fall back to older method which uses more predictable naming.
+ #
+ # $RANDOM is a Bashism. The fallback of $PPID is not good pseudorandomness,
+ # but is supported by the stripped-down dash shell, for instance.
+ tmp="$d/grap2graph$$-${RANDOM:-$PPID}"
+ (umask 077 && mkdir "$tmp") 2> /dev/null
+fi
+
+if ! test -d "$tmp"
+then
+ echo "$0: error: cannot create temporary directory \"$tmp\"" >&2
+ exit 1
+fi
+
+# See if the installed version of convert(1) is new enough to support the -trim
+# option. Versions that didn't were described as "old" as early as 2008.
+is_convert_recent=`convert -help | grep -e -trim`
+if test -z "$is_convert_recent"
+then
+ echo "$0: warning: falling back to old '-crop 0x0' trim method" >&2
+ convert_trim_arg="-crop 0x0"
+fi
+
+trap 'exit_status=$?; rm -rf "$tmp" && exit $exit_status' EXIT INT TERM
+
+# Here goes:
+# 1. Add .G1/.G2.
+# 2. Process through grap(1) to emit pic markup.
+# 3. Process through groff(1) with pic preprocessing to emit Postscript.
+# 4. Use convert(1) to crop the Postscript and turn it into a bitmap.
+(echo ".G1"; cat; echo ".G2") | grap | groff -p $groff_opts -Tps -P-pletter | \
+ convert -trim $convert_opts - "$tmp"/grap2graph.$format \
+ && cat "$tmp"/grap2graph.$format
+
+# End
diff --git a/contrib/hdtbl/ChangeLog b/contrib/hdtbl/ChangeLog
new file mode 100644
index 0000000..a0a1e8d
--- /dev/null
+++ b/contrib/hdtbl/ChangeLog
@@ -0,0 +1,548 @@
+2022-06-21 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * hdtbl.am (HDTBLPROCESSEDEXAMPLEFILES): Add dependency on
+ grops.
+
+2022-05-01 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * hdtbl.am (HDTBLPROCESSEDEXAMPLEFILES): Add dependency on devps
+ stamp file since the files' target rule generates PostScript
+ with groff.
+
+2022-04-12 Ingo Schwarze <schwarze@openbsd.org>
+
+ Delete the harmful, ill-designed, buggy, and essentially
+ unmaintained and untested --with-doc option of the configure
+ script. See the NEWS file for more details on the rationale.
+
+ * hdtbl.am: Delete two BUILD_EXAMPLES conditionals.
+
+2022-03-30 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * hdtbl.am: Eliminate `HDTBL_TFLAG` and `HDTBL_PFLAG` Make
+ macros; they were expanded in only one place.
+ (HDTBLGROFF): Track rename of Make macro `TFLAG` to `MFLAG`.
+
+2022-03-30 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * examples/mixed_pickles.ms: Die horribly if `PSPIC` call fails.
+
+2022-03-26 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * hdtbl.am (nodist_hdtblexample_DATA,
+ HDTBLPROCESSEDEXAMPLEFILES): Replace hard-coded "gnu.eps" file
+ name with expansion of `DOC_GNU_EPS`.
+ (HDTBLPROCESSEDEXAMPLEFILES): Pass `-I` option to `HDTBLGROFF`
+ to enable location of "gnu.eps" file (for "mixedpickles.roff"
+ document).
+
+2021-10-21 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * hdtbl.am:
+ (hdtbl_test_template): Pull file name into a new variable.
+ (EXTRA_DIST, contrib/hdtbl/examples/test-hdtbl.sh): Use it.
+ (contrib/hdtbl/examples/test-hdtbl.sh): Build more quietly;
+ prefix rule with `$(AM_V_GEN)`. Also run `chmod` conditionally.
+
+2021-07-11 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * hdtbl.am: Remove unnecessary Make variable.
+ (hdtbl_builddir): Delete.
+ (HDTBL_TFLAG): Remove `-M$(hdtbl_builddir)` option; it's no
+ longer needed for hdtbl example document generation needed now
+ that hdtbl is no longer stripped.
+
+2021-07-01 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ Skip the stripper, part 2/3 ("hdtbl").
+
+ * hdmisc.tmac-u: Rename to...
+ * hdmisc.tmac: ...this.
+
+ * hdtbl.tmac-u: Rename to...
+ * hdtbl.tmac: ...this.
+
+ * hdtbl.am (HDSTRIPFILES): Rename to...
+ (HDTBLTMACFILES): ...this.
+ (hdtbltmac_DATA): Rename to...
+ (dist_hdtbltmac_DATA): ...this.
+ (MOSTLYCLEANFILES): Drop $(HDTBLSTRIPFILES).
+ ($(HDTBLSTRIPFILES)): Drop target.
+
+2018-12-26 Ingo Schwarze <schwarze@openbsd.org>
+
+ A missing prerequisite could cause parallel builds to fail.
+
+ * hdtbl.am (HDTBLPROCESSEDEXAMPLEFILES): requires eqn
+ because the .roff.ps target runs HDTBLGROFF =
+ GROFFBIN ... HDTBL_PFLAG = groff ... -t -p -e -U
+ which includes -e.
+
+2018-12-06 Ingo Schwarze <schwarze@openbsd.org>
+
+ * examples/fonts_n.in, examples/fonts_x.in:
+ Make the shell script in the .pso request more portable:
+ 1. POSIX requires "echo -n" to print "-n" followed by
+ a newline character, so use printf(1) instead.
+ 2. According to POSIX, behaviour of tr(1) is undefined
+ if string2 contains fewer characters than string1,
+ and on Oracle Solaris, the excess characters in string1
+ are not translated. So make sure string2 contains
+ a sufficient number of characters.
+
+2018-12-05 Bertrand Garrigues <bertrand.garrigues@laposte.net>
+
+ Skip tests if needed config is missing.
+
+ * examples/test-hdtbl.sh.in: exit 77 (indicates automake
+ to skip the result) if 'gs' is missing.
+
+ * hdtbl.am: flag correctly test program generation.
+
+2018-11-25 Bertrand Garrigues <bertrand.garrigues@laposte.net>
+
+ Clean hdtbl.am
+
+ * hdtbl.am (MOSTLYCLEANFILES): Remove 'hdmisc.tmac-s'
+ and 'hdtbl.tmac-s' (these files are no longer present).
+
+ Fixes https://savannah.gnu.org/bugs/index.php?55083, reported by
+ Bjarni Ingi Gislason <bjarniig@rhi.hi.is>.
+
+2018-11-13 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ Don't clean other people's unit tests.
+
+ * hdtbl.am: test-hdtbl.sh is generated from an .in file,
+ so while we can add it to $(TESTS), we shouldn't then add
+ $(TESTS) to $(MOSTLYCLEANFILES) or we will clobber all tests
+ that ever get defined. This clobbered gdiffmk's test script on
+ in-tree builds. Give it its own variable, $(hdtbl_TESTS).
+ Now it clobbers no more.
+
+ Fixes <https://savannah.gnu.org/bugs/index.php?55020>.
+
+2018-11-12 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * hdtbl.am: Remove examples/test-hdtbl.sh on 'make distclean'.
+
+2018-11-07 Bertrand Garrigues <bertrand.garrigues@laposte.net>
+
+ Add a sanity check on 2 examples.
+
+ * examples/test-hdtbl.sh.in: new test script that uses 'gs'
+ to check the number of pages of 'fonts_x.ps' and 'fonts_n.ps'.
+
+ * hdtbl.am: connect 'test-hdtbl.sh' to 'make check'
+
+2018-08-09 Ingo Schwarze <schwarze@openbsd.org>
+
+ * examples/common.roff: Remove more dead code
+ since the date and time are no longer used.
+
+ Reported by Bjarni Ingi Gislason in Savannah bug #54461.
+
+2018-08-09 Ingo Schwarze <schwarze@openbsd.org>
+
+ * examples/common.roff, examples/col_rowspan_colors.roff,
+ examples/short_reference.roff: do forgotten renamings .pv -> .t*pv
+
+ Fixing it improves the formatting of all hdtbl examples.
+ Reported by Bjarni Ingi Gislason in Savannah bug #54470.
+
+2018-08-04 Ingo Schwarze <schwarze@openbsd.org>
+
+ * examples/*: delete the date and time macros
+ * examples/hdtbl.am: run groff without -U option
+
+2018-03-11 Colin Watson <cjwatson@debian.org>
+
+ Remove unnecessary randomness from example output.
+
+ The examples don't need good randomness, as they're only
+ example output; removing the process ID from consideration
+ allows better integration with reproducible builds.
+
+ * examples/common.roff (random-s1): Remove process ID.
+
+2018-02-28 Werner LEMBERG <wl@gnu.org>
+
+ * hdtbl.am (.roff.ps, .in.roff): Use $(GROFF_V) and $(AM_V_GEN).
+
+2017-11-30 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * examples/common.roff:
+ * examples/fonts_n.in:
+ * examples/fonts_x.in:
+ Make writers to stderr identify themselves.
+
+2017-11-19 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * examples/*.roff: Seed RNG.
+
+ * examples/col_rowspan_colors.roff:
+ * examples/color_boxes.roff:
+ * examples/color_nested_tables.roff:
+ * examples/color_table_cells.roff:
+ Support reproducible builds by seeding hdtbl's random
+ number generator (in examples/common.roff).
+
+ Fix issue https://savannah.gnu.org/bugs/?52462.
+
+2017-11-01 Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
+
+ hdtbl.tmac-u: Fix ignored escape sequence.
+
+ The escape '\c' ignores everything after it, except "\R...".
+
+ Fix bug https://savannah.gnu.org/bugs/?51609.
+
+2015-08-22 Bernd Warken <groff-bernd.warken-72@web.de>
+
+ * groff_hdtbl.7.man: Rename `groff_hdtbl.man'.
+
+ * hdtbl.am: Include renaming.
+
+2015-08-05 Bernd Warken <groff-bernd.warken-72@web.de>
+
+ * hdtbl.am: Add `Last update'. Setup Emacs mode.
+
+2015-04-03 Werner LEMBERG <wl@gnu.org>
+
+ Fix Savannah bug #44798.
+
+ * examples/fonts_n.in, examples/fonts_x.in: Use @EGREP@.
+
+ * hdtbl.am (.in.roff): Handle @EGREP@.
+
+2015-04-03 Werner LEMBERG <wl@gnu.org>
+
+ * groff_hdtbl.man: Make it work in compatibility mode.
+
+2013-09-03 Bernd Warken <groff-bernd.warken-72@web.de>
+
+ * all files in groff_hdtbl: Copying and Emacs setup.
+
+2014-03-29 Steffen Nurpmeso <sdaoden@yandex.com>
+
+ * Makefile.sub: Handle examples separately, controlled by
+ $(make{_,_install_,_uninstall_}examples).
+
+2013-02-06 Werner LEMBERG <wl@gnu.org>
+
+ * groff_hdtbl.man: Correct details on loading hdtbl.tmac.
+
+2013-02-04 Werner LEMBERG <wl@gnu.org>
+
+ * groff_hdtbl.man: Revised.
+
+2013-02-03 Bernd Warken <groff-bernd.warken-72@web.de>
+
+ * groff_hdtbl.man: Correct and extend this man-page.
+
+2012-09-20 Werner LEMBERG <wl@gnu.org>
+
+ Simplify environment handling.
+
+ Suggested by Ivan Shmakov <oneingray@gmail.com>.
+
+ * Makefile.sub (GROFF): Don't use export.
+
+2011-01-17 Werner LEMBERG <wl@gnu.org>
+
+ * examples/color_nested_tables.roff: Fix output.
+
+ Problem reported by Ulrich Sprlein <uqs@spoerlein.net>.
+
+2011-01-17 Ulrich Sprlein <uqs@spoerlein.net>
+
+ Don't make examples depend on bash.
+
+ * examples/common.roff, examples/fonts_n.in, examples/fonts_x.in:
+ s/bash/sh/.
+
+2010-02-09 Werner LEMBERG <wl@gnu.org>
+
+ Make example compilation work again if srcdir != builddir.
+
+ * Makefile.sub (.roff.ps): Define `sopath' groff string.
+
+ * examples/*.roff, examples/*.in: Use it so that .so finds its input
+ file.
+
+2010-02-08 Werner LEMBEARG <wl@gnu.org>
+
+ Fix handling of `common.roff'.
+
+ * Makefile.sub (MOSTLYCLEANADD): Don't handle `common.roff'.
+ (EXAMPLEFILES): Handle `common.roff'.
+
+2010-02-08 Larry Kollar <kollar@alltel.net>
+
+ Fix last patch and use `t*' prefix for all non-public stuff.
+ Other minor fixes.
+
+ * hdmisc.tmac (getarg, index, SP, P1, \n[s], \n[v], \n[hy], pv, DI):
+ Rename to...
+ (t*getarg, t*index, t*SP, t*P1, \n[t*s], \n[t*v], \n[t*hy], t*pv,
+ t*DI): This.
+ Update all callers.
+ (t*EM): New auxiliary macro (using stuff from
+ `examples/common.roff'.
+
+ * hdtbl.tmac (\n[t*v], \n[t*s], \n[t*hy], \n[t*l]): Initialize.
+ (\n[t*FN], \n[t*LN]): New number registers.
+
+ * examples/*.roff: Updated.
+ * examples/common.roff: Load `hdtbl.tmac' earlier.
+ Reinstall `HM' and `BM' traps.
+ Provide `SP' macros if not defined by other macro package.
+ (\n[p], \n[o]): Initialize.
+ (\*[t*HM], \*[t*BM]): Initialize.
+ (EM): Use `t*EM'.
+ Updated.
+
+ * examples/fonts_n.in, examples/fonts_x.in: Load
+ `examples/common.roff'.
+ Updated.
+
+ * groff_hdtbl.man: Document setup of default values.
+ Document `t*EM'.
+
+2010-01-23 Larry Kollar <kollar@alltel.net>
+
+ Break out example formatting to a separate file.
+
+ * hdmisc.tmac: Move example formatting stuff to...
+ * examples/common.roff: This new file.
+
+ * hdtbl.tmac (HM, t*HM, BM, t*BM): Remove.
+
+ * examples/*.roff: Include `common.roff'.
+
+ * groff_hdtbl.man: Remove references to `HM' and `BM'.
+
+ * Makefile.sub: Handle `examples/common.roff'.
+
+2009-04-05 Joachim Walsdorff <Joachim.Walsdorff@urz.uni-heidelberg.de>
+
+ * hdtbl.tmac (ETB, t*free): Correct two typos, fixing register
+ incrementation.
+
+2009-01-04 Werner LEMBERG <wl@gnu.org>
+
+ * Makefile.sub (CLEANADD): Add hdmisc.tmac-s and hdtbl.tmac-s.
+
+2009-01-03 Werner LEMBERG <wl@gnu.org>
+
+ * README: Renamed to...
+ * TODO: This, removing most of its contents.
+
+ * groff_hdtbl.man: Add customization info which was in file README.
+
+2008-01-04 Werner LEMBERG <wl@gnu.org>
+
+ * groff_hdtbl.man: Replace .MTO with .MT/.ME.
+ Don't include www.tmac.
+
+2006-11-17 Werner LEMBERG <wl@gnu.org>
+
+ * Makefile.sub (install_data): Depend on gnu.eps also.
+ (uninstall_sub): Remove gnu.eps also.
+
+2006-11-17 Werner LEMBERG <wl@gnu.org>
+
+ * hdmisc.tmac: Avoid loading itself more than once.
+ Load hdtbl.tmac unconditionally.
+ (\n[?], \n[*miscs]): Remove.
+ (random-s1): Use only 9 digits.
+
+ * hdtbl.tmac: Avoid loading itself more than once.
+ Load hdmisc.tmac unconditionally.
+ Load 62bit.tmac
+ (\n[*hdtbl]): Removed.
+ (t*cl): Prevent scaling overflow by using routines from 62bit.tmac.
+
+2006-11-15 Werner LEMBERG <wl@gnu.org>
+
+ * hdmisc.tmac (d2x): Use string array instead of `dzx' macro.
+ Improve error handling.
+ (dzx): Removed.
+ (random#): Rewrite to generate random numbers by itself instead of
+ using an external command.
+
+2006-11-06 Joachim Walsdorff <JWalsdorff@compuserve.de>
+
+ * hdmisc.tmac (\*[g]): Move definition back to...
+ * hdtbl.tmac: This file.
+ (TD, t*divs): Fix a bug with consecutive groups of spanned rows by
+ introducing string *rsp*\\*[#trc]. Reported by Barry Nisly.
+ (TH): Add arguments `hal', `val', and `fst'.
+
+2006-11-01 Werner LEMBERG <wl@gnu.org>
+
+ * hdtbl.tmac (t*divs): Fix a bug which causes incorrect table cell
+ heights if the `rowspan' keyword is used. This problem has been
+ introduced during the beautification process by introducing
+ incorrect parentheses.
+ Other minor modifications.
+ (\n[rsp...]): Array renamed to...
+ (\n[rspan...]): This.
+ (\n[csp...]): Array renamed to...
+ (\n[cspan...]): This.
+ (\n[vl...]): Array renamed to...
+ (\n[vline...]): This.
+
+2006-10-27 Werner LEMBERG <wl@gnu.org>
+
+ * hdmisc.tmac (EM): Improve warning messages.
+
+ * hdtbl.tmac (TD): Move constant comparison out of while loop.
+
+2006-10-26 Werner LEMBERG <wl@gnu.org>
+
+ * hdmisc.tmac: Add `\"' at various places to protect against
+ trailing spaces.
+ (getarg): Don't use a different escape character but
+ `\?' escapes to protect against incomplete input.
+ Improve documentation.
+
+ * hdtbl.tmac: Improve various warning messages.
+ (TR): Add validity check for `height' keyword.
+ (TD): Don't use `\\\\' but `\E'.
+ (\*[*#trc*]): Initialize.
+ (t*dntr): Avoid undefined register warning.
+
+2006-10-23 Werner LEMBERG <wl@gnu.org>
+
+ * hdtbl.tmac (\n[t*#]): Initialize.
+ (TBL): Don't initialize `\*[width]'.
+ Add validity checks for all keywords.
+ (TD): Add validity checks for `rowspan' and `colspan' keywords.
+ (t*cl): Add validity checks for cell widths.
+
+2006-09-13 Werner LEMBERG <wl@gnu.org>
+
+ * examples/fontdumps_n.in, examples/fontdumps_x.in: Renamed to...
+ * examples/fonts_n.in, examples/fonts_x.in: This.
+
+ * examples/colored_boxes.roff, examples/colored_nested_tables.roff,
+ examples/colored_table_cells.roff: Renamed to...
+ * examples/color_boxes.roff, examples/color_nested_tables.roff,
+ examples/color_table_cells.roff: This.
+
+ * Makefile.sub: Updated.
+
+2006-06-21 Werner LEMBERG <wl@gnu.org>
+
+ * examples/fontdumps_n.roff, examples/fontdumps_x.roff: Renamed
+ to...
+ * example/fontdumps_n.in, example/fontdumps_x_in: This.
+ Rename `*fontpath' to `fontpath' and define it conditionally (using
+ `@fontdir@') so that it can be overridden on the command line.
+
+ * Makefile.sub (GENFILES, GENFILES_): New variables for
+ fontdumps*.roff.
+ (EXAMPLEFILES): Remove fontdumps.roff.
+ (CLEANADD): Add GENFILES.
+ (.in.roff): New rule.
+ (.SUFFIXES): Add `.in'.
+ (install_data, uninstall_sub): Updated.
+
+2006-06-14 Werner LEMBERG <wl@gnu.org>
+
+ * hdmisc.tmac: Fix test for \n[?] to avoid warning message.
+ s/\n[.s]p/\n[.ps]/.
+ (pv): Use `z' scaling indicator.
+
+ * hdtbl.tmac: Fix test for \n[?] and \n[*miscs] to avoid warning
+ messages.
+
+2006-06-11 Werner LEMBERG <wl@gnu.org>
+
+ * groff_hdtbl.man: Use `.ig' block after NAME section to make mandb
+ happy.
+
+2006-06-05 Werner LEMBERG <wl@gnu.org>
+
+ * hdmisc.tmac (index): Use `\?' to emulate string comparison.
+
+2006-06-04 Werner LEMBERG <wl@gnu.org>
+
+ * hdtbl.tmac: Improve error messages. In particular, handle
+ singular and plural correctly by using a pseudo array `nth-{1,2,3}'.
+
+ * examples/rainbow.roff: Add copyright notice. Formatting.
+
+2006-05-31 Werner LEMBERG <wl@gnu.org>
+
+ * examples/fontdumps_x.roff, examples/fontdumps_n.roff: Protect
+ argument of `tr' command in `.pso' call.
+
+2006-05-30 Werner LEMBERG <wl@gnu.org>
+
+ * examples/fontdumps_x.roff: Remove warnings about
+ non-existent glyphs.
+ Add copyright notice.
+ Formatting.
+
+ * hdtbl.tmac: Replace character >= 0x80.
+
+2006-05-29 Werner LEMBERG <wl@gnu.org>
+
+ * Makefile.sub: New file.
+ * examples/*: Replace characters >= 0x80.
+ Add final newlines.
+ Use UNIX line end convention only.
+ * examples/mixed-pickles.roff: Use gnu.eps.
+ Add copyright notice.
+ Adjust pic image.
+ Other minor fixes.
+ Formatting.
+ * examples/fontdumps_n.roff: Remove warnings about
+ non-existent glyphs.
+ Add copyright notice.
+ Formatting.
+
+2006-05-25 Werner LEMBERG <wl@gnu.org>
+
+ * examples/*: Rename to...
+ * examples/*.roff: This.
+
+2006-05-24 Werner LEMBERG <wl@gnu.org>
+
+ * groff_hdtbl.man: Simplify macros for switching from and to the `C'
+ font family, as suggested by Tadziu Hoffmann.
+
+2006-05-22 Werner LEMBERG <wl@gnu.org>
+
+ * groff_hdtbl.man: Completely revised again.
+ `Normalize' font usage: Add macros similar to `.B' and `.BI' for
+ switching from and to the `C' font family, instead of using \f.
+ Fix appearance of macro syntax descriptions.
+ Add more quotation characters.
+
+2006-05-21 Werner LEMBERG <wl@gnu.org>
+
+ * groff_hdtbl.man: Completely revised.
+
+2006-05-20 Werner LEMBERG <wl@gnu.org>
+
+ * Import of hdtbl 0.91 (with some further modifications). Still
+ many rough edges.
+
+________________________________________________________________________
+
+Copyright 2006-2020 Free Software Foundation, Inc.
+
+Copying and distribution of this file, with or without modification,
+are permitted in any medium without royalty provided the copyright
+notice and this notice are preserved.
+
+Local Variables:
+coding: latin-1
+fill-column: 72
+mode: change-log
+version-control: never
+End:
+vim:set autoindent textwidth=72:
diff --git a/contrib/hdtbl/TODO b/contrib/hdtbl/TODO
new file mode 100644
index 0000000..a3684e5
--- /dev/null
+++ b/contrib/hdtbl/TODO
@@ -0,0 +1,21 @@
+TODO
+----
+
+* Macro TOTC (Table Of Table Captions).
+
+* Automatic recognition of the number of columns.
+
+* Optional automatic calculation of the cell widths from the widths of the
+ first line of the cell content instead of the explicit specification with
+ the width argument. This seems to be non-trivial without a preprocessor
+ or additional external calls via .sy or .pso.
+
+* Handling of pagebreaks in tables.
+
+* Floating text left and/or right from tables.
+
+* Converter hdtbl2html (awk, elisp, perl?); should be easy to write.
+
+* Support for nroff.
+
+* Support for -Thtml.
diff --git a/contrib/hdtbl/examples/chess_board.roff b/contrib/hdtbl/examples/chess_board.roff
new file mode 100644
index 0000000..171d95e
--- /dev/null
+++ b/contrib/hdtbl/examples/chess_board.roff
@@ -0,0 +1,64 @@
+.ig
+chess_board.roff
+
+This file is part of groff, the GNU roff type-setting system.
+
+Copyright (C) 2005-2020 Free Software Foundation, Inc.
+written by Joachim Walsdorff <Joachim.Walsdorff@urz.uni-heidelberg.de>.
+
+groff is free software; 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.
+
+groff is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+..
+.
+.if !d sopath \
+. ds sopath
+.
+.so \*[sopath]examples/common.roff
+.
+.
+.nr *x 8
+.de r1
+.TR height=1.6c
+.TD hl= val=m hal=r \\\\n(*x
+.PN 4 ".TD bgc=wheat" ".TD bgc=tan3"
+.TD hl= val=m hal=l \\\\n(*x
+.nr *x -1
+..
+.de r2
+.TR height=1.6c
+.TD hl= val=m hal=r \\\\n(*x
+.PN 4 ".TD bgc=tan3" ".TD bgc=wheat"
+.TD hl= val=m hal=l \\\\n(*x
+.nr *x -1
+..
+.af *y a
+.H Chessboard
+.TBL border=0 csp=.05n bgc= cols=10 width=1.6c tal=c
+.TR vl= hal=c\" height=1c
+.TD hl=
+.nr *y 0
+.PN 8 .TD ".nr *y +1" \\\\n(*y
+.TD hl=
+.PN 4 .r1 .r2
+.TR vl= hal=c
+.TD
+.nr *y 0
+.PN 8 .TD ".nr *y +1" \\\\n(*y
+.TD
+.ETB
+.
+.\" Local Variables:
+.\" mode: nroff
+.\" fill-column: 72
+.\" End:
+.\" vim: set filetype=groff textwidth=72:
diff --git a/contrib/hdtbl/examples/col_rowspan_colors.roff b/contrib/hdtbl/examples/col_rowspan_colors.roff
new file mode 100644
index 0000000..90f2e7a
--- /dev/null
+++ b/contrib/hdtbl/examples/col_rowspan_colors.roff
@@ -0,0 +1,82 @@
+.ig
+col_rowspan_colors.roff
+
+This file is part of groff, the GNU roff type-setting system.
+
+Copyright (C) 2005-2020 Free Software Foundation, Inc.
+written by Joachim Walsdorff <Joachim.Walsdorff@urz.uni-heidelberg.de>.
+
+groff is free software; 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.
+
+groff is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+..
+.
+.if !d sopath \
+. ds sopath
+.
+.so \*[sopath]examples/common.roff
+.
+.\" Seed the random number generator for reproducible builds.
+.random-seed 131545532 19201711
+.de color#
+.nr # +1
+.random#
+.defcolor c\\n# rgb \\*[#random]
+..
+.
+.de brt
+.nr # 0
+.color#
+.if \\n[t*cols\\n[t*#]]/2*2=\\n[t*cols\\n[t*#]] \{ .
+. tmc \\n(.F:\\n(.c: cols was even (\\n[t*cols\\n[t*#]]),
+. nr t*cols\\n[t*#] +1
+. tm1 " increased by one col to \\n[t*cols\\n[t*#]].
+. t*cl \\*[width]
+. ie "\\*[tal]"r" .nr in\\n[t*#] -\\*[width]\" recalculate cell widths etc.
+. el .if "\\*[tal]"c" .nr in\\n[t*#] -\\*[width]/2
+.\}
+.nr N \\n[t*cols\\n[t*#]]-1 \" N must be even
+.nr W 1c\"\\*[width]
+.ds html "".TR height=\\nW" ".TD bgc=c\\n#"
+.nr I 0 2
+.while \\nN>=\\n+I \{ .
+. ds help "\\*[html]
+. pops * help
+. color#
+. ds html "".TR height=\\nW" ".TD colspan=\\nI bgc=c\\n#"
+. color#
+. as html " ".TD rowspan=\\nI bgc=c\\n#"
+. color#
+. as html " ".TR height=\\nW" ".TD rowspan=\\nI bgc=c\\n#"
+. color#
+. as html " \\*[help] ".TR height=\\nW" ".TD colspan=\\nI bgc=c\\n#"
+.\}
+.t*P1 \\*[html]
+..
+.
+.t*pv 1.2 1.2 "" x
+.PN 10 Text before table.
+.in 1c
+.PN 8 Indented text before table.
+*** *** ***
+.TBL width=90% border=1n csp=1n cpd=1n bgc=wheat tal=c .TR .TD
+.TBL border= cols=11 width=1c tal=c csp=0 cpd=0 \"cols must be odd
+.CPTN val=b Randomly Colored Table Cells with Colspan/\%Rowspan
+.brt
+.ETB .ETB
+.PN 15 Text after table.
+.
+.\" Local Variables:
+.\" mode: nroff
+.\" fill-column: 72
+.\" End:
+.\" vim: set filetype=groff textwidth=72:
diff --git a/contrib/hdtbl/examples/color_boxes.roff b/contrib/hdtbl/examples/color_boxes.roff
new file mode 100644
index 0000000..65538a7
--- /dev/null
+++ b/contrib/hdtbl/examples/color_boxes.roff
@@ -0,0 +1,52 @@
+.ig
+color_boxes.roff
+
+This file is part of groff, the GNU roff type-setting system.
+
+Copyright (C) 2005-2020 Free Software Foundation, Inc.
+written by Joachim Walsdorff <Joachim.Walsdorff@urz.uni-heidelberg.de>.
+
+groff is free software; 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.
+
+groff is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+..
+.
+.if !d sopath \
+. ds sopath
+.
+.so \*[sopath]examples/common.roff
+.
+.\" Seed the random number generator for reproducible builds.
+.random-seed 131545532 19201711
+.
+.H Horizontal Rules and Boxes .br with Randomly Colored Border and Background
+.PN 25 Text before horizontal rule.
+.TBL border=.5n bc=green bgc=red width=7c tal=c csp=.2n cpd=.3n .TR .TD .ETB
+.PN 10 Text after horizontal rule and before table.
+.de ctab
+.nr ? 0 1
+.PN 5 .random# ".defcolor color\En+? rgb \E*[#random]"
+.TD ".TBL border=1c bc=color1 csp=0 cpd=0 height=3c bgc=color2" .TR .TD .ETB
+..
+.
+.TBL tal=c border= csp=0 cpd=0 cols=5 width=3c
+.PN 2 .TR ".PN 5 .ctab"
+.ETB
+.PN 15 Text after table.
+.TBL border=.5n bc=color1 bgc=color2 width=15c tal=c csp=.2n cpd=.3n .TR .TD .ETB
+.PN 25 Text after horizontal rule.
+.
+.\" Local Variables:
+.\" mode: nroff
+.\" fill-column: 72
+.\" End:
+.\" vim: set filetype=groff textwidth=72:
diff --git a/contrib/hdtbl/examples/color_nested_tables.roff b/contrib/hdtbl/examples/color_nested_tables.roff
new file mode 100644
index 0000000..946d297
--- /dev/null
+++ b/contrib/hdtbl/examples/color_nested_tables.roff
@@ -0,0 +1,60 @@
+.ig
+
+color_nested_tables.roff
+
+This file is part of groff, the GNU roff type-setting system.
+
+Copyright (C) 2005-2020 Free Software Foundation, Inc.
+written by Joachim Walsdorff <Joachim.Walsdorff@urz.uni-heidelberg.de>.
+
+groff is free software; 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.
+
+groff is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+..
+.
+.if !d sopath \
+. ds sopath
+.
+.so \*[sopath]examples/common.roff
+.
+.
+.\" Seed the random number generator for reproducible builds.
+.random-seed 131545532 19201711
+.
+.PN 15 Text before first table.
+.nr # 0 1
+*****
+.PN 39 .random# ".defcolor c\\n[#] rgb \\\\*[#random] " \
+ ".TBL csp=0 cpd=0 border=1n bc=c\\n[#]" \
+ ".if \\\\n+#=1 .CPTN val=b Nested Tables with Randomly Colored Border" \
+ .TR .TD
+.PN 39 .ETB
+.PN 15 Text after first table.
+.
+.bp
+.
+.PN 15 Text before second table.
+*****
+.nr # 0 1
+.PN 39 .random# ".defcolor c\\n[#] rgb \\\\*[#random] " \
+ ".TBL csp=0 cpd=1n border= bgc=c\\n[#]" \
+ ".if \\\\n+#=1 .CPTN val=b Nested Tables with Randomly Colored Background" \
+ .TR .TD
+.PN 39 .ETB
+.PN 25 Text after second table.
+.
+.\" Local Variables:
+.\" mode: nroff
+.\" fill-column: 72
+.\" End:
+.\" vim: set filetype=groff textwidth=72:
diff --git a/contrib/hdtbl/examples/color_table_cells.roff b/contrib/hdtbl/examples/color_table_cells.roff
new file mode 100644
index 0000000..65489cb
--- /dev/null
+++ b/contrib/hdtbl/examples/color_table_cells.roff
@@ -0,0 +1,54 @@
+.ig
+
+color_table_cells.roff
+
+This file is part of groff, the GNU roff type-setting system.
+
+Copyright (C) 2005-2020 Free Software Foundation, Inc.
+written by Joachim Walsdorff <Joachim.Walsdorff@urz.uni-heidelberg.de>.
+
+groff is free software; 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.
+
+groff is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+..
+.
+.if !d sopath \
+. ds sopath
+.
+.so \*[sopath]examples/common.roff
+.
+.\" Seed the random number generator for reproducible builds.
+.random-seed 131545532 19201711
+.
+.H Horizontal Rules and Randomly Colored Table Cells
+.PN 15 Text before HR.
+.TBL border=.5n bc=green bgc=red width=7c tal=c csp=.2n cpd=.3n .TR .TD .ETB
+.PN 10 Text after HR and before Table.
+.
+.nr ? 0 1
+.de ctab
+.TR height=\nl/10
+.PN 8 .random# ".defcolor c\\\\n+? rgb \E*[#random]" ".TD bgc=c\\\\n?"
+..
+.TBL tal=c border= csp=0 cpd=0 cols=8 width=\nl/10
+.PN 8 .ctab
+.ETB
+.PN 10 Text after table.
+.TBL border=.5n bc=c1 bgc=c2 width=15c tal=c csp=.2n cpd=.3n .TR .TD .ETB
+.PN 15 Text after HR.
+.
+.\" Local Variables:
+.\" mode: nroff
+.\" fill-column: 72
+.\" End:
+.\" vim: set filetype=groff textwidth=72:
diff --git a/contrib/hdtbl/examples/color_transitions.roff b/contrib/hdtbl/examples/color_transitions.roff
new file mode 100644
index 0000000..be69b7c
--- /dev/null
+++ b/contrib/hdtbl/examples/color_transitions.roff
@@ -0,0 +1,58 @@
+.ig
+
+color_transitions.roff
+
+This file is part of groff, the GNU roff type-setting system.
+
+Copyright (C) 2005-2020 Free Software Foundation, Inc.
+written by Joachim Walsdorff <Joachim.Walsdorff@urz.uni-heidelberg.de>.
+
+groff is free software; 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.
+
+groff is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+..
+.
+.if !d sopath \
+. ds sopath
+.
+.so \*[sopath]examples/common.roff
+.
+.de ctab
+.nr #cc 0
+.PN 21 ".nr #cc +.05f" ".defcolor \En[t*#] rgb \\$1 \\$2 \\$3" ".TBL border= csp=0 cpd=.5n bgc=\\\\n[t*#] bc=" .TR .TD
+.PN 21 .ETB
+..
+.PN 30 Before table.
+.TBL cols=3 width=33% border= csp=0 cpd=0 bgc=
+.CPTN val=b Color Transitions
+.TR
+.TD ".ctab 0+\En[#cc]u \En[#cc]u \En[#cc]u" \" black -> white
+.TD ".ctab 1f-\En[#cc]u 1f-\En[#cc]u 1f-\En[#cc]u"\" white -> black
+.TD ".ctab 1f \En[#cc]u \En[#cc]u" \" red -> white
+.TR
+.TD ".ctab 0 1f-\En[#cc]u \En[#cc]u" \" green -> blue
+.TD ".ctab 1f 1f-\En[#cc]u 1f" \" white -> magenta
+.TD ".ctab 1f \En[#cc]u 1f" \" magenta -> white
+.TR
+.TD ".ctab 0+\En[#cc]u \En[#cc]u 1f-\En[#cc]u" \" blue -> yellow
+.TD ".ctab 1f-\En[#cc]u 1f-\En[#cc]u \En[#cc]u" \" yellow -> blue
+.TD ".ctab 1f 0+\En[#cc]u 0" \" red -> yellow
+.xTD ".ctab 0+\En[#cc]u 1f-\En[#cc]u 1f-\En[#cc]u"\" cyan -> red
+.ETB
+.PN 30 After table.
+.
+.\" Local Variables:
+.\" mode: nroff
+.\" fill-column: 72
+.\" End:
+.\" vim: set filetype=groff textwidth=72:
diff --git a/contrib/hdtbl/examples/common.roff b/contrib/hdtbl/examples/common.roff
new file mode 100644
index 0000000..a9c02a0
--- /dev/null
+++ b/contrib/hdtbl/examples/common.roff
@@ -0,0 +1,295 @@
+.ig
+
+common.roff
+
+This file is part of groff, the GNU roff type-setting system.
+
+Copyright (C) 2010-2020 Free Software Foundation, Inc.
+written by Joachim Walsdorff <Joachim.Walsdorff@urz.uni-heidelberg.de>.
+
+groff is free software; 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.
+
+groff is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+..
+.
+.
+.ds common common.roff\" name for diagnostic messages
+.mso hdtbl.tmac\" load table macros
+.
+.\" ******************************************************************
+.\" ** Some macros and the page setup used by the examples **
+.\" ******************************************************************
+.
+.\" ******************************************************************
+.\" ** Header macro for the examples **
+.\" ******************************************************************
+.de H
+. nr *w* (17 * \w\\$* / 10 + 4n)
+. TBL border=1n \
+ bc=yellow \
+ bgc=red4 \
+ fgc=yellow \
+ csp=0 \
+ fst=TB \
+ "fsz=1.7 1.5" \
+ hal=c \
+ tal=c \
+ "width=(\\n[*w*]+4n)<?\n[.l]"
+. TR .TD
+. t*P1 \\$*
+. ETB
+. SP
+..
+.
+.
+.\" ******************************************************************
+.\" ** Perform n-times all the arbitrary arguments **
+.\" ** .PN n a2 a3 ... **
+.\" ** PN is nestable **
+.\" ******************************************************************
+.de PN
+. nr *pn +1
+. nr PN\\n[*pn] (\\$1 + 1) 1
+. shift
+.
+. while \\n-[PN\\n[*pn]] \
+. t*P1 \\$@
+.
+. nr *pn -1
+..
+.
+.
+.\" Utility macro: .d2x decimal_number [base [string_name]]
+.\"
+.\" Convert 'decimal_number' to another base 'base' (in the
+.\" range 1..16) and store the result in string 'string_name'.
+.\" If 'base' is missing or empty, convert to a hexadecimal
+.\" number. If 'string_name' is missing or empty, return value
+.\" in string 'hex#', otherwise return the value in both
+.\" 'string_name' and 'hex#'.
+.\"
+.\" The base value 1 is handled specially: The returned
+.\" string contains the character '|' 'decimal_number' times
+.\" (for example, input value 4 yields '||||').
+.ds d2x-0 0\"
+.ds d2x-1 1\"
+.ds d2x-2 2\"
+.ds d2x-3 3\"
+.ds d2x-4 4\"
+.ds d2x-5 5\"
+.ds d2x-6 6\"
+.ds d2x-7 7\"
+.ds d2x-8 8\"
+.ds d2x-9 9\"
+.ds d2x-10 A\"
+.ds d2x-11 B\"
+.ds d2x-12 C\"
+.ds d2x-13 D\"
+.ds d2x-14 E\"
+.ds d2x-15 F\"
+.
+.
+.de d2x
+. if !\B\\$1 \{\
+. tmc \\*[common]: \\n[.F]:\\n[.c]: d2x: invalid or missing first
+. tm argument
+. tm \\*[common]: usage: '.d2x decimal_number [base [string_name]]'
+. return
+. \}
+.
+. nr i# (-1) 1
+. nr j# 1
+. ds hex#
+. nr dec# (\\$1) 1
+.
+. if !\\$1 \
+. nr dec# (-\\n[dec#])
+.
+. ie !"\\$2"" \{\
+. ie !\B\\$2 \
+. tm \\*[common]: \\n[.F]:\\n[.c]: d2x: invalid base '\\$2'
+. el \
+. ie ((\\$2 < 1) : (\\$2 > 16)) \
+. tm \\*[common]: \\n[.F]:\\n[.c]: d2x: invalid base '\\$2'
+. el \
+. nr b# \\$2
+. \}\}
+. el \
+. nr b# 16
+.
+. nr xb# 1
+.
+. ie (\\n[b#] == 1) \{\
+. nr dec# +1
+. while \\n-[dec#] \
+. as hex# |\"
+. \}
+. el \{\
+. while (\\n[dec#] - \\n[xb#]) \{\
+. nr xb# (\\n[xb#] * \\n[b#])
+. nr j# +1
+. \}
+.
+. while (\\n+[i#] < \\n[j#]) \{\
+. nr ** (\\n[dec#] / \\n[xb#])
+. as hex# \\*[d2x-\\n[**]]\"
+. nr dec# (\\n[dec#] - (\\n[xb#] * \\n[**]))
+. nr xb# (\\n[xb#] / \\n[b#])
+. \}
+. \}
+.
+. \" strip leading zero, if any
+. ds * \\*[hex#]\"
+. substring * 0 0
+. if "\\*[*]"0" \
+. substring hex# 1 -1
+.
+. if (\\$1 < 0) \
+. ds hex# -\\*[hex#]\"
+.
+. if !"\\$3"" \{\
+. ie !\A\\$3 \
+. tm \\*[common]: \\n[.F]:\\n[.c]: d2x: invalid string name '\\$3'
+. el \
+. ds \\$3 \\*[hex#]\"
+. \}
+..
+.
+.
+.\" Utility macro: .random#
+.\" .random-seed seed1 seed2
+.\"
+.\" Return pseudo-random numbers in the range 0..0xFFFFFF,
+.\" represented as the concatenation of '#' and six
+.\" hexadecimal digits, in the string '#random'. The
+.\" macro 'random-seed' can be used to set seed values,
+.\" which should be integers in the range 1..2147483562 and
+.\" 1..2147483398 for 'seed1' and 'seed2', respectively
+.\" (the macro applies a modulo operation to assure this
+.\" range). If 'random-seed' isn't called the registers
+.\" start at some constant, arbitrary values.
+.\"
+.\" The used generator is presented in L'Ecuyer's 1988 paper
+.\" 'Efficient and Portable Combined Random Number
+.\" Generators', which combines two Multiplicative Linear
+.\" Congruential Generators (MLCGs) to achieve a period of
+.\" 2.3*10^18.
+.\"
+.\" Since this just generates example output,
+.\" we don't need good randomness.
+.
+.de random-seed
+. if !(\\n[.$] == 2) \{\
+. tm \\*[common]: random-seed: Invalid number of arguments.
+. tm \\*[common]: usage: '.random-seed seed1 seed2'
+. return
+. \}
+.
+. nr random-s1 (\\$1 % 2147483562)
+. nr random-s2 (\\$2 % 2147483398)
+..
+.random-seed 131545532 19201711
+.
+.
+.de random#
+. nr * (\\n[random-s1] / 53668)
+. nr random-s1 (40014 * (\\n[random-s1] - (\\n[*] * 53668)) \
+ - (\\n[*] * 12211))
+. if !\\n[random-s1] \
+. nr random-s1 +2147483563
+.
+. nr * (\\n[random-s2] / 52774)
+. nr random-s2 (40692 * (\\n[random-s2] - (\\n[*] * 52774)) \
+ - (\\n[*] * 3791))
+. if !\\n[random-s2] \
+. nr random-s2 +2147483399
+.
+. nr * (\\n[random-s1] - \\n[random-s2])
+. if (\\n[*] < 1) \
+. nr * +2147483562
+.
+. \" reduce the result to the leftmost 24 bits
+. nr * (\\n[*] / 128)
+.
+. d2x \\n[*]
+. ds hex# 000000\\*[hex#]\"
+. substring hex# -6
+. ds #random #\\*[hex#]\"
+..
+.
+.
+.\" ******************************************************************
+.\" ** minimal Page setup **
+.\" ******************************************************************
+.
+.nr s \n[.ps]
+.nr v \n[.v]
+.nr p \n[.p]
+.nr o \n[.o]
+.nr l 6.6i \" set text width
+.ll \n[t*l]u
+.nr o 2c \" set offset
+.po \n[o]u
+.nr p 29.7c \" set paper length (A4)
+.pl \n[p]u
+.nr tH 1i \" set top margin
+.sp |\n[tH]u
+.
+.ds t*HM //arbitrary text for page header, except on the first page//\"
+.ds t*BM //arbitrary text for page footer, except on the last page/\\n[%]/\"
+.
+.ev 99
+.lt \n[t*l]u
+.ev
+.
+.
+.de HM
+. sp |.5i \" print header in top margin
+. tl \\*[t*HM]
+. sp |\\n[tH]u
+. ev
+..
+.
+.
+.de BM
+. ev 99
+. sp |(\\n[p]u - .5i) \" print footer in bottom margin
+. tl \\*[t*BM]
+. bp
+..
+.
+.
+.de EM
+. rm BM \" no page number at bottom of last page
+. t*EM
+..
+.
+.
+.wh 0 HM
+.wh 0-1.5i BM
+.em EM
+.
+.\" Some packages (-mm) define their own .SP macro.
+.\" Use ours if another one isn't already available.
+.if !d SP .als SP t*SP
+.
+.if "\n[.m]"" \
+. gcolor black
+.if "\n[.M]"" \
+. fcolor white
+.
+.\" Local Variables:
+.\" mode: nroff
+.\" fill-column: 72
+.\" End:
+.\" vim: set filetype=groff textwidth=72:
diff --git a/contrib/hdtbl/examples/fonts_n.in b/contrib/hdtbl/examples/fonts_n.in
new file mode 100644
index 0000000..c953fa4
--- /dev/null
+++ b/contrib/hdtbl/examples/fonts_n.in
@@ -0,0 +1,149 @@
+.ig
+
+font_n.roff
+
+This file is part of groff, the GNU roff type-setting system.
+
+Copyright (C) 2005-2020 Free Software Foundation, Inc.
+written by Joachim Walsdorff <Joachim.Walsdorff@urz.uni-heidelberg.de>.
+
+groff is free software; 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.
+
+groff is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+..
+.
+.
+.\" ******************************************************************
+.\" ** groff glyphs vs. character codes: **
+.\" ** .fontdump [font1 font2 ...] **
+.\" ** Print glyphs of font1, font2, ..., versus **
+.\" ** character code. **
+.\" ** 'all' as fontname prints all fonts in the **
+.\" ** specified string 'fontpath'. **
+.\" ** without arg: glyphs and codes of active font. **
+.\" ******************************************************************
+.
+.ds fonts_n fonts_n.roff\" name for diagnostic messages
+.
+.if !d sopath \
+. ds sopath
+.
+.so \*[sopath]examples/common.roff
+.
+.if !d fontpath \
+. ds fontpath @fontdir@
+.
+.tm \*[fonts_n]: listing fonts in \*[fontpath]/dev\*[.T]
+.
+.de fontdump
+. ie \\n[.$] \
+. ds *args \\$*
+. el \
+. ds *args \\n[.fn]
+.
+. pso sh -c \
+ "printf '%s' '.ds *f ' ; \
+ ls \\*[fontpath]/dev\*[.T] \
+ | tr '[:cntrl:]' '[ *]'"
+. \" This dummy line is necessary; the preceding line eats it.
+.
+. while !"\\*[*args]"" \{\
+. pops *$1 *args
+.
+. if "\\*[*$1]"all" \{\
+. ds *args \\*[*f] \\*[*args]
+. pops *$1 *args
+. nr *all 1
+. \}
+.
+. if \\n[*all] \{\
+. if "\\*[*$1]"." \
+. nr *all 0
+. if !F \\*[*$1] \
+. continue
+. \}
+.
+. t*index "\\*[*f]" \\*[*$1]
+.
+. ie (\\n[.y] > 18) \
+. if !F \\*[*$1] \{\
+. tm \\*[fonts_n]: \\n[.F]:\\n[.c]: Font \\*[*$1] not found.
+. continue
+. \}
+. el \{\
+. if !\\n[t*index] \{\
+. tm \\*[fonts_n]: \\n[.F]:\\n[.c]: Font \\*[*$1] not found.
+. continue
+. \}
+.
+. nr * \\n[.f]
+. ft \\*[*$1]
+. nr ** \\n[.f]
+. ft
+.
+. if (\\n[**] == \\n[*]) \
+. continue
+. \}
+.
+. if \\n[t*cptn] \
+. bp
+.
+. tm \\*[fonts_n]: listing font '\\*[*$1]'...
+.
+. TBL border=.1n bc=red cpd=0 csp=.1n bgc=
+. CPTN groff font \\*[*$1] \
+ .br \
+ val=b ".pso @EGREP@ internalname \\*[fontpath]/dev\*[.T]/\\*[*$1]"
+. TR
+. TD
+. TBL cols=12 border=.1n bc=red csp=.1n cpd=.2n fgc=red4 bgc=beige \
+ hal=c fsz='1.2 1.2' fst=\\*[*$1]
+. nr c# 0-1 1
+. nr y# 0-1 1
+. TR fst=HB fgc=blue
+. TD
+. nr x# 0-1 1
+. \" following 4 'PN's instead of 4 while-loops as in
+. \" font_x.roff; short and easy to write, but a little
+. \" bit slower.
+. PN 10 .TD \
+ \&..\\\\n+[x#]
+. TD
+.
+. PN 27 .TR \
+ ".TD fgc=blue fst=HB" \
+ \\\\n+[y#]. \
+ ".PN 10 .TD \
+ "".if c \N'\En+[c#]' \
+ \N'\En[c#]'""" \
+ ".TD fgc=blue fst=HB" \
+ \\\\n[y#].
+.
+. TR fst=HB fgc=blue
+. TD
+. nr x# 0-1 1
+. PN 10 .TD \
+ \&..\\\\n+[x#]
+. TD
+. ETB
+. ETB
+. \}
+..
+.
+.fontdump all
+.
+.\" Local Variables:
+.\" mode: nroff
+.\" fill-column: 72
+.\" End:
+.\" vim: set filetype=groff textwidth=72:
diff --git a/contrib/hdtbl/examples/fonts_x.in b/contrib/hdtbl/examples/fonts_x.in
new file mode 100644
index 0000000..c183c7c
--- /dev/null
+++ b/contrib/hdtbl/examples/fonts_x.in
@@ -0,0 +1,160 @@
+.ig
+
+font_x.roff
+
+This file is part of groff, the GNU roff type-setting system.
+
+Copyright (C) 2005-2020 Free Software Foundation, Inc.
+written by Joachim Walsdorff <Joachim.Walsdorff@urz.uni-heidelberg.de>.
+
+groff is free software; 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.
+
+groff is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+..
+.
+.
+.\" ******************************************************************
+.\" ** groff glyphs vs. character codes: **
+.\" ** .fontdump [font1 font2 ...] **
+.\" ** Print glyphs of font1, font2, ..., versus **
+.\" ** character code. **
+.\" ** 'all' as fontname prints all fonts in the **
+.\" ** specified string 'fontpath'. **
+.\" ** without arg: glyphs and codes of active font. **
+.\" ******************************************************************
+.
+.ds fonts_x fonts_x.roff\" name for diagnostic messages
+.
+.if !d sopath \
+. ds sopath
+.
+.so \*[sopath]examples/common.roff
+.
+.if !d fontpath \
+. ds fontpath @fontdir@
+.
+.tm \*[fonts_x]: listing fonts in \*[fontpath]/dev\*[.T]
+.
+.de fontdump
+. ie \\n[.$] \
+. ds *args \\$*
+. el \
+. ds *args \\n[.fn]
+.
+. pso sh -c \
+ "printf '%s' '.ds *f ' ; \
+ ls \\*[fontpath]/dev\*[.T] \
+ | tr '[:cntrl:]' '[ *]'"
+. \" This dummy line is necessary; the preceding line eats it.
+.
+. while !"\\*[*args]"" \{\
+. pops *$1 *args
+.
+. if "\\*[*$1]"all" \{\
+. ds *args \\*[*f] \\*[*args]
+. pops *$1 *args
+. nr *all 1
+. \}
+.
+. if \\n[*all] \{\
+. if "\\*[*$1]"." \
+. nr *all 0
+. if !F \\*[*$1] \
+. continue
+. \}
+.
+. t*index "\\*[*f]" \\*[*$1]
+.
+. ie (\\n[.y] > 18) \
+. if !F \\*[*$1] \{\
+. tm \\*[fonts_x]: \\n[.F]:\\n[.c]: Font \\*[*$1] not found.
+. continue
+. \}
+. el \{\
+. if !\\n[t*index] \{\
+. tm \\*[fonts_x]: \\n[.F]:\\n[.c]: Font \\*[*$1] not found.
+. continue
+. \}
+.
+. nr * \\n[.f]
+. ft \\*[*$1]
+. nr ** \\n[.f]
+. ft
+.
+. if (\\n[**] == \\n[*]) \
+. continue
+. \}
+.
+. if \\n[t*cptn] \
+. bp
+.
+. tm \\*[fonts_x]: listing font '\\*[*$1]'...
+.
+. TBL border=.1n bc=red cpd=0 csp=.1n bgc=
+. CPTN groff font \\*[*$1] \
+ .br \
+ val=b ".pso @EGREP@ internalname \\*[fontpath]/dev\*[.T]/\\*[*$1]"
+. TR
+. TD
+. TBL cols=18 border=.1n bc=red csp=.1n cpd=.2n fgc=red4 bgc=beige \
+ hal=c fsz='1.2 1.7' fst=\\*[*$1]
+. nr c# 0-1 1
+. nr y# 0 1
+. TR fst=HB fgc=blue
+. TD
+. nr x# 0-1 1
+. while (\\n+[x#] < 16) \{\
+. d2x \\n[x#]
+. TD
+. nop \&.\\*[hex#]
+. \}
+. TD
+.
+. nr y# -1
+. while (\\n+[y#] < 17) \{\
+. TR
+. TD fgc=blue fst=HB
+. d2x \\n[y#]
+. nop \\*[hex#].
+. nr x# 0-1 1
+. while (\\n+[x#] < 16) \{\
+. TD
+. if c \N'\\n+[c#]' \
+. nop \N'\\n[c#]'
+. \}
+. TD fgc=blue fst=HB
+. d2x \\n[y#]
+. nop \\*[hex#].
+. \}
+.
+. TR fst=HB fgc=blue
+. TD
+. nr x# 0-1 1
+. while (\\n+[x#] < 16) \{\
+. d2x \\n[x#]
+. TD
+. nop \&..\\*[hex#]
+. \}
+. TD
+. ETB
+. ETB
+. \}
+..
+.
+.fontdump all
+.
+.\" Local Variables:
+.\" mode: nroff
+.\" fill-column: 72
+.\" End:
+.\" vim: set filetype=groff textwidth=72:
diff --git a/contrib/hdtbl/examples/mixed_pickles.roff b/contrib/hdtbl/examples/mixed_pickles.roff
new file mode 100644
index 0000000..1c909e9
--- /dev/null
+++ b/contrib/hdtbl/examples/mixed_pickles.roff
@@ -0,0 +1,104 @@
+.ig
+
+mixed_pickles.roff
+
+This file is part of groff, the GNU roff type-setting system.
+
+Copyright (C) 2005-2020 Free Software Foundation, Inc.
+written by Joachim Walsdorff <Joachim.Walsdorff@urz.uni-heidelberg.de>.
+
+groff is free software; 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.
+
+groff is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+..
+.
+.am pspic*error-hook
+. ab \\n[.F]:\\n[.c]: fatal error: PSPIC failed to include '\\$1'
+..
+.
+.if !d sopath \
+. ds sopath
+.
+.so \*[sopath]examples/common.roff
+.
+.H Table with Mixed Content: \
+ .br \
+ EPS Image, eqn Equation, tbl Table, and pic Picture
+.
+Call groff with options \-t, \-e, and \-p!
+.
+.TBL width=90% tal=c csp=.2n cpd=0
+. TR
+. TD
+. TBL width='25% 75%' csp=.5n cpd=.5n hal=c
+. TR
+. TD hl=d vl=d rowspan=2 bgc=red4 fgc=linen fsz=1.2 fst=HB val=m
+. PSPIC -I -\\n[.l]u gnu.eps
+. sp .5
+. nop eps image with \fI.PSPIC\fP
+. TD bgc=linen
+.
+.EQ
+int from 0 to 1 {( ln x ) sup 2} over {sqrt {1 - x sup 2}} dx approx 0.245
+.EN
+.
+. nop \0\0\0\0\0equation with \fIeqn\fP
+.
+. TR
+. TD hl=d
+.
+.TS
+tab(@), center, doublebox, nospaces;
+c c c | c c c
+r rI lB | r rI lB.
+Bit @ Code @ Warning @ Bit @ Code @ Warning
+=
+0 @ 1 @ char @ 10 @ 1024 @ reg
+1 @ 2 @ number @ 11 @ 2048 @ tab
+2 @ 4 @ break @ 12 @ 4096 @ right-brace
+3 @ 8 @ delim @ 13 @ 8192 @ missing
+4 @ 16 @ el @ 14 @ 16384 @ input
+5 @ 32 @ scale @ 15 @ 32768 @ escape
+6 @ 64 @ range @ 16 @ 65536 @ space
+7 @ 128 @ syntax @ 17 @ 131072 @ font
+8 @ 256 @ di @ 18 @ 262144 @ ig
+9 @ 512 @ mac @ 19 @ 524288 @ color
+.TE
+.
+. sp .5
+. nop table with \fItbl\fP
+. TR
+. TD colspan=2 bgc=azure2 fgc=blue4
+.
+.PS
+ellipse "document";
+arrow 0.42;
+box width 0.6 "\fIgpic\/\fP(1)"
+arrow 0.42;
+box width 1.25 "\fIgtbl\/\fP(1) or \fIgeqn\/\fP(1)" "(optional)" dashed;
+arrow 0.42;
+box width 0.65 "\fIgtroff\/\fP(1)";
+arrow 0.42;
+ellipse "PostScript"
+.PE
+.
+. sp .5
+. nop picture with \fIpic\fP
+. ETB
+.ETB
+.
+.\" Local Variables:
+.\" mode: nroff
+.\" fill-column: 72
+.\" End:
+.\" vim: set filetype=groff textwidth=72:
diff --git a/contrib/hdtbl/examples/rainbow.roff b/contrib/hdtbl/examples/rainbow.roff
new file mode 100644
index 0000000..ecd59f5
--- /dev/null
+++ b/contrib/hdtbl/examples/rainbow.roff
@@ -0,0 +1,86 @@
+.ig
+
+rainbow.roff
+
+This file is part of groff, the GNU roff type-setting system.
+
+Copyright (C) 2005-2020 Free Software Foundation, Inc.
+written by Joachim Walsdorff <Joachim.Walsdorff@urz.uni-heidelberg.de>.
+
+groff is free software; 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.
+
+groff is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+..
+.
+.if !d sopath \
+. ds sopath
+.
+.so \*[sopath]examples/common.roff
+.
+.nr *n 25
+.nr *# 0 1
+.
+.de ctab
+. nr #cc 0
+. PN \\$1 \
+ ".nr #cc +(1f / \\$1)" \
+ ".defcolor \En[t*#] rgb \\$2 \\$3 \\$4" \
+ ".TBL csp=\n[t*l]/(12*\\$1+2) border= cpd=0 bgc=\\\\n[t*#] bc=" \
+ ".if (\\\\n+[*#] == 1) \
+ .CPTN Rainbow Colors \[em] Nested Tables with Colored Backgrounds \
+ val=b" \
+ .TR \
+ .TD
+..
+.
+.ctab \n[*n] 1 0 \En[#cc]u \" rot -> magenta
+.ctab \n[*n] 1-\En[#cc]u 0 1 \" magenta -> blue
+.ctab \n[*n] 0 \En[#cc]u 1 \" blue -> cyan
+.ctab \n[*n] 0 1 1-\En[#cc]u \" cyan -> green
+.ctab \n[*n] \En[#cc]u 1 0 \" green -> yellow
+.ctab \n[*n] 1 1-\En[#cc]u 0 \" yellow -> red
+.
+.PN 6*\n[*n] .ETB
+.
+.bp
+.
+.nr *n 25
+.nr *# 0 1
+.
+.de ctab
+. nr #cc 0
+. PN \\$1 \
+ ".nr #cc +(1f / \\$1)" \
+ ".defcolor \En[t*#] rgb \\$2 \\$3 \\$4" \
+ ".TBL border=\n[t*l]/(12*\\$1+2) csp=0 cpd=0 bc=\\\\n[t*#] bgc=" \
+ ".if (\\\\n+[*#] == 1) \
+ .CPTN Rainbow Colors \[em] Nested Tables with Colored Borders \
+ val=b" \
+ .TR \
+ .TD
+..
+.
+.ctab \n[*n] 1 \En[#cc]u 0 \" red -> yellow
+.ctab \n[*n] 1-\En[#cc]u 1 0 \" yellow -> green
+.ctab \n[*n] 0 1 \En[#cc]u \" green -> cyan
+.ctab \n[*n] 0 1-\En[#cc]u 1 \" cyan -> blue
+.ctab \n[*n] \En[#cc]u 0 1 \" blue -> magenta
+.ctab \n[*n] 1 0 1-\En[#cc]u \" magenta -> red
+.
+.PN 6*\n[*n] .ETB
+.
+.\" Local Variables:
+.\" mode: nroff
+.\" fill-column: 72
+.\" End:
+.\" vim: set filetype=groff textwidth=72:
diff --git a/contrib/hdtbl/examples/short_reference.roff b/contrib/hdtbl/examples/short_reference.roff
new file mode 100644
index 0000000..62b3bcd
--- /dev/null
+++ b/contrib/hdtbl/examples/short_reference.roff
@@ -0,0 +1,86 @@
+.ig
+
+short_reference.roff
+
+This file is part of groff, the GNU roff type-setting system.
+
+Copyright (C) 2005-2020 Free Software Foundation, Inc.
+written by Joachim Walsdorff <Joachim.Walsdorff@urz.uni-heidelberg.de>.
+
+groff is free software; 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.
+
+groff is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+..
+.
+.if !d sopath \
+. ds sopath
+.
+.so \*[sopath]examples/common.roff
+.
+.t*pv 1.2 1.2 "" x
+.H Short Reference for the HDtbl-Macros
+This Short Reference describes the Heidelberger Table Macros
+using the macros themselves.
+.br
+.nr t*csp .3n
+.nr t*cpd .3n
+.ds t*ff HN
+.ds t*val m
+.ds t*hal l
+.xig
+.TBL "width=10% 40% 25% 25%" border= "fsz=1 .8"
+.CPTN Base- Optional- and Utility-Macros val=b
+.TR
+.TH Macro .TH Description .TH Predecessors .TH Successors
+.TR
+.TD \&.TBL .TD Begin a new table .TD \&.TD \&.TH \%.ETB cell content
+.TD \&.CPTN \&.TR
+.TR
+.TD \&.CPTN .TD Optional numbered or unnumbered table caption
+.TD \&.TBL .TD \&.TR
+.TR
+.TD \&.TR .TD Begin a new table row .TD \&.TBL \&.CPTN cell content
+.TD \&.TD \&.TR
+.TR
+.TD \&.TH .TD Optional begin table header cell
+.TD \&.TR \&.TD \&.TH \%.ETB cell content
+.TD \&.TD \&.TH \&.TR \%.ETB cell content
+.TR
+.TD \&.TD .TD Begin table data cell .TD \&.TR \&.TD \&.TH \%.ETB cell content
+.TD \&.TD \&.TH \&.TR \%.ETB cell content
+.TR
+.TD \&.ETB .TD Finish and print table .TD \&.TD \&.TH \%.ETB cell content
+.TD \&.TBL \&.TR \&.TD \&.TH \%.ETB cell content
+.TR
+.TD \&.t*free
+.TD colspan=3 val=t Utility macro to free held tables. Use it outside any table.
+.ETB
+.bp
+.x.
+.TBL "fsz=1 .8" "width=20% 32% 8% 8% 8% 8% 8% 8%" border=
+.TR
+.TH Argument .TH Value .TH \&.TBL .TH \&.CPT .TH \&.TR .TH \&.TH .TH \&.TD .TH \&.ETB
+.TR
+.TD border=\fI[n]\fP
+.TD border thickness .TD .ce X .TD .TD .TD .TD .TD
+.TR
+.TD bc=\fI[c]\fP
+.TD color of border and cellseperatorlines .TD .ce X .TD .TD .ce X .TD .ce X .TD .ce X .TD
+.ETB
+.H ------ incomplete -------
+.
+.\" Local Variables:
+.\" mode: nroff
+.\" fill-column: 72
+.\" End:
+.\" vim: set filetype=groff textwidth=72:
diff --git a/contrib/hdtbl/examples/test-hdtbl.sh.in b/contrib/hdtbl/examples/test-hdtbl.sh.in
new file mode 100644
index 0000000..5e81bf7
--- /dev/null
+++ b/contrib/hdtbl/examples/test-hdtbl.sh.in
@@ -0,0 +1,47 @@
+#!/bin/sh
+#
+# Copyright (C) 2018- Free Software Foundation, Inc.
+#
+# This file is part of groff.
+#
+# groff is free software; 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.
+#
+# groff is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+
+# Test generated files 'font_n.ps' and 'font_x.ps'. Both should have
+# 38 pages.
+
+builddir="@abs_top_builddir@"
+gs_program="@GHOSTSCRIPT@"
+ret=0
+
+if test "$gs_program" = "missing"; then
+ echo "ghostscript program missing, can't check hdtbl examples"
+ exit 77
+fi
+
+# $1 file, $2 expected number of pages
+check_number_pages()
+{
+ echo "Checking $1"
+ res=`$gs_program -o /dev/null/ -sDEVICE=bbox "$1" 2>&1 | grep HiResBoundingBox | wc -l`
+ if test $res != $2; then
+ echo " Error: expected $2 pages, found $res pages"
+ ret=255
+ fi
+}
+
+check_number_pages $builddir/contrib/hdtbl/examples/fonts_n.ps 38
+check_number_pages $builddir/contrib/hdtbl/examples/fonts_x.ps 38
+
+exit $ret
diff --git a/contrib/hdtbl/groff_hdtbl.7.man b/contrib/hdtbl/groff_hdtbl.7.man
new file mode 100644
index 0000000..af5ab87
--- /dev/null
+++ b/contrib/hdtbl/groff_hdtbl.7.man
@@ -0,0 +1,1346 @@
+.TH groff_hdtbl @MAN7EXT@ "@MDATE@" "groff @VERSION@"
+.SH Name
+groff_hdtbl \- Heidelberger table macros for GNU
+.I roff
+.
+.
+.\" ====================================================================
+.\" Legal Terms
+.\" ====================================================================
+.\"
+.\" Copyright (C) 2005-2020 Free Software Foundation, Inc.
+.\"
+.\" This file is part of groff, the GNU roff type-setting system.
+.\"
+.\" Permission is granted to copy, distribute and/or modify this
+.\" document under the terms of the GNU Free Documentation License,
+.\" Version 1.3 or any later version published by the Free Software
+.\" Foundation; with no Invariant Sections, with no Front-Cover Texts,
+.\" and with no Back-Cover Texts.
+.\"
+.\" A copy of the Free Documentation License is included as a file
+.\" called FDL in the main directory of the groff source package.
+.
+.
+.\" Save and disable compatibility mode (for, e.g., Solaris 10/11).
+.do nr *groff_groff_hdtbl_7_man_C \n[.cp]
+.cp 0
+.
+.\" Define fallback for groff 1.23's MR macro if the system lacks it.
+.nr do-fallback 0
+.if !\n(.f .nr do-fallback 1 \" mandoc
+.if \n(.g .if !d MR .nr do-fallback 1 \" older groff
+.if !\n(.g .nr do-fallback 1 \" non-groff *roff
+.if \n[do-fallback] \{\
+. de MR
+. ie \\n(.$=1 \
+. I \%\\$1
+. el \
+. IR \%\\$1 (\\$2)\\$3
+. .
+.\}
+.rr do-fallback
+.
+.
+.ig
+ Some simple formatting macros. Note that we use '.ig' here and not a
+ comment to make 'mandb' 2.4.1 (and probably more recent versions also)
+ happy; otherwise the '.char' lines and the stuff which follows is
+ included in the 'whatis' database.
+..
+.
+.
+.char \[lB] \F[\n[.fam]]\f[R][
+.char \[rB] \F[\n[.fam]]\f[R]]
+.
+.char \[or] \F[\n[.fam]]\f[R]\||\|
+.char \[ell] \F[\n[.fam]]\f[R].\|.\|.
+.
+.char \[oq] \F[\n[.fam]]\f[R]\[oq]
+.char \[cq] \F[\n[.fam]]\f[R]\[cq]
+.
+.
+.ie F CR \{\
+.
+. \" We have to solve the following problem. In this code
+. \"
+. \" foo
+. \" .CR bar
+. \" foo
+. \"
+. \" the space immediately after 'bar' should not be taken from the 'C'
+. \" family. At the same time, this
+. \"
+. \" foo
+. \" .CR bar\c
+. \" foo
+. \"
+. \" should work also. To fulfill both constraints we emit the
+. \" family changing commands both as escapes and macro calls.
+.
+. de make-C-macro
+. de C\\$1
+. ds old-fam \\\\n[.fam]
+. fam C
+. \\$2 \&\\\\$*\F[]\F[\\\\*[old-fam]]
+. fam
+. rm old-fam
+\\..
+. .
+.
+. make-C-macro R nop
+. make-C-macro B B
+. make-C-macro I I
+.
+. de make-C-macro
+. de C\\$1
+. ds old-fam \\\\n[.fam]
+. fam C
+. \\$1 \\\\$@ \F[]\F[\\\\*[old-fam]]
+. fam
+. rm old-fam
+\\..
+. .
+.
+. make-C-macro BI
+. make-C-macro IB
+. make-C-macro RI
+. make-C-macro IR
+. make-C-macro BR
+. make-C-macro RB
+.\}
+.el \{\
+. ftr CR R
+. ftr CI I
+. ftr CB B
+. ftr CBI BI
+.
+. de CR
+. nop \&\\$*
+. .
+. als CB B
+. als CI I
+.
+. als CBI BI
+. als CIB IB
+. als CRI RI
+. als CIR IR
+. als CBR BR
+. als CRB RB
+.\}
+.
+.
+.
+.de XB
+. B "\\$1"
+. shift
+. CR "\\$1\c"
+. shift
+. while \\n[.$] \{\
+. nop ,
+. CR "\\$1\c"
+. shift
+. \}
+. br
+..
+.
+.
+.de XAA
+. TQ
+. ie (\\n[.$] < 2) \
+. CR \\$@
+. el \
+. CRI \\$@
+..
+.
+.
+.de XDEF
+. br
+. B Default:
+. if !\\n[.$] \
+. return
+. CRI "\\$1" "\\$2"
+..
+.
+.
+.de XDEFR
+. br
+. B Default:
+. CR "\[oq]\\$1\[cq]"
+. nop (register
+. CR "\[oq]\\$2\[cq]\c"
+. nop ).
+..
+.
+.
+.de XDEFS
+. br
+. B Default:
+. CR "\[oq]\\$1\[cq]"
+. nop (string
+. CR "\[oq]\\$2\[cq]\c"
+. nop ).
+..
+.
+.\" ====================================================================
+.SH Description
+.\" ====================================================================
+.
+The
+.I hdtbl
+macros consist of four base and three optional macros,
+controlled by about twenty arguments.
+.
+The syntax is simple and similar to the HTML table model and nearly as
+flexible:
+you can write sequences of tokens
+(macro calls with their arguments and content data),
+separated by blanks and beginning with a macro call,
+into the same line to get compact and cleanly arrranged input.
+.
+An advantage of
+.I hdtbl
+is that the tables are constructed without calling a preprocessor;
+this means that
+.MR groff @MAN7EXT@ 's
+full macro capabilities are available.
+.
+On the other hand,
+table processing with
+.I hdtbl
+is much slower than using the
+.MR @g@tbl @MAN1EXT@
+preprocessor.
+.
+A further advantage is that the HTML-like syntax of
+.I hdtbl
+will be easily converted to HTML;
+this is not implemented yet.
+.
+.
+.\" ====================================================================
+.SH Usage
+.\" ====================================================================
+.
+In this and the next section, we present examples to help users
+understand the basic workflow of
+.IR hdtbl .
+.
+First of all, you must load the
+.I hdtbl.tmac
+file.
+.
+As with nearly all other
+.I groff
+macro packages,
+there are two possibilities to do so:
+.
+Either add the line
+.
+.
+.PP
+.RS
+.EX
+\&.mso hdtbl.tmac
+.EE
+.RE
+.
+.
+.PP
+to your
+.I roff
+file before using any macros of the
+.I hdtbl
+package, or add the option
+.
+.PP
+.RS
+.EX
+\-m hdtbl
+.EE
+.RE
+.
+.
+.PP
+to the command line of groff (before the document file which contains
+.I hdtbl
+macros).
+.
+Then you can include on or more tables in your document, where each one
+must be started and ended with the
+.CR .TBL
+and
+.CR .ETB
+macros, respectively.
+.
+.
+.PP
+In this man page,
+we approximate the result of each example as terminal output to be as
+generic as possible since
+.I hdtbl
+currently only supports the
+.B ps
+and
+.B pdf
+output drivers.
+.
+.
+.PP
+The simplest well-formed table consists of just single calls to the
+four base table macros in the right order.
+.
+Here we construct a table with only one cell.
+.
+.
+.PP
+.RS
+.EX
+\&.TBL
+\&.TR
+\&.TD
+.I contents of the table cell
+\&.ETB
+.EE
+.RE
+.
+.
+.PP
+A terminal representation is
+.
+.
+.PP
+.if t .ne 3v
+.RS
+.EX
+.tr -\-
++------------------------------------------------------+
+.\" That's 27 spaces below.
+.RI "| " contents-of-the-table-cell " |"
++------------------------------------------------------+
+.tr --
+.EE
+.RE
+.
+.
+.PP
+Equivalent to the above is the following notation.
+.
+.
+.PP
+.RS
+.EX
+.RI ".TBL .TR .TD \[dq]" "contents of the table cell" "\[dq] .ETB"
+.EE
+.RE
+.
+.
+.PP
+By default, the formatted table is inserted into the surrounding text
+at the place of its definition.
+.
+If the vertical space isn't sufficient, it is placed at the top of
+the next page.
+.
+Tables can also be stored for later insertion.
+.
+.
+.PP
+Using
+.CIR \[oq]row-number * column-number\[cq]
+as the data for the table cells, a table with two rows and two columns
+can be written as
+.
+.
+.PP
+.RS
+.EX
+\&.TBL cols=2
+\&.\& TR .TD 1*1 .TD 1*2
+\&.\& TR .TD 2*1 .TD 2*2
+\&.ETB
+.EE
+.RE
+.
+.
+.PP
+A terminal representation is
+.
+.
+.PP
+.if t .ne 5v
+.RS
+.EX
+.tr -\-
++--------------------------+---------------------------+
+| 1*1 | 1*2 |
++--------------------------+---------------------------+
+| 2*1 | 2*2 |
++--------------------------+---------------------------+
+.tr --
+.EE
+.RE
+.
+.
+.PP
+Here we see a difference from HTML tables: The number of columns must be
+explicitly specified using the
+.CRI \[oq]cols= m\[cq]
+argument (or indirectly via the
+.CR \[oq]width\[cq]
+argument, see below).
+.
+.
+.PP
+The contents of a table cell is arbitrary;
+for example,
+it can be another table,
+without restriction to the nesting depth.
+.
+A given table layout can be either constructed with suitably nested
+tables or with proper arguments to
+.CR .TD
+and
+.CR .TH\c
+, controlling column and row spanning.
+.
+Note, however, that this table
+.
+.
+.PP
+.RS
+.EX
+\&.TBL
+\&.\& TR
+\&.\& TD
+\&.\& nop 1*1 1*2
+\&.\& TR
+\&.\& TD
+\&.\& TBL cols=2 border=
+\&.\& TR
+\&.\& TD
+\&.\& nop 2*1
+\&.\& TD
+\&.\& nop 2*2
+\&.\& ETB
+\&.ETB
+.EE
+.RE
+.
+.
+.PP
+and this table
+.
+.
+.PP
+.RS
+.EX
+\&.TBL cols=2
+\&.\& TR
+\&.\& TD colspan=2
+\&.\& nop 1*1 1*2
+\&.\& TR
+\&.\& TD
+\&.\& nop 2*1
+\&.\& TD
+\&.\& nop 2*2
+\&.ETB
+.EE
+.RE
+.
+.
+.PP
+are similar but not identical (the use of
+.CR .nop
+is purely cosmetic to get proper indentation).
+.
+.
+.PP
+The first table looks like
+.
+.PP
+.if t .ne 7v
+.RS
+.EX
+.tr -\-
++------------------------------------------------------+
+| 1*1 1*2 |
++------------------------------------------------------+
+| |
+| 2*1 2*2 |
+| |
++------------------------------------------------------+
+.tr --
+.EE
+.RE
+.
+.
+.PP
+and the second one like
+.
+.
+.PP
+.if t .ne 5v
+.RS
+.EX
+.tr -\-
++------------------------------------------------------+
+| 1*1 1*2 |
++---------------------------+--------------------------+
+| 2*1 | 2*2 |
++---------------------------+--------------------------+
+.tr --
+.EE
+.RE
+.
+.
+.PP
+Here is the latter table in a more compact form.
+.
+.PP
+.RS
+.EX
+\&.TBL cols=2 .TR \[dq].TD colspan=2\[dq] 1*1 1*2
+\&.\& TR .TD 2*1 .TD 2*2 .ETB
+.EE
+.RE
+.
+.
+.PP
+If a macro has one or more arguments
+(see below),
+and it is not starting a line,
+everything belonging to this macro including the macro itself must be
+enclosed in double quotes.
+.
+.
+.\" ====================================================================
+.SH "Macros and arguments"
+.\" ====================================================================
+.
+The order of macro calls and other tokens follows the HTML model.
+.
+In the following list, valid predecessors and successors of all
+.I hdtbl
+macros are given, together with the possible arguments.
+.
+.PP
+Macro arguments are separated by blanks.
+.
+The order of arguments is arbitrary; they are of the form
+.
+.PP
+.RS
+.CRI key= value
+.RE
+.
+.PP
+or
+.
+.PP
+.RS
+.CRI key=\[aq] "value1 \[lB]value2 \[lB]\[ell]\[rB]\[rB]" \[aq]
+.RE
+.
+.PP
+with the only exception of the optional argument of the macro
+.CR .ETB\c
+, which is the string
+.CR \[oq]hold\[cq]\c
+\&.
+.
+Another possible form is
+.
+.PP
+.RS
+.CRI \[dq]key= "value1 \[lB]value2 \[lB]\[ell]\[rB]\[rB]" \[dq]
+.RE
+.
+.
+.PP
+However,
+this is limited to the case where the macro is the first one in the line
+and not already enclosed in double quotes.
+.
+.
+.PP
+Argument values specified below as\~\c
+.CI c
+are colors predefined by
+.I groff
+or colors defined by the user with the
+.CR .defcolor
+request.
+.
+Argument values\~\c
+.CI d
+are decimal numbers with or without decimal point.
+.
+Argument values\~\c
+.CI m
+are natural numbers.
+.
+Argument values\~\c
+.CI n
+are numerical values with the usual
+.I groff
+scaling indicators.
+.
+Some of the arguments are specific to one or two macros, but most of
+them can be specified with
+.CR .TBL\c
+,
+.CR .TR\c
+,
+.CR .TD\c
+, and
+.CR .TH\
+\&.
+.
+These common arguments are explained in the next subsection.
+.
+.
+.PP
+Most of the argument default values can be changed by the user by
+setting corresponding default registers or strings, as listed below.
+.
+.\"==================================================================
+.
+.TP
+.CBI ".TBL " \[lB]args\[rB]
+Begin a new table.
+.
+.IP
+.RS
+.XB predecessor: .TD .TH .ETB "cell contents"
+.XB successor: .CPTN .TR
+.XB arguments:
+.
+.RS
+.XAA border= \[lB]n\[rB]
+Thickness of the surrounding box border.
+.
+.CR \%\[oq]border=\[cq]
+(no value) means neither a surrounding box border nor any horizontal or
+vertical separator lines between the table rows and cells.
+.
+.CR \%\[oq]border=0\[cq]
+suppresses the surrounding box border, but still allows separator lines
+between cells and rows.
+.
+.XDEFR border=.1n t*b
+.
+.XAA bc= c
+Border color.
+.
+.XDEFS bc=red4 t*bc
+.
+.XAA cols= m
+Number of table columns.
+.
+This argument is necessary if more than one column is in the table and
+no
+.CR \[oq]width\[cq]
+arguments are present.
+.
+.XDEFR cols=1 t*cols
+.
+.XAA cpd= n
+Cell padding, i.e., the extra space between the cell space border and
+the cell contents.
+.
+.XDEFR cpd=.5n t*cpd
+.
+.XAA csp= n
+Cell spacing, i.e., the extra space between the table border or
+vertical or horizontal lines between cells and the cellspace.
+.
+.XDEFR csp=.5n t*csp
+.
+.XAA tal=l\[or]c\[or]r
+Horizontal alignment of the table, if it is smaller than the line width.
+.
+.CR \[oq]tal=l\[cq]\c
+: left alignment.
+.
+.CR \[oq]tal=c\[cq]\c
+: centered alignment.
+.
+.CR \[oq]tal=r\[cq]\c
+: right alignment.
+.
+.XDEFR tal=l t*tal
+.
+.XAA "width=\[aq]" "w1 \[lB]w2 \[lB]\[ell]\[rB]\[rB]" \[aq]
+Widths of table cells.
+.
+.CI w1\c
+.RI , ""
+.CI w2\c
+.RI , ""
+\[ell] are either numbers of type\~\c
+.CI n
+or natural numbers with the pseudo-scaling indicator
+.CR \[oq]%\[cq]\c
+, with the meaning \[lq]percent of the actual line length
+(or column length for inner tables,
+respectively)\[rq].
+.
+If there are less width values than table columns,
+the last width value is used for the remaining cells.
+.
+The argument
+.
+.RS
+.IP
+.CR width=\[aq]1.5i 10%\[aq]
+.RE
+.
+.IP
+for example indicates that the first column is 1.5\~inches wide; the
+remaining columns take 1/10 of the column length each.
+.
+.XDEF
+The table width equals the outer line length or column length;
+the columns have equal widths.
+.
+.XAA height= n
+Height of the table.
+.
+If the table with its contents is lower than\~\c
+.CI n\c
+.RI , ""
+the last row is stretched to this value.
+.RE
+.RE
+.
+.\"==================================================================
+.
+.TP
+.CBI ".CPTN " \[lB]args\[rB]
+Text of caption.
+.
+.IP
+The (optionally numbered) table caption.
+.
+.CR .CPTN
+is optional.
+.
+.IP
+.RS
+.XB predecessor: .TBL
+.XB successor: .TR
+.XB arguments:
+.
+.RS
+.XAA val=t\[or]b
+Vertical alignment of the table caption.
+.
+.CR \[oq]val=t\[cq]\c
+: The caption is placed above the table.
+.
+.CR \[oq]val=b\[cq]\c
+: The caption is placed below the table.
+.
+.XDEFS val=t t*cptn
+.RE
+.RE
+.
+.\"==================================================================
+.
+.TP
+.CBI ".TR " \[lB]args\[rB]
+Begin a new table row.
+.
+.IP
+.RS
+.XB predecessor: .TBL .CPTN .TD .TH .ETB "cell contents"
+.XB successor: .TD .TH
+.XB arguments:
+.
+.RS
+.XAA height= n
+The height of the row.
+.
+If a cell in the row is higher than\~\c
+.CI n\c
+.RI , ""
+this value is ignored;
+otherwise the row height is stretched to\~\c
+.CI n\c
+.RI . ""
+.RE
+.RE
+.
+.\"==================================================================
+.
+.TP
+.CBI ".TD " "\[lB]args \[lB]cell contents\[rB]\[rB]"
+Begin a table data cell.
+.TQ
+.CBI ".TH " "\[lB]args \[lB]cell contents\[rB]\[rB]"
+Begin a table header cell.
+.
+.IP
+Arguments and cell contents can be mixed.
+.
+The macro
+.CR .TH
+is not really necessary and differs from
+.CR .TD
+only in three default settings, similar to the
+.CR <TH>
+and
+.CR <TD>
+HTML tags: The contents of
+.CR .TH
+is horizontally and vertically centered and typeset in boldface.
+.
+.IP
+.RS
+.XB predecessor: .TR .TD .TH .ETB "cell contents"
+.XB successor: .TD .TH .TR .ETB "cell contents"
+.XB arguments:
+.
+.RS
+.XAA colspan= m
+The width of this cell is the sum of the widths of the\~\c
+.CI m
+cells above and below this row.
+.
+.XAA rowspan= m
+The height of this cell is the sum of the heights of the
+.CI m
+cells left and right of this column.
+.
+.IP
+.B Remark:
+Overlapping of column and row spanning,
+as in the following table fragment
+(the overlapping happens in the second cell in the second row),
+is invalid and causes incorrect results.
+.
+.
+.RS
+.IP
+.EX
+\&.TR .TD 1*1 \[dq].TD 1*2 rowspan=2\[dq] .TD 1*3
+\&.TR \[dq].TD 2*1 colspan=2\[dq] .TD 2*3
+.EE
+.RE
+.
+.
+.PP
+A working example for headers and cells with
+.B colspan
+is
+.
+.
+.PP
+.RS
+.EX
+\&.TBL cols=3
+\&.\& TR \[dq].TH colspan=2\[dq] header1+2 .TH header3
+\&.\& TR .TD 1*1 .TD 1*2 .TD 1*3
+\&.\& TR .TD 2*1 \[dq].TD colspan=2\[dq] 2*2+3
+\&.ETB
+.EE
+.RE
+.
+.
+.PP
+This looks like
+.
+.
+.PP
+.if t .ne 7v
+.RS
+.EX
+.tr -\-
++------------------------------+---------------+
+| header1+2 | header3 |
++--------------+---------------+---------------+
+| 1*1 | 1*2 | 1*3 |
++--------------+---------------+---------------+
+| 2*1 | 2*2+3 |
++--------------+-------------------------------+
+.tr --
+.EE
+.RE
+.
+.
+.PP
+A working example with
+.B rowspan
+is
+.
+.
+.PP
+.RS
+.EX
+\&.TBL cols=3
+\&.\& TR
+\&.\& TD 1*1
+\&.\& TD rowspan=2 1+2*2
+\&.\& TD 1*3
+\&.\&
+\&.\& TR
+\&.\& TD 2*1
+\&.\& TD 2*3
+\&.ETB
+.EE
+.RE
+.
+.
+.PP
+which looks like
+.
+.
+.PP
+.if t .ne 5v
+.RS
+.EX
+.tr -\-
++--------------+---------------+---------------+
+| 1*1 | 1+2*2 | 1*3 |
++--------------+ +---------------+
+| 2*1 | | 2*3 |
++--------------+---------------+---------------+
+.tr --
+.EE
+.RE
+.RE
+.RE
+.
+.\"==================================================================
+.
+.
+.TP
+.CB ".ETB \[lB]hold\[rB]"
+End of the table.
+.
+.IP
+This macro finishes a table.
+.
+It causes one of the following actions.
+.
+.RS
+.IP \[bu] 3
+If the argument
+.CR \[oq]hold\[cq]
+is given, the table is held until it is freed by calling the macro
+.CR .t*free\c
+, which in turn prints the table immediately,
+either at the current position or at the top of the next page if its
+height is larger than the remaining space on the page.
+.
+.IP \[bu] 3
+Otherwise, if the table is higher than the remaining space on the page,
+it is printed at the top of the next page.
+.
+.IP \[bu] 3
+If neither of the two above constraints hold, the table is printed
+immediately at the place of its definition.
+.RE
+.
+.IP
+.RS
+.XB predecessor: .TD .TH .ETB "cell contents"
+.XB successor: .TBL .TR .TD .TH .ETB "cell contents"
+.XB arguments:
+.
+.RS
+.XAA hold
+Prevent the table from being printed until it is freed by calling the
+macro
+.CR .t*free\c
+\&.
+.
+This argument is ignored for inner (nested) tables.
+.RE
+.RE
+.
+.\"==================================================================
+.
+.TP
+.CBI ".t*free " \[lB]n\[rB]
+Free the next held table or
+.CI n\~\c
+.RI held ""
+tables.
+.
+Call this utility macro to print tables which are held by using the
+.CR \[oq]hold\[cq]
+argument of the
+.CR .ETB
+macro.
+.
+.
+.\" ====================================================================
+.SS "Arguments common to \f[CB].TBL\f[], \f[CB].TR\f[], \f[CB].TD\f[], \
+and \f[CB].TH\f[]"
+.\" ====================================================================
+.
+The arguments described in this section can be specified with the
+.CR .TBL
+and
+.CR .TR
+macros, but they are eventually passed on to the table cells.
+.
+If omitted,
+the defaults take place,
+which the user can change by setting the corresponding default registers
+or strings,
+as documented below.
+.
+Setting an argument with the
+.CR .TBL
+macro has the same effect as setting it for all rows in the table.
+.
+Setting an argument with a
+.CR .TR
+macro has the same effect as setting it for all the
+.CR .TH
+or
+.CR .TD
+macro in this row.
+.
+.IP
+.XAA bgc= \[lB]c\[rB]
+The background color of the table cells.
+.
+This includes the area specified with the
+.CR \[oq]csp\[cq]
+argument.
+.
+The argument
+.CR \[oq]bgc=\[cq]
+(no value) suppresses a background color; this makes the background
+transparent.
+.
+.XDEFS bgc=bisque t*bgc
+.
+.XAA fgc= c
+The foreground color of the cell contents.
+.
+.XDEFS fgc=red4 t*fgc
+.
+.XAA ff= name
+The font family for the table.
+.
+.CI name
+is a
+.I groff
+font family identifier,
+such as
+.CR A
+for Avant Garde or
+.CR HN
+for Helvetica Narrow.
+.
+.XDEF
+The font family found before the table (string
+.CR \[oq]t*ff\[cq]\c
+).
+.
+.XAA fst= style
+The font style for the table.
+.
+One of
+.CR R\c
+,
+.CR B\c
+,
+.CR I\c
+, or
+.CR BI
+for roman,
+.BR bold ,
+.IR italic ,
+or \f[BI]bold italic\f[], \" \f[BI] is not portable man(7)
+respectively.
+.
+As with
+.IR roff 's
+.B .ft
+request,
+the
+.CR \[oq]fst\[cq]
+argument can be used to specify the font family and font style together,
+for example
+.CR \[oq]fst=HNBI\[cq]
+instead of
+.CR \[oq]ff=HN\[cq]
+and
+.CR \[oq]fst=BI\[cq]\c
+\&.
+.
+.XDEF
+The font style in use right before the table (string
+.CR \[oq]t*fst\[cq]\c
+).
+.
+.XAA "fsz=\[aq]" "d1 \[lB]d2\[rB]" \[aq]
+A decimal or fractional factor
+.CI d1\c
+.RI , ""
+by which the point size for the table is changed, and
+.CI d2\c
+.RI , ""
+by which the vertical line spacing is changed.
+.
+If
+.CI d2
+is omitted, value
+.CI d1
+is taken for both.
+.
+.XDEFS "fsz=\[aq]1.0 1.0\[aq]" t*fsz
+.
+.XAA hal=l\[or]c\[or]b\[or]r
+Horizontal alignment of the cell contents in the table.
+.
+.CR \[oq]hal=l\[cq]\c
+: left alignment.
+.
+.CR \[oq]hal=c\[cq]\c
+: centered alignment.
+.
+.CR \[oq]hal=b\[cq]\c
+: both (left and right) alignment.
+.
+.CR \[oq]hal=r\[cq]\c
+: right alignment.
+.
+.XDEFS hal=b t*hal
+.
+.XAA val=t\[or]m\[or]b
+Vertical alignment of the cell contents in the table for cells lower
+than the current row.
+.
+.CR \[oq]val=t\[cq]\c
+: alignment below the top of the cell.
+.
+.CR \[oq]val=m\[cq]\c
+: alignment in the middle of the cell.
+.
+.CR \[oq]val=b\[cq]\c
+: alignment above the cell bottom.
+.
+.XDEFS val=t t*val
+.
+.XAA hl=\[lB]s\[or]d\[rB]
+Horizontal line between the rows.
+.
+If specified with
+.CR .TD
+or
+.CR .TH
+this is a separator line to the cell below.
+.
+.CR \[oq]hl=\[cq]
+(no value): no separator line.
+.
+.CR \[oq]hl=s\[cq]\c
+: a single separator line between the rows.
+.
+.CR \[oq]hl=d\[cq]\c
+: a double separator line.
+.
+.IP
+The thickness of the separator lines is the half of the border
+thickness,
+but at least 0.1\~inches.
+.
+The distance between the double lines is equal to the line thickness.
+.
+.IP
+.B Remark:
+Together with
+.CR \[oq]border=0\[cq]
+for proper formatting the value of
+.CR \[oq]csp\[cq]
+must be at least \&.05\~inches for single separator lines and
+\&.15\~inches for double separator lines.
+.
+.XDEFS hl=s t*hl
+.
+.XAA vl=\[lB]s\[or]d\[rB]
+Vertical separator line between the cells.
+.
+If specified with
+.CR .TD
+or
+.CR .TH
+this is a separator line to the cell on the right.
+.
+.CR \[oq]vl=s\[cq]\c
+: a single separator line between the cells.
+.
+.CR \[oq]vl=d\[cq]\c
+: a double separator line.
+.
+.CR \[oq]vl=\[cq]
+(no value): no vertical cell separator lines.
+.
+For more information see the documentation of the
+.CR \[oq]hl\[cq]
+argument above.
+.
+.XDEFS vl=s t*vl
+.
+.
+.\" ====================================================================
+.SH "\f[I]hdtbl\f[] customization"
+.\" ====================================================================
+.
+.PP
+Before creating the first table, you should configure default values
+to minimize the markup needed in each table.
+.
+The following example sets up defaults suitable for typical papers:
+.
+.
+.PP
+.RS
+.EX
+\&.ds t*bgc white\[rs]\[dq] background color
+\&.ds t*fgc black\[rs]\[dq] foreground color
+\&.ds t*bc black\[rs]\[dq] border color
+\&.nr t*cpd 0.1n\[rs]\[dq] cell padding
+.EE
+.RE
+.
+.
+.PP
+The file
+.I @EXAMPLEDIR@/\:hdtbl/\:\%common\:.roff
+provides another example setup
+in the \[lq]minimal Page setup\[rq] section.
+.
+.
+.PP
+A table which does not fit on a partially filled page is printed
+automatically on the top of the next page if you append the little
+utility macro
+.CR t*hm
+to the page header macro of your document's main macro package.
+.
+For example, say
+.
+.
+.PP
+.RS
+.EX
+\&.am pg@top
+\&.\& t*hm
+\&..
+.EE
+.RE
+.
+.
+.PP
+if you use the
+.I ms
+macro package.
+.
+.
+.PP
+The macro
+.CR t*EM
+checks for held or kept tables,
+and for missing
+.CR ETB
+macros (table not closed).
+.
+You can call this macro by appending it the to end-of-input macro of
+the main,
+or \[lq]full-service\[rq],
+macro package your document uses.
+.
+For example,
+try
+.
+.
+.RS
+.EX
+\&.am pg@end\-text
+\&.\& t*EM
+\&..
+.EE
+.RE
+.
+if you use the
+.I ms
+package.
+.
+.
+.\" ====================================================================
+.SH "Bugs and suggestions"
+.\" ====================================================================
+.
+Please send your comments to the
+.MT groff@\:gnu\:.org
+.I groff
+mailing list
+.ME
+or directly to the author.
+.
+.
+.\" ====================================================================
+.SH Authors
+.\" ====================================================================
+.
+The
+.I hdtbl
+macro package was written by
+.MT Joachim\:.Walsdorff@\:urz\:.uni\-heidelberg\:.de
+Joachim Walsdorff
+.ME .
+.
+.
+.\" ====================================================================
+.SH "See also"
+.\" ====================================================================
+.
+.TP
+.MR groff @MAN1EXT@
+provides an overview of GNU
+.I roff
+and details how to invoke
+.I groff
+at the command line.
+.
+.
+.TP
+.MR groff @MAN7EXT@
+summarizes the
+.I roff
+language and GNU extensions to it.
+.
+.
+.TP
+.MR @g@tbl @MAN1EXT@
+describes the traditional
+.I roff
+preprocessor for tables.
+.
+.
+.\" Unwind (some of) the stuff we've done.
+.rchar \[lB]
+.rchar \[rB]
+.rchar \[or]
+.rchar \[ell]
+.rchar \[oq]
+.rchar \[cq]
+.
+.\" Restore compatibility mode (for, e.g., Solaris 10/11).
+.cp \n[*groff_groff_hdtbl_7_man_C]
+.do rr *groff_groff_hdtbl_7_man_C
+.
+.
+.\" Local Variables:
+.\" fill-column: 72
+.\" mode: nroff
+.\" End:
+.\" vim: set filetype=groff textwidth=72:
diff --git a/contrib/hdtbl/hdmisc.tmac b/contrib/hdtbl/hdmisc.tmac
new file mode 100644
index 0000000..9709bd8
--- /dev/null
+++ b/contrib/hdtbl/hdmisc.tmac
@@ -0,0 +1,327 @@
+.ig
+
+hdmisc.tmac
+
+This file is part of groff, the GNU roff type-setting system.
+
+Copyright (C) 2005-2020 Free Software Foundation, Inc.
+written by Joachim Walsdorff <Joachim.Walsdorff@urz.uni-heidelberg.de>.
+
+groff is free software; 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.
+
+groff is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+..
+.
+.
+.if d t*getarg \
+. nx
+.
+.
+.\" ******************************************************************
+.\" ** Some macros and default settings needed by hdtbl **
+.\" ******************************************************************
+.
+.
+.\" Utility macro: .getarg <key> ...
+.\"
+.\" Get macro argument. This macro searches <key> in the
+.\" remaining arguments and assigns its value to a string
+.\" register named <key>. The following syntax forms are
+.\" recognized.
+.\"
+.\" <key>=<val> Assign <val> to string <key>.
+.\" <val> must not contain spaces.
+.\" <key>='<val>' Assign <val> to string <key>.
+.\" <val> can contain spaces.
+.\" <key>= Assign '=' to string <key>.
+.\" <key> Assign 'key' to string <key>.
+.\"
+.\" After return, the string 'args' contains the remaining
+.\" arguments.
+.\"
+.\" Example: With the definition of string 'foo' as
+.\"
+.\" .ds foo aaa=xxx bbb ccc='yyy zzz' ddd= eee
+.\"
+.\" a call to 'getarg' with
+.\"
+.\" .getarg ccc \*[foo]
+.\"
+.\" sets string 'ccc' to value 'yyy zzz'. The string 'args'
+.\" now contains 'aaa=xxx bbb ddd= eee'. An additional call
+.\" like
+.\"
+.\" .getarg ddd \*[args]
+.\"
+.\" sets string 'ddd' to value '=', and 'args' contains
+.\" 'aaa=xxx bbb eee'.
+.de t*getarg
+. ds \\$1
+. ds args
+.
+. if (\\n[.$] < 2) \
+. return
+.
+. ds $1 \\$1\"
+. shift
+.
+. length * \\*[$1]
+. while \\n[.$] \{\
+. ds * "\\$1\"
+. ds ** "\\$1\"
+. length ** \\*[**]
+. shift
+. if (\\n[*] > \\n[**]) \{\
+. as args " "\\*[**]"\" value too short, repeat
+. continue
+. \}
+. substring * 0 (\\n[*] - 1)
+. \" The surrounding \? escapes emulate string comparison.
+. ie !"\?\\*[$1]\?"\?\\*[*]\?" \{\
+. as args " "\\*[**]"\" key not found, repeat
+. continue
+. \}
+. el \{\
+. ie "\?\\*[**]\?"\?\\*[$1]\?" \
+. ds \\*[$1] \\*[$1]\" return key as string
+. el \{\
+. ie "\?\\*[**]\?"\?\\*[$1]=\?" \
+. ds \\*[$1] =\" return '='
+. el \{\
+. substring ** (\\n[*] + 1) -1
+. ds * \\*[**]\"
+. substring * 0 0
+.
+. \" check whether value starts with quote
+. if "\?\\*[*]\?"\?'\?" \{\
+. substring ** 1 -1
+. ds * \\*[**]\"
+. substring * -1 -1
+.
+. \" search final quote
+. ie "\?\\*[*]\?"\?'\?" \
+. substring ** 0 -2
+. el \{\
+. as \\*[$1] \\*[**] \" not found, append argument
+.
+. while 1 \{\
+. ds ** \\$1\" get next argument
+. ds * \\$1\"
+. shift
+. substring * -1 -1
+.
+. if "\?\\*[*]\?"\?'\?" \{\
+. substring ** 0 -2
+. break \" break if no final quote
+. \}
+.
+. as \\*[$1] \\*[**] \" otherwise append and repeat
+. \}
+. \}\}
+.
+. as \\*[$1] \\*[**]\"
+. \}
+.
+. as args " \\$@\"
+. \}\}
+.
+. return
+. \}
+..
+.
+.
+.\" Utility macro: .index <string1> <string2>
+.\"
+.\" Check whether <string2> is a substring of <string1> and
+.\" return its position in number register 't*index', starting
+.\" with 1. If not found, return 0. If <string2> is empty,
+.\" set 't*index' to -999.
+.de t*index
+. if "\\$2"" \{\
+. nr t*index -999
+. return
+. \}
+.
+. length ** \\$1
+. length $2 \\$2
+. nr * 0-1 1
+.
+. while (\\n+[*] < \\n[**]) \{\
+. ds * \\$1\"
+. substring * \\n[*] (\\n[*] + \\n[$2] - 1)
+. \" The surrounding \? escapes emulate string comparison.
+. if "\?\\*[*]\?"\?\\$2\?" \
+. break
+. \}
+.
+. ie (\\n[*] == \\n[**]) \
+. nr t*index 0
+. el \
+. nr t*index (\\n[*] + 1)
+..
+.
+.
+.\" ******************************************************************
+.\" ******** non-accumulating space .t*SP [v] **********
+.\" ** **
+.\" ** nl vor erster Seite -1, oben auf Seite 0 resp. tH **
+.\" ** .k nach .sp oder .br 0, **
+.\" ** sonst Laenge der angefangenen Zeile **
+.\" ** Der Merker M# fuer vorangegangenes .t*SP wird in .HM am **
+.\" ** Seitenanfang zurueckgesetzt. **
+.\" ** ganz richtig ist .sp + .br = .br + .sp = .sp **
+.\" ******************************************************************
+.de t*SP
+. if (\\n[nl] < 0) \
+. br \" start very first page
+. nr * \\n[.p] \" save current page length
+.
+. ie "\\$1"" \
+. pl +1 \" without arg increase page length by 1v
+. el \
+. pl +\\$1 \" otherwise use \\$1
+.
+. nr ** (\\n[.p] - \\n[*]) \" ** now holds arg for .t*SP in base units
+. pl \\n[*]u \" restore page length
+.
+. \" we do nothing at start of new page or column
+. if ((\\n[nl] - \\n[tH]) & (\\n[nl] - \\n[<<]) : \\n[.k]) \{\
+. ie ((\\n[.d] - \\n[M#]) : \\n[.k]) \{\
+. sp \\n[**]u \" execute .sp
+. nr S# \\n[**] \" store ** in S#
+. \}
+. el \{\
+. if (\\n[**] - \\n[S#]) \{\
+. sp (\\n[**]u - \\n[S#]u)\" emit difference to previous .t*SP
+. nr S# \\n[**] \" store ** in S#
+. \}\}
+.
+. nr M# \\n[.d] \" store vertical position .d in M#
+. \}
+..
+.
+.
+.\" ******************************************************************
+.\" ** Perform all arguments once **
+.\" ** P1 is nestable **
+.\" ******************************************************************
+.de t*P1
+. \" 'while' command is about five times faster than recursion!
+. while \\n[.$] \{\
+. nop \\$1
+. shift
+. \}
+..
+.
+.
+.\" ******************************************************************
+.\" ** Hilfsmakro zum Einstellen von Schriftgroesse und **
+.\" ** Zeilenabstand, bezogen auf Anfangswerte \n[t*s] **
+.\" ** und \n[t*v] sowie fuer Hyphenation: **
+.\" ** .t*pv s v hy# hart; macht .br **
+.\" ** Bei 4. Argument setzen der Register s und v und hy. **
+.\" ** Fuer angefangene Zeile die vorgefundenen Einstellungen **
+.\" ** **
+.\" ** Auxiliary macro to set internal registers for font size **
+.\" ** and line spacing, relative to initial values \n[t*s] and **
+.\" ** \n[t*v]. Optionally sets hyphenation. A fourth argument **
+.\" ** initializes internal registers to global default values. **
+.\" ******************************************************************
+.de t*pv
+. br
+.
+. if \\n[.$] \
+. ps (\\n[t*s]u * \\$1z / 1z)
+.
+. ie (\\n[.$] - 1) \
+. vs (\\n[t*v]u * \\$2p / 1p)
+. el \{\
+. vs (\\n[t*v]u * \\$1p / 1p)
+. return
+. \}
+.
+. if !""\\$3" \
+. hy \\$3
+.
+. if !""\\$4" \{\
+. nr t*v \\n[.v]
+. nr t*s \\n[.ps]
+. nr t*hy \\n[.hy]
+. \}
+..
+.
+.
+.\" ******************************************************************
+.\" ** Hilfsmakros pop/pops/popr (pop stackelement): **
+.\" ** pop or popr: pop register **
+.\" ** pops: pop string **
+.\" ** .pop[s|r] reg|string stackname **
+.\" ** reg|string: name of reg/string to get the **
+.\" ** popped element **
+.\" ** stack: name of stack **
+.\" ******************************************************************
+.de *pop
+. ie "\\$1"pops" \
+. ds \\$2 \\$4\" pop first stackelement
+. el \
+. nr \\$2 \\$4
+.
+. ds $3 \\$3\" remember stackname
+. shift 4 \" shift four args
+.
+. ds \\*[$3] "\\$@\" fill stack with remaining elements
+..
+.
+.de pop
+. *pop \\$0 \\$1 \\$2 \\*[\\$2]
+..
+.
+.als popr pop
+.als pops pop
+.
+.
+.\" ******************************************************************
+.\" ** process diversion **
+.\" ******************************************************************
+.de t*DI
+. nr * \\n[.u]
+. nf \" diversion is already formatted - output it unchanged
+. \\$1 \" output the diversion ...
+. rm \\$1 \" ... and remove it
+. if \\n[*] \
+. fi \" reactivate formatting
+..
+.
+.\" ******************************************************************
+.\" ** error checking at end **
+.\" ******************************************************************
+.de t*EM
+.
+. if !"\\*[t*kept]"" \{\
+. tm1 "hdtbl: Not all tables have been printed.
+. tm1 " Add '.bp' at the end of your document.
+. \}
+. if !"\\*[t*held]"" \{\
+. tm1 "hdtbl: There are held tables which haven't been printed.
+. tm1 " Add '.t*free' at the end of your document.
+. \}
+. if \\n[t*#] \
+. tm hdtbl: Missing '.ETB' macro; last .TBL in \\*[t*FN] at line \\*[t*LN].
+..
+.
+.
+.\" Local Variables:
+.\" mode: nroff
+.\" fill-column: 72
+.\" End:
+.\" vim: set filetype=groff textwidth=72:
diff --git a/contrib/hdtbl/hdtbl.am b/contrib/hdtbl/hdtbl.am
new file mode 100644
index 0000000..3dd60cf
--- /dev/null
+++ b/contrib/hdtbl/hdtbl.am
@@ -0,0 +1,136 @@
+# Copyright (C) 2006-2020 Free Software Foundation, Inc.
+# Written by Werner Lemberg <wl@gnu.org>
+# Automake migration by Bertrand Garrigues
+# <bertrand.garrigues@laposte.net>
+#
+# This file is part of groff.
+#
+# groff is free software; 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.
+#
+# groff is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+hdtbl_srcdir = $(top_srcdir)/contrib/hdtbl
+
+man7_MANS += contrib/hdtbl/groff_hdtbl.7
+
+# Groff command used to generate .ps files
+HDTBLGROFF = \
+ GROFF_COMMAND_PREFIX= \
+ GROFF_BIN_PATH="$(GROFF_BIN_PATH)" \
+ $(GROFFBIN) $(FFLAG) $(MFLAG) -M$(hdtbl_srcdir) -t -p -e -U
+
+HDTBLTMACFILES = \
+ contrib/hdtbl/hdtbl.tmac \
+ contrib/hdtbl/hdmisc.tmac
+hdtbltmacdir = $(tmacdir)
+dist_hdtbltmac_DATA = $(HDTBLTMACFILES)
+
+hdtbl_test_template = contrib/hdtbl/examples/test-hdtbl.sh.in
+
+# Files installed in $(exampledir)/hdtbl. HDTBLEXAMPLEFILES are
+# located in the source tree, while HDTBLPROCESSEDEXAMPLEFILES are
+# generated in the build tree.
+
+# These files are handled by the '.in.roff' rule.
+HDTBLGENFILES = \
+ contrib/hdtbl/examples/fonts_n.roff \
+ contrib/hdtbl/examples/fonts_x.roff
+EXTRA_DIST += \
+ contrib/hdtbl/examples/fonts_n.in \
+ contrib/hdtbl/examples/fonts_x.in \
+ $(hdtbl_test_template)
+
+HDTBLEXAMPLEFILES = \
+ contrib/hdtbl/examples/common.roff \
+ contrib/hdtbl/examples/chess_board.roff \
+ contrib/hdtbl/examples/color_boxes.roff \
+ contrib/hdtbl/examples/color_nested_tables.roff \
+ contrib/hdtbl/examples/color_table_cells.roff \
+ contrib/hdtbl/examples/color_transitions.roff \
+ contrib/hdtbl/examples/col_rowspan_colors.roff \
+ contrib/hdtbl/examples/mixed_pickles.roff \
+ contrib/hdtbl/examples/rainbow.roff \
+ contrib/hdtbl/examples/short_reference.roff
+
+HDTBLPROCESSEDEXAMPLEFILES = \
+ contrib/hdtbl/examples/chess_board.ps \
+ contrib/hdtbl/examples/color_boxes.ps \
+ contrib/hdtbl/examples/color_nested_tables.ps \
+ contrib/hdtbl/examples/color_table_cells.ps \
+ contrib/hdtbl/examples/color_transitions.ps \
+ contrib/hdtbl/examples/col_rowspan_colors.ps \
+ contrib/hdtbl/examples/fonts_n.ps \
+ contrib/hdtbl/examples/fonts_x.ps \
+ contrib/hdtbl/examples/mixed_pickles.ps \
+ contrib/hdtbl/examples/rainbow.ps \
+ contrib/hdtbl/examples/short_reference.ps
+
+hdtblexampledir = $(exampledir)/hdtbl
+dist_hdtblexample_DATA = $(HDTBLEXAMPLEFILES)
+nodist_hdtblexample_DATA = \
+ $(HDTBLGENFILES) \
+ $(HDTBLPROCESSEDEXAMPLEFILES) \
+ $(DOC_GNU_EPS)
+
+$(hdtblexample_DATA): $(HDTBLTMACFILES)
+
+MOSTLYCLEANFILES += $(HDTBLGENFILES) $(HDTBLPROCESSEDEXAMPLEFILES)
+
+EXTRA_DIST += \
+ contrib/hdtbl/ChangeLog \
+ contrib/hdtbl/TODO \
+ contrib/hdtbl/groff_hdtbl.7.man
+
+hdtbl_TESTS = contrib/hdtbl/examples/test-hdtbl.sh
+TESTS += $(hdtbl_TESTS)
+contrib/hdtbl/examples/test-hdtbl.sh: \
+ $(top_builddir)/config.status \
+ $(HDTBLPROCESSEDEXAMPLEFILES) \
+ $(top_srcdir)/$(hdtbl_test_template)
+ $(AM_V_GEN)sed \
+ -e "s|[@]abs_top_builddir[@]|$(abs_top_builddir)|g" \
+ -e "s|[@]GHOSTSCRIPT[@]|$(GHOSTSCRIPT)|g" \
+ $(top_srcdir)/$(hdtbl_test_template) > $@ \
+ && chmod +x $@
+MOSTLYCLEANFILES += $(hdtbl_TESTS)
+
+# Rule to generate ps and roff files
+SUFFIXES += .roff .in .ps
+
+.roff.ps:
+ $(GROFF_V)$(MKDIR_P) `dirname $@` \
+ && $(HDTBLGROFF) -I $(doc_builddir) -I $(doc_srcdir) -Tps \
+ -dfontpath=$(top_srcdir)/font \
+ -dsopath=$(hdtbl_srcdir)/ \
+ -mhdtbl $< >$@
+
+.in.roff:
+ $(AM_V_GEN)$(MKDIR_P) `dirname $@` \
+ && sed -e "s|[@]fontdir[@]|$(fontdir)|" \
+ -e "s|[@]EGREP[@]|$(EGREP)|" $< >$@
+
+
+$(HDTBLPROCESSEDEXAMPLEFILES): $(DOC_GNU_EPS) groff troff eqn pic tbl \
+ grops font/devps/stamp contrib/hdtbl/examples/common.roff
+
+uninstall_groffdirs: uninstall-hdtbl-hook
+uninstall-hdtbl-hook:
+ if test -d $(DESTDIR)$(hdtblexampledir); then \
+ rmdir $(DESTDIR)$(hdtblexampledir); \
+ fi
+
+
+# Local Variables:
+# mode: makefile-automake
+# fill-column: 72
+# End:
+# vim: set autoindent filetype=automake textwidth=72:
diff --git a/contrib/hdtbl/hdtbl.tmac b/contrib/hdtbl/hdtbl.tmac
new file mode 100644
index 0000000..422ede7
--- /dev/null
+++ b/contrib/hdtbl/hdtbl.tmac
@@ -0,0 +1,1003 @@
+.ig
+
+hdtbl.tmac
+
+This file is part of groff, the GNU roff type-setting system.
+
+Copyright (C) 2005-2020 Free Software Foundation, Inc.
+written by Joachim Walsdorff <Joachim.Walsdorff@urz.uni-heidelberg.de>.
+
+groff is free software; 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.
+
+groff is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+..
+.
+.
+.\" *****************************************************************
+.\" * hdtbl - Heidelberger table macros *
+.\" * Vers. 0.91 December 2005 *
+.\" *****************************************************************
+.
+.if d TBL \
+. nx
+.
+.mso hdmisc.tmac
+.mso 62bit.tmac
+.
+.
+.\" *****************************************************************
+.\" * default values for some arguments *
+.\" *****************************************************************
+.
+.ds t*hl s\"
+.ds t*vl s\"
+.ds t*tal l\"
+.ds t*hal b\"
+.ds t*val t\"
+.ds t*ff \\n[.fam]\"
+.ds t*fst \\n[.f]\"
+.ds t*fsz 1 1\"
+.ds t*fgc red4\"
+.ds t*bgc bisque\"
+.ds t*bc red4\"
+.nr t*cpd .5n
+.nr t*csp .5n
+.nr t*b .1n
+.nr t*cols 1
+.nr t*v \n[.v]
+.nr t*s \n[.ps]
+.nr t*hy \n[.hy]
+.nr t*l \n[.ll]
+.
+.
+.\" defaults for table captions
+.nr t*cptn 0 1
+.ds t*cptn "".sp .4" \
+ ".t*pv 1.0 1.0" \
+ ".ad l" \
+ "\m[\\*[t*fgc]]Table \\n+[t*cptn]:\0\k*\c"\"
+.
+.
+.\" for better error messages
+.ds nth-1 st\"
+.ds nth-2 nd\"
+.ds nth-3 rd\"
+.
+.\" initialization of various registers
+.nr t*# 0 \" table nesting level
+.nr t*numb 0 1 \" held table diversion #
+.
+.ds *#trc*
+.
+.
+.\" *****************************************************************
+.\" * The four base macros and the two optional macros *
+.\" *****************************************************************
+.
+.ie n \
+. ds g tty:\"
+.el \
+. ds g ps: exec\"
+.
+.\" TBL: table start
+.\" predecessor: text, TD or ETB
+.\" successor: CPTN or TR
+.de TBL
+. ds t*m\\n[t*#] \\n[.m]\"
+. ie \\n[t*#] \
+. br
+. el \{\
+. ds * \\n[.ev]\"
+. ev t*tbl
+. evc \\*[*]
+. di t*tbl0
+. sp .4 \" XXX: hard-coded value
+. nr t*i \\n[.i]
+. ll -\\n[.i]u
+. in 0
+. \}
+. nr t*# +1
+.
+. \" Save current location for error checking at end
+. ds t*FN \\[.F]\"
+. ds t*LN \\[.c]\"
+.
+. t*getarg cols \\$@\" from here string 'args' contains the rest of \\$@
+. ie "\\*[cols]"" \
+. nr t*cols\\n[t*#] \\n[t*cols]
+. el \{\
+. ie \B\\*[cols] \
+. nr t*cols\\n[t*#] \\*[cols]
+. el \
+. tm \\n[.F]:\\n[.c]: Invalid number of columns value '\\*[cols]'.
+. \}
+.
+. t*getarg cpd \\*[args] \" cell padding
+. ie "\\*[cpd]"" \
+. nr t*cpd\\n[t*#] \\n[t*cpd]
+. el \{\
+. ie \B\\*[cpd] \
+. nr t*cpd\\n[t*#] \\*[cpd]
+. el \
+. tm \\n[.F]:\\n[.c]: Invalid cell padding value '\\*[cpd]'.
+. \}
+.
+. t*getarg csp \\*[args] \" cell spacing
+. ie "\\*[csp]"" \
+. nr t*csp\\n[t*#] \\n[t*csp]
+. el \{\
+. ie \B\\*[csp] \
+. nr t*csp\\n[t*#] \\*[csp]
+. el \
+. tm \\n[.F]:\\n[.c]: Invalid cell spacing value '\\*[csp]'.
+. \}
+.
+. t*getarg border \\*[args] \" border thickness
+. ie "\\*[border]"=" \
+. nr t*b\\n[t*#] 0-1
+. el \{\
+. ie "\\*[border]"" \
+. nr t*b\\n[t*#] \\n[t*b]
+. el \{\
+. ie \B\\*[border] \
+. nr t*b\\n[t*#] \\*[border]
+. el \
+. tm \\n[.F]:\\n[.c]: Invalid border thickness value '\\*[border]'.
+. \}\}
+.
+. t*getarg bc \\*[args] \" border color
+. ds t*bc\\n[t*#] \\*[t*bc]\"
+. if !"\\*[bc]"" \{\
+. ie m\\*[bc] \
+. ds t*bc\\n[t*#] \\*[bc]\"
+. el \{\
+. ie "\\*[bc]"=" \
+. ds t*bc\\n[t*#] =\"
+. el \
+. tm \\n[.F]:\\n[.c]: Invalid border color '\\*[bc]'.
+. \}\}
+. ie "\\*[bc]"=" \
+. ds t*bc\\n[t*#]
+. el \{\
+. ie "\\*[bc]"" \
+. ds t*bc\\n[t*#] \\*[t*bc]\"
+. el \
+. ds t*bc\\n[t*#] \\*[bc]\"
+. \}
+.
+. t*getarg width \\*[args] \" table/col widths
+. if "\\*[width]"=" \
+. ds width
+.
+. nr b/2\\n[t*#] (\\n[t*b\\n[t*#]] / 2)\" shortcut
+. nr cscp\\n[t*#] (\\n[t*csp\\n[t*#]] + \\n[t*cpd\\n[t*#]])\" aux. register
+.
+. t*getarg height \\*[args] \" table outline height
+. ie "\\*[height]"" \
+. nr t*height\\n[t*#] 0
+. el \{\
+. ie \B\\*[height] \
+. nr t*height\\n[t*#] (\\*[height] \
+ - ((2 * \\n[cscp\\n[t*#]]) \
+ + (3 * \\n[b/2\\n[t*#]])))
+. el \
+. tm \\n[.F]:\\n[.c]: Invalid height value '\\*[height]'.
+. \}
+.
+. t*cl \\*[width] \" get cell widths and offsets
+. t*args \\n[t*#] \" look for common arguments
+.
+. t*getarg tal \\*[args] \" table horizontal alignment
+. if "\\*[tal]"" \
+. ds tal \\*[t*tal]\"
+. ie "\\*[tal]"l" \
+. nr in\\n[t*#] \\n[.i]
+. el \{\
+. ie "\\*[tal]"c" \
+. nr in\\n[t*#] (\\n[.l] - \\n[ll\\n[t*#]]/2 + \\n[.i])
+. el \{\
+. ie "\\*[tal]"r" \
+. nr in\\n[t*#] (\\n[.l] - \\n[ll\\n[t*#]] + \\n[.i])
+. el \{\
+. tmc \\n[.F]:\\n[.c]: Invalid horizontal table alignment '\\*[tal]':
+. tm1 " must be 'l', 'c' or 'r'.
+. \}\}\}
+.
+. nr t*r#\\n[t*#] 0 \" initialize row index
+. mk toptbl\\n[t*#]
+.
+. t*P1 \\*[args]
+..
+.
+.
+.\" CPTN: optional table caption
+.\" predecessor: TBL
+.\" successor: TR
+.de CPTN
+. ft 1
+.
+. if "\\$0"CPTN" \
+. if \\n[t*r#\\n[t*#]] \{\
+. tmc \\n[.F]:\\n[.c]: Invalid placement of '.CPTN';
+. tm1 " must be called immediately after '.TBL'.
+. return
+. \}
+.
+. t*getarg val \\$@
+. ds args\\n[t*#] "\\*[args]\"
+.
+. t*index "\\*[args]" .TR
+. ie \\n[t*index] \{\
+. ds *a\\n[t*#] "\\*[args]\"
+. substring args\\n[t*#] 0 \\n[t*index]
+. substring *a\\n[t*#] \\n[t*index]-2 -1
+. \}
+. el \
+. ds *a\\n[t*#]
+.
+. ie "\\*[val]"b" \{\
+. de t*cptn\\n[t*#]
+. *CPTN \\*[args\\n[t*#]]
+. rm t*cptn\\n[t*#]
+\\..
+. \}
+. el \{\
+. ll (\\n[ll\\n[t*#]]u + \\n[in\\n[t*#]]u)
+. in \\n[in\\n[t*#]]u
+. t*P1 \\*[t*cptn]
+' in +\\n[*]u
+. t*P1 \\*[args\\n[t*#]]
+. t*pv 1 1
+. in
+. mk toptbl\\n[t*#]
+. \}
+.
+. t*P1 \\*[*a\\n[t*#]]
+..
+.
+.als *CPTN CPTN
+.
+.
+.\" TR: table row
+.\" predecessor: TBL, CPTN, text, TD or ETB
+.\" successor: TD
+.de TR
+. ft 1
+. if !\\n[t*#] \{\
+. tm \\n[.F]:\\n[.c]: Table row (.TR) without preceding table start (.TBL).
+. return
+. \}
+.
+. \" finish previous data cell, if any
+. if \\n[t*r#\\n[t*#]] \
+. t*dntr 1 \\n[c#\\*[#t#r]] \\n[t*cols\\n[t*#]] \\*[*#trc*]
+.
+. nr t*r#\\n[t*#] +1 \" row number in this table
+. ds #t#r \\n[t*#]*\\n[t*r#\\n[t*#]]\" table row identifier
+. \" (<level>*<row>)
+. nr c#\\*[#t#r] 0 1 \" clear cell counter
+. nr dntr\\*[#t#r] 0 1 \" clear accumulated row height
+.
+. t*getarg height \\$@
+. ie "\\*[height]"" \
+. nr t*height\\*[#t#r] 0
+. el \{\
+. ie \B\\*[height] \
+. nr t*height\\*[#t#r] \\*[height]
+. el \
+. tm \\n[.F]:\\n[.c]: Invalid table row height '\\*[height]'.
+. \}
+.
+. \" If there is a TR with height 'height', the total height of the table
+. \" is too high by 3/2 b, independent of the number of TR with 'height'.
+. t*args \\*[#t#r] \\n[t*#] \" look for common arguments
+.
+. t*P1 \\*[args]
+..
+.
+.
+.\" TH: optional table header cell
+.\" predecessor: text, TD or TR
+.\" successor: text, TD, TR, TBL or ETB
+.\"
+.\" cell content bolded and horizontally and vertically centered,
+.\" else like .TD
+.de TH
+. ft 1
+. t*getarg hal \\$@
+. if "\\*[hal]"" \
+. ds hal c\"
+.
+. t*getarg val \\*[args]
+. if "\\*[val]"" \
+. ds val m\"
+.
+. t*getarg fst \\*[args]
+. if "\\*[fst]"" \
+. ds fst B\"
+.
+. TD hal=\\*[hal] val=\\*[val] fst=\\*[fst] \\*[args]
+..
+.
+.
+.\" TD: table data cell
+.\" predecessor: text, TD or TR
+.\" successor: text, TD, TR, TBL or ETB
+.de TD
+. ft 1
+. \" finish previous data cell -- note the use of \E
+. t*dntr 0 \\n[c#\\*[#t#r]]-1 \En[c#\\*[#t#r]] \\*[*#trc*]
+.
+. ds *#trc* \\*[#t#r]*\\n[c#\\*[#t#r]]\" table cell identifier
+. \" (<level>*<row>*<column>)
+.
+. t*getarg rowspan \\$@
+. nr rowspan 1
+. if !"\\*[rowspan]"" \{\
+. ie \B\\*[rowspan] \{\
+. nr rowspan (\\*[rowspan] >? 1)
+. nr *rsp*\\*[*#trc*] (\\n[rowspan] - 1)
+. \}
+. el \
+. tm \\n[.F]:\\n[.c]: Invalid value of 'rowspan' keyword.
+. \}
+.
+. t*getarg colspan \\*[args]
+. nr colspan 1
+. if !"\\*[colspan]"" \{\
+. ie \B\\*[colspan] \
+. nr colspan (\\*[colspan] >? 1)
+. el \
+. tm \\n[.F]:\\n[.c]: Invalid value of 'colspan' keyword.
+. \}
+.
+. t*args \\*[#trc] \\*[#t#r] \" look for common arguments
+.
+. nr in\\*[#trc] \\n[in\\n[t*#]*\\n[c#\\*[#t#r]]]
+. nr *cl \\n[cll\\n[t*#]*\\n[c#\\*[#t#r]]]
+. nr * 0 1
+. nr *r \\n[t*r#\\n[t*#]]
+.
+. if (\\n[rowspan] - 1) \
+. while (\\n+[*] <= \\n[rowspan]) \{\
+. nr rspan\\n[t*#]*\\n[*r]*\\n[c#\\*[#t#r]] \\n[colspan]
+. if (\\n[*] > 1) \
+. nr cspan\\n[t*#]*\\n[*r]*\\n[c#\\*[#t#r]] \\n[colspan]
+. nr *r +1
+. \}
+.
+. nr * 1 1
+. nr *c \\n[c#\\*[#t#r]]
+.
+. if (\\n[colspan] - 1) \{\
+. nr vline\\*[*#trc*] 0-1 \" set 'no vl' flag
+.
+. while (\\n+[*] <= \\n[colspan]) \{\
+. nr *c +1
+. nr *cl +(2 * \\n[cscp\\n[t*#]] \
+ + \\n[b/2\\n[t*#]] \
+ + \\n[cll\\n[t*#]*\\n[*c]])
+. nr c#\\*[#t#r] +1
+. \}
+. \}
+.
+. if (\\n[c#\\n[t*#]*\\n[t*r#\\n[t*#]]] > \\n[t*cols\\n[t*#]]) \{\
+. ds * are\"
+. ds ** columns\"
+. if (\\n[c#\\*[#t#r]] == 1) \{\
+. ds * is\"
+. ds ** column\"
+. \}
+. tmc \\n[.F]:\\n[.c]: There \\*[*] \\n[c#\\*[#t#r]] table \\*[**] (.TD)
+.
+. ds * are\"
+. if (\\n[t*cols\\n[t*#]] == 1) \
+. ds * is\"
+. tm1 " but only \\n[t*cols\\n[t*#]] \\*[*] expected.
+.
+. ds *
+. length * \\n[.F]:\\n[.c]:
+.
+. while \\n-[*] \
+. ds * " \\*[*]\"
+.
+. tm1 "\\*[*] Remaining .TDs and its contents are ignored.
+.
+. di *t*dummy* \" bypass superfluous input
+. return
+. \}
+.
+. di t*\\*[#trc] \" open cell diversion and set locals
+. in 0
+. nr cll\\*[#trc] \\n[*cl]
+. ll \\n[*cl]u
+. nr *cl\\n[t*#] \\n[.l]
+. gcolor \\*[t*fgc\\*[#trc]]
+. ad \\*[t*hal\\*[#trc]]
+. fam \\*[t*ff\\*[#trc]]
+. ft \\*[t*fst\\*[#trc]]
+. t*pv \\*[t*fsz\\*[#trc]]
+.
+. t*P1 \\*[args]
+..
+.
+.
+.\" ETB: end of table
+.\" predecessor: text, TD or ETB
+.\" successor: text, TD, TR or TBL
+.de ETB
+. ie \\n[t*#] \
+. if !\\n[t*r#\\n[t*#]] \{\
+. tmc \\n[.F]:\\n[.c]: Each table (.TBL)
+. tm1 " should contain at least one table row (.TR)!
+. \}
+. el \{\
+. tmc \\n[.F]:\\n[.c]: Table end (.ETB)
+. tm1 " without corresponding table start (.TBL)!
+. \}
+.
+. ds #t#r \\n[t*#]*\\n[t*r#\\n[t*#]]\" refresh table row identifier
+. t*dntr 2 \\n[c#\\*[#t#r]] \\n[t*cols\\n[t*#]] \\*[*#trc*]
+.
+. t*divs \" print this table
+.
+. sp \\n[b/2\\n[t*#]]u
+. t*cptn\\n[t*#]
+. nr t*# -1
+.
+. ll \\n[*cl\\n[t*#]]u \" restore ll outside this table
+. in 0 \" reset indent
+. gcolor \\*[t*m\\n[t*#]] \" reset previous fgc
+.
+. t*getarg hold \\$@
+. if !\\n[t*#] \{\
+. sp .5
+. di
+. in \\n[t*i]u
+. ie "\\*[hold]"" \{\
+. ie (\\n[.t] - \\n[dn]) \
+. t*DI t*tbl0
+. el \{\
+. rn t*tbl0 t*tbl\\n+[t*numb]
+. ds t*kept \\*[t*kept] t*tbl\\n[t*numb] \\n[dn]\"
+. \}
+. \}
+. el \{\
+. rn t*tbl0 t*hold\\n+[t*numb]
+. tm \\n[.F]:\\n[.c]: Table t*hold\\n[t*numb] held.
+. ds t*held \\*[t*held] t*hold\\n[t*numb] \\n[dn]\"
+. \}
+.
+. ev \" restore previous environment
+. \}
+.
+. t*P1 \\*[args]
+..
+.
+.
+.\" *****************************************************************
+.\" * Following the definition of five utility macros *
+.\" * special to hdtbl. *
+.\" * Other utility macros common to hdtbl and hdgroff *
+.\" * are defined in the file hdmisc.tmac. *
+.\" *****************************************************************
+.
+.
+.\" .t*free [n]
+.\" print the next [n] held table[s].
+.\" Don't call it within a table!
+.\" If the table is higher than the remaining space
+.\" on the page, the table is printed on the next page.
+.de t*free
+. if "\\$0"CPTN" \
+. if \\n[t*r#\\n[t*#]] \{\
+. tmc \\n[.F]:\\n[.c]: Invalid placement of '.t*free' within a table;
+. tm1 " it must be called outside of any table.
+. return
+. \}
+.
+. if "\\*[t*held]"" \{\
+. tm \\n[.F]:\\n[.c]: No held tables.
+. return
+. \}
+.
+. nr ** (\\$1 >? 1) 1
+. while !""\\*[t*held]" \{\
+. pops * t*held
+. popr * t*held
+.
+. ie (\\n[.t] - \\n[*]) \{\
+. ev t*tbl
+. t*DI \\*[*]
+. ev
+. \}
+. el \{\
+. rn \\*[*] t*tbl\\n+[t*numb]
+. ds t*kept \\*[t*kept] t*tbl\\n[t*numb] \\n[*]\"
+. \}
+.
+. if !(\\n-[**] - 1) \
+. return
+. \}
+..
+.
+.
+.\" The main utility macro for tables:
+.\" If a table is closed by ETB, this macro is called. It
+.\" processes one complete table, i.e., all the table cell
+.\" diversions, paints the cell backgrounds, draws
+.\" horizontal and vertical table lines and the table border.
+.\"
+.\" Nested tables are processed from inside to outside.
+.
+.de t*divs
+. ll (\\n[t*l]u + 1c) \" avoid warning 'can't break line'
+. nf
+.
+. nr b/2 \\n[b/2\\n[t*#]] \" some abbreviations
+. nr cscp \\n[cscp\\n[t*#]]
+. nr cscpb (\\n[b/2] + \\n[cscp])
+.
+. nr topdiv (\\n[.d] + \\n[b/2] - \\n[cscp])\" top of cell diversion
+. nr cscpb2 (\\n[b/2] / 2 + \\n[cscp])
+.
+. nr #r 0 1
+. \" outer loop for rows
+. while (\\n+[#r] <= \\n[t*r#\\n[t*#]]) \{\
+. \" TODO: insert code here for multipage tables
+. nr * (\\n[#r] - 1)
+. nr topdiv +(\\n[dntr\\n[t*#]*\\n[*]] + \\n[cscp] + \\n[cscpb])
+.
+. \" if table still smaller than specified table height, increase it
+. if ((\\n[#r] == \\n[t*r#\\n[t*#]]) & \\n[t*height\\n[t*#]]) \
+. nr dntr\\n[t*#]*\\n[#r] (\\n[cscpb] \
+ + \\n[toptbl\\n[t*#]] \
+ + \\n[t*height\\n[t*#]] \
+ - (\\n[topdiv] >? \\n[dntr\\n[t*#]*\\n[#r]]))
+.
+. nr #c 0 1
+. \" inner loop for cells
+. while (\\n+[#c] <= \\n[t*cols\\n[t*#]]) \{\
+. ds #trc \\n[t*#]*\\n[#r]*\\n[#c]\"
+. \" continue if the diversion is empty
+. if !d t*\\*[#trc] \
+. continue
+.
+. sp |\\n[topdiv]u
+. in (\\n[in\\n[t*#]]u + \\n[in\\*[#trc]]u)\" cell offset
+. nr $1 \\n[dntr\\n[t*#]*\\n[#r]] \" cell height
+.
+. \" if we have spanned rows, calculate resulting row height
+. \" and position of lower horizontal line
+. if \\n[*rsp*\\*[#trc]] \{\
+. nr * \\n[#r] 1
+. nr rspan\\*[#trc] 0-1 \" set 'no hl' flag
+. nr corr (\\n[dn\\*[#trc]] - \\n[dntr\\n[t*#]*\\n[#r]])
+.
+. \" clear row span flags in following rows and update row height
+. while \\n[*rsp*\\*[#trc]] \{\
+. nr *rsp*\\*[#trc] -1
+. nr rspan\\n[t*#]*\\n+[*]*\\n[#c] 0
+. nr ** (\\n[dntr\\n[t*#]*\\n[*]] + \\n[cscp] + \\n[cscpb])
+. nr corr -\\n[**]
+. nr $1 +\\n[**]
+. \}
+.
+. if (\\n-[*] == \\n[t*r#\\n[t*#]]) \
+. nr $1 ((\\n[t*height\\n[t*#]] \
+ - \\n[.d] \
+ + \\n[toptbl\\n[t*#]] \
+ + \\n[cscpb]) \
+ >? \\n[$1])
+. nr dntr\\n[t*#]*\\n[*] +(\\n[corr] >? 0)
+. \}
+.
+. \" paint cell background
+. nr * (2 * \\n[t*cpd\\n[t*#]] + \\n[cll\\*[#trc]])\" background width
+. nr $1 (\\n[$1] >? \\n[dn\\*[#trc]])\" cell height
+.
+. if !"\\*[t*bgc\\*[#trc]]"=" \{\
+. nop \h'\\n[t*csp\\n[t*#]]u'\
+\M[\\*[t*bgc\\*[#trc]]]\
+\v'(-.67v - \\n[t*cpd\\n[t*#]]u)'\
+\D'P \\n[*]u 0 \
+ 0 (2u * \\n[t*cpd\\n[t*#]]u + \\n[$1]u) \
+ -\\n[*]u 0'\
+\M[]
+. sp -1
+. \}
+.
+. \" *** horizontal and vertical single or double lines ***
+. \" double and single lines have the same thickness;
+. \" the double lines' distance is the line thickness.
+. \"
+. \" 'border=x': horizontal/vertical lines x/2 thick, minimum .1n
+. \" 'border=0': no border; horizontal/vertical lines .1n thick
+. \" 'border=': neither border nor horizontal/vertical lines
+.
+. nr *t (.1n >? \\n[b/2]) \" thickness of hl/vl; min. .1n
+. in +\\n[cscp]u
+.
+. \" check for vertical and horizontal lines
+. if (1 + \\n[t*b\\n[t*#]]) \{\
+. if !"\\*[t*bc\\n[t*#]]"=" \{\
+. \" draw horizontal line between this cell and the one below
+. if (\\n[t*r#\\n[t*#]] - \\n[#r] + \\n[rspan\\*[#trc]]) \{\
+. if !"\\*[t*hl\\*[#trc]]"=" \{\
+. sp \\n[$1]u
+. nr * (\\n[cscp] + \\n[cscpb] + \\n[cll\\*[#trc]])
+. nop \X'\*[g] 1 setlinecap'\
+\h'(-\\n[cscpb2]u - \\n[*t]u)'\
+\v'(\\n[cscpb2]u - .67v)'\
+\m[\\*[t*bc\\n[t*#]]]\
+\D't \\n[*t]u'\c
+.
+. ie "\\*[t*hl\\*[#trc]]"d" \
+. nop \v'-\\n[*t]u'\
+\D'l \\n[*]u 0'\
+\v'(2u * \\n[*t]u)'\
+\D'l -\\n[*]u 0'\
+\D't 0'
+. el \
+. nop \D'l \\n[*]u 0'\
+\D't 0'
+.
+. sp (-\\n[$1]u - 1v)
+. \}\}
+.
+. nr rspan\\*[#trc] 0
+.
+. \" draw vertical line between this cell and the one to the right
+. if (\\n[t*cols\\n[t*#]] - \\n[#c] + \\n[vline\\*[#trc]]) \{\
+. if !"\\*[t*vl\\*[#trc]]"=" \{\
+. nop \X'\*[g] 1 setlinecap'\
+\v'(-\\n[cscpb2]u - .67v)'\
+\m[\\*[t*bc\\n[t*#]]]\
+\h'(\\n[cscpb2]u - \\n[*t]u + \\n[cll\\*[#trc]]u)'\c
+.
+. ie "\\*[t*vl\\*[#trc]]"d" \
+. nop \h'-\\n[*t]u'\
+\D't \\n[*t]u'\
+\D'l 0 (2u * \\n[cscp]u + \\n[$1]u + (\\n[*t]u / 2u))'\
+\h'(2u * \\n[*t]u)'\
+\D'l 0 -(2u * \\n[cscp]u + \\n[$1]u + (\\n[*t]u / 2u))'\
+\D't 0'
+. el \
+. nop \D't \\n[*t]u'\
+\D'l 0 (2u * \\n[cscp]u + \\n[$1]u + (\\n[*t]u / 2u))'\
+\D't 0'
+. sp -1
+. \}\}\}\}
+.
+. nr vline\\*[#trc] 0
+.
+. \" vert. cell content alignment
+. nr ** 0
+.
+. ie "\\*[t*val\\*[#trc]]"m" \
+. nr ** ((\\n[$1] - \\n[dn\\*[#trc]]) / 2)\" val=m
+. el \
+. if "\\*[t*val\\*[#trc]]"b" \
+. nr ** (\\n[$1] - \\n[dn\\*[#trc]])\" val=b
+.
+. sp \\n[**]u \" vertical content position
+.
+. \" finally output the diversion
+. t*\\*[#trc]
+. rm t*\\*[#trc]
+. \}
+. \}
+.
+. \" draw the box border
+. in \\n[in\\n[t*#]]u
+. nr ** (\\n[topdiv] + \\n[dntr\\n[t*#]*\\n-[#r]])
+.
+. if \\n[t*b\\n[t*#]] \{\
+. sp |(\\n[toptbl\\n[t*#]]u + \\n[b/2]u)
+. nr $1 (\\n[toptbl\\n[t*#]] - \\n[**] - \\n[cscp])
+. nr * (\\n[ll\\n[t*#]] - \\n[t*b\\n[t*#]])
+.
+. if !"\\*[t*bc\\n[t*#]]"=" \
+. nop \X'\*[g] 0 setlinejoin 2 setlinecap'\
+\v'-.67v'\
+\h'-\\n[b/2]u'\
+\m[\\*[t*bc\\n[t*#]]]\
+\D't \\n[t*b\\n[t*#]]u'\
+\D'l \\n[*]u 0'\
+\D'l 0 -\\n[$1]u'\
+\D'l -\\n[*]u 0'\
+\D'l 0 \\n[$1]u'\
+\D't 0'
+. \}
+.
+. sp |(\\n[**]u + \\n[cscpb]u)
+. fi
+..
+.
+.
+.\" Utility macro: .t*cl [width1 [width2 [...]]]
+.\"
+.\" Calculate cell widths, table width, and cell offsets.
+.de t*cl
+. nr t*cols\\n[t*#] (\\n[.$] >? \\n[t*cols\\n[t*#]])
+. nr ll\\n[t*#] 0 \" accumulated cell widths
+. nr ** (\\n[.l] / \\n[t*cols\\n[t*#]])\" width for remaining cells
+. nr * 0 1 \" counter
+.
+. \" while-loop: Parse user arguments to get each cell's width.
+. while (\\n[t*cols\\n[t*#]] >= \\n+[*]) \{\
+. nr $\\n[*] \\n[**]
+. if !"\\$[\\n[*]]"" \{\
+. \" check for '%' pseudo scaling indicator
+. ds * \\$\\n[*]\"
+. substring * -1 -1
+. ie "\\*[*]"%" \{\
+. ds ** \\$[\\n[*]]\"
+. substring ** 0 -2
+. ie \B\\*[**] \
+. nr $\\n[*] (\\*[**] * \\n[.l] / 100)
+. el \
+. tm \\n[.F]:\\n[.c]: Invalid relative cell width '\\*[**]%'.
+. \}
+. el \{\
+. ie \B\\$[\\n[*]] \
+. nr $\\n[*] \\$[\\n[*]]
+. el \
+. tm \\n[.F]:\\n[.c]: Invalid cell width '\\$[\\n[*]]'.
+. \}\}
+.
+. nr ll\\n[t*#] +\\n[$\\n[*]]
+. nr ** \\n[$\\n[*]]
+. \}
+.
+. if (\\n[ll\\n[t*#]] > \\n[.l]) \
+. tm \\n[.F]:\\n[.c]: Table width larger than column width.
+.
+. nr ** (0 >? \\n[t*b\\n[t*#]])
+. nr * 0 1
+.
+. \" second while loop: Compute final cell widths.
+. while (\\n[t*cols\\n[t*#]] >= \\n+[*]) \{\
+. \" Remove border width, if any.
+. if \\n[t*b\\n[t*#]] \{\
+. \" cell_width := cell_width * (length - 1.5*border) / length
+. nr #* (\\n[ll\\n[t*#]] - (3 * \\n[t*b\\n[t*#]] / 2))
+. nr *** (\\n[ll\\n[t*#]] / 2)
+. \" avoid multiplication overflow
+. mult31by31 $\\n[*] #* ****
+. add31to62 *** **** ****
+. div62by31 **** ll\\n[t*#] $\\n[*]
+. \}
+.
+. \" Get cell widths without padding, spacing, and separator line.
+. nr cll\\n[t*#]*\\n[*] (\\n[$\\n[*]] \
+ - (2 * \\n[cscp\\n[t*#]]) \
+ - \\n[b/2\\n[t*#]])
+.
+. \" Check whether value is non-positive.
+. if !\\n[cll\\n[t*#]*\\n[*]] \{\
+. nr #* (\\n[ll\\n[t*#]] - (3 * \\n[t*b\\n[t*#]] / 2))
+. nr *** (\\n[#*] / 2)
+. nr *h (2 * \\n[cscp\\n[t*#]] + \\n[b/2\\n[t*#]])
+. mult31by31 *h ll\\n[t*#] ****
+. add31to62 *** **** ****
+. div62by31 **** #* *h
+. ds * \\n[*]th\"
+. nr *** (\\n[*] % 10)
+. if d nth-\\n[***] \
+. ds * \\n[*]\\*[nth-\\n[***]]\"
+. tmc \\n[.F]:\\n[.c]: The \\*[*] width value (\\$\\n[*]) is too small.
+. tm1 " It should be greater than \\n[*h].
+. \}
+.
+. nr in\\n[t*#]*\\n[*] \\n[**] \" cell offset
+. nr ** +\\n[$\\n[*]]
+. \}
+..
+.
+.
+.\" Utility macro: .t*dntr <origin> <cell position> ? <cell ID>
+.\"
+.\" Close TD diversion, make some calculations, and set
+.\" some help strings and registers. <origin> is 0, 1,
+.\" or 2 if the call of .t*dntr occurs in .TD, .TR, or
+.\" .ETB, respectively.
+.de t*dntr
+. nr dn 0 \" reset diversion height
+. br \" finish cell data
+.
+. if "\\n[.z]"*t*dummy*" \
+. return
+.
+. ds #t#r \\n[t*#]*\\n[t*r#\\n[t*#]]\" refresh table row identifier
+.
+. if \\n[c#\\*[#t#r]] \{\
+. di \" close diversion
+. nr dn\\$4 \\n[dn] \" save height of this cell
+. if !\\n[rspan\\*[#trc]] \{\
+. \" update row height if not in a row span
+. nr dntr\\*[#t#r] (\\n[dntr\\*[#t#r]] >? \\n[dn])
+. if \\$2 \
+. nr dntr\\*[#t#r] ((\\n[t*height\\*[#t#r]] \
+ - (2 * \\n[cscp\\n[t*#]] + \\n[b/2\\n[t*#]])) \
+ >? \\n[dntr\\*[#t#r]])
+. \}\}
+.
+. nr c#\\*[#t#r] +1
+. nr * \\$2
+.
+. \" update column span registers
+. while (\\n+[*] <= \\$3) \{\
+. if r cspan\\*[#t#r]*\\n[*] \
+. nr c#\\*[#t#r] +\\n[cspan\\*[#t#r]*\\n[*]]
+. nr cspan\\*[#t#r]*\\n[*] 0
+. \}
+.
+. ds #trc \\*[#t#r]*\\n[c#\\*[#t#r]]\"
+.
+. \" only check for cell underflow if called by .TR or .ETB
+. if (\\$1 & (\\n[c#\\*[#t#r]] <= \\n[t*cols\\n[t*#]])) \{\
+. ds * are\"
+. ds ** columns\"
+. if (\\n-[c#\\*[#t#r]] == 1) \{\
+. ds * is\"
+. ds ** column\"
+. \}
+. tmc \\n[.F]:\\n[.c]: There \\*[*] only \\n[c#\\*[#t#r]] \\*[**]
+.
+. nr * \\n[t*r#\\n[t*#]]
+. ds * \\n[*]th\"
+. nr *** (\\n[*] % 10)
+. if d nth-\\n[***] \
+. ds * \\n[*]\\*[nth-\\n[***]]\"
+. tmc " in the \\*[*] row
+.
+. ds * are\"
+. if (\\n[t*cols\\n[t*#]] == 1) \
+. ds * is\"
+. tm1 " but \\n[t*cols\\n[t*#]] \\*[*] expected.
+. \}
+..
+.
+.
+.\" Utility-macro: .t*args level_1 [level_2]
+.\"
+.\" Get the arguments common to TBL, TR, and TD for the level
+.\" in argument 1, using default values from the level in
+.\" argument 2. If argument 2 is missing, use the global
+.\" default values.
+.\"
+.de t*args
+. ds t*bgc\\$1 \\*[t*bgc\\$2]\"
+. ds t*fgc\\$1 \\*[t*fgc\\$2]\"
+. ds t*hl\\$1 \\*[t*hl\\$2]\"
+. ds t*vl\\$1 \\*[t*vl\\$2]\"
+. ds t*hal\\$1 \\*[t*hal\\$2]\"
+. ds t*val\\$1 \\*[t*val\\$2]\"
+. ds t*ff\\$1 \\*[t*ff\\$2]\"
+. ds t*fst\\$1 \\*[t*fst\\$2]\"
+. ds t*fsz\\$1 \\*[t*fsz\\$2]\"
+.
+. if "\\*[args]"" \
+. return
+.
+. t*getarg bgc \\*[args] \" background color
+. if !"\\*[bgc]"" \{\
+. ie m\\*[bgc] \
+. ds t*bgc\\$1 \\*[bgc]\"
+. el \{\
+. ie "\\*[bgc]"=" \
+. ds t*bgc\\$1 =\"
+. el \
+. tm \\n[.F]:\\n[.c]: Invalid background color '\\*[bgc]'.
+. \}\}
+. if "\\*[args]"" \
+. return
+.
+. t*getarg fgc \\*[args] \" foreground color
+. if !"\\*[fgc]"" \{\
+. ie m\\*[fgc] \
+. ds t*fgc\\$1 \\*[fgc]\"
+. el \{\
+. ie "\\*[fgc]"=" \
+. ds t*fgc\\$1 =\"
+. el \
+. tm \\n[.F]:\\n[.c]: Invalid foreground color '\\*[fgc]'.
+. \}\}
+. if "\\*[args]"" \
+. return
+.
+. t*getarg hl \\*[args] \" horizontal line between cells
+. if !"\\*[hl]"" \
+. ds t*hl\\$1 \\*[hl]\"
+. if "\\*[args]"" \
+. return
+.
+. t*getarg vl \\*[args] \" vertical line between cells
+. if !"\\*[vl]"" \
+. ds t*vl\\$1 \\*[vl]\"
+. if "\\*[args]"" \
+. return
+.
+. t*getarg hal \\*[args] \" horizontal table cell alignment
+. if !"\\*[hal]"" \{\
+. t*index bcrl \\*[hal]
+. ie \\n[t*index] \
+. ds t*hal\\$1 \\*[hal]\"
+. el \{\
+. tmc \\n[.F]:\\n[.c]: Invalid horizontal alignment '\\*[hal]':
+. tm1 " must be 'b', 'c', 'l' or 'r'.
+. \}\}
+. if "\\*[args]"" \
+. return
+.
+. t*getarg val \\*[args] \" vertical table cell alignment
+. if !"\\*[val]"" \{\
+. t*index tmb \\*[val]
+. ie \\n[t*index] \
+. ds t*val\\$1 \\*[val]\"
+. el \{\
+. tmc \\n[.F]:\\n[.c]: Invalid vertical alignment '\\*[val]':
+. tm1 " must be 't', 'm' or 'b'.
+. \}\}
+. if "\\*[args]"" \
+. return
+.
+. t*getarg ff \\*[args] \" font family
+. if !"\\*[ff]"" \
+. ds t*ff\\$1 \\*[ff]\"
+. if "\\*[args]"" \
+. return
+.
+. t*getarg fst \\*[args] \" font style
+. if !"\\*[fst]"" \
+. ds t*fst\\$1 \\*[fst]\"
+. if "\\*[args]"" \
+. return
+.
+. t*getarg fsz \\*[args] \" font size and spacing factor
+. if !"\\*[fsz]"" \
+. ds t*fsz\\$1 \\*[fsz]\"
+..
+.
+.
+.\" Append to your page header macro ('pg@top' for MS)
+.\" to enable tables to span pages.
+.de t*hm
+. ev t*tbl
+. nr ** \\n[.t]
+. while !""\\*[t*kept]" \{\
+. pops * t*kept
+. popr * t*kept
+. if (\\n[*] - \\n[**]) \{\
+. tm \\n[.F]:\\n[.c]: Table \\*[*] higher than page -- ignored!
+. break
+. \}
+.
+. if (\\n[*] - \\n[.t]) \{\
+. ds t*kept \\n[*] \\*[t*kept]\"
+. ds t*kept \\*[*] \\*[t*kept]\"
+. tmc \\n[.F]:\\n[.c]: Remaining table(s),
+. tm1 " because not all fit onto this page.
+. break
+. \}
+.
+. t*DI \\*[*]
+. \}
+. ev
+..
+.
+.\" Local Variables:
+.\" mode: nroff
+.\" End:
+.\" vim: filetype=groff:
diff --git a/contrib/mm/ChangeLog b/contrib/mm/ChangeLog
new file mode 100644
index 0000000..6c17811
--- /dev/null
+++ b/contrib/mm/ChangeLog
@@ -0,0 +1,1672 @@
+2023-05-25 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * groff_mm.7.man (Macros) <INDP>: Clarify operation.
+
+ Fixes <https://savannah.gnu.org/bugs/?64206>.
+
+2023-02-17 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ [mm]: Add `--help` option support to mmroff.
+
+ * mmroff.pl: Recognize `--help` option.
+ * mmroff.1.man (Synopsis, Options): Document.
+
+2023-02-01 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * m.tmac (H, SETR): Trivially refactor. Rename register to
+ conform to convention: `hd-mark-trimmed` -> `hd@mark-trimmed`.
+ This register is used outside of its "module", "hd".
+
+2023-02-01 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * m.tmac (H, LI): Trivially refactor. Annotate and test
+ threshold registers consistently.
+
+2023-02-01 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * m.tmac: Fix code style nit. Except for initial register
+ tests for GNU troff formatter and compatibility mode, migrate
+ special character, register, and string interpolation escape
+ sequences from `(xx` form to `[xx]`. Also rewrite an instance
+ of `\nP` to `\n[P]`.
+
+2023-01-24 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ When register `Pt` was 2, paragraphs immediately following
+ displays and lists were being indented, contrary to DWB mm
+ behavior.
+
+ * m.tmac: Replace `par@ind-flag` register with two separate
+ state bits, `par*indentation-eligible` and
+ `par@suppress-indentation`.
+ (P, nP): Remove complex test for deciding whether the current
+ paragraph is being set immediately after a heading.
+ (P): Set `par*indentation-eligible` to the logical complement of
+ `par@suppress-indentation`. Call `par@doit` (which underlies
+ both `P` and `nP`) unconditionally.
+ (nP): Force `par*indentation-eligible` off, since numbered
+ paragraphs are not influenced by a `Pt` value of "2" in DWB mm.
+ {The paragraph number occupies the indentation space.}
+ (par@doit): Introduce local register `par*do-indent`,
+ manipulate it, and use it to control `ti` request instead of
+ scattering the request across multiple locations. Remove this
+ register when done. Clear `par@suppress-indentation` at end,
+ since after indentation is suppressed once, it should not happen
+ again until a special circumstance (the setting of a heading,
+ display, or list) arises.
+ (H): Convert test of `hd*htype` register, which tells us if
+ we're setting a run-in heading or not, from `if` to `ie`. (The
+ first paragraphing macro call after a run-in heading should
+ _not_ have its indentation suppressed, because the material
+ after the heading title constitutes a first pagraph.) In the
+ true arm, set `par@suppress-indentation`; in the new else arm,
+ clear it. This replaces the "complex test" above, and seems
+ much more straightforward and reliable. Stop manipulating
+ `par@ind-flag`.
+ (df@end, ds@end, LC): Set `par@suppress-indentation` instead of
+ clearing `par@ind-flag`.
+ (LE): Set `par@suppress-indentation`.
+
+ Fixes <https://savannah.gnu.org/bugs/?54909>. Thanks to Jeff
+ Conrad for the report.
+
+2023-01-24 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ Regression-test Savannah #54909.
+
+ * tests/P-indentation-works.sh: Do it.
+ * mm.am (mm_TESTS): Run test.
+
+2023-01-24 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * m.tmac (df@print-float): Eliminate spew at high debug levels.
+ This macro gets called even when there aren't any floating
+ displays pending, so we cannot assume that related registers are
+ defined.
+
+2023-01-24 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * m.tmac (P): Fix missing backslash after brace escape sequence.
+ Problem introduced by me in 3b1afbdb8e, 6 January.
+
+2023-01-22 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * m.tmac: Help user navigate the document type macros. Stop
+ setting up the formatter to throw "unrecognized macro"
+ diagnostics for macros that are plainly documented in
+ groff_mm(7).
+ (@disable): New macro takes a list of macros whose definitions
+ are replaced with a warning diagnostic about how they're no
+ longer unavailable due to use of another document type macro
+ already called, identified by new string `@cover`.
+ (TL, MT, COVER, LT, LO): Define `@cover` and call `@disable`.
+ Drop existing diagnostics that did a similar thing as above,
+ more verbosely.
+
+2023-01-17 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * m.tmac: Revise diagnostic messages. Use a consistent message
+ format, including a space after a colon and the name of the
+ complaining macro.
+ (pg@header): Drop unnecessary empty comment at end of macro
+ call. Macro call syntax differs from `ds` request syntax.
+ (2C, MC, FD, FS, FE, DF, LB, LI, LE, LC, AL, ML, VL, BL, DL, RL)
+ (BVL, TH, TE, PS, B1, B2, APPSK, AS, SETR, GETST, GETHN, GETPN)
+ (INITI, IND, LT, LO): Refer to self with `\$0` escape sequence
+ instead of a literal.
+ (2C, MC, PS): Throw fatal error immediately instead of doing
+ other processing first.
+ (2C, MC, FD, FS, FE, DF, ds@set-format, ds@end, LB, LI, LE, LC)
+ (AL, ML, VL, BL, DL, RL, BVL, TH, TE, B1, B2, APPSK, AS, SETR)
+ (GETST, GETHN, GETPN, INITI, IND, let*lt-sign, LT, LO): Stop
+ unnecessarily quoting arguments to @error macro.
+ (FD, LB, VL, BVL, APPSK, SETR, GETST, GETHN, GETPN, INITI):
+ State quantities of expected and actual arguments.
+ (FS, FE, LC, B1, INITI): Clarify message.
+ (DF, DS): Store macro name in `ds@macro` for use in later
+ diagnostics thrown by internal macros.
+ (DS): Drop dead store to register `XXX`; debugging detritus?
+ (ds@set-format): Use `ds@macro`.
+ (ds@set-format, let*lt-sign, LT, LO): Bracket unrecognized
+ argument in single quotes.
+ (ds@set-format): Characterize argument as "unrecognized", not
+ "wrong". Similarly with the fill style.
+ (LI, LE, IND): Offer advice.
+ (LE): Describe problem in same terms as `LI` ("no list active").
+ (LC): Validate argument as numeric expression and die with
+ diagnostic if it isn't one.
+ (AL, ML, VL, BL, DL, RL, BVL): Weaken fatal diagnostic to
+ warning; excess arguments are not a serious problem.
+ (PS): Simplify control flow; since @error does not return,
+ convert `ie` request to `if` and make `el` branch unconditional.
+ (RP): Weaken fatal diagnostic to warning and return early;
+ calling this macro without any references defined does no
+ structural damage to a document.
+ (INITI): Remove redundant conditional.
+
+2023-01-16 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * m.tmac (IX): Delete.
+
+2023-01-16 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * m.tmac (MC): Throw internal error if we don't leave
+ `pg*cols-per-page` in a valid state after invalidating it to
+ count columns. Also simplify expression.
+
+2023-01-16 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * m.tmac (1C): Warn and return early instead of bombing out if
+ called when multiple columnation is inactive. A no-op should
+ not be a fatal error.
+
+2023-01-16 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * m.tmac (@abort): Introduce macro for internal errors,
+ unconditionally reporting a backtrace...
+ (misc@pop-set, hd@split, MULN, df@print-float, IND): ..and use
+ it instead of `@error` for problems with internal state.
+ (IND): Also fix botch in reported error.
+
+2023-01-16 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * m.tmac (SA): Reject an argument value > 1 as invalid.
+
+2023-01-16 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * m.tmac (P): Quote unrecognized argument in warning diagnostic.
+ (OK, PM): Refactor to use `\$0`.
+ (1C): Clarify that formatting can go wrong if you suppress a
+ page break when returning from multi- to single-column mode with
+ a footnote pending.
+
+2023-01-16 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * m.tmac (Tm): Align with definition of `Sm`, with analogous
+ fallback definitions.
+
+2023-01-16 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * m.tmac (Sm): Implement string for service mark, for DWB mm
+ compatibility.
+ * groff_mm.7.man: Document it.
+
+2023-01-16 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * m.tmac (CS): Define to throw diagnostic when used without ".MT
+ 4". (Later, if the "4.MT" file is sourced, this definition is
+ replaced.)
+ * groff_mm.7.man (Description): Clarify `CS` support status.
+
+2023-01-16 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * m.tmac (MOVE, SM, AT, LO): Weaken diagnostics when given no
+ arguments from (fatal) errors to warnings, then return.
+
+2023-01-16 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * m.tmac (PIC): Bomb out (with diagnostic) if either of the
+ width or height arguments are not numeric expressions.
+
+2023-01-16 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * m.tmac (EPIC): Handle and shift off a leading "-L" argument
+ before checking argument count. Then, if fewer than two
+ arguments remain, throw warning diagnostic and return early
+ instead of bombing out. Do bomb out (with diagnostic) if either
+ of the width or height arguments are not numeric expressions.
+ Fix bug which prevented third argument from being interpreted.
+ Annotate potential future development.
+
+2023-01-16 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * m.tmac (AU): Partially revert commit 4fd984adc9, 2021-07-17.
+ `AU` can be called for the sole purpose of "closing" a document
+ title "opened" with `TL`.
+ * groff_mm.7.man (Macros) <AU>: Update description.
+
+2023-01-16 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * m.tmac (TM): Warn if called without arguments.
+
+2023-01-16 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * m.tmac (AST): Preserve any user-specified leading spaces in
+ argument.
+
+2023-01-06 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * m.tmac (P): Warn if argument is non-numeric, and discard it.
+ Also warn if argument is out of range; people accustomed to
+ setting the `Pt` register to 2 might mistakenly believe it to be
+ meaningful here.
+
+2023-01-03 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * mm/0.MT:
+ * mm/5.MT: Drop never-read register `cov*mt0-ind`.
+
+2023-01-03 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ Improve cover sheet diagnostics.
+
+ * m.tmac (MT): Warn and ignore if `COVER` or self already
+ called.
+ (COVER): Warn and ignore if `MT` already called.
+ * mm/0.MT (cov@print-title): Abort if title not defined; tell
+ user how to use the macros.
+ (cov@print-authors): Add similar paranoid diagnostic that I
+ don't think is reachable (since you _have_ to call `AU` to
+ "close" `TL`).
+ * mm/4.MT (cov@print-title, cov@print-authors):
+ * mm/5.MT (cov@print-title): As "0.MT".
+
+ * mm/4.MT: Get rid of spurious blank line in file.
+
+2023-01-03 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ Fix Savannah #63613.
+
+ * mm/0.MT (cov*print-authors): Iterate through _all_ technical
+ memorandum numbers instead of stopping one shy of the last.
+ Problem appears to date back to introduction of TM support for
+ memorandum type 1 in commit a48ab7b6d (groff 1.05, 1992-03-18).
+
+ Fixes <https://savannah.gnu.org/bugs/?63613>.
+
+2023-01-03 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ Regression-test Savannah #63613.
+
+ * tests/MT-1-reports-all-TM-numbers.sh: Do it.
+ * mm.am (mm_TESTS): Run test.
+
+2022-12-17 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * m.tmac (let*mt-sign): Check strings populated by optional
+ arguments to `AU` macro for existence before interpolating them.
+
+ Fixes <https://savannah.gnu.org/bugs/?24049>. Thanks to Werner
+ Lemberg for the report.
+
+2022-11-22 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * mse.tmac: Set `pg*footer-size` to four vees, not four basic
+ units; the latter is too small by orders of magnitude on
+ typesetting output devices.
+
+ Fixes <https://savannah.gnu.org/bugs/?63398>. Thanks to Hans
+ Bezemer for the report.
+
+2022-11-21 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ Regression-test Savannah #63398.
+
+ * tests/mse_has-sufficient-footnote-space.sh: Do it.
+ * mm.am (mm_TESTS): Run test.
+
+2022-10-09 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ [mm]: Add `--version` option support to mmroff.
+
+ * mm.am (mmroff): Replace `@VERSION@` token in script.
+ * mmroff.pl: Recognize `--version` option.
+ * mmroff.1.man (Synopsis, Options): Document.
+
+2022-10-09 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * mmroff.pl: Add proper diagnostic subroutine. Add "progname"
+ scalar to store the name of the program.
+ (Die): New subroutine.
+ (print_index, top level): Call Die() when encountering
+ prohibitive problems instead of flinging a string into a void
+ context.
+
+2022-10-09 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * mmroff.pl: Enable Perl warnings.
+
+2022-10-09 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ [mm]: Refactor generation of "mmroff" script.
+
+ * mmroff.pl: Replace absolute filespec with `@PERL@` replacement
+ token. This is documentary; the filespec was getting replaced
+ anyway.
+ * mm.am (mmroff): Use more idiomatic token replacement strategy.
+ Also create target as a .tmp-suffixed file at first since it is
+ not initially executable, so that we don't race against anything
+ needing to run it in a parallelized build. (This is a
+ hypothetical concern; at present, nothing runs mmroff during the
+ build.)
+
+2022-10-02 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * m.tmac (pg@header): Add page length sufficiency check.
+
+ Fixes <https://savannah.gnu.org/bugs/?24048>. Thanks to Werner
+ Lemberg for the report.
+
+2022-10-02 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ Regression-test Savannah #24048.
+
+ * tests/short-pages-do-not-overflow-stack.sh: Test it.
+ * mm.am (mm_TESTS): Run test.
+
+2022-09-17 Nikita Ivanov <nikita.vyach.ivanov@gmail.com>
+
+ * mm/ms.cov (cov@print-title, cov@print-authors): Escape
+ newlines when beginning conditional blocks.
+
+ Fixes <https://savannah.gnu.org/bugs/?63075>. [Problems
+ introduced by me in commits 59d1fd7a5e and 4fd984adc9, both
+ 2021-07-17. --GBR]
+
+2022-09-16 Nikita Ivanov <nikita.vyach.ivanov@gmail.com>
+
+ * m.tmac (misc@ev-keep): Select configured default font family,
+ as with `.fam H` at the top of the document, for example, when
+ switching to new environment.
+
+ Fixes <https://savannah.gnu.org/bugs/?63067>.
+
+2022-08-14 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * m.tmac (PY): Add new macro.
+ (PE): Replace `init@reset` call with `PY` (and then space by
+ half a vee as before).
+
+ * groff_mm.7.man (PY): Document it.
+
+ Fixes <https://savannah.gnu.org/bugs/?62900>.
+
+2022-08-14 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * m.tmac (@warning, @error): Stop pointlessly using no-break
+ control character when invoking the `tm` request, which never
+ causes a break in formatted output. (Management of the standard
+ output and standard error streams is the user's responsibility.)
+ (@error): Drop old-fashioned asterisk banners around error
+ diagnostics. Stop invoking `ab` with redundant and sometimes
+ misleading arguments. In groff 1.23, `ab` exits silently if
+ given none. We've already issued a diagnostic and moreover not
+ all problems are with "syntax"; some are semantic.
+
+2022-08-14 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * m.tmac (PS): Validate better; check for 2 arguments exactly.
+
+2022-08-14 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * m.tmac (PS): Refactor; drop dead code. The `pic*in` register
+ was used only for dead stores; it was never read or tested.
+
+2022-08-04 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * m.tmac (initialization): In nroff mode, surround automatically
+ numbered footnote markers in body text with square brackets, as
+ groff me(7) and ms(7) do.
+
+2022-08-04 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * m.tmac (initialization): Recognize new register `V` for
+ setting the vertical spacing from the command line, instead of
+ blindly setting the vertical spacing two points larger than the
+ type size. Handle setting of `V` and type size `S` in case they
+ are given with an appended scaling unit, using the same
+ technique as groff ms(7)--if the values are over 1,000, assume
+ that conversion to basic units by the formatter has already
+ taken place.
+ * groff_mm.7.man (Registers) <S, V>: Document it.
+
+2022-08-03 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * m.tmac (:p): Define register as an alias of `ft*nr`; the
+ former name is a documented DWB mm feature.
+
+2022-08-01 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * groff_mm.7.man: Document more features.
+ (Macros) <)E, VM>: Document these DWB mm internals as exposed by
+ groff mm.
+ (Macros) <B1, B2, MC>: Document as GNU extensions.
+ (Strings) <BU, Ci, F>: Document.
+ (Registers) <:R, Au, Ex, Fg, H8...H14, Oc, S>: Document.
+
+2022-07-29 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * groff_mm.7.man: Document further differences between DWB mm
+ and groff mm, including several unimplemented features.
+
+2022-07-29 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * m.tmac: Remove pointless conditionals in initialization.
+ Simplify if-else request pairs that did the same thing in both
+ branches.
+
+2022-07-28 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * groff_mm.7.man: Document `NE` macro.
+
+2022-03-15 Damian McGuckin <damianm@esi.com.au>
+
+ * m.tmac (eq@check): Compensate for display indentation when
+ setting equation label.
+
+ Fixes <https://savannah.gnu.org/bugs/?62190>.
+
+2022-04-27 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ Regression-test Savannah #62190.
+
+ * tests/place-equation-labels-correctly-in-displays.sh: Test it.
+ * mm.am (mm_TESTS): Run test.
+
+2021-08-12 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * m.tmac (R): Alter to work analogously to `B` and `I` macros;
+ accept multiple arguments if given, and alternate roman with
+ previous font. Stop explicitly turning off underlining.
+
+2021-07-17 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ Refactor author title handling.
+
+ * m.tmac (AU): Initialize `cov*at!` array element to zero for
+ current author number (`AT` already updates it).
+
+ * mm/ms.cov (cov@print-authors): Enforce requirement documented
+ in groff_mm(7) that .AU is mandatory if .COVER is used. Emit
+ diagnostic if `cov*au` is not defined, and skip remainder of
+ macro definition. Test for existence of authors' titles
+ differently; now that `cov*at!` (a count of titles for the
+ current author) is guaranteed to be initialized, we can use it
+ as part of a while loop condition, instead of the hard-coded "9"
+ as an arbitrary limit on the allowed quantity of author titles
+ {though surely even that is obnoxiously high in practice}, and
+ more importantly avoid using a \w escape to measure the width of
+ the interpolation of a potentially undefined string. Use `nop`
+ to indent text output. Delete apparent typo causing `mac`
+ warning with respect to undefined `.` macro. Introduce
+ temporary strings for the author and author title "loop indices"
+ to shorten and clarify logic. Remove them when done.
+
+ Fixes <https://savannah.gnu.org/bugs/?60926>.
+
+2021-07-17 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * mm/ms.cov (cov@print-title): Enforce requirement documented in
+ groff_mm(7) that .TL is mandatory if .COVER is used. Emit
+ diagnostic if `cov*title` is not defined, and skip remainder of
+ macro definition.
+
+2021-07-17 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * mm/ms.cov (COVEND): Fix thinko; test for existence of
+ `cov*abs-arg` register with `r` conditional operator, not `d`.
+
+2021-07-17 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * m.tmac: Stop emitting debugging diagnostic using undefined
+ string. Problem exposed by commit
+ d6d98d2b3e0ad070037073bb288bbaee3fc04cf0, 8 December 2013.
+
+ Fixes <https://savannah.gnu.org/bugs/?60397>.
+
+2021-07-17 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ Stop installing empty macro files.
+
+ * mm.am: Delete variable `MMLOCALE`.
+ (install_mm): Delete `for` loop that touches the files.
+ (uninstall_mm): Delete `for` loop that deletes the files.
+ * m.tmac: Update initializtion.
+ - Load the `\*[@country]_locale` file with `msoquiet` instead
+ of `mso`.
+ - Add version check to require groff 1.23 or later, since
+ the `msoquiet` request is now being used.
+ - Move "include guard" to follow the compatibility mode and
+ groff version checks. Remove its `do` prefix.
+ * groff_mm.7.man (Localization): Migrate topic into its own
+ subsection and update discussion.
+
+ Fixes <https://savannah.gnu.org/bugs/?60700>.
+
+2021-07-17 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * mm/ms.cov (cov@print-firm): Do nothing if the `cov*firm`
+ string is not defined. Silences a `mac` warning and prevents
+ the document date from being incorrectly aligned.
+
+ * tests/ms_cover_sheet_robust_to_missing_AF.sh: Test it.
+ * mm.am (mm_TESTS): Run test.
+
+ Fixes <https://savannah.gnu.org/bugs/?60915>.
+
+2021-07-14 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * m.tmac: Rename `cov*mt-addresse` to `cov*mt-addressee`.
+ * NOTES: Update the only place the foregoing is documented.
+
+2021-05-31 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * groff_mm.7.man (Description/Macros) <LT>: Document the "SP"
+ {simplified} letter style more completely. Salutations and
+ formal closings are omitted.
+
+ Solves the remaining part of bug #60373, "the formal closing is
+ omitted completely". And, regarding the salutation, #60390.
+
+ Fixes <https://savannah.gnu.org/bugs/?60373> and
+ <https://savannah.gnu.org/bugs/index.php?60390>.
+
+2021-05-30 Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
+
+ * m.tmac (let@sg_SP): Stop placing a comma after the first
+ argument (an author name set by AU) if the second argument is
+ empty (an author title set by AT).
+
+ Solves another part of bug #60373, "the writer's name at the
+ bottom is followed by a trailing comma".
+
+ Fixes <https://savannah.gnu.org/bugs/?60389>.
+
+2021-05-30 Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
+
+ * m.tmac (let@print-head): Quote the interpolation of the string
+ `let*lo-SJ`.
+
+ Solves part of bug #60373, "[t]he subject line shows only the
+ first word".
+
+ Fixes <https://savannah.gnu.org/bugs/?60388>.
+
+2021-05-30 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ Add regression tests for Savannah #60373.
+
+ * tests/LT_SP_AU_without_AT_works.sh:
+ * tests/LT_SP_multi-word_LO_SJ_works.sh: Add tests.
+ * mm.am (mm_TESTS): Run tests.
+
+2021-05-30 Tadziu Hoffman <hoffmann@usm.uni-muenchen.de>
+
+ Fix Savannah #57034.
+
+ * m.tmac (AT): Count author title declarations.
+ (let*mt-sign): Use correct index when iterating author names.
+ Prevent page break between author names and titles. Iterate
+ author titles and write them.
+
+ Fixes <https://savannah.gnu.org/bugs/?57034>.
+
+2021-05-30 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ Add regression test for Savannah #57034.
+
+ * tests/MT_5_includes_AT_in_SG.sh: Test it. Thanks to Ken
+ Mandelberg for the reproducer.
+ * mm.am (mm_TESTS): Add variable storing script name.
+ (TESTS): Append `mm_TESTS` to run it.
+ (EXTRA_DIST): Append `mm_TESTS` to ship it.
+
+2021-05-30 Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
+
+ * mm/5.MT (cov@print-title): Fix missing diagnostic. Memorandum
+ type 5 now requires a title to be declared with .TL.
+
+ Fixes <https://savannah.gnu.org/bugs/?59563>.
+
+2021-05-30 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ [mm]: Cease warning level manipulation.
+
+ Stop mm macro package from manipulating warnings.
+
+ * m.tmac: Remove code that attempted to enable all warnings if
+ none were given on the command line. It did this by simply
+ comparing the value of the warning register (\n[.warn]) against
+ the default value; but of course, a user could specify -w
+ options that exactly matched the default and the test would not
+ be able to tell, causing puzzling and undesired behavior.
+ Furthermore, the hard-coded default was out of date and did not
+ correspond to recent releases of groff. If you want all
+ warnings on, use the ".warn" request with no arguments in your
+ mm document or pass "-w w" to groff (see troff(1) or the Texinfo
+ manual for more on warnings).
+
+ See commit 5aa934e7, 20 February 2020.
+
+2021-05-30 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * examples/letter.mm: Revise to be a better example: use macro
+ package more effectively, follow *roff input conventions more
+ carefully, and incorporate more accurate comments.
+
+2021-05-30 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * m.tmac: Update diagnostics. When aborting, explicitly tell
+ the user we are doing so (see
+ a334cc97abbdfb9c41e28fcd7c187b81a0a3ceac, 25 September 2020).
+ (@mm): Define new string to hold prefix for diagnostic messages.
+ (@warning, @error): Use @mm. Reorder diagnostic messages to
+ conform with GNU Coding Standards.
+ (OK, PM): Use @warning instead of `tm` request directly.
+
+2019-09-10 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * Makefile.sim: Delete sed transformation of @G@. It is no
+ longer needed.
+
+2018-03-01 Werner LEMBERG <wl@gnu.org>
+
+ * m.tmac: Fix `.hy' value.
+
+ * groff_mm.7.man: Updated.
+
+2018-02-28 Werner LEMBERG <wl@gnu.org>
+
+ * mm.am (mmroff): Use $(AM_V_GEN) to silence file generation.
+
+2017-11-02 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * examples/letter.mm: New; simple example of mm usage.
+ * mm.am: Ship the file.
+
+2015-08-22 Bernd Warken <groff-bernd.warken-72@web.de>
+
+ * mmroff.1.man: Rename `mmroff.man'.
+
+ * groff_mm.7.man: Rename `groff_mm.man'.
+
+ * groff_mmse.7.man: Rename `groff_mmse.man'.
+
+ * mm.am: Include renamings.
+
+2015-08-05 Bernd Warken <groff-bernd.warken-72@web.de>
+
+ * mm.am, Makefile.sim: Add `Last update'. Setup Emacs mode.
+
+Thu Jul 16 11:52:03 2015 Carsten Kunze <carsten.kunze@arcor.de>
+
+ Fix line length of `.DS' with indentation (#45452).
+
+ If `.DS' with first argument `1' or `I' is used the output should
+ use an indentation of `\n[Si]n'. To make this work, the line length
+ within the `.DS' diversion must be set to zero, otherwise the
+ effective line length is too large.
+
+ * m.tmac (DS): Call `ds@set-new-ev' with correct indentation value.
+
+Fri Apr 3 16:33:22 2015 Werner LEMBERG <wl@gnu.org>
+
+ Make man pages work in compatibility mode.
+
+ * groff_mm.man, groff_mmse.man, mmroff.man: Do it.
+
+Wed Sep 3 21:29:00 2014 Bernd Warken <groff-bernd.warken-72@web.de>
+
+ * all files in contrib/mm: Copying and Emacs setting.
+
+Thu Aug 28 07:20:00 2014 Werner LEMBERG <wl@gnu.org>
+
+ * m.tmac (misc@tag): Fix horizontal position.
+ Problem reported by Blake McBride <blake@mcbride.name>.
+
+Sun Mar 30 21:45:00 2014 Steffen Nurpmeso <sdaoden@yandex.com>
+
+ * Makefile.sim, Makefile.sub: Put straight error-prevention prefixes
+ for `rm'.
+
+Wed Mar 6 22:18:00 2013 Deri James <deri@chuzzlewit.myzen.co.uk>
+
+ * groff_mm.man: Document .PIC flag -B (box). Default position of
+ picture is left (-L)
+
+Fri Mar 1 08:41:18 2013 Jim Avera <james_avera@yahoo.com>
+
+ * m.tmac (ds@set-format, LI): s/.ie/.if/ if no else clause.
+
+Sat Nov 17 18:36:56 2012 Anton Shepelev <anton.txt@gmail.com>
+
+ Fixed the format of header numbers in references.
+
+ * m.tmac (hd-mark-trimmed): New string to hold `hd-mark' without
+ spaces.
+ (SETR): Use it.
+
+Sun Aug 14 07:36:29 2011 Anton Shepelev <anton.txt@gmail.com>
+
+ Fix indents in nested static displays.
+
+ * m.tmac (DS, ds@end): Save indent with a stack.
+ See http://lists.gnu.org/archive/html/groff/2011-07/msg00068.html
+ for an example.
+
+Sun Mar 27 09:25:01 2011 Anton Shepelev <anton.txt@gmail.com>
+
+ * m.tmac (misc@tag): Fix last patch.
+
+Sat Mar 19 13:46:50 2011 James Avera <jimav>
+
+ * m.tmac (RD): Don't use `.ie' but `.if'.
+
+Fri Mar 18 09:10:19 2011 Anton Shepelev <anton.txt@gmail.com>
+
+ * m.tmac (misc@tag): Retain temporary indentation.
+
+Sat Feb 5 08:06:39 2011 Anton Shepelev <anton.txt@gmail.com>
+
+ Fix vertical space around displays.
+
+ * m.tmac (ds@end): Use `.SP', not `.sp'.
+
+Fri Jan 28 11:15:29 2011 Werner LEMBERG <wl@gnu.org>
+
+ Handle `refer-mm.tmac' file.
+
+ * refer-mm.tmac: New file.
+ * Makefile.sub (install_data, uninstall_sub): Handle it.
+
+Fri Jan 28 10:56:29 2011 Werner LEMBERG <wl@gnu.org>
+
+ Add `refer' support.
+
+ * m.tmac: Include `refer-mm.tmac'.
+
+Fri Jan 28 10:26:29 2011 Werner LEMBERG <wl@gnu.org>
+
+ Prepare `refer' support.
+
+ * m.tmac (\n[Rpe]): New register to control page eject status of the
+ `RP' macro.
+ (RP): Updated.
+ (ref@start-print): Move the trailing full stop in reference number
+ to...
+ (RS): This macro.
+
+ * groff_mm.man: Document `Rpe' register.
+
+Fri Jan 28 10:05:29 2011 Werner LEMBERG <wl@gnu.org>
+
+ * mmroff.man, groff_mm.man: s/reference/cross reference/ where
+ appropriate.
+
+Wed Jan 5 15:05:47 2011 Werner LEMBERG <wl@gnu.org>
+
+ Fix use of .DEVTAG-* macros.
+ Reported by Anton Shepelev <anton.txt@gmail.com>.
+
+ * m.tmac (misc@tag): Wrapper around .DEVTAG-* to compensate unwanted
+ vertical space.
+ (H): Use it.
+
+Mon Dec 27 09:39:20 2010 Werner LEMBERG <wl@gnu.org>
+
+ * groff_mm.man: Fix indentation.
+
+Thu Jun 24 12:43:27 2010 Tadziu Hoffmann <hoffmann@usm.uni-muenchen.de>
+
+ * m.tmac (misc@pop-nr): Fix assignment.
+ Reported as
+ http://lists.gnu.org/archive/html/groff/2010-06/msg00096.html
+
+Sat Jun 5 08:06:21 2010 Larry Jones <lawrence.jones@siemens.com>
+
+ * m.tmac (\*[BU]): Always define.
+
+Sat Jun 5 08:00:10 2010 Larry Jones <lawrence.jones@siemens.com>
+
+ Improve compatibility.
+
+ * m.tmac (}b, }f, }p): Define aliases for orthogonality with the
+ already available }t, }e, and }o for page headers.
+
+Wed Jun 2 16:03:39 2010 Larry Jones <lawrence.jones@siemens.com>
+
+ Fix .EOP handling and non-numeric format of \n[P].
+
+ * m.tmac (pg@header): Set `.af' temporarily to numeric format.
+ (pg@print-footer): Disable vertical traps for call to .EOP also.
+
+Wed Jun 2 16:03:39 2010 Larry Jones <lawrence.jones@siemens.com>
+
+ * m.tmac (toc@entry): Use MM page number (\nP).
+
+Sun May 30 07:14:15 2010 Larry Jones <lawrence.jones@siemens.com>
+
+ * m.tmac (P, nP): Fix handling of short paragraphs.
+ Otherwise,
+
+ .H 1 Bug
+ .P
+ one
+ .P
+ two
+ .P
+ three
+
+ results in:
+
+ 1. Bug
+
+ one two three
+
+ whereas it should, of course, produce:
+
+ 1. Bug
+
+ one
+
+ two
+
+ three
+
+Sat Jan 3 08:55:15 2009 Werner LEMBERG <wl@gnu.org>
+
+ * groff_mm.man: Use new `x' table modifier for all tables which use
+ T{...T}. This greatly improves formatting.
+
+Tue Feb 6 00:00:00 2007 Eric S. Raymond <esr@snark.thyrsus.com>
+
+ * groff_mm.man: Typo fix.
+
+Sat Feb 3 00:00:00 2007 Eric S. Raymond <esr@snark.thyrsus.com>
+
+ * groff_mm.man: Eliminate nonportable macro hackery in the
+ definition of T2 in favor or TBL tables.
+
+Fri Jan 5 14:35:35 2007 Werner LEMBERG <wl@gnu.org>
+
+ Fix installation. Reported by Jennifer Sayers.
+
+ * Makefile.sub (install, install_mm): Remove.
+ (install_bin, install_data): New targets.
+
+Sat Aug 12 23:33:45 2006 Nick Stoughton <nick@msbit.com>
+
+ * m.tmac (P): Ignore P after H, as documented.
+
+Tue Apr 4 07:19:57 2006 Werner LEMBERG <wl@gnu.org>
+
+ * groff_mm.man: Document strings TPh, TPeh, and TPoh.
+
+Wed Mar 29 06:58:24 2006 Werner LEMBERG <wl@gnu.org>
+
+ * m.tmac (pg@print-footer): Disable vertical traps while emitting
+ the footer. This fixes an endless loop caused by
+
+ .S 27 59
+ foo
+ .SK
+
+ Problem reported by Bill Brelsford <k2di2@att.net>.
+
+ (LI): Remove superfluous line which sets number register `x' without
+ reason. Problem reported by Morris Stern <mstern@mail.utexas.edu>.
+
+ (eq@check): Correctly flush labels to the right.
+ Problem reported by Morris Stern <mstern@mail.utexas.edu>.
+ Fix vertical positions of labels.
+
+ (ds@end): Emit pre-display space earlier.
+
+ * groff_mm.man: Document that only the last equation label of
+ .EQ/.EN blocks within .DS/.DE is printed.
+
+Tue Mar 28 14:00:06 2006 Werner LEMBERG <wl@gnu.org>
+
+ . Hardwire first four font positions with R, I, B, and BI -- the
+ documentation explicitly refers to this feature (cf. the `HF'
+ string register).
+
+ . Don't use `%' register in numeric calculations because it is
+ affected by `.af'.
+
+ Patches for both problems have been contributed by Nick Stoughton
+ <nick@usenix.org>.
+
+ * m.tmac: s/@language/@country/.
+ s/\n[%]/\n[P]/ where appropriate.
+ s/\fR/\f1/.
+ s/.ft R/.ft 1/.
+ s/\fI/\f2/.
+ s/.ft I/.ft 2/.
+ s/\fB/\f3/.
+ s/.ft B/.ft 3/.
+
+ * mse.tmac: s/@language/@country/.
+
+ * groff_mm.man (Fonts): New subsection.
+
+ * groff_mmse.man: Load `sv.tmac'.
+ Reformatted.
+
+ examples/README: Cleanups and updates.
+
+Mon Mar 27 15:44:24 2006 Werner LEMBERG <wl@gnu.org>
+
+ * groff_mm.man: Completely revised and reformatted to use as many
+ man macros as possible.
+
+Thu Mar 2 09:12:06 2006 Werner LEMBERG <wl@gnu.org>
+
+ * mse.tmac: Remove common Swedish strings and load sv.tmac instead.
+
+Sun Feb 26 13:57:13 2006 Claudio Fontana <claudio@gnu.org>
+
+ * Makefile.sub: Add DESTDIR to install and uninstall targets
+ to support staged installations.
+
+Fri Nov 25 14:31:02 2005 Werner LEMBERG <wl@gnu.org>
+
+ * mm/ms.cov (COVEND): Protect argument for `cov@print-abstract'
+ with doublequotes. Reported by Fabrice Mnard
+ <menard.fabrice@wanadoo.fr>.
+
+Tue Oct 25 21:59:04 2005 Bob Diertens <bobd@science.uva.nl>
+
+ * m.tmac (lix@print-line): Add parentheses to if-else clause to
+ fix logic.
+
+Thu May 26 08:23:40 2005 Werner LEMBERG <wl@gnu.org>
+
+ * m.tmac: Load devtag.tmac.
+
+Mon May 16 00:00:00 CEST 2005 Keith Marshall <keith.d.marshall@ntlworld.com>
+
+ * mmroff.pl: Add space in shebang prototype for generated
+ conftest.sh script, conforming to portability recommendation in
+ autoconf docs.
+
+Wed Mar 16 06:56:02 2005 Larry Kollar <kollar@alltel.net>
+
+ Add rudimentary support for grohtml.
+
+ * m.tmac (H): Call DEVTAG-NH and DEVTAG-EO-H.
+ (pg@enable-trap, pg@header): Do nothing for devhtml.
+
+Sun Mar 7 16:34:46 2004 Jeff Conrad <jeff_conrad@msn.com>
+
+ * m.tmac (S): Improve debug message.
+
+Wed Mar 05:38:57 2004 Joergen Haegg <jh@axis.com>
+
+ * Changed default value for Hy in manual to 0
+ * Check Hy at each new page
+
+Mon Mar 1 22:16:38 2004 Jeff Conrad <jeff_conrad@msn.com>
+
+ * m.tmac (S): Fix scaling indicator for vertical spacing.
+
+Tue Nov 05:14:45 2003 Joergen Haegg <jh@axis.com>
+
+ * another patch from ulrich lauther to fix the
+ TOC up to 14 heading levels.
+
+Mon Oct 13:48:25 2003 Joergen Haegg <jh@axis.com>
+
+ * problem with more than 7 levels of headings fixed with
+ patch from ulrich lauther.
+
+Wed Apr 06:42:35 2003 Joergen Haegg <jh@axis.com>
+
+ * the footer was not adjusted by VM due to a missing
+ pg*extra-footer-size in the calculation of pg*last-pos
+
+Wed Apr 06:04:58 2003 Joergen Haegg <jh@axis.com>
+
+ * space adjustments in 4.MT to make it more like
+ the original
+
+Sun Mar 21:45:10 2003 Joergen Haegg <jh@axis.com>
+
+ * removed error check i 4.MT, .AF is not mandatory anymore
+
+Sat Mar 21:56:57 2003 Joergen Haegg <jh@axis.com>
+
+ * cov*firm now defined only if arg to AF is non-empty
+ That will also enable cov*default-firm from the mm locale-file
+ to work.
+
+Sat Mar 21:05:29 2003 Joergen Haegg <jh@axis.com>
+
+ * added .ll in pg@set-env to initialize the
+ header environment properly
+
+Wed Mar 19 23:02:16 2003 Werner LEMBERG <wl@gnu.org>
+
+ * groff_mm.man: Some fixes from Robert D. Goulding
+ <goulding@Princeton.EDU>.
+
+Wed Sep 09:53:06 2002 Joergen Haegg <jh@axis.com>
+
+ * added implicit -mm to mmroff, it's now possible
+ to use mmroff with or without -mm as argument.
+
+Thu Aug 08 00:31:00 Bob Diertens <bobd@science.uva.nl>
+
+ * m.tmac (VM): Add missing backslash.
+
+Fri Jun 10:37:58 2002 Joergen Haegg <jh@axis.com>
+
+ * added init@reset for LT-macros so .S works for letters
+
+Thu May 06:30:06 2002 Joergen Haegg <jh@axis.com>
+
+ * adding -T to VM for setting the total
+ header and footer size.
+ * changing pg*extra-header-size unit from v to u in DS-size
+ calculation
+
+Mon May 05:40:16 2002 Joergen Haegg <jh@axis.com>
+
+ * All lists now get an empty line before the list
+ even if there is no empty lines between the items (bug in LB)
+
+Sat May 07:36:08 2002 Joergen Haegg <jh@axis.com>
+
+ * PIC is now drawn 1v higher, making it
+ possible to put a picture at 0,0.
+ * Indentbug in P fixed, Pt=2 now behaves as it should
+
+Wed May 10:18:26 2002 Joergen Haegg <jh@axis.com>
+
+ * added L, W and O in groff_mm.man
+ * extra space in expression removed in EPIC
+ * EPIC can leftadjust with -L
+ * EPIC was drawing 1v down
+ * forgot to add mmse.tmac and mm.tmac to cvs
+
+Fri May 20:35:32 2002 Joergen Haegg <jh@axis.com>
+
+ * Clarified manual about INITR
+ * Added mm.tmac and mmse.tmac wrappers
+ * Fixed bug in mmroff so a .qrf-file always will be created
+ * .EQ mark was not correctly positioned anymore.
+ * changed SP to sp in DS/DE to further correct .EQ
+
+Sun Dec 9 00:00:00 2001 Werner LEMBERG (wl@gnu.org)
+
+ * Makefile.sim, groff_mm.man, groff_mmse.man: Minor fixes.
+ * mmroff.man: This is a section 1 man page.
+ Minor fixes.
+ * Makefile.sub: Install mmroff.man in section 1.
+
+Wed Nov 28 00:00:00 2001 Werner LEMBERG (wl@gnu.org)
+
+ * m.tmac: Assure that the macro package is loaded only once.
+
+Wed Sep 5 00:00:00 2001 Werner LEMBERG (wl@gnu.org)
+
+ * m.tmac: Enable all warnings only if no -W or -w option is given on
+ the command line (or rather, if only the default warnings are
+ set).
+
+Mon Sep 3 00:00:00 2001 Werner LEMBERG (wl@gnu.org)
+
+ * groff_mm.man: Don't use .ne for TTY devices.
+
+Thu Jul 26 00:00:00 2001 Werner LEMBERG (wl@gnu.org)
+
+ * groff_mm.man: Start always a new line after end of sentence. Add
+ some compatibility info to the HF variable.
+
+Thu Jul 26 00:00:00 2001 Larry Jones (larry.jones@sdrc.com)
+
+ * m.tmac: Fix initialization of Hps1 and Hps2.
+
+Wed May 16 00:00:00 2001 Bruce Lilly (blilly@erols.com)
+
+ * m.tmac (TH): Fix incorrect error message.
+
+Thu Apr 12 00:00:00 2001 Ruslan Ermilov (ru@FreeBSD.org)
+
+ * groff_mm.man: Fixing some typos.
+
+Mon Mar 5 09:30:18 2001 Jrgen Hgg (jh@axis.com)
+
+ * S didn't reset to default point size
+ * (dummy line to force cvs update...)
+
+Sat Jan 06 10:30:00 2001 Werner LEMBERG (wl@gnu.org)
+
+ * Fixed assignment of page offset given as a command line argument.
+
+Fri Nov 17 05:34:17 2000 Jrgen Hgg (jh@axis.com)
+
+ * Renamed tmac.m and tmac.mse to m.tmac and mse.tmac
+
+Thu Sep 14 05:52:48 2000 Jrgen Hgg (jh@axis.com)
+
+ * New Changelog-format, it will show changes better.
+ Easier for other to use. (Somehow I didn't really
+ understand why the e-mail address was supposed to be
+ 'jh at axis.com' in the Changelog. :-)
+
+Mon Aug 28 00:00:00 2000 Bruno Haible (haible at clisp.cons.org)
+
+ * Makefile.sub: New target 'all', makes all prerequisites of
+ 'install'.
+
+Thu Sep 7 06:17:42 2000 Jrgen Hgg (jh at axis.com)
+
+ * version 2.0
+ * Had to do something about my version numbering.
+ The main CVS archive was not in sync with mine.
+ So, now it is 2.0. :-)
+
+Sat Jun 17 23:00:00 2000 Eli Zaretskii (eliz@is.elta.co.il)
+
+ * Makefile.sim (.man.n): Replace `;' with `|', since DOS/Windows
+ path lists use the semicolon as a separator.
+
+Sun Jun 4 21:39:00 2000 Kaneda Hiroshi (vanitas at ma3.seikyou.ne.jp)
+
+ * Fixing a lot of typos in groff_mm.man
+
+Tue Mar 7 00:00:00 2000 OKAZAKI Tetsurou (okazaki at be.to)
+
+ * Makefile.sub: Use $(INSTALL_SCRIPT) for script files.
+
+Sun Jan 30 22:52:20 2000 Jrgen Hgg (jh at axis.com)
+
+ * version 1.34
+ * Changed the version number in the CVS repository
+ * MC had a bug in column calculation, (thanks to T. Kurt Bond)
+
+Fri Sep 3 07:33:14 1999 Jrgen Hgg (jh at axis.com)
+
+ * version 1.33
+ * At last! I finally tracked down the PGFORM bug!
+ It didn't setup the @pl, @ll and @po as it should, now it does.
+ * mgm_ref/mgm_roff renamed to mmroff [-x]
+ * fixed y2k-bug in \*[DT]
+ * \n[cov*year] removed, hope no one used that.
+ * ISODATE added with Iso as command line flag
+ (iso-date suggested by Paul Eggert)
+ * Added ISODATE to tmac.mse and removed local settings
+ of new-date.
+ * INITI syntax changed and enhanced. Index processing is now
+ done with mmroff.
+ * A few examples has been added, new subdirectory 'examples'.
+ * Fixed bug with SETR, header references are now only saved
+ when Ref > 0
+ * Problem with register H1h fixed
+ * Added test for missing abstract in 4.MT
+ * Updated Makefile.sub, using tmac_m_prefix.
+
+Mon Mar 15 22:22:42 1999 Jrgen Hgg (jh at axis.com)
+
+ * OK, let's release this as a beta, 1.33 will be better. :-)
+ * version 1.32
+ * fixed .el-error
+ * Added number variable Hss
+ * Changed Hps1 and Hps2 to units
+ * added hd*h1-text to be used in user defined macro TP.
+ * -U needed for SETR (I really need 'mv', 'echo', 'rm'
+ and 'test' builtin!)
+ * Rewritten the reference system, SETR now prints to stderr
+ if the number register Qrf > 0. Store in the filename
+ that is the argument to .INITR
+ The old behaviour is returned if number register Initr > 0.
+ * Fixed bug with List of XXXX, long lines messed up the result.
+ * added number register H1dot.
+ * added string variable H1txt
+ * added string variable Tcst
+ * added number register Dsp.
+ * added alias APPX for user-defined appendix title.
+ * added string variable Apptxt
+ * added H1h for use in TP in headers
+ * added macro EPIC
+ * added macro PIC (safe replacement for PSPIC)
+ * fixed Hps-bug, should be 1, not 1v.
+ * fixed bug with APPSK, variable not set.
+
+Wed Feb 4 15:46:04 1998 Jrgen Hgg (jh at axis.se)
+
+ * version 1.31
+ * .LI will now honor a space mark.
+ * Another fix for .AU to let it be used without arguments.
+ * uninitialized eq*label fixed
+
+Fri Sep 6 07:13:07 1996 Jrgen Hgg (jh at axis.se)
+
+ * version 1.30
+ * This is more like a beta-release, bugs might pop up. :-)
+ * last line in TOC was not correctly terminated (missing .br)
+ * changed the indentation for displays, it will now
+ indent to the current indent, not the one at the definition
+ of the display.
+ * Equation marks should now work better, indentation also.
+ * included these bug fixes from Larry Jones:
+ * The documentation for the argument to .AS was incorrect for MT 4.
+ * \*(EM should be a double-dash for nroff.
+ * \nS is in points, not units.
+ * If \nO isn't set, the default page offset should be .75i for nroff
+ and .963i for troff.
+ * .S D should set the point size to \nS, not 10.
+ * .S was setting the vertical spacing based on the old point size
+ instead of the new point size.
+ * Got rid of a spurious .br that prevented run-in headings from
+ working.
+ * Reset the .SP counters in pg@header so that spacing on one page
+ won't affect spacing on subsequent pages.
+ * Allow .AU and .AF with no arguments (real mm does, even though it
+ isn't documented).
+ * Do .init@reset first thing to initialize the default environment.
+ * For MT 4, the title should be 4 points larger than the default size,
+ not 12 point.
+ * The cover environment needs to be initialized.
+ * Printing the abstract on the first page needs to be controlled by
+ the .AS argument.
+ * Heading eject should be suppressed if the heading immediately
+ follows the first page stuff (title, author, etc.).
+ * support for table of contents numbering style (.nr Oc)
+ * changes the troff empty line height from .25v to .5v
+ * fixed section page numbering
+ * fixed a really nasty bug in footnotes that could cause you
+ to lose the page footer completely if the very first
+ footnote on the page occurred at just the wrong place
+
+
+Wed May 15 07:39:32 1996 Jrgen Hgg (jh at axis.se)
+
+ * version 1.29
+ * Syntax and scaling error fixed, (thanks to Frazer Williams)
+ * DF/DE will now do a line-break before printing the display.
+ * Updated the manual for TB,FG,EX and EC.
+ * Added support for the ms- (and mgs-)macro .IX
+ * Added indexmacro IX, INITI, IND and INDP, support for
+ TXIND, TYIND and TZIND.
+ * PGFORM will now always really reset to the default
+ values for unspecified arguments.
+ * Floating displays tested and repaired, it should
+ now (finanlly) work exactly as the original (I hope :-).
+ * Should now set year correctly even after 2000.
+ * Stupid bug in PGNH fixed.
+ * Corrected line length for figure caption (FG and friends)
+
+
+Mon Apr 24 07:37:52 1995 Jrgen Hgg (jh at axis.se)
+
+ * version 1.28
+ * Added AVL (AV without date)
+ * Fixed nroff scaling for W and L.
+ * Added support for register E and roman/bold
+ for all Subject/Date/From strings.
+ * Added support for register C (1-4), (for DRAFTs and other types)
+ * Will protest if not used with groff.
+ * Change of the internal number registers @ps and @vs, they
+ are now in units, and is set in the new macros .@ps and .@vs.
+ @ps and @vs is now corrected to the real point and vertical size.
+ * Macro EQ has now correct pointsize.
+ * Figures should now get the right page number in the index.
+ * User-defined macros can now be defined for list of
+ figures, tables, equations and exhibits (T{X,Y}{FG,TB,EC,EX}.
+ * Space may be omitted between prefix and mark in automatic lists (.AL)
+ See .LI
+
+Tue Jan 10 07:51:37 1995 Jrgen Hgg (jh at axis.se)
+
+ * version 1.27
+ * Manual updated
+ * More bugs fixed in DS/DF
+ * added alias for :g
+ * LC can now be used without argument (as the manual says. :-)
+ * Register :R now supported (RS/RF)
+ * footnote line was printed even if there was no room for
+ any footnotes. Fixed.
+ * Fixed 1C so that it can be used without page eject
+ * Added support for EOP (TPs twin)
+ * Hyphenation turned off by default. (Hy == 0)
+
+Fri Nov 4 08:14:50 1994 Jrgen Hgg (jh at axis.se)
+
+ * version 1.25
+ * DS/DF separated and several bugs fixed. Watch out for new though. :-)
+ * string DT was emptied by mistake in the previous version.
+ * RD made prettier.
+ * typo in AV and let@print-head fixed.
+
+Mon Oct 31 08:19:24 1994 Jrgen Hgg (jh at axis.se)
+
+ * version 1.24
+ * Bug fixed and format extended in .SG and .FC.
+ * date is always printed unless .ND without argument is used.
+ (I wonder what's the right thing to do, this might change.)
+ * Swedish letter-standards implemented in tmac.mse.
+ * .ND can be used to turn off the date. (Empty argument)
+
+Mon Oct 31 08:14:09 1994 Jrgen Hgg (jh at axis.se)
+
+ * version 1.23
+ * An attempt to get in sync with RCS. This is the distributed
+ version.
+
+Thu Oct 27 08:29:34 1994 Jrgen Hgg (jh at axis.se)
+
+ * version 1.22
+ * (version 1.21 lost... :-)
+ * Letter macros added!!
+ * The following macros are added:
+ * AV, FC, IA ,IE, LT, LO, NE, NS, SG, WA, WE
+ * nP also added.
+
+Tue Dec 14 16:26:36 1993 Joergen Haegg (jh at efd.lth.se)
+
+ * version 1.20
+ * spelling-corrections
+ * Makefile.sim updated to the correct version, and a uninstall
+ target added.
+ * @cur-lib removed from tmac.m (obsolete)
+ * fixed check for references i .TC, .RP now resets the flag correctly.
+ * floating display should now be printed if there is space.
+ * first version using RCS. I've been avoiding version control until it
+ became necessary.
+ * WC WD now works in two-column-mode.
+
+Tue Sep 7 08:37:00 1993 Jrgen Hgg (jh at efd.lth.se)
+
+ * version 1.19
+ * .lt is called in the header for .TP also.
+ * Variable Pgps added to control the header and footer point-size.
+ * Error-text printed with .APP removed.
+ * Error with .FG, .TB, .EC and .EX indentation fixed.
+ * header and footer line-length is not changed by MC or 2C.
+ * Default for page-length and page-offset is now taken from
+ \n[.p] and \n[.o].
+ * Argument to .ab (abort) is supplied.
+ * Argument to .1C added.
+ * Argument to .PGFORM added.
+ * RP/RS/RF totally rewritten. Should work with 2C now.
+
+Fri Apr 23 10:37:25 1993 Joergen Haegg (jh at efd.lth.se)
+
+ * version 1.18
+ * Height of display is now more exactly calculated.
+ * tabs and blankspaces where wrong in .VERBON.
+ * error in manual for escape-character in VERBON.
+ * Makefile.sub: installed tmac.m as tmac.m and tmac.mse
+ * Installation of tmac.mse now supports TMAC_M.
+ * bug with N fixed.
+
+Mon Apr 5 09:36:01 1993 Joergen Haegg (jh at efd.lth.se)
+
+ * version 1.17
+ * MULB preserves size.
+ * bug in VERBON fixed, causing strange errors.
+ * section-page footer fixed.
+ * added support for numberregister S
+ * fixed bug with floating displays which made floats to
+ generate space on a page, but broke page anyway.
+ * end-of-page trap reinstalled.
+
+Mon Mar 29 10:53:13 1993 Joergen Haegg (jh at efd.lth.se)
+
+ * version 1.16
+ * MUL* now use the previous font and family.
+ * extra blank page at end-of-text eliminated.
+
+Mon Mar 8 10:27:47 1993 Joergen Haegg (jh at efd.lth.se)
+
+ * version 1.15
+ * Didn't restore pointsize to current size in .H.
+ * B1/B2 did not work with indent. (MULE and friends)
+ * fixed old problem with trailing empty pages.
+
+Fri Mar 5 15:20:49 1993 Joergen Haegg (jh at efd.lth.se)
+
+ * version 1.14
+ * Sigh. Amazing what a missing \} can do. If the string
+ HP was set, then all text disappeared...
+
+Fri Mar 5 14:12:43 1993 Joergen Haegg (jh at efd.lth.se)
+
+ * version 1.13
+ * Fixed bug with handling ps/vs in .H. (again, sigh... )
+
+Wed Mar 3 09:21:20 1993 Joergen Haegg (jh at efd.lth.se)
+
+ * version 1.12
+ * Line-break added to PGFORM.
+ * added more features to VERBON
+ * .S is not used anymore in H, it caused confusion with
+ normal text, but it will still set .vs.
+ * SK was broken, will now produce the requested number of
+ empty pages.
+ * dotted lines added to LIST OF FIGURES and friends.
+ Also better linespacing.
+
+Mon Feb 22 12:41:06 1993 Joergen Haegg (jh at efd.lth.se)
+
+ * version 1.11
+ * missing left-parenthesis gave ") .sp" when N=4.
+ * N=4 removed user-specified header also.
+ * MOVE made linelength pageoffset wider than wanted.
+ * fixed (again) parenthesis in RP.
+
+Thu Jan 21 12:10:39 1993 Joergen Haegg (jh at efd.lth.se)
+
+ * version 1.10
+ * changed PROG_PREFIX to g in the manual-pages.
+ * Better check if new page is needed in .H, when Ej>0.
+ * Usage of variable Lsp now more complete.
+ * Space added in TOC when mark is equal to size.
+ * Usermacro HY moved after font-calulations.
+ * .S used instead of .ps, which will use .vs correct.
+ * Now possible to set Hps1/2 inside HX.
+ * .FD "" 1 is now fixed.
+ * section-page numbering bug fixed.
+ * several bugs in VERBON/OFF fixed.
+
+Tue Dec 8 16:43:15 1992 Joergen Haegg (jh at efd.lth.se)
+
+ * version 1.09
+ * N==4 gives no default header
+
+Sat Nov 21 14:28:20 1992 Joergen Haegg (jh at efd.lth.se)
+
+ * version 1.08
+ * Escape-character disabled between
+ VERBON/VERBOFF (turned on by an argument).
+ Pointsize and fontchange also added as arguments.
+ * MULB, MULN and MULE added to get multicolumn output
+ with different width.
+ * Number register N can now use 1-5.
+ * Register Sectp and Sectf added.
+ * Register P is now updated correctly for "section-page" numbering.
+
+Thu Nov 19 11:19:33 1992 Joergen Haegg (jh at efd.lth.se)
+
+ * version 1.07
+ * .OP fixed to eject a blank page if not odd.
+
+Fri Nov 13 09:46:09 1992 Joergen Haegg (jh at efd.lth.se)
+
+ * version 1.06
+ * Macro TL rewritten. TL depends now on a following .AU.
+ * NOTES updated.
+ * .lt is now used more frequent when linelength is changed.
+ * macro AST added.
+ * removed PH/EH/OH not needed in ?.MT.
+
+Wed Oct 28 14:35:43 1992 Joergen Haegg (jh at efd.lth.se)
+
+ * version 1.05
+ * .VM implemented.
+ * Possible bug in page heading fixed. Changed .sp to 'sp in HEADER.
+
+Thu Aug 20 13:56:31 1992 Joergen Haegg (jh at efd.lth.se)
+
+ * version 1.04
+ * page-break in .EQ moved.
+ * changed unit for footer-size and header-size from units to lines.
+ Fixes problems with .S and page-breaks.
+ * \n[%] is now treated as a string, which makes it possible
+ to assign new formats to it. Unfortunately, it was necessary
+ to change the page-number-variable in GETPN to a string.
+ * Makefile.sub included. (Thank you, James)
+
+Thu May 7 16:14:10 1992 Joergen Haegg (jh at efd.lth.se)
+
+ * version 1.03
+ * Typo and centering in DS/DE fixed.
+ Even and odd pageheaders were reversed.
+ * LI: pad and mark-indent was lost in some earlier versions. Now fixed.
+ * fixed bug in reference to .FG, .TB, ...
+ * APP did not clear headercounters.
+ * Pointsize in titles is now only set at the beginning and
+ when PH, PF, OH, OF, EH and EF are used.
+
+Thu May 6 16:01:35 1992 Joergen Haegg (jh at efd.lth.se)
+
+ * version 1.02
+ * OP fixed.
+
+Fri Mar 6 09:36:09 1992 Joergen Haegg (jh at efd.lth.se)
+
+ * version 1.01
+ * two .LI without text between should not be printed
+ on the same row. Now fixed.
+ * figure titles and friends fixed, now possible with many .FG
+ in a DS/DE. Didn't always position correctly in previous version,
+ but is now always printed as it should.
+ * Makefile fixed for Ultrix.
+ * DS/DF could not handle empty arguments correct
+ * Missing .br i EQ added.
+
+Sat Jan 25 15:47:21 1992 Joergen Haegg (jh at efd.lth.se)
+
+ * version 1.00
+ * No betaversion anymore!
+ * Fixed headernumbers within appendixes.
+ * DS did not keep the same font as before DS.
+ * mmse did a line break.
+
+Fri Jan 24 14:38:16 1992 Joergen Haegg (jh at efd.lth.se)
+
+ * version 0.16
+ * bug in TC, multiple line headers did not wrap correctly.
+ * added support for mm/locale and mm/language_locale.
+ * cov*default-firm in locale sets name of firm in the MT covers.
+ * cov*location-xxxx in locale sets location xxxx to the contents
+ of cov*location-xxxx. Used in the MT covers.
+ * hanging indent in lists fixed.
+ * use larger empty lines if .nroff is defined.
+ * macros, like .P, can now be used inside abstracts.
+ * .S do not reset indentation anymore.
+ * .RS aA now sets a string, not an integer.
+ * appendix with .APP or .APPSK added.
+
+Thu Nov 28 22:00:59 1991 Joergen Haegg (jh at efd.lth.se)
+
+ * version 0.15
+ * Fixed .AU in MT 0-3, added support for variable Au.
+ * Bug in the positioning of the foot-notes.
+ * lists not indented properly.
+ * Hps1 and Hps2 added.
+ * COVER had to have an argument.
+ * table of contents can now have multiline header.
+ * .HU now increments headingvariable H?
+ * added the inclusion of a locale file.
+
+Sat Nov 23 14:40:17 1991 Joergen Haegg (jh at efd.lth.se)
+
+ * version 0.14
+ * bug when using -rO fixed.
+ * MT 1-4 added.
+ * default is now MT 1
+ * .EQ/.EN can be used outside of .DS/.DE without complaints. But
+ I don't recommend it. Neither does the DWB books.
+ * LI don't break lines now if arg too big.
+ * PGFORM did not reset indent.
+ * Added the numbervariable Hps.
+ * Rewritten and added MT 0-5 + "string".
+ * Added TM.
+ * Indent to AS added
+
+Wed Nov 6 15:18:40 1991 Joergen Haegg (jh at efd.lth.se)
+
+ * version 0.13
+ * ds*format nod defined if PS/PE is used without DS/DE.
+ * GETST added, fourth argument to EX, FG, TB and EC added.
+
+Mon Nov 4 13:38:01 1991 Joergen Haegg (jh at efd.lth.se)
+
+ * version 0.12
+ * Fixed C,D,P,+-size in .S
+
+Sun Jan 1 00:00:00 1991 Joergen Haegg (jh at efd.lth.se)
+ * Next version will have ChangeLog entries...
+ * Bug in INITR fixed.
+ * VERBON/VERBOFF added to include programlistings
+ * Bug in .DE fixed, addition overflow
+Sun Jan 1 00:00:00 1991 Joergen Haegg (jh at efd.lth.se)
+ * spelling error in month-names.
+ * WC should work now (no warranty :-)
+ * FD almost finished, some details missing.
+ * incorrect calculation of foot-notes fixed.
+ * DS/DE did not break page when the size was smaller than the paper
+ * Forward/backward referencesystem added. Se .INITR in README.
+ * mgmsw changed name to mgmse.
+Sun Jan 1 00:00:00 1991 Joergen Haegg (jh at efd.lth.se)
+ * embarrassing bug in .P fixed
+ * .H did always eject page, now fixed.
+ * lost floating displays now found.
+ * accents added (from mgs)
+ * empty line in .EQ/.EN removed
+ * indentation in .TC corrected.
+ * indentation of DS/DE in lists fixed.
+ * .TB and friends now work inside DS/DE and outside.
+ * .WC partially implemented (WF and WD). Still working on it.
+ * .mso used if version>=1.02
+Sun Jan 1 00:00:00 1991 Joergen Haegg (jh at efd.lth.se)
+ * register P was not working.
+ * support for register Fg, Tb, Ec and Ex.
+ * list items was left on the previous page at a page break.
+ * tlevel in .TC now defaults to 2.
+ * string DT, EM and Tm supported.
+ * new macro: PGNH, see comments.
+ * bug in MOVE fixed.
+ * pagenumber in .TC fixed.
+ * a blank page was ejected if Ej==1, now fixed
+ * bug in floating display fixed (did break and SP wrong)
+ * bug in .SP fixed, no lines is now printed at top of page
+ * There are still problems with footnotes and displays in two column mode.
+Sun Jan 1 00:00:00 1991 Joergen Haegg (jh at efd.lth.se)
+ * register P added (same as %)
+ * bug in floating displays fixed
+ * MOVE added
+ * MT added, see comment below
+ * COVER/COVEND added
+ * fixed bug in figure titles
+ * extended S, se comment below
+ * MT 0 added
+ * ms-cover added (COVER ms)
+Sun Jan 1 00:00:00 1991 Joergen Haegg (jh at efd.lth.se)
+ * bugs in RD and comb. fonts fixed
+Sun Jan 1 00:00:00 1991 Joergen Haegg (jh at efd.lth.se)
+ * HC added
+ * Combined fonts (IB,BI...)
+ * HM added
+ * RD added
+ * OP added
+ * TP&PX supported
+ * warnings for unimplemented macros
+
+________________________________________________________________________
+
+Copyright 1991-2020 Free Software Foundation, Inc.
+
+Copying and distribution of this file, with or without modification,
+are permitted in any medium without royalty provided the copyright
+notice and this notice are preserved.
+
+Local Variables:
+fill-column: 72
+mode: change-log
+version-control: never
+End:
+vim:set autoindent textwidth=72:
diff --git a/contrib/mm/Makefile.sim b/contrib/mm/Makefile.sim
new file mode 100644
index 0000000..2d2d6b6
--- /dev/null
+++ b/contrib/mm/Makefile.sim
@@ -0,0 +1,84 @@
+# Copyright 1991-2020 Free Software Foundation, Inc.
+#
+# This file is part of groff.
+#
+# groff is free software; 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.
+#
+# groff is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+# Makefile.sim
+#
+# To install mm separately as gm.tmac:
+# make -f Makefile.sub tmacdir=/usr/local/lib/groff/tmac srcdir=. \
+# INSTALL_DATA='install -m 644' tmac_m=gm install
+#
+# or as m.tmac:
+#
+# tmacdir is the destination for your groff/tmac-directory, srcdir is
+# this directory and INSTALL_DATA is the command to install a file with.
+# If you dont have 'install': use 'cp'.
+
+
+# change this to whatever you like
+tmacdir=/usr/local/lib/groff/tmac
+#tmac_m = gm
+tmac_m = m
+indexdir = xx
+install = install -m 644
+
+# Do not change anything below this line
+srcdir = .
+version = 2.8
+mdate = 2002-05-11
+
+.SUFFIXES: .n .man
+
+all:
+
+install: groff_mm.n groff_mmse.n
+ $(MAKE) -f Makefile.sub tmacdir=$(tmacdir) srcdir=$(srcdir) \
+ INSTALL_DATA='$(install)' tmac_m=$(tmac_m) install
+
+uninstall: groff_mm.n groff_mmse.n
+ $(MAKE) -f Makefile.sub tmacdir=$(tmacdir) srcdir=$(srcdir) \
+ INSTALL_DATA='$(install)' tmac_m=$(tmac_m) uninstall_sub
+
+.man.n:
+ @echo Making $@ from $<
+ @rm -f $@
+ @sed -e "s|@HYPHENFILE@|$(hyphenfile)|g" \
+ -e "s|@FONTDIR@|$(fontdir)|g" \
+ -e "s|@FONTPATH@|$(fontpath)|g" \
+ -e "s|@MACRODIR@|$(tmacdir)|g" \
+ -e "s|@MACROPATH@|$(tmacpath)|g" \
+ -e "s|@DEVICE@|$(DEVICE)|g" \
+ -e "s|@DEFAULT_INDEX@|$(indexdir)/$(indexname)|g" \
+ -e "s|@DEFAULT_INDEX_NAME@|$(indexname)|g" \
+ -e "s|@INDEX_SUFFIX@|$(indexext)|g" \
+ -e "s|@COMMON_WORDS_FILE@|$(common_words_file)|g" \
+ -e "s|@MAN1EXT@|$(man1ext)|g" \
+ -e "s|@MAN5EXT@|$(man5ext)|g" \
+ -e "s|@MAN7EXT@|$(man7ext)|g" \
+ -e "s|@TMAC_S@|$(tmac_s)|g" \
+ -e "s|@TMAC_M@|$(tmac_m)|g" \
+ -e "s|@TMAC_MDIR@|$(tmacdir)/mm|g" \
+ -e "s|@BROKEN_SPOOLER_FLAGS@|$(BROKEN_SPOOLER_FLAGS)|g" \
+ -e "s|@VERSION@|$(version)|g" \
+ -e "s|@MDATE@|$(mdate)|g" \
+ -e "s|@g@|$(g)|g" \
+ $< >$@
+
+# Local Variables:
+# mode: makefile
+# fill-column: 72
+# End:
+# vim: set filetype=make textwidth=72:
diff --git a/contrib/mm/NOTES b/contrib/mm/NOTES
new file mode 100644
index 0000000..1c35133
--- /dev/null
+++ b/contrib/mm/NOTES
@@ -0,0 +1,116 @@
+ Copyright (C) 1989-2020 Free Software Foundation, Inc.
+
+ Copying and distribution of this file, with or without modification,
+ are permitted in any medium without royalty provided the copyright
+ notice and this notice are preserved.
+
+######################################################################
+
+Beware!
+This may be old information. Trust only the source. :-)
+
+Implementation notes. (Or how to make your own national mm)
+
+Different commands:
+
+COVER [arg]
+MT [arg [addressee]]
+The arg is part of a filename in mm/*.MT or mm/*.cov.
+This file is read when the macro is executed. Therefore it must be
+put before any text output.
+In each file there are definitions of all extra macros needed for the
+cover sheet. MT files is only for compatibility reasons, and has several
+limits due to that it don't know when the cover starts, and cannot
+change sizes. Use COVER for new coversheet macros.
+
+But with MT it is possible to write all of the AT&T covers.
+An example can be found in mm/0.MT.
+
+When writing a new cover using COVER, have in mind that the cover
+should print the page with the COVEND macro. This macro
+should be defined by the new macrofile.
+
+Here is a part of ms.cov:
+> .\"-----------------
+> .de COVEND
+> .sp |4.2c
+> .cov@print-title
+> .cov@print-authors
+> .cov@print-firm
+> .cov@print-abstract
+> .cov@print-date
+This is important, since COVER disables the page header.
+> .pg@enable-top-trap
+Should begin with page one (normally).
+> .bp 1
+And enable the trap at the page footer.
+> .pg@enable-trap
+> ..
+
+#########################
+
+Variables for covers:
+I = integer
+S = string
+D = diversion
+M = macro
+
+Name Type Desc.
+cov*au I The number of authors.
+
+cov*title M Title collected with .TL.
+
+cov*au!x!y S Author(s) given to .AU
+cov*at!x!y S Author(s) title given to .AT
+ x is the author-index [1-cov*au],
+ y is the argument-index [1-9].
+ Look at the table with indexes.
+
+cov*firm I Author(s) firm.
+
+cov*abs-arg I Argument to abstract.
+
+cov*abs-ind I Indent for abstract.
+
+cov*abs-name S The string 'ABSTRACT', changed with .AST
+
+cov*abstract M The abstract.
+
+cov*new-date S date (today if .ND not used)
+
+cov*mt-type S memorandum type set by .MT
+cov*mt-addressee S memorandum addressee set by .MT
+
+
+##########################
+Argument-index for cov*au:
+
+Index Desc.
+1 name
+2 initials
+3 location
+4 department
+5 extension
+6 room
+7 arg 7
+8 arg 8
+9 arg 9
+
+The location is set to the contents of string cov*location-xxxx
+if location is equal to xxxx and cov*location-xxxx is defined
+in the file locale.
+
+
+Argument-index for cov*at:
+
+Index Desc.
+1 title 1
+. .
+. .
+9 title 9
+
+
+##### Editor settings
+Local Variables:
+mode: text
+End:
diff --git a/contrib/mm/README b/contrib/mm/README
new file mode 100644
index 0000000..6c6ca5b
--- /dev/null
+++ b/contrib/mm/README
@@ -0,0 +1,27 @@
+ Copyright (C) 1989-2020 Free Software Foundation, Inc.
+
+ Copying and distribution of this file, with or without modification,
+ are permitted in any medium without royalty provided the copyright
+ notice and this notice are preserved.
+
+This is mm, a macro package for groff.
+
+It is supposed to be compatible with the Documenter's Workbench (DWB) mm
+macros, and has several extensions.
+
+Please submit bug reports using groff's 'BUG-REPORT' file to
+http://savannah.gnu.org/bugs/?group=groff.
+
+Any new ideas or improvements are welcome.
+
+This README should be bigger :-)
+
+/Jrgen Hgg
+
+Thanks to everyone who have sent me bug reports and fixes.
+
+
+##### Editor settings
+Local Variables:
+mode: text
+End:
diff --git a/contrib/mm/examples/APP b/contrib/mm/examples/APP
new file mode 100644
index 0000000..e2c017f
--- /dev/null
+++ b/contrib/mm/examples/APP
@@ -0,0 +1,359 @@
+.\" -*- nroff -*-
+.\" Copyright (C) 1989-2014 Free Software Foundation, Inc.
+.\"
+.\" Copying and distribution of this file, with or without modification,
+.\" are permitted in any medium without royalty provided the copyright
+.\" notice and this notice are preserved.
+.
+.H 1 " granary grand grandchild grandchildren granddaughter grandeur"
+granary
+grapheme
+graphic
+graphite
+grapple
+grasp
+grass
+grassland
+grassy
+grata
+grate
+grateful
+grater
+gratify
+gratis
+gratitude
+gratuitous
+gratuity
+grave
+gravel
+.H 2 "grapefruit grapevine graph grapheme graphic graphite"
+granary
+grand
+graphic
+graphite
+grapple
+grasp
+grass
+grassland
+grassy
+grata
+grate
+grateful
+grater
+gratify
+gratis
+gratitude
+gratuitous
+gratuity
+grave
+gravel
+.H 3 "grapple"
+granary
+grand
+grandchild
+grandchildren
+granddaughter
+grandeur
+grandfather
+grandiloquent
+grandiose
+grandma
+grandmother
+grateful
+grater
+gratify
+gratis
+gratitude
+gratuitous
+gratuity
+grave
+gravel
+.H 1 "Graves gravestone graveyard gravid gravitate gravy gray"
+granary
+grand
+grandchild
+grandchildren
+granddaughter
+grandeur
+grandfather
+grandiloquent
+grandiose
+grata
+grate
+grateful
+grater
+gratify
+gratis
+gratitude
+gratuitous
+gratuity
+grave
+gravel
+.H 1 "Greenfield greengrocer greenhouse greenish Greenland Greensboro"
+granary
+grand
+grandchild
+grandchildren
+granddaughter
+grandeur
+grandfather
+grandiloquent
+grassy
+grata
+grate
+grateful
+grater
+gratify
+gratis
+gratitude
+gratuitous
+gratuity
+grave
+gravel
+.H 1 "greensward greenware Greenwich greenwood Greer greet"
+graven
+Graves
+gravestone
+graveyard
+gravid
+gravitate
+gravy
+gray
+graybeard
+grayish
+Grayson
+graywacke
+graze
+grease
+.APP "" "Graves app a gravestone graveyard gravid gravitate gravy gray"
+granary
+grand
+grandchild
+grandchildren
+granddaughter
+grandeur
+grandfather
+grandiloquent
+grandiose
+grata
+grate
+grateful
+grater
+gratify
+gratis
+gratitude
+gratuitous
+gratuity
+grave
+gravel
+.APP "" "Greenfield app b greengrocer greenhouse greenish Greenland Greensboro"
+granary
+grand
+grandchild
+grandchildren
+granddaughter
+grandeur
+.H 2 "grandfather grandiloquent grandiose grandma grandmother grandnephew"
+.H 2 "grandniece grandpa grandparent grandson grandstand granite granitic"
+.H 2 "granny granola grant grantee grantor granular granulate"
+.H 2 "granule Granville grape"
+.H 2 "grapefruit grapevine graph grapheme graphic graphite"
+.H 3 "grapple"
+grandfather
+grandiloquent
+grassy
+grata
+grate
+grateful
+grater
+gratify
+gratis
+gratitude
+gratuitous
+gratuity
+grave
+gravel
+.APP ABC "greensward app abc greenware Greenwich greenwood Greer greet"
+graven
+Graves
+.APP "" "handstand app f handwrite handwritten handy handyman handymen"
+gravestone
+graveyard
+gravid
+gravitate
+gravy
+gray
+graybeard
+grayish
+Grayson
+graywacke
+graze
+grease
+.APPSK "" 10 "Handel app c 10 handhold handicap handicapped handicapper"
+.APPSK "" 23 "handicapping app d 23 handicraftsmen handiwork"
+.APPSK "" 99 "handmade app e 99 handset handshake handsome handspike"
+.nr Aph 0
+.APP "" "handstand app f handwrite handwritten handy handyman handymen"
+headsmen
+headstand
+headstone
+headstrong
+headwall
+headwater
+headway
+headwind
+.H 2 "graybeard grayish Grayson graywacke graze grease greasy great greatcoat"
+.H 2 "greater grebe Grecian Greece greed greedy Greek green Greenbelt Greenberg"
+.H 2 "Greenblatt Greenbriar Greene greenery"
+.H 3 "Greenfield greengrocer greenhouse greenish Greenland Greensboro"
+.H 3 "greensward greenware Greenwich greenwood Greer greet"
+heady
+heal
+Healey
+health
+healthful
+healthy
+Healy
+heap
+hear
+heard
+hearken
+hearsay
+hearse
+Hearst
+heart
+heartbeat
+heartbreak
+hearten
+heartfelt
+hearth
+hearty
+heat
+heater
+heath
+heathen
+heathenish
+Heathkit
+heave
+heaven
+heavenward
+heavy
+heavyweight
+Hebe
+hebephrenic
+Hebraic
+Hebrew
+Hecate
+hecatomb
+heck
+heckle
+Heckman
+hectic
+hector
+.APP "" "hang hangable app f hangar hangman hangmen hangout hangover hank"
+Hecuba
+he'd
+hedge
+.H 2 "graybeard grayish Grayson graywacke graze grease greasy great greatcoat"
+hedgehog
+hedonism
+hedonist
+heed
+heel
+.H 2 "greater grebe Grecian Greece greed greedy Greek green Greenbelt Greenberg"
+heft
+hefty
+Hegelian
+hegemony
+Heidelberg
+heigh
+height
+heighten
+Heine
+Heinrich
+Heinz
+heir
+heiress
+Heisenberg
+held
+Helen
+Helena
+Helene
+Helga
+helical
+helicopter
+heliocentric
+heliotrope
+helium
+helix
+he'll
+hell
+hellbender
+hellebore
+Hellenic
+hellfire
+hellgrammite
+hellish
+hello
+helm
+helmet
+Helmholtz
+helmsman
+helmsmen
+Helmut
+help
+helpful
+helpmate
+.APP "" "Hankel app g Hanley Hanlon Hanna Hannah Hannibal Hanoi Hanover"
+Helsinki
+Helvetica
+hem
+hematite
+Hemingway
+hemisphere
+hemispheric
+hemlock
+hemoglobin
+hemolytic
+hemorrhage
+hemorrhoid
+hemosiderin
+hemp
+Hempstead
+hen
+henbane
+hence
+henceforth
+henchman
+henchmen
+.H 2 "greater grebe Grecian Greece greed greedy Greek green Greenbelt Greenberg"
+Henderson
+Hendrick
+Hendricks
+Hendrickson
+henequen
+Henley
+henpeck
+Henri
+Henrietta
+henry
+hepatica
+hepatitis
+Hepburn
+heptane
+her
+Hera
+Heraclitus
+herald
+herb
+Herbert
+Herculean
+Hercules
+herd
+herdsman
+here
+hereabout
+hereafter
+hereby
+hereditary
+.TC
diff --git a/contrib/mm/examples/B1B2 b/contrib/mm/examples/B1B2
new file mode 100644
index 0000000..5847d67
--- /dev/null
+++ b/contrib/mm/examples/B1B2
@@ -0,0 +1,98 @@
+.\" -*- nroff -*-
+.\" Copyright (C) 1989-2014 Free Software Foundation, Inc.
+.\"
+.\" Copying and distribution of this file, with or without modification,
+.\" are permitted in any medium without royalty provided the copyright
+.\" notice and this notice are preserved.
+.
+abetting
+abeyance
+abeyant
+abhorred
+abhorrent
+abide
+Abidjan
+Abigail
+abject
+ablate
+ablaze
+able
+ablution
+Abner
+abnormal
+Abo
+aboard
+abode
+abolish
+.B1
+abolition
+abominable
+abominate
+aboriginal
+AAA
+ABORIGINE
+ABORNING
+ABORT
+ABOUND
+ABOUT
+ABOVE
+ABOVEBOARD
+ABOVEGROUND
+abovementioned
+abrade
+Abraham
+Abram
+Abramson
+abrasion
+abrasive
+abreact
+.B2
+abreast
+abrogate
+abrupt
+abscess
+abscissa
+abscissae
+absence
+absent
+absentee
+absenteeism
+absentia
+absentminded
+absinthe
+absolute
+absolution
+absolve
+absorb
+absorbent
+absorption
+absorptive
+abstain
+abstention
+abstract
+abstracter
+abstractor
+ABSURD
+ABUILDING
+ABUNDANT
+ABUSABLE
+ABUSE
+ABUSIVE
+ABUT
+ABUTTED
+ABUTTING
+ABYSMAL
+ABYSS
+ABYSSINIA
+AC
+ACADEME
+ACADEMIA
+ACADEMIC
+ACADEMICIAN
+ACADEMY
+ACADIA
+ACANTHUS
+ACAPULCO
+ACCEDE
+ACCELERATE
+ACCELEROMETER
diff --git a/contrib/mm/examples/COVER b/contrib/mm/examples/COVER
new file mode 100644
index 0000000..affdd2d
--- /dev/null
+++ b/contrib/mm/examples/COVER
@@ -0,0 +1,242 @@
+.\" -*- nroff -*-
+.\" Copyright (C) 1989-2014 Free Software Foundation, Inc.
+.\"
+.\" Copying and distribution of this file, with or without modification,
+.\" are permitted in any medium without royalty provided the copyright
+.\" notice and this notice are preserved.
+.
+.COVER
+.ND 911123
+.TL "charge" "filing"
+This is a test
+granary
+grand
+grandchild
+grandchildren
+granddaughter
+grandeur
+grandfather
+grandiloquent
+grandiose
+grandma
+grandmother
+grandnephew
+grandniece
+grandpa
+grandparent
+grandson
+.AU "Nisse Svensson" "DGY" "BF" "Computer Center" "5488" "5-2115" "nisse@vira.sture.elm"
+.AF "MT GRANDSTAND GRANITE GRANITIC"
+.AS 1 10
+grant
+grantee
+grantor
+granular
+granulate
+granule
+Granville
+grape
+grapefruit
+grapevine
+graph
+grapheme
+graphic
+graphite
+grapple
+grasp
+grass
+grassland
+grassy
+grata
+grate
+grateful
+grater
+gratify
+gratis
+gratitude
+gratuitous
+gratuity
+grave
+gravel
+graven
+Graves
+gravestone
+graveyard
+gravid
+gravitate
+gravy
+gray
+graybeard
+grayish
+Grayson
+graywacke
+graze
+grease
+greasy
+great
+greatcoat
+greater
+grebe
+Grecian
+.AE
+.COVEND
+Greece
+greed
+greedy
+Greek
+green
+Greenbelt
+Greenberg
+Greenblatt
+Greenbriar
+Greene
+greenery
+Greenfield
+greengrocer
+greenhouse
+greenish
+Greenland
+Greensboro
+greensward
+greenware
+Greenwich
+greenwood
+Greer
+greet
+Greg
+gregarious
+Gregg
+Gregory
+gremlin
+grenade
+Grendel
+Grenoble
+Gresham
+Greta
+Gretchen
+grew
+grey
+greyhound
+greylag
+grid
+griddle
+gridiron
+grief
+grievance
+grieve
+grievous
+griffin
+Griffith
+grill
+grille
+grilled
+grillwork
+grim
+grimace
+Grimaldi
+grime
+Grimes
+Grimm
+grin
+grind
+grindstone
+grip
+gripe
+grippe
+grisly
+grist
+gristmill
+Griswold
+grit
+gritty
+grizzle
+granary
+grand
+grandchild
+grandchildren
+granddaughter
+grandeur
+grandfather
+grandiloquent
+grandiose
+grandma
+grandmother
+grandnephew
+grandniece
+grandpa
+grandparent
+grandson
+grandstand
+granite
+granitic
+granny
+granola
+grant
+grantee
+grantor
+granular
+granulate
+granule
+Granville
+grape
+grapefruit
+grapevine
+graph
+grapheme
+graphic
+graphite
+grapple
+grasp
+grass
+grassland
+grassy
+grata
+grate
+grateful
+grater
+gratify
+gratis
+gratitude
+gratuitous
+gratuity
+grave
+gravel
+graven
+Graves
+gravestone
+graveyard
+gravid
+gravitate
+gravy
+gray
+graybeard
+grayish
+Grayson
+graywacke
+graze
+grease
+greasy
+great
+greatcoat
+greater
+grebe
+Grecian
+Greece
+greed
+greedy
+Greek
+green
+Greenbelt
+Greenberg
+Greenblatt
+Greenbriar
+Greene
+greenery
+Greenfield
+greengrocer
+greenhouse
+greenish
+Greenland
+Greensboro
+greensward
+greenware
diff --git a/contrib/mm/examples/IND b/contrib/mm/examples/IND
new file mode 100644
index 0000000..ad4ee5a
--- /dev/null
+++ b/contrib/mm/examples/IND
@@ -0,0 +1,4198 @@
+.\" -*- nroff -*-
+.\" Copyright (C) 1989-2014 Free Software Foundation, Inc.
+.\"
+.\" Copying and distribution of this file, with or without modification,
+.\" are permitted in any medium without royalty provided the copyright
+.\" notice and this notice are preserved.
+.
+.de foo
+a=\\$1, b=\\$2
+.br
+..
+.INITI N ind-data
+.H 1 "halve"
+.IND granary
+grand
+grandchild
+grandchildren
+granddaughter
+grandeur
+grandfather
+grandiloquent
+grandiose
+grandma
+grandmother
+.IND grandnephew
+grandniece
+grandpa
+grandparent
+grandson
+grandstand
+granite
+granitic
+granny
+granola
+grant
+grantee
+grantor
+granular
+.IND granulate
+granule
+Granville
+grape
+.H 2 "grandfather grandiloquent grandiose grandma grandmother grandnephew"
+grapefruit
+grapevine
+graph
+grapheme
+graphic
+.H 1 "halo halocarbon halogen Halpern Halsey Halstead halt halvah"
+graphite
+grapple
+grasp
+grass
+grassland
+grassy
+grata
+grate
+grateful
+grater
+gratify
+gratis
+gratitude
+gratuitous
+gratuity
+.IND grave
+gravel
+graven
+Graves
+gravestone
+graveyard
+gravid
+gravitate
+gravy
+gray
+graybeard
+grayish
+Grayson
+graywacke
+graze
+grease
+greasy
+great
+greatcoat
+greater
+.H 1 "Han Hancock hand handbag handbook handclasp handcuff Handel handful"
+grebe
+Grecian
+Greece
+greed
+greedy
+.IND Greek
+green
+Greenbelt
+Greenberg
+.H 1 " granary grand grandchild grandchildren granddaughter grandeur"
+Greenblatt
+Greenbriar
+Greene
+greenery
+Greenfield
+greengrocer
+greenhouse
+greenish
+Greenland
+Greensboro
+greensward
+.H 1 "handgun"
+greenware
+Greenwich
+greenwood
+Greer
+greet
+Greg
+gregarious
+Gregg
+Gregory
+.IND gremlin
+grenade
+Grendel
+Grenoble
+Gresham
+Greta
+Gretchen
+grew
+grey
+greyhound
+greylag
+grid
+griddle
+gridiron
+grief
+grievance
+grieve
+grievous
+griffin
+Griffith
+grill
+grille
+grilled
+grillwork
+grim
+.IND grimace
+Grimaldi
+grime
+Grimes
+Grimm
+grin
+grind
+grindstone
+grip
+gripe
+grippe
+grisly
+grist
+gristmill
+Griswold
+grit
+gritty
+grizzle
+grizzly
+groan
+groat
+grocer
+grocery
+groggy
+.IND groin
+grommet
+groom
+groove
+grope
+grosbeak
+gross
+.H 1 "handicapped handicapper handicapping handicraft handicraftsman"
+Grosset
+Grossman
+Grosvenor
+grotesque
+Groton
+ground
+groundsel
+groundskeep
+groundwork
+group
+groupoid
+grout
+grove
+grovel
+Grover
+grow
+growl
+grown
+grownup
+.IND growth
+grub
+grubby
+grudge
+gruesome
+gruff
+grumble
+Grumman
+grunt
+gryphon
+g's
+GSA
+GU
+Guam
+guanidine
+guanine
+guano
+guarantee
+guaranteeing
+guarantor
+guaranty
+guard
+guardhouse
+.IND Guardia
+guardian
+Guatemala
+.IND gubernatorial
+Guelph
+Guenther
+guerdon
+guernsey
+guerrilla
+guess
+guesswork
+guest
+guffaw
+Guggenheim
+Guiana
+guidance
+guide
+guidebook
+guideline
+guidepost
+guiding
+guignol
+guild
+.H 1 "handicraftsmen handiwork handkerchief handle"
+guildhall
+guile
+Guilford
+guillemot
+guillotine
+guilt
+.IND guilty
+guinea
+guise
+guitar
+gules
+gulf
+.H 1 "handleable handlebar handline handmade handmaiden handout"
+gull
+Gullah
+gullet
+gullible
+gully
+gulp
+gum
+gumbo
+gumdrop
+gummy
+gumption
+gumshoe
+gun
+Gunderson
+.IND gunfight
+gunfire
+gunflint
+gunk
+gunky
+gunman
+.IND gunmen
+gunnery
+gunny
+gunplay
+gunpowder
+gunshot
+gunsling
+Gunther
+gurgle
+Gurkha
+guru
+Gus
+gush
+gusset
+gust
+Gustafson
+Gustav
+Gustave
+Gustavus
+gusto
+gusty
+gut
+.H 1 "handset"
+Gutenberg
+Guthrie
+gutsy
+guttural
+.IND guy
+Guyana
+guzzle
+Gwen
+Gwyn
+gym
+gymnasium
+gymnast
+gymnastic
+gymnosperm
+gyp
+gypsite
+gypsum
+gypsy
+gyrate
+gyrfalcon
+gyro
+.IND gyrocompass
+gyroscope
+h
+ha
+Haag
+Haas
+habeas
+haberdashery
+Haberman
+.IND Habib
+habit
+habitant
+habitat
+habitation
+habitual
+habituate
+hacienda
+hack
+hackberry
+Hackett
+hackle
+hackmatack
+.H 1 "handshake handsome handspike handstand handwaving handwrite handwritten"
+hackney
+hackneyed
+hacksaw
+had
+Hadamard
+Haddad
+haddock
+Hades
+Hadley
+hadn't
+Hadrian
+hadron
+hafnium
+.IND Hagen
+Hager
+haggard
+haggle
+Hagstrom
+Hague
+Hahn
+Haifa
+haiku
+hail
+hailstone
+hailstorm
+Haines
+hair
+.IND haircut
+hairdo
+hairpin
+hairy
+Haiti
+Haitian
+Hal
+halcyon
+hale
+Haley
+half
+halfback
+.IND halfhearted
+halfway
+halibut
+halide
+.H 1 "handy handyman handymen Haney Hanford hang hangable hangar"
+Halifax
+halite
+hall
+hallelujah
+Halley
+hallmark
+hallow
+Halloween
+hallucinate
+hallway
+halma
+halo
+halocarbon
+halogen
+Halpern
+Halsey
+Halstead
+halt
+halvah
+halve
+Halverson
+ham
+.IND Hamal
+Hamburg
+hamburger
+Hamilton
+hamlet
+Hamlin
+hammerhead
+hammock
+Hammond
+hamper
+Hampshire
+.IND Hampton
+hamster
+Han
+.H 1 "hangman hangmen hangout hangover hank Hankel Hanley"
+Hancock
+hand
+handbag
+handbook
+handclasp
+handcuff
+Handel
+handful
+handgun
+handhold
+handicap
+handicapped
+.IND handicapper
+handicapping
+handicraft
+handicraftsman
+handicraftsmen
+handiwork
+handkerchief
+handle
+handleable
+handlebar
+handline
+handmade
+handmaiden
+handout
+handset
+handshake
+handsome
+handspike
+handstand
+handwaving
+.H 1 "Hanlon Hanna Hannah Hannibal Hanoi Hanover Hanoverian Hans"
+handwrite
+handwritten
+handy
+handyman
+handymen
+Haney
+.IND Hanford
+hang
+hangable
+hangar
+hangman
+hangmen
+hangout
+hangover
+.IND hank
+Hankel
+Hanley
+Hanlon
+Hanna
+Hannah
+Hannibal
+Hanoi
+Hanover
+Hanoverian
+Hans
+Hansel
+Hansen
+hansom
+Hanson
+Hanukkah
+hap
+.H 1 "Hansel"
+haphazard
+.IND haploid
+haploidy
+haplology
+happen
+happenstance
+happy
+Hapsburg
+harangue
+harass
+Harbin
+harbinger
+Harcourt
+hard
+hardbake
+hardboard
+hardboiled
+hardcopy
+harden
+hardhat
+Hardin
+.H 1 "Hansen hansom Hanson Hanukkah hap haphazard haploid haploidy"
+Harding
+hardscrabble
+hardtack
+hardtop
+hardware
+hardwood
+.IND hardworking
+hardy
+hare
+harelip
+harem
+.IND hark
+Harlan
+Harlem
+Harley
+harm
+harmful
+Harmon
+harmonic
+harmonica
+harmonious
+.H 1 "haplology happen happenstance happy Hapsburg harangue harass Harbin"
+harmony
+harness
+Harold
+harp
+harpoon
+harpsichord
+Harpy
+Harriet
+Harriman
+Harrington
+Harris
+.IND Harrisburg
+Harrison
+harrow
+harry
+harsh
+harshen
+hart
+Hartford
+Hartley
+Hartman
+Harvard
+harvest
+harvestman
+Harvey
+hash
+hashish
+hasn't
+hasp
+hassle
+hast
+haste
+hasten
+Hastings
+hasty
+hat
+hatch
+.IND hatchet
+hatchway
+.IND hate
+hateful
+hater
+Hatfield
+hath
+Hathaway
+hatred
+Hatteras
+Hattie
+Hattiesburg
+Haugen
+haughty
+haul
+haulage
+haunch
+haunt
+Hausdorff
+Havana
+have
+haven
+haven't
+Havilland
+havoc
+haw
+.IND Hawaii
+Hawaiian
+hawk
+Hawkins
+Hawley
+hawthorn
+.H 2 "hammock Hammond hamper Hampshire Hampton hamster"
+Hawthorne
+hay
+Hayden
+Haydn
+Hayes
+hayfield
+Haynes
+Hays
+haystack
+Hayward
+hayward
+hazard
+hazardous
+haze
+hazel
+hazelnut
+hazy
+he
+head
+.IND headache
+.IND headboard
+headdress
+headland
+headlight
+headline
+headmaster
+headphone
+headquarter
+headquarters
+headroom
+headset
+headsman
+headsmen
+headstand
+headstone
+headstrong
+headwall
+headwater
+headway
+headwind
+heady
+heal
+Healey
+health
+healthful
+healthy
+.IND Healy
+heap
+hear
+heard
+hearken
+hearsay
+hearse
+Hearst
+heart
+heartbeat
+heartbreak
+hearten
+heartfelt
+hearth
+hearty
+heat
+heater
+heath
+heathen
+heathenish
+Heathkit
+heave
+.IND heaven
+heavenward
+heavy
+heavyweight
+.IND Hebe
+hebephrenic
+Hebraic
+Hebrew
+Hecate
+hecatomb
+heck
+heckle
+Heckman
+hectic
+hector
+Hecuba
+he'd
+hedge
+hedgehog
+hedonism
+hedonist
+heed
+heel
+heft
+hefty
+Hegelian
+hegemony
+Heidelberg
+heigh
+height
+.IND heighten
+Heine
+Heinrich
+Heinz
+heir
+heiress
+Heisenberg
+held
+Helen
+Helena
+Helene
+Helga
+helical
+helicopter
+heliocentric
+heliotrope
+helium
+helix
+he'll
+.IND hell
+hellbender
+hellebore
+Hellenic
+hellfire
+hellgrammite
+hellish
+.IND hello
+helm
+helmet
+.H 1 "Halverson ham Hamal Hamburg hamburger Hamilton hamlet Hamlin hammerhead"
+Helmholtz
+helmsman
+helmsmen
+Helmut
+help
+helpful
+helpmate
+Helsinki
+Helvetica
+hem
+hematite
+Hemingway
+hemisphere
+hemispheric
+hemlock
+hemoglobin
+hemolytic
+hemorrhage
+hemorrhoid
+hemosiderin
+hemp
+Hempstead
+hen
+.IND henbane
+hence
+henceforth
+henchman
+henchmen
+Henderson
+Hendrick
+Hendricks
+Hendrickson
+henequen
+Henley
+henpeck
+Henri
+Henrietta
+henry
+hepatica
+.IND hepatitis
+Hepburn
+heptane
+her
+Hera
+Heraclitus
+herald
+herb
+Herbert
+Herculean
+.IND Hercules
+herd
+herdsman
+here
+hereabout
+hereafter
+hereby
+hereditary
+heredity
+Hereford
+herein
+hereinabove
+hereinafter
+hereinbelow
+hereof
+heresy
+heretic
+hereto
+heretofore
+hereunder
+hereunto
+herewith
+heritable
+heritage
+Herkimer
+Herman
+.IND Hermann
+hermeneutic
+Hermes
+hermetic
+Hermite
+hermitian
+Hermosa
+Hernandez
+hero
+Herodotus
+heroes
+heroic
+heroin
+.IND heroine
+heroism
+heron
+herpes
+herpetology
+Herr
+herringbone
+Herschel
+herself
+Hershel
+Hershey
+hertz
+Hertzog
+.IND hesitant
+hesitate
+hesitater
+Hesperus
+Hess
+Hesse
+Hessian
+Hester
+heterocyclic
+heterodyne
+heterogamous
+heterogeneity
+heterogeneous
+heterosexual
+heterostructure
+heterozygous
+Hetman
+Hettie
+Hetty
+Heublein
+heuristic
+Heusen
+Heuser
+hew
+Hewett
+Hewitt
+.IND Hewlett
+hewn
+hex
+hexachloride
+hexadecimal
+hexafluoride
+hexagon
+hexagonal
+hexameter
+hexane
+.IND hey
+heyday
+hi
+Hiatt
+hiatus
+Hiawatha
+hibachi
+Hibbard
+hibernate
+Hibernia
+hick
+Hickey
+Hickman
+hickory
+Hicks
+hid
+.IND hidalgo
+hidden
+hide
+hideaway
+hideous
+hideout
+hierarchal
+hierarchic
+hierarchy
+hieratic
+hieroglyphic
+Hieronymus
+hifalutin
+Higgins
+high
+highball
+highboy
+highest
+highfalutin
+highhanded
+highland
+highlight
+highroad
+hightail
+highway
+highwayman
+.IND highwaymen
+hijack
+hijinks
+hike
+hilarious
+hilarity
+Hilbert
+.IND Hildebrand
+hill
+hillbilly
+Hillcrest
+Hillel
+hillman
+hillmen
+hillock
+hillside
+hilltop
+hilly
+hilt
+Hilton
+hilum
+him
+Himalaya
+himself
+hind
+hindmost
+.IND hindrance
+hindsight
+Hindu
+Hinduism
+Hines
+hinge
+Hinman
+hint
+hinterland
+hip
+hippo
+Hippocrates
+Hippocratic
+hippodrome
+hippopotamus
+hippy
+hipster
+Hiram
+hire
+hireling
+Hiroshi
+Hiroshima
+Hirsch
+hirsute
+his
+Hispanic
+.IND hiss
+histamine
+histidine
+histochemic
+.IND histochemistry
+histogram
+histology
+historian
+historic
+historiography
+history
+histrionic
+hit
+Hitachi
+hitch
+Hitchcock
+.H 1 "harbinger"
+hither
+hitherto
+Hitler
+hive
+ho
+hoagie
+Hoagland
+hoagy
+hoar
+hoard
+.IND hoarfrost
+hoarse
+hob
+Hobart
+Hobbes
+hobble
+Hobbs
+hobby
+hobbyhorse
+hobgoblin
+hobo
+Hoboken
+hoc
+hock
+hockey
+hocus
+hodge
+hodgepodge
+Hodges
+Hodgkin
+hoe
+Hoff
+Hoffman
+hog
+hogan
+hogging
+.IND hoi
+.IND Hokan
+Holbrook
+Holcomb
+hold
+holden
+holdout
+holdover
+holdup
+hole
+holeable
+holiday
+Holland
+Hollandaise
+holler
+Hollerith
+Hollingsworth
+Hollister
+hollow
+Holloway
+hollowware
+holly
+hollyhock
+Hollywood
+Holm
+Holman
+.IND Holmdel
+Holmes
+holmium
+holocaust
+Holocene
+hologram
+holography
+Holst
+Holstein
+holster
+holt
+Holyoke
+.IND holystone
+.INDP
+inject injudicious Injun injunct injunction injure injurious injury
+injustice ink inkling inlaid inland inlay inlet Inman inmate inn innards
+innate inner innermost innkeeper innocent innocuous innovate innuendo
+innumerable inoculate inoffensive inoperable inoperative inopportune
+inordinate inorganic input inputting inquest inquire inquiry inquisition
+inquisitive inquisitor inroad insane insatiable inscribe inscription
+inscrutable insect insecticide insecure inseminate insensible insensitive
+inseparable insert inset inshore inside insidious insight insightful
+insignia insignificant insincere insinuate insipid insist insistent
+insofar insolent insoluble insolvable insolvent insomnia insomniac
+insouciant inspect inspector inspiration inspire instable install
+installation instalment instance instant instantaneous instantiate
+.INITI H ind-data2
+.H 1 "halve"
+.IND granary
+grand
+grandchild
+grandchildren
+granddaughter
+grandeur
+grandfather
+grandiloquent
+grandiose
+grandma
+grandmother
+.IND grandnephew
+grandniece
+grandpa
+grandparent
+grandson
+grandstand
+granite
+granitic
+granny
+granola
+grant
+grantee
+grantor
+granular
+.IND granulate
+granule
+Granville
+grape
+.H 2 "grandfather grandiloquent grandiose grandma grandmother grandnephew"
+grapefruit
+grapevine
+graph
+grapheme
+graphic
+.H 1 "halo halocarbon halogen Halpern Halsey Halstead halt halvah"
+graphite
+grapple
+grasp
+grass
+grassland
+grassy
+grata
+grate
+grateful
+grater
+gratify
+gratis
+gratitude
+gratuitous
+gratuity
+.IND grave
+gravel
+graven
+Graves
+gravestone
+graveyard
+gravid
+gravitate
+gravy
+gray
+graybeard
+grayish
+Grayson
+graywacke
+graze
+grease
+greasy
+great
+greatcoat
+greater
+.H 1 "Han Hancock hand handbag handbook handclasp handcuff Handel handful"
+grebe
+Grecian
+Greece
+greed
+greedy
+.IND Greek
+green
+Greenbelt
+Greenberg
+.H 1 " granary grand grandchild grandchildren granddaughter grandeur"
+Greenblatt
+Greenbriar
+Greene
+greenery
+Greenfield
+greengrocer
+greenhouse
+greenish
+Greenland
+Greensboro
+greensward
+.H 1 "handgun"
+greenware
+Greenwich
+greenwood
+Greer
+greet
+Greg
+gregarious
+Gregg
+Gregory
+.IND gremlin
+grenade
+Grendel
+Grenoble
+Gresham
+Greta
+Gretchen
+grew
+grey
+greyhound
+greylag
+grid
+griddle
+gridiron
+grief
+grievance
+grieve
+grievous
+griffin
+Griffith
+grill
+grille
+grilled
+grillwork
+grim
+.IND grimace
+Grimaldi
+grime
+Grimes
+Grimm
+grin
+grind
+grindstone
+grip
+gripe
+grippe
+grisly
+grist
+gristmill
+Griswold
+grit
+gritty
+grizzle
+grizzly
+groan
+groat
+grocer
+grocery
+groggy
+.IND groin
+grommet
+groom
+groove
+grope
+grosbeak
+gross
+.H 1 "handicapped handicapper handicapping handicraft handicraftsman"
+Grosset
+Grossman
+Grosvenor
+grotesque
+Groton
+ground
+groundsel
+groundskeep
+groundwork
+group
+groupoid
+grout
+grove
+grovel
+Grover
+grow
+growl
+grown
+grownup
+.IND growth
+grub
+grubby
+grudge
+gruesome
+gruff
+grumble
+Grumman
+grunt
+gryphon
+g's
+GSA
+GU
+Guam
+guanidine
+guanine
+guano
+guarantee
+guaranteeing
+guarantor
+guaranty
+guard
+guardhouse
+.IND Guardia
+guardian
+Guatemala
+.IND gubernatorial
+Guelph
+Guenther
+guerdon
+guernsey
+guerrilla
+guess
+guesswork
+guest
+guffaw
+Guggenheim
+Guiana
+guidance
+guide
+guidebook
+guideline
+guidepost
+guiding
+guignol
+guild
+.H 1 "handicraftsmen handiwork handkerchief handle"
+guildhall
+guile
+Guilford
+guillemot
+guillotine
+guilt
+.IND guilty
+guinea
+guise
+guitar
+gules
+gulf
+.H 1 "handleable handlebar handline handmade handmaiden handout"
+gull
+Gullah
+gullet
+gullible
+gully
+gulp
+gum
+gumbo
+gumdrop
+gummy
+gumption
+gumshoe
+gun
+Gunderson
+.IND gunfight
+gunfire
+gunflint
+gunk
+gunky
+gunman
+.IND gunmen
+gunnery
+gunny
+gunplay
+gunpowder
+gunshot
+gunsling
+Gunther
+gurgle
+Gurkha
+guru
+Gus
+gush
+gusset
+gust
+Gustafson
+Gustav
+Gustave
+Gustavus
+gusto
+gusty
+gut
+.H 1 "handset"
+Gutenberg
+Guthrie
+gutsy
+guttural
+.IND guy
+Guyana
+guzzle
+Gwen
+Gwyn
+gym
+gymnasium
+gymnast
+gymnastic
+gymnosperm
+gyp
+gypsite
+gypsum
+gypsy
+gyrate
+gyrfalcon
+gyro
+.IND gyrocompass
+gyroscope
+h
+ha
+Haag
+Haas
+habeas
+haberdashery
+Haberman
+.IND Habib
+habit
+habitant
+habitat
+habitation
+habitual
+habituate
+hacienda
+hack
+hackberry
+Hackett
+hackle
+hackmatack
+.H 1 "handshake handsome handspike handstand handwaving handwrite handwritten"
+hackney
+hackneyed
+hacksaw
+had
+Hadamard
+Haddad
+haddock
+Hades
+Hadley
+hadn't
+Hadrian
+hadron
+hafnium
+.IND Hagen
+Hager
+haggard
+haggle
+Hagstrom
+Hague
+Hahn
+Haifa
+haiku
+hail
+hailstone
+hailstorm
+Haines
+hair
+.IND haircut
+hairdo
+hairpin
+hairy
+Haiti
+Haitian
+Hal
+halcyon
+hale
+Haley
+half
+halfback
+.IND halfhearted
+halfway
+halibut
+halide
+.H 1 "handy handyman handymen Haney Hanford hang hangable hangar"
+Halifax
+halite
+hall
+hallelujah
+Halley
+hallmark
+hallow
+Halloween
+hallucinate
+hallway
+halma
+halo
+halocarbon
+halogen
+Halpern
+Halsey
+Halstead
+halt
+halvah
+halve
+Halverson
+ham
+.IND Hamal
+Hamburg
+hamburger
+Hamilton
+hamlet
+Hamlin
+hammerhead
+hammock
+Hammond
+hamper
+Hampshire
+.IND Hampton
+hamster
+Han
+.H 1 "hangman hangmen hangout hangover hank Hankel Hanley"
+Hancock
+hand
+handbag
+handbook
+handclasp
+handcuff
+Handel
+handful
+handgun
+handhold
+handicap
+handicapped
+.IND handicapper
+handicapping
+handicraft
+handicraftsman
+handicraftsmen
+handiwork
+handkerchief
+handle
+handleable
+handlebar
+handline
+handmade
+handmaiden
+handout
+handset
+handshake
+handsome
+handspike
+handstand
+handwaving
+.H 1 "Hanlon Hanna Hannah Hannibal Hanoi Hanover Hanoverian Hans"
+handwrite
+handwritten
+handy
+handyman
+handymen
+Haney
+.IND Hanford
+hang
+hangable
+hangar
+hangman
+hangmen
+hangout
+hangover
+.IND hank
+Hankel
+Hanley
+Hanlon
+Hanna
+Hannah
+Hannibal
+Hanoi
+Hanover
+Hanoverian
+Hans
+Hansel
+Hansen
+hansom
+Hanson
+Hanukkah
+hap
+.H 1 "Hansel"
+haphazard
+.IND haploid
+haploidy
+haplology
+happen
+happenstance
+happy
+Hapsburg
+harangue
+harass
+Harbin
+harbinger
+Harcourt
+hard
+hardbake
+hardboard
+hardboiled
+hardcopy
+harden
+hardhat
+Hardin
+.H 1 "Hansen hansom Hanson Hanukkah hap haphazard haploid haploidy"
+Harding
+hardscrabble
+hardtack
+hardtop
+hardware
+hardwood
+.IND hardworking
+hardy
+hare
+harelip
+harem
+.IND hark
+Harlan
+Harlem
+Harley
+harm
+harmful
+Harmon
+harmonic
+harmonica
+harmonious
+.H 1 "haplology happen happenstance happy Hapsburg harangue harass Harbin"
+harmony
+harness
+Harold
+harp
+harpoon
+harpsichord
+Harpy
+Harriet
+Harriman
+Harrington
+Harris
+.IND Harrisburg
+Harrison
+harrow
+harry
+harsh
+harshen
+hart
+Hartford
+Hartley
+Hartman
+Harvard
+harvest
+harvestman
+Harvey
+hash
+hashish
+hasn't
+hasp
+hassle
+hast
+haste
+hasten
+Hastings
+hasty
+hat
+hatch
+.IND hatchet
+hatchway
+.IND hate
+hateful
+hater
+Hatfield
+hath
+Hathaway
+hatred
+Hatteras
+Hattie
+Hattiesburg
+Haugen
+haughty
+haul
+haulage
+haunch
+haunt
+Hausdorff
+Havana
+have
+haven
+haven't
+Havilland
+havoc
+haw
+.IND Hawaii
+Hawaiian
+hawk
+Hawkins
+Hawley
+hawthorn
+.H 2 "hammock Hammond hamper Hampshire Hampton hamster"
+Hawthorne
+hay
+Hayden
+Haydn
+Hayes
+hayfield
+Haynes
+Hays
+haystack
+Hayward
+hayward
+hazard
+hazardous
+haze
+hazel
+hazelnut
+hazy
+he
+head
+.IND headache
+.IND headboard
+headdress
+headland
+headlight
+headline
+headmaster
+headphone
+headquarter
+headquarters
+headroom
+headset
+headsman
+headsmen
+headstand
+headstone
+headstrong
+headwall
+headwater
+headway
+headwind
+heady
+heal
+Healey
+health
+healthful
+healthy
+.IND Healy
+heap
+hear
+heard
+hearken
+hearsay
+hearse
+Hearst
+heart
+heartbeat
+heartbreak
+hearten
+heartfelt
+hearth
+hearty
+heat
+heater
+heath
+heathen
+heathenish
+Heathkit
+heave
+.IND heaven
+heavenward
+heavy
+heavyweight
+.IND Hebe
+hebephrenic
+Hebraic
+Hebrew
+Hecate
+hecatomb
+heck
+heckle
+Heckman
+hectic
+hector
+Hecuba
+he'd
+hedge
+hedgehog
+hedonism
+hedonist
+heed
+heel
+heft
+hefty
+Hegelian
+hegemony
+Heidelberg
+heigh
+height
+.IND heighten
+Heine
+Heinrich
+Heinz
+heir
+heiress
+Heisenberg
+held
+Helen
+Helena
+Helene
+Helga
+helical
+helicopter
+heliocentric
+heliotrope
+helium
+helix
+he'll
+.IND hell
+hellbender
+hellebore
+Hellenic
+hellfire
+hellgrammite
+hellish
+.IND hello
+helm
+helmet
+.H 1 "Halverson ham Hamal Hamburg hamburger Hamilton hamlet Hamlin hammerhead"
+Helmholtz
+helmsman
+helmsmen
+Helmut
+help
+helpful
+helpmate
+Helsinki
+Helvetica
+hem
+hematite
+Hemingway
+hemisphere
+hemispheric
+hemlock
+hemoglobin
+hemolytic
+hemorrhage
+hemorrhoid
+hemosiderin
+hemp
+Hempstead
+hen
+.IND henbane
+hence
+henceforth
+henchman
+henchmen
+Henderson
+Hendrick
+Hendricks
+Hendrickson
+henequen
+Henley
+henpeck
+Henri
+Henrietta
+henry
+hepatica
+.IND hepatitis
+Hepburn
+heptane
+her
+Hera
+Heraclitus
+herald
+herb
+Herbert
+Herculean
+.IND Hercules
+herd
+herdsman
+here
+hereabout
+hereafter
+hereby
+hereditary
+heredity
+Hereford
+herein
+hereinabove
+hereinafter
+hereinbelow
+hereof
+heresy
+heretic
+hereto
+heretofore
+hereunder
+hereunto
+herewith
+heritable
+heritage
+Herkimer
+Herman
+.IND Hermann
+hermeneutic
+Hermes
+hermetic
+Hermite
+hermitian
+Hermosa
+Hernandez
+hero
+Herodotus
+heroes
+heroic
+heroin
+.IND heroine
+heroism
+heron
+herpes
+herpetology
+Herr
+herringbone
+Herschel
+herself
+Hershel
+Hershey
+hertz
+Hertzog
+.IND hesitant
+hesitate
+hesitater
+Hesperus
+Hess
+Hesse
+Hessian
+Hester
+heterocyclic
+heterodyne
+heterogamous
+heterogeneity
+heterogeneous
+heterosexual
+heterostructure
+heterozygous
+Hetman
+Hettie
+Hetty
+Heublein
+heuristic
+Heusen
+Heuser
+hew
+Hewett
+Hewitt
+.IND Hewlett
+hewn
+hex
+hexachloride
+hexadecimal
+hexafluoride
+hexagon
+hexagonal
+hexameter
+hexane
+.IND hey
+heyday
+hi
+Hiatt
+hiatus
+Hiawatha
+hibachi
+Hibbard
+hibernate
+Hibernia
+hick
+Hickey
+Hickman
+hickory
+Hicks
+hid
+.IND hidalgo
+hidden
+hide
+hideaway
+hideous
+hideout
+hierarchal
+hierarchic
+hierarchy
+hieratic
+hieroglyphic
+Hieronymus
+hifalutin
+Higgins
+high
+highball
+highboy
+highest
+highfalutin
+highhanded
+highland
+highlight
+highroad
+hightail
+highway
+highwayman
+.IND highwaymen
+hijack
+hijinks
+hike
+hilarious
+hilarity
+Hilbert
+.IND Hildebrand
+hill
+hillbilly
+Hillcrest
+Hillel
+hillman
+hillmen
+hillock
+hillside
+hilltop
+hilly
+hilt
+Hilton
+hilum
+him
+Himalaya
+himself
+hind
+hindmost
+.IND hindrance
+hindsight
+Hindu
+Hinduism
+Hines
+hinge
+Hinman
+hint
+hinterland
+hip
+hippo
+Hippocrates
+Hippocratic
+hippodrome
+hippopotamus
+hippy
+hipster
+Hiram
+hire
+hireling
+Hiroshi
+Hiroshima
+Hirsch
+hirsute
+his
+Hispanic
+.IND hiss
+histamine
+histidine
+histochemic
+.IND histochemistry
+histogram
+histology
+historian
+historic
+historiography
+history
+histrionic
+hit
+Hitachi
+hitch
+Hitchcock
+.H 1 "harbinger"
+hither
+hitherto
+Hitler
+hive
+ho
+hoagie
+Hoagland
+hoagy
+hoar
+hoard
+.IND hoarfrost
+hoarse
+hob
+Hobart
+Hobbes
+hobble
+Hobbs
+hobby
+hobbyhorse
+hobgoblin
+hobo
+Hoboken
+hoc
+hock
+hockey
+hocus
+hodge
+hodgepodge
+Hodges
+Hodgkin
+hoe
+Hoff
+Hoffman
+hog
+hogan
+hogging
+.IND hoi
+.IND Hokan
+Holbrook
+Holcomb
+hold
+holden
+holdout
+holdover
+holdup
+hole
+holeable
+holiday
+Holland
+Hollandaise
+holler
+Hollerith
+Hollingsworth
+Hollister
+hollow
+Holloway
+hollowware
+holly
+hollyhock
+Hollywood
+Holm
+Holman
+.IND Holmdel
+Holmes
+holmium
+holocaust
+Holocene
+hologram
+holography
+Holst
+Holstein
+holster
+holt
+Holyoke
+.IND holystone
+.INDP
+inject injudicious Injun injunct injunction injure injurious injury
+injustice ink inkling inlaid inland inlay inlet Inman inmate inn innards
+innate inner innermost innkeeper innocent innocuous innovate innuendo
+innumerable inoculate inoffensive inoperable inoperative inopportune
+inordinate inorganic input inputting inquest inquire inquiry inquisition
+.INITI B ind-data3
+.H 1 "halve"
+.IND granary
+grand
+grandchild
+grandchildren
+granddaughter
+grandeur
+grandfather
+grandiloquent
+grandiose
+grandma
+grandmother
+.IND grandnephew
+grandniece
+grandpa
+grandparent
+grandson
+grandstand
+granite
+granitic
+granny
+granola
+grant
+grantee
+grantor
+granular
+.IND granulate
+granule
+Granville
+grape
+.H 2 "grandfather grandiloquent grandiose grandma grandmother grandnephew"
+grapefruit
+grapevine
+graph
+grapheme
+graphic
+.H 1 "halo halocarbon halogen Halpern Halsey Halstead halt halvah"
+graphite
+grapple
+grasp
+grass
+grassland
+grassy
+grata
+grate
+grateful
+grater
+gratify
+gratis
+gratitude
+gratuitous
+gratuity
+.IND grave
+gravel
+graven
+Graves
+gravestone
+graveyard
+gravid
+gravitate
+gravy
+gray
+graybeard
+grayish
+Grayson
+graywacke
+graze
+grease
+greasy
+great
+greatcoat
+greater
+.H 1 "Han Hancock hand handbag handbook handclasp handcuff Handel handful"
+grebe
+Grecian
+Greece
+greed
+greedy
+.IND Greek
+green
+Greenbelt
+Greenberg
+.H 1 " granary grand grandchild grandchildren granddaughter grandeur"
+Greenblatt
+Greenbriar
+Greene
+greenery
+Greenfield
+greengrocer
+greenhouse
+greenish
+Greenland
+Greensboro
+greensward
+.H 1 "handgun"
+greenware
+Greenwich
+greenwood
+Greer
+greet
+Greg
+gregarious
+Gregg
+Gregory
+.IND gremlin
+grenade
+Grendel
+Grenoble
+Gresham
+Greta
+Gretchen
+grew
+grey
+greyhound
+greylag
+grid
+griddle
+gridiron
+grief
+grievance
+grieve
+grievous
+griffin
+Griffith
+grill
+grille
+grilled
+grillwork
+grim
+.IND grimace
+Grimaldi
+grime
+Grimes
+Grimm
+grin
+grind
+grindstone
+grip
+gripe
+grippe
+grisly
+grist
+gristmill
+Griswold
+grit
+gritty
+grizzle
+grizzly
+groan
+groat
+grocer
+grocery
+groggy
+.IND groin
+grommet
+groom
+groove
+grope
+grosbeak
+gross
+.H 1 "handicapped handicapper handicapping handicraft handicraftsman"
+Grosset
+Grossman
+Grosvenor
+grotesque
+Groton
+ground
+groundsel
+groundskeep
+groundwork
+group
+groupoid
+grout
+grove
+grovel
+Grover
+grow
+growl
+grown
+grownup
+.IND growth
+grub
+grubby
+grudge
+gruesome
+gruff
+grumble
+Grumman
+grunt
+gryphon
+g's
+GSA
+GU
+Guam
+guanidine
+guanine
+guano
+guarantee
+guaranteeing
+guarantor
+guaranty
+guard
+guardhouse
+.IND Guardia
+guardian
+Guatemala
+.IND gubernatorial
+Guelph
+Guenther
+guerdon
+guernsey
+guerrilla
+guess
+guesswork
+guest
+guffaw
+Guggenheim
+Guiana
+guidance
+guide
+guidebook
+guideline
+guidepost
+guiding
+guignol
+guild
+.H 1 "handicraftsmen handiwork handkerchief handle"
+guildhall
+guile
+Guilford
+guillemot
+guillotine
+guilt
+.IND guilty
+guinea
+guise
+guitar
+gules
+gulf
+.H 1 "handleable handlebar handline handmade handmaiden handout"
+gull
+Gullah
+gullet
+gullible
+gully
+gulp
+gum
+gumbo
+gumdrop
+gummy
+gumption
+gumshoe
+gun
+Gunderson
+.IND gunfight
+gunfire
+gunflint
+gunk
+gunky
+gunman
+.IND gunmen
+gunnery
+gunny
+gunplay
+gunpowder
+gunshot
+gunsling
+Gunther
+gurgle
+Gurkha
+guru
+Gus
+gush
+gusset
+gust
+Gustafson
+Gustav
+Gustave
+Gustavus
+gusto
+gusty
+gut
+.H 1 "handset"
+Gutenberg
+Guthrie
+gutsy
+guttural
+.IND guy
+Guyana
+guzzle
+Gwen
+Gwyn
+gym
+gymnasium
+gymnast
+gymnastic
+gymnosperm
+gyp
+gypsite
+gypsum
+gypsy
+gyrate
+gyrfalcon
+gyro
+.IND gyrocompass
+gyroscope
+h
+ha
+Haag
+Haas
+habeas
+haberdashery
+Haberman
+.IND Habib
+habit
+habitant
+habitat
+habitation
+habitual
+habituate
+hacienda
+hack
+hackberry
+Hackett
+hackle
+hackmatack
+.H 1 "handshake handsome handspike handstand handwaving handwrite handwritten"
+hackney
+hackneyed
+hacksaw
+had
+Hadamard
+Haddad
+haddock
+Hades
+Hadley
+hadn't
+Hadrian
+hadron
+hafnium
+.IND Hagen
+Hager
+haggard
+haggle
+Hagstrom
+Hague
+Hahn
+Haifa
+haiku
+hail
+hailstone
+hailstorm
+Haines
+hair
+.IND haircut
+hairdo
+hairpin
+hairy
+Haiti
+Haitian
+Hal
+halcyon
+hale
+Haley
+half
+halfback
+.IND halfhearted
+halfway
+halibut
+halide
+.H 1 "handy handyman handymen Haney Hanford hang hangable hangar"
+Halifax
+halite
+hall
+hallelujah
+Halley
+hallmark
+hallow
+Halloween
+hallucinate
+hallway
+halma
+halo
+halocarbon
+halogen
+Halpern
+Halsey
+Halstead
+halt
+halvah
+halve
+Halverson
+ham
+.IND Hamal
+Hamburg
+hamburger
+Hamilton
+hamlet
+Hamlin
+hammerhead
+hammock
+Hammond
+hamper
+Hampshire
+.IND Hampton
+hamster
+Han
+.H 1 "hangman hangmen hangout hangover hank Hankel Hanley"
+Hancock
+hand
+handbag
+handbook
+handclasp
+handcuff
+Handel
+handful
+handgun
+handhold
+handicap
+handicapped
+.IND handicapper
+handicapping
+handicraft
+handicraftsman
+handicraftsmen
+handiwork
+handkerchief
+handle
+handleable
+handlebar
+handline
+handmade
+handmaiden
+handout
+handset
+handshake
+handsome
+handspike
+handstand
+handwaving
+.H 1 "Hanlon Hanna Hannah Hannibal Hanoi Hanover Hanoverian Hans"
+handwrite
+handwritten
+handy
+handyman
+handymen
+Haney
+.IND Hanford
+hang
+hangable
+hangar
+hangman
+hangmen
+hangout
+hangover
+.IND hank
+Hankel
+Hanley
+Hanlon
+Hanna
+Hannah
+Hannibal
+Hanoi
+Hanover
+Hanoverian
+Hans
+Hansel
+Hansen
+hansom
+Hanson
+Hanukkah
+hap
+.H 1 "Hansel"
+haphazard
+.IND haploid
+haploidy
+haplology
+happen
+happenstance
+happy
+Hapsburg
+harangue
+harass
+Harbin
+harbinger
+Harcourt
+hard
+hardbake
+hardboard
+hardboiled
+hardcopy
+harden
+hardhat
+Hardin
+.H 1 "Hansen hansom Hanson Hanukkah hap haphazard haploid haploidy"
+Harding
+hardscrabble
+hardtack
+hardtop
+hardware
+hardwood
+.IND hardworking
+hardy
+hare
+harelip
+harem
+.IND hark
+Harlan
+Harlem
+Harley
+harm
+harmful
+Harmon
+harmonic
+harmonica
+harmonious
+.H 1 "haplology happen happenstance happy Hapsburg harangue harass Harbin"
+harmony
+harness
+Harold
+harp
+harpoon
+harpsichord
+Harpy
+Harriet
+Harriman
+Harrington
+Harris
+.IND Harrisburg
+Harrison
+harrow
+harry
+harsh
+harshen
+hart
+Hartford
+Hartley
+Hartman
+Harvard
+harvest
+harvestman
+Harvey
+hash
+hashish
+hasn't
+hasp
+hassle
+hast
+haste
+hasten
+Hastings
+hasty
+hat
+hatch
+.IND hatchet
+hatchway
+.IND hate
+hateful
+hater
+Hatfield
+hath
+Hathaway
+hatred
+Hatteras
+Hattie
+Hattiesburg
+Haugen
+haughty
+haul
+haulage
+haunch
+haunt
+Hausdorff
+Havana
+have
+haven
+haven't
+Havilland
+havoc
+haw
+.IND Hawaii
+Hawaiian
+hawk
+Hawkins
+Hawley
+hawthorn
+.H 2 "hammock Hammond hamper Hampshire Hampton hamster"
+Hawthorne
+hay
+Hayden
+Haydn
+Hayes
+hayfield
+Haynes
+Hays
+haystack
+Hayward
+hayward
+hazard
+hazardous
+haze
+hazel
+hazelnut
+hazy
+he
+head
+.IND headache
+.IND headboard
+headdress
+headland
+headlight
+headline
+headmaster
+headphone
+headquarter
+headquarters
+headroom
+headset
+headsman
+headsmen
+headstand
+headstone
+headstrong
+headwall
+headwater
+headway
+headwind
+heady
+heal
+Healey
+health
+healthful
+healthy
+.IND Healy
+heap
+hear
+heard
+hearken
+hearsay
+hearse
+Hearst
+heart
+heartbeat
+heartbreak
+hearten
+heartfelt
+hearth
+hearty
+heat
+heater
+heath
+heathen
+heathenish
+Heathkit
+heave
+.IND heaven
+heavenward
+heavy
+heavyweight
+.IND Hebe
+hebephrenic
+Hebraic
+Hebrew
+Hecate
+hecatomb
+heck
+heckle
+Heckman
+hectic
+hector
+Hecuba
+he'd
+hedge
+hedgehog
+hedonism
+hedonist
+heed
+heel
+heft
+hefty
+Hegelian
+hegemony
+Heidelberg
+heigh
+height
+.IND heighten
+Heine
+Heinrich
+Heinz
+heir
+heiress
+Heisenberg
+held
+Helen
+Helena
+Helene
+Helga
+helical
+helicopter
+heliocentric
+heliotrope
+helium
+helix
+he'll
+.IND hell
+hellbender
+hellebore
+Hellenic
+hellfire
+hellgrammite
+hellish
+.IND hello
+helm
+helmet
+.H 1 "Halverson ham Hamal Hamburg hamburger Hamilton hamlet Hamlin hammerhead"
+Helmholtz
+helmsman
+helmsmen
+Helmut
+help
+helpful
+helpmate
+Helsinki
+Helvetica
+hem
+hematite
+Hemingway
+hemisphere
+hemispheric
+hemlock
+hemoglobin
+hemolytic
+hemorrhage
+hemorrhoid
+hemosiderin
+hemp
+Hempstead
+hen
+.IND henbane
+hence
+henceforth
+henchman
+henchmen
+Henderson
+Hendrick
+Hendricks
+Hendrickson
+henequen
+Henley
+henpeck
+Henri
+Henrietta
+henry
+hepatica
+.IND hepatitis
+Hepburn
+heptane
+her
+Hera
+Heraclitus
+herald
+herb
+Herbert
+Herculean
+.IND Hercules
+herd
+herdsman
+here
+hereabout
+hereafter
+hereby
+hereditary
+heredity
+Hereford
+herein
+hereinabove
+hereinafter
+hereinbelow
+hereof
+heresy
+heretic
+hereto
+heretofore
+hereunder
+hereunto
+herewith
+heritable
+heritage
+Herkimer
+Herman
+.IND Hermann
+hermeneutic
+Hermes
+hermetic
+Hermite
+hermitian
+Hermosa
+Hernandez
+hero
+Herodotus
+heroes
+heroic
+heroin
+.IND heroine
+heroism
+heron
+herpes
+herpetology
+Herr
+herringbone
+Herschel
+herself
+Hershel
+Hershey
+hertz
+Hertzog
+.IND hesitant
+hesitate
+hesitater
+Hesperus
+Hess
+Hesse
+Hessian
+Hester
+heterocyclic
+heterodyne
+heterogamous
+heterogeneity
+heterogeneous
+heterosexual
+heterostructure
+heterozygous
+Hetman
+Hettie
+Hetty
+Heublein
+heuristic
+Heusen
+Heuser
+hew
+Hewett
+Hewitt
+.IND Hewlett
+hewn
+hex
+hexachloride
+hexadecimal
+hexafluoride
+hexagon
+hexagonal
+hexameter
+hexane
+.IND hey
+heyday
+hi
+Hiatt
+hiatus
+Hiawatha
+hibachi
+Hibbard
+hibernate
+Hibernia
+hick
+Hickey
+Hickman
+hickory
+Hicks
+hid
+.IND hidalgo
+hidden
+hide
+hideaway
+hideous
+hideout
+hierarchal
+hierarchic
+hierarchy
+hieratic
+hieroglyphic
+Hieronymus
+hifalutin
+Higgins
+high
+highball
+highboy
+highest
+highfalutin
+highhanded
+highland
+highlight
+highroad
+hightail
+highway
+highwayman
+.IND highwaymen
+hijack
+hijinks
+hike
+hilarious
+hilarity
+Hilbert
+.IND Hildebrand
+hill
+hillbilly
+Hillcrest
+Hillel
+hillman
+hillmen
+hillock
+hillside
+hilltop
+hilly
+hilt
+Hilton
+hilum
+him
+Himalaya
+himself
+hind
+hindmost
+.IND hindrance
+hindsight
+Hindu
+Hinduism
+Hines
+hinge
+Hinman
+hint
+hinterland
+hip
+hippo
+Hippocrates
+Hippocratic
+hippodrome
+hippopotamus
+hippy
+hipster
+Hiram
+hire
+hireling
+Hiroshi
+Hiroshima
+Hirsch
+hirsute
+his
+Hispanic
+.IND hiss
+histamine
+histidine
+histochemic
+.IND histochemistry
+histogram
+histology
+historian
+historic
+historiography
+history
+histrionic
+hit
+Hitachi
+hitch
+Hitchcock
+.H 1 "harbinger"
+hither
+hitherto
+Hitler
+hive
+ho
+hoagie
+Hoagland
+hoagy
+hoar
+hoard
+.IND hoarfrost
+hoarse
+hob
+Hobart
+Hobbes
+hobble
+Hobbs
+hobby
+hobbyhorse
+hobgoblin
+hobo
+Hoboken
+hoc
+hock
+hockey
+hocus
+hodge
+hodgepodge
+Hodges
+Hodgkin
+hoe
+Hoff
+Hoffman
+hog
+hogan
+hogging
+.IND hoi
+.IND Hokan
+Holbrook
+Holcomb
+hold
+holden
+holdout
+holdover
+holdup
+hole
+holeable
+holiday
+Holland
+Hollandaise
+holler
+Hollerith
+Hollingsworth
+Hollister
+hollow
+Holloway
+hollowware
+holly
+hollyhock
+Hollywood
+Holm
+Holman
+.IND Holmdel
+Holmes
+holmium
+holocaust
+Holocene
+hologram
+holography
+Holst
+Holstein
+holster
+holt
+Holyoke
+.IND holystone
+.INDP
+inject injudicious Injun injunct injunction injure injurious injury
+injustice ink inkling inlaid inland inlay inlet Inman inmate inn innards
+innate inner innermost innkeeper innocent innocuous innovate innuendo
+innumerable inoculate inoffensive inoperable inoperative inopportune
+inordinate inorganic input inputting inquest inquire inquiry inquisition
+.INITI B ind-data4 foo
+.H 1 "halve"
+.IND granary
+grand
+grandchild
+grandchildren
+granddaughter
+grandeur
+grandfather
+grandiloquent
+grandiose
+grandma
+grandmother
+.IND grandnephew
+grandniece
+grandpa
+grandparent
+grandson
+grandstand
+granite
+granitic
+granny
+granola
+grant
+grantee
+grantor
+granular
+.IND granulate
+granule
+Granville
+grape
+.H 2 "grandfather grandiloquent grandiose grandma grandmother grandnephew"
+grapefruit
+grapevine
+graph
+grapheme
+graphic
+.H 1 "halo halocarbon halogen Halpern Halsey Halstead halt halvah"
+graphite
+grapple
+grasp
+grass
+grassland
+grassy
+grata
+grate
+grateful
+grater
+gratify
+gratis
+gratitude
+gratuitous
+gratuity
+.IND grave
+gravel
+graven
+Graves
+gravestone
+graveyard
+gravid
+gravitate
+gravy
+gray
+graybeard
+grayish
+Grayson
+graywacke
+graze
+grease
+greasy
+great
+greatcoat
+greater
+.H 1 "Han Hancock hand handbag handbook handclasp handcuff Handel handful"
+grebe
+Grecian
+Greece
+greed
+greedy
+.IND Greek
+green
+Greenbelt
+Greenberg
+.H 1 " granary grand grandchild grandchildren granddaughter grandeur"
+Greenblatt
+Greenbriar
+Greene
+greenery
+Greenfield
+greengrocer
+greenhouse
+greenish
+Greenland
+Greensboro
+greensward
+.H 1 "handgun"
+greenware
+Greenwich
+greenwood
+Greer
+greet
+Greg
+gregarious
+Gregg
+Gregory
+.IND gremlin
+grenade
+Grendel
+Grenoble
+Gresham
+Greta
+Gretchen
+grew
+grey
+greyhound
+greylag
+grid
+griddle
+gridiron
+grief
+grievance
+grieve
+grievous
+griffin
+Griffith
+grill
+grille
+grilled
+grillwork
+grim
+.IND grimace
+Grimaldi
+grime
+Grimes
+Grimm
+grin
+grind
+grindstone
+grip
+gripe
+grippe
+grisly
+grist
+gristmill
+Griswold
+grit
+gritty
+grizzle
+grizzly
+groan
+groat
+grocer
+grocery
+groggy
+.IND groin
+grommet
+groom
+groove
+grope
+grosbeak
+gross
+.H 1 "handicapped handicapper handicapping handicraft handicraftsman"
+Grosset
+Grossman
+Grosvenor
+grotesque
+Groton
+ground
+groundsel
+groundskeep
+groundwork
+group
+groupoid
+grout
+grove
+grovel
+Grover
+grow
+growl
+grown
+grownup
+.IND growth
+grub
+grubby
+grudge
+gruesome
+gruff
+grumble
+Grumman
+grunt
+gryphon
+g's
+GSA
+GU
+Guam
+guanidine
+guanine
+guano
+guarantee
+guaranteeing
+guarantor
+guaranty
+guard
+guardhouse
+.IND Guardia
+guardian
+Guatemala
+.IND gubernatorial
+Guelph
+Guenther
+guerdon
+guernsey
+guerrilla
+guess
+guesswork
+guest
+guffaw
+Guggenheim
+Guiana
+guidance
+guide
+guidebook
+guideline
+guidepost
+guiding
+guignol
+guild
+.H 1 "handicraftsmen handiwork handkerchief handle"
+guildhall
+guile
+Guilford
+guillemot
+guillotine
+guilt
+.IND guilty
+guinea
+guise
+guitar
+gules
+gulf
+.H 1 "handleable handlebar handline handmade handmaiden handout"
+gull
+Gullah
+gullet
+gullible
+gully
+gulp
+gum
+gumbo
+gumdrop
+gummy
+gumption
+gumshoe
+gun
+Gunderson
+.IND gunfight
+gunfire
+gunflint
+gunk
+gunky
+gunman
+.IND gunmen
+gunnery
+gunny
+gunplay
+gunpowder
+gunshot
+gunsling
+Gunther
+gurgle
+Gurkha
+guru
+Gus
+gush
+gusset
+gust
+Gustafson
+Gustav
+Gustave
+Gustavus
+gusto
+gusty
+gut
+.H 1 "handset"
+Gutenberg
+Guthrie
+gutsy
+guttural
+.IND guy
+Guyana
+guzzle
+Gwen
+Gwyn
+gym
+gymnasium
+gymnast
+gymnastic
+gymnosperm
+gyp
+gypsite
+gypsum
+gypsy
+gyrate
+gyrfalcon
+gyro
+.IND gyrocompass
+gyroscope
+h
+ha
+Haag
+Haas
+habeas
+haberdashery
+Haberman
+.IND Habib
+habit
+habitant
+habitat
+habitation
+habitual
+habituate
+hacienda
+hack
+hackberry
+Hackett
+hackle
+hackmatack
+.H 1 "handshake handsome handspike handstand handwaving handwrite handwritten"
+hackney
+hackneyed
+hacksaw
+had
+Hadamard
+Haddad
+haddock
+Hades
+Hadley
+hadn't
+Hadrian
+hadron
+hafnium
+.IND Hagen
+Hager
+haggard
+haggle
+Hagstrom
+Hague
+Hahn
+Haifa
+haiku
+hail
+hailstone
+hailstorm
+Haines
+hair
+.IND haircut
+hairdo
+hairpin
+hairy
+Haiti
+Haitian
+Hal
+halcyon
+hale
+Haley
+half
+halfback
+.IND halfhearted
+halfway
+halibut
+halide
+.H 1 "handy handyman handymen Haney Hanford hang hangable hangar"
+Halifax
+halite
+hall
+hallelujah
+Halley
+hallmark
+hallow
+Halloween
+hallucinate
+hallway
+halma
+halo
+halocarbon
+halogen
+Halpern
+Halsey
+Halstead
+halt
+halvah
+halve
+Halverson
+ham
+.IND Hamal
+Hamburg
+hamburger
+Hamilton
+hamlet
+Hamlin
+hammerhead
+hammock
+Hammond
+hamper
+Hampshire
+.IND Hampton
+hamster
+Han
+.H 1 "hangman hangmen hangout hangover hank Hankel Hanley"
+Hancock
+hand
+handbag
+handbook
+handclasp
+handcuff
+Handel
+handful
+handgun
+handhold
+handicap
+handicapped
+.IND handicapper
+handicapping
+handicraft
+handicraftsman
+handicraftsmen
+handiwork
+handkerchief
+handle
+handleable
+handlebar
+handline
+handmade
+handmaiden
+handout
+handset
+handshake
+handsome
+handspike
+handstand
+handwaving
+.H 1 "Hanlon Hanna Hannah Hannibal Hanoi Hanover Hanoverian Hans"
+handwrite
+handwritten
+handy
+handyman
+handymen
+Haney
+.IND Hanford
+hang
+hangable
+hangar
+hangman
+hangmen
+hangout
+hangover
+.IND hank
+Hankel
+Hanley
+Hanlon
+Hanna
+Hannah
+Hannibal
+Hanoi
+Hanover
+Hanoverian
+Hans
+Hansel
+Hansen
+hansom
+Hanson
+Hanukkah
+hap
+.H 1 "Hansel"
+haphazard
+.IND haploid
+haploidy
+haplology
+happen
+happenstance
+happy
+Hapsburg
+harangue
+harass
+Harbin
+harbinger
+Harcourt
+hard
+hardbake
+hardboard
+hardboiled
+hardcopy
+harden
+hardhat
+Hardin
+.H 1 "Hansen hansom Hanson Hanukkah hap haphazard haploid haploidy"
+Harding
+hardscrabble
+hardtack
+hardtop
+hardware
+hardwood
+.IND hardworking
+hardy
+hare
+harelip
+harem
+.IND hark
+Harlan
+Harlem
+Harley
+harm
+harmful
+Harmon
+harmonic
+harmonica
+harmonious
+.H 1 "haplology happen happenstance happy Hapsburg harangue harass Harbin"
+harmony
+harness
+Harold
+harp
+harpoon
+harpsichord
+Harpy
+Harriet
+Harriman
+Harrington
+Harris
+.IND Harrisburg
+Harrison
+harrow
+harry
+harsh
+harshen
+hart
+Hartford
+Hartley
+Hartman
+Harvard
+harvest
+harvestman
+Harvey
+hash
+hashish
+hasn't
+hasp
+hassle
+hast
+haste
+hasten
+Hastings
+hasty
+hat
+hatch
+.IND hatchet
+hatchway
+.IND hate
+hateful
+hater
+Hatfield
+hath
+Hathaway
+hatred
+Hatteras
+Hattie
+Hattiesburg
+Haugen
+haughty
+haul
+haulage
+haunch
+haunt
+Hausdorff
+Havana
+have
+haven
+haven't
+Havilland
+havoc
+haw
+.IND Hawaii
+Hawaiian
+hawk
+Hawkins
+Hawley
+hawthorn
+.H 2 "hammock Hammond hamper Hampshire Hampton hamster"
+Hawthorne
+hay
+Hayden
+Haydn
+Hayes
+hayfield
+Haynes
+Hays
+haystack
+Hayward
+hayward
+hazard
+hazardous
+haze
+hazel
+hazelnut
+hazy
+he
+head
+.IND headache
+.IND headboard
+headdress
+headland
+headlight
+headline
+headmaster
+headphone
+headquarter
+headquarters
+headroom
+headset
+headsman
+headsmen
+headstand
+headstone
+headstrong
+headwall
+headwater
+headway
+headwind
+heady
+heal
+Healey
+health
+healthful
+healthy
+.IND Healy
+heap
+hear
+heard
+hearken
+hearsay
+hearse
+Hearst
+heart
+heartbeat
+heartbreak
+hearten
+heartfelt
+hearth
+hearty
+heat
+heater
+heath
+heathen
+heathenish
+Heathkit
+heave
+.IND heaven
+heavenward
+heavy
+heavyweight
+.IND Hebe
+hebephrenic
+Hebraic
+Hebrew
+Hecate
+hecatomb
+heck
+heckle
+Heckman
+hectic
+hector
+Hecuba
+he'd
+hedge
+hedgehog
+hedonism
+hedonist
+heed
+heel
+heft
+hefty
+Hegelian
+hegemony
+Heidelberg
+heigh
+height
+.IND heighten
+Heine
+Heinrich
+Heinz
+heir
+heiress
+Heisenberg
+held
+Helen
+Helena
+Helene
+Helga
+helical
+helicopter
+heliocentric
+heliotrope
+helium
+helix
+he'll
+.IND hell
+hellbender
+hellebore
+Hellenic
+hellfire
+hellgrammite
+hellish
+.IND hello
+helm
+helmet
+.H 1 "Halverson ham Hamal Hamburg hamburger Hamilton hamlet Hamlin hammerhead"
+Helmholtz
+helmsman
+helmsmen
+Helmut
+help
+helpful
+helpmate
+Helsinki
+Helvetica
+hem
+hematite
+Hemingway
+hemisphere
+hemispheric
+hemlock
+hemoglobin
+hemolytic
+hemorrhage
+hemorrhoid
+hemosiderin
+hemp
+Hempstead
+hen
+.IND henbane
+hence
+henceforth
+henchman
+henchmen
+Henderson
+Hendrick
+Hendricks
+Hendrickson
+henequen
+Henley
+henpeck
+Henri
+Henrietta
+henry
+hepatica
+.IND hepatitis
+Hepburn
+heptane
+her
+Hera
+Heraclitus
+herald
+herb
+Herbert
+Herculean
+.IND Hercules
+herd
+herdsman
+here
+hereabout
+hereafter
+hereby
+hereditary
+heredity
+Hereford
+herein
+hereinabove
+hereinafter
+hereinbelow
+hereof
+heresy
+heretic
+hereto
+heretofore
+hereunder
+hereunto
+herewith
+heritable
+heritage
+Herkimer
+Herman
+.IND Hermann
+hermeneutic
+Hermes
+hermetic
+Hermite
+hermitian
+Hermosa
+Hernandez
+hero
+Herodotus
+heroes
+heroic
+heroin
+.IND heroine
+heroism
+heron
+herpes
+herpetology
+Herr
+herringbone
+Herschel
+herself
+Hershel
+Hershey
+hertz
+Hertzog
+.IND hesitant
+hesitate
+hesitater
+Hesperus
+Hess
+Hesse
+Hessian
+Hester
+heterocyclic
+heterodyne
+heterogamous
+heterogeneity
+heterogeneous
+heterosexual
+heterostructure
+heterozygous
+Hetman
+Hettie
+Hetty
+Heublein
+heuristic
+Heusen
+Heuser
+hew
+Hewett
+Hewitt
+.IND Hewlett
+hewn
+hex
+hexachloride
+hexadecimal
+hexafluoride
+hexagon
+hexagonal
+hexameter
+hexane
+.IND hey
+heyday
+hi
+Hiatt
+hiatus
+Hiawatha
+hibachi
+Hibbard
+hibernate
+Hibernia
+hick
+Hickey
+Hickman
+hickory
+Hicks
+hid
+.IND hidalgo
+hidden
+hide
+hideaway
+hideous
+hideout
+hierarchal
+hierarchic
+hierarchy
+hieratic
+hieroglyphic
+Hieronymus
+hifalutin
+Higgins
+high
+highball
+highboy
+highest
+highfalutin
+highhanded
+highland
+highlight
+highroad
+hightail
+highway
+highwayman
+.IND highwaymen
+hijack
+hijinks
+hike
+hilarious
+hilarity
+Hilbert
+.IND Hildebrand
+hill
+hillbilly
+Hillcrest
+Hillel
+hillman
+hillmen
+hillock
+hillside
+hilltop
+hilly
+hilt
+Hilton
+hilum
+him
+Himalaya
+himself
+hind
+hindmost
+.IND hindrance
+hindsight
+Hindu
+Hinduism
+Hines
+hinge
+Hinman
+hint
+hinterland
+hip
+hippo
+Hippocrates
+Hippocratic
+hippodrome
+hippopotamus
+hippy
+hipster
+Hiram
+hire
+hireling
+Hiroshi
+Hiroshima
+Hirsch
+hirsute
+his
+Hispanic
+.IND hiss
+histamine
+histidine
+histochemic
+.IND histochemistry
+histogram
+histology
+historian
+historic
+historiography
+history
+histrionic
+hit
+Hitachi
+hitch
+Hitchcock
+.H 1 "harbinger"
+hither
+hitherto
+Hitler
+hive
+ho
+hoagie
+Hoagland
+hoagy
+hoar
+hoard
+.IND hoarfrost
+hoarse
+hob
+Hobart
+Hobbes
+hobble
+Hobbs
+hobby
+hobbyhorse
+hobgoblin
+hobo
+Hoboken
+hoc
+hock
+hockey
+hocus
+hodge
+hodgepodge
+Hodges
+Hodgkin
+hoe
+Hoff
+Hoffman
+hog
+hogan
+hogging
+.IND hoi
+.IND Hokan
+Holbrook
+Holcomb
+hold
+holden
+holdout
+holdover
+holdup
+hole
+holeable
+holiday
+Holland
+Hollandaise
+holler
+Hollerith
+Hollingsworth
+Hollister
+hollow
+Holloway
+hollowware
+holly
+hollyhock
+Hollywood
+Holm
+Holman
+.IND Holmdel
+Holmes
+holmium
+holocaust
+Holocene
+hologram
+holography
+Holst
+Holstein
+holster
+holt
+Holyoke
+.IND holystone
+.INDP
+inject injudicious Injun injunct injunction injure injurious injury
+injustice ink inkling inlaid inland inlay inlet Inman inmate inn innards
+innate inner innermost innkeeper innocent innocuous innovate innuendo
+innumerable inoculate inoffensive inoperable inoperative inopportune
+inordinate inorganic input inputting inquest inquire inquiry inquisition
diff --git a/contrib/mm/examples/LT b/contrib/mm/examples/LT
new file mode 100644
index 0000000..2dbf189
--- /dev/null
+++ b/contrib/mm/examples/LT
@@ -0,0 +1,1065 @@
+.\" -*- nroff -*-
+.\" Copyright (C) 1989-2014 Free Software Foundation, Inc.
+.\"
+.\" Copying and distribution of this file, with or without modification,
+.\" are permitted in any medium without royalty provided the copyright
+.\" notice and this notice are preserved.
+.
+.ND 1994-10-26
+.\" .WA "Nisse Nilsson" notitle
+.\" .WE
+.WA "Sven Olsson" title
+Return address
+Street
+City, State Zip Code
+Text
+.WE
+.IA "Inside address" title
+Addressee name XXXXXXX
+Title XXXXXXXXXXXXXXX
+Company xxxxxxxxxxxx
+Street xxxxxxxxxxxxxx
+City, State Zip Code
+Text xxxxxxxxxxxxxxxxxx
+.IE
+.LO CN
+.LO RN "referens"
+.LO AT Attention
+.LO SA "Hej hopp"
+.LO SJ "Subject line"
+.LT BL
+hepp
+granary
+grand
+grandchild
+grandchildren
+granddaughter
+grandeur
+grandfather
+grandiloquent
+grandiose
+grandma
+grandmother
+grandnephew
+grandniece
+grandpa
+grandparent
+grandson
+grandstand
+granite
+granitic
+granny
+granola
+grant
+grantee
+grantor
+granular
+granulate
+granule
+Granville
+grape
+grapefruit
+grapevine
+graph
+grapheme
+graphic
+graphite
+grapple
+grasp
+grass
+grassland
+grassy
+grata
+grate
+grateful
+grater
+gratify
+gratis
+gratitude
+gratuitous
+gratuity
+grave
+gravel
+graven
+Graves
+gravestone
+graveyard
+gravid
+gravitate
+gravy
+gray
+graybeard
+grayish
+Grayson
+graywacke
+graze
+grease
+greasy
+great
+greatcoat
+greater
+grebe
+Grecian
+Greece
+greed
+greedy
+Greek
+green
+Greenbelt
+Greenberg
+Greenblatt
+Greenbriar
+Greene
+greenery
+Greenfield
+greengrocer
+greenhouse
+greenish
+Greenland
+Greensboro
+greensward
+greenware
+Greenwich
+greenwood
+Greer
+greet
+Greg
+gregarious
+Gregg
+Gregory
+gremlin
+grenade
+Grendel
+Grenoble
+Gresham
+Greta
+Gretchen
+grew
+grey
+greyhound
+greylag
+grid
+griddle
+gridiron
+grief
+grievance
+grieve
+grievous
+griffin
+Griffith
+grill
+grille
+grilled
+grillwork
+grim
+grimace
+Grimaldi
+grime
+Grimes
+Grimm
+grin
+grind
+grindstone
+grip
+.P
+gripe
+grippe
+grisly
+grist
+gristmill
+Griswold
+grit
+gritty
+grizzle
+grizzly
+groan
+groat
+grocer
+grocery
+groggy
+groin
+grommet
+groom
+groove
+grope
+grosbeak
+gross
+Grosset
+Grossman
+Grosvenor
+grotesque
+Groton
+ground
+groundsel
+groundskeep
+groundwork
+group
+groupoid
+grout
+grove
+grovel
+Grover
+grow
+growl
+grown
+grownup
+growth
+grub
+grubby
+grudge
+gruesome
+gruff
+grumble
+Grumman
+grunt
+gryphon
+g's
+GSA
+GU
+Guam
+guanidine
+guanine
+guano
+guarantee
+guaranteeing
+guarantor
+guaranty
+guard
+guardhouse
+Guardia
+guardian
+Guatemala
+gubernatorial
+Guelph
+Guenther
+guerdon
+guernsey
+guerrilla
+guess
+guesswork
+guest
+guffaw
+Guggenheim
+Guiana
+guidance
+guide
+guidebook
+guideline
+guidepost
+guiding
+guignol
+guild
+guildhall
+guile
+Guilford
+guillemot
+guillotine
+guilt
+guilty
+guinea
+guise
+guitar
+gules
+gulf
+gull
+Gullah
+gullet
+gullible
+gully
+gulp
+gum
+gumbo
+gumdrop
+gummy
+gumption
+gumshoe
+gun
+Gunderson
+gunfight
+gunfire
+gunflint
+gunk
+gunky
+gunman
+gunmen
+gunnery
+gunny
+gunplay
+gunpowder
+gunshot
+gunsling
+Gunther
+gurgle
+Gurkha
+guru
+Gus
+gush
+gusset
+gust
+Gustafson
+Gustav
+Gustave
+Gustavus
+gusto
+gusty
+gut
+Gutenberg
+Guthrie
+gutsy
+guttural
+guy
+.P
+Guyana
+guzzle
+Gwen
+Gwyn
+gym
+gymnasium
+gymnast
+gymnastic
+gymnosperm
+gyp
+gypsite
+gypsum
+gypsy
+gyrate
+gyrfalcon
+gyro
+gyrocompass
+gyroscope
+h
+ha
+Haag
+Haas
+habeas
+haberdashery
+Haberman
+Habib
+habit
+habitant
+habitat
+habitation
+habitual
+habituate
+hacienda
+hack
+hackberry
+Hackett
+hackle
+hackmatack
+hackney
+hackneyed
+hacksaw
+had
+Hadamard
+Haddad
+haddock
+Hades
+Hadley
+hadn't
+Hadrian
+hadron
+hafnium
+Hagen
+Hager
+haggard
+haggle
+Hagstrom
+Hague
+Hahn
+Haifa
+haiku
+hail
+hailstone
+hailstorm
+Haines
+hair
+haircut
+hairdo
+hairpin
+hairy
+Haiti
+Haitian
+Hal
+halcyon
+hale
+Haley
+half
+halfback
+halfhearted
+halfway
+halibut
+halide
+Halifax
+halite
+hall
+hallelujah
+Halley
+hallmark
+hallow
+Halloween
+hallucinate
+hallway
+halma
+halo
+halocarbon
+halogen
+Halpern
+Halsey
+Halstead
+halt
+halvah
+halve
+Halverson
+ham
+Hamal
+Hamburg
+hamburger
+Hamilton
+hamlet
+Hamlin
+hammerhead
+hammock
+Hammond
+hamper
+Hampshire
+Hampton
+hamster
+Han
+Hancock
+hand
+handbag
+handbook
+handclasp
+handcuff
+Handel
+handful
+handgun
+handhold
+handicap
+handicapped
+handicapper
+handicapping
+handicraft
+handicraftsman
+handicraftsmen
+handiwork
+handkerchief
+handle
+handleable
+handlebar
+handline
+handmade
+handmaiden
+handout
+handset
+handshake
+handsome
+handspike
+handstand
+handwaving
+handwrite
+handwritten
+handy
+handyman
+handymen
+Haney
+Hanford
+hang
+hangable
+hangar
+hangman
+hangmen
+hangout
+hangover
+hank
+Hankel
+Hanley
+Hanlon
+Hanna
+Hannah
+Hannibal
+Hanoi
+Hanover
+Hanoverian
+Hans
+Hansel
+Hansen
+hansom
+Hanson
+Hanukkah
+hap
+haphazard
+haploid
+haploidy
+haplology
+happen
+happenstance
+happy
+Hapsburg
+harangue
+harass
+Harbin
+harbinger
+Harcourt
+hard
+hardbake
+hardboard
+hardboiled
+hardcopy
+harden
+hardhat
+Hardin
+Harding
+hardscrabble
+hardtack
+hardtop
+hardware
+hardwood
+hardworking
+hardy
+hare
+harelip
+harem
+hark
+Harlan
+Harlem
+Harley
+harm
+harmful
+Harmon
+harmonic
+harmonica
+harmonious
+harmony
+harness
+Harold
+harp
+harpoon
+harpsichord
+Harpy
+Harriet
+Harriman
+Harrington
+Harris
+Harrisburg
+Harrison
+harrow
+harry
+harsh
+harshen
+hart
+Hartford
+Hartley
+Hartman
+Harvard
+.P
+harvest
+harvestman
+Harvey
+hash
+hashish
+hasn't
+hasp
+hassle
+hast
+haste
+hasten
+Hastings
+hasty
+hat
+hatch
+hatchet
+hatchway
+hate
+hateful
+hater
+Hatfield
+hath
+Hathaway
+hatred
+Hatteras
+Hattie
+Hattiesburg
+Haugen
+haughty
+haul
+haulage
+haunch
+haunt
+Hausdorff
+Havana
+have
+haven
+haven't
+Havilland
+havoc
+haw
+Hawaii
+Hawaiian
+hawk
+Hawkins
+Hawley
+hawthorn
+Hawthorne
+hay
+Hayden
+Haydn
+Hayes
+hayfield
+Haynes
+Hays
+haystack
+Hayward
+hayward
+hazard
+hazardous
+haze
+hazel
+hazelnut
+hazy
+he
+head
+headache
+headboard
+headdress
+headland
+headlight
+headline
+headmaster
+headphone
+headquarter
+headquarters
+headroom
+headset
+headsman
+headsmen
+headstand
+headstone
+headstrong
+headwall
+headwater
+headway
+headwind
+heady
+heal
+Healey
+health
+healthful
+healthy
+Healy
+heap
+hear
+heard
+hearken
+hearsay
+hearse
+Hearst
+heart
+heartbeat
+heartbreak
+hearten
+heartfelt
+hearth
+hearty
+heat
+heater
+heath
+heathen
+heathenish
+Heathkit
+heave
+heaven
+heavenward
+heavy
+heavyweight
+Hebe
+hebephrenic
+Hebraic
+Hebrew
+Hecate
+hecatomb
+heck
+heckle
+Heckman
+hectic
+hector
+Hecuba
+he'd
+hedge
+hedgehog
+hedonism
+hedonist
+heed
+heel
+heft
+hefty
+Hegelian
+hegemony
+Heidelberg
+heigh
+height
+heighten
+Heine
+Heinrich
+Heinz
+heir
+heiress
+Heisenberg
+held
+Helen
+Helena
+Helene
+Helga
+helical
+helicopter
+heliocentric
+heliotrope
+helium
+helix
+he'll
+hell
+hellbender
+hellebore
+Hellenic
+hellfire
+hellgrammite
+hellish
+hello
+helm
+helmet
+Helmholtz
+helmsman
+helmsmen
+Helmut
+help
+helpful
+helpmate
+Helsinki
+Helvetica
+hem
+hematite
+Hemingway
+hemisphere
+hemispheric
+hemlock
+hemoglobin
+hemolytic
+hemorrhage
+hemorrhoid
+hemosiderin
+hemp
+Hempstead
+hen
+henbane
+hence
+henceforth
+henchman
+henchmen
+Henderson
+Hendrick
+Hendricks
+Hendrickson
+henequen
+Henley
+henpeck
+Henri
+Henrietta
+henry
+hepatica
+hepatitis
+Hepburn
+heptane
+her
+Hera
+Heraclitus
+herald
+herb
+Herbert
+Herculean
+Hercules
+herd
+herdsman
+here
+hereabout
+hereafter
+hereby
+hereditary
+heredity
+Hereford
+herein
+hereinabove
+hereinafter
+hereinbelow
+hereof
+heresy
+heretic
+hereto
+heretofore
+hereunder
+hereunto
+.P
+herewith
+heritable
+heritage
+Herkimer
+Herman
+Hermann
+hermeneutic
+Hermes
+hermetic
+Hermite
+hermitian
+Hermosa
+Hernandez
+hero
+Herodotus
+heroes
+heroic
+heroin
+heroine
+heroism
+heron
+herpes
+herpetology
+Herr
+herringbone
+Herschel
+herself
+Hershel
+Hershey
+hertz
+Hertzog
+hesitant
+hesitate
+hesitater
+Hesperus
+Hess
+Hesse
+Hessian
+Hester
+heterocyclic
+heterodyne
+heterogamous
+heterogeneity
+heterogeneous
+heterosexual
+heterostructure
+heterozygous
+Hetman
+Hettie
+Hetty
+Heublein
+heuristic
+Heusen
+Heuser
+hew
+Hewett
+Hewitt
+Hewlett
+hewn
+hex
+hexachloride
+hexadecimal
+hexafluoride
+hexagon
+hexagonal
+hexameter
+hexane
+hey
+heyday
+hi
+Hiatt
+hiatus
+Hiawatha
+hibachi
+Hibbard
+hibernate
+Hibernia
+hick
+Hickey
+Hickman
+hickory
+Hicks
+hid
+hidalgo
+hidden
+hide
+hideaway
+hideous
+hideout
+hierarchal
+hierarchic
+hierarchy
+hieratic
+hieroglyphic
+Hieronymus
+hifalutin
+Higgins
+high
+highball
+highboy
+highest
+highfalutin
+highhanded
+highland
+highlight
+highroad
+hightail
+highway
+highwayman
+highwaymen
+hijack
+hijinks
+hike
+hilarious
+hilarity
+Hilbert
+Hildebrand
+hill
+hillbilly
+Hillcrest
+Hillel
+hillman
+hillmen
+hillock
+hillside
+hilltop
+hilly
+hilt
+Hilton
+hilum
+him
+Himalaya
+himself
+hind
+hindmost
+hindrance
+hindsight
+Hindu
+Hinduism
+Hines
+hinge
+Hinman
+hint
+hinterland
+hip
+hippo
+Hippocrates
+Hippocratic
+hippodrome
+hippopotamus
+hippy
+hipster
+Hiram
+hire
+hireling
+Hiroshi
+Hiroshima
+Hirsch
+hirsute
+his
+Hispanic
+hiss
+histamine
+histidine
+histochemic
+histochemistry
+histogram
+histology
+historian
+historic
+historiography
+history
+histrionic
+hit
+Hitachi
+hitch
+Hitchcock
+hither
+hitherto
+Hitler
+hive
+ho
+hoagie
+Hoagland
+hoagy
+hoar
+hoard
+hoarfrost
+hoarse
+hob
+Hobart
+Hobbes
+hobble
+Hobbs
+hobby
+.P
+hobbyhorse
+hobgoblin
+hobo
+Hoboken
+hoc
+hock
+hockey
+hocus
+hodge
+hodgepodge
+Hodges
+Hodgkin
+hoe
+Hoff
+Hoffman
+hog
+hogan
+hogging
+hoi
+Hokan
+Holbrook
+Holcomb
+hold
+holden
+holdout
+holdover
+holdup
+hole
+holeable
+holiday
+Holland
+Hollandaise
+holler
+Hollerith
+Hollingsworth
+Hollister
+hollow
+Holloway
+hollowware
+holly
+hollyhock
+Hollywood
+Holm
+Holman
+Holmdel
+Holmes
+holmium
+holocaust
+Holocene
+hologram
+holography
+Holst
+Holstein
+holster
+holt
+Holyoke
+holystone
+.FC
+.SG
+.NS 7
+text text text
+text text text
+.NS 12
+Holyoke
+holystone
+.NS
+holt
+.NE
diff --git a/contrib/mm/examples/LT.se b/contrib/mm/examples/LT.se
new file mode 100644
index 0000000..6635c70
--- /dev/null
+++ b/contrib/mm/examples/LT.se
@@ -0,0 +1,1069 @@
+.\" -*- nroff -*-
+.\" Copyright (C) 1989-2014 Free Software Foundation, Inc.
+.\"
+.\" Copying and distribution of this file, with or without modification,
+.\" are permitted in any medium without royalty provided the copyright
+.\" notice and this notice are preserved.
+.
+.\" groff -mmse LT.se
+.ND 1994-10-26
+.WA "Sven Olsson" title
+Return address
+Street
+City, State Zip Code
+Text
+.WE
+.IA "Inside address" title
+Addressee name XXXXXXX
+Title XXXXXXXXXXXXXXX
+Company xxxxxxxxxxxx
+Street xxxxxxxxxxxxxx
+City, State Zip Code
+Text xxxxxxxxxxxxxxxxxx
+.IE
+.LO DNAMN Dokumentnamn
+.LO MDAT 1994-01-01
+.LO BIL 2
+.LO KOMP Kompletteringsuppgift
+.LO DBET dokumentnummer
+.LO BET rendebeteckning
+.LO MBET "Mottagarens b"
+.LO SIDOR 22
+.\" vnster eller hgerstllt brev
+.\" .LT SVH
+.LT SVV
+hepp
+granary
+grand
+grandchild
+grandchildren
+granddaughter
+grandeur
+grandfather
+grandiloquent
+grandiose
+grandma
+grandmother
+grandnephew
+grandniece
+grandpa
+grandparent
+grandson
+grandstand
+granite
+granitic
+granny
+granola
+grant
+grantee
+grantor
+granular
+granulate
+granule
+Granville
+grape
+grapefruit
+grapevine
+graph
+grapheme
+graphic
+graphite
+grapple
+grasp
+grass
+grassland
+grassy
+grata
+grate
+grateful
+grater
+gratify
+gratis
+gratitude
+gratuitous
+gratuity
+grave
+gravel
+graven
+Graves
+gravestone
+graveyard
+gravid
+gravitate
+gravy
+gray
+graybeard
+grayish
+Grayson
+graywacke
+graze
+grease
+greasy
+great
+greatcoat
+greater
+grebe
+Grecian
+Greece
+greed
+greedy
+Greek
+green
+Greenbelt
+Greenberg
+Greenblatt
+Greenbriar
+Greene
+greenery
+Greenfield
+greengrocer
+greenhouse
+greenish
+Greenland
+Greensboro
+greensward
+greenware
+Greenwich
+greenwood
+Greer
+greet
+Greg
+gregarious
+Gregg
+Gregory
+gremlin
+grenade
+Grendel
+Grenoble
+Gresham
+Greta
+Gretchen
+grew
+grey
+greyhound
+greylag
+grid
+griddle
+gridiron
+grief
+grievance
+grieve
+grievous
+griffin
+Griffith
+grill
+grille
+grilled
+grillwork
+grim
+grimace
+Grimaldi
+grime
+Grimes
+Grimm
+grin
+grind
+grindstone
+grip
+.P
+gripe
+grippe
+grisly
+grist
+gristmill
+Griswold
+grit
+gritty
+grizzle
+grizzly
+groan
+groat
+grocer
+grocery
+groggy
+groin
+grommet
+groom
+groove
+grope
+grosbeak
+gross
+Grosset
+Grossman
+Grosvenor
+grotesque
+Groton
+ground
+groundsel
+groundskeep
+groundwork
+group
+groupoid
+grout
+grove
+grovel
+Grover
+grow
+growl
+grown
+grownup
+growth
+grub
+grubby
+grudge
+gruesome
+gruff
+grumble
+Grumman
+grunt
+gryphon
+g's
+GSA
+GU
+Guam
+guanidine
+guanine
+guano
+guarantee
+guaranteeing
+guarantor
+guaranty
+guard
+guardhouse
+Guardia
+guardian
+Guatemala
+gubernatorial
+Guelph
+Guenther
+guerdon
+guernsey
+guerrilla
+guess
+guesswork
+guest
+guffaw
+Guggenheim
+Guiana
+guidance
+guide
+guidebook
+guideline
+guidepost
+guiding
+guignol
+guild
+guildhall
+guile
+Guilford
+guillemot
+guillotine
+guilt
+guilty
+guinea
+guise
+guitar
+gules
+gulf
+gull
+Gullah
+gullet
+gullible
+gully
+gulp
+gum
+gumbo
+gumdrop
+gummy
+gumption
+gumshoe
+gun
+Gunderson
+gunfight
+gunfire
+gunflint
+gunk
+gunky
+gunman
+gunmen
+gunnery
+gunny
+gunplay
+gunpowder
+gunshot
+gunsling
+Gunther
+gurgle
+Gurkha
+guru
+Gus
+gush
+gusset
+gust
+Gustafson
+Gustav
+Gustave
+Gustavus
+gusto
+gusty
+gut
+Gutenberg
+Guthrie
+gutsy
+guttural
+guy
+.P
+Guyana
+guzzle
+Gwen
+Gwyn
+gym
+gymnasium
+gymnast
+gymnastic
+gymnosperm
+gyp
+gypsite
+gypsum
+gypsy
+gyrate
+gyrfalcon
+gyro
+gyrocompass
+gyroscope
+h
+ha
+Haag
+Haas
+habeas
+haberdashery
+Haberman
+Habib
+habit
+habitant
+habitat
+habitation
+habitual
+habituate
+hacienda
+hack
+hackberry
+Hackett
+hackle
+hackmatack
+hackney
+hackneyed
+hacksaw
+had
+Hadamard
+Haddad
+haddock
+Hades
+Hadley
+hadn't
+Hadrian
+hadron
+hafnium
+Hagen
+Hager
+haggard
+haggle
+Hagstrom
+Hague
+Hahn
+Haifa
+haiku
+hail
+hailstone
+hailstorm
+Haines
+hair
+haircut
+hairdo
+hairpin
+hairy
+Haiti
+Haitian
+Hal
+halcyon
+hale
+Haley
+half
+halfback
+halfhearted
+halfway
+halibut
+halide
+Halifax
+halite
+hall
+hallelujah
+Halley
+hallmark
+hallow
+Halloween
+hallucinate
+hallway
+halma
+halo
+halocarbon
+halogen
+Halpern
+Halsey
+Halstead
+halt
+halvah
+halve
+Halverson
+ham
+Hamal
+Hamburg
+hamburger
+Hamilton
+hamlet
+Hamlin
+hammerhead
+hammock
+Hammond
+hamper
+Hampshire
+Hampton
+hamster
+Han
+Hancock
+hand
+handbag
+handbook
+handclasp
+handcuff
+Handel
+handful
+handgun
+handhold
+handicap
+handicapped
+handicapper
+handicapping
+handicraft
+handicraftsman
+handicraftsmen
+handiwork
+handkerchief
+handle
+handleable
+handlebar
+handline
+handmade
+handmaiden
+handout
+handset
+handshake
+handsome
+handspike
+handstand
+handwaving
+handwrite
+handwritten
+handy
+handyman
+handymen
+Haney
+Hanford
+hang
+hangable
+hangar
+hangman
+hangmen
+hangout
+hangover
+hank
+Hankel
+Hanley
+Hanlon
+Hanna
+Hannah
+Hannibal
+Hanoi
+Hanover
+Hanoverian
+Hans
+Hansel
+Hansen
+hansom
+Hanson
+Hanukkah
+hap
+haphazard
+haploid
+haploidy
+haplology
+happen
+happenstance
+happy
+Hapsburg
+harangue
+harass
+Harbin
+harbinger
+Harcourt
+hard
+hardbake
+hardboard
+hardboiled
+hardcopy
+harden
+hardhat
+Hardin
+Harding
+hardscrabble
+hardtack
+hardtop
+hardware
+hardwood
+hardworking
+hardy
+hare
+harelip
+harem
+hark
+Harlan
+Harlem
+Harley
+harm
+harmful
+Harmon
+harmonic
+harmonica
+harmonious
+harmony
+harness
+Harold
+harp
+harpoon
+harpsichord
+Harpy
+Harriet
+Harriman
+Harrington
+Harris
+Harrisburg
+Harrison
+harrow
+harry
+harsh
+harshen
+hart
+Hartford
+Hartley
+Hartman
+Harvard
+.P
+harvest
+harvestman
+Harvey
+hash
+hashish
+hasn't
+hasp
+hassle
+hast
+haste
+hasten
+Hastings
+hasty
+hat
+hatch
+hatchet
+hatchway
+hate
+hateful
+hater
+Hatfield
+hath
+Hathaway
+hatred
+Hatteras
+Hattie
+Hattiesburg
+Haugen
+haughty
+haul
+haulage
+haunch
+haunt
+Hausdorff
+Havana
+have
+haven
+haven't
+Havilland
+havoc
+haw
+Hawaii
+Hawaiian
+hawk
+Hawkins
+Hawley
+hawthorn
+Hawthorne
+hay
+Hayden
+Haydn
+Hayes
+hayfield
+Haynes
+Hays
+haystack
+Hayward
+hayward
+hazard
+hazardous
+haze
+hazel
+hazelnut
+hazy
+he
+head
+headache
+headboard
+headdress
+headland
+headlight
+headline
+headmaster
+headphone
+headquarter
+headquarters
+headroom
+headset
+headsman
+headsmen
+headstand
+headstone
+headstrong
+headwall
+headwater
+headway
+headwind
+heady
+heal
+Healey
+health
+healthful
+healthy
+Healy
+heap
+hear
+heard
+hearken
+hearsay
+hearse
+Hearst
+heart
+heartbeat
+heartbreak
+hearten
+heartfelt
+hearth
+hearty
+heat
+heater
+heath
+heathen
+heathenish
+Heathkit
+heave
+heaven
+heavenward
+heavy
+heavyweight
+Hebe
+hebephrenic
+Hebraic
+Hebrew
+Hecate
+hecatomb
+heck
+heckle
+Heckman
+hectic
+hector
+Hecuba
+he'd
+hedge
+hedgehog
+hedonism
+hedonist
+heed
+heel
+heft
+hefty
+Hegelian
+hegemony
+Heidelberg
+heigh
+height
+heighten
+Heine
+Heinrich
+Heinz
+heir
+heiress
+Heisenberg
+held
+Helen
+Helena
+Helene
+Helga
+helical
+helicopter
+heliocentric
+heliotrope
+helium
+helix
+he'll
+hell
+hellbender
+hellebore
+Hellenic
+hellfire
+hellgrammite
+hellish
+hello
+helm
+helmet
+Helmholtz
+helmsman
+helmsmen
+Helmut
+help
+helpful
+helpmate
+Helsinki
+Helvetica
+hem
+hematite
+Hemingway
+hemisphere
+hemispheric
+hemlock
+hemoglobin
+hemolytic
+hemorrhage
+hemorrhoid
+hemosiderin
+hemp
+Hempstead
+hen
+henbane
+hence
+henceforth
+henchman
+henchmen
+Henderson
+Hendrick
+Hendricks
+Hendrickson
+henequen
+Henley
+henpeck
+Henri
+Henrietta
+henry
+hepatica
+hepatitis
+Hepburn
+heptane
+her
+Hera
+Heraclitus
+herald
+herb
+Herbert
+Herculean
+Hercules
+herd
+herdsman
+here
+hereabout
+hereafter
+hereby
+hereditary
+heredity
+Hereford
+herein
+hereinabove
+hereinafter
+hereinbelow
+hereof
+heresy
+heretic
+hereto
+heretofore
+hereunder
+hereunto
+.P
+herewith
+heritable
+heritage
+Herkimer
+Herman
+Hermann
+hermeneutic
+Hermes
+hermetic
+Hermite
+hermitian
+Hermosa
+Hernandez
+hero
+Herodotus
+heroes
+heroic
+heroin
+heroine
+heroism
+heron
+herpes
+herpetology
+Herr
+herringbone
+Herschel
+herself
+Hershel
+Hershey
+hertz
+Hertzog
+hesitant
+hesitate
+hesitater
+Hesperus
+Hess
+Hesse
+Hessian
+Hester
+heterocyclic
+heterodyne
+heterogamous
+heterogeneity
+heterogeneous
+heterosexual
+heterostructure
+heterozygous
+Hetman
+Hettie
+Hetty
+Heublein
+heuristic
+Heusen
+Heuser
+hew
+Hewett
+Hewitt
+Hewlett
+hewn
+hex
+hexachloride
+hexadecimal
+hexafluoride
+hexagon
+hexagonal
+hexameter
+hexane
+hey
+heyday
+hi
+Hiatt
+hiatus
+Hiawatha
+hibachi
+Hibbard
+hibernate
+Hibernia
+hick
+Hickey
+Hickman
+hickory
+Hicks
+hid
+hidalgo
+hidden
+hide
+hideaway
+hideous
+hideout
+hierarchal
+hierarchic
+hierarchy
+hieratic
+hieroglyphic
+Hieronymus
+hifalutin
+Higgins
+high
+highball
+highboy
+highest
+highfalutin
+highhanded
+highland
+highlight
+highroad
+hightail
+highway
+highwayman
+highwaymen
+hijack
+hijinks
+hike
+hilarious
+hilarity
+Hilbert
+Hildebrand
+hill
+hillbilly
+Hillcrest
+Hillel
+hillman
+hillmen
+hillock
+hillside
+hilltop
+hilly
+hilt
+Hilton
+hilum
+him
+Himalaya
+himself
+hind
+hindmost
+hindrance
+hindsight
+Hindu
+Hinduism
+Hines
+hinge
+Hinman
+hint
+hinterland
+hip
+hippo
+Hippocrates
+Hippocratic
+hippodrome
+hippopotamus
+hippy
+hipster
+Hiram
+hire
+hireling
+Hiroshi
+Hiroshima
+Hirsch
+hirsute
+his
+Hispanic
+hiss
+histamine
+histidine
+histochemic
+histochemistry
+histogram
+histology
+historian
+historic
+historiography
+history
+histrionic
+hit
+Hitachi
+hitch
+Hitchcock
+hither
+hitherto
+Hitler
+hive
+ho
+hoagie
+Hoagland
+hoagy
+hoar
+hoard
+hoarfrost
+hoarse
+hob
+Hobart
+Hobbes
+hobble
+Hobbs
+hobby
+.P
+hobbyhorse
+hobgoblin
+hobo
+Hoboken
+hoc
+hock
+hockey
+hocus
+hodge
+hodgepodge
+Hodges
+Hodgkin
+hoe
+Hoff
+Hoffman
+hog
+hogan
+hogging
+hoi
+Hokan
+Holbrook
+Holcomb
+hold
+holden
+holdout
+holdover
+holdup
+hole
+holeable
+holiday
+Holland
+Hollandaise
+holler
+Hollerith
+Hollingsworth
+Hollister
+hollow
+Holloway
+hollowware
+holly
+hollyhock
+Hollywood
+Holm
+Holman
+Holmdel
+Holmes
+holmium
+holocaust
+Holocene
+hologram
+holography
+Holst
+Holstein
+holster
+holt
+Holyoke
+holystone
+.FC
+.SG
+.NS 7
+text text text
+text text text
+.NS 12
+Holyoke
+holystone
+.NS
+holt
+.NE
diff --git a/contrib/mm/examples/ML b/contrib/mm/examples/ML
new file mode 100644
index 0000000..3ca16ad
--- /dev/null
+++ b/contrib/mm/examples/ML
@@ -0,0 +1,176 @@
+.\" -*- nroff -*-
+.\" Copyright (C) 1989-2014 Free Software Foundation, Inc.
+.\"
+.\" Copying and distribution of this file, with or without modification,
+.\" are permitted in any medium without royalty provided the copyright
+.\" notice and this notice are preserved.
+.
+granary
+grand
+grandchild
+grandchildren
+granddaughter
+grandeur
+grandfather
+grandiloquent
+grandiose
+grandma
+grandmother
+grandnephew
+grandniece
+grandpa
+.ML MARK
+.LI "LOCALMARK"
+granola
+grant
+grantee
+grantor
+granular
+granulate
+granule
+Granville
+grape
+grapefruit
+grapevine
+.LI
+.DS
+Where shall we put this.
+Where shall we put this.
+Where shall we put this.
+.DE
+.LI
+granola
+grant
+grantee
+grantor
+granular
+granulate
+granule
+Granville
+grape
+grapefruit
+grapevine
+.LI
+.DS
+Where shall we put this.
+.DE
+.LI
+graphic
+graphite
+grapple
+grasp
+grass
+grassland
+grassy
+.LI
+grata
+grate
+grateful
+grater
+gratify
+gratis
+gratitude
+gratuitous
+.LI
+gratuity
+grave
+gravel
+.LE
+.SP 3
+.ML $ 1c
+.LI
+graven
+Graves
+gravestone
+graveyard
+gravid
+gravitate
+gravy
+gray
+.LI
+graybeard
+grayish
+Grayson
+graywacke
+graze
+grease
+greasy
+great
+greatcoat
+.LI
+greater
+grebe
+Grecian
+Greece
+greed
+greedy
+Greek
+green
+.LI
+Greenbelt
+Greenberg
+Greenblatt
+Greenbriar
+Greene
+greenery
+.LE
+.SP 3
+.ML X 1c 1
+.LI
+Greenfield
+greengrocer
+grandson
+grandstand
+granite
+granitic
+granny
+graph
+.LI
+grapheme
+greenhouse
+greenish
+Greenland
+Greensboro
+granary
+grand
+grandchild
+grandchildren
+granddaughter
+grandeur
+grandfather
+grandiloquent
+grandiose
+.LI
+grandma
+grandmother
+grandnephew
+grandniece
+grandpa
+grandparent
+grandson
+grandstand
+granite
+granitic
+granny
+.LI
+granola
+grant
+grantee
+grantor
+granular
+granulate
+granule
+Granville
+grape
+grapefruit
+.LI
+grapevine
+graph
+grapheme
+graphic
+graphite
+grapple
+grasp
+grass
+grassland
+.LE
diff --git a/contrib/mm/examples/MOVE b/contrib/mm/examples/MOVE
new file mode 100644
index 0000000..d2a31e5
--- /dev/null
+++ b/contrib/mm/examples/MOVE
@@ -0,0 +1,182 @@
+.\" -*- nroff -*-
+.\" Copyright (C) 1989-2014 Free Software Foundation, Inc.
+.\"
+.\" Copying and distribution of this file, with or without modification,
+.\" are permitted in any medium without royalty provided the copyright
+.\" notice and this notice are preserved.
+.
+.PH "'hej'hopp'i skogen'"
+.PF "'livet'r'hrligt'"
+.OH "'ojmn'%'sida'"
+.EH "'ojmn'%'sida'"
+.OF "'ojmn'%'sida'"
+.EF "'ojmn'%'sida'"
+10th
+1st
+2nd
+3rd
+4th
+5th
+6th
+7th
+8th
+9th
+a
+AAA
+AAAS
+Aarhus
+Aaron
+AAU
+ABA
+Ababa
+aback
+abacus
+abalone
+abandon
+abase
+abash
+abate
+abater
+abbas
+abbe
+abbey
+abbot
+Abbott
+abbreviate
+abc
+abdicate
+abdomen
+abdominal
+abet
+abetted
+abetting
+abeyance
+abeyant
+abhorred
+abhorrent
+abide
+Abidjan
+Abigail
+abject
+ablate
+ablaze
+able
+ablution
+Abner
+.MOVE 50 20
+abnormal
+Abo
+aboard
+abode
+abolish
+abolition
+abominable
+abominate
+aboriginal
+AAA
+ABORIGINE
+ABORNING
+ABORT
+ABOUND
+ABOUT
+ABOVE
+ABOVEBOARD
+ABOVEGROUND
+abovementioned
+abrade
+Abraham
+Abram
+Abramson
+abrasion
+abrasive
+abreact
+abreast
+BBB
+ABRIDGE
+ABRIDGMENT
+ABROAD
+abrogate
+abrupt
+abscess
+abscissa
+abscissae
+absence
+absent
+absentee
+absenteeism
+absentia
+absentminded
+.MOVE 30 10
+absinthe
+absolute
+absolution
+absolve
+absorb
+absorbent
+absorption
+absorptive
+abstain
+abstention
+abstinent
+abstract
+abstracter
+abstractor
+CCC
+ABSTRUSE
+ABSURD
+ABUILDING
+ABUNDANT
+ABUSABLE
+ABUSE
+ABUSIVE
+ABUT
+ABUTTED
+ABUTTING
+ABYSMAL
+ABYSS
+ABYSSINIA
+AC
+ACADEME
+ACADEMIA
+ACADEMIC
+ACADEMICIAN
+ACADEMY
+ACADIA
+ACANTHUS
+ACAPULCO
+ACCEDE
+ACCELERATE
+ACCELEROMETER
+ACCENT
+ACCENTUAL
+ACCENTUATE
+ACCEPT
+ACCEPTANT
+acceptor
+access
+.MOVE 62 0 20
+accessible
+accession
+accessory
+accident
+accidental
+accipiter
+acclaim
+acclamation
+acclimate
+accolade
+accommodate
+accompaniment
+accompanist
+accompany
+accomplice
+accomplish
+accord
+accordant
+DDD
+ACCORDION
+ACCOST
+ACCOUNT
+ACCOUNTANT
+ACCRA
+.PGFORM
diff --git a/contrib/mm/examples/MUL b/contrib/mm/examples/MUL
new file mode 100644
index 0000000..bd8cf22
--- /dev/null
+++ b/contrib/mm/examples/MUL
@@ -0,0 +1,542 @@
+.\" -*- nroff -*-
+.\" Copyright (C) 1989-2014 Free Software Foundation, Inc.
+.\"
+.\" Copying and distribution of this file, with or without modification,
+.\" are permitted in any medium without royalty provided the copyright
+.\" notice and this notice are preserved.
+.
+inject
+injudicious
+Injun
+injunct
+injunction
+injure
+injurious
+injury
+injustice
+ink
+inkling
+inlaid
+inland
+inlay
+inlet
+Inman
+inmate
+inn
+innards
+innate
+inner
+innermost
+innkeeper
+innocent
+innocuous
+innovate
+innuendo
+innumerable
+inoculate
+inoffensive
+inoperable
+inoperative
+inopportune
+inordinate
+inorganic
+input
+inputting
+inquest
+inquire
+inquiry
+inquisition
+inquisitive
+inquisitor
+inroad
+insane
+insatiable
+inscribe
+inscription
+inscrutable
+insect
+insecticide
+insecure
+inseminate
+insensible
+insensitive
+inseparable
+insert
+inset
+inshore
+inside
+insidious
+insight
+insightful
+insignia
+insignificant
+insincere
+insinuate
+insipid
+insist
+insistent
+insofar
+insolent
+insoluble
+insolvable
+insolvent
+insomnia
+insomniac
+insouciant
+inspect
+inspector
+inspiration
+inspire
+instable
+install
+installation
+instalment
+instance
+instant
+instantaneous
+instantiate
+instead
+instep
+instigate
+instill
+instillation
+instinct
+instinctual
+institute
+institution
+instruct
+instructor
+instrument
+instrumentation
+insubordinate
+insubstantial
+insufferable
+insufficient
+insular
+insulate
+insulin
+insult
+insuperable
+insupportable
+insuppressible
+insurance
+insure
+insurgent
+insurmountable
+insurrect
+insurrection
+intact
+intake
+intangible
+integer
+integrable
+.MULB 4c 1 5c 1 4c 1 3c
+Grenoble
+Gresham
+Greta
+Gretchen
+grew
+grieve
+grievous
+griffin
+Griffith
+grill
+grille
+grilled
+grillwork
+grim
+grimace
+Grimaldi
+grime
+Grimes
+Grimm
+grin
+grind
+grindstone
+grip
+gripe
+grippe
+grisly
+grist
+gristmill
+Griswold
+grit
+gritty
+grizzle
+grizzly
+groan
+groat
+grocer
+grocery
+groggy
+groin
+grommet
+groom
+groove
+grope
+grosbeak
+gross
+.MULN
+h
+ha
+Haag
+Haas
+habeas
+haberdashery
+Haberman
+Habib
+habit
+habitant
+habitat
+habitation
+habitual
+habituate
+hacienda
+hack
+hackberry
+Hackett
+hackle
+hackmatack
+hackney
+hackneyed
+hacksaw
+had
+Hadamard
+Haddad
+haddock
+Hades
+Hadley
+hadn't
+Hadrian
+hadron
+hafnium
+Hagen
+Hager
+haggard
+haggle
+Hagstrom
+Hague
+Hahn
+Haifa
+haiku
+hail
+hailstone
+hailstorm
+Haines
+hair
+haircut
+hairdo
+hairpin
+hairy
+Haiti
+Haitian
+Hal
+halcyon
+hale
+Haley
+half
+halfback
+halfhearted
+halfway
+halibut
+halide
+Halifax
+halite
+hall
+hallelujah
+Halley
+hallmark
+hallow
+Halloween
+hallucinate
+hallway
+halma
+halo
+halocarbon
+halogen
+Halpern
+Halsey
+Halstead
+halt
+halvah
+halve
+Halverson
+ham
+Hamal
+Hamburg
+hamburger
+Hamilton
+hamlet
+Hamlin
+hammerhead
+hammock
+Hammond
+hamper
+Hampshire
+Hampton
+hamster
+Han
+Hancock
+hand
+handbag
+handbook
+handclasp
+handcuff
+.MULN
+coliform
+coliseum
+collaborate
+collage
+collagen
+collapse
+collapsible
+collar
+collarbone
+collard
+collate
+collateral
+colleague
+collect
+collectible
+collector
+college
+collegial
+collegian
+collegiate
+collet
+collide
+collie
+Collier
+collimate
+collinear
+Collins
+collision
+collocation
+colloidal
+Colloq
+colloquia
+colloquial
+colloquium
+colloquy
+command
+commandant
+commandeer
+commando
+commemorate
+commend
+commendation
+commendatory
+commensurable
+commensurate
+comment
+commentary
+commentator
+commerce
+commercial
+commingle
+commiserate
+commissariat
+commissary
+commission
+commit
+committable
+committal
+committed
+committee
+committeeman
+committeemen
+committeewoman
+committeewomen
+committing
+commodious
+commodity
+commodore
+common
+commonality
+.MULN
+locoweed
+lunch
+luncheon
+lunchroom
+lunchtime
+Lund
+Lundberg
+Lundquist
+lung
+lunge
+lupine
+Lura
+lurch
+lure
+lurid
+lurk
+Lusaka
+luscious
+lush
+lust
+lustful
+lustrous
+lusty
+lutanist
+lute
+lutetium
+Luther
+Lutheran
+Lutz
+lymphocyte
+lymphoma
+lynch
+Lynchburg
+Lynn
+lynx
+Lyon
+Lyons
+Lyra
+lyric
+lyricism
+Lysenko
+lysergic
+lysine
+.MULE
+m
+ma
+Mabel
+Mac
+macabre
+macaque
+MacArthur
+Macassar
+Macbeth
+MacDonald
+MacDougall
+mace
+Macedon
+Macedonia
+MacGregor
+Mach
+Machiavelli
+machination
+machine
+machinelike
+machinery
+machismo
+macho
+macintosh
+mack
+MacKenzie
+mackerel
+Mackey
+Mackinac
+Mackinaw
+mackintosh
+MacMillan
+Macon
+macrame
+macro
+macromolecular
+macromolecule
+macrophage
+macroprocessor
+macroscopic
+macrostructure
+mad
+Madagascar
+madam
+Madame
+madcap
+madden
+Maddox
+made
+Madeira
+Madeleine
+Madeline
+madhouse
+Madison
+madman
+madmen
+Madonna
+Madras
+Madrid
+madrigal
+Madsen
+madstone
+Mae
+Maelstrom
+maestro
+Mafia
+magazine
+Magdalene
+magenta
+Maggie
+maggot
+maggoty
+magi
+magic
+magician
+magisterial
+magistrate
+magma
+magna
+magnanimity
+magnanimous
+magnate
+magnesia
+magnesite
+magnesium
+magnet
+magnetic
+magnetite
+magneto
+magnetron
+magnificent
+magnify
+magnitude
+magnolia
+magnum
+Magnuson
+Magog
+magpie
+Magruder
+Mahayana
+Mahayanist
+mahogany
+Mahoney
+maid
+maiden
+maidenhair
+maidservant
+Maier
+mail
+mailbox
+mailman
+mailmen
+maim
+main
+Maine
+mainland
+mainline
+mainstay
+mainstream
+maintain
+maintenance
+maitre
+majestic
+majesty
+major
+make
+makeshift
+makeup
+Malabar
+maladapt
+maladaptive
+maladjust
+maladroit
+malady
+Malagasy
+malaise
+malaprop
+malaria
+malarial
+Malawi
+Malay
+Malaysia
diff --git a/contrib/mm/examples/NCOL b/contrib/mm/examples/NCOL
new file mode 100644
index 0000000..8a5e001
--- /dev/null
+++ b/contrib/mm/examples/NCOL
@@ -0,0 +1,203 @@
+.\" -*- nroff -*-
+.\" Copyright (C) 1989-2014 Free Software Foundation, Inc.
+.\"
+.\" Copying and distribution of this file, with or without modification,
+.\" are permitted in any medium without royalty provided the copyright
+.\" notice and this notice are preserved.
+.
+granary
+grand
+grandchild
+grandchildren
+granddaughter
+grandeur
+grandfather
+grandiloquent
+grandiose
+grandma
+grandmother
+grandnephew
+grandniece
+grandpa
+grandparent
+grandson
+grandstand
+granite
+granitic
+granny
+granola
+grant
+grantee
+grantor
+granular
+granulate
+granule
+Granville
+grape
+grapefruit
+grapevine
+graph
+grapheme
+graphic
+graphite
+grapple
+grasp
+grass
+grassland
+grassy
+.MC 3c
+grata
+grate
+grateful
+grater
+gratify
+gratis
+gratitude
+gratuitous
+gratuity
+grave
+gravel
+graven
+Graves
+gravestone
+graveyard
+gravid
+gravitate
+gravy
+gray
+graybeard
+grayish
+Grayson
+graywacke
+graze
+grease
+greasy
+great
+greatcoat
+greater
+grebe
+Grecian
+Greece
+greed
+greedy
+.NCOL
+Greek
+green
+Greenbelt
+Greenberg
+Greenblatt
+Greenbriar
+Greene
+greenery
+Greenfield
+greengrocer
+greenhouse
+greenish
+Greenland
+Greensboro
+greensward
+greenware
+Greenwich
+greenwood
+Greer
+greet
+Greg
+gregarious
+Gregg
+Gregory
+gremlin
+grenade
+Grendel
+Grenoble
+Gresham
+Greta
+Gretchen
+grew
+grey
+greyhound
+greylag
+grid
+griddle
+gridiron
+grief
+grievance
+grieve
+grievous
+griffin
+Griffith
+grill
+grille
+grilled
+grillwork
+.NCOL
+grim
+grimace
+Grimaldi
+grime
+Grimes
+Grimm
+grin
+grind
+grindstone
+grip
+gripe
+grippe
+grisly
+grist
+gristmill
+Griswold
+grit
+gritty
+grizzle
+grizzly
+groan
+groat
+grocer
+grocery
+groggy
+groin
+grommet
+groom
+groove
+grope
+grosbeak
+gross
+Grosset
+Grossman
+Grosvenor
+grotesque
+Groton
+ground
+groundsel
+groundskeep
+groundwork
+group
+groupoid
+grout
+grove
+grovel
+Grover
+grow
+growl
+grown
+grownup
+growth
+grub
+grubby
+grudge
+gruesome
+gruff
+grumble
+Grumman
+grunt
+gryphon
+g's
+GSA
+GU
+Guam
+guanidine
+guanine
+guano
+guarantee
+guaranteeing
+guarantor
diff --git a/contrib/mm/examples/ND b/contrib/mm/examples/ND
new file mode 100644
index 0000000..fdbc55d
--- /dev/null
+++ b/contrib/mm/examples/ND
@@ -0,0 +1,24 @@
+.\" -*- nroff -*-
+.\" Copyright (C) 1989-2014 Free Software Foundation, Inc.
+.\"
+.\" Copying and distribution of this file, with or without modification,
+.\" are permitted in any medium without royalty provided the copyright
+.\" notice and this notice are preserved.
+.
+.nf
+----------------------------------------------------------------------
+.ce
+Testing
+----------------------------------------------------------------------
+Date = \*[DT]
+.ISODATE
+Date = \*[DT]
+.ISODATE 0
+
+.ND "13 August 1992"
+Date = \*[DT]
+
+.ISODATE
+.ND "14 August 1992"
+Date = \*[DT]
+----------------------------------------------------------------------
diff --git a/contrib/mm/examples/README b/contrib/mm/examples/README
new file mode 100644
index 0000000..cb0956a
--- /dev/null
+++ b/contrib/mm/examples/README
@@ -0,0 +1,40 @@
+ -*- text -*-
+ Copyright (C) 1989-2020 Free Software Foundation, Inc.
+
+ Copying and distribution of this file, with or without modification,
+ are permitted in any medium without royalty provided the copyright
+ notice and this notice are preserved.
+
+
+This directory contains examples of my enhancements to MM.
+
+APP The appendix macro.
+B1B2 Box macro with text.
+COVER My general cover macro, this example is using
+ ms.cov.
+IND A general indexing method, see manual for INITI.
+LT The letter macro.
+LT.se A Swedish example with extra Swedish macros for
+ composing a letter conforming to Swedish standard style,
+ adjusted to left and right margins.
+ML Marked list, an extended list type.
+MOVE The MOVE macro, how to begin to print on an exact position.
+MUL Enhanced multicolumn mode.
+NCOL Start on next column. (Not for MUL*)
+ND New date, with ISO date example.
+References How to use references.
+SETR General reference system, see manual for INITR.
+
+
+Examples that I should have:
+
+PIC How to include postscript pictures, see manual for PIC.
+VERBON Begin verbatim output.
+
+
+And remember, check the manual for all string and number registers,
+I've made sure that mm is useful in several languages;
+all English output can be redefined.
+
+For Swedish localization, check the manual for groff_mse and the
+macro files 'mse.tmac' and 'sv.tmac'.
diff --git a/contrib/mm/examples/References b/contrib/mm/examples/References
new file mode 100644
index 0000000..7b54471
--- /dev/null
+++ b/contrib/mm/examples/References
@@ -0,0 +1,982 @@
+.\" -*- nroff -*-
+.\" Copyright (C) 1989-2014 Free Software Foundation, Inc.
+.\"
+.\" Copying and distribution of this file, with or without modification,
+.\" are permitted in any medium without royalty provided the copyright
+.\" notice and this notice are preserved.
+.
+.PH "'this'is'a header'"
+.PF "'this'is'a footer'"
+.OH "'odd'%'page'"
+.EH "'even'%'page'"
+.OF "'odd'%'page'"
+.EF "'even'%'page'"
+10th
+1st
+2nd
+3rd
+4th
+5th
+6th
+7th
+8th
+9th
+a
+AAA
+.B
+AAAS
+Aarhus
+Aaron
+.R
+AAU
+ABA
+Ababa
+aback
+abacus
+abalone
+abandon
+abase
+.H 1 "hej hopp"
+abash
+abate
+abater
+abbas
+abbe
+abbey
+abbot
+Abbott
+abbreviate
+abc
+abdicate
+abdomen
+abet
+abetted
+abetting
+abeyance
+abeyant
+.H 2 "hej hopp"
+abhorred
+abhorrent
+abide
+Abidjan
+Abigail
+abject
+ablate
+ablaze
+able
+ablution
+Abner
+abnormal
+.H 2 "hej hopp"
+Abo
+aboard
+abode
+abolish
+.HU "hej hopp"
+.B1
+abolition
+abominable
+abominate\*(Rf
+aboriginal
+.RS
+AAA
+ABORIGINE
+ABORNING
+ABORT
+ABOUND
+ABOUT
+ABOVE
+ABOVEBOARD
+ABOVEGROUND
+.RF
+abovementioned
+abrade
+Abraham\*(Rf
+Abram\*(Rf
+Abramson\*(Rf
+abrasion\*(Rf
+abrasive\*(Rf
+abreact\*(Rf
+.B2
+abreast\*(Rf
+.RS
+BBB
+ABRIDGE
+ABRIDGMENT
+ABROAD
+.RF
+abrogate
+abrupt
+abscess\*(Rf
+abscissa\*(Rf
+abscissae\*(Rf
+absence\*(Rf
+absent
+absentee
+absenteeism
+absentia
+.H 3 "hej hopp"
+absentminded
+absinthe
+absolute
+absolution
+absolve
+absorb
+absorbent
+absorption
+absorptive
+abstain
+abstention
+abstinent\*(Rf
+abstract
+abstracter
+abstractor
+.RS nisse
+CCC
+ABSTRUSE
+ABSURD
+ABUILDING
+ABUNDANT
+ABUSABLE
+ABUSE
+ABUSIVE
+ABUT
+ABUTTED
+ABUTTING
+ABYSMAL
+ABYSS
+ABYSSINIA
+AC
+ACADEME
+ACADEMIA
+ACADEMIC
+ACADEMICIAN
+ACADEMY
+ACADIA
+ACANTHUS
+ACAPULCO
+ACCEDE
+ACCELERATE
+ACCELEROMETER
+ACCENT
+ACCENTUAL
+ACCENTUATE
+ACCEPT
+ACCEPTANT
+.RF
+acceptor
+access
+accessible
+accession
+Ref \*[nisse]
+accessory
+.H 4 "hej hopp"
+accident
+accidental
+accipiter
+acclaim
+acclamation
+acclimate
+accolade
+accommodate
+accompaniment
+accompanist
+accompany
+accomplice
+accomplish\*(Rf
+accord
+accordant
+.RS
+DDD
+ACCORDION
+ACCOST
+ACCOUNT
+ACCOUNTANT
+ACCRA
+ACCREDIT
+ACCREDITATE
+ACCREDITATION
+ACCRETION
+ACCRUAL
+ACCRUE
+.RF
+acculturate
+accumulate
+accuracy
+accurate
+accusation
+accusative
+accusatory
+accuse
+accustom
+ace
+acerbic
+acerbity
+acetate
+acetic
+acetone
+acetylene
+ache
+achieve
+Achilles
+aching
+achromatic
+acid
+acidic
+acidulous
+.H 5 "hej hopp"
+Ackerman
+Ackley
+acknowledge
+acknowledgeable
+ACM
+acme
+acolyte
+acorn
+acoustic
+acquaint
+acquaintance
+acquiesce
+acquiescent
+acquire
+acquisition
+acquisitive
+acquit
+acquittal
+acquitting
+acre
+acreage
+acrid
+acrimonious
+acrimony
+acrobacy
+acrobat
+acrobatic
+acronym
+acropolis
+across
+acrylate
+acrylic
+ACS
+act
+Actaeon
+actinic
+actinide
+actinium
+actinolite
+actinometer
+activate
+activation
+activism
+Acton
+actor
+actress
+Acts
+actual
+actuarial
+actuate
+.H 6 "hej hopp"
+acuity
+acumen
+acute
+acyclic
+ad
+Ada
+adage
+adagio
+Adair
+Adam
+adamant
+Adams
+Adamson
+adapt
+adaptation
+adaptive
+add
+added
+addend
+addenda
+addendum
+addict
+Addis
+Addison
+addition
+additional
+additive
+addle
+address
+addressee
+Addressograph
+adduce
+Adelaide
+Adele
+Adelia
+Aden
+adenine
+adenoma
+adenosine
+adept
+adequacy
+adequate
+adhere
+adherent
+adhesion
+adhesive
+adiabatic
+adieu
+adipic
+Adirondack
+.H 7 "hej hopp"
+adjacent
+adject
+adjectival
+adjective
+adjoin
+adjoint
+adjourn
+adjudge
+adjudicate
+adjunct
+adjust
+adjutant
+Adkins
+Adler
+administer
+administrable
+administrate
+administratrix
+admiral
+admiralty
+admiration
+admire
+admissible
+admission
+admit
+admittance
+admitted
+admitting
+admix
+admixture
+admonish
+admonition
+ado
+adobe
+adolescent
+Adolph
+Adolphus
+Adonis
+adopt
+adoption
+adoptive
+adore
+adorn
+adposition
+adrenal
+adrenaline
+Adrian
+Adriatic
+Adrienne
+adrift
+adroit
+adsorb
+adsorbate
+adsorption
+adsorptive
+adulate
+adult
+adulterate
+adulterous
+adultery
+adulthood
+advance
+advantage
+advantageous
+advent
+adventitious
+adventure
+adventurous
+adverb
+adverbial
+adversary
+adverse
+advert
+advertise
+advice
+advisable
+advise
+advisee
+advisor
+advisory
+advocacy
+advocate
+Aegean
+aegis
+Aeneas
+Aeneid
+aeolian
+Aeolus
+aerate
+aerial
+Aerobacter
+aerobic
+aerodynamic
+aerogene
+aeronautic
+aerosol
+aerospace
+Aeschylus
+aesthete
+aesthetic
+10th
+1st
+2nd
+3rd
+4th
+5th
+6th
+7th
+8th
+9th
+a
+AAA
+AAAS
+Aarhus
+Aaron
+AAU
+ABA
+Ababa
+aback
+abacus
+abalone
+abandon
+abase
+.H 1 "hej hopp"
+abash
+abate
+abater
+abbas
+abbe
+abbey
+abbot
+Abbott
+abbreviate
+abc
+abdicate
+abdomen
+abdominal
+abduct
+Abe
+abed
+Abel
+Abelian
+Abelson
+Aberdeen
+Abernathy
+aberrant
+aberrate
+abet
+abetted
+abetting
+abeyance
+abeyant
+.H 2 "hej hopp"
+abhorred
+abhorrent
+abide
+Abidjan
+Abigail
+abject
+ablate
+ablaze
+able
+ablution
+Abner
+abnormal
+Abo
+aboard
+abode
+abolish
+abolition
+abominable
+abominate
+aboriginal
+aborigine
+aborning
+abort
+abound
+about
+above
+aboveboard
+aboveground
+abovementioned
+abrade
+Abraham
+Abram
+Abramson
+abrasion
+abrasive
+abreact
+abreast
+abridge
+abridgment
+abroad
+abrogate
+abrupt
+abscess
+abscissa
+abscissae
+absence
+absent
+absentee
+absenteeism
+absentia
+.H 3 "hej hopp"
+absentminded
+absinthe
+absolute
+absolution
+absolve
+absorb
+absorbent
+absorption
+absorptive
+abstain
+abstention
+abstinent
+abstract
+abstracter
+abstractor
+abstruse
+absurd
+abuilding
+abundant
+abusable
+abuse
+abusive
+abut
+abutted
+abutting
+abysmal
+abyss
+Abyssinia
+AC
+academe
+academia
+academic
+academician
+academy
+Acadia
+acanthus
+Acapulco
+accede
+accelerate
+accelerometer
+accent
+accentual
+accentuate
+accept
+acceptant
+acceptor
+access
+accessible
+accession
+accessory
+.H 4 "hej hopp"
+accident
+accidental
+accipiter
+acclaim
+acclamation
+acclimate
+accolade
+accommodate
+accompaniment
+accompanist
+accompany
+accomplice
+accomplish
+accord
+accordant
+accordion
+accost
+account
+accountant
+Accra
+accredit
+accreditate
+accreditation
+accretion
+accrual
+accrue
+acculturate
+accumulate
+accuracy
+accurate
+accusation
+accusative
+accusatory
+accuse
+accustom
+ace
+acerbic
+acerbity
+acetate
+acetic
+acetone
+acetylene
+ache
+achieve
+Achilles
+aching
+achromatic
+acid
+acidic
+acidulous
+.H 5 "hej hopp"
+Ackerman
+Ackley
+acknowledge
+acknowledgeable
+ACM
+acme
+acolyte
+acorn
+acoustic
+acquaint
+acquaintance
+acquiesce
+acquiescent
+acquire
+acquisition
+acquisitive
+acquit
+acquittal
+acquitting
+acre
+acreage
+acrid
+acrimonious
+acrimony
+acrobacy
+acrobat
+acrobatic
+acronym
+acropolis
+across
+acrylate
+acrylic
+ACS
+act
+Actaeon
+actinic
+actinide
+actinium
+actinolite
+actinometer
+activate
+activation
+activism
+Acton
+actor
+actress
+Acts
+actual
+actuarial
+actuate
+.H 6 "hej hopp"
+acuity
+acumen
+acute
+acyclic
+ad
+Ada
+adage
+adagio
+Adair
+Adam
+adamant
+Adams
+Adamson
+adapt
+adaptation
+adaptive
+add
+added
+addend
+addenda
+addendum
+addict
+Addis
+Addison
+addition
+additional
+additive
+addle
+address
+addressee
+Addressograph
+adduce
+Adelaide
+Adele
+Adelia
+Aden
+adenine
+adenoma
+adenosine
+adept
+adequacy
+adequate
+adhere
+adherent
+adhesion
+adhesive
+adiabatic
+adieu
+adipic
+Adirondack
+.H 7 "hej hopp"
+adjacent
+adject
+adjectival
+adjective
+adjoin
+adjoint
+adjourn
+adjudge
+adjudicate
+adjunct
+adjust
+adjutant
+Adkins
+Adler
+administer
+administrable
+administrate
+administratrix
+admiral
+admiralty
+admiration
+admire
+admissible
+admission
+admit
+admittance
+admitted
+admitting
+admix
+admixture
+admonish
+admonition
+ado
+adobe
+adolescent
+Adolph
+Adolphus
+Adonis
+adopt
+adoption
+adoptive
+adore
+adorn
+adposition
+adrenal
+adrenaline
+Adrian
+Adriatic
+Adrienne
+adrift
+adroit
+adsorb
+adsorbate
+adsorption
+adsorptive
+adulate
+adult
+adulterate
+adulterous
+adultery
+adulthood
+advance
+advantage
+advantageous
+advent
+adventitious
+adverse
+advert
+advertise
+advice
+advisable
+advise
+advisee
+advisor
+advisory
+advocacy
+advocate
+Aegean
+aegis
+Aeneas
+Aeneid
+aeolian
+Aeolus
+aerate
+aerial
+Aerobacter
+aerobic
+aerodynamic
+aerogene
+aeronautic
+aerosol
+aerospace
+Aeschylus
+aesthete
+aesthetic
+.H 1 "hej hopp"
+acuity
+acumen
+acute
+acyclic
+ad
+Ada
+adage
+adagio
+Adair
+Adam
+adamant
+Adams
+Adamson
+adapt
+adaptation
+adaptive
+add
+added
+addend
+addenda
+addendum
+addict
+Addis
+Addison
+addition
+additional
+additive
+addle
+address
+addressee
+Addressograph
+adduce
+Adelaide
+Adele
+Adelia
+Aden
+adenine
+adenoma
+adenosine
+adept
+adequacy
+adequate
+adhere
+adherent
+adhesion
+adhesive
+adiabatic
+adieu
+adipic
+Adirondack
+.H 2 "hej hopp"
+adjacent
+adject
+adjectival
+adjective
+adjoin
+adjoint
+adjourn
+adjudge
+adjudicate
+.H 2 "hej hopp"
+adjunct
+adjust
+adjutant
+Adkins
+Adler
+administer
+administrable
+administrate
+administratrix
+admiral
+admiralty
+admiration
+admire
+admissible
+admission
+admit
+admittance
+admitted
+admitting
+admix
+admixture
+admonish
+admonition
+ado
+adobe
+adolescent
+Adolph
+Adolphus
+Adonis
+adopt
+adoption
+adoptive
+adore
+adorn
+adposition
+adrenal
+adrenaline
+Adrian
+Adriatic
+Adrienne
+adrift
+adroit
+adsorb
+adsorbate
+adsorption
+adsorptive
+adulate
+adult
+adulterate
+adulterous
+adultery
+adulthood
+advance
+advantage
+advantageous
+advent
+adventitious
+adverse
+advert
+advertise
+advice
+advisable
+advise
+advisee
+advisor
+advisory
+advocacy
+advocate
+Aegean
+aegis
+Aeneas
+Aeneid
+aeolian
+Aeolus
+aerate
+aerial
+Aerobacter
+aerobic
+aerodynamic
+aerogene
+aeronautic
+aerosol
+aerospace
+Aeschylus
+aesthete
+aesthetic
+.RP 0 1
+.TC
diff --git a/contrib/mm/examples/SETR b/contrib/mm/examples/SETR
new file mode 100644
index 0000000..e2fcbd5
--- /dev/null
+++ b/contrib/mm/examples/SETR
@@ -0,0 +1,116 @@
+.\" -*- nroff -*-
+.\" Copyright (C) 1989-2014 Free Software Foundation, Inc.
+.\"
+.\" Copying and distribution of this file, with or without modification,
+.\" are permitted in any medium without royalty provided the copyright
+.\" notice and this notice are preserved.
+.
+.nr Cl 6
+.INITR setr
+.H 1 " granary grand grandchild grandchildren granddaughter grandeur"
+.SETR ref1
+.H 2 "grandfather grandiloquent grandiose grandma grandmother grandnephew"
+.H 2 "grandniece grandpa grandparent grandson grandstand granite granitic"
+.H 2 "granny granola grant grantee grantor granular granulate"
+.SETR ref2
+.H 2 "granule Granville grape"
+grant
+grantee
+grantor
+granular
+granulate
+.br
+granule
+.B
+REF 9:
+.GETHN ref9
+, page number
+.GETPN ref9
+.R
+Granville
+grape
+.br
+grapefruit
+grapevine
+graph
+grapheme
+graphic
+graphite
+\fBExhibit\fP
+.GETHN ex1
+
+grapple
+grasp
+grass
+grassland
+grassy
+grata
+grate
+.H 2 "grapefruit grapevine graph grapheme graphic graphite"
+.H 3 "grapple"
+.SETR ref3
+.H 3 "grasp grass grassland grassy grata grate grateful"
+.H 3 "grater gratify gratis gratitude"
+.H 4 "gratuitous gratuity grave"
+.H 4 "gravel graven"
+.SETR ref4
+.H 1 "Graves gravestone graveyard gravid gravitate gravy gray"
+.H 2 "graybeard grayish Grayson graywacke graze grease greasy great greatcoat"
+.H 2 "greater grebe Grecian Greece greed greedy Greek green Greenbelt Greenberg"
+.H 2 "Greenblatt Greenbriar Greene greenery"
+.SETR ref5
+.H 1 "Greenfield greengrocer greenhouse greenish Greenland Greensboro"
+.H 1 "greensward greenware Greenwich greenwood Greer greet"
+grant
+grantee
+.DS
+
+Advertisements contain the only truths to be relied on in a newspaper.
+ -- Thomas Jefferson
+.EX fortune "" "" ex1
+.DE
+grantor
+granular
+.GETR ref1
+granulate
+granule
+.H 2 "Using variables"
+.B
+REF 2:
+.GETHN ref2 c
+.GETPN ref2 bbb
+\*c, page number \*[bbb]
+.R
+Granville
+grape
+grapefruit
+grapevine
+graph
+grapheme
+.H 2 "Greg gregarious Gregg Gregory gremlin grenade Grendel"
+.H 2 "Grenoble Gresham Greta Gretchen"
+.SETR ref6
+.H 2 "grew"
+.H 1 "grey greyhound greylag grid griddle gridiron grief"
+.H 1 "grievance grieve grievous griffin Griffith grill grille grilled grillwork"
+.H 3 "grim grimace Grimaldi grime Grimes Grimm grin grind grindstone"
+.H 3 "grip gripe grippe grisly grist gristmill Griswold grit"
+.SETR ref7
+.H 3 "gritty grizzle grizzly groan groat grocer grocery groggy groin"
+.H 1 "grommet groom groove grope grosbeak gross Grosset Grossman Grosvenor grotesque"
+.H 1 "Groton ground groundsel groundskeep groundwork group groupoid"
+.H 4 "grout grove grovel Grover grow growl grown grownup growth grub grubby"
+.H 4 "grudge gruesome gruff grumble Grumman grunt gryphon g's"
+.SETR ref8
+.H 4 "GSA GU Guam guanidine guanine guano guarantee guaranteeing guarantor"
+.H 4 "guaranty"
+.H 1 "guard guardhouse Guardia guardian Guatemala gubernatorial Guelph Guenther"
+.H 1 "guerdon guernsey guerrilla guess guesswork guest guffaw Guggenheim"
+.SETR ref9
+.H 1 "Guiana guidance guide guidebook guideline guidepost guiding"
+.H 1 "guignol"
+.GETR ref6
+.H 1 "guild guildhall guile Guilford guillemot guillotine guilt"
+.SETR ref10
+.H 1 "guilty guinea guise guitar gules gulf gull Gullah"
+.H 1 "gullet gullible gully gulp gum gumbo gumdrop gummy gumption"
diff --git a/contrib/mm/examples/letter.mm b/contrib/mm/examples/letter.mm
new file mode 100644
index 0000000..3683849
--- /dev/null
+++ b/contrib/mm/examples/letter.mm
@@ -0,0 +1,51 @@
+.\" Set a blank page header; our letter is a single page and does not
+.\" require the default numbering.
+.PH '''
+.\" Set point size to 14.
+.S 14
+.\" Set paragraph type to "indented".
+.nr Pt 1
+.\" Put the date in a right-aligned display.
+.DS R
+30 May 2021
+.DE
+.\" Start display (left-aligned).
+.DS
+Mr. Ty Coon
+President of Vice, Intellectual Property and Licensing
+Very Big Corporation of America
+Silly Valley, CA 94043
+.\" End display.
+.DE
+Dear Mr. Coon,
+.
+.
+.\" Start new paragraph.
+.P
+I would like to request that your wholly-owned subsidiary,
+Yoyodyne, Inc.,
+disclaim all copyright interest in the program `Gnomovision'
+(which makes passes at compilers)
+written by Juliet Hacker prior to her employment with Yoyodyne.
+.
+.
+.P
+Our colleagues at the Software Freedom Conservancy have determined and
+informed us that Ms.\& Hacker's employment agreement is a contract of
+adhesion.
+.
+.
+.P
+Thank you for your prompt attention to this matter.
+.
+.
+.\" Put the closing and signature in a right-aligned display as well.
+.DS R
+Sincerely yours,
+.\" Leave three "vees" (3 text line heights) of room for signature.
+.SP 3v
+.
+.
+Tracy T.\& Jordan
+.DE
+.\" vim: set noexpandtab textwidth=72:
diff --git a/contrib/mm/groff_mm.7.man b/contrib/mm/groff_mm.7.man
new file mode 100644
index 0000000..4f94191
--- /dev/null
+++ b/contrib/mm/groff_mm.7.man
@@ -0,0 +1,5428 @@
+'\" t
+.TH groff_mm @MAN7EXT@ "@MDATE@" "groff @VERSION@"
+.SH Name
+groff_mm \- memorandum macros for GNU
+.I roff
+.
+.
+.\" ====================================================================
+.\" Legal Terms
+.\" ====================================================================
+.\"
+.\" Copyright (C) 1989-2023 Free Software Foundation, Inc.
+.\"
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of
+.\" this manual under the conditions for verbatim copying, provided that
+.\" the entire resulting derived work is distributed under the terms of
+.\" a permission notice identical to this one.
+.\"
+.\" Permission is granted to copy and distribute translations of this
+.\" manual into another language, under the above conditions for
+.\" modified versions, except that this permission notice may be
+.\" included in translations approved by the Free Software Foundation
+.\" instead of in the original English.
+.
+.
+.\" Save and disable compatibility mode (for, e.g., Solaris 10/11).
+.do nr *groff_groff_mm_7_man_C \n[.cp]
+.cp 0
+.
+.\" Define fallback for groff 1.23's MR macro if the system lacks it.
+.nr do-fallback 0
+.if !\n(.f .nr do-fallback 1 \" mandoc
+.if \n(.g .if !d MR .nr do-fallback 1 \" older groff
+.if !\n(.g .nr do-fallback 1 \" non-groff *roff
+.if \n[do-fallback] \{\
+. de MR
+. ie \\n(.$=1 \
+. I \%\\$1
+. el \
+. IR \%\\$1 (\\$2)\\$3
+. .
+.\}
+.rr do-fallback
+.
+.
+.\" ====================================================================
+.SH Synopsis
+.\" ====================================================================
+.
+.SY "groff \-m@TMAC_M_PREFIX@m"
+.RI [ option\~ .\|.\|.\&]
+.RI [ file\~ .\|.\|.]
+.
+.SY "groff \-m m@TMAC_M_PREFIX@m"
+.RI [ option\~ .\|.\|.\&]
+.RI [ file\~ .\|.\|.]
+.YS
+.
+.
+.\" ====================================================================
+.SH Description
+.\" ====================================================================
+.
+The GNU implementation of the
+.I mm
+macro package is part of the
+.I groff
+document formatting system.
+.
+The
+.I mm
+package is suitable for the composition of
+letters,
+memoranda,
+reports,
+and books.
+.
+.
+.P
+Call an
+.I mm
+macro at the beginning of a document to initialize the package.
+.
+A simple
+.I mm
+document might use only
+.B P
+for paragraphing.
+.
+Set numbered and unnumbered section headings with
+.B H
+and
+.BR HU ,
+respectively.
+.
+Change the style of the typeface with
+.BR B ,
+.BR I ,
+and
+.BR R ;
+you can alternate styles with
+.BR BI ,
+.BR BR ,
+.BR IB ,
+.BR IR ,
+.BR RB ,
+and
+.BR RI .
+.
+Several nestable list types are available via
+.BR AL ,
+.BR BL ,
+.BR BVL ,
+.BR DL ,
+.BR ML ,
+.BR RL ,
+and
+.BR VL ;
+each of these begins a list,
+to which
+.B LI
+adds an item and
+.B LE
+ends the (nested) list.
+.
+Customized list arrangements are supported by
+.BR LB .
+.
+.B DS
+and
+.B DF
+start static and floating displays,
+respectively;
+either is terminated with
+.BR DE .
+.
+.
+.P
+.I groff mm
+is intended to be compatible with the
+.I mm
+implementation found in the AT&T Documenter's Workbench (DWB),
+with the following limitations.
+.
+.
+.IP \[bu] 2n
+Omitted features include
+the logo and company name strings,
+.B }Z
+and
+.BR ]S ,
+respectively;
+the encoded company site location addresses recognized as the third
+argument to the
+.B AU
+macro;
+the
+.B Pv
+(\[lq]private\[rq] heading)
+register;
+and the
+.B OK
+(other keywords),
+and
+.B PM
+(proprietary markings)
+macros.
+.
+.
+.IP \[bu] 2n
+The
+.B CS
+(output cover sheet)
+macro is implemented only for memorandum type 4.
+.
+.
+.IP \[bu]
+The
+.I grap
+preprocessor is not explicitly supported;
+no
+.B G1
+and
+.B G2
+macros
+are defined.
+.
+.
+.IP \[bu]
+The registers
+.BR A ,
+.BR C ,
+.BR E ,
+.BR T ,
+and
+.BR U ,
+typically set from the
+.I troff \" generic
+or
+.I nroff \" generic
+command lines with DWB
+.IR mm ,
+are not recognized.
+.
+.
+.IP \[bu]
+When setting the registers
+.B L
+or
+.B W
+from the command line,
+use an explicit scaling unit to avoid surprises.
+.
+.
+.IP \[bu]
+DWB
+.IR mm 's
+.B nP
+macro indented the second line of a paragraph to align it with the start
+of the text of the first
+(after the paragraph number);
+.IR "groff mm" 's
+does not.
+.
+.
+.IP \[bu]
+Cut marks are not supported.
+.
+.
+.P
+DWB
+.I mm
+supported only seven levels of heading.
+.
+As a compatible extension,
+.I groff mm
+supports fourteen,
+introducing new registers
+.B H8
+through
+.BR H14 ,
+and affecting the interpretation of the
+.B HF
+and
+.B HP
+strings.
+.
+.
+.P
+Macro,
+register,
+and string descriptions in this page frequently mention each other;
+most cross references are to macros.
+.
+Where a register or string is referenced,
+its type is explicitly identified.
+.
+.IR mm 's
+macro names are usually in full capitals;
+registers and strings tend to have mixed-case names.
+.
+.
+.\" ====================================================================
+.SS "Document styles"
+.\" ====================================================================
+.
+.I groff mm
+offers three different frameworks for document organization.
+.
+.BR \%COVER /\: \%COVEND
+is a flexible means of preparing any document requiring a cover page.
+.
+.BR LT / LO
+aids preparation of typical Anglophone correspondence
+(business letters,
+for example).
+.
+The
+.B MT
+memorandum type mechanism implements a group of formal styles
+historically used by AT&T Bell Laboratories.
+.
+Your document can select at most one of these approaches;
+when used,
+each disables the others.
+.
+.
+.\" ====================================================================
+.SS Localization
+.\" ====================================================================
+.
+.I groff mm
+is designed to be easily localized.
+.
+For languages other than English,
+strings that can appear in output are collected in the file
+.IR @MACRODIR@/\: xx \:.tmac ,
+where
+.I xx
+is an ISO\~639 two-letter language identifier.
+.
+Localization packages should be loaded after
+.IR mm ;
+for example,
+you might format a Swedish
+.I mm
+document with the command
+.RB \[lq] "groff \-mm \-msv" \[rq].
+.
+.
+.P
+This package can also be localized by site or territory;
+for example,
+.I @MACRODIR@/\:@TMAC_M_PREFIX@mse\:.tmac
+illustrates how to adapt the output to a national standard using its ISO
+3166 territory code.
+.
+Such a package can define a string that causes a macro file
+.IR @MACRODIR@/\:mm/\:\% territory _locale
+to be loaded at package initialization.
+.
+If this mechanism is not used,
+.I @MACRODIR@/\:mm/\:\%locale
+is loaded instead.
+.
+No diagnostic is produced if these files do not exist.
+.
+.
+.\" ====================================================================
+.SS "Registers and strings"
+.\" ====================================================================
+.
+Much
+.I mm
+behavior can be configured by registers and strings.
+.
+A register is assigned with the
+.B nr
+request.
+.
+.
+.RS
+.P
+.B .nr
+.I ident
+.RB [ \[+-] ]\c
+.I n
+.RI [ i ]
+.RE
+.
+.
+.P
+.I ident
+is the name of the register,
+and
+.IR n \~is
+the value to be assigned.
+.
+.IR n \~can
+be prefixed with a plus or minus sign if incrementation or
+decrementation (respectively) of the register's existing value
+.RI by\~ n
+is desired.
+.
+If assignment of a (possibly) negative
+.IR n \~is
+required,
+further prefix it with a zero or enclose it in parentheses.
+.
+If
+.IR i \~is
+specified,
+the register is automatically modified
+.RI by \~i
+prior to interpolation if a plus or minus sign is included in the escape
+sequence as follows.
+.
+.
+.RS
+.P
+.B \[rs]n\c
+.RB [ \[+-] ]\c
+.BI [ ident ]
+.RE
+.
+.
+.P
+.IR i \~can
+be negative;
+it combines algebraically with the sign in the interpolation escape
+sequence.
+.
+.
+.P
+Strings are defined with the
+.B ds
+request.
+.
+.
+.RS
+.P
+.B .ds
+.I ident contents
+.RE
+.
+.
+.P
+.I contents
+consumes everything up to the end of the line,
+including trailing spaces.
+.
+It is a good practice to end
+.I contents
+with a comment escape sequence
+.RB ( \[rs]\[dq] )
+so that extraneous spaces do not intrude during document maintenance.
+.
+To include leading spaces in
+.IR contents ,
+prefix it with a double quote.
+.
+Strings are interpolated with the
+.B \[rs]*
+escape sequence.
+.
+.
+.RS
+.P
+.B \[rs]*\c
+.BI [ ident ]
+.RE
+.
+.
+.P
+Register and string name spaces are distinct,
+but strings and macros share a name space.
+.
+Defining a string with the same name as an
+.I mm
+macro is not supported and may cause incorrect rendering,
+the emission of diagnostic messages,
+and an error exit status from
+.IR @g@troff .
+.
+.
+.\" ====================================================================
+.SS "Register format"
+.\" ====================================================================
+.
+A register is interpolated using Arabic numerals if no other format has
+been assigned to it.
+.
+Assign a format to a register with the
+.B af
+request.
+.
+.
+.RS
+.LP
+.BI .af\~ "R c"
+.RE
+.
+.
+.LP
+.IR R \~is
+the name of the register,
+and
+.IR c \~is
+the format.
+.
+If
+.IR c \~is
+a sequence of Arabic numerals,
+their quantity defines a zero-padded minimum width for the interpolated
+register value.
+.
+.
+.RS
+.LP
+.TS
+tab(@);
+lb lb
+l l.
+Form@Sequence
+1@0, 1, 2, 3, .\|.\|., 10, .\|.\|.
+001@000, 001, 002, 003, .\|.\|., 1000, .\|.\|.
+i@0, i, ii, iii, iv, .\|.\|.
+I@0, I, II, III, IV, .\|.\|.
+a@0, a, b, c, .\|.\|., z, aa, ab, .\|.\|.
+A@0, A, B, C, .\|.\|., Z, AA, AB, .\|.\|.
+.TE
+.RE
+.
+.
+.\" ====================================================================
+.SS Fonts
+.\" ====================================================================
+.
+In
+.IR "groff mm" ,
+the fonts
+(or rather,
+font styles)
+.BR R \~(roman),
+.BR I \~(italic),
+and
+.BR B \~(bold)
+are mounted at font positions
+.BR 1 ,
+.BR 2 ,
+.RB and\~ 3 ,
+respectively.
+.
+Internally,
+font positions are used for backward compatibility.
+.
+From a practical point of view,
+it doesn't make a big difference\[em]a different font family can still
+be selected by invoking
+.IR groff 's
+.B fam
+request or using its
+.B \-f
+command-line option.
+.
+On the other hand,
+if you want to replace just,
+for example,
+.RB font\~ I
+with Zapf Chancery Medium italic
+(available on
+.IR groff 's
+.B pdf
+and
+.B ps
+output devices),
+you have to use the
+.B fp
+request,
+replacing the font at position\~2 with
+.RB \[lq] .fp\~2\~ZCMI \[rq]).
+.
+Because the cover sheet,
+memorandum type,
+and
+.MR @g@refer @MAN1EXT@
+integration macros explicitly request fonts named
+.BR B ,
+.BR I ,
+and
+.BR R ,
+you will also need to remap these font names with the
+.B ftr
+request,
+for instance with
+.RB \[lq] .ftr\~I\~ZCMI \[rq].
+.
+.
+.\" ====================================================================
+.SH Macros
+.\" ====================================================================
+.
+An explicitly empty argument may be specified with a pair of double
+quotes;
+to call a macro
+.B XX
+with an empty second argument but non-empty first and third ones,
+you could input the following.
+.
+.
+.P
+.RS
+.EX
+\&.XX foo \[dq]\[dq] baz
+.EE
+.RE
+.
+.
+.P
+Macro names longer than two characters are GNU extensions;
+some shorter names were not part of DWB
+.IR mm 's
+published interface but are documented aspects of
+.I groff mm.
+.
+.
+.TP
+.BI )E\ "level text"
+Add heading text
+.I text
+to the table of contents with
+.IR level ,
+which is either\~0 or in the range 1 to\~7.
+.
+See also
+.BR H .
+.
+This undocumented DWB
+.I mm
+macro is exposed by
+.I groff mm
+to enable customized tables of contents.
+.
+.
+.TP
+.BR 1C\~ [ 1 ]
+Format page text in one column.
+.
+The page is broken.
+.
+.RB A\~ 1
+argument suppresses this break;
+its use may cause body text and a pending footnote to overprint.
+.
+See
+.BR 2C ,
+.BR MC ,
+and
+.BR NCOL .
+.
+.
+.TP
+.B 2C
+Begin two-column formatting.
+.
+This is a special case of
+.BR MC .
+.
+See
+.B 1C
+and
+.BR NCOL .
+.
+.
+.TP
+.B AE
+Abstract end;
+stop collecting abstract text.
+.
+See
+.BR AS .
+.
+.
+.\" In DWB mm, the mnemonic for `AF` was "alternate first-page format",
+.\" and was described in the context of the `A` and `E` registers and
+.\" `}Z` and `]S` strings, none of which we support.
+.TP
+.BR AF \~[\c
+.IR firm-name ]
+Specify firm associated with the document.
+.
+At most one can be declared;
+the firm name is used by memorandum types and available to cover sheets.
+.
+.B AF
+terminates a document title started with
+.BR TL ,
+and can be called without an argument for that purpose.
+.
+See
+.B MT
+and
+.BR COVER .
+.
+.
+.TP
+.BR AL \~[\c
+.IR type \~[ text-indent \~[\c
+.BR 1 ]]]
+Begin an auto-incrementing numbered list.
+.
+Item numbers start at one.
+.
+The
+.I type
+argument assigns the register format
+(see above)
+of the list item enumerators.
+.
+The default
+.RB is\~ 1 .
+.
+An explicitly empty
+.I type
+also indicates the default.
+.
+A
+.I text-indent
+argument overrides register
+.BR Li .
+.
+A third argument suppresses the blank line that normally precedes each
+list item.
+.
+Use
+.B LI
+to declare list items,
+and
+.B LE
+to end the list.
+.
+.
+.TP
+.BR APP \~\c
+.RI [ id\~ [ title ]]
+Begin an appendix.
+.
+If the identifier
+.I id
+is omitted,
+it is incremented
+(or initialized,
+if necessary).
+.
+The register format used for
+.I id
+is \[lq]A\[rq].
+.
+The page is broken.
+.
+The register
+.B Aph
+determines whether an appendix heading is then formatted.
+.
+This heading uses the string
+.B App
+followed by
+.IR id .
+.
+Appendices appear in any table of contents
+(see
+.BR TC ).
+.
+The string
+.B Apptxt
+is set to
+.I title
+if the latter is present,
+and made empty otherwise.
+.
+.
+.TP
+.BI APPSK\~ "id n" \~\c
+.RI [ title ]
+As
+.BR APP ,
+but increment the page number by
+.IR n .
+.
+Use this macro to \[lq]skip pages\[rq] when diagrams or other materials
+not formatted by
+.I @g@troff
+are included in appendices.
+.
+.
+.TP
+.BR AS\~ [\c
+.IR placement \~[ indentation ]]
+Abstract start;
+begin collecting abstract.
+.
+Input up to the next
+.B AE
+call is included in the abstract.
+.
+.I placement
+influences the location of the abstract on the cover sheet of a
+memorandum
+(see
+.BR MT ).
+.
+.BR \%COVER ,
+by contrast,
+ignores
+.I placement
+by default,
+but can be customized to interpret it.
+.
+.
+.IP
+.TS
+tab(@);
+lf(BI) lb
+l lx.
+placement@Effect
+0@T{
+The abstract appears on page\~1 and cover sheet if the document is a
+\[lq]released paper\[rq] memorandum
+.RB (\[lq] ".MT 4" \[rq]);
+otherwise,
+it appears on page\~1 without a cover sheet.
+T}
+1@T{
+The abstract appears only on the cover sheet
+.RB (\[lq] ".MT 4" \[rq]
+only).
+T}
+.\" XXX: This does not appear to be implemented.
+.\"2@T{
+.\"The abstract is printed only on the cover sheet (if not
+.\".BR ".MT 4" )
+.\".
+.\"The cover sheet is printed without a need for \fBCS\fP.
+.\"T}
+.TE
+.
+.
+.IP
+An abstract does not appear at all in external letters
+.RB (\[lq] ".MT 5" \[rq]).
+.
+.RI A\~ placement
+of
+.B 2
+was supported by DWB
+.I mm
+but is not by
+.IR "groff mm" .
+.
+.
+.IP
+A second argument increases the indentation by
+.I indentation
+and reduces the line length by twice this amount.
+.
+A scaling unit of ens is assumed.
+.
+The default is\~0.
+.
+.
+.\" XXX: Do we need a macro for this? Why is it not a string like App
+.\" or Licon? It is usefully localizable.
+.TP
+.BR AST \~\c
+.RI [ caption ]
+Set the caption above the abstract to
+.IR caption ,
+or clear it if there is no argument.
+.
+The default is \[lq]ABSTRACT\[rq].
+.
+.
+.TP
+.BI AT\~ title\c
+\~.\|.\|.
+Specify author's title(s).
+.
+If present,
+.B AT
+must appear just after the corresponding author's
+.BR AU .
+.
+Each
+.I title
+occupies an output line beneath the author's name in the signature block
+used by
+.B LT
+letters
+(see
+.BR SG )
+and in
+.B MT
+memoranda.
+.
+The
+.B ms
+cover sheet style also uses it.
+.
+.
+.br
+.ne 7v
+.TP
+.BR AU \~\c
+.RI [ name\~\c
+.RI [ initials\~\c
+.RI [ loc\~\c
+.RI [ dept\~\c
+.RI [ ext\~\c
+.RI [ room\~\c
+.RI [ arg1\~\c
+.RI [ arg2\~\c
+.RI [ arg3 ]]]]]]]]]
+Specify author.
+.
+.B AU
+terminates a document title started with
+.BR TL ,
+and can be called without arguments for that purpose.
+.
+Author information is used by cover sheets,
+.B MT
+memoranda,
+and
+.BR SG .
+.
+Further arguments comprise
+initials,
+location,
+department,
+telephone extension,
+room number or name,
+and up to three additional items.
+.
+Repeat
+.B AU
+to identify multiple authors.
+.
+.
+.IP
+Use
+.BR WA / WE
+instead to identify the author for documents employing
+.BR LT .
+.
+.
+.TP
+.BR AV \~[\c
+.IR name \~[\c
+.BR 1 ]]
+Format approval lines for a handwritten signature and date.
+.
+Two horizontal rules are drawn,
+with the specified
+.I name
+and the text of the string
+.B Letdate
+beneath them.
+.
+Above these rules,
+the text in the string
+.B Letapp
+is formatted;
+a second argument replaces this text with a blank line.
+.
+See
+.BR LT .
+.
+.
+.\" XXX: AVL is misnamed; it should have been called SGL or similar.
+.TP
+.BR AVL \~[\c
+.IR name ]
+As
+.BR AV ,
+but the date,
+date rule,
+and approval notation
+.B Letapp
+are omitted.
+.
+.
+.TP
+.BR B \~\c \" space in roman; we must use 2-font macro with \c
+.RI [ bold-text\~\c
+.RI [ previous-font-text ]]\~.\|.\|.
+Join
+.I bold-text
+in boldface with
+.I previous-font-text
+in the previous font,
+without space between the arguments.
+.
+If no arguments,
+switch font to bold style.
+.
+.
+.TP
+.B B1
+Begin boxed,
+kept display.
+.
+The text is indented one character,
+and the right margin is one character shorter.
+.
+This is a GNU extension.
+.
+.
+.TP
+.B B2
+End boxed,
+kept display.
+.
+This is a GNU extension.
+.
+.
+.TP
+.B BE
+End bottom block; see
+.BR BS .
+.
+.
+.TP
+.BR BI \~\c \" space in roman; we must use 2-font macro with \c
+.RI [ bold-text\~\c
+.RI [ italic-text ]]\~.\|.\|.
+Join
+.I bold-text
+in boldface with
+.I italic-text
+in italics,
+without space between the arguments.
+.
+.
+.TP
+.BR BL \~[\c
+.IR text-indent \~[\c
+.BR 1 ]]
+Begin bulleted list.
+.
+Items are prefixed with a bullet and a space.
+.
+A
+.I text-indent
+argument overrides register
+.BR Pi .
+.
+A second argument suppresses blank lines between items.
+.
+Use
+.B LI
+to declare list items,
+and
+.B LE
+to end the list.
+.
+.
+.TP
+.BR BR \~\c \" space in roman; we must use 2-font macro with \c
+.RI [ bold-text\~\c
+.RI [ roman-text ]]\~.\|.\|.
+Join
+.I bold-text
+in boldface with
+.I roman-text
+in roman style,
+without space between the arguments.
+.
+.
+.TP
+.B BS
+Begin bottom block.
+.
+Input is collected until
+.B BE
+is called,
+and output between the footnote area and footer of each page.
+.
+.
+.\" XXX: Couldn't this have been done with an extra parameter to `VL`?
+.\" Or a register influencing VL behavior?
+.TP
+.BR BVL \~[\c
+.IR text-indent \~[ mark-indent \~[\c
+.BR 1 ]]]
+Begin broken variable-item
+(or \[lq]tagged\[rq])
+list.
+.
+Each item is expected to supply its own mark.
+.
+The line is always broken after the mark;
+contrast
+.BR VL .
+.
+.I text-indent
+sets the indentation of the text,
+and
+.I mark-indent
+the distance from the current list indentation to the mark.
+.
+A third argument suppresses the blank line that normally precedes each
+list item.
+.
+Use
+.B LI
+to declare list items,
+and
+.B LE
+to end the list.
+.
+.
+.TP
+.BR \%COVER \~\c \" space in roman; we must use 2-font macro with \c
+.RI [ style ]
+Begin a cover page description.
+.
+.B \%COVER
+must appear before the body text
+(or main matter)
+of a document.
+.
+The argument
+.I style
+is used to construct the file name
+.IR @TMAC_MDIR@/\: style \:.cov
+and load it with the
+.B mso
+request.
+.
+The default
+.I style
+is
+.BR ms ;
+the
+.I ms.cov
+file prepares a cover page resembling those of the
+.I ms
+package.
+.
+A
+.I .cov
+file must define a
+.B \%COVEND
+macro,
+which a document must call at the end of the cover description.
+.
+Use cover description macros in the following order;
+only
+.B TL
+and
+.B AU
+are required.
+.
+.
+.IP
+.EX
+\&.COVER
+\&.TL
+\&.AF
+\&.AU
+\&.AT
+\&.AS
+.ne 2v
+\&.AE
+\&.COVEND
+.EE
+.
+.
+.TP
+.B COVEND
+End the cover description.
+.
+.
+.TP
+.B DE
+End static or floating display begun with
+.B DS
+or
+.BR DF .
+.
+.
+.TP
+.BR DF\~ [\c
+.IR format \~[ fill \~[ right-indentation ]]]
+Begin floating display.
+.
+A floating display is saved in a queue and output in the order entered.
+.
+Arguments are handled as in
+.BR DS .
+.
+Floating displays cannot be nested.
+.
+Placement of floating displays is controlled by the registers
+.B De
+and
+.BR Df .
+.
+.
+.TP
+.BR DL \~[\c
+.IR text-indent \~[\c
+.BR 1 ]]
+Begin dashed list.
+.
+Items are prefixed with an em dash and a space.
+.
+A
+.I text-indent
+argument overrides register
+.BR Pi .
+.
+A second argument suppresses blank lines between items.
+.
+Use
+.B LI
+to declare list items,
+and
+.B LE
+to end the list.
+.
+.
+.TP
+.BR DS \~[\c
+.IR format \~[\c
+.IR fill \~[\c
+.IR right-indentation ]]]
+Begin static display.
+.
+Input until
+.B DE
+is called is collected into a display.
+.
+The display is output on a single page unless it is taller than the
+height of the page.
+.
+.B DS
+can be nested
+(contrast with
+.BR DF ).
+.
+.
+.IP
+.TS
+tab(@);
+Lf(BI) Lb
+L Lx.
+format@Effect
+\f[I]none\f[]@Do not indent the display.
+L@Do not indent the display.
+I@T{
+Indent text by
+.BR \[rs]n[Si] .
+T}
+C@Center each line.
+CB@Center the whole display as a block.
+R@Right-adjust the lines.
+RB@Right-adjust the whole display as a block.
+.TE
+.
+.
+.IP
+The values \[lq]L\[rq],
+\[lq]I\[rq],
+\[lq]C\[rq],
+and \[lq]CB\[rq] can also be specified as \[lq]0\[rq],
+\[lq]1\[rq],
+\[lq]2\[rq],
+and
+\[lq]3\[rq],
+respectively,
+for compatibility with
+.RI DWB\~ mm.
+.
+.
+.IP
+.TS
+tab(@);
+Lf(BI) Lb
+L Lx.
+fill@Effect
+\f[I]none\f[]@Disable filling.
+N@Disable filling.
+F@Enable filling.
+.TE
+.
+.
+.IP
+\[lq]N\[rq] and \[lq]F\[rq] can also be specified as \[lq]0\[rq] and
+\[lq]1\[rq],
+respectively,
+for compatibility with
+.RI DWB\~ mm.
+.
+.
+.IP
+A third argument
+reduces the line length by
+.I right-indentation.
+.
+.
+.IP
+.I mm
+normally
+places blank lines before and after the display.
+.
+Set register
+.B Ds
+to\~0 to suppress these.
+.
+.
+.TP
+.BR EC \~\c
+.RI [ title \~[ override \~[ flag \~[ refname ]]]]
+Caption an equation.
+.
+The caption consists of the string
+.B Liec
+followed by an automatically incrementing counter stored in the register
+.BR Ec ,
+punctuation configured by the register
+.BR Of ,
+then
+.I title
+(if any).
+.
+Use the
+.B af
+request to configure
+.BR Ec 's
+number format.
+.
+.I override
+and
+.I flag
+alter the equation number as follows.
+.
+Omitting
+.I flag
+and specifying
+.B 0
+in its place are equivalent.
+.
+.
+.IP
+.TS
+tab(@);
+Lf(BI) Lb
+L Lx.
+flag@Effect
+0@T{
+Prefix number with
+.IR override .
+T}
+1@T{
+Suffix number with
+.IR override .
+T}
+2@T{
+Replace number with
+.IR override .
+T}
+.TE
+.
+.
+.IP
+Equation captions are centered irrespective of the alignment of any
+enclosing display.
+.
+.
+.IP
+.I refname
+stores the equation number using
+.BR SETR ;
+it can be retreived with
+.RB \[lq] .GETST
+.IR refname \[rq].
+.
+This argument is a GNU extension.
+.
+.
+.IP
+Captioned equations are listed in a table of contents
+(see
+.BR TC )
+if the Boolean register
+.B Le
+is true.
+.
+Such a list uses the string
+.B Le
+as a heading.
+.
+.
+.TP
+.BR EF\~ [ \[dq]\|\[aq]\c
+.IB left \[aq] center \[aq] right \[aq]\|\[dq]\c
+]
+Define the even-page footer,
+which is formatted just above the normal page footer on even-numbered
+pages.
+.
+See
+.BR PF .
+.
+.B EF
+defines the string
+.BR EOPef .
+.
+.
+.TP
+.BR EH\~ [ \[dq]\|\[aq]\c
+.IB left \[aq] center \[aq] right \[aq]\|\[dq]\c
+]
+Define the even-page header,
+which is formatted just below the normal page header on even-numbered
+pages.
+.
+See
+.BR PH .
+.
+.B EH
+defines the string
+.BR TPeh .
+.
+.
+.TP
+.B EN
+End equation input preprocessed by
+.MR @g@eqn @MAN1EXT@ ;
+see
+.BR EQ .
+.
+.
+.TP
+.B EOP
+If defined,
+this macro is called in lieu of normal page footer layout.
+.
+Headers and footers are formatted in a separate environment.
+.
+See
+.BR TP .
+.
+.
+.IP
+.TS
+tab(@);
+Cb S
+Lb L.
+Strings available to EOP
+_
+EOPf@argument to \fBPF\fP
+EOPef@argument to \fBEF\fP
+EOPof@argument to \fBOF\fP
+.TE
+.
+.
+.TP
+.BI EPIC\ "\fR[\fP\fB\-L\fP\fR]\fP width height \fR[\fPname\fR]\fP"
+Draw a box with the given
+.I width
+and
+.IR height .
+.
+It also prints the text
+.I name
+or a default string if
+.I name
+is not specified.
+.
+This is used to include external pictures;
+just give the size of the picture.
+.
+.B \-L
+left-aligns the picture;
+the default is to center.
+.
+See
+.BR PIC .
+.
+.
+.TP
+.BR EQ \~[\c
+.IR label ]
+Start equation input preprocessed by
+.MR @g@eqn @MAN1EXT@ .
+.
+.B EQ
+and
+.B EN
+macro calls bracket an equation region.
+.
+Such regions must be contained in displays
+.RB ( DS / DE ),
+except when the region is used only to configure
+.I @g@eqn
+and not to produce output.
+.
+If present,
+.I label
+appears aligned to the right and
+centered vertically within the display;
+see register
+.BR Eq .
+.
+.
+If multiple
+.I eqn \" generic
+regions occur within a display,
+only the last
+.I label
+(if any)
+is used.
+.
+.
+.TP
+.BR EX \~\c
+.RI [ title \~[ override \~[ flag \~[ refname ]]]]
+Caption an exhibit.
+.
+Arguments are handled analogously to
+.BR EC .
+.
+The register
+.B Ex
+is the exhibit counter.
+.
+The string
+.B Liex
+precedes the exhibit number and any
+.I title.
+.
+Exhibit captions are centered irrespective of the alignment of any
+enclosing display.
+.
+.
+.IP
+Captioned exhibits are listed in a table of contents
+(see
+.BR TC )
+if the Boolean register
+.B Lx
+is true.
+.
+Such a list uses the string
+.B Lx
+as a heading.
+.
+.
+.TP
+.BR FC \~[\c
+.IR closing-text ]
+Output the string
+.BR Letfc ,
+or the specified
+.I closing-text,
+as the formal closing of a letter.
+.
+.
+.TP
+.BR FD \~[\c
+.IR arg \~[\c
+.BR 1 ]]
+Configure display of footnotes.
+.
+The first argument encodes enablement of
+automatic hyphenation,
+adjustment to the right margin,
+indentation of footnote text,
+and left- vs.\& right-alignment of the footnote label within the space
+allocated for it.
+.
+.
+.br
+.ne 5v
+.IP
+.\" XXX: We can fit one more row using "nokeep" vs. not using it.
+.TS
+tab(@) nokeep;
+Lf(BI) Lb Lb Lb Lb
+L L L L L.
+arg@Hyphenate?@Adjust?@Indent?@Label alignment
+0@no@yes@yes@left
+1@yes@yes@yes@left
+2@no@no@yes@left
+3@yes@no@yes@left
+4@no@yes@no@left
+5@yes@yes@no@left
+6@no@no@no@left
+7@yes@no@no@left
+8@no@yes@yes@right
+9@yes@yes@yes@right
+10@no@no@yes@right
+11@yes@no@yes@right
+.TE
+.
+.
+.IP
+An
+.I arg
+greater than 11 is treated
+.RB as\~ 0 .
+.
+.IR mm 's
+default
+.RB is\~ 0 .
+.
+.
+.IP
+If a second argument,
+conventionally
+.BR 1 ,
+is given,
+footnote numbering is reset when a first-level heading is encountered.
+.
+See
+.BR FS .
+.
+.
+.TP
+.B FE
+End footnote;
+see
+.BR FS .
+.
+.
+.TP
+.BR FG \~\c
+.RI [ title \~[ override \~[ flag \~[ refname ]]]]
+Caption a figure.
+.
+Arguments are handled analogously to
+.BR EC .
+.
+The register
+.B Fg
+is the figure counter.
+.
+The string
+.B Lifg
+precedes the figure number and any
+.I title.
+.
+Figure captions are centered irrespective of the alignment of any
+enclosing display.
+.
+.
+.IP
+Captioned figures are listed in a table of contents
+(see
+.BR TC )
+if the Boolean register
+.B Lf
+is true.
+.
+Such a list uses the string
+.B Lf
+as a heading.
+.
+.
+.TP
+.BR FS \~[\c
+.IR label ]
+Start footnote.
+.
+Input until
+.B FE
+is called is collected into a footnote.
+.
+By default,
+footnotes are automatically numbered starting at 1;
+the number is available in register
+.B :p
+and,
+with a trailing period,
+in
+.RB string\~ F .
+.
+This string precedes the footnote text at the bottom of the column or
+page.
+.
+Footnotes are vertically separated by the product of
+.RB registers\~ Fs
+and
+.BR Lsp .
+.
+In
+.IR "groff mm" ,
+footnotes may be used in displays.
+.
+.
+.IP
+A
+.I label
+argument replaces the contents of the string
+.BR F ;
+it need not be numeric.
+.
+In this event,
+the footnote marker in the body text must be explicitly written.
+.
+.
+.TP
+.BI GETHN\ "refname \fR[\fPvarname\fR]\fP"
+Include the heading number where the corresponding
+.RB \[lq] .SETR
+.IR refname \[rq]
+was placed.
+.
+This is displayed as \[lq]X.X.X.\[rq] in pass\~1.
+.
+See
+.BR INITR .
+.
+If
+.I varname
+is used,
+.B GETHN
+sets the string
+.I varname
+to the heading number.
+.
+.TP
+.BI GETPN\ "refname \fR[\fPvarname\fR]\fP"
+Include the page number where the corresponding
+.RB \[lq] .SETR
+.IR refname \[rq]
+was placed.
+.
+This is displayed as \[lq]9999\[rq] in pass\~1.
+.
+See
+.BR INITR .
+.
+If
+.I varname
+is used,
+.B GETPN
+sets the string
+.I varname
+to the page number.
+.
+.TP
+.BI GETR\ refname
+Combine
+.B GETHN
+and
+.B GETPN
+with the text \[lq]chapter\[rq] and \[lq],\~page\[rq].
+.
+The string
+.B Qrf
+contains the text for the cross reference:
+.
+.RS
+.IP
+\&.ds Qrf See chapter \[rs]\[rs]*[Qrfh], page \[rs]\[rs]*[Qrfp].
+.RE
+.
+.IP
+.B Qrf
+may be changed to support other languages.
+.
+Strings
+.B Qrfh
+and
+.B Qrfp
+are set by
+.B GETR
+and contain the page and heading number,
+respectively.
+.
+.TP
+.BI GETST\ "refname \fR[\fPvarname\fR]\fP"
+Include the string saved with the second argument to
+.BR .SETR .
+.
+This is a dummy string in pass\~1.
+.
+If
+.I varname
+is used,
+.B GETST
+sets it to the saved string.
+.
+See
+.BR INITR .
+.
+.
+.TP
+.BI H\~ level\~\c
+.RI [ title \~[ suffix ]]
+Set a numbered section heading at
+.IR level .
+.
+.I mm
+produces numbered
+.I "heading marks"
+of the form
+.IR a . b . c .\|.\|.,
+with up to fourteen levels of nesting.
+.
+Each level's number increases automatically with each
+.B H
+call and is reset to zero when a more significant
+.I level
+is specified.
+.
+.RB \[lq] 1 \[rq]\~is
+the most significant or coarsest division of the document.
+.
+Text after an
+.B H
+call is formatted as a paragraph;
+calling
+.B P
+is unnecessary.
+.
+.
+.IP
+.I title
+specifies an optional title;
+it must be double-quoted if it contains spaces.
+.
+.I mm
+appends
+.I suffix
+to
+.I title
+in the body of the document,
+but omits it from any table of contents
+(see
+.BR TC ).
+.
+This facility can be used to annotate the heading title with a footnote.
+.
+.I suffix
+should not interpolate
+.RB the\~ F
+string;
+specify a footnote mark explicitly.
+.
+See
+.BR FS .
+.
+.
+.IP
+Heading behavior is highly configurable.
+.
+Several registers set a
+.I threshold,
+where heading levels at or below the threshold value are handled in one
+way,
+and those above it another.
+.
+For example,
+a heading level within the threshold of register
+.B Cl
+is included in the table of contents
+(see
+.BR TC ).
+.
+.
+.IP
+.I Heading layout.
+.
+Register
+.B Ej
+sets a threshold for page breaking (ejection) prior to a heading.
+.
+If not preceded by a page break,
+a heading level below the threshold in register
+.B Hps
+is preceded by the amount of vertical space in register
+.BR Hps1 ,
+and by the amount in
+.B Hps2
+otherwise.
+.
+The
+.B Hb
+register sets a threshold below which a break occurs after the heading,
+and register
+.B Hs
+sets a threshold below which vertical space follows it.
+.
+If the heading level is not less than both of these,
+a
+.I run-in heading
+is produced;
+paragraph text follows on the same output line.
+.
+Otherwise,
+register
+.B Hi
+configures the indentation of text after headings.
+.
+Threshold register
+.B Hc
+enables the centering of headings;
+a heading level below both of the
+.B Hb
+and
+.B Hc
+thresholds is centered.
+.
+.
+.IP
+.I Heading typeface and size.
+.
+The fonts used for heading numbers and titles at each level are
+configured by the
+.B HF
+string.
+.
+The string
+.B HP
+likewise assigns a type size to each heading level.
+.
+.\" XXX: Why not an "Hvs" string?
+The vertical spacing used by headings may be controlled by
+the user-definable macros
+.B HX
+and/or
+.BR HZ .
+.
+.
+.IP
+.I Heading number format.
+.
+Registers named
+.B H1
+through
+.B H14
+store counters for each heading level.
+.
+Their values are printed using Arabic numerals by default;
+see
+.BR HM .
+.
+The heading levels are catenated with dots for formatting;
+to typeset only the deepest,
+set the
+.B Ht
+register.
+.
+Heading numbers are not suffixed with a trailing dot except when only
+the first level is output;
+to omit a dot in this case as well,
+clear the
+.B H1dot
+register.
+.
+.
+.IP
+.I Customizing heading behavior.
+.
+.I mm
+calls
+.I hook
+macros to enable further customization of headings.
+.
+(DWB
+.I mm
+called these \[lq]exits\[rq].)
+.
+They can be used to change the heading's
+.I mark
+(the numbered portion before any heading title),
+its vertical spacing,
+and its vertical space requirements
+(for instance,
+to require a minimum quantity of subsequent output lines).
+.
+Define hook macros in expectation of the following parameters.
+.
+The argument
+.I declared-level
+is the
+.I level
+argument to
+.BR H ,
+.RB or\~ 0
+for unnumbered headings (see
+.BR HU ).
+.
+.I actual-level
+is the same as
+.I declared-level
+for numbered headings,
+and the value of
+.RB register\~ Hu
+for unnumbered headings.
+.
+.I title
+is the corresponding argument to
+.B H
+or
+.BR HU .
+.
+.
+.RS
+.TP
+.BI HX\~ "declared-level actual-level title"
+.I mm
+calls
+.B HX
+before setting the heading.
+.
+Your definition may alter
+.BR }0 ,
+.BR }2 ,
+and
+.BR ;3 .
+.
+.
+.\" XXX: These names are ugly and of no obvious meaning. Make
+.\" documented aliases for them.
+.RS
+.TP
+.BR }0\~ (string)
+contains the heading mark plus two spaces if
+.I declared-level
+is non-zero,
+and otherwise is empty.
+.
+.
+.TP
+.BR ;0\~ (register)
+encodes a position for the text after the heading.
+.
+0\~means that the heading is to be run in,
+1\~means that a break is to occur before the text,
+and 2\~means that vertical space is to separate heading and text.
+.
+.
+.TP
+.BR }2\~ (string)
+is the suffix that separates a run-in heading from the text.
+.
+It contains two spaces if register
+.B ;0
+is\~0,
+and otherwise is empty.
+.
+.
+.TP
+.BR ;3\~ (register)
+contains the vertical space required for the heading to be typeset.
+.
+If that amount is not available,
+the page is broken prior to the heading.
+.
+The default is
+.BR 2v .
+.RE
+.
+.
+.TP
+.BI HY\~ "declared-level actual-level title"
+.I mm
+calls
+.B HY
+after determing the heading typeface and size.
+.
+It could be used to change indentation.
+.
+.
+.TP
+.BI HZ\~ "declared-level actual-level title"
+.I mm
+calls
+.B HZ
+after formatting the heading,
+just before
+.B H
+or
+.B HU
+returns.
+.
+It could be used to change the page header to include a section heading.
+.\" XXX: ...but only for the _next_ page, not the current one. See
+.\" Savannah #62825.
+.RE
+.
+.
+.TP
+.BI HC\ \fR[\fPhyphenation-character\fR]\fP
+Set hyphenation character.
+.
+Default value is \[lq]\[rs]%\[rq].
+.
+Resets to the default if called without argument.
+.
+Hyphenation can be turned off by setting register
+.B Hy
+to\~0 at the beginning of the file.
+.
+.
+.TP
+.BI HM\ "\fR[\fParg1 \fR[\fParg2 \fR[.\|.\|.\& [\fParg14\fR]]]]\fP"
+Set the heading mark style.
+.
+Each argument assigns the specified register format
+(see above)
+to the corresponding heading level.
+.
+The default
+.RB is\~ 1
+for all levels.
+.
+An explicitly empty argument also indicates the default.
+.
+.
+.TP
+.BI HU\~ heading-text
+Set an unnumbered section heading.
+.
+Except for a heading number,
+it is treated as a numbered heading of the level stored in
+.RB register\~ Hu ;
+.RB see\~ H .
+.
+.
+.TP
+.BR I \~\c \" space in roman; we must use 2-font macro with \c
+.RI [ italic-text\~\c
+.RI [ previous-font-text ]]\~.\|.\|.
+Join
+.I italic-text
+in italics with
+.I previous-font-text
+in the previous font,
+without space between the arguments.
+.
+If no arguments,
+switch font to italic style.
+.
+.
+.TP
+.BR IA \~[\c
+.IR recipient-name \~[\c
+.IR title ]]
+Specify the inside address in a letter.
+.
+Input is collected into the inside address until
+.B IE
+is called,
+and then output.
+.
+You can specify multiple recipients with empty
+.BR IA / IE
+pairs;
+only the last address is used.
+.
+The arguments give each recipient a name and title.
+.
+See
+.BR LT .
+.
+.
+.TP
+.BR IB \~\c \" space in roman; we must use 2-font macro with \c
+.RI [ italic-text\~\c
+.RI [ bold-text ]]\~.\|.\|.
+Join
+.I italic-text
+in italics with
+.I bold-text
+in boldface,
+without space between the arguments.
+.
+.
+.TP
+.B IE
+End the inside address begun with
+.BR IA .
+.
+.
+.TP
+.BI IND\~ argument\~\c
+\&.\|.\|.
+If the Boolean register
+.B Ref
+is true,
+write an index entry as a specially prepared
+.I roff
+comment to the standard error stream,
+with each
+.I argument
+separated from its predecessor by a tab character.
+.
+The entry's location information is arranged as configured by the most
+recent
+.B INITI
+call.
+.
+.
+.TP
+.B INDP
+Output the index set up by
+.B INITI
+and populated by
+.B IND
+calls.
+.
+By default,
+.B INDP
+calls
+.B SK
+and writes a centered caption interpolating the string
+.BR Index .
+.
+It then disables filling and calls
+.BR 2C ;
+afterward,
+it restores filling and calls
+.BR 1C .
+.
+.
+.IP
+Define macros to customize this behavior.
+.
+.B INDP
+calls
+.B TXIND
+before the caption,
+.B TYIND
+.I instead
+of writing the caption,
+and
+.B TZIND
+after formatting the index.
+.
+.
+.TP
+.BI INITI\~ "location-type file-name\~"\c
+.RI [ macro ]
+Initialize
+.IR "groff mm" 's
+indexing system.
+.
+Argument
+.I location-type
+selects how the location of each index entry is reported.
+.
+.I file-name
+populates an internal string used later by
+.BR INDP .
+.
+.
+.IP
+.TS
+tab(@);
+Lf(BI) Lb
+L Lx.
+location-type@Entry format
+N@page number
+H@heading mark
+B@page number, tab character, heading mark
+.TE
+.
+.
+.IP
+If
+.I macro
+is specified,
+it is called for each index entry
+with the arguments given to
+.BR IND .
+.
+.
+.TP
+.BI INITR\~ id
+Initialize the cross reference macros.
+.
+Cross references are written to the standard error stream,
+which should be redirected into a file named
+.RI id .qrf .
+.
+.MR mmroff @MAN1EXT@
+handles this and the two formatting passes it requires.
+.\".
+.\"This program exists because
+.\".MR groff @MAN1EXT@
+.\"by default deactivates the unsafe operations that are required by
+.\".BR INITR .
+.
+The first pass identifies cross references,
+and the second one includes them.
+.\"
+.\".B INITR
+.\"can be used several times,
+.\"but it is only the first occurrence of
+.\".B INITR
+.\"that is active.
+.
+.
+.IP
+See
+.BR SETR ,
+.BR GETPN ,
+and
+.BR GETHN .
+.
+.
+.TP
+.BR IR \~\c \" space in roman; we must use 2-font macro with \c
+.RI [ italic-text\~\c
+.RI [ roman-text ]]\~.\|.\|.
+Join
+.I italic-text
+in italics with
+.I roman-text
+in roman style,
+without space between the arguments.
+.
+.
+.TP
+.BR ISODATE\~ [ 0 ]
+Use ISO\~8601 format for the date string
+.B DT
+used by some cover sheet and memorandum types;
+that is,
+.IR YYYY - MM - DD .
+.
+Must be called before
+.B ND
+to be effective.
+.
+If given an argument
+.RB of\~ 0,
+the traditional date format for the
+.I groff
+locale is used;
+this is also the default.
+.
+.
+.TP
+.BI LB\~ "text-indent mark-indent pad type"\~\c
+.RI [ mark \~[ pre-item-space \~[ pre-list-space ]]]
+Begin list.
+.
+The macros
+.BR AL ,
+.BR BL ,
+.BR BVL ,
+.BR DL ,
+.BR ML ,
+.BR RL ,
+and
+.B VL
+call
+.B LB
+in various ways;
+they are simpler to use and may be preferred if they suit the desired
+purpose.
+.
+.
+.br
+.ne 5v
+.IP
+The nesting level of lists is tracked by
+.I mm;
+the outermost level is\~0.
+.
+The text of each list item is indented by
+.I text-indent;
+the default is taken from the
+.B Li
+register
+(in ens).
+.
+Each item's mark is indented by
+.I mark-indent;
+the default is
+.BR 0n .
+.
+The mark is normally left-aligned.
+.
+If
+.I pad
+is greater than zero,
+.I mark-indent
+is overridden such that
+.I pad
+ens of space follow the mark.
+.
+.I type
+selects one of six possible ways to display the mark.
+.
+.
+.IP
+.TS
+tab(@);
+Lf(BI) Lb
+L L.
+type@Output for a mark \[lq]x\[rq]
+1@x.
+2@x)
+3@(x)
+4@[x]
+5@<x>
+6@{x}
+.TE
+.
+.
+.IP
+If
+.I type
+is\~0 and
+.I mark
+is unspecified,
+the items are set with a hanging indent.
+.
+Otherwise,
+.I mark
+is interpreted as a string defining the mark.
+.
+If
+.I type
+is greater than zero,
+items are automatically numbered;
+.I mark
+is interpreted as a register format.
+.
+The default
+.I type
+.RB is\~ 0 .
+.
+.
+.IP
+The last two arguments manage vertical space.
+.
+Unless a list's nesting level is greater than the value of register
+.BR Ls ,
+its items are preceded by
+.I pre-item-space
+multiplied by the register
+.BR Lsp ;
+the default
+.RB is\~ 1 .
+.
+.B LB
+precedes the list by
+.I pre-list-space
+multiplied by the register
+.BR Lsp ;
+the default
+.RB is\~ 0 .
+.
+.
+.TP
+.BR LC \~[\c
+.IR list-level ]
+Clear list state.
+.
+Active lists are terminated as if with
+.BR LE ,
+either all
+(the default)
+or only those from the current level down to
+.I list-level
+if specified.
+.
+.B H
+calls
+.B LC
+automatically.
+.
+.
+.TP
+.BR LE \~[ 1 ]
+End list.
+.
+The current list is terminated.
+.
+An argument
+.RB of\~ 1
+causes
+vertical space in the amount of register
+.B Lsp
+to follow the list.
+.
+.
+.TP
+.BR LI \~[\c
+.IR mark \~[ item-mark-mode ]]
+Begin a list item.
+.
+Input is collected into a list item until the current list is terminated
+or
+.B LI
+is called again.
+.
+By default,
+the item's text is preceded by any mark configured by the current list.
+.
+If only
+.I mark
+is specified,
+it replaces the configured mark.
+.
+A second argument
+prefixes
+.I mark
+to the configured mark;
+an
+.I item-mark-mode
+value of\~1 places an unbreakable space after
+.I mark,
+while
+a value of\~2 does not
+(rendering the two adjacent).
+.
+Also see register
+.BR Limsp .
+.
+.
+.TP
+.BI LO\~ option\~\c
+.RI [ value ]
+Specify letter options;
+see
+.BR LT .
+.
+Standard options are as follows.
+.
+See
+.B IA
+regarding the inside address and string
+.B DT
+regarding the date.
+.
+.
+.IP
+.TS
+tab(@);
+Lf(BI) Lb
+L Lx.
+option@Effect
+AT@T{
+Attention;
+put contents of string
+.B LetAT
+and
+.I value
+left-aligned after the inside address.
+T}
+CN@T{
+Confidential;
+put
+.I value,
+or contents of string
+.BR LetCN ,
+left-aligned after the date.
+T}
+RN@T{
+Reference;
+put contents of string
+.B LetRN
+and
+.I value
+after the confidental notation
+(if any)
+and the date,
+aligned with the latter.
+T}
+SA@T{
+Salutation;
+put
+.I value,
+or contents of string
+.BR LetSA ,
+left-aligned after the inside address
+and the confidental notation
+(if any).
+T}
+SJ@T{
+Subject;
+put contents of string
+.B LetSJ
+and
+.I value
+left-aligned after the inside address
+and the attention and salutation notations
+(if any).
+.
+In letter type \[lq]SP\[rq],
+.B LetSJ
+is ignored and
+.I value
+is set in full capitals.
+T}
+.TE
+.
+.
+.br
+.ne 5v
+.TP
+.BR LT \~[\c
+.IR style ]
+Format a letter in the designated
+.I style,
+defaulting to
+.B BL
+(see below).
+.
+A letter begins with the writer's address
+.RB ( WA / WE ),
+followed by the date
+.RB ( ND ),
+the inside address
+.RB ( IA / IE ),
+the body of the letter
+.RB ( P
+and other general-purpose
+.I mm
+macros),
+the formal closing
+.RB ( FC ),
+the signature
+.RB ( SG ),
+and notations
+.RB ( NS / NE ).
+.
+Any of these may be omitted.
+.
+Letter options specified with
+.B LO
+add further annotations,
+which are extensible;
+see section \[lq]Internals\[rq] below.
+.
+.
+.br
+.ne 6v
+.IP
+.TS
+tab(@);
+Lf(BI) Lb
+Lb Lx.
+style@Description
+BL@T{
+Blocked:
+the writer's address,
+date,
+formal closing,
+and signature are indented to the center of the line.
+.
+Everything else is left-aligned.
+T}
+SB@T{
+Semi-blocked:
+as
+.BR BL ,
+but the first line of each paragraph is indented by
+.BR 5m .
+.\" XXX: https://savannah.gnu.org/bugs/?64315
+T}
+FB@T{
+Fully blocked:
+everything begins at the left margin.
+T}
+SP@T{
+Simplified:
+as
+.BR FB ,
+but a formal closing is omitted,
+and the signature is set in full capitals.
+T}
+.TE
+.
+.
+.TP
+.BI MC\~ column-width\~\c
+.RI [ gutter-width ]
+Begin multi-column layout.
+.
+.I groff mm
+creates as many columns of
+.I column-width
+as the line length will permit.
+.
+.I gutter-width
+is the interior spacing between columns.
+.
+It defaults to
+.IR column-width /15.
+.
+.B 1C
+returns to single-column layout.
+.
+.B MC
+is a GNU extension.
+.
+See
+.B MULB
+for an alternative.
+.
+.
+.TP
+.BI ML\~ "mark \fR[\fPtext-indent\~" \fR[\fP1\fR]]\fP
+Start a list with the
+.I mark
+argument preceding each list item.
+.
+.I text-indent
+overrides the default indentation of the list items set by register
+.BR Li .
+.
+If a third argument,
+conventionally
+.BR 1 ,
+is given,
+the blank line that normally precedes each list item is suppressed.
+.
+Use
+.B LI
+to declare list items,
+and
+.B LE
+to end the list.
+.
+.
+.TP
+.BR MT \~\c \" space in roman; we must use 2-font macro with \c
+.RI [ type \~[ addressee ]]
+Select memorandum type.
+.
+These correspond to formats used by AT&T Bell Laboratories,
+where the
+.I mm
+package was initially developed,
+affecting the document layout.
+.
+Some of these included a cover page with a caption categorizing the
+document.
+.
+.I groff mm
+uses
+.I type
+to construct the file name
+.IR @TMAC_MDIR@/\:\% type \:.MT
+and load it with the
+.B mso
+request.
+.
+Memorandum types 0 to\~5 are supported;
+any other value of
+.I type
+is mapped to type\~6.
+.
+If
+.I type
+is omitted,
+.B 0
+is implied.
+.
+.I addressee
+sets a string analogous to one used by AT&T cover sheet macros that are
+not implemented in
+.IR "groff mm" .
+.
+.
+.IP
+.TS
+tab(@);
+Lf(BI) Lb
+L L.
+type@Description
+0@normal memorandum; no caption
+1@captioned \[lq]MEMORANDUM FOR FILE\[rq]
+2@captioned \[lq]PROGRAMMER'S NOTES\[rq]
+3@captioned \[lq]ENGINEER'S NOTES\[rq]
+4@released paper
+5@external letter
+.TE
+.
+.
+.IP
+See
+.B \%COVER
+for a more flexible cover sheet mechanism.
+.
+.
+.TP
+.BI MOVE\ "y-pos \fR[\fPx-pos \fR[\fPline-length\fR]]\fP"
+Move to a position, setting page offset to
+.IR x-pos .
+.
+If
+.I line-length
+is not given, the difference between current and new page offset is
+used.
+.
+Use
+.B PGFORM
+without arguments to return to normal.
+.
+.
+.TP
+.BR MULB \~\c \" space in roman; we must use 2-font macro with \c
+.IR "cw1 space1\~" [ "cw2 space2" "] .\|.\|.\~" cwn
+Begin alternative multi-column mode.
+.
+All column widths must be specified,
+as must the amount of space between each column pair.
+.
+The arguments' default scaling unit is
+.BR n .
+.
+.B MULB
+uses a diversion and operates in a separate environment.
+.
+.
+.TP
+.B MULN
+Begin next column in alternative column mode.
+.
+.
+.TP
+.B MULE
+End alternative multi-column mode and emit the columns.
+.
+.
+.TP
+.B NCOL
+Move to the start of the next column
+(only when using
+.B 2C
+or
+.BR MC ).
+.
+Contrast with
+.BR MULN .
+.
+.
+.TP
+.BR ND \~[\c
+.IR arg ]
+Set the document's date.
+.
+.I mm
+does not interpret
+.IR arg ;
+it can be a revision identifier
+(or empty).
+.
+.
+.TP
+.B NE
+End notation begun with
+.BR NS ;
+filling is enabled.
+.
+.
+.TP
+.BI nP\ \fR[\fPtype\fR]\fP
+Begin a numbered paragraph at heading level two.
+.
+See
+.BR P .
+.
+.
+.br
+.ne 6v
+.TP
+.BR NS \~[\c
+.IR code \~[\c
+.BR 1 ]]
+Declare notations,
+typically for letters or memoranda,
+of the type specified by
+.IR code .
+.
+The text corresponding to
+.I code
+is output,
+and filling is disabled
+until
+.B NE
+is called.
+.
+Typically,
+a list of names or attachments lies within
+.BR NS / NE .
+.
+If
+.I code
+is absent or does not match one of the values listed under the
+.B Letns
+string description below,
+each line of notations is formatted as
+.RI "\[lq]Copy (" line ") to\[rq]."
+.
+If a second argument,
+conventionally
+.BR 1 ,
+is given,
+.I code
+becomes the entire notation and
+.B NE
+is not necessary.
+.
+In
+.IR "groff mm" ,
+you can set up further notations to be recognized by
+.BR NS ;
+see the strings
+.B Letns
+and
+.B Letnsdef
+below.
+.
+.
+.TP
+.BR OF\~ [ \[dq]\|\[aq]\c
+.IB left \[aq] center \[aq] right \[aq]\|\[dq]\c
+]
+Define the odd-page footer,
+which is formatted just above the normal page footer on odd-numbered
+pages.
+.
+See
+.BR PF .
+.
+.B OF
+defines the string
+.BR EOPof .
+.
+.
+.TP
+.BR OH\~ [ \[dq]\|\[aq]\c
+.IB left \[aq] center \[aq] right \[aq]\|\[dq]\c
+]
+Define the odd-page header,
+which is formatted just below the normal page header on odd-numbered
+pages.
+.
+See
+.BR PH .
+.
+.B OH
+defines the string
+.BR TPoh .
+.
+.
+.TP
+.B OP
+Make sure that the following text is printed at the top of an
+odd-numbered page.
+.
+Does not output an empty page if currently at the top of an odd page.
+.
+.
+.br
+.ne 4v
+.TP
+.BR P \~[\c
+.IR type ]
+Begin new paragraph.
+.
+If
+.I type
+is missing or\~ 0,
+.BR P \~sets
+the paragraph fully left\-aligned.
+.
+A
+.I type
+of\~1
+idents the first line by
+.B \[rs][Pi]
+ens.
+.
+Set the register
+.B Pt
+to select a default paragraph indentation style.
+.
+The register
+.B Ps
+controls the vertical spacing between paragraphs.
+.
+.
+.TP
+.B PE
+Picture end;
+see
+.MR @g@pic @MAN1EXT@ .
+.
+.
+.TP
+.BR PF\~ [ \[dq]\|\[aq]\c
+.IB left \[aq] center \[aq] right \[aq]\|\[dq]\c
+]
+Define the page footer.
+.
+The footer is formatted at the bottom of each page;
+the argument is otherwise as described in
+.BR PH .
+.
+.B PF
+defines the string
+.BR EOPf .
+.
+See
+.BR EF ,
+.BR OF ,
+and
+.BR EOP .
+.
+.TP
+.BI PGFORM\ "\fR[\fPlinelength \fR[\fPpagelength \fR[\fPpageoffset\ " \fR[\fP1\fR]]]]\fP
+Set line length, page length, and/or page offset.
+.
+This macro can be used for letterheads and similar.
+.
+It is normally the first macro call in a file,
+though it is not necessary.
+.
+.B PGFORM
+can be used without arguments to reset everything after a
+.B MOVE
+call.
+.
+A line break is done unless the fourth argument is given.
+.
+This can be used to avoid the page number on the first page
+while setting new width and length.
+.
+(It seems as if this macro sometimes doesn't work too well.
+.
+Use the command-line arguments to change
+line length, page length, and page offset instead.)
+.
+.TP
+.B PGNH
+Suppress header on the next page.
+.
+This macro must be called before any macros that produce output to
+affect the layout of the first page.
+.
+.
+.TP
+.BR PH\~ [ \[dq]\|\[aq]\c
+.IB left \[aq] center \[aq] right \[aq]\|\[dq]\c
+]
+.RS
+Define the page header,
+formatted at the top of each page,
+as the argument,
+where
+.IR left ,
+.IR center ,
+and
+.I right
+are aligned to the respective locations on the line.
+.
+A
+.RB \[lq] % \[rq]
+character in
+.I arg
+is replaced by the page number.
+.
+If the argument is absent,
+no page header is set.
+.
+The default page header is
+.
+.RS
+.EX
+\[dq]\[aq]\[aq]\- % \-\[aq]\[aq]\[dq]
+.EE
+.RE
+.
+which centers the page number between hyphens and formats nothing at the
+upper left and right.
+.
+Header macros call
+.B PX
+(if defined)
+after formatting the header.
+.
+.B PH
+defines the string
+.BR TPh .
+.
+See
+.BR EH ,
+.BR OH ,
+and
+.BR TP .
+.RE
+.
+.
+.TP
+.BR PIC \~\c
+.RB [ \-B ]\~\c
+.RB [ \-C |\c
+.BI \-I\~ n\c
+.RB | \-L \c
+.RB | \-R ]\~\c
+.IR file \~[ width \~[ height ]]
+Include PostScript document
+.IR file .
+.
+The optional
+.B \-B
+argument draws a box around the picture.
+.
+The optional
+.BR \-L ,
+.BR \-C ,
+.BR \-R ,
+and
+.BI \-I\~ n
+arguments align the picture or indent it by
+.I n
+(assuming a scaling unit of
+.BR m ).
+.
+By default,
+the picture is left-aligned.
+.
+Optional
+.I width
+and
+.I height
+arguments resize the picture.
+.
+Use of this macro requires two-pass processing;
+see
+.B INITR
+and
+.MR mmroff @MAN1EXT@ .
+.
+.
+.TP
+.B PS
+Picture start; see
+.MR @g@pic @MAN1EXT@ .
+.
+.
+.TP
+.B PY
+Picture end with flyback.
+.
+Ends a
+.MR @g@pic @MAN1EXT@
+picture,
+returning the vertical position to where it was prior to the picture.
+.
+This is a GNU extension.
+.
+.
+.TP
+.BR R \~\c \" space in roman; we must use 2-font macro with \c
+.RI [ roman-text\~\c
+.RI [ previous-font-text ]]\~.\|.\|.
+Join
+.I roman-text
+in roman style with
+.I previous-font-text
+in the previous font,
+without space between the arguments.
+.
+If no arguments,
+switch font to roman style.
+.
+.
+.TP
+.BR RB \~\c \" space in roman; we must use 2-font macro with \c
+.RI [ roman-text\~\c
+.RI [ bold-text ]]\~.\|.\|.
+Join
+.I roman-text
+in roman style with
+.I bold-text
+in boldface,
+without space between the arguments.
+.
+.
+.TP
+.BI RD\ "\fR[\fPprompt \fR[\fPdiversion \fR[\fPstring\fR]]]\fP"
+Read from standard input to diversion and/or string.
+.
+The text is saved in a diversion named
+.IR diversion .
+.
+Recall the text by writing the name of the diversion after a dot
+on an empty line.
+.
+A string is also defined if
+.I string
+is given.
+.
+.I Diversion
+and/or
+.I prompt
+can be empty (\[dq]\[dq]).
+.
+.TP
+.B RF
+Reference end.
+.
+Ends a reference definition and returns to normal processing.
+.
+See
+.BR RS .
+.
+.
+.TP
+.BR RI \~\c \" space in roman; we must use 2-font macro with \c
+.RI [ roman-text\~\c
+.RI [ italic-text ]]\~.\|.\|.
+Join
+.I roman-text
+in roman style with
+.I italic-text
+in italics,
+without space between the arguments.
+.
+.
+.TP
+.BR RL \~[\c
+.IR text-indent \~[\c
+.BR 1 ]]
+Begin reference list.
+.
+Each item is preceded by an automatically incremented number between
+square brackets;
+compare
+.BR AL .
+.
+.I text-indent
+changes the default indentation.
+.
+Use
+.B LI
+to declare list items,
+and
+.B LE
+to end the list.
+.
+A second argument,
+conventionally
+.BR 1 ,
+suppresses the blank line that normally precedes each list item.
+.
+.
+.TP
+.BR RP \~\c \" space in roman; we must use 2-font macro with \c
+.RI [ suppress-counter-reset \~[ page-ejection-policy ]]
+Format a reference page,
+listing items accumulated within
+.BR RS / RF
+pairs.
+.
+The reference counter is reset unless the first argument
+.RB is\~ 1 .
+.
+Normally,
+page breaks occur before and after the references are output;
+the register
+.B Rpe
+configures this behavior,
+and a second argument overrides its value.
+.
+.B TC
+calls
+.B RP
+automatically if references have accumulated.
+.
+.
+.IP
+References are list items,
+and thus are vertically separated
+(see
+.BR LB ).
+.
+Setting register
+.B Ls
+.RB to\~ 0
+suppresses this spacing.
+.
+The string
+.B Rp
+contains the reference page caption.
+.
+.
+.br
+.ne 5v
+.TP
+.BR RS \~[\c
+.IR reference-string ]
+Begin an automatically numbered reference definition.
+.
+By default,
+references are numbered starting at 1;
+the number is available in register
+.BR :R .
+.
+Interpolate the string
+.B Rf
+where the reference mark should be and write the reference between
+.BR RS / RF
+on an input line after the reference mark.
+.
+If
+.I reference-string
+is specified,
+.I "groff ms"
+also stores the reference mark in a string of that name,
+which can be interpolated as
+.BI \[rs]*[ reference-string ]
+subsequently.
+.
+.
+.TP
+.BR S \~[\c
+.IR type-size \~[ vertical-spacing ]]
+Set type size and vertical spacing.
+.
+Each argument is a
+.I groff
+measurement,
+using an appropriate scaling unit and an optional
+.B +
+or
+.B \-
+prefix to increment or decrement the current value.
+.
+An argument of
+.B P
+restores the previous value,
+.B C
+indicates the current value,
+and
+.B D
+requests the default.
+.
+An empty or omitted argument is treated as
+.BR P .
+.
+.
+.TP
+.BR SA \~\c
+.RI [ mode ]
+Set or restore the default enablement of adjustment.
+.
+Specify
+.B 0
+or
+.B 1
+as
+.I mode
+to set a document's default explicitly;
+.B 1
+is assumed by
+.IR mm .
+.
+Adjustment can be temporarily suspended with the
+.B na
+request.
+.
+When the
+.B H
+or
+.B HU
+macros are used to format a heading,
+or when
+.B SA
+is called without a
+.I mode
+argument,
+the default adjustment is restored.
+.
+.
+.TP
+.BI SETR\ "refname \fR[\fPstring\fR]\fP"
+Remember the current heading and page numbers as
+.IR refname .
+.
+Saves
+.I string
+if
+.I string
+is defined.
+.
+.I string
+is retrieved with
+.BR GETST .
+.
+See
+.BR INITR .
+.
+.TP
+.BI SG\ \fR[\fParg\ \fR[\fP1\fR]]\fP
+Signature line.
+.
+Prints the authors name(s) after the formal closing.
+.
+The argument is appended to the reference data, printed at either the
+first or last author.
+.
+The reference data is the location, department, and initials specified
+with
+.BR AU .
+.
+It is printed at the first author if the second argument is given,
+otherwise at the last.
+.
+No reference data is printed if the author(s) is specified through
+.BR WA / WE .
+.
+See section \[lq]Internals\[rq] below.
+.
+.
+.TP
+.BR SK \~\c
+.RI [ n ]
+Skip
+.I n
+pages.
+.
+If
+.I n
+is\~0 or omitted,
+the page is broken unless the drawing position is already at the top of
+a page.
+.
+Otherwise,
+.I n
+pages,
+blank except for any headers and footers,
+are printed.
+.
+.
+.br
+.ne 4v \" XXX: 3v should suffice
+.TP
+.BI SM\~ text\~\c
+.RI [ post ]
+.TQ
+.BI SM\~ "pre text post"
+Format
+.I text
+at a smaller type size,
+joined with any specified
+.I pre
+and
+.I post
+at normal size.
+.
+.
+.TP
+.BI SP\ \fR[\fPlines\fR]\fP
+Space vertically.
+.
+.I lines
+can have any scaling factor,
+like \[lq]3i\[rq] or \[lq]8v\[rq].
+.
+Several
+.B SP
+calls in a line only produces the maximum number of lines, not the sum.
+.
+.B SP
+is ignored also until the first text line in a page.
+.
+Add
+.B \[rs]&
+before a call to
+.B SP
+to avoid this.
+.
+.
+.TP
+.B TAB
+Reset tab stops to every 5\~ens.
+.
+.
+.br
+.ne 4v
+.TP
+.BR TB \~\c
+.RI [ title \~[ override \~[ flag \~[ refname ]]]]
+Caption a table.
+.
+Arguments are handled analogously to
+.BR EC .
+.
+The register
+.B Tb
+is the table counter.
+.
+The string
+.B Litb
+precedes the table number and any
+.I title.
+.
+Table captions are centered irrespective of the alignment of any
+enclosing display.
+.
+.
+.IP
+Captioned tables are listed in a table of contents
+(see
+.BR TC )
+if the Boolean register
+.B Lt
+is true.
+.
+Such a list uses the string
+.B Lt
+as a heading.
+.
+.
+.TP
+.BR TC \~\c
+.RI [ slevel\~\c
+.RI [ spacing\~\c
+.RI [ tlevel\~\c
+.RI [ tab\~\c
+.RI [ h1\~\c
+.RI [ h2\~\c
+.RI [ h3\~\c
+.RI [ h4\~\c
+.RI [ h5 ]]]]]]]]]
+Output table of contents.
+.
+This macro is normally the last called in the document.
+.
+It flushes any pending displays and,
+if any references are pending
+(see
+.BR RS ),
+calls
+.BR RP .
+.
+It then begins a new page with the contents caption,
+stored in the string
+.BR Licon ,
+centered at the top.
+.
+The entries follow after three vees of space.
+.
+Each entry is a
+saved section
+(number and)
+heading title
+(see the
+.B Cl
+register),
+along with its associated page number.
+.
+By default,
+an entry is indented by an amount corresponding to its heading level
+and the maximum heading length encountered at that heading level;
+if defined,
+the string
+.B Ci
+overrides these indentations.
+.
+Entries at heading levels up to and including
+.I slevel
+are preceded by
+.I spacing
+vees of space.
+.
+Entries at heading levels up to and including
+.I tlevel
+are followed by a leader and a right-aligned page number.
+.
+If the Boolean-valued
+.I tab
+argument is true,
+the leader is replaced with horizontal motion in the same amount.
+.
+For entries above heading level
+.IR tlevel ,
+the page number follows the heading text after a word space.
+.
+Each argument
+.IR h1 .\|.\|. h5
+appears in order on its own line,
+centered,
+above the contents caption.
+.
+Page numbering restarts at 1,
+in register format \[lq]i\[rq].
+.
+If the
+.B Oc
+register is true,
+numbering of these pages is suppressed.
+.
+.
+.IP
+If
+.B TC
+is called with at most four arguments,
+it calls the user-defined macro
+.B TX
+(if defined)
+prior to formatting the contents caption,
+and
+.B TY
+(if defined)
+.I instead
+of formatting the contents caption.
+.
+.
+.IP
+Analogous handling of lists of figures,
+tables,
+equations,
+and exhibits is achieved by defining
+.BI TX xx
+and
+.BI TY xx
+macros,
+where
+.I xx
+is \[lq]FG\[rq],
+\[lq]TB\[rq],
+\[lq]EC\[rq],
+or \[lq]EX\[rq],
+respectively.
+.
+Similarly,
+the strings
+.BR Lifg ,
+.BR Litb ,
+.BR Liex ,
+and
+.B Liec
+determine captions for their respective lists.
+.
+.
+.TP
+.B TE
+Table end.
+.
+See
+.BR TS .
+.
+.TP
+.B TH
+End table heading.
+.
+It is repeated after page breaks within a table.
+.
+See
+.BR TS .
+.
+The
+.B N
+argument supported by DWB
+.I mm
+is not implemented by
+.I "groff mm."
+.
+.
+.TP
+.BR TL \~[\c
+.IR charging-case-number \~[\c
+.IR filing-case-number ]]
+Begin document title.
+.
+Input is collected into the title until
+.B AF
+or
+.B AU
+is called,
+and output as directed by the cover page.
+.
+.I charging-case-number
+and
+.I filing-case-number
+are saved for use in memorandum types 0 and 5.
+.
+See
+.BR MT .
+.
+.
+.TP
+.BI TM\~ number\c
+\~.\|.\|.
+Declare technical memorandum number(s) used by
+.BR MT .
+.
+.
+.br
+.ne 6v
+.TP
+.B TP
+If defined,
+this macro is called in lieu of normal page header layout.
+.
+Headers and footers are formatted in a separate environment.
+.
+See
+.BR EOP .
+.
+.
+.IP
+.TS
+tab(@);
+Cb S
+Lb L.
+Strings available to TP
+_
+TPh@argument to \fBPH\fP
+TPeh@argument to \fBEH\fP
+TPoh@argument to \fBOH\fP
+.TE
+.
+.
+.TP
+.B TS \fR[\fPH\fR]\fP
+Table start.
+.
+Argument \[lq]H\[rq] tells
+.I mm
+that the table has a heading.
+.
+See
+.BR TE ,
+.BR TH ,
+and
+.MR @g@tbl @MAN1EXT@ .
+.
+.
+.TP
+.BR VERBON \~\c \" space in roman; we must use 2-font macro with \c
+.RI [ format \~[ type-size \~[ font ]]]
+Begin verbatim display,
+where characters have equal width.
+.
+.I format
+controls several parameters.
+.
+Add up the values of desired features;
+the default
+.RB is\~ 0 .
+.
+On typesetting devices,
+further arguments configure the
+.I type-size
+in scaled points,
+and the face
+.RI ( font );
+the default is
+.B CR
+(Courier roman).
+.
+.
+.IP
+.TS
+tab(@);
+lb lb
+l lx.
+Value@Effect
+1@Disable the formatter's escape character (\[rs]).
+2@Vertically space before the display.
+4@Vertically space after the display.
+8@T{
+Number output lines; call formatter's
+.B nm
+request with arguments in string
+.BR Verbnm .
+T}
+16@T{
+Indent by the amount stored in register
+.BR Verbin .
+T}
+.TE
+.
+.
+.TP
+.B VERBOFF
+End verbatim display.
+.
+.
+.TP
+.BR VL \~[\c
+.IR text-indent \~[ mark-indent \~[\c
+.BR 1 ]]]
+Begin variable-item
+(or \[lq]tagged\[rq])
+list.
+.
+Each item should supply its own mark,
+or tag.
+.
+If the mark is wider than
+.I mark-indent,
+one space separates it from subsequent text;
+contrast
+.BR BVL .
+.
+.I text-indent
+sets the indentation of the text,
+and
+.I mark-indent
+the distance from the current list indentation to the mark.
+.
+A third argument suppresses the blank line that normally precedes each
+list item.
+.
+Use
+.B LI
+to declare list items,
+and
+.B LE
+to end the list.
+.
+.
+.TP
+.BI "VM \fR[\fP\-T\fR] [\fP" "top \fR[\fPbottom\fR]]\fP"
+Vertical margin.
+.
+Increase the top and bottom margin by
+.I top
+and
+.IR bottom ,
+respectively.
+.
+If option
+.B \-T
+is specified, set those margins to
+.I top
+and
+.IR bottom .
+.
+If no argument is given, reset the margin to zero, or to the default
+(\[lq]7v 5v\[rq])
+if
+.B \-T
+is used.
+.
+It is highly recommended that macros
+.B TP
+and/or
+.B EOP
+are defined if using
+.B \-T
+and setting top and/or bottom margin to less than the default.
+.
+This undocumented DWB
+.I mm
+macro is exposed by
+.I groff mm
+to increase user control of page layout.
+.
+.
+.TP
+.BR WA \~[\c
+.IR writer's-name \~[\c
+.IR title ]]
+Specify the writer(s) of an
+.B LT
+letter.
+.
+Input is collected into the writer's address until
+.B WA
+is called,
+and then output.
+.
+You can specify multiple writers with empty
+.BR WA / WE
+pairs;
+only the last address is used.
+.
+The arguments give each writer a name and title.
+.
+.
+.TP
+.BR WC \~[\c
+.IR format \~.\|.\|.]
+Control width of footnotes and displays.
+.
+.
+.IP
+.RS
+.TS
+tab(@);
+Lf(BI) Lb
+Lb Lx.
+format@Effect
+N@T{
+equivalent to
+.RB \[lq] "\-WF \-FF \-WD" \[rq]
+.\" FB \" XXX: see Savannah ticket reference below
+(default)
+T}
+WF@T{
+set footnotes at full line length,
+even in two-column mode
+.\" XXX: what about multi-column modes more generally?
+T}
+\-WF@T{
+set footnotes using column line length
+T}
+FF@T{
+apply width of first footnote to encountered to subsequent ones
+T}
+\-FF@T{
+footnote width determined by
+.B WF
+and
+.B \-WF
+T}
+WD@T{
+set displays at full line length,
+even in two-column mode
+.\" XXX: what about multi-column modes more generally?
+T}
+\-WD@T{
+set displays using column line length
+T}
+.TE
+.RE
+.\" XXX: See <https://savannah.gnu.org/bugs/?64316>.
+.\"FB@T{
+.\"Break when outputting floating displays.
+.\"T}
+.\"\-FB@T{
+.\"Do not break when outputting floating displays.
+.\"T}
+.
+.
+.TP
+.B WE
+End the writer's address begun with
+.BR WA .
+.
+.
+.br
+.ne 4v
+.\" ====================================================================
+.SH Strings
+.\" ====================================================================
+.
+Many
+.I mm
+strings interpolate predefined,
+localizable text.
+.
+These are presented in quotation marks.
+.
+.
+.TP
+.B App
+\[lq]APPENDIX\[rq]
+.
+.
+.TP
+.B Apptxt
+stores the
+.I title
+argument to the last
+.B APP
+call.
+.
+.
+.TP
+.B BU
+interpolates a bullet
+(see
+.BR BL ).
+.
+.
+.TP
+.B Ci
+is a list of indentation amounts to use for table of contents heading
+levels,
+overriding their automatic computation.
+.
+Each word must be a horizontal measurement
+(like
+.RB \[lq] 1i \[rq])
+and is mapped one-to-one to heading levels 1,
+2,
+and so on.
+.
+.
+.TP
+.B DT
+The date;
+set by the
+.B ND
+macro
+(defaults to the date the document is formatted).
+.
+The format is the conventional one for the
+.I groff
+locale,
+but see the
+.B ISODATE
+macro and
+.B Iso
+register.
+.
+.
+.TP
+.B EM
+interpolates an em dash.
+.
+.
+.TP
+.B F
+interpolates an automatically numbered footnote marker;
+the number is used by the next
+.B FS
+call without an argument.
+.
+In
+.I troff
+mode,
+the marker is superscripted;
+in
+.I nroff
+mode,
+it is surrounded by square brackets.
+.
+.
+.TP
+.B H1txt
+Updated by
+.B .H
+and
+.B .HU
+to the current heading text.
+.
+Also updated in table of contents & friends.
+.
+.
+.TP
+.B HF
+assigns font identifiers,
+separated by spaces,
+to heading levels in one-to-one correspondence.
+.
+Each identifier may be a font mounting position,
+font name,
+or style name.
+.
+Omitted values are assumed to be\~1.
+.
+The default is
+.RB \[lq] "2 2 2 2 2 2 2 2 2 2 2 2 2 2" \[rq],
+which places all headings in italics.
+.
+DWB
+.IR mm 's
+default was
+.RB \[lq] "3 3 2 2 2 2 2" \[rq].
+.
+.
+.TP
+.B HP
+assigns type sizes,
+separated by spaces,
+to heading levels in one-to-one correspondence.
+.
+Each size is interpreted in scaled points;
+zero values are translated to
+.BR 10 .
+.
+Omitted values are assumed to be\~0
+(and are translated accordingly).
+.
+The default is
+.RB \[lq] "0 0 0 0 0 0 0 0 0 0 0 0 0 0" \[rq].
+.
+.
+.TP
+.B Index
+\[lq]INDEX\[rq]
+.
+.
+.TP
+.B Le
+\[lq]LIST OF EQUATIONS\[rq]
+.
+.
+.TP
+.B Letfc
+\[lq]Yours very truly,\[rq]
+(see
+.BR FC )
+.
+.
+.TP
+.B Letapp
+\[lq]APPROVED:\[rq]
+(see
+.BR AV )
+.
+.
+.TP
+.B LetAT
+\[lq]ATTENTION:\[rq]
+(see
+.BR LO )
+.
+.
+.TP
+.B LetCN
+\[lq]CONFIDENTIAL\[rq]
+(see
+.BR LO )
+.
+.
+.TP
+.B Letdate
+\[lq]Date\[rq]
+(see
+.BR AV )
+.
+.
+.TP
+.B Letns
+is a group of strings structuring the notations produced by
+.BR NS .
+.
+If the
+.I code
+argument to
+.B NS
+has no corresponding string,
+the notation is included between parentheses,
+prefixed with
+.BR Letns!copy ,
+and suffixed with
+.BR Letns!to .
+.
+Observe the spaces after \[lq]Copy\[rq] and before \[lq]to\[rq].
+.
+.
+.RS
+.P
+.TS
+tab(@);
+Lb Lb Lb
+L L L.
+NS code@String@Contents
+0@Letns!0@Copy to
+1@Letns!1@Copy (with att.\&) to
+2@Letns!2@Copy (without att.\&) to
+3@Letns!3@Att.
+4@Letns!4@Atts.
+5@Letns!5@Enc.
+6@Letns!6@Encs.
+7@Letns!7@Under separate cover
+8@Letns!8@Letter to
+9@Letns!9@Memorandum to
+10@Letns!10@Copy (with atts.\&) to
+11@Letns!11@Copy (without atts.\&) to
+12@Letns!12@Abstract Only to
+13@Letns!13@Complete Memorandum to
+14@Letns!14@CC
+\[em]@Letns!copy@Copy \fI(with trailing space)\fP
+\[em]@Letns!to@ to \fI(note leading space)\fP
+.TE
+.RE
+.
+.
+.TP
+.B Letnsdef
+Select the notation format used by
+.B NS
+when it is given no argument.
+.
+The default is
+.RB \[lq] 0 \[rq].
+.
+.
+.TP
+.B LetRN
+\[lq]In reference to:\[rq]
+(see
+.BR LO )
+.
+.
+.TP
+.B LetSA
+\[lq]To Whom It May Concern:\[rq]
+(see
+.BR LO )
+.
+.
+.TP
+.B LetSJ
+\[lq]SUBJECT:\[rq]
+(see
+.BR LO )
+.
+.
+.TP
+.B Lf
+\[lq]LIST OF FIGURES\[rq]
+.
+.
+.TP
+.B Licon
+\[lq]CONTENTS\[rq]
+.
+.
+.TP
+.B Liec
+\[lq]Equation\[rq]
+.
+.
+.TP
+.B Liex
+\[lq]Exhibit\[rq]
+.
+.
+.TP
+.B Lifg
+\[lq]Figure\[rq]
+.
+.
+.TP
+.B Litb
+\[lq]TABLE\[rq]
+.
+.
+.TP
+.B Lt
+\[lq]LIST OF TABLES\[rq]
+.
+.
+.TP
+.B Lx
+\[lq]LIST OF EXHIBITS\[rq]
+.
+.
+.TP
+.BR MO1 \|.\|.\|.\| MO12
+\[lq]January\[rq] through \[lq]December\[rq]
+.
+.
+.TP
+.B Qrf
+\[lq]See chapter \[rs]\[rs]*[Qrfh],
+page \[rs]\[rs]n[Qrfp].\[rq]
+.
+.
+.TP
+.B Rf
+interpolates an automatically numbered reference mark;
+the number is used by the next
+.B RS
+call.
+.
+In
+.I troff
+mode,
+the marker is superscripted;
+in
+.I nroff
+mode,
+it is surrounded by square brackets.
+.
+.
+.TP
+.B Rp
+\[lq]REFERENCES\[rq]
+.
+.
+.
+.TP
+.B Sm
+interpolates
+.if c \[u2120] \[u2120],
+the service mark sign.
+.
+.
+.TP
+.B Tcst
+interpolates an indicator of the
+.B TC
+macro's processing status.
+.
+If
+.B TC
+is not operating,
+it is empty.
+.
+User-defined
+.B TP
+or
+.B EOP
+macros might condition page headers or footers on its contents.
+.
+.
+.IP
+.TS
+tab(@);
+lb lb
+l l.
+Value@Meaning
+co@Table of contents
+fg@List of figures
+tb@List of tables
+ec@List of equations
+ex@List of exhibits
+ap@Appendix
+.TE
+.
+.
+.TP
+.B Tm
+interpolates
+.if c \[tm] \[tm],
+the trade mark sign.
+.
+.
+.TP
+.B Verbnm
+supplies argument(s) to the
+.B nm
+request employed by the
+.B VERBON
+macro.
+.
+The default is\~\[lq]1\[rq].
+.
+.
+.br
+.ne 4v
+.\" ====================================================================
+.SH Registers
+.\" ====================================================================
+.
+Default register values,
+where meaningful,
+are shown in parentheses.
+.
+Many are also marked as Boolean-valued,
+meaning that they are considered \[lq]true\[rq]
+(on,
+enabled)
+when they have a positive value,
+and \[lq]false\[rq]
+(off,
+disabled)
+otherwise.
+.
+.
+.TP
+.B .mgm
+indicates that
+.I groff mm
+is in use
+(Boolean-valued;
+.BR 1 ).
+.
+.
+.TP
+.B :p
+is an auto-incrementing footnote counter;
+see
+.BR FS .
+.
+.
+.TP
+.B :R
+is an auto-incrementing reference counter;
+see
+.BR RS .
+.
+.
+.TP
+.B Aph
+formats an appendix heading
+(and title,
+if supplied);
+see
+.B APP
+(Boolean-valued;
+.BR 1 ).
+.
+.
+.TP
+.B Au
+includes supplemental author information
+(the third and subsequent arguments to
+.BR AU )
+in memorandum \[lq]from\[rq] information;
+see
+.B COVER
+and
+.B MT
+(Boolean-valued;
+.BR 1 ).
+.
+.
+.TP
+.B Cl
+sets the threshold for inclusion of headings in a table of contents.
+.
+Headings at levels above this value are excluded;
+see
+.B H
+and
+.B TC
+.RB ( 2 ).
+.
+The
+.B Cl
+register controls whether a heading is
+.I saved
+for output in the table of contents at the time
+.B H
+or
+.B HU
+is called;
+if you change
+.BR Cl 's
+value immediately prior to calling
+.BR TC ,
+you are unlikely to get the result you want.
+.
+.
+.TP
+.B Cp
+suppresses page breaks before lists of captioned
+equations,
+exhibits,
+figures,
+and tables,
+and before an index;
+see
+.BR EC ,
+.BR EX ,
+.BR FG ,
+.BR TB ,
+and
+.B INDP
+(Boolean-valued;
+.\" DWB 3.3's manual said this was 1, but the code said 0.
+.BR 0 ).
+.
+.
+.TP
+.B D
+produces debugging information for the
+.I mm
+package on the standard error stream.
+.
+A value of\~0 outputs nothing;
+1\~reports formatting progress.
+.
+Higher values communicate internal state information of increasing
+verbosity
+.RB ( 0 ).
+.
+.
+.TP
+.B De
+causes a page break after a floating display is output;
+see
+.B DF
+(Boolean-valued;
+.BR 0 ).
+.
+.
+.TP
+.B Df
+configures the behavior of
+.BR DF .
+.
+The following values are recognized;
+4 and 5 do not override the
+.B De
+register
+.RB ( 5 ).
+.
+.
+.IP
+.TS
+tab(@);
+Lb Lb
+L Lx.
+Value@Effect
+0@T{
+Flush pending displays
+at the end of each section
+when section-page numbering is active,
+otherwise at the end of the document.
+T}
+1@T{
+Flush a pending display
+on the current page or column
+if there is enough space,
+otherwise at the end of the document.
+T}
+2@T{
+Flush one pending display
+at the top of each page or column.
+T}
+3@T{
+Flush a pending display
+on the current page or column
+if there is enough space,
+otherwise at the top of the next.
+T}
+4@T{
+Flush as many pending displays
+as possible in a new page or column.
+T}
+5@T{
+Fill columns or pages with flushed displays
+until none remain.
+T}
+.TE
+.
+.
+.TP
+.B Ds
+puts vertical space in the amount of register
+.B Dsp
+(if defined) or
+.B Lsp
+before and after each static display;
+see
+.B DS
+(Boolean-valued;
+.BR 1 ).
+.
+.
+.TP
+.B Dsp
+configures the amount of vertical space placed
+before and after static displays;
+see
+.B DS
+and register
+.B Ds
+.RI ( undefined ).
+.
+.
+.TP
+.B Ec
+is an auto-incrementing equation counter;
+see
+.BR EC .
+.
+.
+.TP
+.B Ej
+sets the threshold for page breaks (ejection) prior to the format of
+headings.
+.
+Headings at levels above this value are set on the same page and column
+if possible;
+see
+.B H
+.RB ( 0 ).
+.
+.
+.TP
+.B Eq
+aligns an equation label to the left of a display instead of the right
+(Boolean-valued;
+.BR 0 ).
+.
+.
+.TP
+.B Ex
+is an auto-incrementing exhibit counter;
+see
+.BR EX .
+.
+.
+.TP
+.B Fg
+is an auto-incrementing figure counter;
+see
+.BR FG .
+.
+.
+.TP
+.B Fs
+is multiplied by register
+.B Lsp
+to vertically separate footnotes;
+see
+.B FS
+.RB ( 1 ).
+.
+.
+.TP
+.BR H1 \|.\|.\|.\| H14
+are auto-incrementing counters corresponding to each heading level;
+see
+.BR H .
+.
+.
+.\" XXX: This could be generalized to an "Hdot" threshold register with
+.\" a default of 2.
+.TP
+.B H1dot
+appends a period to the number of a level one heading;
+see
+.B H
+(Boolean-valued;
+.BR 1 ).
+.
+.
+.\" XXX: This may be insufficiently general; see Savannah #62825.
+.TP
+.B H1h
+is a copy of
+A copy of register
+.RB register\~ H1 ,
+but it is incremented just before a page break.
+.
+This can be useful in user-defined macros;
+see
+.B H
+and
+.BR HX .
+.
+.
+.TP
+.B Hb
+sets the threshold for breaking the line after formatting a heading.
+.
+Text after headings at levels above this value are set on the same
+output line if possible;
+see
+.B H
+.RB ( 2 ).
+.
+.
+.TP
+.B Hc
+sets the threshold for centering a heading.
+.
+Headings at levels above this value use the prevailing alignment
+(that is,
+they are not centered);
+see
+.B H
+.RB ( 0 ).
+.
+.
+.TP
+.B Hi
+configures the indentation of text after headings.
+.
+It does not affect \[lq]run-in\[rq] headings.
+.
+The following values are recognized;
+see
+.B H
+and
+.B P
+.RB ( 1 ).
+.
+.
+.IP
+.TS
+tab(@);
+Lb Lb
+L Lx.
+Value@Effect
+0@no indentation
+1@indent per the paragraph type
+2@indent to align with heading title
+.TE
+.
+.
+.TP
+.B Hps
+sets the heading level threshold for application of preceding vertical
+space;
+see
+.BR H .
+.
+Headings at levels above the value in register
+.B Hps
+use the amount of space in register
+.BR Hps1 ;
+otherwise that in
+.BR Hps2 .
+.
+The value of
+.B Hps
+should be strictly greater than that of
+.B Ej
+.RB ( 1 ).
+.
+.
+.TP
+.B Hps1
+configures the amount of vertical space preceding a heading above the
+.B Hps
+threshold;
+see
+.B H
+.RI ( troff
+devices:
+.BR 0.5v ;
+.I nroff
+devices:
+.BR 1v ).
+.
+.
+.TP
+.B Hps2
+configures the amount of vertical space preceding a heading at or below
+the
+.B Hps
+threshold;
+see
+.B H
+.RI ( troff
+devices:
+.BR 1v ;
+.I nroff
+devices:
+.BR 2v ).
+.
+.
+.TP
+.B Hs
+sets the heading level threshold for application of succeeding vertical
+space.
+.
+If the heading level is greater than
+.BR Hs ,
+the heading is followed by vertical space in the amount of
+.RB register\~ Hss ;
+see
+.B H
+.RB ( 2 ).
+.
+.
+.TP
+.B Hss
+is multiplied by register
+.B Lsp
+to produce vertical space after headings above the
+threshold in
+.RB register\~ Hs ;
+see
+.B H
+.RB ( 1 ).
+.
+.
+.TP
+.B Ht
+suppresses output of heading level counters above the lowest when the
+heading is formatted;
+see
+.B H
+(Boolean-valued;
+.BR 0 ).
+.
+.
+.
+.TP
+.B Hu
+sets the heading level used by unnumbered headings;
+see
+.B HU
+.RB ( 2 ).
+.
+.
+.TP
+.B Hy
+enables automatic hyphenation of words
+(Boolean-valued;
+.BR 0 ).
+.
+.
+.TP
+.B Iso
+configures the use of ISO\~8601 date format
+if specified
+(with any value)
+on the command line;
+see
+.BR ISODATE .
+.
+The default is determined by localization files.
+.
+.
+.TP
+.B L
+defines the page length for the document,
+and must be set from the command line.
+.
+A scaling unit should be appended.
+.
+The default is that of the selected
+.I groff
+output device.
+.
+.
+.TP
+.B Le
+.TQ
+.B Lf
+.TQ
+.B Lt
+.TQ
+.B Lx
+configure the report of lists of equation,
+figure,
+table,
+and exhibit captions,
+respectively,
+after a table of contents;
+see
+.B TC
+(Boolean-valued;
+.BR Le :\~ 0 ;
+.BR Lf ,
+.BR Lt ,
+.BR Lx :\~ 1 ).
+.
+.
+.\" XXX: What is the rationale for this feature?
+.TP
+.B Letwam
+sets the maximum number of input lines permitted in a writer's address;
+see
+.B WA
+and
+.B WE
+.RB ( 14 ).
+.
+.
+.TP
+.B Li
+configures the amount of indentation in ens applied to list items;
+see
+.B LI
+.RB ( 6 ).
+.
+.
+.TP
+.B Limsp
+inserts a space between the prefix and the mark
+in automatically numbered lists;
+see
+.B AL
+(Boolean-valued;
+.BR 1 ).
+.
+.
+.TP
+.B Ls
+sets a threshold for placement of vertical space before list items.
+.
+If the list nesting level is greater than this value,
+no such spacing occurs;
+see
+.B LI
+.RB ( 99 ).
+.
+.
+.TP
+.B Lsp
+configures the base amount of vertical space used for separation
+in the document.
+.
+.I mm
+applies this spacing to many contexts,
+sometimes with multipliers;
+see
+.BR DS ,
+.BR FS ,
+.BR H ,
+.BR LI ,
+and
+.B P
+.RI ( troff
+devices:
+.BR 0.5v ;
+.I nroff
+devices:
+.BR 1v ).
+.
+.
+.TP
+.B N
+configures the header and footer placements used by
+.BR PH .
+.
+The default footer is empty.
+.
+If \[lq]section-page\[rq] numbering is selected,
+the default header becomes empty
+and the default footer becomes
+.RI \[lq] x - y \[rq],
+where
+.IR x \~is
+is the section number
+(the number of the current first-level heading)
+.RI and\~ y
+the page number within the section.
+.\" XXX: section-figure numbering needs more documentation.
+.
+The following values are recognized;
+for finer control,
+see
+.BR PH ,
+.BR PF ,
+.BR EH ,
+.BR EF ,
+.BR OH ,
+and
+.BR OF ,
+and registers
+.B Sectf
+and
+.BR Sectp .
+.
+Value 5 is a GNU extension
+.RB ( 0 ).
+.
+.
+.IP
+.TS
+tab(@);
+Lb Lb
+L Lx.
+Value@Effect
+0@Set header on all pages.
+1@Move header to footer on page 1.
+2@Omit header on page 1.
+3@Use \[lq]section-page\[rq] numbering style on all pages.
+4@Omit header on all pages.
+5@T{
+Use \[lq]section-page\[rq] and \[lq]section-figure\[rq] \
+numbering style on all pages.
+T}
+.TE
+.
+.
+.TP
+.B Np
+causes paragraphs after first-level headings (only) to be numbered
+in the format
+.IR s . p ,
+where
+.IR s \~is
+is the section number
+(the number of the current first-level heading)
+and
+.IR p \~is
+the paragraph number,
+starting at 1;
+see
+.B H
+and
+.B P
+(Boolean-valued;
+.BR 0 ).
+.
+.
+.TP
+.B O
+defines the page offset of the document,
+and must be set from the command line.
+.
+A scaling unit should be appended.
+.
+The default
+.RB is\~ \&.75i
+on terminal devices.
+.
+On typesetters,
+it is
+.B \&.963i
+or set to
+.B 1i
+by the
+.I papersize.tmac
+package;
+see
+.MR groff_tmac @MAN5EXT@ .
+.
+.
+.TP
+.B Oc
+suppresses the appearance of page numbers in the table of contents;
+see
+.B TC
+(Boolean-valued;
+.BR 0 ).
+.
+.
+.\" XXX: This really should just be a string, shouldn't it?
+.TP
+.B Of
+selects a separator format within equation,
+exhibit,
+figure,
+and table captions;
+see
+.BR EC ,
+.BR EX ,
+.BR FG ,
+and
+.BR TB .
+.
+The following values are recognized;
+the spaces shown are unpaddable
+.RB ( 0 ).
+.
+.
+.IP
+.TS
+tab(@);
+Lb Lb
+L Lx.
+Value@Effect
+0@\[dq]. \[dq]
+1@\[dq] \[em] \[dq]
+.TE
+.
+.
+.TP
+.B P
+interpolates the current page number;
+it is the same as
+.RB register\~ %
+except when
+\[lq]section-page\[rq] numbering is enabled.
+.
+.
+.TP
+.B Pi
+configures the amount of indentation in ens applied to the first line of
+a paragraph;
+see
+.B P
+.RB ( 5 ).
+.
+.
+.TP
+.B Pgps
+causes the type size and vertical spacing set by
+.B S
+to apply to headers and footers,
+overriding the
+.B HP
+string.
+.
+If not set,
+.B S
+calls affect headers and footers only when followed by
+.BR PH ,
+.BR PF ,
+.BR OH ,
+.BR EH ,
+.BR OF ,
+or
+.B OE
+calls
+(Boolean-valued;
+.BR 1 ).
+.
+.
+.TP
+.B Ps
+is multiplied by register
+.B Lsp
+to vertically separate paragraphs;
+see
+.B P
+.RB ( 1 ).
+.
+.
+.TP
+.B Pt
+determines when a first-line indentation is applied to a paragraph;
+see
+.B P
+.RB ( 0 ).
+.
+.
+.IP
+.TS
+tab(@);
+Lb Lb
+L Lx.
+Value@Effect
+0@never
+1@always
+2@T{
+always,
+except immediately after
+.BR H ,
+.BR DE ,
+or
+.B LE
+T}
+.TE
+.
+.
+.TP
+.B Ref
+is used internally to control
+.MR mmroff 1 's
+two-pass approach to index and reference management;
+see
+.B INITI
+and
+.B RS
+(Boolean-valued;
+.BR 0 ).
+.
+.
+.\" XXX: Why is this not named `Rpej`?
+.TP
+.B Rpe
+configures the default page ejection policy for reference pages;
+see
+.B RP
+.RB ( 0 ).
+.
+.
+.IP
+.TS
+tab(@);
+Lb Lb
+L Lx.
+Value@Effect
+0@Break the page before and after the list of references.
+1@Suppress page break after the list.
+2@Suppress page break before the list.
+3@Suppress page breaks before and after the list.
+.TE
+.
+.
+.TP
+.B S
+defines the type size for the document,
+and must be set from the command line.
+.
+A scaling unit should be appended;
+.B p
+is typical
+.RB ( 10p ).
+.
+.
+.TP
+.B Sectf
+selects the \[lq]section-figure\[rq] numbering style.
+.
+Its default
+.RB is\~ 0
+unless
+.RB register\~ N
+is set
+.RB to\~ 5
+at the command line
+(Boolean-valued).
+.
+.
+.TP
+.B Sectp
+selects the \[lq]section-page\[rq] numbering style.
+.
+Its default
+.RB is\~ 0
+unless
+.RB register\~ N
+is set
+.RB to\~ 3
+.RB or\~ 5
+at the command line
+(Boolean-valued).
+.
+.
+.TP
+.B Si
+configures the amount of display indentation in ens;
+see
+.B DS
+.RB ( 5 ).
+.
+.
+.TP
+.B Tb
+is an auto-incrementing table counter;
+see
+.BR TB .
+.
+.
+.TP
+.B V
+defines the vertical spacing for the document,
+and must be set from the command line.
+.
+A scaling unit should be appended;
+.B p
+is typical.
+.
+The default vertical spacing is 120% of the type size.
+.
+.
+.TP
+.B Verbin
+configures the amount of indentation for verbatim displays
+when indentation is selected;
+see
+.B \%VERBON
+.RB ( 5n ).
+.
+.
+.TP
+.B W
+defines the \[lq]width\[rq]
+of the document
+(that is,
+the length of an output line with no indentation);
+it must be set from the command line.
+.
+A scaling unit should be appended.
+.
+The default
+.RB is\~ 6i
+or assigned by the
+.I papersize.tmac
+package;
+see
+.MR groff_tmac @MAN5EXT@ .
+.
+.
+.
+.\" ====================================================================
+.SH Internals
+.\" ====================================================================
+.
+The
+.B LT
+letter macros call further macros depending on the letter type,
+with which they are suffixed.
+.
+It is therefore possible to define additional letter types,
+either in the territory-specific macro file,
+or as local additions.
+.
+.B LT
+sets the registers
+.B Pt
+and
+.B Pi
+to 0 and\~5, \" XXX: ...but doesn't use Pi for indentation...
+respectively.
+.\" XXX: and why aren't both of these actions the responsibility of
+.\" let@init_type as described below?
+.
+The following macros must be defined to support a new letter type.
+.
+.
+.TP
+.BI let@init_ type
+.B LT
+calls this macro to initialize any registers and other data needed by
+the letter type.
+.
+.
+.TP
+.BI let@head_ type
+formats the letterhead;
+it is called instead of the usual page header macro.
+.
+Its definition should remove the alias
+.B let@header
+unless the letterhead is desired on subsequent pages.
+.
+.
+.TP
+.BI let@sg_ type\~\c
+.IR "name title n is-final\~" [ SG-arg\~ .\|.\|.]
+.B SG
+calls this macro only for letters;
+.B MT
+memoranda have their own signature processing.
+.
+.I name
+and
+.I title
+are specified through
+.BR WA / WE .
+.
+.IR n \~is
+the index of the
+.IR n th
+writer,
+and
+.I is-final
+is true for the last writer to be listed.
+.
+Further
+.B SG
+arguments are appended to the signature line.
+.
+.
+.TP
+.BI let@fc_ "type closing"
+This macro is called by
+.BR FC ,
+and has the formal closing as the argument.
+.
+.
+.P
+.B LO
+implements letter options.
+.
+It requires that a string named
+.BI Let type
+be defined,
+where
+.I type
+is the letter type.
+.
+.B LO
+then assigns its second argument
+.RI ( value )
+to the string
+.BI let*lo\- type\c
+\&.
+.
+.
+.\" ====================================================================
+.\".SH BUGS
+.\" ====================================================================
+.
+.
+.\" ====================================================================
+.SH Files
+.\" ====================================================================
+.
+.TP
+.I @MACRODIR@/@TMAC_M_PREFIX@m.tmac
+is the
+.I groff
+implementation of the memorandum macros.
+.
+.
+.TP
+.I @MACRODIR@/mm.tmac
+is wrapper to load
+.IR m.tmac .
+.
+.
+.TP
+.I @MACRODIR@/refer\-mm.tmac
+implements
+.MR @g@refer @MAN1EXT@
+support for
+.IR mm .
+.
+.
+.TP
+.I @TMAC_MDIR@/ms.cov
+implements an
+.IR ms -like
+cover sheet.
+.
+.
+.TP
+.I @TMAC_MDIR@/0.MT
+implements memorandum types 0\[en]3 and 6.
+.
+.
+.TP
+.I @TMAC_MDIR@/4.MT
+implements memorandum type 4.
+.
+.
+.TP
+.I @TMAC_MDIR@/5.MT
+implements memorandum type 5.
+.
+.
+.TP
+.I @TMAC_MDIR@/locale
+performs any (further) desired necessary localization;
+empty by default.
+.
+.
+.\" ====================================================================
+.SH Authors
+.\" ====================================================================
+.
+The GNU version of the
+.I mm
+macro package was written by
+.MT jh@\:axis\:.se
+J\[:o]rgen H\[:a]gg
+.ME
+of Lund, Sweden.
+.
+.
+.\" ====================================================================
+.SH "See also"
+.\" ====================================================================
+.
+.UR https://tkurtbond\:.github\:.io/\:troff/\:mm\-all\:.pdf
+.I MM \- A Macro Package for Generating Documents
+.UE ,
+the DWB\~3.3
+.I mm
+manual,
+introduces the package but does not document GNU extensions.
+.
+.
+.P
+.IR "Groff: The GNU Implementation of troff" ,
+by Trent A.\& Fisher and Werner Lemberg,
+is the primary
+.I groff
+manual.
+.
+You can browse it interactively with \[lq]info groff\[rq].
+.
+.
+.P
+.MR groff @MAN1EXT@ ,
+.MR @g@troff @MAN1EXT@ ,
+.MR @g@tbl @MAN1EXT@ ,
+.MR @g@pic @MAN1EXT@ ,
+.MR @g@eqn @MAN1EXT@ ,
+.MR @g@refer @MAN1EXT@ ,
+.MR groff_mmse @MAN7EXT@
+.
+.
+.\" Restore compatibility mode (for, e.g., Solaris 10/11).
+.cp \n[*groff_groff_mm_7_man_C]
+.do rr *groff_groff_mm_7_man_C
+.
+.
+.\" Local Variables:
+.\" fill-column: 72
+.\" mode: nroff
+.\" End:
+.\" vim: set filetype=groff textwidth=72:
diff --git a/contrib/mm/groff_mmse.7.man b/contrib/mm/groff_mmse.7.man
new file mode 100644
index 0000000..6ba94eb
--- /dev/null
+++ b/contrib/mm/groff_mmse.7.man
@@ -0,0 +1,183 @@
+.TH groff_mmse @MAN7EXT@ "@MDATE@" "groff @VERSION@"
+.SH Namn
+groff_mmse \- svenska \(rqmemorandum\(rq makro f\(:or GNU
+.I roff
+.
+.
+.\" Skrivet av Jrgen Hgg, Lund, Sverige
+.
+.\" ====================================================================
+.\" Legal Terms
+.\" ====================================================================
+.\"
+.\" Copyright (C) 1989-2020 Free Software Foundation, Inc.
+.\"
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of
+.\" this manual under the conditions for verbatim copying, provided that
+.\" the entire resulting derived work is distributed under the terms of
+.\" a permission notice identical to this one.
+.\"
+.\" Permission is granted to copy and distribute translations of this
+.\" manual into another language, under the above conditions for
+.\" modified versions, except that this permission notice may be
+.\" included in translations approved by the Free Software Foundation
+.\" instead of in the original English.
+.
+.
+.\" Save and disable compatibility mode (for, e.g., Solaris 10/11).
+.do nr *groff_groff_mmse_7_man_C \n[.cp]
+.cp 0
+.
+.\" Define fallback for groff 1.23's MR macro if the system lacks it.
+.nr do-fallback 0
+.if !\n(.f .nr do-fallback 1 \" mandoc
+.if \n(.g .if !d MR .nr do-fallback 1 \" older groff
+.if !\n(.g .nr do-fallback 1 \" non-groff *roff
+.if \n[do-fallback] \{\
+. de MR
+. ie \\n(.$=1 \
+. I \%\\$1
+. el \
+. IR \%\\$1 (\\$2)\\$3
+. .
+.\}
+.rr do-fallback
+.
+.
+.\" ====================================================================
+.SH Syntax
+.\" ====================================================================
+.
+.SY "groff \-m@TMAC_M_PREFIX@mse"
+.RI [ flaggor\~ .\|.\|.\&]
+.RI [ filer\~ .\|.\|.]
+.
+.SY "groff \-m m@TMAC_M_PREFIX@mse"
+.RI [ flaggor\~ .\|.\|.\&]
+.RI [ filer\~ .\|.\|.]
+.YS
+.
+.
+.\" ====================================================================
+.SH Beskrivning
+.\" ====================================================================
+.
+.I m@TMAC_M_PREFIX@mse
+r en svensk variant av
+.IR m@TMAC_M_PREFIX@m .
+Alla texter r versatta.
+En A4 sida fr text som r 13\~cm bred,
+3,5\~cm indragning samt r 28,5\~cm hg.
+Det finns std fr brevuppstllning enligt svensk standard
+fr vnster och hgerjusterad text.
+.
+.LP
+.B COVER
+kan anvnda
+.I se_ms
+som argument.
+Detta ger ett svenskt frsttsblad.
+Se
+.MR groff_mm @MAN7EXT@
+fr vriga detaljer.
+.
+.
+.\" ====================================================================
+.SH Brev
+.\" ====================================================================
+.
+Tillgngliga brevtyper:
+.
+.TP
+.B ".LT SVV"
+Vnsterstlld lptext med adressat i position T0 (vnsterstllt).
+.
+.TP
+.B ".LT SVH"
+Hgerstlld lptext med adressat i position T4 (passar
+fnsterkuvert).
+.
+.LP
+Fljande extra LO-variabler anvnds.
+.
+.TP
+.BI ".LO DNAMN\ " namn
+Anger dokumentets namn.
+.
+.TP
+.BI ".LO MDAT\ " datum
+Mottagarens datum, anges under
+.B Ert datum:
+.RB ( LetMDAT ).
+.
+.TP
+.BI ".LO BIL\ " strng
+Anger bilaga, nummer eller strng med
+.B Bilaga
+.RB ( LetBIL )
+som prefix.
+.
+.TP
+.BI ".LO KOMP\ " text
+Anger kompletteringsuppgift.
+.
+.TP
+.BI ".LO DBET\ " beteckning
+Anger dokumentbeteckning eller dokumentnummer.
+.
+.TP
+.BI ".LO BET\ " beteckning
+Anger beteckning
+(rendebeteckning i form av diarienummer eller liknande).
+.
+.TP
+.BI ".LO SIDOR\ " antal
+Anger totala antalet sidor och skrivs ut efter sidnumret inom
+parenteser.
+.
+.LP
+Om makrot
+.B .TP
+r definierat anropas det efter utskrift av brevhuvudet.
+Dr lgger man lmpligen in postadress och annat som brevfot.
+.
+.
+.\" ====================================================================
+.SH "Skrivet av"
+.\" ====================================================================
+.
+Jrgen Hgg, Lund, Sweden <Jorgen.Hagg@axis.se>
+.
+.
+.\" ====================================================================
+.SH Filer
+.\" ====================================================================
+.
+.TP
+.I @MACRODIR@/@TMAC_M_PREFIX@mse.tmac
+.TP
+.IR @TMAC_MDIR@/se_ * .cov
+.
+.
+.\" ====================================================================
+.SH "Se ocks"
+.\" ====================================================================
+.
+.MR groff_mm @MAN7EXT@
+.
+.
+.\" Restore compatibility mode (for, e.g., Solaris 10/11).
+.cp \n[*groff_groff_mmse_7_man_C]
+.do rr *groff_groff_mmse_7_man_C
+.
+.
+.\" Local Variables:
+.\" coding: latin-1
+.\" fill-column: 72
+.\" mode: nroff
+.\" End:
+.\" vim: set filetype=groff textwidth=72:
diff --git a/contrib/mm/m.tmac b/contrib/mm/m.tmac
new file mode 100644
index 0000000..c679a70
--- /dev/null
+++ b/contrib/mm/m.tmac
@@ -0,0 +1,3734 @@
+.ig
+
+Copyright (C) 1991-2023 Free Software Foundation, Inc.
+mm is written by Jrgen Hgg <jh@axis.com>
+
+mm is free software; 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.
+
+mm is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+Please submit bug reports using groff's 'BUG-REPORT' file to
+http://savannah.gnu.org/bugs/?group=groff.
+
+Naming convention adapted from groff ms.
+Local names module*name
+Extern names module@name
+Env.var environ:name
+Index array!index
+..
+.if !\n(.g \
+. ab groff mm macros require groff extensions; aborting
+.
+.if \n(.C \
+. ab groff mm macros do not work in compatibility mode; aborting
+.
+.ds @mm m.tmac\"
+.
+.if (\n[.x]\n[.y] < 123) \{\
+. ds mm-msg \*[@mm]: groff mm macros require groff 1.23 or later,\"
+. as mm-msg " but found groff \n[.x].\n[.y]; aborting\"
+. ab \*[mm-msg]
+.\}
+.
+.if d PH .nx
+.
+.mso devtag.tmac
+.\" ######## init #######
+.\" create table of contents entry for headings of level <= Cl
+.nr Cl 2
+.\" Eject page between LIST OF XXXX if Cp == 0
+.nr Cp 0
+.\" Debugflag
+.if !r D .nr D 0
+.\" Eject after floating display is output [0:1]
+.nr De 0
+.\" Floating keep output [0;5]
+.nr Df 5
+.\" space before and after display if == 1 [0:1]
+.nr Ds 1
+.\" eject page before headings of level <= Ej
+.nr Ej 0
+.\" Equation label adjust 0=left, 1=right
+.nr Eq 0
+.\" Bullet string (for .BL)
+.ie n .ds BU \[bu]
+.el .ds BU \s-2\[bu]\s0
+.\" Em dash string
+.ie n .ds EM " --
+.el .ds EM \[em]
+.\" Footnote spacing
+.nr Fs 1
+.\" H1-H7 heading counters
+.nr H1 0 1
+.nr H2 0 1
+.nr H3 0 1
+.nr H4 0 1
+.nr H5 0 1
+.nr H6 0 1
+.nr H7 0 1
+.nr H8 0 1
+.nr H9 0 1
+.nr H10 0 1
+.nr H11 0 1
+.nr H12 0 1
+.nr H13 0 1
+.nr H14 0 1
+.\" break after headings of level <= Hb
+.nr Hb 2
+.\" center headings of level <= Hc
+.nr Hc 0
+.\" header format
+.ds HF 2 2 2 2 2 2 2 2 2 2 2 2 2 2
+.\" heading temp. indent [0:2]
+.\" 0 -> 0 indent, left margin
+.\" 1 -> indent to right , like .P 1
+.\" 2 -> indent to line up with text part of preceding heading
+.nr Hi 1
+.\" header pointsize
+.ds HP 0 0 0 0 0 0 0 0 0 0 0 0 0 0
+.\" put vertical space of \n[Hss] after headings of level <= Hs
+.nr Hs 2
+.\" heading numbering type
+.\" 0 -> multiple (1.1.1 ...)
+.\" 1 -> single
+.nr Ht 0
+.\" Unnumbered heading level
+.nr Hu 2
+.\" hyphenation in body
+.\" 0 -> no hyphenation
+.\" 1 -> hyphenation 14 on
+.nr Hy 0
+.\" text for toc, selfexplanatory. Look in the new variable section
+.ds Lf LIST OF FIGURES
+.nr Lf 1
+.ds Lt LIST OF TABLES
+.nr Lt 1
+.ds Lx LIST OF EXHIBITS
+.nr Lx 1
+.ds Le LIST OF EQUATIONS
+.nr Le 0
+.\" List indentation in ens, used by .AL
+.nr Li 6
+.\" put vertical space before list items of nesting level <= Ls
+.nr Ls 99 \" TODO: use \n[.R]; see Savannah #63587
+.\" Numbering style [0:5]
+.if !r N .nr N 0
+.\" numbered paragraphs
+.\" 0 == not numbered
+.\" 1 == numbered in first level headings.
+.nr Np 0
+.\" Format of figure,table,exhibit,equation titles.
+.\" 0= ". ", 1=" - "
+.nr Of 0
+.\" Table of contents page numbering style
+.nr Oc 0
+.\" Page-number, normally same as %.
+.nr P 0
+.\" paragraph indentation in ens
+.nr Pi 5
+.\" paragraph spacing
+.nr Ps 1
+.\" paragraph type
+.\" 0 == left-justified
+.\" 1 == indented .P
+.\" 2 == indented .P except after .H, .DE or .LE.
+.nr Pt 0
+.\" Reference title
+.ds Rp REFERENCES
+.\" Reference page eject status
+.nr Rpe 0
+.\" display indentation in ens
+.nr Si 5
+.\"
+.\" Current state of TOC, empty outside TC, inside
+.\" it will be set to co,fg,tb,ec,ex or ap.
+.ds Tcst
+.\"
+.ie t .ds Sm \v'-.4m'\s-3SM\s0\v'.4m'\"
+.el \{\
+. ie c \[u2120] .ds Sm \[u2120]\"
+. el .ds Sm (SM)\"
+.\}
+.
+.ie t .ds Tm \v'-.4m'\s-3TM\s0\v'.4m'\"
+.el \{\
+. ie c \[tm] .ds Tm \[tm]\"
+. el .ds Tm (TM)\"
+.\}
+.\"
+.\"---------------------------------------------
+.\" Internal global variables
+.\"
+.\" This is for cover macro .MT
+.\" .ds @country
+.\"
+.nr @copy_type 0
+.if r C .nr @copy_type \n[C]
+.\" >0 if Subject/Date/From should be bold, roman otherwise
+.ie n .ds @sdf_font R
+.el .ds @sdf_font B
+.if \n[@copy_type]=4 \{\
+. ls 2
+. nr Pi 10
+. nr Pt 1
+.\}
+.\"
+.\"
+.if r E \{\
+. ie \n[E] .ds @sdf_font B
+. el .ds @sdf_font R
+.\}
+.\"
+.\" Set the type size and vertical spacing. If given on the command
+.\" line, these have already been converted to basic units.
+.if !r S .nr S 10
+.ie (\n[S] >= 1000) .ps \n[S]z/1000u
+.el .ps \n[S]
+.nr *vs-default \n[.ps]*120/100
+.if !r V .nr V \n[*vs-default]
+.ie (\n[V] >= 1000) .vs \n[V]p/1000u
+.el .vs \n[V]
+.rm *vs-default
+.\"
+.nr @ps \n[.ps]
+.nr @vs \n[.v]
+.if \n[D]>1 .tm @ps=\n[@ps], @vs=\n[@vs]
+.if \n[D]>3 .tm INIT: l:\n[.l] p:\n[.p] o:\n[.o]
+.\"
+.\" page length
+.if r L \{\
+. pl \n[L]u
+.\}
+.nr @pl \n[.p]
+.\"
+.\" line length
+.ie r W \{\
+. ll \n[W]u
+.\}
+.el .ll 6i
+.nr @ll \n[.l]
+.nr @cur-ll \n[@ll]
+.lt \n[@ll]u
+.\"
+.\" page offset
+.ie r O .po \n[O]u
+.el \{\
+. ie n .po .75i
+. el .po .963i
+.\}
+.\"
+.nr @po \n[.o]
+.\"
+.\" non-zero if escape mechanism is turned off. Used by VERBON/OFF
+.nr @verbose-flag 0
+.\"---------------------------------------------
+.\" New variables
+.\"
+.\" Appendix name
+.ds App APPENDIX
+.\" print appendixheader, 0 == don't
+.nr Aph 1
+.\"
+.\" Current appendix text
+.ds Apptext
+.\" Controls the space before and after static displays if defined.
+.\" Lsp is used otherwise
+.\" .nr Dsp 1v
+.\"
+.\" Add a dot after level one heading number if >0
+.nr H1dot 1
+.\"
+.\" put vertical space of \n[Hps2] before headings of level <= Hps
+.nr Hps 1
+.\"
+.\" amount of vertical space before headings when level > Hps
+.nr Hps1 0.5v
+.if n .nr Hps1 1v
+.\"
+.\" amount of vertical space before headings when level <= Hps
+.nr Hps2 1v
+.if n .nr Hps2 2v
+.\"
+.\" Hss is the number of lines (Lsp) after the header.
+.nr Hss 1
+.\"
+.\" H1txt will be updated by .H and .HU, containing the heading text.
+.\" Will also be updated in table of contents & friends
+.\"
+.ds H1txt
+.\"
+.\" header text for the index
+.ds Index INDEX
+.\" command to sort the index
+.ds Indcmd sort
+.\"
+.\" flag for mkindex
+.if !r Idxf .nr Idxf 0
+.\" Change these in the national configuration file
+.ds Lifg Figure
+.ds Litb TABLE
+.ds Liex Exhibit
+.ds Liec Equation
+.ds Licon CONTENTS
+.\" Flag for space between mark and prefix 1==space, 0==no space
+.\" Can also be controlled by using '.LI mark 2'
+.nr Limsp 1
+.\"
+.\" Lsp controls the height of an empty line. Normally 0.5v
+.\" Normally used for nroff compatibility.
+.nr Lsp 0.5v
+.if n .nr Lsp 1v
+.ds MO1 January
+.ds MO2 February
+.ds MO3 March
+.ds MO4 April
+.ds MO5 May
+.ds MO6 June
+.ds MO7 July
+.ds MO8 August
+.ds MO9 September
+.ds MO10 October
+.ds MO11 November
+.ds MO12 December
+.\" for GETR
+.ds Qrf See chapter \\*[Qrfh], page \\*[Qrfp].
+.\"
+.\" header- and footer-size will only change to the current
+.\" if Pgps is > 0.
+.nr Pgps 1
+.\"
+.\" section-page if Sectp > 0
+.nr Sectp 0
+.if (\n[N]=3):(\n[N]=5) \{\
+. nr Sectp 1
+. nr Ej 1
+.\}
+.\" section-figure if Sectf > 0
+.nr Sectf 0
+.if \n[N]=5 .nr Sectf 1
+.\"
+.\" argument to .nm in .VERBON.
+.ds Verbnm 1\"
+.\" indent for VERBON
+.nr Verbin 5n
+.\"
+.\" Letter section
+.\" Formal closing (.FC)
+.ds Letfc Yours very truly,
+.\"
+.\" Approval line
+.ds Letapp APPROVED:
+.\" Approval date-string
+.ds Letdate Date
+.\"
+.ds LetCN CONFIDENTIAL\" Confidential default
+.ds LetSA To Whom It May Concern:\" Salutation default
+.ds LetAT ATTENTION:\" Attention string
+.ds LetSJ SUBJECT:\" Subject string
+.ds LetRN In reference to:\" Reference string
+.\"
+.\" Copy to (.NS)
+.ds Letnsdef 0
+.ds Letns!copy Copy \" space!
+.ds Letns!to " to
+.ds Letns!0 Copy to
+.ds Letns!1 Copy (with att.\&) to
+.ds Letns!2 Copy (without att.\&) to
+.ds Letns!3 Att.
+.ds Letns!4 Atts.
+.ds Letns!5 Enc.
+.ds Letns!6 Encs.
+.ds Letns!7 Under separate cover
+.ds Letns!8 Letter to
+.ds Letns!9 Memorandum to
+.ds Letns!10 Copy (with atts.\&) to
+.ds Letns!11 Copy (without atts.\&) to
+.ds Letns!12 Abstract Only to
+.ds Letns!13 Complete Memorandum to
+.ds Letns!14 CC:
+.\"
+.\" Text printed below the footer. Controlled by @copy_type (C).
+.ds Pg_type!0
+.ds Pg_type!1 OFFICIAL FILE COPY
+.ds Pg_type!2 DATE FILE COPY
+.ds Pg_type!3 D\ R\ A\ F\ T
+.ds Pg_type!4 D\ R\ A\ F\ T
+.\" Max lines in return address
+.nr Letwam 14
+.\"--------------------------
+.\" test for mgm macro. This can be used if the text must test
+.\" what macros is used.
+.nr .mgm 1
+.\"
+.\" Due to security problems with groff I had to rewrite
+.\" the reference system. It's not as elegant as before, you
+.\" have to run groff with '-z -rRef=1' and put stderr into the filename
+.\" for .INITR
+.\"
+.\" Output references to stderr if non-zero
+.ie !r Ref \{\
+. nr Ref 0
+.\}
+.el .warn 0
+.\"
+.\"---------------------------------------------
+.\" set local variables.
+.ie d @country .msoquiet mm/\*[@country]_locale
+.el .msoquiet mm/locale
+.\"---------------------------------------------
+.\" ####### module init ######
+.\" reset all things
+.\" XXX: Resets .cu and .ul but _not_ .ce or .rj.
+.de init@reset
+.ie \\n[misc@adjust] 'ad
+.el 'na
+.ie \\n[Hy] 'hy 14
+.el 'nh
+'in 0
+'ti 0
+.ps \\n[@ps]u
+.vs \\n[@vs]u
+..
+.de @warning
+.tm \\*[@mm]:\\n[.F]:\\n[.c]: warning: \\$*
+.if \\n[D] .backtrace
+..
+.\" All errors are fatal.
+.de @error
+.tm \\*[@mm]:\\n[.F]:\\n[.c]: error: \\$*
+.if \\n[D] .backtrace
+.ab
+..
+.
+.de @abort
+.tm \\*[@mm]:\\n[.F]:\\n[.c]: internal error: \\$*
+.backtrace
+.ab
+..
+.de misc@toupper
+.tr aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ
+.br
+\\$1
+.tr aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz
+.br
+..
+.\" ####### module debug #################################
+.de debug
+'tm \\$1:\\n[.F]:\\n[c.] ll=\\n[.l] vs=\\n[.v] ps=\\n[.s],\\n[.ps] \
+in=\\n[.i] fi=\\n[.u] .d=\\n[.d] nl=\\n[nl] pg=\\n[%]
+..
+.de debug-all
+.nr debug*n 1n
+.nr debug*m 1m
+'tm \\$1:\\n[.F]:\\n[c.] ll=\\n[.l] vs=\\n[.v] ps=\\n[.s] in=\\n[.i]\
+ ad=\\n[.j] fi=\\n[.u] pl=\\n[.p] page=\\n[%] .o=\\n[.o]
+'tm _______ .d=\\n[.d] .f=\\n[.f] .h=\\n[.h] .k=\\n[.k] .n=\\n[.n]\
+ .p=\\n[.p] .t=\\n[.t] .z=\\n[.z] nl=\\n[nl] dn=\\n[dn] n=\\n[debug*n]
+..
+.\" ####### module par #################################
+.nr par*indentation-eligible 1 \" indent following P if Pt=2
+.nr par@suppress-indentation 0
+.nr hd*last-pos -1
+.nr hd*last-hsize -1
+.nr par*number 0 1
+.af par*number 01
+.nr par*number2 0 1
+.af par*number2 01
+.nr par*num-count 0 1
+.af par*num-count 01
+.\" reset numbered paragraphs, arg1 = headerlevel
+.de par@reset-num
+.if \\$1<3 .nr par*num-count 0
+.if (\\$1=1)&(\\n[Np]=1) .nr par*number 0
+..
+.\"------------
+.\" paragraph
+.de P
+.if \\n[.$] \{\
+. ie !\B'\\$1' \{\
+. @warning \\$0: expected numeric argument, got '\\$1'
+. shift
+. \}
+. el .if (\\$1 > 1) \
+. @warning \\$0: ignoring unsupported paragraph type \
+'\\$1'
+.\}
+.\" skip P if previous heading
+.if \\n[D]>2 \{\
+. tm Paragraph nl=\\n[nl], last=\\n[hd*last-pos]
+. tm Paragraph .k=\\n[.k], hsize=\\n[hd*last-hsize]
+.\}
+.nr par*indentation-eligible 1-\\n[par@suppress-indentation]
+.par@doit \\$*
+.if \\n[Np] \\n[H1].\\n+[par*number]\ \ \c
+..
+.\"------------
+.de nP
+.if \\n[D]>2 \{\
+. tm Paragraph nl=\\n[nl], last=\\n[hd*last-pos]
+. tm Paragraph .k=\\n[.k], hsize=\\n[hd*last-hsize]
+.\}
+.\" A first-line indentation is meaningless for a numbered paragraph.
+.nr par*indentation-eligible 0
+.par@doit
+\\n[H2].\\n+[par*number2]\ \ \c
+..
+.\"------------
+.de par@doit
+.SP (u;\\n[Ps]*\\n[Lsp])
+.nr par*do-indent 0
+.ie \\n[.$] \{\
+. if \\$1=1 .nr par*do-indent 1
+.\}
+.el \{\
+. if \\n[Pt]=1 .nr par*do-indent 1
+. if (\\n[Pt]=2)&\\n[par*indentation-eligible] \
+. nr par*do-indent 1
+.\}
+.if \\n[par*do-indent] .ti +\\n[Pi]n
+.rr par*do-indent
+.nr par@suppress-indentation 0
+..
+.\" ####### module line #######################################
+.de SP
+.br
+.if !r line*lp\\n[.z] .nr line*lp\\n[.z] 0
+.if !r line*ac\\n[.z] .nr line*ac\\n[.z] 0
+.ie \\n[.$] .nr line*temp (v;\\$1)
+.el .nr line*temp 1v
+.\"
+.ie \\n[line*lp\\n[.z]]=\\n[.d] \{\
+. \" go here if no output since the last .SP
+. nr line*output \\n[line*temp]-\\n[line*ac\\n[.z]]
+. if \\n[line*output]<0 .nr line*output 0
+. nr line*ac\\n[.z] +\\n[line*output]
+.\}
+.el \{\
+. nr line*ac\\n[.z] \\n[line*temp]
+. nr line*output \\n[line*temp]
+. \" no extra space in the beginning of a page
+. if (\\n[.d]<0):(\\n[pg*head-mark]=\\n[.d]) .nr line*output 0
+.\}
+.if \\n[line*output] .sp \\n[line*output]u
+.nr line*lp\\n[.z] \\n[.d]
+..
+.\" ######## module misc ###############
+.\" XXX: This register value is meaningless.
+.\" .ad b
+.\" .nr misc@adjust \n[.j]
+.\" might be better...
+.nr misc@adjust 14
+.de SA
+.if \\n[.$] \{\
+. if ((\\$1 < 0) : (\\$1 > 1)) .@error \\$0: invalid argument \
+'\\$1'
+.\" XXX: ...then...
+.\" .ad l
+.\" .nr misc@adjust \\n[.j]
+. nr misc@adjust 0\\$1
+.\}
+.\" XXX: ...and finally an unconditional.
+.\" .ad \\n[.j]
+.ie \\n[misc@adjust] 'ad
+.el 'na
+..
+.\"-------------
+.\" switch environment, keep all important settings.
+.de misc@ev-keep
+.nr misc*ll \\n[.l]
+.ds misc*fam \\n[.fam]
+.ev \\$1
+.ll \\n[misc*ll]u
+.lt \\n[misc*ll]u
+.fam \\*[misc*fam]
+..
+.\"-------------
+.\" .misc@push stackname value
+.de misc@push
+.ie d misc*st-\\$1 .ds misc*st-\\$1 \\$2 \\*[misc*st-\\$1]
+.el .ds misc*st-\\$1 \\$2
+..
+.\"-------------
+.\" .misc@pop stackname
+.\" value returned in the string misc*pop
+.de misc@pop
+.misc@pop-set misc*st-\\$1 \\*[misc*st-\\$1]
+..
+.\"-------------
+.de misc@pop-set
+.ds misc*st-name \\$1
+.shift
+.if \\n[.$]<1 .@abort stack '\\*[misc*st-name]' empty
+.ds misc*pop \\$1
+.shift
+.ds \\*[misc*st-name] \\$*
+..
+.\"-------------
+.\" .misc@pop-nr stackname varname
+.de misc@pop-nr
+.misc@pop \\$1
+.nr \\$2 0\\*[misc*pop]
+..
+.\"-------------
+.\" .misc@pop-ds stackname varname
+.de misc@pop-ds
+.misc@pop \\$1
+.ds \\$2 \\*[misc*pop]
+..
+.\"-----------
+.\" reset tabs
+.de TAB
+.ta T 5n
+..
+.\"-------------
+.\" .PGFORM linelength [ pagelength [ pageoffset [1]]]
+.de PGFORM
+.\" Break here to avoid problems with new linesetting of the previous line.
+.\" Hope this doesn't break anything else :-)
+.\" Don't break if arg_4 is a '1'.
+.if \\n[D]>2 .tm PGFORM: \\$*
+.if ''\\$4' .br
+.if \\n[D]>3 .tm PGFORM: IN l:\\n[.l] p:\\n[.p] o:\\n[.o]
+.ie !''\\$1' \{\
+. ll \\$1
+. nr @ll \\n[.l]
+. nr @cur-ll \\n[@ll]
+. lt \\n[@ll]u
+.\}
+.el \{\
+. ll \\n[@ll]u
+. lt \\n[@ll]u
+.\}
+.\"
+.ie !''\\$2' \{\
+. pl \\$2
+. nr @pl \\n[.p]
+.\}
+.el .pl \\n[@pl]u
+.\"
+.ie !''\\$3' \{\
+. po \\$3
+. nr @po \\n[.o]
+.\}
+.el .po \\n[@po]u
+.if \\n[D]>3 .tm PGFORM: OUT l:\\n[.l] p:\\n[.p] o:\\n[.o]
+.if \\n[D]>2 .tm PGFORM: ll=\\n[@ll], pl=\\n[@pl], po=\\n[@po]
+'in 0
+.pg@move-trap
+.if \\n[D]>2 \{\
+. tm Traps:
+. ptr
+.\}
+..
+.\"-------------
+.\" .MOVE y [[x] linelength]
+.\" move to line y, indent to x
+.de MOVE
+.if !\\n[.$] \{\
+. @warning \\$0: ignoring; no arguments specified
+. return
+.\}
+.if \\n[nl]<0 \c
+.\" move to Y-pos
+.sp |(v;\\$1)
+.\" calc linelength
+.ie \\n[.$]>2 .nr pg*i (n;\\$3)
+.el \{\
+. ie \\n[.$]>1 .nr pg*i (n;\\n[@ll]u-\\$2)
+. el .nr pg*i \\n[@ll]u
+.\}
+.\" move to X-pos, if any
+.if !''\\$2' .po \\$2
+.\" set linelength
+.ll \\n[pg*i]u
+..
+.\"-------------
+.de SM
+.if !\\n[.$] \{\
+. @warning \\$0: ignoring; no arguments specified
+. return
+.\}
+.if \\n[.$]=1 \s-1\\$1\s0
+.if \\n[.$]=2 \s-1\\$1\s0\\$2
+.if \\n[.$]=3 \\$1\s-1\\$2\s0\\$3
+..
+.\"-------------
+.nr misc*S-ps \n[@ps]
+.nr misc*S-vs \n[@vs]
+.nr misc*S-ps1 \n[@ps]
+.nr misc*S-vs1 \n[@vs]
+.ds misc*a
+.ds misc*b
+.de S
+.ie !\\n[.$] \{\
+. ds misc*a P
+. ds misc*b P
+.\}
+.el \{\
+. ie \\n[.$]=1 .ds misc*b D
+. el \{\
+. ie \w@\\$2@=0 .ds misc*b C
+. el .ds misc*b \\$2
+. \}
+. ie \w@\\$1@=0 .ds misc*a C
+. el .ds misc*a \\$1
+.\}
+.\"
+.\" set point size
+.if !'\\*[misc*a]'C' \{\
+. ie '\\*[misc*a]'P' .ps \\n[misc*S-ps]u
+. el \{\
+. ie '\\*[misc*a]'D' .ps \\n[S]
+. el .ps \\*[misc*a]
+. if \\n[D]>2 .tm S: .ps \\*[misc*a]
+. \}
+.\}
+.\"
+.\" set vertical spacing
+.if !'\\*[misc*b]'C' \{\
+. ie '\\*[misc*b]'P' .vs \\n[misc*S-vs]u
+. el \{\
+. ie '\\*[misc*b]'D' .vs \\n[.ps]s+2p
+. el .vs \\*[misc*b]
+. if \\n[D]>2 .tm S: .vs \\*[misc*b]
+. \}
+.\}
+.nr @ps \\n[.ps]
+.nr @psu \\n[.ps]s
+.nr @vs \\n[.v]
+.nr @vsp \\n[.v]u/1p
+.nr @res 1i
+.\"
+.if \\n[D]>1 \{\
+. tmc "S(\\$*): ma:\\*[misc*a], mb:\\*[misc*b]
+. tm1 " => ps:\\n[.s]p (\\n[@psu]u), vs:\\n[@vsp]p (\\n[@vs]u) (res:\\n[@res])
+.\}
+.nr misc*S-ps \\n[misc*S-ps1]
+.nr misc*S-vs \\n[misc*S-vs1]
+.nr misc*S-ps1 \\n[@ps]
+.nr misc*S-vs1 \\n[@vs]
+.pg@move-trap
+..
+.\"------------
+.de HC
+.ev 0
+.hc \\$1
+.ev
+.ev 1
+.hc \\$1
+.ev
+.ev 2
+.hc \\$1
+.ev
+..
+.\"------------
+.de RD
+.di misc*rd
+'fl
+.rd \\$1\t
+.br
+.di
+.if !''\\$3' \{\
+. di misc*rd2
+. ds \\$3 "\\*[misc*rd]
+. br
+. di
+.\}
+.if !''\\$2' .rn misc*rd \\$2
+.rm misc*rd misc*rd2
+..
+.\"------------
+.\" VERBON [flag [type-size [font]]]
+.\" flag
+.\" bit function
+.\" 0 escape character disablement
+.\" 1 add an empty line before verbose text
+.\" 2 add an empty line after verbose text
+.\" 3 number output lines using Verbnm string for .nm args
+.\" 4 indent text by amount in register Verbin
+.de VERBON
+.br
+.nr misc*verb 0\\$1
+.if (0\\n[misc*verb]%4)/2 .SP \\n[Lsp]u
+.misc@ev-keep misc*verb-ev
+.nf
+.if (0\\n[misc*verb]%16)/8 .nm \\*[Verbnm]
+.ie !'\\$3'' .ft \\$3
+.el .ft CR
+.ie 0\\$2 \{\
+. ss \\$2
+. ps \\$2
+. vs \\$2
+.\}
+.el .ss 12
+.ta T 8u*\w@n@u
+.if (0\\n[misc*verb]%32)/16 .in +\\n[Verbin]u
+.if 0\\n[misc*verb]%2 \{\
+. eo
+. nr @verbose-flag 1 \" tell pageheader to set ec/eo
+.\}
+..
+.de VERBOFF
+.ec
+.br
+.if (0\\n[misc*verb]%8)/4 .SP \\n[Lsp]u
+.if (0\\n[misc*verb]%16)/8 .nm
+.if (0\\n[misc*verb]%32)/16 .in
+.ev
+.nr @verbose-flag 0
+..
+.\" Wrapper to cancel the side effect of .tag + .br generating
+.\" unwanted vertical space.
+.de misc@tag
+.\" This macro is currently used solely to give information to the
+.\" HTML postprocessor. If for PostScript or PDF output macro .H
+.\" had been followed by .DS both .H post-space and .DS pre-space
+.\" had been output because of this macro. So it is now enabled
+.\" only when postprocessor tags are required.
+.if '\*[.T]'html' \{\
+.\" retain temporary indentation and horizontal position
+.if !(\\n[.in]-\\n[.i]=0) .nr misc*ti \\n[.in]
+.nr misc*.k \\n[.k]
+.vpt 0
+.DEVTAG-\\$1 \\$2
+.br
+.if r misc*ti \{\
+. ti \\n[misc*ti]u
+. rr misc*ti
+. sp -1
+.\}
+.sp -1
+\h'\\n[misc*.k]u'\c
+.rr misc*.k
+.vpt 1
+.\}
+..
+.\" ######## module pict #################
+.nr pict*width 0
+.nr pict*height 0
+.nr pict*mode 0
+.nr pict*ind 0
+.nr pict*id 0 1
+.\" I assume that the number variable pict*id is the same
+.\" between two runs.
+.de PIC
+.br
+.nr pict*ind 0
+.nr pict*box 0
+.while \\n[.$]>0 \{\
+. if '-B'\\$1' \{\
+. nr pict*box 1
+. shift
+. continue
+. \}
+. if '-L'\\$1' \{\
+. nr pict*mode 0
+. shift
+. continue
+. \}
+. if '-R'\\$1' \{\
+. nr pict*mode 1
+. shift
+. continue
+. \}
+. if '-I'\\$1' \{\
+. nr pict*ind (m;\\$2)
+. nr pict*mode 2
+. shift 2
+. continue
+. \}
+. if '-C'\\$1' \{\
+. nr pict*mode 3
+. shift
+. continue
+. \}
+. ds pict*f \\$1
+. nr pict*id +1
+. shift
+. if \\n[.$]>0 \{\
+. if !\B'\\$1' .@error \\$0: width parameter is not \
+numeric; got '\\$1'
+. nr pict*width (i;\\$1)
+. shift
+. \}
+. if \\n[.$]>0 \{\
+. if !\B'\\$1' .@error \\$0: height parameter is not \
+numeric; got '\\$1'
+. nr pict*height (i;\\$1)
+. shift
+. \}
+.\}
+.\" let mmroff know the filename and id
+.if \\n[Ref]>0 \{\
+. tm .\\\\" PIC id \\n[pict*id]
+. tm .\\\\" PIC file \\*[pict*f]
+.\}
+.\" these are defined by mmroff in the second pass
+.if d pict*file!\\n[pict*id] \{\
+. ds pict*f \\*[pict*file!\\n[pict*id]]
+. nr pict*llx \\n[pict*llx!\\n[pict*id]]
+. nr pict*lly \\n[pict*lly!\\n[pict*id]]
+. nr pict*urx \\n[pict*urx!\\n[pict*id]]
+. nr pict*ury \\n[pict*ury!\\n[pict*id]]
+. \"
+. nr pict*w (p;\\n[pict*urx]-\\n[pict*llx])
+. if \\n[pict*w]<0 .nr pict*w 0-\\n[pict*w]
+. nr pict*h (p;\\n[pict*ury]-\\n[pict*lly])
+. if \\n[pict*h]<0 .nr pict*h 0-\\n[pict*h]
+. if \\n[pict*width]>0 \{\
+. nr pict*rs (u;1000*\\n[pict*width]/\\n[pict*w])
+. nr pict*w (u;\\n[pict*w]*\\n[pict*rs]/1000)
+. nr pict*h (u;\\n[pict*h]*\\n[pict*rs]/1000)
+. \}
+. if \\n[pict*height]>0 \{\
+. nr pict*rs (u;1000*\\n[pict*height]/\\n[pict*h])
+. nr pict*h (u;\\n[pict*h]*\\n[pict*rs]/1000)
+. \}
+. if '0'\\n[pict*mode]' \{\
+. nr pict*in \\n[.i]u
+. \}
+. if '1'\\n[pict*mode]' \{\
+. nr pict*in (u;\\n[.l]-\\n[.i]-\\n[pict*w])
+. \}
+. if '2'\\n[pict*mode]' \{\
+. nr pict*in \\n[pict*ind]u
+. \}
+. if '3'\\n[pict*mode]' \{\
+. nr pict*in (u;(\\n[.l]-\\n[.i]-\\n[pict*w])/2)
+. \}
+. ds pict*h "
+. if \\n[pict*h]>0 .ds pict*h \\n[pict*h]
+. \"
+. ne \\n[pict*h]u-1v
+. \"
+. \" these lines are copied and modified from pspic.tmac.
+. \" Originally written by James Clark
+. br
+. ie \\n[pict*box]>0 \{\
+\v'-1v'\h'\\n[pict*in]u'\
+\Z'\D'p 0 \\n[pict*h]u \\n[pict*w]u 0 0 -\\n[pict*h]u''\
+\v'\\n[pict*h]u'\X'ps: import \\*[pict*f] \
+\\n[pict*llx] \\n[pict*lly] \
+\\n[pict*urx] \\n[pict*ury] \
+\\n[pict*w] \\n[pict*h]'
+.\}
+. el \{\
+\v'-1v'\h'\\n[pict*in]u'\
+\X'ps: invis'\
+\Z'\D'p 0 \\n[pict*h]u \\n[pict*w]u 0 0 -\\n[pict*h]u''\
+\X'ps: endinvis'\
+\v'\\n[pict*h]u'\X'ps: import \\*[pict*f] \
+\\n[pict*llx] \\n[pict*lly] \
+\\n[pict*urx] \\n[pict*ury] \
+\\n[pict*w] \\n[pict*h]'
+. \}
+. br
+. sp \\n[pict*h]u-1v
+.\}
+..
+.\" external picture
+.\" -L left align
+.de EPIC
+.nr pict*adj 0 \" centered
+.if '\\$1'-L' \{\
+. shift
+. nr pict*adj 1
+.\}
+.if \\n[.$]<2 \{\
+. @warning \\$0: ignoring; expected width and height arguments
+. return
+.\}
+.\" Permit a document to start with EPIC.
+.if \\n[nl]<0 \&
+.ie \B'\\$1' .nr pict*w \\$1
+.el .@error \\$0: width parameter is not numeric; got '\\$1'
+.ie \B'\\$2' .nr pict*h \\$2
+.el .@error \\$0: height parameter is not numeric; got '\\$2'
+.\" XXX: This is kind of lame. It's also not localized.
+.ds pict*name External picture\"
+.if !''\\$3' .ds pict*name " \\$3\"
+.ne \\n[pict*h]u
+.sp \\n[pict*h]u-1v
+.nr pict*ind 0
+.if !\\n[pict*adj] .nr pict*ind (u;(\\n[.l]-\\n[.i]-\\n[pict*w])/2)
+.mk
+.in +\\n[pict*ind]u
+\D'l \\n[pict*w]u 0'\
+\D'l 0 -\\n[pict*h]u'\
+\D'l -\\n[pict*w]u 0'\
+\D'l 0 \\n[pict*h]u'\
+\v'-(u;\\n[pict*h]/2)'\
+\h'(u;(\\n[pict*w]-\w'\\*[pict*name]'/2))'\\*[pict*name]
+.in
+.rt
+.sp 1v
+..
+.\" ######## module acc #################
+.\"-----------
+.\" accents. These are copied from mgs, written by James Clark.
+.de acc@over-def
+.ds \\$1 \Z'\v'(u;\w'x'*0+\En[rst]-\En[.cht])'\
+\h'(u;-\En[skw]+(-\En[.w]-\w'\\$2'/2)+\En[.csk])'\\$2'
+..
+.de acc@under-def
+.ds \\$1 \Z'\v'\En[.cdp]u'\h'(u;-\En[.w]-\w'\\$2'/2)'\\$2'
+..
+.acc@over-def ` \`
+.acc@over-def ' \'
+.acc@over-def ^ ^
+.acc@over-def ~ ~
+.acc@over-def : \[ad]
+.acc@over-def ; \[ad]
+.acc@under-def , \[ac]
+.\" ######## module uni #################
+.\" unimplemented macros
+.de @disable
+.ds @end \" empty
+.while \\n[.$] \{\
+. rm \\$1 \" in case it's aliased
+. de \\$1 @end
+. @warning \\$1: ignoring; unavailable after \\*[@cover]
+. @end
+. shift
+.\}
+..
+.rm @end
+.
+.de CS
+.@warning \\$0: not implemented except with ".MT 4"
+..
+.de OK
+.@warning \\$0: not implemented
+..
+.de PM
+.@warning \\$0: not implemented
+..
+.\" ######## module hd #################
+.\" support for usermacro
+.nr hd*h1-page 1 \" last page-number for level 1 header.
+.nr hd*htype 0
+.ds hd*sect-pg
+.ds hd*mark
+.ds hd*suf-space
+.nr hd*need 0
+.aln ;0 hd*htype
+.als }0 hd*mark
+.als }2 hd*suf-space
+.aln ;3 hd*need
+.\"-------------
+.\" .hd@split variable index name val1 val2 ...
+.de hd@split
+.\" TODO: Verify that this isn't reachable due to ordinary user error;
+.\" if it is, make it an @error.
+.if \\$2>(\\n[.$]-3) .@abort \\$3 must have at least \\$2 values \
+(\\*[\\$3])
+.nr hd*sp-tmp \\$2+3
+.ds \\$1 \\$[\\n[hd*sp-tmp]]
+..
+.de HU
+.H 0 "\\$1"
+..
+.\"-------------
+.de H
+.if !r hd*cur-bline .nr hd*cur-bline \\n[nl]
+.br
+.df@print-float 2\" $$$ could be wrong...
+.\" terminate all lists
+.LC
+.init@reset
+.nr hd*level 0\\$1
+.nr hd*arg1 0\\$1
+.if !\\n[hd*level] .nr hd*level \\n[Hu]
+.\"
+.\" clear lower counters
+.nr hd*i 1 1
+.while \\n+[hd*i]<15 .if \\n[hd*level]<\\n[hd*i] .nr H\\n[hd*i] 0 1
+.\"
+.\" save last text for use in TP
+.if \\n[hd*level]=1 .ds H1txt \\$2\\$3
+.\"
+.\" This is a little fix to be able to get correct H1 heading number
+.\" in page headers. Special attention was needed when other formats are used.
+.ie !''\\g[H1]' \{\
+. ds hd*format \\g[H1]
+. af H1 0
+. nr H1h \\n[H1] 1
+. af H1 \\*[hd*format]
+.\}
+.el .nr H1h \\n[H1] 1
+.if \\n[hd*level]=1 .nr H1h +1
+.\"
+.\" Break page before headings of level <= Ej.
+.if ((\\n[hd*level]<=\\n[Ej])&(\\n[nl]>\\n[hd*cur-bline])) .pg@next-page
+.\"
+.\" increment current counter
+.nr H\\n[hd*level] +1
+.\"
+.\" update pagenumber if section-page is used
+.if (\\n[hd*level]=1)&(\\n[Sectp]>0) .hd@set-page 1
+.\"
+.\" hd*mark is the text written to the left of the header.
+.ds hd*mark \\n[H1].
+.\"
+.if \\n[hd*level]>1 .as hd*mark \\n[H2]
+.\"
+.nr hd*i 2 1
+.while \\n+[hd*i]<15 .if \\n[hd*level]>(\\n[hd*i]-1) \
+. as hd*mark .\\n[H\\n[hd*i]]
+.if \\n[Ht] .ds hd*mark \\n[H\\n[hd*level]].
+.\"
+.\" special case, no dot after level one heading if not H1dot true
+.if (\\n[hd*level]=1)&(\\n[H1dot]=0) .ds hd*mark \\n[H1]
+.\"
+.ds hd@mark-trimmed \\*[hd*mark]\" mark without spaces, for references
+.as hd*mark \ \ \" add spaces between heading mark and title
+.if !\\n[hd*arg1] .ds hd*mark \" empty; no mark for unnumbered heading
+.\"
+.if \\n[D]>1 .tm At header \\*[hd*mark] "\\$2"
+.nr hd*htype 0 \" hd*htype = check break and space
+. \" 0 = run-in, 1 = break only, 2 = space
+.if \\n[hd*level]<=\\n[Hb] .nr hd*htype 1
+.if \\n[hd*level]<=\\n[Hs] .nr hd*htype 2
+. \" two spaces if hd*htype == 0
+.ie (\\n[hd*htype]=0)&(\w@\\$2@) .ds hd*suf-space " \"
+.el .ds hd*suf-space \" empty
+.nr hd*need 2v \" hd*need = header need space
+.\"---------- user macro HX ------------
+.\" User exit macro to override numbering.
+.\" May change hd*mark (}0), hd*suf-space (}2) and hd*need (;3)
+.\" Can also change Hps1/2.
+.if d HX .HX \\n[hd*level] \\n[hd*arg1] "\\$2\\$3"
+.\"--------------------------------------
+.\" pre-space
+.ie \\n[hd*level]<=\\n[Hps] .SP (u;\\n[Hps2])
+.el .SP (u;\\n[Hps1])
+.\"
+.par@reset-num \\n[hd*level]\" reset numbered paragraph
+.\" start diversion to measure size of header
+.di hd*div
+\\*[hd*mark]\\$2\\$3\\*[hd*suf-space]
+.br
+.di
+.rm hd*div
+.if \\n[hd*htype] .na \" do not adjust heading if not run-in
+.if \\n[hd*htype]<2 .nr hd*need +\\n[Lsp]u \" add some extra space
+.ne \\n[hd*need]u+\\n[dn]u+.5p-1v \" space needed for a heading
+.\"
+.\" size and font calculations
+.hd@split hd*font \\n[hd*level] HF \\*[HF]\" get font for this level
+.ft \\*[hd*font]\" set new font
+.hd@split hd*new-ps \\n[hd*level] HP \\*[HP]\" get point size
+.ie (\\*[hd*new-ps]=0):(\w@\\*[hd*new-ps]@=0) \{\
+. if \\n[hd*htype] \{\
+. if '\\*[hd*font]'3' \{\
+. ps -1
+. vs -1
+. \}
+. if '\\*[hd*font]'B' \{\
+. ps -1
+. vs -1
+. \}
+. \}
+.\}
+.el \{\
+. ps \\*[hd*new-ps]
+. vs \\*[hd*new-ps]+2
+.\}
+.\"
+.\"---------- user macro HY -------------
+.\" user macro to reset indents
+.if d HY .HY \\n[hd*level] \\n[hd*arg1] "\\$2\\$3"
+.\" HTML: mark beginning of heading
+.misc@tag NH \\n[hd*level]
+.\"--------------------------------------
+.nr hd*mark-size \w@\\*[hd*mark]@
+.if (\\n[hd*level]<=\\n[Hc])&\\n[hd*htype] .ce\" center if level<=Hc
+.\"
+.\" finally, output the header
+\\*[hd*mark]\&\c
+.\" and the rest of the header
+.ie \\n[hd*htype] \{\
+\\$2\\$3
+. br
+.\}
+.el \\$2\\$3\\*[hd*suf-space]\&\c
+.ft 1
+.\" restore pointsize and vertical size.
+.ps \\n[@ps]u
+.vs \\n[@vs]u
+.\"
+.\" table of contents
+.if (\\n[hd*level]<=\\n[Cl])&\w@\\$2@ .toc@entry \\n[hd*level] "\\$2"
+.\" set adjust to previous value
+.SA
+.\" do break or space
+.if \\n[hd*htype] .br
+.if \\n[hd*htype]>1 .SP (u;\\n[Lsp]*\\n[Hss])
+.ie \\n[hd*htype] \{\
+. \" indent if Hi=1 and Pt=1
+. if (\\n[Hi]=1)&(\\n[Pt]=1) .ti +\\n[Pi]n
+. \" indent size of mark if Hi=2
+. if \\n[hd*htype]&(\\n[Hi]>1) .ti +\\n[hd*mark-size]u
+. nr par@suppress-indentation 1
+.\}
+.\" We're setting a run-in heading; the next paragraph is normal.
+.el .nr par@suppress-indentation 0
+.\"
+.\" check if it is time to reset footnotes
+.if (\\n[hd*level]=1)&\\n[ft*clear-at-header] .nr ft*nr 0 1
+.\"
+.\" check if it is time to reset indexes
+.if (\\n[hd*level]=1)&\\n[Sectf] \{\
+. nr lix*fg-nr 0 1
+. nr lix*tb-nr 0 1
+. nr lix*ec-nr 0 1
+. nr lix*ex-nr 0 1
+.\}
+.\"---------- user macro HZ ----------
+.if d HZ .HZ \\n[hd*level] \\n[hd*arg1] "\\$2\\$3"
+.nr hd*last-pos \\n[nl]
+.nr hd*last-hsize \\n[.k]
+.\" HTML: end of heading
+.misc@tag EO-H
+..
+.\"--------
+.de HM
+.nr hd*i 0 1
+.while \\n+[hd*i]<15 .af H\\n[hd*i] \\$[\\n[hd*i]] 1
+..
+.\"----------------------
+.\" set page-nr, called from header
+.\"
+.de hd@set-page
+.\"
+.ie \\n[.$]>0 .nr P \\$1
+.el .nr P +1
+.\" Set section-page-string
+.ds hd*sect-pg \\n[H1]-\\n[P]
+.if \\n[Sectp]>1 .if '\\n[H1]'0' .ds hd*sect-pg "
+..
+.\"########### module pg ####################
+.\" set end of text trap
+.wh 0 pg@header
+.em pg@end-of-text
+.\"
+.ds pg*header ''- \\n[P] -''
+.ds pg*footer
+.if \n[N]=4 .ds pg*header ''''
+.if (\n[N]=3):(\n[N]=5) \{\
+. ds pg*header ''''
+. ds pg*footer ''\\*[hd*sect-pg]''
+.\}
+.ds pg*even-footer
+.ds pg*odd-footer
+.ds pg*even-header
+.ds pg*odd-header
+.\"
+.nr pg*top-margin 0
+.nr pg*foot-margin 0
+.nr pg*block-size 0
+.nr pg*footer-size 5v\" 1v+footer+even/odd footer+2v
+.nr pg*header-size 7v\" 3v+header+even/odd header+2v
+.nr pg*extra-footer-size 0
+.nr pg*extra-header-size 0
+.nr ft*note-size 0
+.nr pg*cur-column 0
+.nr pg*cols-per-page 1
+.nr pg*cur-po \n[@po]
+.nr pg*head-mark 0
+.\"
+.nr pg*ps \n[@ps]
+.nr pg*vs \n[@vs]
+.\"-------------------------
+.\" footer TRAPS: set, enable and disable
+.de pg@set-new-trap
+.nr pg*foot-trap \\n[@pl]u-(\\n[pg*block-size]u+\\n[ft*note-size]u+\\n[pg*foot-margin]u+\\n[pg*footer-size]u+\\n[pg*extra-footer-size]u)
+.\"
+.if \\n[D]>2 .tm pg*foot-trap \\n[@pl]u-(\\n[pg*block-size]u+\\n[ft*note-size]u+\\n[pg*foot-margin]u+\\n[pg*footer-size]u+\\n[pg*extra-footer-size]u) = \\n[pg*foot-trap]
+.\"
+.\" last-pos points to the position of the footer and bottom
+.\" block below foot-notes.
+.nr pg*last-pos \\n[@pl]u-(\\n[pg*block-size]u+\\n[pg*foot-margin]u+\\n[pg*footer-size]u+\\n[pg*extra-footer-size]u)
+.if \\n[D]>2 .tm pg*last-pos \\n[@pl]u-(\\n[pg*block-size]u+\\n[pg*foot-margin]u+\\n[pg*footer-size]u+\\n[pg*extra-footer-size]u) = \\n[pg*last-pos]
+..
+.de pg@enable-trap
+.\" Disable in HTML mode
+.if !'\*[.T]'html' \{\
+.wh \\n[pg*foot-trap]u pg@footer
+.if \\n[D]>2 .tm pg@enable-trap .t=\\n[.t] nl=\\n[nl]
+.if \\n[D]>2 .ptr
+.\}
+..
+.de pg@disable-trap
+.ch pg@footer
+..
+.\" move to new trap (if changed).
+.de pg@move-trap
+.pg@disable-trap
+.pg@set-new-trap
+.pg@enable-trap
+..
+.de pg@enable-top-trap
+.\" set trap for pageheader.
+.nr pg*top-enabled 1
+..
+.de pg@disable-top-trap
+.\" remove trap for pageheader.
+.nr pg*top-enabled 0
+..
+.\" no header on the next page
+.de PGNH
+.nr pg*top-enabled (-1)
+..
+.\" set first trap for pagefooter
+.pg@enable-top-trap
+.pg@set-new-trap
+.pg@enable-trap
+.\"-------------------------
+.\" stop output and begin on next page. Fix footnotes and all that.
+.de pg@next-page
+.\".debug next-page
+.ne 999i \" activate trap
+.\" .pg@footer
+..
+.\"-------------------------
+.\" support for PX, TP and EOP.
+.als }t pg*header
+.als }e pg*even-header
+.als }o pg*odd-header
+.als TPh pg*header
+.als TPeh pg*even-header
+.als TPoh pg*odd-header
+.\"
+.als }b pg*footer
+.als }f pg*even-footer
+.als }p pg*odd-footer
+.als EOPf pg*footer
+.als EOPef pg*even-footer
+.als EOPof pg*odd-footer
+.\"------------------------------------------------------------
+.\" HEADER
+.de pg@header
+.\" Disable in HTML mode
+.if !'\*[.T]'html' \{\
+.if \\n[D]>1 .tm Page# \\n[%] (\\n[.F]:\\n[c.])
+. if (u;(\\n[pg*header-size] + \\n[pg*extra-header-size] \
+ + \\n[pg*footer-size] + \\n[pg*extra-footer-size] \
+ + \\n[.V]) >= \\n[.p]) \{\
+. pl \\n[nl]u
+. @error insufficient page length; aborting
+. \}
+.\}
+.\" check if Hy has been changed
+.ie \\n[Hy] 'hy 14
+.el 'nh
+.if \\n[Idxf] \{\
+.tl '<pagenr\ \\n[%]>'''
+.\}
+.\" assign current page-number to P
+.hd@set-page
+.\" reset spacing
+.nr line*lp\\n[.z] 0
+.nr line*ac\\n[.z] 0
+.\"
+.\" suppress pageheader if pagenumber == 1 and N == [124]
+.if \\n[pg*top-enabled] \{\
+.\" must be fixed!!
+.\". pg@disable-top-trap
+. if \\n[pg*extra-header-size] 'sp \\n[pg*extra-header-size]u
+. if \\n[pg*top-margin] 'sp \\n[pg*top-margin]u
+. ev pg*tl-ev
+. pg@set-env
+. ie d let@header .let@header
+. el \{\
+. ie d TP .TP
+. el \{\
+' sp 3
+. ds hd*format \\g[P]
+. af P 0
+. ie ((\\n[P]=1)&((\\n[N]=1):(\\n[N]=2))) .sp
+. el .tl \\*[pg*header]
+. af P \\*[hd*format]
+. ie o .tl \\*[pg*odd-header]
+. el .tl \\*[pg*even-header]
+' sp 2
+. \}
+. \}
+. ev
+. \" why no-space??
+. if d PX \{\
+. ns
+. PX
+. rs
+. \}
+. \" check for pending footnotes
+. ft@check-old
+. \"
+. \" back to normal text processing
+. pg@enable-trap
+. \" mark for multicolumn
+. nr pg*head-mark \\n[nl]u
+. \" reset NCOL pointer at each new page.
+. nr pg*last-ncol 0
+. \" set multicolumn
+. \"
+. pg@set-po
+. \" print floating displays
+. df@print-float 4
+. tbl@top-hook
+. ns
+.\}
+.if \\n[pg*top-enabled]<0 .nr pg*top-enabled 1
+.nr hd*cur-bline \\n[nl] \" .H needs to know if output has occurred
+.\}
+..
+.\"---------------------------------------------------------
+.\" FOOTER
+.de pg@footer
+.ec
+.if \\n[D]>2 .tm Footer# \\n[%] (\\n[.F]:\\n[c.]) nl=\\n[nl]
+.pg@disable-trap
+.\".debug footer
+.tbl@bottom-hook
+.\" increment pageoffset for MC
+.\" move to the exact start of footer.
+'sp |\\n[pg*foot-trap]u+1v
+.\"
+.if \\n[D]>3 .tm FOOTER after .sp, nl=\\n[nl]
+.\" print footnotes
+.if d ft*div .ft@print
+.\"
+.pg@inc-po
+.if !\\n[pg*cur-column] .pg@print-footer
+.\" next column
+.pg@set-po
+.pg@enable-trap
+.if \\n[@verbose-flag] .eo \" to help VERBON/VERBOFF
+..
+.\"-------------------------
+.de pg@print-footer
+.\" jump to the position just below the foot-notes.
+'sp |\\n[pg*last-pos]u+1v
+.if \\n[D]>3 .tm print-footer nl=\\n[nl]
+.\" check if there are any bottom block
+.if d pg*block-div .pg@block
+.\"
+.\" print the footer and eject new page
+.ev pg*tl-ev
+.pg@set-env
+.vpt 0
+.\" user defined end-of-page macro
+.ie d EOP .EOP
+.el \{\
+. ie o .tl \\*[pg*odd-footer]
+. el .tl \\*[pg*even-footer]
+. ds hd*format \\g[P]
+. af P 0
+. ie (\\n[P]=1)&(\\n[N]=1) .tl \\*[pg*header]
+. el .tl \\*[pg*footer]
+. af P \\*[hd*format]
+. tl ''\\*[Pg_type!\\n[@copy_type]]''
+.\}
+.vpt 1
+.ev
+.\" be sure that floating displays and footnotes will be
+.\" printed at the end of the document.
+.ie (\\n[df*fnr]>=\\n[df*o-fnr]):\\n[ft*exist] \{\
+. ev ne
+' bp
+. ev
+.\}
+.el 'bp
+..
+.\"-------------------------
+.\"
+.\" Initialize the title environment
+.de pg@set-env
+'na
+'nh
+'in 0
+'ti 0
+.ie \\n[Pgps] \{\
+. ps \\n[@ps]u
+. vs \\n[@vs]u
+.\}
+.el \{\
+. ps \\n[pg*ps]u
+. vs \\n[pg*vs]u
+.\}
+.lt \\n[@ll]u
+.ll \\n[@ll]u
+..
+.\"-------------------------
+.de PH
+.ds pg*header "\\$1
+.pg@set-new-size
+..
+.de PF
+.ds pg*footer "\\$1
+.pg@set-new-size
+..
+.de OH
+.ds pg*odd-header "\\$1
+.pg@set-new-size
+..
+.de EH
+.ds pg*even-header "\\$1
+.pg@set-new-size
+..
+.de OF
+.ds pg*odd-footer "\\$1
+.pg@set-new-size
+..
+.de EF
+.ds pg*even-footer "\\$1
+.pg@set-new-size
+..
+.de pg@clear-hd
+.ds pg*even-header
+.ds pg*odd-header
+.ds pg*header
+..
+.de pg@clear-ft
+.ds pg*even-footer
+.ds pg*odd-footer
+.ds pg*footer
+..
+.de pg@set-new-size
+.nr pg*ps \\n[@ps]
+.nr pg*vs \\n[@vs]
+.pg@move-trap
+..
+.\"-------------------------
+.\" end of page processing
+.de pg@footnotes
+.\".debug footnotes
+.\" output footnotes. set trap for block
+.\"
+..
+.\"-------------------------
+.\" print bottom block
+.de pg@block
+.ev pg*block-ev
+'nf
+'in 0
+.ll 100i
+.pg*block-div
+.br
+.ev
+..
+.\"-------------------------
+.\" define bottom block
+.de BS
+.misc@ev-keep pg*block-ev
+.init@reset
+.br
+.di pg*block-div
+..
+.\"-------------------------
+.de BE
+.br
+.di
+.nr pg*block-size \\n[dn]u
+.ev
+.pg@move-trap
+..
+.\"-------------------------
+.\" print out all pending text
+.de pg@end-of-text
+.if \\n[D]>2 .tm ---------- End of text processing ----------------
+.df@eot-print
+.ref@eot-print
+..
+.\"-------------------------
+.\" set top and bottom margins
+.\" -T sets pg*footer-size and pg*header-size instead
+.de VM
+.ie '\\$1'-T' \{\
+. shift
+. if \\n[.$]=0 \{\
+. nr pg*footer-size 5v
+. nr pg*header-size 7v
+. \}
+. if \\n[.$]>0 .nr pg*header-size (v;\\$1)
+. if \\n[.$]>1 .nr pg*footer-size (v;\\$2)
+.\}
+.el \{\
+. if \\n[.$]=0 \{\
+. nr pg*extra-footer-size 0
+. nr pg*extra-header-size 0
+. \}
+. if \\n[.$]>0 .nr pg*extra-header-size (v;\\$1)
+. if \\n[.$]>1 .nr pg*extra-footer-size (v;\\$2)
+. if \\n[D]>2 \{\
+. tm extra top \\n[pg*extra-footer-size]
+. tm extra bottom \\n[pg*extra-header-size]
+. \}
+.\}
+.pg@move-trap
+..
+.\"---------------------
+.\" multicolumn output.
+.de pg@set-po
+.if \\n[pg*cols-per-page]>1 \{\
+. ll \\n[pg*column-size]u
+.\}
+..
+.de pg@inc-po
+.if \\n[pg*cols-per-page]>1 \{\
+. ie \\n+[pg*cur-column]>=\\n[pg*cols-per-page] \{\
+. nr pg*cur-column 0 1
+. nr pg*cur-po \\n[@po]u
+. po \\n[@po]u
+. ll \\n[@ll]u
+. \}
+. el \{\
+. nr pg*cur-po +(\\n[pg*column-size]u+\\n[pg*column-sep]u)
+. po \\n[pg*cur-po]u
+' sp |\\n[pg*head-mark]u
+. tbl@top-hook
+. \}
+.\}
+..
+.\" An argument disables the page-break.
+.de 1C
+.if \\n[pg*cols-per-page]<=1 \{\
+. @warning \\$0: multicolumn mode not active
+. return
+.\}
+.br
+.nr pg*cols-per-page 1
+.nr pg*column-sep 0
+.nr pg*column-size \\n[@ll]
+.nr pg*ncol-i \\n[pg*cur-column]\" temp variable
+.nr pg*cur-column 0 1
+.nr pg*cur-po \\n[@po]u
+.PGFORM
+.ie !'\\$1'1' .SK
+.el \{\
+. if d ft*div \{\
+. if \\n[pg*ncol-i]>0 \{\
+. @warning \\$0: returning to single-column \
+layout with suppressed page break and footnote pending; output may be \
+messy
+. \}
+. \}
+. if \\n[pg*last-ncol]>0 \{\
+. sp |\\n[pg*last-ncol]u
+. nr pg*last-ncol 0
+. \}
+.\}
+..
+.de 2C
+.if \\n[pg*cols-per-page]>1 .@error \\$0: multicolumn mode already \
+active
+.br
+.nr pg*head-mark \\n[nl]u
+.nr pg*cols-per-page 2
+.nr pg*column-sep \\n[@ll]/15
+.nr pg*column-size (\\n[@ll]u*7)/15
+.nr pg*cur-column 0 1
+.nr pg*cur-po \\n[@po]u
+.ll \\n[pg*column-size]u
+.\" .lt \\n[pg*column-size]u
+..
+.\" MC column-size [ column-separation ]
+.de MC
+.if \\n[pg*cols-per-page]>1 .@error \\$0: multicolumn mode already \
+active
+.br
+.nr pg*head-mark \\n[nl]u
+.ie ''\\$1' .nr pg*column-size \\n[.l]
+.el .nr pg*column-size (n;\\$1)
+.ie ''\\$2' .nr pg*column-sep \\n[pg*column-size]/15
+.el .nr pg*column-sep (n;\\$2)
+.\"
+.\" calculate the number of columns/page
+.nr pg*cols-per-page 0 \" temporarily invalid!
+.nr pg*i \\n[pg*column-size]
+.while \\n[pg*i]<=\\n[.l] \{\
+. nr pg*cols-per-page +1
+. nr pg*i \\n[pg*i]+\\n[pg*column-sep]+\\n[pg*column-size]
+.\}
+.if \\n[pg*cols-per-page]<0 .@abort \\n[pg*cols-per-page] columns in \
+page
+.nr pg*cur-column 0 1
+.nr pg*cur-po \\n[@po]u
+.ll \\n[pg*column-size]u
+.\" .lt \\n[pg*column-size]u
+..
+.\" begin a new column
+.de NCOL
+.br
+.if \\n[nl]>\\n[pg*last-ncol] .nr pg*last-ncol \\n[nl]
+.pg@footer
+..
+.\" skip pages
+.de SK
+.br
+.bp
+.nr pg*i 0 1
+.\" force new page by writing something invisible.
+.while \\n+[pg*i]<=(0\\$1) \{\
+\&
+. bp
+.\}
+..
+.\"-------------------------------
+.\" MULB width1 space1 width2 space2 width3 space3 ...
+.de MULB
+.br
+.nr pg*i 0 1
+.nr pg*mul-x 0 1
+.nr pg*mul-ind 0
+.nr pg*mul-last 0
+.while \\n[.$] \{\
+. nr pg*mul!\\n+[pg*i] (n;0\\$1)
+. nr pg*muls!\\n[pg*i] (n;0\\$2)
+. shift 2
+.\}
+.nr pg*mul-max-col \\n[pg*i]
+.ds pg*mul-fam \\n[.fam]
+.nr pg*mul-font \\n[.f]
+.ev pg*mul-ev
+.ps \\n[@ps]u
+.vs \\n[@vs]u
+.fam \\*[pg*mul-fam]
+.ft \\n[pg*mul-font]
+.fi
+.hy 6
+.di pg*mul-div
+.MULN
+..
+.\"-----------
+.de MULN
+.if \\n[pg*mul-x]>=\\n[pg*mul-max-col] .@abort undefined column width \
+(pg*mul-x=\\n[pg*mul-x >= pg*mul-max-col=\\n[pg*mul-max])
+.br
+.if \\n[.d]>\\n[pg*mul-last] .nr pg*mul-last \\n[.d]
+.rt +0
+.in \\n[pg*mul-ind]u
+.ll (u;\\n[.i]+\\n[pg*mul!\\n+[pg*mul-x]])u
+.nr pg*mul-ind +(u;\\n[pg*mul!\\n[pg*mul-x]]+\\n[pg*muls!\\n[pg*mul-x]])
+..
+.\"-----------
+.\" MULE
+.de MULE
+.br
+.if \\n[.d]>\\n[pg*mul-last] .nr pg*mul-last \\n[.d]
+.di
+.ev
+.ne \\n[pg*mul-last]u
+.nf
+.mk
+.pg*mul-div
+.rt
+.sp \\n[pg*mul-last]u
+.fi
+..
+.\"-----------
+.de OP
+.br
+.ie o .if !\\n[pg*head-mark]=\\n[nl] \{\
+. bp +1
+. bp +1
+.\}
+.el .bp
+..
+.\"########### module footnotes ###################
+.nr ft*note-size 0
+.nr ft*busy 0
+.nr ft*nr 0 1
+.aln :p ft*nr
+.nr ft*wide 0
+.nr ft*hyphen 0\" hyphenation value
+.nr ft*adjust 1\" >0 if adjust true
+.nr ft*indent 1\" >0 if text indent true (not imp. $$$)
+.nr ft*just 0\" 0=left justification, 1=right (not imp. $$$)
+.nr ft*exist 0\" not zero if there are any footnotes to be printed
+.nr ft*clear-at-header 0\" >0 if footnotes should be reset at first level head.
+.\"
+.ie t .ds F \v'-.4m'\s-3\\n+[ft*nr]\s0\v'.4m'
+.el .ds F [\\n+[ft*nr]]
+.\"
+.\"-----------------
+.\" init footnote environment
+.de ft@init
+.\" indentcontrol not implemented $$$
+.\" label justification not implemented $$$
+'in 0
+'fi
+.ie \\n[ft*adjust] 'ad
+.el 'na
+.ie \\n[ft*hyphen] 'hy 6
+.el 'hy 0
+.ll \\n[@cur-ll]u
+.lt \\n[@cur-ll]u
+.ps (p;\\n[@ps]u-2)
+.vs (p;\\n[@vs]u-1)
+..
+.\"-----------------
+.\" set footnote format
+.\" no support for two column processing (yet). $$$
+.de FD
+.if \\n[.$]=0 .@error \\$0: expected 1 or 2 arguments, got \\n[.$]
+.ie \\n[.$]=2 .nr ft*clear-at-header 1
+.el .nr ft*clear-at-header 0
+.\"
+.if !'\\$1'' \{\
+. ie \\$1>11 .nr ft*format 0
+. el .nr ft*format \\$1
+. \"
+. nr ft*hyphen (\\n[ft*format]%2)*6
+. nr ft*format \\n[ft*format]/2
+. \"
+. nr ft*adjust 1-(\\n[ft*format]%2)
+. nr ft*format \\n[ft*format]/2
+. \"
+. nr ft*indent 1-(\\n[ft*format]%2)
+. nr ft*format \\n[ft*format]/2
+. \"
+. nr ft*just \\n[ft*format]%2
+.\}
+..
+.\"---------------
+.\" Footnote and display width control $$$
+.de WC
+.nr ft*i 0 1
+.while \\n+[ft*i]<=\\n[.$] \{\
+. ds ft*x \\$[\\n[ft*i]]
+. if '\\*[ft*x]'N' \{\
+. nr ft*wide 0
+. nr ft*first-fn 0
+. nr ds*wide 0
+. nr ds*float-break 1
+. \}
+. if '\\*[ft*x]'-WF' .nr ft*wide 0
+. if '\\*[ft*x]'WF' .nr ft*wide 1
+. if '\\*[ft*x]'-FF' .nr ft*first-fn 0
+. if '\\*[ft*x]'FF' .nr ft*first-fn 1
+. if '\\*[ft*x]'-WD' \{\
+. nr ds*wide 0
+. if r ft*df-save \{\
+. nr Df \\n[ft*df-save]
+. rm ft*df-save
+. \}
+. \}
+. if '\\*[ft*x]'WD' \{\
+. nr ds*wide 1
+. nr ft*df-save \\n[Df]
+. nr Df 4
+. \}
+. if '\\*[ft*x]'-FB' .nr ds*float-break 0
+. if '\\*[ft*x]'FB' .nr ds*float-break 1
+. if \\n[D]>1 .tm WC WF=\\n[ft*wide] WD=\\n[ds*wide]
+.\}
+..
+.\"-----------------
+.\" begin footnote
+.\" Change environment, switch to diversion and print the foot-note mark.
+.de FS
+.if \\n[ft*busy] .@error \\$0: cannot nest; missing FE?
+.nr ft*busy 1
+.ev ft*ev
+.ft@init
+.if !\\n[ft*wide] .pg@set-po
+.di ft*tmp-div
+.nr ft*space (u;\\n[Fs]*\\n[Lsp])
+.sp \\n[ft*space]u
+.\" print mark
+.ie \\n[.$] .ds ft*mark \\$1
+.el .ds ft*mark \\n[ft*nr].
+\\*[ft*mark]
+.in +.75c
+.sp -1
+.nr ft*exist 1
+..
+.\"-----------------
+.\" init footnote diversion
+.de ft@init-footnote
+.di ft*div
+\l'20n'
+.br
+.di
+.nr ft*note-size \\n[dn]
+..
+.\"-----------------
+.\" end footnote
+.\" End the diversion, back to previous environment, and adjust
+.\" the trap to the new foot-note size.
+.de FE
+.nr ft*busy 0
+.br
+.di
+'in 0
+'nf
+.if \\n[@pl]u<\\n[dn]u .@error \\$0: footnote bigger than page area
+.if !d ft*div .nr dn +1v
+.if \\n[D]>3 .tm FE: foot-trap=\\n[pg*foot-trap] .d=\\n[.d] dn=\\n[dn]
+.ie (\\n[pg*foot-trap]u-\\n[.d]u)<\\n[dn]u \{\
+. da ft*next-div
+. ft*tmp-div
+. br
+. di
+.\}
+.el \{\
+. if !d ft*div .ft@init-footnote
+. da ft*div
+. ft*tmp-div
+. di
+. nr ft*note-size +\\n[dn]
+.\}
+.rm ft*tmp-div
+.ev
+.pg@move-trap
+..
+.\"-----------------
+.\" print footnotes, see pg@footer
+.de ft@print
+.ev ft*print-ev
+'nf
+'in 0
+.ll 100i
+.ft*div
+.br
+.ev
+.rm ft*div
+.nr ft*note-size 0
+.pg@move-trap
+..
+.\"-----------------
+.\" check if any pending footnotes, see pg@header
+.de ft@check-old
+.if d ft*next-div \{\
+. ev ft*ev
+. ft@init
+. ft@init-footnote
+. nf
+. in 0
+. da ft*div
+. ft*next-div
+. di
+. nr ft*note-size +\\n[dn]
+. rm ft*next-div
+. ev
+. nr ft*exist 0
+. pg@move-trap
+.\}
+..
+.\"########### module display ###################
+.nr ds*wide 0\" >0 if wide displays wanted
+.nr df*fnr 0 1\" floating display counter
+.nr df*o-fnr 1\" floating display counter, already printed
+.nr ds*snr 0 1\" static display counter
+.nr ds*lvl 0 1\" display level
+.nr ds*float-busy 0\" >0 if printing float
+.nr df*float 0\" >0 if previous display was floating
+.\"--------------------------------------------
+.de DE
+.ie \\n[df*float] .df@end \\$@
+.el .ds@end \\$@
+..
+.\"--------------------------------------------
+.\" floating display start
+.\" nested DF/DE is not allowed.
+.de DF
+.if \\n[df*float] .@error \\$0: cannot nest floating keeps; use DS \
+within DF/DE
+.ds ds@macro \\$0
+.ds@set-format \\$@
+.\"
+.nr df*old-ll \\n[.l]
+.nr ds*ftmp \\n[.f]
+.misc@ev-keep df*ev
+.ft \\n[ds*ftmp]
+.\"
+.init@reset
+.di df*div
+'in 0
+.\"
+.ds@set-new-ev \\n[df*old-ll]
+.SP \\n[Lsp]u
+.nr df*float 1
+..
+.\"--------------------------------------------
+.de df@end
+.br
+.SP \\n[Lsp]u
+.di
+.nr df*width!\\n+[df*fnr] \\n[dl]
+.nr df*height!\\n[df*fnr] \\n[dn]
+.nr df*wide!\\n[df*fnr] \\n[ds*wide]
+.nr df*format!\\n[df*fnr] \\n[ds*format]
+.ev
+.if \\n[D]>2 .tm DF:fnr=\\n[df*fnr] w=\\n[dl] h=\\n[dn] wide=\\n[ds*wide] \
+ form=\\n[ds*format]
+.\" move div to the floating display list
+.rn df*div df*fdiv!\\n[df*fnr]
+.\"
+.nr par@suppress-indentation 1 \" no indentation after displays
+.\" print float if queue is empty and the display fits into
+.\" the current page
+.if ((\\n[df*fnr]>=\\n[df*o-fnr])&(\\n[dn]<\\n[.t])) .df@print-float 1
+.nr df*float 0
+..
+.\"-------------
+.\" called by end-of-text
+.de df@eot-print
+.br
+.if \\n[df*o-fnr]<=\\n[df*fnr] \{\
+. if \\n[D]>2 .tm Print remaining displays.
+.\" still some floats left, make non-empty environment
+. misc@ev-keep ne
+. init@reset
+\c
+. df@print-float 3
+. ev
+.\}
+..
+.\"---------------
+.\" print according to Df and De.
+.\" .df@print-float type
+.\" type called from
+.\" 1 .DE
+.\" 2 end of section
+.\" 3 end of document
+.\" 4 beginning of new page
+.\"
+.de df@print-float
+.if \\n[Df]>5 .@abort invalid float type: 5 < Df (\\n[Df])
+.if !\\n[ds*float-busy] \{\
+. nr ds*float-busy 1
+.\" at .DE
+. if \\n[D]>3 \{\
+. tmc print-float: .t=\\n[.t]
+. if r df*height!\\n[df*o-fnr] \
+. tmc , h=\\n[df*height!\\n[df*o-fnr]]
+. tm
+. \}
+. \" Df = 1 or 5
+. if (\\$1=1)&((\\n[Df]=1):(\\n[Df]=5)) \{\
+. if \\n[.t]>\\n[df*height!\\n[df*o-fnr]] \{\
+. \" Print only new displays.
+. if \\n[df*o-fnr]=\\n[df*fnr] \{\
+. br
+. ds@print-one-float
+. \}
+. \}
+. \}
+. \" Df = 3
+. if (\\$1=1)&(\\n[Df]=3) \{\
+. if \\n[.t]>\\n[df*height!\\n[df*o-fnr]] \{\
+. br
+. ds@print-one-float
+. \}
+. \}
+.\" print all if Df<2 and end of section
+. if (\\$1=2)&(\\n[Sectp]>0)&(\\n[Df]<2) \{\
+. br
+. ds@print-all-floats
+. \}
+.\" print all if end of document. Where should they go instead?
+. if \\$1=3 \{\
+. br
+. ds@print-all-floats
+.\}
+.\" new page
+. if (\\$1=4)&(\\n[Df]>1) \{\
+. if \\n[Df]=2 .ds@print-one-float
+. if \\n[Df]=3 .ds@print-one-float
+. if \\n[Df]>3 \{\
+. ie \\n[De] .ds@print-all-floats
+. el .ds@print-this-page
+. \}
+. \}
+. nr ds*float-busy 0
+.\}
+..
+.\"---------------
+.\" DF out
+.\" print a floating diversion
+.de ds@output-float
+.nr df*old-ll \\n[.l]
+.nr df*old-in \\n[.i]
+.ev ds*fev
+.nf
+.nr df*i \\n[df*o-fnr]
+.nr df*f \\n[df*format!\\n[df*i]]
+.\"
+.in \\n[df*old-in]u
+.if \\n[df*f]=1 'in +\\n[Si]n
+.if \\n[df*f]>=2 'in 0
+.if \\n[df*f]=2 'ce 9999
+.if \\n[df*f]=3 'in (u;(\\n[.l]-\\n[df*width!\\n[df*i]])/2)
+.if \\n[df*f]=4 'rj 9999
+.if \\n[df*f]=5 'in (u;\\n[.l]-\\n[df*width!\\n[df*i]])
+.\"
+.\"
+.df*fdiv!\\n[df*o-fnr]
+.\"
+.if \\n[df*f]=2 'ce 0
+.if \\n[df*f]=4 'rj 0
+.ev
+.rm df*fdiv!\\n[df*i]
+.rm df*height!\\n[df*i]
+.rm df*format!\\n[df*i]
+.if \\n[df*wide!\\n[df*i]] .nr pg*head-mark \\n[nl]u
+.nr df*o-fnr +1
+..
+.\"---------------
+.\" print one floating display if there is one.
+.de ds@print-one-float
+.if \\n[df*o-fnr]<=\\n[df*fnr] \{\
+. if \\n[D]>3 .tm print-one-float: .t=\\n[.t], h=\\n[df*height!\\n[df*o-fnr]]
+. if \\n[.t]<\\n[df*height!\\n[df*o-fnr]] .pg@next-page
+. ds@output-float
+. if \\n[De] .pg@next-page
+.\}
+..
+.\"---------------
+.\" print all queued floats.
+.\" if De>0 do a page eject between the floats.
+.de ds@print-all-floats
+.while \\n[df*o-fnr]<=\\n[df*fnr] \{\
+. if \\n[D]>3 .tm print-all-floats: .t=\\n[.t], h=\\n[df*height!\\n[df*o-fnr]]
+. if \\n[.t]<\\n[df*height!\\n[df*o-fnr]] .pg@next-page
+. br
+\c
+. ds@output-float
+. if \\n[De] .pg@next-page
+.\}
+..
+.\"---------------
+.\" print as many floats as will fit on the current page
+.de ds@print-this-page
+.while \\n[df*o-fnr]<=\\n[df*fnr] \{\
+. if \\n[D]>3 .tm print-this-page: .t=\\n[.t], h=\\n[df*height!\\n[df*o-fnr]]
+. if \\n[.t]<\\n[df*height!\\n[df*o-fnr]] .break
+. ds@output-float
+.\}
+..
+.\"---------------------------------------------------
+.\" get format of the display
+.de ds@set-format
+.ie \\n[.$] \{\
+. ie r ds*format!\\$1 .nr ds*format \\n[ds*format!\\$1]
+. el .@error \\*[ds@macro]: unrecognized format '\\$1'
+.\}
+.el .nr ds*format 0
+.if \\n[D]>2 .tm set format=\\n[ds*format]
+.\" fill or not to fill, that is the...
+.nr ds*fill 0
+.if \\n[.$]>1 \{\
+. ie r ds*fill!\\$2 .nr ds*fill \\n[ds*fill!\\$2]
+. el .@error \\*[ds@macro]: unrecognized fill style '\\$2'
+.\}
+.if \\n[D]>2 .tm set fill=\\n[ds*fill]
+.nr ds*rindent 0
+.if \\n[.$]>2 .nr ds*rindent \\$3
+.if \\n[D]>2 .tm set indent=\\n[ds*rindent]
+..
+.\"-----------------------------
+.\" .ds@set-new-ev previous-line-length
+.de ds@set-new-ev
+.ll \\$1u
+.lt \\$1u
+.if \\n[ds*rindent] \{\
+. ll -\\n[ds*rindent]n
+. lt -\\n[ds*rindent]n
+.\}
+.if \\n[ds*wide] \{\
+. ll \\n[@ll]u
+. lt \\n[@ll]u
+.\}
+.\"
+.ie \\n[ds*fill] 'fi
+.el 'nf
+..
+.\"--------------------------------------------------------
+.nr ds*format 0\" dummy value for .En/.EQ
+.nr ds*format! 0\" no indent
+.nr ds*format!0 0\" no indent
+.nr ds*format!L 0\" no indent
+.nr ds*format!I 1\" indent
+.nr ds*format!1 1\" indent
+.nr ds*format!C 2\" center each line
+.nr ds*format!2 2\" center each line
+.nr ds*format!CB 3\" center as block
+.nr ds*format!3 3\" center as block
+.nr ds*format!R 4\" right justify each line
+.nr ds*format!4 4\" right justify each line
+.nr ds*format!RB 5\" right justify as block
+.nr ds*format!5 5\" right justify as block
+.\"---------------
+.nr ds*fill! 0\" no fill
+.nr ds*fill!N 0\" no fill
+.nr ds*fill!0 0\" no fill
+.nr ds*fill!F 1\" fill on
+.nr ds*fill!1 1\" fill on
+.\"--------------------------------------------
+.\" static display start
+.\" nested DS/DE is allowed. No limit on depth.
+.de DS
+.ds ds@macro \\$0
+.br
+.nr ds*lvl +1
+.ds@set-format \\$@
+.\"
+.nr ds*old-ll \\n[.l]
+.nr ds*old-in \\n[.i]
+.misc@push ds-in \\n[ds*old-in] \" Saving indent and line length of
+.misc@push ds-ll \\n[ds*old-ll] \" the text outside the display.
+.misc@push ds-form \\n[ds*format]
+.nr ds*i \\n[.i]
+.nr ds*ftmp \\n[.f]
+.misc@ev-keep ds*ev!\\n+[ds*snr]
+.ft \\n[ds*ftmp]
+.\"
+.init@reset
+.\" indent in a diversion doesn't seem like a good idea.
+'in 0
+.di ds*div!\\n[ds*snr]
+.\"
+.nr ds*div-ll \\n[ds*old-ll]
+.if \\n[ds*format]=1 .nr ds*div-ll -\\n[Si]n
+.ds@set-new-ev \\n[ds*div-ll]
+.nr df*float 0
+..
+.\"--------------------------------------------
+.de ds@end
+.\" We hard-code the DE macro name here since this macro is internal but
+.\" only DE calls it. We also know we're closing a static keep because
+.\" df@end is called otherwise. See `DE`.
+.if \\n-[ds*lvl]<0 .@error DE: no corresponding DS
+.br
+.di
+.\" **********
+.nr ds*width \\n[dl]
+.nr ds*height \\n[dn]
+.misc@pop-nr ds-ll ds*old-ll \" Restore indent and
+.misc@pop-nr ds-in ds*old-in \" line length
+.misc@pop-nr ds-form ds*format
+.\"
+.\" **********
+'nf
+.\" calculate needed space
+.nr ds*need \\n[ds*height]
+.nr ds*i \\n[pg*foot-trap]-\\n[pg*header-size]u-\\n[pg*extra-header-size]u
+.if (\\n[ds*height]>\\n[ds*i])&(\\n[.t]<(\\n[ds*i]/2)) .nr ds*need \\n[.t]u+1v
+.if (\\n[ds*height]<\\n[ds*i])&(\\n[.t]<(\\n[ds*height])) .nr ds*need \\n[.t]u+1v
+.\" Eject page if display will fit one page and
+.\" there are less than half of the page left.
+.if \\n[ds*need] .ne \\n[ds*need]u
+.\"
+.\" Print static display
+.nr ds*i \\n[Lsp]
+.if r Dsp .nr ds*i \\n[Dsp]
+.\"
+.if \\n[Ds] .SP \\n[ds*i]u \" Space before display
+.\" check if pending equation label
+.eq@check \\n[ds*need]
+'in \\n[ds*old-in]u
+.if \\n[ds*format]=1 'in \\n[ds*old-in]u+\\n[Si]n
+.if \\n[ds*format]>=2 'in 0
+.if \\n[ds*format]=2 'ce 9999
+.if \\n[ds*format]=3 'in (u;(\\n[.l]-\\n[ds*width])/2)
+.if \\n[ds*format]=4 'rj 9999
+.if \\n[ds*format]=5 'in (u;\\n[.l]-\\n[ds*width])
+.\" **********
+.\"
+.ds*div!\\n[ds*snr]
+.if \\n[Ds] .SP \\n[ds*i]u \" Space after display
+.\"
+.if \\n[ds*format]=2 'ce 0
+.if \\n[ds*format]=4 'rj 0
+.rm ds*div!\\n[ds*snr]
+.nr ds*snr -1
+.nr par@suppress-indentation 1 \" no indentation after displays
+.ev
+..
+.\"########### module list ###################
+.\" .LI text-indent mark-indent pad type [mark [LI-space [LB-space] ] ]
+.\"
+.nr li*tind 0
+.nr li*mind 0
+.nr li*pad 0
+.nr li*type 0
+.ds li*mark 0
+.nr li*li-spc 0
+.nr li*lvl 0 1
+.aln :g li*lvl
+.nr li*cur-vpos 0
+.\"--------------------------
+.\" the major list-begin macro.
+.\" If type == -1 a 'break' will occur.
+.de LB
+.if \\n[.$]<4 .@error \\$0: expected at least 4 arguments, got \\n[.$]
+.misc@push cind \\n[.i]
+.misc@push tind \\n[li*tind]
+.misc@push mind \\n[li*mind]
+.misc@push pad \\n[li*pad]
+.misc@push type \\n[li*type]
+.misc@push li-spc \\n[li*li-spc]
+.ds li*mark-list!\\n[li*lvl] \\*[li*mark]
+.nr li*lvl +1
+.\"
+.nr li*tind (n;0\\$1)\" text-indent
+.nr li*mind (n;0\\$2)\" mark-indent
+.nr li*pad (n;0\\$3)\" pad
+.nr li*type 0\\$4\" type
+.ds li*mark \\$5\" mark
+.ie !'\\$6'' .nr li*li-spc \\$6\" LI-space
+.el .nr li*li-spc 1
+.ie !'\\$7'' .nr li*lb-spc \\$7\" LB-space
+.el .nr li*lb-spc 0
+.\" init listcounter
+.nr li*cnt!\\n[li*lvl] 0 1
+.\" assign format
+.af li*cnt!\\n[li*lvl] 1
+.if \\n[li*type] .if !'\\*[li*mark]'' .af li*cnt!\\n[li*lvl] \\*[li*mark]
+.\"
+.if \\n[li*lb-spc] .SP (u;\\n[li*lb-spc]*\\n[Lsp])
+.in +\\n[li*tind]u
+..
+.\"---------------
+.de LI
+.if \\n[li*lvl]<1 .@error \\$0: no list active; call AL, BL, BVL, ... \
+first
+.if \\n[li*li-spc]&(\\n[li*lvl]<=\\n[Ls]) \
+. SP (u;\\n[li*li-spc]*\\n[Lsp])
+.ne 2v
+.\"
+.ds li*c-mark \\*[li*mark]
+.nr li*cnt!\\n[li*lvl] +1
+.if \\n[li*type]=1 .ds li*c-mark \\n[li*cnt!\\n[li*lvl]].
+.if \\n[li*type]=2 .ds li*c-mark \\n[li*cnt!\\n[li*lvl]])
+.if \\n[li*type]=3 .ds li*c-mark (\\n[li*cnt!\\n[li*lvl]])
+.if \\n[li*type]=4 .ds li*c-mark [\\n[li*cnt!\\n[li*lvl]]]
+.if \\n[li*type]=5 .ds li*c-mark <\\n[li*cnt!\\n[li*lvl]]>
+.if \\n[li*type]=6 .ds li*c-mark {\\n[li*cnt!\\n[li*lvl]]}
+.if \\n[.$]=1 .ds li*c-mark \\$1
+.if \\n[.$]=2 \{\
+. ie (\\$2=2):(\\n[Limsp]=0) .ds li*c-mark \\$1\\*[li*c-mark]
+. el .ds li*c-mark \\$1\ \\*[li*c-mark]
+.\}
+.\"
+.\" determine where the text begins
+.nr li*text-begin \\n[li*tind]>?\w@\\*[li*c-mark]\ @
+.\"
+.\" determine where the mark begin
+.ie !\\n[li*pad] .nr li*in \\n[li*mind]
+.el .nr li*in \\n[li*text-begin]-\\n[li*pad]-\w@\\*[li*c-mark]@
+.if !\\n[li*in] .nr li*in 0
+.\"
+.ti -\\n[li*tind]u
+.\" no indentation if hanging indent
+.if (\w@\\*[li*c-mark]@=0)&((\\n[.$]=0):(\w@\\$1@=0)) .nr li*text-begin 0
+\Z'\&\h'\\n[li*in]u'\\*[li*c-mark]'\h'\\n[li*text-begin]u'\&\c
+.if \\n[li*type]=-1 .br
+..
+.\"
+.\"-------------
+.de li@pop
+.nr li*lvl -1
+.misc@pop-nr cind li*tmp
+.in \\n[li*tmp]u
+.misc@pop-nr tind li*tind
+.misc@pop-nr mind li*mind
+.misc@pop-nr pad li*pad
+.misc@pop-nr type li*type
+.misc@pop-nr li-spc li*li-spc
+.ds li*mark \\*[li*mark-list!\\n[li*lvl]]
+..
+.de LE
+.if \\n[li*lvl]<1 .@error \\$0: no list active; call AL, BL, BVL, ... \
+and LI first
+.li@pop
+.if '\\$1'1' .SP \\n[Lsp]u
+.nr par@suppress-indentation 1 \" no indentation after lists
+..
+.\"-------------
+.\" list status clear.
+.\" terminate all lists to level i
+.de LC
+.nr li*i 0
+.if \\n[.$] \{\
+. ie \B'\\$1' .nr li*i \\$1
+. el .@error \\$0: argument not numeric: '\\n[li*i]'
+.\}
+.if \\n[li*i]>\\n[li*lvl] .@error \\$0 invalid argument: \\n[li*i] \
+exceeds depth of nested lists (\\n[li*lvl])
+.while \\n[li*lvl]>\\n[li*i] .li@pop
+.nr par@suppress-indentation 1 \" no indentation after lists
+..
+.\"-------------
+.de AL
+.if \\n[.$]>3 .@warning \\$0: ignoring excess arguments
+.if \\n[D]>2 .tm AL $*
+.ie \\n[.$]<=1 .LB \\n[Li] 0 2 1 "\\$1"
+.el \{\
+. ie \\n[.$]=2 .LB 0\\$2 0 2 1 "\\$1"
+. el \{\
+. ie !'\\$2'' .LB \\$2 0 2 1 "\\$1" 0 1
+. el .LB \\n[Li] 0 2 1 "\\$1" 0 1
+. \}
+.\}
+..
+.de ML
+.if \\n[.$]>3 .@warning \\$0: ignoring excess arguments
+.if \\n[D]>2 .tm ML $*
+.nr li*ml-width \w@\\$1@u+1n
+.if \\n[.$]<2 .LB \\n[li*ml-width]u 0 1 0 "\\$1"
+.if \\n[.$]=2 .LB 0\\$2 0 1 0 "\\$1"
+.if \\n[.$]=3 \{\
+. ie '\\$2'' .LB \\n[li*ml-width]u 0 1 0 "\\$1" 0 1
+. el .LB \\n[Li] 0 1 0 "\\$1" 0 1
+.\}
+..
+.de VL
+.if \\n[D]>2 .tm VL $*
+.if \\n[.$]>3 .@warning \\$0: ignoring excess arguments
+.if \\n[.$]<1 .@error \\$0: expected 1 to 3 arguments, got \\n[.$]
+.ie \\n[.$]<3 .LB 0\\$1 0\\$2 0 0
+.el .LB 0\\$1 0\\$2 0 0 \& 0 1
+..
+.de BL
+.if \\n[D]>2 .tm BL $*
+.if \\n[.$]>2 .@warning \\$0: ignoring excess arguments
+.if \\n[.$]<1 .LB \\n[Pi] 0 1 0 \\*[BU]
+.if \\n[.$]=1 .LB 0\\$1 0 1 0 \\*[BU]
+.if \\n[.$]=2 \{\
+. ie '\\$1'' .LB \\n[Pi] 0 1 0 \\*[BU] 0 1
+. el .LB 0\\$1 0 1 0 \\*[BU] 0 1
+.\}
+..
+.de DL
+.if \\n[D]>2 .tm DL $*
+.if \\n[.$]>2 .@warning \\$0: ignoring excess arguments
+.if \\n[.$]<1 .LB \\n[Pi] 0 1 0 \[em]
+.if \\n[.$]=1 .LB 0\\$1 0 1 0 \[em]
+.if \\n[.$]=2 \{\
+. ie '\\$1'' .LB \\n[Pi] 0 1 0 \[em] 0 1
+. el .LB 0\\$1 0 1 0 \[em] 0 1
+.\}
+..
+.de RL
+.if \\n[D]>2 .tm RL $*
+.if \\n[.$]>2 .@warning \\$0: ignoring excess arguments
+.if \\n[.$]<1 .LB 6 0 2 4
+.if \\n[.$]=1 .LB 0\\$1 0 2 4
+.if \\n[.$]=2 \{\
+. ie '\\$1'' .LB 6 0 2 4 1 0 1
+. el .LB 0\\$1 0 2 4 1 0 1
+.\}
+..
+.\" Broken Variable List. As .VL but text begin on the next line
+.de BVL
+.if \\n[D]>2 .tm BVL $*
+.if \\n[.$]>3 .@warning \\$0: ignoring excess arguments
+.if \\n[.$]<1 .@error \\$0: expected 1 to 3 arguments, got \\n[.$]
+.ie \\n[.$]<3 .LB 0\\$1 0\\$2 0 -1
+.el .LB 0\\$1 0\\$2 0 -1 \& 0 1
+..
+.\" ####### module tbl #######################################
+.\" This module is copied from groff_ms and modified for mm.
+.\" Yes, it does not resemble the original anymore :-).
+.\" Don't know if I missed something important.
+.\" Groff_ms is written by James Clark.
+.nr tbl*have-header 0
+.nr tbl*header-written 0
+.de TS
+.br
+.if ''\\n[.z]' .SP
+.if '\\$1'H' .di tbl*header-div
+..
+.de tbl@top-hook
+.if \\n[tbl*have-header] \{\
+. ie \\n[.t]-\\n[tbl*header-ht]-1v .tbl@print-header
+. el .sp \\n[.t]u
+.\}
+..
+.de tbl@bottom-hook
+.if \\n[tbl*have-header] \{\
+. nr T. 1
+.\" draw bottom and side lines of boxed tables.
+. T#
+.\}
+.nr tbl*header-written 0
+..
+.de tbl@print-header
+.ev tbl*ev
+'nf
+.tbl*header-div
+.ev
+.mk #T
+.nr tbl*header-written 1
+..
+.de TH
+.ie '\\n[.z]'tbl*header-div' \{\
+. nr T. 0
+. T#
+. br
+. di
+. nr tbl*header-ht \\n[dn]
+. ne \\n[dn]u+1v
+. nr tbl*have-header 1
+. ie '\\$1'N' .if !\\n[tbl*header-written] .tbl@print-header
+. el .tbl@print-header
+.\}
+.el .@error \\$0: .TH without .TS H"
+..
+.de TE
+.ie '\\n[.z]'tbl*header-div' .@error \\$0: .TS H but no .TH before .TE
+.el \{\
+. nr tbl*have-header 0
+.\}
+.\" reset tabs
+.TAB
+..
+.de T&
+..
+.\" ####### module pic #######################################
+.de PS
+.if !\\n[.$]=2 \{\
+. ds pic*msg \\$0: expected 2 arguments, got \\n[.$]\"
+. as pic*msg ; not preprocessed with pic?\"
+. @error \\*[pic*msg]
+.\}
+.br
+.SP .5
+.if r ds*format .if !\\n[ds*lvl] .ne (u;\\$1)+1v
+..
+.de PY
+.init@reset
+..
+.de PE
+.PY
+.SP .5
+..
+.\" ####### module eq #######################################
+.\"
+.nr eq*number 0 1
+.ds eq*label
+.de EQ
+.ds eq*label "\\$1
+..
+.de eq@check
+.if !'\\*[eq*label]'' \{\
+. mk
+. \" space down to middle of equation
+' sp (u;(\\$1-1v)/2)
+. ie (\\n[Eq]%2) \{\
+. \" label to the left
+\h'|0'\\*[eq*label]
+. \}
+. el \{\
+. \" label to the right, possibly compensating for
+. \" indented display
+. ie \\n[ds*format]=1 \
+\h'|\\n[.l]u-\w'\\*[eq*label]'u+\\n[Si]n'\\*[eq*label]
+. el \h'|\\n[.l]u-\w'\\*[eq*label]'u'\\*[eq*label]
+. \}
+. rt
+.\}
+.ds eq*label
+..
+.de EN
+..
+.\"########### module toc ###################
+.\" table of contents
+.nr toc*slevel 1
+.nr toc*spacing \n[Lsp]u
+.nr toc*tlevel 2
+.nr toc*tab 0
+.\"-----------
+.\" Table of contents with friends (module lix)
+.de TC
+.br
+.\" print any pending displays and references
+.df@print-float 3
+.if \\n[ref*flag] .RP 0 1
+.\"
+.if \w@\\$1@>0 .nr toc*slevel \\$1
+.if \w@\\$2@>0 .nr toc*spacing (u;\\$2*\\n[Lsp])
+.if \w@\\$3@>0 .nr toc*tlevel \\$3
+.if \w@\\$4@>0 .nr toc*tab \\$4
+.if \\n[pg*cols-per-page]>1 .1C
+.ds H1txt \\*[Licon]
+.ds Tcst co
+.pg@clear-hd
+.EF ""
+.OF ""
+.pg@next-page
+.\"-------------
+.if d Ci .toc@read-Ci \\*[Ci]
+.nf
+.in 0
+.ie \\n[Oc] .hd@set-page 1
+.el \{\
+. nr toc*pn 1 1
+. af toc*pn i
+. aln ;g toc*pn
+. PF "''\\\\\\\\n[toc*pn]''"
+. am pg@header
+. nr toc*pn +1
+\\..
+.\}
+.nr toc*i 4 1
+.while \\n+[toc*i]<10 \{\
+. if !'\\$\\n[toc*i]'' \{\
+. ce
+\\$\\n[toc*i]
+. br
+. \}
+.\}
+.if \\n[.$]<=4 .if d TX .TX
+.ie d TY .if \\n[.$]<=4 .TY
+.el \{\
+. ce
+\\*[Licon]
+. br
+. SP 3
+.\}
+.if d toc*list .toc*list
+.br
+.\" print LIST OF XXX
+.if d lix*dsfg .lix@print-ds fg FG "\\*[Lf]" \\n[.$]
+.if d lix*dstb .lix@print-ds tb TB "\\*[Lt]" \\n[.$]
+.if d lix*dsec .lix@print-ds ec EC "\\*[Le]" \\n[.$]
+.if d lix*dsex .lix@print-ds ex EX "\\*[Lx]" \\n[.$]
+..
+.\"-----------
+.\" .toc@read-Ci lev1 lev2 lev3 lev4 ... lev7
+.de toc@read-Ci
+.nr toc*i 0 1
+.while \\n+[toc*i]<15 \{\
+. nr toc*hl!\\n[toc*i] \\$[\\n[toc*i]]
+.\}
+..
+.\"-----------
+.de toc@entry
+.ie \\n[Sectp] \{\
+. toc@save \\$1 "\\*[hd*mark]" "\\$2" \\*[hd*sect-pg]
+.\}
+.el .toc@save \\$1 "\\*[hd*mark]" "\\$2" \\n[P]
+..
+.als )E toc@entry
+.\"-----------
+.de toc@save
+.\" collect maxsize of mark if string Ci don't exist.
+.if !d Ci \{\
+. if !r toc*hl!\\$1 .nr toc*hl!\\$1 0
+. if \\n[toc*hl!\\$1]<=\w@\\$2@ \{\
+. nr toc*hl!\\$1 \w@\\$2@u
+. \}
+.\}
+.am toc*list
+.\" .toc@set level headernumber text pagenumber
+.toc@set \\$1 "\\$2" "\\$3" \\$4
+\\..
+..
+.\"-----------
+.\" level mark text pagenumber
+.de toc@set
+.if \\$1<=\\n[toc*slevel] .SP \\n[toc*spacing]u
+.na
+.fi
+.nr toc*ind 0
+.nr toc*i 0 1
+.ie d Ci \{\
+. nr toc*ind +\\n[toc*hl!\\$1]u
+.\}
+.el \{\
+. while \\n+[toc*i]<\\$1 \{\
+. nr toc*ind +\\n[toc*hl!\\n[toc*i]]u
+. \}
+.\}
+.nr toc*text \\n[toc*ind]u+\\n[toc*hl!\\$1]u
+.in \\n[toc*text]u
+.ti -\\n[toc*hl!\\$1]u
+.\"
+.\" length of headernumber space
+.nr toc*i \\n[toc*hl!\\$1]-\w@\\$2@
+.\"
+.ll \\n[@ll]u-\w@\\$4@u-2m
+.ne 2v
+.\" ragged right ---------------------------------
+.ie \\$1>\\n[toc*tlevel] \{\
+\\$2
+. sp -1
+\\$3\ \ \ \\$4
+. br
+.\}
+.el \{\
+. \" unnumbered heading --------------------
+. ie '\\$2'' \{\
+. in \\n[toc*ind]u
+\\$3\h'1m'
+. \}
+. \" normal heading ------------------------
+. el \{\
+\\$2
+. sp -1
+\\$3\h'1m'
+. \}
+. ll \\n[@ll]u
+. sp -1
+. nr toc*sep (u;\\n[.l]-\\n[.n]-\\n[.i]-\w@\\$4@)-1m
+\h'|\\n[.n]u'\l'\\n[toc*sep]u.'\h'1m'\\$4
+.\}
+.ll \\n[@ll]u
+..
+.\"########################### module lix ############################
+.\" LIST OF figures, tables, exhibits and equations
+.nr lix*fg-nr 0 1
+.nr lix*tb-nr 0 1
+.nr lix*ec-nr 0 1
+.nr lix*ex-nr 0 1
+.aln Fg lix*fg-nr
+.aln Tb lix*tb-nr
+.aln Ec lix*ec-nr
+.aln Ex lix*ex-nr
+.\"------------
+.de FG
+.lix@print-line fg Lf \\n+[lix*fg-nr] "\\$1" "\\$2" "\\$3" "\\$4"
+..
+.de TB
+.lix@print-line tb Lt \\n+[lix*tb-nr] "\\$1" "\\$2" "\\$3" "\\$4"
+..
+.de EC
+.lix@print-line ec Le \\n+[lix*ec-nr] "\\$1" "\\$2" "\\$3" "\\$4"
+..
+.de EX
+.lix@print-line ex Lx \\n+[lix*ex-nr] "\\$1" "\\$2" "\\$3" "\\$4"
+..
+.\"------------
+.\" print line with 'figure' in the text
+.\" type stringvar number text override flag refname
+.de lix@print-line
+.ds lix*text "\\$4
+.\"
+.ie \\n[Sectf] .ds lix*numb \\n[H1]-\\$3
+.el .ds lix*numb \\$3
+.\"
+.ie !\\n[Of] .ds lix*ds-form .\ \ \"
+.el .ds lix*ds-form "\ \[em]\ \"
+.nr lix*in \\n[.i]
+.ds lix*label \\*[Li\\$1]\ \\*[lix*numb]\\*[lix*ds-form]
+.if !'\\$5'' \{\
+. if !0\\$6 .ds lix*label \\*[Li\\$1]\ \\$5\\*[lix*numb]\\*[lix*ds-form]
+. if 0\\$6=1 .ds lix*label \\*[Li\\$1]\ \\*[lix*numb]\\$5\\*[lix*ds-form]
+. if 0\\$6=2 .ds lix*label \\*[Li\\$1]\ \\$5\\*[lix*ds-form]
+.\}
+.\" print line if not between DS/DE
+.ie (\\n[ds*lvl]<1)&(\\n[df*float]=0) \{\
+. lix@print-text "\\*[lix*label]" "\\*[lix*text]" \\$1 \\$2 \\$7
+.\}
+.el \{\
+. lix@embedded-text "\\*[lix*label]" "\\*[lix*text]" \\$1 \\$2 \\$7
+.\}
+.\"
+..
+.\"-----------
+.\" label text type stringvar refname
+.de lix@print-text
+.ie \\n[Sectp] .ds lix*pgnr \\*[hd*sect-pg]
+.el .ds lix*pgnr \\n[%]
+.SP \\n[Lsp]u
+.misc@ev-keep lix
+.init@reset
+.br
+.ie (\w@\\$1\\$2@)>(\\n[.l]-\\n[.i]) \{\
+. in +\w@\\$1@u
+. ti 0
+.\}
+.el .ce 1
+\f3\\$1\fP\\$2
+.br
+.ev
+.\" save line for LIST OF XXX, wth is the width of the label
+.if !r lix*wth\\$3 .nr lix*wth\\$3 0
+.\" find the maximum width
+.if \w@\\*[lix*label]@>\\n[lix*wth\\$3] .nr lix*wth\\$3 \w@\\*[lix*label]@
+.if \\n[\\$4] .lix@ds-save \\$3 \\*[lix*pgnr] "\\*[lix*text]" "\\*[lix*label]"
+.\" save reference to the figure
+.if !'\\$5'' .SETR \\$5 \\*[lix*numb]
+..
+.\" hide printout until diversion is evaluated
+.de lix@embedded-text
+\!.ie \\\\n[Sectp] .ds lix*pgnr \\\\*[hd*sect-pg]
+\!.el .ds lix*pgnr \\\\n[%]
+\!.SP \\\\n[Lsp]u
+\!.misc@ev-keep lix
+\!.ll \\n[.l]u
+\!.init@reset
+\!.fi
+\!.ie (\w@\\$1\\$2@)>(\\\\n[.l]-\\\\n[.i]) \{\
+. in +\w@\\$1@u
+\!. ti 0
+\!\f3\\$1\fP\\$2
+\!.\}
+\!.el \{\
+. ce 1
+\!\f3\\$1\fP\\$2
+\!.\}
+\!.br
+\!.ev
+.\" save line for LIST OF XXX, wth is the width of the label
+\!.if !r lix*wth\\$3 .nr lix*wth\\$3 0
+.\" find the maximum width
+\!.if \w@\\*[lix*label]@>\\\\n[lix*wth\\$3] .nr lix*wth\\$3 \w@\\*[lix*label]@
+\!.if \\\\n[\\$4] .lix@ds-save \\$3 \\\\*[lix*pgnr] "\\*[lix*text]" "\\*[lix*label]"
+.\" save reference to the figure
+\!.if !'\\$5'' .SETR \\$5 \\*[lix*numb]
+..
+.\"------------
+.\" print complete list of XXXX
+.de lix@print-ds
+.\" arg: fg,tb,ec,ex text
+.ds H1txt \\$3
+.ds Tcst \\$1
+.if !\\n[Cp] .pg@next-page
+.\" print LIST OF XXXX
+.\" execute user-defined macros
+.if \\$4<=4 .if d TX\\$2 .TX\\$2
+.ie d TY\\$2 .if \\$4<=4 .TY\\$2
+.el \{\
+. ce
+\\$3
+. SP 3
+.\}
+.in \\n[lix*wth\\$1]u
+.fi
+.lix*ds\\$1
+..
+.\"------------
+.\" save line of list in macro
+.de lix@ds-save
+.\" type pagenumber text
+.am lix*ds\\$1
+.lix@dsln \\$1 \\$2 "\\$3" "\\$4" \\$5
+\\..
+..
+.\"------------
+.\" print appended macro
+.\" lix@dsln type pagenumber text headernumber
+.de lix@dsln
+.nr lix*i \\n[lix*wth\\$1]-\w@\\$4@
+.ne 4v
+.ll \\n[@ll]u-\w@\\$4@u-\w@\\$2@u-2m
+.ti -\\n[lix*wth\\$1]u
+\\$4
+.sp -1
+\\$3\h'1m'
+.sp -1
+.ll
+.nr lix*sep (u;\\n[.l]-\\n[.n]-\\n[.i]-\w@\\$2@)-1m
+\h'|\\n[.n]u'\l'\\n[lix*sep]u.'\h'1m'\\$2
+.SP \\n[toc*spacing]u
+..
+.\"########################### module fnt ############################
+.\" some font macros.
+.\"-----------
+.de fnt@switch
+.ul 0
+.ds fnt*tmp
+.nr fnt*prev \\n[.f]
+.nr fnt*i 2 1
+.while \\n+[fnt*i]<=\\n[.$] \{\
+. if \\n[fnt*i]>3 .as fnt*tmp \,
+. ie (\\n[fnt*i]%2)=1 .as fnt*tmp \\$1\\$[\\n[fnt*i]]
+. el .as fnt*tmp \\$2\\$[\\n[fnt*i]]
+. if \\n[fnt*i]<\\n[.$] .as fnt*tmp \/
+.\}
+\&\\*[fnt*tmp]\f[\\n[fnt*prev]]
+..
+.\"-----------
+.de B
+.ie \\n[.$] .fnt@switch \f3 \f[\\n[.f]] \\$@
+.el .ft 3
+..
+.de I
+.ie \\n[.$] .fnt@switch \f2 \f[\\n[.f]] \\$@
+.el .ft 2
+..
+.de R
+.ie \\n[.$] .fnt@switch \f1 \f[\\n[.f]] \\$@
+.el .ft 1
+..
+.de IB
+.if \\n[.$] .fnt@switch \f2 \f3 \\$@
+..
+.de BI
+.if \\n[.$] .fnt@switch \f3 \f2 \\$@
+..
+.de IR
+.if \\n[.$] .fnt@switch \f2 \f1 \\$@
+..
+.de RI
+.if \\n[.$] .fnt@switch \f1 \f2 \\$@
+..
+.de RB
+.if \\n[.$] .fnt@switch \f1 \f3 \\$@
+..
+.de BR
+.if \\n[.$] .fnt@switch \f3 \f1 \\$@
+..
+.\"########################### module box ############################
+.\" draw a box around some text. Text will be kept on the same page.
+.\"
+.nr box*ll 0
+.\" .B1 and .B2 works like .DS
+.de B1
+.if \\n[box*ll] .@error \\$0: cannot nest; missing B2?
+.nr box*ll \\n[.l]
+.nr box*ind \\n[.i]
+.nr box*hyp \\n[.hy]
+.nr box*wid \\n[.l]-\\n[.i]
+.\"
+.\" jump to new environment.
+.ev box*ev
+.di box*div
+.ps \\n[@ps]u
+.vs \\n[@vs]u
+.in 1n
+.ll (u;\\n[box*wid]-1n)
+.hy \\n[.hy]
+..
+.de B2
+.if !\\n[box*ll] .@error \\$0: no corresponding B1
+.br
+.di
+.nr box*height \\n[dn]
+.ne \\n[dn]u+1v
+.ll \\n[box*ll]u
+.in \\n[box*ind]u
+.nr box*y-pos \\n[.d]u
+.nf
+.box*div
+.fi
+\v'-1v+.25m'\
+\D'l \\n[box*wid]u 0'\
+\D'l 0 -\\n[box*height]u'\
+\D'l -\\n[box*wid]u 0'\
+\D'l 0 \\n[box*height]u'
+.br
+.sp -1
+.ev
+.sp .20v
+.in \\n[box*ind]u
+.ll \\n[box*ll]u
+.rm box*div
+.nr box*ll 0
+..
+.\"########################### module ref ############################
+.mso refer-mm.tmac
+.nr ref*nr 0 1
+.aln :R ref*nr
+.nr ref*nr-width 5n
+.nr ref*flag 0 \" for end-of-text
+.ds Rf \v'-.4m'\s-3[\\n+[ref*nr]]\s0\v'.4m'
+.\"
+.\" start reference
+.\"------------
+.de RS
+.if !''\\$1' .ds \\$1 \v'-.4m'\s-3[\\n[ref*nr]]\s0\v'.4m'
+.nr ref*flag 1
+.am ref*mac
+.ref@start-print \\n[ref*nr].
+\\..
+.eo
+.am ref*mac RF
+..
+.\"------------
+.de RF
+.ec
+.am ref*mac
+.ref@stop-print
+\\..
+..
+.\"------------
+.de ref@start-print
+.di ref*div
+.in \\n[ref*nr-width]u
+.ti -(\w@\\$1@u+1n)
+\\$1
+.sp -1
+..
+.de ref@stop-print
+.br
+.di
+.ne \\n[dn]u
+.ev ref*ev2
+.nf
+.ref*div
+.ev
+.rm ref*div
+.if \\n[Ls] .SP \\n[Lsp]u
+..
+.\"-----------
+.de RP
+.if !d ref*mac \{\
+. @warning \\$0: ignoring; no references defined
+. return
+.\}
+.ie !''\\$2' .nr ref*i 0\\$2
+.el .nr ref*i \\n[Rpe]
+.if \\n[ref*i]<2 .SK
+.SP 2
+.ref@print-refs
+.if 0\\$1<1 .nr ref*nr 0 1
+.if ((\\n[ref*i]=0):(\\n[ref*i]=2)) .SK
+..
+.\"-----------
+.\" called by end-of-text!
+.de ref@eot-print
+.\".if \\n[ref*flag] \{\
+.if d ref*mac \{\
+. if \\n[D]>2 .tm Print references, called by eot
+. nr ref*flag 0
+. br
+. misc@ev-keep ne
+. init@reset
+\c
+' bp
+. ev
+. ref@print-refs
+.\}
+..
+.\"-----------
+.\" prints the references
+.de ref@print-refs
+.toc@save 1 "" "\\*[Rp]" \\n[%]
+.ce
+\f2\\*[Rp]\fP
+.sp
+.nr ref*ll \\n[.l]
+.misc@ev-keep ref*ev
+.ll \\n[ref*ll]u
+.in 0
+.ref*mac
+.in
+.rm ref*mac
+.ev
+.nr ref*flag 0 1
+..
+.\"########################### module app ############################
+.\"
+.nr app*nr 0 1
+.af app*nr A
+.nr app*dnr 0 1
+.nr app*flag 0
+.\"------------
+.\" .APP name text
+.\" name == "" -> autonumber
+.de APP
+.\" .if \\n[.$]<2 .@error "APP: too few arguments"
+.app@set-ind "\\$1"
+.\"
+.ds Tcst ap
+.ds Apptxt \\$2
+.\"
+.ie \\n[Aph] .app@header \\*[app*ind] "\\$2"
+.el .bp
+.app@index "\\*[app*ind]" "\\$2"
+..
+.\"------------
+.\" .APPSK name pages text
+.\" name == "" -> autonumber
+.de APPSK
+.if \\n[.$]<2 .@error \\$0: expected 2 or 3 arguments, got \\n[.$]
+.app@set-ind "\\$1"
+.\"
+.ds Tcst ap
+.ds Apptxt \\$3
+.\"
+.ie \\n[Aph] .app@header \\*[app*ind] "\\$3"
+.el .bp
+.app@index "\\*[app*ind]" "\\$3"
+.pn +\\$2
+..
+.\"------------
+.de app@set-ind
+.ie \w@\\$1@ .ds app*ind \\$1
+.el \{\
+. if !\\n[app*flag] \{\
+. nr H1 0 1
+. af H1 A
+. af H1h A
+. nr app*flag 1
+. \}
+. ds app*ind \\n+[app*nr]
+. nr H1 \\n+[app*dnr]
+. nr H1h \\n[app*dnr]
+.\}
+.\" clear lower counters
+.nr app*i 1 1
+.while \\n+[app*i]<15 .nr H\\n[app*i] 0 1
+..
+.\"------------
+.de app@index
+.toc@save 1 "" "\\*[App] \\$1: \\$2" \\n[%]
+..
+.\"------------
+.\" app@header name text
+.de app@header
+.bp
+.SP (u;\\n[Lsp]*4)
+.ce 1
+\s+4\f3\\*[App]\ \\$1\fP\s0
+.SP (u;\\n[Lsp]*2)
+.if \w@\\$2@<\\n[.l] .ce 1
+\f3\s+2\\$2\s0\fP
+.SP (u;\\n[Lsp]*4)
+..
+.als APPX app@header
+.\"########################### module cov ############################
+.\" title stored in diversion cov*title
+.\" abstract stored in diversion cov*abstract
+.\" arg to abstract stored in cov*abs-arg
+.\" indent stored in cov*abs-ind
+.\" number of authors stored in cov*au
+.\" author(s) stored in cov*au!x!y
+.\" number of authors' titles stored in cov*at!x
+.\" title(s) of author(s) stored in cov*at!x!y
+.\" x is the author-index [1-cov*au], y is the argument-index [1-9].
+.\" author(s) firm stored in cov*firm
+.\" new date (if .ND exists) is stored in cov*new-date
+.\"
+.\"
+.ds cov*abs-name ABSTRACT
+.\"
+.nr cov*au 0
+.de TL
+.ds @cover \\$0
+.@disable IA IE WA WE LO LT \" can't use with LT and friends
+.if \\n[.$]>0 .ds cov*title-charge-case \\$1
+.if \\n[.$]>1 .ds cov*title-file-case \\$2
+.pg@disable-top-trap
+.eo
+.de cov*title AU
+..
+.\"-------------------
+.de cov@title-end
+.ec
+..
+.\"-------------------
+.\" .AU [name [initials [loc [dept [ext [room [arg [arg [arg]]]]]]]]]
+.de AU
+.cov@title-end
+.if !\\n[.$] .return \" AU is being used only to end a TL.
+.pg@disable-top-trap
+.nr cov*au +1
+.nr cov*at!\\n[cov*au] 0 \" no titles for this author yet
+.nr cov*i 0 1
+.ds cov*au!\\n[cov*au]!1
+.while \\n[.$]>=\\n+[cov*i] \{\
+. ds cov*au!\\n[cov*au]!\\n[cov*i] "\\$[\\n[cov*i]]
+.\}
+.if (\\n[.$]>=3)&(\w@\\$3@) \{\
+. if d cov*location-\\$3] \{\
+. ds cov*au!3!\\n[cov*au] \\*[cov*location-\\$3]
+. \}
+.\}
+..
+.\"-------------------
+.\" .AT title [...]
+.\" Any quantity of titles may be declared.
+.\" Must be called directly after the corresponding .AU.
+.de AT
+.if !\\n[.$] \{\
+. @warning \\$0: ignoring; no arguments specified
+. return
+.\}
+.nr cov*at!\\n[cov*au] \\n[.$]
+.nr cov*i 0 1
+.while \\n[.$]>=\\n+[cov*i] \{\
+. ds cov*at!\\n[cov*au]!\\n[cov*i] "\\$[\\n[cov*i]]
+.\}
+..
+.\"-------------------
+.de AF
+.cov@title-end
+.if !''\\$1' .ds cov*firm \\$1
+..
+.de AST
+.ds cov*abs-name "\\$1\"
+..
+.de AS
+.pg@disable-top-trap
+.if d cov*abstract .@error \\$0: only one abstract allowed
+.if !''\\n[.z]' .@error \\$0: no diversion allowed (previous .AS?)
+.nr cov*abs-arg 0\\$1
+.nr cov*abs-ind (n;0\\$2)
+.de cov*abstract AE
+..
+.de AE
+..
+.\" fixed for 2000, now uses \n[year].
+.de ISODATE
+. \" support for ISO-date
+. nr cov*mm \\n[mo]
+. nr cov*dd \\n[dy]
+. af cov*mm 01
+. af cov*dd 01
+. ie '0'\\$1' \{\
+. ds cov*new-date \\*[MO\\n[mo]] \\n[dy], \\n[year]
+. \}
+. el \{\
+. ds cov*new-date \\n[year]-\\n[cov*mm]-\\n[cov*dd]
+. \}
+..
+.ISODATE 0
+.als DT cov*new-date
+.de ND
+.ds cov*new-date \\$1
+..
+.\" switch to ISO-date if register Iso exist: YYYY-MM-DD
+.if r Iso .ISODATE 1
+.\"-------------------
+.\" Save technical memorandum numbers.
+.de TM
+.if !\\n[.$] \{\
+. @warning \\$0: ignoring; no arguments specified
+. return
+.\}
+.nr cov*i 0 1
+.while \\n[.$]>=\\n+[cov*i] .ds cov*mt-tm!\\n[cov*i] \\$[\\n[cov*i]]
+.nr cov*mt-tm-max \\n[.$]
+..
+.\"-----------------------
+.\" cover sheet
+.\" the file must have the following last lines (somewhere):
+.\" .pg@enable-top-trap
+.\" .bp 1
+.\" .pg@enable-trap
+.ds cov*mt-file!0 0.MT
+.ds cov*mt-file!1 0.MT
+.ds cov*mt-file!2 0.MT
+.ds cov*mt-file!3 0.MT
+.ds cov*mt-file!4 4.MT
+.ds cov*mt-file!5 5.MT
+.ds cov*mt-file!6 0.MT
+.\"------------
+.de MT
+.ds @cover \\$0
+.@disable COVER IA IE WA WE LO LT
+.ie \\n[.$] \{\
+. ie d cov*mt-file!\\$1 .ds cov*mt-type \\$1
+. el .ds cov*mt-type 6
+.\}
+.el .ds cov*mt-type 1
+.ds cov*mt-addressee "\\$2
+.ds cov*mt-type-text "\\$1
+.ie d @country .ds cov*str mm/\\*[@country]_
+.el .ds cov*str mm/
+.mso \\*[cov*str]\\*[cov*mt-file!\\*[cov*mt-type]]
+..
+.de COVER
+.ds @cover \\$0
+.@disable IA IE WA WE LO LT MT
+.ie !\\n[.$] .ds cov*cov-type ms
+.el .ds cov*cov-type \\$1
+.pg@disable-top-trap
+.ie d @country .ds cov*str mm/\\*[@country]_\\*[cov*cov-type].cov
+.el .ds cov*str mm/\\*[cov*cov-type].cov
+.mso \\*[cov*str]
+..
+.\"########################### module qrf ############################
+.\" forward and backward reference thru special files.
+.\"
+.\" check if stderr-method is wanted
+.\" This was needed when I discovered that groff was considered unsafe
+.\" and groff -U didn't work. It's a workaround like the original
+.\" index method, but not in my view elegant enough.
+.\"
+.\" init reference system
+.de INITR
+.ds qrf*file \\$1.qrf
+.nr qrf*pass 2
+.if \\n[D]>1 .tm INITR: source \\*[qrf*file]
+.ie \\n[Ref] \{\
+. tm .\\\\" Rfilename: \\*[qrf*file]
+.\}
+.el 'so \\*[qrf*file]
+..
+.\"---------------
+.\" set a reference.
+.de SETR
+.if \\n[.$]<1 .@error \\$0: expected 1 or 2 arguments, got \\n[.$]
+.if !r qrf*pass .tm \\$0: no .INITR in this file \" XXX: .@error?
+.if \\n[Ref] \{\
+. ds qrf*name qrf*ref-\\$1
+. if \\n[D]>2 .tm SETR: ref \\*[qrf*name]=\\*[hd@mark-trimmed],\\n[%]
+. \" heading-number
+. ds \\*[qrf*name]-hn \\*[hd@mark-trimmed]
+. \" page-number
+. ds \\*[qrf*name]-pn \\n[%]
+. \"
+. if \\n[Ref] \{\
+. tm .ds \\*[qrf*name]-hn \\*[hd@mark-trimmed]
+. tm .ds \\*[qrf*name]-pn \\n[%]
+. if !'\\$2'' .tm .ds \\*[qrf*name]-xx \\$2
+. \}
+.\}
+..
+.\"---------------
+.\" get misc-string
+.\" If two arg -> set var. arg to misc-string.
+.de GETST
+.if \\n[.$]<1 .@error \\$0: expected 1 or 2 arguments, got \\n[.$]
+.if !r qrf*pass .tm \\$0: no .INITR in this file \" XXX: .@error?
+.ds qrf*name qrf*ref-\\$1
+. if d \\*[qrf*name]-xx \{\
+. ie \\n[.$]>1 .ds \\$2 \\*[\\*[qrf*name]-xx]
+. el \\*[\\*[qrf*name]-xx]\c
+. \}
+.\}
+..
+.\"---------------
+.\" get header-number
+.\" If two arg -> set var. arg to header-number.
+.de GETHN
+.if \\n[.$]<1 .@error \\$0: expected 1 or 2 arguments, got \\n[.$]
+.if !r qrf*pass .tm \\$0: no .INITR in this file \" XXX: .@error?
+.ds qrf*name qrf*ref-\\$1
+.if d \\*[qrf*name]-hn \{\
+. ie \\n[.$]>1 .ds \\$2 \\*[\\*[qrf*name]-hn]
+. el \\*[\\*[qrf*name]-hn]\c
+.\}
+..
+.\"---------------
+.\" get page-number
+.\" If two arg -> set var. arg to page-number.
+.de GETPN
+.if \\n[.$]<1 .@error \\$0: expected 1 or 2 arguments, got \\n[.$]
+.if !r qrf*pass .tm \\$0: no .INITR in this file \" XXX: .@error?
+.ds qrf*name qrf*ref-\\$1
+.if d \\*[qrf*name]-pn \{\
+. ie \\n[.$]>1 .ds \\$2 \\*[\\*[qrf*name]-pn]
+. el \\*[\\*[qrf*name]-pn]\c
+.\}
+..
+.\"----------
+.de GETR
+.if \\n[.$]<1 .@error \\$0: expected an argument
+.ie !r qrf*pass .tm \\$0: no .INITR in this file" \" XXX: .@error?
+.el \{\
+. GETHN \\$1 Qrfh
+. GETPN \\$1 Qrfp
+\\*[Qrf]
+.\}
+..
+.\"########################### module ind ############################
+.\"--------------------
+.\" Another type of index system
+.\" INITI type filename [macro]
+.de INITI
+.if \\n[.$]<2 .@error \\$0: expected 2 or 3 arguments, got \\n[.$]
+.\" ignore if INITI has already been used
+.if d ind*file .@error \\$0: index file name already set
+.ds ind*file \\$2.ind
+.if \\n[D]>1 .tm INITI: source \\*[ind*file]
+.if !d ind*file .@error \\$0: index file name not specified
+.ds ind*type \\$1
+.if \\n[Ref] \{\
+. if \\n[.$]>2 .tm .\\\\" Imacro: \\$3
+.\}
+..
+.\"---------------
+.de IND
+.if !d ind*file .@error \\$0: no active index; call INITI"
+.if \\n[D]>1 .tm IND: type=\\*[ind*type]
+.ds ind*ref \" empty
+.if '\\*[ind*type]'N' .ds ind*ref \\n[%]
+.if '\\*[ind*type]'H' .ds ind*ref \\*[hd*mark]
+.if '\\*[ind*type]'B' .ds ind*ref \\*[hd*mark]\t\\n[%]
+.if '\\*[ind*ref]'' .@abort invalid index type '\\*[ind*type]'
+.\"
+.ds ind*line \\$1
+.while \\n[.$]>0 \{\
+. shift
+. as ind*line \t\\$1
+.\}
+.as ind*line \\*[ind*ref]
+.if \\n[Ref] .tm .\\\\" IND \\*[ind*line]
+..
+.\" print index
+.de INDP
+.ie \\n[Ref] .tm .\\\\" Index: \\*[ind*file]
+.el \{\
+. if !\\n[Cp] .pg@next-page
+. \" print INDEX
+. \" execute user-defined macros
+. if d TXIND .TXIND
+. ie d TYIND .TYIND
+. el \{\
+. SK
+. ce
+\\*[Index]
+. SP 3
+. 2C
+. nf
+. \}
+' so \\*[ind*file]
+. ie d TZIND .TZIND
+. el \{\
+. fi
+. 1C
+. \}
+.\}
+.rm ind*file
+..
+.\"########################### module let ############################
+.\" Letter macros
+.\"------------------------
+.\" Formal closing
+.de FC
+.df@print-float 3
+.ie \\n[.$] .ds let*i \\$1
+.el .ds let*i \\*[Letfc]
+.ie d let*type .let@fc_\\*[let*type] "\\*[let*i]" \\$@
+.el .let@mt-closing "\\*[let*i]" \\$@
+..
+.\"-------
+.de let@mt-closing
+.ne 5v
+.in (u;\\n[.l]/2)
+.sp
+\\$1
+.in
+..
+.\"------------------------
+.\" Signature line
+.de SG
+.ie d let*type .let*lt-sign \\$@
+.el .let*mt-sign \\$@
+..
+.\"------------------------
+.de let*lt-sign
+.\" We hard-code the SG macro name here since this macro is internal but
+.\" only SG calls it.
+.if !d let@sg_\\*[let*type] .@error SG: letter type '\\*[let*type]' \
+undefined
+.df@print-float 3
+.nr let*i 0 1
+.nr let*j 0
+.while \\n+[let*i]<=\\n[let*wa-n] \{\
+.if \\n[let*i]=\\n[let*wa-n] .nr let*j 1
+.let@sg_\\*[let*type] "\\*[let*wa-name!\\n[let*i]]" "\\*[let*wa-title!\\n[let*i]]" \\n[let*i] \\n[let*j] \\$@
+.\}
+..
+.\"------------------------
+.\" Memorandum signature
+.de let*mt-sign
+.df@print-float 3
+.ne \\n[cov*au]u*4v
+.ie \\n[.$]>1 .nr let*k 1
+.el .nr let*k \\n[cov*au]
+.ds let*tmp \" empty
+.if d cov*au!\\n[let*k]!3 \{\
+. as let*tmp \\*[cov*au!\\n[let*k]!3]\"
+. if d cov*au!\\n[let*k]!4 \
+. as let*tmp -\\*[cov*au!\\n[let*k]!4]-\"
+.\}
+.nr let*i 0 1
+.while \\n+[let*i]<=\\n[cov*au] \{\
+. if \\n[let*i]>1 .as let*tmp /\"
+. if d cov*au!\\n[let*i]!2 .as let*tmp \\*[cov*au!\\n[let*i]!2]\"
+.\}
+.if !''\\$1' .as let*tmp -\\$1
+.in (u;\\n[.l]/2)
+.nf
+.nr let*i 0 1
+.while \\n+[let*i]<=\\n[cov*au] \{\
+. ne 3v+\\n[cov*at!\\n[let*i]]v
+. SP 3v
+. if \\n[let*i]=\\n[let*k] \{\
+\Z'\h'-(u;\\n[.l]/2)'\\*[let*tmp]'\c
+. \}
+\\*[cov*au!\\n[let*i]!1]
+. nr let*j 0 1
+. while \\n+[let*j]<=\\n[cov*at!\\n[let*i]] \{\
+\\*[cov*at!\\n[let*i]!\\n[let*j]]
+. \}
+.\}
+.fi
+.in
+..
+.\"------------------------
+.\" Approval signature
+.de AV
+.ne 6v
+.nf
+.sp
+.ie \\n[.$]<2 \\*[Letapp]
+.el .sp
+.sp 2
+.ie n ______________________________ ______________
+.el \D'l 25m 0'\h'4m'\D'l 12m 0'
+\Z'\\$1'\h'29m'\f[\\*[@sdf_font]]\\*[Letdate]\fP
+.fi
+..
+.\"------------------------
+.\" Letter signature
+.de AVL
+.ne 6v
+.nf
+.sp 3
+.ie n ______________________________
+.el \D'l 25m 0'
+\Z'\\$1'
+.fi
+..
+.\"------------------------
+.\" Letter type
+.\" let@header is called from the header. It is supposed
+.\" to remove the alias itself.
+.de LT
+.ds @cover LT
+.@disable AF AS AE AT AU COVER CS OK TL MT \" same list as LO
+.ds let*type BL
+.nr Pi 5
+.nr Pt 0
+.if !''\\$1' .ds let*type \\$1
+.if !d let@head_\\*[let*type] .@error \\$0: unknown letter type '\\$1'
+.shift
+.als let@header let@head_\\*[let*type]
+.let@init_\\*[let*type] \\$@
+.if \n[D]>1 .tm Letter type \\*[let*type]
+..
+.\"-----------
+.\" Blocked letter
+.de let@init_BL
+..
+.de let@head_BL
+.rm let@header
+.let@print-head 1
+..
+.de let@sg_BL
+.ne 5v
+.nf
+.in (u;\\n[.l]/2)
+.sp 3v
+\\$1
+\\$2
+.in
+.if \\$4 .sp
+.if \w'\\$5'&\\$4 \\$5
+.fi
+..
+.als let@fc_BL let@mt-closing
+.\"-----------
+.\" Semiblocked letter
+.de let@init_SB
+.nr Pt 1
+..
+.de let@head_SB
+.rm let@header
+.let@print-head 1
+..
+.als let@sg_SB let@sg_BL
+.als let@fc_SB let@mt-closing
+.\"-----------
+.\" Full-blocked letter
+.de let@init_FB
+..
+.de let@head_FB
+.rm let@header
+.let@print-head
+..
+.de let@sg_FB
+.ne 5v
+.nf
+.sp 3v
+\\$1
+\\$2
+.if \\$4 .sp
+.if \w'\\$5'&\\$4 \\$5
+.fi
+..
+.de let@fc_FB
+.ne 5v
+.sp
+\\$1
+..
+.\"-----------
+.\" Simplified letter
+.de let@init_SP
+..
+.de let@head_SP
+.rm let@header
+.let@print-head
+..
+.de let@sg_SP
+.nf
+.if \\$3=1 .sp
+.sp
+.ie '\\$2'' .misc@toupper "\\$1"
+.el .misc@toupper "\\$1, \\$2"
+.if \\$4 .sp
+.if \w'\\$5'&\\$4 \\$5
+.fi
+..
+.de let@fc_SP
+.\" Simplified letters have no formal closing, just space before SG.
+.sp 2
+..
+.\"--------------------------------------
+.\" Print the letter-head
+.de let@print-head
+.nf
+.sp |11
+.if '1'\\$1' .in (u;\\n[.l]/2)
+.\" ---- WA
+.ie d let@wa-div .let@wa-div
+.el .sp 3
+.\" ---- datum
+\\*[cov*new-date]
+.sp
+.if '1'\\$1' .if !d let*lo-CN .if !d let*lo-RN .sp 2
+.\" ---- Confidential
+.if d let*lo-CN \{\
+. ti 0
+. ie !''\\*[let*lo-CN]' \\*[let*lo-CN]
+. el \\*[LetCN]
+. sp
+.\}
+.\" ---- Reference
+.if d let*lo-RN \{\
+\\*[LetRN] \\*[let*lo-RN]
+. sp
+.\}
+.\" ---- IA
+.sp
+.in 0
+.nr let*i 0 1
+.while \\n+[let*i]<=\\n[let*ia-n] \{\
+\\*[let*ia-name!\\n[let*i]]
+\\*[let*ia-title!\\n[let*i]]
+.\}
+.if d let@ia-div .let@ia-div
+.\" ---- Attention
+.if d let*lo-AT \{\
+. sp
+\\*[LetAT] \\*[let*lo-AT]
+.\}
+.\" ---- Salutation
+.if !'\\*[let*type]'SP' .if d let*lo-SA \{\
+. sp
+. ti 0
+. ie !''\\*[let*lo-SA]' \\*[let*lo-SA]
+. el \\*[LetSA]
+.\}
+.\" ---- Subject
+.if d let*lo-SJ \{\
+. ie '\\*[let*type]'SP' \{\
+. sp 2
+. misc@toupper "\\*[let*lo-SJ]"
+. sp
+. \}
+. el \{\
+. sp
+. if '\\*[let*type]'SB' .ti +5m
+\\*[LetSJ] \f[\\*[@sdf_font]]\\*[let*lo-SJ]\fP
+. \}
+.\}
+..
+.\"-------------------
+.\" .IA [name [title]]
+.nr let*ia-n 0 1
+.de IA
+.if \\n[.$] .ds let*ia-name!\\n+[let*ia-n] \\$1
+.if \\n[.$]>1 .ds let*ia-title!\\n[let*ia-n] \\$2
+.ev let@ev
+.init@reset
+'nf
+.di let@ia-div
+.eo
+..
+.de IE
+.di
+.ec
+.ev
+..
+.\"-------------------
+.\" .WA [name [title]]
+.nr let*wa-n 0 1
+.de WA
+.if \\n[.$] .ds let*wa-name!\\n+[let*wa-n] \\$1
+.if \\n[.$]>1 .ds let*wa-title!\\n[let*wa-n] \\$2
+.ev let@ev
+.init@reset
+'nf
+.di let@wa-div
+.it \\n[Letwam] let@wa-drain
+.eo
+..
+.\"------
+.de let@wa-drain
+.it
+.di
+.di let@wa-junk
+..
+.\"------
+.de WE
+.it
+.ec
+.di
+.ev
+.if d let@wa-junk .rm let@wa-junk
+..
+.\"-------------------
+.\" Copy to
+.de NS
+.sp
+.ie !''\\$2' .ds let*str \\$1
+.el \{\
+. ie \\n[.$]>0 \{\
+. ie !\w'\\$1' .ds let*str \\*[Letns!\\*[Letnsdef]]
+. el \{\
+. ie d Letns!\\$1 .ds let*str \\*[Letns!\\$1]
+. el .ds let*str \\*[Letns!copy](\\$1)\\*[Letns!to]
+. \}
+. \}
+. el .ds let*str \\*[Letns!\\*[Letnsdef]]
+.\}
+.ne 2
+.nf
+\\*[let*str]
+..
+.de NE
+.fi
+..
+.\"-------------------
+.\" Letter options
+.de LO
+.ds @cover \\$0
+.@disable AF AS AE AT AU COVER CS OK TL MT \" same list as LT
+.if !\\n[.$] \{\
+. @warning \\$0: ignoring; no arguments specified
+. return
+.\}
+.if !d Let\\$1 .@error \\$0: unrecognized option '\\$1'
+.ds let*lo-\\$1 \\$2
+.if \n[D]>1 .tm Letter option \\$1 \\$2
+..
+.\"--------------------
+.\" Start with a clean slate
+.init@reset
+.
+.\" Local Variables:
+.\" mode: nroff
+.\" fill-column: 72
+.\" End:
+.\" vim: set filetype=groff textwidth=72:
diff --git a/contrib/mm/mm.am b/contrib/mm/mm.am
new file mode 100644
index 0000000..191dbce
--- /dev/null
+++ b/contrib/mm/mm.am
@@ -0,0 +1,128 @@
+# Copyright 1991-2020 Free Software Foundation, Inc.
+#
+# This file is part of groff.
+#
+# groff is free software; 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.
+#
+# groff is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+# mm.am
+#
+
+mm_srcdir = $(top_srcdir)/contrib/mm
+mm_builddir = $(top_builddir)/contrib/mm
+
+bin_SCRIPTS += mmroff
+
+man1_MANS += contrib/mm/mmroff.1
+man7_MANS += \
+ contrib/mm/groff_mm.7 \
+ contrib/mm/groff_mmse.7
+
+# Files installed in $(tmacdir)/mm
+MMFILES = \
+ contrib/mm/mm/0.MT \
+ contrib/mm/mm/5.MT \
+ contrib/mm/mm/4.MT \
+ contrib/mm/mm/ms.cov \
+ contrib/mm/mm/se_ms.cov
+mmdir = $(tmacdir)/mm
+dist_mm_DATA = $(MMFILES)
+
+# Files installed in $(tmacdir)
+tmacmmdir = $(tmacdir)
+dist_tmacmm_DATA = contrib/mm/refer-mm.tmac
+
+MMEXAMPLEFILES=\
+ contrib/mm/examples/letter.mm
+
+mmexampledir=$(exampledir)/mm
+dist_mmexample_DATA = $(MMEXAMPLEFILES)
+
+EXTRA_DIST += \
+ contrib/mm/ChangeLog \
+ contrib/mm/examples \
+ contrib/mm/Makefile.sim \
+ contrib/mm/mm \
+ contrib/mm/NOTES \
+ contrib/mm/README \
+ contrib/mm/groff_mm.7.man \
+ contrib/mm/groff_mmse.7.man \
+ contrib/mm/mmroff.1.man \
+ contrib/mm/mmroff.pl
+
+mm_TESTS = \
+ contrib/mm/tests/LT_SP_AU_without_AT_works.sh \
+ contrib/mm/tests/LT_SP_multi-word_LO_SJ_works.sh \
+ contrib/mm/tests/MT-1-reports-all-TM-numbers.sh \
+ contrib/mm/tests/MT_5_includes_AT_in_SG.sh \
+ contrib/mm/tests/P-indentation-works.sh \
+ contrib/mm/tests/ms_cover_sheet_robust_to_missing_AF.sh \
+ contrib/mm/tests/mse_has-sufficient-footnote-space.sh \
+ contrib/mm/tests/place-equation-labels-correctly-in-displays.sh \
+ contrib/mm/tests/remove-stale-bib-entry-data.sh \
+ contrib/mm/tests/short-pages-do-not-overflow-stack.sh
+TESTS += $(mm_TESTS)
+EXTRA_DIST += \
+ $(mm_TESTS) \
+ contrib/mm/tests/artifacts/60657.ref
+
+mmroff: $(mm_srcdir)/mmroff.pl
+ $(AM_V_GEN)$(SED) \
+ -e 's;[@]PERL[@];$(PERL);' \
+ -e 's;[@]VERSION[@];$(VERSION);' \
+ $(mm_srcdir)/mmroff.pl \
+ >$@.tmp \
+ && chmod +x $@.tmp \
+ && mv $@.tmp $@
+
+# special installation rules for m.tmac, mse.tmac, mmse.tmac, mm.tmac
+install-data-local: install_mm
+install_mm:
+ -test -d $(DESTDIR)$(tmacdir) || $(mkinstalldirs) $(DESTDIR)$(tmacdir)
+ -test -d $(DESTDIR)$(mmdir) || $(mkinstalldirs) $(DESTDIR)$(mmdir)
+ $(RM) $(DESTDIR)$(tmacdir)/tmac.$(tmac_m_prefix)m
+ $(RM) $(DESTDIR)$(tmacdir)/$(tmac_m_prefix)m.tmac
+ $(INSTALL_DATA) $(mm_srcdir)/m.tmac \
+ $(DESTDIR)$(tmacdir)/$(tmac_m_prefix)m.tmac
+ $(SED) -e "s;^.mso m.tmac;.mso $(tmac_m_prefix)m.tmac;g" \
+ $(mm_srcdir)/mse.tmac > $(DESTDIR)$(tmacdir)/$(tmac_m_prefix)mse.tmac
+ @$(SED) -e "s;^.mso mse.tmac;.mso $(tmac_m_prefix)mse.tmac;g" \
+ $(mm_srcdir)/mmse.tmac > $(DESTDIR)$(tmacdir)/$(tmac_m_prefix)mmse.tmac
+ @$(SED) -e "s;^.mso m.tmac;.mso $(tmac_m_prefix)m.tmac;g" \
+ $(mm_srcdir)/mm.tmac > $(DESTDIR)$(tmacdir)/$(tmac_m_prefix)mm.tmac
+uninstall-local: uninstall_mm
+uninstall_mm:
+ if test -d $(DESTDIR)$(mmexampledir); then \
+ rmdir $(DESTDIR)$(mmexampledir); \
+ fi
+ $(RM) $(DESTDIR)$(tmacdir)/tmac.$(tmac_m_prefix)m
+ $(RM) $(DESTDIR)$(tmacdir)/$(tmac_m_prefix)m.tmac
+ $(RM) $(DESTDIR)$(tmacdir)/$(tmac_m_prefix)mm.tmac
+ $(RM) $(DESTDIR)$(tmacdir)/$(tmac_m_prefix)mse.tmac
+ $(RM) $(DESTDIR)$(tmacdir)/$(tmac_m_prefix)mmse.tmac
+ -rmdir $(DESTDIR)$(tmacdir)/mm
+
+# Special distribution rule: we copy all .tmac files from contrib/mm
+dist-hook: dist_mm
+dist_mm:
+ chmod u+w $(distdir)/contrib/mm/
+ for i in $(mm_srcdir)/*.tmac; do \
+ cp -f $$i $(distdir)/contrib/mm/; \
+ done
+
+
+# Local Variables:
+# fill-column: 72
+# mode: makefile-automake
+# End:
+# vim: set autoindent filetype=automake textwidth=72:
diff --git a/contrib/mm/mm.tmac b/contrib/mm/mm.tmac
new file mode 100644
index 0000000..98e311d
--- /dev/null
+++ b/contrib/mm/mm.tmac
@@ -0,0 +1,4 @@
+.\" -*- nroff -*-
+.\" mm.tmac
+.\"
+.do mso m.tmac
diff --git a/contrib/mm/mm/0.MT b/contrib/mm/mm/0.MT
new file mode 100644
index 0000000..b06a4b8
--- /dev/null
+++ b/contrib/mm/mm/0.MT
@@ -0,0 +1,175 @@
+.ig
+
+Copyright (C) 1991-2020 Free Software Foundation, Inc.
+mm is written by Jrgen Hgg <jh@axis.com>
+
+mm is free software; 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.
+
+mm is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+Please submit bug reports using groff's 'BUG-REPORT' file to
+http://savannah.gnu.org/bugs/?group=groff.
+..
+.
+.\"------------
+.\" Cover sheet. Memorandum type 0-3 and "string".
+.\"------------
+.if !r Au .nr Au 1
+.de cov@print-title
+.if !d cov*title .@error title not defined; call TL and AU before MT
+.MOVE 4.8c 1.5c
+.S 8
+subject:
+.sp -1.1
+.S
+.PGFORM
+.ft \\*[@sdf_font]
+.ll 9c
+.fi
+.cov*title
+.ft
+.ll
+.nf
+.if d cov*title-charge-case \fBCharge Case \\*[cov*title-charge-case]\fP
+.if d cov*title-file-case \fBFile Case \\*[cov*title-file-case]\fP
+.fi
+..
+.\"------------
+.de cov@print-authors
+.\" The following diagnostic might be unreachable.
+.if !r cov*au .@error no authors defined; call AU before MT
+.MOVE 5.7c 13.3c
+.nf
+.S 8
+\\$1:
+.br
+.S
+.sp -1
+.in 0.8c
+.ft \\*[@sdf_font]
+.nr cov*i 0 1
+.while \\n+[cov*i]<=\\n[cov*au] \{\
+. cov@print-au1 \\n[cov*i] 1
+. if \\n[Au] \{\
+. cov@print-au2 \\n[cov*i] 3 4
+. cov@print-au2 \\n[cov*i] 6 5
+. cov@print-au1 \\n[cov*i] 7
+. cov@print-au1 \\n[cov*i] 8
+. cov@print-au1 \\n[cov*i] 9
+. \}
+. if \\n[cov*i]<\\n[cov*au] .SP 1
+.\}
+.ft
+.if r cov*mt-tm-max \{\
+. SP 1
+. nr cov*i 0 1
+. ft \\*[@sdf_font]
+TM
+. in 1.5c
+. sp -1
+. while \\n+[cov*i]<=\\n[cov*mt-tm-max] \\*[cov*mt-tm!\\n[cov*i]]
+. in
+. ft
+.\}
+.fi
+.PGFORM
+..
+.\"------------
+.\" index arg1
+.de cov@print-au1
+.if d cov*au!\\$1!\\$2 \\*[cov*au!\\$1!\\$2]
+..
+.\"------------
+.de cov@print-au2
+.\" index arg1 arg2
+.if d cov*au!\\$1!\\$2 \\*[cov*au!\\$1!\\$2] \c
+.if \\$3=5 .if d cov*au!\\$1!\\$3 x\c
+.if d cov*au!\\$1!\\$3 \\*[cov*au!\\$1!\\$3]\c
+.br
+..
+.\"------------
+.de cov@print-date
+.MOVE 4.8c 13.3c
+.S 8
+.nf
+\\$1:
+.br
+.S
+.sp -1
+.in 0.8c
+\f[\\*[@sdf_font]]\\*[cov*new-date]\fP
+.br
+.fi
+.PGFORM
+..
+.\"------------
+.de cov@print-firm
+.if d cov*firm \{\
+. MOVE 2.8c 0 17.7c
+. S 18
+. rj 1
+\fB\\*[cov*firm]\fP
+. S
+. PGFORM
+.\}
+..
+.\"------------
+.de cov@print-abstract
+.SP 3
+.if d cov*abstract \{\
+. misc@ev-keep cov*ev
+. if \\n[cov*abs-ind]>0 \{\
+. in +\\n[cov*abs-ind]u
+. ll -\\n[cov*abs-ind]u
+. \}
+. ce
+\fI\\$1\fP
+. SP 1.5
+. fi
+. cov*abstract
+. br
+. ev
+.\}
+..
+.\"-----------------
+.ds cov*mt0-txt!1 MEMORANDUM FOR FILE
+.ds cov*mt0-txt!2 PROGRAMMER'S NOTES
+.ds cov*mt0-txt!3 ENGINEER'S NOTES
+.if d cov*default-firm .if !d cov*firm .ds cov*firm \\*[cov*default-firm]
+.\"
+.if !d cov*mt-printed \{\
+. cov@print-firm
+. cov@print-title subject
+. cov@print-date date
+. cov@print-authors from
+. cov@print-abstract \\*[cov*abs-name]
+. SP 3
+. if (\*[cov*mt-type]>=1)&(\*[cov*mt-type]<=3) \{\
+. ce
+\fI\*[cov*mt0-txt!\*[cov*mt-type]]\fP
+. SP 1.5
+. \}
+. if \*[cov*mt-type]=6 \{\
+. ce
+\fI\*[cov*mt-type-text]\fP
+. SP 1.5
+. \}
+. pg@enable-top-trap
+. pg@enable-trap
+. ds cov*mt-printed
+.\}
+.
+.\" Local Variables:
+.\" mode: nroff
+.\" fill-column: 72
+.\" End:
+.\" vim: set filetype=groff textwidth=72:
diff --git a/contrib/mm/mm/4.MT b/contrib/mm/mm/4.MT
new file mode 100644
index 0000000..1fd31df
--- /dev/null
+++ b/contrib/mm/mm/4.MT
@@ -0,0 +1,110 @@
+.ig
+
+Copyright (C) 1991-2020 Free Software Foundation, Inc.
+mm is written by Jrgen Hgg <jh@axis.com>
+
+mm is free software; 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.
+
+mm is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+Please submit bug reports using groff's 'BUG-REPORT' file to
+http://savannah.gnu.org/bugs/?group=groff.
+..
+.
+.\"------------
+.\" Cover sheet. Memorandum type 4
+.\"------------
+.de cov@print-title
+.if !d cov*title .@error title not defined; call TL and AU before MT
+.MOVE 2.8c
+.S +2
+.ad c
+.fi
+.B
+.cov*title
+.br
+.S
+.R
+.ad b
+..
+.\"------------
+.de cov@print-authors
+.\" The following diagnostic might be unreachable.
+.if !r cov*au .@error no authors defined; call AU before MT
+.SP 0.5
+.I
+.S +1
+.nr cov*i 0 1
+.while \\n+[cov*i]<=\\n[cov*au] \{\
+.ce
+\\*[cov*au!\\n[cov*i]!1]
+.br
+.\}
+.S
+.R
+..
+.\"------------
+.de cov@print-firm
+.if d cov*firm \{\
+. SP 0.5
+. ce
+\\*[cov*firm]
+.\}
+..
+.\"------------
+.de cov@print-abstract
+.SP 2
+.if d cov*abstract \{\
+. misc@ev-keep cov*ev
+. init@reset
+. if \\n[cov*abs-ind]>0 \{\
+. in +\\n[cov*abs-ind]u
+. ll -\\n[cov*abs-ind]u
+. \}
+. ce
+\fI\\*[cov*abs-name]\fP
+. SP 2
+. fi
+. cov*abstract
+. br
+. ev
+.\}
+..
+.\"-----------------
+.if d cov*default-firm .if !d cov*firm .ds cov*firm \\*[cov*default-firm]
+.if !d cov*mt-printed \{\
+. cov@print-title
+. cov@print-authors
+. cov@print-firm
+. if d cov*abstract \{\
+. if !\n[cov*abs-arg] .cov@print-abstract
+. \}
+. SP 2
+. nr hd*cur-bline \n[nl]
+. ds cov*mt-printed
+. pg@enable-top-trap
+. pg@enable-trap
+.\}
+.de CS
+.pg@disable-top-trap
+.SK
+.cov@print-title
+.cov@print-authors
+.cov@print-firm
+.cov@print-abstract
+..
+.
+.\" Local Variables:
+.\" mode: nroff
+.\" fill-column: 72
+.\" End:
+.\" vim: set filetype=groff textwidth=72:
diff --git a/contrib/mm/mm/5.MT b/contrib/mm/mm/5.MT
new file mode 100644
index 0000000..10bf410
--- /dev/null
+++ b/contrib/mm/mm/5.MT
@@ -0,0 +1,61 @@
+.ig
+
+Copyright (C) 1991-2020 Free Software Foundation, Inc.
+mm is written by Jrgen Hgg <jh@axis.com>
+
+mm is free software; 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.
+
+mm is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+Please submit bug reports using groff's 'BUG-REPORT' file to
+http://savannah.gnu.org/bugs/?group=groff.
+..
+.
+.\"------------
+.\" Cover sheet. Memorandum type 5
+.\"------------
+.de cov@print-title
+.if !d cov*title .@error title not defined; call TL and AU before MT
+.B
+.ll 9c
+.fi
+.cov*title
+.R
+.ll
+.nf
+.if d cov*title-charge-case \fBCharge Case \\*[cov*title-charge-case]\fP
+.if d cov*title-file-case \fBFile Case \\*[cov*title-file-case]\fP
+.fi
+..
+.\"------------
+.de cov@print-date
+.rj 1
+\f[\\*[@sdf_font]]\\*[cov*new-date]\fP
+.br
+..
+.\"------------
+.if !d cov*mt-printed \{\
+. SP 1.9c
+. cov@print-title
+. SP 1.2c
+. cov@print-date
+. SP 3
+. pg@enable-top-trap
+. pg@enable-trap
+. ds cov*mt-printed
+.\}
+.
+.\" Local Variables:
+.\" mode: nroff
+.\" fill-column: 72
+.\" End:
+.\" vim: set filetype=groff textwidth=72:
diff --git a/contrib/mm/mm/ms.cov b/contrib/mm/mm/ms.cov
new file mode 100644
index 0000000..cea6073
--- /dev/null
+++ b/contrib/mm/mm/ms.cov
@@ -0,0 +1,121 @@
+.\" -*- nroff -*-
+.ig
+
+Copyright (C) 1991-2020 Free Software Foundation, Inc.
+mm is written by Jrgen Hgg <jh@axis.com>
+
+mm is free software; 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.
+
+mm is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+Please submit bug reports using groff's 'BUG-REPORT' file to
+http://savannah.gnu.org/bugs/?group=groff.
+..
+.
+.\"------------
+.\" Cover sheet. Mostly like ms cover.
+.\"------------
+.de cov@print-title
+.ie !d cov*title .@error COVEND: no title (TL) defined
+.el \{\
+. in 0
+. misc@ev-keep cov*ev
+. init@reset
+. ad c
+. hy 0
+. fi
+. B
+. cov*title
+. br
+. ad b
+. R
+. ev
+.\}
+..
+.\"------------
+.de cov@print-authors
+.ie !\\n[cov*au] .@error COVEND: no authors (AU) defined
+.el \{\
+. SP
+. nr cov*i 0 1
+. while \\n+[cov*i]<=\\n[cov*au] \{\
+. ds cov*aname \\*[cov*au!\\n[cov*i]!1]
+. ce
+. nop \fI\\*[cov*aname]\fP
+. nr cov*j 0 1
+. while \\n+[cov*j]<=\\n[cov*at!\\n[cov*i]] \{\
+. ds cov*atitle \\*[cov*at!\\n[cov*i]!\\n[cov*j]]
+. ce
+. nop \s-1\\*[cov*atitle]\s0
+. \}
+. rm cov*atitle
+. \}
+. rm cov*aname
+.\}
+..
+.\"------------
+.de cov@print-firm
+.if d cov*firm \{\
+. SP .5
+. ce
+. nop \\*[cov*firm]
+.\}
+..
+.\"------------
+.de cov@print-abstract
+.SP 2
+.if d cov*abstract \{\
+. misc@ev-keep cov*ev
+. init@reset
+. if \\n[cov*abs-ind]>0 \{\
+. in +\\n[cov*abs-ind]u
+. ll -\\n[cov*abs-ind]u
+. \}
+. ce
+\fI\\$1\fP
+. SP 1.5
+. fi
+. cov*abstract
+. br
+. ev
+.\}
+..
+.\"------------
+.de cov@print-date
+.SP 2
+\f[\\*[@sdf_font]]\\*[cov*new-date]\fP
+..
+.\"-----------------
+.de COVEND
+.br
+.if d cov*default-firm \
+. if !d cov*firm .ds cov*firm \\*[cov*default-firm]
+.sp |4.2c
+.cov@print-title
+.cov@print-authors
+.cov@print-firm
+.cov@print-abstract "\\*[cov*abs-name]"
+.cov@print-date
+.pg@enable-top-trap
+.bp 1
+.pg@enable-trap
+.if r cov*abs-arg .if \\n[cov*abs-arg] \{\
+. cov@print-abstract ABSTRACT
+. SP 2
+.\}
+..
+.
+.\" Local Variables:
+.\" mode: nroff
+.\" fill-column: 72
+.\" End:
+.\" vim: set filetype=groff textwidth=72:
diff --git a/contrib/mm/mm/se_ms.cov b/contrib/mm/mm/se_ms.cov
new file mode 100644
index 0000000..7ee7ec3
--- /dev/null
+++ b/contrib/mm/mm/se_ms.cov
@@ -0,0 +1,3 @@
+.\" -*- nroff -*-
+.mso mm/ms.cov
+.nr cur*abstract-ll 11c
diff --git a/contrib/mm/mmroff.1.man b/contrib/mm/mmroff.1.man
new file mode 100644
index 0000000..7920c70
--- /dev/null
+++ b/contrib/mm/mmroff.1.man
@@ -0,0 +1,171 @@
+.TH mmroff @MAN1EXT@ "@MDATE@" "groff @VERSION@"
+.SH Name
+mmroff \- cross-referencing front end for GNU
+.I roff mm
+macro package
+.
+.
+.\" ====================================================================
+.\" Legal Terms
+.\" ====================================================================
+.\"
+.\" Copyright (C) 1989-2023 Free Software Foundation, Inc.
+.\"
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of
+.\" this manual under the conditions for verbatim copying, provided that
+.\" the entire resulting derived work is distributed under the terms of
+.\" a permission notice identical to this one.
+.\"
+.\" Permission is granted to copy and distribute translations of this
+.\" manual into another language, under the above conditions for
+.\" modified versions, except that this permission notice may be
+.\" included in translations approved by the Free Software Foundation
+.\" instead of in the original English.
+.
+.
+.\" Save and disable compatibility mode (for, e.g., Solaris 10/11).
+.do nr *groff_mmroff_1_man_C \n[.cp]
+.cp 0
+.
+.\" Define fallback for groff 1.23's MR macro if the system lacks it.
+.nr do-fallback 0
+.if !\n(.f .nr do-fallback 1 \" mandoc
+.if \n(.g .if !d MR .nr do-fallback 1 \" older groff
+.if !\n(.g .nr do-fallback 1 \" non-groff *roff
+.if \n[do-fallback] \{\
+. de MR
+. ie \\n(.$=1 \
+. I \%\\$1
+. el \
+. IR \%\\$1 (\\$2)\\$3
+. .
+.\}
+.rr do-fallback
+.
+.
+.\" ====================================================================
+.SH Synopsis
+.\" ====================================================================
+.
+.SY mmroff
+.RB [ \-x ]
+.IR groff-argument \~.\|.\|.
+.YS
+.
+.
+.SY mmroff
+.B \-\-help
+.YS
+.
+.
+.SY mmroff
+.B \-\-version
+.YS
+.
+.
+.\" ====================================================================
+.SH Description
+.\" ====================================================================
+.
+.I mmroff
+is a simple wrapper for
+.IR groff ,
+used to expand cross references in
+.IR m@TMAC_M_PREFIX@m ;
+see
+.MR groff_mm @MAN7EXT@ .
+.
+It runs
+.I groff
+with the
+.B \-mm
+option twice,
+first with
+.B \-z
+and
+.B \-rRef=1
+to populate cross-reference and index files with their corresponding
+entries,
+and then again to produce the document.
+.
+It also handles the inclusion of PostScript images with the
+.B PIC
+macro.
+.
+Documents that do not use these features of
+.I "groff mm"
+(the
+.BR INITI ,
+.BR IND ,
+.BR INDP ,
+.BR INITR ,
+.BR SETR ,
+.BR GETHN ,
+.BR GETPN ,
+.BR GETR ,
+.BR GETST ,
+and
+.B PIC
+macros)
+do not require
+.IR \%mmroff .
+.
+.
+.\" ====================================================================
+.SH Options
+.\" ====================================================================
+.
+.B \-\-help
+displays
+a usage message,
+while
+.B \-\-version
+shows version information;
+both exit afterward.
+.
+.
+.TP
+.B \-x
+Create or update the cross-reference file and exit.
+.
+.
+.\" ====================================================================
+.SH Authors
+.\" ====================================================================
+.
+.I mmroff
+was written by
+.MT jh@\:axis\:.se
+J\[o ad]rgen H\[a ad]gg
+.ME
+of Lund,
+Sweden.
+.
+.
+.\" ====================================================================
+.SH "See also"
+.\" ====================================================================
+.
+.MR groff_mm @MAN7EXT@ ,
+.MR groff_mmse @MAN7EXT@ ,
+.MR groff @MAN1EXT@ ,
+.MR @g@troff @MAN1EXT@ ,
+.MR @g@tbl @MAN1EXT@ ,
+.MR @g@pic @MAN1EXT@ ,
+.MR @g@eqn @MAN1EXT@
+.
+.
+.\" Restore compatibility mode (for, e.g., Solaris 10/11).
+.cp \n[*groff_mmroff_1_man_C]
+.do rr *groff_mmroff_1_man_C
+.
+.
+.\" Local Variables:
+.\" fill-column: 72
+.\" mode: nroff
+.\" End:
+.\" vim: set filetype=groff textwidth=72:
diff --git a/contrib/mm/mmroff.pl b/contrib/mm/mmroff.pl
new file mode 100644
index 0000000..af8bf90
--- /dev/null
+++ b/contrib/mm/mmroff.pl
@@ -0,0 +1,179 @@
+#!@PERL@
+# Copyright (C) 1989-2020 Free Software Foundation, Inc.
+#
+# This file is part of groff.
+#
+# groff is free software; 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.
+#
+# groff is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+use strict;
+use warnings;
+
+(my $progname = $0) =~s @.*/@@;
+
+# runs groff in safe mode, that seems to be the default
+# installation now. That means that I have to fix all nice
+# features outside groff. Sigh.
+# I do agree however that the previous way opened a whole bunch
+# of security holes.
+
+my $no_exec;
+
+if (grep(/^--help$/, @ARGV)) {
+ print "usage: mmroff [-x] [groff-option ...] [file ...]\n";
+ exit;
+}
+
+if (grep(/^--version$/, @ARGV)) {
+ print "mmroff (groff) @VERSION@\n";
+ exit;
+}
+
+# check for -x and remove it
+if (grep(/^-x$/, @ARGV)) {
+ $no_exec++;
+ @ARGV = grep(!/^-x$/, @ARGV);
+}
+
+# mmroff should always have -mm, but not twice
+@ARGV = grep(!/^-mm$/, @ARGV);
+my $check_macro = "groff -rRef=1 -z -mm @ARGV";
+my $run_macro = "groff -mm @ARGV";
+
+my (%cur, $rfilename, $max_height, $imacro, $max_width, @out, @indi);
+open(MACRO, "$check_macro 2>&1 |") || die "run $check_macro:$!";
+while(<MACRO>) {
+ if (m#^\.\\" Rfilename: (\S+)#) {
+ # remove all directories just to be more secure
+ ($rfilename = $1) =~ s#.*/##;
+ next;
+ }
+ if (m#^\.\\" Imacro: (\S+)#) {
+ # remove all directories just to be more secure
+ ($imacro = $1) =~ s#.*/##;
+ next;
+ }
+ if (m#^\.\\" Index: (\S+)#) {
+ # remove all directories just to be more secure
+ my $f;
+ ($f = $1) =~ s#.*/##;
+ &print_index($f, \@indi, $imacro);
+ @indi = ();
+ $imacro = '';
+ next;
+ }
+ my $x;
+ if (($x) = m#^\.\\" IND (.+)#) {
+ $x =~ s#\\##g;
+ my @x = split(/\t/, $x);
+ grep(s/\s+$//, @x);
+ push(@indi, join("\t", @x));
+ next;
+ }
+ if (m#^\.\\" PIC id (\d+)#) {
+ %cur = ('id', $1);
+ next;
+ }
+ if (m#^\.\\" PIC file (\S+)#) {
+ &psbb($1);
+ &ps_calc($1);
+ next;
+ }
+ if (m#^\.\\" PIC (\w+)\s+(\S+)#) {
+ eval "\$cur{'$1'} = '$2'";
+ next;
+ }
+ s#\\ \\ $##;
+ push(@out, $_);
+}
+close(MACRO);
+
+sub Die {
+ print STDERR "$progname: fatal error: @_\n";
+ exit 1;
+}
+
+if ($rfilename) {
+ push(@out, ".nr pict*max-height $max_height\n") if defined $max_height;
+ push(@out, ".nr pict*max-width $max_width\n") if defined $max_width;
+
+ open(OUT, ">$rfilename")
+ or &Die("unable to create $rfilename:$!");
+ print OUT '.\" references', "\n";
+ my $i;
+ for $i (@out) {
+ print OUT $i;
+ }
+ close(OUT);
+}
+
+exit 0 if $no_exec;
+exit system($run_macro);
+
+sub print_index {
+ my ($f, $ind, $macro) = @_;
+
+ open(OUT, ">$f") or &Die("unable to create $f:$!");
+ my $i;
+ for $i (sort @$ind) {
+ if ($macro) {
+ $i = '.'.$macro.' "'.join('" "', split(/\t/, $i)).'"';
+ }
+ print OUT "$i\n";
+ }
+ close(OUT);
+}
+
+sub ps_calc {
+ my ($f) = @_;
+
+ my $w = abs($cur{'llx'}-$cur{'urx'});
+ my $h = abs($cur{'lly'}-$cur{'ury'});
+ $max_width = $w if $w > $max_width;
+ $max_height = $h if $h > $max_height;
+
+ my $id = $cur{'id'};
+ push(@out, ".ds pict*file!$id $f\n");
+ push(@out, ".ds pict*id!$f $id\n");
+ push(@out, ".nr pict*llx!$id $cur{'llx'}\n");
+ push(@out, ".nr pict*lly!$id $cur{'lly'}\n");
+ push(@out, ".nr pict*urx!$id $cur{'urx'}\n");
+ push(@out, ".nr pict*ury!$id $cur{'ury'}\n");
+ push(@out, ".nr pict*w!$id $w\n");
+ push(@out, ".nr pict*h!$id $h\n");
+}
+
+
+sub psbb {
+ my ($f) = @_;
+
+ unless (open(IN, $f)) {
+ print STDERR "Warning: Postscript file $f:$!";
+ next;
+ }
+ while(<IN>) {
+ if (/^%%BoundingBox:\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)/) {
+ $cur{'llx'} = $1;
+ $cur{'lly'} = $2;
+ $cur{'urx'} = $3;
+ $cur{'ury'} = $4;
+ }
+ }
+ close(IN);
+}
+
+
+1;
+# Local Variables:
+# mode: CPerl
+# End:
diff --git a/contrib/mm/mmse.tmac b/contrib/mm/mmse.tmac
new file mode 100644
index 0000000..3239aa2
--- /dev/null
+++ b/contrib/mm/mmse.tmac
@@ -0,0 +1,4 @@
+.\" -*- nroff -*-
+.\" mmse.tmac
+.\"
+.do mso mse.tmac
diff --git a/contrib/mm/mse.tmac b/contrib/mm/mse.tmac
new file mode 100644
index 0000000..8184b14
--- /dev/null
+++ b/contrib/mm/mse.tmac
@@ -0,0 +1,166 @@
+.ig
+
+Copyright (C) 1991-2020 Free Software Foundation, Inc.
+mm is written by Jrgen Hgg <jh@axis.com>
+
+mm is free software; 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.
+
+mm is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+Please submit bug reports using groff's 'BUG-REPORT' file to
+http://savannah.gnu.org/bugs/?group=groff.
+..
+.
+.\"
+.\" Swedish version of mm
+.\"
+.\" See m.tmac for version-information.
+.ds @country se
+.
+.mso m.tmac
+.\" The two-letter code for Swedish is 'sv', not 'se' (this is Northern Sami)
+.mso sv.tmac
+.
+.ISODATE
+.
+.\" Page length
+.if !r L .nr @pl 28.5c
+.\" page width
+.if !r W .nr @ll 13c
+.\" page offset
+.if !r O .nr @po 3.5c
+.\" set the above parameters
+.ll \n[@ll]u
+.po \n[@po]u
+.pl \n[@pl]u
+.
+.nr pg*footer-size 4v\" 1v+footer+even/odd footer+1v
+.\"------------------------------------------------
+.\" Dokumentnamn
+.ds LetDNAMN
+.\" Mottagarens datum
+.ds LetMDAT Ert datum:
+.\" Bilaga
+.ds LetBIL Bilaga \"
+.\" Kompletteringsuppgift
+.ds LetKOMP
+.\" Dokumentbeteckning eller dokumentnummer
+.ds LetDBET
+.\" Beteckning (rendebeteckning i form av diarienummer e.d.
+.ds LetBET Beteckning:
+.\" Mottagarens beteckning.
+.ds LetMBET Er beteckning:
+.\" Antal sidor
+.ds LetSIDOR
+.\" Svensk standard med hgerstlld lptext. ---------------------
+.de let@init_SVH
+.in 4.57c
+.ll 17.57c
+..
+.de let@head_SVH
+.rm let@header
+.let@print_SV H
+..
+.de let@sg_SVH
+..
+.de let@fc_SVH
+..
+.\" Svensk standard med vnsterstlld lptext. ---------------------
+.de let@init_SVV
+..
+.de let@head_SVV
+.rm let@header
+.let@print_SV V
+..
+.de let@sg_SVV
+..
+.de let@fc_SVV
+..
+.\"--------------------------------
+.de let@print_SV
+.nf
+.\" pos T0 -----------------------------------
+.in 0
+.sp |3
+.if d let@wa-div .let@wa-div
+.\"----- addressat
+.if '\\$1'V' .if d let@ia-div \{\
+. sp |10
+. let@ia-div
+.\}
+.\" pos T4 -----------------------------------
+.in 9.14c
+.\"----- kompletteringsuppgift
+.if d let*lo-KOMP \{\
+. sp |2
+\\*[let*lo-KOMP]
+.\}
+.\"----- dokumentnamn
+.if d let*lo-DNAMN \{\
+. sp |3
+\\*[let*lo-DNAMN]
+.\}
+.\"----- datum
+.if d cov*new-date \{\
+. sp |5
+Datum:
+\\*[cov*new-date]
+.\}
+.\"----- mottagarens datum
+.if d let*lo-MDAT \{\
+. sp |7
+\\*[LetMDAT]
+\\*[let*lo-MDAT]
+.\}
+.\"----- addressat
+.if '\\$1'H' .if d let@ia-div \{\
+. sp |10
+. let@ia-div
+.\}
+.\" pos T6 -----------------------------------
+.in 13.72c
+.\"----- mottagarens beteck.
+.if d let*lo-MBET \{\
+. sp |7
+\\*[LetMBET]
+\\*[let*lo-MBET]
+.\}
+.\"----- dokumentbeteck.
+.if d let*lo-BET \{\
+. sp |3
+\\*[LetBET]
+\\*[let*lo-BET]
+.\}
+.\" pos T7 -----------------------------------
+.in 16c
+.\"----- bilaga
+.if d let*lo-BIL \{\
+. sp |2
+\\*[LetBIL]\\*[let*lo-BIL]
+.\}
+.\"
+.\"----- sidnummer
+.sp |3
+.ie d let*lo-SIDOR \\n[%] (\\*[let*lo-SIDOR])
+.el \\n[%]
+.\"
+.\" Ta hand om special
+.if d TP .TP
+.sp |17
+..
+.\" -----------------------------------
+.
+.\" Local Variables:
+.\" mode: nroff
+.\" fill-column: 72
+.\" End:
+.\" vim: set filetype=groff textwidth=72:
diff --git a/contrib/mm/refer-mm.tmac b/contrib/mm/refer-mm.tmac
new file mode 100644
index 0000000..800568a
--- /dev/null
+++ b/contrib/mm/refer-mm.tmac
@@ -0,0 +1,109 @@
+.\" refer-mm.tmac
+.\"
+.\" Refer support for mm macros.
+.\"
+.\" Copyright (C) 2011-2020 Free Software Foundation, Inc.
+.\" Written by Werner Lemberg (wl@gnu.org)
+.\"
+.\" This file is part of groff.
+.\"
+.\" groff is free software; 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.
+.\"
+.\" groff is distributed in the hope that it will be useful, but WITHOUT ANY
+.\" WARRANTY; without even the implied warranty of MERCHANTABILITY or
+.\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+.\" for more details.
+.\"
+.\" You should have received a copy of the GNU General Public License
+.\" along with this program. If not, see <http://www.gnu.org/licenses/>.
+.\"
+.\" Please send comments to groff@gnu.org.
+.
+.
+.als ref*error @warning
+.
+.de ref*text-label-start
+. FS "\\$1"
+..
+.de ref*text-label-end
+. FE
+..
+.
+.de ref*biblio-item-start
+. ref@start-print "\\$1"
+..
+.de ref*biblio-item-start-nolabel
+. ref@start-print \&
+..
+.de ref*biblio-item-end
+. ref@stop-print
+..
+.
+.ds ref*refnum-start \" empty
+.ds ref*refnum-end .\"
+.
+.ds [. \v'-.4m'\s-3[\"
+.ds .] ]\s0\v'.4m'\"
+.
+.ds ref*spec!0 Q A T S V N P I C D O
+.ds ref*spec!1 Q A T J S V N P I C D O
+.ds ref*spec!2 Q A T S V P I C D O
+.ds ref*spec!3 Q A T B E S V P I C D O
+.ds ref*spec!4 Q A T R G P I C D O
+.
+.ds ref*spec!A ", " "
+.ds ref*spec!B """ " " "in \fI" "" "\fP"
+.ds ref*spec!D """ " " "(" ")"
+.ds ref*spec!E ", " " "ed.\& "
+.ds ref*spec!G """ " " "(" ")"
+.ds ref*spec!J ", " " "\fI" "" "\fP"
+.ds ref*spec!N """ "(" "" ")"
+.ds ref*spec!O ". " "
+.ds ref*spec!P ", " " "p.\~"
+.ds ref*spec!PP ", " " "pp.\~"
+.ds ref*spec!T ", " " "\(lq" "" "\(rq"
+.ds ref*spec!T:0 ", " " "\fI" "" "\fP"
+.ds ref*spec!T:2 ", " " "\fI" "" "\fP"
+.ds ref*spec!V """ " " "\fB" "\fR"
+.ds ref*spec!dflt ", " "
+.
+.\" For the bibliography section, we emulate the .RS/.RF mechanism of mm by
+.\" collecting references (enclosed with .]- and .][) in macro 'ref*mac'.
+.\" This macro gets expanded while calling the .RP macro.
+.
+.de ref*][-first-pass
+. ec
+. am ref*mac
+. ds [F "\\*([F\"
+. ][ "\\$1" "\\$2"
+. ref*reset
+\\..
+..
+.
+.de ref*biblio-start-hook
+. als ref*][-second-pass ][
+. als ][ ref*][-first-pass
+. de ref*item-start-hook
+. eo
+. am ref*mac ][
+\\..
+..
+.
+.de ref*biblio-end-hook
+. als ][ ref*][-second-pass
+. rm ref*item-start-hook
+. als ref*print ref*end-print
+. RP
+. als ref*print ref*normal-print
+..
+.
+.mso refer.tmac
+.
+.\" Local Variables:
+.\" mode: nroff
+.\" fill-column: 72
+.\" End:
+.\" vim: set filetype=groff textwidth=72:
diff --git a/contrib/mm/tests/LT_SP_AU_without_AT_works.sh b/contrib/mm/tests/LT_SP_AU_without_AT_works.sh
new file mode 100755
index 0000000..7589966
--- /dev/null
+++ b/contrib/mm/tests/LT_SP_AU_without_AT_works.sh
@@ -0,0 +1,50 @@
+#!/bin/sh
+#
+# Copyright (C) 2021 Free Software Foundation, Inc.
+#
+# This file is part of groff.
+#
+# groff is free software; 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.
+#
+# groff is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+
+groff="${abs_top_builddir:-.}/test-groff"
+
+# Regression-test Savannah #60373 (3/3).
+#
+# Ensure that an author name (AU) with no title (AT) isn't rendered with
+# a trailing comma.
+#
+# Thanks to Robert Goulding for the reproducer.
+
+EXAMPLE='.LT SP
+.WA "John Doe"
+Nowhere,
+USA.
+.WE
+.IA "Jane Smith"
+Somewhere,
+UK.
+.IE
+.LO SJ "Letter of Introduction"
+.LO SA "Dear Ms.\& Smith"
+.P
+This is the text of the letter.
+.FC "Yours sincerely,"
+.SG'
+
+echo "$EXAMPLE" \
+ | "$groff" -Tascii -P-cbou -mm \
+ | grep -Eqx '[[:space:]]+JOHN DOE[[:space:]]*'
+
+# vim:set ai et sw=4 ts=4 tw=72:
diff --git a/contrib/mm/tests/LT_SP_multi-word_LO_SJ_works.sh b/contrib/mm/tests/LT_SP_multi-word_LO_SJ_works.sh
new file mode 100755
index 0000000..98c3fda
--- /dev/null
+++ b/contrib/mm/tests/LT_SP_multi-word_LO_SJ_works.sh
@@ -0,0 +1,49 @@
+#!/bin/sh
+#
+# Copyright (C) 2021 Free Software Foundation, Inc.
+#
+# This file is part of groff.
+#
+# groff is free software; 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.
+#
+# groff is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+
+groff="${abs_top_builddir:-.}/test-groff"
+
+# Regression-test Savannah #60373 (1/3).
+#
+# Ensure that a multi-word subject line (LO SJ) gets rendered.
+#
+# Thanks to Robert Goulding for the reproducer.
+
+EXAMPLE='.LT SP
+.WA "John Doe"
+Nowhere,
+USA.
+.WE
+.IA "Jane Smith"
+Somewhere,
+UK.
+.IE
+.LO SJ "Letter of Introduction"
+.LO SA "Dear Ms.\& Smith"
+.P
+This is the text of the letter.
+.FC "Yours sincerely,"
+.SG'
+
+echo "$EXAMPLE" \
+ | "$groff" -Tascii -P-cbou -mm \
+ | grep -Eqx '[[:space:]]+LETTER OF INTRODUCTION[[:space:]]*'
+
+# vim:set ai et sw=4 ts=4 tw=72:
diff --git a/contrib/mm/tests/MT-1-reports-all-TM-numbers.sh b/contrib/mm/tests/MT-1-reports-all-TM-numbers.sh
new file mode 100755
index 0000000..3224e7c
--- /dev/null
+++ b/contrib/mm/tests/MT-1-reports-all-TM-numbers.sh
@@ -0,0 +1,53 @@
+#!/bin/sh
+#
+# Copyright (C) 2023 Free Software Foundation, Inc.
+#
+# This file is part of groff.
+#
+# groff is free software; 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.
+#
+# groff is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+
+groff="${abs_top_builddir:-.}/test-groff"
+
+fail=
+
+wail () {
+ echo ...FAILED >&2
+ fail=YES
+}
+
+# Regression-test Savannah #63613. The identifiers of all technical
+# memoranda should be formatted.
+
+input='.TL
+My Memo
+.AU "Random Hacker"
+.TM 23-SKIDOO 24-URTHRU
+.MT 1
+This is my memo.
+.
+There are many like it but this one is mine.'
+
+output=$(printf "%s\n" "$input" | "$groff" -mm -Tascii -P-cbou)
+echo "$output"
+
+echo "checking that first TM number is present" >&2
+echo "$output" | grep -q "23-SKIDOO" || wail
+
+echo "checking that second TM number is present" >&2
+echo "$output" | grep -q "24-URTHRU" || wail
+
+test -z "$fail"
+
+# vim:set ai et sw=4 ts=4 tw=72:
diff --git a/contrib/mm/tests/MT_5_includes_AT_in_SG.sh b/contrib/mm/tests/MT_5_includes_AT_in_SG.sh
new file mode 100755
index 0000000..4f23d53
--- /dev/null
+++ b/contrib/mm/tests/MT_5_includes_AT_in_SG.sh
@@ -0,0 +1,43 @@
+#!/bin/sh
+#
+# Copyright (C) 2021 Free Software Foundation, Inc.
+#
+# This file is part of groff.
+#
+# groff is free software; 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.
+#
+# groff is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+
+groff="${abs_top_builddir:-.}/test-groff"
+
+# Regression-test Savannah #57034.
+#
+# Ensure that an author's title (if any) is written in the signature.
+#
+# Thanks to Ken Mandelberg for the reproducer.
+
+EXAMPLE='.TL
+Inquiry
+.AU "John SMITH"
+.AT "Director"
+.MT 5
+.P
+sentence
+.FC Sincerely,
+.SG'
+
+echo "$EXAMPLE" \
+ | "$groff" -Tascii -P-cbou -mm \
+ | grep -Eqx '[[:space:]]+Director[[:space:]]*'
+
+# vim:set ai et sw=4 ts=4 tw=72:
diff --git a/contrib/mm/tests/P-indentation-works.sh b/contrib/mm/tests/P-indentation-works.sh
new file mode 100755
index 0000000..5be7efd
--- /dev/null
+++ b/contrib/mm/tests/P-indentation-works.sh
@@ -0,0 +1,135 @@
+#!/bin/sh
+#
+# Copyright (C) 2023 Free Software Foundation, Inc.
+#
+# This file is part of groff.
+#
+# groff is free software; 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.
+#
+# groff is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+
+groff="${abs_top_builddir:-.}/test-groff"
+
+fail=
+
+wail () {
+ echo ...FAILED >&2
+ fail=YES
+}
+
+# Regression-test Savannah #54909. Check other cases as well.
+
+input='.P
+P1 not indented.
+.P 0
+P2 not indented.
+.P 1
+P3 indented.
+.nr Pt 2
+.P
+P4 indented.
+.H 1 Heading
+.P
+P5 not indented.
+.P
+P6 indented.
+.H 3 "Run-in heading."
+Some text.
+.P
+P7 indented.
+.DS
+display
+.DE
+.P
+P8 not indented.
+.P
+P9 indented.
+.BL
+.LI
+list item
+.LE
+.P
+P10 not indented.
+.P
+P11 indented.'
+
+output=$(printf "%s\n" "$input" | "$groff" -mm -Tascii -P-cbou)
+echo "$output"
+
+# P1 not indented.
+#
+# P2 not indented.
+#
+# P3 indented.
+#
+# P4 indented.
+#
+#
+# 1. Heading
+#
+# P5 not indented.
+#
+# P6 indented.
+#
+# 1.0.1 Run-in heading. Some text.
+#
+# P7 indented.
+#
+# display
+#
+# P8 not indented.
+#
+# P9 indented.
+#
+# o list item
+#
+# P10 not indented.
+#
+# P11 indented.
+
+echo "checking that initial untyped paragraph not indented" >&2
+echo "$output" | grep -Eqx ' {7}P1 not indented\.' || wail
+
+echo "checking that initial type 0 paragraph not indented" >&2
+echo "$output" | grep -Eqx ' {7}P2 not indented\.' || wail
+
+echo "checking that first paragraph after Pt=2 indented" >&2
+echo "$output" | grep -Eqx ' {12}P3 indented\.' || wail
+
+echo "checking that second paragraph after Pt=2 indented" >&2
+echo "$output" | grep -Eqx ' {12}P4 indented\.' || wail
+
+echo "checking that first paragraph after heading not indented" >&2
+echo "$output" | grep -Eqx ' {7}P5 not indented\.' || wail
+
+echo "checking that second paragraph after heading indented" >&2
+echo "$output" | grep -Eqx ' {12}P6 indented\.' || wail
+
+echo "checking that paragraph after run-in heading indented" >&2
+echo "$output" | grep -Eqx ' {12}P7 indented\.' || wail
+
+echo "checking that first paragraph after display not indented" >&2
+echo "$output" | grep -Eqx ' {7}P8 not indented\.' || wail
+
+echo "checking that second paragraph after display indented" >&2
+echo "$output" | grep -Eqx ' {12}P9 indented\.' || wail
+
+echo "checking that first paragraph after list not indented" >&2
+echo "$output" | grep -Eqx ' {7}P10 not indented\.' || wail
+
+echo "checking that second paragraph after list indented" >&2
+echo "$output" | grep -Eqx ' {12}P11 indented\.' || wail
+
+test -z "$fail"
+
+# vim:set ai et sw=4 ts=4 tw=72:
diff --git a/contrib/mm/tests/artifacts/60657.ref b/contrib/mm/tests/artifacts/60657.ref
new file mode 100644
index 0000000..ed7f6f3
--- /dev/null
+++ b/contrib/mm/tests/artifacts/60657.ref
@@ -0,0 +1,11 @@
+%K 1
+%A First Author
+%B First Book
+%O Test one
+
+%K 2
+%A Second Author
+%B Second Book
+
+%K 3
+%A Third Author
diff --git a/contrib/mm/tests/ms_cover_sheet_robust_to_missing_AF.sh b/contrib/mm/tests/ms_cover_sheet_robust_to_missing_AF.sh
new file mode 100755
index 0000000..66086f8
--- /dev/null
+++ b/contrib/mm/tests/ms_cover_sheet_robust_to_missing_AF.sh
@@ -0,0 +1,39 @@
+#!/bin/sh
+#
+# Copyright (C) 2021 Free Software Foundation, Inc.
+#
+# This file is part of groff.
+#
+# groff is free software; 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.
+#
+# groff is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+
+groff="${abs_top_builddir:-.}/test-groff"
+
+# Regression-test Savannah #60915.
+#
+# Ensure that a missing firm definition doesn't disrupt cover sheet
+# layout.
+
+EXAMPLE='.COVER
+.ND 2020-07-17
+.TL
+The Great American Novel
+.AU "Eileen M. Plausible"
+.COVEND'
+
+echo "$EXAMPLE" \
+ | "$groff" -Tascii -P-cbou -mm \
+ | grep -Fqx ' 2020-07-17' # 7 spaces
+
+# vim:set ai et sw=4 ts=4 tw=72:
diff --git a/contrib/mm/tests/mse_has-sufficient-footnote-space.sh b/contrib/mm/tests/mse_has-sufficient-footnote-space.sh
new file mode 100755
index 0000000..936d9e5
--- /dev/null
+++ b/contrib/mm/tests/mse_has-sufficient-footnote-space.sh
@@ -0,0 +1,77 @@
+#!/bin/sh
+#
+# Copyright (C) 2022 Free Software Foundation, Inc.
+#
+# This file is part of groff.
+#
+# groff is free software; 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.
+#
+# groff is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+
+groff="${abs_top_builddir:-.}/test-groff"
+
+# Regression-test Savnnah #63398.
+
+input='.de M
+. nr N \\\\$1-1
+. if \\\\$1 .M \\\\nN
+Sed ut perspiciatis, unde omnis iste natus error sit voluptatem
+accusantium doloremque laudantium, totam rem aperiam eaque ipsa, quae ab
+illo inventore veritatis et quasi architecto beatae vitae dicta sunt,
+explicabo.\\\\*F
+. FS
+footnote text
+. FE
+..
+.P
+.M 16'
+
+# .de M
+# . nr N \\$1-1
+# . if \\$1 .M \\nN
+# Sed ut perspiciatis, unde omnis iste natus error sit voluptatem
+# accusantium doloremque laudantium, totam rem aperiam eaque ipsa, quae ab
+# illo inventore veritatis et quasi architecto beatae vitae dicta sunt,
+# explicabo.\\*F
+# .FS
+# blather
+# .FE
+# Nemo enim ipsam voluptatem, quia voluptas sit, aspernatur
+# aut odit aut fugit, sed quia consequuntur magni dolores eos, qui ratione
+# voluptatem sequi nesciunt, neque porro quisquam est, qui dolorem ipsum,
+# quia dolor sit amet consectetur adipiscivelit, sed quia non-numquam eius
+# modi tempora incidunt, ut labore et dolore magnam aliquam quaerat
+# voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam
+# corporis suscipitlaboriosam, nisi ut aliquid ex ea commodi consequatur?
+# Quis autem vel eum iure reprehenderit, qui inea voluptate velit esse,
+# quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo
+# voluptas nulla pariatur? At vero eos et accusamus et iusto odio
+# dignissimos ducimus, qui blanditiis praesentium voluptatum deleniti
+# atque corrupti, quos dolores et quas molestias excepturi sint, obcaecati
+# cupiditate non-provident, similique sunt in culpa, qui officia deserunt
+# mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum
+# facilis est et expedita distinctio. Nam libero tempore, cum soluta
+# nobis est eligendi optio, cumque nihil impedit, quo minus id, quod
+# maxime placeat, facere possimus, omnis voluptas assumenda est, omnis
+# dolor repellendus. Temporibus autem quibusdam et aut officiis debitis
+# aut rerum necessitatibus saepe eveniet, ut et voluptates repudiandae
+# sint et molestiae non-recusandae. Itaque earum rerum hic tenetur a
+# sapiente delectus, ut aut reiciendis voluptatibus maiores alias
+# consequatur aut perferendis doloribus asperiores repellat.
+# ..
+# .P
+# .M 4
+
+output=$(echo "$input" | "$groff" -mm -mmse -Tps)
+
+# vim:set ai et sw=4 ts=4 tw=72:
diff --git a/contrib/mm/tests/place-equation-labels-correctly-in-displays.sh b/contrib/mm/tests/place-equation-labels-correctly-in-displays.sh
new file mode 100755
index 0000000..1970397
--- /dev/null
+++ b/contrib/mm/tests/place-equation-labels-correctly-in-displays.sh
@@ -0,0 +1,62 @@
+#!/bin/sh
+#
+# Copyright (C) 2022 Free Software Foundation, Inc.
+#
+# This file is part of groff.
+#
+# groff is free software; 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.
+#
+# groff is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+
+groff="${abs_top_builddir:-.}/test-groff"
+
+fail=
+
+wail () {
+ echo FAILED >&2
+ fail=YES
+}
+
+# Regression-test Savannah #62190. Check left- and center-aligned
+# displayed equations as well.
+
+input='.DS L
+.EQ (1)
+p = q
+.EN
+.DE
+.DS I
+.EQ (2)
+w = z
+.EN
+.DE
+.DS C
+.EQ (3)
+x = y
+.EN
+.DE'
+
+output=$(printf "%s\n" "$input" | "$groff" -e -mm -Tascii -P-cbou)
+
+echo "checking left-aligned displayed equation" >&2
+echo "$output" | grep -Eq 'p=q {54}\(1\)' || wail
+
+echo "checking indented displayed equation" >&2
+echo "$output" | grep -Eq 'w=z {49}\(2\)' || wail
+
+echo "checking centered displayed equation" >&2
+echo "$output" | grep -Eq 'x=y {26}\(3\)' || wail
+
+test -z "$fail" || exit 1
+
+# vim:set ai et sw=4 ts=4 tw=72:
diff --git a/contrib/mm/tests/remove-stale-bib-entry-data.sh b/contrib/mm/tests/remove-stale-bib-entry-data.sh
new file mode 100755
index 0000000..5fb68e6
--- /dev/null
+++ b/contrib/mm/tests/remove-stale-bib-entry-data.sh
@@ -0,0 +1,72 @@
+#!/bin/sh
+#
+# Copyright (C) 2022 Free Software Foundation, Inc.
+#
+# This file is part of groff.
+#
+# groff is free software; 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.
+#
+# groff is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+
+groff="${abs_top_builddir:-.}/test-groff"
+
+fail=
+
+wail () {
+ echo FAILED >&2
+ fail=YES
+}
+
+# Regression-test Savannah #60657. Ensure data from a bibliographic
+# entry don't carry over to the next.
+
+# Locate directory containing our test artifacts.
+artifact_dir=
+
+for buildroot in . .. ../..
+do
+ d=$buildroot/contrib/mm/tests/artifacts
+ if [ -d "$d" ]
+ then
+ artifact_dir=$d
+ break
+ fi
+done
+
+# If we can't find it, we can't test.
+test -z "$artifact_dir" && exit 77 # skip
+
+input=".R1
+bibliography $artifact_dir/60657.ref
+.R2"
+
+output=$(echo "$input" | "$groff" -R -mm -Tascii -P-cbou)
+
+echo "checking first entry"
+echo "$output" \
+ | grep -q "1\. First Author in First Book\. Test one\.$" \
+ || wail
+
+echo "checking second entry"
+echo "$output" \
+ | grep -q "2\. Second Author in Second Book\.$" \
+ || wail
+
+echo "checking third entry"
+echo "$output" \
+ | grep -q "3\. Third Author\.$" \
+ || wail
+
+test -z "$fail" || exit 1
+
+# vim:set ai et sw=4 ts=4 tw=72:
diff --git a/contrib/mm/tests/short-pages-do-not-overflow-stack.sh b/contrib/mm/tests/short-pages-do-not-overflow-stack.sh
new file mode 100755
index 0000000..4be0e13
--- /dev/null
+++ b/contrib/mm/tests/short-pages-do-not-overflow-stack.sh
@@ -0,0 +1,59 @@
+#!/bin/sh
+#
+# Copyright (C) 2022 Free Software Foundation, Inc.
+#
+# This file is part of groff.
+#
+# groff is free software; 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.
+#
+# groff is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+
+groff="${abs_top_builddir:-.}/test-groff"
+
+fail=
+
+wail () {
+ echo FAILED >&2
+ fail=YES
+}
+
+# Regression-test Savannah #24048. Pages that are too short to
+# accommodate minimal header and footer requirements should not cause
+# infinite trap recursion.
+
+input='.COVER
+.TL
+Title
+.AU "R. Thurston Howell"
+.AT "Professor of Agnotology" "Publisher, Posterior Analytics Weekly"
+.COVEND
+.P
+Main matter goes here.'
+
+echo "checking that sample document fits using default length" >&2
+output=$(printf "%s\n" "$input" \
+ | "$groff" -b -mm -Tascii -P-cbou) || wail
+
+echo "checking that sample document fits using -rL5v" >&2
+output=$(printf "%s\n" "$input" \
+ | "$groff" -b -rL5v -mm -Tascii -P-cbou) || wail
+
+echo "checking that sample document fails gracefully using -rL4v" >&2
+error=$(printf "%s\n" "$input" \
+ | "$groff" -b -rL4v -mm -Tascii -P-cbou -z 2>&1)
+# Assume that >= 10 lines of stderr must be due to a giant backtrace.
+test $(echo "$error" | wc -l) -lt 10 || wail
+
+test -z "$fail"
+
+# vim:set ai et sw=4 ts=4 tw=72:
diff --git a/contrib/mom/BUGS b/contrib/mom/BUGS
new file mode 100644
index 0000000..6e7a828
--- /dev/null
+++ b/contrib/mom/BUGS
@@ -0,0 +1,985 @@
+ -*- text -*-
+ Copyright 2004-2020 Free Software Foundation, Inc.
+
+ Copying and distribution of this file, with or without modification,
+ are permitted in any medium without royalty provided the copyright
+ notice and this notice are preserved.
+
+Assume that anything that doesn't work or behaves oddly is a bug.
+The documentation should be taken as the authoritative source for
+how things ought to be.
+
+Post to the groff mailing list with bug reports, questions and
+suggestions, or contact me directly at:
+
+ peter@schaffter.ca
+
+If writing me directly, please include the word "groff" or "mom" in
+the Subject line or you risk my spam filters nuking your message.
+
+--Peter Schaffter
+
+====================================================================
+
+Version 2.5_c
+=============
+
+#R_MARGIN not being respected in PAGEWIDTH.
+---Fixed---
+
+Version 2.5_b
+=============
+PAGINATE not restoring page numbers after being disabled.
+---Fixed---
+
+Sentence space not being restored after a terminating REF.
+---Fixed---
+
+CODE <OFF> not always correctly restoring point size of text
+afterwards.
+---Fixed---
+
+BLANKPAGE broken when columns are enabled.
+---Fixed---
+
+Registers #FROM_COVERTITLE and #FROM_DOC_COVERTITLE not being
+cleared in macro COLLATE.
+---Fixed---
+
+DROPCAP not calculating distance to FOOTER trap correctly.
+---Fixed---
+
+Version 2.5
+===========
+
+Page offset not being restored correctly after CENTRE_BLOCK.
+---Fixed---
+
+LEFT_HANG intermittently causing type to be raised out of position.
+---Fixed---
+
+$CHAPTER_STRING default not being set in COPYSTYLE.
+---Fixed---
+
+When using mom bare metal, NEWPAGE depositing a superfluous blank
+page unless B_MARGIN has been set explicitly.
+---Fixed---
+
+Version 2.4-4_e
+===============
+
+LANDSCAPE arg to PAPER not being appended to $PAPER so PAPER
+isn't picking it up when PAPER is called at the top of DEFAULTS.
+---Fixed---
+
+BLANKPAGE with NULL arg printing incorrect page number when page
+numbering is restored.
+---Fixed---
+
+BLANKPAGE with DIVIDER arg spitting out one too many pages.
+---Fixed---
+
+Hyphens appearing mid-line in runon footnotes.
+---Fixed---
+
+Version 2.4-4_b
+===============
+SMALLCAPS introducing a small indent equal to a wordspace when
+called after PP.
+---Fixed---
+
+Version 2.4-4_a
+===============
+BIBLIOGRAPHY_SPACING not being respected.
+---Fixed---
+
+Version 2.4-4
+=============
+Default PAPER settings overwriting user-entered PAGEWIDTH,
+PAGELENGTH, and PAGE.
+---Fixed---
+
+QUOTE and BLOCKQUOTE indents shifting after page breaks.
+---Fixed---
+
+Version 2.4-3
+=============
+TYPEWRITE: Inline \*[PREV] calling \*[ULX] without explicitly
+returning to TYPEWRITER font.
+---Fixed---
+
+%u field in refer databases not triggering ref*type 0 (Internet
+reference).
+---Fixed---
+
+Idem field of refer databases overwriting first occurrence of author
+name.
+---Fixed---
+
+Captions not fully respecting TYPEWRITE.
+---Fixed---
+
+COVERTEXT not fully respecting TYPEWRITE.
+---Fixed---
+
+Changes to font family inside a COVERTEXT block not being reset to
+default document family when the block is terminated.
+---Fixed---
+
+Unwanted linespace before labels above tables.
+---Fixed---
+
+Label number of AUTOLABEL_TABLES incrementing by 2 instead of 1.
+---Fixed---
+
+Page number of the page before a bibliography not printing.
+---Fixed---
+
+Version 2.4-1
+=============
+tbl not respecting pre-tbl fill mode.
+---Fixed---
+
+COVER and DOC_COVER not always capturing pertinent title and
+copyright.
+---Fixed---
+
+Version 2.4
+===========
+BIBLIOGRAPHY output broken.
+---Fixed---
+
+Version 2.3
+===========
+.PS/.PE not working at start of documents without a preceding .PP.
+---Fixed---
+
+Output of .PS/.PE not centered correctly (the default).
+---Fixed---
+
+Version 2.2-a
+=============
+Omitting postfixed digit from ROMAN/roman args to LIST not
+generating warning.
+---Fixed---
+
+FOOTERS causing infinite loop.
+---Fixed---
+
+Version 2.2
+===========
+COVERTITLE not picking up style params.
+---Fixed---
+
+FORCE_RECTO and BLANKPAGES not co-operating.
+---Fixed---
+
+TOC and LISTS_OF leading not being picked up and/or adjusted
+properly.
+---Fixed---
+
+PDF outline putting first doc ahead of TOC in PDF outline when
+TOC is auto-relocated and COVER has the BLANKPAGE arg.
+---Fixed---
+
+Version 2.1-b
+=============
+Toggling of pagination broken.
+---Fixed---
+
+HEADERS_AND_FOOTERS printing footer at top of second page instead of
+printing header unless FOOTER_ON_FIRST_PAGE is called.
+---Fixed---
+
+Version 2.1-a
+=============
+
+Some part-by-part formatting changes to headers not being recognized
+when global header options have been invoked.
+---Fixed---
+
+Version 2.1
+===========
+
+UNDERSCORE adding an extra space after underlined text.
+---Fixed---
+
+bug #44903: 2 column output misplaced
+---Fixed---
+
+PDF_IMAGE and FLOAT environments conflicting.
+---Fixed---
+
+DROPCAP picking up color from last call to .gcolor.
+---Fixed---
+
+PAD not working properly with mom's indent macros.
+---Fixed---
+
+Margin notes not respecting differing recto-verso margins.
+---Fixed---
+
+Graphical object macros not clearing fill/no-fill registers and
+modes.
+---Fixed---
+
+LIST ALPHA emitting a number register to output.
+---Fixed---
+
+HEADER_PLAIN and FOOTER_PLAIN broken.
+---Fixed---
+
+Version 2.0-c_1
+===============
+
+.TS with no H causing FN_OVERFLOW warning when there are footnotes
+on same page.
+---Fixed---
+
+PDF_TARGET "descriptive text" not printing.
+---Fixed---
+
+Version 2.0-c
+=============
+
+Endnotes page offset wrong if (BLOCK)QUOTE last macro before
+ENDNOTES.
+---Fixed---
+
+Character translation of diacritics from lowercase to caps broken.
+---Fixed---
+
+Spacing not being restored (.ns/.rs) after a HEADING that falls at
+the top of the page.
+---Fixed---
+
+Version 2.0-b
+=============
+
+When line numbering is enabled, line numbers after QUOTE being reset
+to '0'.
+---Fixed---
+
+When line numbering is enabled for QUOTE and BLOCKQUOTE, style
+params for line numbers not being applied.
+---Fixed---
+
+TOC overprinting footer when it comes immediately after
+BIBLIOGRAPHY.
+---Fixed---
+
+TOC page numbers not printing when positioned at top of page.
+---Fixed---
+
+TOC page numbers not always incrementing properly.
+---Fixed---
+
+Version 2.0-a_1
+===============
+
+QUOTE_INDENT not being respected in FLOAT.
+---Fixed---
+
+SMARTQUOTES OFF broken.
+---Fixed---
+
+DOCHEADER_LEAD being reset to default after first chapter.
+---Fixed---
+
+Forced floats that fit on the page causing floats on the next page
+to be treated as forced.
+---Fixed---
+
+Forced floats not advancing on the page after output if the float is
+forced to the next page, causing running text to overprint.
+---Fixed---
+
+Text after deferred floats not being shimmed properly.
+---Fixed---
+
+Tables that span pages overprinting first two lines of table on new
+pages.
+---Fixed---
+
+PDF_IMAGE not respecting .IL, .IR, or .IB.
+---Fixed---
+
+AUTOLEAD not sticking after .START.
+---Fixed---
+
+Version 2.0-a
+=============
+
+Footer not printing on first page when HEADERS_AND_FOOTERS enabled.
+---Fixed---
+
+$AUTHOR string missing.
+---Fixed---
+
+Version 2.0
+===========
+
+tbl macros .TS/.TE not working unless inside a float.
+---Fixed---
+
+Terminal period after page number(s) in refer items not always
+printing.
+---Fixed---
+
+====================================================================
+
+Version 1.6-a
+===========
+
+Footnotes on last page of columnar docs before a TOC getting printed
+at bottom of last column, not current column.
+--Fixed---
+
+HEADER_RULE OFF turning off headers completely.
+---Fixed---
+
+FINIS depositing a blank final page when invoked too close to the
+bottom margin.
+---Fixed---
+
+Version 1-6
+===========
+
+ENDNOTE_STRING_CAPS not disabling caps when arg given.
+---Fixed---
+
+Superfluous blank line before paragraphs with paraheads.
+---Fixed---
+
+Paraheads causing line numbering to overprint two line numbers.
+---Fixed---
+
+Endless loop when DOC_LEAD_ADJUST is disabled.
+---Fixed---
+
+In the case where the list doesn't fit the page, -mom inserts
+an extra page with one word and a warning about "environment stack
+underflow" and then continues on the following page.
+--Fixed--
+
+PRINTSTYLE TYPEWRITE not respecting TYPEWRITER_FAMILY when DOCTYPE
+is LETTER.
+---Fixed---
+
+Version 1.5-d
+=============
+
+ILX not quitting left indents set within ITEM.
+---Fixed----
+
+Version 1.5-c
+=============
+
+COVER_COUNTS_PAGES incrementing pagenum by 1 too many.
+---Fixed---
+
+HEADER/FOOTER_RECTO strings vanishing when the default CAPS option
+is turned off.
+---Fixed---
+
+TQ not removing QUAD arg from cleared tabs.
+---Fixed---
+
+DROPCAP_OFF trap remaining in effect after dropcap has been
+processed.
+---Fixed---
+
+PARAHEAD_SIZE 0 resulting in 0-sized type!
+---Fixed---
+
+When DOC_LEAD is called to change document leading in collated docs,
+document leading steadily increases by small amounts at each
+subsequent call to COLLATE.
+---Fixed---
+
+(DOC_)COVER requests annihilating families used in various document
+elements if those families differ from the document's overall
+family.
+---Fixed---
+
+Covers and doccovers not always respecting null pagenumbering.
+--Fixed---
+
+Version 1.5-b
+=============
+Use of \E*[UC] and \E*[LC] inside strings for HDRFTR_RECTO and
+HDRFTR_VERSO breaking headers.
+---Not fixable. CAPS option added to HDRFTR_RECTO/VERSO to
+ accommodate situations where capitalized reserved
+ strings(\*[$TITLE], \*[$AUTHOR], etc) are desired.---
+
+COLLATE depositing a blank page if last output line before it falls
+at the bottom of running text.
+---Fixed---
+
+PRINTSTYLE TYPEWRITE not setting $FAMILY or $FONT or $PP_FT, with
+consequences for COLLATE.
+---Fixed---
+
+FOOTNOTE_MARKERS OFF not disabling footnote markers if used before
+START.
+---Fixed---
+
+1st footnotes with overflow vanishing altogether with an
+"automatically ending diversion 'FN_OVERFLOW' on exit" warning.
+---Fixed---
+
+Right hand margin notes vanishing when an RH margin note overflows
+to the next output page.
+---Fixed (I think)---
+
+Doc bug; \*[S<size>] escape incorrectly typed as \*S[<size>] in the
+section on mom's inlines.
+---Fixed---
+
+Paragraphs inside blockquotes not being spaced when .PARA_SPACE is
+active.
+---Fixed---
+
+Version 1.5-a
+=============
+Indenting of references (collected with .REF) on endnotes pages when
+endnote numbers are right-aligned appears to be backwards; the
+first line of the reference is indented more than the second.
+---Fixed---
+
+Version 1.5
+===========
+DROPCAP not printing the dropcap letter at all in PRINTSTYLE
+TYPEWRITE, nor when DROPCAP is used (accidentally?) after a valid
+"first" paragraph.
+---FIXED---
+
+DROPCAP going into an infinite loop when groff called with the
+-Tascii switch.
+---FIXED---
+
+SHIFT_LIST, when used anywhere but with a top-level list, is killing
+list indents for every list level *returned to* afterward.
+---Fixed---
+
+TOC page number for heads and subheads that get bumped to next page
+(because of .ne) off by 1.
+---Fixed---
+
+Moving backwards in nested lists not setting the proper indent.
+---Fixed---
+
+Default linebreak color missing in om.tmac.
+---Fixed---
+
+Some links in macrolist.html not pointing to html "name" owing to
+missing # in link names.
+---Fixed---
+
+Version 1.4-b
+=============
+Line lengths and indents not always being respected in LIST.
+---Fixed---
+
+CAPS OFF, called inline with \*[CAPS OFF] not working.
+(Added two new inlines, \*[UC] and \*[LC], to do the job.)
+---Fixed---
+
+When type is set after START but no docelement tag given, the
+expected family ($DOC_FAMILY) and font (R) are not in effect.
+---Fixed---
+
+When DOCTYPE is CHAPTER and .TITLE is omitted after .COLLATE, the
+title vanishes from page headers/footers.
+---Fixed---
+
+Version 1.4-a
+=============
+In collated documents, when using a different HEADER_FAMILY,
+if BLANKPAGE <n> is given after COLLATE (but before START) all
+subsequent text is set in the HEADER_FAMILY face rather than the
+standard text face.
+---Fixed---
+
+Document title identification string missing on endnotes pages when
+the endnote marker style is LINE.
+---Fixed---
+
+Space between endnote items on endnotes output pages not being
+inserted.
+---Fixed---
+
+Version 1.4
+===========
+Invoking .FOOTERS isn't automatically putting pagination in the top
+margin.
+---Fixed---
+
+.PP_FONT after .COLLATE not being respected.
+---Fixed---
+
+$SAVED_PP_FT not being fed to .FT in .PP after .COLLATE
+---Fixed---
+
+.CODE OFF not always restoring previous family and font.
+---Fixed---
+
+.ITEM, when not in a list, should do nothing.
+---Fixed---
+
+Version 1.3-e_3
+===============
+ENDNOTES is not, by default, printing headers on endnotes pages.
+---Fixed---
+
+Processing of the "Endnotes" title for the TOC is putting the
+page number 1 line too high and not inserting leader.
+---Fixed---
+
+Collated docs not respecting $PP_FT (it's picking up the font from
+the pagenumber font)
+---Fixed---
+
+Docheader spacing sometimes depositing too much space between
+various docheader elements in TYPEWRITE when DOCTYPE is DEFAULT or
+NAMED.
+---Fixed---
+
+When COLUMNS are on, subheads that are deferred to the next
+column/page because there isn't enough room for the s/h and one
+line of text are causing columns to overprint.
+---Fixed---
+
+HDRFTR_LEFT printing one line too high when .HEADER_COLOR is used.
+---Fixed---
+
+DOCTITLE link broken in the docs.
+---Fixed---
+
+Version 1.3-e_2
+===============
+TOC formatting incorrect when the pound/number sign (#) is used in
+head elements.
+---Fixed---
+
+[Documentation]: The docs erroneously state that TOC control macros
+can be entered anywhere in a file prior to invoking TOC (they should
+be entered before START).
+---Fixed---
+
+Page numbers in the bottom margin being printed too low on output
+pages preceding an invocation of COLLATE or macros that call it.
+---Fixed---
+
+A superfluous blank, numbered page is being generated by COLLATE
+(and macros that call it, namely TOC and ENDNOTES) when the last
+line of output text before it falls on the last valid baseline of
+an output page. Same thing happening occasionally with normal
+document termination.
+---Fixed---
+
+SHIFT_LIST not being observed when moving *back* to a shifted list;
+the list is reverting to the left margin.
+---Fixed---
+
+NUMBER_SUBHEADS not working with TYPESET when PARA_SPACE is on.
+---Fixed---
+
+Version 1.3-e_1
+===============
+Missing #COLLATE register (accidentally wiped out) creating various
+problems with .COLLATE (missing headers, leading increasing
+slightly each time .COLLATE invoked, etc).
+---Fixed---
+
+Version 1.3-e
+=============
+mom failing during groff build while processing
+examples/typesetting.mom
+---Fixed---
+
+Windows user reports COLLATE fails with a bottom margin error
+(generated by mom).
+---Fixed---
+
+Version 1.3-d
+=============
+Small error in the examples of output in the "Footnotes and
+Punctuation" documentation section.
+---Fixed----
+
+PAD_LIST_DIGITS/SHIFT_LIST broken when the enumerator type is
+roman or ROMAN.
+---Fixed---
+
+COLLATE wiping out <doc element>_FAMILY settings.
+---Fixed---
+
+DOC_LEAD_ADJUST OFF not being observed when COLLATE is invoked.
+---Fixed---
+
+DROPCAP setting the dropcap too high in initial paragraph after a
+COLLATE.
+---Fixed---
+
+Version 1.3-c
+=============
+Owing to a superfluous "if" in the FONT macro, the "missing font"
+routine is being silently ignored.
+---Fixed---
+
+FOOTNOTE, used in nofill mode, adds a linebreak between the
+marker and the text of the footnote.
+---Fixed---
+
+Version 1.3-b
+=============
+
+ITALIC_MEANS_ITALIC not being respected when DOCTYPE LETTER.
+---Fixed---
+
+Underlining of italic passages in PRINTSTYLE TYEPWRITE not spanning
+pages.
+---Fixed---
+
+PRINTSTYLE TYPEWRITE depositing extra space on new pages above quotes
+that span pages.
+---Fixed---
+
+MN doesn't accept OFF, QUIT, END, X, etc.
+---Fixed---
+
+Margin notes that begin flush with the last line of text on a page
+are running down the same page, instead of the remainder being
+collected and output on the next.
+---Fixed---
+
+MN sometimes erroneously dropping margin notes near the bottom of
+a page, even when they'd fit. (MN-shifted not being removed by
+MN-top.)
+---Fixed---
+
+MN_INIT not accepting "" args for default values.
+---Fixed---
+
+Documentation for margin notes erroneously states that the first
+(optional) argument can be either "ragged" or "symmetric". S/b
+"RAGGED" or "SYMMETRIC".
+---Fixed---
+
+Use of "" to tell MN_INIT to use the default for any specific
+argument in the arg list broken.
+---Fixed---
+
+Paragraphs that begin with a "smart" double quote when the
+preceding paragraph has no corresponding close quote (i.e. dialogue
+passages containing multiple paragraphs) are starting off with a
+close quote.
+---Fixed---
+
+Version 1.3-a
+=============
+
+First baseline of type isn't going where it's supposed to when the
+docheader is turned off.
+---Fixed---
+
+Version 1.3
+===========
+
+Persistent error in html coding of docs (<nobr> tag).
+---Fixed---
+
+Version 1.2-f
+============
+
+Multiple line subheads near page bottom sometimes printing one line
+of subhead at page bottom, and subsequent lines on next page.
+---Fixed---
+
+Post-quote spacing still wonky when paragraph spacing is turned on.
+---Fixed--- (for good would be nice)
+
+RULE not always resetting quad and quad value.
+---Fixed---
+
+Version 1.2-e
+=============
+
+Some string definitions in om.tmac had superfluous spaces after
+them (e.g. $COVERTITLE).
+---Fixed---
+
+Spacing under quotes not correct when paragraph spacing is turned
+on.
+---Fixed---
+
+
+First word of last line before footnotes is getting chopped.
+---Fixed---
+
+Version 1.2-d
+=============
+
+HEADER_FAMILY not changing header family.
+---Fixed---
+
+FAMILY, after COLLATE, not changing the family of all and every
+page element or tag.
+---Fixed---
+
+Heads and subheads at the start of docs are printing one line lower
+than they should.
+---Fixed---
+
+Gaps are appearing at the bottom of pages when there's a linebreak
+followed by a subhead.
+---Fixed---
+
+When LS is invoked after a single text line at the top of a page
+containing a T_MARGIN (set with T_MARGIN or PAGE), mom is performing
+spacing adjustments as if the first line doesn't exist.
+---Fixed---
+
+Changes made to ALD and LS in version 1.2-c should not apply when
+the document processing macros are used. There is a significant
+conflict with the internal use of ALD when the docheader is only
+one line long (as, for example, when DOCTYPE is CHAPTER).
+---Fixed, pending discovery of further conflicts---
+
+Version 1.2-c
+=============
+
+Deferred footnotes not always being output, and groff complains
+"ending diversion FN_OVERFLOW on exit."
+---Fixed---
+
+First .LS call after a top margin has been set (with .T_MARGIN
+or .PAGE) causing mom to move off the top margin baseline. Also,
+there are conflicts between ALD, LS and T_MARGIN.
+---Fixed---
+
+DROPCAP not properly restoring a running \*[COND] or \*[EXT] after
+COND or EXT are given as arguments to DROPCAP.
+---Fixed---
+
+Version 1.2
+===========
+
+.PAD not co-operating with mom's fontstyles, esp. when a full
+family+fontstyle is given to .FT.
+---Fixed---
+
+.DROPCAP -- ditto the above.
+---Fixed---
+
+Version 1.1.9
+=============
+
+Footnote markers not resetting properly on new pages when COLUMNS
+is enabled.
+---Fixed---
+
+When overflowed footnote material is the only footnote material on
+the page or in the column, no footnotes are output.
+---Fixed---
+
+The AUTOLEAD used in FOOTNOTE not being disabled after FOOTNOTES
+are output, or after PROCESS_FN_LEFTOVER/PROCESS_FN_IN_DIVER.
+---Fixed---
+
+COL_NEXT and COL_BREAK, when invoked during the last column on a
+page, are overprinting the last column instead of breaking to a new
+page when there are footnotes in the column.
+---Fixed---
+
+BR_AT_LINE_KERN not "break-and-spreading" text when used in
+justified copy.
+---Fixed---
+
+Version 1.1.8
+=============
+
+BLOCKQUOTE_FAMILY not changing blockquote family.
+---Fixed---
+
+FOOTNOTE, whether in column mode or not, was using
+#FN_COUNT_FOR_COLS for all footnote markers and handling.
+---Fixed---
+
+Deferred footnotes that occurred on the second to last page of
+documents not printing.
+---Fixed---
+
+Version 1.1.7-a
+===============
+
+Suite number in DOCTYPE LETTER not printing.
+---Fixed---
+
+Footer elements not always vertically aligning.
+---Fixed---
+
+Footer rule gap not always correctly observed.
+---Fixed---
+
+Page numbering, when at top of page, not always falling on
+HDRFTR_MARGIN.
+---Fixed---
+
+Default page numbering style for COPYSTYLE draft is DIGIT instead
+of roman.
+---Fixed---
+
+Hyphens around page numbering when style is DIGIT, ROMAN or ALPHA
+not vertically centered.
+---Fixed---
+
+EXT arg not working with DROPCAP.
+---Fixed---
+
+DOC_QUAD not automatically set immediately after START
+---Fixed--
+
+Tabs behaving erratically during document processing.
+---Fixed---
+
+Version 1.1.7
+=============
+
+When DOCHEADER OFF <distance> is given, if <distance> falls short
+of the top margin of running text, <distance> is not respected and
+bottom margin falls low.
+---Fixed---
+
+
+Version 1.1.6-e
+===============
+
+The " mark (doublequote), when entered while not in document
+processing mode (i.e. just straightforward typesetting), outputs
+nothing unless SMARQUOTES is invoked explicitly.
+---Fixed---
+
+Version 1.1.6-c
+===============
+
+In document processing mode, docs that use *none* of the
+docprocessing tags being ignored.
+---Fixed---
+
+Version 1.1.6-b
+===============
+
+String tabs not picking up #L_MARGIN when #L_MARGIN not explicitly
+set with L_MARGIN, PAPER or PAGE.
+---Fixed---
+
+Infinite loop when B_MARGIN is set lower than FOOTER_MARGIN during
+doc processing.
+---Fixed---
+
+Version 1.1.6-a
+===============
+
+Mom partially broken when run with groff 1.19.1. Don't know yet
+what this is, whether bad coding in mom, or a problem with 1.19.1.
+Only solution for now: run mom 1.1.6 with groff 1.18.
+----Fixed---
+
+Top margin of endnotes pages after the first endnotes page when
+PRINTSTYLE is TYPEWRITE and endnotes single-spacing is turned on
+falling one line too high.
+---Fixed---
+
+Version 1.1.6
+=============
+
+DOCHEADER OFF (distance) not being respected.
+---Fixed---
+
+FINIS killing ENDNOTES page numbering and heads.
+---Fixed---
+
+Version 1.1.5
+=============
+
+Draft and revision not appearing in page headers.
+---Fixed---
+
+\*[RULE] not working properly with indents and justified copy.
+---Fixed---
+
+Post-epigraph spacing in TYPEWRITE causing some first pages to run too
+deep.
+---Fixed---
+
+Spacing of docheaders in TYPEWRITE not always consistent.
+---Fixed---
+
+Version 1.1.4
+=============
+
+Blockquotes that span pages running too deep.
+---Fixed---
+
+Version 1.1.3
+=============
+
+Footnotes not outputting on final page of document body when ENDNOTES
+is invoked.
+---Fixed---
+
+Pad not working properly and/or spitting out warnings when fill mode is
+on.
+---Fixed---
+
+Version 1.1.2
+=============
+
+PAGENUM_STYLE being ignored unless entered after START.
+---Fixed---
+
+Version 1.1
+===========
+
+String tabs not working as advertised when set from within other tabs.
+---Fixed---
+
+.COLLATE sometimes depositing a header on the first page of a subsequent doc.
+---Fixed with workaround BREAK_QUOTE---
+
+.UNDERLINE_QUOTES in PRINTSTYLE TYPEWRITE not on by default as advertised.
+---Fixed---
+
+.TI not cooperating with other indent styles.
+---Fixed---
+
+.WS and .SS not cooperating.
+---Fixed---
+
+.RW and .EW not working.
+---Fixed---
+
+========================================================================
+
+KNOWN PROBLEMS
+--------------
+
+The indent macros from the typesetting macro set may not always
+perform well in conjunction with the document processing macros,
+especially when documents are set in columns. Mostly, this is the
+result of inadequate testing. There are only so many "who'd want to
+do this anyway?" scenarios I can think of on my own.
+
+Epigraphs at the bottoms of page may sometimes run exactly one line
+deeper than they should. The alternative (from my point of view) is
+to have them run 1 line shorter than they should. The problem stems
+from the fact the epigraphs are leaded differently than all other text,
+and there's only so much adjusting that can be done with the whitespace
+surrounding them to get them to bottom align. Since stylistically,
+epigraphs should never appear at the bottom of a page/column without at
+least some running text beneath them in order to make sense of the role
+they play in page layout, this not likely to be fixed for some time.
+
diff --git a/contrib/mom/ChangeLog b/contrib/mom/ChangeLog
new file mode 100644
index 0000000..82e5dbb
--- /dev/null
+++ b/contrib/mom/ChangeLog
@@ -0,0 +1,1788 @@
+2023-06-15
+
+ * om.tmac: Enclose all calls to \D't n' in \Z
+
+2023-03-01 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ [mom]: Generate test script even if we'll skip it.
+
+ * examples/test-mom.sh.in: Check availability of required
+ pdfinfo(1) and pdfimages(1) commands at test time; skip if they
+ aren't present.
+ * mom.am [!HAVE_PDFTOOLS]: Generate the test script even if
+ these tools aren't available.
+
+2023-02-18 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * mom.am (uninstall_mom): Clean more fastidiously; try to remove
+ the configured `pdfdocdir` in the event it is empty, but do not
+ fail if it isn't. (It can be a directory shared with other
+ groff components; we don't know in what order the uninstall
+ targets will serialize, but the last one run should succeed.)
+
+2023-02-02
+ * om.tmac (UNDERSCORE, UNDERSCORE2): Add PREFIX and SUFFIX
+ arguments so surrounding punctuation can be protected from
+ underscoring.
+
+2023-01-16
+ * om.tmac (PRINTSTYLE): Abort with message if nroff is called on
+ a document using PRINTSTYLE TYPESET.
+
+ Fixes <https://savannah.gnu.org/bugs/?63581>. Thanks to Gene
+ for the report.
+
+2022-11-16
+
+ * om.tmac (PAPER): Adjust #R_MARGIN to work with papersize.tmac.
+
+2022-10-23 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * om.tmac (FORCE_RECTO): Use backslash before newline when
+ starting multi-line conditional block.
+
+2022-09-02
+
+ * examples/mom-pdf.mom: Fixes missing parameter to \*[SIZE] at
+ line 457.
+
+ * om.tmac: Fixes CODE <anything> not restoring point size
+ correctly. The point size was being stored in a number register
+ instead of a string.
+
+ * BUGS: Updated.
+
+ Fixes <https://savannah.gnu.org/bugs/?62996>.
+
+2022-08-29 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * mom.am (MOMPDFMOM): Pass `PDFMOMBIN` '-K utf8', not '-k', in
+ case 'configure' didn't find uchardet.
+
+ Fixes <https://savannah.gnu.org/bugs/?62975>. Thanks to Bjarni
+ Ingi Gislason for the report.
+
+2022-05-31
+
+ * Make mom emit a warning and abort when tbl(1) data present
+ without a corresponding -t on the command line.
+
+2022-05-20 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * momdoc/appendices.html: Reflect file rename in groff
+ distribution: the name of the file mapping Adobe Glyph List
+ names to groff special character identifiers for text (as
+ opposed to "special") fonts has changed from "textmap" to
+ "text.map".
+
+2022-05-20 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * mom.am (MOMPROCESSEDEXAMPLEFILES): Include "typesetting.pdf"
+ only if `HAVE_URW_FONTS`, since the document demands them.
+
+2022-05-20 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * mom.am: Rename `BUILD_PDFDOC` to `USE_GROPDF`.
+
+2022-05-01 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * mom.am ($(MOMPROCESSEDEXAMPLEFILES)): Depend on new name for
+ devpdf stamp file.
+
+2022-04-12 Ingo Schwarze <schwarze@openbsd.org>
+
+ Delete the harmful, ill-designed, buggy, and essentially
+ unmaintained and untested --with-doc option of the configure
+ script. See the NEWS file for more details on the rationale.
+
+ * mom.am: Delete one INSTALL_SHIPPED_HTML and one BUILD_EXAMPLES
+ conditional and use BUILD_PDFDOC instead of BUILD_PDFEXAMPLES.
+
+2021-03-29 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * mom.am: Eliminate `MOM_TFLAG` and `MOM_PFLAG` Make macros;
+ they were expanded in only one place.
+ (MOMPDFMOM): Track rename of Make macro `TFLAG` to `MFLAG`.
+
+2022-03-26 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * mom.am (MOMPROCESSEDEXAMPLEFILES): Drop dependency on gnu.eps.
+ No mom document appears to require this file; it came in with
+ the initial Automake file for mom in commit 4d84d0f1d, 27
+ January 2015, and may have been a copy-and-paste error.
+
+2021-10-21 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * mom.am (mom_test_template): Pull file name into a new
+ variable.
+ (EXTRA_DIST, contrib/mom/examples/tests-mom.sh): Use it.
+ (contrib/mom/examples/tests-mom.sh): Build more quietly;
+ prefix rule with `$(AM_V_GEN)`. Also run `chmod` conditionally.
+
+2021-10-04
+
+ * version 2.5 release (see NEWS)
+
+ * removed orphaned stubs for abandoned cutaround feature from
+ om.tmac
+
+2019-12-26
+
+ * added PREFIX_CHAPTER argument to HEADING_STYLE
+
+ * added TOC_HEADING; single line, non-pagenumbered insertions into
+ the TOC
+
+2019-11-03
+
+ * templates added for setting up copyright pages
+
+ * updated mom.am to include the templates when building
+ pdfs in mom/examples
+
+2018-11-24
+
+ * version 2.4 release (see NEWS)
+
+2018-09-05
+
+ * improved grap support
+
+2018-03-04
+
+ * version 2.3 release (see NEWS)
+
+2018-02-28 Werner LEMBERG <wl@gnu.org>
+
+ * mom.am (.mom.pdf): Use $(GROFF_V).
+
+2017-11-04 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * mom.am: Drop unnecessary -M flag; build tree has what it needs.
+
+2017-10-29 Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
+
+ * om.tmac-u: Fix typo in register reference.
+
+ Fix bug https://savannah.gnu.org/bugs/?51608.
+
+2015-08-22 Bernd Warken <groff-bernd.warken-72@web.de>
+
+ * groff_mom.7.man: Rename `groff_mom.man'.
+
+ * mom.am: Include renaming.
+
+2015-08-05 Bernd Warken <groff-bernd.warken-72@web.de>
+
+ * mom.am: Add `Last update'. Setup Emacs mode.
+
+* Sun Jul 26 2015
+
+ o Fix to header part-by-part changes.
+
+* Mon Apr 27 2015
+
+ o version 2.1-a release (see NEWS)
+
+* Fri Apr 4 2015
+
+ o groff_mom.man: Make it work in compatibility mode.
+
+* Sat Feb 28 2015
+
+ o Added an ADJUST argument to QUOTE and BLOCKQUOTE to facilitate
+ optical centering tweaks
+
+* Sat Feb 21 2015
+
+ o Expanded scope of _STYLE macros to headers/footers and
+ page numbers
+
+* Thu Feb 5 2015
+
+ o Version 2.1 release (see NEWS)
+
+ o overhaul of control macro handling
+
+ o overhaul of cover and docheader management
+
+ o general code cleanup to remove redundancies and reduce size of
+ om.tmac
+
+ o changes to example files to demonstrate new features
+
+ o copyrights updated in all files
+
+* Tue Jan 14 2015
+
+ o Added a new example in French, mon_premier_doc.mom
+
+ o Added README-fr.txt, a translation in French of the README.txt file
+
+ o Makefile.sub: generation of mon_premier_doc.mom, installation of
+ README-fr.txt
+
+* Sun Nov 30 2014
+
+ o Added auto underscoring, caps, and color to TOC header
+ (first-page titles)
+
+ o Added vertical page positioning control macros for TOC and
+ ENDNOTES headers (first-page titles)
+
+* Tue Nov 25 2014
+
+ o Tweak so collated, non-chapter docs with the same author
+ don't require .AUTHOR "" to skip printing author in docheader
+
+* Wed Oct 29 2014
+
+ o Makefile.sub: KFLAG to run pdfmom with -k
+
+ o Set utf-8 preconv coding tag in examples/typesetting.mom and
+ examples/letter.mom
+
+* Mon Oct 20 2014
+
+ o Changes to caption/label/source quadding strategy.
+
+* Wed Sep 03 2014 Bernd Warken <groff-bernd.warken-72@web.de>
+
+ o all files in contrib/mom source: Copying and Emacs setting.
+
+ o contrib/mom source/ChangeLog: Repair file. The file runs now in
+ Emacs change-log mode.
+
+* Tue Aug 12 2014
+
+ o Makefile.sub (stamp-strip): Set LANG=C LC_ALL=C when calling
+ `sed'.
+
+ This prevents a build error on OS X.
+
+* Thu Apr 3 2014
+
+ o Makefile.sub: Set LC_ALL=C when calling $(PDFMOM).
+
+ Doing so in an UTF-8 locale with $PERL5OPT=-C set avoids warnings
+ like
+
+ utf8 "\xF5" does not map to Unicode at\
+ [.]src/devices/gropdf/gropdf line 1359, <PD> line 63.
+ Malformed UTF-8 character (unexpected end of string)\
+ in substitution (s///) at\
+ [.]src/devices/gropdf/gropdf line 1315, <PD> line 63.
+
+* Sat Mar 29 2014
+
+ o Makefile.sub: Handle examples separately, controlled by
+ $(make{_,_install_,_uninstall_}examples).
+
+* Wed Mar 26 2014
+
+ o Added user settable space to PARA_SPACE.
+
+* Tue Mar 11 2014
+
+ o Makefile.sub (MAN7): Do not install empty `mom.7' (tiny change).
+
+ A mom(7) manual got briefly added, then promptly removed again in
+ 9f38f05e58d31eda1affce01d1144760b5f48096 for integration into
+ groff_mom(7), but it was forgotten to remove it from the list of
+ manual pages to install.
+
+* Fri Feb 28 2014
+
+ o Reworked handling of pdf-images. Preprocessor support expanded
+ to include eqn and pic. Spacing and placement of tbl output
+ improved. Fixed floats in columns. Added facilities for captions
+ and labels for pdf-image, eqn, pic, and tbl. Added auto-generated
+ "Lists of".
+
+* Wed Oct 30 2013
+
+ o Expanded and improved float/tbl handling.
+
+* Sat Sep 14 2013
+
+ o .TS/.TE extended to support multi-page tables with headers.
+
+* Sat Aug 24 2013
+
+ o Restored reserved.html to toc.html in docs.
+
+* Tue Aug 20 2013
+
+ o Integrate mom.7 into the man-page groff_mom.7
+
+* Tue Aug 20 2013
+
+ o New man page mom.7
+
+* Sun Aug 11 2013
+
+ o Updated documentation concerning refer usage
+
+ o Replaced REF_STYLE and REF<bracket-style> macros with warnings.
+
+* Wed Jun 19 2013
+
+ o groff_mom.man: Fix inappropriate use of .UR/.UE.
+
+* Fri Jan 4 2012
+
+ o Makefile.sub (install_data): Create directory for PDF
+ documentation. This is necesssary in case GhostScript is not
+ available, and no other PDF files have been created yet.
+
+* Sun Dec 30 2012
+
+ o Makefile.sub (install_data): Fix symlink.
+ Patch from Elias Pipping <pipping@lavabit.com>.
+
+* Thu Sep 20 2012
+
+ o Simplify environment handling.
+
+* Fri Aug 31 2012
+
+ o Version 2.0 release. Changes documented in version-2.html in
+ the html documentation.
+
+ o Added new documentation, Producing PDFs with groff and mom.
+
+* Sat Feb 18 2012
+
+ o Added choice to have DOCTYPE NAMED <name> underscored or not
+ when PRINTSTYLE TYPEWRITE
+
+ o Doc fix to DOCTYPE NAMED underlining entry
+
+* Thu Sep 8 2011
+
+ o Added register #SUBHEAD, analogous to #HEAD, to fix excessive
+ spacing between SUBHEADs and SUBSUBHEADs.
+
+* Sun Feb 20 2011
+
+ o Added support for sub-subheads from patch supplied by Petr Man.
+
+* Fri Feb 11 2011
+
+ o Moved register #UNADJUSTED_DOC_LEAD to top of TRAPS macro.
+
+* Fri Nov 19 2010
+
+ o Added utility macro, SINGE_SPACE, for PRINTSTYLE TYPEWRITE
+
+* Sat Jan 22 2011
+
+ o groff_mom.man (FILES): Fix directory locations.
+
+* Sun Oct 3 2010
+
+ o Complete overhaul of refer macros and documentation
+
+ o Inclusion of Tadziu Hoffman's postscript code for underlining
+
+* Wed Aug 18 2010
+
+ o Complete overhaul of documentation
+
+* Thu Aug 5 2010
+
+ o Changes to COVER and DOCCOVER for greater flexibility in
+ placement of elements
+
+ o Improved handling of MISC info on cover pages for greater style
+ flexibility
+
+ o Added _FAMILY, _FONT, _SIZE and _COLOR control macros for CODE
+
+* Mon July 6 2009
+
+ o Added CLOSING_INDENT and SIGNATURE_SPACE to DOCTYPE LETTER
+ macros.
+
+* Sun Jun 14 2009
+
+ o DROPCAP handling changed; uses local vertical motions now
+ instead of .mk/.rt.
+
+ o Added macro SUPERSCRIPT_RAISE_AMOUNT
+
+ o Added registers and strings to keep track of .RW and .EW and the
+ amounts passed to them.
+
+* Sat May 2 2009
+
+ o Fixed error in docs: COVERS_COUNT_PAGES changed to
+ COVER_COUNTS_PAGES. Ditto DOC_COVERS_COUNT_PAGES.
+
+* Fri May 1 2009
+
+ o Fixed PARAHEAD size so it properly adds the value of
+ \*[$PH_SIZE_CHANGE] to \n[#DOC_LEAD].
+
+* Sat Jan 17 2009
+
+ o Changed FAMILY, FT and PT_SIZE requests in DO_COVER to groff
+ primitives (fam, ft and ps respectively). Fixes (DOC_)COVER bug
+ where (DOC_)COVER was resetting families and fonts of various
+ document elements (QUOTE, BLOCKQUOTE, etc) to document default.
+
+ o Removed (excessive) cleanup of (doc)cover and docheader strings
+ and registers from macro CLEANUP. Changes to mom's default style
+ for these document elements now survive COLLATE.
+
+* Fri Jan 2 2009
+
+ o Added possibility of quadding docheader left or right, as well
+ as center, which remains the default.
+
+* Wed Dec 31 2008
+
+ o Default definition of $QUOTE0 and $QUOTE1 in om.tmac changed
+ from \[dq] to \[lq] and \[rq], respectively.
+
+* Sun Jan 4 2009
+
+ o Makefile.sub (CLEANADD): Add om.tmac-s.
+
+* Tue Dec 30 2008
+
+ o Doc fixes in toc.html
+
+ o Control of null pagenumbering of covers passed to \n%; formerly
+ handled by \n[#PAGE_NUM_ADJ]
+
+* Tue Dec 23 2008
+
+ o Added a CAPS option to HDRFTR_RECTO and HDRFTR_VERSO to allow
+ capitalization of reserved strings when designing recto and/or
+ verso headers. Fixed docs accordingly.
+
+* Sun Nov 30 2008
+
+ o Added .nr #DIVER_DEPTH 0 to end of PRINT_PAGE_NUMBER to ensure
+ that #DIVER_DEPTH=0
+
+ o Moved string definition of $FONT in macro FT to top of macro.
+
+ o Moved string definition of $FAMILY in macro FAMILY to top of
+ macro.
+
+ o Changed condition generating #NO_BREAK at top of macro COLLATE
+ from .if ( \\n[.t] < \\n[.v] ) \{ .nr #NO_BREAK 1 \} to .if (
+ (\\n[.t]-1) <= \\n[.v] ) \{ .nr #NO_BREAK 1 \}
+
+ (Bottom-of-page trap is tripped 1 unit below last valid baseline)
+ (not on it.)
+
+* Tue Nov 25 2008
+
+ o Commented out what appears to be a superfluous and destructive
+ resetting of #VARIABLE_FOOTER_POSITION at line 13347 in FOOTNOTE
+ macro. For now, fixes the "vanishing first footnote with some
+ overflow" bug.
+
+* Mon Oct 6 2008
+
+ o Added a bit to .PP to accommodate .PP_FONT I when PRINTSTYLE is
+ TYPEWRITE and ITALIC_MEANS_ITALIC
+
+* Mon Jun 30 2008
+
+ o Removed spurious 'sp |\\n[MN-curr-pos]u from MNbottom-right,
+ prior to re-invoking traps. Hopefully, fixes vanishing RH margin
+ notes bug.
+
+* Sun Mar 16 2008
+
+ o Added missing spaced paras bit in blockquotes.
+
+* Tue Jan 22 2008
+
+ o Fixed indent handling of refer items in endnotes.
+
+ o Amendations to refer.html.
+
+ o Removed dead email address from groff_mom.man.
+
+* Fri Jan 04 2008
+
+ o groff_mom.man: Replace .URL with .UR/.UE. Replace .MTO with
+ .MT/.ME. Insert `\:' in URLs where appropriate. Don't include
+ www.tmac.
+
+* Wed Sep 12 2007
+
+ o Fixed an oversight in DROPCAP that meant when DROPCAP needed to
+ be ignored, the dropcap letter itself was dropped from running
+ text altogether, instead of printing as a normal part of text.
+
+ o Added an .if n clause to DROPCAP to prevent mom from going into
+ an infinite loop when groff invoked with the -Tascii switch.
+
+* Wed Jul 25 2007
+
+ o Did a couple of doc fixes.
+
+ o Added vpt checks at the top of all the graphical object macros.
+ Basically, only turn vpt's off and on again if they're already
+ enabled.
+
+* Wed Feb 14 2007
+
+ o Moved .ne requests in HEAD and SUBHEAD to top of respective
+ macros, fixing bug that was gathering the wrong page number for
+ head and subhead toc entries.
+
+* Fri Nov 24 2006
+
+ o Added a default linebreak color (black)
+
+* Thu Sep 28 2006
+
+ o Fixed missing #'s in linknames in macrolist.html.
+
+* Mon Jul 31 2006
+
+ o Changed all .LLs in LIST to .ll requests.
+
+ o Added new macro, FINIS_STRING_CAPS, to control capitalization of
+ the finis string.
+
+ o Amended doc section on page set up to include directions for
+ telling groff about the physical dimensions of printer sheets.
+
+ o Added new arg to BLANKPAGE: NULL. If given, BLANKPAGE does not
+ increment the page number when outputting a blank page.
+
+ o Added new control macros, COVERS_COUNT_PAGES and
+ DOC_COVERS_COUNT_PAGES in case user wants covers counted in the
+ pagination scheme.
+
+ o Added new final arg to COVER and DOC_COVER: BLANKPAGE.
+ Instructs COVER or DOC_COVER to print a blank page after the
+ cover.
+
+ o Added new optional args to CODE: BR, BREAK, SPREAD. CODE can
+ now be called inline; if called as a macro and the user wants a
+ break or spread, s/he has to supply one of the args.
+
+ o Added new macro, CODE_FAMILY, to set fixed-width family used by
+ .CODE
+
+ o Made EDITOR an alias of AUTHOR
+
+ o Added optional arguments, COVER or DOC_COVER, to reference
+ macros that may be used on covers and doc covers, allowing users
+ greater flexibility in determining exactly what goes on covers and
+ doc covers without screwing up the doc header or the default page
+ headers/footers
+
+ o Added macros to control the weight and placement of all
+ underscore/underline rules used in typesetting and document
+ processing
+
+ o Added macros for drawing of rules, boxes and circles (ellipses)
+
+ o Added macro, RULE_WEIGHT, to control weight of rules drawn with
+ \*[RULE]
+
+ o General doc updates, additions, amendations and corrections
+
+ o Reformatted entirety of documentation to be xhtml clean
+
+ o Added inlines \*[UC] and \*[LC] to handle inline caps; corrected
+ doc entry stating that you can use \*[CAPS] and \*[CAPS OFF];
+ chief reason is to allow inline capitalization in strings passed
+ to header/footer definitions.
+
+* Fri Jul 7 2006
+
+ o Changed inline, \*[RULE], so that it always draws the rule one
+ linespace beneath the last output line. Formerly, \*[RULE] drew
+ the rule on the baseline of the current output line.
+
+* Sun Jul 2 2006
+
+ o Changed UNDERSCORE and UNDERSCORE2 to use groff's \D'l <n> <n>'
+ line drawing function.
+
+ o Changed RULE to use groff's \D'l <n> <n>' line drawing function.
+
+ o Added RULE_WEIGHT macro, to allow controlling weight of
+ \*[RULE], expressed in points (including fractional points).
+
+ o Added two new inlines, \*[UC] (all caps) and \*[LC]
+ (caps/lowercase). These can be used in user-defined header/footer
+ strings (if \E is used instead of just the backslash by itself) as
+ well as in normal copy.
+
+* Sat Jul 1 2006
+
+ o Added .FAMILY \\*[$DOC_FAMILY] and .FT R to the end of
+ .DEFAULT_DOCHEADER, .CHAPTER_DOCHEADER and .NAMED_DOCHEADER.
+ Fixes bug that was causing type which was set after .START when no
+ docelement tag given to be set in the last family and font used in
+ the docheader, instead of the expected $DOC_FAMILY and roman font
+ (R).
+
+* Fri Jun 30 2006
+
+ o Updated copyright file
+
+ o Massive documentation cleanup to make docs well-formed xhtml
+
+* Thu Jun 22 2006
+
+ o Rewrote portions of TITLE, COVERTITLE, DOCCOVERTITLE,
+ CHAPTER_TITLE, SUBTITLE and MISC so that when they're called from
+ .COLLATE, they properly clean out all associated strings and
+ registers. Fixes the "vanishing $TITLE" bug.
+
+ o Added missing .rm $AUTHORS to .AUTHOR. .as $AUTHORS now always
+ starts with a clean slate.
+
+* Wed Jun 14 2006
+
+ o Added a missing </nobr> tag to docelement.html.
+
+* Sat Jun 10 2006
+
+ o In header and footer routines, changed all .FAMILY calls when
+ .PRINTSTYLE TYPESET to .fam
+
+ o Fixed DOC_FAMILY so that PARAHEAD_FAMILY and LINENUMBER_FAMILY
+ are properly set to the new value.
+
+* Fri Jun 9 2006
+
+ o Re-worked .QUOTE_INDENT so that users can pass it an absolute
+ value (by adding a scaling indicator to the arg) instead of just a
+ value relative to the paragraph indent. Fixes bug (oversight?)
+ that meant QUOTES and BLOCKQUOTES got no indent at all if the
+ PP_INDENT was 0. Fixed EPIGRAPH_INDENT similarly.
+
+ o Added missing default ENDNOTE_LINENUMBER_FAMILY and _FONT to
+ DEFAULTS.
+
+* Thu Jun 8 2006
+
+ o Changed distance of the underscores used in docheaders when
+ PRINTSTYLE is TYPEWRITE from the default 2p to 4p. This is to
+ leave room for the descenders if the strings are caps/lowercase.
+
+* Wed Jun 7 2006
+
+ o Added strings $AUTHOR and $AUTHORS. $AUTHOR = $AUTHOR_1 (i.e.
+ the first arg passed to .AUTHOR); $AUTHORS = a comma-separated
+ concatenated string of all the args passed to .AUTHOR.
+
+* Tue Jun 6 2006
+
+ o Updated docs.
+
+ o Converted all .ig blocks in om.tmac to comment lines beginning
+ with \#. This so that the comments will be stripped from om.tmac
+ during make. The groff sources still contain the commented
+ version of om.tmac, as do the tarballs posted on mom's homepage.
+
+ o Added new macro, HEADERS_AND_FOOTERS, to allow having both
+ headers and footers on a page.
+
+ o Fixed whitespace around epigraphs after .DOCTYPE CHAPTER
+ docheaders.
+
+ o Added test in .PP_FONT for existence of $SAVED_PP_FT; if it's
+ there, remove it (fixes bug that was causing .PP to ignore
+ .PP_FONT after .COLLATE). Also fixed .PP so that it properly
+ passes $PP_FT to .FT if $PP_FT has been re-defined to
+ $SAVED_PP_FT.
+
+* Sun Jun 4 2006
+
+ o Added a note about colorizing underscored text in the docs.
+
+* Wed May 24 2006
+
+ o Adjusted the .ne value for heads and subheads (again)
+
+* Sun May 21 2006
+
+ o In the documentation, removed the section stating that setting
+ the family, font, pointsize and colour of line numbers wasn't
+ possible.
+
+ o Updated documentation entry for TOCs to include instructions for
+ using psselect.
+
+* Sat May 20 2006
+
+ o Added string $PRE_CODE_FAM to CODE; fixes bug that kept CODE OFF
+ from restoring the previous family_font combo
+
+ o Added a test for existence of register #DEPTH to .ITEM; if it
+ doesn't exist, ignore ITEM
+
+* Fri May 19 2006
+
+ o Updated docs
+
+ o Added macro, CODE
+
+ o DOCTITLE, TITLE, CHAPTER_TITLE, SUBTITLE, COVERTITLE and
+ DOC_COVERTITLE now accept multiple arguments; each is printed on a
+ separate line in docheaders and on cover pages. Where the macros
+ also supply reference information to page headers, endnotes and
+ tables of contents, the args are concatenated.
+
+* Thu May 18 2006
+
+ o Changed default DOCHEADER_LEAD to +0 when there's both the
+ chapter number and a chapter title in DOCTYPE CHAPTER.
+ Compensated by adding 1/4 of the leading in effect for docheaders
+ between them. Applies equally similar situations on covers and
+ doc covers.
+
+* Mon May 15 2006
+
+ o Added missing default ENDNOTES_ALLOWS_HEADERS to DEFAULTS.
+
+ o Added missing temporary change of the pad marker from # to ^ to
+ the toc title collection routine of .ENDNOTES.
+
+ o Added string $SAVED_PP_FT to start of .COLLATE; string is tested
+ for in .PP
+
+ o Improved testing for $FONT and $PP_FT in DEFAULTS
+
+ o Trivial changes to docheader spacing for doctypes DEFAULT and
+ NAMED when PRINTSTYLE is TYPEWRITE.
+
+* Sun May 14 2006
+
+ o Call to .ne in HEAD moved higher in macro, and .ne's reduced
+ each by 1.
+
+ o Handling of "how much space is needed for subheads + 1 line of
+ text" in SUBHEAD changed to a simple .ne. Fixes bug that was
+ causing overprinting of columns when s/h was deferred to next
+ page/column.
+
+ o In macro, PRINT_HDRFTR, removed .EOL from clause .if
+ \\n[#HDRFTR_COLOR]=1
+
+* Sat May 13 2006
+
+ o Fixed broken link to DOCTITLE in docs.
+
+* Wed Apr 26 2006
+
+ o Corrected doc entry that stated TOC control macros can be
+ entered anywhere in a file prior to invoking TOC (TOC control
+ macros must come before START).
+
+ o Removed spurious .nop from .ie \\n[#PRE_COLLATE]=1 clause in
+ FAMILY (fixes bug that was causing page numbers on pages before
+ COLLATE or TOC to be printed too low).
+
+ o Added a test at top of COLLATE to set register #NO_BREAK to 1 if
+ the distance to the next trap is less than one linespace; used in
+ NEWPAGE to determine whether to do a 'br or .br. (fixes BUG that
+ was causing COLLATE, NEWPAGE, and TOC to spit out a blank page
+ when the last line of text before them happened to fall on the
+ last valid baseline of the page).
+
+ o Changed pad marker used to format TOC entries to permit use of
+ the pound/number sign (#) in head elements.
+
+ o New macro, PREFIX_CHAPTER_NUMBER, to allow users to prepend
+ chapter numbers to the numbering scheme used in head element
+ numbering.
+
+ o Added missing periods at the ends of head, subhead, parahead
+ numbers.
+
+ o CHAPTER, with a numeric argument, can now be used to identify
+ any document as a "chapter" for the purposes of prefixing the
+ argument to CHAPTER to the numbering scheme of head elements.
+
+ o Fixed alignment of TOC entries.
+
+ o Removed .rr #DOC_HEADER and replaced with
+
+ .if \\n[#DOC_HEADER]=1 \{ .nr #DOC_HEADER 2 \}
+
+ near the end of START. I.e., #DOC_HEADER becomes "2" if
+ docheaders were on in the previous document. COLLATE tests for 2
+ in order to reset #DOC_HEADER to 1 for use in the user-invoked
+ START that comes after a COLLATE.
+
+ o Added register, #CHAPTER_CALLED, to CHAPTER; tested for in
+ PREFIX_CHAPTER_NUMBER to determine whether the argument to CHAPTER
+ can be used to establish a chapter number for chapter number
+ prefixes in head element numbering.
+
+* Mon Apr 17 2006
+
+ o Fixed bug that was causing shifted lists, when returned to, to
+ revert to the left margin instead of observing the correct
+ indent+shift for the list.
+
+ o Added a check in LIST so that if user invokes LIST with RETURN,
+ mom doesn't get confused by the initial `R' (which she was using
+ to check if the arg to LIST was ROMAN or roman).
+
+ o Replaced an incorrectly copied code block in SUBHEAD that was
+ preventing SUBHEAD from processing subheads properly when
+ PARA_SPACE was on.
+
+* Wed Mar 15 2006
+
+ o Added a .SHIM after .sp \\n[#DC_LINES]v in .DROPCAP. Fixes
+ problem of dropcaps in initial paragraphs after COLLATE being set
+ slightly too high.
+
+ o Added .rr #DOC_LEAD_ADJUST_OFF to .ie clause of DOC_LEAD_ADJUST
+ and removed .rr #DOC_LEAD_ADJUST_OFF from DEFAULTS (after TRAPS)
+ so that document leading adjustment (or lack thereof) is
+ maintained from doc to doc when COLLATE is being used.
+
+ o Added new register, #PRE_COLLATE. The .FAMILY macro is called
+ several times during initial COLLATE processing, and contained a
+ stanza that allowed FAMILY, after a collate, to invoke DOC_FAMILY
+ if #COLLATE=1. This allowed users to use FAMILY after a COLLATE
+ but before START in a way consistent with the behaviour described
+ in the docs (namely, FAMILY before START sets the DOC_FAMILY).
+ Since that functionality is still needed, #PRE_COLLATE instructs
+ FAMILY not to reset DOC_FAMILY until COLLATE is complete (i.e.
+ after the break to a new page). #PRE_COLLATE, if set to 1, is
+ removed at the end of HEADER.
+
+* Thu, Mar 2 2006
+
+ o Added control macros for linenumbering family, font, point size
+ and color
+
+ o Added a NO_SHIM macro
+
+* Sun Feb 26 2006
+
+ o Changed .PRINT "\h'\\n[#LIST_INDENT\\n[#DEPTH]]u' in the "ROMAN
+ I, padded" and "roman i, padded" clauses of ITEM to .PRINT
+ "\h'\\n[#HL_INDENT\\n[#DEPTH]]u' to fix bug associated with using
+ both PAD_LIST_DIGITS LEFT and SHIFT_LIST.
+
+* Fri Feb 24 2006
+
+ o Removed superfluous "if" from FONT, line 492
+
+ o Removed #ADD_BREAK register from FOOTNOTE and ENDNOTE, along
+ with the routines it invoked
+
+ o Added an optional argument, BREAK, to FOOTNOTE OFF and ENDNOTE
+ OFF, for correct and flexible handling of punctuation and
+ continued lines when FOOTNOTE or ENDNOTE are called while nofill
+ mode is active.
+
+ o Created an alias for .so, INCLUDE.
+
+* Thu Feb 2 2006
+
+ o Small fix to handling of underlining of italic text spanning
+ pages in PRINTSTYLE TYPEWRITE.
+
+* Thu Jan 12 2006
+
+ o Reworked changing and setting of traps associated with
+ outputting left and right margin notes. See BUGS.
+
+* Sat Jan 7 2006
+
+ o Bracketed outputting of margin notes diversions with .nf/.fi.
+
+* Fri Jan 6 2006
+
+ o Corrected docs MN_INIT so that the optional first arg is
+ properly given as RAGGED | SYMMETRIC
+
+ o Fixed MN_INIT macro routine that reads MN_INIT args into strings
+ so that the strings are first "initialized" with the @ character
+ if the corresponding arg is blank. Since MN-init tests for \A and
+ \B (correctly, I hope) for each of its args, the @ character
+ should be safe.
+
+* Tue May 16 2005
+
+ o momdoc/appendices.html: Add space in shebang, conforming to
+ portability recommendation in autoconf docs.
+
+* Thu May 12 2005
+
+ o Added margin notes capability
+
+ o Added mom-specific refer support; refer calls can be embedded in
+ running text, sent to footnotes or endnotes, or collected for
+ output on a bibliography page; also added mom-specific refer
+ control macros
+
+ o Added bibliography page capability, with full suite of control
+ macros
+
+ o Added referencing of footnotes and endnotes by line number
+
+ o Added capability to have footnotes run on when footnotes are
+ being referenced by line number
+
+ o Added a post footnote space option, in case users want a little
+ space between their footnotes
+
+ o Added ENDNOTE_MARKER_STYLE, so user can choose between endnotes
+ identified by a numerical marker in the text, or by line number
+
+ o Added control macros to accommodate differing needs for endnotes
+ identified by line number
+
+ o Added ENDNOTE_TITLE_SPACE, so user can control starting position
+ of the endnotes page title
+
+ o Extended LIST so that it accepts lowercase alpha, uppercase
+ roman numeral and lowercase roman numeral enumerators; also added
+ a "prefix" argument (which comes *after* the separator argument)
+
+ o Changed RESET_LIST so that it can reset a list to any number,
+ letter, or roman numeral, instead of just 1, a, A, I and i
+
+ o Change to handling of footnote/endnote markers in text; input
+ lines before FOOTNOTE still require \c, but input line after
+ FOOTNOTE OFF must be entered as a literal continuation of the line
+ before FOOTNOTE, including any required word space or punctuation
+ (this so users can get the footnote marker in text either before
+ or after the punctuation without hassle)
+
+ o Added QUOTE_AUTOLEAD and BLOCKQUOTE_AUTOLEAD, so user can have
+ quotes and blockquotes leaded differently from running text
+
+ o Reworked QUOTE and BLOCKQUOTE to accommodate _AUTOLEAD control;
+ spacing above and below quotes is equalized *on a per quote basis*
+ (not completely happy with this, but at least it gives users some
+ flexibility in designing (block)quotes)
+
+* Fri Mar 18 2005
+
+ o Added mom.vim to /examples
+
+* Thu Jan 20 2005
+
+ o Added \*[TB+] and \*[B] to give inline functionality of .TN and
+ .EL, respectively.
+
+ o Added SECTION and SECTION_CHAR as aliases of LINEBREAK and
+ LINEBREAK_CHAR
+
+ o Added a NOBREAK option to PAD, so when PAD is called, it's
+ possible to instruct mom not to advance on the page.
+
+* Wed Jan 19 2005
+
+ o New macro, ADD_SPACE, so that extra space can be added at the
+ top of a new page in document processing; the .ns call in HEADER
+ was making additional space impossible
+
+ o Reworked handling of ALD/SPACE/SP and LS when they're used at
+ the tops of pages during pure (i.e. non-docprocessing)
+ typesetting. First lines were still wandering. Should also be
+ more intuitive: ALD after LS advances the specified distance from
+ the top baseline; LS after ALD doesn't change the position of the
+ first baseline (i.e. merely sets the lead for the text that
+ follows).
+
+* Tue Dec 14 2004
+
+ o Fixed a small problem with spacing under quotes when paragraph
+ spacing is turned on.
+
+* Fri Dec 10 2004
+
+ o Put all calls in VFP_CHECK inside their own environment.
+ Without the .ev call, the trap invoked VFP_CHECK was chopping off
+ the first word of the last line before footnotes.
+
+* Dec 6 2004
+
+ o Small fixes to elvis_syntax.new (dealing with strings, \{\ and
+ \}
+
+ o Changed
+ .ie \\n[#START] \{\
+ .if \\n[#DOC_HEADER]=0 \{ . \}
+ .\}
+ in HEAD to
+ .ie \\n[#START] \{\
+ .if \\n[#DOC_HEADER]=0 \{ .RLD 1v \}
+ .\}
+ so that HEADs at the start of docs with no docheaders falls on
+ the correct baseline.
+
+* Dec 3 2004
+
+ o Removed spurious parens from if ( \\n[#TRAP_DISTANCE] <
+ \\n[#DOC_LEAD]*2 ) in SUBHEAD.
+
+* Oct 14 2004
+
+ o Reworked the LL macro so that the argument can take a prepended
+ + or - sign (i.e. the argument is relative to the current line
+ length).
+
+* Oct 13 2004
+
+ o Added an .if \\n(.n=0 if to the ie clause in LS that controls
+ how mom responds to initial LS invocation at page top if T_MARGIN
+ has been set. Now, if there's text on the "top" baseline, LS
+ behaves as expected when invoked afterwards.
+
+* Oct 11 2004
+
+ o Added an ie !r#DOCS clause to the processing of "top baseline"
+ ALDs. ALD is used extensively (internally) in the document
+ processing macros, and does not need to check--indeed, should not
+ check--for top baseline placement prior to execution.
+
+* Sep 29 2004
+
+ o Additions to elvis_syntax.new
+
+* Sep 12 2004
+
+ o Small fixes to the documentation.
+
+* Aug 21 2004
+
+ o Removed superfluous second arguments from strings UP, DOWN, FWD
+ and BCK
+
+* Aug 8 2004
+
+ o Version changed from the 1.1.x series to 1.2. All of the
+ features I originally wanted mom to have originally have been
+ implemented, and appear to be stable.
+
+ o Major overhaul to the setting of page traps and the handling of
+ footnotes, both "normal" footnotes and footnotes that occur inside
+ QUOTE, BLOCKQUOTE and EPIGRAPH.
+
+ o Addition of font "styles" to om.tmac, plus changes to the FAMILY
+ and FT macros to manage them. New section in the doc appendices
+ on adding fonts and managing the new font styles.
+
+ o Mom now uses a "fallback font" whenever there's an invalid call
+ to FAMILY.
+
+ o RW and EW now affect only the font in effect. A change of
+ family or font disables them.
+
+ o BR_AT_LINE_KERN now properly does a .brp (spread and break) when
+ used in justified text.
+
+ o NEWPAGE, which used to be an alias for .bp, has been moved into
+ its own macro, in order to make it more responsive to some unusual
+ situations.
+
+ o Some changes to elvis_syn.new, including that the file
+ extensions recognized by elvis now include both .mom and .tmac.
+ This makes om.tmac much easier to read.
+
+* Jul 6 2004
+
+ o FT and FAM(ILY) reworked to take advantage of if S, if F and
+ \n[.sty] additions to groff (1.19.2). Warnings are emitted if a
+ style hasn't been registered, or if a font style doesn't exist in
+ the current family. Invalid .FAM(ILY) calls now use a "fallback"
+ font" (although no warning is issued); fallback is user-settable
+
+ o New macro, FALLBACK_FONT. Not only controls the fallback font
+ for invalid family calls, but also controls whether mom aborts on
+ invalid .FT calls after issuing a warning.
+
+ o RW/EW now affect only the current font (or font style)
+
+ o BR_AT_LINE_KERN now (properly) does a break-and-spread when text
+ is justified.
+
+ o Fairly extensive list of .sty's added to om.tmac. Hopefully,
+ this will make life easier for users wishing to add new fonts
+ and/or entire new families to their groff site-font/devps
+ directory.
+
+* Jun 6 2004
+
+ o Altered kerning slightly for footnote markers in text. Daggers
+ and double-daggers were getting a bit jammed
+
+* Jun 3 2004
+
+ o Rewrote the routines dealing with _FAMILY, _FONT, _SIZE, _COLOR
+ and _QUAD. A single macro for each checks for the calling alias
+ (e.g. TITLE_FAMILY in _FAMILY), and performs the appropriate
+ action.
+
+ o All "COLOUR" aliases of "COLOR", no matter where, have been
+ removed.
+
+ o Added cover and doc cover page generation.
+
+ o Added reference macros COVERTITLE, DOC_COVERTITLE, MISC and
+ COPYRIGHT (for use with covers only)
+
+ o Fixed EL and TN so they don't spring page traps; in nofill modes
+ the preceding input line must be terminated by \c.
+
+ o Added #T_MARGIN_LEAD_ADJ to DO_B_MARGIN, DO_T_MARGIN and NEWPAGE
+ to ensure accurate placement of first lines on new pages when
+ docprocessing is not taking place.
+
+ o Made NEWPAGE it's own macro; formerly just an alias of .bp.
+
+ o Made BREAKQUOTE obsolete; rewrote sections of footnote handling,
+ including adding support macros to deal with processing of
+ footnotes that were started inside quotes, blockquotes and
+ epigraphs.
+
+ o Added a TERMINATE .em to docprocessing (except letters) to
+ ensure that deferred footnotes print on the last page of a doc.
+
+* Mar 15 2004
+
+ o Added color support
+
+ o Adjusted vertical placement of hyphens around page numbering so
+ that they are better centered on the height of the page number.
+
+ o Re-wrote portions of the document processing macros so that tabs
+ behave in a consistent and intuitive manner. Tab structures are
+ now properly preserved from page to page and column to column.
+
+* Mar 05 2004
+
+ o Makefile.sub (GROFF_BIN_PATH): Use SH_SEP.
+
+* Feb 20 2004
+
+ o Rewrote the macros associated with DOCTYPE LETTER so that the
+ user can enter DATE, TO and FROM in any order s/he likes. For
+ backward compatibility, if the older, fixed order (DATE-TO-FROM)
+ is used, the date goes flush right with two linespaces after it,
+ while the other fields go flush left with a single linespace
+ separating them.
+
+ o Fixed handling of DOCHEADER OFF <distance> when <distance> fell
+ short of the top margin of running text (the change is actually in
+ the SHIM macro, which is called by DOCHEADER).
+
+ o Added a selection of iso 639 two-letter language codes as
+ optional arguments to SMARTQUOTES, so that the use can enter
+ her/his language code to get language specific quoting styles
+
+ o Changed the way the strings for \*[ST<n>], \*[ST<n>X], \*[FU<n>]
+ and \*[BU<n>] are read. Formerly, they were entered literally.
+ Now they're entered as an array.
+
+* Jan 24 2004
+
+ o Added lists and associated macros. Mom now does (nested) lists.
+
+ o Added German-style lowered double quotes and two styles of
+ guillemets to SMARTQUOTES.
+
+ o Added macro SIZE, intended to be called inline as \*[SIZE <n>].
+ This is to bring mom's inline size change syntax into line with
+ her other inlines.
+
+ o Added ESC_CHAR as an alias of .ec
+
+ o Added doc entries for lists.
+
+ o Updated SMARTQUOTES entry in docs.
+
+ o Updated reserved words in docs.
+
+ o Fixed a few more typos in docs.
+
+* Mon Dec 29 2003
+
+ o Makefile.sub (GROFF_BIN_PATH): Use $(SEP).
+
+* Tue Oct 21 2003
+
+ o Changed \n[#DRAFT] and \n[#REVISION] to strings \*[$DRAFT] and
+ \*[$REVISION], allowing for the possibility of blank entries that
+ don't mess up headers/footers with zeros if user doesn't want any
+ numbers.
+
+ o Extended handling of draft and revision numbers and strings in
+ headers/footers for increased flexibility. It's possible now to
+ have just about any combo of DRAFT_STRING, DRAFT, REVISION_STRING
+ and REVISION, and have them come out in headers/footers as one
+ intuitively expects/wants.
+
+* Mon Oct 13 2003
+
+ o Finally fix change 2003-08-26, based on ideas from Chuck Silvers
+ <chuq@chuq.com>.
+
+ o Makefile.sub: Use a stamp file in the `examples' directory.
+
+* Sun Aug 31 2003
+
+ o Makefile.sub: Fix last change to make it really work.
+
+* Tue Aug 26 2003-08-26
+
+ o Makefile.sub (prepare_make_examples): Make it work with parallel
+ runs of `make'. Patch from Chuck Silvers <chuq@chuq.com>.
+
+* Fri Jul 25 2003
+
+ o Added a .bp after .if \\n[#START]=1 in FOOTER. Without it, in
+ document processing mode, documents that use *none* of the
+ docprocessing tags (yes, there are times when users want to do
+ this) ignored the footer trap.
+
+* Fri Jun 6 2003
+
+ o Changed register #DOCHEADER_LEAD_ADJ to string
+ $DOCHEADER_LEAD_ADJ. This means that .DOCHEADER_LEAD no longer
+ requires a unit of measure; points is assumed.
+
+* Tue Jun 3 2003
+
+ o Added SHIM macro, which, when invoked, calculates and moves to
+ the next "valid" baseline in document processing.
+
+ o Corrected handling of DOCHEADER OFF <distance> so that the first
+ line of running text falls on a "valid" baseline when <distance>
+ is given.
+
+* Wed May 21 2003
+
+ o DOC_TITLE changed to be used exclusively with DOCTYPE DEFAULT
+
+ o Fixed problem with restoration of previous doc pagenum style
+ when endnotes use a different pagenum style (set with
+ ENDNOTES_PAGENUM_STYLE)
+
+ o Fixed handling of headers/footers with respect to endnotes.
+ Now, when either headers or footers are on, mom picks up the
+ correct page header/footer on the last page prior to ENDNOTES,
+ gets the pageheaders correct for endnotes pages *including the
+ last one*, and picks up correct page headers/footers for the
+ subsequent docs after COLLATE
+
+* Sat May 17 2003
+
+ o Added TOC (finally) and a nearly complete set of associated
+ control macros
+
+ o Added new control macros to endnotes:
+
+ ENDNOTES_STRING_CAPS - capitalize the endnotes string
+ ENDNOTES_NO_COLUMNS - allows docs in columns and endnotes not
+ ENDNOTES_PAGENUM_STYLE - set page numbering style for endnotes
+ ENDNOTES_FIRST_PAGENUMBER - set first pagenumber for endnotes
+ ENDNOTES_ALLOWS_HEADERS - page headers on endnotes pages off or on
+ ENDNOTES_NO_FIRST_PAGENUM - allows non-printing first page number
+ when page footers are being used instead of headers
+ ENDNOTES_SINGLE_SPACE - for TYPEWRITE, if doc double-spaced
+ SUSPEND/RESTORE_PAGINATION - turns page numbering off for endnotes
+
+ o Added an ADJUST option to ENDNOTE_LEAD
+
+ o Added DOC_TITLE (like TITLE, but sets document-wide title for
+ collated docs)
+
+ o Added HDRFTR_CENTER_PAD, to allow adjustments to placement of
+ HDRFTR_CENTER_STRING
+
+ o Added BLANKPAGE macro, to output blank pages (silently numbered)
+
+ o Extensive changes to DEFAULTS, START, COLLATE, HEAD, SUBHEAD and
+ PARAHEAD because of new TOC and extended flexibility of ENDNOTES
+ page design
+
+ o Fixed DOCHEADER OFF (distance), FINIS
+
+* Sat Apr 05 2003
+
+ o Makefile.sub (GROFFBIN): New variable for groff binary path.
+ (groff_bin_path): Rename to GROFF_BIN_PATH.
+ (GROFF): Use GROFFBIN and GROFF_BIN_PATH.
+
+ Patch from Maciej W. Rozycki <macro@ds2.pg.gda.pl>.
+
+-----------------------------------------------------------------------
+
+* Sat Feb 22 2003
+
+ o (Re)-fixed handling of post epigraph spacing after #START for
+ TYPEWRITE double-spaced.
+
+------------------------------------------------------------------------
+
+* Sun Feb 16 2003
+
+ o Added James Ramsey's proposed CHAPTER_TITLE macro, along with
+ his rewritten START macro and his utility macros to make START
+ easier to read.
+
+ o Expanded handling of CHAPTER_TITLE to encompass TYPEWRITE, as
+ well as plugging it into the docheaders. Made CHAPTER_TITLE
+ backwardly compatible so that pre-1.1.5 docs using CHAPTER_STRING
+ to create a chapter title remain unaffected when groffed with
+ 1.1.5.
+
+ o Created control macros for CHAPTER_TITLE FAMILY, FONT and SIZE.
+ Added defaults for handling of CHAPTER title to DEFAULTS.
+ Documented CHAPTER_TITLE and everything that goes along with it.
+
+ o Fixed broken draft and revision in headers/footers.
+
+ o Fixed \*[RULE] so that it behaves properly with indents and
+ justified copy.
+
+ o Fixed/tweaked handling of epigraph spacing in TYPEWRITE.
+
+ o Fixed broken spacing of docheaders in TYPEWRITE.
+
+* Mon Feb 3 2003
+
+ o Fixed an oversight in CLOSING for DOCTYPE LETTER (closing wasn't
+ being set flush left)
+
+* Sun Sep 29 2002
+
+ o Changed .ne in .HEAD when PRINTSTYLE TYPESET from 5 to 4. With
+ 5, heads required at least 2 lines of text underneath or they'd be
+ deferred to the next page, which created too much whitespace at the
+ end of the page. Heads will now be processed on the same page if
+ the head plus at least one line of text underneath fits. I figure
+ it's easier for the user to break to a new page manually if this
+ behaviour is unsatisfactory than to massage the page to fix the
+ excess whitespace.
+
+* Sun Aug 25 2002
+
+ o Changed .IX to .IQ. The older form still works, but emits a
+ message advising the user to update to the newer. (The macro in
+ om.tmac still remains IX; IQ is an alias.) Docs updated to
+ reflect the change.
+
+* Tue Aug 20 2002
+
+ o Added new (better) way to handle inline kerning. \*[BU #] and
+ \*[FU #] allow passing an argument to the inline string. The
+ older forms \*[BU#] and \*[FU#] still work, though.
+
+ o Changed handling of inline horizontal and vertical movements.
+ Horizontal movements are now done with \*[BCK #<unit>] and \*[FWD
+ #<unit>]; verticals with \*[UP #<unit>] and \*[DOWN #<unit>]. The
+ older forms \*[FP#] and \*[BP#] still work (horizontals), as do
+ \*[ALD#] and \*[RLD#] (verticals).
+
+------------------------------------------------------------------------
+
+* Mon Aug 19 2002
+
+ o Fixed ENDNOTES so footnotes output properly when ENDNOTES is
+ called
+
+ o Added ENDNOTES_HDRFTR_CENTER so that default no-print of header
+ center string on endnotes page(s) when DOCTYPE is CHAPTER can be
+ disabled (i.e. header center will be printed).
+
+* Sat Aug 10 2002
+
+ o Added .nf to top of PAD, with a test beforehand for current fill
+ mode. If fill mode was on, it's restored after PAD completes
+ processing. Updated reserved.html to include number register
+ #FILL_MODE.
+
+* Fri Jul 12 2002
+
+ o More fixes to underlining.
+
+* Fri Jul 5 2002
+
+ o Added capability of endnotes and pertinent control macros to
+ om.tmac.
+
+ o Added document entries pertaining to endnote macros.
+
+ o Incorporated endnote macros into elvis_syntax.
+
+ o Small doc fixes.
+
+ o Tidied up indenting of om.tmac.
+
+ o Fixed handling of underlining of italics in PRINTSTYLE TYPEWRITE
+ (there was a problem with footnotes getting underlined when they
+ shouldn't have been).
+
+ o Removed ENDNOTES from TODO
+
+ o Fixed the character translations for UNDERLINE so they work
+ properly with digraphs.
+
+* Mon Jul 1 2002
+
+ o Expanded docprocessing.html entry "Special Note on Chapters".
+ Tidied up html a bit.
+
+* Sat Jun 15 2002
+
+ o Small fix to PAD to make the use of inlines within the pad
+ string more intuitive.
+
+ o Added \*[RULE] ( = \l'\n(.lu' ) so that full measure rules
+ (either to full line length or within tabs) are easier to set.
+
+* Sat Jun 8 2002
+
+ o Macro .PS renamed to .PT_SIZE. Alias .TS removed.
+
+ o .tr bits in .CAPS rewritten in the form .tr \[`E].
+
+ o General cleanup of docs to reflect changes
+
+ o Small changes/additions to elvis_syn
+
+* Thu Jun 6 2002
+
+ o In DOCTYPE, in .if '\\$1'LETTER', added .FOOTER_RIGHT_SIZE +0.
+ Without it, the suite page was printing at the default
+ FOOTER_RIGHT_SIZE of -.5, which didn't look good.
+
+* Wed Jun 5 2002
+
+ o Makefile.sub (TFLAG): Add `$(top_builddir)/tmac'.
+
+* Tue Jun 4 2002
+
+ o Makefile.sub (groff_bin_dirs): Fix typo (forgotten `src'
+ element).
+
+* Mon Jun 3 2002
+
+ o Makefile.sub (uninstall_sub): Don't use `momdocdir' but
+ `htmldocdir'. Add missing backslash.
+
+* Sat Jun 1 2002
+
+ o Makefile.in (prepare_make_examples): Test for `penguin.ps', not
+ `examples/penguin.ps'.
+
+* Wed May 29 2002
+
+ o Rewrote portions of PAGENUM_STYLE and COPYSTYLE so that
+ PAGENUM_STYLE behaves as advertised.
+
+* Fri May 24 2002
+
+ o /Makefile.sub (momdocdir): Removed.
+ (HTMLDOCFILES): Prepend `momdoc/'.
+ (EXTRAEXAMPLEFILES): Removed. Added entries to...
+ (EXAMPLEFILES): This.
+ (.SUFFIXES, .mom.ps): New.
+ (prepare_make_examples): Updated.
+ (examples/*.ps): Removed; .mom.ps will handle this.
+ (install_data): Updated.
+
+* hu May 23 2002
+
+ o Applied two small bug fixes to om.tmac (patches 1.1.1a and
+ 1.1.1b).
+
+ o mom is now part of groff.
+
+ Some renaming to avoid problems with 8+3 filesystems:
+
+ examples/docprocessing_typeset.mom -> examples/typeset.mom
+ examples/docprocessing_typewrite.mom -> examples/typewrite.mom
+ examples/typesetting_macros.mom -> examples/macros.mom
+ examples/penguin_small2_bw.ps -> examples/penguin.ps
+
+ o Removed `INSTALL' and `README' since groff takes care of
+ installation now.
+
+ o Added Makefile.sub.
+
+ o Added mom.tmac (which simply calls om.tmac).
+
+ o Added groff_mom.man for orthogonality; it simply points to the
+ HTML documentation.
+
+* Thu May 16 2002
+
+ o Added macro DRAFT_WITH_PAGENUMBER so user can have
+ draft/revision info attached to the pagenumber in COPYSTYLE DRAFT,
+ instead of having it HEADER center. Always having it HEADER
+ center was creating problems with long doc titles, esp. with
+ PRINTSTYLE TYPEWRITE (which is when COPYSTYLE DRAFT is most likely
+ to be used). Now user has the choice, in these circumstances,
+ either to reduce HEADER_SIZE, or to displace the draft/revision
+ info. Also rewrote portions of COPYSTYLE so that if no revision
+ number is given in the reference macros, "Rev. #" doesn't appear
+ when COPYSTYLE DRAFT.
+
+* Fri May 10 2002
+
+ o Added capability of user-defined, single string recto/verso
+ headers/footers.
+
+ o Added new entries to docs about the above. Made some additional
+ small changes to toc.html, rectoverso.html, and headfootpage.html
+ to supplement the new entries.
+
+ o Small fix to handling of footer separator rule -- was 1 point
+ too low owing to fuzziness of #CAP_HEIGHT as returned by
+ SIZESPECS.
+
+ o Added some more useful stuff to elvis_syntax.
+
+* Sun May 05 2002
+
+ o Fix to DEFAULTS so that L_MARGIN and R_MARGIN are reprocessed if
+ DOCTYPE LETTER. R_MARGIN, as set by DOCTYPE LETTER had no
+ preceding PAGEWIDTH or PAPER from which to get #PAGE_WIDTH for
+ figuring out line length.
+
+ o Additional fix to DEFAULTS in handling DOCTYPE LETTER so that if
+ user sets line length prior to START, no reprocessing of R_MARGIN
+ occurs. This necessitated adding a new number register:
+ #USER_SET_L_LENGTH
+
+* Sat May 04 23:48:05 EDT 2002
+
+ o Added .cflags 4 /\(en -- was driving me nuts that lines wouldn't
+ break after these characters; I'm assuming others feel the same
+ way
+
+* Fri May 03 2002
+
+ o Made some small fixes to space handling around quotes, mostly to
+ do with quotes immediately after START and quotes after
+ (sub)heads.
+
+* Wed May 01 2002
+
+ o Fixed a small bug that was causing the first .PP after START to
+ begin at the top margin of the page regardless of any type that
+ preceded .PP when docheaders were off.
+
+ o Fixed HEADER so that when HEADERS are off the first line of type
+ on pages after the first falls properly at the top margin
+
+* Sat Apr 27 2002
+
+ o Renamed docprocessing_macros.mom in /examples to
+ docprocessing_typeset.mom. Added docprocessing_typewrite.mom, as
+ well as a README file.
+
+ o Fixed UNDERLINE_QUOTES (for PRINTSTYLE TYPEWRITE) so they really
+ are on by default as the docs say.
+
+ o Changes to doc entry on COLLATE:
+
+ - removed bit about using COLLATE after a cover page (I wrote the
+ entry *before* I wrote the macro!). Cover pages should be
+ followed by NEWPAGE, not COLLATE.
+
+ - added caution about mixing PRINTSTYLEs
+
+ - added caution about using DOC_FAMILY to change family of all
+ document elements after COLLATE
+
+ o Made HEADER_SIZE (and, by extension, FOOTER_SIZE) available to
+ PRINTSTYLE TYPEWRITE. Changed appropriate doc entries to reflect
+ this.
+
+* Wed Apr 24 2002
+
+ o Small change to DO_QUOTE to correct a problem with quotes and
+ blockquotes that fall in the middle of paragraphs (i.e. text after
+ the quote is not a new para). Basically, added a bit that stores
+ the current para indent, sets para indent to 0, invokes a PP, then
+ restores the original para indent.
+
+ o Added new macro, BREAK_QUOTE, to deal with the problem of
+ footnotes in quotes and blockquotes that cross pages or columns.
+
+ Quotes and blockquotes are read into diversions, which means they
+ get their footnote information from the page/column on which they
+ were started. If a footnoted quote crosses a page/column, what
+ sometimes happens is that the footnote itself is output at the
+ bottom of page/column where the quote started, whereas the text
+ marker for the footnote appears on the next page/column where the
+ quote ends. Furthermore, the text marker is the one appropriate
+ to the previous page. BREAK_QUOTE is a workaround.
+
+ o Added directory /examples to archive.
+
+ o Added typesetting_macros.mom, docprocessing_macros.mom,
+ elvis_syntax and penguin_small2_bw.ps to /examples.
+
+ o Added BREAK_QUOTE to docs, made some additions to reserved words
+ list, and corrected a few little doc errors.
+
+* Mon Apr 22 2002
+
+ o Added default .L_MARGIN 1i and .R_MARGIN 1i to PAPER, PAGE, and
+ PAGEWIDTH. L_MARGIN is essential otherwise left indents and tabs
+ don't have a register #L_MARGIN to work with. The default right
+ margin is a convenience only. Updated the doc entries for
+ L_MARGIN and R_MARGIN to reflect the change.
+
+* Sun Apr 21 2002
+
+ o Changes to COLLATE:
+
+ - added some "resets" (LL, LS, QUAD)
+ - added a check for whether pagination is at page top (either
+ because FOOTERS are on or because PAGENUM_POS was user set).
+ If pagination is on, and PAGENUM_POS is TOP, it's turned off
+ for next page (start of next collated document) and restored
+ for subsequent pages unless PAGENUM_ON_FIRST_PAGE is on, in
+ which case the page number appears at page top.
+
+ o The macro TRAPS is always invoked at the end of DEFAULTS (which
+ is called by START). Formerly, TRAPS was only invoked at the
+ start of a doc, not after COLLATE. Now runs after COLLATE as
+ well.
+
+ o Distance from $DOC_TYPE in DOCTYPE NAMED "<string>" to start of
+ running text was one linespace too deep. Fixed (in START).
+
+ o When 1st arg to PAGENUM_POS was user set to TOP, running text
+ was printing 1 linespace too high, even when PAGINATION was OFF.
+ Same problem when HEADERS were OFF (i.e. nothing in the header
+ margin at all). Fixed by removing -\\n[#DOC_LEAD]u from all .sp
+ |\\n[#T_MARGIN]u calls of .el portion after .ie \\n[#HEADERS_ON].
+
+ o Added new macro: PAGENUM_ON_FIRST_PAGE. Normally, when FOOTERS
+ are being used instead of HEADERS, mom doesn't print the page
+ number at the top of the first page of a doc, or the first page of
+ collated docs. New macro allows user to get mom to put the page
+ number on "first" pages if that's desired. Updated docs to
+ include the macro.
+
+ o More little fixes to docs.
+
+* Thu Apr 18 2002
+
+ o Fixed TI (temporary indent) so that it continues to work as
+ expected, even when called while another type of indent is in
+ effect.
+
+* Tue Apr 16 2002
+
+ o String tabs weren't working as advertised when set from within a
+ tab. Fixed. Two new registers added: #ST_OFFSET and #IN_TAB.
+ String tabs now behave properly and intuitively when set within
+ tabs.
+
+ o Added a note to docs about surrounding \w'...' escape with
+ double- quotes when it's used as an argument to macros
+
+ o Added a note to docs that SILENT does not deposit a .br
+
+* Mon Apr 15 2002
+
+ o Added new macro BR_AT_LINE_KERN if user wants mom to deposit
+ .br's before .RW and/or .EW.
+
+ o Added 1/4 points to inline escapes \*[ALD] and \*[RLD].
+
+ o Added 1/4 points to inline escapes \*[FP] and \*[BP]
+
+ o Updated docs to reflect the above changes.
+
+* Fri Apr 12 2002
+
+ o Fixed .RW and .EW which weren't working because of a missing \
+ in \\n(.f register. Also made it so that .RW and .EW affect all
+ fonts in positions 1, 2, 3, and 4 at once, hence line kerning now
+ affects all fonts that appear after it, not just the font that was
+ current at the time of the macros' invocation.
+
+ o .SS and .WS now working properly. .WS no longer has any effect
+ on .SS, which remains constant regardless of .WS. Furthermore,
+ .SS no longer gets its value by adding \*[$SS_VAR] + \n[.ss].
+ Instead, it remains constant. Don't know what I was thinking when
+ I wrote the routine in the first place.
+
+ o Updated and rewrote doc entry pertaining to SS
+
+* Wed Apr 10 2002
+
+ o Renamed tmac.om to om.tmac to bring macro file's name into line
+ with current groff policy
+
+ o Added more standard paper sizes to PAPER.
+
+ o Fixed T_MARGIN, LS, and AUTOLEAD so that if T_MARGIN is set
+ before LS or AUTOLEAD at the top of a file, the first line of type
+ falls properly on the baseline set by T_MARGIN. Previously, LS
+ and AUTOLEAD automatically advanced by the value passed to them
+ before setting the first line of type, meaning that the first line
+ of type fell at T_MARGINu+1v instead of T_MARGIN.
+
+ o Updated docs to reflect changes.
+
+ o Removed #TEST_FOR_NUMERIC from list of reserved words.
+
+ o Added "t" and #T_MARGIN_SET to list of reserved words.
+
+* Sat Apr 6 2002
+
+ o Added FACTOR arg to AUTOLEAD, so if user wants autolead to be a
+ factor of point size, instead of being the sum of pointsize +
+ autolead, s/he has the choice. Incorporated appropriate changes
+ to PS and LS.
+
+ o Added new register #AUTOLEAD_FACTOR to reserved words. Modified
+ comments for AUTOLEAD, PS, and LS to reflect changes. Also
+ corrected an error where #AUTOLEAD_VALUE had mistakenly been
+ written $AUTOLEAD_VALUE in comments in the macro file, and removed
+ erroneous | <anything>. Updated AUTOLEAD entry in
+ momdoc/typesetting.html to reflect the changes.
+
+* Wed Apr 3 2002
+
+ o Cleaned up html errors in the docs.
+
+ o Added "Next," "Prev" and "Top" links to top and bottom of doc
+ files.
+
+ o Fixed some typos in the docs.
+
+________________________________________________________________________
+
+##### License
+
+Copyright 2004-2020 Free Software Foundation, Inc.
+
+Copying and distribution of this file, with or without modification,
+are permitted in any medium without royalty provided the copyright
+notice and this notice are preserved.
+
+##### Editor settings
+Local Variables:
+coding: latin-1
+fill-column: 72
+mode: change-log
+version-control: never
+End:
+vim:set autoindent textwidth=72:
diff --git a/contrib/mom/NEWS b/contrib/mom/NEWS
new file mode 100644
index 0000000..d7cf82a
--- /dev/null
+++ b/contrib/mom/NEWS
@@ -0,0 +1,710 @@
+ -*- text -*-
+ Copyright (C) 2004-2020 Free Software Foundation, Inc.
+
+ Copying and distribution of this file, with or without modification,
+ are permitted in any medium without royalty provided the copyright
+ notice and this notice are preserved.
+
+Release 2.5
+-----------
+Addition of shaded backgrounds, frames, and page colour.
+
+Releases 2.4 — 2.4-4_e
+----------------------
+General bug fix releases, with an overhaul of float, image, and
+pre-processor handling to correct inconsistencies in spacing,
+indents, labels, and captions. Corrects page numbering issue in
+"Lists of..." when pre-processor material is floated and deferred.
+
+Release 2.3
+-----------
+Addition of DOCTYPE SLIDES and associated macros
+ NEWSLIDE
+ PAUSE
+ TRANSITION for slide presentations processed with gropdf.
+Fixes and improvements to nested lists (ITEM now takes a spacing
+arg), indents (IB), NEWPAGE (aliased as NEWSLIDE). Addition
+of CENTER_BLOCK (center blocks of type over whole line length
+regardless of indents). Tighten up graphical object macros.
+Addition of macros to handle hanging punctuation. .COLOR preferred
+to .gcolor in om.tmac. Changes to HEADER to handle printing of both
+headers and footers when DOCTYPE SLIDES.
+
+Release 2.2
+-----------
+Addition of flex-spacing (flexible vertical whitespace). Fixes and
+improvements to positioning of floats, images, and pre-processor
+material. Addition of TARGET (PDF target) argument to floats,
+images, and pre-processor material. Improvements to autolabelling.
+
+Release 2.1-b
+-------------
+Fix to handling of kern units. Updated copyright info.
+
+Release 2.1-a
+-------------
+Expanded labelling facilities to include floats and
+quotes/blockquotes. Improvements to TOC handling.
+
+Release 2.1
+-----------
+Expanded support for doc-covers, covers, and docheaders:
+ - control macros for formatting every element separately (title,
+ subtitle, author, etc.); formatting options include family,
+ font, size, color, quad, caps, smallcaps and underscoring
+ - (DOC_)COVERTEXT for setting blocks of type on cover pages
+ - (DOC_)COVER_IMAGE for putting full page or small images on cover
+ pages
+
+New <ELEMENT>_STYLE macros that allow grouping of style parameters
+for most document elements into a single macro using keyword/value
+pairs.
+
+Smallcaps, with the ability to control size, weight, and width.
+
+Release 2.0-c
+-------------
+Mom now has full support for eqn, pic, and tbl, as well as
+captioning and labelling of pdf images and preprocessor output.
+Lists of Figures, Equations, and Tables can now be autogenerated.
+PDF_IMAGE has a new FRAME option.
+
+Release 2.0-b
+-------------
+Improved and expanded float and tbl support.
+
+Release 2.0-a
+-------------
+FORCE argument added to FLOAT; immediately breaks to a new page
+to output the float if it does not fit on current the page.
+
+Release 2.0
+-----------
+Full integration with gropdf. Mom's focus now is on the generation
+of PDF output. PDF outlines and PDF links (internal and external)
+fully supported.
+
+New management of nested heading levels via HEADING <level>,
+replacing HEAD, SUBHEAD, SUBSUBHEAD and PARAHEAD.
+
+"NAMED <id>" argument to HEADING <level> creates PDF target at the
+heading.
+
+Use of "oldstyle" headings preserved, allowing the continued use of HEAD,
+SUBHEAD, etc.
+
+PARAHEAD removed; replaced by HEADING <level> PARAHEAD.
+
+New management of head styling.
+
+New management of TOC, mostly transparent to user.
+
+New management of TOC title and entry styling.
+
+Overhaul of TOC default style; greater flexibility in numbering
+entries, improved indenting, improved spacing.
+
+FLOAT macro added.
+
+MN_INIT wrapper re-written such that each argument must be preceded
+by a flag.
+
+New perl script, pdfmom, to facilitate generation of PDF output.
+
+Additional documentation in the form of a PDF manual, which covers
+mom/PDF/groff usage.
+
+====================================================================
+
+Release 1.6-a
+-------------
+Support for sub-subheads added.
+
+Release 1.6
+-----------
+Complete overhaul of refer handling. If you've been using mom and
+refer, the changes may affect documents you've already created.
+Please read refer.html.
+
+Improved underlining thanks to Tadziu Hoffman.
+
+Increased flexibility of PRINTSTYLE TYPEWRITE, which now allows
+user to choose the monospace family and point size.
+
+Release 1.5-e
+-------------
+Complete overhaul of documentation
+
+Release 1.5-d
+-------------
+Control macros added to various miscellaneous docprocessing
+functions
+
+Release 1.5-c
+-------------
+Bugfix release (see BUGS, Version 1.5-b).
+
+Release 1.5-b
+-------------
+Bugfix release (see BUGS, Version 1.5-a).
+
+Release 1.5-a
+-------------
+Bugfix release (see BUGS, Version 1.5).
+
+Release 1.5
+-----------
+Macros have been added to facilitate the drawing of common
+graphical objects: rules (horizontal and vertical), boxes (solid or
+filled) and circles (ellipses; also solid or filled). The
+behaviour of \*[RULE] has changed so that it always deposits a
+break when it's called, bringing it (somewhat) into line with the
+new macro for drawing rules precisely, DRH. Additionally, a new
+macro, RULE_WEIGHT, can be used to control the weight of rules
+drawn with \*[RULE].
+
+Overall, the handling of underscoring and underlining--wherever it
+occurs--has been overhauled so that users can control both the
+weight and the placement of underscore/underline rules. New
+macros have been created to control, for example,
+the weight and placement of the rule under a HEAD, or the weight of
+a FOOTNOTE separator rule, etc. Anything that can be underscored
+or underlined (except the pseudo-underlining of italic passages in
+PRINTSTYLE TYPEWRITE) has a "rule" control macro. See the document
+sections pertinent to the macro in question.
+
+The creation and management of covers and doc covers has been
+overhauled for greater flexibility, including the ability to
+generate differing titles, subtitles, attribution strings, authors,
+doctypes, miscellaneous lines and copyright information for the
+same document's doc cover and cover (title) pages, without
+affecting the default docheader that appears on page one.
+Additionally, you can now get mom to output a blank page after a
+cover or doc cover, as well as tell her whether to include covers
+and doc covers in the pagination scheme.
+
+The convenience macro, CODE, has been made more convenient. A new
+control macro allows setting users' preferred fixed-width fonts.
+Additionally, CODE can now be called inline.
+
+New inline escapes, \*[UC] and \*[LC], have been added to allow
+inline capitalization. This is particularly useful when users
+want to pass a header/footer left-center-right part one of mom's
+"reserved" strings and want the string capitalized (or not) in the
+header/footer.
+
+For more details, see ChangeLog as well as the documentation.
+
+Release 1.4-b
+-------------
+It is now possible to pass an absolute value to QUOTE_INDENT,
+BLOCKQUOTE_INDENT and EPIGRAPH_INDENT. If an absolute value
+is desired, the user simply appends a unit of measure (scaling
+indicator) to the argument. If no unit of measure is appended,
+the old behaviour is still observed (i.e. the numeric argument
+represents the amount by which to multiply the paragraph indent to
+arrive at the desired indent value).
+
+The main macro file, om.tmac, is now stripped of comments when
+groff is built from sources. om.tmac in the sources themselves
+still contains the comments, as do the tarballs posted on the mom
+homepage.
+
+Release 1.4-a
+-------------
+Added a new macro, HEADERS_AND_FOOTERS, to allow having both
+headers and footers on a page.
+
+Release 1.4
+-----------
+DOCTITLE, TITLE, CHAPTER_TITLE, SUBTITLE, COVERTITLE and
+DOC_COVERTITLE now accept multiple arguments; each is printed
+on a separate line.
+
+New macro, CODE, to facilitate setting programming code snippets.
+
+Release 1.3-e_<#>
+-----------------
+New macro, PREFIX_CHAPTER_NUMBER, to allow users to prepend chapter
+numbers to the numbering scheme used in head element numbering.
+
+Indented TOC entries now line up better.
+
+Line numbering now has control macros for family, font, point size
+and color.
+
+A new macro, NO_SHIM, to disable the automatic shimming of
+(possibly irregularly linespaced) quotes and blockquotes.
+
+Release 1.3-d
+-------------
+Bug fix release (FONT--removed superfluous "if" that was breaking
+fallback font logic; FOOTNOTE--no longer adding a linebreak after
+footnote marker in footnote text in nofill modes).
+
+Fixed indent problem with LIST when both PAD_LIST_DIGITS LEFT and
+SHIFT_LIST used concurrently.
+
+Release 1.3-c
+-------------
+Bug fix release (margin notes, TYPEWRITE--spacing, underlining and
+italicizing
+
+Release 1.3-b
+-------------
+Bug fix release. SMARTQUOTES has been smartened; miscellaneous
+glitches in PRINTSTYLE TYPEWRITE fixed (see BUGS). Primarily
+corrects inconsistencies and bugs with the margin notes routines.
+
+Release 1.3-a
+-------------
+Bug fixes: First baseline of type wasn't going where it was supposed
+to when the docheader was turned off; fixes to errors in html
+formatting of docs.
+
+Release 1.3
+-----------
+
+Added line numbering capabilities, with controls.
+
+Footnotes and endnotes can now be referenced by line number.
+
+Added ability to adjust vertical position of the title that appears
+on the first endnotes page.
+
+Footnotes can run on when being referenced by line number.
+
+Footnotes now have a post-footnote spacing option, for adding
+a little space between footnotes.
+
+Extended LIST so it accepts alpha, ROMAN and roman enumerators.
+
+Added margin notes capability.
+
+Added refer support.
+
+Added bibliography page support.
+
+Added QUOTE_AUTOLEAD and BLOCKQUOTE_AUTOLEAD, so user can have
+quotes and blockquotes leaded differently from running text.
+
+Change: the input line immediately after FOOTNOTE OFF must be
+entered as a literal continuation of the line prior to FOOTNOTE,
+including any initial spaces or punctuation marks. This allows
+for hassle-free placing of footnote markers in running text either
+before or after punctuation marks.
+
+Release 1.2-f
+-------------
+
+Added ADD_SPACE, to permit users to insert space at the top of
+running text (after the first page) when using the docprocessing
+macros.
+
+Releases 1.2-a and 1.2-b
+------------------------
+
+My personal email address has changed. 1.2-a and -b have been
+updated to reflect that. Additionally, I made some small changes
+to the documentation.
+
+Release 1.2
+-----------
+
+As of 1.2, the recommended version of groff to use with mom has
+been bumped up from groff, 1.18 to groff, 1.19.2. Although mom will
+continue to work with groff, 1.18, her handling of .FAM(ILY) and .FT
+is now slightly different, therefore users of groff 1.18 may have to
+update documents created with mom so that every .FAM(ILY) request is
+followed by a .FT request before any text is input, otherwise mom
+will set the text after .FAM(ILY) in Courier (until she encounters a
+.FT request). People running groff, >= 1.19.2 don't have to worry
+about this, but I recommend that, regardless of which version you're
+running, you have a look at the document entries for FAMILY and FT
+in order to see how mom will be handling .FAMILY and .FT from now
+on.
+
+When used with groff >=1.19.2, mom now emits warnings if a style
+hasn't been registered, or if a font style doesn't exist in the
+current family. Invalid .FAM(ILY) calls now use a "fallback" font"
+(although no warning is issued). The fallback is user-settable.
+
+Mom's macro file, om.tmac, now sets up a fairly extensive list of
+font "styles," thus expanding the range of arguments that can be
+passed to .FT (formerly, just R, I, B and BI, unless users had
+already rolled their own solution to the problem of extensive type
+families containing fonts like condensed, demibold, black, light, etc).
+Users are advised to read the documentation sections on FAM(ILY),
+FT and FALLBACK_FONT, as well as the new appendix section, "Adding
+PostScript fonts to groff", for information on using mom's style
+extensions (and how to disable them, should they conflict with a
+user's present groff site-font/devps setup).
+
+A new macro, FALLBACK_FONT, has been added. It controls not only
+the fallback font for invalid .FAMILY calls, but also whether mom
+aborts on invalid .FT calls after issuing a warning, or continues
+processing using the fallback.
+
+Release 1.1.9
+-------------
+
+Added the (optional) generation of cover pages and document cover
+pages, plus a full suite of control macros for all cover page
+elements.
+
+Added new reference macros that apply to covers: COVERTITLE,
+DOC_COVERTITLE, COPYRIGHT and MISC.
+
+The need for TRAP OFF/TRAP to deal with ELs and TNs that fall at
+the bottom page has been obsoleted. However, both EL and TN, when
+invoked in any "nofill" mode (LEFT, RIGHT, CENTER, or the L | R | C
+arguments to TAB_SET or ST when no QUAD argument is given), must now
+have the input line preceding the EL or TN terminated by \c. Fill
+modes do not have this requirement, i.e. no \c is required.
+
+Footnotes that occur inside quotes, blockquotes and epigraphs now
+work just like regular footnotes, with no user intervention
+required. This obsoletes the macro BREAK_QUOTE.
+
+Removed all aliases that used the word COLOUR. Users must use
+COLOR wherever COLOR is needed. COLOUR, as a replacement/alias, is
+no longer supported.
+
+NEWPAGE, which used to be an alias of .bp, is now its own macro.
+
+Release 1.1.8
+-------------
+
+Added text color support. Users can now define or initialize a color,
+and afterwards change text color with an inline of the form
+\*[<colorname>], or with the macro .COLOR. In document processing,
+the docelement tag control macros have been expanded to include
+_COLOR, e.g. .HEAD_COLOR <predefined colorname> will colorize
+heads, PAGENUM_COLOR <predefined colorname) will colorize page
+numbering, etc.
+
+Adjusted vertical placement of hyphens around page numbering when
+PAGENUM_STYLE is DIGIT, ROMAN or ALPHA so that the hyphens appear
+properly centered on the page numbering character.
+
+Changed tab handling in document processing so that tab structures
+are preserved from page to page and column to column.
+
+Release 1.1.7-a
+---------------
+
+Increased the flexibility of SMARTQUOTES so that they handle quoting
+styles by language, entered as a 2-digit language code argument to
+SMARTQUOTES. See docs.
+
+Re-wrote the DOCTYPE LETTER macros so that DATE, TO and FROM can be
+entered in any order the user wishes, with output that matches
+input. (Should have done this in the first place.)
+
+Release 1.1.7
+-------------
+
+Finally got around to writing "list" macros. See the docs.
+
+Added German-style lowered double quotes and two styles of
+guillemets to SMARTQUOTES.
+
+Added macro SIZE, intended to be called inline as \*[SIZE <n>].
+This brings mom's inline size change syntax into line with her other
+inlines. \*S[<n>] can still be used for the same thing.
+
+The file elvis_syntax (for elvis prior to 2.2h) is no longer being
+maintained. It was getting messy and long in the tooth. The
+official elvis syntax file is elvis_syntax.new, which works for
+2.2h of elvis (and higher, one hopes). elvis users are encouraged
+to update to 2.2h or higher.
+
+Release 1.1.6-e
+---------------
+
+Extended handling of draft and revision numbers and strings in
+headers/footers for increased flexibility. It's possible now to
+have just about any combo of DRAFT_STRING, DRAFT, REVISION_STRING
+and REVISION, and have them come out in headers/footers as one
+intuitively expects/wants.
+
+Also added a new set of syntax highlighting rules for the vi clone,
+elvis. Version 2-2h-beta of elvis finally made possible the
+highlighting of \*[...] inline escapes, whether or not they're
+separated from surrounding text by spaces. This is a terrific
+improvement in elvis, and makes for greatly improved readability of
+mom files.
+
+Release 1.1.6-b - 1.1.6d
+------------------------
+
+Trivial changes to documentation and some cleanups of the main
+om.tmac file, including:
+
+Added a .bp after .if \\n[#START]=1 in FOOTER. Without it,
+in document processing mode, documents that use *none* of the
+docprocessing tags (yes, there are times when users want to do
+this) ignored the footer trap.
+
+Changed register #DOCHEADER_LEAD_ADJ to string
+$DOCHEADER_LEAD_ADJ. This means that .DOCHEADER_LEAD no longer
+requires a unit of measure; points is assumed.
+
+Release 1.1.6-b
+---------------
+
+Added a SHIM macro that calculates and moves to the next "valid"
+baseline during document processing (useful if user starts playing
+around with spacing/leading on a page and needs to get the leading
+back on track).
+
+Fixed handling of DOCHEADER OFF <distance> so that the first line of
+running text falls on a "valid" baseline when <distance> is given.
+
+Release 1.1.6-a
+---------------
+
+Problem with groff 1.19.1 fixed by Werner (.return handled arguments
+incorrectly).
+
+Fixed handling of page numbering style restoration in endnotes, so
+that (collated) docs have the correct page numbering style when the
+style has been changed for endnotes (with ENDNOTES_PAGENUM_STYLE).
+
+DOC_TITLE has been made for use exclusively with DOCTYPE DEFAULT.
+
+Fixed handling of headers/footers with respect to endnotes. Now,
+when either headers or footers are on, mom picks up the correct
+page header/footer on the last page prior to ENDNOTES, gets the
+pageheaders correct for endnotes pages *including the last one*, and
+picks up correct page headers/footers for the subsequent docs after
+COLLATE.
+
+
+Release 1.1.6
+-------------
+
+BAD NEWS: mom appears to be crippled in some areas when run with
+groff 1.19.1. Pending a solution, mom must be run with groff 1.18
+
+***NEW***
+
+Added TOC capabilities.
+
+Extended range of endnotes control macros. See the documentation
+on endnotes control macros.
+
+Added a new DOC_TITLE macro, to deal with collated documents that
+have an overall title, while each doc has its own separate doc
+title (from TITLE).
+
+
+Release 1.1.5
+-------------
+
+***NEW***
+
+Added James Ramsey's CHAPTER_TITLE macro as well as control macros to
+go with it. Thanks James. Also from James came a patch to handle
+START differenty which has been incorporated into om.tmac. Thanks
+again, James.
+
+Some bits and pieces of the docs have been tweaked, but nothing
+changed. Hopefully, the changes will make parts of the docs easier to
+read and navigate.
+
+***FIXES***
+
+o \*[RULE]
+
+o broken draft and revision in docheaders
+
+o post-epigraph spacing in TYPEWRITE
+
+o header spacing in TYPEWRITE
+
+------------------------------------------------------------------------
+
+Release 1.1.4
+-------------
+
+***SIGNIFICANT CHANGE***
+.IX is now deprecated, although it will continue to work as before.
+The new form is .IQ (Indent Quit). Groff will emit a message advising
+users to update their docs.
+
+***NEW***
+Four new inlines to deal with horizontal and vertical movements:
+
+ o \*[FWD n]
+ o \*[BCK n]
+ o \*[UP n]
+ o \*[DOWN n]
+
+All four require a unit of measure after n. These inlines are similar
+to the older \*[FPn], \*[BPn], \*[ALDn] and \*[RLDn], however they're
+not restricted to points, and any value can be entered for n (the older
+forms -- which still work -- were restricted to 1 - 36).
+
+***CHANGED***
+Inline kerning can now be accomplished with \*[BU n] and \*[FU n], where
+n, after the space, is the desired number of kern units. The older
+forms \*[BUn] and \*[FUn] still work, up to 36 units.
+
+------------------------------------------------------------------------
+
+Release 1.1.3c
+--------------
+
+***NEW***
+A new macro -- ENDNOTES_HDRFTR_CENTER -- added so that mom's default
+behaviour of not printing the header center string when DOCTYPE is
+CHAPTER can be disabled (i.e. she will print the center string). The
+macro is user-called with ENDNOTES_HEADER_CENTER or
+ENDNOTES_FOOTER_CENTER.
+
+***FIXES***
+PAD now works as advertised when fill mode is on.
+
+ENDNOTES no longer disables printing of footnotes on last page of
+document body.
+
+Release 1.1.3
+-------------
+
+***SIGNIFICANT CHANGE -- PLEASE TAKE NOTE***
+As of 1.1.3, groff must be >= 1.18.
+
+***NEW***
+Added endnotes functionality to mom, along with a slew of macros to
+control how mom prints endnotes pages. See the html documentation.
+
+***NEW***
+Added inline \*[RULE], which draws a rule to the full measure of the
+current line length ( to be used in place of \h'\n(.lu' ). Weight of the
+rule is dependent on the point size of type when \#[RULE] is called.
+
+***FIXES***
+PAD -- works more intuitively now when the pad string contains inline
+escapes for font, point size, etc.
+
+UNDERLINE -- fixed character translations of digraphs so they get
+underlined properly. Also fixed a bug that was causing some footnotes
+to get underlined when UNDERLINE was on in the body of the document.
+
+***UPDATES***
+Html documentation
+elvis_syn
+
+Release 1.1.2a
+--------------
+
+***SIGNIFICANT CHANGE -- PLEASE TAKE NOTE***
+In order to help mom toward full groffship, the macro .PS has been
+renamed to .PT_SIZE, and the alias .TS (for .TAB_SET) has been removed.
+.PS and .TS are keywords used by pic and tbl respectively, and the mom
+macros of the same name were in conflict.
+
+Release 1.1.2
+-------------
+
+***IT'S OFFICIAL!***
+mom is now an official part of the groff. New releases will be
+incorporated into the groff package. I'll still be posting each new
+release on the mom homepage, so there's no need to download all of the
+most recent version of groff just to get a newer mom. :)
+
+***CHANGES***
+Fixed default footer separator rule adjustment so that it's closer to
+the advertised "4 points above the tallest ascender in the footer."
+
+Added more stuff to the elvis_syn file. Still wouldn't mind someone
+contributing some vim/emacs syntax highlighting.
+
+Added .cflags 4 /\(em to om.tmac. By default, mom now obligingly
+breaks after / and \(en.
+
+***NEW***
+Macro(s): HEADER_RECTO
+ HEADER_VERSO
+With these macros, users can now define single-string recto/verso
+headers/footers. HEADER_RECTO (or FOOTER_RECTO) can be used to create
+a one-part header/footer (instead of mom's default three-parters) that
+appears on every page if RECTO_VERSO is OFF or, if RECTO_VERSO is on, if
+no HEADER_VERSO (or FOOTER_VERSO) has been defined. If a HEADER_VERSO
+(or FOOTER_VERSO) is defined and RECTO_VERSO is on, _RECTO prints on
+even pages and _VERSO on odd pages.
+
+Added macro DRAFT_WITH_PAGENUMBER so user can have draft/revision
+info attached to the pagenumber in COPYSTYLE DRAFT, instead of having
+it HEADER center. Always having it HEADER center was creating problems
+with long doc titles, esp. with PRINTSTYLE TYPEWRITE (which is when
+COPYSTYLE DRAFT is most likely to be used).
+
+***FIXES***
+No more "can't break line" warnings in DOCTYPE LETTER.
+
+If no REVISION number is given, Rev. 0 no longer appears HEADER_CENTER
+in COPYSTYLE DRAFT
+
+PAGENUM_STYLE now works as advertised.
+
+Release 1.1.1
+-------------
+
+***CHANGES***
+Main macro file renamed to om.tmac, in keeping with current groff
+policy.
+
+Now okay to use groff mailing list for mom-related posts
+
+***NEW***
+Toggle macro -- BR_AT_LINE_KERN. When on, automatically deposits
+a break whenever .RW or .EW are invoked. Very useful when kerning
+whole lines of rag copy.
+
+***NEW***
+Toggle macro -- PAGENUM_ON_FIRST_PAGE. Normally, when FOOTERS are
+being used instead of HEADERS, mom doesn't print the page number at
+the top of the first page of a doc, or the first page of collated docs.
+PAGENUM_ON_FIRST_PAGE allows user to get mom to put the page number on
+"first" pages if that's desired.
+
+***NEW***
+Macro -- BREAK_QUOTE -- to deal with problem of footnoted quotes and
+blockquotes that cross a page or column.
+
+***NEW***
+New argument to AUTOLEAD -- FACTOR. With FACTOR, you can, if you
+wish, enter a factor by which AUTOLEAD multiplies the point size when
+calculating lead automatically.
+
+Improvements
+------------
+
+PAPER now has a much larger selection of common paper sizes.
+
+\*[ALD], \*[RLD], \*[FP] and \*[BP] now accept increments of quarter
+points (expressed as decimal fractions). \*[RLD1.75], for example,
+reverses 1-3/4 points up on the line.
+
+HEADER_SIZE now available to PRINTSTYLE TYPEWRITE. This was necessary
+to deal with the problem of excessively long HEADER_LEFT, _CENTER or
+_RIGHT strings.
+
+Fixes
+-----
+
+T_MARGIN -- can be set before or after LS or AUTOLEAD
+SS -- remains constant regardless of WS
+WS -- no longer affects SS
+TI -- now works as expected even when called while another indent
+ type is in effect
+COLLATE -- small fixes
+
+Broken .RW and .EW fixed.
+
+String tabs now behave properly when set from within tabs.
+
+UNDERLINE_QUOTES (for PRINTSTYLE TYPEWRITE) are now, in fact, on by
+default as the docs state.
diff --git a/contrib/mom/TODO b/contrib/mom/TODO
new file mode 100644
index 0000000..d9bb257
--- /dev/null
+++ b/contrib/mom/TODO
@@ -0,0 +1,10 @@
+ -*- txt -*-
+ Copyright 2004-2020 Free Software Foundation, Inc.
+
+ Copying and distribution of this file, with or without modification,
+ are permitted in any medium without royalty provided the copyright
+ notice and this notice are preserved.
+
+- cutarounds
+- clickable footnote and endnote markers
+- indexing
diff --git a/contrib/mom/copyright b/contrib/mom/copyright
new file mode 100644
index 0000000..04c09d9
--- /dev/null
+++ b/contrib/mom/copyright
@@ -0,0 +1,24 @@
+-*- text -*-
+AUTHOR
+------
+Peter Schaffter (peter@schaffter.ca)
+6-331 Mona Ave
+Vanier (ON) CANADA
+K1L 7A3
+
+========================================================================
+
+The groff macro file om.tmac and the html documentation pertaining to
+it are Copyright (C) 2004-2021 Peter Schaffter.
+
+om.tmac is issued under the GNU General Public License, a full copy of
+which can be had at
+
+ http://www.gnu.org/licenses/gpl.html
+
+The html documentation pertaining to om.tmac is issued under the GNU
+Free Documentation License, a full copy of which can be had at
+
+ http://www.gnu.org/copyleft/fdl.html
+
+========================================================================
diff --git a/contrib/mom/examples/README-fr.txt b/contrib/mom/examples/README-fr.txt
new file mode 100644
index 0000000..5b1b434
--- /dev/null
+++ b/contrib/mom/examples/README-fr.txt
@@ -0,0 +1,126 @@
+-*- mode: text; coding: utf-8; -*-
+Copyright (C) 2014-2020 Free Software Foundation, Inc.
+
+Copying and distribution of this file, with or without modification,
+are permitted in any medium without royalty provided the copyright
+notice and this notice are preserved.
+
+========================================================================
+
+Les fichiers dans ce répertoire vous permettent de voir mom en pleine
+action.
+
+Si vous avez téléchargé et décompressé une version de mom depuis sa
+page d'accueil, vous verrez qu'aucun exemple n'est accompagné du
+fichier PDF (.pdf) correspondant, comme c'est le cas sur les versions
+pré-compilées de groff, ou groff compilé à partir des sources.
+
+Je n'ai pas inclu les PDF parce que je voulais conserver l'archive mom
+aussi petite que possible. Pour générer les PDF, traitez les fichiers
+avec pdfmom(1).
+
+ pdfmom mom-pdf.mom > mom-pdf.pdf
+ pdfmom sample_docs.mom > sample_docs.pdf
+ pdfmom slide-demo.mom > slide-demo.pdf
+ pdfmom -k letter.mom > letter.pdf
+ pdfmom -k mon_premier_doc.mom > mon_premier_doc.pdf
+ pdfmom -k typesetting.mom > typesetting.pdf
+
+Les fichiers
+------------
+
+Tous les fichiers sont configurés pour le format lettre US, exceptés
+mom-pdf.mom et mon_premier_doc.mom, qui utilisent le format A4.
+
+***typesetting.mom**
+
+Le fichier typesetting.mom montre l'utilisation d'éléments de
+composition typographique: tabulations, tabulations intégrées dans des
+chaînes de caractères, remplissage de lignes, texte sur plusieurs
+colonnes et différents styles d'indentation; ainsi que certaines
+subtilités et réglages précis disponibles via des macros et des
+échappements en ligne ("inline escape", des commandes insérées
+directement dans le texte, par opposition aux macros).
+
+Comme ce fichier montre également l'utilisation d'une petite image au
+milieu d'un texte et que cette image est la mascotte favorite de tout
+le monde -- Tux, le fichier PDF de cette image, penguin.pdf, a été
+ajouté dans ce répertoire.
+
+***sample_docs.mom***
+
+Le fichier sample_docs.mom montre en exemple les trois styles de
+documents apportés par les macros de formattage de document de mom,
+ansi que l'utilisation de COLLATE. Il montre également certaines
+fonctionnalités PDF de mom dont l'écriture d'une ébauche de nouvelle
+ou des liens cliquables dans une table des matières.
+
+Le dernier exemple démontre, par un texte séparé en deux colonnes, la
+souplesse de mom pour la conception de document.
+
+Le PRINTSTYLE de ce fichier est TYPESET et vous donne une idée du
+comportement par défaut de mom pour la composition typographique de
+document.
+
+Si vous souhaitez voir comment mom traite le même fichier quand
+PRINTSTYLE est TYPEWRITE (c'est-à-dire dactylographié, avec espace
+double) remplacez .PRINTSTYLE TYPESET par .PRINTSTYLE TYPEWRITE au
+début du fichier.
+
+***letter.mom***
+
+Ceci est simplement l'exemple du tutorial de momdocs, prêt à être vu.
+
+***slide-demo.mom***
+
+Le fichier slide-demo.mom montre une présentation de diapositives
+avec des effets PAUSE et TRANSITION. Le fichier .pdf généré avec
+pdfmom devrait être ouvert en mode Présentation d'un lecteur PDF
+(Okular, Evince, Acroread). Notez que pas tous les effets de
+transition sont disponibles pour tous les lecteurs PDF.
+
+***mon_premier_doc.mom***
+
+Le fichier mon_premier_doc.mom est un exemple simple en français
+montrant l'utilisation d'éléments de formattage courants: titres de
+section, paragraphes, listes, table des matières et liens PDF
+cliquables. Il doit être généré avec l'option -k du fait de la
+présence de caractères accentués.
+
+Un certain nombre de réglages ont également été changés pour ce
+document en français: ATTRIBUTE_STRING est utilisé pour remplacer
+"by" par "par" en tête de document (là où le titre et l'auteur sont
+affichés). TOC_HEADER_STRING sert à modifier le titre de la table des
+matières en "Table des matières" plutôt que "Table of Content". Enfin,
+le paramètre de configuration INDENT_FIRST_PARAS est activé afin
+d'indenter le premier paragraphe de chaque section -- ceci est l'usage
+en typographie française.
+
+***copyright-default.mom/copyright-chapter.mom***
+
+Deux fichiers qui montrent la bonne façon d'insérer une page des
+droits d'auteur dans les documents créés avec mom. "Default" est
+pour DOCTYPE DEFAULT; "chapter" est pour DOCTYPE CHAPTER.
+
+***mom-pdf.mom***
+
+Le manuel "Producing PDFs with mom and groff".
+
+***mom.vim***
+
+Les règles de coloration syntaxique vim sont baséés sur celles
+fournies par Christian V. J. Brüssow (cvjb@cvjb.de). Copiez le fichier
+mom.vim dans votre répertoire ~/.vim/syntax directory; ensuite,
+autorisez la coloration syntaxique si ce n'est pas encore le cas:
+
+ :syntax enable
+ou
+ :syntax on
+
+***elvis_syntax.new***
+
+Ceux qui utilisent elvis, le clone de vi, peuvent directement
+copier-coller le contenu de ce fichier dans leur elvis.syn. Tous les
+fichiers ayant l'extension .mom auront la coloration syntaxique. Les
+règles dans elvis_syntax ne sont pas exhaustive, mais aideront
+beaucoup à rendre les fichiers mom plus lisibles.
diff --git a/contrib/mom/examples/README.txt b/contrib/mom/examples/README.txt
new file mode 100644
index 0000000..851a9a2
--- /dev/null
+++ b/contrib/mom/examples/README.txt
@@ -0,0 +1,119 @@
+-*- mode: text; coding: utf-8; -*-
+Copyright (C) 2004-2020 Free Software Foundation, Inc.
+
+Copying and distribution of this file, with or without modification,
+are permitted in any medium without royalty provided the copyright
+notice and this notice are preserved.
+
+========================================================================
+
+The files in this directory show mom in action.
+
+If you have downloaded and untarrred a version of mom from her
+homepage, you'll see that none of the example files come with
+corresponding PDF (.pdf) files, as they do with pre-compiled
+versions of groff, or groff built from source.
+
+I haven't included the PDF output because I want to keep the mom
+archive as lean as possible. To view the PDF output, process the
+files with pdfmom(1).
+
+ pdfmom mom-pdf.mom > mom-pdf.pdf
+ pdfmom sample_docs.mom > sample_docs.pdf
+ pdfmom slide-demo.mom > slide-demo.pdf
+ pdfmom -k letter.mom > letter.pdf
+ pdfmom -k mon_premier_doc.mom > mon_premier_doc.pdf
+ pdfmom -k typesetting.mom > typesetting.pdf
+
+The files themselves
+--------------------
+
+All are set up for US letter papersize except mom-pdf.mom and
+mon_premier_doc.mom, which uses A4.
+
+***typesetting.mom**
+
+The file, typesetting.mom, demonstrates the use of typesetting tabs,
+string tabs, line padding, multi-columns and various indent styles,
+as well as some of the refinements and fine-tuning available via
+macros and inline escapes.
+
+Because the file also demonstrates a cutaround using a small picture
+of everybody's favourite mascot, Tux, the PDF file, penguin.pdf has
+been included in the directory.
+
+***sample_docs.mom***
+
+The file, sample_docs.mom, shows examples of three of the document
+styles available with the mom's document processing macros, as well
+as demonstrating the use of COLLATE. It also shows off some of
+mom's PDF features, including a PDF outline and clickable links in
+the printable Table of Contents.
+
+The last sample, set in 2 columns, demonstrates mom's flexibility
+when it comes to designing documents.
+
+The PRINTSTYLE of this file is TYPESET, to give you an idea of mom's
+default behaviour when typesetting a document.
+
+If you'd like to see how mom handles exactly the same file when the
+PRINTSTYLE is TYPEWRITE (ie typewritten, double-spaced), simply
+change .PRINTSTYLE TYPESET to .PRINTSTYLE TYPEWRITE near the top of
+the file.
+
+***letter.mom***
+
+This is just the tutorial example from the momdocs, ready for
+previewing.
+
+***slide-demo.mom***
+
+The file, slide-demo.mom, demonstrates a slide presentation with
+PAUSE and TRANSITION effects. The .pdf created by pdfmom should be
+opened in Presentation Mode in a PDF reader (e.g. Okular, Evince,
+Acroread). Note that not all transition effects are available in
+all PDF readers.
+
+***mon_premier_doc.mom***
+
+The file, mon_premier_doc.mom, is a simple example in French showing
+the use of common elements: section headings, paragraphs, lists, table
+of contents and clickable links. It should be generated with option -k
+as there are some accented letters.
+
+A few settings were also changed for this French document:
+ATTRIBUTE_STRING is used to replace "by" by "par" in the document
+header (where the title and the author are displayed).
+TOC_HEADER_STRING is used to modity the Table of Content title to
+"Table des matires". And finally, INDENT_FIRST_PARAS is used to
+indent the first paragraph of a section -- this is the usual
+convention in French typesetting.
+
+***copyright-default.mom/copyright-chapter.mom***
+
+These two files demonstrate the correct way to insert a copyright
+page into mom documents. "Default" is for DOCTYPE DEFAULT;
+"chapter" is for DOCTYPE CHAPTER.
+
+***mom-pdf.mom***
+
+The manual, Producing PDFs with mom and groff.
+
+***mom.vim***
+
+The vim syntax highlighting rules are based on those provided by
+Christian V. J. Brssow (cvjb@cvjb.de). Copy mom.vim file to your
+~/.vim/syntax directory; then, if your vim isn't already set up to
+do so, enable mom syntax highlighting with
+
+ :syntax enable
+or
+ :syntax on
+
+***elvis_syntax.new***
+
+For those who use the vi clone, elvis, you can paste this file into
+your elvis.syn. Provided your mom documents have the extension
+.mom, they'll come out with colorized syntax highlighting. The
+rules in elvis_syntax aren't exhaustive, but they go a long way to
+making mom files more readable.
diff --git a/contrib/mom/examples/copyright-chapter.mom b/contrib/mom/examples/copyright-chapter.mom
new file mode 100644
index 0000000..261c712
--- /dev/null
+++ b/contrib/mom/examples/copyright-chapter.mom
@@ -0,0 +1,160 @@
+.\" -*- mode: text; coding: utf-8; -*-
+\#
+\# Copyright (C) 2019-2020 Free Software Foundation, Inc.
+\#
+\# Copying and distribution of this file, with or without modification,
+\# are permitted in any medium without royalty provided the copyright
+\# notice and this notice are preserved.
+\#
+.ig
+***Template for creating a copyright page, DOCTYPE CHAPTER***
+.
+Mom documents comprised of chapters using DOCTYPE CHAPTER require
+the START macro to begin each chapter, and the COLLATE macro to join
+it to the subsequent chapter.
+.
+A copyright page (also called an edition page), which is not a
+chapter, should be treated as a DOCTYPE DEFAULT. The text of
+the copyright page is entered after START and joined to the first
+chapter (DOCTYPE CHAPTER) with COLLATE.
+.
+Copyright pages are not identified by a title or heading, however
+they require a TITLE in order to be included in PDF viewer outlines
+and the Table of Contents. Supplying '.TITLE "Copyright"'
+but disabling the DOCHEADER achieves both these requirements.
+.
+Pagination should also be disabled for the copyright page. Both
+docheader and pagination should be re-enabled before the START of
+the first chapter.
+..
+.
+.\" Cover setup
+.
+.\" By default, mom uses the last TITLE macro before START for the
+.\" title that appears on the cover. Since the TITLE is "Copyright,"
+.\" mom needs to be told explicitly to use a different title.
+.
+.\" Cover and PDF viewer setup
+.
+.DOCTITLE "Book Title"
+.TITLE DOC_COVER \
+ "\*[$DOCTITLE]" \" Title for the cover page
+.AUTHOR \
+ "Book Author"
+.DOC_COVER \
+ TITLE AUTHOR
+.PDF_TITLE \
+ "DOCTYPE CHAPTER with copyright page" \" For PDF viewer titlebar
+.
+.\" Copyright page setup
+.
+.PRINTSTYLE TYPESET
+.DOCTYPE DEFAULT \" Copyright page is not a chapter.
+.
+.DOCHEADER off 1i \" Turn off docheader for copyright page.
+. \" Begin text 1 inch from page top.
+.PAGINATION off \" Disable pagination for copyright page.
+.
+.TITLE "Copyright" \" Required for the PDF viewer outline; does not
+. \" get printed because docheader is disabled.
+.NO_TOC_ENTRY \" So copyright page is not included in the TOC
+.
+.START \" Begin example copyright page
+All rights reserved. No part of this publication may be reproduced,
+distributed, or transmitted in any form or by any means, including
+photocopying, recording, or other electronic or mechanical methods,
+without the prior written permission of the publisher, except
+in the case of brief quotations embodied in critical reviews
+and certain other noncommercial uses permitted by copyright
+law. For permission requests, write to the publisher, addressed
+“Attention: Permissions Coordinator,” at the address below.
+.SP
+.LEFT
+Copyright \[co]2019 Copyright Holder
+.SP
+Additional information...
+.TOC_AFTER_HERE \" Place TOC after copyright page.
+.
+.COLLATE
+.
+.\" Chapter setup
+.
+.DOCTYPE CHAPTER \" Begin using DOCTYPE CHAPTER.
+.TITLE \
+ "\*[$DOCTITLE]" \" Needed for page headers.
+. \" Only required before first chapter.
+.CHAPTER 1
+.CHAPTER_TITLE \
+ "Sample Chapter"
+.DOCHEADER \" Re-enable docheader.
+.PAGINATE \" Re-enable pagination.
+.PAGENUMBER 1
+.
+.START \" Begin first chapter.
+.PP
+Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed at
+ante. Mauris eleifend, quam a vulputate dictum, massa quam dapibus
+leo, eget vulputate orci purus ut lorem. In fringilla mi in ligula.
+Pellentesque aliquam quam vel dolor. Nunc adipiscing. Sed quam odio,
+tempus ac, aliquam molestie, varius ac, tellus. Vestibulum ut nulla
+aliquam risus rutrum interdum. Pellentesque lorem. Curabitur sit
+amet erat quis risus feugiat viverra. Pellentesque augue justo,
+sagittis et, lacinia at, venenatis non, arcu. Nunc nec libero. In
+cursus dictum risus. Etiam tristique nisl a nulla. Ut a orci.
+Curabitur dolor nunc, egestas at, accumsan at, malesuada nec, magna.
+.PP
+Nulla facilisi. Nunc volutpat. Vestibulum ante ipsum primis in
+faucibus orci luctus et ultrices posuere cubilia Curae; Ut sit
+amet orci vel mauris blandit vehicula. Nullam quis enim. Integer
+dignissim viverra velit. Curabitur in odio. In hac habitasse platea
+dictumst. Ut consequat, tellus eu volutpat varius, justo orci
+elementum dolor, sed imperdiet nulla tellus ut diam. Vestibulum
+ipsum ante, malesuada quis, tempus ac, placerat sit amet, elit.
+.PP
+Sed eget turpis a pede tempor malesuada. Vivamus quis mi at leo
+pulvinar hendrerit. Cum sociis natoque penatibus et magnis dis
+parturient montes, nascetur ridiculus mus. Pellentesque aliquet
+lacus vitae pede. Nullam mollis dolor ac nisi. Phasellus sit amet
+urna. Praesent pellentesque sapien sed lacus. Donec lacinia odio
+in odio. In sit amet elit. Maecenas gravida interdum urna. Integer
+pretium, arcu vitae imperdiet facilisis, elit tellus tempor nisi,
+vel feugiat ante velit sit amet mauris. Vivamus arcu. Integer
+pharetra magna ac lacus. Aliquam vitae sapien in nibh vehicula
+auctor. Suspendisse leo mauris, pulvinar sed, tempor et, consequat
+ac, lacus. Proin velit. Nulla semper lobortis mauris. Duis urna
+erat, ornare et, imperdiet eu, suscipit sit amet, massa. Nulla nulla
+nisi, pellentesque at, egestas quis, fringilla eu, diam.
+.PP
+Donec semper, sem nec tristique tempus, justo neque commodo nisl,
+ut gravida sem tellus suscipit nunc. Aliquam erat volutpat. Ut
+tincidunt pretium elit. Aliquam pulvinar. Nulla cursus. Suspendisse
+potenti. Etiam condimentum hendrerit felis. Duis iaculis aliquam
+enim. Donec dignissim augue vitae orci. Curabitur luctus felis a
+metus. Cum sociis natoque penatibus et magnis dis parturient montes,
+nascetur ridiculus mus. In varius neque at enim. Suspendisse massa
+nulla, viverra in, bibendum vitae, tempor quis, lorem.
+.PP
+Donec dapibus orci sit amet elit. Maecenas rutrum ultrices lectus.
+Aliquam suscipit, lacus a iaculis adipiscing, eros orci pellentesque
+nisl, non pharetra dolor urna nec dolor. Integer cursus dolor vel
+magna. Integer ultrices feugiat sem. Proin nec nibh. Duis eu dui
+quis nunc sagittis lobortis. Fusce pharetra, enim ut sodales luctus,
+lectus arcu rhoncus purus, in fringilla augue elit vel lacus. In
+hac habitasse platea dictumst. Aliquam erat volutpat. Fusce iaculis
+elit id tellus. Ut accumsan malesuada turpis. Suspendisse potenti.
+Vestibulum lacus augue, lobortis mattis, laoreet in, varius at,
+nisi. Nunc gravida. Phasellus faucibus. In hac habitasse platea
+dictumst. Integer tempor lacus eget lectus. Praesent fringilla augue
+fringilla.
+.PP
+Pellentesque aliquam quam vel dolor. Nunc adipiscing. Sed quam odio,
+tempus ac, aliquam molestie, varius ac, tellus. Vestibulum ut nulla
+aliquam risus rutrum interdum. Pellentesque lorem. Curabitur sit
+amet erat quis risus feugiat viverra. Pellentesque augue justo,
+sagittis et, lacinia at, venenatis non, arcu. Nunc nec libero. In
+cursus dictum risus. Etiam tristique nisl a nulla. Ut a orci.
+.TOC
+.\" Local Variables:
+.\" mode: nroff
+.\" End:
+.\" vim: filetype=groff:
diff --git a/contrib/mom/examples/copyright-default.mom b/contrib/mom/examples/copyright-default.mom
new file mode 100644
index 0000000..25a428f
--- /dev/null
+++ b/contrib/mom/examples/copyright-default.mom
@@ -0,0 +1,149 @@
+.\" -*- mode: text; coding: utf-8; -*-
+\#
+\# Copyright (C) 2019-2020 Free Software Foundation, Inc.
+\#
+\# Copying and distribution of this file, with or without modification,
+\# are permitted in any medium without royalty provided the copyright
+\# notice and this notice are preserved.
+\#
+.ig
+***Template for created a copyright page, DOCTYPE DEFAULT***
+
+Mom documents comprised of titled sections using DOCTYPE DEFAULT
+(e.g. a collection of articles or a book of short stories by
+different authors) require the START macro to begin each new
+section, and the COLLATE macro to join it to the subsequent section.
+.
+A copyright page (also called an edition page) should be treated
+as a titled section. The text of the copyright page is entered
+after START and joined to the next major section (i.e. the beginning
+of a document's content) with COLLATE.
+.
+Copyright pages are not identified by a title or heading, however
+they require a TITLE in order to be included in PDF viewer outlines
+and, if desired, the Table of Contents. Supplying '.TITLE "Copyright"'
+but disabling the DOCHEADER achieves both these requirements.
+.
+Pagination should also be disabled for the copyright page. Both
+docheader and pagination should be re-enabled before the START of
+the first (titled) section of the document.
+..
+.
+.\" Cover and PDF viewer setup
+.
+.\" By default, mom uses the last TITLE macro before START for the
+.\" title that appears on the cover. Since the TITLE is "Copyright,"
+.\" mom needs to be told explicitly to use a different title.
+.
+.TITLE DOC_COVER \
+ "Document Title"
+.EDITOR DOC_COVER \
+ "Document Editor"
+.ATTRIBUTE_STRING DOC_COVER \
+ "Edited by"
+.DOC_COVER \
+ TITLE EDITOR
+.PDF_TITLE \
+ "DOCTYPE DEFAULT with copyright page" \" For PDF viewer titlebar
+.
+.\" Copyright page setup
+.
+.PRINTSTYLE TYPESET
+.DOCHEADER off 1i \" Turn off docheader for copyright page.
+. \" Begin text 1 inch from page top.
+.PAGINATION off \" Disable pagination for copyright page.
+.
+.TITLE "Copyright" \" Required for PDF viewer outline; does not
+. \" get printed because docheader is disabled.
+.
+.NO_TOC_ENTRY \" So copyright page is not included in the TOC
+.
+.START \" Begin copyright page
+All rights reserved. No part of this publication may be reproduced,
+distributed, or transmitted in any form or by any means, including
+photocopying, recording, or other electronic or mechanical methods,
+without the prior written permission of the publisher, except
+in the case of brief quotations embodied in critical reviews
+and certain other noncommercial uses permitted by copyright
+law. For permission requests, write to the publisher, addressed
+“Attention: Permissions Coordinator,” at the address below.
+.SP
+.LEFT
+Copyright \[co]2019 Copyright Holder
+.SP
+Additional information...
+.TOC_AFTER_HERE \" Place TOC after copyright page.
+.
+.COLLATE
+.
+.\" Sample article setup
+.
+.TITLE \
+ "Sample article" \" Title of first article
+.AUTHOR \
+ "Article Author"
+.DOCHEADER \" Re-enable docheader.
+.PAGINATE \" Re-enable pagination.
+.PAGENUMBER 1
+.
+.START
+.PP
+Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed at
+ante. Mauris eleifend, quam a vulputate dictum, massa quam dapibus
+leo, eget vulputate orci purus ut lorem. In fringilla mi in ligula.
+Pellentesque aliquam quam vel dolor. Nunc adipiscing. Sed quam odio,
+tempus ac, aliquam molestie, varius ac, tellus. Vestibulum ut nulla
+aliquam risus rutrum interdum. Pellentesque lorem. Curabitur sit
+amet erat quis risus feugiat viverra. Pellentesque augue justo,
+sagittis et, lacinia at, venenatis non, arcu. Nunc nec libero. In
+cursus dictum risus. Etiam tristique nisl a nulla. Ut a orci.
+Curabitur dolor nunc, egestas at, accumsan at, malesuada nec, magna.
+.PP
+Nulla facilisi. Nunc volutpat. Vestibulum ante ipsum primis in
+faucibus orci luctus et ultrices posuere cubilia Curae; Ut sit
+amet orci vel mauris blandit vehicula. Nullam quis enim. Integer
+dignissim viverra velit. Curabitur in odio. In hac habitasse platea
+dictumst. Ut consequat, tellus eu volutpat varius, justo orci
+elementum dolor, sed imperdiet nulla tellus ut diam. Vestibulum
+ipsum ante, malesuada quis, tempus ac, placerat sit amet, elit.
+.PP
+Sed eget turpis a pede tempor malesuada. Vivamus quis mi at leo
+pulvinar hendrerit. Cum sociis natoque penatibus et magnis dis
+parturient montes, nascetur ridiculus mus. Pellentesque aliquet
+lacus vitae pede. Nullam mollis dolor ac nisi. Phasellus sit amet
+urna. Praesent pellentesque sapien sed lacus. Donec lacinia odio
+in odio. In sit amet elit. Maecenas gravida interdum urna. Integer
+pretium, arcu vitae imperdiet facilisis, elit tellus tempor nisi,
+vel feugiat ante velit sit amet mauris. Vivamus arcu. Integer
+pharetra magna ac lacus. Aliquam vitae sapien in nibh vehicula
+auctor. Suspendisse leo mauris, pulvinar sed, tempor et, consequat
+ac, lacus. Proin velit. Nulla semper lobortis mauris. Duis urna
+erat, ornare et, imperdiet eu, suscipit sit amet, massa. Nulla nulla
+nisi, pellentesque at, egestas quis, fringilla eu, diam.
+.PP
+Donec semper, sem nec tristique tempus, justo neque commodo nisl,
+ut gravida sem tellus suscipit nunc. Aliquam erat volutpat. Ut
+tincidunt pretium elit. Aliquam pulvinar. Nulla cursus. Suspendisse
+potenti. Etiam condimentum hendrerit felis. Duis iaculis aliquam
+enim. Donec dignissim augue vitae orci. Curabitur luctus felis a
+metus. Cum sociis natoque penatibus et magnis dis parturient montes,
+nascetur ridiculus mus. In varius neque at enim. Suspendisse massa
+nulla, viverra in, bibendum vitae, tempor quis, lorem.
+.PP
+Donec dapibus orci sit amet elit. Maecenas rutrum ultrices lectus.
+Aliquam suscipit, lacus a iaculis adipiscing, eros orci pellentesque
+nisl, non pharetra dolor urna nec dolor. Integer cursus dolor vel
+magna. Integer ultrices feugiat sem. Proin nec nibh. Duis eu dui
+quis nunc sagittis lobortis. Fusce pharetra, enim ut sodales luctus,
+lectus arcu rhoncus purus, in fringilla augue elit vel lacus. In
+hac habitasse platea dictumst. Aliquam erat volutpat. Fusce iaculis
+elit id tellus. Ut accumsan malesuada turpis. Suspendisse potenti.
+Vestibulum lacus augue, lobortis mattis, laoreet in, varius at,
+nisi. Nunc gravida. Phasellus faucibus. In hac habitasse platea
+dictumst. Integer tempor lacus eget lectus. Praesent fringilla augue
+fringilla dui.
+.TOC
+.\" Local Variables:
+.\" mode: nroff
+.\" End:
+.\" vim: filetype=groff:
diff --git a/contrib/mom/examples/elvis_syntax b/contrib/mom/examples/elvis_syntax
new file mode 100644
index 0000000..b5735bf
--- /dev/null
+++ b/contrib/mom/examples/elvis_syntax
@@ -0,0 +1,96 @@
+" Copyright (C) 2004-2020 Free Software Foundation, Inc.
+"
+" Copying and distribution of this file, with or without modification,
+" are permitted in any medium without royalty provided the copyright
+" notice and this notice are preserved.
+
+#Mom
+language mom
+extension .mom .tmac
+
+startword .
+color startword normal
+
+inword _.'
+color inword normal
+
+other initialpunct
+mostly normal
+
+backslash none
+
+color args like fixed
+color braces like char
+color brackets like underlined
+color chars like emphasized
+color decimals like number
+color ellipsis normal
+color escapes like keyword
+color math like cursor
+color misc like string
+color operators like string
+color parens like comment
+color reg_string like math
+color tmac_escapes like keyword
+color single_slash like char
+
+font args DA DE EN ES FR IT NL NO PT SV
+font args DEFAULT CHAPTER NAMED LETTER
+font args TYPESET TYPEWRITE
+font args FINAL DRAFT
+font args BLOCK QUAD
+font args LEFT RIGHT CENTER CENTRE JUSTIFY TOP BOTTOM L R C J
+font args OFF QUIT END EXIT DONE NO ALL
+font args PAGE NUMBER STAR
+font args LETTER LEGAL EXECUTIVE LEDGER TABLOID QUARTO FOLIO
+font args 10x14 A3 A4 A5 B4 B5
+font args SINGLESPACE
+font args FACTOR
+font args DASH BULLET ALPHA DIGIT USER
+font args RGB CYM CMYK GRAY GREY
+font args COND CONDX EXT EXTX SUP SUPX CONDSUP CONDSUPX EXTSUP EXTSUPX
+font args BOLDER BOLDERX SLANT SLANTX
+font args UP DOWN BCK FWD BU BP FU FP
+font args ROM IT BD BDI PREV
+font args ST
+font args SUSPEND RESUME
+
+prefix { \{ \{\
+font braces { \{ \{\
+prefix [ ]
+font brackets [ ]
+prefix \(bu \(co \(ct \(de \(dg \(di \(em \(en \(mu \(pl \(rg \(sc \(sq \(lq \(rq
+font chars \(bu \(co \(ct \(de \(dg \(di \(em \(en \(mu \(pl \(rg \(sc \(sq \(lq \(rq
+prefix \(14 \(12 \(34 \(+-
+font chars \(14 \(12 \(34 \(+-
+prefix \fR \fB \fI \fP \f0 \f1 \f2 \f3
+font chars \fR \fB \fI \fP \f0 \f1 \f2 \f3
+prefix .0 .1 .2 .3 .4 .5 .6 .7 .8 .9
+font decimals . .0 .1 .2 .3 .4 .5 .6 .7 .8 .9
+prefix \/ \/. \/? \/! \/, \/; \/:
+font escapes \/ \/. \/? \/! \/, \/; \/:
+prefix \, \,. \,? \,! \,, \,; \,:
+font escapes \, \,. \,? \,! \,, \,; \,:
+prefix \~ \0 \: \| \^ \& \% \!
+font escapes \~ \0 \: \| \^ \& \% \!
+prefix \b \c \C \d \D \e \f \f( \h \l \L \p \r \s \s+ \s- \S \u \v \w
+font escapes \b \c \C \d \D \e \f \f( \h \l \L \p \r \s \s+ \s- \S \u \v \w
+prefix ...
+font ellipsis ...
+prefix + - * / = == < > <= >= <? >? %
+font math + - * / = == < > <= >= <? >? %
+prefix |
+font misc |
+prefix ! : &
+font operators ! : &
+prefix ( )
+font parens ( )
+prefix # * $
+font reg_string # * $
+prefix \n \* \[
+font single_slash \n \* \[
+prefix \\n \\* \\$
+font tmac_escapes \\n \\* \\$
+
+comment \#
+comment \"
diff --git a/contrib/mom/examples/elvis_syntax.new b/contrib/mom/examples/elvis_syntax.new
new file mode 100644
index 0000000..5dadecc
--- /dev/null
+++ b/contrib/mom/examples/elvis_syntax.new
@@ -0,0 +1,116 @@
+" Copyright (C) 2004-2020 Free Software Foundation, Inc.
+"
+" Copying and distribution of this file, with or without modification,
+" are permitted in any medium without royalty provided the copyright
+" notice and this notice are preserved.
+
+" Steve Kirkendall has thoughtfully reworked elvis's syntax
+" highlighting so that it now supports nroff constructs like \fBword
+" and \(emword, with \fB and \(em being highlighted while "word" is
+" not.
+"
+" There are some other enhancements as well, making it possible
+" to have any word beginning with punctuation (i.e. groff
+" requests) highlighted. I've decided to take advantage of these
+" improvements, which apply to elvis-2.2h onwards, and write a new
+" simplified set of syntax highlighting rules for mom. Just plug
+" this file at the end of /etc/elvis/elvis.syn to use them.
+"
+" If you're using an older version of elvis, stick with the
+" highlighting rules in the files elvis_syntax.
+
+#Mom
+language mom
+extension .mom .tmac
+
+startword .
+color startword normal
+
+inword _.'
+color inword normal
+
+other initialpunct
+mostly normal
+
+backslash none
+
+color args like fixed
+color braces like char
+color brackets like underlined
+color chars like emphasized
+color decimals normal
+color ellipsis normal
+color escapes like keyword
+color math like cursor
+color misc like string
+color operators like string
+color parens like comment
+color reg_string like math
+color tmac_escapes like keyword
+color single_slash like char
+
+font args DA DE EN ES FR IT NL NO PT SV
+font args DEFAULT CHAPTER NAMED LETTER
+font args TYPESET TYPEWRITE
+font args FINAL DRAFT
+font args BLOCK QUAD
+font args LEFT RIGHT CENTER CENTRE JUSTIFY TOP BOTTOM L R C J
+font args OFF QUIT END EXIT DONE NO ALL
+font args PAGE NUMBER STAR LINE
+font args LETTER LEGAL EXECUTIVE LEDGER TABLOID QUARTO FOLIO
+font args 10x14 A3 A4 A5 B4 B5
+font args SINGLESPACE
+font args FACTOR
+font args DASH BULLET ALPHA DIGIT USER ROMAN roman alpha
+font args SUSPEND RESUME
+font args RGB CYM CMYK GRAY GREY
+font args COND CONDX EXT EXTX SUP SUPX CONDSUP CONDSUPX EXTSUP EXTSUPX
+font args BOLDER BOLDERX SLANT SLANTX
+font args UP DOWN BCK FWD BU BP FU FP FN_MARK EN_MARK
+font args ROM IT BD BDI PREV
+font args ST
+font args COVER DOC_COVER
+font args COVERTITLE DOCTITLE TITLE CHAPTER CHAPTER_TITLE CHAPTER+TITLE SUBTITLE
+font args AUTHOR DOCTYPE COPYRIGHT MISC
+font args NULL BLANKPAGE NOBREAK
+
+prefix { \{ \} \{\ }
+font braces { \{ \} \{\ }
+prefix [ ]
+font brackets [ ]
+prefix \(bu \(co \(ct \(de \(dg \(di \(em \(en \(mu \(pl \(rg \(sc \(sq \(lq \(rq
+font chars \(bu \(co \(ct \(de \(dg \(di \(em \(en \(mu \(pl \(rg \(sc \(sq \(lq \(rq
+prefix \(14 \(12 \(34 \(+-
+font chars \(14 \(12 \(34 \(+-
+prefix \fR \fB \fI \fP \f0 \f1 \f2 \f3
+font chars \fR \fB \fI \fP \f0 \f1 \f2 \f3
+prefix .0 .1 .2 .3 .4 .5 .6 .7 .8 .9
+font decimals . .0 .1 .2 .3 .4 .5 .6 .7 .8 .9
+prefix \/ \/. \/? \/! \/, \/; \/:
+font escapes \/ \/. \/? \/! \/, \/; \/:
+prefix \, \,. \,? \,! \,, \,; \,:
+font escapes \, \,. \,? \,! \,, \,; \,:
+prefix \~ \0 \: \| \^ \& \% \!
+font escapes \~ \0 \: \| \^ \& \% \!
+prefix \b \c \C \d \D \e \f \f( \h \l \L \p \r \s \s+ \s- \S \u \v \w
+font escapes \b \c \C \d \D \e \f \f( \h \l \L \p \r \s \s+ \s- \S \u \v \w
+prefix ...
+font ellipsis ...
+prefix + - * / = == < > <= >= <? >? %
+font math + - * / = == < > <= >= <? >? %
+prefix |
+font misc |
+prefix ! : &
+font operators ! : &
+prefix ( )
+font parens ( )
+prefix # * $
+font reg_string # * $
+prefix \n \*
+font single_slash \n \*
+prefix \\n \\* \\$
+font tmac_escapes \\n \\* \\$
+
+character \]'
+comment \#
+comment \"
diff --git a/contrib/mom/examples/letter.mom b/contrib/mom/examples/letter.mom
new file mode 100644
index 0000000..6e1a0c0
--- /dev/null
+++ b/contrib/mom/examples/letter.mom
@@ -0,0 +1,46 @@
+.\" -*- mode: text; coding: utf-8; -*-
+\#
+\# Copyright (C) 2004-2020 Free Software Foundation, Inc.
+\#
+\# Copying and distribution of this file, with or without modification,
+\# are permitted in any medium without royalty provided the copyright
+\# notice and this notice are preserved.
+\#
+.AUTHOR "Yannick P. Guique"
+.DOCTYPE LETTER
+.PRINTSTYLE TYPESET
+.START
+.DATE
+August 25, 2013
+.TO
+GUILLAUME BARRIÈRES
+Minidoux Corporation
+5000 Pannes Drive
+Redmond, Virginia
+USA
+.FROM
+Y.P. GUIQUE
+022 Umask Road
+St-Sauveur-en-dehors-de-la-mappe, Québec
+CANADA
+.GREETING
+Dear Mr. Barrières,
+.PP
+It has come to my attention that you have been lobbying the
+US government to prohibit the use of open source software by
+endeavouring to outlaw so-called "warranty free" applications.
+.PP
+I feel it is my duty to inform you that the success of your
+operating system with its embedded web browser relies heavily
+on open source programs and protocols, most notably TCP/IP.
+.PP
+Therefore, in the interests of your corporation's fiscal health,
+I strongly advise that you withdraw support for any US
+legislation that would cripple or render illegal open source
+development.
+.CLOSING
+Sincerely,
+.\" Local Variables:
+.\" mode: nroff
+.\" End:
+.\" vim: filetype=groff:
diff --git a/contrib/mom/examples/mom-pdf.mom b/contrib/mom/examples/mom-pdf.mom
new file mode 100644
index 0000000..15cf6df
--- /dev/null
+++ b/contrib/mom/examples/mom-pdf.mom
@@ -0,0 +1,620 @@
+.\" -*- mode: text; coding: utf-8; -*-
+.\"
+.\" Copyright (C) 2012-2020 Free Software Foundation, Inc.
+.\"
+.\" This file is part of mom, which is part of groff, a free software
+.\" project.
+.\"
+.\" You can redistribute it and/or modify it under the terms of the
+.\" GNU General Public License as published by the "Free Software
+ \" Foundation", version\~2.
+.\"
+.\" The license text is available on the internet at
+.\" <http://www.gnu.org/licenses/gpl-2.0.html>
+.\"
+.PAPER A4
+.\" Reference macros (metadata)
+.TITLE "Producing PDFs" "with groff and mom"
+.PDF_TITLE "\*[$TITLE]
+.COPYRIGHT "20\*[BU3]1\*[BU2]5, 20\*[BU3]1\*[BU2]7 Free Software Foundation
+.AUTHOR "Deri James" "\*[UP .5p]and" "Peter Schaffter"
+.\" Cover author style
+.COVER_AUTHOR_STYLE \
+ LEAD 15 \
+ SPACE -.5v
+.\" Docheader author style
+.AUTHOR_STYLE \
+ LEAD 14 \
+ SPACE -.75
+.ATTRIBUTE_STRING "" \" Don't print 'by'
+.\"
+.PDF_BOOKMARKS_OPEN 2
+.\" Formatting style, margins
+.PRINTSTYLE TYPESET
+.L_MARGIN 2.5c
+.R_MARGIN 2.5c
+.B_MARGIN 2.5c
+.\" General defaults
+.FAM H
+.FT R
+.PT_SIZE 10.5
+.AUTOLEAD 3
+.PARA_INDENT 0 \" No indent because we're spacing paragraphs.
+.COVERTEXT
+.SP .5v
+.QUAD CENTER
+.HY off
+.IB 8P
+.\" Copyright notice
+This file is part of groff.
+.SP .5v
+Groff is free software. You can redistribute it
+and\*[FU3]/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.
+.SP .5v
+You should have received a copy of the GNU
+General Public License along with this program.
+If not, see:
+.SP .25v
+.PDF_LINK_COLOR 0.0 0.3 0.9
+.PDF_WWW_LINK http://www.gnu.org/licenses/
+.IQ CLEAR
+.HY
+.COVERTEXT end
+.\" Cover and page header
+.COVER TITLE AUTHOR COPYRIGHT COVERTEXT
+.HEADER_LEFT "James, Schaffter"
+.\"
+.COVER_LEAD +3.5
+.DOCHEADER_LEAD +3.5
+.\" Color for code snippets
+.NEWCOLOUR dark-grey RGB #343434
+.\" Make QUOTE look like CODE
+.QUOTE_STYLE \
+ FAMILY C \
+ FONT B \
+ SIZE +1.5 \
+ COLOR dark-grey \
+ INDENT 9p
+.\"
+.CODE_STYLE \
+ FONT B \
+ SIZE 115 \
+ COLOR dark-grey
+.CONDENSE 87 \" Condense percentage used in COD
+.\"
+.HEADING_STYLE 1 \
+ NUMBER \
+ FONT B \
+ SIZE +1 \
+ BASELINE_ADJUST \n[.v]/5
+.HEADING_STYLE 2 \
+ NUMBER \
+ FONT I \
+ SIZE +.25 \
+ BASELINE_ADJUST \n[.v]/5
+.\"
+.FOOTNOTE_SIZE -1
+.\" Character definitions for program names, opts, etc.
+.char \[ghostscript] \*[BD]ghostscript\*[PREV]
+.char \[groff] \*[BD]groff\*[PREV]
+.char \[gropdf] \*[BD]gropdf\*[PREV]
+.char \[grops] \*[BD]grops\*[PREV]
+.char \[man] \*[BD]man\*[PREV]
+.char \[-mom] \*[BD]\-mom\*[PREV]
+.char \[mom] \*[BD]mom\*[PREV]
+.char \[-mpdfmark] \*[BD]\-mpdfmark\*[PREV]
+.char \[ms] \*[BD]ms\*[PREV]
+.char \[pdfmom] \*[BD]pdfmom\*[PREV]
+.char \[pdfroff] \*[BD]pdfroff\*[PREV]
+.char \[-P-e] \*[BD]\-P\-e\*[PREV]
+.char \[-P-p<papersize>] \*[BD]\-P\-p<papersize>\*[PREV]
+.char \[ps2pdf] \*[BD]ps2pdf\*[PREV]
+.char \[psselect] \*[BD]psselect\*[PREV]
+.char \[-T] \*[BD]\-T\*[PREV]
+.char \[-Tpdf] \*[BD]\-Tpdf\*[PREV]
+.char \[-Tps] \*[BD]\-Tps\*[PREV]
+.\" Strings for inline code
+.ds cod \E*[CODE]\&\E*[COND]
+.ds codx \E*[CONDX]\E*[CODE off]\&
+.\" Paragraph spacing
+.PARA_SPACE .3v
+.\" Wrapper around QUOTE
+.de COD
+. QUOTE
+. nop \*[COND]\\$*\*[CONDX]
+. QUOTE OFF
+..
+.\" Table of contents
+.TOC_PADDING 2
+.SPACE_TOC_ITEMS
+.AUTO_RELOCATE_TOC
+.TOC_ENTRY_STYLE 2 FONT I
+.TOC_LEAD 14.5 ADJUST
+.TOC_PADDING 1
+.\"
+.DOCHEADER_ADVANCE 5c \" Begin docheader this distance down from top of page
+.\"
+.NO_SHIM \" Use flex spacing
+.START
+.\"
+.SP .5c
+.HEADING 1 NAMED intro "Introduction"
+.PP
+.RW .12
+PDF documents are intended to be "electronic paper,\*[BU6]" and, as
+such, take advantage of the digital medium in ways that PostScript
+documents do not. Chief amongst these are clickable links that
+point to named destinations, either within the documents themselves
+.PDF_LINK internal PREFIX ( SUFFIX ) "internal links"
+or to remote web pages
+.PDF_LINK external PREFIX ( SUFFIX ), "external links"
+and the generation of a clickable document outline that appears in
+the Contents panel of most PDF viewers.
+.PP
+.RW .01
+Using \[groff] and \[mom] to produce PDF documents results in the
+automatic generation of clickable document outlines (discussed
+below,
+.PDF_LINK outline SUFFIX ), +
+and, if the \*[cod]TOC\*[codx] macro is included in the source file,
+entries in the printable table of contents can be clicked on as well
+when the document is viewed at the screen (see
+.PDF_LINK toc SUFFIX ). +
+.RW 0
+.HEADING 1 NAMED generating "Using groff to generate PDF files"
+.PP
+Groff provides more than one way to generate PDF documents from
+files formatted with the \[mom] macros. One is to call \[groff]
+directly, either with
+.COD "groff [\-Tps] \-mom \-m pdfmark doc.mom | ps2pdf \- doc.pdf
+which pipes output from the \[grops] PostScript driver through
+\[ps2pdf], or
+.COD "groff \-Tpdf \-mom doc.mom > doc.pdf
+which uses the native PDF driver, \[gropdf]. Alternatively, one may
+call the wrapper
+.COD "pdfroff \-mom \-mpdfmark \-\-no-toc doc.mom > doc.pdf
+A fourth, preferred method is to use
+.PDF_LINK pdfmom SUFFIX , "\[pdfmom]"
+which is strongly recommended since it implements the full range
+of PDF features available in \[mom].
+.COD "pdfmom doc.mom > doc.pdf
+One reason to prefer using the native PDF driver (via \[pdfmom] or
+\[-Tpdf]) is that papersizes set within mom source files (see
+.PDF_WWW_LINK https://www.schaffter.ca/mom/momdoc/typesetting.html#page-setup-intro SUFFIX ) \
+ "paper and page setup macros"
+do not require a corresponding \[-P-p<papersize>] flag on the
+command line.
+.PP
+There are other minor differences between the methods, discussed
+.PDF_LINK pdf-diff SUFFIX . "here"
+.RW 0
+.HEADING 1 NAMED links "Creating PDF links with mom"
+.PP
+Often, but not always, links in the body of a PDF document point
+to headings elsewhere in the same document. Creating these links
+is a simple process. First, identify the places to link to
+("destinations"), then link to them from any place in the document.
+.HEADING 2 NAMED naming "Creating destination points at headings"
+.PP
+The first step in creating links to a heading is to give the
+heading a unique destination name. With mom, this is done by
+adding \*[cod]NAMED\|<id>\*[codx] to the HEADING macro, where
+\*[cod]<id>\*[codx] is a unique identifier for the heading. For
+example,
+.PDF_TARGET intro-ex
+.COD "\&.HEADING 1 NAMED intro \[dq]Introduction\[dq]"
+would, in addition to printing the head in the body of the document,
+identify the introduction by the unique id, "intro"\*[BU6]. This
+id, or name, can then be used to create links to the introduction
+from any part of the document.
+.PP
+Furthermore, \*[cod]NAMED\|<id>\*[codx] stores the text of the
+heading for use later on when linking to it (see
+.PDF_LINK internal SUFFIX ). +
+If headings are being numbered, the heading number is prepended.
+.HEADING 2 NAMED target "Creating destination points at arbitrary locations"
+.PP
+Any part of a document can be a link destination, not just headings.
+For example, say you create a table that needs to be referred to
+from other parts of the document. You'd identify the location of
+the table by placing
+.COD "\&.PDF_TARGET <id> \[dq]<text>\[dq]"
+just above the table in the source file. As with
+\*[cod]HEADING\*[codx], \*[cod]<id>\*[codx] is any unique name.
+\*[cod]<text>\*[codx] is optional. \*[cod]<id>\*[codx] can now be linked
+to from anywhere in the document.
+.SP 2.5p
+.HEADING 2 NAMED internal "Creating internal links"
+.PP
+Internal links are clickable text areas that allow you to jump to
+named destinations within a document. (See
+.PDF_LINK external "here"
+for a description of external links.)
+.PP
+Internal links are created with the macro \*[cod]PDF_LINK\*[codx],
+which takes the form
+.COD "\&.PDF_LINK <id> [PREFIX <text>] [SUFFIX <text>] \
+\[dq]<hotlink text>\[dq]"
+where \*[cod]<id>\*[codx] is a named destination point elsewhere in
+the document (see
+.PDF_LINK naming +
+and
+.PDF_LINK target SUFFIX ). +
+.PP
+\*[cod]PREFIX\|<text>\*[codx] and \*[cod]SUFFIX\|<text>\*[codx], both or
+either of which are optional, are printed around the clickable area
+but do not form part of the link itself.
+.PP
+\*[cod]<hotlink text>\*[codx] is the text that should be clickable,
+identifiable in the PDF document by the colour assigned to links
+(see
+.PDF_LINK colour SUFFIX ). +
+.PDF_TARGET expando
+.PP
+If the hotlink text ends in \*[cod]\[dq]*\[dq]\*[codx]\*[BU9],
+the asterisk is replaced by the text of the destination
+point, assuming it's a heading. If the hotlink text ends in
+\*[cod]\[dq]+\[dq]\*[codx]\*[BU9], the replacement text is surrounded
+by quotes.
+.PP
+Using our
+.PDF_LINK intro-ex SUFFIX , "HEADING example"
+.RW .1
+above, the following invocation of \*[cod]PDF_LINK\*[codx] would
+produce a click\%able link to the introduction:
+.COD "\&.PDF_LINK intro PREFIX ( SUFFIX ). \[dq]see: +\[dq]"
+.RW 0
+In the text, the link would look like this:
+.PDF_LINK intro PREFIX ( SUFFIX ). "see: +"
+.HEADING 2 NAMED external "Creating external links"
+.PP
+External links are clickable text areas whose destination is a
+URL. Clicking on them causes a browser window to pop up with the
+destination address.
+.PP
+The format of the macro to create external links is similar to the
+one for creating internal links:
+.COD "\&.PDF_WWW_LINK <url> [PREFIX <text>] [SUFFIX <text>] [\[dq]<hotlink text>\[dq]]"
+\*[cod]<url>\*[codx] is any valid URL, usually a web address;
+\*[cod]PREFIX\|<text>\*[codx] and \*[cod]SUFFIX\|<text>\*[codx] have
+exactly the same meaning, as does \*[cod]<hotlink text>\*[codx],
+which furthermore accepts the same expandos, \*[cod]\[dq]+\[dq]\*[codx] and
+\*[cod]\[dq]*\[dq]\*[codx].
+.PP
+.RW .1
+If no hotlink text is given, then \*[cod]<url>\*[codx] is
+used as the text. If hotlink text is given and ends in
+\*[cod]\[dq]*\[dq]\*[codx]\*[BU9], the asterisk is replaced by the
+URL. If it ends in \*[cod]\[dq]+\[dq]\*[codx]\*[BU9], the URL is
+surrounded by quotes. As an example,
+.RW 0
+.COD "\&.PDF_WWW_LINK https://www.schaffter.ca/mom/momdoc/toc.html
+would open mom's online documentation at
+.PDF_WWW_LINK https://www.schaffter.ca/mom/momdoc/toc.html SUFFIX "."
+The same, with \*[cod]\[dq]here\[dq]\*[codx] supplied as
+hotlink text, lets you click
+.PDF_WWW_LINK https://www.schaffter.ca/mom/momdoc/toc.html "here"
+instead.
+.HEADING 2 NAMED colour "Assigning a colour to links"
+.PP
+The colour of links is set with
+.COD "\&.PDF_LINK_COLOR <xcolor> | <newcolor> | <r g b> | <#rrggbb>
+where \*[cod]<xcolor>\*[codx] or \*[cod]<newcolor>\*[codx] are the names
+of colours already initialized with
+.PDF_WWW_LINK https://www.schaffter.ca/mom/momdoc/color.html#xcolor "XCOLOR"
+or
+.PDF_WWW_LINK https://www.schaffter.ca/mom/momdoc/color.html#newcolor SUFFIX . "NEWCOLOR"
+If you prefer to define a new colour (using the RGB colour scheme),
+enter it either as 3 numbers between
+0.0 \*[UP 1p]\[->]\*[DOWN 1p] 1\*[BU4].0
+or as a 6 character hex string. Thus
+.SP .5v
+\*[FWD 6p]\*[cod].PDF_LINK_COLOR #ff0000\*[codx]
+\ \*[SIZE -.5]and\*[SIZE]\ \"
+\*[cod].PDF_LINK_COLOR 1.0 0 0\*[codx]
+.SP .5v
+both lead to mom using
+.PDF_LINK_COLOR 1 0 0
+.PDF_LINK colour red
+.PDF_LINK_COLOR
+links.
+.PP
+The default colour can be restored by calling
+\*[cod]PDF_LINK_COLOR\*[codx] with no parameter.
+.FLOAT
+.JUSTIFY
+.BOX-NOTE 3P
+\*[BD]Note:\*[PREV]
+The decimal scheme for creating colours must be used if a file is to
+be processed with
+\[oq]\[groff]\~\[-Tps]\~\[-mpdfmark]\[cq],
+\[oq]\[pdfroff]\[cq], or
+\[oq]\[pdfmom]\~\[-Tps]\[cq].
+.IBQ
+.FLOAT off
+.SP .5v
+.HEADING 1 NAMED outline "The PDF Outline"
+.PP
+Most PDF viewers provide a panel that displays a document's outline,
+similar to a table of contents. Clicking on an entry navigates
+directly to the appropriate place in the document.
+.PP
+Mom generates PDF outlines the same way she populates
+her own table of contents: by intercepting calls to the
+\*[cod]HEADING\*[codx] macro, as well as to the various title
+and chapter macros used in namimg documents, and allocating each a
+hierarchic level.
+.PP
+Covers, titles/chapters, and the table of contents are all
+assigned to level 1\*[BU5]. Subsequent headings are assigned to
+n\*[UP 1p]+\*[DOWN 1p]\*[BU4]1, where n is the level given to
+\*[cod]HEADING\*[codx].
+.PP
+.RW .22
+The PDF outline can sensibly recover from skipped or omitted heading
+levels; the printed table of contents cannot. Users are therefore
+advised to use headings in logical order, not for typographic
+effects.
+.RW 0
+.HEADING 2 NAMED open-close "Opening and closing levels
+.PP
+A level is said to be open if one or more levels beneath it is
+visible in the PDF outline. Closed \%levels have at least one level
+beneath them that is not visible unless the closed link is clicked.
+It is common for only the first two levels to be open so the outline
+doesn't look cluttered.
+.PP
+To establish which levels should be open by default when a document
+loads, use
+.COD "\&.PDF_BOOKMARKS_OPEN n
+where \*[cod]n\*[codx] is a number specifying at which level all
+subsequent ones should be closed.
+.PP
+If, at any point in the document, you specify
+.COD "\&.PDF_BOOKMARKS_OPEN NO \e\[dq] or any other text argument
+then all subsequent bookmarks will be closed until
+\*[cod]PDF_BOOKMARKS_OPEN\*[codx] opens them again.
+.HEADING 2 NAMED disabling "Suspending/disabling collection of outline entries
+.PP
+Suspending the collection of entries for the PDF outline is
+accomplished with
+.COD "\&.PDF_BOOKMARKS OFF
+Mom's default is to collect entries, so if the command is placed at
+the start of a document, it \%disables entry collection completely.
+Elsewhere, it suspends collection until you re-enable it with
+.COD "\&.PDF_BOOKMARKS \e\[dq] i.e. with no parameter
+.SP -1
+.HEADING 2 NAMED pdf:title "The PDF window title"
+.PP
+While not strictly part of the PDF outline, the title of a document
+can be displayed as the document viewer's window title. The macro
+to accomplish this is
+.COD "\&.PDF_TITLE\ \[dq]<window title>\[dq]
+It can take any text, so the viewer window title need not be the
+same as the document's title.
+.FLOAT
+.JUSTIFY
+.BOX-NOTE 4P+8p
+\*[BD]Note:\*[PREV] The macro, \*[cod]DOC_TITLE\*[codx], always
+invokes \*[cod]PDF_TITLE\*[codx]. If this is not what you want, you
+can remove the window title by issuing
+.COD ".PDF_TITLE \[dq]\[dq] \e\[dq] ie. with a blank argument
+.IBQ
+.FLOAT off
+\#.SP .5v
+.HEADING 1 NAMED toc "Tables of Contents"
+.RLD .5v
+.HEADING 2 NAMED toc:gen "Generating a Table of Contents
+.PP
+.RW .1
+To generate a printable Table of Contents for any document, simply
+insert the macro, \*[cod]TOC\*[codx], as the last line of the source
+file. (Formatting of the printable Table of Contents is discussed in
+detail in the
+.PDF_WWW_LINK \
+https://www.schaffter.ca/mom/momdoc/tables-of-contents.html#top \
+SUFFIX ). "mom documentation"
+When the file is processed and loaded in a viewer, entries in the
+Table of Contents will be clickable links.
+.RW 0
+.PP
+Whichever link colour is active at the end of the document, prior to
+\*[cod]TOC\*[codx], will be used for the \%Table of Contents
+links.
+.HEADING 2 NAMED toc:pos "Positioning the Table of Contents"
+.PP
+If \[groff]'s PostScript device (\[-Tps]) is used to process a mom
+file, the Table of Contents is printed at the end of the document.
+When this is not desirable, the PostScript output from \[groff]
+must be processed with \[psselect] in order to place the TOC in the
+preferred location.
+.PP
+When using mom and \[groff]'s native pdf device (via \[pdfmom] or
+\[groff] \[-Tpdf]), positioning of the Table of Contents can be done
+within the source file.
+.PP
+The command to control the placement of the TOC is
+.COD "\&.AUTO_RELOCATE_TOC [<position>]
+where the optional \*[cod]<position>\*[codx] can be one of these
+keywords:
+.LEFT
+.IL 2P
+.SP .25v
+\*[SIZE -.7]TOP\*[FU2]\*[UP .5p]\c
+.FOOTNOTE
+\*[BD]Note:\*[PREV] Documents without a COVER or DOC_COVER require
+the \*[cod]TOP\*[codx] argument.
+.FOOTNOTE off
+\*[IT]\*[SIZE +.2]\
+(ie. at the very start of the document)\*[SIZE -.2]\*[PREV]
+BEFORE_DOCCOVER
+AFTER_DOCCOVER
+BEFORE_COVER
+AFTER_COVER\*[SIZE +.7]
+.SP .25v
+.ILQ
+.JUSTIFY
+It is normally not necessary to supply a keyword, since
+\*[cod]AUTO_RELOCATE_TOC\*[codx] places the TOC after the DOC_COVER,
+if there is one, or the first COVER when no DOC_COVER is present.
+In rare instances where it is desirable to place the TOC somewhere
+else in the document, there are two low-level commands,
+\*[cod].TOC_BEFORE_HERE\*[codx]
+\ \*[SIZE -.5]and\*[SIZE]\ \"
+\*[cod].TOC_AFTER_HERE\*[codx]
+which place the TOC either before or after the current page.
+.PP
+These last two commands have a small catch: although the TOC will
+appear where specified, the \%"Contents" entry in the PDF outline,
+which observes a hierarchy of levels, will assign the TOC to
+level\~\*[BU4]1\*[BU4], possibly disrupting the visual ordering of
+levels in the outline.
+.HEADING 1 NAMED simplify "pdfmom: Simplifying PDF output"
+.PP
+As explained in the section
+.PDF_LINK generating SUFFIX , *
+.RW .15
+there are two established methods
+.RW 0
+for creating PDF files with \[groff]: the original method, ie.
+passing the \[-Tps] and \[-mpdfmark] options to \[groff] (or using
+\[pdfroff], which does this for you); or the newer \[-Tpdf], which
+produces PDF files natively.
+.HEADING 2 NAMED fwd:ref "The problem of forward references"
+.PP
+.EW .2
+Both methods encounter difficulties when dealing with forward
+references; that is, when a link \*[IT]\%earlier\/\*[PREV] in a
+document refers to a destination \*[IT]later\/\*[PREV] in the
+document and the link text terminates
+.EW 0
+with one of the expandos,
+\*[cod]\[dq]*\[dq]\*[codx] or \*[cod]\[dq]+\[dq]\*[codx]
+(explained
+.PDF_LINK expando SUFFIX ). "here"
+Mom doesn't know what text to put in the expando because it has not
+yet been defined. This means that \[groff] must be run multiple
+times to find the unknown text.
+.PP
+.EW .2
+The program \[pdfroff] exists to handle these multiple runs, but it
+imposes some limitations on the PDF features available with \[mom].
+.EW 0
+.HEADING 2 NAMED pdfmom "pdfmom"
+.PP
+\[pdfmom] performs the same function as \[pdfroff], and is the
+preferred, trouble-free way to generate PDF documents from a mom
+source file. Like \[pdfroff], it is a frontend to \[groff] and
+accepts all the same options (see \[man]\~\[groff]).
+.PP
+.EW .2
+Called as-is, \[pdfmom] accepts all the same options as \[groff],
+and requires no additional flags. PDF generation is performed by
+\[gropdf], \[groff]'s native PDF driver:
+.EW 0
+.COD "pdfmom doc.mom [groff opts] > doc.pdf
+If a \[-Tps] option is supplied, \[pdfmom] hands control over to
+\[pdfroff], and both \[groff] and \[pdfroff] options may given.
+The resulting PDF is produced from PostScript output fed into
+\[ghostscript].
+.COD "pdfmom \-Tps [pdfroff opts [groff opts]] doc.mom > doc.pdf
+For either invocation, it is not necessary to add \[-mom] or
+\[-mpdfmark], as these are implied.
+.PP
+.RW .04
+If Encapsulated PostScript or plain PostScript images have been
+embedded in a document with
+.PDF_WWW_LINK https://www.schaffter.ca/mom/momdoc/images.html#pspic SUFFIX , \
+ "PSPIC"
+the \[-Tps] option must be used. In most other cases, \[pdfmom]
+with no \[-T] flag is preferable.
+.RW 0
+.HEADING 2 NAMED papersize "Setting papersize within a source file"
+.PP
+A significant convenience afforded by using \[pdfmom] (or \[groff]
+with the \[-Tpdf] flag) is that papersizes or page dimensions set
+within mom source files (see
+.PDF_WWW_LINK https://www.schaffter.ca/mom/momdoc/typesetting.html#page-setup-intro \
+ SUFFIX ) "paper and page setup macros"
+do not require a corresponding \[-P-p<papersize>] option on the
+command line. It is even possible to create documents with
+unequal-sized pages.
+.HEADING 2 NAMED pdf-diff \
+"Differences between pdfmom and pdfroff"
+.PP
+Several features described in this manual are not available when
+the \[-Tps] option is given to \[pdfmom], nor when using \[pdfroff]
+or \[groff]\~\[-Tps]\~\[-mpdfmark]:
+.SP .25v
+.QUAD LEFT
+.HYPHENATION off
+.IB 16p
+.LIST
+.ITEM
+.PDF_LINK toc:pos "Relocation of the Table of Contents"
+is not supported. The TOC appears at the end of the document;
+\[psselect] must be used to re-order pages.
+.ITEM
+If a link crosses a page boundary, it will stop being a clickable
+hotspot on subsequent pages.
+.ITEM
+When establishing whether PDF outline levels are
+.PDF_LINK open-close SUFFIX , "open or closed"
+only the numerical parameter to \*[cod]PDF_BOOKMARKS_OPEN\*[codx] has
+any effect.
+.ITEM
+.PDF_LINK colour "PDF_LINK_COLOR"
+only accepts colour definitions in decimal notation.
+.LIST OFF
+.IQ
+.HEADING 1 \
+"Comparison of \-Tps\*[FU4]/\*[FU2]\-mpdfmark with \-Tpdf\*[FU4]/\*[FU2]\-mom
+.SP .25v
+.IB
+\[-Tps]\*[FU4]/\*[FU2]\[-mpdfmark]
+.LIST
+.SHIFT_LIST 1P+6p
+.ITEM
+does not support all the features described here
+.ITEM
+accepts images and graphics embedded with PSPIC
+.LIST OFF
+.IQ
+.ALD .4v
+.IB
+\[-Tpdf]\*[FU4]/\*[FU2]\[-mom]
+.LIST
+.SHIFT_LIST 1P+6p
+.ITEM
+facilitates embedding fonts directly in the PDF file (if the
+\[-P-e] flag is given on the command line)
+.ITEM
+sets papersize from within the source file, circumventing the need
+for the papersize flag (\[-P-p<papersize>]) on the command line
+.ITEM
+is not compatible with
+.PDF_WWW_LINK \
+ https://www.schaffter.ca/mom/momdoc/docprocessing.html#printstyle \
+ "PRINTSTYLE TYPEWRITE"
+underlining (e.g., of italics)
+.ITEM
+generally produces larger files; these can be reduced by piping
+the output through \[ps2pdf]\*[B]
+.sp -1.25v
+.BOX OUTLINED black SHADED grey90 WEIGHT 1p INSET 6p
+.JUSTIFY
+\*[BD]Note:\*[PREV] Owing to a known bug, PDF files piped through
+\[ps2pdf] lose some of their metadata, notably the window title set
+with \*[cod]PDF_TITLE\*[codx].
+.BOX STOP
+.SP -.25v
+.LIST OFF
+.TOC
+.\" Local Variables:
+.\" mode: nroff
+.\" End:
+.\" vim: filetype=groff:
diff --git a/contrib/mom/examples/mom.vim b/contrib/mom/examples/mom.vim
new file mode 100644
index 0000000..fe8debf
--- /dev/null
+++ b/contrib/mom/examples/mom.vim
@@ -0,0 +1,140 @@
+" Copyright (C) 2012-2020 Free Software Foundation, Inc.
+"
+" Copying and distribution of this file, with or without modification,
+" are permitted in any medium without royalty provided the copyright
+" notice and this notice are preserved.
+
+" Vim syntax file
+" Language: mom
+" Maintainer: Peter Schaffter (peter@schaffter.ca)
+" Last Change: So 06 Mr 2005 17:28:13 CET
+" Filenames: *.mom
+" URL: http://www.cvjb.de/comp/vim/mom.vim
+" Note: Remove or overwrite troff syntax for *.mom-files with filetype/filedetect.
+" Version: 0.1
+"
+" Mom: Macro set for easy typesetting with troff/nroff/groff.
+
+" For version 5.x: Clear all syntax items
+" For version 6.x: Quit when a syntax file was already loaded
+if version < 600
+ syntax clear
+elseif exists("b:current_syntax")
+ finish
+endif
+
+" Mom is case sensitive
+syn case match
+
+" Synchronization, I know it is a huge number, but normal texts can be
+" _very_ long ;-)
+syn sync lines=1000
+
+" Characters allowed in keywords
+if version >= 600
+ setlocal iskeyword=@,#,$,%,48-57,.,@-@,_,\\,{,},192-255
+else
+ set iskeyword=@,#,$,%,48-57,.,@-@,_,\\,{,},192-255
+endif
+
+" mom/groff macros and requests (the initial dot or single-quote)
+"
+" Highlighting carries through to EOL; macro names, requests and
+" arguments are contained
+syn match startRequest /^\s*\(\.\|'\)\s*.*$/ contains=momMacro,groffCommentLine,groffRequest,momRegister,groffNoLineBreak,momInteger,groffUnit,momString,momSpecialParam,groffDelimiter,groffRegister,groffPreprocessor,groffBraces
+
+" mom macros
+syn region momMacro start=/^\s*\(\.\|'\)\s*\zs[A-Z0-9_(){}\[\]]\+/ end=/\s\+\|$/
+
+" mom registers and strings
+syn match momRegister /\(\$\|#\)[A-Za-z][_0-9A-Za-z]*/ contains=momRegisterStart
+
+syn match momRegisterStart /#\|\$/ contained
+
+" mom comment region
+syn region momCommentRegion matchgroup=startRequest start='\<\.\(COMMENT\)\|\(SILENT\)\>' end='\<\.\(COMMENT\s\+OFF\)\|\(SILENT\s\+OFF\)\>' skip='$'
+
+" groff requests
+syn match groffRequest /^\s*\(\.\|'\)\s*\zs[a-z0-9]\+/
+
+" groff comment region
+syn region groffCommentLine start='\(\\!\)\|\(\\"\)\|\(\\#\)' end='$' contains=momTodo
+syn region groffCommentRegion start="^\s*\.\s*ig" matchgroup=startRequest end="^\.\.$" contains=startRequest
+
+" Preprocessor requests
+syn match groffPreprocessor /[^A-Z]\zs\(EQ\s*$\|EN\s*$\|GS\s*$\|GE\s*$\|GF\s*$\|PS\s*$\|PE\s*$\|R1\s*$\|R2\s*$\|TS\s*$\|TE\s*$\|TH\s*$\)/ contained
+syn match groffPreprocessor /[^A-Z]\zs\(G1\s*$\|G2\s*$\|IS\s*$\|IE\s*$\|cstart\s*$\|cend\s*$\)/ contained
+
+" Preprocessor requests for refer
+syn match groffPreprocessor /\(\[\s*$\|\]\s*$\)/ contained
+
+" Quoted strings
+syn region momString matchgroup=startRequest start='"\zs' end='"\|$' contains=groffNoLineBreak,groffGreek,groffSpecialChar,momInteger,momFloatEN,momFloatDE,momBracketRegion,momBracketError,momSpecialMove contained
+
+" Special characters
+syn match groffSpecialChar '\\\((\|\[\)[-+A-Za-z0-9*<>=~!\/]\+\]*'
+
+" Greek symbols
+syn match groffGreek '\\(\*[A-Za-z]\+'
+
+" Hyphenation marks
+syn match groffHyphenation '\\%'
+
+" Masking of line breaks
+syn match groffNoLineBreak /\\\s*$/ contains=groffBraces
+
+" groff number and string register delimiters
+syn region groffDelimiter start=/\\*\\\(n+*\|\*\)\((\|\[\)\</ end=/\(\s\|\]\|$\)/ contains=momRegister,groffRegister,groffOperators
+
+" groff registers
+syn match groffRegister /\\\((\|\[\)\zs\.*[a-z]\+/
+
+" groff operators
+syn match groffOperators /\(+\|-\|\/\|\*[^[]\)/ contained
+
+" Units (of measure)
+syn match groffUnit '[-+]\=\([0-9]\|]\)\+\zs[icPpvusfz]\=' contained
+
+" Braces
+syn match groffBraces /\(\\{\|\\}\)/ contained
+
+" Error
+syn match groffError '\\\[ \+[[:print:]]\+ \+[[:print:]]\+\]'
+
+" For version 5.7 and earlier: only when not done already
+" For version 5.8 and later: only when an item doesn't have highlighting yet
+if version >= 508 || !exists("did_mom_syn_inits")
+ if version < 508
+ let did_mom_syn_inits = 1
+ command -nargs=+ HiLink hi link <args>
+ else
+ command -nargs=+ HiLink hi def link <args>
+ endif
+
+HiLink groffError Error
+HiLink groffBraces darkmagenta
+HiLink groffCommentLine darkcyan
+HiLink groffCommentRegion cyan
+HiLink groffDelimiter cyan
+HiLink groffGreek cyan
+HiLink groffHyphenation cyan
+HiLink groffNoLineBreak cyan
+HiLink groffOperators white
+HiLink groffPreprocessor brown
+HiLink groffRegister darkgreen
+HiLink groffRequest magenta
+HiLink groffSpecialChar darkcyan
+HiLink groffUnit brown
+HiLink momCommentRegion darkcyan
+HiLink momMacro red
+HiLink momRegister green
+HiLink momRegisterStart magenta
+HiLink momSpecialParam red
+HiLink momString white
+HiLink startRequest yellow
+ delcommand HiLink
+endif
+
+let b:current_syntax = "mom"
+
+" vim:ts=8:sw=4:nocindent:smartindent:
diff --git a/contrib/mom/examples/mon_premier_doc.mom b/contrib/mom/examples/mon_premier_doc.mom
new file mode 100644
index 0000000..3497c06
--- /dev/null
+++ b/contrib/mom/examples/mon_premier_doc.mom
@@ -0,0 +1,140 @@
+.\" -*- mode: text; coding: utf-8; -*-
+\#
+\# Copyright (C) 2015-2020 Free Software Foundation, Inc.
+\#
+\# Copying and distribution of this file, with or without modification,
+\# are permitted in any medium without royalty provided the copyright
+\# notice and this notice are preserved.
+\#
+\# A very simple document with basic elements: headings, paragraphs,
+\# lists, table of contents and clickable links.
+\#
+.TITLE "Mon Premier Document"
+.AUTHOR "Cicéron"
+.
+.DOCTYPE DEFAULT
+.PRINTSTYLE TYPESET
+.
+.PAPER A4
+.DOC_COVERTITLE "Mon Premier Document"
+.DOC_COVER DOC_COVERTITLE AUTHOR
+.COVER TITLE
+.ATTRIBUTE_STRING "par"
+.TOC_HEADER_STRING "Table des matières"
+.AUTO_RELOCATE_TOC
+.HEADING_STYLE 1 NUMBER
+.HEADING_STYLE 2 NUMBER
+.NO_SHIM
+.START
+\#
+.HEADING 1 "Les différentes versions"
+.PP
+Voir également le chapitre sur
+.PDF_LINK evolution "les évolutions"
+possibles.
+.HEADING 2 "La version originale"
+.PP
+Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed non
+risus. Suspendisse lectus tortor, dignissim sit amet, adipiscing nec,
+ultricies sed, dolor. Cras elementum ultrices diam. Maecenas ligula
+massa, varius a, semper congue, euismod non, mi. Proin porttitor, orci
+nec nonummy molestie, enim est eleifend mi, non fermentum diam nisl
+sit amet erat. Duis semper. Duis arcu massa, scelerisque vitae,
+consequat in, pretium a, enim. Pellentesque congue. Ut in risus
+volutpat libero pharetra tempor. Cras vestibulum bibendum augue.
+Praesent egestas leo in pede. Praesent blandit odio eu enim.
+Pellentesque sed dui ut augue blandit sodales. Vestibulum ante ipsum
+primis in faucibus orci luctus et ultrices posuere cubilia Curae;
+Aliquam nibh. Mauris ac mauris sed pede pellentesque fermentum.
+Maecenas adipiscing ante non diam sodales hendrerit.
+.PP
+Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed non
+risus. Suspendisse lectus tortor, dignissim sit amet, adipiscing nec,
+ultricies sed, dolor. Cras elementum ultrices diam. Maecenas ligula
+massa, varius a, semper congue, euismod non, mi. Proin porttitor, orci
+nec nonummy molestie, enim est eleifend mi, non fermentum diam nisl
+sit amet erat. Duis semper. Duis arcu massa, scelerisque vitae,
+consequat in, pretium a, enim. Pellentesque congue. Ut in risus
+volutpat libero pharetra tempor. Cras vestibulum bibendum augue.
+Praesent egestas leo in pede. Praesent blandit odio eu enim.
+Pellentesque sed dui ut augue blandit sodales. Vestibulum ante ipsum
+primis in faucibus orci luctus et ultrices posuere cubilia Curae;
+Aliquam nibh. Mauris ac mauris sed pede pellentesque fermentum.
+Maecenas adipiscing ante non diam sodales hendrerit.
+.PP
+Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed non
+risus. Suspendisse lectus tortor, dignissim sit amet, adipiscing nec,
+ultricies sed, dolor. Cras elementum ultrices diam. Maecenas ligula
+massa, varius a, semper congue, euismod non, mi. Proin porttitor, orci
+nec nonummy molestie, enim est eleifend mi, non fermentum diam nisl
+sit amet erat. Duis semper. Duis arcu massa, scelerisque vitae,
+consequat in, pretium a, enim. Pellentesque congue. Ut in risus
+volutpat libero pharetra tempor. Cras vestibulum bibendum augue.
+Praesent egestas leo in pede. Praesent blandit odio eu enim.
+Pellentesque sed dui ut augue blandit sodales. Vestibulum ante ipsum
+primis in faucibus orci luctus et ultrices posuere cubilia Curae;
+Aliquam nibh. Mauris ac mauris sed pede pellentesque fermentum.
+\#
+.HEADING 2 "La version moderne"
+.PP
+Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed non
+risus. Suspendisse lectus tortor, dignissim sit amet, adipiscing nec,
+ultricies sed, dolor. Cras elementum ultrices diam. Maecenas ligula
+massa, varius a, semper congue, euismod non, mi. Proin porttitor, orci
+nec nonummy molestie, enim est eleifend mi, non fermentum diam nisl
+sit amet erat. Duis semper. Duis arcu massa, scelerisque vitae,
+consequat in, pretium a, enim. Pellentesque congue. Ut in risus
+volutpat libero pharetra tempor. Cras vestibulum bibendum augue.
+Praesent egestas leo in pede. Praesent blandit odio eu enim.
+Pellentesque sed dui ut augue blandit sodales. Vestibulum ante ipsum
+primis in faucibus orci luctus et ultrices posuere cubilia Curae;
+Aliquam nibh. Mauris ac mauris sed pede pellentesque fermentum.
+Maecenas adipiscing ante non diam sodales hendrerit.
+.PP
+Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed non
+risus. Suspendisse lectus tortor, dignissim sit amet, adipiscing nec,
+ultricies sed, dolor. Cras elementum ultrices diam. Maecenas ligula
+massa, varius a, semper congue, euismod non, mi. Proin porttitor, orci
+nec nonummy molestie, enim est eleifend mi, non fermentum diam nisl
+sit amet erat. Duis semper. Duis arcu massa, scelerisque vitae,
+consequat in, pretium a, enim. Pellentesque congue. Ut in risus
+volutpat libero pharetra tempor. Cras vestibulum bibendum augue.
+Praesent egestas leo in pede. Praesent blandit odio eu enim.
+Pellentesque sed dui ut augue blandit sodales. Vestibulum ante ipsum
+primis in faucibus orci luctus et ultrices posuere cubilia Curae;
+Aliquam nibh. Mauris ac mauris sed pede pellentesque fermentum.
+Maecenas adipiscing ante non diam sodales hendrerit.
+\#
+.HEADING 1 NAMED evolution "Les évolutions du Lorem"
+.PP
+Trois axes de progressions sont envisageables:
+.LIST
+.SHIFT_LIST 3m
+.ITEM
+Lorem ipsum dolor sit amet.
+.ITEM
+Consectetur adipiscing elit.
+.ITEM
+.PDF_TARGET sed_non_risus
+Sed non risus.
+.LIST OFF
+Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed non
+risus. Suspendisse lectus tortor, dignissim sit amet, adipiscing nec,
+ultricies sed, dolor. Cras elementum ultrices diam. Maecenas ligula
+massa, varius a, semper congue, euismod non, mi. Proin porttitor, orci
+nec nonummy molestie, enim est eleifend mi, non fermentum diam nisl
+sit amet erat. Duis semper. Duis arcu massa, scelerisque vitae,
+consequat in, pretium a, enim. Pellentesque congue. Ut in risus
+volutpat libero pharetra tempor. Cras vestibulum bibendum augue.
+Praesent egestas leo in pede. Praesent blandit odio eu enim.
+Pellentesque sed dui ut augue blandit sodales. Vestibulum ante ipsum
+primis in faucibus orci luctus et ultrices posuere cubilia Curae;
+Aliquam nibh. Mauris ac mauris sed pede pellentesque fermentum.
+Maecenas adipiscing ante non diam sodales hendrerit.
+\#
+.TOC_RV_SWITCH
+.TOC
+.\" Local Variables:
+.\" mode: nroff
+.\" End:
+.\" vim: filetype=groff:
diff --git a/contrib/mom/examples/penguin.pdf b/contrib/mom/examples/penguin.pdf
new file mode 100644
index 0000000..5e969ea
--- /dev/null
+++ b/contrib/mom/examples/penguin.pdf
@@ -0,0 +1,148 @@
+%PDF-1.4
+1 0 obj
+<<
+/Pages 2 0 R
+/Type /Catalog
+>>
+endobj
+2 0 obj
+<<
+/Type /Pages
+/Kids [ 3 0 R ]
+/Count 1
+>>
+endobj
+3 0 obj
+<<
+/Type /Page
+/Parent 2 0 R
+/Resources <<
+/XObject << /Im0 8 0 R >>
+/ProcSet 6 0 R >>
+/MediaBox [0 0 81 96]
+/CropBox [0 0 81 96]
+/Contents 4 0 R
+/Thumb 11 0 R
+>>
+endobj
+4 0 obj
+<<
+/Length 5 0 R
+>>
+stream
+q
+81 0 0 96 0 0 cm
+/Im0 Do
+Q
+endstream
+endobj
+5 0 obj
+29
+endobj
+6 0 obj
+[ /PDF /Text /ImageC ]
+endobj
+7 0 obj
+<<
+>>
+endobj
+8 0 obj
+<<
+/Type /XObject
+/Subtype /Image
+/Name /Im0
+/Filter [ /RunLengthDecode ]
+/Width 81
+/Height 96
+/ColorSpace 10 0 R
+/BitsPerComponent 8
+/SMask 15 0 R
+/Length 9 0 R
+>>
+stream
+ڄzkeXfmz~фp\QIGJMPXfvфw]PJIJIKHIKNwnKNKJIHIHJPgԄONHJIJHIQi_HIX{ׄQGJIOqgJHR}ڄmNKJHMrx[JMcڄXHKJTvwbJKOsڄsJHIJKISo{YWQKMHZڄ_GIJIJN[`OMKIMJIKtRIHIMJIKJNKNIMKIKJ]ڄJKIKIJKJIJKIJIOׄvMJHNRMJKORSMKIMsׄuKGKQYpmPKJKGHIZ~NIKJHIKouMH[s`MJjnXKJKN\tMG_ZXKJePYKJHIJXڄsMGJKJlJKIHIPڄsMWIJGKJIHOtIX`sVMOfXTKJHIHMڄsJ]HfvxNJogKJIHMzK\O\Z]jFMVn{hJIKSWMNizyKJKnkIJIJIMHԄROWKRJMKO^IJISHnvHIJIJFԄSFO|PIJGRGfhJIJMH]TqMKIJMIMڄe^bKMJIJN~gY]MKIJGIPlԄcKoQJKXBIYԄbNWSHvRM|gM[JKMqINxZHiRJKQmDEDIZvPM`KMJISMJIOtWKI_WKJIN^nNKIPKJITmzcXFk\KNHKJO\~Ņ]gTQNKIKIJK`ZJFQIJKIJIKMsŅmOPMW|GIKIJZ}΅˄zKI^KJIJIMOeSJHM_MKJKIJK˅_KJFXxPKIHIjхfPKJF\YKJKJIJKIJPo˅uNJndJGMINKJINOv΅\NHJWVOw`JIKJIHM]хsOJKJ]ChrXMNIKJOu݅]KNIYMrKNk]KNKJMdׅTOHqsQQJNI_SDEDOKJIR~jMs_KNH`ncwkJKJFMQ݅ZPYGHkPqgSKJKJNvׅwPM}eGNWxeltMIJIK`څdJW}IJmbqwiTQKNIKNTڅYHofBOYNPKGqINHIKt݅vMKPCduMJKG]GNIKcڅ`KetKHHKIJPRHIHJRyM{WKQMKNGHKJIKP{ON\sGKJKJHTHFIJHJMgڅJGfoHIMKIM`IGHIHMblKIesIYSKJmIJIHJIQ݅RMFi{KYRKMKyIJIHKJPhMKQrI^SKIwIJIJOڅbONbKnTKWrKJIO݅XIHX~O|VKHmXKJHIQ݅RJIWZ|PHJR{KNJKJKS݅VIM[uKPm{pWsgXPJMJdKc|iQKJIKJsxWzPhlIJIKJMptZ~݅P`nOJIKJOxqdJZcHMIKJRbQgKdJIJKJFfVQnoJKHKJRGMXXMFHGKYHKJTXQOIStxHKHCPjXIHMJHeKFJGIjJIGQHIKIJHJzgRXpVeJYWHF`^KHMIHqnJKJGHIwmPGKN~KNoq]NKJHKJTYHIHNJIGFDEDJHKGKJIJHYhIJIJIYlJIJHIJ\kHJHIKMKHGHJI^`MQR]hkj_WTQ_څwׅ݄΅݄΅݅ԅ
+endstream
+endobj
+9 0 obj
+7826
+endobj
+10 0 obj
+/DeviceRGB
+endobj
+11 0 obj
+<<
+/Filter [ /RunLengthDecode ]
+/Width 81
+/Height 96
+/ColorSpace 10 0 R
+/BitsPerComponent 8
+/Length 12 0 R
+>>
+stream
+ڄzkeXfmz~фp\QIGJMPXfvфw]PJIJIKHIKNwnKNKJIHIHJPgԄONHJIJHIQi_HIX{ׄQGJIOqgJHR}ڄmNKJHMrx[JMcڄXHKJTvwbJKOsڄsJHIJKISo{YWQKMHZڄ_GIJIJN[`OMKIMJIKtRIHIMJIKJNKNIMKIKJ]ڄJKIKIJKJIJKIJIOׄvMJHNRMJKORSMKIMsׄuKGKQYpmPKJKGHIZ~NIKJHIKouMH[s`MJjnXKJKN\tMG_ZXKJePYKJHIJXڄsMGJKJlJKIHIPڄsMWIJGKJIHOtIX`sVMOfXTKJHIHMڄsJ]HfvxNJogKJIHMzK\O\Z]jFMVn{hJIKSWMNizyKJKnkIJIJIMHԄROWKRJMKO^IJISHnvHIJIJFԄSFO|PIJGRGfhJIJMH]TqMKIJMIMڄe^bKMJIJN~gY]MKIJGIPlԄcKoQJKXBIYԄbNWSHvRM|gM[JKMqINxZHiRJKQmDEDIZvPM`KMJISMJIOtWKI_WKJIN^nNKIPKJITmzcXFk\KNHKJO\~Ņ]gTQNKIKIJK`ZJFQIJKIJIKMsŅmOPMW|GIKIJZ}΅˄zKI^KJIJIMOeSJHM_MKJKIJK˅_KJFXxPKIHIjхfPKJF\YKJKJIJKIJPo˅uNJndJGMINKJINOv΅\NHJWVOw`JIKJIHM]хsOJKJ]ChrXMNIKJOu݅]KNIYMrKNk]KNKJMdׅTOHqsQQJNI_SDEDOKJIR~jMs_KNH`ncwkJKJFMQ݅ZPYGHkPqgSKJKJNvׅwPM}eGNWxeltMIJIK`څdJW}IJmbqwiTQKNIKNTڅYHofBOYNPKGqINHIKt݅vMKPCduMJKG]GNIKcڅ`KetKHHKIJPRHIHJRyM{WKQMKNGHKJIKP{ON\sGKJKJHTHFIJHJMgڅJGfoHIMKIM`IGHIHMblKIesIYSKJmIJIHJIQ݅RMFi{KYRKMKyIJIHKJPhMKQrI^SKIwIJIJOڅbONbKnTKWrKJIO݅XIHX~O|VKHmXKJHIQ݅RJIWZ|PHJR{KNJKJKS݅VIM[uKPm{pWsgXPJMJdKc|iQKJIKJsxWzPhlIJIKJMptZ~݅P`nOJIKJOxqdJZcHMIKJRbQgKdJIJKJFfVQnoJKHKJRGMXXMFHGKYHKJTXQOIStxHKHCPjXIHMJHeKFJGIjJIGQHIKIJHJzgRXpVeJYWHF`^KHMIHqnJKJGHIwmPGKN~KNoq]NKJHKJTYHIHNJIGFDEDJHKGKJIJHYhIJIJIYlJIJHIJ\kHJHIKMKHGHJI^`MQR]hkj_WTQ_څwׅ݄΅݄΅݅ԅ
+endstream
+endobj
+12 0 obj
+7826
+endobj
+13 0 obj
+endobj
+14 0 obj
+7826
+endobj
+15 0 obj
+<<
+/Type /XObject
+/Subtype /Image
+/Name /Ma0
+/Filter [ /RunLengthDecode ]
+/Width 81
+/Height 96
+/ColorSpace /DeviceGray
+/BitsPerComponent 8
+/Length 16 0 R
+>>
+stream
+
+endstream
+endobj
+16 0 obj
+125
+endobj
+17 0 obj
+<<
+/Title (penguin.pdf)
+/CreationDate (D:20120619194903)
+/ModDate (D:20120619194903)
+/Producer (ImageMagick 6.6.0-4 2012-04-30 Q16 http://www.imagemagick.org)
+>>
+endobj
+xref
+0 18
+0000000000 65535 f
+0000000010 00000 n
+0000000059 00000 n
+0000000118 00000 n
+0000000296 00000 n
+0000000377 00000 n
+0000000395 00000 n
+0000000433 00000 n
+0000000454 00000 n
+0000008478 00000 n
+0000008498 00000 n
+0000008525 00000 n
+0000016495 00000 n
+0000016516 00000 n
+0000016532 00000 n
+0000016553 00000 n
+0000016869 00000 n
+0000016889 00000 n
+trailer
+<<
+/Size 18
+/Info 17 0 R
+/Root 1 0 R
+>>
+startxref
+17067
+%%EOF
diff --git a/contrib/mom/examples/penguin.ps b/contrib/mom/examples/penguin.ps
new file mode 100644
index 0000000..2728930
--- /dev/null
+++ b/contrib/mom/examples/penguin.ps
@@ -0,0 +1,461 @@
+%!PS-Adobe-3.0 EPSF-3.0
+%%Creator: GIMP PostScript file plugin V 1.06 by Peter Kirchgessner
+%%Title: /home/peter/Pics/penguin_small2_bw.ps
+%%CreationDate: Wed Apr 17 19:49:51 2002
+%%DocumentData: Clean7Bit
+%%LanguageLevel: 2
+%%Pages: 1
+%%BoundingBox: 0 0 81 96
+%%EndComments
+%%BeginPreview: 90 107 1 107
+% aaaaaaaaabff555555555540
+% 5b6db6db5edbf6b6b6b6b680
+% aaaaaaaab7ff7ad555555540
+% b55555557eddeeaadadadac0
+% 56db6db6dbffdf56ab555540
+% aaaaaaaaffb755dab556ab40
+% 5b555b55f77ed7d556b56d40
+% aab6d56dbfffaaeb6ad5aa80
+% 6d555aabf6edd5daad56ab40
+% aadaab56ffdfaff555aab540
+% 5555b56bddfdff76dab55680
+% b6aaaaaffbbbbbed5556dac0
+% 55b6d6d5bff7f77aab6aaa80
+% aaaaaaaff77f6ffd6d555540
+% 5b555b576defeedaaaadb680
+% aab6d56dfbfd3bfdb56aaac0
+% 55555aab8eda4fb556ab5540
+% b6daab5743f40b7eaad56d80
+% 5555b56f037007fadaad5540
+% aaaaaaab11e0c6ed55b5aa80
+% 5b6d6db731b1a3feaaaab6c0
+% aaab55566963a3badb555540
+% 6d556aaf35d2e37d556daa80
+% aadaadb57959f3f6aaaab6c0
+% 5555aaab3403c37d6dab5540
+% 6daab5571428c3eeaab56a80
+% aab6d6db908007fd5556ad80
+% ad5555574000176edb6ad540
+% 55aaadab920003fd55555a80
+% b56db55b2000136eaaadab40
+% 56aaaaab400047fdb6d55540
+% aad556d7040112df555ab680
+% 6d5b6ab5d00447bb55ab5540
+% aaaaad57402915cf6d556a80
+% adb555ab9a9243a7aab6ad80
+% 5556dab6902485ead5aad540
+% b5aaab57854901d7daad5a80
+% 56b5556d929201bfab55ab40
+% aaab6d57004400fb756ab540
+% 6d6d55af0a1000efeaad5680
+% aaaaaaba0080005ef6d5aac0
+% adb5b6d60220003fdaaab540
+% 5556aabc0000003bfd5b5680
+% b5aab57c0000003f76d56ac0
+% 56b556e80000001beeaaad40
+% aaab6bf80000001f7f5b5580
+% 6d6d55b00000001dfbaab540
+% aaaaaff00000001bdf6d5680
+% 55b5b5b00000000ffbd5aac0
+% b6aaafe40000000f6ff55a80
+% aad6df7000000246fedaab40
+% 555ab6d000000003aff5b540
+% b6aaafe000000013edbaaa80
+% 556b7d8000000001b7f6d6c0
+% aaad5bc000000001fbbd5a80
+% 6db57f0000000000d77aaac0
+% aaaab58000000000edf6d540
+% 5556f7000000000056fead80
+% b6dab600000000006edb5540
+% aaaaee00000000007ffeb680
+% 5555ee000000000076bb5540
+% b6dabc00000000003f7f6a80
+% 5555d800000000003b7756c0
+% aaabfc00000000003f7eda80
+% 6db6b0000000000036f7aac0
+% aaabd800000000003ffeab40
+% ad57b800000000003d6fda80
+% 55b7d8000000000037fdaac0
+% b55eb800000000003edfab40
+% 56afb000000000003bfbb540
+% aaddb000000000003edf5680
+% 6d5bd8000000000035fdaac0
+% aaafe800000000003b5bb540
+% 55ba5000000000006fef5680
+% b6a83800000000005f736ac0
+% aaa00c00000000003dfdad40
+% 55680e00000000003bd65580
+% b6a107000000000077bc5a80
+% 55a013c0000000023ff82b40
+% a80401a0000000005db45540
+% 429021f0000000043ff02d40
+% 900000f80000000096c4aa80
+% a00080be000000082a902d80
+% 004204770000000244401540
+% a200003e8000001411001540
+% 4004105fc000000044444b40
+% 8800001b8000000a00800540
+% 5040411f4000001012000280
+% 80040007c000001440044080
+% 5080040d0000003100100040
+% 800040200000007400400400
+% 51080002000000e804008040
+% 80008440000003f210000080
+% 50000005000007d400080940
+% 0111000080001ef020808280
+% a00008894000ffd480001540
+% 02000000fa57bb680108aa80
+% a0222002bfffffe900012b40
+% 0a4001115ffdedd20824d540
+% d0888004bb6fbfb4008b5a80
+% ad251202bffdfbe921255580
+% b554a05576ab576a045aaa80
+% aaaa950aaaad5aaaa955b6c0
+% 56d56a556d6aaad48556aa80
+% b55b5555aaab6b5ab55aad40
+% 55aaaaaab5b555554aaad580
+% ad556d5b56aaad6b556b5a80
+%%EndPreview
+%%BeginProlog
+% Use own dictionary to avoid conflicts
+5 dict begin
+%%EndProlog
+%%Page: 1 1
+% Translate for offset
+0.000000 0.000000 translate
+% Translate to begin of first scanline
+0.000000 95.872000 translate
+80.640000 -95.872000 scale
+% Variable to keep one line of raster data
+/scanline 90 1 mul string def
+% Image geometry
+90 107 8
+% Transformation matrix
+[ 90 0 0 107 0 0 ]
+{ currentfile scanline readhexstring pop }
+image
+72727272717171717171717172717171717171717171717172717171727271717171727273736f
+675852524e4653535a676b73737272727272727272727272727272727272727272727272727272
+727272727272727272727272
+7172717271717171717171717271717171717171717171717271717171717172727272726d5d4a
+4039393939373a3a3c3f4653637172727272727272727272727272727272727272727272727272
+727272727272727272727272
+7171717271717171717171717271717171717171717171717271717171717173747271644b3f3a
+3a393a3a3a393b3b3b38393b3d4d64707272727272727272727272727272727272727272727272
+727272727272727272727272
+727272727171717171717171727171717172717171717171727171717171727372705b3b3d3b3a
+3939393939393938393939383a3c3f546d71747272727272727272727272727272727272727272
+727272727272727272727272
+727271727171717171717171727171717171717171717171727171717171727173553e3d383a39
+393a383838383838393940564d3f38394668727272727272727272727272727272727272727272
+727272727272727272727272
+71717171717171717171717172717171717171717171717172717171717172715f3d38393b3b39
+3a393939393939393a3c5574807252403742627272727272727272727272727272727272727272
+727272727272727272727272
+727271727171717171717171727171717171717171717171727171717172726c403c373a3a3a3a
+3a3a3a3a3a3a3a3a393e5e82958c72543a38416a72737272727272727272727272727272727272
+727272727272727272727272
+727171727171717171717171727171717171717171717171727171717271735a3d383b3a3a3a3a
+3a3a3a3a3a3a3a3a383c5f87978e7c65493a3c5070737272727272727272727272727272727272
+727272727272727272727272
+7171717271717171717171717271717171717171717171717271717172736c4638373b3a3a3a3a
+3a3a3a3a3a3a3a3a3a436384897d6d644f3a3b3e60727472727272727272727272727272727272
+727272727272727272727272
+727171727171717171717171727171717171717171717171727171717273603a3839393a3a3a3a
+3a3a3a3a3a3a3a3b39425c6f68574745403b3c3848707472727272727272727272727272727272
+727272727272727272727272
+7271727271717171717171717271717171717171717171717271717172724d373938393a3a3a3a
+3a3a3a3a3a3a3a393a3d494e3e3e3c3b393c3a393b617272727272727272727272727272727272
+727272727272727272727272
+71717171717171717171717171717171717171717171717172717171727241393839393c3a3a3a
+3a3a3a3a3a3a3a393b3a3a3d3b3a3d393c3b393b3a4b7374717272727272727272727272727272
+727272727272727272727272
+7272727271717171717171717271717171717171717171717271717172703a3b3937393b393a3a
+3a3a3a3a3a3a3a3a3a3b3a3a393d3a3b3b3b393a393e6d74727272727272727272727272727272
+727272727272727272727272
+7272727271717171717171717271717171717171717171717271717171633c3a3a38383d413c3a
+3a3a3a3a3a3a3a3a3a3b3e4142393c3c3b3b3939393c6074707272727272727272727272727272
+727272727272727272727272
+7272727271717171717171717271717171717171717171717271717171623b373b3e40475d5a3f
+3b3b3a3a393b3b3b373839486b6d3d393b3b3a38393b5c73717272727272727272727272727272
+727272727272727272727272
+7272727271717171717171717271717171717271717171717271717172623b373c3a3d3f425d65
+3f393a3a3d393b3e5b75795a3e6562393b3b3b39393d4f71727272727272727272727272727272
+727272727272727272727272
+7272727271717171717171717272717171717271717171717271717172623c3838538a9e7e4960
+4e3c3a3a3c3a57879ea9b0b68e445b463b3b3b3a3b3d4a72727272727272727272727272727272
+727272727272727272727272
+7272727271717171727171717272717171727171717271717271717172613c374d96b6cabb8e48
+463b3a3a3a5291abb6c0c7d1be7f3f473b3b3a38393a4672727272727272727272727272727272
+727272727272727272727272
+7272727271717171717271717271717171717171717171717271717172603c3770acd1e3dfcc84
+3a3b3a3a3d85c0e7f4f7f7f2d9a4593a3b3b393839393f6b727272727272727272727272727272
+727272727272727272727272
+7272727271717171717171717271717171717171717171717271717172603c3c9aebdbc5eefdda
+45393a3a45b8f7fcda8386d1faec8b373b3b3a3938383e6b727272727272727272727272727272
+727272727272727272727272
+7272727271717171717171717271717171717171717172717271717172613946c8db4e7188eaf9
+60443c3e4dc7fbe953468a7fcdfdc7433b3b3a3839383c6a727272727272727272727272727272
+727272727272727272727272
+7272727271717171717171717271717171717171717171717271717172603a4bd59a387184a5fb
+755363655bc9fb9c3d3a5c907ffbe7543b3b3a3939383c6a717272727272727272727272727272
+727272727272727272727272
+7171717171717171717171717171717171717171717171717171717171673b4ad5833e4a7f75f8
+6f484b575cb3f67b363c445b68f4ed553a3a3a3939393b6a717272727272727272727272727272
+727272727272727272727272
+7272727272717171717171717271717171717171717272717271717171714245cc953c3d5667ce
+666e6f6c6282e97a3b3a3a3b5bf5ea58393a393a393c386a737272727272727272727272727272
+727272727272727272727272
+727272727171717171717171727171717171717171717171727171717171413eb7c4453b416fa6
+c3c9c6c2bcb1c19d3a3c3b3e8cfbdc4c3939393a39393969727272727272727272727272727272
+727272727272727272727272
+727272727171717171717171727171717171727171717171727171717171413a8df18e477da2af
+cdcecbbfa6b2cfc289534273ebf9ac3f3939393939383b62727272727272727272727272727272
+727272727272727272727272
+72727272717171717171717172717171717172717171717172717171717142385bdae697a9c1cd
+cfcecfd3d4d7dcd9d5c5a8c5e4dc633838393a39393a365b727272727272727272727272727272
+727272727272727272727272
+72727272717171717171717172717171717171717171717172717171717142363e99a4a8b9cacf
+cecfd2d8dcdfe2dfdedad6cdc3ac693f39393939393a375b727272727272727272727272727272
+727272727272727272727272
+7272727271717171717271717271717171717171727171717271717171714137538fa4b4c2cbcf
+cfd1d5dadee2e1dfdedededfdcdab5553a3a39393a3c3859727272727272727272727272727272
+727272727272727272727272
+7272727271717171717171717271717171717271717171717271717171714b43839facbdc8cfcf
+d0d3d7dae2e2dfdedededed1b1c5c05e3c3b393a3c393c4c717272727272727272727272727272
+727272727272727272727272
+727272727171717171717171727271717171717171717171727171717172524c94a0b2c1cbcfcf
+d1d5d9dee1dfdedededabea8aebbad4f3b3c3a393a3a3d426b7273727272727272727272727272
+727272727272727272727272
+72727272727171717271717172727171717171717172717172727171717254478ea5b9c3ced0d1
+d3d6dbe0dededddccfabaab7bbbaaa4b3c3b393a37393f3b597174727272727272727272727272
+727272727272727272727272
+727272727171717171727171727171717171717171717171727171717171503b5c84aec9d0d1d1
+d6d9dddcded9d1b0a0b1b8bbbab387403a3b6c7446333938477173727272727272727272727272
+727272727272727272727272
+7272727271717171717171717271727171717171717171717271717171714f3d457986a3c5d1d6
+d8d9d8d1bfa795a2b4b7bab7adac8642383863978e6f413c3c6973727272727272727272727272
+727272727272727272727272
+727272727171717171717171727171717171717171717271727172717272523b4390a58a8e9da8
+aba4a29d9ca5aeb3b2afabb7c4c2bb5d3b3645849b99663a3c4e72727272727272727272727272
+727272727272727272727272
+727272727171717171717171727171727171717171717271727171717273543c49adbfa29097b4
+c0b9b5b3b4b0afada5aabec7cfcac3763a3b3c5e999a8745393d65727272727272727272727272
+727272727272727272727272
+727272727271717171717171727271717172717171717171727172727171483856aac1bfa18e9e
+b1b4b2afa9a3a0a4b3c1c1c5d3ded4ac413a3b4079895a38353948707472727272727272727272
+727272727272727272727272
+7272727271727171717171717272727171717171717171717272737272633f3c4ea8c5c1c0a790
+919698959193a7bac2c1c9e1f4fbfbde6c3b3c3a39423c3b3a393e617473727272727272727272
+727272727272727272727272
+7272727271717171717171717271727171717171717172717272717270453b394dc1d9c8c2c2bc
+a79b9b9dabbac0c1c2cde3f8fdfdfdfabf453b3b3b3b3b3b3a393d4c7071727272727272727272
+727272727272727272727272
+727272727171717171717172727171717171717171717171727270715b3d3b398ff5e7cec3c3c1
+c3c1c2c2c3c2c2c8d4e4f5fdfdfdfdfdf9723f3b3b3b3b3b3b3a39435a74747272727272727272
+727272727272727272727272
+7272727271717171717171717271717171717171717171717271726750463658e0fbf7e4c6c2c3
+c3c2c3c2c2c4ceddedf7fdfdfdfdfcfdfccb4a3b3d383b3b3a3a3a3e4a6b727271727272727272
+727272727272727272727272
+72727272717171717171717172717271717171717171717172716d4b544340b1f7fcfdf7d5c2c2
+c2c2c2c2c6d5e7f5fcfdfdfdfdfdfdfcfbf7833d3d3b3b3b393b393a3b4e717272717272727272
+727272727272727272727272
+7272727271717171717271727271727171717171717171727371483a3a3673f4fdfcfbfceccfc5
+c2c1c2cde3f3fafdfdfdfcfdfdfdfdfcfdfccb40393a3b3b39393a393b3c607271727272727272
+727272727272727272727272
+727272727171717171727171727171717171717171717171705a3e3f3c45d0fcfdfdfcfdfcf5e6
+d9dce5f1fafcfcfcfdfdfcfdfdfdfdfdfdfdf66937393b3b393939393a3a486a72717272727272
+727272727272727272727272
+7272727271717171717171717271717171717171717171725f3e3a3c3985fbfcfdfcfdfdfdfdf9
+f1f8fcfdfdfcfcfcfcfdfdfdfdfdfdfdfdfdfd933b3a3b3b3a3a3a3a393a3d4a6b717272727272
+727272727272727272727272
+717171717171717171717171717171717171717172727267443b3b394cd2fafcfdfdfdfdfdfdfb
+fafcfdfdfdfcfcfcfcfcfdfdfdfdfdfdfdfdfbc73b3b3a3a3a393a3a3a393c3e52727272727271
+727272717171717172717271
+727172727171717171717171727171717172727175736d423a3a383c7de7f9fefefdfdfdfdfdfc
+fbfcfdfdfdfcfdfdfcfdfdfdfdfdfdfdfdfcf8e24d3c3b3b3a3a3a3a3b3b393a3b537173727272
+727272727272727272727272
+7272727271717171717171717271727171727271726e4d3b3b3a3646a0e2f8fdfefdfcfcfdfdfc
+f8f8fcfdfdfdfdfdfdfdfcfdfdfdfcfbf4f0efeb653f3b3b3b3b3b3b3b3b3938393f5772727272
+727272727272727272727272
+727172727171717171717171727171717171727171533f3b3b3a364aa5cef0f9fbfdfdfcf9f5f1
+ecebf3f8fafbfbfafcfaf8f7f5f5efeae3dbdfe687473b3b3a3b3a393a3a3b393a393f5c727272
+727272727272727272727272
+7272727271717171717171717272717171717271623d3d3a3b3a3a5ba9b8d0e7edf5f9f9f5ede3
+e1e5e7f2fbf9fafaf7eee2dad3d0cececcc8c9d8c5513a3b3a373c393d3b3a3939383d3e637272
+727272727272727272727272
+727272727171717171717171727171717172726e4a3d383a3b3a456fadb5cbddebf8fbfcfdfced
+e4f5fbfdfcfdfdfdfcf7ede3d5cecac8c7c6c6c7deb844393e644e3a393b3a3a3939383c4b6f72
+727272727272727272727272
+72727272717171717172727272727271717272603e3a3b3b393a4b7cbbd3ebf7fdfcfcfbfdfcee
+f1fcfcfcfcfbfbfdfcfcfdfbf8f2e8ded3cbc7c6ceee993d34556f5f463c3d393b393a3a3e6272
+727272727272727272727272
+717171727171717172717171727171717173704b3b3d39473c3c5fb0dcf1fbfcfcfcfdfcfcfcf5
+f5fbfcfbfdfcfcfcfcfcfbfbfdfcfcfbf5e9d9cdc7d8ea683b3d3d58724b3b3d3b3a3a3a3c5173
+737272727272727272727272
+7272727271717171717271717271717171736e433e385e603e4090dff5fcfdfcfcfbfcfcfbfcfa
+fbfbfcfcfcfbfcfdfcfcfcfcfdfcfcfcfbfcf6e6d3c9e3c3403a3d394d7342353e3a3b3a39416b
+727372727272727272727272
+727171727171717171717171727171717172673d374a6b3b3d4cd9f8fdfcfcfcfbfdfbfcfbfcfc
+fbfcfcfbfcfcfcfcfdfcfcfcfbfcfbfcfcfdfdfaedd4ceeb6c3c3d3d3e51663a3e383b3a393c56
+717472727272727272727272
+727271727171717171717171727171717173573c3c604d3b3c8ffbfdfbfcfdfcfcfcfcfcfcfbfb
+fdfbfdfcfdfbfcfcfcfbfcfcfdfbfdfcfcfcfcfdfcedd3dac43d384e5b5064583a3c3b3a363c40
+6f7272727272727272727272
+727271727171717171717171727171717170483f476f373851e9fdfdfdfbfcfcfcfcfcfcfbfcfd
+fcfcfcfbfcfcfbfbfcfcfdfcfdfcfcfcfcfcfcfdfcfdf1e6f1583f5e7770546d42393b3a3b3a3d
+637272727272727272727272
+7272727271717172717171717271727372643f3c6a52373da0fbfcfcfcfcfbfcfcfcfdfcfcfbfb
+fcfbfcfbfbfcfdfcfcfcfcfcfcfcfcfbfcfcfdfcfdfbfcfcfd9545657c735259613d3c393a393b
+4e7172727272727272727272
+7272727271717171717171717271727471513a456a393a5ae6fafcfbfcfbfcfbfcfcfcfcfbf8fa
+fbfcfcfcfcfdfbfcfdfcfcfdfcfdfcfbfdfcfbfcfcfcfcfcfdc64f5e6456434078433b3d393b3d
+436c72727272727272727272
+727272727171727171717171727272726e47385c53333e98fbfbfcfcfcfcfcfcfcfcfcfcf9eafb
+fbfbfbfbfcfcfbfdfcfcfbfcfcfcfcfcfbfdfcfcfdfdfcfdfce7473d3f3b3b375e57393d383939
+3b6171727272727272727272
+72727272717171717171717172717272633c3b703f3451dafcfcfbfbfcfcfbfcfcfdfdfbf4e8fa
+fcfdfcfcfcfbfcfbfcfcfcfcfbfdfcfcfcfcfcfcfcfbfbfcfcfa623c3a3a3b374b66373d393939
+3b5072727272727272727272
+727272727171717171717171727272714e3b52613b388af8fcfbfcfbfcfcfcfcfcfdfcfcf2edfc
+fdfcfcfcfcfdfcfbfcfcfcfcfcfdfcfdfdfcfcfcfcfdfcfbfcfc84383b3b393a3f774138383938
+3a416f727272727272727272
+727271727171717171717171727272663c3c68453b40c5fbfbfbfdfdfcfcfdfbfcfcfcfcededfb
+fcfcfcfcfbfcfcfcfcfbfbfcfcfcfcfcfafcfcfcfcfbfcfdfcfda23c3b3b3b3b3d7437383b3a39
+3b3f68727272727272727272
+7272727271717171717171717174714b3a3a6b373b57eefcfcfcfcfbfcfcfbfcfcfbfdfbe9e9fb
+fbfcfcfcfbfcfcfbfbfcfcfbfbfcfbfcfcfcfcfcfbfcfcfcfdfcaf3b3b3b3c3a406f37373a3a39
+393d5f727272727272727272
+7171717272717171727171717271623e3d4a60373b82fbfcfcfdfbfdfcfcfcfcfbfcfcfbe6eafb
+fcfdfcfcfcfcfcfbfdfcfcfcfdfcfcfcfcfdfcfcfcfbfcfcfcfdbd3a3b3b3a3843633836393a38
+3a3c54727272727272727272
+727272727272717171717272736d463a37535c3839aafcfcfcfdfdfcfcfcfbfcfdfcfbfbe6eaf9
+fbfbfcfbfcfbfcfcfbfdfcfcfbfcfcfcfcfdfcfcfcfcfbfdfcfcce3c3b3b393c4e533937383939
+383c4f727272727272727272
+71717272717171717171717371593d3b3952603947cdfcfbfcfcfcfcfcfdfdfcfcfcfdfae2e9fa
+fbfbfcfdfbfcfcfcfcfcfcfcfcfcfcfbfbfcfbfdfcfcfdfafcfcd4423b3b3b3a5a4e393a39383a
+3a3940727272727272727272
+7272727271717171717271726c41393c3656683b47d6fdfbfcfcfcfcfcfcfbfcfdfcfcfae1e9fb
+fbfcfdfcfcfcfbfcfcfcfcfbfcfcfbfcfcfcfbfbfdfcfbfcfcfdda413b3b3c3b6644393a3a3938
+3b3a3f727272727272727272
+727271727171717171717171553c3b3b405f6d394ce1fcfcfcfcfcfcfbfdfcfcfcfcfcf9e1ecfb
+fcfcfcfcfcfbfbfcfdfcfcfdfbfcfcfcfcfbfcfbfbfdfcfdfcfcdd423b3b3b39643f393a393939
+3a3a3e727272727272727272
+7272727271727171717171724f3e363d4f767e3b5be9fcfdfcfdfbfbfbfcfcfbfafcfcf8e2eefb
+fbfcfcfcfcfcfcfcfcfcfcfcfcfcfcfbfdfcfbfcfdfcfcfcfbfdde433b3b3b455f3a3b3b3a3a39
+39393e727272727272727272
+72727272717171717171716e46393938466b863e69edfcfdfcfcfcfcfbfcfcfcfcfcfcf7e2eefc
+fbfcfcfdfbfdfcfbfdfcfdfdfdfcfcfcfcfdfbfcfcfbfcfcfbfddc443b3b385a463b3b3b3a3839
+393940727272727272727272
+72727272717171727171716f413a3a3a3945724869effcfcfcfcfbfcfcfbfcfcfcfcfbf8e2f1fc
+fcfcfcfbfcfcfcfcfcfcfcfcfcfcfcfbfcfcfcfcfcfcfbfcfdfccc3f383a41683b3d3d3a3b3a3a
+3a3b42727272727272727272
+72727272727171717171716e443938393c3c49626eeefcfbfcfcfcfcfcfcfcfcfcfcfcf8e2f1fc
+fbfcfdfcfcfdfdfcfcfcfcfcfbfcfbfcfcfcfcfcfcfcfcfcfcfcb83b3f5a685d455b6054463f3a
+3c3a51727272727272727272
+727272727271717172717171524a728f8d5e424d80e3fbfcfcfbfcfcfdfcfbfcfcfcfcf7e1f2fb
+fcfcfcfcfcfcfcfbfcfdfbfcfcfcfcfcfcfcfcfcfcfdfcfcfcfc9c405b503d3b3c3c455368755c
+3d3a5a727272727272727272
+72727172717171727271727174a3c9d4d6c87b3b50b0f9fcfcfdfcfcfcfbfdfcfcfcfcf8e2f3fb
+fcfcfdfcfcfcfcfcfcfcfbfbfbfcfbfcfbfcfcfcfcfcfbf9fbf66956403b3a3a39393b3a3a608d
+654567717273727272727272
+7272727271717172717371739bc1d1d4d4d4cc7f3f55a9f5fbfbfcfbfdfbfbfcfbfbfcf8e1f3fc
+fbfcfcfcfbfcfbfcfcfdfdfcfcfcfcfcfcfcfcfcfbf6d5d3d3d29c59393a393b3b3b3b3a3c5d76
+61486b737272727272727272
+727272727171727171737288b1c7d1d4d4d5d4cc803f4ea1f0fbfcfcfcfbfcfcfcfdfcf6e3f4fc
+fdfbfbfcfcfcfcfcfcfcfcfcfdfbfcfcfcfbfcfcfcdccfdbdddccd5b3e3a393b3b3b3b3a3e655e
+519c89727373727272727272
+7171717272727171717276a3b8c8d2d4d5d4d5d5c66d3a4892e9fcfbfcfdfcfbfbfbfcf8e1effb
+fcfbfcfcfcfcfbfcfcfbfcfbfcfcfcfcfbfcfcfcfcd5c7d4d7dabb50383c393b3b3b3b3a414f40
+76cfda8f7374727272727272
+7172717372727271707e9db3c0cdd4d4d5d4d4d5d4b6543b4673d6fbfbfcfcfdfdfcfbfaeaedfc
+fbfdfcfcfcfdfdfcfcfcfcfcfbfbfcfbfcfdfcfcfcd7c5d3d4d1a9513a393a3b3b3b3b3a3a3653
+bad5d7b87371727272727272
+7170778c9baaa8a5a3a7b4bdc9d1d4d4d4d4d4d4d5d2a04435405bc1f7fcfcfdfbfcfcfdfbf9fc
+fdfcfbfcfcfcfbfcfcfcfcfbfcfcfcfdfcfcfbfbf8d8c4d3d2c9a85c3a3b383b3b3b3b3a3a4196
+cfd1d4c47370727272727272
+73779fb2bcc1bfbbbbbdc4cad1d4d4d4d5d4d4d4d5d4cb7c3d373c469ef3fbfcfcfcfdfcfcfcfc
+fcfbfcfcfbfcfcfcfcfcfcfcfcfcfcfcfbfcfbe8d3c7c4d2cec3ae78463c36383836373b477dbf
+cccfd1c07671727272727272
+738ab0bec9cdccc9c7ccd1d2d4d4d4d4d4d4d4d4d4d5d5b758383b3a4387e5fdfcfcfcfbfcfcfc
+fdfdfbfcfcfcfcfcfbfcfcfdfcfcfbfbfdfceecdc7c3c2cecbc1ae997146403e393d426189b2c3
+cccfd2c27572727272727272
+7193b7c7ced1d2d3d2d3d4d4d4d4d4d4d5d4d4d4d4d3d4cf953d383a353a68d0fbfbfbfbfdfcfc
+fbfbfbfdfcfdfcfbfcfcfbfcfcfcfdfcfbfde3c7c8c2bfc9cac4b5a69c8e7d77767e929eacc0ca
+d0d3d4d07f72727272727272
+729eb8c8d0d4d4d4d4d4d4d4d4d4d4d4d4d4d4d4d5d3d3d5c065383b38343f57bffbfbfcfcfbfc
+fcfcfcfcfbfbfcfdfcfcfcfcfbfbfbfcfcfbdfc9c8bdb9c8cac6bbb0a8a5a1a0a1a3a7b1bfccd1
+d4d4d4d3af77717372727272
+7192b7c6d0d4d4d4d4d4d4d4d5d4d4d4d4d4d4d4d4d4d3d4d4a64639383c3a3852c7fcfcfdfdfd
+fcfcfcfcfcfcfdfdfcfcfdfcfdfcfbfcfcfbe0c8c8b8b4c6cacac1b9b5b1b0afafb2b7c0cbd4d4
+d4d5d4d2cf9c727272727272
+728cb5c3ced4d4d4d4d4d4d4d5d4d4d4d4d4d4d4d4d4d4d4d4c97d3b363a3737396ef0fcfcfcfc
+fdfcfcfcfbfcfcfcfcfcfcfcfdfcfcfbfcfde7cbc9b3aebfc9cbc8c2bcbbb9b9b9bcc3c9d1d5d5
+d5d5d5d3d1c88f7272727272
+718bb2c0cdd3d4d4d4d4d4d5d5d5d4d4d5d4d4d4d5d4d4d4d4d5b6573a3939393742d8fcfcfcfc
+fcfbfcfbfcfcfcfdfcfcfcfcfbfbfcfcfdfbeed0c8adaabcc9d0cecbc5c3c2c1c3c5c8ced2d5d5
+d5d5d5d5d4d1c29071727372
+727fafbdccd3d4d4d4d4d4d4d5d4d4d4d4d4d4d4d4d4d4d4d4d4ce974038393b393fd1fcfcfcfb
+fcfbfcfdfcfcfbfcfcfcfcfcfbfcfcfbfcfcf3d3b588aabdc9d0d2d1cdcbc9c8caccced1d4d5d5
+d5d5d5d5d4d3d0cb99767372
+727aadbccbd3d4d4d4d4d4d4d5d4d4d4d4d4d4d4d4d4d4d4d5d3d5c57a3a3a383a59ecfdfcfcfc
+fbfcfcfcfcfcfcfbfcfbfcfcfbfcfcfcfbfcf2c46785aabdc9d1d3d3d2d2d0d1d1d2d2d3d4d5d5
+d5d5d5d5d5d5d4d4d4b88872
+727bacbacbd3d4d4d4d4d4d4d5d4d4d4d4d4d4d4d4d4d4d4d5d4d3d5b15441467bd7fcfcfcfbfc
+fcfdfdfcfcfcfbfcfcfcfdfdfcfcfcfcfbfccd5d4484abbecad1d2d4d4d5d4d5d4d4d4d4d5d5d5
+d5d5d5d5d5d4d5d4d4d5cea5
+727caebac9d3d4d4d4d4d5d5d5d5d4d4d4d4d4d4d4d4d4d4d5d5d3d3ce99a7dcf8fcfcfcfcfcfc
+fbfbfcfcfbfcfcfdfcfcfcfcfbfcfcfcf8c2523a4789aabecad1d3d4d5d5d5d5d5d5d5d5d5d5d5
+d5d5d5d5d5d5d5d5d5d5d2c6
+7084aebacbd2d3d4d4d4d4d4d4d4d4d4d4d4d4d4d4d4d4d4d4d4d3d1d1bfa4f4fafbfbfcfcfbfc
+fcfcfbfbfcfcfcfcfcfcfcfcfcfbfbf6a44538364e8aaabecbd2d4d4d4d4d4d4d4d4d4d4d4d4d4
+d4d4d4d4d4d4d5d5d4d3cec1
+718eacbbcdd3d3d4d4d4d5d4d5d4d4d4d5d4d4d5d4d4d5d4d5d4d4d3cfceadbdfbfcfbfcfcfcfc
+fbfdfdfcfbfdfbfbfcfcfbfbfcfce87f42353834578aa9c0cbd2d5d5d5d5d5d5d5d5d5d5d5d5d5
+d5d5d5d5d5d5d5d4d0c9c19f
+739daec0d0d4d4d4d4d4d4d4d5d4d4d4d4d4d4d4d4d4d4d4d5d4d4d4cfd0bc95d1fbfbfbfcfcfc
+fcfcfcfcfcfcfbfcfcfcfcfcefa84c3b383c39385e88a7c1ccd2d4d5d5d5d5d5d5d5d5d5d5d5d5
+d5d5d5d5d4d4d4d1c6bca676
+81a6b6cbd2d3d4d4d4d4d4d4d5d4d4d4d4d4d4d4d4d4d4d4d5d4d4d4cfcabf9f80cbfafbfcfcfc
+fbfcfcfcfcfbfcfcfcfcf0b45b3c3a3b3a3738396488a6bfccd3d4d5d5d5d5d5d5d5d5d5d5d5d5
+d4d4d4d4d3d1ccc1b5947871
+94aebfcdd2d3d4d4d4d4d4d4d5d4d4d4d4d4d4d4d4d4d4d5d5d4d4d4d0c6bda6835a8ad1eff7fb
+fcfbfcfcfbfaf3e7c5935a3f373a3b3b3b3b3b3d6b8ba7becbd2d5d5d5d5d5d5d5d5d5d5d5d4d4
+d5d4d4cec7c0b5a280727373
+a4afbdc8d1d2d2d3d4d3d4d4d5d4d4d4d4d4d4d4d4d4d4d4d5d4d4d4d1c8bca98d693b3d5c7e93
+a7aea0988f7c5e4b3d3b3a38383b3b3b3b3b3a43708ea7bdcad2d5d5d5d5d5d5d5d5d5d5d4d2d1
+d2d1c8bbb09a7f7372727272
+a3abb7bfc8cbcdcecfd0d2d4d3d4d4d4d4d4d4d4d4d4d4d5d5d4d5d4d0c8bca78f75473839383d
+3d3a39373836353a383b37373b3a3a393a3a38477590a6bac9d2d4d5d5d5d4d4d4d5d4d4d0ccca
+c6bdb1947971727272737272
+9aa5aaafb7bcbfc0c3c5c6cacccfd0d1d2d3d3d4d4d4d4d5d5d4d4d3cec3b6a28b7b553939393a
+393939393939393939393939393a393a3a393947768fa3b5c3cfd4d4d4d4d4d4d2d2d1cbc5bfbb
+b19b80737172727272727272
+7a91989da0a2a7abafb2b6b7bcc0c4c6c9cdd0d2d4d4d4d4d4d4d4d1c8bba9988a7c593a3a3a3a
+3a393a3a3a3a3a3a3a3a3a3a3a3938393a3a3a4a768a9daebdc9d0d2d3d3d2d2d0cdc7bfb8b2a6
+8a7371717171727272727272
+7172757a838c91979c9fa4a4a6a9aeb1b6bac1c7cdcfd1d2d1d1d1cbbfb09e8f857958383a3839
+3b3b3b3b3c3b3b3c3b3b3b3b3b3a3837383a394c738596a5b5bfc9ced0d1d0cdc7bfbbafa49a7b
+727172727272727272727272
+727273727272747c858b90949496999b9fa4acb3b9bec3c8cbcac4bbafa393867d734e3c404141
+4b555858585858585858585857554d454543404d7082909daab6c0c5c7c8c6beb8b2a89b8a7571
+727272727272727272727272
+7372727272727171727274797d8185898d90959ba2a6abb0b6b6b0a89c92867e776547656f7372
+707172727272727272727272727174736f6f66656c7e8a959fa6aeb3b4b4b1aaa49d9382727272
+727272727272727272727272
+727271717271717171727271717273767b7d82898e9195989b9b98928a837e7972616470727172
+72727171717171717172727272727272727171706d76828e979b9da0a1a19f9b968d7c73727271
+717272727272727272727272
+72727272717171717171717172717170717172767d81868788878683807c776f6e727271717171
+7171717171717171717272727272727272727271706f79838c9192959595938d84787171717272
+727272727272727272727272
+7272727271717171717171717271717171737372727375767a7c7d7b79746e6d72737271717171
+7171717171717171717272727272727272727271726e6f737c8285888786837974727172717272
+727272727272727272727272
+7272727271717171717171717271717171727272727272707273706f6f71707272727271717171
+71717271717171717172727272727272727272727272716e6f6f72757372727172717172727272
+727272727272727272727272
+showpage
+%%Trailer
+end
+%%EOF
diff --git a/contrib/mom/examples/sample_docs.mom b/contrib/mom/examples/sample_docs.mom
new file mode 100644
index 0000000..f9b2933
--- /dev/null
+++ b/contrib/mom/examples/sample_docs.mom
@@ -0,0 +1,713 @@
+.\" -*- mode: text; coding: utf-8; -*-
+\#
+\# Copyright (C) 2004-2020
+\#
+\# Copying and distribution of this file, with or without modification,
+\# are permitted in any medium without royalty provided the copyright
+\# notice and this notice are preserved.
+\#
+\# This file contains three greeked documents collated together:
+\#
+\# i) two pages of a novelist's outline
+\# ii) two pages of a chapter using COPYSTYLE DRAFT
+\# iii) three pages of an academic paper, set in two columns
+\#
+\# Mom's defaults are used throughout, except for iii), which
+\# demonstrates some of the ways you can design your own documents.
+\#
+\# Since the text throughout is greeked, and groff doesn't know how
+\# to hyphenate all that pseudo-latinate nonsense, I've inserted
+\# discretionary hyphens (\%) into a large number of the words.
+\# Normally, this isn't necessary.
+\#
+\# The PRINTSTYLE is TYPESET. If you'd like to see what mom does
+\# with the documents when the PRINTSTYLE is TYPEWRITE, change
+\# PRINTSTYLE TYPESET, below, to PRINTSTYLE TYPEWRITE and re-run with
+\#
+\# pdfmom -Tps sample_docs.mom > sample_docs.pdf
+\#
+\# ===================================================================
+\#
+\# First, a sample NAMED document--in this case, an outline.
+\# A novelist wouldn't normally write an outline with numbered
+\# subheads and paraheads. I've turned the feature on merely to
+\# demonstrate it.
+\#
+\# Information for the cover pages
+\#
+\# Title, subtitle and copyright for the document cover.
+\#
+.TITLE DOC_COVER \
+ "Sample mom documents"
+.SUBTITLE DOC_COVER \
+ "Three types of mom documents" \
+ "assembled and collated" \
+ "by mom's author"
+.COPYRIGHT DOC_COVER \
+ "2015 Peter Schaffter"
+\#
+\# What appears in the pdf viewer's window title
+\#
+.PDF_TITLE "Sample mom documents"
+\#
+\# Reference macros (metadata) for the first section of the collated
+\# document.
+\#
+.TITLE "Lake Attica's Shores"
+.SUBTITLE "A Romance Novel"
+.AUTHOR "Rosemary Winspeare"
+.COPYRIGHT "2015 Alma Podborski"
+\#
+\# What to put on the cover for the whole document (in mom-speak,
+\# the "doc cover"). The title, subtitle, and author are what were
+\# given to TITLE DOC_COVER, SUBTITLE DOC_COVER, and COPYRIGHT
+\# DOC_COVER.
+\#
+.DOC_COVER TITLE SUBTITLE COPYRIGHT
+\#
+\# What to put on the first document's title page (in mom-speak, the
+\# "cover"). In this case, we're using the metadata from TITLE,
+\# SUBTITLE, AUTHOR and COPYRIGHT, which will also be used to
+\# generate the docheader (minus the copyright).
+\#
+.COVER TITLE AUTHOR DOCTYPE COPYRIGHT
+\#
+\# Docstyle macros (templates)
+\#
+.DOCTYPE NAMED "Outline"
+.PRINTSTYLE TYPESET
+.PAPER LETTER
+\#
+\# Here we style the covers a bit.
+\#
+.DOC_COVER_TITLE_STYLE \
+ SIZE +8 \
+ SMALLCAPS \
+ UNDERLINE 1 3p
+.DOC_COVER_SUBTITLE_STYLE \
+ FONT I \
+ SIZE +2 \
+ LEAD 18 \
+ SPACE .75v
+.DOC_COVER_COPYRIGHT_SIZE -.5
+\#
+.COVER_TITLE_SIZE +5
+.COVER_ATTRIBUTE_STYLE \
+ SIZE +2 \
+ SPACE .25v
+.COVER_AUTHOR_STYLE \
+ SIZE +2 \
+ LEAD 18
+.COVER_DOCTYPE_STYLE \
+ SIZE +4 \
+ UNDERLINE DOUBLE 1
+.COVER_COPYRIGHT_SIZE -.5
+\#
+\# Here we style the docheader a bit.
+\#
+.SUBTITLE_SPACE .25v
+.DOCTYPE_UNDERLINE 1 2p
+\#
+\# Styles for nested heading levels
+\#
+\# The first two instances of level-1 headings will be paragraph heads
+\# so we set the paragraph head style here, then change it when
+\# level-1 headings become main heads.
+\#
+.HEADING_STYLE 1 \
+ FONT BI \
+ SIZE +.75
+.HEADING_STYLE 2 \
+ FONT B \
+ SIZE +.5 \
+ BASELINE_ADJUST \n[.v]/8 \" ie 1/8 the leading
+\#
+.AUTO_RELOCATE_TOC \" Move table of contents to the top of the doc
+.SPACE_TOC_ITEMS \" Prettify TOC spacing
+\#
+\# Begin the document
+\#
+.START
+\#
+.PP
+.HEADING 1 PARAHEAD "A note on the setting"
+Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam
+nonumy eirmod tempor invidunt ut labore et do\%lo\%re magna ali\%quyam erat,
+sed diam voluptua. Stet clita kasd gubergren, no sea takimata sanctus est.
+At vero eos et accusam et justo duo do\%lo\%re et ea rebum.
+.PP
+Stet clita kasd gubergren, no sea takimata sanctus est. Lorem ipsum
+dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod
+tempor invidunt ut labore et do\%lo\%re magna ali\%quyam erat, sed diam
+voluptua.
+.PP
+Consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt
+ut labore et do\%lo\%re magna ali\%quyam erat, sed diam voluptua. At
+vero, eos et accusam et justo duo do\%lo\%res et ea rebum. Consetetur
+sadipscing elitr, sed diam nonumy.
+.LINEBREAK
+.PP
+.HEADING 1 PARAHEAD "About historical personnages"
+At vero eos et accusam et justo duo do\%lo\%res et ea rebum. Stet clita
+kasd gubergren, no sea takimata sanctus est. Tempor invidunt ut
+labore et do\%lo\%re magna ali\%quyam erat, sed diam voluptua.
+.PP
+Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam
+nonumy eirmod tempor invidunt ut labore et do\%lo\%re magna ali\%quyam erat,
+sed diam voluptua. Consetetur sadipscing elitr, sed diam nonumy
+eirmod tempor invidunt ut labore et do\%lo\%re magna. Tempor invidunt
+ut labore et do\%lo\%re magna ali\%quyam erat, sed diam voluptua.
+\#
+\# Change level-1 style and add numbering to levels 1 and 2
+\#
+.HEADING_STYLE 1 \
+ FONT B \
+ SIZE +1.5 \
+ CAPS \
+ UNDERSCORE .5 2p \
+ QUAD C \
+ NO_SPACE_AFTER \
+ BASELINE_ADJUST +0 \
+ NUMBER
+.HEADING_STYLE 2 NUMBER
+\#
+.HEADING 1 "Part One"
+.HEADING 2 "Chapter 1"
+.PP
+Lorem ipsum dolor sit amet, consetetur sadipscing elitr,
+sed diam nonumy eirmod tempor invidunt ut labore et do\%lo\%re magna
+ali\%quyam erat, sed diam voluptua. At vero eos et accusam et
+justo duo do\%lo\%res et ea rebum.
+.PP
+At vero eos et accusam et justo duo do\%lo\%res et ea rebum. Stet clita
+kasd gubergren, no sea takimata sanctus est. Lorem ipsum dolor sit
+amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor
+invidunt ut labore et do\%lo\%re magna ali\%quyam erat, sed diam voluptua.
+Stet clita kasd gubergren, no sea takimata sanctus est.
+.HEADING 2 "Chapter 2"
+.PP
+Stet clita kasd gubergren, no sea takimata sanctus est. Lorem ipsum
+dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod
+tempor invidunt ut labore et do\%lo\%re magna ali\%quyam erat, sed diam
+voluptua. At vero eos et accusam et justo duo do\%lo\%res et ea rebum.
+.PP
+Lorem ipsum dolor sit amet, consetetur sadipscing elitr,
+sed diam nonumy eirmod tempor invidunt. Ut labore et do\%lo\%re magna
+ali\%quyam erat, sed diam voluptua at vero.
+.HEADING 2 "Chapter 3"
+.PP
+Eos et accusam et justo duo do\%lo\%res et ea rebum. Stet clita kasd
+gubergren, no sea takimata sanctus est lorem ipsum dolor sit amet.
+Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam
+nonumy eirmod tempor invidunt ut labore et do\%lo\%re magna ali\%quyam erat,
+sed diam voluptua. At vero eos et accusam et justo duo do\%lo\%res et
+ea rebum.
+.HEADING 1 "Part Two"
+.HEADING 2 "Chapter 4"
+.PP
+Stet clita kasd gubergren, no sea takimata sanctus est
+lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur
+sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore
+et do\%lo\%re magna ali\%quyam erat, sed diam voluptua.
+.PP
+At vero eos et accusam et justo duo do\%lo\%res et ea rebum. Stet clita
+kasd gubergren, no sea takimata sanctus est lorem ipsum dolor sit amet.
+.PP
+Nonumy eirmod tempor invidunt ut labore et do\%lo\%re magna ali\%quyam erat,
+sed diam voluptua. At vero eos et accusam et justo duo do\%lo\%res et
+ea rebum. Lorem ipsum dolor sit amet, consetetur sadipscing elitr,
+sed diam nonumy eirmod tempor invidunt ut labore et do\%lo\%re magna
+ali\%quyam erat, sed diam voluptua. At vero eos et accusam et justo
+duo do\%lo\%res et ea rebum. Stet clita kasd gubergren, no sea takimata
+sanctus est lorem ipsum dolor sit amet. Consetetur sadipscing elitr,
+sed diam nonumy eirmod tempor invidunt.
+.HEADING 2 "Chapter 5"
+.PP
+Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed
+diam nonumy eirmod tempor invidunt ut labore et do\%lo\%re magna
+ali\%quyam erat, sed diam voluptua. At vero eos et accusam et
+justo duo do\%lo\%res et ea rebum. Stet clita kasd gubergren,
+no sea takimata sanctus est lorem ipsum dolor sit amet.
+.PP
+Consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt
+ut labore et do\%lo\%re magna ali\%quyam erat, sed diam voluptua. At vero
+eos et accusam et justo duo do\%lo\%res et ea rebum. Stet clita kasd
+gubergren, no sea takimata sanctus.
+.PP
+At vero eos et accusam et justo duo do\%lo\%res et ea rebum. Stet clita
+kasd gubergren. Sea takimata sanctus est lorem ipsum dolor
+sit amet. Accusam et justo duo do\%lo\%res et ea rebum. Diam
+nonumy eirmod tempor invidunt ut labore et do\%lo\%re magna.
+.RIGHT
+\*[BD]\&...end of sample outline\c
+.EL
+.COLLATE
+\#
+\# The '\c /.EL' keeps mom from depositing a line break which,
+\# because "...end of sample outline" falls exactly on the last
+\# baseline of the page, would spring the page trap that sets a
+\# header at the top of the next page. Since the next page is a
+\# title page, we don't want that. Normally, this isn't required,
+\# although using it routinely before COLLATE is a good habit.
+\#
+\# Notice, too, the use of "\&" before "..." Whenever an input line
+\# begins with either a period, an apostrophe or a space, you must
+\# precede it with \&, otherwise the line will disappear, even when,
+\# as here, there's an inline escape beforehand.
+\#
+\# =====================================================================
+\#
+\# Next, a document composed of two pages of a chapter, set in DRAFT
+\# style, showing the use of the EPIGRAPH BLOCK macro and the QUOTE
+\# macro.
+\#
+\# You'll notice that the starting page number of this "draft" is 1 (in
+\# roman numerals). COPYSTYLE DRAFT always numbers the first page of a
+\# document 1.
+\#
+.TITLE "Lake Attica's Shores"
+.SUBTITLE "A Romance Novel"
+.AUTHOR "Rosemary Winspeare"
+.CHAPTER 1
+.CHAPTER_TITLE "The Bonny Blue Yonder"
+.DRAFT 1
+.REVISION 2
+.MISC "Draft 1, 2nd revision"
+\#
+.DOCTYPE CHAPTER
+.COPYSTYLE DRAFT
+\#
+.EPIGRAPH_FONT I \" Epigraphs are normally set in roman
+.DRAFT_WITH_PAGENUMBER \" Draft/revision info usually goes in the header
+\#
+\# Style the title page
+\#
+.COVER_CHAPTER_SIZE +6
+.COVER_CHAPTER_TITLE_STYLE \
+ SIZE +5 \
+ SPACE .25v
+.COVER_MISC_SIZE -.25
+\#
+\# What goes on the title page
+\#
+.COVER CHAPTER+TITLE MISC
+\#
+\# Begin the document
+\#
+.CHAPTER_SIZE +3.5
+.CHAPTER_TITLE_SIZE +5
+.CHAPTER_TITLE_SPACE +3p
+.START
+.EPIGRAPH BLOCK
+Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam
+nonumy eirmod tempor invidunt ut labore et do\%lo\%re magna ali\%quyam erat,
+sed diam voluptua.
+.RIGHT
+\#
+\# If running PRINTSTYLE TYPEWRITE, this adds space before
+\# attribution ("Joseph E. Blough")
+\#
+.if \n[#PRINT_STYLE]=1 .sp
+\#
+\*[ROM]\[em]Joseph E. Blough
+.EPIGRAPH OFF
+.PP
+Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam
+nonumy eirmod tempor invidunt ut labore et do\%lo\%re magna ali\%quyam erat,
+sed diam voluptua. At vero eos et accusam et justo duo do\%lo\%res et
+ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est.
+At vero eos et accusam et justo duo do\%lo\%res et ea rebum. Lorem ipsum
+dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod
+tempor invidunt ut labore et do\%lo\%re magna ali\%quyam erat, sed diam
+voluptua. At vero eos et accusam et justo duo do\%lo\%res et ea rebum.
+Stet clita kasd gubergren, no sea takimata sanctus est. At vero eos
+et accusam et justo duo do\%lo\%res et ea rebum.
+.PP
+Stet clita kasd gubergren, no sea takimata sanctus est. Lorem ipsum
+dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod
+tempor invidunt.
+.PP
+"Consetetur sadipscing elitr," dixit ea.
+.PP
+"Sed diam nonumy eirmod tempor invidunt ut labore," dixit eum.
+.PP
+Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam
+nonumy eirmod tempor invidunt ut labore et do\%lo\%re magna ali\%quyam erat,
+sed diam voluptua. Consetetur sadipscing elitr, sed diam nonumy
+eirmod tempor invidunt ut labore et do\%lo\%re magna.
+.PP
+"Lorem ipsum dolor sit amet," dixit ea.
+.PP
+"At vero eos et accusam et justo duo do\%lo\%res et ea rebum. Stet clita
+kasd gubergren, no sea takimata sanctus est," dixit eum. "Sed diam
+nonumy eirmod tempor invidunt ut labore et do\%lo\%re magna ali\%quyam erat,
+sed diam voluptua."
+.PP
+Consetetur sadipscing elitr, sed diam nonumy eirmod tempor:
+.QUOTE
+Invidunt ut labore et do\%lo\%re
+Magna ali\%quyam erat sed diam
+Voluptua stet clita kasd gubergren
+No sea takimata sanctus est.
+.QUOTE OFF
+.PP
+Justo duo do\%lo\%res et ea rebum. Stet clita kasd gubergren, no
+sea takimata sanctus est. Lorem ipsum dolor sit amet, consetetur
+sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore
+et do\%lo\%re magna ali\%quyam erat, sed diam voluptua.
+.PP
+"Stet clita kasd gubergren," dixit ea.
+.PP
+"No sea takimata sanctus est," dixit eum.
+.PP
+Nonumy eirmod tempor invidunt ut labore et do\%lo\%re magna. Aliquyam erat
+sed diam voluptua. At vero eos et accusam et justo, duo do\%lo\%res et
+ea rebum.
+.PP
+Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam
+nonumy eirmod tempor invidunt. Ut labore et do\%lo\%re magna ali\%quyam
+erat, sed diam voluptua at vero. Stet clita kasd gubergren, no sea
+takimata sanctus est. Consetetur sadipscing elitr, sed diam nonumy
+eirmod tempor invidunt ut labore et do\%lo\%re magna.
+.PP
+Invidunt ut labore et do\%lo\%re magna ali\%quyam erat, sed diam voluptua.
+At vero eos et accusam et justo duo do\%lo\%res et ea rebum. Stet clita
+kasd gubergren, no sea takimata sanctus est. At vero eos et accusam et
+justo duo do\%lo\%res et ea rebum. Lorem ipsum dolor sit amet, consetetur
+sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore
+et do\%lo\%re magna ali\%quyam erat, sed diam voluptua. At vero eos et
+accusam et justo duo do\%lo\%res et ea rebum. Stet clita kasd gubergren,
+no sea takimata sanctus est. At vero eos et accusam et justo duo
+do\%lo\%res et ea rebum.
+.RIGHT
+\*[BD]\&...end of sample chapter\c
+.EL
+.COLLATE
+\#
+\# =====================================================================
+\#
+\# Finally, a sample journal article, set in two columns with a
+\# 1.5-pica gutter between them. This example also uses QUOTES,
+\# BLOCKQUOTES and FOOTNOTES. In addition, it's set RECTO_VERSO,
+\# with differing left and right margins that alternate from page to
+\# page. (The header also flips from right to left, which you can
+\# see on the 2nd and 3rd pages).
+\#
+\# The primary purpose of this sample is to demonstrate how to
+\# create a stylesheet, along with some of the control macros that
+\# can be used.
+\#
+\# Style the title page
+\#
+.COVER_TITLE_CAPS
+.COVER_ATTRIBUTE_SPACE .5v
+.COVER_AUTHOR_STYLE \
+ SIZE +1.5 \
+ LEAD 14 \
+ SPACE .25v
+.COVER_MISC_STYLE \
+ QUAD L \
+ SIZE +0
+.COVER_COPYRIGHT_SIZE +0
+\#
+\# What goes on the title page
+\#
+.COVER TITLE AUTHOR COPYRIGHT MISC
+\#
+.DOCTYPE DEFAULT
+.COPYSTYLE FINAL
+\#
+.TITLE "Control Equals Chaos"
+.SUBTITLE "\*[ALD1]The Psychological and Auditory \
+Impact of Serial vs. Aleatoric Music\*[RLD1]"
+.AUTHOR "Joe Chang" "and" "Brad Hegel Connors"
+.COPYRIGHT "2015 J. Chang, B.H. Connors
+.MISC "Submitted June 3, 2015" "\*[IT]Piano Quarterly\*[PREV]"
+\#
+\# Style the docheader
+\#
+.TITLE_CAPS
+.ATTRIBUTE_SPACE .33
+.AUTHOR_SIZE +1
+.SUBTITLE_SIZE +2
+\#
+.L_MARGIN 6P
+.R_MARGIN 4P+6p
+.PT_SIZE 10
+.AUTOLEAD 1.5
+\#
+.RECTO_VERSO
+.PAGENUM 1
+\#
+.HEADER_LEFT "Chang, Connors" \" Because we have two authors
+.HEADER_SIZE +1
+\#
+.DOCHEADER_ADVANCE 1.75i
+.DOCHEADER_LEAD +2p
+\#
+\# When PRINTSTYLE is TYPESET, these indents need to be smaller than
+\# the default
+\#
+.if \n[#PRINT_STYLE]=2 \{\
+. PARA_INDENT 1P
+. QUOTE_INDENT 2
+. BLOCKQUOTE_INDENT 2
+.\}
+\#
+\# Style heading 1
+\#
+.HEADING_STYLE 1 \
+ QUAD L \
+ SIZE +0 \
+ NO_NUMBER \
+ NO_CAPS \
+ NO_UNDERSCORE \
+ NO_SPACE_AFTER \
+ BASELINE_ADJUST \n[.v]/8 \" ie 1/8 of the leading
+\#
+\# Style the blockquotes
+\#
+.BLOCKQUOTE_STYLE \
+ FAMILY H \
+ SIZE -2 \
+ AUTOLEAD 2
+\#
+.COLUMNS 2 1P+6p \" Set in two columns
+\#
+\# Being the document
+\#
+.START
+.PP
+Lorem ipsum dolor sit amet, consetetur sadipscing elitr. Sed diam
+nonumy eirmod tempor invidunt ut labore et do\%lo\%re magna. Ali\%quyam
+erat, sed diam voluptua.
+.PP
+At vero eos et accusam et justo duo do\%lo\%res et ea rebum. Stet clita
+kasd gubergren no sea takimata. Sanctus est, lorem ipsum dolor sit
+amet. Consetetur sadipscing elitr, sed diam nonumy. Eirmod tempor
+invidunt ut labore et do\%lo\%re magna ali\%quyam erat. Sed diam voluptua
+at vero eos et accusam et justo.
+\#
+.BLOCKQUOTE
+Stet clita kasd gubergren, no sea takimata sanctus est lorem.
+Ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
+eirmod tempor. Invidunt ut labore et do\%lo\%re magna ali\%quyam erat,
+sed diam voluptua at vero. Eos et accusam et justo duo do\%lo\%res et
+ea rebum stet clita.\c
+.FOOTNOTE \" Note the use of \c, above, to keep the word and footnote marker together.
+Clita ipsum dolor sit amet, consetetur sadipscing elitr.
+.FOOTNOTE OFF
+.BLOCKQUOTE OFF
+\#
+.PP
+Duo do\%lo\%res et ea rebum, stet clita kasd gubergren. No sea takimata
+sanctus est lorem ipsum dolor sit amet, consetetur sadipscing elitr.
+Sed diam nonumy eirmod tempor invidunt ut labore et do\%lo\%re magna
+ali\%quyam. Erat sed diam voluptua at. Vero eos et accusam et justo
+duo do\%lo\%res et ea rebum stet. Clita kasd gubergren no sea takimata
+sanctus est.
+.PP
+Nonumy eirmod tempor invidunt, ut labore et do\%lo\%re magna ali\%quyam
+erat? At vero eos et accusam et justo duo do\%lo\%res et ea. Rebum stet
+clita kasd gubergren no sea takimata sanctus. Est lorem ipsum dolor
+sit amet. Sadipscing\c
+.FOOTNOTE
+Sadipscing diam nonumy eirmod tempor invidunt ut labore et do\%lo\%re magna
+ali\%quyam erat, sed diam voluptua.
+.FOOTNOTE OFF
+ elitr sed diam nonumy eirmod tempor invidunt. Ut labore et do\%lo\%re
+magna ali\%quyam erat, sed diam voluptua. At vero eos et accusam et
+justo duo do\%lo\%res et ea rebum. Stet clita kasd gubergren no sea.
+\#
+.HEADING 1 "Schoenberg \[em]" "The Origins of Serial Pitch Organization"
+\#
+.PP
+Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam
+nonumy eirmod tempor invidunt ut labore et do\%lo\%re magna ali\%quyam erat,
+sed diam voluptua. At vero eos et accusam et justo duo do\%lo\%res et ea
+rebum. Stet clita kasd gubergren, no sea takimata sanctus est lorem.
+Ipsum dolor sit amet consetetur sadipscing. Elitr, sed diam nonumy,
+eirmod tempor invidunt ut labore et do\%lo\%re magna. Ali\%quyam erat sed
+diam voluptua, at vero eos. Et accusam et justo duo do\%lo\%res et ea
+rebum stet clita kasd gubergren lorem ipsum. Dolor sit amet
+consetetur, sadipscing elitr, sed diam. Nonumy eirmod tempor invidunt
+ut labore et do\%lo\%re. Magna ali\%quyam erat sed diam voluptua at vero.
+Eos et accusam et justo duo do\%lo\%res et ea rebum stet clita kasd.
+Gubergren no sea takimata sanctus est.
+.PP
+Amet consetetur sadipscing elitr sed diam nonumy eirmod. Tempor
+invidunt ut labore. Et dolor\%e magna ali\%quyam erat, sed diam voluptua,
+at vero. Eos et accusam et justo duo do\%lo\%res et ea rebum. Stet clita
+kasd gubergren sed diam voluptua.
+.PP
+No sea takimata\c
+.FOOTNOTE
+Takimata sadipscing elitr, sed diam nonumy eirmod tempor invidunt
+ut labore et do\%lo\%re magna ali\%quyam erat, sed diam voluptua.
+.FOOTNOTE OFF
+ sanctus est lorem. Ipsum dolor sit amet, consetetur
+sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore
+et do\%lo\%re magna ali\%quyam erat, sed diam voluptua. At vero eos et
+accusam et justo duo do\%lo\%res et ea rebum amet. Consetetur sadipscing
+elitr sed diam nonumy eirmod tempor invidunt ut labore, et do\%lo\%re
+magna ali\%quyam erat. Sed diam voluptua, at vero, eos et accusam et
+justo duo do\%lo\%res et ea rebum qua certiore.
+\#
+.HEADING 1 "Messiaen to Stockhausen \[em]" "The Quest for Absolute Control"
+\#
+.PP
+Vero eos et accusam et justo duo do\%lo\%res et ea rebum amet:
+\#
+.QUOTE
+Eirmod tempor invidunt
+Ut labore et do\%lo\%re magna ali\%quyam erat
+Sed diam voluptua
+At vero eos et accusam et justo duo do\%lo\%res.
+.QUOTE OFF
+\#
+Lorem ipsum dolor sit amet, consetetur sadipscing elitr
+sed diam. Nonumy eirmod tempor invidunt ut labore et do\%lo\%re magna.
+Aliquyam erat, sed diam voluptua at vero eos et accusam. Et
+justo duo do\%lo\%res et rebum.
+.PP
+Elitr sed diam nonumy eirmod tempor. Invidunt ut labore et do\%lo\%re
+magna ali\%quyam erat sed. Diam voluptua at vero eos et accusam et
+justo duo do\%lo\%res et ea rebum.
+\#
+.BLOCKQUOTE
+Sanctus est lorem ipsum dolor sit amet, consetetur sadipscing. Elitr,
+sed diam nonumy eirmod tempor, invidunt ut labore et do\%lo\%re magna
+ali\%quyam. Erat sed diam voluptua, at vero eos et accusam et justo
+rebum amet. Consetetur sadipsc\%ing elitr sed diam nonumy eirmod
+sed diam nonumy, eirmod tempor. Invidunt tempor invidunt ut labore.\c
+.FOOTNOTE
+Labore diam nonumy eirmod tempor, invidunt ut labore et do\%lo\%re
+magna ali\%quyam. Erat sed diam voluptua, at vero eos et accusam et
+justo.
+.FOOTNOTE OFF
+ Et do\%lo\%re et magna ali\%quyam erat, sed diam voluptua, at vero.
+Eos et accusam et justo duo.
+.BLOCKQUOTE OFF
+\#
+.PP
+Lorem ipsum dolor sit amet, consetetur sadipscing elitr. Sed diam
+nonumy eirmod tempor invidunt ut labore et do\%lo\%re magna.
+.PP
+Nonumy eirmod tempor invidunt, ut labore et do\%lo\%re magna ali\%quyam
+erat? At vero eos et accusam et justo duo do\%lo\%res et ea. Rebum stet
+clita kasd gubergren no sea takimata sanctus. Est lorem ipsum dolor
+sit amet. Sadipscing elitr sed diam nonumy eirmod tempor invidunt.
+Ut labore et do\%lo\%re magna ali\%quyam erat, sed diam voluptua.
+At vero eos et accusam et justo duo do\%lo\%res et ea rebum.
+Stet clita kasd gubergren no sea. Ali\%quyam erat, sed diam voluptua.
+\#
+.HEADING 1 "John Cage \[em]" "Leaving It All to Chance"
+\#
+.PP
+Sit amet, consetetur sadipscing elitr, sed diam nonumy. Eirmod tempor
+invidunt ut labore et do\%lo\%re magna. Ali\%quyam erat, sed diam
+voluptua at vero. Eos et accusam et justo duo dolores et ea rebum.
+Stet clita kasd gubergren, no sea taki\%mata sanctus est.
+.PP
+Consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt
+ut labore et do\%lo\%re magna ali\%quyam erat, sed diam voluptua. At vero
+eos et accusam et justo duo do\%lo\%res et ea rebum. Stet clita kasd
+gubergren, no sea takimata sanctus est lorem. Ipsum dolor sit amet,
+consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt
+ut labore et do\%lo\%re magna ali\%quyam erat, sed diam voluptua. At vero
+eos et accusam et justo duo do\%lo\%res et ea rebum.
+.PP
+Stet clita kasd gubergren. No sea takimata sanctus est lorem ipsum
+dolor sit. Amet consetetur sadipscing elitr, sed diam nonumy eirmod
+tempor. Invidunt ut labore et do\%lo\%re magna ali\%quyam erat, sed diam
+voluptua, at vero. Eos et accusam et justo duo do\%lo\%res et ea rebum.
+Stet clita kasd gubergren, no sea takimata. Sanctus est lorem ipsum
+dolor sit amet consetetur. Sadipscing elitr sed diam nonumy eirmod
+tempor invidunt. Ut labore et do\%lo\%re magna ali\%quyam erat, sed diam
+voluptua. At vero eos et accusam et justo duo do\%lo\%res et ea rebum.
+\#
+.BLOCKQUOTE
+.PP
+Stet clita kasd gubergren no sea. Takimata sanctus est lorem ipsum
+dolor sit amet. Consetetur sadipscing elitr sed diam nonumy eirmod
+tempor invidunt ut labore et do\%lo\%re. Magna ali\%quyam\c
+.FOOTNOTE
+Aliquyam nonumy eirmod tempor invidunt ut labore.
+.FOOTNOTE OFF
+ erat, sed diam
+voluptua at vero eos et accusam. Et justo duo do\%lo\%res et ea rebum,
+stet clita kasd gubergren, no sea takimata.
+.PP
+Takimata lorem ipsum dolor sit amet consetetur sadipscing elitr.
+Sed diam, nonumy eirmod tempor, invidunt ut labore et do\%lo\%re magna.
+Aliquyam erat sed diam voluptua. At vero eos et accusam et
+justo.\c
+.FOOTNOTE
+Justo vero eos et accusam et justo duo.
+.FOOTNOTE OFF
+.BLOCKQUOTE OFF
+\#
+.PP
+Duo do\%lo\%res et ea rebum, stet clita kasd gubergren, no sea takimata
+sanctus. Est lorem ipsum. Dolor sit amet, consetetur sadipscing elitr,
+sed diam nonumy. Eirmod tempor invidunt ut labore et do\%lo\%re magna
+ali\%quyam erat, sed diam voluptua. At vero eos et accusam.
+.PP
+Et justo duo do\%lo\%res et ea rebum stet clita kasd. Gubergren
+no sea takimata sanctus est. Lorem ipsum dolor sit amet, consetetur
+sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore
+et dolore magna ali\%quyam erat, sed diam voluptua. At vero eos et
+accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren,
+no sea takimata sanctus est.
+\#
+.HEADING 1 "Beyond Cage \[em]" "Catching the Midnight Train"
+\#
+.PP
+Lorem ipsum dolor sit amet, consetetur sadipscing elitr. Sed diam
+nonumy eirmod tempor invidunt ut labore et do\%lo\%re magna. Ali\%quyam
+erat, sed diam voluptua.
+.PP
+At vero eos et accusam et justo duo do\%lo\%res et ea rebum. Stet clita
+kasd gubergren no sea takimata. Sanctus est, lorem ipsum dolor sit
+amet. Consetetur sadipscing elitr, sed diam nonumy. Eirmod tempor
+invidunt ut labore et do\%lo\%re magna ali\%quyam erat. Sed diam voluptua
+at vero eos et accusam et justo.
+.PP
+Duo do\%lo\%res et ea rebum, stet clita kasd gubergren. No sea takimata
+sanctus est lorem ipsum dolor sit amet, consetetur sadipscing elitr.
+Sed diam nonumy eirmod tempor invidunt ut labore et do\%lo\%re magna
+ali\%quyam. Erat sed diam voluptua at. Vero eos et accusam et justo
+duo do\%lo\%res et ea rebum stet. Clita kasd gubergren no sea takimata
+sanctus est.
+.PP
+Nonumy eirmod tempor invidunt, ut labore et do\%lo\%re magna ali\%quyam
+erat? At vero eos et accusam et justo duo do\%lo\%res et ea. Rebum stet
+clita kasd gubergren no sea takimata sanctus. Est lorem ipsum dolor
+amet. Sadipscing\c
+.FOOTNOTE
+Sadipscing diam nonumy eirmod tempor invidunt ut labore et do\%lo\%re magna
+ali\%quyam erat, sed diam voluptua.
+.FOOTNOTE OFF
+ elitr sed diam nonumy eirmod tempor invidunt. Ut labore et do\%lo\%re
+magna ali\%quyam erat, sed diam voluptua. At vero eos et accusam et
+justo duo do\%lo\%res et ea rebum. Stet clita kasd gubergren no sea
+takimata lorem. Ipsum dolor sit amet, consetetur sadipscing elitr.
+Sed diam nonumy eirmod tempor invidunt ut labore et do\%lo\%re magna.
+Ali\%quyam erat, sed diam voluptua. At vero eos et accusam et justo
+duo do\%lo\%res et ea rebum. Stet clita kasd gubergren, no sea
+takimata sanctus est.
+.PP
+Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed
+diam nonumy eirmod tempor invidunt ut labore et do\%lo\%re magna
+ali\%quyam erat, sed diam voluptua. At vero eos et accusam et justo
+duo do\%lo\%res et ea rebum. Stet clita kasd gubergren, no sea
+takimata sanctus est.
+.RIGHT
+\*[BD]\&...end of sample article\*[PREV]
+.FINIS
+.TOC_RV_SWITCH
+.TOC
+.\" Local Variables:
+.\" mode: nroff
+.\" End:
+.\" vim: filetype=groff:
diff --git a/contrib/mom/examples/slide-demo.mom b/contrib/mom/examples/slide-demo.mom
new file mode 100644
index 0000000..989ce5a
--- /dev/null
+++ b/contrib/mom/examples/slide-demo.mom
@@ -0,0 +1,438 @@
+.\" -*- mode: text; coding: utf-8; -*-
+\#
+\# Copyright (C) 2004-2020 Free Software Foundation, Inc.
+\# Revised for version 2.5 2021-08.
+\#
+\# Copying and distribution of this file, with or without modification,
+\# are permitted in any medium without royalty provided the copyright
+\# notice and this notice are preserved.
+\#
+.\" Macro for code blocks
+.de CODE_BLOCK
+. ie \\n[.$] \{\
+. CODE off
+. QUOTE off
+. CENTER_BLOCK off
+. \}
+. el \{\
+. CENTER_BLOCK
+. QUOTE
+. CODE
+. \}
+..
+.\"----------------------------------------------------------------
+.
+.TITLE "Creating slide presentations with gropdf/mom"
+.PDF_TITLE "\*[$TITLE]"
+.
+.DOCTYPE SLIDES \
+ ASPECT 16:9 \
+ HEADER "Header left" "\*[$TITLE]" "Header right" \
+ FOOTER "" "" "\*S[+2]\*[SLIDE#]\*S[-2]" \
+ TRANSITION "Box 1 . O" \
+ PAUSE "Wipe 1"
+.
+.PARA_SPACE .75v
+.SS +3
+.HYPHENATION off
+.
+.NEWCOLOR darkred #aa0000
+.NEWCOLOR darkred1 #900000
+.NEWCOLOR blue1 #00007b
+.NEWCOLOR blue2 #00006f
+.NEWCOLOR code-grey GRAY 0.3
+.XCOLOR cyan4
+.XCOLOR green4
+.
+.HEADER_COLOR darkred1
+.HEADER_RULE_COLOR blue1
+.FOOTER_RULE off
+.
+.COVER_STYLE \
+ LEAD +8 \
+ COLOR white
+.HEADING_STYLE 1 \
+ COLOR blue2
+.CODE_STYLE \
+ FONT B \
+ SIZE 115 \
+ COLOR code-grey
+.QUOTE_STYLE \
+ QUAD LEFT
+.CONDENSE 90
+.
+.PDF_IMAGE_FRAME "" 1 blue1
+.
+.COVERTITLE \
+ "Creating slide presentations" \
+ "with" \
+ "gropdf and mom"
+.
+.COVER_START_POS 15P
+.COVER COVERTITLE
+.
+.STRING hand \*[darkred]\[rh]\*[black]
+.
+.\" Make first slide black.
+.\" If printing, remove to save ink.
+.SLIDE_COLOR black
+.
+.START
+.SLIDE_COLOR off
+.
+.ADD_SPACE 9p
+.IB 8P
+.
+.HEADING 1 "PDF slides"
+.SP .5v
+.
+.PP
+PDF slides are a subset of mom's document processing macros
+formatted for presentation mode when viewed in a PDF reader. In
+most respects, they behave identically to the default document type
+described in mom's html documentation\*[HANG .]
+.BR
+Differences in the formatting include\*[HANG :]
+.
+.PAUSE
+.LEFT
+.LIST
+.ITEM .2v
+the choice between two aspect ratios, 4:3 or 16:9
+.LIST USER \*[hand]
+.ITEM
+both fit on A4 or US letter paper sizes when printed
+.
+.PAUSE
+.LIST BACK
+.ITEM .2v
+type is set centered by default
+.LIST USER \*[hand]
+.ITEM
+this may be changed to left, right, or justified
+.
+.PAUSE
+.LIST BACK
+.ITEM .2v
+headers and/or footers must be explicitly instantiated
+.LIST USER \*[hand]
+.ITEM
+the left, centre, and right parts must be supplied
+by the user
+.
+.PAUSE
+.LIST BACK
+.ITEM .2v
+slide numbering (pagination) is disabled
+.LIST USER \*[hand]
+.ITEM
+if slide numbering is desired, it must be put in the left,
+centre, or right part of a header or footer definition
+.QUIT_LISTS
+.
+.NEWSLIDE
+.
+.ADD_SPACE 9p
+.IB 2P
+.
+.DOC_QUAD CENTER
+.
+.HEADING 1 "Pauses and transitions"
+.SP .5v
+.
+.PP
+Slides made with mom take advantage of the pause and slide
+transition features provided in presentation mode by most
+contemporary PDF readers.
+.PAUSE
+.PP
+Pauses and transitions are dynamic and engaging, holding the
+viewer's attention while increasing the impact of the content.
+.PAUSE
+.PP
+With pauses, material on a slide can be revealed progressively
+with
+.BR
+a mouse click or by hitting
+.
+.LIST
+.ITEM .5v
+Next
+.ITEM 2p
+PgDown
+.ITEM 2p
+Spacebar
+.LIST off
+.
+.PAUSE
+.PP
+The manner in which new material is revealed and new slides
+are displayed can be tailored separately for effects like Fade,
+Dissolve, Wipe and others, and can be changed on the fly.
+.
+.NEWSLIDE
+.
+.PP
+Mom slides begin with the macro DOCTYPE SLIDES, where you choose
+the aspect ratio and transition effects, and set up headers and
+footers\*[HANG .]
+.PAUSE
+.PP
+You may find it convenient to provide a title for the slide
+presentation, as the top of the .mom file for these slides
+demonstrates\*[HANG :]
+.
+.SP -1v
+.CODE_BLOCK
+\*[COND]\&.TITLE "Creating slide presentations with gropdf/mom"
+\&.PDF_TITLE "\\*[$TITLE]"
+\&.\\"
+\&.DOCTYPE SLIDES \\
+ ASPECT 16:9 \\
+ HEADER "Header left" "\\*[$TITLE]" "Header right" \\
+ FOOTER "" "" "\\*S[+2]\\*[SLIDE#]\\*S[-2]" \\
+ TRANSITION "Box 1 . O" \\
+ PAUSE "Wipe 1"\*[CONDX]
+.CODE_BLOCK off
+.SP -.5v
+.
+.PAUSE
+.PP
+Afterwards, you may make any changes you like to the layout and
+style, then enter START. Unlike other mom documents, PRINTSTYLE is
+not required\*[HANG .]
+.
+.NEWSLIDE
+.
+.ADD_SPACE 9p
+.IB -1P+6p
+.
+.HEADING 1 \
+ "The \s[-2]PAUSE\s[0] and \s[-2]NEWSLIDE\s[0] macros"
+.SP .5v
+.
+.PP
+Whenever you want a pause before revealing the next material on a
+slide, enter the macro PAUSE on a line by itself. If you want a
+reveal effect that's different from the current one, you may pass
+PAUSE the parameters of the new effect\*[HANG :]
+.
+.SP -1v
+.PAUSE
+.
+.CODE_BLOCK
+\&.PAUSE "Dissolve .4"
+.CODE_BLOCK off
+.
+.PAUSE "Dissolve .4"
+Notice that this material dissolves in, whereas before, new material
+appeared from left to right. \*[BU6]The new effect stays in force
+until you change it again\*[HANG .]
+.PAUSE "Wipe 1"
+.PP
+New slides are introduced with NEWSLIDE. \*[bu6]Transition effects
+and parameters may be given to NEWSLIDE\*[HANG :]
+.SP -1v
+.
+.CODE_BLOCK
+\&.NEWSLIDE "Blinds .5"
+.CODE_BLOCK off
+.
+.PAUSE
+The next slide in this presentation will appear with the Blinds
+effect\*[HANG .]
+.BR
+Consult man gropdf\c
+\*[FU2]\*[UP 1p](\*[DOWN 1p]\*[BU2]1\*[UP 1p]\*[BU1])\*[DOWN 1p]
+for all the pause/transition effects and their
+parameters.\*[BU6]\*[UP 2p]\s[-2]*\s[0]
+.SP 4p
+.FT I
+.PT_SIZE -2
+*Note that not all PDF \*[BU6]viewers support every effect\*[HANG .]
+.FT R
+.PT_SIZE +2
+.
+.NEWSLIDE "Blinds .5"
+.SLIDE_COLOR antiquewhite
+.
+.ADD_SPACE 9p
+.
+.HEADING 1 "Highlighting items
+.SP .5v
+.PP
+The BOX macro lets you highlight items as they are revealed with
+frames and shaded backgrounds\*[HANG .]
+.PAUSE "Fade .5"
+.BOX SHADED pink INSET 3p
+.PP
+This item is highlighted with a shaded background\*[HANG .]
+.PAUSE
+.PP
+The highlight moves to each new item as it's revealed\*[HANG .]
+.PAUSE
+.PP
+Highlighting can continue for as many slides as you want\*[HANG .]
+.PAUSE
+.PP
+If there are no pauses on a slide, BOX can be used
+.BR
+to provide a background for all the items\*[HANG .]
+.PAUSE
+.PP
+The SLIDE_COLOR macro lets you colour
+.BR
+the whole slide (q.v.)\*[HANG .]
+.BOX off
+.
+.NEWSLIDE "Box 1 . O"
+.SLIDE_COLOR off
+.
+.ADD_SPACE 9p
+.
+.HEADING 1 "Macros and preprocessors"
+.SP .5v
+.PP
+Slides can make full use of all mom's document processing and
+typesetting macros, including preprocessors and image insertion\*[HANG .]
+.
+.IBX CLEAR
+.LS -4
+.
+.PAD "\
+\*[FWD 4P+6p]\*[ST1]#\*[ST1X]\
+\*[FWD 2P+6p]\*[ST2]\*[FWD 12P]\\*[ST2X]\
+\*[FWD 3P+9p]\*[ST3]#\*[ST3X]\
+\*[FWD 3P]\*[ST4]#\*[ST4X]\*[FWD 2P]"
+.
+.ST 1 L
+.ST 2 C
+.ST 3 C
+.ST 4 C
+.
+.PAUSE "Fade .5"
+.
+.TAB 1
+.PT_SIZE -1.5
+.CENTER
+\*[BD]\*[blue2]\*[DOWN 6p]tbl
+.LEFT
+.mk
+.PT_SIZE -1
+.COLOR blue2
+.TS H BOXED
+tab(^) allbox;
+c c
+n n.
+\*[darkred]\s[-.5]\*[DOWN .5p]Year^Mean Temp.\s[0]\*[blue2]
+_
+.TH
+\*[cyan4]\fB2015^28.3\*[blue2]
+\*[cyan4]1998^28.3\*[blue2]
+\*[cyan4]1997^28.3\*[blue2]
+\*[cyan4]2010^28.1\*[blue2]
+\*[cyan4]2002^28.1\*[blue2]
+\*[cyan4]2005^28.0\*[blue2]
+\*[cyan4]2014^27.9\*[blue2]
+\*[cyan4]2009^27.9\*[blue2]
+.TE
+.
+.rt
+.PAUSE
+.
+.TN
+.PT_SIZE +1
+\*[FWD 10p]\*[DOWN 6p]pic
+.COLOR green4
+.SP 3p
+.PS 2 LEFT
+A: ellipse wid 0.5 ht 0.5
+ arrow color "green4" up 0.2 from A.n
+ arrow color "green4" up 0.2 right 0.2 from A.ne
+ arrow color "green4" right 0.2 from A.e
+ arrow color "green4" down 0.2 right 0.2 from A.se
+ arrow color "green4" down 0.2 from A.s
+ arrow color "green4" down 0.2 left 0.2 from A.sw
+ arrow color "green4" left 0.2 from A.w
+ arrow color "green4" up 0.2 left 0.2 from A.nw
+.PE
+.
+.rt
+.PAUSE
+.
+.TN
+.COLOR blue2
+\*[FWD 1p]\*[DOWN 6p]eqn
+.FAMILY T
+.PT_SIZE +3
+.LS
+.COLOR code-grey
+.SP 4P
+.EQ
+f sub X (x) ^=^ left {
+ rpile { 0 above 2x above 0 }
+ ~~lpile { x < 0 above 0 <= x <= 1 above x > 1 }
+.EN
+.
+.rt
+.PAUSE
+.
+.TN
+.FAMILY H
+.PT_SIZE -3
+.COLOR blue2
+\*[DOWN 6p]pdf image\*[black]\*[PREV]
+.SP 2P+6p
+.PDF_IMAGE -C penguin.pdf 81p 96p FRAME
+.TQ
+.
+.NEWSLIDE "Box 1 . O"
+.ADD_SPACE 5p
+.IB 10P
+.PT_SIZE +1.5
+.
+.HEADING 1 "Printing handouts"
+.SP .5v
+.
+.CODE_STYLE \
+ COLOR BLACK \
+ SIZE 120
+.PP
+Because slides contain pauses, they need a little help on their
+way to the printer or they stop printing at the first pause\*[HANG .]
+.PAUSE "Wipe 1"
+.PP
+Setting GROPDF_NOSLIDE=1 before invoking
+\[oq]\*[FU4]\*[CODE]\*[COND]pdfmom\*[CONDX]\*[CODE off]\*[FU4]\[cq]
+or
+\[oq]\*[FU2]\*[CODE]\*[COND]groff\~-Tpdf\*[CONDX]\*[CODE off]\*[FU6]\[cq]
+disables the pauses\*[HANG :]
+.
+.SP -1v
+.
+.CODE_STYLE \
+ COLOR code-grey \
+ SIZE 110
+.CODE_BLOCK
+\*[COND]GROPDF_NOSLIDE=1 pdfmom <options> slide-file.mom\*[CONDX]
+.CODE_BLOCK off
+.
+.PAUSE
+The output may be piped directly to a printer or saved to a file\*[HANG .]
+.PAUSE
+.PP
+See mom's html documentation and the gropdf\c
+\*[FU2]\*[UP 1p](\*[DOWN 1p]\*[BU2]1\*[UP 1p]\*[BU1])\*[DOWN 1p]
+manpage for complete information concerning slide usage\*[HANG .]
+.
+.SP 9p
+.CENTER_BLOCK
+.nr dcl-ind -1 1
+.while \n[dcl-ind]<4 \{\
+. DCL SOLID \n+[dcl-ind]P 9p 9p blue2
+.\}
+.CENTER_BLOCK off
+.\" Local Variables:
+.\" mode: nroff
+.\" End:
+.\" vim: filetype=groff:
diff --git a/contrib/mom/examples/test-mom.sh.in b/contrib/mom/examples/test-mom.sh.in
new file mode 100644
index 0000000..ebaba20
--- /dev/null
+++ b/contrib/mom/examples/test-mom.sh.in
@@ -0,0 +1,92 @@
+#!/bin/sh
+#
+# Copyright (C) 2018-2020 Free Software Foundation, Inc.
+#
+# This file is part of groff.
+#
+# groff is free software; 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.
+#
+# groff is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+
+builddir="@abs_top_builddir@"
+have_urw_fonts="@groff_have_urw_fonts@"
+examplesdir="$builddir/contrib/mom/examples"
+ret=0
+list="
+ letter.pdf
+ mom-pdf.pdf
+ mon_premier_doc.pdf
+ sample_docs.pdf
+ slide-demo.pdf
+ typesetting.pdf
+ copyright-chapter.pdf
+ copyright-default.pdf
+ "
+
+if test "$have_urw_fonts" != "yes"; then
+ echo "No URW fonts, mom examples cannot be correctly generated"
+ exit 77
+fi
+
+for cmd in pdfinfo pdfimages
+do
+ if ! command -v $cmd >/dev/null
+ then
+ echo "cannot locate '$cmd' command; skipping" >&2
+ exit 77 # skip
+ fi
+done
+
+# $1: pdf file
+# $2: expected number of pages
+check_number_pages()
+{
+ echo "Checking number of pages of $1"
+ n_pages=`pdfinfo $1 | grep Pages | awk '{ print $2}'`
+ if test "$n_pages" != "$2"; then
+ echo " Error: expected $2 pages, found $n_pages pages"
+ ret=255
+ fi
+}
+
+# $1 pdf file
+check_has_images()
+{
+ echo "Checking if $1 has images"
+ n_lines=`pdfimages -list $1 | wc -l `
+ if test $n_lines -le 2; then
+ echo " no images found"
+ ret=255
+ fi
+}
+
+for k in $list; do
+ if ! test -f $examplesdir/$k; then
+ echo "File $k not found"
+ exit 255
+ fi
+done
+
+check_number_pages "$examplesdir/letter.pdf" 1
+check_number_pages "$examplesdir/mom-pdf.pdf" 8
+check_number_pages "$examplesdir/mon_premier_doc.pdf" 5
+check_number_pages "$examplesdir/sample_docs.pdf" 12
+check_number_pages "$examplesdir/slide-demo.pdf" 33
+check_number_pages "$examplesdir/typesetting.pdf" 3
+check_number_pages "$examplesdir/copyright-chapter.pdf" 5
+check_number_pages "$examplesdir/copyright-default.pdf" 5
+
+check_has_images "$examplesdir/typesetting.pdf"
+check_has_images "$examplesdir/slide-demo.pdf"
+
+exit $ret
diff --git a/contrib/mom/examples/typesetting.mom b/contrib/mom/examples/typesetting.mom
new file mode 100644
index 0000000..e273611
--- /dev/null
+++ b/contrib/mom/examples/typesetting.mom
@@ -0,0 +1,707 @@
+.\" -*- mode: text; coding: utf-8; -*-
+\#
+\# Copyright 2004-2020 Free Software Foundation, Inc.
+\#
+\# Copying and distribution of this file, with or without modification,
+\# are permitted in any medium without royalty provided the copyright
+\# notice and this notice are preserved.
+\#
+\# Most mom users rely on mom's document processing macros to format
+\# their work. The doc processing macros take care of all things
+\# typographic and are simple, clear and easy to learn. The kind of
+\# "by hand" typesetting this file demonstrates is geared towards
+\# professional typographers. Bear in mind, though, that the full
+\# power of mom's typesetting capabilities can be brought to bear on
+\# document processing as well.
+\#
+\# Basic page setup
+\#
+.PAGE 8.5i 11i 1i 1i 1i \" Page size, margins
+\#
+\# Basic type parameters
+\#
+.FAMILY T \" Times Roman family
+.FT B \" Bold font
+.PT_SIZE 12 \" Point size
+.LS 14 \" Leading (line spacing)
+.LEFT \" Set lines flush left, nofill mode
+\#
+\# Refinements
+\#
+.HY \" Hyphenate
+.KERN \" Automatic pairwise kerning
+.LIGATURES \" Automatic ligature generation
+.SMARTQUOTES \" Enable smartquotes
+.SS 0 \" No extra space between sentences
+\#
+.SP |1i-1v \" Advance 1 inch from top of paper to first baseline
+Example 1\*[BU 2]:
+.ALD .25v \" Advance an extra 1/4 linespace
+.UNDERSCORE 3.5p "T\*[BU 4]asting notes using padding, string tabs \
+and multi-columns"
+\#
+.SP \" Add an extra line space
+\#
+.FAM H \" Helvetica family
+.PT_SIZE 10
+.LS 11 \" New leading
+\#
+\# The following uses a combination of padding, string tabs, and the
+\# FWD escape to set up five tabs with 1-pica gutters stretched over
+\# the full line length.
+\#
+.SILENT \" Don't print the next line
+.PAD "\*[ST1]VIN#\*[ST1X]\*[FWD 1P]\*[ST2]ROBE#\*[ST2X]\
+\*[FWD 1P]\*[ST3]NEZ#\*[ST3X]\*[FWD 1P]\*[ST4]BOUCHE#\*[ST4X]\
+\*[FWD 1P]\*[ST5]COMMENTAIRES\*[ST5X]"
+.SILENT OFF \" Resume normal printing of text
+\#
+\# Now that the string tabs have been marked off, we "set" them.
+\#
+.ST 1 L \" First string tab flush left, nofill (line-for-line) mode
+.ST 2 L QUAD \" Remaining tabs are flush left/rag right, fill mode
+.ST 3 L QUAD
+.ST 4 L QUAD
+.ST 5 L QUAD
+\#
+.TAB 1 \" Call first tab
+.UNDERSCORE "VIN"
+.TN \" Move to next tab and stay on the same baseline
+.UNDERSCORE "ROBE"
+.TN \" Ibid
+.UNDERSCORE "NEZ"
+.TN \" Ibid
+.UNDERSCORE "BOUCHE"
+.TN \" Ibid
+.UNDERSCORE "COMMENTAIRES"
+.TQ \" Quit tabs
+\#
+.ALD 6p \" Advance an extra 6 points
+.FT R \" Change font to roman (medium)
+.MCO \" Turn multi-column mode on
+\#
+.TAB 1 \" Notice that this tab gets set line-for-line
+\*[IT]Peelee Island \" Set italic
+\*[PREV]Gewürztraminer \" Revert to former font (roman)
+2000
+(Canada)
+.MCR \" Return to top of column
+.TAB 2 \" Call tab 2; in multi-column mode, don't use .TN
+Jaune pâle.
+.MCR
+.TB 3 \" Notice that from here on, we use the alias TB instead of TAB
+Frais, fruité, ci\%tronné, arômes fortes de lichee et de fruits
+tropicaux.
+.MCR
+.TB 4
+Doux, fruité, bien équilibré avec une bonne acidité.
+.MCR
+.TB 5
+Bon apéro. Servir avec des plats
+.RW .1 \" Reduce Whitespace between letters to tighten this line
+indiens ou \%chinois.
+.RW 0 \" Back to normal spacing between letters
+.BR
+Excellent rapport qualité/prix.
+.MCX 8p \" Multi-column mode off; advance an extra 8 points
+.MCO \" Re-invoke multi-columns for next wine description
+.TB 1
+\*[IT]Carau Pujol
+\*[ROM]Tannat
+1995
+(Uraguay)
+.MCR
+.TB 2
+Rubis foncé, vio\%lacée, presque opaque.
+.MCR
+.TB 3
+Belles arômes de fruits foncés (prunes, cerises noires, cassis).
+Odeurs tertiares de cuir, cèdre, violets, eucalyptus, avec une trace
+exotique de Band-Aid*\*[BU 12].
+\#
+\# The \*[BU 12], above, pulls the period back so that it falls
+\# underneath the asterisk. \*[BP<n>] could have been used instead
+\# if you prefer to use points rather than kern units.
+\#
+.MCR
+.TB 4
+Très rond, tannins mûres et veloutés, avec un long finis fruité et
+doucement alcoolique.
+.MCR
+.TB 5
+Superbe\|! Une aubaine à ne pas manquer. Prêt à boire maintenant.
+.MCX 1v \" Multi-columns off; advance an extra linespace
+\#
+\# Now, an example of a hanging indent. This is excessively fussy
+\# from a typographic standpoint in that it hangs the asterisk outside
+\# the current left margin so that the text following it lines up with
+\# with the text in the tasting notes. Notice that in order to use a
+\# hanging indent, you must first set a left indent.
+\#
+.FT I \" Change font to italic
+.PT_SIZE -.5 \" Reduce point size by 1/2 point
+.LS -.5 \" Reduce leading by 1/2 point
+.JUSTIFY \" Set text justified
+\#
+\# Now, move the left margin back by the width of an asterisk plus 2 points...
+\#
+.L_MARGIN -(\w'*'+2p)
+\#
+\# ...and set a left indent equal to the width of an asterisk plus 2 points
+\#
+.IL \w'*'+2p
+\#
+\# Now, set the hanging indent equal to the left indent, effectively
+\# pulling the first line of the following text back to the new left
+\# margin. Subsequent output lines will be indented by the .IL
+\# amount. Notice that when using the \w inline escape, there's no
+\# need to append a unit of measure.
+\#
+.HI \w'*'+2p
+*\*[FWD 1p]The term "Band-Aid" means the slightly sweet, vaguely chemical
+smell associated with medical-grade plastics. It is often found in
+wines from terroirs in South America. Provided a wine has a sufficient
+concentration of fruit
+.RW .04 \" Tighten the next line slightly, so "lipstick" doesn't hyphenate.
+aromas and complex tertiary characteristics, Band-Aid is a Good Thing.
+Otherwise, it smells like cheap lipstick.
+.RW 0 \" Reset kerning to 0
+\#
+\# Notice, above, that although the values for IL and HI are the width
+\# of an asterisk plus 2 points, when setting the first line of text
+\# (the one with the asterisk at the beginning), we put only 1 point of
+\# space after the *. This is to compensate for the fact that in the
+\# italic font, the letter T doesn't align visually with the rest of
+\# the text. As already noted, this is an extremely fussy example. :)
+\#
+.IQ CLEAR \" Cancel and clear stored indent values
+.L_MARGIN 1i \" Reset left margin to its original value.
+\#
+.ALD 2P \" Add 2-picas extra space before next example
+\#
+.FAM T
+.FT B
+.PT_SIZE 12
+.LS 14
+\#
+Example 2:
+.ALD .25v
+\#
+.COMMENT
+In the next line, because the string to be underscored must be
+enclosed in double-quotes, you can't use the double-quote character
+itself around the word "Massaging". We circumvent this by using the
+groff inline escapes \[lq] and \[rq] (leftquote and rightquote).
+.COMMENT OFF
+\#
+.UNDERSCORE 3.5p "\[lq]Massaging\[rq] \*[BCK 1p]a passage of rag right text"
+.SP \" Add an extra linespace
+\#
+.PT_SIZE 12.5
+.LS 14
+.PT_SIZE -1 \" Reduce point size by 1 point
+Passage using groff spacing defaults
+\#
+.ALD .5v \" Add an extra 1/2 line space
+\#
+.PT_SIZE +1 \" Restore point size
+.QUAD LEFT \" Set quad left, fill mode
+.IB 3P \" Indent 3 picas from both the left and right margins
+.FT R
+The thousand injuries of Fortunato I had borne as I best 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. \*[IT]At length\*[PREV] I would be
+avenged; this was a point definitively settled\[em]but the very
+definitiveness with which it was resolved, precluded the idea of
+risk. I must not only punish, but punish with impunity. A
+wrong is unredressed when retribution overtakes its redresser.
+It is equally unredressed when the avenger fails to make himself
+felt as such to him who has done the wrong.
+.ALD 6p
+\#
+\# The next line is set quad right, nofill mode, 1/2 point smaller
+\# than the preceding text (using the \*[SIZE <n>] inline escape.
+\#
+.RIGHT
+\*[SIZE -.5]\[em]Edgar Allen Poe, \*[IT]The Cask of Amontillado\*[PREV]\*[SIZE +.5]
+.SP \" Extra linespace
+.IBQ \" Disable "indent both"
+\#
+\# The passage above, while acceptable in a longer document, exhibits a
+\# few typographic flaws. The shape of the right margin rag exhibits
+\# a decidedly "rounded" appearance. The word "I" stands alone at the
+\# end of the third line. The space between the 1st and 2nd sentences
+\# ("...revenge. You...") is too large, owing to the letter "Y" that
+\# begins the 2nd sentence. The spacing between "A wrong..." (line 6)
+\# is equally too large because of the way "A" and "w" fit together.
+\# The em-dash before Edgar isn't vertically centered with the letter "E".
+\# And so on. The most important correction below is fixing the rag
+\# so that longer and shorter lines alternate. This is accomplished by
+\# manually breaking lines and then slightly lengthening and shortening
+\# them until a pleasing rag is achieved. The remainder of the little
+\# flaws are fixed with inline escapes.
+\#
+.FT B
+.PT_SIZE -1
+.LEFT
+The same passage, \*[BU4]"massaged"
+\#
+.ALD .5v
+\#
+.FT R
+.PT_SIZE +1
+.QUAD LEFT
+.HY OFF \" Turn automatic hyphenation off
+.BR_AT_LINE_KERN \" Automatically insert a line break (.BR) at each .RW and .EW
+.WS +1 \" Increase word space slightly
+.IB \" Turn "indent both" back on; values are the same as before
+\#
+The thousand injuries of Fortunato I had borne as I best could;
+but when he ventured upon insult, I \*[BU2]vowed revenge.
+\*[BU4]Y\*[BU6]ou, \*[BU4]who so \*[BU2]well know the nature
+.EW .2
+of my soul, \*[BU2]will not suppose, however, that I gave utterance
+to a threat. \*[IT]At
+.EW .2
+length\*[PREV] I would be avenged; this was a point definitively
+settled\[em]but the
+.EW .2
+v\*[BU1]ery definitiveness with which it was resolved, precluded the
+idea of risk.
+.EW 0
+I must not only punish, but punish with impunity. A \*[BCK 1p]wrong
+is unredressed
+.EW .1
+when retribution overtakes its redresser. It is equally unredressed
+when the
+.RW .1
+avenger fails to make himself felt as such to him \*[BU 2]who has
+done the wrong.
+.RW 0 \" Restore normal kerning
+.WS +0 \" Restore normal wordspacing
+.ALD 6p
+.PT_SIZE -.5
+.RIGHT
+\*[UP 1.5p]\[em]\*[DOWN 1.5p]\*[BCK 1p]Edgar \*[BCK 1p]Allen Poe, \
+\*[IT]The Cask of Amontillado\*[PREV]
+.IQ CLEAR \" Cancel and clear stored values of all indents
+\#
+.NEWPAGE \" Start a new page
+.T_MARGIN 1i \" Set top margin to 1i (approx. equivalent to .ALD 1i-1v above)
+\#
+.FAM T
+.FT B
+.PT_SIZE 12
+.LS 14
+.LEFT
+\#
+Example 3:
+.ALD .25v
+.UNDERSCORE 3.5p "A \*[BU2]recipe for enumerated lists using indents"
+.SP .5v \" Add an extra half line space
+.ie '\*[.T]'ps' \
+.FAM N \" New Century Schoolbook family
+.el .if '\*[.T]'pdf' \
+.FAM U-N
+.FT R
+.PT_SIZE 11
+.LS 13
+.HY \" Turn hyphenation back on
+.JUSTIFY \" Justify text
+This example demonstrates the use of left and hanging indents for
+simple enumerated lists. Nested lists are possible, as the example
+shows; however, the more complex the nesting, the wiser it becomes
+to use (string) tabs, as seen in Example 4.
+.DBX .5 0 \n[.l]u 2P+9p \" Draw box; \n[.l]u means "the current line length"
+.IB 6p \" Indent from both left and right margins
+.ALD 14p
+\*[BD]Please note: mom\*[PREV] has macros that allow you to set
+enumerated lists automatically. These examples merely show hanging
+indents and string tabs in use.
+\#
+.ALD 9p
+.JUSTIFY \" Justify text
+.IL \w'\0.\0' \" Establish a left indent equal to 2 figure spaces plus a period.
+.HI \w'\0.\0' \" Establish a hanging indent equal to the left indent.
+.ALD 6p
+\#
+\#
+1.\0This is the first item in the list. N\*[BU2]otice how the first line
+"hangs" back from the remaining text, which is otherwise
+indented by the width of by two figure-spaces (digit-width
+spaces) and a period.
+.BR
+.HI \" Notice that HI doesn't require an argument once the value's set
+.ALD 6p
+2.\0This is the second item in the list. As with the above item,
+notice the use of the \*[BU8]\\0 escape sequence in the input
+text. It's there to ensure that the space after the number/period
+combination always remains the same (i.e. doesn't stretch when the
+line is justified). That way, the text of each item always lines up
+perfectly.
+\#
+.COMMENT
+Now we're going to set a bullet-point list, indented from the text
+above by 1 pica. IL arguments are always added to whatever value
+is in already effect for IL, hence all we have to do is tell mom to
+indent (from the current left indent) 1 pica plus the width of the
+bullet character, \[bu]. \*[FWD 3p] puts three points of space after
+the bullet so that the bullet and the text are visually separated.
+.COMMENT OFF
+\#
+\#
+.IL 1P+\w'\[bu]\*[FWD 3p]'
+\#
+\# Hanging indents are always relative to the current left indent.
+\# The additional 1-pica indent, above, already having been taken
+\# care of, we only want to hang the first lines of bullet list
+\# items back by the width of the bullet character plus its 3 extra
+\# points of space.
+\#
+.ALD 6p
+.HI \w'\[bu]\*[FWD 3p]'
+\*[DOWN 1p]\[bu]\*[UP 1p]\*[FWD 3p]This is the first line of a
+sublist with bullets. N\*[BU2]otice how the first line (the one
+with the bullet) is indented exactly one pica from the text of the
+list item above it, while the remaining lines align with the left
+indent we set above.
+.ALD 6p
+.HI
+\*[DOWN 1p]\[bu]\*[UP 1p]\*[FWD 3p]This is the second item of the
+sublist with bullets. \*[BU4]We could go on indefinitely, but let's
+go back to the top level (numbered) list...
+\#
+\# The easiest way to return to a previous indent value is by
+\# subtraction. The argument to IL, above, was 1P+\w'[bu]\*[FWD
+\# 3p]', so we just reverse it by putting a minus sign in front.
+\# The parentheses are required for groff to evaluate the expression
+\# properly.
+\#
+.IL -(1P+\w'\[bu]\*[FWD 3p]')
+.HI \w'\0.\0' \" Reset hanging indent for use with numbered items.
+.ALD 6p
+3.\0...and here we are.
+.IQ CLEAR \" Don't forget to cancel and/or clear indents!
+\#
+.FAM T
+.FT B
+.PT_SIZE 12
+.LS 14
+.LEFT
+.SP
+\#
+Example 4:
+.ALD .25v
+.UNDERSCORE 3.5p "A \*[BU 2]recipe for nested lists using string tabs"
+.SP .5v
+.ie '\*[.T]'ps' \
+.FAM N
+.el .if '\*[.T]'pdf' \
+.FAM U-N
+.FT R
+.PT_SIZE 11
+.LS 13
+.JUSTIFY
+Although setting up string tabs is a bit more complex than setting
+up indents, it's \*[BU 3]well worth the effort, especially for
+nested lists.
+.ALD 6p
+\#
+.COMMENT
+The PAD line, below, sets up two string tabs. The first (ST1) is
+exactly the length of two figure spaces and a period. The second
+(ST2) is simply "the remainder of the line."
+.COMMENT OFF
+\#
+.SILENT \" Don't print any of this
+.PAD "\*[ST1]\0.\0\*[ST1X]\*[ST2]#\*[ST2X]"
+.ST 1 L \" String tabs must be "set" after being marked off in a line
+.ST 2 J \" ST 1 will be set flush left, nofill; ST 2 will be justified.
+.SILENT OFF \" Restore printing
+\#
+.TB 1
+1.\c
+.TN \" Use .TN so text stays on the same baseline
+This is the first item in the list. N\*[BU 2]otice how, just as in
+Example 3, the first line hangs back from the remaining text, which
+is otherwise
+indented.
+.ALD 6p
+.TB 1
+2.\c
+.TN
+This is the second item in the list. N\*[BU 2]otice that when
+setting "lists" with tabs, there's no need to use the \*[BU 8]\\0
+escape sequence after the number/period combination in the input
+text.
+\#
+.COMMENT
+Now, set up the indented bullet-point sublist. The PAD line
+says: move forward 12 points (1 pica), then mark off a string
+tab (ST3) that's the length of the bullet character; move forward
+another three points, then make the next string tab (ST4) the
+length of remainder of the line.
+.COMMENT OFF
+\#
+.SILENT
+.PAD "\*[FWD 12p]\*[ST3]\[bu]\*[ST3X]\*[FWD 3p]\*[ST4]#\*[ST4X]"
+.ST 3 L
+.ST 4 J
+.SILENT OFF
+.ALD 6p
+.TB 3
+\*[DOWN 1p]\[bu]\*[UP 1p]\c
+.TN
+This is the first line of a sublist with bullets. N\*[BU2]otice
+how the bullets and the text line up exactly the same as in Example
+3.
+.ALD 6p
+.TB 3
+\*[DOWN 1p]\[bu]\*[UP 1p]\c
+.TN
+This is the second item of the sublist with bullets. For the fun of
+it, lets add in an
+.SPREAD
+en-dashed sub-sublist.
+.BR \" We're in fill mode right now, so you must terminate the line with BR
+\#
+.SILENT
+.PAD "\*[FWD 12p]\*[ST5]\[en]\*[ST5X]\*[FWD 4p]\*[ST6]#\*[ST6X]"
+.ST 5 L
+.ST 6 J
+.SILENT OFF
+.ALD 6p
+.TB 5
+\*[UP .75p]\[en]\*[DOWN .75p]\c
+.TN
+Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam
+nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam
+erat, sed diam voluptua.
+.ALD 6p
+.TB 5
+\*[UP .75p]\[en]\*[DOWN .75p]\c
+.TN
+At \*[BU 3]vero eos et accusam et justo duo dolores et ea rebum.
+Stet clita kasd gubergren, no sea takimata sanctus est lorem ipsum
+dolor sit amet.
+.ALD 6p
+.TB 1
+3.\c
+.TN
+And here we are, back at the top-level numbered list with a minimum
+of muss and fuss,
+.ALD 6p
+.TB 1
+4.\c
+.TN
+Generally speaking, once you get the hang of string tabs and the
+\*[BD]PAD\*[PREV] macro, you'll find setting up complex indenting
+structures easier than with the indent macros.
+.TQ
+\#
+.NEWPAGE
+.FAM T
+.FT B
+.PT_SIZE 12
+.LS 14
+.RLD 2p
+.LEFT
+\#
+Example 5:
+.ALD .25v
+.UNDERSCORE 3.5p "Word spacing"
+.ALD 8p
+.ie '\*[.T]'ps' \
+.FAM P \" Palatino family
+.el .if '\*[.T]'pdf' \
+.FAM U-P
+.PT_SIZE 11
+.LS 14
+\#
+\# The "label" lines for the following are set in Helvetica
+\# bold, one point smaller than the examples themselves. This
+\# demonstrates the use of the groff inline escape \f[...] to change
+\# both family and font inline. It also shows using the mom inline
+\# \*S[...], which is an alternate form of the inline, \*[SIZE <n>]
+\#
+\f[HB]\*S[-1]Normal word spacing\*S[+1]\*[PREV]
+.FT R
+N\*[BU1]o\*[BU1]w \*[BU1]is the time for all good men to come to the aid of the party.
+.ALD 4p
+\f[HB]\*S[-1]Word spacing adjusted by \*[UP 1p]\*[BU3]+\*[DOWN 1p]\*[BU1]2\*S[+1]\*[PREV]
+.FT R
+.WS +2
+N\*[BU1]o\*[BU1]w \*[BU1]is the time for all good men to come to the aid of the party.
+.WS DEFAULT
+.ALD 4p
+\f[HB]\*S[-1]Word spacing adjusted by \*[UP 1p]\*[BU3]+\*[DOWN 1p]4\*S[+1]\*[PREV]
+.FT R
+.WS +4
+N\*[BU1]o\*[BU1]w \*[BU1]is the time for all good men to come to the aid of the party.
+.WS DEFAULT
+.ALD 4p
+\f[HB]\*S[-1]Word spacing adjusted by \*[UP 1p]\*[BU3]+\*[DOWN 1p]6\*S[+1]\*[PREV]
+.FT R
+.WS +6
+N\*[BU1]o\*[BU1]w \*[BU1]is the time for all good men to come to the aid of the party.
+.WS DEFAULT
+.SP 1.5v
+\#
+.FAM T
+.FT B
+.PT_SIZE 12
+.LS 14
+\#
+.LEFT
+Example 6:
+.ALD .25v
+.UNDERSCORE 3.5p "Line kerning"
+.ALD 8p
+.ie '\*[.T]'ps' \
+.FAM P \" Palatino family
+.el .if '\*[.T]'pdf' \
+.FAM U-P
+.FT R
+.PT_SIZE 11
+.LS 15
+\#
+\# Here, we set up some tabs so the examples can go into facing columns.
+\#
+.TAB_SET 1 0 19.5P L
+.TAB_SET 2 19.5P 19.5P L
+\#
+.MCO \" Turn multi-columns on
+.TB 1
+\f[HB]\*S[-1]Unkerned line\*S[+1]\*[PREV]
+.FT R
+"But this is \*[IT]important!\/"\*[PREV]she exclaimed.
+.ALD 4p
+\f[HB]\*S[-1]Line "tightened" \[en] .RW .1\*S[+1]\*[PREV]
+.RW .1
+"But this is \*[IT]important!\/"\*[PREV]she exclaimed.
+.ALD 4p
+\#
+\# In the next line, notice that because it uses a different family
+\# (Helvetica instead of Palatino), the RW macro doesn't affect it.
+\#
+\f[HB]\*S[-1]Line "tightened" \[en] .RW .2\*S[+1]\*[PREV]
+.RW .2
+"But this is \*[IT]important!\/"\*[PREV]she exclaimed.
+.ALD 4p
+\f[HB]\*S[-1]Line "tightened" \[en] .RW .3\*S[+1]\*[PREV]
+.RW .3
+"But this is \*[IT]important!\/"\*[PREV]she exclaimed.
+.MCR
+.TB 2
+\f[HB]\*S[-1]Unkerned line\*S[+1]\*[PREV]
+"But this is \*[IT]important!\/"\*[PREV]she exclaimed.
+.ALD 4p
+\f[HB]\*S[-1]Line "loosened" \[en] .EW .1\*S[+1]\*[PREV]
+.EW .1
+"But this is \*[IT]important!\/"\*[PREV]she exclaimed.
+.ALD 4p
+\f[HB]\*S[-1]Line "loosened" \[en] .EW .2\*S[+1]\*[PREV]
+.EW .2
+"But this is \*[IT]important!\/"\*[PREV]she exclaimed.
+.ALD 4p
+\f[HB]\*S[-1]Line "loosened" \[en] .EW .3\*S[+1]\*[PREV]
+.EW .3
+"But this is \*[IT]important!\/"\*[PREV]she exclaimed.
+.MCX 1.5v
+.EW 0
+\#
+.FAM T
+.FT B
+.PT_SIZE 12
+.LS 14
+.LEFT
+\#
+Example 7:
+.ALD .25v
+.UNDERSCORE 3.5p "Cutaround using left\*[FU 2]/right indents, \
+multi columns and a dropcap"
+.SP
+\#
+.FT R
+.PT_SIZE 11
+.LS 12
+.BR_AT_LINE_KERN OFF \" In justified text, it's best to have this OFF
+\#
+.TAB_SET 1 0 18.5P J
+.TAB_SET 2 20.5P 18.5P J
+.MCO
+.ALD 5P+9p
+\#
+\# The little picture of tux.
+\#
+.if '\*[.T]'pdf' .PDF_IMAGE penguin.pdf 81p 96p
+.if '\*[.T]'ps' .PSPIC penguin.ps 81p 96p
+.MCR
+.TAB 1
+.XCOLOR red \" Initialize the X11 color, red
+.DROPCAP_COLOR red
+.DROPCAP_FONT B
+.DROPCAP L 3 COND 80 \" i.e. the letter L dropped 3 lines, condensed to 80% of its normal width
+.EW .2
+orem ipsum dolor sit amet, consetetur sa\%dip\%scing elitr, sed diam
+nonumy eir\%mod tempor invidunt ut labore et dolore magna aliquyam
+erat, sed diam voluptua.
+.EW 0
+.TI 1P
+At vero eos et accusam et justo duo dolores et ea rebum. Stet clita
+kasd gubergren, no sea taki-
+.SPREAD \" Force justify preceding line before starting indent
+.IR 3.5P
+kimata sanctus est lorem ipsum dolor sit amet. Lorem ipsum dolor
+sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod
+tempor.
+.EW .2
+.TI
+Invidunt ut labore et dolore magna ali\%qu\%yam erat, sed diam
+voluptua. At
+.EW 0
+vero eos et accusam et justo duo dolores et ea rebum.
+.TI
+Stet clita kasd gubergren, no sea ta-
+.SPREAD \" Force justify preceding line before quitting indent
+.IRQ
+kimata sanctus est lorem ipsum dolor sit amet. Lorem ipsum dolor
+sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor
+in\%vi\%dunt ut labore et dolore magna aliquyam erat. Sed diam
+voluptua, at vero eos et accusam et justo duo
+.SPREAD
+.EW .3
+dolores et ea rebum. Stet clita no kasd guber-
+.SPREAD
+.MCR
+.TB 2
+gren, no sea takimata sanctus est lorem ipsum
+.EW 0
+dolor sit amet. Consetetur sadipscing elitr, sed diam nonumy eirmod
+tempor invidunt ut labore et dolore.
+.TI
+Magna aliquyam erat, sed diam voluptua, at vero eos et accusam. Et
+justo duo dolores et ea
+.SPREAD
+.IL 3.5P
+rebum, stet clita kasd gubergren. No sea takimata sanctus est,
+lorem ipsum dolor sit amet.
+.TI
+Sit amet, consetetur sadipscing elitr, sed diam. Nonumy eirmod
+tempor in\%vi-
+.EW .3
+dunt ut labore et dolore magna. Ali-
+.EW 0
+quyam erat sed diam voluptua. At vero eos et accusam et justo duo
+dolores et ea rebum stet.
+.ILQ
+.TI
+Dolores et ea rebum stet clita kasd gubergren, no sea takimata
+sanctus. Sadipscing elitr sed diam, nonumy eirmod tempor, invidunt
+ut labore et dolore magna aliquyam erat. Sed diam voluptua, at vero
+eos et accusam et justo duo dolores et ea rebum.
+.\" Local Variables:
+.\" mode: nroff
+.\" End:
+.\" vim: filetype=groff:
diff --git a/contrib/mom/groff_mom.7.man b/contrib/mom/groff_mom.7.man
new file mode 100644
index 0000000..3872b8f
--- /dev/null
+++ b/contrib/mom/groff_mom.7.man
@@ -0,0 +1,3427 @@
+.TH groff_mom @MAN7EXT@ "@MDATE@" "groff @VERSION@"
+.SH Name
+groff_mom \- modern macros for document composition with GNU
+.I roff
+.
+.
+.\" ====================================================================
+.\" Legal Terms
+.\" ====================================================================
+.\"
+.\" Copyright (C) 2002-2020 Free Software Foundation, Inc.
+.\"
+.\" This file is part of mom, which is part of groff, the GNU roff
+.\" type-setting system.
+.\"
+.\" This program is free software: 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.
+.\"
+.\" This program is distributed in the hope that it will be useful, but
+.\" WITHOUT ANY WARRANTY; without even the implied warranty of
+.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+.\" General Public License for more details.
+.\"
+.\" You should have received a copy of the GNU General Public License
+.\" along with this program. If not, see
+.\" <http://www.gnu.org/licenses/>.
+.
+.
+.\" Save and disable compatibility mode (for, e.g., Solaris 10/11).
+.do nr *groff_groff_mom_7_man_C \n[.cp]
+.cp 0
+.
+.\" Define fallback for groff 1.23's MR macro if the system lacks it.
+.nr do-fallback 0
+.if !\n(.f .nr do-fallback 1 \" mandoc
+.if \n(.g .if !d MR .nr do-fallback 1 \" older groff
+.if !\n(.g .nr do-fallback 1 \" non-groff *roff
+.if \n[do-fallback] \{\
+. de MR
+. ie \\n(.$=1 \
+. I \%\\$1
+. el \
+. IR \%\\$1 (\\$2)\\$3
+. .
+.\}
+.rr do-fallback
+.
+.
+.\" ====================================================================
+.\" Setup
+.\" ====================================================================
+.
+.hw line-space
+.
+.
+.\" ====================================================================
+.\" .FONT (<font name> <text> [<font name> <text> ...])
+.\"
+.\" Print in different fonts: R, I, B, CR, CI, CB
+.\"
+.de FONT
+. if (\\n[.$] = 0) \{\
+. nop \&\f[P]\&
+. return
+. \}
+. ds result \&
+. while (\\n[.$] >= 2) \{\
+. as result \,\f[\\$1]\\$2
+. if !"\\$1"P" .as result \f[P]\""
+. shift 2
+. \}
+. if (\\n[.$] = 1) .as result \,\f[\\$1]
+. nh
+. nop \\*[result]\&
+. rm result
+. hy \\n[HY]
+..
+.
+.
+.\" ====================================================================
+.SH Synopsis
+.\" ====================================================================
+.
+.SY groff
+.B \-mom
+.RI [ option\~ .\|.\|.\&]
+.RI [ file\~ .\|.\|.]
+.
+.SY groff
+.B "\-m mom"
+.RI [ option\~ .\|.\|.\&]
+.RI [ file\~ .\|.\|.]
+.YS
+.
+.
+.\" ====================================================================
+.SH Description
+.\" ====================================================================
+.
+.I mom
+is a macro set for
+.IR groff ,
+designed primarily to prepare documents for PDF and PostScript output.
+.
+.
+.I mom
+provides macros in two categories: typesetting
+and document processing.
+.
+The former provide access to
+.IR groff 's
+typesetting capabilities in ways that are simpler to master than
+.IR groff 's
+requests and escape sequences.
+.
+The latter provide highly customizable markup tags that allow the user
+to design and output professional-looking documents with a minimum of
+typesetting intervention.
+.
+.
+.P
+Files processed with
+.MR pdfmom @MAN1EXT@
+produce PDF documents.
+.
+The documents include a PDF outline that appears in the navigation pane
+panel of document viewers,
+and may contain clickable internal and external links.
+.
+.P
+Normally.
+.IR groff 's
+native PDF driver,
+.MR gropdf @MAN1EXT@ ,
+is used to generate the output.
+.
+When
+.I pdfmom
+is given the
+.RB \[lq] "\-T ps" \[rq]
+option,
+it still produces PDF,
+but processing is delegated to
+.IR pdfroff ,
+which uses
+.IR groff 's
+PostScript driver,
+.MR grops @MAN1EXT@ .
+.
+Not all PDF features are available when
+.B \-T ps
+is given;
+its primary use is to allow processing of files with embedded PostScript
+images.
+.\" XXX: but we have PDFPIC now...so -Tps is necessary only for people
+.\" who want to avoid use of unsafe mode?
+.
+.
+.P
+Files processed with
+.B groff \-mom
+(or
+.BR "\-m mom" )
+format for the device specified with the
+.B \-T
+option.
+.
+(In this installation,
+.B @DEVICE@
+is the default output device.)
+.
+.
+.P
+.I mom
+comes with her own comprehensive documentation in HTML.
+.
+A PDF manual,
+\[lq]Producing PDFs with
+.I groff
+and
+.IR mom \[rq],
+discusses preparation of PDF documents with
+.I mom
+in detail.
+.
+.
+.\" ====================================================================
+.SH Files
+.\" ====================================================================
+.
+.TP
+.I @MACRODIR@/\:mom.tmac
+is a wrapper enabling the package to be loaded with
+.RB \[lq] "groff \-m mom" \[rq].
+.
+.
+.TP
+.I @MACRODIR@/\:om.tmac
+implements the package.
+.
+.
+.TP
+.I @HTMLDOCDIR@/\:mom/\:toc.html
+is the entry point to the HTML documentation.
+.
+.
+.TP
+.I @PDFDOCDIR@/\:mom\-pdf.pdf
+is \[lq]Producing PDFs with
+.I groff
+and
+.IR mom \[rq],
+by Deri James and Peter Schaffter.
+.
+.
+.TP
+.IR @EXAMPLEDIR@/\:mom/\: * .mom
+are examples of
+.I mom
+usage.
+.
+.
+.\" ====================================================================
+.SH Reference
+.\" ====================================================================
+.
+.\" ====================================================================
+.SS "Escape sequences"
+.\" ====================================================================
+.
+.TP
+.FONT B \[rs]*[ I <colorname> B ]
+begin using an initialized colour inline
+.
+.
+.TP
+.FONT B \[rs]*[BCK I " n" B ]
+move backward in a line
+.
+.
+.TP
+.B \[rs]*[BOLDER]
+invoke pseudo bold inline (related to macro
+.BR .SETBOLDER )
+.
+.
+.TP
+.B \[rs]*[BOLDERX]
+off pseudo bold inline (related to macro
+.BR .SETBOLDER )
+.
+.
+.TP
+.FONT B \[rs]*[BU I " n" B ]
+move characters pairs closer together inline (related to macro
+.BR \%.KERN )
+.
+.
+.TP
+.B \[rs]*[COND]
+invoke pseudo condensing inline (related to macro
+.BR \%.CONDENSE )
+.
+.
+.TP
+.B \[rs]*[CONDX]
+off pseudo condensing inline (related to macro
+.BR \%.CONDENSE )
+.
+.
+.TP
+.FONT B \[rs]*[CONDSUP] R .\|.\|. B \[rs]*[CONDSUPX]
+pseudo-condensed superscript
+.
+.
+.TP
+.FONT B \[rs]*[DOWN I " n" B ]
+temporarily move downward in a line
+.
+.
+.TP
+.B \[rs]*[EN\-MARK]
+mark initial line of a range of line numbers (for use with line
+numbered endnotes)
+.
+.
+.TP
+.B \[rs]*[EXT]
+invoke pseudo extending inline (related to macro
+.BR \%.EXTEND )
+.
+.
+.TP
+.B \[rs]*[EXTX]
+off pseudo condensing inline (related to macro
+.BR \%.EXTEND )
+.
+.
+.TP
+.FONT B \[rs]*[EXTSUP] R .\|.\|. B \[rs]*[EXTSUPX]
+pseudo extended superscript
+.
+.
+.TP
+.FONT B \[rs]*[FU I " n" B ]
+move characters pairs further apart inline (related to macro
+.BR \%.KERN )
+.
+.
+.TP
+.FONT B \[rs]*[FWD I " n" B ]
+move forward in a line
+.
+.
+.TP
+.B \[rs]*[LEADER]
+insert leaders at the end of a line
+.
+.
+.TP
+.B \[rs]*[RULE]
+draw a full measure rule
+.
+.
+.TP
+.FONT B \[rs]*[SIZE I " n" B ]
+change the point size inline (related to macro
+.BR \%.PT_SIZE )
+.
+.
+.TP
+.B \[rs]*[SLANT]
+invoke pseudo italic inline (related to macro
+.BR \%.SETSLANT )
+.
+.
+.TP
+.B \[rs]*[SLANTX]
+off pseudo italic inline (related to macro
+.BR \%.SETSLANT )
+.
+.
+.TP
+.FONT B \[rs]*[ST I <n> B ] R .\|.\|. B \[rs]*[ST I <n> B X]
+string tabs (mark tab positions inline)
+.
+.
+.TP
+.FONT B \[rs]*[SUP] R .\|.\|. B \[rs]*[SUPX]
+superscript
+.
+.
+.TP
+.B \[rs]*[TB+]
+inline escape for
+.B .TN
+.RI ( "Tab Next" )
+.
+.
+.TP
+.FONT B \[rs]*[UL] R .\|.\|. B \[rs]*[ULX]
+invoke underlining inline (fixed width fonts only)
+.
+.
+.TP
+.FONT B \[rs]*[UP I " n" B ]
+temporarily move upward in a line
+.
+.
+.\" ====================================================================
+.SS Macros
+.\" ====================================================================
+.
+.TP
+.B .AUTOLEAD
+set the linespacing relative to the point size
+.
+.
+.TP
+.B .B_MARGIN
+set a bottom margin
+.
+.
+.TP
+.B .BR
+break a justified line
+.
+.
+.TP
+.B .CENTER
+set line-by-line quad centre
+.
+.
+.TP
+.B .CONDENSE
+set the amount to pseudo condense
+.
+.
+.TP
+.B .EL
+break a line without advancing on the page
+.
+.
+.TP
+.B .EXTEND
+set the amount to pseudo extend
+.
+.
+.TP
+.B .FALLBACK_FONT
+establish a fallback font (for missing fonts)
+.
+.
+.TP
+.B .FAM
+alias to
+.B .FAMILY
+.
+.
+.TP
+.BI ".FAMILY " <family>
+set the
+.I family type
+.
+.
+.TP
+.B .FT
+set the font style (roman, italic, etc.)
+.
+.
+.TP
+.BI ".HI [" " <measure> " ]
+hanging indent
+.
+.
+.TP
+.B .HY
+automatic hyphenation on/off
+.
+.
+.TP
+.B .HY_SET
+set automatic hyphenation parameters
+.
+.
+.TP
+.BI ".IB [" " <left measure> <right measure> " ]
+indent both
+.
+.
+.TP
+.B .IBX [ CLEAR ]
+exit indent both
+.
+.
+.TP
+.BI ".IL [" " <measure> " ]
+indent left
+.
+.
+.TP
+.B .ILX [ CLEAR ]
+exit indent left
+.
+.
+.TP
+.B .IQ [ CLEAR ]
+quit any/all indents
+.
+.
+.TP
+.BI ".IR [" " <measure> " ]
+indent right
+.
+.
+.TP
+.B .IRX [ CLEAR ]
+exit indent right
+.
+.
+.TP
+.B .JUSTIFY
+justify text to both margins
+.
+.
+.TP
+.B .KERN
+automatic character pair kerning on/off
+.
+.
+.TP
+.B .L_MARGIN
+set a left margin (page offset)
+.
+.
+.TP
+.B .LEFT
+set line-by-line quad left
+.
+.
+.TP
+.B .LL
+set a line length
+.
+.
+.TP
+.B .LS
+set a linespacing (leading)
+.
+.
+.TP
+.B .PAGE
+set explicit page dimensions and margins
+.
+.
+.TP
+.B .PAGEWIDTH
+set a custom page width
+.
+.
+.TP
+.B .PAGELENGTH
+set a custom page length
+.
+.
+.TP
+.BI .PAPER " <paper_type>"
+set common paper sizes (letter, A4, etc)
+.
+.
+.TP
+.B .PT_SIZE
+set the point size
+.
+.
+.TP
+.B .QUAD
+"justify" text left, centre, or right
+.
+.
+.TP
+.B .R_MARGIN
+set a right margin
+.
+.
+.TP
+.B .RIGHT
+set line-by-line quad right
+.
+.
+.TP
+.B .SETBOLDER
+set the amount of emboldening
+.
+.
+.TP
+.B .SETSLANT
+set the degree of slant
+.
+.
+.TP
+.B .SPREAD
+force justify a line
+.
+.
+.TP
+.B .SS
+set the sentence space size
+.
+.
+.TP
+.B .T_MARGIN
+set a top margin
+.
+.
+.TP
+.BI ".TI [" " <measure> " ]
+temporary left indent
+.
+.
+.TP
+.B .WS
+set the minimum word space size
+.
+.
+.\" ====================================================================
+.SH "Documentation of details"
+.\" ====================================================================
+.
+.\" ====================================================================
+.SS "Details of inline escape sequences in alphabetical order"
+.\" ====================================================================
+.
+.TP
+.FONT B \[rs]*[ I <colorname> B ]
+begin using an initialized colour inline
+.
+.
+.TP
+.FONT B \[rs]*[BCK I " n" B ]
+move backward in a line
+.
+.
+.\" ====================================================================
+.\" BOLDER
+.\" ====================================================================
+.TP
+.B \[rs]*[BOLDER]
+.TQ
+.B \[rs]*[BOLDERX]
+Emboldening on/off
+.
+.RS
+.
+.P
+.B \[rs]*[BOLDER]
+begins emboldening type.
+.
+.B \[rs]*[BOLDERX]
+turns the feature off.
+.
+Both are inline escape sequences;
+therefore,
+they should not appear as separate lines,
+but rather be embedded in text lines, like this:
+.RS
+.EX
+.FONT R "Not " B \[rs]*[BOLDER] R everything B \[rs]*[BOLDERX] \
+R " is as it seems."
+.EE
+.RE
+.
+.P
+Alternatively, if you wanted the whole line emboldened, you should do
+.RS
+.EX
+.FONT B \[rs]*[BOLDER] R "Not everything is as it seems." \
+B \[rs]*[BOLDERX]
+.EE
+.RE
+.
+Once
+.B \[rs]*[BOLDER]
+is invoked, it remains in effect until turned off.
+.
+.P
+Note: If you're using the document processing macros with
+.BR "\%.PRINTSTYLE \%TYPEWRITE" ,
+.I mom
+ignores
+.B \[rs]*[BOLDER]
+requests.
+.
+.RE
+.
+.
+.\" ====================================================================
+.\" BU
+.\" ====================================================================
+.TP
+.FONT B \[rs]*[BU I " n" B ]
+move characters pairs closer together inline (related to macro
+.BR \%.KERN )
+.
+.
+.\" ====================================================================
+.\" COND
+.\" ====================================================================
+.TP
+.B \[rs]*[COND]
+.TQ
+.B \[rs]*[CONDX]
+Pseudo-condensing on/off
+.
+.RS
+.
+.P
+.B \[rs]*[COND]
+begins pseudo-condensing type.
+.
+.B \[rs]*[CONDX]
+turns the feature off.
+.
+Both are inline escape sequences;
+therefore,
+they should not appear as separate lines,
+but rather be embedded in text lines, like this:
+.RS
+.EX
+.FONT B \[rs]*[COND] I "Not everything is as it seems." B \[rs]*[CONDX]
+.EE
+.RE
+.B \%\[rs]*[COND]
+remains in effect until you turn it off with
+.BR \%\[rs]*[CONDX] .
+.
+.P
+IMPORTANT: You must turn
+.B \%\[rs]*[COND]
+off before making any changes to the point size of your type, either
+via the
+.B \%.PT_SIZE
+macro or with the
+.B \[rs]s
+inline escape sequence.
+.
+If you wish the new point size to be pseudo-condensed, simply reinvoke
+.B \%\[rs]*[COND]
+afterward.
+.
+Equally,
+.B \%\[rs]*[COND]
+must be turned off before changing the condense percentage with
+.BR \%.CONDENSE .
+.
+.P
+Note: If you're using the document processing macros with
+.BR "\%.PRINTSTYLE \%TYPEWRITE" ,
+.I mom
+ignores
+.B \%\[rs]*[COND]
+requests.
+.
+.RE
+.
+.
+.\" ====================================================================
+.\" CONDSUP
+.\" ====================================================================
+.TP
+.FONT B \[rs]*[CONDSUP] R .\|.\|. B \[rs]*[CONDSUPX]
+pseudo-condensed superscript
+.
+.
+.\" ====================================================================
+.\" DOWN
+.\" ====================================================================
+.TP
+.FONT B \[rs]*[DOWN I " n" B ]
+temporarily move downward in a line
+.
+.
+.\" ====================================================================
+.\" EN-MARK
+.\" ====================================================================
+.TP
+.B \[rs]*[EN\-MARK]
+mark initial line of a range of line numbers (for use with line
+numbered endnotes)
+.
+.
+.\" ====================================================================
+.\" EXT
+.\" ====================================================================
+.TP
+.B \[rs]*[EXT]
+.TQ
+.B \[rs]*[EXTX]
+Pseudo-extending on/off
+.
+.RS
+.
+.P
+.B \[rs]*[EXT]
+begins pseudo-extending type.
+.
+.B \[rs]*[EXTX]
+turns the feature off.
+.
+Both are inline escape sequences;
+therefore,
+they should not appear as separate lines,
+but rather be embedded in text lines, like this:
+.RS
+.EX
+.FONT B \[rs]*[EXT] I "Not everything is as it seems." B \[rs]*[EXTX]
+.EE
+.RE
+.B \[rs]*[EXT]
+remains in effect until you turn it off with
+.BR \[rs]*[EXTX] .
+.
+.P
+IMPORTANT: You must turn
+.B \%\[rs]*[EXT]
+off before making any changes to the point size of your type, either
+via the
+.B \%.PT_SIZE
+macro or with the
+.B \[rs]s
+inline escape sequence.
+.
+If you wish the new point size to be
+.IR \%pseudo-extended ,
+simply reinvoke
+.B \%\[rs]*[EXT]
+afterward.
+.
+Equally,
+.B \%\[rs]*[EXT]
+must be turned off before changing the extend percentage with
+.BR \%.EXTEND .
+.
+.P
+Note: If you are using the document processing macros with
+.BR "\%.PRINTSTYLE \%TYPEWRITE" ,
+.I mom
+ignores
+.B \%\[rs]*[EXT]
+requests.
+.
+.RE
+.
+.
+.\" ====================================================================
+.\" EXTSUP
+.\" ====================================================================
+.TP
+.FONT B \[rs]*[EXTSUP] R .\|.\|. B \[rs]*[EXTSUPX]
+pseudo extended superscript
+.
+.
+.\" ====================================================================
+.\" FU
+.\" ====================================================================
+.TP
+.FONT B \[rs]*[FU I " n" B ]
+move characters pairs further apart inline (related to macro
+.BR .KERN )
+.
+.
+.\" ====================================================================
+.\" FWD
+.\" ====================================================================
+.TP
+.FONT B \[rs]*[FWD I " n" B ]
+move forward in a line
+.
+.
+.\" ====================================================================
+.\" LEADER
+.\" ====================================================================
+.TP
+.B \[rs]*[LEADER]
+insert leaders at the end of a line
+.
+.
+.\" ====================================================================
+.\" RULE
+.\" ====================================================================
+.TP
+.B \[rs]*[RULE]
+draw a full measure rule
+.
+.
+.\" ====================================================================
+.\" PT_SIZE
+.\" ====================================================================
+.TP
+.FONT B \[rs]*[SIZE I " n" B ]
+change the point size inline (related to macro
+.BR \%.PT_SIZE )
+.
+.
+.\" ====================================================================
+.\" SLANT
+.\" ====================================================================
+.TP
+.B \[rs]*[SLANT]
+.TQ
+.B \[rs]*[SLANTX]
+Pseudo italic on/off
+.
+.RS
+.
+.P
+.B \%\[rs]*[SLANT]
+begins
+.I pseudo-italicizing
+.IR type .
+.
+.B \%\[rs]*[SLANTX]
+turns the feature off.
+.
+Both are inline escape sequences;
+therefore,
+they should not appear as separate lines,
+but rather be embedded in text lines, like this:
+.RS
+.EX
+.FONT R "Not " B \[rs]*[SLANT] R everything B \[rs]*[SLANTX] \
+R " is as it seems."
+.EE
+.RE
+.
+.P
+Alternatively, if you wanted the whole line
+.IR pseudo-italicized ,
+you'd do
+.RS
+.EX
+.FONT B \[rs]*[SLANT] R "Not everything is as it seems." \
+B \[rs]*[SLANTX]
+.EE
+.RE
+.
+.P
+Once
+.B \[rs]*[SLANT]
+is invoked, it remains in effect until turned off.
+.
+.P
+Note: If you're using the document processing macros with
+.BR "\%.PRINTSTYLE \%TYPEWRITE" ,
+.I mom
+underlines pseudo-italics by default.
+.
+To change this behaviour, use the special macro
+.BR .SLANT_MEANS_SLANT .
+.
+.RE
+.
+.
+.\" ====================================================================
+.\" ST
+.\" ====================================================================
+.TP
+.FONT B \[rs]*[ST I <number> B ] R .\|.\|. B \[rs]*[ST I <number> B X]
+Mark positions of string tabs
+.
+.RS
+.P
+The
+.I quad
+direction must be
+.B LEFT
+or
+.B \%JUSTIFY
+(see
+.B \%.QUAD
+and
+.BR \%.JUSTIFY )
+or the
+.I no-fill mode
+set to
+.B LEFT
+in order for these inlines to function properly.
+.
+Please see
+.IR \%IMPORTANT ,
+below.
+.
+.P
+String tabs need to be marked off with inline escape sequences before
+being set up with the
+.B .ST
+macro.
+.
+Any input line may contain string tab markers.
+.
+.IR <number> ,
+above, means the numeric identifier of the tab.
+.
+.P
+The following shows a sample input line with string tab markers.
+.RS
+.EX
+.BR \[rs]*[ST1] "De minimus" \[rs]*[ST1X] \c
+.RB "non curat" \[rs]*[ST2] lex \[rs]*[ST2X] .
+.EE
+.RE
+.
+.P
+String
+.I tab 1
+begins at the start of the line and ends after the word
+.IR \%time .
+.
+String
+.I tab 2
+starts at
+.I good
+and ends after
+.IR men .
+.
+.I Inline escape sequences
+(e.g.,
+.I font
+or
+.I point size
+.IR changes ,
+or horizontal movements, including padding) are taken into account
+when
+.I mom
+determines the
+.I position
+and
+.I length
+of
+.I string
+.IR tabs .
+.
+.P
+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.
+.
+.P
+Once string tabs have been marked in input lines, they have to be
+.I set
+with
+.BR .ST ,
+after which they may be called, by number, with
+.BR .TAB .
+.
+.P
+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
+.B \%.SILENT
+macro.
+.
+.P
+.I IMPORTANT:
+Owing to the way
+.I groff
+processes input lines and turns them into output lines, it is not
+possible for
+.I mom
+to
+.I guess
+the correct starting position of string tabs marked off in lines that
+are centered or set flush right.
+.
+.P
+Equally, she cannot guess the starting position if a line is fully
+justified and broken with
+.BR \%.SPREAD .
+.
+.P
+In other words, in order to use string tabs,
+.B LEFT
+must be active, or, if
+.B .QUAD LEFT
+or
+.B \%JUSTIFY
+are active, the line on which the
+.I string tabs
+are marked must be broken
+.I manually
+with
+.B .BR
+(but not
+.BR \%.SPREAD ).
+.
+.P
+To circumvent this behaviour, I recommend using the
+.B PAD
+to set up string tabs in centered or flush right lines.
+.
+Say, for example, you want to use a
+.I string tab
+to
+.I underscore
+the text of a centered line with a rule.
+.
+Rather than this,
+.RS
+.EX
+.B .CENTER
+.B \[rs]*[ST1]A line of text\[rs]*[ST1X]\[rs]c
+.B .EL
+.B .ST 1
+.B .TAB 1
+.B .PT_SIZE 24
+.B .ALD 3p
+.B \[rs]*[RULE]
+.B .RLD 3p
+.B .TQ
+.EE
+.RE
+you should do:
+.RS
+.EX
+\&.QUAD CENTER
+\&.PAD "#\[rs]*[ST1]A line of text\[rs]*[ST1X]#"
+\&.EL
+\&.ST 1
+\&.TAB 1
+\&.PT_SIZE 24
+\&.ALD 3p
+\&\[rs]" You can\[aq]t use \[rs]*[UP] or \[rs]*[DOWN] with \[rs]*[RULE].
+\&.RLD 3p
+\&.TQ
+.EE
+.RE
+.
+.RE
+.
+.
+.\" ====================================================================
+.\" SUP
+.\" ====================================================================
+.TP
+.FONT B \[rs]*[SUP] R .\|.\|. B \[rs]*[SUPX]
+superscript
+.
+.
+.\" ====================================================================
+.\" TB+
+.\" ====================================================================
+.TP
+.B \[rs]*[TB+]
+Inline escape for
+.B .TN
+.RI ( "Tab Next" )
+.
+.
+.\" ====================================================================
+.\" UL
+.\" ====================================================================
+.TP
+.FONT B \[rs]*[UL] R .\|.\|. B \[rs]*[ULX]
+invoke underlining inline (fixed width fonts only)
+.
+.
+.\" ====================================================================
+.\" UP
+.\" ====================================================================
+.TP
+.FONT B \[rs]*[UP I " n" B ]
+temporarily move upward in a line
+.
+.
+.\" ====================================================================
+.SS "Details of macros in alphabetical order"
+.\" ====================================================================
+.
+.\" ====================================================================
+.\" AUTOLEAD
+.\" ====================================================================
+.TP
+.B .AUTOLEAD
+set the linespacing relative to the point size
+.
+.
+.\" ====================================================================
+.\" Bottom Margin
+.\" ====================================================================
+.TP
+.BI .B_MARGIN " <bottom margin>"
+Bottom Margin
+.
+.RS
+.
+.P
+Requires a unit of measure
+.
+.P
+.B .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,
+.I mom
+starts a new page.
+.
+.B .B_MARGIN requires a unit of measure.
+.
+Decimal fractions are allowed.
+.
+To set a nominal bottom margin of 3/4 inch, enter
+.RS
+.EX
+.B .B_MARGIN .75i
+.EE
+.RE
+.
+.P
+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.
+.
+.P
+Occasionally, owing to a peculiarity in
+.IR groff ,
+an extra line will fall below the nominal bottom margin.
+.
+If you're using the document processing macros, this is unlikely to
+happen; the document processing macros are very hard-nosed about
+aligning bottom margins.
+.
+.P
+Note: The meaning of
+.B .B_MARGIN
+is slightly different when you're using the document processing
+macros.
+.
+.RE
+.
+.
+.\" ====================================================================
+.\" Fallback Font
+.\" ====================================================================
+.TP
+.BI \%.FALLBACK_FONT " <fallback font> " "[ ABORT | WARN ]"
+Fallback Font
+.
+.RS
+.
+.P
+In the event that you pass an invalid argument to
+.B \%.FAMILY
+(i.e.\& a non-existent
+.IR family ),
+.IR mom ,
+by default, uses the
+.IR "fallback font" ,
+.B Courier Medium Roman
+.RB ( CR ),
+in order to continue processing your file.
+.
+.P
+If you'd prefer another
+.IR "fallback font" ,
+pass
+.B \%.FALLBACK_FONT
+the full
+.I family+font name
+of the
+.I font
+you'd like.
+.
+For example, if you'd rather the
+.I fallback font
+were
+.BR "Times Roman Medium Roman" ,
+.RS
+.EX
+.B .FALLBACK_FONT TR
+.EE
+.RE
+would do the trick.
+.
+.P
+.B Mom
+issues a warning whenever a
+.I font style set
+with
+.B .FT
+does not exist, either because you haven't registered the style
+or because the
+.I font style
+does not exist in the current
+.I family set
+with
+.BR .FAMILY .
+.
+By default,
+.B \%mom
+then aborts, which allows you to correct the problem.
+.
+.P
+If you'd prefer that
+.B \%mom
+not abort on non-existent
+.IR fonts ,
+but rather continue processing using a
+.IR "fallback font" ,
+you can pass
+.B \%.FALLBACK_FONT
+the argument
+.BR WARN ,
+either by itself, or in conjunction with your chosen
+.IB "fallback font" .
+.
+.P
+Some examples of invoking
+.BR \%.FALLBACK_FONT :
+.
+.TP
+.B .FALLBACK_FONT WARN
+.I mom
+will issue a warning whenever you try to access a non-existent
+.I font
+but will continue processing your file with the default
+.IR "fallback font" ,
+.BR "Courier Medium Roman" .
+.
+.
+.TP
+.B .FALLBACK_FONT TR WARN
+.B \%mom
+will issue a warning whenever you try to access a non-existent
+.I font
+but will continue processing your file with a
+.I fallback font
+of
+.BR "Times Roman Medium Roman" ;
+additionally,
+.B TR
+will be the
+.I fallback font
+whenever you try to access a
+.I family
+that does not exist.
+.
+.TP
+.B .FALLBACK_FONT TR ABORT
+.B \%mom
+will abort whenever you try to access a non-existent
+.BR font ,
+and will use the
+.I fallback font
+.B TR
+whenever you try to access a
+.I family
+that does not exist.
+.
+If, for some reason, you want to revert to
+.BR ABORT ,
+just enter
+.B \%".FALLBACK_FONT ABORT"
+and
+.I mom
+will once again abort on
+.IR "font errors" .
+.
+.RE
+.
+.
+.\" ====================================================================
+.\" FAM
+.\" ====================================================================
+.TP
+.BI .FAM " <family>"
+Type Family,
+alias of
+.B .FAMILY
+.
+.
+.\" ====================================================================
+.\" FAMILY
+.\" ====================================================================
+.TP
+.BI .FAMILY " <family>"
+Type Family,
+alias of
+.B .FAM
+.
+.RS
+.
+.P
+.B .FAMILY
+takes one argument: the name of the
+.I family
+you want.
+.
+.I Groff
+comes with a small set of basic families, each identified by a 1-,
+2- or 3-letter mnemonic.
+.
+The standard families are:
+.RS
+.EX
+.B "A = Avant Garde"
+.B "BM = Bookman"
+.B "H = Helvetica"
+.B "HN = Helvetica Narrow"
+.B "N = New Century Schoolbook"
+.B "P = Palatino"
+.B "T = Times Roman"
+.B "ZCM = Zapf Chancery"
+.EE
+.RE
+.
+.P
+The argument you pass to
+.B .FAMILY
+is the identifier at left, above.
+.
+For example, if you want
+.BR Helvetica ,
+enter
+.RS
+.EX
+.B .FAMILY H
+.EE
+.RE
+.
+.P
+Note: The font macro
+.RB ( .FT )
+lets you specify both the type
+.I family
+and the desired font with a single macro.
+.
+While this saves a few
+keystrokes, I recommend using
+.B .FAMILY for
+.IR family ,
+and
+.B .FT for
+.IR font ,
+except where doing so is genuinely inconvenient.
+.
+.BR ZCM ,
+for example,
+only exists in one style:
+.B Italic
+.RB ( I ).
+.
+.P
+Therefore,
+.RS
+.EX
+.B .FT ZCMI
+.EE
+.RE
+makes more sense than setting the
+.I family
+to
+.BR ZCM ,
+then setting the
+.I font
+to
+.IR I .
+.
+.P
+Additional note: If you are running a
+.I groff
+version prior to
+1.19.2,
+you must follow all
+.B .FAMILY
+requests with a
+.B .FT
+request,
+otherwise
+.I mom
+will set all type up to the next
+.B .FT
+request in the fallback font.
+.
+.P
+If you are running
+.I groff
+1.19.2 or later,
+when you invoke the
+.B .FAMILY
+macro,
+.I mom
+.I remembers
+the font style
+.BR ( Roman ,
+.BR Italic ,
+etc) currently in use (if the font style exists in the new
+.IR family )
+and will continue to use the same font style in the new family.
+For example:
+.RS
+.EX
+.BI ".FAMILY BM " "\[rs]"" Bookman family"
+.BI ".FT I " "\[rs]"" Medium Italic"
+.I <some text> \[rs]" Bookman Medium Italic
+.BI ".FAMILY H " "\[rs]"" Helvetica family"
+.I <more text> \[rs]" Helvetica Medium Italic
+.EE
+.RE
+.
+.P
+However, if the font style does not exist in the new family,
+.I mom
+will set all subsequent type in the fallback font (by default,
+.B Courier Medium
+.BR Roman )
+until she encounters a
+.B .FT
+request that's valid for the
+.IR family .
+.
+.P
+For example, assuming you don't have the font
+.B Medium Condensed Roman
+.RI ( mom
+extension
+.IR CD )
+in the
+.I Helvetica
+.IR family :
+.RS
+.EX
+.BI ".FAMILY UN " "\[rs]"" Univers family"
+.BI ".FT CD " "\[rs]"" Medium Condensed"
+.I <some text> \[rs]" Univers Medium Condensed
+.BI ".FAMILY H " "\[rs]"" Helvetica family"
+.I <more text> \[rs]" Courier Medium Roman!
+.EE
+.RE
+.
+.P
+In the above example, you must follow
+.B .FAMILY H
+with a
+.B .FT
+request that's valid for
+.BR Helvetica .
+.
+.P
+Please see the Appendices,
+.I Adding fonts to
+.IR groff ,
+for information on adding fonts and families to
+.IR groff , as well as to
+see a list of the extensions
+.I mom
+provides to
+.IR groff 's
+basic
+.BR R ,
+.BR I ,
+.BR B ,
+.B BI
+styles.
+.
+.P
+Suggestion: When adding
+.I families to
+.IR groff ,
+I recommend following the established standard for the naming families
+and fonts.
+.
+For example, if you add the
+.B Garamond
+family, name the font files
+.RS
+.EX
+.B GARAMONDR
+.B GARAMONDI
+.B GARAMONDB
+.B GARAMONDBI
+.EE
+.RE
+.
+.B GARAMOND then becomes a valid
+.I family name
+you can pass to
+.BR .FAMILY .
+.
+(You could, of course, shorten
+.B GARAMOND
+to just
+.BR G ,
+or
+.BR GD .)
+.BR R ,
+.BR I ,
+.BR B ,
+and
+.B BI
+after
+.B GARAMOND
+are the
+.IR roman ,
+.IR italic ,
+.I bold
+and
+.I bold-italic
+fonts respectively.
+.
+.RE
+.
+.
+.\" ====================================================================
+.\" FONT
+.\" ====================================================================
+.TP
+.BI ".FONT R | B | BI | " "<any other valid font style>"
+Alias to
+.B .FT
+.
+.
+.\" ====================================================================
+.\" FT
+.\" ====================================================================
+.TP
+.BI ".FT R | B | BI | " "<any other valid font style>"
+Set font
+.
+.RS
+.
+.P
+By default,
+.I groff
+permits
+.B .FT
+to take one of four possible arguments specifying the desired font:
+.RS
+.EX
+.B R = (Medium) Roman
+.B I = (Medium) Italic
+.B B = Bold (Roman)
+.B BI = Bold Italic
+.EE
+.RE
+.
+.P
+For example, if your
+.I family
+is
+.BR Helvetica ,
+entering
+.RS
+.EX
+.B .FT B
+.EE
+.RE
+will give you the
+.I Helvetica bold
+.IR font .
+.
+If your
+.I family
+were
+.BR \%Palatino ,
+you'd get the
+.I \%Palatino bold
+.IR font .
+.
+.P
+.B Mom
+considerably extends the range of arguments you can pass to
+.BR .FT ,
+making it more convenient to add and access fonts of differing weights
+and shapes within the same family.
+.
+.P
+Have a look here for a list of the weight/style arguments
+.I mom
+allows.
+.
+Be aware, though, that you must have the fonts, correctly installed
+and named, in order to use the arguments.
+.
+(See
+.I Adding fonts to groff
+for instructions and information.)
+.
+Please also read the
+.I ADDITIONAL NOTE
+found in the description of the
+.B \%.FAMILY
+macro.
+.
+.
+.P
+How
+.I mom
+reacts to an invalid argument to
+.B .FT
+depends on which version of
+.I groff
+you're using.
+.
+If your
+.I groff
+version is 1.19.2 or later,
+.I mom
+will issue a warning and,
+depending on how you've set up the fallback font,
+either continue processing using the fallback font,
+or abort
+(allowing you to correct the problem).
+.
+In earlier versions,
+.I mom
+will silently continue processing,
+using either the fallback font or the font that was in effect prior to
+the invalid
+.B .FT
+call.
+.
+.
+.P
+.B .FT
+will also accept, as an argument, a full
+.I family
+and
+.I font
+.IR name .
+.
+.P
+For example,
+.RS
+.EX
+.B .FT HB
+.EE
+.RE
+will set subsequent type in
+.I Helvetica
+.IR Bold .
+.
+.P
+However, I strongly recommend keeping
+.I family
+and
+.I font
+separate except where doing so is genuinely inconvenient.
+.
+.P
+For inline control of
+.IR fonts ,
+see
+.I Inline
+.IR Escapes ,
+font control.
+.
+.RE
+.
+.
+.\" ====================================================================
+.\" Hanging Indent
+.\" ====================================================================
+.TP
+.BI "\%.HI [" " <measure> " ]
+Hanging indent \[em] the optional argument requires a unit of measure.
+.
+.RS
+.
+.P
+A hanging indent looks like this:
+.RS
+.EX
+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.\|.\|.
+.EE
+.RE
+.
+The first line of text
+.I hangs
+outside the
+.IR "left margin" .
+.
+.P
+In order to use
+.IR "hanging indents" ,
+you must first have a
+.I left indent
+active (set with either
+.B .IL
+or
+.BR .IB ).
+.
+.B Mom
+will not hang text outside the
+.I left margin set
+with
+.B \%.L_MARGIN
+or outside the
+.I left margin
+of a
+.IR \%tab .
+.
+.P
+The first time you invoke
+.BR .HI ,
+you must give it a
+.BR measure .
+.
+If you want the first line of a paragraph to
+.IR "hang by" ,
+say,
+.IR "1 pica" ,
+do
+.RS
+.EX
+.B ".IL 1P"
+.B ".HI 1P"
+.EE
+.RE
+.
+Subsequent invocations of
+.B \%.HI
+do not require you to supply a
+.IR measure ;
+.I mom
+keeps track of the last measure you gave it.
+.
+.P
+Generally speaking, you should invoke
+.B .HI
+immediately prior to the line you want hung (i.e.\& without any
+intervening control lines).
+.
+And because
+.I hanging indents
+affect only one line, there's no need to turn them off.
+.
+.P
+.I IMPORTANT:
+Unlike
+.BR IL ,
+.B IR
+and
+.BR IB ,
+measures given to
+.B .HI
+are NOT additive.
+.
+Each time you pass a measure to
+.BR .HI ,
+the measure is treated literally.
+.
+.B
+.I Recipe:
+A numbered list using
+.I hanging indents
+.
+.P
+.I Note:
+.I mom
+has macros for setting lists.
+.
+This recipe exists to demonstrate the use of
+.I hanging indents
+only.
+.RS
+.EX
+\&.PAGE 8.5i 11i 1i 1i 1i 1i
+\&.FAMILY T
+\&.FT R
+\&.PT_SIZE 12
+\&.LS 14
+\&.JUSTIFY
+\&.KERN
+\&.SS 0
+\&.IL \[rs]w\[aq]\[rs]0\[rs]0.\[aq]
+\&.HI \[rs]w\[aq]\[rs]0\[rs]0.\[aq]
+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]s.
+\&.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?
+.EE
+.RE
+.
+.P
+First, we invoke a left indent with a measure equal to the width of 2
+figures spaces plus a period (using the \[rs]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 \[lq]out to the left
+margin\[rq]).
+.
+Because we begin the first line with a number, a period, and a figure
+space, the actual text
+.RI ( "The most important point.\|.\|.\&" )
+starts at exactly the same spot as the indented lines that follow.
+.
+.P
+Notice that subsequent invocations of
+.B .HI
+don't require a
+.I measure
+to be given.
+.
+.P
+Paste the example above into a file and preview it with
+.RS
+.EX
+.B pdfmom filename.mom | ps2pdf \- filename.pdf
+.EE
+.RE
+to see hanging indents in action.
+.
+.RE
+.
+.
+.\" ====================================================================
+.\" IB - INDENT BOTH
+.\" ====================================================================
+.TP
+.BI "\%.IB [" " <left measure> <right measure> " ]
+Indent both \[em] the optional argument requires a unit of measure
+.
+.RS
+.
+.P
+.B .IB
+allows you to set or invoke a left and a right indent at the same time.
+.
+.P
+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
+.B .IL
+and
+.BR .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.
+.
+.P
+.I A word of advice:
+If you need to manipulate left and right indents separately, use a
+combination of
+.B .IL
+and
+.B .IR
+instead of
+.BR .IB .
+.
+You'll save yourself a lot of grief.
+.
+.P
+A
+.I 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,
+.RS
+.EX
+.B .IB \[rs]w\[aq]margarine\[aq] \[rs]w\[aq]jello\[aq]
+.EE
+.RE
+left indents text by the width of the word
+.I margarine
+and right indents by the width of
+.IR jello .
+.
+.P
+Like
+.B .IL
+and
+.BR .IR ,
+.B .IB
+with no argument indents by its last active values.
+.
+See the brief explanation of how mom handles indents for more details.
+.
+.P
+.I Note:
+Calling a
+.I tab
+(with
+.BR ".TAB <n>" )
+automatically cancels any active indents.
+.
+.P
+.I Additional note:
+Invoking
+.B .IB
+automatically turns off
+.B .IL
+and
+.BR .IR .
+.
+.RE
+.
+.
+.\" ====================================================================
+.\" IL - INDENT LEFT
+.\" ====================================================================
+.TP
+.BI "\%.IL [" " <measure> " ]
+Indent left \[em] the optional argument requires a unit of measure
+.
+.RS
+.
+.P
+.B .IL
+indents text from the left margin of the page, or if you're in a
+.IR tab ,
+from the left edge of the
+.IR tab .
+.
+Once
+.I IL
+is on, the
+.I left indent
+is applied uniformly to every subsequent line of text, even if you
+change the line length.
+.
+.P
+The first time you invoke
+.BR .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
+.B \[rs]w
+inline escape may be used to specify a text-dependent measure, in
+which case no unit of measure is required.
+.
+For example,
+.RS
+.EX
+.B .IL \[rs]w\[aq]margarine\[aq]
+.EE
+.RE
+indents text by the width of the word
+.IR margarine .
+.
+.P
+With no argument,
+.B .IL
+indents by its last active value.
+.
+See the brief explanation of how
+.I mom
+handles indents for more details.
+.
+.P
+.I Note:
+Calling a
+.I tab
+(with
+.BR ".TAB <n>" )
+automatically cancels any active indents.
+.
+.P
+.I Additional note:
+Invoking
+.B .IL
+automatically turns off
+.BR IB .
+.
+.RE
+.
+.
+.\" ====================================================================
+.\" IQ - quit any/all indents
+.\" ====================================================================
+.TP
+.BI "\%.IQ [" " <measure> " ]
+IQ \[em] quit any/all indents
+.
+.RS
+.
+.P
+.I IMPORTANT NOTE:
+The original macro for quitting all indents was
+.BR .IX .
+.
+This usage has been deprecated in favour of
+.BR IQ .
+.
+.B .IX
+will continue to behave as before, but
+.I mom
+will issue a warning to
+.I stderr
+indicating that you should update your documents.
+.
+.P
+As a consequence of this change,
+.BR .ILX ,
+.B .IRX
+and
+.B .IBX
+may now also be invoked as
+.BR .ILQ ,
+.B .IRQ
+and
+.BR .IBQ .
+.
+Both forms are acceptable.
+.
+.P
+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.
+.
+.P
+If you pass these macros the optional argument
+.BR 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.
+.
+.P
+.BR ".IQ CLEAR" ,
+as you'd suspect, quits and clears the values for all indent
+styles at once.
+.
+.RE
+.
+.
+.\" ====================================================================
+.\" IR - INDENT RIGHT
+.\" ====================================================================
+.TP
+.BI "\%.IR [" " <measure> " ]
+Indent right \[em] the optional argument requires a unit of measure
+.
+.RS
+.
+.P
+.B .IR
+indents text from the
+.I right margin
+of the page, or if you're in a
+.IR tab ,
+from the end of the
+.IR tab .
+.
+.P
+The first time you invoke
+.BR .IR ,
+you must give it a measure.
+.
+Subsequent invocations with a measure add to the previous indent
+measure.
+.
+A
+.I 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
+.I unit of measure
+is required.
+.
+For example,
+.RS
+.EX
+.B .IR \[rs]w\[aq]jello\[aq]
+.EE
+.RE
+indents text by the width of the word
+.IR jello .
+.
+.P
+With no argument,
+.B .IR
+indents by its last active value.
+.
+See the brief explanation of how
+.I mom
+handles indents for more details.
+.
+.P
+.I Note:
+Calling a
+.I tab
+(with
+.BR "\%.TAB <n>" )
+automatically cancels any active indents.
+.
+.P
+.I Additional note:
+Invoking
+.B .IR
+automatically turns off
+.BR IB .
+.
+.RE
+.
+.
+.\" ====================================================================
+.\" Left Margin
+.\" ====================================================================
+.TP
+.BI .L_MARGIN " <left margin>"
+Left Margin
+.
+.RS
+.
+.P
+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.
+.
+.P
+Left indents and tabs are calculated from the value you pass to
+.BR .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
+.RS
+.EX
+.B .L_MARGIN 3P
+.EE
+.RE
+or
+.RS
+.EX
+.B .L_MARGIN .5i
+.EE
+.RE
+.
+.P
+If you use the macros
+.BR .PAGE ,
+.B .PAGEWIDTH
+or
+.B .PAPER
+without invoking
+.B .L_MARGIN
+(either before or afterward),
+.I mom
+automatically sets
+.B .L_MARGIN
+to
+.IR "1 inch" .
+.
+.P
+Note:
+.B .L_MARGIN
+behaves in a special way when you're using the document processing
+macros.
+.
+.RE
+.
+.
+.\" ====================================================================
+.\" MCO - BEGIN MULTI-COLUMN SETTING
+.\" ====================================================================
+.TP
+.B .MCO
+Begin multi-column setting.
+.
+.RS
+.P
+.B .MCO
+.RI ( "Multi-Column On" )
+is the
+.I macro
+you use to begin
+.IR "multi-column setting" .
+.
+It marks the current baseline as the top of your columns, for use
+later with
+.BR .MCR .
+.
+See the introduction to columns for an explanation of
+.I multi-columns
+and some sample input.
+.
+.P
+.I Note:
+Do not confuse
+.B .MCO
+with the
+.B .COLUMNS
+macro in the document processing macros.
+.
+.RE
+.
+.
+.\" ====================================================================
+.\" MCR - RETURN TO TOP OF COLUMN
+.\" ====================================================================
+.TP
+.B \%.MCR
+Once you've turned
+.I multi-columns
+on (with
+.BR \%.MCO ),
+.BR .MCR ,
+at any time,
+returns you to the
+.IR "top of your columns" . \" XXX: Are italics truly required here?
+.
+.
+.\" ====================================================================
+.\" MCX - EXIT MULTI-COLUMNS
+.\" ====================================================================
+.TP
+.BI "\%.MCX [ " "<distance to advance below longest column>" " ]"
+Optional argument requires a unit of measure.
+.
+.RS
+.
+.P
+Exit multi-columns.
+.
+.P
+.B .MCX
+takes you out of any
+.I tab
+you were in (by silently invoking
+.BR .TQ )
+and advances to the bottom of the longest column.
+.
+.P
+Without an argument,
+.B .MCX
+advances
+.I 1 linespace
+below the longest column.
+.
+.P
+Linespace, in this instance, is the leading in effect at the moment
+.B .MCX
+is invoked.
+.
+.P
+If you pass the
+.I <distance>
+argument to
+.BR .MCX ,
+it advances
+.I 1 linespace
+below the longest column (see above)
+.I PLUS
+the distance specified by the argument.
+.
+The argument requires a unit of measure; therefore, to advance an
+extra 6 points below where
+.B \%.MCX
+would normally place you, you'd enter
+.RS
+.EX
+.B .MCX 6p
+.EE
+.RE
+.
+.P
+.I Note:
+If you wish to advance a precise distance below the baseline of the
+longest column, use
+.B .MCX
+with an argument of
+.B 0
+(zero; no
+.I unit of measure
+required) in conjunction with the
+.B \%.ALD
+macro, like this:
+.RS
+.EX
+.B .MCX 0
+.B .ALD 24p
+.EE
+.RE
+.
+The above advances to precisely
+.I 24 points
+below the baseline of the longest column.
+.
+.RE
+.
+.
+.\" ====================================================================
+.\" Start a new Page
+.\" ====================================================================
+.TP
+.B .NEWPAGE
+.
+.RS
+.
+.P
+Whenever you want to start a new page, use
+.BR .NEWPAGE ,
+by itself with no argument.
+.
+.B 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
+.BR .T_MARGIN ).
+.
+.RE
+.
+.
+.\" ====================================================================
+.\" Page
+.\" ====================================================================
+.TP
+.BI ".PAGE " <width> " [ " <length> " [ " <lm> " [ " <rm> " [ " \
+ <tm> " [ " <bm> " ] ] ] ] ]"
+.
+.RS
+.
+.P
+All arguments require a unit of measure
+.
+.P
+.I IMPORTANT:
+If you're using the document processing macros,
+.B .PAGE
+must come after
+.BR .START .
+.
+Otherwise, it should go at the top of a document, prior to any text.
+.
+And remember, when you're using the document processing macros, top
+margin and bottom margin mean something slightly different than when
+you're using just the typesetting macros (see Top and bottom margins
+in document processing).
+.
+.P
+.B .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.
+.
+.IR <lm> ,
+.IR <rm> ,
+.I <tm>
+and
+.I <bm>
+refer to the left, right, top and bottom margins respectively.
+.
+.P
+Assuming your page dimensions are 11 inches by 17 inches, and that's
+all you want to set, enter
+.RS
+.EX
+.B .PAGE 11i 17i
+.EE
+.RE
+.
+If you want to set the left margin as well, say, at 1 inch,
+.B PAGE
+would look like this:
+.RS
+.EX
+.B .PAGE 11i 17i 1i
+.EE
+.RE
+.
+.P
+Now suppose you also want to set the top margin,
+say,
+at 1\(en1/2 inches.
+.
+.I <tm>
+comes after
+.I <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
+.B .PAGE
+macro would look like this:
+.RS
+.EX
+.tr -\-
+\&.PAGE 11i 17i 1i 1i 1.5i
+ | |
+required right---+ +---top margin
+ margin
+.tr --
+.EE
+.RE
+.
+.P
+Clearly,
+.B .PAGE
+is best used when you want a convenient way to tell
+.I 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
+.RS
+.EX
+.B .PAGE 8.5i 11i 45p 45p 45p 45p
+.EE
+.RE
+.
+This sets up an 8\(12 by 11 inch page with margins of 45 points
+(5/8-inch) all around.
+.
+.P
+Additionally, if you invoke
+.B .PAGE
+with a top margin argument, any macros you invoke after
+.B .PAGE
+will almost certainly move the baseline of the first line of text down
+by one linespace.
+.
+To compensate, do
+.RS
+.EX
+.B .RLD 1v
+.EE
+.RE
+immediately before entering any text, or, if it's feasible, make
+.B .PAGE
+the last macro you invoke prior to entering text.
+.
+.P
+Please read the
+.I Important note
+on page dimensions and papersize for information on ensuring
+.I groff
+respects your
+.B .PAGE
+dimensions and margins.
+.
+.RE
+.
+.
+.\" ====================================================================
+.\" Page Length
+.\" ====================================================================
+.TP
+.BI .PAGELENGTH " <length of printer sheet>"
+tells
+.I mom
+how long your printer sheet is.
+.
+It works just like
+.BR .PAGEWIDTH .
+.
+.RS
+.
+.P
+Therefore, to tell
+.I mom
+your printer sheet is 11 inches long, you enter
+.RS
+.EX
+.B .PAGELENGTH 11i
+.EE
+.RE
+.
+Please read the important note on page dimensions and papersize for
+information on ensuring
+.I groff
+respects your
+.IR PAGELENGTH .
+.
+.RE
+.
+.
+.\" ====================================================================
+.\" Page Width
+.\" ====================================================================
+.TP
+.BI .PAGEWIDTH " <width of printer sheet>"
+.
+.RS
+.
+.P
+The argument to
+.B .PAGEWIDTH
+is the width of your printer sheet.
+.
+.P
+.B .PAGEWIDTH
+requires a unit of measure.
+.
+Decimal fractions are allowed.
+.
+Hence, to tell
+.I mom
+that the width of your printer sheet is 8\(12 inches, you enter
+.RS
+.EX
+\&.PAGEWIDTH 8.5i
+.EE
+.RE
+.
+.P
+Please read the Important note on page dimensions and papersize for
+information on ensuring
+.I groff
+respects your
+.IR PAGEWIDTH .
+.
+.RE
+.
+.
+.\" ====================================================================
+.\" Paper
+.\" ====================================================================
+.TP
+.BI .PAPER " <paper type>"
+provides a convenient way to set the page dimensions for some common
+printer sheet sizes.
+.
+The argument
+.I <paper type>
+can be one of:
+.BR LETTER ,
+.BR LEGAL ,
+.BR STATEMENT ,
+.BR TABLOID ,
+.BR LEDGER ,
+.BR FOLIO ,
+.BR QUARTO ,
+.BR EXECUTIVE ,
+.BR 10x14 ,
+.BR A3 ,
+.BR A4 ,
+.BR A5 ,
+.BR B4 ,
+.BR B5 .
+.
+.
+.TP
+.B .PRINTSTYLE
+.
+.
+.\" ====================================================================
+.\" PT_SIZE - POINT SIZE OF TYPE
+.\" ====================================================================
+.TP
+.BI .PT_SIZE " <size of type in points>"
+Point size of type, does not require a
+.IR "unit of measure" .
+.
+.RS
+.
+.P
+.B \%.PT_SIZE
+.RI ( "Point Size" )
+takes one argument: the
+.I size of type
+in
+.IR points .
+.
+Unlike most other macros that establish the
+.I size
+or
+.I measure
+of something,
+.B \%.PT_SIZE
+does not require that you supply a
+.I unit of measure
+since it's a near universal convention that
+.I type size
+is measured in
+.IR points .
+.
+Therefore, to change the
+.I type size
+to, say,
+.IR "11 points" ,
+enter
+.RS
+.EX
+.B .PT_SIZE 11
+.EE
+.RE
+.
+.I Point sizes
+may be
+.I fractional
+(e.g.,
+.I 10.25
+or
+.IR 12.5 ).
+.
+.P
+You can prepend a
+.I plus
+or a
+.I minus sign
+to the argument to
+.BR \%.PT_SIZE ,
+in which case the
+.I point size
+will be changed by
+.I +
+or
+.I \-
+the original value.
+.
+For example,
+if the
+.I point size
+is
+.IR 12 ,
+and you want
+.IR 14 ,
+you can do
+.RS
+.EX
+.B .PT_SIZE +2
+.EE
+.RE
+then later reset it to
+.I 12
+with
+.RS
+.EX
+.B .PT_SIZE \-2
+.EE
+.RE
+.
+The
+.I size of type
+can also be changed inline.
+.
+.P
+.I Note:
+It is unfortunate that the
+.B \%pic
+preprocessor has already taken the name, PS, and thus
+.IR mom 's
+macro for setting
+.I point sizes
+can't use it.
+.
+However, if you aren't using
+.BR pic ,
+you might want to alias
+.B \%.PT_SIZE
+as
+.BR .PS ,
+since there'd be no conflict.
+.
+For example
+.RS
+.EX
+.B .ALIAS PS PT_SIZE
+.EE
+.RE
+would allow you to set
+.I point sizes
+with
+.BR .PS .
+.
+.RE
+.
+.
+.\" ====================================================================
+.\" Right Margin
+.\" ====================================================================
+.TP
+.BI .R_MARGIN " <right margin>"
+Right Margin
+.
+.RS
+.
+.P
+Requires a unit of measure.
+.
+.P
+IMPORTANT:
+.BR .R_MARGIN ,
+if used, must come after
+.BR .PAPER ,
+.BR .PAGEWIDTH ,
+.BR .L_MARGIN ,
+and/or
+.B .PAGE
+(if a right margin isn't given to PAGE).
+.
+The reason is that
+.B .R_MARGIN
+calculates line length from the overall page dimensions and the left
+margin.
+.
+.P
+Obviously, it can't make the calculation if it doesn't know the page
+width and the left margin.
+.
+.P
+.B .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.
+.B .R_MARGIN
+requires a unit of measure.
+.
+Decimal fractions are allowed.
+.
+.P
+The line length macro (LL) can be used in place of
+.BR .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.
+.
+.P
+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:
+.RS
+.EX
+.B .L_MARGIN 6P
+.B .R_MARGIN 6P
+.EE
+.RE
+.
+.P
+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, e.g.,
+.RS
+.EX
+.B .LL 17P+3p
+.EE
+.RE
+.
+.P
+If you use the macros
+.BR .PAGE ,
+.B .PAGEWIDTH
+or
+.B PAPER
+without invoking
+.B .R_MARGIN
+afterward,
+.I mom
+automatically sets
+.B .R_MARGIN
+to
+.IR "1 inch" .
+.
+If you set a line length after these macros (with
+.BR .LL ),
+the line length calculated by
+.B .R_MARGIN
+is, of course, overridden.
+.
+.P
+Note:
+.B .R_MARGIN
+behaves in a special way when you're using the document processing
+macros.
+.
+.RE
+.
+.
+.\" ====================================================================
+.\" ST - Set String Tabs
+.\" ====================================================================
+.TP
+.FONT B .ST I " <tab number> " B "L | R | C | J [ QUAD ]"
+.
+.RS
+.P
+After
+.I string tabs
+have been marked off on an input line (see
+.BR \[rs]*[ST].\|.\|.\&\[rs]*[STX] ),
+you need to
+.I set
+them by giving them a direction and, optionally, the
+.B \%QUAD
+argument.
+.
+.P
+In this respect,
+.B .ST
+is like
+.B \%.TAB_SET
+except that you don't have to give
+.B .ST
+an indent or a line length (that's already taken care of, inline,
+by
+.BR \[rs]*[ST].\|.\|.\&\[rs]*[STX] ).
+.
+.P
+If you want string
+.I tab 1
+to be
+.BR \%left ,
+enter
+.RS
+.EX
+.B .ST 1 L
+.EE
+.RE
+.
+If you want it to be
+.I \%left
+and
+.IR \%filled ,
+enter
+.RS
+.EX
+.B .ST 1 L \%QUAD
+.EE
+.RE
+.
+If you want it to be justified, enter
+.RS
+.EX
+.B .ST 1 J
+.EE
+.RE
+.
+.RE
+.
+.
+.\" ====================================================================
+.\" TAB - Call Tabs
+.\" ====================================================================
+.TP
+.BI \%.TAB " <tab number>"
+After
+.I tabs
+have been defined (either with
+.B \%.TAB_SET
+or
+.BR .ST ),
+.B \%.TAB
+moves to whatever
+.I tab number
+you pass it as an argument.
+.
+.RS
+.
+.P
+For example,
+.RS
+.EX
+.B \%.TAB 3
+.EE
+.RE
+moves you to
+.IR "\%tab 3" .
+.
+.P
+Note:
+.B \%.TAB
+breaks the line preceding it and advances 1 linespace.
+.
+Hence,
+.RS
+.EX
+.B .TAB 1
+.B A line of text in tab 1.
+.B .TAB 2
+.B A line of text in tab 2.
+.EE
+.RE
+produces, on output
+.RS
+.EX
+.B "A line of text in tab 1."
+.B " A line of text in tab 2."
+.EE
+.RE
+.
+.
+.P
+If you want the tabs to line up,
+use
+.B .TN
+(\[lq]Tab Next\[rq])
+or,
+more conveniently,
+the inline escape sequence
+.BR \[rs]*[TB+] :
+.RS
+.EX
+.BR .TAB \~1
+A line of text in tab 1.\[rs]*[TB+]
+A line of text in tab 2.
+.EE
+.RE
+which produces
+.RS
+.EX
+.B "A line of text in tab 1.\& A line of text in tab 2."
+.EE
+.RE
+.
+.
+.P
+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-column macros.
+.
+.P
+.I Additional note:
+Any indents in effect prior to calling a tab are automatically turned
+off by
+.BR TAB .
+.
+If you were happily zipping down the page with a left indent of
+.I 2 picas
+turned on, and you call a
+.I tab
+whose indent from the left margin is
+.IR "6 picas" ,
+your new distance from the
+.I left margin
+will be
+.IR "6 picas" ,
+not
+I 6 picas plus the 2 pica
+indent.
+.
+.P
+.I \%Tabs
+are not by nature columnar, which is to say that if the text inside a
+.I tab
+runs to several lines, calling another
+.I tab
+does not automatically move to the baseline of the first line in the
+.IR "previous tab" .
+.
+To demonstrate:
+.RS
+.EX
+TAB 1
+Carrots
+Potatoes
+Broccoli
+\&.TAB 2
+$1.99/5 lbs
+$0.25/lb
+$0.99/bunch
+.EE
+.RE
+produces, on output
+.RS
+.EX
+Carrots
+Potatoes
+Broccoli
+ $1.99/5 lbs
+ $0.25/lb
+ $0.99/bunch
+.EE
+.RE
+.
+.RE
+.
+.\" ====================================================================
+.\" TB - Call Tabs Alias
+.\" ====================================================================
+.TP
+.BI .TB " <tab number>"
+Alias to
+.B .TAB
+.
+.
+.\" ====================================================================
+.\" TI - TEMPORARY (LEFT) INDENT
+.\" ====================================================================
+.TP
+.BI "\%.TI [" " <measure> " ]
+Temporary left indent \[em] the optional argument requires a
+.I unit of measure
+.
+.RS
+.
+.P
+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.
+.RB ( Mom's
+.B .PP
+macro, for example, uses a
+.IR "temporary indent" .)
+.
+.P
+The first time you invoke
+.BR .TI ,
+you must give it a measure.
+.
+If you want to
+.I indent
+the first line of a paragraph by, say, 2 ems, do
+.RS
+.EX
+.B .TI 2m
+.EE
+.RE
+.
+.P
+Subsequent invocations of
+.B .TI
+do not require you to supply a measure;
+.I mom
+keeps track of the last measure you gave it.
+.
+.P
+Because
+.I temporary indents
+are temporary, there's no need to turn them off.
+.
+.P
+.I IMPORTANT:
+Unlike
+.BR .IL ,
+.B .IR
+and
+.BR IB ,
+measures given to
+.B .TI
+are NOT additive.
+.
+In the following example, the second
+.B \%".TI 2P"
+is exactly
+.IR "2 picas" .
+.RS
+.EX
+.B .TI 1P
+.B The beginning of a paragraph.\|.\|.\&
+.B .TI 2P
+.B The beginning of another paragraph.\|.\|.\&
+.EE
+.RE
+.
+.RE
+.
+.
+.
+.\" ====================================================================
+.\" TN - Tab Next
+.\" ====================================================================
+.TP
+.B .TN
+Tab Next
+.
+.RS
+.P
+Inline escape
+.B \[rs]*[TB+]
+.
+.P
+.B TN
+moves over to the
+.I next tab
+in numeric sequence
+.RI ( "tab n+1" )
+without advancing on the page.
+.
+See the
+.I NOTE
+in the description of the
+.B \%.TAB
+macro for an example of how
+.B TN
+works.
+.
+.P
+In
+.I \%tabs
+that aren't given the
+.B QUAD
+argument when they're set up with
+.B \%.TAB_SET
+or
+.BR ST ,
+you must terminate the line preceding
+.B .TN
+with the
+.B \[rs]c
+inline escape sequence.
+.
+Conversely, if you did give a
+.B QUAD
+argument to
+.B \%.TAB_SET
+or
+.BR ST ,
+the
+.B \[rs]c must not be used.
+.
+.P
+If you find remembering whether to put in the
+.B \[rs]c
+bothersome, you may prefer to use the inline escape alternative
+to
+.BR .TN ,
+.BR \[rs]*[TB+] ,
+which works consistently regardless of the fill mode.
+.
+.P
+.I Note:
+You must put text in the input line immediately after
+.BR .TN .
+.
+Stacking of
+.BR .TN 's
+is not allowed.
+.
+In other words, you cannot do
+.RS
+.EX
+\&.TAB 1
+Some text\[rs]c
+\&.TN
+Some more text\[rs]c
+\&.TN
+\&.TN
+Yet more text
+.EE
+.RE
+.
+The above example, assuming
+.I tabs
+numbered from
+.I 1
+to
+.IR 4 ,
+should be entered
+.RS
+.EX
+\&.TAB 1
+Some text\[rs]c
+\&.TN
+Some more text\[rs]c
+\&.TN
+\[rs]&\[rs]c
+\&.TN
+Yet more text
+.EE
+.RE
+.
+\[rs]& is a zero-width, non-printing character that
+.I groff
+recognizes as valid input, hence meets the requirement for input text
+following
+.BR .TN .
+.
+.RE
+.
+.
+.\" ====================================================================
+.\" Tab Quit
+.\" ====================================================================
+.TP
+.B .TQ
+.B TQ
+takes you out of whatever
+.I tab
+you were in, advances
+.IR "1 linespace" ,
+and restores the
+.IR "left margin" ,
+.IR "line length" ,
+.I quad direction
+and
+.I fill mode
+that were in effect prior to invoking any
+.IR tabs .
+.
+.
+.\" ====================================================================
+.\" Top Margin
+.\" ====================================================================
+.TP
+.BI .T_MARGIN " <top margin>"
+Top margin
+.
+.RS
+.
+.P
+Requires a unit of measure
+.
+.P
+.B .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\(12 centimetres, you'd enter
+.RS
+.EX
+.B .T_MARGIN 2.5c
+.EE
+.RE
+.
+.B .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 baseline.
+Therefore,
+.RS
+.EX
+.B .T_MARGIN 1.5i
+.EE
+.RE
+puts the baseline of the first line of type 1\(12 inches beneath the
+top of the page.
+.
+.P
+Note:
+.B .T_MARGIN
+means something slightly different when you're using the document
+processing macros.
+.
+See Top and bottom margins in document processing for an explanation.
+.
+.P
+IMPORTANT:
+.B .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,
+.B .T_MARGIN
+should only be used at the top of a file (prior to entering text) or
+after NEWPAGE, like this:
+.RS
+.EX
+.B .NEWPAGE
+.B .T_MARGIN 6P
+.I <text>
+.EE
+.RE
+.
+.RE
+.
+.
+.\" ====================================================================
+.SH Authors
+.\" ====================================================================
+.
+.I mom
+was written by
+.MT peter@\:schaffter\:.ca
+Peter Schaffter
+.ME .
+.
+PDF support was provided by
+.MT deri@\:chuzzlewit\:.myzen\:.co\:.uk
+Deri James
+.ME .
+.
+This manual page was written by Bernd Warken.
+.
+.
+.\" ====================================================================
+.SH "See also"
+.\" ====================================================================
+.
+.TP
+.I @HTMLDOCDIR@/\:mom/\:toc\:.html
+entry point to the HTML documentation
+.
+.
+.TP
+.UR http://\:www\:.schaffter\:.ca/\:mom/\:momdoc/\:toc\:.html
+.UE
+HTML documentation online
+.
+.
+.TP
+.UR http://\:www\:.schaffter\:.ca/\:mom/
+.UE
+the
+.I mom
+macros homepage
+.
+.
+.P
+.IR "Groff: The GNU Implementation of troff" ,
+by Trent A.\& Fisher and Werner Lemberg,
+is the primary
+.I groff
+manual.
+.
+You can browse it interactively with \[lq]info groff\[rq].
+.
+.
+.P
+.MR pdfmom @MAN1EXT@ ,
+.MR groff @MAN1EXT@ ,
+.MR @g@troff @MAN1EXT@
+.
+.
+.\" Restore compatibility mode (for, e.g., Solaris 10/11).
+.cp \n[*groff_groff_mom_7_man_C]
+.do rr *groff_groff_mom_7_man_C
+.
+.
+.\" Local Variables:
+.\" fill-column: 72
+.\" mode: nroff
+.\" End:
+.\" vim: set filetype=groff textwidth=72:
diff --git a/contrib/mom/mom.am b/contrib/mom/mom.am
new file mode 100644
index 0000000..3bbbc9a
--- /dev/null
+++ b/contrib/mom/mom.am
@@ -0,0 +1,182 @@
+# Copyright (C) 2002-2020 Free Software Foundation, Inc.
+# Written by Werner Lemberg <wl@gnu.org>
+# Automake migration by Bertrand Garrigues
+# <bertrand.garrigues@laposte.net>
+#
+# This file is part of groff.
+#
+# groff is free software; 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.
+#
+# groff is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+mom_srcdir = $(top_srcdir)/contrib/mom
+
+# pdfmom command used to generate .pdf
+#
+# Use '-K utf8', not '-k', in case 'configure' didn't find uchardet.
+MOMPDFMOM = \
+ GROFF_COMMAND_PREFIX= \
+ GROFF_BIN_PATH="$(GROFF_BIN_PATH)" \
+ PDFMOM_BIN_PATH="$(top_builddir)" \
+ $(PDFMOMBIN) $(FFLAG) $(MFLAG) -M$(mom_srcdir) -K utf8 -p -e -t
+
+man7_MANS += contrib/mom/groff_mom.7
+
+# Files installed in $(tmacdir).
+# MOMNORMALFILES are located in the source tree.
+MOMNORMALFILES = \
+ contrib/mom/mom.tmac \
+ contrib/mom/om.tmac
+momtmacdir = $(tmacdir)
+dist_momtmac_DATA = $(MOMNORMALFILES)
+
+# Files installed in htmldocdir/mom
+MOMHTMLDOCFILES=\
+ contrib/mom/momdoc/stylesheet.css \
+ contrib/mom/momdoc/appendices.html \
+ contrib/mom/momdoc/color.html \
+ contrib/mom/momdoc/cover.html \
+ contrib/mom/momdoc/definitions.html \
+ contrib/mom/momdoc/docelement.html \
+ contrib/mom/momdoc/docprocessing.html \
+ contrib/mom/momdoc/goodies.html \
+ contrib/mom/momdoc/graphical.html \
+ contrib/mom/momdoc/headfootpage.html \
+ contrib/mom/momdoc/images.html \
+ contrib/mom/momdoc/inlines.html \
+ contrib/mom/momdoc/intro.html \
+ contrib/mom/momdoc/letters.html \
+ contrib/mom/momdoc/macrolist.html \
+ contrib/mom/momdoc/rectoverso.html \
+ contrib/mom/momdoc/refer.html \
+ contrib/mom/momdoc/reserved.html \
+ contrib/mom/momdoc/tables-of-contents.html \
+ contrib/mom/momdoc/toc.html \
+ contrib/mom/momdoc/typesetting.html \
+ contrib/mom/momdoc/using.html \
+ contrib/mom/momdoc/version-2.html
+momhtmldir = $(htmldocdir)/mom
+momhtml_DATA = $(MOMHTMLDOCFILES)
+
+# Files installed in $(examplesdir)/mom. MOMEXAMPLEFILES are located
+# in the source tree, while MOMPROCESSEDEXAMPLEFILES are generated in
+# the build tree.
+MOMEXAMPLEFILES=\
+ contrib/mom/examples/letter.mom \
+ contrib/mom/examples/mom-pdf.mom \
+ contrib/mom/examples/mon_premier_doc.mom \
+ contrib/mom/examples/sample_docs.mom \
+ contrib/mom/examples/typesetting.mom \
+ contrib/mom/examples/README.txt \
+ contrib/mom/examples/README-fr.txt \
+ contrib/mom/examples/elvis_syntax \
+ contrib/mom/examples/elvis_syntax.new \
+ contrib/mom/examples/penguin.ps \
+ contrib/mom/examples/penguin.pdf \
+ contrib/mom/examples/mom.vim \
+ contrib/mom/examples/slide-demo.mom \
+ contrib/mom/examples/copyright-default.mom \
+ contrib/mom/examples/copyright-chapter.mom
+momexampledir = $(exampledir)/mom
+dist_momexample_DATA = $(MOMEXAMPLEFILES)
+
+if USE_GROPDF
+MOMPROCESSEDEXAMPLEFILES = \
+ contrib/mom/examples/letter.pdf \
+ contrib/mom/examples/mom-pdf.pdf \
+ contrib/mom/examples/mon_premier_doc.pdf \
+ contrib/mom/examples/sample_docs.pdf \
+ contrib/mom/examples/slide-demo.pdf \
+ contrib/mom/examples/copyright-default.pdf \
+ contrib/mom/examples/copyright-chapter.pdf
+if HAVE_URW_FONTS
+MOMPROCESSEDEXAMPLEFILES += contrib/mom/examples/typesetting.pdf
+endif
+momprocessedexampledir = $(exampledir)/mom
+nodist_momprocessedexample_DATA = $(MOMPROCESSEDEXAMPLEFILES)
+endif
+
+mom_test_template = contrib/mom/examples/test-mom.sh.in
+
+# Small test suite on mom examples
+mom_TESTS = contrib/mom/examples/tests-mom.sh
+TESTS += $(mom_TESTS)
+contrib/mom/examples/tests-mom.sh: \
+ $(top_builddir)/config.status \
+ $(MOMPROCESSEDEXAMPLEFILES) \
+ $(top_srcdir)/$(mom_test_template)
+ $(AM_V_GEN)sed \
+ -e "s|[@]abs_top_builddir[@]|$(abs_top_builddir)|g" \
+ -e "s|[@]groff_have_urw_fonts[@]|$(groff_have_urw_fonts)|g" \
+ $(top_srcdir)/$(mom_test_template) > $@ \
+ && chmod +x $@
+MOSTLYCLEANFILES += $(mom_TESTS)
+EXTRA_DIST += $(mom_test_template)
+
+# For this list of files we add a symlink from $(exampledir)/mom to $(pdfdocdir)
+PDFDOCFILE = mom-pdf.pdf
+
+EXTRA_DIST += $(MOMHTMLDOCFILES) $(MOMEXAMPLEFILES) \
+ contrib/mom/BUGS \
+ contrib/mom/ChangeLog \
+ contrib/mom/NEWS \
+ contrib/mom/TODO \
+ contrib/mom/copyright \
+ contrib/mom/groff_mom.7.man
+
+MOSTLYCLEANFILES += \
+ $(MOMPROCESSEDEXAMPLEFILES) \
+ penguin.ps \
+ penguin.pdf
+
+# rule to generate .pdf files from .mom files
+SUFFIXES += .mom .pdf
+.mom.pdf:
+ $(GROFF_V)$(MKDIR_P) `dirname $@` \
+ && LC_ALL=C $(MOMPDFMOM) $< >$@
+
+$(MOMPROCESSEDEXAMPLEFILES): $(MOMNORMALFILES) \
+ groff troff gropdf pdfmom penguin.ps penguin.pdf font/devpdf/stamp
+
+penguin.ps:
+ $(AM_V_at)cp $(mom_srcdir)/examples/penguin.ps $@
+penguin.pdf:
+ $(AM_V_at)cp $(mom_srcdir)/examples/penguin.pdf $@
+
+install-data-hook: install_mom
+install_mom:
+if USE_GROPDF
+ for f in $(PDFDOCFILE); do \
+ $(RM) $(DESTDIR)$(pdfdocdir)/$$f; \
+ ln -s $(exampledir)/mom/$$f $(DESTDIR)$(pdfdocdir)/$$f; \
+ done
+endif
+
+uninstall_groffdirs: uninstall_mom
+uninstall_mom:
+ for f in $(PDFDOCFILE); do \
+ $(RM) $(DESTDIR)$(pdfdocdir)/$$f; \
+ done
+ -rmdir $(DESTDIR)$(pdfdocdir)
+ if test -d $(DESTDIR)$(exampledir)/mom; then \
+ rmdir $(DESTDIR)$(exampledir)/mom; \
+ fi
+ if test -d $(DESTDIR)$(htmldocdir)/mom; then \
+ rmdir $(DESTDIR)$(htmldocdir)/mom; \
+ fi
+
+
+# Local Variables:
+# fill-column: 72
+# mode: makefile-automake
+# End:
+# vim: set autoindent filetype=automake textwidth=72:
diff --git a/contrib/mom/mom.tmac b/contrib/mom/mom.tmac
new file mode 100644
index 0000000..7a6494b
--- /dev/null
+++ b/contrib/mom/mom.tmac
@@ -0,0 +1,3 @@
+.\" -*- nroff -*- mom.tmac
+.\"
+.do mso om.tmac
diff --git a/contrib/mom/momdoc/appendices.html b/contrib/mom/momdoc/appendices.html
new file mode 100644
index 0000000..964a2ab
--- /dev/null
+++ b/contrib/mom/momdoc/appendices.html
@@ -0,0 +1,901 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+This file is part of groff, the GNU roff type-setting system.
+
+Copyright (C) 2004-2020 Free Software Foundation, Inc.
+Written by Peter Schaffter (peter@schaffter.ca).
+
+Permission is granted to copy, distribute and/or modify this document
+under the terms of the GNU Free Documentation License, Version 1.3 or
+any later version published by the Free Software Foundation; with no
+Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
+Texts.
+
+A copy of the Free Documentation License is included as a file called
+FDL in the main directory of the groff source package.
+-->
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+<head>
+ <meta http-equiv="content-type" content="text/html;charset=utf-8"/>
+ <title>Mom -- Appendices</title>
+ <link rel="stylesheet" type="text/css" href="stylesheet.css" />
+</head>
+
+<body style="background-color: #f5faff;">
+
+<!-- ==================================================================== -->
+
+<div id="top" class="page">
+
+<!-- Navigation links -->
+<table style="width: 100%;">
+<tr>
+ <td><a href="toc.html">Back to Table of Contents</a></td>
+</tr>
+</table>
+
+<h1 id="appendices" class="docs">Appendices</h1>
+
+<div style="width: 68%; margin: auto;">
+<ul class="no-enumerator">
+ <li><a href="#fonts">Adding fonts to groff</a>
+ <ul style="margin-left: -.5em; list-style-type: disc">
+ <li><a href="#extending">Extending groff families / adding new families and fonts</a>
+ <ul style="margin-left: -.5em; list-style-type: circle">
+ <li><a href="#traditional">The traditional approach</a></li>
+ <li><a href="#simpler">The simpler way with mom</a></li>
+ </ul></li>
+ <li><a href="#steps">Step-by-step instructions</a></li>
+ <li><a href="#install-font">Automate the whole process &ndash; the install-font script</a></li>
+ </ul></li>
+ <li><a href="#codenotes">Some reflections on mom</a></li>
+ <li><a href="#contact">Contact the author</a></li>
+</ul>
+</div>
+
+<div class="rule-medium"><hr/></div>
+
+<h2 id="fonts" class="docs">Adding fonts to groff</h2>
+
+<div id="small-note" class="box-tip">
+<p class="tip-top">
+<kbd>&lt;prefix&gt;</kbd>, in this section, refers
+to the directory in which groff is installed, typically
+<br/>
+<span class="pre-in-pp">
+ /usr/share/groff/
+</span>
+(for distro-specific, pre-compiled groff packages) or
+<br/>
+<span class="pre-in-pp">
+ /usr/local/share/groff/
+</span>
+(if you&#8217;ve built groff from source).
+</p>
+
+<p class="tip-bottom">
+<kbd>&lt;version&gt;</kbd> refers to the groff version number, which
+can be found, if necessary, by typing
+<br/>
+<span class="pre-in-pp">
+ groff -v
+</span>
+at the command line.
+</p>
+</div>
+
+<p>
+Groff comes with a small library of
+<a href="definitions.html#family">families</a>
+(see the
+<a href="typesetting.html#family">FAMILY</a>
+macro for a list). The families have four
+<a href="definitions.html#font">fonts</a>
+associated with them. These fonts are a combination of
+<a href="definitions.html#weight">weight</a>
+and
+<a href="definitions.html#shape">shape</a>:
+<br/>
+<span class="pre-in-pp">
+ R (Roman, usually Medium weight),
+ I (Italic, usually Medium weight),
+ B (Bold, usually Roman shape) and
+ BI (Bold Italic)
+</span>
+If you work with mom a lot, sooner or later you&#8217;ll find that these
+families and their associated fonts aren&#8217;t sufficient. You&#8217;ll
+want to supplement them, either with more fonts for the families
+already provided&mdash;<i>Damn! I need Helvetica Bold Condensed
+Italic</i>&mdash;or with entire new families.
+</p>
+
+<h3 id="extending" class="docs">Extending groff families / adding new families and fonts</h3>
+
+<h4 id="traditional" class="docs">The traditional approach</h4>
+
+<p>
+The traditional approach to extending groff families has been
+to create new families for non-default weights and shapes (e.g.
+<b>Light</b>, which is a
+<a href="definitions.html#weight">weight</a>,
+or <b>Condensed</b>, which is a
+<a href="definitions.html#shape">shape</a>),
+then to associate them with groff&#8217;s predefined <b>R,
+I, B</b> and <b>BI</b> font styles. An example of this
+can be seen in the groff PostScript font library itself, which is
+found in
+<br/>
+<span class="pre-in-pp">
+ &lt;prefix&gt;/&lt;version&gt;/font/devps/
+</span>
+There&#8217;s one &#8220;family&#8221; for Helvetica (<b>HR</b>,
+<b>HI</b>, <b>HB</b>, <b>HBI</b>) and another for Helvetica Narrow
+(<b>HNR</b>, <b>HNI</b>, <b>HNB</b>, <b>HNBI</b>).
+</p>
+
+<p>
+The difficulty with this approach is that typographers tend to
+think of families as referring to the entire set of font weights
+and shapes associated with a family name. For example, when
+a typesetter says &#8220;the Helvetica family&#8221;, s/he is
+including the weights Helvetica Thin, Helvetica Light, Helvetica
+Regular, Helvetica Bold, Helvetica Heavy, etc, and all their
+associated shapes (Roman, Italic, Condensed, Narrow, Extended,
+Outline, etc).
+</p>
+
+<p>
+Thus, intuitively, when a typesetter gives mom a
+<kbd>.FAMILY&nbsp;H</kbd> directive, s/he reasonably expects that
+any subsequent <kbd>.FT</kbd> directive will access the desired font
+from the Helvetica family&mdash;without the need to state explicitly
+both family and font to <kbd>.FT</kbd>, as it is explained one can
+do in the
+<a href="typesetting.html#family">FAMILY</a>
+and
+<a href="typesetting.html#font">FT</a>
+sections of these documents.
+</p>
+
+<p>
+If one had, say, Helvetica Light Roman and Helvetica Light Italic
+as well as Helvetica Light Condensed Roman and Helvetica Light
+Condensed Italic, the established groff approach would require two
+&#8220;partial&#8221; families, <b>HL</b> (for Helvetica Light)
+and <b>HLCD</b> (for Helvetica Light Condensed), with <b>R</b> and
+<b>I</b> fonts for both:
+<br/>
+<span class="pre-in-pp">
+ HLR
+ HLI
+ HLCDR
+ HLCDI
+</span>
+Accessing these family/font combos routinely
+throughout a document would then require changing the family
+(with <kbd>.FAMILY</kbd>) and selecting the desired font
+(with <kbd>.FT&nbsp;R</kbd> or <kbd>.FT&nbsp;I</kbd>), or
+passing <kbd>.FT</kbd> the lengthy family+fontname (.e.g.
+<kbd>.FT&nbsp;HLCDI</kbd>).
+</p>
+
+<h4 id="simpler" class="docs">The simpler way with mom</h4>
+
+<p>
+Fortunately, groff provides a mechanism whereby it&#8217;s possible
+to extend the basic <b>R</b>, <b>I</b>, <b>B</b>, and <b>BI</b> fonts
+(&#8220;styles&#8221; in groff-speak) so that one can, in fact,
+create extensive type families, and access all the fonts in them
+with <kbd>.ft</kbd> (groff) or <kbd>.FT</kbd> (mom).
+</p>
+
+<p>
+Mom uses this mechanism to offer, in addition to groff&#8217;s
+default font styles, the following:
+</p>
+
+<div class="examples-container" style="padding-bottom: 1em;">
+<div id="style-extensions" style="width: 50%; float: left;">
+<span class="pre" style="font-size: 85%">
+UL = Ultra Light
+ULI = Ultra Light Italic
+ULCD = Ultra Light Condensed
+ULCDI = Ultra Light Condensed Italic
+ULEX = Ultra Light Extended
+ULEXI = Ultra Light Extended Italic
+
+XL = Extra Light
+XLI = Extra Light Italic
+XLCD = Extra Light Condensed
+XLCDI = Extra Light Condensed Italic
+XLEX = Extra Light Extended
+XLEXI = Extra Light Extended Italic
+
+TH = Thin
+THI = Thin Italic
+THCD = Thin Condensed
+THCDI = Thin Condensed Italic
+THEX = Thin Extended
+THEXI = Thin Extended Italic
+
+L = Light Roman
+LI = Light Italic
+LCD = Light Condensed
+LCDI = Light Condensed Italic
+LEX = Light Extended
+LEXI = Light Extended Italic
+
+BK = Book Roman
+BKI = Book Italic
+BKCD = Book Condensed
+BKCDI = Book Condensed Italic
+BKEX = Book Extended
+BKEXI = Book Extended Italic
+
+CD = Medium Condensed
+CDI = Medium Condensed Italic
+EX = Medium Extended
+EXI = Medium Extended Italic
+
+DB = DemiBold Roman
+DBI = DemiBold Italic
+DBCD = DemiBold Condensed
+DBCDI = DemiBold Condensed Italic
+DBEX = DemiBold Extended
+DBEXI = DemiBold Extended Italic
+
+SB = SemiBold Roman
+SBI = SemiBold Italic
+SBCD = SemiBold Condensed
+SBCDI = SemiBold Condensed Italic
+SBEX = SemiBold Extended
+SBEXI = SemiBold Extended Italic
+</span>
+</div>
+<span class="pre" style="font-size: 85%">
+BCD = Bold Condensed
+BCDI = Bold Condensed Italic
+BEX = Bold Extended
+BEXI = Bold Extended Italic
+BO = Bold Outline
+
+XB = Extra Bold
+XBI = Extra Bold Italic
+XBCD = Extra Bold Condensed
+XBCDI = Extra Bold Condensed Italic
+XBEX = Extra Bold Extended
+XBEXI = Extra Bold Extended Italic
+
+UB = Ultra Bold
+UBI = Ultra Bold Italic
+UBCD = Ultra Bold Condensed
+UBCDI = Ultra Bold Condensed Italic
+UBEX = Ultra Bold Extended
+UBEXI = Ultra Bold Extended Italic
+
+HV = Heavy
+HVI = Heavy Italic
+HVCD = Heavy Condensed
+HVCDI = Heavy Condensed Italic
+HVEX = Heavy Extended
+HVEXI = Heavy Extended Italic
+
+BL = Black
+BLI = Black Italic
+BLCD = Black Condensed
+BLCDI = Black Condensed Italic
+BLEX = Black Extended
+BLEXI = Black Extended Italic
+BLO = Black Outline
+
+XBL = Extra Black
+XBLI = Extra Black Italic
+XBLCD = Extra Black
+XBLCDI = Extra Black
+XBLEX = Extra Black Italic
+XBLEXI = Extra Black Italic
+
+UBL = Ultra Black
+UBLI = Ultra Black Italic
+UBLCD = Ultra Black Condensed
+UBLCDI = Ultra Black Condensed Italic
+UBLEX = Ultra Black Extended
+UBLEXI = Ultra Black Extended Italic
+
+SC = Small Caps Roman
+SCI = Small Caps Italic
+SCDB = Small Caps Demibold
+SCDBI = Small Caps Demibold Italic
+SCSB = Small Caps Semibold
+SCSBI = Small Caps Semibold Italic
+</span>
+</div>
+
+<p style="clear: both;">
+Thus, with mom, if you&#8217;ve installed some extra
+Helvetica fonts and named them according to the convention
+<kbd>&lt;F&gt;&lt;S&gt;</kbd> (where <kbd>&lt;F&gt;</kbd> means
+family and <kbd>&lt;S&gt;</kbd> means font style), once having
+entered
+<br/>
+<span class="pre-in-pp" style="margin-bottom: -1em;">
+ .FAMILY H
+</span>
+you can access any of the extra Helvetica fonts simply by passing
+the correct argument to
+<a href="typesetting.html#font">FT</a>
+from the list, above. For example, if you were working in Medium
+Roman (<kbd>.FT&nbsp;R</kbd>) and you needed Medium Condensed Italic
+for a while (assuming it&#8217;s installed), you&#8217;d just type
+<br/>
+<span class="pre-in-pp" style="margin-bottom: -1em;">
+ .FT CDI
+</span>
+to access the Medium Condensed Italic font from the Helvetica
+family.
+</p>
+
+<p>
+Mom&#8217;s list of font styles doesn&#8217;t pretend to be
+exhaustive. The extension names are arbitrary and can be used in a
+flexible manner. For example, if you create a family that has a
+Demibold font (<b>DB</b>) but no Bold font (<b>B</b>), you might
+find it more convenient to give the Demibold font the extension
+&#8220;<b>B</b>&#8221;.
+</p>
+
+<p id="register-style">
+You may, at needs, want to add to mom&#8217;s list of font styles.
+You can do this by editing the file, om.tmac (typical location:
+<kbd>&lt;prefix&gt;/&lt;version&gt;/tmac/om.tmac</kbd>). Near the
+top, you&#8217;ll see lines of the form
+<br/>
+<span class="pre-in-pp">
+ .sty \n[.fp] XL \" Extra Light
+ .sty \n[.fp] L \" Light Roman
+ .sty \n[.fp] LI \" Light Italic
+ .sty \n[.fp] LCD \" Light Condensed Roman
+</span>
+Simply add your new font style by imitating what you see, above,
+and plugging in your new font style (having, of course,
+added the font to groff, correctly named); see
+<a href="#steps">Step-by-step instructions</a>).
+</p>
+
+<p>
+For example, if you already have some fonts from the Univers family
+installed and have called the family <b>Univers</b>, you might decide at
+some point to add the Bold Outline font (<b>UniversBO</b>). In which
+case, you&#8217;d add
+<br/>
+<span class="pre-in-pp">
+ .sty \n[.fp] BO \" Bold Outline
+</span>
+to the <kbd>.sty&nbsp;\n[.fp]&nbsp; &lt;font style&gt;</kbd> list
+in om.tmac.
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span>
+Mom&#8217;s font extensions are not &#8220;user-space&#8221;
+controllable via a macro. If you&#8217;ve been using groff for
+a long time, and have already rolled your own solution to adding
+families and fonts to groff, you may find that mom&#8217;s font
+extensions conflict with your own scheme. Should that be the case,
+comment out the <kbd>.sty&nbsp;\n[.fp] &lt;font style&gt;</kbd>
+lines found near the top of the <kbd>om.tmac</kbd> file.
+</p>
+</div>
+
+<div class="box-important">
+<p class="tip">
+<span class="important">Important:</span>
+Be careful that any styles you add do not conflict with
+<i>family</i> names that already exist. &#8220;<b>C</b>&#8221;,
+for example, conflicts with the Courier family (<b>CR</b>,
+<b>CI</b>, <b>CB</b>, <b>CI</b>). Were you to create a font
+style &#8220;<b>C</b>&#8221;, thinking that <kbd>.FT&nbsp;C</kbd>
+would give you access to font style once you&#8217;d given a
+<kbd>.FAMILY</kbd> directive, you&#8217;d get a nasty surprise:
+your type would come out in Courier Roman!
+</p>
+</div>
+
+<div class="rule-medium"><hr/></div>
+
+<h2 id="steps" class="docs">Step-by-step instructions</h2>
+
+<div>
+<ul class="no-enumerator" style="margin-left: -1.5em;">
+ <li><a href="#need">What you need before you start</a></li>
+ <li><a href="#preparation">Initial preparation</a></li>
+ <li><a href="#step-1">1. Acquire the font</a></li>
+ <li><a href="#step-2">2. Prepare to convert the font to the correct format</a>
+ <ul style="margin-left: -.5em">
+ <li><a href="#ttf">TTF fonts</a></li>
+ <li><a href="#type1">Type 1 fonts</a></li>
+ </ul></li>
+ <li><a href="#step-3">3. Convert the font and put it in the right place</a></li>
+ <li><a href="#step-4">4. Update the download file</a>
+ <ul style="margin-left: -.5em">
+ <li><a href="#internal">Get the internal font name</a></li>
+ <li><a href="#add">Add the font to the download file</a></li>
+ <li><a href="#gropdf-download">Updating the gropdf download file</a></li>
+ </ul></li>
+ <li><a href="#groff-font-names">Naming groff fonts</a></li>
+ <li><a href="#install-font">Automate the whole process &ndash; the install-font script</a>
+ </li>
+</ul>
+</div>
+
+
+<p>
+There are a number of ways to approach making fonts available
+to groff. These instructions aren&#8217;t meant to cover all
+possibilities, merely one.
+</p>
+
+<p>
+GNU/Linux distributions being what they are, directory locations
+may differ and the presence of some executable can&#8217;t be
+guaranteed. I run a Debian-based system. The instructions reflect
+that. Users of other distros may have to interpret them according
+to the way their distro operates.
+</p>
+
+<h3 id="need" class="docs appendices">What you need before you start</h3>
+
+<ul style="margin-top: 1em; margin-left: -.5em;">
+ <li>groff, version 1.18 or higher<br/>
+ (Debian package: groff)
+ </li>
+ <li>ghostscript<br/>
+ (Debian package: ghostscript or ghostscript-x)
+ </li>
+ <li>fontforge<br/>
+ (Debian package: fontforge)
+ </li>
+</ul>
+
+<h3 id="preparation" class="docs appendices">Initial preparation (you only need do this once)</h3>
+
+<ol id="site-font" style="margin-left: -1em;">
+ <li>
+ Locate the groff directory,
+ <kbd class="nobr">site-font</kbd>. The exact location is
+ difficult to predict, owing to differences between distros and
+ whether you&#8217;re using a pre-packaged groff or have built
+ it from source. Some typical locations are:
+ <br/>
+ <span class="pre-in-pp" style="margin-bottom: -2em;">
+ /usr/share/groff/
+ /usr/local/share/groff/
+ /etc/groff/
+ </span>
+ If you can&#8217;t find the site-font directory, locate
+ groff&#8217;s <kbd class="nobr">site-tmac</kbd> directory, and, as root,
+ create site-font in the same directory. Eg, if you find
+ site-tmac in <kbd class="nobr">/usr/share/groff/</kbd>, create site-font in
+ <kbd class="nobr">/usr/share/groff/</kbd>
+ <br/>
+ <span class="pre-in-pp" style="margin-bottom: -2em;">
+ sudo mkdir site-font
+ </span>
+ </li>
+ <li>
+ Create two files, generate-t42.pe and generate-pfa.pe,
+ as you see them below. Place them in a convenient and
+ easily-remembered location, like your home directory.
+ <br/>
+ <span class="examples" style="font-size: 95%; display: block; margin-top: .5em;">generate-t42.pe</span>
+
+ <div class="examples-container" style="margin-top: 0; margin-bottom: -1em; padding-bottom: 1em;">
+<span class="pre">
+# generate-t42.pe
+
+Open($1);
+Generate($fontname + ".pfa");
+Generate($fontname + ".t42");
+</span>
+ </div>
+ <br/>
+ <span class="examples" style="font-size: 95%; display: block; margin-top: .5em;">generate-pfa.pe</span>
+ <div class="examples-container" style="margin-top: 0; padding-bottom: 1em;">
+<span class="pre">
+# generate-pfa.pe
+
+Open($1);
+Generate($fontname + ".pfa");
+</span>
+ </div>
+ </li>
+</ol>
+
+<h3 id="step-1" class="docs appendices">Step 1: Acquire the font</h3>
+
+<p class="top">
+The two most commonly available types of fonts are PostScript Type1
+(extension .pfb) and TrueType (extension .ttf). Either can be made
+available to groff. There are many websites holding collections of
+both.
+</p>
+
+<h3 id="step-2" class="docs appendices">Step 2: Prepare to convert the font to the correct format</h3>
+
+<p class="top">
+Change into the directory holding the new font.
+</p>
+
+<p>
+For convenience in the next step, make a symbolic link to
+the file 'textmap':
+<br/>
+<span class="pre-in-pp">
+ ln -s &lt;prefix&gt;/&lt;version&gt;/font/devps/generate/textmap .
+</span>
+See
+<a href="#small-note">here</a>
+for an explanation of <kbd>&lt;prefix&gt;</kbd>
+and <kbd>&lt;version&gt;</kbd>.
+</p>
+
+<p>
+In addition, unless you&#8217;re installing fonts from your home
+directory, make links to the files 'generate-t42.pe' and
+'generate-pfa.pe'.
+<br/>
+<span class="pre-in-pp">
+ ln -s $HOME/generate-t42.pe .
+ ln -s $HOME/generate-pfa.pe .
+</span>
+</p>
+
+<h3 id="step-3" class="docs appendices">Step 3: Convert the font and put it in the right place</h3>
+
+<p class="top">
+TrueType fonts (.ttf) need to be converted to .t42. Type 1 fonts
+(.pfa, .pfb) need to be converted to .pfa.
+</p>
+
+<h4 id="ttf" class="docs" style="font-size: 90%; text-transform: uppercase;">&nbsp;&bull;&nbsp;Converting TTF Fonts</h4>
+
+<p class="top" style="margin-top: .5em;">
+For .ttf fonts, run
+<br/>
+<span class="pre-in-pp">
+ fontforge -script generate-t42.pe &lt;file&gt;.ttf
+</span>
+This will create three new files with the extensions .t42, .pfa, and
+.afm. Next, run
+<br/>
+<span class="pre-in-pp">
+ afmtodit &lt;afm file&gt; textmap &lt;groff font&gt;
+</span>
+This will create a groff font with the name you give. (See
+<a href="#groff-font-names">here</a>
+for advice on naming groff fonts.)
+</p>
+
+<p>
+Move the .t42 and groff font files to
+<kbd class="nobr">&lt;prefix&gt;/site-font/devps/</kbd>.
+</p>
+
+<p>
+If you&#8217;re running a recent version of groff that includes
+the native pdf device (gropdf), move the .pfa file to <kbd
+class="nobr">&lt;prefix&gt;/site-font/devpdf/</kbd>. If not, you
+may safely remove it. You may also safely remove the .afm file.
+</p>
+
+<h4 id="type1" class="docs" style="font-size: 90%; text-transform: uppercase;">&nbsp;&bull;&nbsp;Converting Type1 Fonts</h4>
+
+<p class="top" style="margin-top: .5em;">
+For .pfb fonts, run
+<br/>
+<span class="pre-in-pp">
+ fontforge -script generate-pfa.pe &lt;file&gt;.pfb
+</span>
+This will create two new files with the extensions .pfa, and .afm.
+Next, run
+<br/>
+<span class="pre-in-pp">
+ afmtodit &lt;afm file&gt; textmap &lt;groff font&gt;
+</span>
+Move the .pfa and groff font files to
+<kbd class="nobr">&lt;prefix&gt;/&lt;site-font&gt;/devps/</kbd>.
+(See
+<a href="#groff-font-names">here</a>
+for advice on naming groff fonts.)
+</p>
+
+<p>
+If you&#8217;re running a recent version of groff that includes the
+native pdf device (gropdf), link the .pfa and groff font files, now
+in <kbd class="nobr">&lt;prefix&gt;/&lt;site-font&gt;/devps/</kbd>,
+to the <kbd class="nobr">&lt;prefix&gt;/site-font/devpdf</kbd>
+directory.
+</p>
+
+<p>
+Start by changing into the
+<kbd class="nobr">&lt;prefix&gt;/site-font/devpdf/</kbd>
+directory, then:
+<br/>
+<span class="pre-in-pp">
+ ln -s &lt;prefix&gt;/&lt;site-font&gt;/devps/&lt;file&gt;.pfa .
+ ln -s &lt;prefix&gt;/&lt;site-font&gt;/devps/&lt;groff font&gt; .
+</span>
+You may safely remove the .afm file.
+</p>
+
+<h3 id="step-4" class="docs appendices">Step 4: Update the download file</h3>
+
+<h4 id="internal" class="docs" style="font-size: 90%; text-transform: uppercase;">&nbsp;&bull;&nbsp;Get the internal font name</h4>
+
+<p class="top" style="margin-top: .5em;">
+Inspect your new groff font file. Near the top, you will see a line
+of the form
+<br/>
+<span class="pre-in-pp">
+ internalname &lt;name&gt;
+</span>
+Usually, the internal name is helpfully descriptive, e.g.
+<br/>
+<span class="pre-in-pp">
+ internalname Optima-Bold
+</span>
+Make a note of the internal name.
+</p>
+
+<h4 id="add" class="docs" style="font-size: 90%; text-transform: uppercase;">&nbsp;&bull;&nbsp;Add the font to the download file</h4>
+
+<p class="top" style="margin-top: .5em;">
+If a file called &#8216;download&#8217; is not already present in
+<kbd class="nobr">&lt;prefix&gt;/site-font/devps/</kbd>,
+copy over the one found in
+<kbd class="nobr">&lt;prefix&gt;/&lt;version&gt;/font/devps/</kbd>.
+</p>
+
+<p>
+The download file maps the internal names used by groff to the
+actual fonts. To add your new font to the download file, append a
+line containing the internal name, followed by a tab (make sure your
+text editor is inserting the tab character, not spaces), followed by
+the .t42 or .pfa font to which the internal name refers.
+</p>
+
+<p>
+For example, if the internal name is Optima-Bold and the font is a
+.pfa file called Optima-Bold.pfa, your updated download file will
+contain
+<br/>
+<span class="pre-in-pp">
+ Optima-Bold&lt;tab&gt;Optima-Bold.pfa
+</span>
+</p>
+
+<h4 id="gropdf-download" class="docs" style="font-size: 90%; text-transform: uppercase;">&nbsp;&bull;&nbsp;Updating the gropdf download file</h4>
+
+<p class="top" style="margin-top: .5em;">
+If you&#8217;re running a recent version of groff that includes
+the native pdf device (gropdf), you must update the
+<kbd class="nobr">&lt;prefix&gt;/site-font/devpdf/download</kbd>
+file as well. If it does not exist, create it.
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span>
+Start with a blank &#8216;download&#8217; file. Do not copy
+over the &#8216;download&#8217; file from
+<kbd class="nobr">&lt;prefix&gt;/&lt;version&gt;/font/devpdf/</kbd>.
+</p>
+</div>
+
+<p>
+The instructions for registering fonts in the
+<kbd class="nobr">&lt;prefix&gt;/site-font/devpdf/</kbd> download
+file are identical to those for PostScript fonts (see above), but
+with one important difference: the lines must all begin with a tab
+character. Thus, using our Optima example, your
+<kbd class="nobr">&lt;prefix&gt;/site-font/devpdf/download</kbd>
+file download line for the same font is
+<br/>
+<span class="pre-in-pp">
+ &lt;tab&gt;Optima-Bold&lt;tab&gt;Optima-Bold.pfa
+</span>
+</p>
+
+<h3 id="groff-font-names" class="docs appendices">Naming groff fonts</h3>
+
+<p class="top">
+For convenience when using mom, and to keep your font collection
+organized, choose meaningful groff font names following the scheme
+&lt;Family&gt;&lt;FONT&gt;, where Family is something
+like Optima or Univers or Clarendon, and FONT is either
+<br/>
+<span style="display: block; margin-left: 2em;">
+<kbd>R&nbsp;&nbsp;</kbd>(roman/regular)
+<br/>
+<kbd>I&nbsp;&nbsp;</kbd>(italic)
+<br/>
+<kbd>B&nbsp;&nbsp;</kbd>(bold)
+<br/>
+<kbd>BI&nbsp;</kbd>(bold italic)
+</span>
+or one of the 1&ndash;5 character fontstyles listed
+<a href="#style-extensions">here</a>.
+Thus, for the fonts Optima Light Italic and Optima Extra Black, your font names would be
+<br/>
+<span class="pre-in-pp">
+ OptimaLI
+ OptimaXBL
+</span>
+This scheme allows you to enter <kbd>.FAMILY&nbsp;Optima</kbd> to make
+Optima the current family, and <kbd>.FT&nbsp;LI</kbd> or <kbd>.FT&nbsp;XBL</kbd>
+when you need the fonts Light Italic or Extra Black.
+</p>
+
+<p>
+Groff font names are, in fact, arbitrary; you can call your fonts
+anything you like, provided the
+<a href="#internal">internal name</a>
+in the
+<a href="#add">download file</a>
+matches the internal name found in the groff font file. When
+calling a font that does not follow the recommended naming convention,
+you must pass the full font name to <kbd>.FT</kbd> whenever you wish
+to use it.
+</p>
+
+<p>
+For example, the font, Goudy Stout, isn&#8217;t really part of the
+Goudy family, and while "stout" describes it, Stout is not a
+recognized font style. Therefore, its groff name could simply be
+GoudyStout, and whenever you needed it, you could call it with
+<kbd>.FT&nbsp;GoudyStout</kbd>.
+</p>
+
+<h3 id="install-font" class="docs appendices">Automate the whole process &ndash; the install-font script</h3>
+
+<p>
+A bash script to make the entire process of installing fonts a
+painless no-brainer has been posted online at
+<a href="https://www.schaffter.ca/mom/bin/install-font.sh">https://www.schaffter.ca/mom/bin/install-font.sh</a>.
+Be sure to make the script executable
+(<kbd class="nobr">chmod 755 install-font</kbd>)
+after you download it, then type <kbd>./install-font.sh -H</kbd> for
+usage.
+</p>
+
+<div class="rule-medium" style="margin-top: 2em;"><hr/></div>
+
+<!-- ===================================================================== -->
+
+<h2 id="codenotes" class="docs">Some reflections on mom</h2>
+
+<p>
+If, as Eric Raymond asserts, open source begins with a programmer
+scratching a personal itch, then mom can truly be called open
+source.
+</p>
+
+<p>
+Mom had her origins in a library of groff routines I wrote over
+the years to handle various aspects of typesetting and document
+processing that weren&#8217;t adequately covered by ms, me, mm, and
+friends. Typically, I&#8217;d use the library to cobble together
+macro sets for new challenges as they came my way.
+</p>
+
+<p>
+As a writer living in a perpetual state of penury, all the computers
+I&#8217;ve ever owned have been hand-me-downs&mdash;several
+generations out-of-date and resource challenged. Disk space has
+always been an issue, as has processor speed and available RAM. One
+of the reasons I run GNU/Linux rather than the offering from Redmond
+is that it has helped enormously to get the most out of my poor
+little boxes.
+</p>
+
+<p>
+In Linux-land (all Unix variants, in fact), the choice of
+typesetting systems basically comes down to groff or TeX. Both are
+wonderful&mdash;monumental achievements if you ask me&mdash;and both
+have their own particular strengths. However, for people in my
+financial position (and there are millions of us around the globe,
+in both developed and developing countries), TeX and groff have one
+big difference: size. TeX is huge. Even its most ardent supporters
+agree it suffers from bloat, on top of being complex and unwieldy to
+manage. Groff is tiny by comparison, occupying minimal disk space
+and having only a small memory footprint while at the same time
+being flexible and powerful, typographically speaking. Back in the
+Jurassic Period, I ran it successfully on a 386 with 8 megs of RAM
+and a 250 meg hard disk.
+</p>
+
+<p>
+However, groff has always had a liability: it&#8217;s incredibly geeky.
+Owing to its very long history, it&mdash;and its power users
+&mdash;seem to have remained stuck in a time warp. The canonical macro packages
+still look as they did back in those decades when memory was exorbitantly
+expensive and every byte mattered.
+</p>
+
+<p>
+For some time now, groff users and macro writers have had the option
+to use &#8220;long&#8221; names for macros (i.e. longer than two
+letters, the original limit), yet have mostly chosen not to. With
+long names, it&#8217;s possible to create macro sets that are
+humanly readable and easy to interpret, encouraging development and
+evolution. What&#8217;s more, the macros themselves need not be
+terse, intimidating, and easily forgotten 1- or 2-letter commands
+inserted in the body of a document. They can be sensible and
+helpful to everyone, groff newbies and old hands alike.
+</p>
+
+<p>
+Mom&#8217;s macro file, om.tmac, uses long names, aliases, and a
+host of other groff goodies that have become part of the whole groff
+picture. The function of nearly every macro, number register and
+string can be inferred simply from its name. The file is heavily
+commented. A consistent, if idiosyncratic, indenting style is used
+as well, significantly improving readability. Anyone wanting to
+futz around with mom&#8217;s macros should be able to do so with a
+minimum of head scratching.
+</p>
+
+<div class="rule-medium"><hr/></div>
+
+<!-- ===================================================================== -->
+
+<h2 id="contact" class="docs">Contact the author</h2>
+
+<p>
+If you have any questions or comments about mom, suggestions to
+make, criticisms to offer, or bugs to report, use the groff mailing
+list (subscription information available
+<a href="http://www.gnu.org/software/groff/groff.html">here</a>)
+or contact me, Peter Schaffter, directly at the following
+address:
+<br/>
+<span class="pre-in-pp">
+ &#112;&#101;&#116;&#101;&#114;&#64;&#115;&#99;&#104;&#97;&#102;&#102;&#116;&#101;&#114;&#46;&#99;&#97;
+</span>
+Please include the word &#8220;mom&#8221; or &#8220;groff&#8221; in
+the Subject line of any message sent to my personal address or you
+risk the wrath of my implacable spam filters.
+</p>
+
+<p>
+If you want to visit mom&#8217;s website, you&#8217;ll find a link
+to it at
+<br/>
+<span class="pre-in-pp">
+ https://www.schaffter.ca
+</span>
+The site contains links to some of my fiction, all of which was
+typeset with mom and groff.
+</p>
+
+<div class="rule-long"><hr/></div>
+
+<!-- Navigation links -->
+<table style="width: 100%; margin-top: 12px;">
+<tr>
+ <td style="width: 33%;"><a href="toc.html">Back to Table of Contents</a></td>
+ <td style="width: 100%; text-align: right;"><a href="#top">Top</a></td>
+</tr>
+</table>
+
+</div>
+
+<div class="bottom-spacer"><br/></div>
+
+</body>
+</html>
diff --git a/contrib/mom/momdoc/color.html b/contrib/mom/momdoc/color.html
new file mode 100644
index 0000000..f53b5c0
--- /dev/null
+++ b/contrib/mom/momdoc/color.html
@@ -0,0 +1,505 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+This file is part of groff, the GNU roff type-setting system.
+
+Copyright (C) 2004-2020 Free Software Foundation, Inc.
+Written by Peter Schaffter (peter@schaffter.ca).
+
+Permission is granted to copy, distribute and/or modify this document
+under the terms of the GNU Free Documentation License, Version 1.3 or
+any later version published by the Free Software Foundation; with no
+Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
+Texts.
+
+A copy of the Free Documentation License is included as a file called
+FDL in the main directory of the groff source package.
+-->
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+<head>
+ <meta http-equiv="content-type" content="text/html;charset=utf-8"/>
+ <title>Mom -- Colour</title>
+ <link rel="stylesheet" type="text/css" href="stylesheet.css" />
+</head>
+
+<body style="background-color: #f5faff;">
+
+<!-- ==================================================================== -->
+
+<div id="top" class="page">
+
+<!-- Navigation links -->
+<table style="width: 100%;">
+<tr>
+ <td><a href="toc.html">Back to Table of Contents</a></td>
+ <td style="text-align: right;"><a href="graphical.html#top">Next: Graphical objects</a></td>
+</tr>
+</table>
+
+<h1 class="docs">Coloured text</h1>
+
+<div style="text-align: center;">
+<a href="#index-color">List of color macros</a>
+</div>
+
+<div class="rule-medium"><hr/></div>
+
+<h2 class="docs">Introduction</h2>
+
+<p>
+Mom&#8217;s support for coloured text is straightforward. You begin
+by telling mom about the colours you want with
+<a href="#newcolor">NEWCOLOR</a>
+or
+<a href="#xcolor">XCOLOR</a>.
+Afterwards, any time you want text to be coloured, you either colour
+it with an
+<a href="definitions.html#inlines">inline escape</a>
+that contains the colour name (e.g. <kbd><span class="nobr">\*[red]</span></kbd>
+or <kbd><span class="nobr">\*[blue]</span></kbd>) or invoke the macro
+<a href="#color">COLOR</a>
+with the name of the colour you want.
+</p>
+
+<p id="color-example">
+For example, say you want to have the name &#8220;Jack&#8221; in the
+sentence &#8220;All work and no play makes Jack a dull boy&#8221;
+appear in yellow. You&#8217;d begin by telling mom about the colour,
+yellow. There are two ways of doing this; see
+<a href="#newcolor">NEWCOLOR</a>
+and
+<a href="#xcolor">XCOLOR</a>
+for a full explanation of the difference between the two.
+</p>
+
+<p>
+If you use XCOLOR, you&#8217;d enter this:
+<br/>
+<span class="pre-in-pp">
+ .XCOLOR yellow
+</span>
+If you use NEWCOLOR, you might enter:
+<br/>
+<span class="pre-in-pp">
+ .NEWCOLOR yellow RGB #FFFF00
+</span>
+</p>
+
+<p id="color-example2" style="margin-top: -1em;">
+After defining or initializing the colour yellow you&#8217;d
+colourise the name, Jack, either with an inline escape
+<br/>
+<span class="pre-in-pp">
+ All work and no play makes \*[yellow]Jack\*[black] a dull boy.
+</span>
+or with the
+<a href="#color">COLOR</a>
+macro
+<br/>
+<span class="pre-in-pp">
+ All work and no play makes
+ .COLOR yellow
+ Jack
+ .COLOR black
+ a dull boy.
+</span>
+Notice, in both examples, that a) you have to set the colour back
+to black after &#8220;Jack,&#8221; and b) you don&#8217;t have to
+define or initialize the colour, black. Mom predefines it for you.
+</p>
+
+<p>
+For information on using colour during
+<a href="docprocessing.html#intro-macros-docprocessing">document processing</a>,
+see
+<a href="docprocessing.html#color">Colour support in document processing</a>.
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span>
+Mom&#8217;s colour support is for text only. She doesn&#8217;t
+support &#8220;fill&#8221; (or &#8220;background&#8221;) colour for
+solid, enclosed graphical objects (polygons, ellipses) drawn with
+groff&#8217;s <kbd>\D</kbd>
+<a href="definitions.html#inlines">inline escapes</a>,
+although you may give a colour as one of the arguments to
+mom&#8217;s &#8220;box&#8221; and &#8220;circle&#8221; macros,
+<a href="graphical.html#dbx">DBX</a>
+and
+<a href="graphical.html#dcl">DCL</a>
+when the first argument to these macros is <kbd>SOLID</kbd>.
+</p>
+</div>
+
+<div class="box-tip">
+<p class="tip">
+<span class="experts">Experts:</span>
+If you&#8217;re accustomed to using groff&#8217;s
+<kbd>.defcolor</kbd> to define colours, and groff&#8217;s inline
+<kbd>\m[&lt;colorname&gt;]</kbd> to call them, you may continue to
+do so without confusing mom.
+</p>
+</div>
+
+<div class="macro-list-container">
+<h3 id="index-color" class="macro-list">Coloured text macros</h3>
+
+<ul class="macro-list">
+ <li><a href="#newcolor">NEWCOLOR</a></li>
+ <li><a href="#xcolor">XCOLOR</a></li>
+ <li><a href="#color">COLOR</a></li>
+ <li><a href="#color-inline">\*[&lt;colourname&gt;]</a> (inline escape)</li>
+</ul>
+</div>
+
+<div class="rule-medium" style="margin-bottom: 1.5em;"><hr/></div>
+
+<!-- -NEWCOLOR- -->
+
+<div class="macro-id-overline">
+<h3 id="newcolor" class="macro-id">Creating (initializing) a colour with NEWCOLOR</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>NEWCOLOR</b> <kbd class="macro-args">&lt;colour name&gt; [&lt;colour scheme&gt;] &lt;colour components&gt;</kbd>
+</div>
+
+<p>
+NEWCOLOR lets you create a colour, rather like an artist mixing
+paint on a palette. The colour isn&#8217;t used immediately;
+NEWCOLOR merely tells mom how to mix the colour when you need it.
+If you haven&#8217;t invoked <kbd>.NEWCOLOR</kbd> (or
+<kbd><a href="#xcolor">.XCOLOR</a></kbd>),
+mom doesn&#8217;t have a clue what you mean when you reference a
+colour (with
+<a href="#color">COLOR</a>
+or
+<a href="#color-inline"><kbd><span class="nobr">\*[&lt;colour name&gt;]</span></kbd></a>).
+</p>
+
+<p>
+The first argument to NEWCOLOR is a name for your colour. It
+can be anything you like&mdash;provided it&#8217;s just one word
+long&mdash;and can be caps, lower case, or any combination of the
+two.
+</p>
+
+<p>
+The second argument, which is entirely optional, is the
+&#8220;colour scheme&#8221; you want mom to use when mixing the
+colour. Valid arguments are
+<br/>
+<span class="pre-in-pp">
+ RGB (3 components: red green blue)
+ CYM (3 components: cyan yellow magenta)
+ CMYK (4 components: cyan magenta yellow black)
+ GRAY (1 component)
+</span>
+If you omit the second argument, mom assumes you
+want RGB.
+</p>
+
+<p>
+The final argument is the components of your colour. This can be
+hexadecimal string starting with a pound sign (<kbd>#</kbd>) (for
+colour values in the 0-255 range) or two pound signs (<kbd>##</kbd>)
+(for colour values in the 0-65535 range), or it can be a series of
+decimal digits, separated by spaces, one digit per component, with
+the argument enclosed in double quotes. (If this is all gibberish
+to you, see
+<a href="#color-tip">Tips for newbies</a>.)
+</p>
+
+<p>
+Thus, to tell mom about a colour named &#8220;YELLOW&#8221;, you
+could enter one of the following:
+<br/>
+<span class="pre-in-pp">
+ .NEWCOLOR YELLOW #FFFF00 \"or ##FFFFFFFF0000 or "1 1 0"
+ .NEWCOLOR YELLOW RGB #FFFF00 \"or ##FFFFFFFF0000 or "1 1 0"
+ .NEWCOLOR YELLOW CMY #0000FF \"or ##0000FFFF0000 or "0 0 1"
+ .NEWCOLOR YELLOW CMYK #0000FF00 \"or ##00000000FFFF0000 or "0 0 1 0"
+</span>
+After you&#8217;ve told mom about a colour, you can then get her to
+set text in that colour either with the
+<a href="definitions.html#inlines">inline escape</a>,
+<a href="#color-inline"><kbd><span class="nobr">\*[&lt;colourname&gt;]</span></kbd></a>,
+or the macro
+<a href="#color">COLOR</a>.
+(See the
+<a href="#color-example">example</a>,
+above.)
+</p>
+
+<div class="box-tip">
+<p class="tip-top">
+<span class="note">Note:</span>
+The colourname you give to NEWCOLOR may be used with groff&#8217;s
+<kbd>\m[&lt;colourname&gt;]</kbd> inline escape (the <kbd>\m</kbd>
+escape is used to set text and rule colours). Thus, assuming
+a colourname &#8220;blueblack&#8221; set with NEWCOLOR,
+<kbd><span class="nobr">\*[blueblack]</span></kbd> and <kbd>\m[blueblack]</kbd>
+are equivalent. Furthermore, the colourname can be given as an
+argument to <b>groff</b>&#8217;s
+<a href="definitions.html#primitives">primitive</a>
+request, <kbd>.gcolor</kbd> (which does the same thing as
+<kbd>\m[&lt;colourname&gt;]</kbd>).
+</p>
+
+<p class="tip-bottom">
+Equally, the colourname may be used with
+<kbd>\M[&lt;colourname&gt;]</kbd> and <kbd>.fcolor</kbd>, which set
+the &#8220;fill&#8221; colour for solid graphical objects.
+</p>
+</div>
+
+<div class="box-tip">
+<p id="color-tip" class="tip-top">
+<span class="tip">Tips for newbies:</span>
+Colour manipulation can be tremendously confusing if you don&#8217;t
+have a background in graphic arts or computing. My advice, if colour
+intimidates you, is to stick to using mom&#8217;s default RGB colour
+scheme, and to fire up a colour chooser that gives you the RGB values
+you want for the colour you select. Plug those values into the
+components argument to NEWCOLOR, and you&#8217;ll get the colour
+you want. Both the KDE and gnome desktops have colour selectors
+that provide you with the shorter RGB hexadecimal string. If
+you&#8217;re not running KDE or gnome, the X utility, xcolorsel,
+provides you with a similar functionality, although it only provides
+RGB values for 256 pre-defined colours. If you use xcolorsel, be
+sure to click the button &#8220;Display format&#8221; and select
+&#8220;8 bit truncated rgb&#8221;.
+</p>
+
+<p class="tip-bottom">
+Alternatively, you can use mom&#8217;s simpler
+<kbd><a href="#xcolor">XCOLOR</a></kbd>
+macro to initialize one of the 256 pre-defined X colours by
+supplying the name of the colour as an argument.
+</p>
+</div>
+
+<!-- -XCOLOR- -->
+
+<div class="macro-id-overline">
+<h3 id="xcolor" class="macro-id">Initializing a colour with XCOLOR</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>XCOLOR</b> <kbd class="macro-args">&lt;X colourname&gt; [&lt;alias&gt;]</kbd>
+</div>
+
+<p class="requires">
+<kbd style="font-style: normal">&lt;X colourname&gt;</kbd> <i>must be all one word, all lower case.</i>
+<br/>
+(See
+<a href="#xcolor-names" style="font-style: normal;">Finding X colour names</a>
+for how to get a list of valid colour names.)
+</p>
+
+<p>
+XCOLOR is similar to NEWCOLOR in that it tells mom to initialize a
+colour, but it&#8217;s easier to use. All you have to do is pass
+it, as an argument, the valid name of one of the 256 pre-defined
+X colours. The name must be all one word, and, breaking with mom
+policy, it must be entered in lower case.
+</p>
+
+<p>
+For example, if you want to initialize the X colour, coral, all you
+have to do is enter
+<br/>
+<span class="pre-in-pp">
+ .XCOLOR coral
+</span>
+Afterwards
+<br/>
+<span class="pre-in-pp">
+ .COLOR coral
+</span>
+
+will colourise subsequent text coral until you instruct mom to
+return to black, or some other pre-defined, initialized colour.
+(The
+<a href="definitions.html#inlines">inline escape</a>
+<kbd><span class="nobr">\*[coral]</span></kbd> will equally colourise text coral
+after you&#8217;ve initialized the colour with XCOLOR.)
+</p>
+
+<p>
+The downside of XCOLOR is that you can&#8217;t create custom
+colours. This restriction, however, is mitigated by the fact that
+for many users, 256 colours is more than enough to play around with.
+</p>
+
+<p>
+While some X colours have fanciful names (peachpuff, papayawhip,
+thistle, snow), many are self-explanatory and self-descriptive
+in ordinary colour terms. &#8220;blue&#8221; is pure (rgb)
+blue, &#8220;green&#8221; is pure (rgb) green, and so on.
+Furthermore, for many X colours, there exist four variants, each
+representing increasingly darker shades of the same colour.
+For example, &#8220;blue1&#8221; is a relatively bright blue;
+&#8220;blue2&#8221;, &#8220;blue3&#8221; and &#8220;blue4&#8221; are
+increasingly darker shades. For that reason, you may find XCOLOR is
+a better choice than NEWCOLOR when it comes to initializing common
+colours.
+</p>
+
+<p>
+The whimsical nature of X colour names sometimes makes for names
+that are long to type in, e.g. &#8220;mediumspringgreen&#8221;. The
+optional second argument to XCOLOR allows you to come up with more
+convenient name by which to reference the colour. For example, you
+could enter
+<br/>
+<span class="pre-in-pp">
+ .XCOLOR mediumspringgreen mygreen
+</span>
+or
+<span class="pre-in-pp">
+ .XCOLOR mediumspringgreen MYGREEN
+</span>
+so that whenever you want text mediumspringgreen-ed, you can use
+either <kbd>.COLOR&nbsp;mygreen</kbd> (or <kbd>.COLOR&nbsp;MYGREEN</kbd>)
+or the inline escape
+<kbd>\*[mygreen]</kbd> (or <kbd>\*[MYGREEN]</kbd>.)
+</p>
+
+<h3 id="xcolor-names" class="docs">Finding X colour names</h3>
+
+<p>
+There are two ways of finding the names of the pre-defined X
+colours. One is to consult the file, rgb.txt, included with all
+X11 installations. The location of the file on a Debian GNU/Linux
+distribution is typically /etc/X11/rgb.txt. Other distributions and
+other X installations may have the file in another location. The
+file lists the colour names, but doesn&#8217;t show you what the
+colours actually look like.
+</p>
+
+<p>
+A better way to get the colour names, as well as to see what the
+colours look like, is to fire up a colour chooser (like xcolorsel)
+that both lists the colour names and shows a swatch of the colour
+as well.
+</p>
+
+<p>
+Whichever method you use to find X colour names, remember that the
+names, passed as arguments to XCOLOR, must be all one word, all in
+lower case.
+</p>
+
+<div class="box-tip">
+<p class="tip-top">
+<span class="note">Note:</span>
+Both the colourname and the alias you give to XCOLOR may be
+used with groff&#8217;s <kbd>\m[&lt;colourname&gt;]</kbd>
+inline escape (the <kbd>\m</kbd> escape is used to set
+text and rule colours). Thus, assuming an X-colourname
+&#8220;mediumspringgreen&#8221; set with
+XCOLOR, and an alias, &#8220;mygreen&#8221;,
+<kbd><span class="nobr">\*[mediumspringgreen]</span></kbd>,
+<kbd><span class="nobr">\m[mediumspringgreen]</span></kbd>,
+<kbd><span class="nobr">\*[mygreen]</span></kbd> and
+<kbd><span class="nobr">\m[mygreen]</span></kbd> are all equivalent.
+Furthermore, both the colourname and the alias can be given as an
+argument to groff&#8217;s
+<a href="definitions.html#primitives">primitive</a>
+request, <kbd>.gcolor</kbd> (which does the same thing as
+<kbd><span class="nobr">\m[&lt;colourname&gt;]</span></kbd>).
+</p>
+
+<p class="tip-bottom">
+The colourname initialized with XCOLOR <i>but not the
+alias</i> may also be used with groff&#8217;s inline escape,
+<kbd>\M[&lt;colorname&gt;]</kbd>, and the corresponding primitive,
+<kbd>.fcolor</kbd>, both of which set the &#8220;fill&#8221; colour
+for solid graphical objects. If you need a colour initialized with
+XCOLOR for <kbd>\M</kbd> or <kbd>.fcolor</kbd>, you MUST give the
+full colourname; the alias won&#8217;t work.
+</p>
+</div>
+
+<!-- -COLOR- -->
+
+<div class="macro-id-overline">
+<h3 id="color" class="macro-id">Invoking a colour</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>COLOR</b> <kbd class="macro-args">&lt;colourname&gt;</kbd>
+</div>
+
+<p id="color-inline" class="requires" style="font-style: normal;">
+Inline: <kbd>\*[&lt;colourname&gt;]</kbd>
+</p>
+
+<p>
+Once you&#8217;ve told mom about a colour (via
+<a href="#newcolor">NEWCOLOR</a>
+or
+<a href="#xcolor">XCOLOR</a>,
+you use either the macro COLOR or the
+<a href="definitions.html#inlines">inline escape</a>,
+<kbd><span class="nobr">\*[&lt;colourname&gt;]</span></kbd>, to cause mom to set
+subsequent text in that colour. See the
+<a href="#color-example2">example</a>,
+above, which shows both in action.
+</p>
+
+<div class="box-tip">
+<p class="tip-top">
+<span class="note">Note:</span>
+You can use the <kbd><span class="nobr">\*[&lt;colourname&gt;]</span></kbd>
+inline escape in any
+<a href="docprocessing.html#top">document processing</a>
+macro that takes a
+<a href="definitions.html#stringargument">string argument</a>.
+However, you must remember to reset the colour at the end of the
+argument (typically with <kbd><span class="nobr">\*[black]</span></kbd>) unless
+you want all subsequent invocations of that particular macro to be
+colourised.
+</p>
+
+<p>
+Furthermore, if you use
+<kbd><span class="nobr">\*[&lt;colourname&gt;]</span></kbd> in the string
+argument passed to
+<a href="docelement.html#heading">HEADING&nbsp;&lt;n&gt;</a>
+and you&#8217;ve requested that the heading level be numbered, the
+numbers themselves will not be colourised, only the text you pass to
+the macro. If you wish the numbers to be colourised along with the
+text, you must explicitly tell mom with
+<a href="docelement.html#heading-style">HEADING_STYLE&nbsp;&lt;n&gt;</a>.
+</p>
+
+<p class="tip-bottom">
+For colourising underscored text, see
+<a href="goodies.html#underscore-color">Colourising underscored text</a>
+in the notes at the end of
+<a href="goodies.html#underscore">UNDERSCORE</a>.
+</p>
+</div>
+
+<div class="rule-long"><hr/></div>
+
+<!-- Navigation links -->
+<table style="width: 100%; margin-top: 12px;">
+<tr>
+ <td style="width: 33%;"><a href="toc.html">Back to Table of Contents</a></td>
+ <td style="width: 33%; text-align: center;"><a href="#top">Top</a></td>
+ <td style="width: 33%; text-align: right;"><a href="graphical.html#top">Next: Graphical objects</a></td>
+</tr>
+</table>
+
+</div>
+
+<div class="bottom-spacer"><br/></div>
+
+</body>
+</html>
diff --git a/contrib/mom/momdoc/cover.html b/contrib/mom/momdoc/cover.html
new file mode 100644
index 0000000..7efee1f
--- /dev/null
+++ b/contrib/mom/momdoc/cover.html
@@ -0,0 +1,851 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+This file is part of groff, the GNU roff type-setting system.
+
+Copyright (C) 2004-2020 Free Software Foundation, Inc.
+Written by Peter Schaffter (peter@schaffter.ca).
+
+Permission is granted to copy, distribute and/or modify this document
+under the terms of the GNU Free Documentation License, Version 1.3 or
+any later version published by the Free Software Foundation; with no
+Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
+Texts.
+
+A copy of the Free Documentation License is included as a file called
+FDL in the main directory of the groff source package.
+-->
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+<head>
+ <meta http-equiv="content-type" content="text/html;charset=utf-8"/>
+ <title>Mom -- Document processing, creating cover pages</title>
+ <link rel="stylesheet" type="text/css" href="stylesheet.css" />
+</head>
+
+<body style="background-color: #f5faff;">
+
+<!-- ==================================================================== -->
+
+<div id="top" class="page">
+
+<!-- Navigation links -->
+<table style="width: 100%;">
+<tr>
+ <td><a href="toc.html">Back to Table of Contents</a></td>
+ <td style="text-align: right;"><a href="tables-of-contents.html#top">Next: Tables of contents</a></td>
+</tr>
+</table>
+
+<h1 class="docs">Creating cover pages</h1>
+
+<div style="width: 66%; margin: auto;">
+<ul class="no-enumerator">
+ <li><a href="#cover-intro">Introduction to cover pages</a>
+ <ul style="margin-left: -.5em; list-style-type: disc;">
+ <li><a href="#important-note">Important note</a></li>
+ <li><a href="#desc">Description of cover pages</a></li>
+ <li><a href="#pagination">Headers/footers/pagination</a>
+ <ul style="margin-left: -1.25em; list-style-type: circle;">
+ <li><a href="#pagination">DOC_COVERS_COUNT_PAGES</a></li>
+ <li><a href="#pagination">COVERS_COUNT_PAGES</a></li>
+ </ul>
+ </li>
+ <li><a href="#design">Designing your own cover pages</a></li>
+ <li><a href="#persistence">Persistence of data and formatting</a></li>
+ </ul></li>
+ <li><a href="#index-covers">Doc-cover and cover macros</a>
+ <ul style="margin-left: -.5em; list-style-type: disc;">
+ <li><a href="#cover">DOC_COVER / COVER</a>
+ <ul style="margin-left: -1.25em; list-style-type: circle;">
+ <li><a href="#cover-args">The argument list: saying what goes on doc cover and cover pages</a></li>
+ <li><a href="#meanings">What the arguments mean</a></li>
+ <li><a href="#chapter">How the CHAPTER argument and friends work</a></li>
+ </ul></li>
+ <li><a href="#covertext">DOC_COVERTEXT / COVERTEXT</a>
+ <ul style="margin-left: -1.25em; list-style-type: circle;">
+ <li><a href="#placement">Placement</a></li>
+ </ul>
+ </li>
+ <li><a href="#coverimages">DOC_COVER_IMAGE / COVER_IMAGE</a>
+ <ul style="margin-left: -1.25em; list-style-type: circle;">
+ <li><a href="#positioning">Positioning of doc cover and cover images</a></li>
+ </ul>
+ </li>
+ </ul></li>
+ <li><a href="#on-off">Enabling/disabling automatic generation of cover pages</a></li>
+ <li><a href="#cover-control">Control macros for covers and doc covers</a></li>
+</ul>
+</div>
+
+<div class="rule-medium"><hr/></div>
+
+<h2 id="cover-intro" class="docs">Introduction to cover pages</h2>
+
+<p>
+Though identical in treatment, mom provides two kinds of cover
+pages: document cover pages (&#8221;doc covers&#8221;) and section
+cover pages (&#8220;covers&#8221;). Section cover pages are
+analogous to title pages.
+</p>
+
+<p>
+A doc cover is what you&#8217;d most likely use at the start of a
+collated document, where you might want the name of the complete
+document, the author(s) and the copyright line to appear. Another
+place you might use a doc cover is for a novel, where you want the
+title of the novel, not the chapter title or chapter number, as the
+first cover page.
+</p>
+
+<p>
+A cover is what you&#8217;d use for pages that separate sections
+of a collated document, i.e. title pages. A cover page (but not a
+doc cover) in a collated document could, for example, simply read:
+&#8221;PART 1&#8221;.
+</p>
+
+<p>
+In non-collated documents (say, an essay) you can use either a cover
+or doc cover to generate the cover sheet.
+</p>
+
+<p>
+In addition, nothing prevents you from generating both a doc cover
+and a cover for every document in a collated document. Or you can
+selectively disable the automatic generation of either doc covers or
+covers in a collated document on-the-fly.
+</p>
+
+<div id="important-note" class="box-important">
+<p class="tip">
+<span class="important">Important note:</span>
+Automatic generation of covers or doc covers after the first one(s)
+only takes place if you are working with collated documents. Mom
+provides no mechanism for saying &#8221;print a section cover
+here even though I&#8217;m still working on the same (non-collated)
+document.&#8221;
+</p>
+</div>
+
+<h3 id="desc" class="docs">Description of cover pages</h3>
+
+<p>
+By default, mom typesets covers and doc covers identically to
+<a href="definitions.html#docheader">docheaders</a>
+(see
+<a href="docprocessing.html#docheader-control">How to change the look of docheaders</a>
+for a description of what a docheader looks like). The only
+differences are
+</p>
+<ul style="margin-top: -.5em; margin-bottom: -.5em;">
+ <li>the position on the page where the information is output</li>
+ <li>the (optional) addition of copyright and miscellaneous information</li>
+ <li>there&#8217;s no running text underneath, although you can add text
+ to a cover or doc cover (for example, an Abstract) with
+ <a href="#covertext">COVERTEXT</a>
+ </li>
+</ul>
+
+<p>
+You tell mom what you want to appear on cover pages through the
+arguments you pass to
+<a href="#cover">DOC_COVER</a>
+and/or
+<a href="#cover">COVER</a>.
+Provided you have already given mom the appropriate reference macros
+(e.g.
+<a href="docprocessing.html#title">TITLE</a>
+or
+<a href="docprocessing.html#author">AUTHOR</a>),
+she will output covers and doc covers identically to how she
+would output docheaders containing the same information.
+</p>
+
+<p>
+By default, mom starts covers and doc covers one-third of the way
+down the page. This can be changed through the use of the control
+macros DOC_COVER_START_POS / COVER_START_POS (or DOC_COVER_ADVANCE /
+COVER_ADVANCE).
+</p>
+
+<p>
+If you request copyright information (and have already given mom the
+reference macro
+<a href="docprocessing.html#copyright">COPYRIGHT</a>)
+she sets it, by default, in a smaller
+<a href="definitions.html#ps">point size</a>
+in the bottom right hand corner of the cover or doc cover. The
+position, as well as all of the standard typesetting parameters, can be
+altered via control macros.
+</p>
+
+<p>
+Similarly, if you request miscellaneous information (and have
+already given mom the reference macro
+<a href="docprocessing.html#misc">MISC</a>)
+she sets it, by default, in a smaller point size in the bottom left
+hand corner of the cover or doc cover. As with the copyright, the
+position and type specs can be altered via control macros.
+</p>
+
+<h3 id="pagination" class="docs">Headers/footers/pagination</h3>
+
+<p>
+Mom does not set any
+<a href="definitions.html#header">headers</a>
+or
+<a href="definitions.html#footer">footers</a>
+on cover pages. Neither does she set any page numbers. From
+the point of view of pagination, covers and doc covers are by
+default considered &#8221;null&#8221; pages. If you wish them to
+be included in the pagination scheme (even though no page numbers
+appear), you must tell mom that&#8217;s what you want by invoking
+<br/>
+<span class="pre-in-pp">
+ .DOC_COVER_COUNTS_PAGES
+</span>
+or
+<br/>
+<span class="pre-in-pp">
+ .COVER_COUNTS_PAGES
+</span>
+</p>
+
+<h3 id="design" class="docs">Designing your own cover pages</h3>
+
+<p>
+Finally, if you want to design your own cover page(s), you can
+typeset them by hand inside a
+<a href="#covertext">COVERTEXT</a>
+block using mom&#8217;s typesetting macros to format the text.
+</p>
+
+<h3 id="persistence" class="docs">Persistence of data and formatting</h3>
+
+<p>
+Doc-cover and cover data&mdash;that is to say, the strings passed to
+reference macros that appear on doc cover and cover
+pages&mdash;does not persist after
+<a href="docprocessing.html#start">START</a>,
+however the formatting of the various parts (TITLE, AUTHOR,
+COPYRIGHT, etc.) does.
+</p>
+
+<div class="macro-list-container">
+<h3 id="index-covers" class="macro-list">Cover and document cover macros</h3>
+<ul class="macro-list">
+ <li><a href="#cover">DOC_COVER and COVER</a>
+ <ul style="margin-left: -.5em; list-style-type: disc;">
+ <li><a href="#cover-args">The arguments: saying what goes on doc cover and cover pages</a></li>
+ </ul></li>
+ <li><a href="#covertext">DOC_COVERTEXT / COVERTEXT</a></li>
+ <li><a href="#doc-coverimage">DOC_COVER_IMAGE / COVER_IMAGE</a></li>
+ <li><a href="#on-off">Enabling/disabling automatic generation of cover pages</a>
+ <ul style="margin-left: -.5em; list-style-type: disc;">
+ <li><a href="#doc-covers">DOC_COVERS</a></li>
+ <li><a href="#covers">COVERS</a></li>
+ </ul></li>
+ <li><a href="#cover-control">Control macros for doc covers and covers</a></li>
+</ul>
+</div>
+
+<!-- -COVER- -->
+
+<div class="macro-id-overline">
+<h3 id="cover" class="macro-id">DOC_COVER and COVER</h3>
+</div>
+
+<div id="doc-cover" class="box-macro-args">
+Macro: <b>DOC_COVER</b> <kbd class="macro-args">(see argument list, below)</kbd>
+</div>
+
+<div class="box-macro-args" style="margin-top: 1em;">
+Macro: <b>COVER</b> <kbd class="macro-args">(see argument list, below)</kbd>
+</div>
+
+<p>
+DOC_COVER and COVER behave identically. The reason mom provides
+two macros for cover page generation is so that you can have two
+different kinds of covers with different information on each.
+</p>
+
+<p>
+Imagine, for a moment, you&#8217;ve written a document comprised of
+three sections. When you
+<a href="rectoverso.html#collate">COLLATE</a>
+the document for output, you could use DOC_COVER to generate a cover
+page that contained the name of the entire document, your (the
+author&#8217;s) name, and perhaps the copyright date. Subsequently,
+you could use COVER, after each <kbd>.COLLATE</kbd> but before each
+<kbd><a href="docprocessing.html#start">.START</a></kbd>,
+to generate a cover page (title page, cover sheet) containing
+just the name of the section, for example, &#8220;Part 1&#8221;.
+</p>
+
+<p>
+The arguments to <kbd>DOC_COVER</kbd> and <kbd>COVER</kbd> tell mom
+what you&#8217;d like on cover pages. You may give as many or as
+few arguments as you need, in any order. A very common setup would
+be:
+<br/>
+<span class="pre-in-pp">
+ .COVER TITLE AUTHOR COPYRIGHT
+</span>
+</p>
+
+<h4 id="cover-args" class="docs" style="margin-top: -1em;">The argument list</h4>
+
+<p style="margin-top: 1em">
+The arguments to <kbd>COVER</kbd> and <kbd>DOC_COVER</kbd> tell mom
+what you want on the cover page:
+<br/>
+<span class="pre-in-pp">
+ TITLE | DOCTITLE | DOC_COVERTITLE | COVERTITLE
+ CHAPTER | CHAPTER_TITLE | CHAPTER+TITLE
+ SUBTITLE
+ AUTHOR
+ DOCTYPE
+ DOC_COVERTEXT | COVERTEXT
+ DOC_COVER_IMAGE | COVER_IMAGE
+ COPYRIGHT
+ MISC
+ PDF_OUTLINE_LABEL "&lt;label&gt;"
+ BLANKPAGE
+</span>
+</p>
+
+<h4 id="meanings" class="docs" style="margin-top: -1em;">What the arguments mean</h4>
+
+<dl>
+ <dt class="params">TITLE</dt>
+ <dd class="cover-args">&ndash; the string(s) you gave to
+ <a href="docprocessing.html#title">TITLE</a>
+ </dd>
+ <dt class="params">DOCTITLE</dt>
+ <dd class="cover-args">&ndash; the string(s) you gave to
+ <a href="docprocessing.html#doc-title">DOCTITLE</a>
+ </dd>
+ <dt class="params">DOC_COVERTITLE / COVERTITLE</dt>
+ <dd class="cover-args">&ndash; the string(s) you gave to
+ <a href="docprocessing.html#doc-covertitle">DOC_COVERTITLE</a>
+ or
+ <a href="docprocessing.html#covertitle">COVERTITLE</a>
+ </dd>
+ <dt class="params">CHAPTER, CHAPTER_TITLE, CHAPTER+TITLE</dt>
+ <dd class="cover-args">&ndash; see below,
+ <a href="#chapter">How the CHAPTER argument and friends work</a>
+ </dd>
+ <dt class="params">SUBTITLE</dt>
+ <dd class="cover-args">&ndash; the string(s) you gave to
+ <a href="docprocessing.html#subtitle">SUBTITLE</a>
+ </dd>
+ <dt class="params">AUTHOR</dt>
+ <dd class="cover-args">&ndash; the string(s) you gave to
+ <a href="docprocessing.html#author">AUTHOR</a>
+ </dd>
+ <dt class="params">DOCTYPE</dt>
+ <dd class="cover-args">&ndash; the string you gave to
+ <a href="docprocessing.html#doctype">DOCTYPE NAMED</a>
+ </dd>
+ <dt class="params">DOC_COVERTEXT / COVERTEXT</dt>
+ <dd class="cover-args">&ndash; the block of type you entered for
+ <a href="#covertext">DOC_COVERTEXT</a>
+ or
+ <a href="#covertext">COVERTEXT</a>
+ </dd>
+ <dt class="params">DOC_COVER_IMAGE / COVER_IMAGE</dt>
+ <dd class="cover-args">&ndash; the image file you gave to
+ <a href="#covertext">DOC_COVER_IMAGE</a>
+ or
+ <a href="#covertext">COVER_IMAGE</a>
+ </dd>
+ <dt class="params">COPYRIGHT</dt>
+ <dd class="cover-args">&ndash; the string you gave to
+ <a href="docprocessing.html#copyright">COPYRIGHT</a>
+ </dd>
+ <dt class="params">MISC</dt>
+ <dd class="cover-args">&ndash; the string(s) you gave to
+ <a href="docprocessing.html#misc">MISC</a>
+ </dd>
+ <dt class="params">PDF_OUTLINE_LABEL &lt;label&gt;</dt>
+ <dd class="cover-args">
+ <span style="display:block; margin-left: 1em">
+ By default, mom identifies doc covers in the outline panel of PDF
+ viewers with the prepended label, &#8220;Cover:&#8221;, and covers
+ with the label &#8220;Title Page:&#8221;. If you would like
+ to change the label, give the <kbd>PDF_OUTLINE_LABEL</kbd>
+ argument to DOC_COVER or COVER along with the new label, in
+ quotation marks, as in this example:
+ <br/>
+ <kbd>&nbsp;&nbsp;.COVER TITLE AUTHOR COPYRIGHT PDF_LABEL "Cover Sheet: "</kbd>
+ </span>
+ </dd>
+ <dt class="params">BLANKPAGE</dt>
+ <dd class="cover-args">
+ <span style="display:block; margin-left: 1em">
+ If the final argument to DOC_COVER or COVER is <kbd>BLANKPAGE</kbd>,
+ mom will insert a blank page after the doc cover or cover. This is
+ particularly useful if you intend to print your document two-sided,
+ since, in two-sided printing, there may be instances where you do
+ not want text on the reverse side of cover or title pages
+ </span>
+ <span style="display:block; margin-left: 1em; margin-top: .5em">
+ If you enable
+ <a href="#pagination">DOC_COVERS_COUNT_PAGES</a>
+ and/or
+ <a href="#pagination">COVERS_COUNT_PAGES</a>,
+ the blank page will be taken into account in the pagination
+ scheme, though no page number appears on it. Otherwise, blank
+ pages are invisible to mom&#8217;s pagination.
+ </span>
+ </dd>
+</dl>
+
+<p>
+Please note that in all cases, if you have passed
+a reference macro one of the optional arguments
+<kbd>DOC_COVER</kbd> or <kbd>COVER</kbd> (e.g.
+<kbd>.TITLE&nbsp;DOC_COVER&nbsp;"Title"</kbd>), mom will print the
+appropriate string on the appropriate cover page. Thus,
+<br/>
+<span class="pre-in-pp">
+ .TITLE DOC_COVER "Collected Essays"
+ .TITLE COVER "1985-2015"
+ .TITLE "Neo-liberalism: Who Did They Think They Were Fooling?"
+ .DOC_COVER TITLE
+ .COVER TITLE
+</span>
+will print &#8220;Collected Essays&#8221; on the doc cover page,
+&#8220;1985-2015&#8221; on the cover page, and, assuming the
+docheader hasn&#8217;t been disabled, &#8220;Neo-liberalism: Who
+Did They Think They Were Fooling?&#8221; as the title in the
+docheader.
+</p>
+
+<p>
+Note that
+<br/>
+<span class="pre-in-pp">
+ .DOC_COVERTITLE "Collected Essays"
+ .COVERTITLE "1985-2015"
+ .TITLE "Neo-liberalism: Who Did They Think They Were Fooling?"
+ .DOC_COVER DOC_COVERTITLE
+ .COVER COVERTITLE
+</span>
+could be used to accomplish the same thing.
+</p>
+
+<h5 id="chapter" class="docs" style="margin-top: 0; text-transform: none;">How the CHAPTER argument and friends work</h5>
+
+<p style="margin-top: .75em">
+<span style="display: block; margin-bottom: -1.25em; font-weight: bold;">&bull;&nbsp;CHAPTER</span>
+<br/>
+The <kbd>CHAPTER</kbd> argument will print the
+<a href="docprocessing.html#chapter-string">CHAPTER_STRING</a>
+concatenated with the chapter number you gave to
+<a href="docprocessing.html#chapter">CHAPTER</a>.
+For example, assuming a vanilla setup for your chapter:
+<br/>
+<span class="pre-in-pp" style="color: #64614a;">
+ .CHAPTER 1
+ .CHAPTER_TITLE "The Bonny Blue Yonder"
+ <span style="color: #941614;">.COVER CHAPTER</span> \" (or <span style="color: #941614;">.DOC_COVER CHAPTER</span>)
+</span>
+will print (and only print)
+<br/>
+<span class="pre-in-pp">
+ Chapter 1
+</span>
+</p>
+
+<p style="margin-top: -1em;">
+<span style="display: block; margin-bottom: -1.25em; font-weight: bold;">&bull;&nbsp;CHAPTER_TITLE</span>
+<br/>
+The <kbd>CHAPTER_TITLE</kbd> argument will print the chapter title
+you gave to
+<a href="docprocessing.html#chapter-title">CHAPTER_TITLE</a>.
+For example, assuming a vanilla setup for your chapter:
+<br/>
+<span class="pre-in-pp" style="color: #64614a;">
+ .CHAPTER 1
+ .CHAPTER_TITLE "The Bonny Blue Yonder"
+ <span style="color: #941614;">.COVER CHAPTER_TITLE</span> \"(or <span style="color: #941614;">.DOC_COVER CHAPTER_TITLE</span>)
+</span>
+will print (and only print)
+<br/>
+<span class="pre-in-pp">
+ The Bonny Blue Yonder
+</span>
+</p>
+
+<p style="margin-top: -1em;">
+<span style="display: block; margin-bottom: -1.25em; font-weight: bold;">&bull;&nbsp;CHAPTER+TITLE</span>
+<br/>
+The <kbd>CHAPTER+TITLE</kbd> argument will print both the
+concatenated chapter string+number and the chapter title. For
+example, assuming a vanilla setup for your chapter:
+<br/>
+<span class="pre-in-pp" style="color: #64614a;">
+ .CHAPTER 1
+ .CHAPTER_TITLE "The Bonny Blue Yonder"
+ <span style="color: #941614;">.COVER CHAPTER+TITLE</span> \"(or <span style="color: #941614;">.DOC_COVER CHAPTER+TITLE</span>)
+</span>
+will print
+<br/>
+<span class="pre-in-pp">
+ Chapter 1
+ The Bonny Blue Yonder
+</span>
+</p>
+
+<div class="macro-id-overline">
+<h3 id="covertext" class="macro-id">DOC_COVERTEXT and COVERTEXT</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>DOC_COVERTEXT</b> <kbd class="macro-args">[START &lt;starting position&gt;] &lt;toggle&gt;</kbd>
+</div>
+<div class="box-macro-args" style="margin-top: 1em;">
+Macro: <b>COVERTEXT</b> <kbd class="macro-args">[START &lt;starting position&gt;] &lt;toggle&gt;</kbd>
+</div>
+
+<p class="requires">
+&bull;&nbsp;Must come after
+<a href="#printstyle"><span class="normal">PRINTSTYLE</span></a>
+</p>
+
+<p>
+<kbd>DOC_COVERTEXT</kbd> and <kbd>COVERTEXT</kbd> allow you to add
+text to doc covers and covers in addition to, or instead of, what is
+generated by mom from the arguments you give to
+<a href="#doccover">DOC_COVER</a>
+and
+<a href="#doccover">COVER</a>.
+</p>
+
+<p>
+Invoke <kbd>.DOC_COVERTEXT</kbd> or <kbd>.COVERTEXT</kbd> on a line
+by itself, follow it with the text and formatting you desire, and
+terminate the text block with <kbd>.DOC_COVERTEXT&nbsp;OFF</kbd> or
+<kbd>COVERTEXT&nbsp;OFF</kbd> (or <kbd>QUIT, END, DONE</kbd>, etc.).
+</p>
+
+<p>
+By default, cover text is set over the full line length of the
+document, using the style parameters of
+<a href="definitions.html#running">running text</a>.
+Therefore, as noted, these macros must come after PRINTSTYLE
+and any global style changes (margins, family, size, leading,
+etc.). Formatting within a cover text block must be done
+&#8220;manually&#8221; with mom&#8217;s typesetting macros;
+<a href="docelement.html#pp">PP</a>
+is the only allowed document element tag.
+</p>
+
+<h4 id="placement" class="docs">Placement</h4>
+
+<p>
+If you do not instruct mom to put anything on doc cover or cover
+pages except <kbd>DOC_COVERTEXT</kbd> or <kbd>COVERTEXT</kbd>, the
+cover text will begin at the document&#8217;s top margin.
+Equally, if only <kbd>COPYRIGHT</kbd> and/or <kbd>MISC</kbd> are
+to go on the pages, cover text begins at the top margin. In all
+other cases, cover text begins below the last element on the page
+(excluding COPYRIGHT or MISC), separated by a blank line.
+</p>
+
+<p>
+If you wish to change the starting position of the text, you must
+use
+<a href="typesetting.html#space">SP</a>
+or
+<a href="typesetting.html#ald">ALD</a>
+to move it further down the page. Alternatively, you may use the
+optional START argument to give a precise location for the text to
+begin.
+</p>
+
+<p>
+<kbd>DOC_COVERTEXT</kbd> and <kbd>COVERTEXT</kbd> are particularly
+useful for putting abstracts on cover pages, as technical reports
+often require.
+</p>
+
+<p>
+Here&#8217;s a simple recipe for setting an abstract:
+<br/>
+<span class="pre-in-pp">
+ .COVERTEXT
+ .FT BI
+ .PT_SIZE 14
+ .LS 14
+ .CENTER
+ Abstract
+ .SP .5v
+ .FT R
+ .PT_SIZE 12
+ .IB 6P
+ .JUSTIFY
+ Text of Abstract...
+ .COVERTEXT OFF
+</span>
+Assuming you have told mom to put the title and author on the
+cover page, the abstract will appear beneath the author with a
+14-point bold-italic title, centered, with the text of the abstract
+medium-roman and justified, indented 6 picas from both margins.
+</p>
+
+<div class="macro-id-overline">
+<h3 id="coverimages" class="macro-id">DOC_COVER_IMAGE and COVER_IMAGE</h3>
+</div>
+
+<div id="doc-coverimage" class="box-macro-args">
+Macro: <b>DOC_COVER_IMAGE</b> <kbd class="macro-args">&lt;image&gt; &lt;width&gt; &lt;height&gt; [ -L | -C | -R | -I &lt;indent&gt; &lt;Y-pos&gt; [ &lt;X-pos&gt; ] ]</kbd>
+</div>
+
+<div id="coverimage" class="box-macro-args" style="margin-top: 1em;">
+Macro: <b>COVER_IMAGE</b> <kbd class="macro-args">&lt;image&gt; &lt;width&gt; &lt;height&gt; [ -L | -C | -R | -I &lt;indent&gt; &lt;Y-pos&gt; [ &lt;X-pos&gt; ] ]</kbd>
+</div>
+
+<p>
+There are times you need a full page image on a cover, for example
+the jacket of a book. Equally, there are times when you need a small
+image on the cover, perhaps a company logo.
+</p>
+
+<p>
+DOC_COVER_IMAGE and COVER_IMAGE take the same arguments
+as PDF_IMAGE, and in the same order. Consult
+<a href="images.html#pdf-image">PDF_IMAGE</a>
+for a description.
+</p>
+
+<p>
+Two additional arguments allow you to place images using x-y
+coordinates. Please note that if you use x-y coordinates for
+positioning, <b>Y-pos</b> comes before <b>X-pos</b> in the order of
+arguments.
+</p>
+
+<p>
+Like PDF_IMAGE, the image file must be in PDF format. Mom
+apologizes, but PostScript images are not supported for inclusion on
+covers. See
+<a href="images.html#pdf">Image conversion and file processing</a>
+for instructions on converting various image types to PDF, and
+<a href="images.html#bounding-box">here</a>
+for instructions on obtaining image dimensions.
+</p>
+
+<h4 id="positioning" class="docs">Positioning of doc cover and cover images</h4>
+
+<p>
+With no arguments other than <kbd>&lt;file name&gt;</kbd>,
+<kbd>&lt;width&gt;</kbd>, and <kbd>&lt;height&gt;</kbd>,
+DOC_COVER_IMAGE and COVER_IMAGE place images flush with the top
+left corner of the printer sheet. This allows placing full-page
+background images on covers. For example, assuming a US-letter page
+size,
+<br/>
+<span class="pre-in-pp">
+ .DOC_COVER_IMAGE image.pdf 612p 792p
+ .DOC_COVER TITLE AUTHOR DOC_COVER_IMAGE
+</span>
+will fill the doc cover page with &#8220;image.pdf&#8221; and set
+the title and author in their usual locations.
+</p>
+
+<p>
+For smaller images, the horizontal position is established
+with one of the <kbd>-L</kbd>, <kbd>-C</kbd>, <kbd>-R</kbd>, or
+<kbd>-I&nbsp;&lt;indent&gt;</kbd> arguments, just like
+<a href="images.html#pdf-image">PDF_IMAGE</a>.
+You may instead use the <kbd>X-pos</kbd> argument, provided that it
+is preceded by a <kbd>Y-pos</kbd> argument. The values given to
+<kbd>-I</kbd>, <kbd>Y-pos</kbd> and <kbd>X-pos</kbd> must have a
+<a href="definitions.html#unitofmeasure">unit of measure</a>
+appended to them.
+</p>
+
+<p>
+Vertical positioning of smaller images requires the <kbd>Y-pos</kbd>
+argument (which is why it precedes <kbd>X-pos</kbd> in the order of
+arguments) otherwise the image will be flush with the top edge of
+the printer sheet
+</p>
+
+<p>
+The positioning of images does not effect the placement of type on
+doc cover and cover pages.
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Tip:</span>
+The combination of
+<a href="#covertext">COVERTEXT</a>
+and COVER_IMAGE make it possible to design covers entirely to your
+own specifications.
+</p>
+</div>
+
+<div class="macro-id-overline" style="margin-top: .5em">
+<h3 id="on-off" class="macro-id">Enabling/disabling automatic generation of cover pages</h3>
+</div>
+
+<div id="covers" class="box-macro-args" style="margin-top: .5em">
+Macro: <b>COVERS</b> <kbd class="macro-args">&lt;toggle&gt;</kbd>
+</div>
+
+<div id="doc-covers" class="box-macro-args" style="margin-top: 1em;">
+Macro: <b>DOC_COVERS</b> <kbd class="macro-args">&lt;toggle&gt;</kbd>
+</div>
+
+<p>
+By default, if you give mom a
+<a href="#cover">COVER</a>
+or
+<a href="#doc-cover">DOC_COVER</a>
+directive, she will print the cover or doc cover. In a document
+that contains sections, articles or chapters formerly treated as
+&#8221;one-off&#8217;s&#8221; but now being
+<a href="rectoverso.html#collate-intro">collated</a>,
+such behaviour may not be desirable.
+</p>
+
+<p>
+Mom lets you selectively enable or disable the generation of covers
+and/or doc covers with the toggle macros, COVERS and DOC_COVERS.
+Because they&#8217;re toggle macros, simply invoking them by
+themselves enables automatic cover or doc cover generation, while
+invoking them with any argument at all (<kbd>OFF, QUIT, X</kbd>,
+etc) disables cover or doc cover generation. </p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span>
+You must place these macros prior to any instance of
+<a href="docprocessing.html#start">START</a>.
+Since they&#8217;re &#8221;on&#8221; by default, there&#8217;s no
+need to use them if you want covers. However, if you don&#8217;t,
+especially in the kind of scenario described above, the best place
+to put them (most likely with an <kbd>OFF, NO, X</kbd>, etc. argument),
+is immediately after the first invocation of START. By doing so,
+you ensure they meet the requirement of preceding all subsequent
+instances of START.
+</p>
+</div>
+
+<div class="rule-short"><hr/></div>
+
+<h2 id="cover-control" class="macro-group">Control macros for doc covers and covers</h2>
+
+<p>
+The default typographic appearance of the items on a doc cover or
+cover is identical to that of the items in a
+<a href="definitions.html#docheader">docheader</a>.
+(See
+<a href="docprocessing.html#docheader-desc">Docheader description</a>
+for a description of the defaults.)
+</p>
+
+<p>
+<a href="docprocessing.html#copyright">COPYRIGHT</a>
+and
+<a href="docprocessing.html#misc">MISC</a>,
+which do not appear in docheaders, have the following default
+characteristics:
+</p>
+<ul style="margin-top: -.5em; margin-bottom: -.5em;">
+ <li>the COPYRIGHT line is set flush with the document&#8217;s right
+ and bottom margins, 2
+ <a href="definitions.html#ps">point sizes</a>
+ smaller than the size of
+ <a href="definitions.html#running">running text</a>
+ </li>
+ <li>MISC lines are set flush with the document&#8217;s left and bottom
+ margins, in the same family, font and point size as the
+ copyright line.
+ </li>
+</ul>
+
+<p>
+The defaults for the entirety of doc covers and covers, and all the
+elements thereon, can be changed with control macros whose defaults
+and arguments are identical to the corresponding
+<a href="docprocessing.html#index-docheader-control">Control macros for docheaders</a>
+(q.v.) The only difference is the name by which you invoke them. Wherever
+<kbd>DOCHEADER</kbd> is used for overall changes, replace it
+with <kbd>DOC_COVER</kbd> or <kbd>COVER</kbd>. For part-by-part
+changes, prepend <kbd>DOC_COVER_</kbd> or <kbd>COVER_</kbd> to the
+part/parameter.
+</p>
+
+<p>
+Thus, to change the overall family, color, leading, quad, and
+starting position of a doc cover, you&#8217;d do
+<br/>
+<span class="pre-in-pp">
+ .DOC_COVER_FAMILY H
+ .DOC_COVER_COLOR blue
+ .DOC_COVER_LEAD +2
+ .DOC_COVER_QUAD L
+ .DOC_COVER_ADVANCE 3i \" or .DOC_COVER_START_POS 3i
+</span>
+To change the style parameters for selected parts of a cover, you
+might do something like this:
+<br/>
+<span class="pre-in-pp">
+ .COVER_TITLE_FONT B
+ .COVER_TITLE_SIZE +4
+ .COVER_SUBTITLE_FONT I
+ .COVER_AUTHOR_FONT R
+ .COVER_AUTHOR_SPACE_BEFORE 6p
+ .COVER_DOCTYPE_COLOR red
+ .COVER_MISC_SIZE -1
+ .COVER_MISC_LEAD 12
+ .COVER_COPYRIGHT_SIZE -2
+ .COVER_COPYRIGHT_QUAD L
+ .COVER_MISC_QUAD R
+</span>
+Note in the above example that _COPYRIGHT_QUAD and _MISC_QUAD set
+both the horizontal position on the page and the quad direction,
+either L (or LEFT) or R (or RIGHT), and have no corresponding
+docheader control macro.
+</p>
+
+<div class="box-tip">
+<p class="tip-top">
+<span class="note">Tip:</span>
+As with the docheader control macros, <kbd>DOC_COVER_</kbd> and
+<kbd>COVER_</kbd> part/parameter style changes may be
+<a href="docprocessing.html#grouping">grouped</a>,
+for example
+<br/>
+<span class="pre-in-pp">
+ .DOC_COVER_TITLE_STYLE \
+ FAMILY A \
+ FONT B \
+ SIZE +4 \
+ CAPS
+</span>
+</p>
+</div>
+
+<!-- Navigation links -->
+<table style="width: 100%; margin-top: 12px;">
+<tr>
+ <td style="width: 33%;"><a href="toc.html">Back to Table of Contents</a></td>
+ <td style="width: 33%; text-align: center;"><a href="#top">Top</a></td>
+ <td style="width: 33%; text-align: right;"><a href="tables-of-contents.html">Next: Tables of contents</a></td>
+</tr>
+</table>
+
+</div>
+
+<div class="bottom-spacer"><br/></div>
+
+</body>
+</html>
diff --git a/contrib/mom/momdoc/definitions.html b/contrib/mom/momdoc/definitions.html
new file mode 100644
index 0000000..b85a089
--- /dev/null
+++ b/contrib/mom/momdoc/definitions.html
@@ -0,0 +1,995 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+This file is part of groff, the GNU roff type-setting system.
+
+Copyright (C) 2004-2020 Free Software Foundation, Inc.
+Written by Peter Schaffter (peter@schaffter.ca).
+
+Permission is granted to copy, distribute and/or modify this document
+under the terms of the GNU Free Documentation License, Version 1.3 or
+any later version published by the Free Software Foundation; with no
+Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
+Texts.
+
+A copy of the Free Documentation License is included as a file called
+FDL in the main directory of the groff source package.
+-->
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+<head>
+ <meta http-equiv="content-type" content="text/html;charset=utf-8"/>
+ <title>Mom -- Definitions and Terms</title>
+ <link rel="stylesheet" type="text/css" href="stylesheet.css" />
+</head>
+
+<body style="background-color: #f5faff;">
+
+<!-- ==================================================================== -->
+
+<div id="top" class="page">
+
+<!-- Navigation links -->
+<table style="width: 100%;">
+ <tr>
+ <td><a href="toc.html">Back to Table of Contents</a></td>
+ <td style="text-align: right;"><a href="using.html#top">Next: Using mom</a></td>
+ </tr>
+</table>
+
+<h1 id="terms" class="docs">Definitions of terms used in this manual</h1>
+
+<p>
+I use a number of typesetting-specific and groff-specific terms
+throughout this documentation, as well as a few terms that apply
+to mom herself. To make life easier, I&#8217;ll explain
+them here. Refer back to this section should you encounter a word
+or concept you&#8217;re not familiar with.
+</p>
+
+<div class="rule-short" style="margin-top: 18px; margin-bottom: 28px;"><hr/></div>
+
+<div class="col-1-definitions">
+ <table class="definitions">
+ <tr><th class="definitions">Typesetting terms</th></tr>
+ <tr>
+ <td>
+ <a href="#ascender">Ascender</a><br/>
+ <a href="#baseline">Baseline</a><br/>
+ <a href="#ballotbox">Ballot box</a><br/>
+ <a href="#bullet">Bullet</a><br/>
+ <a href="#capheight">Cap-height</a><br/>
+ <a href="#descender">Descender</a><br/>
+ <a href="#discretionaryhyphen">Discretionary hyphen</a><br/>
+ <a href="#dropcap">Drop cap</a><br/>
+ <a href="#em">Em/en</a><br/>
+ <a href="#family">Family</a><br/>
+ <a href="#figurespace">Figure space/Digit space</a><br/>
+ <a href="#fixedwidthfont">Fixed width font</a><br/>
+ <a href="#fixedwidthspace">Fixed width space</a><br/>
+ <a href="#font">Font</a><br/>
+ <a href="#force">Force justify</a><br/>
+ <a href="#just">Justify/justification</a><br/>
+ <a href="#gutter">Gutter</a><br/>
+ <a href="#kern">Kerning</a><br/>
+ <a href="#kernunit">Kern Units</a><br/>
+ <a href="#leading">Lead/leading</a><br/>
+ <a href="#leader">Leaders</a><br/>
+ <a href="#ligatures">Ligature</a><br/>
+ <a href="#picaspoints">Picas/Points</a><br/>
+ <a href="#ps">Point Size</a><br/>
+ <a href="#quad">Quad</a><br/>
+ <a href="#rag">Rag</a><br/>
+ <a href="#shape">Shape</a><br/>
+ <a href="#solid">Solid/set solid</a><br/>
+ <a href="#trackkerning">Track kerning/Line kerning</a><br/>
+ <a href="#unbreakablespace">Unbreakable space</a><br/>
+ <a href="#weight">Weight</a><br/>
+ <a href="#wordspace">Word space</a><br/>
+ <a href="#xheight">x-height</a><br/>
+ </td>
+ </tr>
+ </table>
+</div>
+
+<div class="col-2-definitions">
+ <table class="definitions">
+ <tr><th class="definitions">Groff terms</th></tr>
+ <tr>
+ <td>
+ <a href="#alias">Alias</a><br/>
+ <a href="#arguments">Arguments</a><br/>
+ <a href="#commentlines">Comment lines</a><br/>
+ <a href="#controllines">Control Lines</a><br/>
+ <a href="#filled">Filled lines</a><br/>
+ <a href="#inlines">Inline escapes</a><br/>
+ <a href="#inputline">Input line</a><br/>
+ <a href="#macros">Macros</a><br/>
+ <a href="#units">Machine units</a><br/>
+ <a href="#numericargument">Numeric argument</a><br/>
+ <a href="#outputline">Output line</a><br/>
+ <a href="#primitives">Primitives</a><br/>
+ <a href="#preprocessor">Pre-processor</a><br/>
+ <a href="#stringargument">String Argument</a><br/>
+ <a href="#unitofmeasure">Unit of measure</a><br/>
+ <a href="#zerowidthcharacter">Zero-width character</a><br/>
+ </td>
+ </tr>
+ </table>
+</div>
+
+<div class="col-3-definitions">
+ <table class="definitions">
+ <tr><th class="definitions">Mom terms</th></tr>
+ <tr>
+ <td>
+ <a href="#baseline-grid">Baseline grid</a><br/>
+ <a href="#blockquote">Blockquote</a><br/>
+ <a href="#controlmacro">Control macro</a><br/>
+ <a href="#docheader">Docheader</a><br/>
+ <a href="#epigraph">Epigraph</a><br/>
+ <a href="#float">Float</a><br/>
+ <a href="#footer">Footer</a><br/>
+ <a href="#head">Head</a><br/>
+ <a href="#header">Header</a><br/>
+ <a href="#linebreak">Linebreak</a><br/>
+ <a href="#parahead">Paragraph head</a><br/>
+ <a href="#pdflink">PDF link</a><br/>
+ <a href="#pdfoutline">PDF outline</a><br/>
+ <a href="#quote">Quote</a><br/>
+ <a href="#running">Running text</a><br/>
+ <a href="#toggle">Toggle</a><br/>
+ </td>
+ </tr>
+ </table>
+</div>
+
+<h3 id="typesetting-terms" class="docs">Typesetting terms</h3>
+<dl>
+ <dt id="ascender">Ascender</dt>
+ <dd>
+ The portion of a letter that extends above the bowl. For
+ example, the letters a, c, and e have no ascenders. The letters
+ b, d, and h do.
+ </dd>
+
+ <dt id="baseline">Baseline</dt>
+ <dd>
+ The imaginary line on which the bottoms of capital letters and
+ the bowls of lower case letters rest.
+ </dd>
+
+ <dt id="ballotbox">Ballot box</dt>
+ <dd>
+ An unfilled square, usually
+ <a href="#capheight">cap-height</a>
+ in size, typically placed beside items in a checklist.
+ </dd>
+
+ <dt id="bullet">Bullet</dt>
+ <dd>
+ A small, filled circle typically found beside items or points in
+ a list.
+ </dd>
+
+ <dt id="capheight">Cap-height</dt>
+ <dd>
+ The height of the tallest capital letter in a given
+ <a href="#font">font</a>
+ at the current
+ <a href="#ps">point size</a>.
+ </dd>
+
+ <dt id="descender">Descender</dt>
+ <dd>
+ The portion of a letter that extends beneath the
+ <a href="#baseline">baseline</a>
+ (j, q, y are letters with descenders).
+ </dd>
+
+ <dt id="discretionaryhyphen">Discretionary hyphen</dt>
+ <dd>
+ A symbol inserted between two syllables of a word that indicates
+ to a typesetting program the valid hyphenation points in the
+ word. Normally, if hyphenation is turned on, groff knows where
+ to hyphenate words. However, hyphenation being what it is
+ (in English, at any rate), groff doesn&#8217;t always get it right.
+ Discretionary hyphens make sure it does. In the event that the
+ word doesn&#8217;t need to be hyphenated at all, groff leaves them
+ alone. In groff, the discretionary hyphen is entered with
+ <kbd>\%</kbd> (i.e. a backslash followed by the percent sign).
+ </dd>
+
+ <dt id="dropcap">Drop cap</dt>
+ <dd>
+ A large, usually upper-case letter that introduces the first
+ paragraph of a document or section thereof. The top of the
+ drop cap usually lines up with the top of the first line of the
+ paragraph, and typically &#8220;drops&#8221; several lines lower.
+ Text adjacent to the drop cap is indented to the right of the
+ letter until the bottom of the drop cap is reached, at which
+ point text reverts to the left margin.
+ </dd>
+
+ <dt id="em">Em/en</dt>
+ <dd>
+ An em is a relative measurement equal to the width of the
+ letter M at a given
+ <a href="#ps">point size</a>
+ in a given
+ <a href="#font">font</a>.
+ Since most Ms are designed square, an em is usually (but
+ sometimes erroneously) considered to be the same size as the
+ current point size (i.e., if the point size of the type is 12,
+ one em equals 12 points). An en is equal to the width of a
+ letter N (historically 2/3 of an em, although groff treats an en
+ as 1/2 of an em). Typically, ems and ens are used to measure
+ indents, or to define the length of dashes (long hyphens).
+ </dd>
+
+ <dt id="family">Family</dt>
+ <dd>
+ The collective name by which a collection of
+ <a href="#font">fonts</a>
+ are known, e.g. Helvetica, Times Roman, Garamond.
+ </dd>
+
+ <dt id="figurespace">Figure space/Digit space</dt>
+ <dd>
+ A
+ <a href="#fixedwidthspace">fixed width space</a>
+ that has the width of one digit. Used for aligning numerals in,
+ say, columns or numbered lists. In groff, the figure space is
+ entered with <kbd>\0</kbd> (i.e. a backslash followed by a zero)
+ </dd>
+
+ <dt id="fixedwidthfont">Fixed-width font</dt>
+ <dd>
+ A family or font in which every character occupies exactly the
+ same amount of horizontal space on the line. Courier is the
+ best-known, if not the most elegant, fixed-width font.
+ </dd>
+
+ <dt id="fixedwidthspace">Fixed width space</dt>
+ <dd>
+ Equal to
+ <a href="#wordspace">word space</a>,
+ but does not expand or contract when text is
+ <a href="#just">justified</a>.
+ In groff, fixed width space is entered with
+ <kbd>\&lt;space&gt;</kbd> (i.e. a backslash followed by a space)
+ </dd>
+
+ <dt id="font">Font</dt>
+ <dd>
+ The specific
+ <a href="#weight">weight</a>
+ and
+ <a href="#shape">shape</a>
+ of type within a
+ <a href="#family">family</a>,
+ e.g. light, medium, bold (which are weights), and roman, italic,
+ condensed (which are shapes). By default, groff knows of four
+ fonts within its default set of families: R (medium roman), I
+ (medium italic), B (bold roman) and BI (bold italic).
+ Mom considerably extends this very basic list.
+ </dd>
+
+ <dt id="force">Force justify</dt>
+ <dd>
+ Sometimes, in
+ <a href="#just">justified</a>
+ text, a line needs to be broken short of the right margin.
+ Force justifying means telling a typesetting program (like
+ groff) that you want the line broken early AND that you want the
+ line&#8217;s word spacing stretched to force the line flush with the
+ right margin.
+ </dd>
+
+ <dt id="gutter">Gutter</dt>
+ <dd>
+ The vertical whitespace separating columns of type.
+ </dd>
+
+ <dt id="just">Justify/justification</dt>
+ <dd>
+ Lines of type are justified when they&#8217;re flush at both the left
+ and right margins. Justification is the act of making both
+ margins flush. Some people use the terms "left justified" and
+ "right justified" to mean type where only the left (or right)
+ margins align. I don&#8217;t. See
+ <a href="#quad">quad</a>.
+ </dd>
+
+ <dt id="kern">Kerning</dt>
+ <dd>
+ Moving pairs of letters closer together to remove excess
+ whitespace between them. In the days before phototypesetting,
+ type was set from small, rectangular blocks of wood or metal,
+ each block having exactly one letter. Because the edge of
+ each block determined the edge of each letter, certain letter
+ combinations (TA, for example) didn&#8217;t fit together well and had
+ to be mortised by hand to bring them visually closer. Modern
+ typesetting systems usually take care of kerning automatically,
+ but they&#8217;re far from perfect. Professional typesetters still
+ devote a lot of time to fitting letters and punctuation together
+ properly.
+ </dd>
+
+ <dt id="kernunit">Kern Units</dt>
+ <dd>
+ A relative distance, which, by default, is equal to 1/36 of the
+ current
+ <a href="#ps">point size</a>.
+ Used between individual letters for
+ <a href="#kern">kerning</a>.
+ Different typesetting systems use different values (1/54 is
+ popular), and sometimes call kern units by a different name.
+ It is possible to change the default size of the kern unit with the
+ <a href="inlines.html#kernunit">KERN_UNIT</a>
+ macro.
+ </dd>
+
+ <dt id="leading">Lead/leading</dt>
+ <dd>
+ The distance from the
+ <a href="#baseline">baseline</a>
+ of one line of type to the line of type immediately beneath
+ it. Pronounced "ledding." Also called line spacing. Usually
+ measured in
+ <a href="#picaspoints">points</a>.
+
+ <p>
+ <em>In case you&#8217;re interested...</em> In previous centuries,
+ lines of type were separated by thin strips of&mdash;you guessed
+ it&mdash;lead. Lines of type that had no lead between them were said
+ to be &#8220;set solid.&#8221; Once you began separating them with
+ strips of lead, they were said to be &#8220;leaded&#8221;, and the
+ spacing was expressed in terms of the number of
+ <a href="#picaspoints">points</a>
+ of lead. For this reason, &#8220;leading&#8221; and &#8220;line
+ spacing&#8221; aren&#8217;t, historically speaking, synonymous.
+ If type was set 10 on 12, for example, the leading was 2
+ points, not 12. Nowadays, however, the two terms are used
+ interchangeably to mean the distance from baseline to baseline.
+ </p>
+
+ </dd>
+
+ <dt id="leader">Leaders</dt>
+ <dd>
+ Single characters used to fill lines, usually to their end. So
+ called because they &#8220;lead&#8221; the eye from one element
+ of the page to another. For example, in the following (brief)
+ Table of Contents, the periods (dots) are leaders.
+
+ <span class="pre" style="margin-bottom: -2em;">
+ Foreword............... 2
+ Chapter 1.............. 5
+ Chapter 2.............. 38
+ Chapter 3.............. 60
+ </span>
+ </dd>
+
+ <dt id="ligatures">Ligature</dt>
+ <dd>
+ Ligatures are letters joined together to form a single
+ character. The commonest are fi, fl, ff, ffi and ffl. Others
+ are ae and oe. Occasionally, one sees an st ligature, but this
+ is archaic and quite rare.
+ </dd>
+
+ <dt id="picaspoints">Picas/Points</dt>
+ <dd>
+ There are twelve points in a pica, and six picas in an inch
+ (hence 72 points to the inch). In the same way that gem-dealers
+ have always used their own system of measurement for weight
+ (carats), typographers have always used their own system of
+ measurement for type.
+ </dd>
+
+ <dt id="ps">Point Size</dt>
+ <dd>
+ The nominal size of type, measured in
+ <a href="#picaspoints">points</a>
+ from the bottom of the longest
+ <a href="#descender">descender</a>
+ to the top of the highest
+ <a href="#ascender">ascender</a>.
+ In reality, type is always fractionally smaller than its point
+ size.
+ </dd>
+
+ <dt id="quad">Quad</dt>
+ <dd>
+ When only one margin of type is flush, lines of type are quadded
+ in the direction of the flush margin. Therefore, quad left
+ means the left margin is flush, the right isn&#8217;t. Quad right
+ means the right margin is flush, the left isn&#8217;t. Quad centre
+ means neither the left nor the right margin is flush; rather,
+ lines of type are quadded on both sides so that type appears
+ centred on the page.
+ </dd>
+
+ <dt id="rag">Rag</dt>
+ <dd>
+ Describes a margin that isn&#8217;t flush. Rag right means the right
+ margin isn&#8217;t flush. Rag left means the left margin isn&#8217;t flush.
+ The expression "flush left/rag right" is sometimes used to
+ describe type that is
+ <a href="#quad">quadded</a>
+ left.
+ </dd>
+
+ <dt id="shape">Shape</dt>
+ <dd>
+ The degree of slant and/or the width of characters.
+ (Technically speaking, this is not a proper typesetting term;
+ however, it may help clarify some concepts presented in these
+ documents.)
+
+ <p>
+ Some typical shapes are:
+ </p>
+
+ <ul style="margin-top: -.5em; margin-bottom: -.5em">
+ <li>Roman, which has no slant, and has letterforms of
+ average width</li>
+ <li>Italic, which is slanted, and has letterforms
+ of average width</li>
+ <li>Condensed, which has no slant, but has
+ letterforms narrower than the average represented by Roman</li>
+ <li>Condensed Italic, which is slanted, with letterforms narrower
+ than average</li>
+ </ul>
+
+ <p>
+ The term
+ <a href="#font">font</a>,
+ as it is used in these documents, refers to a combination of
+ <a href="#weight">weight</a>
+ and shape.
+ </p>
+
+ </dd>
+
+ <dt id="solid">Solid/set solid</dt>
+ <dd>
+ When no
+ <a href="#leading">lead</a>
+ is added between lines of type (i.e., the
+ <a href="#ps">point size</a>
+ and linespacing are the same), the lines are said to be &#8220;set
+ solid.&#8221;
+ </dd>
+
+ <dt id="trackkerning">Track kerning/Line kerning</dt>
+ <dd>
+ Sometimes, it&#8217;s advantageous to increase or decrease the amount
+ of space between every letter in a line by an equal (usually
+ small) amount, in order to fit more (or fewer) characters on the
+ line. The correct term is letter spacing, but track kerning and
+ line kerning (and sometimes, just "kerning") have come to mean
+ the same thing.
+ </dd>
+
+ <dt id="unbreakablespace">Unbreakable space</dt>
+ <dd>
+ Equal to
+ <a href="#wordspace">word space</a>,
+ however words separated by an unbreakable space will always be
+ kept together on the same line. Expands and contracts like word
+ space. Useful for proper names, which one should, whenever
+ possible, avoid splitting onto two lines. In groff, unbreakable
+ space is entered with <kbd>\~</kbd> (i.e. a backslash followed by a
+ tilde)
+ </dd>
+
+ <dt id="weight">Weight</dt>
+ <dd>
+ The thickness of the strokes of letterforms. Medium and Book
+ have average thicknesses and are the weights used for most
+ of the text in books, magazines, newspapers, etc. Light has
+ strokes slightly thinner than Medium or Book, but is still
+ acceptable for most text. Semibold, Bold, Heavy and Black all
+ have strokes of increasing thickness, making them suitable for
+ headings and the like.
+ </dd>
+
+ <dt id="wordspace">Word space</dt>
+ <dd>
+ The amount of whitespace between words. When text is
+ <a href="#just">justified</a>,
+ word space expands or contracts to make the margins flush.
+ </dd>
+
+ <dt id="xheight">x-height</dt>
+ <dd>
+ The height of a lower case letter x in a given font at a given
+ point size. Generally used to mean the average height of the
+ bowl of lower case letters.
+ </dd>
+</dl>
+
+<h3 id="groff-terms" class="docs">Groff terms</h3>
+
+<dl>
+ <dt id="alias">Alias</dt>
+ <dd>
+ A
+ <a href="#macros">macro</a>
+ invoked by a name different from its &#8220;official&#8221;
+ name. For example, the official name of the macro to change
+ <a href="#family">family</a>
+ is <kbd>FAMILY</kbd>. Its alias is <kbd>FAM</kbd>.
+ Aliases may be created for any macro (via the
+ <a href="goodies.html#alias"><kbd>ALIAS</kbd></a>
+ macro) provided the alias uses a name not already taken by the
+ mom macros or one of the groff
+ <a href="#primitives">primitives</a>.
+ For a complete list of words or names you must not use, see the
+ <a href="reserved.html#reserved">list of reserved words</a>.
+ </dd>
+
+ <dt id="arguments">Arguments</dt>
+ <dd>
+ Parameters or information needed by a
+ <a href="#macros">macro</a>
+ to do its job. For example, in the macro
+
+ <span class="pre" style="margin-bottom: -2em;">
+ .PT_SIZE 12
+ </span>
+
+ <kbd>12</kbd> is the argument. In the macro
+
+ <span class="pre" style="margin-bottom: -2em;">
+ .QUAD LEFT
+ </span>
+
+ <kbd>LEFT</kbd> is the argument. Arguments are separated from
+ macros by spaces. Some macros require several arguments; each
+ is separated by a space.
+ </dd>
+
+ <dt id="commentlines">Comment Lines</dt>
+ <dd>
+ <a href="#inputline">Input lines</a>
+ introduced with the comment character <kbd>\#</kbd> (i.e. a
+ backslash followed by the pound sign). When processing output,
+ groff silently ignores everything on a line that begins with the
+ comment character.
+ </dd>
+
+ <dt id="controllines">Control Lines</dt>
+ <dd>
+ Instructions to groff that appear on a line by themselves, which
+ means that &#8220;control lines&#8221; are either
+ <a href="#macros">macros</a>
+ or groff
+ <a href="#primitives">primitives</a>.
+ Control lines begin with a period or, occasionally, an apostrophe.
+ </dd>
+
+ <dt id="filled">Filled lines/fill mode</dt>
+ <dd>
+ Automatic
+ <a href="#just">justification</a>
+ or
+ <a href="#quad">quadding</a>.
+ In fill mode, the ends of lines as they appear in your text
+ editor are ignored. Instead, words from adjoining
+ <a href="#inputline">input lines</a>
+ are added one at a time to the output line until no more words
+ fit. Then, depending whether text is to be
+ <a href="#just">justified</a>
+ or
+ <a href="#quad">quadded</a>
+ (left, right, or centre), and depending on whether automatic
+ hyphenation is turned on, groff attempts to hyphenate the last
+ word, or, barring that, spreads and breaks the line (when
+ justification is turned on) or breaks and quads the line (when
+ quadding is turned on).
+
+ <p id="no-fill">
+ Nofill mode (non-filled text) means that groff respects the ends
+ of lines exactly as they appear in your text editor.
+ </p>
+
+ </dd>
+
+ <dt id="inlines">Inline escapes</dt>
+ <dd>
+ Instructions issued to groff that appear as part of an
+ <a href="#inputline">input line</a>
+ (as opposed to
+ <a href="#macros">macros</a>,
+ which must appear on a line by themselves). Inline escapes are
+ always introduced by the backslash character. For example,
+
+ <span class="pre" style="margin-bottom: -2em;">
+ A line of text with the word T\*[BU 2]oronto in it
+ </span>
+
+ contains the inline escape <kbd>\*[BU 2]</kbd> (which means
+ &#8220;move the letter &#8216;o&#8217; 2
+ <a href="#kernunit">kern units</a>
+ closer to the letter &#8216;T&#8217;&#8221;).
+
+ <p style="margin-bottom: -2em;">
+ Mom&#8217;s inline escapes always take the form
+ <kbd>\*[&lt;ESCAPE&gt;]</kbd>, where <kbd>ESCAPE</kbd> is
+ composed of capital letters, sometimes followed immediately by a
+ digit, sometimes followed by a space and a
+ <a href="#numericargument">numeric argument</a>.
+ Groff&#8217;s escapes begin with the backslash
+ character but typically have no star and are in lower case. For
+ example, the mom escapes to move forward 6
+ points on a line are either
+
+ <span class="pre" style="margin-bottom: -2em;">
+ \*[FP6]&nbsp;&nbsp;or&nbsp;&nbsp;\*[FWD 6p]
+ </span>
+
+ while the groff escape for the same thing is
+
+ <span class="pre" style="margin-bottom: -2em;">
+ \h&#8217;6p&#8217;
+ </span>
+ </p>
+
+ </dd>
+
+ <dt id="inputline" style="margin-top: -1em;">Input line</dt>
+ <dd>
+ A line of text as it appears in your text editor.
+ </dd>
+
+ <dt id="macros">Macros</dt>
+ <dd>
+ Instructions embedded in a document that determine how groff
+ processes the text for output. mom&#8217;s macros
+ always begin with a period, on a line by themselves, and must
+ be typed in capital letters. Typically, macros contain complex
+ commands issued to groff&mdash;behind the scenes&mdash;via
+ groff
+ <a href="#primitives">primitives</a>.
+ </dd>
+
+ <dt id="units">Machine units</dt>
+ <dd>
+ A machine unit is 1/1000 of a
+ <a href="#picaspoints">point</a>
+ when the groff device is ps. (&#8220;ps&#8221; means
+ &#8220;PostScript&#8221;&mdash;the default device for
+ which groff prepares output, and the device for which
+ mom was originally designed.)
+ </dd>
+
+ <dt id="numericargument">Numeric argument</dt>
+ <dd>
+ An
+ <a href="#arguments">argument</a>
+ that has the form of a digit. Numeric arguments can be built
+ out of arithmetic expressions using +, -, *, and / for plus,
+ minus, times, and divided-by respectively. If a numeric
+ argument requires a
+ <a href="#unitofmeasure">unit of measure</a>,
+ a unit of measure must be appended to <em>every</em> digit in
+ the argument. For example:
+
+ <span class="pre" style="margin-bottom: -2em;">
+ .ALD 1i-1v
+ </span>
+
+ <div class="box-important" style="margin-right: 2.5em;">
+ <p class="tip">
+ <span class="important">IMPORTANT:</span> groff does not
+ respect the order of operations, but rather evaluates
+ arithmetic expressions from left to right. Parentheses must
+ be used to circumvent this peculiarity. Not to worry, though.
+ The likelihood of more than just the occasional plus or minus
+ sign when using mom&#8217;s macros is slim.
+ </p>
+ </div>
+ </dd>
+
+ <dt id="outputline">Output line</dt>
+ <dd>
+ A line of text as it appears in output copy.
+ </dd>
+
+ <dt id="preprocessor">Pre-processor</dt>
+ <dd>
+ Pre-processors are used by groff to generate tables
+ (<strong>tbl</strong>), diagrams (<strong>pic</strong>), graphs
+ (<strong>grap</strong>), and equations (<strong>eqn</strong>).
+ These pre-processors are fully supported by mom. In addition,
+ the &#8220;refer&#8221; pre-processor is used to generate
+ bibliographies and lists of cited works. The PDF_IMAGE macro,
+ which allows insertion of graphics into a document, is not
+ strictly a pre-processor but behaves similarly to tbl, pic, and
+ eqn.
+ </dd>
+
+ <dt id="primitives">Primitives</dt>
+ <dd>
+ The lowercase instructions, introduced with a period, that groff
+ uses as its native command language, and out of which macros
+ are built. The majority of groff&#8217;s primitive requests are two
+ letters long.
+ </dd>
+
+ <dt id="stringargument">String Argument</dt>
+ <dd>
+ Technically, any
+ <a href="#arguments">argument</a>
+ that is not numeric. In this documentation, string argument
+ means an argument that requires the user to input text. For
+ example, in the
+ <a href="#macros">macro</a>
+
+ <span class="pre" style="margin-bottom: -2em;">
+ .TITLE "My Pulitzer Novel"
+ </span>
+
+ <kbd>"My Pulitzer Novel"</kbd> is a string argument.
+
+ <p>
+ Because string arguments must be enclosed by double-quotes, you
+ can&#8217;t use double-quotes as part of the string argument. If you
+ need double-quotes to be part of a string argument, use the
+ <a href="#inlines">inline escapes</a>
+ <kbd>\(lq</kbd> and <kbd>\(rq</kbd> (leftquote and
+ rightquote respectively) in place of the double-quote character
+ (<kbd>"</kbd>).
+ </p>
+
+ </dd>
+
+ <dt id="unitofmeasure">Unit of measure</dt>
+ <dd>
+ The single letter after a
+ <a href="#numericargument">numeric argument</a>
+ that tells mom what measurement scale the
+ argument should use. Common valid units are:
+
+ <span class="pre" style="margin-bottom: -2em;">
+ i (inches)
+ p (points)
+ P (Picas)
+ c (centimetres)
+ m (ems)
+ n (ens)
+ u (machine units)
+ v (the current leading [line space])
+ </span>
+
+ <p style="margin-top: -1em;">
+ Units of measure must come immediately after the numeric
+ argument (i.e. with no space between the argument and the unit
+ of measure), like this:
+
+ <span class="pre" style="margin-bottom: -2em;">
+ .ALD 2v
+ .LL 39P
+ .IL 1i
+ </span>
+
+ The above example advances 2 line spaces and sets the line
+ length to 39 picas with a left indent of 1 inch.
+ </p>
+
+ <div class="box-important" style="margin-right: 2.5em;">
+ <p class="tip">
+ <span class="important">IMPORTANT:</span>
+ Most mom macros that set the size or measure of something must
+ be given a unit of measure since most of the macros do not have
+ default units of measure. There are a couple of exceptions,
+ the most notable of which are <kbd>PT_SIZE</kbd> and
+ <kbd class="bold">LS</kbd>. Both use
+ <a href="#picaspoints">points</a>
+ as the default unit of measure, which means you don&#8217;t have to
+ append &#8220;p&#8221; to their argument.
+ </p>
+ </div>
+
+ <p>
+ You can enter decimal values for any unit of measure. Different
+ units may be combined by adding them together (e.g. 1.5i+2m,
+ which gives a measure of 1-1/2 inches plus 2 ems).
+ </p>
+
+ <div class="box-tip" style="margin-right: 2.5em;">
+ <p class="tip">
+ <span class="note">Note:</span>
+ a pica is composed of 12 points, therefore 12.5 picas is 12
+ picas and 6 points, not 12 picas and 5 points. If you want 12
+ picas and 5 points, you have to enter the measure as 12P+5p.
+ </p>
+ </div>
+
+ </dd>
+
+ <dt id="zerowidthcharacter">Zero-width character</dt>
+ <dd>
+ The
+ <a href="#inlines">inline escape</a>
+ that allows you to print a literal period, apostrophe and, if
+ <a href="#outputline">output lines</a>
+ are
+ <a href="#filled">filled</a>,
+ a space that falls at the beginning of an
+ <a href="#inputline">input line</a>.
+ It looks like this:
+
+ <span class="pre" style="margin-bottom: -2em;">
+ \&amp; <span style="font-family: arial, sans-serif; font-weight: normal">(i.e. a backslash followed by an ampersand)</span>
+ </span>
+
+ Normally, groff interprets a period (or an apostrophe) at the
+ beginning of an input line as meaning that what follows is a
+ <a href="#controllines">control line</a>.
+ In fill modes, groff treats a space at the beginning of an input
+ line as meaning &#8220;start a new line and put a space at the
+ beginning of it.&#8221; If you want groff to interpret periods
+ and apostrophes at the beginning of input lines literally (i.e.
+ to print them), or spaces at the beginning of input lines as just
+ garden variety word spaces, you must start the line with the
+ zero-width character.
+ </dd>
+</dl>
+
+<h3 id="mom-terms" class="docs">Mom terms</h3>
+<dl>
+ <dt id="baseline-grid">Baseline grid</dt>
+ <dd>
+ Virtual guide lines spaced according to the
+ <a href="#leading">leading</a>
+ established for running text. Adherence to the grid ensures that
+ text fills the page completely to the bottom margin. Uncorrected
+ deviations from the grid result in bottom margins that fall short.
+ </dd>
+
+ <dt id="controlmacro">Control macro</dt>
+ <dd>
+ Macros used in
+ <a href="docprocessing.html#docprocessing">document processing</a>
+ to control/alter the appearance of document elements (e.g.
+ headings, quotes, footnotes,
+ <a href="#header">headers</a>,
+ etc.).
+ </dd>
+
+ <dt id="docheader">Document header/docheader</dt>
+ <dd>
+ Document information (title, subtitle, author, etc) output at
+ the top of page one.
+ </dd>
+
+ <dt id="epigraph">Epigraph</dt>
+ <dd>
+ A short, usually cited passage that appears at the beginning of
+ a chapter, story, or other document.
+ </dd>
+
+ <dt id="float">Float</dt>
+ <dd>
+ A float is material intended to be kept together as a block.
+ Floated material that fits on a page in position is output on that
+ page. Floats that do not fit in position are deferred to the top
+ of the next page.
+ </dd>
+
+ <dt id="footer">Footer/page footer</dt>
+ <dd>
+ Document information (frequently author and title) output in
+ the bottom margin of pages after page one. Not to be
+ confused with footnotes, which are considered part of
+ <a href="#running">running text</a>.
+ </dd>
+
+ <dt id="head">Heading</dt>
+ <dd>
+ The title used to identify a section of a document. Headings
+ are hierarchic, corresponding to the notion of head, subhead,
+ subsubhead, etc.
+ </dd>
+
+ <dt id="header">Header/page header</dt>
+ <dd>
+ Document information (frequently author and title) output in the
+ top margin of pages after page one.
+
+ <div class="box-tip" style="margin-right: 2.5em;">
+ <p class="tip">
+ <span class="note">Note:</span> In terms of content and style,
+ headers and
+ <a href="#footer">footers</a>
+ are the same; they differ only in their placement on the page.
+ In most places in this documentation, references to the content
+ or style of headers applies equally to footers.
+ </p>
+ </div>
+
+ </dd>
+
+ <dt id="linebreak">Linebreak/author linebreak</dt>
+ <dd>
+ A gap in the vertical flow of
+ <a href="#running">running text</a>,
+ frequently set off by typographic symbols such as asterisks or
+ daggers. Used to indicate a shift in the content of a document
+ (e.g. a scene change in a short story). Also commonly called a
+ scene break or a section break.
+ </dd>
+
+ <dt id="parahead">Paragraph head</dt>
+ <dd>
+ A heading joined to the body of a paragraph.
+ </dd>
+
+ <dt id="pdflink">PDF link</dt>
+ <dd>
+ A portion of text that, when clicked on in a PDF viewer,
+ navigates to a bookmarked location in a document, generally but not
+ exclusively a heading. PDF links are usually coloured to make
+ them stand out from the surrounding text.
+ </dd>
+
+ <dt id="pdfoutline">PDF outline</dt>
+ <dd>
+ The hierarchically-arranged navigation outline provided by most PDF
+ viewers (e.g. Okular, Evince), typically in a panel to the left of
+ the document window, and usually labelled &#8220;Contents&#8221;.
+ </dd>
+
+ <dt id="quote">Quote</dt>
+ <dd>
+ A quote, to mom, is a line-for-line setting
+ of quoted material (e.g. poetry, song lyrics, or a snippet of
+ programming code). You don&#8217;t have to use
+ <a href="typesetting.html#br"><kbd>BR</kbd></a>
+ with quotes.
+ </dd>
+
+ <dt id="running">Running text</dt>
+ <dd>
+ In a document formatted with mom, running
+ text means text that forms the body of the document, including
+ elements such as headings.
+ <a href="#docheader">Docheaders</a>,
+ <a href="#header">headers</a>,
+ <a href="#footer">footers</a>
+ and page numbers are not part of running text.
+ </dd>
+
+ <dt id="toggle">Toggle</dt>
+ <dd>
+ A macro or tag that, when invoked without an argument, begins
+ something or turns a feature on, and, when invoked with ANY
+ argument, ends something or turns a feature off. See
+ <a href="intro.html#toggle-example">Example 3</a>
+ of the section
+ <a href="intro.html#macro-args">How to read macro arguments</a>.
+ </dd>
+</dl>
+
+<div class="rule-long"><hr/></div>
+
+<!-- Navigation links -->
+<table style="width: 100%;">
+ <tr>
+ <td style="width: 33%;"><a href="toc.html">Back to Table of Contents</a></td>
+ <td style="width: 33%; text-align: center;"><a href="#top">Top</a></td>
+ <td style="width: 33%; text-align: right;"><a href="using.html#top">Next: Using mom</a></td>
+</tr>
+</table>
+
+</div>
+
+<div class="bottom-spacer"><br/></div>
+
+</body>
+</html>
diff --git a/contrib/mom/momdoc/docelement.html b/contrib/mom/momdoc/docelement.html
new file mode 100644
index 0000000..43f79d4
--- /dev/null
+++ b/contrib/mom/momdoc/docelement.html
@@ -0,0 +1,6639 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+This file is part of groff, the GNU roff type-setting system.
+
+Copyright (C) 2004-2020 Free Software Foundation, Inc.
+Written by Peter Schaffter (peter@schaffter.ca).
+
+Permission is granted to copy, distribute and/or modify this document
+under the terms of the GNU Free Documentation License, Version 1.3 or
+any later version published by the Free Software Foundation; with no
+Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
+Texts.
+
+A copy of the Free Documentation License is included as a file called
+FDL in the main directory of the groff source package.
+-->
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+<head>
+ <meta http-equiv="content-type" content="text/html;charset=utf-8"/>
+ <title>Mom -- Document processing, element tags</title>
+ <link rel="stylesheet" type="text/css" href="stylesheet.css" />
+</head>
+
+<body style="background-color: #f5faff;">
+
+<!-- ==================================================================== -->
+
+<div id="top" class="page">
+
+<!-- Navigation links -->
+<table style="width: 100%;">
+<tr>
+ <td><a href="toc.html">Back to Table of Contents</a></td>
+ <td style="text-align: right;"><a href="images.html#top">Next: Graphics, floats, preprocessor support</a></td>
+</tr>
+</table>
+
+<h1 class="docs">The document element tags</h1>
+
+<div style="width: 460px; margin: auto;">
+<ul class="no-enumerator">
+ <li><a href="#docelement-intro">Introduction to the document element tags</a></li>
+ <li><a href="#docelement-control">Control macros &ndash; changing the tag defaults</a>
+ <ul style="margin-left: -.5em; list-style-type: disc;">
+ <li><a href="#control-macro-args">Arguments to the control macros</a>
+ <ul style="margin-left: -.5em; list-style-type: circle;">
+ <li><a href="#family-and-font">family and font</a></li>
+ <li><a href="#point-size">point size</a></li>
+ <li><a href="#color">colour</a></li>
+ <li><a href="#quad">quad/justification</a></li>
+ <li><a href="#underline">underline style, rule weight</a></li>
+ </ul></li>
+ <li><a href="#grouping">Grouping control macros</a></li>
+ </ul></li>
+</ul>
+</div>
+
+<div class="rule-medium"><hr/></div>
+
+<h2 id="toc-doc-element" class="docs" style="text-align: center;">Document element tags table of contents</h2>
+
+<div id="docelement-mini-toc" style="font-size: 100%; line-height: 150%; margin-top: .5em;">
+<div class="mini-toc-col-1" style="margin-left: 0;">
+<h3 class="toc toc-docproc-header" style="margin-top: 1em;"><a class="header-link" href="#epigraph-intro">Epigraphs</a></h3>
+<ul class="toc-docproc" style="margin-top: .5em;">
+ <li><a href="#epigraph">EPIGRAPH</a></li>
+ <li><a href="#epigraph-control">Epigraph control</a></li>
+</ul>
+<h3 class="toc toc-docproc-header"><a class="header-link" href="#pp-intro">Paragraphs</a></h3>
+<ul class="toc-docproc" style="margin-top: .5em;">
+ <li><a href="#pp">PP</a></li>
+ <li><a href="#pp-control">Paragraph control</a></li>
+</ul>
+<h3 class="toc toc-docproc-header"><a class="header-link" href="#heading-intro">Headings</a></h3>
+<ul class="toc-docproc" style="margin-top: .5em;">
+ <li><a href="#heading">HEADING</a></li>
+ <li><a href="#heading-control">Heading control</a></li>
+ <li><a href="#oldstyle-headings-intro">Oldstyle headings</a></li>
+</ul>
+<h3 class="toc toc-docproc-header"><a class="header-link" href="#linebreak-intro">Linebreaks (section breaks)</a></h3>
+<ul class="toc-docproc" style="margin-top: .5em;">
+ <li><a href="#linebreak">LINEBREAK</a></li>
+ <li><a href="#linebreak-control">Linebreak control</a></li>
+</ul>
+<h3 class="toc toc-docproc-header"><a class="header-link" href="#quote-intro">Quotes (line for line; poetry or code)</a></h3>
+<ul class="toc-docproc" style="margin-top: .5em;">
+ <li><a href="#quote">QUOTE</a></li>
+ <li><a href="#quote-control">Quote control</a></li>
+</ul>
+<h3 class="toc toc-docproc-header"><a class="header-link" href="#blockquote-intro">Blockquotes (cited material)</a></h3>
+<ul class="toc-docproc" style="margin-top: .5em;">
+ <li><a href="#blockquote">BLOCKQUOTE</a></li>
+ <li><a href="#blockquote-control">Blockquote control</a></li>
+</ul>
+<h3 class="toc toc-docproc-header"><a class="header-link" href="#code-intro">Inserting code snippets</a></h3>
+<ul class="toc-docproc" style="margin-top: .5em;">
+ <li><a href="#code">CODE</a></li>
+ <li><a href="#code-control">Code control</a></li>
+</ul>
+</div>
+<div class="mini-toc-col-2" style="margin-top: 1.5em;">
+<h3 class="toc toc-docproc-header"><a class="header-link" href="#list-intro">Nested lists</a></h3>
+<ul class="toc-docproc" style="margin-top: .5em;">
+ <li><a href="#list">LIST</a></li>
+ <li><a href="#item">ITEM</a></li>
+ <li><a href="#list-control">List control</a></li>
+</ul>
+<h3 class="toc toc-docproc-header"><a class="header-link" href="#number-lines-intro">Line numbering</a></h3>
+<ul class="toc-docproc" style="margin-top: .5em;">
+ <li><a href="#number-lines">NUMBER_LINES</a></li>
+ <li><a href="#number-lines-control">Line numbering control</a></li>
+</ul>
+<h3 class="toc toc-docproc-header"><a class="header-link" href="#footnote-intro">Footnotes</a></h3>
+<ul class="toc-docproc" style="margin-top: .5em;">
+ <li><a href="#footnote">FOOTNOTE</a></li>
+ <li><a href="#footnote-control">Footnote control</a></li>
+</ul>
+<h3 class="toc toc-docproc-header"><a class="header-link" href="#endnote-intro">Endnotes</a></h3>
+<ul class="toc-docproc" style="margin-top: .5em;">
+ <li><a href="#endnote">ENDNOTE</a></li>
+ <li><a href="#endnote-control">Endnote control</a></li>
+</ul>
+<h3 class="toc toc-docproc-header"><a class="header-link" href="#margin-notes-intro">Margin notes</a></h3>
+<ul class="toc-docproc" style="margin-top: .5em;">
+ <li><a href="#mn-init">MN_INIT (set margin notes parameters)</a></li>
+ <li><a href="#mn">MN</a></li>
+</ul>
+<h3 class="toc toc-docproc-header"><a class="header-link" href="#finis-intro">Document termination string</a></h3>
+<ul class="toc-docproc" style="margin-top: .5em;">
+ <li><a href="#finis">FINIS</a></li>
+ <li><a href="#finis-control">Finis control</a></li>
+</ul>
+</div>
+</div>
+
+<div class="rule-medium" style="clear: both;"><hr/></div>
+
+<h2 id="docelement-intro" class="docs">Introduction to the document element tags</h2>
+
+<p>
+Once you&#8217;ve completed the setup for a document (see
+<a href="docprocessing.html#docprocessing-tut">Setting up a mom document</a>),
+formatting it is a snap. Simply invoke the appropriate tag for
+each document element as you need it. The tags are macros that
+tell mom: &#8220;This is a paragraph; this is a heading; this is a
+footnote,&#8221; and so on.
+</p>
+
+<p>
+Generally, for each tag, there are
+<a href="definitions.html#controlmacro">control macros</a>
+for the tag&#8217;s family, font and point size. Where appropriate,
+there are macros to control leading, indents, quad and special
+features as well.
+Mom has tasteful defaults for all the tags, hence you only use the
+control macros when you want to change the way she does things.
+This is usually done prior to
+<a href="docprocessing.html#start">START</a>,
+but can, in fact, be done at any time in the course of a document.
+Any change to a tag&#8217;s style affects all subsequent invocations
+of the tag.
+</p>
+
+<h2 id="docelement-control" class="docs">Control macros &ndash; changing the tag defaults</h2>
+
+<p>
+The control macros for document processing tags let you design the
+look of all the parts of your documents&mdash;should you wish. At
+a bare minimum, all tags have macros to change mom&#8217;s defaults
+for family, font, point size and colour. Where appropriate, there
+are macros to control leading, indents and quad as well.
+</p>
+
+<p>
+In addition, many tags have special macros to control features that
+are pertinent to those tags alone. Have a look at the section
+dealing with any particular tag to find out what macros control the
+tag, and what mom&#8217;s defaults for the tag are.
+</p>
+
+<p>
+The control macros may be used at any time during the course of a
+document (i.e. before or after
+<a href="docprocessing.html#start">START</a>).
+The changes you make alter all subsequent invocations of the
+affected tag until you make another change, either by passing new
+arguments to the tag&#8217;s control macro, or toggling a particular
+feature of the tag on or off.
+</p>
+
+<p>
+And don&#8217;t forget: the
+<a href="typesetting.html#macros-typesetting">typesetting macros</a>
+can be used at any time, including inside
+<a href="definitions.html#toggle">toggle</a>
+tags (affecting only that particular invocation of the tag).
+Equally,
+<a href="definitions.html#inlines">inline escapes</a>
+can be used in tags that take
+<a href="definitions.html#stringargument">string arguments.</a>
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="tip">Tip:</span>
+Get familiar with mom at her default settings before exploring the
+control macros. Put her through her paces. See how she behaves.
+Get to know what she feels like and how she looks, both in your
+text editor and on the printed page. Then, if you don&#8217;t like
+something, use this documentation to find the precise macro you need
+to change it. There are tons of control macros. Reading up on them
+and trying to remember them all might lead you to think that mom is
+complex and unwieldy, which is not only untrue, but would offend her
+mightily.
+</p>
+</div>
+
+<div class="box-important">
+<p class="tip-top">
+<span class="important">Important:</span>
+The family, font, point size, colour and leading control macros have
+no effect in
+<a href="docprocessing.html#printstyle">PRINTSTYLE <kbd>TYPEWRITE</kbd></a>,
+except where noted throughout this documentation.
+</p>
+
+<p class="tip-bottom">
+Please also note that the defaults listed with the control macros
+apply only to
+<a href="docprocessing.html#printstyle">PRINTSTYLE <kbd>TYPESET</kbd></a>
+unless a default for <kbd>TYPEWRITE</kbd> is also given.
+</p>
+</div>
+
+<h3 id="control-macro-args" class="docs">Arguments to the control macros</h3>
+
+<h4 id="family-and-font" class="docs" style="margin-top: 1em; margin-bottom: -.75em;">Family and font</h4>
+
+<p>
+The arguments to the control macros that end in _FAMILY or _FONT are
+the same as for
+<a href="typesetting.html#family">FAMILY</a>
+and
+<a href="typesetting.html#font">FT</a>.
+</p>
+
+<h4 id="point-size" class="docs" style="margin-top: -.5em; margin-bottom: -.75em;">Point size</h4>
+
+<p>
+Control macros that end in _SIZE always take
+the form <kbd>+&lt;n&gt;</kbd> or <kbd>-&lt;n&gt;</kbd> where
+&lt;n&gt; is the number of
+<a href="definitions.html#picaspoints">points</a>
+larger (+) or smaller (-) than the point size of paragraphs
+you want the document element to be. For example, to set
+blockquotes 2 points smaller than the type in paragraphs, do
+<br/>
+<span class="pre-in-pp">
+ .BLOCKQUOTE_SIZE -2
+</span>
+There&#8217;s no need for a
+<a href="definitions.html#unitofmeasure">unit of measure</a>
+with the _SIZE control macros; points is assumed.
+</p>
+
+<h4 id="color" class="docs" style="margin-top: -.5em; margin-bottom: -.75em;">Colour</h4>
+
+<p>
+Control macros that end in _COLOR take as their argument a colour
+name pre-defined (or &#8220;initialized&#8221;) with
+<a href="color.html#newcolor">NEWCOLOR</a>
+or
+<a href="color.html#xcolor">XCOLOR</a>.
+For example, if you want your
+<a href="#linebreak">author linebreaks</a>
+to be red, once you&#8217;ve defined or initialized the colour, red,
+<br/>
+<span class="pre-in-pp">
+ .LINEBREAK_COLOR red
+</span>
+will turn them red.
+</p>
+
+<h4 id="lead" class="docs" style="margin-top: -.5em; margin-bottom: -.75em;">Lead / linespacing</h4>
+
+<p>
+Control macros that end in _AUTOLEAD take the same argument as
+<a href="typesetting.html#autolead">AUTOLEAD</a>,
+<i>viz.</i> a digit that represents the number of points to add to
+the tag&#8217;s point size to arrive at its
+<a href="definitions.html#leading">leading</a>.
+For example, to set footnotes
+<a href="definitions.html#solid">solid</a>, do
+<br/>
+<span class="pre-in-pp">
+ .FOOTNOTE_AUTOLEAD 0
+</span>
+To set footnotes with a 1-point lead (i.e. with the line spacing
+one point greater than the footnote&#8217;s point size), do
+<br/>
+<span class="pre-in-pp">
+ .FOOTNOTE_AUTOLEAD 1
+</span>
+</p>
+
+<div class="box-tip" style="margin-top: -1.25em;">
+<p class="tip">
+<span class="note">Note:</span>
+_AUTOLEAD control macros do not have a <kbd>FACTOR</kbd> argument.
+</p>
+</div>
+
+
+<h4 id="control-indents" class="docs" style="margin-top: -.75em; margin-bottom: -.75em;">Indents</h4>
+
+<p>
+Except for
+<a href="#para-indent">PARA_INDENT</a>,
+the argument to control macros that end in _INDENT can take
+either a single numeral (whole numbers only, no decimal fractions)
+<i>without</i> a
+<a href="definitions.html#unitofmeasure">unit of measure</a>
+appended to it, or a digit (including decimal fractions) <i>with</i>
+a unit of measure appended.
+</p>
+
+<p>
+A digit <i>without</i> a unit of measure appended represents by
+how much you want your paragraph first-line indents (set with
+PARA_INDENT) multiplied to achieve the correct indent for a
+particular tag. For example,
+<br/>
+<span class="pre-in-pp">
+ .PARA_INDENT 2m
+ .BLOCKQUOTE_INDENT 2
+</span>
+means that blockquotes will be indented from the left and right
+margins by twice the size of the paragraph indent, or 4
+<a href="definitions.html#em">ems</a>.
+</p>
+
+<p>
+A digit <i>with</i> a unit of measure appended defines an absolute
+indent, relative to nothing. In the following, blockquotes will be
+indented by 3
+<a href="definitions.html#picaspoints">picas</a>
+and 6
+<a href="definitions.html#picaspoints">points</a>,
+regardless of the paragraph indent.
+<br/>
+<span class="pre-in-pp">
+ .PARA_INDENT 2m
+ .BLOCKQUOTE_INDENT 3P+6p
+</span>
+</p>
+
+<h4 id="quad" class="docs" style="margin-top: -1em; margin-bottom: -.75em;">Quad / justification style</h4>
+
+<p>
+Control macros that end in _QUAD take the same arguments as
+<a href="typesetting.html#quad">QUAD</a>.
+</p>
+
+<h4 id="underscore" class="docs" style="margin-bottom: -.75em;">Underscore style, rule weight</h4>
+
+<p>
+If mom gives the option to underscore a document element, the weight
+of the underline and its distance from the
+<a href="definitions.html#baseline">baseline</a>
+are controlled by macros that end in _UNDERSCORE or _UNDERLINE, the
+two being synonymous. These macros take the following arguments:
+<br/>
+<span class="pre-in-pp">
+ DOUBLE - double underscore
+ &lt;weight&gt; - the underscore weight (in points, no unit of measure required
+ &lt;distance&gt; - distance from baseline (unit of measure required)
+ &lt;rule gap&gt; - distance between double underscore rules (unit of measure required)
+</span>
+<kbd>DOUBLE</kbd> by itself will double-underscore the element. The
+remaining arguments must be entered in the order given. You may not
+skip over any of them, which means that if you only wish to change
+<kbd>&lt;rule gap&gt;</kbd>, you must still enter a
+<kbd>&lt;weight&gt;</kbd> and <kbd>&lt;distance&gt;</kbd> argument.
+</p>
+
+<p>
+Page elements that are separated from
+<a href="definitions.html#running">running text</a>
+by a rule (i.e. page headers, page footers, and footnotes) are
+controlled by macros that end in _RULE_WEIGHT.
+</p>
+
+<p>
+The weight argument to _UNDERSCORE macros is the same as the
+argument to
+<a href="inlines.html#rule-weight">RULE_WEIGHT</a>,
+as is the argument to _RULE_WEIGHT macros.
+</p>
+
+<h3 id="grouping" class="docs">Grouping control macros</h3>
+
+<p>
+As of version 2.1, it is possible to group control macros for a
+particular tag into a single <kbd>&lt;element&gt;_STYLE</kbd> macro.
+For example, rather than setting the family, size, and indent of
+<a href="#blockquote-intro">BLOCKQUOTES</a>
+with
+<br/>
+<span class="pre-in-pp">
+ .BLOCKQUOTE_FAMILY H
+ .BLOCKQUOTE_SIZE -2
+ .BLOCKQUOTE_INDENT 4P
+</span>
+you can enter the same style parameter changes with
+<br/>
+<span class="pre-in-pp">
+ .BLOCKQUOTE_STYLE \
+ FAMILY H \
+ SIZE -2 \
+ INDENT 4P
+</span>
+<kbd>&lt;element&gt;_STYLE</kbd> macros use
+&#8220;keyword/value&#8221; pairs (<kbd>FAMILY</kbd> is a keyword,
+<kbd>H</kbd> is a value), and may be entered entirely on one line,
+or, as the example shows, broken into several readable lines using
+the backslash. The macro itself and all but the last keyword/value
+pair require the backslash when this style is used.
+</p>
+
+<p>
+Not all the control macros for a particular tag may be available
+with an <kbd>&lt;element&gt;_STYLE</kbd> macro. Generally speaking,
+though, if a tag has control macros for
+</p>
+<table style="font-family: monospace; font-weight: bold; margin-left: 5em; margin-top: -1em">
+ <tr>
+ <td style="padding-right: 1em">FAMILY</td>
+ <td style="padding-right: 1em">LEAD</td>
+ <td style="padding-right: 1em">INDENT</td>
+ <td style="padding-right: 1em">SMALLCAPS</td>
+ </tr>
+ <tr>
+ <td style="padding-right: 1em">FONT</td>
+ <td style="padding-right: 1em">AUTOLEAD</td>
+ <td style="padding-right: 1em">COLOR</td>
+ <td style="padding-right: 1em">UNDERSCORE or UNDERLINE</td>
+ </tr>
+ <tr>
+ <td style="padding-right: 1em">SIZE</td>
+ <td style="padding-right: 1em">QUAD</td>
+ <td style="padding-right: 1em">CAPS</td>
+ </tr>
+</table>
+<p style="margin-top: .5em">
+those parameters may be used within an
+<kbd>&lt;element&gt;_STYLE</kbd> macro.
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span>
+If you need to reverse the sense of <kbd>CAPS</kbd>,
+<kbd>SMALLCAPS</kbd> or <kbd>UNDERSCORE/UNDERLINE</kbd>, which
+do not take a value after the keyword, use <kbd>NO_CAPS</kbd>,
+<kbd>NO_SMALLCAPS</kbd>, and <kbd>NO_UNDERSCORE/NO_UNDERLINE</kbd>.
+</p>
+</div>
+
+<div class="rule-short"><hr/></div>
+
+<!-- ==================================================================== -->
+
+<h2 id="epigraph-intro" class="macro-group">Epigraphs</h2>
+
+<ul style="margin-left: -.5em;">
+ <li><a href="#epigraph">Tag: EPIGRAPH</a></li>
+ <li><a href="#epigraph-control">Epigraph control macros and defaults</a></li>
+</ul>
+
+<p>
+<a href="definitions.html#epigraph">Epigraphs</a>
+colour, flavour, or comment on the document they precede.
+Typically, they are centred at the top of a document&#8217;s first page
+(underneath the title) and set in a smaller point size than that of
+paragraph text.
+</p>
+
+<p>
+By default, mom sets epigraphs centred and
+<a href="definitions.html#filled">unfilled</a>;
+this lets you input them on a line for line basis. This behaviour
+can be changed to accommodate
+<a href="definitions.html#filled">filled</a>
+epigraph &#8220;blocks.&#8221;
+</p>
+
+<!-- -EPIGRAPH- -->
+
+<div class="macro-id-overline">
+<h3 id="epigraph" class="macro-id">EPIGRAPH</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>EPIGRAPH</b> <kbd class="macro-args">&lt;toggle&gt; | [ BLOCK ]</kbd>
+</div>
+
+<p>
+EPIGRAPH is a toggle, used like this:
+<br/>
+<span class="pre-in-pp">
+ .EPIGRAPH
+ &lt;text of epigraph&gt;
+ .EPIGRAPH OFF
+</span>
+<kbd>OFF</kbd>, above, could be anything&mdash;say, <kbd>Q</kbd> or
+<kbd>X</kbd>&mdash;since any argument other than <kbd>BLOCK</kbd>
+turns it off.
+</p>
+
+<p>
+If given the argument, <kbd>BLOCK</kbd>, EPIGRAPH sets epigraphs
+<a href="definitions.html#filled">filled</a>,
+justified or quadded in the same direction as paragraphs, indented
+equally from both the left and right margins.
+</p>
+
+<p>
+If a block-style epigraph runs to more than one paragraph (unlikely,
+but conceivable), you must introduce every paragraph&mdash;including
+the first&mdash;with the
+<a href="#pp">PP</a>
+tag.
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span>
+EPIGRAPH should only be used at the top of a document (i.e. just
+after
+<a href="docprocessing.html#start">START</a>)
+or after headings. The latter is not especially recommended, but it
+does work. In all other places where you want quotes or cited text,
+use
+<a href="#quote">QUOTE</a>
+or
+<a href="#blockquote">BLOCKQUOTE</a>.
+</p>
+</div>
+
+<div class="box-tip">
+<p class="tip">
+<span class="tip">Tips on vertical spacing around epigraphs:</span>
+If you wish to change the vertical position of an epigraph with
+<a href="typesetting.html#space">SPACE</a>,
+<a href="typesetting.html#ald">ALD</a>, or
+<a href="typesetting.html#rld">RLD</a>,
+do so before invoking <kbd>.EPIGRAPH</kbd>, like this:
+<br/>
+<span class="pre-in-pp">
+ .SP -6p
+ .EPIGRAPH
+ A notable quote.
+ .EPIGRAPH OFF
+</span>
+If you&#8217;re setting a document in
+<a href="docprocessing.html#columns">columns</a>
+and you&#8217;d like to add or subtract space <i>after</i> the
+epigraph, which is centred over the top of both columns, the place
+to do it is inside the epigraph, like this:
+<br/>
+<span class="pre-in-pp">
+ .EPIGRAPH
+ A notable quote.
+ .SP 1v
+ .EPIGRAPH OFF
+</span>
+If you were to add the <kbd>.SP 1v</kbd> outside the epigraph, the
+space would be added to the top of the leftmost column only,
+resulting in unbalanced columns.
+</p>
+</div>
+
+<div class="defaults-container" style="padding-bottom: 8px;">
+<h3 id="epigraph-control" class="docs defaults" style="margin-top: -.25em;">EPIGRAPH control macros and defaults</h3>
+
+<p class="defaults">
+See
+<a href="#control-macro-args">Arguments to the control macros</a>.
+<br/>
+The following EPIGRAPH control macros may also be
+<a href="#grouping">grouped</a>
+using EPIGRAPH_STYLE.
+</p>
+
+<span class="pre defaults">
+.EPIGRAPH_FAMILY default = prevailing document family; default is Times Roman
+.EPIGRAPH_FONT default = roman
+.EPIGRAPH_SIZE default = -1.5 (points)
+.EPIGRAPH_COLOR default = black
+.EPIGRAPH_AUTOLEAD default = 2 points
+(The next two apply to &#8220;block&#8221; style epigraphs only)
+.EPIGRAPH_INDENT* (see Note on EPIGRAPH_INDENT, below)
+
+*Indent here refers to the indent from both the left and right margins
+ that centres block style epigraphs on the page.
+</span>
+</div>
+
+<div class="box-notes">
+<h3 id="epigraph-indent" class="docs notes" style="margin-bottom: -.75em;">Note on EPIGRAPH_INDENT</h3>
+
+<p style="margin-top: .5em;">
+If you pass EPIGRAPH_INDENT an integer with no unit of measure
+appended, the integer represents the amount by which to multiply
+PARA_INDENT to arrive at an indent for block style epigraphs. If
+you append a unit of measure to the argument, the indent will be
+precisely the amount specified.
+</p>
+
+<p>
+Please also note that if your PARA_INDENT is <kbd>0</kbd> (i.e.
+no indenting of the first line of paragraphs), you must set an
+EPIGRAPH_INDENT yourself, with a unit of measure appended to the
+argument. Mom has no default for EPIGRAPH_INDENT if paragraph first
+lines are not being indented.
+</p>
+
+<p class="tip-bottom">
+The default value for EPIGRAPH_INDENT is <kbd>3</kbd> (for
+<a href="docprocessing.html#printstyle">PRINTSTYLE TYPESET</a>)
+and <kbd>2</kbd> (for
+<a href="docprocessing.html#printstyle">PRINTSTYLE TYPEWRITE</a>).
+</p>
+</div>
+
+<div class="rule-short"><hr/></div>
+
+<!-- ==================================================================== -->
+
+<h2 id="pp-intro" class="macro-group">Paragraphs</h2>
+
+<ul style="margin-left: -.5em;">
+ <li><a href="#pp">Tag: PP</a></li>
+ <li><a href="#pp-control">Paragraph control macros and defaults</a></li>
+</ul>
+
+<p>
+The paragraph macro is the one you use most often. Consequently,
+it&#8217;s one of most powerful, yet simplest to use&mdash;just the
+letters PP. No arguments, nothing. Just <kbd>.PP</kbd> on a line
+by itself any time, in any document element, tells mom you want to
+start a new paragraph. The spacing and indent appropriate to where
+you are in your document are taken care of automatically.
+</p>
+
+<p>
+By default, mom does not indent the first paragraph of a document,
+nor paragraphs that fall immediately after headings. The first
+paragraphs of blockquotes and block-style epigraphs are also not
+indented. This behaviour can be changed with the control macro
+<kbd><a href="#para-indent-first">INDENT_FIRST_PARAS</a></kbd>.
+</p>
+
+<p>
+Mom does not deposit a blank line between paragraphs. If you want
+her to do so, use the control macro
+<a href="#pp-space">PARA_SPACE</a>.
+(I don&#8217;t recommend using this macro with
+<a href="typesetting.html#printstyle">PRINTSTYLE TYPEWRITE</a>.)
+</p>
+
+<p>
+Note that mom does not provide widow or orphan control for
+paragraphs (i.e., even if only one line of a paragraph fits at the
+bottom of a page, she will set it on that page). The reason for
+this is that writers of fiction often have single-line paragraphs
+(e.g. in dialogue). Groff&#8217;s simplistic orphan control will
+break these one-liners&mdash;if they fall at the bottom of the
+page&mdash;to a new page, which is not what you want.
+</p>
+
+<!-- -PP- -->
+
+<div class="macro-id-overline">
+<h3 id="pp" class="macro-id">PP</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>PP</b>
+</div>
+<p>
+<kbd>.PP</kbd> (on a line by itself, of course) tells mom to start a
+new paragraph. See
+<a href="#pp-intro">above</a>
+for more details. In addition to regular text paragraphs, you can
+use PP in
+<a href="#epigraph-intro">epigraphs</a>,
+<a href="#blockquote-intro">blockquotes</a>,
+<a href="#endnote-intro">endnotes</a>
+and
+<a href="#footnote-intro">footnotes</a>.
+</p>
+
+<div class="defaults-container" style="background-color: #ded4bd; border: none;">
+<h3 id="pp-control" class="docs defaults">PP control macros and defaults</h3>
+
+<p class="defaults">
+The PP macro being so important, and representing, as it were, the
+basis of everything that goes on in a document, its control is
+managed in a manner somewhat different from other document element
+tags. As a result, the control macros for PP may not be
+<a href="#grouping">grouped</a>
+within a <kbd>_STYLE</kbd> macro.
+</p>
+
+<ol style="margin-top: .5em; padding-bottom: .5em;">
+ <li><a href="#pp-family">Family control</a></li>
+ <li><a href="#pp-font">Font control</a></li>
+ <li><a href="#pp-color">Paragraph colour</a></li>
+ <li><a href="#pp-leading">Leading/linespacing control</a></li>
+ <li><a href="#pp-just-quad">Justification/quad control</a></li>
+ <li><a href="#para-indent">First-line indent control</a></li>
+ <li><a href="#para-indent-first">Initial paragraphs indent control</a></li>
+ <li><a href="#pp-space">Inter-paragraph spacing</a></li>
+</ol>
+</div>
+
+<h4 id="pp-family" class="docs" style="margin-top: -1.5em;">1. Family control</h4>
+
+<p>
+The paragraph
+<a href="definitions.html#family">family</a>
+is set with
+<a href="typesetting.html#family">FAMILY</a>
+prior to
+<a href="docprocessing.html#start">START</a>,
+or
+<a href="docprocessing.html#doc-family">DOC_FAMILY</a>
+afterwards. Please note that both globally affect the family of
+every element in the document.
+</p>
+
+<p>
+If you wish to change the family for regular text paragraphs only,
+invoke <kbd>.FAMILY</kbd> immediately after <kbd>.PP</kbd> in every
+paragraph whose family you wish to differ from the prevailing
+document family. Alternatively, set the family and font for
+paragraphs with PP_FONT, giving it a complete family+font name, e.g.
+<br/>
+<span class="pre-in-pp">
+ PP_FONT TI
+</span>
+which would make the font used in paragraphs Times Roman Italic.
+</p>
+
+<p>
+Mom&#8217;s default paragraph (and document) family is Times Roman.
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span>
+Neither FAMILY nor DOC_FAMILY has any effect when the PRINTSTYLE is
+<kbd>TYPEWRITE</kbd>.
+</p>
+</div>
+
+<h4 id="pp-font" class="docs" style="margin-top: -.25em;">2. Font control</h4>
+
+<p>
+To change the
+<a href="definitions.html#font">font</a>
+used in regular text paragraphs, use PP_FONT, which takes the same
+argument as
+<a href="typesetting.html#font">FT</a>.
+PP_FONT may be used before or after
+<a href="docprocessing.html#start">START</a>.
+Only regular text paragraphs are affected; paragraphs in
+<a href="#epigraph-intro">epigraphs</a>,
+<a href="#blockquote-intro">blockquotes</a>,
+<a href="#endnote-intro">endnotes</a>,
+and
+<a href="#footnote-intro">footnotes</a>
+remain at their default setting (medium roman) unless you change
+them with the appropriate control macros.
+</p>
+
+<p>
+Mom&#8217;s default paragraph font is medium roman.
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span>
+PP_FONT has no effect when the PRINTSTYLE is <kbd>TYPEWRITE</kbd>.
+If you wish to set whole typewritten paragraphs in italic, invoke
+<kbd>.FT I</kbd> immediately after <kbd>.PP</kbd>. Depending
+on which of
+<a href="docprocessing.html#printstyle-italics">UNDERLINE_ITALIC</a>
+or
+<a href="docprocessing.html#printstyle-italics">ITALIC_MEANS_ITALIC</a>
+is currently enabled, the paragraph will be set underlined or in
+italic. Neither persists past the end of the paragraph.
+</p>
+</div>
+
+<h4 id="pp-color" class="docs" style="margin-top: -.25em;">3. Paragraph colour</h4>
+
+<p>
+Mom has no special control macro for colourising paragraphs. If you
+wish a colourised paragraph, you must use the macro
+<a href="color.html#color">COLOR</a>
+or the
+<a href="definitions.html#inline">inline escape</a>,
+<a href="color.html#color-inline"><kbd><span class="nobr">\*[&lt;colourname&gt;]</span></kbd></a>,
+<i>after</i> <kbd>.PP</kbd>. The colour must be one pre-defined (or
+&#8220;initialized&#8221;) with
+<a href="color.html#newcolor">NEWCOLOR</a>
+or
+<a href="color.html#xcolor">XCOLOR</a>.
+</p>
+
+<p>
+Please note that unless you change the colour back to it&#8217;s
+default (usually black) at the end of the paragraph, all subsequent
+paragraphs will be set in the new colour, although most other
+elements of your document will continue to be set in the default
+colour (usually black).
+</p>
+
+<p>
+For example, assuming you have defined the colour, blue,
+<br/>
+<span class="pre-in-pp">
+ .PP
+ .COLOR blue
+ &lt;first paragraph&gt;
+ .HEADING 1 "Monty Python"
+ .HEADING 2 "The Origins of Spam"
+ .PP
+ &lt;second paragraph&gt;
+</span>
+the first paragraph will be blue, the head and subhead will be in
+the document&#8217;s default colour (usually black), and the second
+paragraph will be in blue.
+</p>
+
+<h4 id="pp-leading" class="docs" style="margin-top: -.25em;">4. Leading</h4>
+
+<p>
+The paragraph
+<a href="definitions.html#leading">leading</a>
+is set with
+<a href="typesetting.html#leading">LS</a>
+prior to
+<a href="docprocessing.html#start">START</a>,
+or
+<a href="docprocessing.html#doc-lead">DOC_LEAD</a>
+afterwards. Please note that either method globally affects the
+leading and spacing of every document element (except
+<a href="definitions.html#header">headers</a>
+and
+<a href="definitions.html#footer">footers</a>).
+</p>
+
+<p>
+If you wish to change the leading of regular text paragraphs only,
+invoke <kbd>.LS</kbd> immediately after <kbd>.PP</kbd> in any
+paragraph whose leading you wish to change.
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Warning:</span>
+Changing a paragraph&#8217;s leading will almost certainly screw up
+mom&#8217;s ability to balance the bottom margin of pages. Should
+you absolutely require a change to a paragraph&#8217;s leading and
+need to get mom back on track leading-wise afterwards, use the
+<a href="docprocessing.html#shim">SHIM</a>
+or
+<a href="docprocessing.html#shim">FLEX</a>
+macro, depending on which
+<a href="docprocessing.html#vertical-whitespace-management">vertical whitespace management</a>
+strategy you are using.
+</p>
+</div>
+
+<p>
+Mom&#8217;s default paragraph leading (document leading)
+is 16 points, adjusted to fill the page.
+</p>
+
+<h4 id="pp-just-quad" class="docs" style="margin-top: -.25em;">5. Justification / quad</h4>
+
+<p>
+The justification/quad-direction of regular text paragraphs (i.e.
+<a href="definitions.html#just">justified</a>,
+or
+<a href="definitions.html#filled">filled</a>
+and
+<a href="definitions.html#quad">quadded</a>
+left/right/centre) is set with
+<a href="typesetting.html#justify">JUSTIFY</a>
+or
+<a href="typesetting.html#quad">QUAD</a>
+prior to
+<a href="docprocessing.html#start">START</a>,
+and with
+<a href="docprocessing.html#doc-quad">DOC_QUAD</a>
+afterwards.
+</p>
+
+<p>
+Please note that either method of setting the paragraph
+justification/quad-direction also affects
+<a href="#epigraph-intro">epigraphs</a>,
+<a href="#footnote-intro">footnotes</a>,
+and
+<a href="#endnote-intro">endnotes</a>,
+but not
+<a href="#blockquote-intro">blockquotes</a>
+(whose default is quad left unless you change it with
+<a href="#blockquote">BLOCKQUOTE_QUAD</a>).
+The justification/quad-direction of epigraphs and footnotes may be
+changed with their own control macros.
+</p>
+
+<p>
+If you wish to change the justification/quad-direction of individual
+paragraphs, invoke
+<a href="typesetting.html#justify"><kbd>.JUSTIFY</kbd></a>
+or
+<a href="typesetting.html#quad"><kbd>.QUAD</kbd></a>
+on the line immediately after <kbd>.PP</kbd>. Only the paragraph
+in question gets justified or quadded differently; subsequent
+paragraphs remain unaffected.
+</p>
+
+<p>
+Mom&#8217;s default justification/quad-direction for paragraphs
+when the
+<a href="docprocessing.html#printstyle">PRINTSTYLE</a>
+is <kbd>TYPESET</kbd> is justified; for PRINTSTYLE
+<kbd>TYPEWRITE</kbd>, the default is quad left.
+</p>
+
+<h4 id="para-indent" class="docs" style="margin-top: -.25em;">6. First-line indent</h4>
+
+<p>
+The first-line indent of paragraphs is controlled by PARA_INDENT,
+which takes one argument: the size of the indent. PARA_INDENT may be
+used before or after
+<a href="docprocessing.html#start">START</a>.
+A
+<a href="definitions.html#unitofmeasure">unit of measure</a>
+is required; fractional sizes are allowed. Thus, to set the
+paragraph indent to 4-1/2
+<a href="definitions.html#em">ems</a>, do
+<br/>
+<span class="pre-in-pp">
+ .PARA_INDENT 4.5m
+</span>
+In addition to establishing the basic first line-indent of
+paragraphs, PARA_INDENT also affects
+<a href="#epigraph-intro">epigraphs</a>,
+<a href="#quote-intro">quotes</a>
+and
+<a href="#blockquote-intro">blockquotes</a>,
+whose overall indenting from the left and (where applicable)
+right margins is relative to PARA_INDENT if
+the _INDENT control macro for these tags has
+no
+<a href="definitions.html#unitofmeasure">unit of measure</a>
+appended to it. Furthermore, the first-line indent of paragraphs
+within these document elements (as well as footnotes) is also
+relative to PARA_INDENT (always 1/2 of PARA_INDENT), hence they are
+also affected.
+</p>
+
+<p>
+Mom&#8217;s default PARA_INDENT is 2 ems for
+<a href="docprocessing.html#printstyle">PRINTSTYLE</a>
+<kbd>TYPESET</kbd> and 3 picas (1/2 inch) for
+<a href="docprocessing.html#printstyle">PRINTSTYLE</a>
+<kbd>TYPEWRITE</kbd>.
+</p>
+
+<h4 id="para-indent-first" class="docs" style="margin-top: -.25em;">7. Indenting initial paragraphs</h4>
+
+<p>
+By default, mom does not indent the first paragraph of a document,
+nor the first paragraph after a heading or
+<a href="#linebreak-intro">linebreak</a>,
+nor the first paragraphs of
+<a href="#epigraph-intro">epigraphs</a>,
+<a href="#blockquote-intro">blockquotes</a>,
+<a href="#endnote-intro">endnotes</a>
+or
+<a href="#footnote-intro">footnotes</a>
+that run to more than one paragraph.
+</p>
+
+<p>
+If you wish to have first paragraphs indented, invoke the macro
+INDENT_FIRST_PARAS without an argument, either before or after
+<a href="docprocessing.html#start">START</a>.
+INDENT_FIRST_PARAS is a toggle macro, therefore passing it any
+argument (<kbd>OFF</kbd>, <kbd>QUIT</kbd>, <kbd>Q</kbd>,
+<kbd>X</kbd>...) cancels its effect, meaning that first paragraphs
+will once again not be indented.
+</p>
+
+<h4 id="pp-space" class="docs">8. Inter-paragraph spacing</h4>
+
+<p>
+By default, mom does not insert a blank line between
+paragraphs. If you would like her to do so, invoke the macro
+PARA_SPACE without an argument, either before or after
+<a href="docprocessing.html#start">START</a>.
+PARA_SPACE is a toggle macro, therefore passing it any argument
+(<kbd>OFF</kbd>, <kbd>QUIT</kbd>, <kbd>Q</kbd>, <kbd>X</kbd>...)
+cancels its effect, meaning that paragraphs will once again not be
+separated by a blank line.
+</p>
+
+<p>
+If you would like to space paragraphs by less than a full linespace,
+invoke PARA_SPACE with the amount of space you want as a numeric
+argument. A
+<a href="definitions.html#unitofmeasure">unit of measure</a>
+is required. For example, to space paragraphs by one-quarter
+linespace
+<span class="pre-in-pp">
+ .PARA_SPACE .25v
+</span>
+is how you&#8217;d do it, or, if you want six points between
+paragraphs
+<span class="pre-in-pp">
+ .PARA_SPACE 6p
+</span>
+</p>
+
+<p style="margin-top: -1em" >
+If
+<a href="docprocessing.html#flex-vs-shim">flex-spacing</a>
+is enabled, additional flexible vertical whitespace can be inserted
+between spaced paragraphs with the
+<a href="docprocessing.html#flex">FLEX</a>
+macro.
+</p>
+
+<p>
+PARA_SPACE is not recommended for use with PRINTSTYLE TYPEWRITE
+unless you give PRINTSTYLE the <kbd>SINGLESPACE</kbd> option.
+</p>
+
+<div class="box-tip">
+<p class="tip-top">
+<span class="note">Note:</span>
+If PARA_SPACE is on, mom spaces only those paragraphs that come
+after an initial paragraph. Initial paragraphs are those that come
+immediately after the
+<a href="definitions.html#docheader">docheader</a>
+(i.e. the start of a document),
+<a href="#epigraph-intro">epigraphs</a>,
+<a href="#heading-intro">headings</a>,
+and
+<a href="#linebreak-intro">linebreaks</a>.
+(The first paragraph after these document elements requires no
+blank line to separate it from other paragraphs.)
+</p>
+
+<p class="tip-bottom">
+Sometimes, you can be fairly deep into a document before using PP
+for the first time, and when you do, because mom is still waiting
+for that initial paragraph, she doesn&#8217;t space it with a blank
+line, even though you expect her to. The simple workaround for this
+is to invoke <kbd>.PP</kbd> twice (in succession) at the point you
+expect the blank line to appear.
+</p>
+</div>
+
+<div class="rule-short"><hr/></div>
+
+<!-- ==================================================================== -->
+
+<h2 id="heading-intro" class="macro-group">Headings</h2>
+
+<ul style="margin-left: -.5em;">
+ <li><a href="#heading">Tag: HEADING</a></li>
+ <li><a href="#head-spacing-notes">Spacing of headings</a></li>
+ <li><a href="#heading-control">Heading control macros and defaults</a></li>
+ <li><a href="#prefix-chapter-number">Prefixing chapter numbers</a></li>
+ <li><a href="#oldstyle-headings">Oldstyle headings</a>
+ <ul style="list-style-type: circle; margin-left: -1.25em">
+ <li><a href="#parahead">Important information about PARAHEAD</a>
+ <ul style="list-style-type: square; margin-left: -1.25em">
+ <li><a href="#parahead-usage">Correct usage of paraheads</a></li>
+ </ul></li>
+ </ul></li>
+</ul>
+
+<p>
+Heads, subheads, and deeper levels of section headings are
+handled by a single macro, HEADING, to which you pass an argument
+stating the desired level.
+<kbd><span class="nobr">.HEADING 1 &quot;&lt;text&gt;&quot;</span></kbd>,
+for example, would be a main head;
+<kbd><span class="nobr">.HEADING 2 &quot;&lt;text&gt;&quot;</span></kbd>
+would be a subhead; etc.
+</p>
+
+<p>
+In addition to printing headings in the body of your document,
+HEADING collects the heading as an entry for the Table of Contents,
+if the document is to have one, and the
+<a href="definitions.html#pdfoutline">PDF outline</a>.
+With the <kbd>NAMED</kbd> argument, it furthermore acts as a
+bookmark for
+<a href="definitions.html#pdflink">PDF links</a>.
+</p>
+
+<p>
+Headings can also be numbered on a per-heading-level basis,
+hierarchically and concatenatively, e.g.
+<br/>
+<span class="pre-in-pp">
+ 1.
+ 1.1
+ 1.2
+ 1.2.1
+ 2.
+ 2.1
+ 2.2
+ 2.2.1
+</span>
+By default, a blank line precedes headings, regardless of the level.
+Mom initially sets up a very basic style for nine levels of heading,
+of which you can have an infinite number, although as has been said,
+if you need more than four levels of heading, you should consider
+re-organising your material. The pared-down style of mom&#8217;s
+defaults is intentional; it is expected that you will design
+headings to your own specifications with the
+<a href="definitions.html#controlmacro">control macro</a>,
+<a href="#heading-style">HEADING_STYLE</a>.
+</p>
+
+<p>
+It is very good practice, and strongly recommended, that you respect
+the hierarchy of headings, using level-1 for main heads, level-2 for
+subheads, level-3 for subsubheads, etc. The ease of designing and
+re-designing the style for each level, plus mom&#8217;s very basic
+defaults, are meant, in part, to prevent the whimsical misuse of
+a particular heading level just because its style appeals to you.
+</p>
+
+<!-- -HEAD- -->
+
+<div class="macro-id-overline">
+<h3 id="heading" class="macro-id">HEADING</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>HEADING</b> <kbd class="macro-args">&lt;level&gt; [
+PARAHEAD ] [ NAMED &lt;pdf-id&gt; ] &quot;&lt;heading text&gt;&quot;</kbd>
+</div>
+
+<p>
+The first argument to HEADING is the <kbd>level</kbd>. Level 1 is
+analogous to a main head; level 2 is analogous to a subhead; level 3
+is analogous to a subsubhead; etc.
+</p>
+
+<p>
+The second (optional) argument, <kbd>PARAHEAD</kbd>, instructs mom
+that the heading should be treated as a
+<a href="definitions.html#parahead">paragraph head</a>.
+If HEADING is being used to create a parahead, it must come after
+<a href="#pp">PP</a>,
+not before.
+</p>
+
+<p>
+The indent applied to a parahead is the same as what would be
+expected from a paragraph without the parahead (see
+<a href="#para-indent-first">Indenting initial paragraphs</a>).
+If you wish that a paragraph introduced by a parahead not be
+indented, use
+<a href="#para-indent">PARA_INDENT</a>
+to set the paragraph indent to zero, then reset the indent for
+subsequent paragraphs.
+</p>
+
+<p>
+The optional third argument, <kbd>NAMED &lt;id&gt;</kbd>, gives
+the heading a unique, non-printing identifier that allows it to be
+referenced from anywhere in the final PDF document with the PDF_LINK
+macro, provided the mom file is processed with
+<a href="using.html#pdfmom" style="font-weight: bold">pdfmom</a>.
+PDF_LINK usage is explained in the manual,
+<a href="http://www.schaffter.ca/mom/pdf/mom-pdf.pdf"><span class="book-title">Producing PDFs with groff and mom</span></a>.
+</p>
+
+<p>
+The final argument is the text of the heading, surrounded by double
+quotes. Long headings that are likely to exceed the current
+line length should be broken into chunks, each surrounded by
+double-quotes, like this:
+<br/>
+<span class="pre-in-pp">
+ .HEADING 1 "A needlessly long but instructive" "first level heading"
+</span>
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span>
+If a heading falls near the bottom of an output page and mom is
+unable to fit the heading plus at least one line of text underneath
+it, she will set the head at the top of the next page.
+</p>
+</div>
+
+<div class="box-tip">
+<h3 id="head-spacing-notes" class="docs" style="padding-top: 9px; font-size: 100%; text-transform: none">Spacing of headings</h3>
+
+<p>
+As described above, mom inserts a blank line before each heading.
+If the leading of your document never changes, and you introduce no
+additional space into the text&mdash;as, for example, between
+paragraphs&mdash;this will result in perfectly equal whitespace before
+each heading.
+</p>
+
+<p>
+If, however, you disrupt the regular placement of text on
+mom&#8217;s
+<a href="definitions.html#baseline-grid">baseline grid</a>,
+HEADING adds extra whitespace to the blank line according to the
+<a href="docprocessing.html#vertical-whitespace-management">vertical whitespace management</a>
+strategy in effect. This, along with a similar strategy for
+whitespace around quotes, blockquotes, and
+<a href="definitions.html#float">floated</a>
+and
+<a href="definitions.html#preprocessor">pre-processor material</a>
+is what allows mom to balance the bottom
+margins of pages effectively.
+</p>
+
+<p>
+It occasionally happens that the extra whitespace becomes
+noticeable. This typically occurs when the amount of whitespace
+adjustment approaches the value of the current leading. The result
+looks like two blank lines instead of one. When this happens, a
+simple but effective fix is to reduce the space before the heading
+by backing up one line, either with
+<br/>
+<span class="pre-in-pp">
+ .SPACE -1v
+</span>
+or
+<br/>
+<span class="pre-in-pp">
+ .RLD -1v
+</span>
+This results in slightly less whitespace than normal, but the
+difference is usually not apparent. Alternatively, you may pass the
+<kbd>NO_SHIM</kbd> or <kbd>NO_FLEX</kbd> argument to
+<a href="#heading-style">HEADING_STYLE</a>
+to prevent shimming or flex-spacing of any particular heading level
+either globally or selectively. If shimming/flex-spacing is
+disabled selectively with
+<br/>
+<span class="pre-in-pp">
+ .HEADING_STYLE &lt;n&gt; NO_SHIM | NO_FLEX
+</span>
+it can be re-enabled for the heading level with
+<br/>
+<span class="pre-in-pp">
+ .HEADING_STYLE &lt;n&gt; SHIM | FLEX
+</span>
+</p>
+</div>
+
+<div class="defaults-container" style="background-color: #ded4bd; border: none;">
+<h3 id="heading-control" class="defaults" style="margin-left: 6px; margin-bottom: -1em">HEADING control and defaults</h3>
+
+<div style="padding-left: 15px; padding-right: 15px">
+<p style="margin-bottom: 1em">
+By default, mom pre-initializes nine levels of headings to use
+the bold font of the prevailing document family, with a baseline
+adjustment of 1/10 of the current
+<a href="definitions.html#leading">leading</a>.
+In addition, level-1 headings are 3 points larger than running text,
+level-2 headings 2 points larger, and level 3-headings 1 point
+larger. The remaining 6 levels are the same size as running text.
+A single blank line precedes all levels of heading.
+</p>
+
+<h4 id="heading-style" class="docs" style="margin-bottom: -.5em">The HEADING_STYLE macro</h4>
+
+<p>
+Styling heads is accomplished with a single macro
+<br/>
+<span class="pre-in-pp">
+ .HEADING_STYLE&nbsp;&lt;level&gt;
+</span>
+where <kbd>&lt;level&gt;</kbd> is the numeric heading level to which
+the style applies.
+</p>
+
+<p>
+HEADING_STYLE takes any or all of the following arguments,
+which may be given in any order:
+<br/>
+<span class="pre defaults">
+ FAMILY &lt;family&gt; \
+ FONT &lt;font&gt; \
+ SIZE &lt;+|-size&gt; \
+ QUAD &lt;direction&gt; \
+ COLOR &lt;colour&gt; \
+ UNDERSCORE &lt;weight&gt; &lt;gap&gt; | NO_UNDERSCORE \
+ UNDERSCORE2 &lt;weight&gt; &lt;gap1&gt; &lt;gap2&gt; | NO_UNDERSCORE2 \
+ CAPS | NO_CAPS \
+ SMALLCAPS | NO_SMALLCAPS \
+ BASELINE_ADJUST &lt;amount to raise heading from the baseline&gt; \
+ NEEDS &lt;lines of text required beneath the heading&gt; \
+ PREFIX_CHAPTER [&lt;n&gt;] \
+ SPACE_AFTER | NO_SPACE_AFTER \
+ NUMBER | NO_NUMBER \
+ NO_SHIM | SHIM \
+ NO_FLEX | FLEX
+</span>
+</p>
+
+<p>
+You may enter your entire argument list on a single line, or, if it
+is very long, break it into shorter lines with the
+&#8220;line-continued&#8221; backslash (<kbd>\</kbd>), as shown
+above.
+</p>
+
+<p class="defaults" style="margin-bottom: 1em">
+The arguments to <kbd>FAMILY</kbd>, <kbd>FONT</kbd>,
+<kbd>SIZE</kbd>, <kbd>QUAD</kbd>, and
+<kbd>COLOR</kbd> are the same as
+those you&#8217;d give to the
+<a href="#docelement-control">control macros</a>
+ending in _FAMILY, _FONT, _SIZE, _QUAD, or _COLOR. See
+<a href="#control-macro-args">Arguments to the control macros</a>.
+</p>
+
+<p class="defaults" style="margin-bottom: 1em">
+<kbd>UNDERSCORE</kbd> and <kbd>UNDERSCORE2</kbd> require that a
+weight for the underscore be given, in points (decimal fractions
+allowed), but without the unit of measure <kbd>p</kbd> appended.
+They also require that the underscore&#8217;s distance from the
+baseline be supplied; in the case of UNDERSCORE2, an additional gap
+argument representing the distance between the two underscores must
+be provided.
+</p>
+
+<p class="defaults" style="margin-bottom: 1em">
+The <kbd>CAPS</kbd> argument capitalizes the text of a heading
+level in the body of a document but not in the Table of
+Contents, where capitalization of entries is controlled by
+<a href="tables-of-contents.html#toc-entry-style">TOC_ENTRY_STYLE&nbsp;&lt;n&gt;</a>.
+</p>
+
+<p class="defaults" style="margin-bottom: 1em">
+<kbd>BASELINE_ADJUST</kbd> allows you to raise a heading slightly
+above the baseline on which it would otherwise sit. For aesthetic
+reasons, it is often desirable to introduce a small amount of space
+between a heading and the text following it. Since headings are
+preceded by a blank line, it is preferable to move the heading
+upward than to lower the text following it. The argument to
+BASELINE_ADJUST is the amount by which to raise the heading. It
+requires no <kbd>+</kbd> or <kbd>-</kbd> sign, and must have a
+<a href="definitions.html#unitofmeasure">unit of measure</a>
+appended to it.
+</p>
+
+<p class="defaults" style="margin-bottom: 1em">
+<kbd>NEEDS</kbd> lets you reserve the number of lines of text
+required beneath a heading, including fractions thereof (e.g.
+&#8220;1.5&#8221; for one line of text plus half a linespace).
+If a heading falls near the bottom margin and there isn&#8217;t
+sufficient room for both the heading and the reserved space, mom
+will break to a new page for the heading. A
+<a href="definitions.html#unitofmeasure">unit of measure</a>
+should not be appended to the argument.
+<span class="note"><i>Note:</i></span> If you have
+<a href="goodies.html#dropcap">DROPCAP</a>s
+after headings, you must increase the value of <kbd>NEEDS</kbd>
+to match the number of dropcap lines.
+</p>
+
+<p class="defaults" style="margin-bottom: 1em">
+<kbd>PREFIX_CHAPTER</kbd> instructs mom to prefix the current
+chapter number to numbered headings. If mom is unable to determine
+a chapter number, she will ask for one.
+</p>
+
+<p class="defaults" style="margin-bottom: 1em">
+Note that using <kbd>PREFIX_CHAPTER</kbd> with an explicit chapter
+number will also set the chapter number for subsequent
+<a href="images.html#autolabel">automatically-generated image and pre-processor labels</a>
+as well.
+</p>
+
+<p class="defaults" style="margin-bottom: 1em">
+<kbd>SPACE_AFTER</kbd> inserts a blank line equal to the current
+<a href="definitions.html#leading">leading</a> after a HEADING.
+If you&#8217;d like a full linespace after a heading level, use
+<kbd>SPACE_AFTER</kbd>. If you&#8217;d like additional space before
+a heading level, you must introduce it yourself with
+<a href="typesetting.html#space">SPACE</a>
+or
+<a href="typesetting.html#ald">ALD</a>.
+</p>
+
+<p class="defaults" style="margin-bottom: 1em">
+<kbd>NUMBER</kbd> and <kbd>NO_NUMBER</kbd> allow you to determine
+whether mom prepends a hierarchic numbering scheme to a heading
+level in the body of a document. Numbering of Table of Contents
+entries is controlled separately with
+<a href="tables-of-contents.html#toc-entry-numbers">TOC_ENTRY_NUMBERS</a>.
+Mom also has a special macro to toggle whether to prefix a chapter
+number to numbered headings and Table of Contents entries,
+<a href="#prefix-chapter-number">PREFIX_CHAPTER_NUMBER</a>.
+</p>
+
+<p class="defaults" style="margin-bottom: 1em">
+<kbd>SHIM</kbd> is not necessary if shimming is enabled
+globally, which it is by default; it exists to re-enable
+shimming for the heading level if you have previously passed
+HEADING_STYLE&nbsp;<kbd>&lt;n&gt;</kbd> a <kbd>NO_SHIM</kbd>
+argument. The <kbd>FLEX</kbd> and <kbd>NO_FLEX</kbd> arguments work
+the same way if flex-spacing is enabled.
+</p>
+
+<p class="defaults" style="padding-bottom: .5em">
+The argument list is long, so you may want to break it into
+several lines by using the backslash character (<kbd>\</kbd>).
+Here&#8217;s an example of how you might style a level 1 heading:
+<br/>
+<span class="pre defaults">
+ .HEADING_STYLE 1 \
+ FONT B \
+ QUAD C \
+ UNDERSCORE .5 2p \
+ BASELINE_ADJUST 3p \
+ NUMBER
+</span>
+This creates a level-1 heading style that&#8217;s bold, centred,
+underscored and numbered, raised by 3 points from the baseline.
+</p>
+</div>
+</div>
+
+<!-- -PREFIX_CHAPTER_NUMBER- -->
+
+<div id="prefix-chapter-number" class="macro-id-overline" style="margin-top: -1em;">
+<h3 class="macro-id" style="text-transform: none; font-size: 105%;">Prefixing chapter numbers</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>PREFIX_CHAPTER_NUMBER</b> <kbd class="macro-args">&lt;none&gt; | &lt;chapter number as digit&gt; | &lt;anything&gt;</kbd>
+</div>
+
+<p>
+If, in addition to numbering heads, you want mom to prepend the
+chapter number, invoke <kbd>.PREFIX_CHAPTER_NUMBER</kbd>.
+</p>
+
+<p>
+When you invoke <kbd>.PREFIX_CHAPTER_NUMBER</kbd> without an
+argument, mom checks to see whether the argument you passed to <a
+href="docprocessing.html#chapter">CHAPTER</a> (if it&#8217;s been
+called) is a digit. If it isn&#8217;t (say you&#8217;ve numbered your
+chapter &#8220;One&#8221; instead of &#8220;1&#8221;), mom will
+abort with a request that you pass PREFIX_CHAPTER_NUMBER a digit
+representing the chapter number.
+</p>
+
+<p>
+After you invoke <kbd>.PREFIX_CHAPTER_NUMBER</kbd>, mom will prepend
+the chapter number to all headings you have requested be numbered
+with
+<a href="#heading-style"><kbd>.HEADING_STYLE &lt;n&gt; NUMBER</kbd></a>.
+Thus, assuming chapter number twelve (12):
+<br/>
+<span class="pre-in-pp">
+ 1. LEVEL 1 HEADING
+ 1.1. Level 2 heading
+</span>
+would become
+<br/>
+<span class="pre-in-pp">
+ 12.1. LEVEL 1 HEADING
+ 12.1.1. Level 2 heading
+</span>
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span>
+If a chapter number is given to PREFIX_CHAPTER_NUMBER, automatically
+generated labels with a prepended chapter number are also affected.
+</p>
+</div>
+
+<p>
+In collated documents, mom automatically increments the digit used
+by PREFIX_CHAPTER_NUMBER by one (current chapter digit + 1) every
+time you invoke
+<a href="rectoverso.html#collate"><kbd>.COLLATE</kbd></a>,
+even if you&#8217;ve (temporarily) turned off the prefixing
+of chapter numbers. Thus, even if you number your chapters
+&#8220;One&#8221;, &#8220;Two&#8221;, &#8220;Three&#8221; instead of
+&#8220;1&#8221;, &#8220;2&#8221;, &#8220;3&#8221;, mom will Do The
+Right Thing with respect to numbering head (and label) elements
+in all collated chapters following the first invocation of
+PREFIX_CHAPTER_NUMBER (assuming, of course, that the collated
+chapters are in incrementing order; if not, you must put
+<br/>
+<span class="pre-in-pp">
+ .PREFIX_CHAPTER_NUMBER &lt;chapter number&gt;
+</span>
+somewhere after the invocation of COLLATE and before the first
+numbered head element of each collated document).
+</p>
+
+<p>
+PREFIX_CHAPTER_NUMBER can be disabled by passing it any argument
+other than a digit (e.g. (<kbd>OFF</kbd>, <kbd>QUIT</kbd>, <kbd>Q</kbd>,
+<kbd>X</kbd>...), although, as noted above, mom will keep,
+and&mdash;in the case of collated documents&mdash;increment the
+chapter number, allowing you to turn prefixing of chapter numbers to
+numbered head elements off and on according to your needs or whims.
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span>
+Because PREFIX_CHAPTER_NUMBER takes an (optional) digit representing
+the chapter number, it&#8217;s use need not be restricted to
+<a href="docprocessing.html#doctype">DOCTYPE <kbd>CHAPTER</kbd></a>.
+You can use it with any document type. Furthermore, even if
+your doctype isn&#8217;t <kbd>CHAPTER</kbd>, you can identify
+the document as a chapter for the purposes of numbering head
+elements by invoking the macro
+<a href="docprocessing.html#chapter"><kbd>.CHAPTER</kbd></a>
+with a
+<a href="definitions.html#numericargument">numeric argument</a>
+in your document setup.
+</p>
+</div>
+<div class="rule-short"><hr/></div>
+
+<!-- ==================================================================== -->
+
+<h2 id="oldstyle-headings-intro" class="macro-group">Oldstyle headings</h2>
+
+<ul style="margin-left: -.5em;">
+ <li><a href="#oldstyle-headings">Macro: OLDSTYLE_HEADINGS</a></li>
+ <li><a href="#head">Macro: HEAD</a></li>
+ <li><a href="#subhead">Macro: SUBHEAD</a></li>
+ <li><a href="#subsubhead">Macro: SUBSUBHEAD</a></li>
+</ul>
+
+<p>
+In versions of mom prior to 2.0, headings were entered by their
+commonly used names, <i>viz.</i> HEAD, SUBHEAD, and SUBSUBHEAD. The
+new
+<a href="#heading-intro">HEADING</a>
+scheme allows for greater flexibility, and permits seamless
+integration with PDF output.
+</p>
+
+<p>
+Documents created with pre-2.0 versions may still use the oldstyle
+heading names, as may new documents, however there are some
+differences in their behaviour.
+</p>
+
+<p>
+Whenever mom encounters an oldstyle heading, she loads the default
+style formerly associated with the oldstyle name. See below for a
+description of the default styles in the sections
+<a href="#head">HEAD</a> (now HEADING 1),
+<a href="#subhead">SUBHEAD</a> (now HEADING 2),
+and
+<a href="#subsubhead">SUBSUBHEAD</a> (now HEADING 3).
+Mom also emits a message to stderr alerting you to what she&#8217;s
+doing.
+</p>
+
+<p>
+The control macros formerly associated with oldstyle headings are no
+longer present in mom&#8217;s macro file, which means that if you
+made changes to mom&#8217;s default for those headings, you must
+recreate the changes with the
+<a href="#heading-style">HEADING_STYLE</a>
+macro. The entire style need not be recreated, only those
+parameters that differed from mom&#8217;s defaults. Thus, if your
+HEADs were set flush left, instead of the oldstyle default, centred,
+but otherwise kept mom&#8217;s settings, you need only do
+<br/>
+<span class="pre-in-pp">
+ .HEADING_STYLE 1 QUAD L
+</span>
+</p>
+
+<div id="parahead" class="box-important">
+<p class="tip-top">
+<span class="important">Important:</span>
+The macro PARAHEAD is no longer available. You must create paragraph
+heads using the
+<a href="#heading">HEADING</a>
+macro. Mom will abort with an informational message whenever she
+encounters PARAHEAD. Assuming a heading level of 3 for your
+paraheads, the former defaults for PARAHEAD can be set up like this:
+<br/>
+<span class="pre-in-pp">
+ .HEADING STYLE 3 FONT BI SIZE -.25 \" For PRINTSTYLE TYPESET
+ .HEADING STYLE 3 FONT I SIZE +0 \" For PRINTSTYLE TYPEWRITE
+</span>
+Equally, the macro NUMBER_PARAHEADS is no longer available. You
+must enable numbering of the correct level for paraheads with
+HEADING_STYLE. Again assuming a heading level of 3 for paraheads,
+it&#8217;s simply done:
+<br/>
+<span class="pre-in-pp">
+ .HEADING_STYLE 3 NUMBER
+</span>
+</p>
+
+<h3 id="parahead-usage" class="docs" style="text-transform: none; margin-top: -1em">Correct usage of paraheads</h3>
+
+<p style="margin-top: .5em">
+It is tempting to choose an arbitrary heading level for paraheads,
+since they are sometimes needed out-of-sequence; for example,
+immediately after a main head (level-1) in a document that
+subsequently requires subheads (level-2). In such a circumstance,
+choosing level-3 for all your paraheads might seem to make sense,
+but in fact doesn&#8217;t, since it disrupts the hierarchy of
+both the Table of Contents (if your document has one) and the PDF
+outline.
+</p>
+
+<p>
+Correct use of the <kbd>PARAHEAD</kbd> option to HEADING under such
+circumstances requires always assigning <kbd>PARAHEAD</kbd> to
+the next logical level in the heading hierarchy. For example, if
+there are no headings before the parahead, it should be assigned to
+level-1. If subsequently there is a main head to be followed by
+more paraheads, the main head should be level-1, and the paraheads
+level-2. This will almost certainly require assigning new style
+parameters to level-1 (with
+<a href="#heading-style">HEADING_STYLE</a>)
+and to the level now being used for paraheads. The following
+example demonstrates.
+<br/>
+<span class="pre-in-pp">
+ .HEADING_STYLE 1 FONT BI SIZE +.25 \" parahead style, level-1
+ .PP
+ .HEADING 1 PARAHEAD &lt;parahead&gt;
+ &lt;paragraph text&gt;
+ .PP
+ .HEADING 1 PARAHEAD &lt;parahead&gt;
+ &lt;paragraph text&gt;
+ \# main head style, level-1
+ .HEADING_STYLE 1 FONT B SIZE +3 QUAD CENTER UNDERSCORE .5 2p
+ .HEADING_STYLE 2 FONT BI SIZE +.25 \" parahead style, level-2
+ .HEADING 1 &lt;main head&gt;
+ .PP
+ &lt;paragraph text&gt;
+ .PP
+ .HEADING 2 PARAHEAD &lt;parahead&gt;
+ &lt;paragraph text&gt;
+</span>
+</p>
+</div>
+
+<!-- -OLDSTYLE_HEADINGS - -->
+
+<div class="macro-id-overline">
+<h3 id="oldstyle-headings" class="macro-id">OLDSTYLE HEADINGS</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>OLDSTYLE_HEADINGS</b>
+</div>
+
+<p>
+OLDSTYLE_HEADINGS requires no argument. It instructs mom to set the
+first three levels of heading to the parameters of her old defaults
+for HEAD, SUBHEAD, and SUBSUBHEAD. Use of OLDSTYLE_HEADINGS will
+also prevent mom from generating the message she issues the first
+time she encounters HEAD, SUBHEAD, and SUBSUBHEAD.
+</p>
+
+<!-- -HEAD- -->
+
+<div id="head" class="box-macro-args">
+Macro: <b>HEAD</b> <kbd class="macro-args">[ NAMED &lt;id&gt; ] &quot;&lt;text of head&gt;&quot; &quot;&lt;another line&gt;&quot;...</kbd>
+</div>
+
+<p>
+When invoked for the first time, with or without
+<a href="oldstyle-headings">OLDSTYLE_HEADINGS</a>,
+HEAD sets the parameters for level-1 headings to mom&#8217;s old
+HEAD defaults, then prints the head as a level-1 heading.
+The <kbd>NAMED &lt;id&gt;</kbd> optional argument is explained in
+the description of
+<a href="#heading">HEADING</a>.
+</p>
+
+<p>
+If, prior to invoking HEAD, you have given any parameters to level-1
+heads with
+<a href="#heading-style">HEADING STYLE</a>,
+they will be preserved; any you give afterwards will be respected.
+</p>
+
+<p>
+The former style defaults for HEAD were:
+<br/>
+<span class="pre-in-pp">
+ FAMILY = prevailing document family
+ FONT = bold (TYPESET); roman (TYPEWRITE)
+ SIZE = +1 (TYPESET); +0 (TYPEWRITE)
+ QUAD = C
+ UNDERSCORE .5 2p
+ CAPS
+</span>
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span>
+The macro NUMBER_HEADS from pre-2.0 versions of mom, can still be
+used, though it is now a wrapper for
+<br/>
+<span class="pre-in-pp">
+ .HEADING_STYLE 1 NUMBER
+</span>
+Mom will alert you to this on stderr.
+</p>
+</div>
+
+<!-- -SUBHEAD- -->
+
+<div id="subhead" class="box-macro-args">
+Macro: <b>SUBHEAD</b> <kbd class="macro-args">[ NAMED &lt;id&gt; ] &quot;&lt;text of head&gt;&quot; &quot;&lt;another line&gt;&quot;...</kbd>
+</div>
+
+<p>
+When invoked for the first time, with or without
+<a href="oldstyle-headings">OLDSTYLE_HEADINGS</a>,
+SUBHEAD sets the parameters for level-2 headings to mom&#8217;s old
+SUBHEAD defaults, then prints the subhead as a level-2 heading.
+The <kbd>NAMED &lt;id&gt;</kbd> optional argument is explained in
+the description of
+<a href="#heading">HEADING</a>.
+</p>
+
+<p>
+The former style defaults for SUBHEAD were:
+<br/>
+<span class="pre-in-pp">
+ FAMILY = prevailing document family
+ FONT = bold (TYPESET); italic, i.e. underlined (TYPEWRITE)
+ SIZE = +.5 (TYPESET); +0 (TYPEWRITE)
+ QUAD = L
+ BASELINE_ADJUST = 1/8 the current leading
+</span>
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span>
+The macro NUMBER_SUBHEADS from pre-2.0 versions of mom, can still be
+used, though it is now a wrapper for
+<br/>
+<span class="pre-in-pp">
+ .HEADING_STYLE 2 NUMBER
+</span>
+Mom will alert you to this on stderr.
+</p>
+</div>
+
+<!-- -SUBSUBHEAD- -->
+
+<div id="subsubhead" class="box-macro-args">
+Macro: <b>SUBSUBHEAD</b> <kbd class="macro-args">[ NAMED &lt;id&gt; ] &quot;&lt;text of head&gt;&quot; &quot;&lt;another line&gt;&quot;...</kbd>
+
+</div>
+
+<p>
+When invoked for the first time, with or without
+<a href="oldstyle-headings">OLDSTYLE_HEADINGS</a>,
+SUBSUBHEAD sets the parameters for level-3 headings to mom&#8217;s old
+SUBSUBHEAD defaults, then prints the subsubhead as a level-3 heading.
+The <kbd>NAMED &lt;id&gt;</kbd> optional argument is explained in
+the description of
+<a href="#heading">HEADING</a>.
+</p>
+
+<p>
+The former style defaults for SUBSUBHEAD were:
+<br/>
+<span class="pre-in-pp">
+ FAMILY = prevailing document family
+ FONT = italic (TYPESET); roman (TYPEWRITE)
+ SIZE = +.5 (TYPESET); +0 (TYPEWRITE)
+ QUAD = L
+ BASELINE_ADJUST = 1/8 the current leading
+</span>
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span>
+The macro NUMBER_SUBSUBHEADS from pre-2.0 versions of mom, can still be
+used, though it is now a wrapper for
+<br/>
+<span class="pre-in-pp">
+ .HEADING_STYLE 3 NUMBER
+</span>
+Mom will alert you to this on stderr.
+</p>
+</div>
+
+<div class="rule-short"><hr/></div>
+
+<!-- ==================================================================== -->
+
+<h2 id="linebreak-intro" class="macro-group">Linebreaks (section breaks)</h2>
+
+<ul style="margin-left: -.5em;">
+ <li><a href="#linebreak">Tag: LINEBREAK</a></li>
+ <li><a href="#linebreak-control">Linebreak control macros and defaults</a></li>
+</ul>
+
+<p>
+Linebreaks (&#8220;author linebreaks&#8221;, &#8220;section
+breaks&#8221;) are gaps in the vertical flow of running text that
+indicate a shift in content (e.g. a scene change in story). They
+are frequently set off by typographic symbols, sometimes whimsical
+in nature.
+</p>
+
+<!-- -LINEBREAK- -->
+
+<div class="macro-id-overline">
+<h3 id="linebreak" class="macro-id">LINEBREAK</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>LINEBREAK</b>
+</div>
+<p class="alias" style="margin-bottom: 0;">
+<i>Alias:</i> <b>SECTION</b>
+</p>
+
+<p>
+LINEBREAK takes no arguments. Simply invoke it (on a line by
+itself, of course) whenever you want to insert an author linebreak.
+</p>
+
+<div class="defaults-container" style="background-color: #ded4bd; border: none;">
+<h3 id="linebreak-control" class="docs defaults">LINEBREAK control macros and defaults</h3>
+
+<p class="defaults">
+By default, mom marks
+<a href="definitions.html#linebreak">author linebreaks</a>
+with three centred asterisks (stars) in the prevailing colour of the
+document (by default, black). You can alter this with the control
+macros
+</p>
+<ol style="margin-top: .5em; padding-bottom: .5em;">
+ <li><a href="#linebreak-char">LINEBREAK_CHAR</a></li>
+ <li><a href="#linebreak-color">LINEBREAK_COLOR</a></li>
+</ol>
+</div>
+
+<h4 id="linebreak-char" class="docs" style="margin-top: -1.5em; margin-bottom: .5em;">1. Linebreak character</h4>
+<div class="box-macro-args">
+Macro: <b>LINEBREAK_CHAR</b> <kbd class="macro-args">[ &lt;character&gt; ] [ &lt;iterations&gt; [ &lt;vertical adjustment&gt; ] ]</kbd>
+</div>
+
+<p class="alias" style="margin-bottom: 0;">
+<i>Alias:</i> <b>SECTION_CHAR</b>
+</p>
+<p class="requires">
+&bull;&nbsp;The third optional argument requires a
+<a href="definitions.html#unitofmeasure">unit of measure</a>.
+</p>
+
+<p>
+LINEBREAK_CHAR determines what mom prints when LINEBREAK is invoked.
+It takes 3 optional arguments: the character you want deposited at
+the line break, the number of times you want the character repeated,
+and a vertical adjustment factor.
+</p>
+
+<p>
+The first argument is any valid groff character (e.g. <kbd>*</kbd>
+[an asterisk], <kbd>\[dg]</kbd> [a dagger], <kbd>\f[ZD]\N'141'\fP</kbd>
+[an arbitrary character from Zapf Dingbats], <kbd>\l'4P'</kbd> [a
+4-pica long rule]). Mom sets the character centred on the current
+line length. (See <kbd>man groff_char</kbd> for a list of all
+valid groff characters.)
+</p>
+
+<p>
+The second argument is the number of times to repeat the character.
+</p>
+
+<p>
+The third argument is a +|-value by which to raise (-) or lower (+)
+the character in order to make it appear visually centred between
+sections of text. This lets you make vertical adjustments to
+characters that don&#8217;t sit on the
+<a href="definitions.html#baseline">baseline</a>
+(such as asterisks). The argument must be preceded by a plus or
+minus sign, and must include a unit of measure.
+</p>
+
+<p>
+If you enter LINEBREAK_CHAR with no arguments, sections of
+text will be separated by two blank lines when you invoke
+<kbd>.LINEBREAK</kbd>.
+</p>
+
+<p>
+Mom&#8217;s default for LINEBREAK_CHAR is
+<br/>
+<span class="pre-in-pp">
+ .LINEBREAK_CHAR * 3 -3p
+</span>
+i.e. three asterisks, raised 3 points from their normal vertical
+position (for
+<a href="docprocessing.html#printstyle">PRINTSTYLE <kbd>TYPESET</kbd></a>;
+the vertical adjustment is -2 points for
+<a href="docprocessing.html#printstyle">PRINTSTYLE <kbd>TYPEWRITE</kbd></a>).
+</p>
+
+<h4 id="linebreak-color" class="docs" style="margin-top: -.25em; margin-bottom: .5em;">2. Linebreak colour</h4>
+
+<div class="box-macro-args">
+Macro: <b>LINEBREAK_COLOR</b> <kbd class="macro-args">&lt;colourname&gt;</kbd>
+</div>
+<p class="alias" style="margin-bottom: 0;">
+<i>Alias:</i> <b>SECTION_COLOR</b>
+</p>
+
+<p>
+To change the colour of the linebreak character(s), simply invoke
+<kbd>.LINEBREAK_COLOR</kbd> with the name of a colour pre-defined
+(or &#8220;initialized&#8221;) with
+<a href="color.html#newcolor">NEWCOLOR</a>
+or
+<a href="color.html#xcolor">XCOLOR</a>.
+
+</p>
+
+<div class="rule-short"><hr/></div>
+
+<!-- ==================================================================== -->
+
+<h2 id="quote-intro" class="macro-group">Quotes (line for line, poetry or code)</h2>
+
+<ul style="margin-left: -.5em;">
+ <li><a href="#quote-description">Introduction</a>
+ <ul style="margin-left: -1.25em">
+ <li><a href="#quote-spacing">Quote spacing</a>
+ <ul style="margin-left: -1.25em">
+ <li><a href="#quote-spacing-notes">Notes on quote spacing</a></li>
+ </ul></li>
+ <li><a href="#no-shim">Disable shimming of quotes and blockquotes</a></li>
+ <li><a href="#float-quote">Keeping quotes and blockquotes together as a block</a></li>
+ <li><a href="#label-caption">Labelling/captioning quotes and blockquotes</a></li>
+ </ul></li>
+ <li><a href="#quote">Tag: QUOTE</a></li>
+ <li><a href="#quote-control">Quote control macros and defaults</a></li>
+</ul>
+
+<p id="quote-decription">
+<a href="definitions.html#quote">Quotes</a>
+are always set in
+<a href="definitions.html#filled">nofill mode</a>,
+flush left. This permits entering quotes on a line for line basis
+in your text editor and have them come out the same way on output
+copy. (See
+<a href="#blockquote-intro">Blockquotes</a>
+for how quotes, in the present sense, differ from longer passages of
+cited text.)
+</p>
+
+<p>
+Since mom originally came into being to serve the needs of creative
+writers (i.e. novelists, short story writers, etc.&mdash;not
+to cast aspersions on the creativity of mathematicians and
+programmers), she sets quotes in italics
+<a href="docprocessing.html#printstyle">(PRINTSTYLE <kbd>TYPESET</kbd>)</a>
+or underlined
+<a href="docprocessing.html#printstyle">(PRINTSTYLE <kbd>TYPEWRITE</kbd>)</a>,
+indented from the left margin. Obviously, she&#8217;s thinking
+&#8220;quotes from poetry or song lyrics&#8221;, but with the
+<a href="#quote-control">QUOTE control macros</a>
+you can change her defaults so QUOTE serves other needs, e.g.
+entering verbatim snippets of programming code, command-line
+instructions, and so on. (See the
+<a href="#code">CODE</a>
+for a convenience macro to assist in including code snippets in
+documents.)
+</p>
+
+<h3 id="quote-spacing" class="docs">QUOTE spacing</h3>
+
+<p>
+Besides indenting quotes, mom further sets them off from
+<a href="definitions.html#running">running text</a>
+with a small amount of vertical whitespace top and bottom. In
+<a href="docprocessing.html#printstyle">PRINTSTYLE <kbd>TYPEWRITE</kbd></a>,
+this is always one full linespace. In
+<a href="docprocessing.html#printstyle">PRINTSTYLE <kbd>TYPESET</kbd></a>,
+it&#8217;s 1/2 of the prevailing
+<a href="definitions.html#leading">leading</a>
+if the quote fits fully on the page (i.e. with running text above
+and below it), otherwise it&#8217;s a full linespace either above
+or below as is necessary to balance the page to the bottom margin.
+This behaviour can be changed with the control macro
+<a href="#always-fullspace-quotes">ALWAYS_FULLSPACE_QUOTES</a>.
+</p>
+
+<div class="box-tip">
+<h3 id="quote-spacing-notes" class="docs" style="padding-top: 9px; font-size: 95%;">Notes on quote spacing</h3>
+
+<p style="margin-top: .5em">
+If your quote (or blockquote) leading differs from the document
+leading, mom attempts to observe the same rules for vertical
+whitespace outlined above; however, she will also insert a small,
+flexible amount of extra whitespace
+(<a href="docprocessing.html#shim-vs-flex">shim or flex-spacing</a>)
+around the quotes to make sure the whitespace is equal, top and
+bottom. When shimming is enabled, this may result in multiple
+quotes or blockquotes on the same page being spaced slightly
+differently.
+</p>
+
+<h4 id="no-shim" class="docs">Disable shimming/flex-spacing of quotes and blockquotes</h4>
+
+<p class="tip-bottom">
+If you don&#8217;t want the behaviour
+described above (i.e., you don&#8217;t want mom putting additional shim
+or flex-spacing around quotes and
+blockquotes), put <kbd>.NO_SHIM</kbd> or/and <kbd>.NO_FLEX</kbd>
+in the style sheet section of your document (i.e. after PRINTSTYLE
+but before START), which will disable shimming or/and flex-spacing
+globally for all tags, or disable shimming/flex-spacing
+on a per-instance basis prior to <kbd>.QUOTE</kbd> or
+<kbd>.BLOCKQUOTE</kbd>, re-enabling it after the terminating
+<kbd>.QUOTE&nbsp;OFF</kbd> or <kbd>.BLOCKQUOTE&nbsp;OFF</kbd> with
+<kbd>.NO_SHIM&nbsp;OFF</kbd> or <kbd>.NO_FLEX&nbsp;OFF</kbd>.
+</p>
+
+</div>
+
+<h3 id="float-quote" class="docs">Keeping QUOTEs and BLOCKQUOTEs together as a block</h3>
+
+<p>
+The text of quotes and blockquotes is output immediately, and may therefore
+start on one page and finish on the next. If you wish to keep the
+text together as a block, deferred to the following page if the
+block doesn&#8217;t all fit on one page, wrap
+<kbd><span class="nobr">(BLOCK)QUOTE...(BLOCK)QUOTE&nbsp;OFF</span></kbd>
+inside a
+<a href="images.html#floats-intro">float</a>.
+If you further wish to force a page break before the floated quote
+or blockquote (leaving whitespace at the bottom of the page, pass
+<a href="images.html#float">FLOAT</a>
+the <kbd>FORCE</kbd> argument.
+<span class="pre-in-pp">
+ .FLOAT FORCE
+ .QUOTE
+ Fly me to the moon
+ And let me play among the stars
+ Let me see what life is like
+ On Jupiter and Mars
+ .QUOTE END
+ .FLOAT OFF
+</span>
+</p>
+
+<h3 id="label-caption" class="docs">Labelling/captioning quotes and blockquotes</h3>
+
+<p>
+Quotes and blockquotes may be labelled and/or captioned identically to
+<a href="images.html#floats-intro">floats</a>
+with the macros
+<a href="images.html#label">LABEL</a>
+and
+<a href="images.html#caption">CAPTION</a>
+(see
+<a href="images.html#float-label-caption">Labelling and captioning floats</a>).
+</p>
+
+<!-- -QUOTE- -->
+
+<div class="macro-id-overline">
+<h3 id="quote" class="macro-id">QUOTE</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>QUOTE</b> <kbd class="macro-args">[ ADJUST +|-&lt;space&gt; ] | &lt;anything&gt;</kbd>
+</div>
+<p class="requires">
+&bull;&nbsp;The argument to <kbd style="font-style: normal">ADJUST</kbd> requires a
+<a href="definitions.html#unitofmeasure">unit of measure</a>
+</p>
+
+<p>
+QUOTE is a toggle macro. To begin a section of quoted text, invoke
+it with no argument, then type in your quote. When you&#8217;re
+finished, invoke <kbd>.QUOTE</kbd> with any argument (e.g. <kbd>OFF,
+END, X, Q</kbd>...) to turn it off. Example:
+<br/>
+<span class="pre-in-pp">
+ .QUOTE
+ Nymphomaniacal Jill
+ Used a dynamite stick for a thrill
+ They found her vagina
+ In North Carolina
+ And bits of her tits in Brazil.
+ .QUOTE END
+</span>
+Mom does her best to equalize whitespace around quotes and make
+sure the line following it falls on a valid baseline. On occasion,
+you may need to tweak the quote placement slightly, which is done
+by passing <kbd>ADJUST</kbd> to QUOTE with a plus or minus value.
+The quote will be lowered (<kbd>+</kbd>) or raised (<kbd>-</kbd>)
+<i>within the space allotted for it</i> by the given amount. For
+example, to lower a quote slightly within the space allotted for it,
+you&#8217;d do
+<br/>
+<span class="pre-in-pp">
+ .QUOTE ADJUST +3p
+ There was a soprano named Golda
+ Whose lovers grew colda and colda
+ For during love-making
+ She'd sing the earth-shaking
+ Love theme from Tristan und Isolde.
+ .QUOTE off
+</span>
+</p>
+
+<div class="defaults-container" style="background-color: #ded4bd; border: none;">
+
+<h3 id="quote-control" class="docs defaults">QUOTE control macros and defaults</h3>
+
+<ol style="margin-top: .5em; padding-bottom: .5em;">
+ <li><a href="#quote-general">Family/font/size/leading/colour/indent</a></li>
+ <li><a href="#always-fullspace-quotes">Spacing above and below quotes (typeset only)</a></li>
+ <li><a href="#underline-quotes">Underlining quotes (typewrite only)</a></li>
+</ol>
+</div>
+
+<h4 id="quote-general" class="docs" style="margin-top: -1.5em; margin-bottom: .5em;">1. Family/font/size/colour/indent</h4>
+
+<div class="defaults-container" style="padding-bottom: 8px;">
+<p class="defaults" style="padding-top: 6px;">
+See
+<a href="#control-macro-args">Arguments to the control macros</a>.
+<br/>
+The following QUOTE control macros may also be
+<a href="#grouping">grouped</a>
+using QUOTE_STYLE. If you do so, <kbd>QUOTE_LEFT</kbd>, <kbd>QUOTE_CENTER</kbd>,
+and <kbd>QUOTE_RIGHT</kbd> must be entered as:
+<br/>
+<kbd>&nbsp;&nbsp;&nbsp;QUAD LEFT</kbd><br/>
+<kbd>&nbsp;&nbsp;&nbsp;QUAD CENTER</kbd><br/>
+<kbd>&nbsp;&nbsp;&nbsp;QUAD RIGHT</kbd>
+</p>
+
+<span class="pre defaults">
+.QUOTE_FAMILY default = prevailing document family; default is Times Roman
+.QUOTE_FONT default = italic; underlined in TYPEWRITE
+.QUOTE_SIZE default = +0 (i.e. same size as paragraph text)
+<a id="quote-autolead">.QUOTE_AUTOLEAD default = none; leading of quotes is the same as paragraphs </a>
+.QUOTE_COLOR default = black
+.QUOTE_INDENT (see below, "Quote indent")
+.QUOTE_LEFT -+ Quad direction of quote.
+.QUOTE_CENTER | LEFT observes QUOTE_INDENT;
+.QUOTE_RIGHT -+ CENTER and RIGHT do not
+</span>
+</div>
+
+<h4 id="quote-indent" class="docs" style="margin-top: -1.5em;">Quote indent</h4>
+
+<p>
+<kbd>QUOTE_INDENT</kbd> takes one of two kinds of argument: an integer
+representing the amount by which to multiply the argument passed to
+<a href="#para-indent"><kbd>.PARA_INDENT</kbd></a>
+(by default, 2
+<a href="definitions.html#em">ems</a>
+for TYPESET, 3
+<a href="definitions.html#picaspoints">picas</a>
+for TYPEWRITE) to arrive at the quote indent, or a distance with a
+<a href="definitions.html#unitofmesaure">unit of measure</a>
+appended.
+</p>
+
+<p>
+Be careful when using QUOTE. If a quote is set flush left (the
+default), the QUOTE_INDENT applies only to the left margin. Because
+quote lines are output as-is (see
+<a href="definitions.html#no-fill">no-fill mode</a>),
+they do not respect line length and may extend beyond a document's
+right margin. Similarly, if a quote is being set flush right, the
+indent applies only to the right margin; long lines may extend into
+the left margin. Centered quotes are never indented, so long lines
+may extend beyond both the left and right margins.
+</p>
+
+<p>
+The default value for QUOTE_INDENT is 3 (for
+<a href="docprocessing.html#printstyle">PRINTSTYLE <kbd>TYPESET</kbd></a>)
+and 1 (for
+<a href="docprocessing.html#printstyle">PRINTSTYLE <kbd>TYPEWRITE</kbd></a>).
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span>
+If your PARA_INDENT is 0 (i.e. no indenting of the first line of
+paragraphs), you <i>must</i> set a QUOTE_INDENT yourself, with a
+unit of measure appended to the argument. Mom has no default for
+QUOTE_INDENT if paragraph first lines are not being indented.
+</p>
+</div>
+
+<h4 id="always-fullspace-quotes" class="docs" style="margin-top: -.25em;">2. Spacing above and below quotes (typeset only)</h4>
+
+<p>
+If you&#8217;d like mom always to put a full linespace above and
+below quotes, invoke
+<br/>
+<span class="pre-in-pp">
+ .ALWAYS_FULLSPACE_QUOTES
+</span>
+with no argument. If you wish to restore mom&#8217;s
+default behaviour regarding the spacing of quotes (see
+<a href="#quote-spacing">Quote spacing</a>),
+invoke the macro with any argument (<kbd>OFF</kbd>, <kbd>QUIT</kbd>,
+<kbd>END</kbd>, <kbd>X</kbd>...)
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span>
+This macro also sets mom&#8217;s spacing policy for
+<a href="#blockquote-intro">blockquotes</a>.
+</p>
+</div>
+
+<h4 id="underline-quotes" class="docs" style="margin-top: -.25em;">3. Underlining quotes (typewrite only)</h4>
+
+<p>
+By default in
+<a href="docprocessing.html#printstyle">PRINTSTYLE TYPEWRITE</a>,
+mom underlines quotes. If you&#8217;d rather she didn&#8217;t,
+invoke <kbd>.UNDERLINE_QUOTES</kbd> with any argument
+(<kbd>OFF</kbd>, <kbd>QUIT</kbd>, <kbd>END</kbd>, <kbd>X</kbd>...)
+to disable the feature. Invoke it without an argument to restore
+mom&#8217;s default underlining of quotes.
+</p>
+
+<p>
+If you not only wish that mom not underline quotes, but also that
+she set them in italic, you must follow each instance of QUOTE with
+the typesetting macro
+<a href="typesetting.html#font">FT I</a>.
+Furthermore, since mom underlines all instances of italics by
+default in PRINTSTYLE&nbsp;TYPEWRITE, you must also make sure that
+ITALIC_MEANS_ITALIC is enabled (see
+<a href="docprocessing.html#typewrite-control">PRINTSTYLE TYPEWRITE control macros</a>).
+</p>
+
+<div class="rule-short"><hr/></div>
+
+<!-- ==================================================================== -->
+
+<h2 id="blockquote-intro" class="macro-group">Blockquotes (cited material)</h2>
+
+<ul style="margin-left: -.5em;">
+ <li><a href="#blockquote-description">Introduction</a></li>
+ <li><a href="#blockquote">Tag: BLOCKQUOTE</a></li>
+ <li><a href="#blockquote-control">BLOCKQUOTE control macros</a></li>
+</ul>
+
+<p id="blockquote-description">
+<a href="definitions.html#blockquote">Blockquotes</a>
+are used to cite passages from another author&#8217;s work. So that
+they stand out well from
+<a href="definitions.html#running">running text</a>,
+mom indents them from both the left and right margins and sets them
+in a different point size
+(<a href="docprocessing.html#printstyle">PRINTSTYLE TYPESET</a>
+only).
+<a href="definitions.html#outputline">Output lines</a>
+are
+<a href="definitions.html#filled">filled</a>,
+and, by default,
+<a href="definitions.html#quad">quadded</a>
+left.
+</p>
+
+<p>
+Besides indenting blockquotes, mom further sets them off from
+running text with a small amount of vertical whitespace top and
+bottom. (See
+<a href="#quote-spacing">Quote spacing</a>
+for a complete explanation of how this is managed, and how
+to control it.)
+</p>
+
+<p>
+Additional information concerning blockquotes, floats, and labelling
+blockquotes can be found in the sections
+<a href="#float-quote">Keeping quotes and blockquotes together as a block</a>,
+and
+<a href="#label-caption">Labelling/captioning quotes and blockquotes</a>.
+</p>
+
+<!-- -BLOCKQUOTE- -->
+
+<div class="macro-id-overline">
+<h3 id="blockquote" class="macro-id">BLOCKQUOTE</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>BLOCKQUOTE</b> <kbd class="macro-args">[ ADJUST +|-&lt;space&gt; ] | &lt;anything&gt;</kbd>
+</div>
+
+<p class="alias" style="margin-bottom: 0;">
+<i>Aliases: </i> <b>CITE, CITATION</b>
+</p>
+
+<p class="requires">
+&bull;&nbsp;The argument to <kbd style="font-style: normal">ADJUST</kbd> requires a
+<a href="definitions.html#unitofmeasure">unit of measure</a>
+</p>
+
+<p>
+BLOCKQUOTE is a toggle macro. To begin a cited passage, invoke
+the tag with no argument, then type in your blockquote. When
+you&#8217;re finished, invoke <kbd>.BLOCKQUOTE</kbd> with any
+argument (e.g. <kbd>OFF, END, X, Q</kbd>...) to turn it off.
+Example:
+<br/>
+<span class="pre-in-pp">
+ .BLOCKQUOTE
+ Redefining the role of the United States from enablers to keep
+ the peace to enablers to keep the peace from peacekeepers is
+ going to be an assignment.
+ .RIGHT
+ \[em]George W. Bush
+ .BLOCKQUOTE END
+</span>
+If the cited passage runs to more than one paragraph, you must
+introduce each paragraph&mdash;including the first&mdash;with
+<kbd><a href="#pp">.PP</a></kbd>.
+</p>
+
+<p>
+Mom does her best to equalize whitespace around blockquotes and make
+sure the line following it falls on a valid baseline. On occasion,
+you may need to tweak the blockquote placement slightly, which is
+done by passing <kbd>ADJUST</kbd> to BLOCKQUOTE with a plus or minus
+value. The blockquote will be lowered (<kbd>+</kbd>) or raised
+(<kbd>-</kbd>) <i>within the space allotted for it</i> by the given
+amount. For example, to raise a blockquote slightly within the
+space allotted for it, you&#8217;d do
+<br/>
+<span class="pre-in-pp">
+ .BLOCKQUOTE ADJUST -3p
+ True! - nervous - very, very dreadfully nervous I had been and
+ am; but why will you say that I am mad? The disease had sharpened
+ my senses - not destroyed - not dulled them.
+ .RIGHT
+ \[em]Edgar Allen Poe, The Tell-Tale Heart
+ .QUOTE off
+</span>
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span>
+The aliases CITE and CITATION may be used in place of the BLOCKQUOTE
+tag, as well as in any of the control macros that begin or end with
+BLOCKQUOTE_.
+</p>
+</div>
+
+<div class="defaults-container" style="background-color: #ded4bd; border: none;">
+<h3 id="blockquote-control" class="docs defaults">BLOCKQUOTE control macros and defaults</h3>
+
+<ol style="margin-top: .5em; padding-bottom: .5em;">
+ <li><a href="#blockquote-general">Family/font/size/leading/colour/quad/indent</a></li>
+ <li><a href="#bq-always-fullspace-quotes">Spacing above and below (typeset only)</a></li>
+</ol>
+</div>
+
+<h4 id="blockquote-general" class="docs" style="margin-top: -1.5em; margin-bottom: .5em;">1. Family/font/size/colour/quad/indent</h4>
+
+<div class="defaults-container" style="padding-bottom: 8px;">
+<p class="defaults" style="padding-top: 6px;">
+See
+<a href="#control-macro-args">Arguments to the control macros</a>.
+<br/>
+The following BLOCKQUOTE control macros may also be
+<a href="#grouping">grouped</a>
+using BLOCKQUOTE_STYLE.
+</p>
+<span class="pre defaults">
+.BLOCKQUOTE_FAMILY default = prevailing document family; default is Times Roman
+.BLOCKQUOTE_FONT default = roman
+.BLOCKQUOTE_SIZE default = -1 (point)
+<a id="blockquote-autolead">.BLOCKQUOTE_AUTOLEAD default = none; leading of blockquotes is the same as paragraphs</a>
+.BLOCKQUOTE_COLOR default = black
+.BLOCKQUOTE_QUAD default = left
+.BLOCKQUOTE_INDENT (see below)
+</span>
+</div>
+
+<h4 id="blockquote-indent" class="docs" style="margin-top: -1.5em;">Blockquote indent</h4>
+
+<p>
+<kbd>BLOCKQUOTE_INDENT</kbd> takes one of two kinds of argument: an
+integer representing the amount by which to multiply the argument
+passed to
+<a href="#para-indent">PARA_INDENT</a>
+(by default, 2
+<a href="definitions.html#em">ems</a>
+for TYPESET, 3
+<a href="definitions.html#picaspoints">picas</a>
+for TYPEWRITE) to arrive at the blockquote indent, or a distance with a
+<a href="definitions.html#unitofmesaure">unit of measure</a>
+appended. Both result in blockquotes being indented equally from
+the left and right margins.
+</p>
+
+<p>
+The default value for BLOCKQUOTE_INDENT is 3 (for
+<a href="docprocessing.html#printstyle">PRINTSTYLE <kbd>TYPESET</kbd></a>)
+and 1 (for
+<a href="docprocessing.html#printstyle">PRINTSTYLE <kbd>TYPEWRITE</kbd></a>).
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span>
+If your PARA_INDENT is 0 (i.e. no indenting of the first line of
+paragraphs), you must set a BLOCKQUOTE_INDENT yourself, with
+a unit of measure appended to the argument. Mom has no default for
+BLOCKQUOTE_INDENT if paragraph first lines are not being indented.
+</p>
+</div>
+
+
+
+<h4 id="bq-always-fullspace-quotes" class="docs">2. Spacing above and below blockquotes (typeset only)</h4>
+
+<p>
+If you&#8217;d like mom always to put a full linespace above and
+below blockquotes, invoke
+<br/>
+<span class="pre-in-pp">
+ .ALWAYS_FULLSPACE_QUOTES
+</span>
+with no argument. If you wish to restore mom&#8217;s default
+behaviour regarding the spacing of blockquotes (see
+<a href="#quote-spacing">Quote spacing</a>),
+invoke the macro with any argument (<kbd>OFF</kbd>, <kbd>QUIT</kbd>,
+<kbd>END</kbd>, <kbd>X</kbd>...).
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span>
+This macro also sets mom&#8217;s spacing policy for
+<a href="#quote-intro">quotes</a>.
+</p>
+</div>
+
+<div class="rule-short"><hr/></div>
+
+<!-- ==================================================================== -->
+
+<h2 id="code-intro" class="macro-group">Inserting code into a document</h2>
+
+<ul style="margin-left: -.5em;">
+ <li><a href="#code">Tag: CODE</a></li>
+ <li><a href="#code-control">CODE control macros and defaults</a></li>
+</ul>
+
+<p>
+CODE is a convenience macro that facilitates entering code blocks
+into documents. Its use is not restricted to documents created
+using mom&#8217;s document processing macros; it can be used for
+&#8220;manually&#8221; typeset documents as well.
+</p>
+
+<div class="macro-id-overline">
+<h3 id="code" class="macro-id">CODE</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>CODE</b> <kbd class="macro-args">[BR | BREAK | SPREAD] &lt;anything&gt;</kbd>
+</div>
+
+<p class="requires" style="font-style: normal">
+Inline escape: <b><kbd>\*[CODE]</kbd></b>
+</p>
+
+<p>
+When you invoke the macro CODE or insert
+<kbd><span class="nobr">\*[CODE]</span></kbd> into running text, mom switches to
+a
+<a href="definitions.html#fixedwidthfont">fixed-width font</a>
+(Courier, by default) and turns
+<a href="goodies.html#smartquotes">SMARTQUOTES</a>
+off.
+</p>
+
+<p>
+If your code includes the backslash character, which is
+groff&#8217;s escape character, you will have to change the
+escape character temporarily to something else with the macro
+<a href="goodies.html#esc-char">ESC_CHAR</a>.
+Mom has no way of knowing what special characters you&#8217;re going
+to use in code snippets, therefore she cannot automatically replace
+the escape character with something else.
+</p>
+
+<p>
+The correct order for changing the escape character inside
+<kbd>CODE</kbd> is
+<span class="pre-in-pp">
+ .CODE
+ .ESC_CHAR character
+ &lt;code&gt;
+ .ESC_CHAR \
+ .CODE OFF
+</span>
+Be aware that changing the escape character prevents subsequent
+macros, which require that the backslash be the escape character,
+from functioning correctly. Therefore, do not introduce any macros
+into your CODE block without first restoring the escape character to
+its default.
+</p>
+
+<p>
+Alternatively, you can enter the backslash character as
+<kbd>\e</kbd> or <kbd>\\</kbd> (two backslashes), which tells groff
+to print a literal backslash.
+</p>
+
+<div class="box-tip">
+<p class="tip-top">
+<span class="tip">Note:</span>
+<kbd>.CODE</kbd> does not cause a line break when
+you&#8217;re in a
+<a href="definitions.html#filled">fill mode</a>
+(i.e.
+<a href="typesetting.html#justify">JUSTIFY</a>
+or
+<a href="typesetting.html#quad">QUAD</a>
+<kbd>LEFT, CENTER,</kbd> or <kbd>RIGHT</kbd>).
+If you want CODE to deposit a break, invoke <kbd>.CODE</kbd> with
+the argument <kbd>BR</kbd> (or <kbd>BREAK</kbd>). If, in addition
+to having mom break the line before <kbd>.CODE</kbd>, you want her
+to
+<a href="definitions.html#force">force justify</a>
+it as well, invoke <kbd>.CODE</kbd> with the argument,
+<kbd>SPREAD</kbd>. If, in addition to breaking the line before CODE
+you want a break afterwards, you must supply it manually with
+<a href="typesetting.html#br">BR</a>
+unless what follows immediately is a macro that automatically causes
+a break (e.g.
+<a href="#pp">PP</a>).
+</p>
+
+<p id="quote-code" class="tip-bottom">
+In all likelihood, if you want the situation described above (i.e. a
+break before and after CODE), what you probably want is to use
+<a href="quote">QUOTE</a>
+in conjunction with CODE, like this:
+<br/>
+<span class="pre-in-pp">
+ .QUOTE
+ .CODE
+ $ echo "Hello, world" | sed -e 's/Hello,/Goodbye, cruel/'
+ .QUOTE OFF
+</span>
+QUOTE takes care of breaking both the text and the code, as well as
+indenting the code and offsetting it from
+<a href="definitions.html#running">running text</a>
+with vertical whitespace. Notice that <kbd>.CODE</kbd>, above, has
+no corresponding <kbd>.CODE OFF</kbd>. <kbd>.CODE</kbd> inside a QUOTE
+does not require a terminating <kbd>.CODE&nbsp;OFF</kbd>, which risks
+introducing unwanted vertical whitespace.
+</p>
+</div>
+
+<p>
+Passing any argument other than <kbd>BR</kbd>, <kbd>BREAK</kbd> or
+<kbd>SPREAD</kbd> to CODE (e.g. <kbd>OFF</kbd>, <kbd>QUIT</kbd>,
+<kbd>END</kbd>, <kbd>X</kbd>, etc) turns CODE off and returns the
+family, font, and smartquotes back to their former state.
+</p>
+
+<h4 class="docs" style="font-size: 102%">Using <kbd>\*[CODE]</kbd> inline</h4>
+
+<p>
+<kbd><span class="nobr">\*[CODE]</span></kbd> invokes <kbd>.CODE</kbd>, allowing you to
+bracket code snippets inline. It does not accept the <kbd>BR</kbd>,
+<kbd>BREAK</kbd>, or <kbd>SPREAD</kbd> arguments. It is most useful
+for short snippets, as in the following example.
+<br/>
+<span class="pre-in-pp">
+ \*[CODE]apropos\*[CODE X] and \*[CODE]man&nbsp;-k\*[CODE X] are identical.
+</span>
+</p>
+
+<p>
+<kbd><span class="nobr">\*[CODE]</span></kbd> does not permit changing the escape
+character, so <kbd>\e</kbd> or a doubled backslash must be used.
+Furthermore, if your code starts with a period, you must enter it as
+&#8220;<kbd>\&amp;.</kbd>&#8221;.
+<br/>
+<span class="pre-in-pp">
+ Registers are created with the \*[CODE]\&amp;.nr\*[CODE X] request.
+</span>
+</p>
+
+<h4 class="docs" style="font-size: 102%; margin-top: -1em">CODE and punctuation</h4>
+
+<p>
+<kbd>.CODE&nbsp;OFF</kbd> automatically inserts a word space into
+running text. If your CODE block is to be followed by punctuation
+with the parameters of
+<a href="definitions.html#running">running text</a>,
+you must terminate the block with &#8220;<kbd>\c</kbd>&#8221; and
+enter the punctuation at the beginning of the next input line. If
+the punctuation mark is a period or an apostrophe, you must precede
+it with
+&#8220;<kbd>\&amp;</kbd>&#8221;.
+<br/>
+<span class="pre-in-pp">
+ ...for example,
+ .CODE
+ echo "Hello, world" | sed -e 's/Hello,/Goodbye, cruel/'\c
+ .CODE OFF
+ \&amp;. As this demonstrates...
+</span>
+Use of <kbd><span class="nobr">\*[CODE]</span></kbd> inline does not require
+the <kbd>\c</kbd>, however periods and apostrophes after
+<kbd><span class="nobr">\*[CODE&nbsp;X]</span></kbd> still need to be introduced
+with <kbd>\&amp;</kbd>, as in this example:
+<br/>
+<span class="pre-in-pp">
+ ...append the unit of measure \*[CODE]p\*[CODE&nbsp;OFF]\&amp;. New sentence...
+</span>
+</p>
+
+
+<div class="defaults-container" style="background-color: #ded4bd; border: none;">
+<h3 id="code-control" class="docs defaults">CODE control macros and defaults</h3>
+
+<ol style="margin-top: .5em; padding-bottom: .5em;">
+ <li><a href="#code-general">Family/Font/Colour</a></li>
+ <li><a href="#code-size">Size</a></li>
+</ol>
+</div>
+
+<h4 id="code-general" class="docs" style="margin-top: -1.5em; margin-bottom: .5em;">1. Family/font/colour</h4>
+
+<div class="defaults-container" style="padding-bottom: 8px;">
+<p class="defaults" style="padding-top: 6px;">
+See
+<a href="#control-macro-args">Arguments to the control macros</a>.
+<br/>
+The following CODE control macros may also be
+<a href="#grouping">grouped</a>
+using CODE_STYLE.
+</p>
+<span class="pre defaults">
+.CODE_FAMILY default = Courier
+.CODE_FONT default = roman; see Note
+.CODE_COLOR default = black
+
+Note: Unlike other control macros, CODE_FONT sets the code font for both
+PRINTSTYLE TYPESET and PRINTSTYLE TYPEWRITE.
+</span>
+</div>
+
+<h4 id="code-size" class="docs" style="margin-top: -1.25em;">2. Size</h4>
+
+<p>
+CODE_SIZE works a little differently from the other _SIZE macros
+(see <a href="#control-macro-args">Arguments to the control
+macros</a>). The argument you pass it is a percentage of the
+prevailing document point size. It does not require a prepended
+plus (<kbd>+</kbd>) or minus (<kbd>-</kbd>) sign, nor an appended
+percent sign (<kbd>%</kbd>). Thus, if you want the point size of your CODE font to be
+90% of the prevailing document point size, you enter:
+<br/>
+<span class="pre-in-pp">
+ .CODE_SIZE 90
+</span>
+Fixed-width fonts have notoriously whimsical
+<a href="definitions.html#xheight">x-heights</a>,
+meaning that they frequently look bigger (or, in some cases,
+smaller) than the type surrounding them, even if they&#8217;re
+technically the same point size. CODE_SIZE lets you choose a
+percentage of the prevailing point size for your fixed-width
+CODE font so it doesn&#8217;t look gangly or minuscule in relation
+to the type around it. All invocations of <kbd>.CODE</kbd> or
+<kbd><span class="nobr">\*[CODE]</span></kbd> will use this size, so that if you
+decide to change the prevailing point size of your document, the
+CODE font will be scaled proportionally.
+</p>
+
+<div class="rule-short"><hr/></div>
+
+<!-- ==================================================================== -->
+
+<h2 id="list-intro" class="macro-group">Nested lists</h2>
+
+<ul style="margin-left: -.5em;">
+ <li><a href="#list">Tag: LIST</a></li>
+ <li><a href="#item">Tag: ITEM</a></li>
+ <li><a href="#list-control">LIST control macros and defaults</a></li>
+</ul>
+
+<p>
+Lists are points or items of interest or importance that are
+separated from
+<a href="definitions.html#running">running text</a>
+by enumerators. Some typical enumerators are
+<a href="definitions.html#em">en-dashes</a>,
+<a href="definitions.html#bullet">bullets</a>,
+digits and letters.
+</p>
+
+<p>
+Setting lists with mom is easy. First, you initialize a list with
+the LIST macro. Then, for every item in the list, you invoke
+the macro <kbd>.ITEM</kbd> followed by the text of the item.
+When a list is finished, you exit the list with
+<kbd>.LIST&nbsp;OFF</kbd> (or <kbd>QUIT</kbd>, <kbd>END</kbd>,
+<kbd>BACK</kbd>, etc.)
+</p>
+
+<p>
+By default mom starts each list with the enumerator flush with the
+left margin of running text that comes before it, like this:
+<br/>
+<span class="pre-in-pp">
+ My daily schedule needs organising. I can&#8217;t
+ seem to get everything done I want.
+ o an hour&#8217;s worth of exercise
+ o time to prepare at least one healthy
+ meal per day
+ o reading time
+ o work on mom
+ o writing
+ - changes from publisher
+ - current novel
+ o a couple of hours at the piano
+</span>
+In other words, mom does not, by default, indent entire lists.
+Indenting a list is controlled by the macro
+<a href="#shift-list">SHIFT_LIST</a>.
+(This is a design decision; there are too many instances where a
+default indent is not desirable.) Equally, mom does not add any
+extra space above or below lists.
+</p>
+
+<p>
+Lists can be nested (as in the example above). In other words,
+you can set lists within lists, each with an enumerator (and
+possibly, indent) of your choosing. In nested lists, each
+invocation of <kbd>.LIST&nbsp;OFF</kbd> (you may prefer to use
+<kbd>.LIST&nbsp;BACK</kbd>) takes you back to the previous depth
+(or level) of list, with that list&#8217;s enumerator and indent
+intact. The final <kbd>.LIST&nbsp;OFF</kbd> exits lists completely
+and returns you to the left margin of running text.
+</p>
+
+<p>
+If
+<kbd><a href="typesetting.html#quad">QUAD CENTER</a></kbd>
+is in effect when LIST is invoked, the list is set quad left but
+centred on the page as a block, based on the longest line of list
+text. Equally, if <kbd>QUAD RIGHT</kbd> in in effect, the list is
+set flush left but quadded right as a block. If you want a centred
+or right-quadded list in an otherwise left-quadded or justified
+document, simply invoke <kbd>.QUAD&nbsp;&lt;direction&gt;</kbd>
+before the list and reset the quad afterwards. Do not use
+<kbd><a href="typesetting.html#lrc">CENTER</a></kbd>
+or
+<kbd><a href="typesetting.html#lrc">RIGHT</a></kbd>.
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span>
+Mom centres lists over the entire line length, disregarding
+<a href="typesetting.html#ib">IB</a>
+if it is in effect. If there are lines in the list that exceed
+the margins of IB, they must be broken manually with
+<kbd>.BR</kbd> if you wish to keep them within the indented margins.
+</p>
+</div>
+
+<p>
+Finally, lists can be used in documents created with either the
+<a href="docprocessing.html#top">document processing macros</a>
+or just the
+<a href="typesetting.html#top">typesetting macros</a>.
+</p>
+
+<!-- -LIST- -->
+
+<div class="macro-id-overline">
+<h3 id="list" class="macro-id">LIST</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>LIST</b> <kbd class="macro-args">[ BULLET | DASH | DIGIT | ALPHA | alpha | ROMAN&lt;n&gt; | roman&lt;n&gt; | USER &lt;user-defined enumerator&gt; | PLAIN | VARIABLE &lt;character&gt;] [ &lt;separator&gt; ] [ &lt;prefix&gt; ] [ &lt;anything&gt; ]</kbd>
+</div>
+
+<p>
+Invoked by itself (i.e. with no argument), LIST
+initializes a list with bullets as the default enumerator.
+Afterwards, each block of input text preceded by
+<kbd><a href="#item">.ITEM</a></kbd>,
+on a line by itself, is treated as a list item.
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span>
+Every time you invoke <kbd>.LIST</kbd> to start a list (as opposed to
+<a href="#list-exit">exiting one</a>),
+you must supply an enumerator (and optionally, a separator) for the
+list, unless you want mom&#8217;s default enumerator, which is a
+bullet. Within nested lists, mom stores the enumerator, separator
+and indent for any list you return <i>backwards</i> to (i.e. with
+<kbd>.LIST OFF</kbd>), but does not store any information for lists
+you move <i>forward</i> to.
+</p>
+</div>
+
+<p>
+There are a lot of arguments (be sure to side-scroll through them
+all, above), so I&#8217;ll discuss them one at a time here.
+</p>
+<h3 class="docs">The first argument &ndash; enumerator style</h3>
+
+<p>
+The optional arguments <kbd>BULLET</kbd>, <kbd>DASH</kbd>,
+<kbd>DIGIT</kbd> (for Arabic numerals), <kbd>ALPHA</kbd> (for
+uppercase letters), <kbd>alpha</kbd> (for lowercase letters),
+<kbd>ROMAN&lt;n&gt;</kbd> (for uppercase roman numerals),
+<kbd>roman&lt;n&gt;</kbd> (for lowercase roman numerals) tell
+mom what kind of enumerator to use for a given list.
+</p>
+
+<p>
+The arguments, <kbd>ROMAN&lt;n&gt;</kbd> and
+<kbd>roman&lt;n&gt;</kbd>, are special. You must append to them
+a digit (arabic, e.g. "1" or "9" or "17") saying how many items a
+particular roman-numeraled LIST is going to have. Mom requires this
+information in order to align roman numerals sensibly, and will
+abort&mdash;with a message &mdash; if you don&#8217;t provide it.
+(For setting roman numeral and digit lists with the enumerators
+aligned flush right&mdash;the default is flush left&mdash;see
+<a href="#pad-list-digits">PAD_LIST_DIGITS</a>.)
+</p>
+
+<p>
+A roman-numeraled list containing, say, five items, would be set
+up like this:
+<br/>
+<span class="pre-in-pp">
+ .LIST roman5 producing i) Item 1.
+ .ITEM ii) Item 2.
+ Item 1. iii) Item 3.
+ .ITEM iv) Item 4.
+ Item 2. v) Item 5.
+ .ITEM
+ Item 3
+ .ITEM
+ Item 4
+ .ITEM
+ Item 5
+</span>
+</p>
+
+<p>
+The argument <kbd>VARIABLE&nbsp;&lt;character&gt;</kbd> lets
+you choose different enumerators for the items in a list.
+<kbd>&lt;character&gt;</kbd> is the widest enumerator to
+be used. Thus, if you have a list enumerated by both bullets
+and em-dashes, you&#8217;d set it up with
+<br/>
+<span class="pre-in-pp">
+ .LIST VARIABLE \[em]
+</span>
+and select the enumerator you want with
+<br/>
+<span class="pre-in-pp">
+ .ITEM \[em]
+</span>
+or
+<br/>
+<span class="pre-in-pp">
+ .ITEM \[bu]
+</span>
+If your enumerator contains spaces, you must enclose the
+<kbd>&lt;character&gt;</kbd> argument in both LIST and ITEM in
+double-quotes, e.g.
+<br/>
+<span class="pre-in-pp">
+ .LIST VARIABLE "\*[UP 1p]\[bu]\*[DOWN 1p]"
+ .ITEM "\*[UP 1p]\[bu]\*[DOWN 1p]"
+</span>
+</p>
+
+<p>
+The argument <kbd>USER</kbd> lets you make up your own enumerator,
+and must be followed by a second argument: what you&#8217;d like the
+enumerator to look like. For example, if you want a list enumerated
+with <kbd>=&gt;</kbd>,
+<br/>
+<span class="pre-in-pp">
+ .LIST USER =&gt;
+ .ITEM
+ A list item
+</span>
+
+will produce
+<br/>
+<span class="pre-in-pp">
+ =&gt; A list item
+</span>
+Some useful special groff characters you might want to pass to
+<kbd>USER</kbd> are:
+<span class="pre-in-pp">
+ \[sq] - square box
+ \[rh] - pointing hand
+ \[-&gt;] - right arrow
+ \[rA] - right double arrow
+ \[OK] - checkmark
+</span>
+The size and vertical positioning of special characters may be
+adjusted with
+<a href="definitions.html#inlines">inline escapes</a>
+in the argument passed to USER. For example, to raise the position
+of <kbd><span class="nobr">\[sq]</span></kbd> slightly, you might do
+<span class="pre-in-pp">
+ .LIST USER "\*[UP .25p]\[sq]\*[DOWN .25p]"
+ or
+ .LIST USER \v'-.25p'\[sq]\v'.25p'
+</span>
+</p>
+
+<p>
+The argument <kbd>PLAIN</kbd> initializes a list with no enumerator.
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span>
+If the argument to <kbd>USER</kbd> contains spaces, you must enclose
+the argument in double quotes.
+</p>
+</div>
+
+<h3 class="docs">The second argument &ndash; separator style</h3>
+
+<p>
+If you choose <kbd>DIGIT</kbd>, <kbd>ALPHA</kbd>, <kbd>alpha</kbd>,
+<kbd>ROMAN&lt;n&gt;</kbd>, or <kbd>roman&lt;n&gt;</kbd>, you may
+enter the optional argument, <kbd>separator</kbd>, to say what kind
+of separator you want after the enumerator. The separator can be
+anything you like. The default for <kbd>DIGIT</kbd> is a period
+(dot), like this:
+<br/>
+<span class="pre-in-pp">
+ 1. A list item
+</span>
+The default separator for <kbd>ALPHA</kbd>, <kbd>alpha</kbd>,
+<kbd>ROMAN&lt;n&gt;</kbd> and <kbd>roman&lt;n&gt;</kbd> is a right
+parenthesis, like this:
+<br/>
+<span class="pre-in-pp">
+ a) An alpha-ed list item
+ b) A second alpha-ed list item
+</span>
+If you&#8217;d prefer, say, digits with right-parenthesis separators
+instead of the default period, you&#8217;d do
+<br/>
+<span class="pre-in-pp">
+ .LIST DIGIT )
+ .ITEM
+ A numbered list item
+</span>
+which would produce
+<br/>
+<span class="pre-in-pp">
+ 1) A numbered list item
+</span>
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span>
+<kbd>BULLET</kbd>, <kbd>DASH</kbd> and <kbd>USER</kbd> do not take a
+separator.
+</p>
+</div>
+
+<h3 class="docs">The third argument &ndash; prefix style</h3>
+
+<p>
+Additionally, you may give a prefix (i.e. a character
+that comes <i>before</i> the enumerator) when your
+enumerator style for a particular list is <kbd>DIGIT</kbd>,
+<kbd>ALPHA</kbd>, <kbd>alpha</kbd>, <kbd>ROMAN&lt;n&gt;</kbd> or
+<kbd>roman&lt;n&gt;</kbd>. In the arguments to LIST, the prefix
+comes <i>after</i> the separator, which is counter-intuitive,
+so please be careful.
+</p>
+
+<p>
+A prefix can be anything you like. Most likely, you&#8217;ll want
+some kind of open-bracket, such as a left parenthesis. If, for
+example, you want a <kbd>DIGIT</kbd> list with the numbers enclosed
+in parentheses, you&#8217;d enter
+<br/>
+<span class="pre-in-pp">
+ .LIST DIGIT ) (
+ .ITEM
+ The first item on the list.
+ .ITEM
+ The second item on the list.
+</span>
+which would produce
+<br/>
+<span class="pre-in-pp">
+ (1) The first item on the list.
+ (2) The second item on the list.
+</span>
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span>
+<kbd>BULLET</kbd>, <kbd>DASH</kbd> and
+<kbd>USER</kbd> do not take a prefix.
+</p>
+</div>
+
+<h3 class="docs">Exiting lists &ndash; LIST OFF / BACK or QUIT_LISTS</h3>
+
+<p>
+Any single argument to <kbd>LIST</kbd> other than
+<kbd>BULLET</kbd>, <kbd>DASH</kbd>, <kbd>DIGIT</kbd>,
+<kbd>ALPHA</kbd>, <kbd>alpha</kbd>, <kbd>ROMAN&lt;n&gt;</kbd>,
+<kbd>roman&lt;n&gt;</kbd> or <kbd>USER</kbd> (e.g.
+<kbd>LIST&nbsp;OFF</kbd> or <kbd>LIST&nbsp;BACK</kbd>) takes you out
+of the current list.
+</p>
+
+<p>
+If you are at the first list-level (or list-depth), mom returns you
+to the left margin of running text. Any indents that were in effect
+prior to setting the list are fully restored.
+</p>
+
+<p>
+If you are in a nested list, mom moves you back one list-level
+(i.e., does not take you out of the list structure) and restores the
+enumerator, separator and indent appropriate to that level.
+</p>
+
+<p>
+Each invocation of <kbd>.LIST</kbd> should thus be matched by
+a corresponding <kbd>.LIST&nbsp;OFF</kbd> in order to fully exit
+lists. For example,
+<br/>
+<span class="pre-in-pp">
+ Lorem ipsum dolor sit amet, consetetur sadipscing elitr,
+ sed diam nonumy eirmod tempor invidunt ut labore.
+ o List item in level 1
+ o List item in level 1
+ - List item in level 2
+ - List item in level 2
+ Lorem ipsum dolor sit amet, consetetur sadipscing elitr,
+ sed diam nonumy eirmod tempor invidunt ut labore.
+</span>
+is created like this:
+<br/>
+<span class="pre-in-pp">
+ Lorem ipsum dolor sit amet, consetetur sadipscing elitr,
+ sed diam nonumy eirmod tempor invidunt ut labore.
+ .LIST BULLET
+ .ITEM
+ List item in level 1
+ .ITEM
+ List item in level 1
+ .LIST DASH
+ .ITEM
+ List item in level 2
+ .ITEM
+ List item in level 2
+ .LIST OFF \" Turn level 2 list off
+ .LIST OFF \" Turn level 1 list off
+ Lorem ipsum dolor sit amet, consetetur sadipscing elitr,
+ sed diam nonumy eirmod tempor invidunt ut labore.
+</span>
+Alternatively, you may use the single-purpose macro
+<kbd>.QUIT_LISTS</kbd>, to get yourself out of a list structure. In
+the example above, the two <kbd>.LIST&nbsp;OFF</kbd> lines could be
+replaced with a single <kbd>.QUIT_LISTS</kbd>.
+</p>
+
+<div class="macro-id-overline">
+<h3 id="item" class="macro-id">ITEM</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>ITEM</b> <kbd class="macro-args">[&lt;enumerator&gt;] [&lt;space&gt;]</kbd>
+</div>
+<p class="requires">
+&bull;&nbsp;The argument to <kbd style="font-style: normal">&lt;space&gt;</kbd> requires a
+<a href="definitions.html#unitofmeasure">unit of measure</a>
+</p>
+
+<p>
+After you&#8217;ve initialized a list with
+<a href="#list">LIST</a>,
+precede each item you want in the list with <kbd>.ITEM</kbd>. Mom
+takes care of everything else with respect to setting the item
+appropriate to the list you&#8217;re in.
+</p>
+
+<p>
+If you&#8217;ve chosen the <kbd>VARIABLE</kbd> argument when
+invoking LIST, ITEM must be followed by an enumerator character.
+</p>
+
+<p>
+If you give ITEM a space argument, either by itself or after a
+variable enumerator character, the item will be spaced by the amount
+of the argument.
+</p>
+
+<p>
+In document processing, it is valid to have list items that contain
+multiple paragraphs. Simply issue a
+<kbd><a href="#pp">.PP</a></kbd>
+request for each paragraph <i>following</i> the first item.
+I.e., don&#8217;t do this:
+<br/>
+<span class="pre-in-pp">
+ .ITEM
+ .PP
+ Some text...
+ .PP
+ A second paragraph of text
+</span>
+but rather
+<br/>
+<span class="pre-in-pp">
+ .ITEM
+ Some text...
+ .PP
+ A second paragraph of text
+</span>
+</p>
+
+<div class="defaults-container" style="background-color: #ded4bd; border: none;">
+<h3 id="list-control" class="docs defaults">LIST control macros and defaults</h3>
+
+<p style="margin-top: 0; margin-left: .5em">
+LIST control macros may not be
+<a href="#grouping">grouped</a>.
+</p>
+
+<ol style="margin-top: -.5em; padding-left: 1.5em; padding-bottom: .5em;">
+ <li><a href="#shift-list">Indenting lists (SHIFT_LIST)</a></li>
+ <li><a href="#reset-list">Resetting an initialized list&#8217;s enumerator (RESET_LIST)</a></li>
+ <li><a href="#pad-list-digits">Padding digit enumerators (PAD_LIST_DIGITS)</a></li>
+</ol>
+</div>
+
+<h4 id="shift-list" class="docs" style="margin-top: -1.5em;">1. Indenting lists &ndash; SHIFT_LIST</h4>
+
+<p>
+If you want a list to be indented to the right of running text, or
+indented to the right of a current list, use the macro SHIFT_LIST
+immediately after
+<a href="#list">LIST</a>.
+SHIFT_LIST takes just one argument: the amount by which you want the
+list shifted to the right. The argument requires a
+<a href="definitions.html#unitofmeasure">unit of measure</a>.
+</p>
+
+<p>
+SHIFT_LIST applies only to the list you just initialized with LIST.
+It does not carry over from one invocation of LIST to the next.
+However, the indent remains in effect when you return to a list
+level in a nested list.
+</p>
+
+<p>
+For example, if you want a 2-level list, with each list indented to
+the right by 18
+<a href="definitions.html#picaspoints">points</a>,
+<br/>
+<span class="pre-in-pp">
+ Lorem ipsum dolor sit amet, consetetur sadipscing elitr,
+ sed diam nonumy eirmod tempor invidunt ut labore.
+ .LIST \" List 1
+ .SHIFT_LIST 18p \" Indent 18 points right of running text
+ .ITEM
+ List 1 item
+ .ITEM
+ List 1 item
+ .LIST DASH \" List 2
+ .SHIFT_LIST 18p \" Indent 18 points right of list 1
+ .ITEM
+ List 2 item
+ .ITEM
+ List 2 item
+ .LIST OFF \" Move back to list 1
+ .ITEM
+ List 1 item
+ .ITEM
+ List 1 item
+ .LIST OFF \" Exit lists
+ Lorem ipsum dolor sit amet, consetetur sadipscing elitr,
+ sed diam nonumy eirmod tempor invidunt ut labore.
+</span>
+produces (approximately)
+<br/>
+<span class="pre-in-pp">
+ Lorem ipsum dolor sit amet, consetetur sadipscing elitr,
+ sed diam nonumy eirmod tempor invidunt ut labore.
+ &bull; List 1 item
+ &bull; List 1 item
+ - List 2 item
+ - List 2 item
+ &bull; List 1 item
+ &bull; List 1 item
+ Lorem ipsum dolor sit amet, consetetur sadipscing elitr,
+ sed diam nonumy eirmod tempor invidunt ut labore.
+</span>
+</p>
+
+<h4 id="reset-list" class="docs" style="margin-top: -.25em;">2. Resetting an initialized list&#8217;s enumerator &ndash; RESET_LIST</h4>
+
+<p>
+In nested lists, if your choice of enumerator for a given level
+of list is <kbd>DIGIT</kbd>, <kbd>ALPHA</kbd>, <kbd>alpha</kbd>,
+<kbd>ROMAN</kbd> or <kbd>roman</kbd>, you may sometimes want to
+reset the list&#8217;s enumerator when you return to that list.
+Consider the following:
+<br/>
+<span class="pre-in-pp">
+ Things to do religiously each and every day:
+ &bull; take care of the dog
+ a) walk every day
+ b) brush once a week
+ - trim around the eyes every fourth brushing
+ - don&#8217;t forget to check nails
+ &bull; feed the cat
+ d) soft food on Mon., Wed. and Fri.
+ e) dry food on Tues., Thurs. and Sat.
+ f) canned tuna on Sunday
+</span>
+</p>
+
+<p>
+The alpha-enumerated items under &#8220;Feed the cat&#8221;
+would be normally a), b), c), but we want d), e), f). The
+solution is to reset the second <kbd>.LIST alpha</kbd>&#8217;s
+enumerator&mdash;before the first <kbd>.ITEM</kbd>&mdash;with
+the macro RESET_LIST.
+</p>
+
+<p>
+With no argument, <kbd>.RESET_LIST</kbd> resets an incrementing
+enumerator to 1, A, a, I or i depending on the style of enumerator.
+If you pass <kbd>.RESET_LIST</kbd> a
+<a href="definitions.html#numericargument">numeric argument</a>,
+it represents the starting position for an incrementing enumerator. In
+the example above, <kbd>.RESET_LIST 4</kbd>&nbsp;starts the second
+alpha-ed list at d).
+</p>
+
+<h4 id="pad-list-digits" class="docs" style="margin-top: -.25em;">3. Padding digit enumerators &ndash; PAD_LIST_DIGITS</h4>
+
+<h5 class="docs" style="margin-top: 1em;">Arabic digits</h5>
+
+<p style="margin-top: .5em;">
+When your choice of enumerators is DIGIT and the number of items
+in the list exceeds nine (9), you have to make a design decision:
+should mom leave room for the extra numeral in two-numeral digits to
+the right or the left of the single-numeral digits?
+</p>
+
+<p>
+If you want the extra space to the right, invoke the macro
+<kbd>.PAD_LIST_DIGITS</kbd> (with no argument), after
+<kbd>.LIST</kbd> and before <kbd>.ITEM</kbd>. This will produce
+something like
+<br/>
+<span class="pre-in-pp">
+ 8. List item
+ 9. List item
+ 10. List item
+</span>
+If you want the extra space to the left, invoke
+<kbd>.PAD_LIST_DIGITS</kbd> with the single argument,
+<kbd>LEFT</kbd>, which will produce
+<br/>
+<span class="pre-in-pp">
+ 8. List item
+ 9. List item
+ 10. List item
+</span>
+</p>
+
+<p>
+Of course, if the number of items in the list is less than ten
+(10), there&#8217;s no need for PAD_LIST_DIGITS.
+</p>
+
+<h5 class="docs" style="margin-top: -.5em;">Roman numerals</h5>
+
+<p style="margin-top: .5em;">
+By default, mom sets roman numerals in lists flush left. The
+<kbd>&lt;n&gt;</kbd> argument appended to <kbd>ROMAN&lt;n&gt;</kbd>
+or <kbd>roman&lt;n&gt;</kbd> allows her to calculate how much space
+to put after each numeral in order to ensure that the text of items
+lines up properly.
+</p>
+
+<p>
+If you&#8217;d like the roman numerals to line
+up flush right (i.e. be padded "left"), simply
+invoke <kbd>.PAD_LIST_DIGITS&nbsp;LEFT</kbd> after
+<kbd>.LIST&nbsp;ROMAN&lt;n&gt;</kbd> or
+<kbd>.LIST&nbsp;roman&lt;n&gt;</kbd> and before <kbd>.ITEM</kbd>.
+</p>
+
+<div class="rule-short"><hr/></div>
+
+<!-- -LINE NUMBERING- -->
+
+<h2 id="number-lines-intro" class="macro-group">Line numbering &ndash; prepend numbers to output lines</h2>
+
+<ul style="margin-left: -.5em;">
+ <li><a href="#number-lines">Macro: <b>NUMBER_LINES</b></a>
+ <ul style="margin-left: -.5em;">
+ <li><a href="#ln-control">Line numbering control (off/suspend, resume)</a></li>
+ </ul></li>
+ <li><a href="#number-lines-control">Control macros and defaults</a>
+ <ul style="margin-left: -.5em;">
+ <li><a href="#number-quote-lines">Line numbering control macros for quotes and blockquotes</a></li>
+ </ul></li>
+</ul>
+
+<p style="margin-top: -.5em;">
+When you turn line-numbering on, mom, by default
+</p>
+<ul style="margin-top: -.5em;">
+ <li>numbers every line of paragraph text; line-numbering is
+ suspended for all other document processing tags (like
+ docheaders, epigraphs, headings, quotes, etc.) and special
+ pages (covers, endotes, bibliographies, etc.); be aware,
+ though, that if you turn
+ <a href="definitions.html#docheader">docheaders</a>
+ off (with
+ <a href="docprocessing.html#docheader">DOCHEADER</a> OFF)
+ and create your own docheader, mom
+ <i>will</i> line-number your custom docheader, so turn
+ line numbering on afterwards
+ </li>
+ <li>doesn&#8217;t touch your line length; line numbers are hung
+ outside your current left margin (as set with
+ <a href="typesetting.html#l-margin">L_MARGIN</a>,
+ <a href="typesetting.html#page">PAGE</a>
+ or
+ <a href="docprocessing.html#doc-left-margin">DOC_LEFT_MARGIN</a>),
+ regardless of any indents that may be active
+ </li>
+ <li>separates line numbers from running text by two
+ <a href="definitions.html#figurespace">figure spaces</a>.
+ </li>
+</ul>
+
+<p>
+Mom expects that
+<a href="#quote">QUOTE</a>s
+and
+<a href="#blockquote">BLOCKQUOTE</a>s
+will not be line-numbered, however control macros are provided to
+enable line numbering for either.
+See
+<a href="#number-quote-lines">Line numbering control macros for quotes and blockquotes</a>.
+</p>
+
+<!-- -NUMBER_LINES- -->
+
+<div class="macro-id-overline">
+<h3 id="number-lines" class="macro-id">NUMBER_LINES</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>NUMBER_LINES</b> <kbd class="macro-args">&lt;start number&gt; [ &lt;which lines to number&gt; [ &lt;gutter&gt; ] ]</kbd>
+</div>
+
+<div class="box-macro-args" style="margin-top: 1em;">
+Macro: <b>NUMBER_LINES</b> <kbd class="macro-args">&lt;anything&gt; | RESUME</kbd>
+</div>
+
+<p>
+NUMBER_LINES does what it says: prints line numbers, to the left of
+<a href="definitions.html#outputline">output lines</a>
+of paragraph text. One of the chief reasons for wanting numbered
+lines is in order to identify footnotes or endnotes by line number
+instead of by a marker in the text. (See
+<a href="#footnotes-by-linenumber">Footnotes by linenumber</a>
+for instructions on line-numbered footnotes, and
+<a href="#endnote-marker-style">ENDNOTE_MARKER_STYLE LINE</a>
+for instructions on line-numbered endnotes.)
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span>
+Do not use NUMBER_LINES inside
+<a href="#quote">QUOTE</a>
+or
+<a href="#blockquote">BLOCKQUOTE</a>.
+By default, mom expects that quotes and blockquotes will not be
+line numbered. If you wish to enable line numbering for them, you
+must invoke
+<a href="#number-quote-lines">NUMBER_QUOTE_LINES</a>
+or
+<a href="#number-quote-lines">NUMBER_BLOCKQUOTE_LINES</a>.
+</p>
+</div>
+
+
+<p>
+The first time you invoke
+<a href="#number-lines">NUMBER_LINES</a>
+you must, at a minimum, tell it what line number you want the
+<i>next</i>
+<a href="definitions.html#outputline">output line</a>
+to have. The optional arguments <kbd>&lt;which lines to number&gt;</kbd>
+and <kbd>&lt;gutter&gt;</kbd> allow you to state which lines should
+be numbered (e.g. every five or every ten lines), and the gutter to
+place between line numbers and
+<a href="definitions.html#running">running text</a>.
+</p>
+
+<p>
+For example, if you want mom to number output lines using her defaults,
+<span class="pre-in-pp">
+ .NUMBER_LINES 1
+</span>
+will prepend the number, 1, to the next output line and number all
+subsequent output lines sequentially.
+</p>
+
+<p>
+If you want only every five lines numbered, pass mom the optional
+<kbd>&lt;which lines to number&gt;</kbd> argument, like this:
+<span class="pre-in-pp">
+ .NUMBER_LINES 1 5
+</span>
+</p>
+
+<div class="box-important">
+<p class="tip-top">
+<span class="important">GOTCHA!</span>
+The argument to <kbd>&lt;which lines to number&gt;</kbd> instructs
+mom to number only those lines that are multiples of the argument.
+Hence, in the above example, line number <kbd>1</kbd> will
+<i>not</i> be numbered, since <kbd>1</kbd> is not a multiple of
+<kbd>5</kbd>.
+</p>
+
+<p>
+If you want line number <kbd>1</kbd> to be numbered, you have
+to invoke <kbd><span class="nobr">.NUMBER_LINES 1 1</span></kbd> before the
+first output line you want numbered, then study your <i>output</i>
+copy and determine where best to insert the following in your
+<i>input</i> text:
+<br/>
+<span class="pre-in-pp">
+ .NUMBER_LINES \n[ln] 5
+</span>
+(The escape <kbd>\n[ln]</kbd> ensures that NUMBER_LINES
+automatically supplies the correct value for the first argument,
+<kbd>&lt;start number&gt;</kbd>.)
+</p>
+
+<p class="tip-bottom">
+Following this recipe, line number <kbd>1</kbd> will be numbered;
+subsequently, only line numbers that are multiples of 5 will be
+numbered. A little experimentation may be required to determine the
+best place for it in your input text.
+</p>
+</div>
+
+<p>
+The optional argument, <kbd>&lt;gutter&gt;</kbd>, tells mom how much
+space to put between the line numbers and the running text.
+<kbd>&lt;gutter&gt;</kbd> does not require (or even accept) a
+<a href="definitions.html#unitofmeasure">unit of measure</a>.
+The argument you pass to it is the number of
+<a href="definitions.html#figurespace">figure spaces</a>
+you want between line numbers and running text.
+Mom&#8217;s default gutter is two figure spaces. If
+you&#8217;d like a wider gutter, say, four figures spaces, you&#8217;d do
+<br/>
+<span class="pre-in-pp">
+ .NUMBER_LINES 1 1 4
+ |
+ +-- Notice you *must* supply a value
+ for the 2nd argument in order to supply
+ a value for the 3rd.
+</span>
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span>
+When giving a value for <kbd>&lt;gutter&gt;</kbd>, you cannot skip
+the <kbd>&lt;which lines to number&gt;</kbd> argument. Either fill
+in the desired value, or use two double-quotes ( <kbd>""</kbd> ) to
+have mom use the value formerly in effect.
+</p>
+</div>
+
+<h3 id="ln-control" class="docs" style="margin-top: -.5em;">Off/suspend, resume</h3>
+
+<p style="margin-top: .5em;">
+After initializing line numbering, you can suspend it, with the
+option to resume, using
+<br/>
+<span class="pre-in-pp">
+ .NUMBER_LINES&nbsp;OFF
+</span>
+(or <kbd>END</kbd>, <kbd>QUIT</kbd>, <kbd>X</kbd>, etc).
+</p>
+
+<p>To resume line numbering:
+<br/>
+<span class="pre-in-pp">
+ .NUMBER_LINES RESUME
+</span>
+When you resume, the line number will be the next in sequence
+from where you left off. If that is not what you want&mdash;say
+you want to reset the line number to <kbd>1</kbd>&mdash;re-invoke
+<kbd>.NUMBER_LINES</kbd> with whatever arguments are needed for the
+desired result.
+</p>
+
+<div class="box-tip" style="margin-left: 6px;">
+<p class="tip">
+<span class="note">Additional notes:</span>
+</p>
+<ol style="margin-top: -1.25em; margin-left: -1.25em; padding-bottom: .5em;">
+ <li>In document processing, you may invoke
+ <kbd>.NUMBER_LINES</kbd> either before or after
+ <kbd>.START</kbd>. Mom doesn&#8217;t care.
+ </li>
+ <li style="margin-top: .25em;">If you&#8217;re collating documents with
+ <a href="rectoverso.html#collate">COLLATE</a>,
+ you should re-invoke, at a minimum,
+ <kbd>.NUMBER_LINES&nbsp;1</kbd> for each collated
+ document, in order to ensure that each begins with the
+ number <kbd>1</kbd> prepended to the first line.
+ </li>
+ <li style="margin-top: .25em;">Occasionally, you may want to
+ change the current gutter between line numbers and running
+ text without knowing what the next output line number should
+ be. Since NUMBER_LINES requires this number as its first
+ argument, in such instances, pass NUMBER_LINES as its first
+ argument the escape
+ <kbd>\n[ln]</kbd>.
+ <br/>
+ <span style="display: block; margin-top: .5em;">For example, if you were numbering every 5 lines with a
+ gutter of 2 (figure spaces) and you needed to change the
+ gutter to 4 (figures spaces),
+ <br/>
+ <span class="pre-in-pp" style="margin-bottom: -2em;">
+ .NUMBER_LINES \n[ln] 5 4
+ </span>
+ would do the trick.
+ </span>
+ </li>
+ <li style="margin-top: .25em;">If you&#8217;re using
+ <a href="#mn-intro">margin notes</a>
+ in a document, be sure to set the gutter for margin notes wide
+ enough to allow room for the line numbers.
+ </li>
+ <li style="margin-top: .25em;">Mom (groff, actually), only numbers
+ lines <i>to the left</i> of running text. For aesthetic
+ reason, therefore, the use of line numbering when setting a
+ document in columns is discouraged. However, should you wish
+ to number lines when setting in columns, make sure the
+ <a href="definitions.html#gutter">gutter(s)</a>
+ between columns is wide enough to leave room for the numbers.
+ </li>
+</ol>
+</div>
+
+<div class="defaults-container" style="background-color: #ded4bd; border: none;">
+<h3 id="number-lines-control" class="docs defaults">NUMBER_LINES control macros and defaults</h3>
+
+<ol style="margin-top: .5em; padding-bottom: .5em;">
+ <li><a href="#number-lines-general">Family/font/size/colour</a></li>
+ <li><a href="#number-lines-per-section">Reset line numbering after COLLATE</a></li>
+ <li><a href="#number-quote-lines">Line numbering control for quotes and blockquotes</a>
+ <ul style="padding-left: 1em">
+ <li><a href="#number-quote-lines-global">Including QUOTEs and BLOCKQUOTEs in the line numbering scheme</a></li>
+ <li><a href="#number-quote-lines-selective">Selectively enabling line numbering for QUOTEs and BLOCKQUOTEs</a></li>
+ <li><a href="#number-quote-lines-gutter">Changing the line number gutter for QUOTEs and BLOCKQUOTEs</a></li>
+ <li><a href="#number-quote-lines-silent">Silently increment line numbers during QUOTE and BLOCKQUOTE</a></li>
+ </ul></li>
+</ol>
+</div>
+
+<h4 id="number-lines-general" class="docs" style="margin-top: -1.5em; margin-bottom: .5em;">1. Family/font/size/colour</h4>
+
+<div class="defaults-container" style="padding-bottom: 8px;">
+<p class="defaults" style="padding-top: 6px;">
+See
+<a href="#control-macro-args">Arguments to the control macros</a>.
+<br/>
+The following NUMBER_LINES control macros may also be
+<a href="#grouping">grouped</a>
+using LINENUMBER_STYLE.
+</p>
+<span class="pre defaults">
+.LINENUMBER_FAMILY default = prevailing family or document family; default is Times Roman
+.LINENUMBER_FONT default = prevailing font
+.LINENUMBER_SIZE default = +0
+.LINENUMBER_COLOR default = black
+</span>
+</div>
+
+<h4 id="number-lines-per-section" class="docs" style="margin-top: -1.75em;">2. Reset line numbering after COLLATE</h4>
+
+<p>
+After
+<a href="rectoverso.html#collate">COLLATE</a>,
+line numbering continues from where it left off. If you would like
+each chapter or major document section to begin its line numbering
+at &#8220;1&#8221;, invoke
+<span class="pre-in-pp">
+ .NUMBER_LINES_PER_SECTION
+</span>
+after
+<a href="#number-lines"><kbd>.NUMBER_LINES</kbd></a>.
+</p>
+
+<h4 id="number-quote-lines" class="docs" style="margin-top: 0em;">3. Line numbering control macros for QUOTE and BLOCKQUOTE</h4>
+
+<h5 id="number-quote-lines-global" class="docs" style="font-size: 87%">&bull;&nbsp;Including QUOTEs and BLOCKQUOTEs in the line numbering scheme</h5>
+
+<p>
+If you&#8217;d like mom to number lines in a
+<a href="#quote">QUOTE</a>
+or
+<a href="#blockquote">BLOCKQUOTE</a>
+as part of the same order and sequence as paragraph text,
+invoke
+<span class="pre-in-pp">
+ .NUMBER_QUOTE_LINES
+</span>
+or
+<span class="pre-in-pp">
+ .NUMBER_BLOCKQUOTE_LINES
+</span>
+either before or after NUMBER_LINES. Both behave identically with
+respect to the affected macro (i.e. QUOTE or BLOCKQUOTE).
+</p>
+
+<h5 id="number-quote-lines-selective" class="docs" style="font-size: 87%">&bull;&nbsp;Selectively enabling line numbering for QUOTEs and BLOCKQUOTEs</h5>
+
+<p>
+If you&#8217;d like to enable line numbering selectively for quotes
+and blockquotes <i>only</i>, invoke <kbd>.NUMBER_QUOTE_LINES</kbd>
+or <kbd>.NUMBER_BLOCKQUOTE_LINES</kbd> first, followed by
+<kbd>.NUMBER_LINES&nbsp;&lt;n&gt;</kbd>, where <kbd>&lt;n&gt;</kbd>
+is the first line number of the quote or blockquote. Afterwards,
+enter your QUOTE or BLOCKQUOTE. When the quote or blockquote
+is finished (i.e. after <kbd>.QUOTE&nbsp;OFF</kbd> or
+<kbd>.BLOCKQUOTE&nbsp;OFF</kbd>), turn line numbering off. Each
+subsequent quote or blockquote you want line numbered requires
+only <kbd>.NUMBER_LINES &lt;n&gt;</kbd> (with a corresponding
+<kbd>.NUMBER_LINES OFF</kbd>) until you turn NUMBER_QUOTE_LINES or
+NUMBER_BLOCKQUOTE_LINES off.
+</p>
+
+<p>
+Here&#8217;s a recipe where the first line number of quotes starts
+repeatedly at &#8220;1&#8221;.
+<span class="pre-in-pp">
+ &lt;running text&gt;
+ .NUMBER_QUOTE_LINES
+ .NUMBER_LINES 1
+ .QUOTE
+ &lt;text of quote&gt;
+ .QUOTE OFF
+ .NUMBER_LINES OFF
+ &lt;further running text&gt;
+ .NUMBER_LINES 1
+ .QUOTE
+ &lt;text of quote&gt;
+ .QUOTE OFF
+ .NUMBER_LINES OFF
+ &lt;further running text&gt;
+</span>
+</p>
+
+<h5 id="number-quote-lines-gutter" class="docs" style="font-size: 87%">&bull;&nbsp;Changing the line number gutter for QUOTEs and BLOCKQUOTEs</h5>
+
+<p>
+Owing to groff&#8217;s restriction on accepting only the figure
+space as the line number
+<a href="definitions.html#gutter">gutter</a>&#8217;s
+unit of measure, it is not possible for line numbers in quotes
+or blockquotes to hang outside a document&#8217;s overall left
+margin and be reliably flush with the line numbers of paragraph
+text. Consequently, line numbers in quotes or blockquotes hang
+to the left of the quote, separated by the currently active
+gutter for NUMBER_LINES.
+</p>
+
+<p>
+If you&#8217;d like to change the line number gutter for quotes
+or blockquotes, invoke <kbd>.NUMBER_QUOTE_LINES</kbd> or
+<kbd>.NUMBER_BLOCKQUOTE_LINES</kbd> with a digit representing the
+number of
+<a href="definitions.html#figurespace">figure spaces</a>
+you&#8217;d like between the line numbers and the quoted text, like this:
+<br/>
+<span class="pre-in-pp">
+ .NUMBER_QUOTE_LINES 3
+</span>
+With the above, line numbers in quotes (and only quotes) will have
+a gutter of 3 figure spaces.
+</p>
+
+<h5 id="number-quote-lines-silent" class="docs" style="font-size: 87%">&bull;&nbsp;Silently increment line numbers during QUOTE and BLOCKQUOTE</h5>
+
+<p>
+If you&#8217;ve asked mom not to line number quotes or blockquotes,
+but would like line numbering to continue while they&#8217;re
+being output (as opposed to mom&#8217;s default behaviour of
+<i>suspending</i> incrementing of line numbers during the output of
+quotes and blockquotes), invoke
+<span class="pre-in-pp">
+ .NUMBER_QUOTE_LINES&nbsp;SILENT
+</span>
+or
+<span class="pre-in-pp">
+ .NUMBER_BLOCKQUOTE_LINES&nbsp;SILENT
+</span>
+With these, mom continues to increment line numbers while quotes
+or blockquotes are being output, but the line numbers won&#8217;t
+appear in the output copy.
+</p>
+
+<p>
+Once having turned NUMBER_QUOTE_LINES or NUMBER_BLOCKQUOTE_LINES on,
+you may disable them with
+<span class="pre-in-pp">
+ .NUMBER_QUOTE_LINES OFF
+</span>
+or
+<span class="pre-in-pp">
+ .NUMBER_BLOCKQUOTE_LINES OFF
+</span>
+</p>
+
+<div class="rule-short"><hr/></div>
+
+<!-- ==================================================================== -->
+
+<h2 id="footnote-intro" class="macro-group">Footnotes</h2>
+
+<ul>
+ <li><a href="#footnote-behaviour">Footnote behaviour</a>
+ <ul style="margin-left: -.5em;">
+ <li><a href="#fn-and-punct">Footnote markers and punctuation in the running text</a></li>
+ </ul></li>
+ <li><a href="#footnote">Tag: FOOTNOTE</a></li>
+ <li><a href="#footnote-control">Footnote control macros and defaults</a></li>
+</ul>
+
+<p>
+For something so complex behind the scenes, footnotes are easy to use.
+You just type, for example,
+<br/>
+<span id="footnote-example" class="pre-in-pp">
+ ...the doctrines of Identity as urged by Schelling\c
+ .FOOTNOTE
+ &lt;footnote about who the hell is Schelling&gt;
+ .FOOTNOTE OFF
+ were generally the points of discussion presenting the most
+ of beauty to the imaginative Morella.
+</span>
+and be done with it.
+(Note the obligatory use of the <kbd>\c</kbd>
+<a href="definitions.html#inlines">inline escape</a>,
+required whenever your
+<a href="#footnote-marker-style">FOOTNOTE_MARKER_STYLE</a>
+is either <kbd>STAR</kbd> [star/dagger footnotes] or
+<kbd>NUMBER</kbd> [superscript numbers].)
+</p>
+
+<p>
+After you invoke <kbd>.FOOTNOTE</kbd>, mom takes care of everything:
+putting footnote markers in the body of the document, keeping track
+of how many footnotes are on the page, identifying the footnotes
+themselves appropriately, balancing them properly with the bottom
+margin, deferring footnotes that don&#8217;t fit on the page...
+Even if you&#8217;re using
+<a href="docprocessing.html#columns">COLUMNS</a>,
+mom knows what to do, and Does The Right Thing.
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span>
+See
+<a href="refer.html">refer.html</a>
+for information on using footnotes with the <kbd>refer</kbd>
+bibliographic database.
+</p>
+</div>
+
+<h3 id="footnote-behaviour" class="docs">Footnote behaviour</h3>
+
+<p>
+Footnotes can be sly little beasts. If you&#8217;re writing a
+document that&#8217;s footnote-heavy, you might want to read the
+following.
+</p>
+
+<p>
+By default, mom marks footnotes with alternating stars (asterisks),
+daggers, and double-daggers. The first footnote gets a star, the
+second a dagger, the third a double-dagger, the fourth two stars,
+the fifth two daggers, etc. If you prefer numbered footnotes, rest
+assured mom is happy to oblige.
+</p>
+
+<p>
+A small amount of vertical whitespace and a short horizontal rule
+separate footnotes from the document body. When
+<a href="docprocessing.html#flex-vs-shim">shimming</a>
+is enabled, the amount of whitespace
+may vary slightly from page to page depending on the number of lines
+in the footnotes. Mom tries for a nice balance between too little
+whitespace and too much, but when push comes to shove, she&#8217;ll
+usually opt for ample over cramped. The last lines of footnotes are
+always flush with the document&#8217;s bottom margin.
+</p>
+
+<p>
+When
+<a href="docprocessing.html#flex-vs-shim">flex-spacing</a>
+is enabled, the distance between the last line of text and the
+first footnote is always the same.
+</p>
+
+<p>
+If mom sees that a portion of a footnote cannot be fit on its page,
+she carries that portion over to the next page. If an entire
+footnote can&#8217;t be fit on its page (i.e., FOOTNOTE has been
+called too close to the bottom), she defers the footnote to the next
+page, but sets it with the appropriate marker from the previous
+page.
+</p>
+
+<p>
+When footnotes occur within cited text, for example a
+<a href="#quote">QUOTE</a>
+or a
+<a href="#blockquote">BLOCKQUOTE</a>,
+mom will usually opt for deferring the footnote over to the next
+page if it allows her to complete the cited text on one page.
+</p>
+
+<p>
+In the unfortunate happenstance that a deferred footnote is the
+only footnote on its page (i.e., it&#8217;s marked in the document
+body with a star) and the page it&#8217;s deferred to has its own
+footnotes, mom separates the deferred footnote from the page&#8217;s
+proper footnote(s) with a blank line. This avoids the confusion
+that might result from readers seeing two footnote entries on
+the same page identified by a single star (or the number 1 if
+you&#8217;ve requested numbered footnotes that begin at 1 on every
+page). The blank line makes it clear that the first footnote entry
+belongs to the previous page.
+</p>
+
+<p>
+In the circumstance where a deferred footnote is not the only one
+on its page, and is consequently marked by something other than
+a single star, there&#8217;s no confusion and mom doesn&#8217;t
+bother with the blank line. (By convention, the first footnote on
+a page is always marked with a single star, so if readers see, say,
+a dagger or double-dagger marking the first footnote entry,
+they&#8217;ll know the entry belongs to the previous page).
+</p>
+
+<p>
+Very exceptionally, two footnotes may have to be deferred (e.g., one
+occurs on the second to last line of a page, and another on the last
+line). In such a circumstance, mom does not add
+a blank after the second deferred footnote. If you&#8217;d like a blank
+line separating both deferred footnotes from any footnotes proper to
+the page the deferred ones were moved to, add the space manually by
+putting a
+<a href="typesetting.html#space"><kbd>.SPACE</kbd></a>
+command at the end of the footnote text, before
+<kbd>.FOOTNOTE&nbsp;OFF</kbd> (or <kbd>OFF</kbd>, <kbd>QUIT</kbd>,
+<kbd>END</kbd>, <kbd>X</kbd>, etc).
+</p>
+
+<p>
+Obviously, deferred footnotes aren&#8217;t an issue if you request
+numbered footnotes that increase incrementally throughout the whole
+document&mdash;yet another convenience mom has thought of.
+</p>
+
+<p>
+While mom&#8217;s handling of footnotes is sophisticated,
+and tries to take nearly every imaginable situation under which they
+might occur into account, some situations are simply impossible from
+a typographic standpoint. For example, if you have a
+<a href="#head">HEAD</a>
+near the bottom of a page and the page has some footnotes on it, mom
+may simply not have room to set any text under the head (normally,
+she insists on having room for at least one line of text beneath
+a head). In such an instance, mom will either set the head, with
+nothing under it but footnotes, or transfer the head to the next
+page. Either way, you&#8217;ll have a gaping hole at the bottom
+of the page. It&#8217;s a sort of typographic Catch-22, and can
+only be resolved by you, the writer or formatter of the document,
+adjusting the type on the offending page so as to circumvent the
+problem.
+</p>
+
+<h3 id="fn-and-punct" class="docs">Footnote markers and punctuation in the running text</h3>
+
+<ol style="margin-left: -1.25em;">
+ <li><a href="#fn-and-punct-fill">&#8220;Fill&#8221; modes &ndash; JUSTIFY, or QUAD LEFT | CENTER | RIGHT</a></li>
+ <li><a href="#fn-and-punct-nofill">&#8220;No-fill&#8221; modes &ndash; LEFT, CENTER, RIGHT</a></li>
+</ol>
+
+<h4 id="fn-and-punct-fill" class="docs">1. &#8220;Fill&#8221; modes &ndash; JUSTIFY, or QUAD LEFT | CENTER | RIGHT</h4>
+
+<p>
+In
+<a href="definitions.html#filled">fill</a>
+modes, the correct way to enter the line after
+<kbd>.FOOTNOTE&nbsp;OFF</kbd> is to input it as if it&#8217;s
+literally a continuation of the input line you were entering before
+you invoked <kbd>.FOOTNOTE</kbd>. Therefore, if necessary, the
+input line may have to begin with space(s) or a punctuation mark, as
+in the two following examples.
+</p>
+
+<div id="examples-footnotes-1" class="examples-container" style="padding-bottom: 1em;">
+<div class="examples" style="margin-top: 0; margin-bottom: -.25em;">Example 1</div>
+<span class="pre">
+A line of text,\c
+.FOOTNOTE
+A footnote line.
+.FOOTNOTE OFF
+ broken up with a comma.
+^
+(last line begins with a literal space)
+</span>
+</div>
+
+<div id="examples-footnotes-2" class="examples-container" style="margin-top: 1em; padding-bottom: 1em;">
+<div class="examples" style="margin-top: 0; margin-bottom: -.25em;">Example 2</div>
+<span class="pre">
+A line of text\c
+.FOOTNOTE
+A footnote line.
+.FOOTNOTE OFF
+, broken up with a comma.
+^
+(last line begins with a comma and a space)
+</span>
+</div>
+
+<p>
+Example 1 produces, on output
+<br/>
+<span class="pre-in-pp">
+ A line of text,* broken up with a comma.
+</span>
+Example 2 produces
+<br/>
+<span class="pre-in-pp">
+ A line of text*, broken up with a comma.
+</span>
+Care must be taken, though, if the punctuation mark that begins the
+line after <kbd>.FOOTNOTE&nbsp;OFF</kbd> is a period (dot). You
+<b><i>must</i></b> begin such lines with <kbd>\&amp;.</kbd>, like
+this:
+<br/>
+<span class="pre-in-pp">
+ ...end of sentence\c
+ .FOOTNOTE
+ A footnote line.
+ .FOOTNOTE OFF
+ \&amp;. A new sentence...
+</span>
+If you omit the <kbd>\&amp;.</kbd>, the line will vanish!
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span>
+The document element tags,
+<a href="#epigraph">EPIGRAPH</a>
+and
+<a href="#blockquote">BLOCKQUOTE</a>,
+imply a fill mode, therefore these instructions also apply when you
+insert a footnote into epigraphs or blockquotes.
+</p>
+</div>
+
+<h4 id="fn-and-punct-nofill" class="docs">2. &#8220;No-fill&#8221; modes &ndash; LEFT, CENTER, RIGHT</h4>
+
+<p>
+In
+<a href="definitions.html#filled">no-fill</a>
+modes, you must decide a) whether text on the <i>input</i> line
+after <kbd>.FOOTNOTE&nbsp;OFF</kbd> is to be joined to the
+<i>output</i> line before <kbd>.FOOTNOTE</kbd> was invoked, or b)
+whether you want the <i>output</i> text to begin on a new line.
+</p>
+
+<p>
+In the first instance, simply follow the instructions,
+<a href="#fn-and-punct-fill">above</a>,
+for fill modes.
+</p>
+
+<p>
+In the second instance, you must explicitly tell mom that
+you want input text after <kbd>.FOOTNOTE&nbsp;OFF</kbd> to
+begin on a new output line. This is accomplished by passing
+<kbd>.FOOTNOTE&nbsp;OFF</kbd> (or <kbd>OFF</kbd>, <kbd>QUIT</kbd>,
+<kbd>END</kbd>, <kbd>X</kbd>, etc) an additional argument:
+<kbd>BREAK</kbd> or <kbd>BR</kbd>.
+</p>
+
+<p>
+Study the two examples below to understand the difference.
+</p>
+
+<div id="examples-footnotes-3" class="examples-container" style="padding-bottom: 1em;">
+<div class="examples" style="margin-top: 0; margin-bottom: -.25em;">Example 1</div>
+<span class="pre">
+.LEFT
+A line of text\c
+.FOOTNOTE
+A footnote line
+.FOOTNOTE OFF
+that carries on after the footnote.
+</span>
+</div>
+
+<div id="examples-footnotes-4" class="examples-container" style="margin-top: 1em; padding-bottom: 1em;">
+<div class="examples" style="margin-top: 0; margin-bottom: -.25em;">Example 2</div>
+<span class="pre">
+.LEFT
+A line of text\c
+.FOOTNOTE
+A footnote line
+.FOOTNOTE OFF BREAK
+that doesn&#8217;t carry on after the footnote.
+</span>
+</div>
+
+<p>
+Example 1, on output, produces
+<br/>
+<span class="pre-in-pp">
+ A line of text* that carries on after the footnote.
+</span>
+whereas Example 2 produces
+<span class="pre-in-pp">
+ A line of text*
+ that doesn&#8217;t carry on after the footnote.
+</span>
+The distinction becomes particularly important if you like to see
+punctuation marks come <i>after</i> footnote markers. In no-fill
+modes, that&#8217;s accomplished like this:
+<br/>
+<span class="pre-in-pp">
+ .LEFT
+ A line of text\c
+ .FOOTNOTE
+ A footnote line
+ .FOOTNOTE OFF
+ ,
+ broken up with a comma.
+</span>
+The output of the above looks like this:
+<br/>
+<span class="pre-in-pp">
+ A line of text*,
+ broken up with a comma.
+</span>
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span>
+The document element tag,
+<a href="#quote">QUOTE</a>,
+implies a no-fill mode, therefore these instructions also apply when
+you insert footnotes into quotes.
+</p>
+</div>
+
+<!-- -FOOTNOTE- -->
+
+<div class="macro-id-overline">
+<h3 id="footnote" class="macro-id">FOOTNOTE</h3>
+</div>
+
+<div class="box-macro-args">
+Tag: FOOTNOTE <kbd class="macro-args">&lt;toggle&gt; [ BREAK | BR ] [ INDENT LEFT | RIGHT | BOTH &lt;indent value&gt; ]</kbd>
+</div>
+
+<p class="requires">
+&bull;&nbsp;<kbd><span style="font-style: normal">&lt;indent value&gt;</span></kbd> requires a <a href="definitions.html#unitofmeasure">unit of measure</a>
+<br/>
+See <span style="font-style: normal"><a href="#footnote-note">HYPER-IMPORTANT NOTE</a></span>.
+</p>
+
+<p>
+FOOTNOTE is a toggle macro, therefore invoking it on a line by
+itself allows you to enter a footnote in the body of a document.
+Invoking it with any argument other than <kbd>INDENT</kbd> (i.e.
+<kbd>OFF</kbd>, <kbd>QUIT</kbd>, <kbd>END</kbd>, <kbd>X</kbd>...)
+tells mom you&#8217;re finished.
+</p>
+
+<p>
+Footnotes are the only element of
+<a href="definitions.html#running">running text</a>
+that are not affected by the typesetting
+<a href="typesetting.html#indents">indent macros</a>.
+In the unlikely event that you want a page&#8217;s footnotes to
+line up with a running indent, invoke <kbd>.FOOTNOTE</kbd> with
+the <kbd>INDENT</kbd> argument and pass it an indent direction and
+indent value. <kbd>L, R,</kbd> and <kbd>B</kbd> may be used in place
+of <kbd>LEFT, RIGHT,</kbd> and <kbd>BOTH</kbd>. FOOTNOTE must be
+invoked with <kbd>INDENT</kbd> for every footnote you want indented;
+mom does not save any footnote indent information from invocation to
+invocation.
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span>
+If a footnote runs to more than one paragraph, do <i>not</i> begin
+the footnote with the
+<a href="#pp">PP</a>
+tag. Use <kbd>.PP</kbd> only to introduce subsequent paragraphs.
+</p>
+</div>
+
+<div id="footnote-note" class="box-tip">
+<p class="tip-top">
+<span class="note">HYPER-IMPORTANT NOTE:</span>
+The final word on the
+<a href="definitions.html#inputline">input line</a>
+that comes immediately before FOOTNOTE <i>must</i> terminate with a
+<kbd><a href="typesetting.html#join">\c</a></kbd>
+inline escape if your
+<a href="#footnote-marker-style">FOOTNOTE_MARKER_STYLE</a>
+is either <kbd>STAR</kbd> or <kbd>NUMBER</kbd>. See the
+<a href="#footnote-example">footnote example</a>
+above.
+</p>
+
+<p>
+Additionally, in
+<a href="definitions.html#filled">fill</a>
+modes
+(<a href="typesetting.html#justify">JUSTIFY</a>
+or
+<a href="typesetting.html#quad">QUAD</a>),
+the line <i>after</i> a <kbd>.FOOTNOTE&nbsp;OFF</kbd> should be
+entered as if there were no interruption in the input text, i.e.,
+the line should begin with a literal space or punctuation mark (see
+explanation and examples
+<a href="#fn-and-punct">here</a>).
+</p>
+
+<p>
+In
+<a href="definitions.html#filled">no-fill</a>
+modes, the optional argument <kbd>BREAK</kbd> or <kbd>BR</kbd> may
+be used after the <kbd>OFF</kbd> (or <kbd>OFF</kbd>,
+<kbd>QUIT</kbd>, <kbd>END</kbd>, <kbd>X</kbd>, etc) argument to
+instruct mom not to join the next input line to the previous output.
+See
+<a href="#fn-and-punct-nofill">here</a>
+for a more complete explanation, with examples.
+</p>
+
+<p class="tip-bottom">
+Do not use the <kbd>\c</kbd> inline escape if your
+FOOTNOTE_MARKER_STYLE is <kbd>LINE</kbd>, or if you have disabled
+footnote markers with
+<kbd><a href="#footnote-markers">.FOOTNOTE_MARKERS OFF</a></kbd>.
+In these instances, the line after <kbd>.FOOTNOTE&nbsp;OFF</kbd>
+should be entered normally.
+</p>
+</div>
+
+<div class="defaults-container" style="background-color: #ded4bd; border: none;">
+<h3 id="footnote-control" class="docs defaults">FOOTNOTE control macros and defaults</h3>
+
+<ol style="margin-top: .5em; padding-bottom: .5em;">
+ <li><a href="#footnote-general">Family/font/size/colour/lead/quad</a></li>
+ <li><a href="#footnote-markers">Footnote markers</a> &ndash; on or off</li>
+ <li><a href="#footnote-marker-style">Footnote marker style</a> &ndash; star+dagger or numbered
+ <ul style="margin-left: -.5em; list-style-type: disc;">
+ <li><a href="#footnote-number-placeholders">Left padding of footnote numbers</a></li>
+ </ul></li>
+ <li><a href="#footnotes-by-linenumber">Footnotes by line number</a>
+ <ul style="margin-left: -.5em; list-style-type: disc;">
+ <li><a href="#footnote-linenumber-brackets">FOOTNOTE_LINENUMBER_BRACKETS</a></li>
+ <li><a href="#footnote-linenumber-separator">FOOTNOTE_LINENUMBER_SEPARATOR</a></li>
+ <li><a href="#footnotes-run-on">FOOTNOTES_RUN_ON</a> &ndash; line-numbered footnotes only</li>
+ </ul></li>
+ <li><a href="#reset-footnote-number">Reset footnote number</a> &ndash; set footnote marker number to 1</li>
+ <li><a href="#footnote-space">Inter-footnote spacing</a></li>
+ <li><a href="#footnote-rule">Footnote rule</a> &ndash; on or off</li>
+ <li><a href="#footnote-rule-length">Footnote rule length</a> &ndash; length of footnote separator rule</li>
+ <li><a href="#footnote-rule-weight">Footnote rule weight</a> &ndash; weight of footnote separator rule</li>
+ <li><a href="#footnote-rule-adj">Adjust vertical position of footnote separator rule</a></li>
+</ol>
+</div>
+
+<h4 id="footnote-general" class="docs" style="margin-top: -1.5em; margin-bottom: .5em;">1. Family/font/size/colour/lead/quad</h4>
+
+<div class="defaults-container" style="padding-bottom: 8px;">
+<p class="defaults" style="padding-top: 6px;">
+See
+<a href="#control-macro-args">Arguments to the control macros</a>.
+<br/>
+The following FOOTNOTE control macros may also be
+<a href="#grouping">grouped</a>
+using FOOTNOTE_STYLE.
+</p>
+<span class="pre defaults">
+.FOOTNOTE_FAMILY default = prevailing document family; default is Times Roman
+.FOOTNOTE_FONT default = roman
+.FOOTNOTE_SIZE default = -2 (points)
+.FOOTNOTE_COLOR default = black
+.FOOTNOTE_AUTOLEAD default = 2 points (typeset); single-spaced (typewrite)
+.FOOTNOTE_QUAD default = same as paragraphs
+</span>
+</div>
+
+<h4 id="footnote-markers" class="docs" style="margin-top: -1.25em;">2. Footnote markers &ndash; FOOTNOTE_MARKERS</h4>
+
+<p>
+If you don&#8217;t want footnote markers in either the body of
+the document or beside footnote entries themselves, toggle them
+off with <kbd>.FOOTNOTE_MARKERS&nbsp;OFF</kbd> (or <kbd>OFF</kbd>,
+<kbd>QUIT</kbd>, <kbd>END</kbd>, <kbd>X</kbd>...). This means,
+of course, that you&#8217;ll have to roll your own. If you want
+them back on, invoke <kbd>.FOOTNOTE_MARKERS</kbd> with no argument.
+Footnote markers are on by default.
+</p>
+
+<p>
+If FOOTNOTE_MARKERS are disabled, do not use the <kbd>\c</kbd>
+inline escape to terminate the line before <kbd>.FOOTNOTE</kbd>.
+</p>
+
+<h4 id="footnote-marker-style" class="docs" style="margin-top: -.25em;">3. Footnote marker style &ndash; FOOTNOTE_MARKER_STYLE</h4>
+
+<p>
+Mom gives you two choices of footnote marker style: star+dagger (see
+<a href="#footnote-behaviour">footnote behaviour</a>
+above), or numbered.
+</p>
+
+<p>
+<kbd>.FOOTNOTE_MARKER_STYLE STAR</kbd> gives you star+dagger (the
+default). There is a limit of 10 footnotes per page with this
+style.
+</p>
+
+<p>
+<kbd>.FOOTNOTE_MARKER_STYLE NUMBER</kbd> gives you superscript
+numbers, both in the document body and in the footnote entries
+themselves. By default, footnote numbers increase incrementally
+(prev. footnote number + 1) throughout the whole document. You
+can ask mom to start each page&#8217;s footnote numbers at 1 with
+<kbd>.RESET_FOOTNOTE_NUMBER</kbd>
+(<a href="#reset-footnote-number">see below</a>.)
+</p>
+
+<p>
+If your
+<a href="docprocessing.html#printstyle">PRINTSTYLE</a>
+is <kbd>TYPEWRITE</kbd> and you would prefer that the footnotes
+themselves not use superscript numbers, you may pass
+<kbd>.FOOTNOTE_MARKER_STYLE NUMBER</kbd> an additional argument:
+<kbd>NO_SUPERSCRIPT</kbd>. While the marker in the text will still
+be superscript, the footnotes themselves will be identified with
+normal-sized, base aligned numbers, surrounded by parentheses.
+</p>
+
+<h5 id="footnote-number-placeholders" class="docs">Left padding of footnote numbers</h5>
+
+<p>
+When footnote numbering is enabled, in order to ensure that the
+left margin of footnote text aligns regardless of the footnote
+number, you sometimes have to pad the footnote numbers. This will
+be the case any time the footnote numbers change from 9 to 10 on
+the same page, or from 99 to 100. Consider this scenario:
+<br/>
+<span class="pre-in-pp">
+ <sup>9</sup>&nbsp;Footnote text
+ <sup>10</sup>&nbsp;Footnote text
+ <sup>11</sup>&nbsp;Footnote text
+</span>
+As you can see, the left margins of the footnotes are not aligned.
+</p>
+
+<p>
+In order to correct this, use the macro
+<kbd>.FOOTNOTE_NUMBER_PLACEHOLDERS</kbd>, which takes a single
+argument: the number of placeholders in the longer digit. For
+example, placed at an appropriate point in your input file,
+<kbd>.FOOTNOTE_NUMBER_PLACEHOLDERS&nbsp;2</kbd> causes the above
+example to come out like this:
+<br/>
+<span class="pre-in-pp">
+ <sup> 9</sup> Footnote text
+ <sup>10</sup> Footnote text
+ <sup>11</sup> Footnote text
+</span>
+Given the impossibility of knowing in advance when the number of
+placeholders required for footnote numbers will change, you must
+study your <i>output</i> file to determine where to insert this
+macro into your <i>input</i> file.
+</p>
+
+<p>
+Obviously, mom does not provide a default for
+<kbd>.FOOTNOTE_NUMBER_PLACEHOLDERS</kbd>.
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span>
+<kbd>.FOOTNOTE_NUMBER_PLACEHOLDERS</kbd> affects both superscript
+footnote numbers, and, in
+<a href="docprocessing.html#printstyle">PRINTSTYLE TYPEWRITE</a>,
+the normal, base-aligned numbers surrounded by parentheses that you
+get with
+<kbd>.FOOTNOTE_MARKER_STYLE&nbsp;NUMBER&nbsp;NO_SUPERSCRIPT</kbd>.
+</p>
+</div>
+
+<h4 id="footnotes-by-linenumber" class="docs" style="margin-top: -.25em;">4. Footnotes by line number &ndash; FOOTNOTE_MARKER_STYLE LINE</h4>
+
+<p>
+FOOTNOTE_MARKER_STYLE with the argument, <kbd>LINE</kbd> lets you
+have footnotes which are identified by line number, rather than by a
+marker in the text. (Note that
+<a href="#number-lines">NUMBER_LINES</a>
+must be enabled in order to use this marker style.)
+</p>
+
+<p>
+With FOOTNOTE_MARKER_STYLE <kbd>LINE</kbd>, mom will identify
+footnotes either by single line numbers, or line ranges. If
+what you want is a single line number, you need only invoke
+<kbd>.FOOTNOTE</kbd>, <i>without the terminating</i> <kbd>\c</kbd>,
+at the appropriate place in running text. Input lines after the
+footnote has been terminated (e.g. with
+<kbd>.FOOTNOTE&nbsp;OFF</kbd>) are entered normally.
+</p>
+
+<p>
+If you want a range of line numbers (e.g.&nbsp;[5-11]&nbsp;),
+insert, directly into the first line of the range you want, the
+<a href="definitions.html#inlines">inline escape</a>,
+<kbd><span class="nobr">\*[FN_MARK]</span></kbd>. For the terminating line
+number of the range, you need only invoke <kbd>.FOOTNOTE</kbd>
+(again, without the terminating <kbd>\c</kbd>); mom is smart enough
+to figure out that where <kbd>.FOOTNOTE</kbd> was invoked represents
+the terminating line number.
+</p>
+
+<p>
+Range-numbered footnotes are always output on the page
+where <kbd>.FOOTNOTE</kbd> was invoked, not the page where
+<kbd><span class="nobr">\*[FN_MARK]</span></kbd> appears (subject, of course, to
+the rules for footnotes that fall too close to the bottom of a page,
+as outlined
+<a href="#footnote-rules">here</a>).
+</p>
+
+<p>
+The behaviour of line-numbered footnotes can be controlled with the
+macros:
+<br/>
+<span style="display: inline-block; margin-left: 2em; margin-top: .5em;"><a href="#footnote-linenumber-brackets">FOOTNOTE_LINENUMBER_BRACKETS</a></span>
+<br/>
+<span style="margin-left: 2em;"><a href="#footnote-linenumber-separator">FOOTNOTE_LINENUMBER_SEPARATOR</a></span>
+<br/>
+<span style="margin-left: 2em;"><a href="#footnotes-run-on">FOOTNOTES_RUN_ON</a></span>
+</p>
+
+<div style="margin-left: 1.25em;">
+<h5 id="footnote-linenumber-brackets" class="docs" style="margin-top: -.25em;">&bull;&nbsp;FOOTNOTE_LINENUMBER_BRACKETS</h5>
+
+<p style="margin-left: .5em;">
+Mom, by default, surrounds footnote line numbers with square
+brackets. The style of the brackets may be changed with the macro
+<br/>
+<span class="pre-in-pp">
+ .FOOTNOTE_LINENUMBER_BRACKETS
+</span>
+which takes one of three possible arguments: <kbd>PARENS</kbd>
+(round brackets), <kbd>SQUARE</kbd> (the default) or
+<kbd>BRACES</kbd> (curly braces). If you prefer a shortform, the
+arguments, <kbd>(</kbd>, <kbd>[</kbd> or <kbd>{</kbd> may be used
+instead.
+</p>
+
+<p style="margin-left: .5em;">Thus, for example, either
+<br/>
+<span class="pre-in-pp">
+ .FOOTNOTE_LINENUMBER_BRACKETS PARENS
+</span>
+or
+<br/>
+<span class="pre-in-pp">
+ .FOOTNOTE_LINENUMBER_BRACKETS (
+</span>
+will surround footnote line numbers with round brackets.
+</p>
+
+<h5 id="footnote-linenumber-separator" class="docs" style="margin-top: -.25em;">&bull;&nbsp;FOOTNOTE_LINENUMBER_SEPARATOR</h5>
+
+<p style="margin-left: .5em;">
+If you don&#8217;t want the numbers enclosed in brackets, you
+may tell mom to use a &#8220;separator&#8221; instead. A common
+separator would be the colon, but it can be anything you like.
+The macro to do this is
+<br/>
+<span class="pre-in-pp">
+ .FOOTNOTE_LINENUMBER_SEPARATOR
+</span>
+which takes, as its single argument, the separator you want. For
+safety and consistency&#8217;s sake, always enclose the argument in
+double-quotes. The separator can be composed of any valid groff
+character, or any combination of characters.
+</p>
+
+<p style="margin-left: .5em;">
+<b>A word of caution:</b> when using a separator, mom doesn&#8217;t
+insert any space after the separator. Hence, if you want space
+(you probably do), you must make the space part of the argument you
+pass to FOOTNOTE_LINENUMBER_SEPARATOR. For example, to get a colon
+separator with a space after it, you&#8217;d do
+<br/>
+<span class="pre-in-pp">
+ .FOOTNOTE_LINENUMBER_SEPARATOR ": "
+</span>
+</p>
+
+<h5 id="footnotes-run-on" class="docs" style="margin-top: -1em;">&bull;&nbsp;FOOTNOTES_RUN_ON</h5>
+
+<p style="margin-left: .5em;">
+Finally, if your footnote marker style is <kbd>LINE</kbd>, you may
+instruct mom to do &#8220;run-on style&#8221; footnotes. Run-on
+footnotes do not treat footnotes as discrete entities, i.e. each
+beginning on a new line. Rather, each footnote is separated from
+the footnote before it by horizontal space in the running line, so
+that the footnotes on any given page form a continuous block, like
+lines in a paragraph.
+</p>
+
+<p style="margin-left: .5em;">
+The macro to get mom to run footnotes on is
+<br/>
+<span class="pre-in-pp">
+ .FOOTNOTES_RUN_ON
+</span>
+Invoked by itself, it turns the feature on. Invoked with any other
+argument (<kbd>OFF, NO</kbd>, etc.), it turns the feature off.
+It is generally not a good idea to turn the feature on and off
+during the course of a single document. If you do, mom will issue
+a warning if there&#8217;s going to be a problem. However, it is
+always perfectly safe to enable/disable the feature after
+<a href="rectoverso.html#collate">COLLATE</a>.
+</p>
+</div>
+
+<h4 id="reset-footnote-number" class="docs" style="margin-top: -.25em;">5. Reset footnote number &ndash; RESET_FOOTNOTE_NUMBER</h4>
+
+<p>
+<kbd>.RESET_FOOTNOTE_NUMBER</kbd>, by itself, resets footnote
+numbering so that the next footnote you enter is numbered 1.
+</p>
+
+<p>
+<kbd>.RESET_FOOTNOTE_NUMBER&nbsp;PAGE</kbd> tells mom to start every
+page&#8217;s footnote numbering at 1.
+</p>
+
+<h4 id="footnote-space" class="docs" style="margin-top: -.25em;">6. Inter-footnote spacing &ndash; FOOTNOTE_SPACING</h4>
+
+<p>
+If you&#8217;d like some space between footnotes, you can
+have mom put it in for you by invoking <kbd>.FOOTNOTE_SPACING</kbd>
+with an argument representing the amount of extra space you&#8217;d
+like. The argument to FOOTNOTE_SPACING requires a
+<a href="definitions.html#unitofmeasure">unit of measure</a>.
+</p>
+
+<p>
+In the following example, footnotes will be separated from each
+other by 3
+<a href="definitions.html#picaspoints">points</a>.
+<br/>
+<span class="pre-in-pp">
+ .FOOTNOTE_SPACING 3p
+</span>
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span>
+If you&#8217;re using footnotes for references generated from the
+refer database (see
+<a href="refer.html">refer.html</a>),
+correct MLA style requires a full linespace between footnotes, which
+you can accomplish with <kbd>.FOOTNOTE_SPACING&nbsp;1v</kbd>.
+</p>
+</div>
+
+<h4 id="footnote-rule" class="docs" style="margin-top: -.25em;">7. Footnote rule &ndash; FOOTNOTE_RULE</h4>
+
+<p>
+If you don&#8217;t want a footnote separator rule, toggle it
+off with <kbd>.FOOTNOTE_RULE&nbsp;OFF</kbd> (or <kbd>END</kbd>,
+<kbd>QUIT</kbd>, <kbd>X</kbd>...). Toggle it back on by invoking
+<kbd>.FOOTNOTE_RULE</kbd> with no argument. The default is to print
+the rule.
+</p>
+
+<h4 id="footnote-rule-length" class="docs" style="margin-top: -.25em;">8. Footnote rule length &ndash; FOOTNOTE_RULE_LENGTH</h4>
+
+<p>
+If you want to change the length of the footnote separator rule,
+invoke <kbd>.FOOTNOTE_RULE_LENGTH</kbd> with a length, like this,
+<br/>
+<span class="pre-in-pp">
+ .FOOTNOTE_RULE_LENGTH 1i
+</span>
+
+which sets the length to 1 inch. Note that a
+<a href="definitions.html#unitofmeasure">unit of measure</a>
+is required. The default is 4
+<a href="definitions.html#picaspoints">picas</a>
+for both
+<a href="docprocessing.html#printstyle">PRINTSTYLE</a>s.
+</p>
+
+<h4 id="footnote-rule-weight" class="docs" style="margin-top: -.25em;">9. Footnote rule weight &ndash; FOOTNOTE_RULE_WEIGHT</h4>
+
+<p>
+If you want to change the weight (&#8220;thickness&#8221;) of the
+footnote separator rule, invoke <kbd>.FOOTNOTE_RULE_WEIGHT</kbd>
+with the desired weight. The weight is measured in
+<a href="definitions.html#picaspoints">points</a>;
+however, do not append the
+<a href="definitions.html#unitofmeasure">unit of measure</a>,
+<kbd>p</kbd>, to the argument.
+</p>
+
+<p>
+Mom&#8217;s default footnote rule weight is 1/2 point. If
+you&#8217;d like a 1-point rule instead,<br/>
+<span class="pre-in-pp">
+ .FOOTNOTE_RULE_WEIGHT 1
+</span>
+is how you&#8217;d get it.
+</p>
+
+<h4 id="footnote-rule-adj" class="docs" style="margin-top: -.25em;">10. Adjust vertical position of footnote separator rule &ndash; FOOTNOTE_RULE_ADJ</h4>
+
+<p>
+The footnote separator rule is a rule whose bottom edge falls
+on the
+<a href="definitions.html#baseline">baseline</a>
+(at the footnote
+<a href="definitions.html#leading">leading</a>)
+one line above the first line of a page&#8217;s footnotes. By default,
+mom raises the rule 3
+<a href="definitions.html#picaspoints">points</a>
+from the baseline so that the separator and the footnotes don&#8217;t
+look jammed together. If you&#8217;d prefer a different vertical
+adjustment, invoke <kbd>.FOOTNOTE_RULE_ADJ</kbd> with the
+amount you&#8217;d like. For example
+<br/>
+<span class="pre-in-pp">
+ .FOOTNOTE_RULE_ADJ 4.25p
+</span>
+raises the rule by 4-1/4 points. Note that you can only raise
+the rule, not lower it. A
+<a href="definitions.html#unitofmeasure">unit of measure</a>
+is required.
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span>
+If your document
+<a href="definitions.html#leading">leading</a>
+is 2
+<a href="definitions.html#picaspoints">points</a>
+or less (e.g your
+<a href="definitions.html#ps">point size</a>
+is 10 and your linespacing is 10, 11, or 12), lowering mom&#8217;s
+default footnote rule adjustment will almost certainly give you
+nicer looking results than leaving the adjustment at the default.
+Furthermore, you can invoke <kbd>.FOOTNOTE_RULE_ADJ</kbd> on any
+page in which footnotes appear, or in any column, so that the
+placement of the footnote rule can be changed on-the-fly, should you
+wish.
+</p>
+</div>
+
+<div class="rule-short"><hr/></div>
+
+<!-- ==================================================================== -->
+
+<h2 id="endnote-intro" class="macro-group">Endnotes</h2>
+
+<ul style="margin-left: -.5em;">
+ <li><a href="#endnote-behaviour">Endnotes behaviour</a>
+ <ul style="margin-left: -.5em;">
+ <li><a href="#endnote-columns">Endnotes and columnar documents</a></li>
+ </ul></li>
+ <li><a href="#endnote">Tag: ENDNOTE</a></li>
+ <li><a href="#endnotes">Macro: <b>ENDNOTES</b></a>&mdash;tell mom to output endnotes</li>
+ <li><a href="#endnote-control">ENDNOTES control macros and defaults</a></li>
+</ul>
+
+<p>
+Embedding endnotes into mom documents is accomplished the same way
+as embedding
+<a href="#footnote-intro">footnotes</a>.
+The example below is identical to the one shown in the
+<a href="#footnote-example">introduction to footnotes</a>,
+except that <kbd>.FOOTNOTE</kbd> has been replaced with
+<kbd>.ENDNOTE</kbd>.
+</p>
+
+<div id="examples" class="examples-container" style="padding-bottom: 1em;">
+<div class="examples" style="margin-top: 0; margin-bottom: -.25em;">Example</div>
+<span id="endnote-example" class="pre">
+ ...the doctrines of Identity as urged by Schelling\c
+ .ENDNOTE
+ &lt;endnote about who the hell is Schelling&gt;
+ .ENDNOTE OFF
+ were generally the points of discussion presenting the most
+ of beauty to the imaginative Morella.
+</span>
+</div>
+
+<p>
+As with footnotes, note the obligatory use of the <kbd>\c</kbd>
+<a href="definitions.html#inlines">inline escape</a>
+when your
+<a href="#endnote-marker-style">ENDNOTE_MARKER_STYLE</a>
+is <kbd>NUMBER</kbd> or <kbd>SUPERSCRIPT</kbd> (both of which mark
+endnotes references in
+<a href="definitions.html#running">running text</a>
+with superscript numbers). When the marker style is
+<kbd>LINE</kbd>, you must <i>not</i> use the <kbd>\c</kbd>
+escape.
+</p>
+
+<p>
+Endnotes differ from footnotes in two ways (other than the fact that
+endnotes come at the end of a document whereas footnotes appear in
+the body of the document):
+</p>
+
+<ol style="margin-top: -.5em;">
+ <li>When your ENDNOTE_MARKER_STYLE is <kbd>NUMBER</kbd> or
+ <kbd>SUPERSCRIPT</kbd>, endnotes are always numbered
+ incrementally, starting at &#8220;1&#8221;.
+ </li>
+ <li>Endnotes must be output explicitly; mom does not output
+ them for you. In
+ <a href="rectoverso.html#collate">collated</a>
+ documents, this allows you to choose whether you want the
+ endnotes to appear at the end of each chapter or article in a
+ document, or grouped together at the very end of the document.
+ </li>
+</ol>
+
+<p>
+Within endnotes, you may use the document element tags
+<a href="#pp">PP</a>,
+<a href="#quote">QUOTE</a>
+and
+<a href="#blockquote">BLOCKQUOTE</a>.
+This provides the flexibility to create endnotes that run to several
+paragraphs, as well as to embed cited text within endnotes.
+</p>
+
+<p>
+Should you wish to change the appearance of quotes or blockquotes
+that appear within endnotes, you may do so with the
+<a href="#quote-control">quote control macros</a>
+or
+<a href="#blockquote-control">blockquote control macros</a>.
+However, you must make the changes <i>within</i> each endnote,
+prior to invoking <kbd>.QUOTE</kbd> or <kbd>.BLOCKQUOTE</kbd>,
+and undo them prior to terminating the endnote (i.e. before
+<kbd>.ENDNOTE&nbsp;OFF</kbd>), otherwise the changes will affect
+subsequent quotes and blockquotes that appear in the document body
+as well.
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span>
+See
+<a href="refer.html">refer.html</a>
+for information on using endnotes with the <kbd>refer</kbd>
+bibliographic database.
+</p>
+</div>
+
+<h3 id="endnote-behaviour" class="docs">Endnotes behaviour</h3>
+
+<p>
+When you output endnotes (with
+<kbd><a href="#endnotes">.ENDNOTES</a></kbd>),
+mom finishes processing the last page of your document, then breaks
+to a new page for printing the endnotes. If the document type is
+<kbd><a href="docprocessing.html#doctype">CHAPTER</a></kbd>,
+the centre part of the
+<a href="definitions.html#header">header</a>
+(or footer), which, by default, contains a chapter number or title,
+is removed.
+</p>
+
+<p>
+By default, mom starts the endnotes page with a bold, centred head,
+&#8220;ENDNOTES&#8221;. Subsequently, for each section in a
+<a href="rectoverso.html#collate-intro">collated</a>
+document (e.g. chapters in a book), she identifies the section in bold
+type, flush left and underscored, followed by one-half linespace.
+Endnotes pertaining to the section are output underneath, identified
+by superscript numbers. The text of the endnotes themselves is
+indented to the right of the numbers.
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span>
+The one-half linespace between section identifiers and the endnotes
+themselves, plus the need to group identifiers and endnotes sensibly,
+means that mom cannot guarantee perfectly aligned bottom margins.
+This is an unavoidable consequence of the structure of endnotes.
+</p>
+</div>
+
+<p>
+Of course, all the defaults, as well as the overall style of the
+endnotes pages, can be changed with the
+<a href="#endnote-control">endnote control macros</a>.
+The attentive will notice that endnotes have an awful lot of control
+macros. This is because endnotes are like a mini-document unto
+themselves, and therefore need not be bound by the style parameters
+of the body of the document.
+</p>
+
+<h3 id="endnote-columns" class="docs">Endnotes and columnar documents</h3>
+
+<p>
+If your document is set in columns (see
+<a href="docprocessing.html#columns">COLUMNS</a>),
+mom gives you the option to have endnotes appear in either
+the column format or set to the full page width. See
+<a href="#endnotes-no-columns">ENDNOTES_NO_COLUMNS</a>.
+</p>
+
+<!-- -ENDNOTE- -->
+
+<div class="macro-id-overline">
+<h3 id="endnote" class="macro-id">ENDNOTE</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>ENDNOTE</b> <kbd class="macro-args">&lt;toggle&gt; [ BREAK | BR ]</kbd>
+</div>
+<p class="requires">
+See <span style="font-style: normal"><a href="#endnote-note">HYPER-IMPORTANT NOTE</a></span>
+</p>
+
+<p>
+ENDNOTE is a toggle macro, therefore invoking it on a line by itself
+allows you to enter an endnote in the body of a document. Invoking
+it with any other argument (i.e. <kbd>OFF</kbd>, <kbd>QUIT</kbd>,
+<kbd>END</kbd>, <kbd>X</kbd>...) tells mom that you&#8217;ve
+finished the endnote.
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span>
+If an endnote runs to more than one paragraph, do <i>not</i> begin
+the endnote with the
+<a href="#pp">PP</a>
+tag. Use PP only to introduce subsequent paragraphs.
+</p>
+</div>
+
+<div id="endnote-note" class="box-tip">
+<p class="tip-top">
+<span class="note">HYPER-IMPORTANT NOTE:</span>
+If your
+<a href="#endnote-marker-style">ENDNOTE_MARKER_STYLE</a>
+is <kbd>NUMBER</kbd> or <kbd>SUPERSCRIPT</kbd> (mom&#8217;s
+default is <kbd>NUMBER</kbd> unless you have
+<a href="refer.html#endnote-refs">ENDNOTE_REFS</a>
+enabled, in which case it&#8217;s <kbd>SUPERSCRIPT</kbd>), the final word on the
+<a href="definitions.html#inputline">input line</a>
+that comes immediately before <kbd>.ENDNOTE</kbd> must terminate
+with a
+<a href="typesetting.html#join"><kbd>\c</kbd></a>
+inline escape. See the
+<a href="#endnote-example">endnote example</a>
+above.
+</p>
+
+<p>
+Additionally, in
+<a href="definitions.html#filled">fill</a>
+modes
+(<a href="typesetting.html#justify">JUSTIFY</a>
+or
+<a href="typesetting.html#quad">QUAD</a>,
+the line after <kbd>.ENDNOTE&nbsp;OFF</kbd> should be
+entered as if there were no interruption in the input text, i.e.,
+the line should begin with a literal space or punctuation mark (see
+explanation and examples for footnotes, which apply equally to
+endnotes,
+<a href="#fn-and-punct">here</a>).
+</p>
+
+<p>
+In
+<a href="definitions.html#filled">no-fill</a>
+modes, the optional argument <kbd>BREAK</kbd> or <kbd>BR</kbd> may
+be used after the <kbd>OFF</kbd> (or <kbd>OFF</kbd>,
+<kbd>QUIT</kbd>, <kbd>END</kbd>, <kbd>X</kbd>, etc) argument to
+instruct mom not to join the next input line to the previous output.
+See
+<a href="#fn-and-punct-nofill">here</a>
+for a more complete explanation. The examples are for
+<kbd>.FOOTNOTE</kbd>, but apply equally to <kbd>.ENDNOTE</kbd>.
+</p>
+
+<p class="tip-bottom">
+If your ENDNOTE_MARKER_STYLE is LINE, do not use the <kbd>\c</kbd>
+escape, and enter the line after <kbd>.ENDNOTE OFF</kbd> normally,
+ie at your text editor&#8217;s left margin.
+</p>
+</div>
+
+<!-- -ENDNOTES- -->
+
+<div class="macro-id-overline">
+<h3 id="endnotes" class="macro-id">ENDNOTES</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>ENDNOTES</b>
+</div>
+
+<p>
+Unlike footnotes, which mom automatically outputs at the bottom
+of pages, endnotes must be explicitly output by you, the
+user. ENDNOTES, by itself (i.e. without any argument), is the macro
+to do this.
+</p>
+
+<p>
+Typically, you&#8217;ll use ENDNOTES at the end of a document. If
+it&#8217;s a single (i.e. not collated) document, mom will print
+the endnotes pertaining to it. If it&#8217;s a collated document,
+mom will print all the endnotes contained within all sections of
+the document (typically chapters), appropriately identified and
+numbered.
+</p>
+
+<p>
+Should you wish to output the endnotes for each section of a
+collated document at the ends of the sections (instead of at the
+very end of the document), simply invoke <kbd>.ENDNOTES</kbd>
+immediately prior to
+<a href="rectoverso.html#collate">COLLATE</a>.
+Mom will print the endnotes, identified and numbered appropriately,
+on a separate page prior to starting the next section of the
+document. Each subsequent invocation of <kbd>.ENDNOTES</kbd>
+outputs only those endnotes that mom collected after the previous
+invocation.
+</p>
+
+<div class="defaults-container" style="background-color: #ded4bd; border: none;">
+<h3 id="endnote-control" class="docs defaults">ENDNOTES control macros and defaults</h3>
+
+<div class="box-important" style="width: 700px; margin: auto; background-color: #ded4bd;">
+<p class="tip-top" style="color: #000056;">
+<span class="important">Important:</span>
+Endnotes control macros must always be invoked prior to the first
+instance of
+<a href="#endnote"><kbd>.ENDNOTE</kbd></a>.
+</p>
+
+<p style="color: #000056; margin-top: -.5em;">
+When you embed endnotes in the body of a document, mom collects
+<i>and processes</i> them for later outputting (when you invoke
+<a href="#endnotes"><kbd>.ENDNOTES</kbd></a>).
+By the time you do invoke <kbd
+style="color: #000056;">.ENDNOTES</kbd>, it&#8217;s much too late to
+change your mind about how you want them to look.
+</p>
+
+<p class="tip-bottom" style="color: #000056; margin-top: -.5em;">
+My advice? If you&#8217;re planning to change the default
+appearance of endnotes pages, set them up prior to
+<a href="docprocessing.html#start">START</a>.
+</p>
+</div>
+
+<ol style="margin-top: .5em; padding-bottom: .5em;">
+ <li><a href="#endnotes-general"><b>General endnotes style control</b></a>
+ <ul style="margin-left: -.5em;">
+ <li><a href="#endnote-style">Base family/font/quad</a></li>
+ <li><a href="#endnote-pt-size">Base point size</a></li>
+ <li><a href="#endnote-lead">Leading</a></li>
+ <li><a href="#endnote-spacing">Spacing between endnotes</a></li>
+ <li><a href="#singlespace-endnotes">Singlespace endnotes (TYPEWRITE only)</a></li>
+ <li><a href="#endnote-para-indent">Paragraph indenting</a></li>
+ <li><a href="#endnote-para-space">Inter-paragraph spacing</a></li>
+ <li><a href="#endnotes-no-columns">Turning off column mode during endnotes output</a></li>
+ </ul></li>
+ <li><a href="#endnotes-pagination"><b>Pagination of endnotes</b></a>
+ <ul style="margin-left: -.5em;">
+ <li><a href="#endnotes-pagenum-style">Page numbering style</a></li>
+ <li><a href="#endnotes-first-pagenumber">Setting the first page number of endnotes</a></li>
+ <li><a href="#endnotes-no-first-pagenum">Omitting a page number on the first page of endnotes</a></li>
+ <li><a href="#suspend-pagination">Suspending pagination during endnotes output</a></li>
+ </ul></li>
+ <li><a href="#endnotes-header-control"><b>Header/footer control</b></a>
+ <ul style="margin-left: -.5em;">
+ <li><a href="#endnotes-modify-hdrftr">Modifying what goes in the endnotes header/footer</a></li>
+ <li><a href="#endnotes-hdrftr-center">Header/footer centre string when doctype is CHAPTER</a></li>
+ <li><a href="#endnotes-allows-headers">Allow headers on endnotes pages</a></li>
+ </ul></li>
+ <li><a href="#endnotes-header"><b>Endnotes header (first-page title) control</b></a>
+ <ul style="margin-left: -.5em;">
+ <li><a href="#endnotes-header-string">Header string</a></li>
+ <li><a href="#endnotes-header-string-control">Header string control macros and defaults</a></li>
+ <li><a href="#endnotes-header-placement">Header string placement</a></li>
+ <li><a href="#endnotes-header-underscore">Header string underscoring</a></li>
+ <li><a href="#endnotes-header-caps">Header string capitalization</a></li>
+ </ul></li>
+ <li><a href="#endnotes-doc-title"><b>Endnotes document-identification string control</b></a>
+ <ul style="margin-left: -.5em;">
+ <li><a href="#endnote-title">Document-identification string(s)</a></li>
+ <li><a href="#endnote-title-control">Document-identification string control macros and defaults</a></li>
+ </ul></li>
+ <li><a href="#endnotes-numbering"><b>Endnotes referencing style</b></a>
+ <ul style="margin-left: -.5em;">
+ <li><a href="#endnote-marker-style">Endnote marker style</a> &ndash; by numbers in the text, or by line number
+ <ul style="margin-left: -.5em;">
+ <li><a href="#endnote-linenumber-gap">Spacing between line-numbered endnotes and the endnote text</a></li>
+ <li><a href="#endnote-linenumber-brackets">Brackets around endnote line numbers</a></li>
+ <li><a href="#endnote-linenumber-separator">Separator after endnote line numbers instead of brackets</a></li>
+ </ul></li>
+ <li><a href="#endnote-number-control">Endnote numbering control macros and defaults</a></li>
+ <li><a href="#endnote-number-alignment">Endnote numbering alignment</a></li>
+ </ul></li>
+</ol>
+</div>
+
+<h4 id="endnotes-general" class="docs" style="margin-top: -1.5em; margin-bottom: .5em;">1. General endnotes page style control</h4>
+
+<h5 id="endnote-style" class="docs" style="margin-top: 0; margin-bottom: .5em; margin-left: .5em;">&bull;&nbsp;Base family/font/quad</h5>
+
+<div class="defaults-container" style="padding-bottom: 8px;">
+<p class="defaults" style="padding-top: 6px;">
+See
+<a href="#control-macro-args">Arguments to the control macros</a>.
+<br/>
+The following ENDNOTE control macros may also be
+<a href="#grouping">grouped</a>
+using ENDNOTE_STYLE.
+</p>
+<span class="pre defaults">
+.ENDNOTE_FAMILY default = prevailing document family; default is Times Roman
+.ENDNOTE_FONT default = roman
+.ENDNOTE_QUAD* default = justified
+
+*Note: ENDNOTE_QUAD must be set to either L (LEFT) or J (JUSTIFIED);
+ R (RIGHT) and C (CENTER) will not work.
+</span>
+</div>
+
+<!-- -ENDNOTE_PT_SIZE- -->
+
+<h5 id="endnote-pt-size" class="docs" style="margin-top: -1.5em; margin-bottom: .5em; margin-left: .5em;">&bull;&nbsp;Base point size</h5>
+
+<div class="box-macro-args">
+Macro: <b>ENDNOTE_PT_SIZE</b> <kbd class="macro-args">&lt;base type size of endnotes&gt;</kbd>
+</div>
+
+<p>
+Unlike most other control macros that deal with size of document
+elements, ENDNOTE_PT_SIZE takes as its argument an absolute value,
+relative to nothing. Therefore, the argument represents the size of
+endnote type in
+<a href="definitions.html#picaspoints">points</a>,
+unless you append an alternative
+<a href="definitions.html#unitofmeasure">unit of measure</a>.
+For example,
+<br/>
+<span class="pre-in-pp">
+ .ENDNOTE_PT_SIZE 12
+</span>
+sets the base point size of type on the endnotes page to 12
+points, whereas
+<br/>
+<span class="pre-in-pp">
+ .ENDNOTE_PT_SIZE .6i
+</span>
+sets the base point size of type on the endnotes page to 1/6 of an
+inch.
+</p>
+
+<p>
+The type size set with ENDNOTE_PT_SIZE is the size of type used for
+the text of the endnotes, and forms the basis from which the point
+size of other endnote page elements is calculated.
+</p>
+
+<p>
+The default for
+<a href="docprocessing.html#printstyle">PRINTSTYLE <kbd>TYPESET</kbd></a>
+is 12.5 points (the same default size used in the body of the
+document).
+</p>
+
+<!-- -ENDNOTE_LEAD- -->
+
+<h5 id="endnote-lead" class="docs" style="margin-top: -.5em; margin-bottom: .5em; margin-left: .5em;">&bull;&nbsp;Leading</h5>
+
+<div class="box-macro-args">
+Macro: <b>ENDNOTE_LEAD</b> <kbd class="macro-args">&lt;base leading of endnotes&gt; [ ADJUST ] </kbd>
+</div>
+
+<p class="requires">
+&bull;&nbsp;Does not require a <a href="definitions.html#unitofmeasure">unit of measure</a>; points is assumed
+</p>
+
+<p>
+Unlike most other control macros that deal with leading of document
+elements, ENDNOTE_LEAD takes as its argument an absolute value,
+relative to nothing. Therefore, the argument represents the
+<a href="definitions.html#leading">leading</a>
+of endnotes in
+<a href="definitions.html#picaspoints">points</a>
+unless you append an alternative
+<a href="definitions.html#unitofmeasure">unit of measure</a>.
+For example,
+<br/>
+<span class="pre-in-pp">
+ .ENDNOTE_LEAD 14
+</span>
+sets the base leading of type on the endnotes page to 14
+points, whereas
+<br/>
+<span class="pre-in-pp">
+ .ENDNOTE_LEAD .5i
+</span>
+sets the base leading of type on the endnotes page to 1/2 inch.
+</p>
+
+<p>
+If you want the leading of endnotes adjusted to fill the page, pass
+ENDNOTE_LEAD the optional argument
+<kbd>ADJUST</kbd>. (See
+<a href="docprocessing.html#doc-lead-adjust">DOC_LEAD_ADJUST</a>
+for an explanation of leading adjustment.)
+</p>
+
+<p>
+The default for
+<a href="docprocessing.html#printstyle">PRINTSTYLE <kbd>TYPESET</kbd></a>
+is the prevailing document leading (16 by default), adjusted.
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span>
+Even if you give mom a <kbd>.DOC_LEAD_ADJUST&nbsp;OFF</kbd> command, she
+will still, by default, adjust endnote leading. You <i>must</i>
+enter <kbd>.ENDNOTE_LEAD&nbsp;&lt;lead&gt;</kbd> with no
+<kbd>ADJUST</kbd> argument to disable this default behaviour.
+</p>
+</div>
+
+<!-- -ENDNOTE_SPACING- -->
+
+<h5 id="endnote-spacing" class="docs" style="margin-top: -.5em; margin-bottom: .5em; margin-left: .5em;">&bull;&nbsp;Spacing between endnotes</h5>
+
+<div class="box-macro-args">
+Macro: <b>ENDNOTE_SPACING</b> <kbd class="macro-args">&lt;space to insert between endnotes&gt;</kbd>
+</div>
+<p class="requires">
+&bull;&nbsp;Requires a <a href="definitions.html#unitofmeasure">unit of measure</a>
+</p>
+
+<p>
+If you&#8217;d like some whitespace between endnotes, just invoke
+ENDNOTE_SPACING with the amount of space you want, e.g.
+<br/>
+<span class="pre-in-pp">
+ .ENDNOTE_SPACING 6p
+</span>
+which inserts 6 points of lead between endnotes. Be aware, though,
+that inserting space between endnotes means that the bottoms of
+endnotes pages will most likely not align.
+</p>
+
+<p>
+Mom&#8217;s default is not to insert any whitespace between endnotes.
+</p>
+
+<!-- -SINGLESPACE_ENDNOTES- -->
+
+<h5 id="singlespace-endnotes" class="docs" style="margin-top: 0; margin-bottom: .5em; margin-left: .5em;">&bull;&nbsp;Singlespace endnotes (TYPEWRITE only)</h5>
+
+<div class="box-macro-args">
+Macro: <b>SINGLESPACE_ENDNOTES</b> <kbd class="macro-args">&lt;toggle&gt;</kbd>
+</div>
+
+<p>
+If your
+<a href="docprocessing.html#printstyle">PRINTSTYLE</a>
+is <kbd>TYPEWRITE</kbd> and you use TYPEWRITE&#8217;s default
+double-spacing, endnotes are double-spaced. If your document is
+single-spaced, endnotes are single-spaced.
+</p>
+
+<p>
+If, for some reason, you&#8217;d prefer that endnotes be
+single-spaced in an otherwise double-spaced document (including
+double-spaced
+<a href="rectoverso.html#collate">collated</a>
+documents), invoke
+<br/>
+<span class="pre-in-pp">
+ .SINGLESPACE_ENDNOTES
+</span>
+with no argument. And if, god help you, you want to change endnote
+single-spacing back to double-spacing for different spacing of
+endnotes output at the ends of separate documents in a collated
+document, invoke <kbd>.SINGLESPACE_ENDNOTES</kbd> with any argument
+(<kbd>OFF</kbd>, <kbd>QUIT</kbd>, <kbd>END</kbd>, <kbd>X</kbd>...).
+</p>
+
+<!-- -ENDNOTE_PARA_INDENT- -->
+
+<h5 id="endnote-para-indent" class="docs" style="margin-top: 0; margin-bottom: .5em; margin-left: .5em;">&bull;&nbsp;Paragraph indenting</h5>
+
+<div class="box-macro-args">
+Macro: <b>ENDNOTE_PARA_INDENT</b> <kbd class="macro-args">&lt;amount to indent first line of paragraphs in endnotes&gt;</kbd>
+</div>
+
+<p class="requires">
+&bull;&nbsp;Requires a <a href="definitions.html#unitofmeasure">unit of measure</a>
+</p>
+
+<p>
+ENDNOTE_PARA_INDENT works exactly the same way as
+<a href="#para-indent">PARA_INDENT</a>,
+except that the indent given is the amount by which to indent the
+first lines of endnote paragraphs, not document body paragraphs.
+</p>
+
+<p>
+The default is 1.5
+<a href="definitions.html#em">ems</a>
+for
+<a href="docprocessing.html#printstyle">PRINTSTYLE <kbd>TYPESET</kbd></a>;
+1/2 inch for
+<a href="docprocessing.html#printstyle">PRINTSTYLE <kbd>TYPEWRITE</kbd></a>.
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span>
+The first line of the first paragraph of endnotes (the one attached
+immediately to the identifying endnote number) is never indented.
+Only subsequent paragraphs are affected by ENDNOTE_PARA_INDENT.
+</p>
+</div>
+
+<!-- -ENDNOTE_PARA_SPACE- -->
+
+<h5 id="endnote-para-space" class="docs" style="margin-top: -.5em; margin-bottom: .5em; margin-left: .5em;">&bull;&nbsp;Inter-paragraph spacing</h5>
+
+<div class="box-macro-args">
+Macro: <b>ENDNOTE_PARA_SPACE</b> <kbd class="macro-args">&lt;toggle&gt;</kbd>
+</div>
+
+<p>
+ENDNOTE_PARA_SPACE works exactly the same way as
+<a href="#pp-space">PARA_SPACE</a>,
+except that it inserts a blank line between endnote paragraphs, not
+document body paragraphs.
+</p>
+
+<p>
+The default is not to insert a blank line between paragraphs in
+endnotes.
+</p>
+
+<!-- -ENDNOTES_NO_COLUMNS- -->
+
+<h5 id="endnotes-no-columns" class="docs" style="margin-top: 0; margin-bottom: .5em; margin-left: .5em;">&bull;&nbsp;Turning off column mode during endnotes output</h5>
+
+<div class="box-macro-args">
+Macro: <b>ENDNOTES_NO_COLUMNS</b> <kbd class="macro-args">&lt;toggle&gt;</kbd>
+</div>
+
+<p>
+By default, if your document is set in
+<a href="docprocessing.html#columns">columns</a>,
+mom sets the endnotes in columns, too. However, if your document
+is set in columns and you&#8217;d like the endnotes not to be,
+just invoke <kbd>.ENDNOTES_NO_COLUMNS</kbd> with no argument.
+The endnotes pages will be set to the full page measure of your
+document.
+</p>
+
+<p>
+If you output endnotes at the end of each document in a
+<a href="rectoverso.html#collate">collated</a>
+document set in columns, column mode will automatically be
+reinstated for each document, even with ENDNOTES_NO_COLUMNS turned
+on. In such circumstances, you must re-enable ENDNOTES_NO_COLUMNS
+for each separate collated document.
+</p>
+
+<h4 id="endnotes-pagination" class="docs" style="margin-bottom: .5em;">2. Pagination of endnotes</h4>
+
+<!-- -ENDNOTES_PAGENUM_STYLE- -->
+
+<h5 id="endnotes-pagenum-style" class="docs" style="margin-top: 0; margin-bottom: .5em; margin-left: .5em;">&bull;&nbsp;Page numbering style</h5>
+
+<div class="box-macro-args">
+Macro: <b>ENDNOTES_PAGENUM_STYLE</b> <kbd class="macro-args">DIGIT | ROMAN | roman | ALPHA | alpha</kbd>
+</div>
+
+<p>
+Use this macro to set the page numbering style of endnotes pages.
+The arguments are identical to those for
+<a href="headfootpage.html#pagenum-style">PAGENUM_STYLE</a>.
+The default is <kbd>digit</kbd>. You may want to change it to, say,
+<kbd>alpha</kbd>, which you would do with
+<br/>
+<span class="pre-in-pp">
+ .ENDNOTES_PAGENUM_STYLE alpha
+</span>
+</p>
+
+<!-- -ENDNOTES_FIRST_PAGENUMBER- -->
+
+<h5 id="endnotes-first-pagenumber" class="docs" style="margin-top: -.5em; margin-bottom: .5em; margin-left: .5em;">&bull;&nbsp;Setting the first page number of endnotes</h5>
+
+<div class="box-macro-args">
+Macro: <b>ENDNOTES_FIRST_PAGENUMBER</b> <kbd class="macro-args">&lt;page # that appears on page 1 of endnotes&gt;</kbd>
+</div>
+
+<p>
+Use this macro with caution. If all endnotes for several
+<a href="rectoverso.html#collate">collated</a>
+documents are to be output at once, i.e. not at the end of each
+separate doc, ENDNOTES_FIRST_PAGENUMBER tells mom what page number
+to put on the first page of the endnotes.
+</p>
+
+<p>
+However, if you set ENDNOTES_FIRST_PAGENUMBER in collated documents
+in which the endnotes are output after each section (chapter,
+article, etc), you have to reset every section&#8217;s first page
+number after
+<a href="rectoverso.html#collate">COLLATE</a>
+and before
+<a href="docprocessing.html#start">START</a>
+with
+<a href="headfootpage.html#pagenumber">PAGENUMBER</a>.
+</p>
+
+<!-- -ENDNOTES_NO_FIRST_PAGENUN- -->
+
+<h5 id="endnotes-no-first-pagenum" class="docs" style="margin-top: -.25em; margin-bottom: .5em; margin-left: .5em;">&bull;&nbsp;Omitting a page number on the first page of endnotes</h5>
+
+<div class="box-macro-args">
+Macro: <b>ENDNOTES_NO_FIRST_PAGENUM</b> <kbd class="macro-args">&lt;toggle&gt;</kbd>
+</div>
+
+<p>
+This macro is for use only if
+<a href="headfootpage.html#footers">FOOTERS</a>
+are on. It tells
+<a href="#endnotes">ENDNOTES</a>
+not to print a page number on the first endnotes page. Mom&#8217;s
+default is to print the page number.
+</p>
+
+<!-- -SUSPEND_PAGINATION- -->
+
+<h5 id="suspend-pagination" class="docs" style="margin-top: -.5em; margin-bottom: .5em; margin-left: .5em;">&bull;&nbsp;Suspending pagination during endnotes output</h5>
+
+<div class="box-macro-args" style="margin-bottom: 1em;">
+Macro: <b>SUSPEND_PAGINATION</b>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>RESTORE_PAGINATION</b>
+</div>
+
+<p>
+SUSPEND_PAGINATION doesn&#8217;t take an argument. Invoked
+immediately prior to
+<a href="#endnotes">ENDNOTES</a>,
+it turns off endnotes pages pagination. Mom continues, however to
+increment page numbers silently.
+</p>
+
+<p>
+To restore normal document pagination after endnotes, invoke
+<kbd>.RESTORE_PAGINATION</kbd> (again, with no argument) immediately
+after <kbd>.ENDNOTES</kbd>.
+</p>
+
+<h4 id="endnotes-header-control" class="docs" style="margin-bottom: .5em;">3. Header/footer control</h4>
+
+<h5 id="endnotes-modify-hdrftr" class="docs" style="margin-top: 0; margin-bottom: -.75em; margin-left: .5em;">&bull;&nbsp;Modifying what goes in the endnotes header/footer</h5>
+
+<p>
+If you wish to modify what appears in the header/footer that appears
+on endnotes page(s), make the changes before you invoke
+<a href="#endnotes"><kbd>.ENDNOTES</kbd></a>,
+not afterwards.
+</p>
+
+<p>
+Except in the case of
+<a href="docprocessing.html#doctype">DOCTYPE <kbd>CHAPTER</kbd></a>,
+mom prints the same header or footer used throughout the document
+on the endnotes page(s). Chapters get treated differently in that,
+by default, mom does not print the header/footer centre string
+(normally the chapter number or chapter title.) In most cases, this
+is what you want. However, should you not want mom to remove
+the centre string from the endnotes page(s) headers/footers, invoke
+<kbd><a href="#endnotes-hdrftr-center">.ENDNOTES_HEADER_CENTER</a></kbd>
+with no argument.
+</p>
+
+<p>
+An important change you may want to make is to put the word
+&#8220;Endnotes&#8221; in the header/footer centre position. To do
+so, invoke
+<br/>
+<span class="pre-in-pp" style="margin-bottom: -1em;">
+ .HEADER_CENTER "Endnotes"
+</span>
+or
+<span class="pre-in-pp" style="margin-top: -.5em;">
+ .FOOTER_CENTER "Endnotes"
+</span>
+prior to invoking <kbd>.ENDNOTES</kbd>.
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span>
+If your
+<a href="docprocessing.html#doctype">DOCTYPE</a>
+is <kbd>CHAPTER</kbd>, you must also invoke
+<a href="#endnotes-hdrftr-center">ENDNOTES_HEADER_CENTER</a>
+for the ENDNOTES_HEADER_CENTER to appear.
+</p>
+</div>
+
+<h5 id="endnotes-hdrftr-center" class="docs" style="margin-top: 0; margin-bottom: .5em; margin-left: .5em;">&bull;&nbsp;Header/footer centre string when doctype is CHAPTER</h5>
+
+<div class="box-macro-args">
+Macro: <b>ENDNOTES_HEADER_CENTER</b> <kbd class="macro-args">toggle</kbd>
+</div>
+
+<p>
+If your
+<a href="docprocessing.html#doctype">DOCTYPE</a>
+is <kbd>CHAPTER</kbd> and you want mom to include a centre
+string in the headers/footers that appear on endnotes
+pages, invoke <kbd>.ENDNOTES_HEADER_CENTER</kbd> (or
+<kbd>.ENDNOTES_FOOTER_CENTER</kbd>) with no argument. Mom&#8217;s
+default is not to print the centre string.
+</p>
+
+<p>
+If, for some reason, having enabled the header/footer centre string
+on endnotes pages, you wish to disable it, invoke the same macro
+with any argument (<kbd>OFF</kbd>, <kbd>QUIT</kbd>, <kbd>END</kbd>,
+<kbd>X</kbd>...). </p>
+
+<h5 id="endnotes-allows-headers" class="docs" style="margin-top: -.5em; margin-bottom: .5em; margin-left: .5em;">&bull;&nbsp;Allow headers on endnotes pages</h5>
+
+<div class="box-macro-args">
+Macro: <b>ENDNOTES_ALLOWS_HEADERS</b> <kbd class="macro-args">&lt;none&gt; | ALL</kbd>
+</div>
+
+<p>
+By default, if HEADERS are on, mom prints page headers on all
+endnotes pages except the first. If you don&#8217;t want her to
+print headers on endnotes pages, do
+<br/>
+<span class="pre-in-pp">
+ .ENDNOTES_ALLOWS_HEADERS OFF
+</span>
+If you want headers on every page including the first, do
+<br/>
+<span class="pre-in-pp">
+ .ENDNOTES_ALLOWS_HEADERS ALL
+</span>
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span>
+If FOOTERS are on, mom prints footers on every endnotes page.
+This is a style convention. In mom, there is no such beast as
+ENDNOTES_ALLOWS_FOOTERS OFF.
+</p>
+</div>
+
+<h4 id="endnotes-header" class="docs">4. Endnotes header (first-page title) control</h4>
+
+<!-- -ENDNOTES_HEADER_STRING- -->
+
+<h5 id="endnotes-header-string" class="docs" style="margin-top: 1em; margin-bottom: .5em; margin-left: .5em;">&bull;&nbsp;Header (first-page title) string</h5>
+
+<div class="box-macro-args">
+Macro: <b>ENDNOTES_HEADER_STRING</b> <kbd class="macro-args">&quot;&lt;title to print at the top of endnotes&gt;&quot;</kbd>
+</div>
+
+<p class="alias" style="margin-bottom: 0;">
+<i>Alias:</i> <b>ENDNOTE_STRING</b> (for compatibility with older documents)
+</p>
+
+<p>
+By default, mom prints the word &#8220;ENDNOTES&#8221; as a head
+at the top of the first page of endnotes. If you want her to
+print something else, invoke <kbd>.ENDNOTES_HEADER_STRING</kbd>
+with the endnotes-page head you want, surrounded by double-quotes.
+If you don&#8217;t want a head at the top of the first
+endnotes-page, invoke <kbd>.ENDNOTES_HEADER_STRING</kbd>
+with a blank argument (either two double-quotes side by
+side&mdash;<kbd>&quot;&quot;</kbd>&mdash;or no argument at all).
+</p>
+
+<!-- -ENDNOTES_HEADER_CONTROL- -->
+
+<h5 id="endnotes-header-string-control" class="docs" style="margin-top: -.5em; margin-bottom: .5em; margin-left: .5em;">&bull;&nbsp;Header (first-page title) control macros and defaults</h5>
+
+<div class="defaults-container" style="padding-bottom: 8px;">
+<p class="defaults" style="padding-top: 6px;">
+See
+<a href="#control-macro-args">Arguments to the control macros</a>.
+<br/>
+The following ENDNOTES_HEADER control macros may also be
+<a href="#grouping">grouped</a>
+using ENDNOTES_HEADER_STYLE.
+</p>
+
+<p style="margin-top: .5em; margin-bottom: 0; margin-left: .5em">
+Please note that &#8220;_HEADER_&#8221;, here, refers to the title
+that appears at the top of the first endnotes page, not to the page
+headers of subsequent endnotes pages.
+<span class="pre defaults">
+.ENDNOTES_HEADER_FAMILY default = prevailing document family
+.ENDNOTES_HEADER_FONT default = bold
+.ENDNOTES_HEADER_SIZE* default = +1
+.ENDNOTES_HEADER_QUAD default = centred
+.ENDNOTES_HEADER_COLOR default = black
+
+*Relative to the size of the endnotes text (set with ENDNOTE_PT_SIZE)
+</span>
+</p>
+</div>
+
+<p style="margin-top: -2em">
+<b>Note:</b> <i>For compatibility with older documents, these macros are aliased
+as</i> <kbd>.ENDNOTE_STRING_&lt;SPEC&gt;</kbd>, e.g. <kbd>.ENDNOTE_STRING_FAMILY</kbd>.
+</p>
+
+<!-- -ENDNOTES_HEADER_V_POS- -->
+
+<h5 id="endnotes-header-placement" class="docs" style="margin-top: -.25em; margin-bottom: .5em; margin-left: .5em;">&bull;&nbsp;Header (first-page title) placement</h5>
+
+<div class="box-macro-args">
+Macro: <b>ENDNOTES_HEADER_V_POS</b> <kbd class="macro-args">&lt;distance from top of page&gt;</kbd>
+</div>
+
+<p class="requires">
+&bull;&nbsp;Argument requires a <a href="definitions.html#unitofmeasure">unit of measure</a>
+</p>
+
+<p class="alias" style="margin-top: -1em; margin-bottom: 0;">
+<i>Alias:</i> <b>ENDNOTE_STRING_ADVANCE</b> (for compatibility with older documents)
+</p>
+
+<p>
+By default, mom places the title (the docheader, as it were) of
+endnotes pages (typically "ENDNOTES") on the same
+<a href="definitions.html#baseline">baseline</a>
+that is used for the start of
+<a href="definitions.html#running">running text</a>.
+If you&#8217;d prefer another location, higher or lower on the page
+(thereby also raising or lowering the starting position of the
+endnotes themselves), invoke <kbd>.ENDNOTES_HEADER_V_POS</kbd> with
+an argument stating the distance from the top edge of the page at
+which you&#8217;d like the title placed.
+</p>
+
+<p>
+The argument requires a unit of measure, so if you&#8217;d like the title
+to appear 1-1/2 inches from the top edge of the page, you&#8217;d tell
+mom about it like this:
+<br/>
+<span class="pre-in-pp">
+ .ENDNOTES_HEADER_V_POS 1.5i
+</span>
+</p>
+
+<!-- -ENDNOTES_HEADER_UNDERSCORE- -->
+
+<h5 id="endnotes-header-underscore" class="docs" style="margin-top: -1em; margin-bottom: .5em; margin-left: .5em;">&bull;&nbsp;Header (first-page title) underscoring</h5>
+
+<div class="box-macro-args">
+Macro: <b>ENDNOTES_HEADER_UNDERSCORE</b> <kbd class="macro-args">[DOUBLE] [&lt;underscore weight&gt; [&lt;underscore gap&gt; [&lt;distance between double rules]]] | &lt;none&gt; | &lt;anything&gt;</kbd>
+</div>
+
+<p class="alias" style="margin-bottom: 0;">
+<i>Alias:</i> <b>ENDNOTES_HEADER_UNDERLINE</b>.
+<i>(For compatibility with older documents, also
+aliased as</i> <b>ENDNOTE_STRING_UNDERSCORE</b> <i>and</i>
+<b>ENDNOTE_STRING_UNDERLINE</b>.)
+</p>
+
+<p class="requires">
+&bull;&nbsp;The argument
+<span style="font-style: normal"><kbd>&lt;underscore weight&gt;</kbd></span>
+must not have the
+<a href="definitions.html#unitofmeasure">unit of measure</a>,
+<span style="font-style: normal;"><kbd>p</kbd></span>,
+appended to it; all other arguments require a unit of measure
+</p>
+
+<p>
+Invoked without an argument, <kbd>.ENDNOTES_HEADER_UNDERSCORE</kbd>
+will place a single rule underneath the endnotes page title. Invoked
+with the argument, <kbd>DOUBLE</kbd>, ENDNOTES_HEADER_UNDERSCORE will
+double-underscore the title. Invoked with any other non-numeric
+argument, (e.g. <kbd>OFF, NO, X</kbd>, etc.) the macro disables
+underscoring of the title.
+</p>
+
+<p>
+In addition, you can use ENDNOTES_HEADER_UNDERSCORE to control the
+weight of the underscore rule(s), the gap between the title and the
+underscore, and, in the case of double-underscores, the distance
+between the two rules.
+</p>
+
+<p>
+Some examples:
+<br/>
+<span class="pre-in-pp">
+ .ENDNOTES_HEADER_UNDERSCORE 1
+ - turn underscoring on; set the rule weight to 1 point
+
+ .ENDNOTES_HEADER_UNDERSCORE 1 3p
+ - turn underscoring on; set the rule weight to 1 point; set
+ the gap between the title and the underscore to 3 points
+
+ .ENDNOTES_HEADER_UNDERSCORE DOUBLE .75 3p
+ - turn double-underscoring on; set the rule weight to 3/4 of
+ a point; set the gap between the title and the upper
+ underscore to 3 points; leave the gap between the upper
+ and the lower underscore at the default
+
+ .ENDNOTES_HEADER_UNDERSCORE DOUBLE 1.5 1.5p 1.5p
+ - turn double-underscoring on; set the rule weight to 1-1/2
+ points; set the gap between the title and the upper
+ underscore to 1-1/2 points; set the gap between the upper
+ and the lower underscore to 1-1/2 points
+</span>
+Note, from the above, that in all instances, underscoring (single
+or double) is enabled whenever ENDNOTES_HEADER_UNDERSCORE is used in
+this way.
+</p>
+
+<p>
+By default, mom double-underscores the title if your
+<a href="docprocessing.html#printstyle">PRINTSTYLE</a>
+is <kbd>TYPEWRITE</kbd>.
+</p>
+
+<!-- -ENDNOTES_HEADER_CAPS- -->
+
+<h5 id="endnotes-header-caps" class="docs" style="margin-top: -.5em; margin-bottom: .5em; margin-left: .5em;">&bull;&nbsp;Header (first-page title) capitalization</h5>
+
+<div class="box-macro-args">
+Macro: <b>ENDNOTES_HEADER_CAPS</b> <kbd class="macro-args">toggle</kbd>
+</div>
+
+<p class="alias" style="margin-bottom: 0;">
+<i>Alias:</i> <b>ENDNOTE_STRING_CAPS</b> (for compatibility with older documents)
+</p>
+
+<p>
+Invoked by itself, <kbd>.ENDNOTES_HEADER_CAPS</kbd> will
+automatically capitalize the endnotes-page title. Invoked with any
+other argument, the macro disables automatic capitalization of the
+title.
+</p>
+
+<p>
+If you&#8217;re generating a table of contents, you may want the
+endnotes pages title to be in caps, but the toc entry in caps/lower
+case. If the argument to
+<a href="#endnotes-header-string">ENDNOTES_HEADER_STRING</a>
+is in caps/lower case and ENDNOTES_HEADER_CAPS is on, this is exactly
+what will happen.
+</p>
+
+<p>
+Mom&#8217;s default is to capitalize the endnotes pages title string.
+</p>
+
+<!-- -ENDNOTE_TITLE- -->
+
+<h4 id="endnotes-doc-title" class="docs" style="margin-top: -.25em;">5. Endnotes document-identification title control</h4>
+
+<h5 id="endnote-title" class="docs" style="margin-top: 1em; margin-bottom: .5em; margin-left: .5em;">&bull;&nbsp;Document-identification title string(s)</h5>
+
+<div class="box-macro-args">
+Macro: <b>ENDNOTE_TITLE</b> <kbd class="macro-args">&quot;&lt;title to identify a document in endnotes&gt;&quot;</kbd>
+</div>
+
+<p>
+By default, mom identifies the document(s) to which endnotes belong
+by the document title(s) given to the
+<a href="docprocessing.html#title">TITLE</a>
+macro. If you&#8217;d like her to identify the document(s) another
+way, simply invoke <kbd>.ENDNOTE_TITLE</kbd> prior to
+<a href="docprocessing.html#start">START</a>
+with the identifying title you want, surrounded by double-quotes.
+</p>
+
+<p>
+If you don&#8217;t want any identifying title, invoke
+<kbd>.ENDNOTE_TITLE</kbd> with a blank argument, either two
+double-quotes side by side (<kbd>&quot;&quot;</kbd>) or no argument
+at all. This is particularly useful if you have a single (i.e.
+non-collated) document and find having the document&#8217;s title
+included in the endnotes redundant.
+</p>
+
+<!-- -ENDNOTE_TITLE_CONTROL- -->
+
+<h5 id="endnote-title-control" class="docs" style="margin-top: .75em; margin-bottom: .5em; margin-left: .5em;">&bull;&nbsp;Document-identification string control macros and defaults</h5>
+
+<div class="defaults-container" style="padding-bottom: 8px;">
+<p class="defaults" style="padding-top: 6px;">
+See
+<a href="#control-macro-args">Arguments to the control macros</a>.
+<br/>
+The following ENDNOTE_TITLE_STYLE control macros may also be
+<a href="#grouping">grouped</a>
+using ENDNOTE_TITLE_STYLE_STYLE.
+</p>
+<span class="pre defaults">
+.ENDNOTE_TITLE_FAMILY default = prevailing document family; default is Times Roman
+.ENDNOTE_TITLE_FONT default = bold
+.ENDNOTE_TITLE_SIZE* default = 0
+.ENDNOTE_TITLE_COLOR default = black
+.ENDNOTE_TITLE_QUAD default = left
+.ENDNOTE_TITLE_CAPS
+.ENDNOTE_TITLE_SMALLCAPS
+.ENDNOTE_TITLE_UNDERSCORE default = single underscore
+
+*Relative to the size of the endnotes text (set with ENDNOTE_PT_SIZE)
+</span>
+</div>
+
+<!-- -ENDNOTE_NUMBERING- -->
+
+<h4 id="endnotes-numbering" class="docs" style="margin-top: -.25em;">6. Endnotes referencing style</h4>
+
+<h5 id="endnote-marker-style" class="docs" style="margin-top: 1em; margin-bottom: .5em; margin-left: .5em;">&bull;&nbsp;Endnote marker style</h5>
+
+<div class="box-macro-args">
+Macro: <b>ENDNOTE_MARKER_STYLE</b> <kbd class="macro-args"><a href="#line">LINE</a> | <a href="#number">NUMBER</a> | <a href="#superscript">SUPERSCRIPT</a></kbd>
+</div>
+
+<p id="line">
+<span style="display: block; margin-bottom: .25em;">&bull;&nbsp;<i>Argument:</i> <kbd>LINE</kbd></span>
+By default, mom places superscript numbers in
+<a href="definitions.html#running">running text</a>
+to identify endnotes. However, if you have
+<a href="#number-lines">linenumbering</a>
+turned on, you may instruct mom not to put superscript numbers in
+the running text, but rather to reference endnotes by line number.
+The command to do this is
+<br/>
+<span class="pre-in-pp">
+ .ENDNOTE_MARKER_STYLE LINE
+</span>
+With ENDNOTE_MARKER_STYLE <kbd>LINE</kbd>, mom will identify
+endnotes either by single line numbers or by line ranges. If
+what you want is a single line number, you need only invoke
+<kbd>.ENDNOTE</kbd> at the appropriate place in running
+text <i>without the terminating</i> <kbd>\c</kbd>. Input lines
+after the endnote has been terminated (e.g. with <kbd>.ENDNOTE
+OFF</kbd>) must begin at the left margin.
+</p>
+
+<p>
+(Should you wish to revert to mom&#8217;s default behaviour of
+placing a superscript number in the text to identify an endnote,
+you can invoke <kbd>.ENDNOTE_MARKER_STYLE</kbd> with the argument,
+<kbd>NUMBER</kbd>. It is not advisable to switch marker styles
+within a single document, for aesthetic reasons, but there is
+nothing to prevent you from doing so.)
+</p>
+
+<p id="en-mark">
+If you want a range of line numbers (e.g.&nbsp;[5-11]&nbsp;),
+insert, directly into the first line of the range you want, the
+<a href="definitions.html#inlines">inline escape</a>,
+<kbd><span class="nobr">\*[EN-MARK]</span></kbd>. For the terminating line
+number of the range, you need only invoke <kbd>.ENDNOTE</kbd>
+(again, without the terminating <kbd>\c</kbd>). Mom is smart enough
+to figure out that where <kbd>.ENDNOTE</kbd> is invoked represents
+the terminating line number.
+</p>
+
+<div id="endnote-linenumbers-note" class="box-tip">
+<p class="tip-top">
+<span class="note">Note:</span>
+By default, mom reserves a fixed amount of space, equal to 8
+placeholders, for the linenumbers of linenumbered endnotes. Within
+that space, the numbers are flush right with each other. The
+reserved space is enough to print a range of linenumbers of the form
+<kbd>[nnnn-nnnn]</kbd>, but may be more than you need.
+</p>
+
+<p>
+The goal with linenumbered endnotes is to ensure that the longest
+linenumber or range of lines is flush with the left margin of the
+page. Adjusting the reserved space is done with the macro
+<a href="docelement.html#endnote-numbers-align">ENDNOTE_NUMBERS_ALIGN</a>,
+and the rules for getting it right are simple.
+</p>
+
+<p class="tip-bottom">
+If your document runs to less than 100 lines, invoke
+<br/>
+<span class="pre-in-pp">
+ .ENDNOTE_NUMBERS_ALIGN RIGHT 0
+</span>
+If your document has between 100 and 999 lines
+<br/>
+<span class="pre-in-pp">
+ .ENDNOTE_NUMBERS_ALIGN RIGHT 1
+</span>
+If your document has between 1000 and 9999 lines
+<br/>
+<span class="pre-in-pp">
+ .ENDNOTE_NUMBERS_ALIGN RIGHT 2
+</span>
+etc.
+</p>
+</div>
+
+<p id="number" style="margin-top: -.5em;">
+<span style="display: block; margin-bottom: .25em;">&bull;&nbsp;<i>Argument:</i> <kbd>NUMBER</kbd></span>
+With the argument <kbd>NUMBER</kbd>, mom places superscript numbers
+in running text, but identifies endnotes in the endnotes section
+of your document with normal-sized, base-aligned numbers.
+</p>
+
+<p id="superscript" style="margin-top: -.5em;">
+<span style="display: block; margin-bottom: .25em;">&bull;&nbsp;<i>Argument:</i> <kbd>SUPERSCRIPT</kbd></span>
+With the argument <kbd>SUPERSCRIPT</kbd>, mom places superscript
+numbers in running text, and identifies endnotes in the endnotes
+section of your document with superscript numbers as well. This is
+mom&#8217;s default.
+</p>
+
+<div id="endnote-superscript-note" class="box-tip">
+<p class="tip-top">
+<span class="note">Note:</span>
+By default, mom reserves a fixed amount of space, equal to 2
+placeholders, for the superscript numbers identifying endnotes in
+the endnotes section of your document. Within that space, the
+numbers are flush right with each other.
+</p>
+
+<p class="tip-bottom">
+If you need less space (the total number of endnotes is less than 10) or
+more (the total number of endnotes is greater than 99), use the
+macro
+<a href="docelement.html#endnote-numbers-align">ENDNOTE_NUMBERS_ALIGN</a>,
+to set the desired amount of reserved space, e.g.
+<br/>
+<span class="pre-in-pp">
+ .ENDNOTE_NUMBERS_ALIGN RIGHT 1
+</span>
+or
+<br/>
+<span class="pre-in-pp">
+ .ENDNOTE_NUMBERS_ALIGN RIGHT 3
+</span>
+</p>
+</div>
+
+<h5 id="endnote-linenumber-gap" class="docs" style="margin-bottom: .5em; margin-left: .5em;">&bull;&nbsp;Spacing between line-numbered endnotes and the endnote text</h5>
+
+<div class="box-macro-args">
+Macro: <b>ENDNOTE_LINENUMBER_GAP</b> <kbd class="macro-args">&lt;size of gap&gt;</kbd>
+</div>
+
+<p class="requires">
+&bull;&nbsp;Requires a <a href="definitions.html#unitofmeasure">unit of measure</a>
+</p>
+
+<p>
+When your
+<a href="#endnote-marker-style">ENDNOTE_MARKER_STYLE</a>
+is <kbd>LINE</kbd>, mom, by default, inserts a space equal to
+1/2-<a href="definitions.html#em">en</a>
+between the linenumber and the text of an endnote. For aesthetic
+reasons, you may want to change the size of the gap, which is done
+with the macro ENDNOTE_LINENUMBER_GAP.
+</p>
+
+<p>
+ENDNOTE_LINENUMBER_GAP takes as its single argument the size
+of the gap. The argument requires a
+<a href="definitions.html#unitofmeasure">unit of measure</a>,
+so, for example, to change the gap to 2
+<a href="definitions.html#picaspoints">picas</a>,
+you&#8217;d do
+<br/>
+<span class="pre-in-pp">
+ .ENDNOTE_LINENUMBER_GAP 2P
+</span>
+</p>
+
+<h5 id="endnote-linenumber-brackets" class="docs" style="margin-top: -.5em; margin-bottom: .5em; margin-left: .5em;">&bull;&nbsp;Brackets around endnote line numbers</h5>
+
+<div class="box-macro-args">
+Macro: <b>ENDNOTE_LINENUMBER_BRACKETS</b> <kbd class="macro-args">PARENS | SQUARE | BRACES | ( | [ | {</kbd>
+</div>
+
+<p>
+By default, mom puts endnote line numbers inside square brackets.
+The style of the brackets may be changed with the macro
+ENDNOTE_LINENUMBER_BRACKETS, which takes one of three possible
+arguments: <kbd>PARENS</kbd> (&#8220;round&#8221; brackets),
+<kbd>SQUARE</kbd> (the default) or <kbd>BRACES</kbd> (curly braces).
+If you prefer a shortform, the arguments, <kbd>(</kbd>, <kbd>[</kbd>
+or <kbd>{</kbd> may be used instead.
+</p>
+
+<h5 id="endnote-linenumber-separator" class="docs" style="margin-top: -.5em; margin-bottom: .5em; margin-left: .5em;">&bull;&nbsp;Separator after endnote line numbers instead of brackets</h5>
+
+<div class="box-macro-args">
+Macro: <b>ENDNOTE_LINENUMBER_SEPARATOR</b> <kbd class="macro-args">&lt;character&gt;</kbd>
+</div>
+
+<p>
+If you don&#8217;t want the numbers enclosed in brackets, you may tell
+mom to use a separator instead. A common
+separator would be the colon, but it can be anything you like.
+</p>
+
+<p>
+ENDNOTE_LINENUMBER_SEPARATOR takes as its single argument the
+separator you want. (If the argument contains spaces, don&#8217;t
+forget to enclose the argument in double-quotes.) The separator
+can be composed of any valid groff character, or any combination of
+characters. For example, to get a colon separator after the line
+number in line-numbered endnotes, you&#8217;d do
+<br/>
+<span class="pre-in-pp">
+ .ENDNOTE_LINENUMBER_SEPARATOR :
+</span>
+</p>
+
+<h5 id="endnote-number-control" class="docs" style="margin-top: -1em; margin-bottom: .5em; margin-left: .5em;">&bull;&nbsp;Endnote numbering style control</h5>
+
+<div class="defaults-container" style="padding-bottom: 8px;">
+<p class="defaults" style="padding-top: 6px;">
+See
+<a href="#control-macro-args">Arguments to the control macros</a>.
+</p>
+
+<p class="defaults">
+Please note that the control macros for endnote numbering affect only
+the numbers that appear on the endnotes pages themselves, not the
+endnote numbers that appear in the body of a document.
+</p>
+<span class="pre defaults">
+Numbered endnotes
+.ENDNOTE_NUMBER_FAMILY default = prevailing document family; default Times Roman
+.ENDNOTE_NUMBER_FONT default = bold
+.ENDNOTE_NUMBER_SIZE* default = 0
+Linenumbered endnotes
+.ENDNOTE_LINENUMBER_FAMILY default = prevailing document family; default Times Roman
+.ENDNOTE_LINENUMBER_FONT default = bold
+.ENDNOTE_LINENUMBER_SIZE* default = 0
+
+*Relative to the size of the endnotes text (set with ENDNOTE_PT_SIZE)
+</span>
+</div>
+
+<h5 id="endnote-number-alignment" class="docs" style="margin-top: -1.25em; margin-bottom: -.5em; margin-left: .5em;">&bull;&nbsp;Endnote numbering alignment</h5>
+
+<p style="margin-top: .75em;">
+By default, when your
+<a href="#endnote-marker-style">ENDNOTE_MARKER_STYLE</a>
+is <kbd>NUMBER</kbd>, mom hangs the numbers on endnotes pages,
+aligned right to two placeholders, producing this:
+<br/>
+<span id="endnote-numbering-alignment-example" class="pre-in-pp">
+ 9. Lorem ipsum dolor sit amet, consetetur sadipscing elitr,
+ sed diam nonumy eirmod tempor invidunt ut labore et
+ dolore magna aliquyam erat, sed diam voluptua.
+
+ 10. Lorem ipsum dolor sit amet, consetetur sadipscing elitr,
+ sed diam nonumy eirmod tempor invidunt ut labore et
+ dolore magna aliquyam erat, sed diam voluptua.
+</span>
+If you wish to change either the alignment or the number of
+placeholders, the macro to use is ENDNOTE_NUMBERS_ALIGN.
+</p>
+
+<!-- -ENDNOTE_NUMBERS_ALIGN- -->
+
+<div id="endnote-numbers-align" class="box-macro-args">
+Macro: <b>ENDNOTE_NUMBERS_ALIGN</b> <kbd class="macro-args">LEFT | RIGHT &lt;number of placeholders&gt;</kbd>
+</div>
+
+<p>
+ENDNOTE_NUMBERS_ALIGN determines how endnote numbers are aligned. If you invoke
+<br/>
+<span class="pre-in-pp">
+ .ENDNOTE_NUMBERS_ALIGN RIGHT 2
+</span>
+the periods (dots) after the numbers will align, like this
+<span class="pre-in-pp">
+ 9. Lorem ipsum dolor sit amet, consetetur sadipscing elitr,
+ sed diam nonumy eirmod tempor invidunt ut labore et
+ dolore magna aliquyam erat, sed diam voluptua.
+
+ 10. Lorem ipsum dolor sit amet, consetetur sadipscing elitr,
+ sed diam nonumy eirmod tempor invidunt ut labore et
+ dolore magna aliquyam erat, sed diam voluptua.
+</span>
+If you invoke
+<span class="pre-in-pp">
+ .ENDNOTE_NUMBERS_ALIGN LEFT 2
+</span>
+the first digits of the numbers will line up flush left, like this
+<span class="pre-in-pp">
+ 9. Lorem ipsum dolor sit amet, consetetur sadipscing elitr,
+ sed diam nonumy eirmod tempor invidunt ut labore et
+ dolore magna aliquyam erat, sed diam voluptua.
+
+ 10. Lorem ipsum dolor sit amet, consetetur sadipscing elitr,
+ sed diam nonumy eirmod tempor invidunt ut labore et
+ dolore magna aliquyam erat, sed diam voluptua.
+</span>
+The argument <kbd>&lt;number of placeholders&gt;</kbd> represents
+the maximum size of the numbers, expressed as the number of
+digits in the largest number. Numbers in the range 0-9 require
+1 placeholder; in the range 10-99, 2 placeholders; in the range
+100-999 3 placeholders, and so on.
+</p>
+
+<p>
+Therefore, if you have fewer than ten endnotes,
+<br/>
+<span class="pre-in-pp">
+ .ENDNOTE_NUMBERS_ALIGN RIGHT 1
+</span>
+would ensure proper right alignment of endnote numbers.
+</p>
+
+<p>
+Mom&#8217;s default for endnote number alignment is to align the
+numbers right to two placeholders.
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span>
+ENDNOTE_NUMBERS_ALIGN can also be used to establish the alignment
+and number of placeholders when your
+<a href="#endnote-marker-style">ENDNOTE_MARKER_STYLE</a>
+is <kbd>SUPERSCRIPT</kbd>. Furthermore, it can be used to establish
+the number of placeholders to reserve when your ENDNOTE_MARKER_STYLE
+is <kbd>LINE</kbd>, even though, in such an instance, the numbers
+themselves are always aligned right. See
+<a href="#endnote-linenumbers-note">here</a>
+for examples.
+</p>
+</div>
+
+<div class="rule-short"><hr/></div>
+
+<!-- ==================================================================== -->
+
+<h2 id="margin-notes-intro" class="macro-group">Margin notes</h2>
+
+<ul style="margin-left: -.5em;">
+ <li><a href="#margin-notes-behaviour">Margin notes behaviour</a>
+ <ul style="margin-left: -.5em;">
+ <li><a href="#margin-notes-vertical">Adjusting the vertical position of margin notes</a></li>
+ </ul></li>
+ <li><a href="#mn-init">Macro: <b>MN_INIT</b></a> &ndash; set margin notes parameters</li>
+ <li><a href="#mn">Tag: MN</a></li>
+</ul>
+
+<p>
+Margin notes are short annotations that appear in either the left
+or right margin of a document. Sometimes they comment on the text.
+Sometimes they assist in following the &#8220;flow&#8221; of a
+document by summarizing the subject of a portion of text. Sometimes
+they&#8217;re comments to yourself in a draft copy.
+</p>
+
+<p>
+The margin notes macros and routines in om.tmac (mom) are
+&#8220;mommified&#8221; versions of the margin notes macros and
+routines written by Werner Lemberg and patched by Gaius Mulley.
+</p>
+
+<h3 id="margin-notes-behaviour" class="docs">Margin notes behaviour</h3>
+
+<p>
+First things first: before you enter your first margin note, you
+must &#8220;initialize&#8221; margin notes with
+<a href="#mn-init">MN_INIT</a>.
+MN_INIT sets up the style parameters for margin notes, including
+things like
+<a href="definitions.html#font">font</a>,
+<a href="definitions.html#family">family</a>
+and
+<a href="definitions.html#leading">leading</a>.
+MN_INIT may be called before or after
+<a href="docprocessing.html#start">START</a>.
+</p>
+
+<p>
+After initializing margin notes, you create margin notes with the
+<a href="#mn">MN</a>
+macro. Based on the argument you pass MN, your margin note will go
+in either the left or the right margin.
+</p>
+
+<p>
+Margin notes are tricky from a typographic standpoint with respect
+to vertical placement. Since the leading of margin notes may differ
+from that of
+<a href="definitions.html#running">running text</a>,
+it&#8217;s impossible for mom to guess whether to align
+the first lines of margin notes with a document
+<a href="definitions.html#baseline">baseline</a>,
+whether to align the last lines of margin notes with a document
+baseline, or whether to centre them, vertically, so that neither
+first nor last line aligns with anything!
+</p>
+
+<p>
+Given this difficulty, mom always aligns the first line of any
+margin note with a document baseline. If you want a different
+behaviour, you must adjust the position(s) of margin notes yourself,
+on a note by note basis. (See
+<a href="#margin-notes-vertical">Adjusting the vertical position of margin notes</a>.)
+</p>
+
+<p>
+Generally speaking, mom tries to place margin notes at the point
+where you invoke
+<a href="#mn">MN</a>.
+However, in the event that a margin note runs deep, she may not be
+able to place a subsequent margin note exactly where you want. In
+such an instance, mom will &#8220;shift&#8221; the margin note down
+on the page, placing it one (margin note) linespace beneath the
+previous margin note (plus whatever vertical space is required to
+get the first line to line up with a baseline of running text). A
+warning will be issued, letting you know this has happened, and
+where.
+</p>
+
+<p>
+Sometimes, if a margin note has to be shifted down, there simply
+isn&#8217;t enough room to start the margin note on the page on
+which <kbd>.MN</kbd> is invoked. In that case, mom ignores the
+margin note entirely and issues a warning, letting you know what
+she&#8217;s done, and where. </p>
+
+<p>
+In the event that a margin note, successfully begun on a page, runs
+past your bottom margin (or the last line before footnotes begin),
+the margin note will &#8220;flow&#8221; onto the next page. If
+it is a &#8220;left&#8221; margin note, it will continue in the
+left margin. If it is a &#8220;right&#8221; margin note, it will
+continue in the right margin.
+</p>
+
+<p>
+If your document is being set in two columns, mom will sensibly and
+automatically set all margin notes pertaining to the left column in
+the left margin, and all margin notes pertaining to the right column
+in the right margin, regardless of the &#8220;direction&#8221;
+argument you give the MN tag. If you try to use MN in documents of
+more than two columns, mom will ignore all margin notes, and issue
+a warning for each.
+</p>
+
+<h3 id="margin-notes-vertical" class="docs">Adjusting the vertical position of margin notes</h3>
+
+<p>
+When the
+<a href="definitions.html#term-leading">leading</a>
+of margin notes differs from the leading used throughout a document,
+you may want to adjust the vertical position of individual margin
+notes. This is most often going to be the case with margin notes
+that end near the bottom of the page, where you want the last line
+of the margin note to line up with the last line of text on the
+page.
+</p>
+
+<p>
+Adjustments to the vertical position of margin notes must be done
+inside the margin note (i.e. after <kbd>.MN</kbd>), at the top,
+before entering text. The commands to use are
+<kbd>\!<a href="typesetting.html#ald">.ALD</a></kbd>
+(to lower the margin note) and
+<kbd>\!<a href="typesetting.html#rld">.RLD</a></kbd>
+(to raise it).
+
+The <kbd>\!</kbd> must precede the macros, or they
+won&#8217;t have any effect.
+</p>
+
+<!-- -MN_INIT- -->
+
+<div class="macro-id-overline">
+<h3 id="mn-init" class="macro-id">MN_INIT</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>MN_INIT</b> <kbd class="macro-args">&lt;arguments&gt; (see list)</kbd>
+</div>
+
+<h4 style="margin-top: .75em; margin-left: .5em; font-style: normal; font-weight: bold: font-size: 105%; color: #6f614a;">Argument list:</h4>
+
+<span class="pre" style="margin-top: -1.5em; margin-left: .5em;">
+RAGGED | SYMMETRIC
+&lt;L_WIDTH&gt; &lt;value&gt;
+&lt;R_WIDTH&gt; &lt;value&gt;
+&lt;GUTTER&gt; &lt;value&gt;
+&lt;FONTSTYLE&gt; &lt;value&gt;
+&lt;SIZE&gt; &lt;value&gt;
+&lt;LEAD&gt; &lt;value&gt;
+&lt;COLOR&gt; &lt;value&gt;
+&lt;HY&gt; &lt;value&gt;
+</span>
+
+<p style="margin-top: 1.25em;">
+Before you enter your first margin note, you must initialize
+the style parameters associated with margin notes using MN_INIT.
+If you forget to do so, mom will issue a warning and abort.
+</p>
+
+<p>
+The arguments may be entered in any order, and since the list is
+long, use of the backslash character ( <kbd>\</kbd> ) to put each on
+a separate line is recommended, e.g.
+<br/>
+<span class="pre-in-pp">
+ .MN_INIT \
+ SYMMETRIC \
+ L_WIDTH 4P \
+ SIZE 8 \
+ LEAD 9 \
+ HY 14
+</span>
+All arguments are optional, but since mom requires you to run
+MN_INIT before entering margin notes, you should, at a minimum, set
+the <kbd>RAGGED</kbd> or <kbd>SYMMETRIC</kbd> parameter.
+You will almost certainly want to set <kbd>L_WIDTH</kbd>, <kbd>R_WIDTH</kbd>,
+<kbd>SIZE</kbd> and <kbd>LEAD</kbd> as well.
+</p>
+
+<h4 class="docs arg-list"><kbd>RAGGED | SYMMETRIC</kbd></h4>
+
+<p>
+If the argument <kbd>RAGGED</kbd> is given, both left and
+right margin notes will be flush left. If the argument
+<kbd>SYMMETRIC</kbd> is given, left margin notes will be set flush
+<i>right</i>, and right margin notes flush <i>left</i>. The effect
+is something like this:
+<br/>
+<span class="pre-in-pp">
+ A left This is a meaningless batch A right
+ margin note of text whose sole purpose is margin note
+ with just to demonstrate how the sym- with just
+ a few words metric argument to MN sets left a few words
+ in it. and right margin notes. in it.
+</span>
+</p>
+
+<p>
+If the argument is omitted, both left and right margin notes will
+be set justified. (Justified is usually not a good idea, since the
+narrow measure of margin notes makes pleasing justification a near
+impossibility.)
+</p>
+
+<h4 class="docs arg-list"><kbd>L_WIDTH &lt;value&gt;</kbd></h4>
+
+<p>
+The width of left margin notes. A
+<a href="definitions.html#unitofmeasure">unit of measure</a>
+must be appended directly onto the argument. The default is to set
+left margin notes right out to the edge of the page, which is almost
+certainly not what you want, so you should give a value for this
+argument if using left margin notes.
+</p>
+
+<h4 class="docs arg-list"><kbd>R_WIDTH &lt;value&gt;</kbd></h4>
+
+<p>
+The width of right margin notes. A
+<a href="definitions.html#unitofmeasure">unit of measure</a>
+must be appended directly onto the argument. The default is to
+set right margin notes right out to the edge of the page, which is
+almost certainly not what you want, so you should give a value for
+this argument if using right margin notes.
+</p>
+
+<h4 class="docs arg-list"><kbd>GUTTER &lt;value&gt;</kbd></h4>
+
+<p>
+The
+<a href="definitions.html#gutter">gutter</a>
+between margin notes and
+<a href="definitions.html#running">running text</a>.
+A
+<a href="definitions.html#unitofmeasure">unit of measure</a>
+must be appended directly onto the argument. The gutter applies to
+both left and right margin notes. The default is 1
+<a href="definitions.html#em">em</a>.
+</p>
+
+<h4 class="docs arg-list"><kbd>FONTSTYLE &lt;value&gt;</kbd></h4>
+
+<p>
+The family+font for margin notes. Yes, that&#8217;s right: the
+family <i>plus</i> font combo. For example, if you want Times
+Roman Medium, the argument must be <kbd>TR</kbd>. If you want Palatino
+Medium Italic, the argument must be <kbd>PI</kbd>. The default is the same
+family+font combo used for a document&#8217;s paragraph text.
+</p>
+
+<h4 class="docs arg-list"><kbd>SIZE &lt;value&gt;</kbd></h4>
+
+<p>
+The point size of type for margin notes. There is no need to append a
+<a href="definitions.html#unitofmeasure">unit of measure</a>
+to the argument;
+<a href="definitions.html#picaspoints">points</a>
+is assumed (although there&#8217;s nothing preventing you from
+appending an alternative unit of measure directly to the argument).
+The default is for margin notes to use the same point size of type
+as is used in document paragraphs.
+</p>
+
+<h4 class="docs arg-list"><kbd>LEAD &lt;value&gt;</kbd></h4>
+
+<p>
+The
+<a href="definitions.html#leading">leading</a>
+of margin notes. <kbd>&lt;LEAD&gt;</kbd> takes
+<a href="definitions.html#picaspoints">points</a>
+as its unit of measure, so don&#8217;t tack a unit of measure onto
+the end of the argument. The default lead is the same as paragraph
+text (i.e. the document&#8217;s base leading).
+</p>
+
+<h4 class="docs arg-list"><kbd>COLOR &lt;value&gt;</kbd></h4>
+
+<p>
+The colour of margin notes. The colour must be pre-initialized
+with
+<a href="color.html#newcolor">NEWCOLOR</a>
+or
+<a href="color.html#xcolor">XCOLOR</a>.
+The default is black.
+</p>
+
+<h4 class="docs arg-list"><kbd>HY &lt;value&gt;</kbd></h4>
+
+<p>
+<kbd>&lt;value&gt;</kbd> is a digit telling groff how you want margin
+notes hyphenated.
+<br/>
+<span class="pre-in-pp">
+ 0 = do not hyphenate
+ 1 = hyphenate without restrictions
+ 2 = do not hyphenate the last word on the page
+ 4 = do not hyphenate the last two characters of a word
+ 8 = do not hyphenate the first two characters of a word
+</span>
+The values can be added together, so, for example, if you want
+neither the first two nor the last two characters of words
+hyphenated, the hyphenation-flag would be 12. The default value is
+14 (i.e. 2+4+8).
+</p>
+
+<!-- -MN- -->
+
+<div class="macro-id-overline">
+<h3 id="mn" class="macro-id">MN</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>MN</b> <kbd class="macro-args">LEFT | RIGHT</kbd>
+</div>
+
+<p>
+Once you&#8217;ve initialized margin notes with
+<kbd><a href="#mn-init">.MN_INIT</a></kbd>,
+you can enter margin notes any time you like with <kbd>.MN</kbd>.
+An argument of <kbd>LEFT</kbd> will set a left margin note. An
+argument of <kbd>RIGHT</kbd> will set a right margin note.
+</p>
+
+<p>
+Any argument, such as <kbd>OFF</kbd> (or <kbd>OFF</kbd>,
+<kbd>QUIT</kbd>, <kbd>END</kbd>, <kbd>X</kbd>, etc) exits the
+current margin note.
+</p>
+
+<div class="rule-short"><hr/></div>
+
+<!-- ==================================================================== -->
+
+<!-- -FINIS- -->
+
+<h2 id="finis-intro" class="macro-group">Document termination string</h2>
+
+<ul style="margin-left: -.5em;">
+ <li><a href="#finis">Tag: FINIS</a></li>
+ <li><a href="#finis-control">FINIS control macros</a>
+ <ul style="margin-left: -1.25em;">
+ <li><a href="#finis-string">Changing the FINIS string</a></li>
+ <li><a href="#finis-string-caps">Automatic capitalization of the FINIS string</a></li>
+ <li><a href="#finis-color">Changing the FINIS colour</a></li>
+ <li><a href="#finis-no-dashes">Removing the dashes around FINIS</a></li>
+ </ul></li>
+</ul>
+
+<p>
+The use of FINIS is optional. If you invoke it at the end of a
+document (before
+<kbd><a href="#endnotes">.ENDNOTES</a></kbd>,
+<kbd><a href="refer.html#bibliography">.BIBLIOGRAPHY</a></kbd>
+or
+<kbd><a href="tables-of-contents.html#toc">.TOC</a></kbd>)
+mom deposits the word, <b>END</b>, centred after a blank line,
+beneath the last line of the document. <b>END</b> is enclosed
+between
+<a href="definitions.html#em">em-dashes</a>,
+like this:
+<br/>
+<span class="pre-in-pp">
+ ...and they all lived happily ever after.
+
+ &mdash; END &mdash;
+</span>
+If there is insufficient room for FINIS on the last page of a
+document, mom will alert you on stderr.
+</p>
+
+<p>
+If you&#8217;re writing in a language other than English, you can
+change what mom prints for END with the control macro
+<a href="#finis-string">FINIS_STRING</a>.
+</p>
+
+<div class="macro-id-overline">
+<h3 id="finis" class="macro-id">FINIS</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>FINIS</b>
+</div>
+
+<p>
+The use of FINIS is optional, but if you use it, it should be the
+last macro you invoke in a document before
+<kbd><a href="#endnotes">.ENDNOTES</a></kbd>,
+<kbd><a href="refer.html#bibliography">.BIBLIOGRAPHY</a></kbd>
+or
+<kbd><a href="tables-of-contents.html#toc">.TOC</a></kbd>.
+See
+<a href="#finis-intro">above</a>
+for a description of how FINIS behaves.
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span>
+If you don&#8217;t use FINIS, and you don&#8217;t want
+<a href="definitions.html#footer">footers</a>
+(if they&#8217;re on) or a page number at the bottom of the last
+page of a document, you have to turn them off manually, as the last
+two lines of your document file, like this:
+<br/>
+<span class="pre-in-pp">
+ .FOOTERS OFF
+ .PAGINATE OFF
+</span>
+</p>
+</div>
+
+<!-- -FINIS STRING- -->
+
+<h3 id="finis-control" class="docs" style="margin-bottom: -1em">Finis control macros</h3>
+
+<p>
+Since FINIS is only used once in a document, it has few control
+macros. It is expected that you will make changes to style
+parameters such as family, font, and size with
+<a href="definitions.html#inlines">inline escapes</a>
+in the FINIS string itself (see below).
+</p>
+
+<h4 id="finis-string" class="docs" style="margin-top: -.5em">Changing the FINIS string</h4>
+
+<p>
+By default, FINIS prints the word, END, between
+<a href="definitions.html#em">em-dashes</a>.
+If you&#8217;d like mom to print something else between the dashes,
+use the FINIS_STRING macro (anywhere in the document prior to
+FINIS).
+</p>
+
+<p>
+For example, if your document&#8217;s in French, you&#8217;d do
+<br/>
+<span class="pre-in-pp">
+ .FINIS_STRING "FIN"
+</span>
+Double-quotes must enclose the macro&#8217;s argument.
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span>
+If you pass FINIS_STRING a blank string,
+<br/>
+<span class="pre-in-pp">
+ .FINIS_STRING ""
+</span>
+mom will still print the em-dashes when you invoke
+<kbd>.FINIS</kbd>. This, in effect, produces a short, centred
+horizontal rule that terminates the document. (In
+<a href="docprocessing.html#printstyle">PRINTSTYLE <kbd>TYPEWRITE</kbd></a>,
+it&#8217;s a short, dashed line composed of four hyphens.)
+</p>
+</div>
+
+<!-- -FINIS STRING CAPS- -->
+
+<h4 id="finis-string-caps" class="docs">Automatic capitalization of the FINIS string</h4>
+
+<p>
+By default, mom sets the string you pass to FINIS all-caps.
+If you&#8217;d prefer that she not do so, but rather respect
+the FINIS string exactly as you enter it, invoke the macro
+<kbd>.FINIS_STRING_CAPS</kbd> with the <kbd>OFF</kbd> argument, like
+this:
+<br/>
+<span class="pre-in-pp">
+ .FINIS_STRING_CAPS OFF
+</span>
+<kbd>OFF</kbd>, above, could be anything, e.g. <kbd>NO</kbd> or
+<kbd>X</kbd>.
+</p>
+
+<!-- -FINIS COLOR- -->
+
+<h4 id="finis-color" class="docs">Changing the FINIS colour</h4>
+
+<p>
+Invoking the control macro <kbd>.FINIS_COLOR</kbd> with a
+pre-defined (or &#8220;initialized&#8221;) colour changes the colour
+of both the FINIS string and the em-dashes that surround it. If you
+use the
+<a href="definitions.html#inline">inline escape</a>,
+<a href="color.html#color-inline"><kbd><span class="nobr">\*[&lt;colourname&gt;]</span></kbd></a>,
+in the argument passed to FINIS, only the text will be in the
+new colour; the em-dashes will be in the default document colour
+(usually black).
+</p>
+
+<!-- -FINIS DASHES- -->
+
+<h4 id="finis-no-dashes" class="docs">Removing the dashes around FINIS</h4>
+
+<p>
+If you don&#8217;t want the dashes around the FINIS string, you can
+remove them with
+<br/>
+<span class="pre-in-pp">
+ .FINIS_NO_DASHES
+</span>
+</p>
+
+<div class="rule-long"><hr/></div>
+
+<!-- Navigation links -->
+<table style="width: 100%; margin-top: 12px;">
+<tr>
+ <td style="width: 33%;"><a href="toc.html">Back to Table of Contents</a></td>
+ <td style="width: 33%; text-align: center;"><a href="#top">Top</a></td>
+ <td style="width: 33%; text-align: right;"><a href="images.html#top">Next: Graphics, floats, and preprocessor support</a></td>
+</tr>
+</table>
+
+</div>
+
+<div class="bottom-spacer"><br/></div>
+
+</body>
+</html>
diff --git a/contrib/mom/momdoc/docprocessing.html b/contrib/mom/momdoc/docprocessing.html
new file mode 100644
index 0000000..4d09553
--- /dev/null
+++ b/contrib/mom/momdoc/docprocessing.html
@@ -0,0 +1,4420 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+This file is part of groff, the GNU roff type-setting system.
+
+Copyright (C) 2004-2020 Free Software Foundation, Inc.
+Written by Peter Schaffter (peter@schaffter.ca).
+
+Permission is granted to copy, distribute and/or modify this document
+under the terms of the GNU Free Documentation License, Version 1.3 or
+any later version published by the Free Software Foundation; with no
+Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
+Texts.
+
+A copy of the Free Documentation License is included as a file called
+FDL in the main directory of the groff source package.
+-->
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+<head>
+ <meta http-equiv="content-type" content="text/html;charset=utf-8"/>
+ <title>Mom -- Document Processing, Introduction and Setup</title>
+ <link rel="stylesheet" type="text/css" href="stylesheet.css" />
+</head>
+
+<body style="background-color: #f5faff;">
+
+<!-- ==================================================================== -->
+
+<div id="top" class="page">
+
+<!-- Navigation links -->
+<table style="width: 100%;">
+<tr>
+ <td><a href="toc.html">Back to Table of Contents</a></td>
+ <td style="text-align: right;"><a href="docelement.html#top">Next: The document element tags</a></td>
+</tr>
+</table>
+
+<h1 class="docs">Document processing with mom</h1>
+
+<h2 id="toc-doc-processing" class="docs" style="text-align: center;">Table of contents</h2>
+
+<div id="docprocessing-mini-toc" style="font-size: 90%; line-height: 150%; margin-top: .5em;">
+<div class="mini-toc-col-1" style="margin-left: 0;">
+<h3 class="toc toc-docproc-header" style="margin-top: 1em;"><a class="header-link" href="#docprocessing-intro">Introduction to document processing</a></h3>
+<h3 class="toc toc-docproc-header" style="margin-top: .5em;"><a class="header-link" href="#defaults">Document defaults</a></h3>
+<h3 class="toc toc-docproc-header" style="margin-top: .5em;"><a class="header-link" href="#vertical-whitespace-management">Vertical whitespace management</a></h3>
+<h3 class="toc toc-docproc-header" style="margin-top: .5em;"><a class="header-link" href="#setup">Preliminary document setup</a></h3>
+<ul class="toc-docproc" style="margin-top: .5em;">
+ <li><a href="#docprocessing-tut"><b>Tutorial &ndash; Setting up a mom document</b></a></li>
+ <li><a href="#reference-macros"><b>The reference macros (metadata)</b></a>
+ <ul class="toc-docproc">
+ <li><a href="#title">TITLE</a></li>
+ <li><a href="#doc-title">DOCTITLE</a></li>
+ <li><a href="#subtitle">SUBTITLE</a></li>
+ <li><a href="#author">AUTHOR</a></li>
+ <li><a href="#chapter">CHAPTER</a></li>
+ <li><a href="#chapter-title">CHAPTER_TITLE</a></li>
+ <li><a href="#draft">DRAFT</a></li>
+ <li><a href="#revision">REVISION</a></li>
+ <li><a href="#copyright">COPYRIGHT</a></li>
+ <li><a href="#misc">MISC</a></li>
+ <li><a href="#covertitle">COVERTITLE</a></li>
+ <li><a href="#doc-covertitle">DOC_COVERTITLE</a></li>
+ <li><a href="#pdftitle">PDF_TITLE</a></li>
+ <li><a href="#toc-heading">TOC_HEADING</a></li>
+ </ul></li>
+ <li><a href="#docstyle-macros"><b>The docstyle macros (templates)</b></a>
+ <ul class="toc-docproc">
+ <li><a href="#doctype">DOCTYPE (default, chapter, letter, named, slides)</a></li>
+ <li><a href="#slides">DOCTYPE SLIDES</a>
+ <ul class="toc-docproc">
+ <li><a href="#newslide">NEWSLIDE</a></li>
+ <li><a href="#pause">PAUSE</a></li>
+ <li><a href="#transition">TRANSITION</a></li>
+ </ul></li>
+ <li><a href="#printstyle">PRINTSTYLE</a></li>
+ <li><a href="#copystyle">COPYSTYLE</a></li>
+ </ul></li>
+ <li><a href="cover.html"><b>Cover pages</b></a></li>
+ <li><a href="#docheader"><b>Managing the document header</b></a>
+ <ul class="toc-docproc">
+ <li><a href="#docheader">DOCHEADER</a></li>
+ <li><a href="#docheader-control">Docheader control</a>
+ <ul class="toc-docproc">
+ <li><a href="#docheader-desc">Docheader description</a></li>
+ <li><a href="#index-docheader-control">Macro list</a></li>
+ </ul></li>
+ </ul></li>
+</ul>
+</div>
+<div class="mini-toc-col-2">
+<br/>
+<h3 class="toc toc-docproc-header"><a class="header-link" href="#start-macro">Initiate document processing</a></h3>
+<ul class="toc-docproc" style="margin-top: .5em;">
+ <li><a href="#start"><b>The START macro</b></a></li>
+</ul>
+<h3 class="toc toc-docproc-header"><a class="header-link" href="#style-before-start">Establishing type and formatting<br/><span style="display: block; margin-top: -.3em;">parameters before START</span></a></h3>
+<ul class="toc-docproc">
+ <li><a href="#type-before-start"><b>Behaviour of the typesetting macros before START</b></a>
+ <ul class="toc-docproc">
+ <li><a href="docprocessing.html#include">Including (sourcing) style sheets and files</a></li>
+ <li><a href="#color">Initializing colours</a></li>
+ </ul></li>
+</ul>
+<ul class="toc-docproc" style="margin-top: -1em">
+ <li><a href="#doc-lead-adjust"><b>Adjust linespacing to fill pages</b></a>
+ <ul class="toc-docproc">
+ <li><a href="#doc-lead-adjust">DOC_LEAD_ADJUST</a></li>
+ <li><a href="#shim">SHIM</a> &ndash; get document leading back on track
+ <ul class="toc-docproc">
+ <li><a href="#automatic-shimming">Automatic shimming (headings, etc)</a></li>
+ </ul></li>
+ </ul></li>
+ <li><a href="#columns-intro"><b>Setting documents in columns</b></a>
+ <ul class="toc-docproc">
+ <li><a href="#columns">COLUMNS</a></li>
+ <li><a href="#marking-col-start">Marking the first page column start position</a>
+ <ul class="toc-docproc">
+ <li><a href="#col-mark">COL_MARK</a></li>
+ </ul></li>
+ <li><a href="#breaking-columns">Breaking columns manually</a>
+ <ul class="toc-docproc">
+ <li><a href="#col-next">COL_NEXT</a> and <a href="#col-break">COL_BREAK</a></li>
+ </ul></li>
+ </ul></li>
+</ul>
+<h3 class="toc toc-docproc-header"><a class="header-link" href="#style-after-start">Changing basic type and formatting<br/><span style="display: block; margin-top: -.3em;">parameters after START</span></a></h3>
+<ul class="toc-docproc" style="margin-top: .5em;">
+ <li><a href="#behaviour"><b>Behaviour of the typesetting macros during document processing</b></a></li>
+ <li><a href="docprocessing.html#intro-doc-param"><b>Changing document-wide typesetting parameters after START</b></a>
+ <ul class="toc-docproc">
+ <li><a href="docprocessing.html#index-doc-param">Post-START global style change macros</a>
+ <ul class="toc-docproc">
+ <li><a href="#doc-left-margin">DOC_LEFT_MARGIN</a></li>
+ <li><a href="#doc-right-margin">DOC_RIGHT_MARGIN</a></li>
+ <li><a href="#doc-line-length">DOC_LINE_LENGTH</a></li>
+ <li><a href="#doc-family">DOC_FAMILY</a></li>
+ <li><a href="#doc-pt-size">DOC_PT_SIZE</a></li>
+ <li><a href="#doc-lead">DOC_LEAD</a></li>
+ <li><a href="#doc-lead-adjust">DOC_LEAD_ADJUST</a></li>
+ <li><a href="#doc-quad">DOC_QUAD</a></li>
+ </ul></li>
+ </ul></li>
+</ul>
+<h3 class="toc toc-docproc-header"><a class="header-link" href="#terminating">Terminating a document</a></h3>
+</div>
+</div>
+
+<div class="rule-short" style="margin-top: -1.75em"><br/><hr/></div>
+
+<!-- ==================================================================== -->
+
+<h2 id="docprocessing-intro" class="docs" style="margin-top: 1em">Introduction to document processing</h2>
+
+<p>
+Document processing with mom uses markup tags to identify document elements
+such as headings, paragraphs, blockquotes, and so on. The tags are, of course,
+macros, but with sensible, readable names that make them easy
+to grasp and easy to remember. (And don&#8217;t forget: if you
+don&#8217;t like the &#8220;official&#8221; name of a tag &mdash;
+too long, cumbersome to type in, not &#8220;intuitive&#8221; enough
+&mdash; you can change it with the
+<a href="goodies.html#alias">ALIAS</a>
+macro.)
+</p>
+
+<p>
+In addition to the tags themselves, mom has an extensive array of
+macros that control how they look and behave.
+</p>
+
+<p>
+Setting up a mom doc is a simple, four-part procedure. You
+begin by entering metadata about the document itself (title,
+subtitle, author, etc.). Next, you tell mom what kind of document
+you&#8217;re creating (e.g. a chapter, letter, abstract, etc...) and
+what kind of output you want (typeset, typewritten, draft-style,
+etc) &mdash; essentially, templates. Thirdly, you make as many
+or as few changes to the templates as you wish; in other words,
+create a style sheet. Lastly, you invoke the
+<kbd><a href="#start">START</a></kbd>
+macro. Voilà! You&#8217;re ready to write.
+</p>
+
+<!-- ==================================================================== -->
+
+<h2 id="defaults" class="docs">Document defaults</h2>
+
+<p>
+As is to be expected, mom has defaults for everything. If you want
+to know a particular default, read about it in the description of
+the pertinent tag.
+</p>
+
+<p>
+I fear the following may not be adequately covered elsewhere in the
+documentation, so just in case:
+</p>
+<ul style="margin-top: -.5em; margin-bottom: .5em;">
+ <li>the paper size is 8.5x11 inches</li>
+ <li>the left and right margins are 1-inch</li>
+ <li>the top and bottom margins for document text are plus/minus
+ visually 1-inch
+ </li>
+ <li>pages are numbered; the number appears centred, at the
+ bottom, surrounded by hyphens (e.g. -6- )
+ </li>
+ <li>the first page of a document begins with a
+ <a href="definitions.html#docheader">document header</a>
+ </li>
+ <li>subsequent pages have
+ <a href="definitions.html#header">page headers</a>
+ with a rule underneath
+ </li>
+</ul>
+
+<!-- ==================================================================== -->
+
+<h2 id="vertical-whitespace-management" class="macro-group">Vertical whitespace management</h2>
+
+<ul style="margin-left: -.5em;">
+ <li><a href="#shim">Macro: SHIM</a></li>
+ <li><a href="#no-shim">Macro: NO_SHIM</a></li>
+ <li><a href="#flex">Macro: FLEX</a></li>
+ <li><a href="#no-flex">Macro: NO_FLEX</a></li>
+</ul>
+
+
+<p>
+Mom takes evenly-aligned bottom margins in
+<a href="definitions.html#running">running text</a>
+very seriously. Only under a very few, exceptional circumstances
+will she allow a bottom margin to &#8220;hang&#8221; (i.e. to fall
+short).
+</p>
+
+<p>
+Mom offers two modes of operation for ensuring flush bottom margins:
+shimming and flex-spacing. Shimming means that mom nudges the
+next line after a significant break in running text back onto the
+<a href="definitions.html#baseline-grid">baseline grid</a>
+(e.g. after the insertion of a graphic). Flex-spacing means that any
+vertical whitespace remaining between the end of running text and
+the bottom margin is distributed equally at logical points on the
+page.
+</p>
+
+<p>
+Mom uses the
+<a href="definitions.html#leading">leading</a>
+of running text (the &#8220;document leading&#8221;) that&#8217;s in effect
+<i>at the start of running text on each page</i>
+to establish the grid and space document elements such as heads or
+blockquotes so that they adhere to it. (Prior to invoking
+<a href="#start">START</a>,
+the document leading is set with the
+<a href="typesetting.html#macros-typesetting">typesetting macro</a>
+<a href="typesetting.html#leading">LS</a>,
+afterwards with the
+<a href="definitions.html#controlmacro">document control macro</a>
+<a href="#doc-lead">DOC_LEAD</a>.)
+</p>
+
+<p>
+What this means is that documents whose paragraphs are not separated
+by whitespace and which do not contain graphics or
+<a href="definitions.html#pre-processor">pre-processor material</a>
+will fill the page completely to the bottom margin.
+However, if your paragraphs are spaced, or if there are any leading
+changes on a page, or if graphics or pre-processor material are
+inserted, it&#8217;s very likely the bottom margins will hang
+unless shimming or flex-spacing is enabled.
+</p>
+
+<h3 id="shim-vs-flex" class="docs">Shimming <span style="text-transform: none">vs.</span> flex-spacing</h3>
+
+<p>
+<b>Shimming</b> is mom&#8217;s default mode of operation. She applies it
+automatically before headings, around quotes and blockquotes, and
+beneath
+<a href="definitions.html#float">floats</a>
+and
+<a href="definitions.html#preprocessor">pre-processor material</a>.
+In addition, the
+<a href="#shim">SHIM</a>
+macro can be inserted into a document at any point to make sure
+the text following falls on the baseline grid.
+</p>
+
+<p>
+This mode of operation works well in documents whose paragraphs are
+not spaced. Deviations from the baseline grid, usually
+caused by floats or pre-processor material, are corrected
+immediately. If the shimming results in slightly unbalanced
+whitespace around them, it can easily be remedied by passing the
+<kbd>ADJUST</kbd> argument to the appropriate macro.
+</p>
+
+<p>
+If you do not want mom shimming automatically,
+<a href="#no-shim">NO_SHIM</a>
+turns shimming off globally and suppresses the SHIM macro. If you
+want to disable shimming only for a particular float or
+pre-processor, the <kbd>NO_SHIM</kbd> argument may be given to the
+appropriate macro.
+</p>
+
+<p>
+<b>Flex-spacing</b> kicks in automatically whenever you turn shimming
+off. In other words, if you want a document flex-spaced,
+<kbd>.NO_SHIM</kbd> is how you achieve it. If, in addition to not
+shimming, you don&#8217;t want mom flex-spacing either,
+<a href="#no-flex">NO_FLEX</a>
+lets you disable it, too.
+</p>
+
+<p>
+Flex-spacing differs from shimming in that mom doesn&#8217;t
+correct deviations from the baseline grid. Rather, she distributes
+whitespace left at the bottom of the page equally in appropriate
+places. Like shimming, flex-spacing is automatically applied
+before heads, after floats and pre-processor material, and around
+quotes and blockquotes. Like shimming, flex-spacing can be
+disabled for individual floats or pre-processor material with the
+<kbd>NO_FLEX</kbd> flag.
+</p>
+
+<p>
+In addition, you can use the
+<a href="#flex">FLEX</a>
+macro to insert flex-spacing yourself into the document, which you
+will almost certainly want to do if your paragraphs are spaced.
+This is because paragraphs are not flex-spaced. Typographically,
+the ideal for spaced paragraphs is that the space between them
+remain constant. Paradoxically, the only way to achieve flush
+bottom margins, or to correct excessive flex-spacing before a
+heading, is by adding flex-space between the paragraphs. This
+requires human judgment, and mom does not presume to decide for you.
+</p>
+
+<p>
+Shimming and flex-spacing are mutually exclusive. If the one is
+active, the other isn&#8217;t unless you have disabled both. This means
+that you cannot use the FLEX macro when shimming is enabled, or the
+SHIM macro when flex-spacing is enabled. Mom will issue a warning
+if you do.
+</p>
+
+<p>
+The choice of whether to use shimming or flex-spacing depends on
+whether or not your paragraphs are spaced. In a document with
+indented, non-spaced paragraphs, shimming and flex-spacing produce
+nearly the same result, with shimming winning by an aesthetic hair.
+In documents with spaced paragraphs, flex-spacing is the only way to
+achieve flush bottom margins.
+</p>
+
+<!-- -SHIM- -->
+
+<div class="macro-id-overline">
+<h3 id="shim" class="macro-id">SHIM</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>SHIM</b>
+</div>
+
+<p>
+When shimming is enabled, which it is by default, the SHIM macro
+allows you to nudge the line following it back onto the baseline
+grid. In documents with non-spaced paragraphs, this prevents
+the bottom margins from hanging.
+</p>
+
+<p style="margin-bottom: -1em">
+Mom herself automatically applies shimming
+</p>
+<ul>
+ <li><i>before</i> headings</li>
+ <li><i>around</i> quotes and blockquotes</li>
+ <li><i>after</i> PDF images, tables, pic diagrams, equations, and floats</li>
+</ul>
+
+<p>
+You may sometimes find the amount of space generated by
+<kbd>SHIM</kbd> looks too big, whether inserted manually into a
+document or as a result of automatic shimming.
+The situation occurs when the amount of shimming applied
+comes close to the leading currently in effect, making it seem as if
+there&#8217;s one linespace too much whitespace.
+</p>
+
+<p>
+The solution is simply to add <kbd>.SPACE&nbsp;-1v</kbd> or
+<kbd>.RLD&nbsp;1v</kbd> to the document immediately after
+<kbd>.SHIM</kbd>. (Both <kbd>.SPACE&nbsp;-1v</kbd> and
+<kbd>.RLD&nbsp;1v</kbd> back up by one linespace.)
+</p>
+
+<div class="macro-id-overline">
+<h3 id="no-shim" class="macro-id">NO_SHIM</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>NO_SHIM</b> <kbd class="macro-args">&lt;none&gt; | &lt;anything&gt;</kbd>
+</div>
+
+<p>
+NO_SHIM, without an argument, disables automatic shimming,
+suppresses the SHIM macro, and enables flex-spacing.
+</p>
+
+<p>
+NO_SHIM with any argument (e.g. <kbd>OFF</kbd>, <kbd>QUIT</kbd>,
+<kbd>END</kbd>, <kbd>X</kbd>, etc) re-enables shimming if it has
+been disabled and disables flex-spacing.
+</p>
+
+<!-- -FLEX- -->
+
+<div class="macro-id-overline">
+<h3 id="flex" class="macro-id">FLEX</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>FLEX</b> <kbd class="macro-args">[ FORCE ]</kbd>
+</div>
+
+<p>
+When flex-spacing is enabled, the FLEX macro inserts flexible
+vertical whitespace into a document. The amount of flex-space is
+determined from any extra whitespace at the bottom of a page divided
+by the number of flex points on the same page.
+</p>
+
+<p style="margin-bottom: -1em">
+If flex-spacing is enabled, mom herself automatically applies
+flex-spacing
+</p>
+<ul style="margin-bottom: -.5em">
+ <li><i>before</i> headings</li>
+ <li><i>around</i> quotes and blockquotes</li>
+ <li><i>after</i> PDF images, tables, pic diagrams, equations, and floats</li>
+</ul>
+
+<p>
+Near the bottom of some pages, you may find that
+<a href="definitions.html#float">floated</a>
+or
+<a href="definitions.html#preprocessor">pre-processor material</a>,
+including images, or a single line of text afterwards, is not flush
+with the bottom margin. This is a result of mom flex-spacing
+<i>after</i> such material but not before. The solution to is
+insert <kbd>.FLEX</kbd> immediately beforehand.
+</p>
+
+<p>
+There are some instances where mom inhibits flex-spacing, notably
+after outputting floated material deferred from one page to the
+next. Introducing FLEX by itself in these instances&mdash;say,
+before a head or paragraph&mdash;will not have any effect; you must
+pass FLEX the <kbd>FORCE</kbd> argument.
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="important">Important note on flex-spacing policy:</span><br/>
+Mom disables flex-spacing on
+</p>
+<ul style="margin-top: -1em; margin-bottom: -.5em">
+ <li>the last page or column of a document, before the Table of Contents,
+ Endnotes, Bibliography, and/or any &#8220;Lists of...&#8221;
+ </li>
+ <li>the page preceding a
+ <a href="rectoverso.html#collate">COLLATE</a>
+ </li>
+ <li>the page preceding a
+ <a href="typesetting.html#NEWPAGE">NEWPAGE</a>
+ or
+ <a href="headfootpage.html#blankpage">BLANKPAGE</a>
+ </li>
+ <li>the column preceding a
+ <a href="#col-next">COL_NEXT</a>
+ or
+ <a href="#col-break">COL_BREAK</a>
+ </li>
+</ul>
+
+<p>
+If this is not what you want, insert
+<a href="#no-flex"><kbd>.NO_FLEX&nbsp;OFF</kbd></a>
+before the first flex-space point on the affected page or in the
+affected column.
+</p>
+
+<p>
+Flex-spacing is also disabled for any page or column where
+insufficient room at or near the bottom causes a
+<a href="docelement.html#heading">HEADING</a>
+or
+<a href="images.html#tbl">table</a>
+to be moved to the top of the next page. These situations cannot
+be harmonized with flex-spacing except by adjusting your layout
+to prevent them. You may try re-enabling flex-spacing for the
+page (<kbd>.NO_FLEX&nbsp;OFF</kbd>) and manually inserting
+flex-spaces at appropriate points, but the original whitespace is
+usually large enough that re-distributing it merely changes
+one layout gaffe into another.
+</p>
+
+<p>
+Very occasionally you may notice that a document element (spaced
+paragraph, floated material, pre-processor material, or a PDF image)
+near the bottom of page has also caused mom to disable flex-spacing
+for that page. This occurs when the document element following it
+is a
+<a href="docelement.html#pp-space">spaced paragraph</a>.
+</p>
+
+<p>
+It is typographically acceptable for there to be space between
+insertions in running text (e.g. an image) and the bottom margin when
+the next page begins with a paragraph. If you&#8217;d like to
+nudge the insertion a little closer to the bottom margin&mdash;not
+all the way; that isn&#8217;t possible without pushing it to the
+next page and disrupting subsequent flex-spacing&mdash;insert a
+small amount of space beforehand with
+<a href="typesetting.html#sp">SP</a>.
+Do not, in these cases, use the <kbd>ADJUST</kbd>
+argument (for example to
+<a href="images.html#pdf-image">PDF_IMAGE</a>.)
+</p>
+
+<p class="tip-bottom">
+In the case of a spaced paragraph itself near the bottom of the page
+causing a break, re-enabling flex-spacing
+(<kbd>.NO_FLEX&nbsp;OFF</kbd>) at an appropriate place in your input
+file will resolve the issue, provided there is at least one
+flex-point on the page. If not, add one or more.
+</p>
+</div>
+
+<div class="macro-id-overline">
+<h3 id="no-flex" class="macro-id">NO_FLEX</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>NO_FLEX</b> <kbd class="macro-args">&lt;none&gt; | &lt;anything&gt;</kbd>
+</div>
+
+<p>
+NO_FLEX, without an argument, disables automatic flex-spacing
+and suppresses the FLEX macro. If, in addition to NO_FLEX, NO_SHIM
+has also been given, your document will be neither flex-spaced nor
+shimmed.
+</p>
+
+<p>
+NO_FLEX with any argument (e.g. <kbd>OFF</kbd>, <kbd>QUIT</kbd>,
+<kbd>END</kbd>, <kbd>X</kbd>, etc) re-enables flex-spacing if it has
+been disabled.
+</p>
+
+<div class="rule-short"><hr/></div>
+
+<!-- ==================================================================== -->
+
+<h2 id="setup" class="docs" style="margin-bottom: .5em;">Preliminary document setup</h2>
+
+<div class="examples-container" style="margin-bottom: 1.5em;">
+<h3 id="docprocessing-tut" class="docs">Tutorial &ndash; Setting up a mom document</h3>
+
+<p style="margin-top: 1em;">
+There are four parts to setting up a mom doc (three, actually,
+with one optional). Before we proceed, though, be reassured that
+something as simple as
+<br/>
+<span class="pre-in-pp">
+ .TITLE "By the Shores of Lake Attica"
+ .AUTHOR "Rosemary Winspeare"
+ .PRINTSTYLE TYPESET
+ .START
+</span>
+produces a beautifully typeset 8.5x11 document, with a
+<a href="definitions.html#docheader">docheader</a>
+at the top of page 1,
+<a href="definitions.html#header">page headers</a>
+with the title and author on subsequent pages, and page numbers at
+the bottom of each page. In the course of the document, headings,
+citations, quotes, epigraphs, and so on, all come out looking neat,
+trim, and professional.
+</p>
+
+<p>
+For the purposes of this tutorial, we&#8217;re going to set up
+a short story&mdash;<i>My Pulitzer Winner</i>&mdash;by Joe Blow.
+Thankfully, we don&#8217;t have to look at story itself, just the
+setup. Joe wants the document
+</p>
+<ul style="margin-top: -.5em; margin-bottom: -.5em;">
+ <li>to be draft 7, revision 39;</li>
+ <li>to use the DEFAULT template;</li>
+ <li>to print as draft-style output (instead of final-copy output);</li>
+ <li>to be typeset, in Helvetica, 12 on 14,
+ <a href="definitions.html#rag">rag-right</a>;
+ </li>
+ <li>to have <a href="definitions.html#footer">footers</a>
+ instead of
+ <a href="definitions.html#header">headers</a>;
+ </li>
+ <li>to use a single asterisk for
+ <a href="definitions.html#linebreak">author linebreaks</a>.
+ </li>
+</ul>
+
+<p>
+Joe Blow has no taste in typography. His draft won&#8217;t look
+pretty, but this is, after all, a tutorial; we&#8217;re after
+examples, not beauty.
+</p>
+
+<h4 class="docs" style="margin-top: -.5em;">Step 1</h4>
+
+<p style="margin-bottom: -.5em;">
+The first step in setting up any document is giving mom some
+reference information (metadata). The reference macros are:
+</p>
+<div style="width: 50%; float: left;">
+<ul>
+ <li>TITLE</li>
+ <li>SUBTITLE</li>
+ <li>AUTHOR</li>
+ <li>CHAPTER &ndash; chapter number</li>
+ <li>CHAPTER_TITLE</li>
+ <li>DRAFT &ndash; draft number</li>
+ <li>REVISION &ndash; revision number</li>
+</ul>
+</div>
+<div>
+<ul>
+ <li>COPYRIGHT &ndash; only used on cover pages</li>
+ <li>MISC &ndash; only used on cover pages</li>
+ <li>DOCTITLE</li>
+ <li>COVERTITLE</li>
+ <li>DOC_COVERTITLE</li>
+ <li>PDF_TITLE</li>
+</ul>
+</div>
+
+<p style="margin-top: -.5em; clear: both;">
+You can use as many or as few as you wish, although at a minimum,
+you&#8217;ll probably fill in TITLE (unless the document&#8217;s a
+letter) and AUTHOR. Order doesn&#8217;t matter. You can separate
+the
+<a href="definitions.html#arguments">arguments</a>
+from the macros by any number of spaces. The following are what
+you&#8217;d need to start Joe Blow&#8217;s story.
+<br/>
+<span class="pre-in-pp">
+ .TITLE "My Pulitzer Winner"
+ .AUTHOR "Joe Blow"
+ .DRAFT 7
+ .REVISION 39
+</span>
+</p>
+
+<h4 class="docs" style="margin-top: -1.5em;">Step 2</h4>
+
+<p>
+Once you&#8217;ve given mom the reference information she needs, you
+tell her how you want your document formatted. What kind of
+document is it? Should it be typeset or typewritten? Is this a
+final copy (for the world to see) or just a draft? Mom calls
+the macros that answer these questions &#8220;the docstyle
+macros&#8221;, and they&#8217;re essentially templates.
+</p>
+<ul style="margin-top: -.5em; margin-bottom: -.5em;">
+ <li>PRINTSTYLE&mdash;typeset or typewritten</li>
+ <li>DOCTYPE&mdash;the type of document (default, chapter, user-defined, letter, slide)</li>
+ <li>COPYSTYLE&mdash;draft or final copy</li>
+</ul>
+
+<p>
+Mom has defaults for DOCTYPE and COPYSTYLE; if they&#8217;re what
+you want, you don&#8217;t need to include them. However,
+PRINTSTYLE has no default and must be present in every formatted
+document. If you omit it, mom won&#8217;t process the document
+AND she&#8217;ll complain (both to stderr and as a single printed
+sheet with a warning). Moms&mdash;they can be so annoying
+sometimes. &lt;sigh&gt;
+</p>
+
+<p>
+Adding to what we already have, the next bit of setup for Joe
+Blow&#8217;s story looks like this:
+<br/>
+<span class="pre-in-pp">
+ .TITLE "My Pulitzer Winner"
+ .AUTHOR "Joe Blow"
+ .DRAFT 7
+ .REVISION 39
+ \#
+ .DOCTYPE DEFAULT \"Superfluous; mom uses DOCTYPE DEFAULT by default
+ .PRINTSTYLE TYPESET
+ .COPYSTYLE DRAFT
+</span>
+Notice the use of the
+<a href="definitions.html#commentlines">comment line</a>
+( <kbd>\#</kbd> ), a handy way to keep groups of macros visually
+separated for easy reading in a text editor.
+</p>
+
+<h4 class="docs" style="margin-top: -.5em; margin-bottom: -.5em;">Step 3</h4>
+
+<p>
+This step&mdash;completely optional&mdash;is where you, the user,
+take charge. Mom has reasonable defaults for every document element
+and tag, but who&#8217;s ever satisfied with defaults? Use any of
+the
+<a href="typesetting.html#macros-typesetting">typesetting macros</a>
+here to change mom&#8217;s document defaults (paper size, margins,
+family, point size, line space, rag, etc), or any of the document
+processing
+<a href="definitions.html#controlmacro">control macros</a>.
+This is the stylesheet section of a document, and
+must come after the
+<a href="#printstyle">PRINTSTYLE</a>
+directive. Failure to observe this condition will result in
+PRINTSTYLE overriding your changes.
+</p>
+
+<p>
+Joe Blow wants his story printed in Helvetica, 12 on 14, rag right,
+with
+<a href="definitions.html#footer">page footers</a>
+instead of
+<a href="definitions.html#header">page headers</a>
+and a single asterisk for the
+<a href="definitions.html#linebreak">linebreak</a>
+character. None of these requirements conforms to mom&#8217;s
+defaults for the chosen PRINTSTYLE (TYPESET), so we change them
+here. The setup for Joe Blow&#8217;s story now looks like this:
+<br/>
+<span class="pre-in-pp">
+ .TITLE "My Pulitzer Winner"
+ .AUTHOR "Joe Blow"
+ .DRAFT 7
+ .REVISION 39
+ \#
+ .DOCTYPE DEFAULT
+ .PRINTSTYLE TYPESET
+ .COPYSTYLE DRAFT
+ \#
+ .FAMILY H
+ .PT_SIZE 12
+ .LS 14
+ .QUAD LEFT \"ie rag right
+ .FOOTERS
+ .LINEBREAK_CHAR *
+</span>
+</p>
+
+<h4 class="docs" style="margin-top: -1.5em; margin-bottom: -.5em;">Step 4</h4>
+
+<p>
+The final step in setting up a document is telling mom to start
+document processing. It&#8217;s a no-brainer, just the single
+macro START. Other than PRINTSTYLE, it&#8217;s the only macro
+required for document processing.
+</p>
+
+<p>
+Here&#8217;s the complete setup for <i>My Pulitzer Winner</i>:
+<br/>
+<span class="pre-in-pp">
+ .TITLE "My Pulitzer Winner"
+ .AUTHOR "Joe Blow"
+ .DRAFT 7
+ .REVISION 39
+ \#
+ .DOCTYPE DEFAULT
+ .PRINTSTYLE TYPESET
+ .COPYSTYLE DRAFT
+ \#
+ .FAMILY H
+ .PT_SIZE 12
+ .LS 14
+ .QUAD LEFT \"ie rag right
+ .FOOTERS
+ .LINEBREAK_CHAR *
+ \#
+ .START
+</span>
+As pointed out earlier, Joe Blow is no typographer. Given that all he
+needs is a printed draft of his work, a simpler setup would have been:
+<br/>
+<span class="pre-in-pp">
+ .TITLE "My Pulitzer Winner"
+ .AUTHOR "Joe Blow"
+ .DRAFT 7
+ .REVISION 39
+ \#
+ .PRINTSTYLE TYPEWRITE
+ .COPYSTYLE DRAFT
+ \#
+ .START
+</span>
+<kbd>.PRINTSTYLE&nbsp;TYPEWRITE</kbd>, above, means that Joe&#8217;s
+work will come out &#8220;typewritten, double-spaced&#8221;,
+making the blue-pencilling he (or someone else) is sure to do much
+easier (which is why many publishers and agents still insist on
+typewritten, double-spaced copy).
+</p>
+
+<p>
+When J. Blow stops re-writing and decides to print off a final,
+typeset copy of his work for the world to see, he need only make two
+changes to the (simplified) setup:
+<br/>
+<span class="pre-in-pp">
+ .TITLE "My Pulitzer Winner"
+ .AUTHOR "Joe Blow"
+ .DRAFT 7
+ .REVISION 39
+ \#
+ .PRINTSTYLE TYPESET \"first change
+ .COPYSTYLE FINAL \"second change
+ \#
+ .START
+</span>
+In the above, <kbd>.DRAFT&nbsp;7,&nbsp;.REVISION 39,</kbd> and
+<kbd>.COPYSTYLE FINAL</kbd> are actually superfluous. The draft
+and revision numbers aren&#8217;t used when COPYSTYLE is FINAL,
+and <b>COPYSTYLE FINAL</b> is mom&#8217;s default unless you tell
+her otherwise.
+</p>
+
+<p>
+But... to judge from the number of drafts already,
+J. Blow may very well decide his &#8220;final&#8221; version still
+isn&#8217;t up to snuff. Hence, he might as well leave in the
+superfluous macros. That way, when draft 7, rev. 62 becomes draft
+8, rev. 1, he&#8217;ll be ready to tackle his Pulitzer winner again.
+</p>
+</div>
+
+<div class="rule-short"><hr/></div>
+
+<!-- ======================================================================== -->
+
+<h2 id="reference-macros" class="macro-group">The reference macros (metadata)</h2>
+
+<p>
+The reference macros give mom the metadata she needs to generate
+<a href="definitions.html#docheader">docheaders</a>,
+<a href="definitions.html#header">page headers</a>,
+and
+<a href="cover.html#cover-top">covers</a>.
+They must go at the top of any file that uses mom&#8217;s document
+processing macros.
+</p>
+
+<div class="macro-list-container">
+<h3 id="index-reference" class="macro-list">Reference macros</h3>
+
+<ul class="macro-list">
+ <li><a href="#title">TITLE</a> &ndash; title of a story, article, etc</li>
+ <li><a href="#doc-title">DOCTITLE</a> &ndash; title of a book, or any collated document</li>
+ <li><a href="#subtitle">SUBTITLE</a></li>
+ <li><a href="#author">AUTHOR</a></li>
+ <li><a href="#chapter">CHAPTER</a> &ndash; the chapter number
+ <ul>
+ <li class="sublist"><a href="#chapter-string">CHAPTER_STRING</a> &ndash; &#8220;Chapter&#8221;, &#8220;CHAPTER&#8221;, &#8220;Chapître&#8221;, etc</li>
+ </ul></li>
+ <li><a href="#chapter-title">CHAPTER_TITLE</a></li>
+ <li><a href="#draft">DRAFT</a>
+ <ul>
+ <li class="sublist"><a href="#draft-string">DRAFT_STRING</a> &ndash; &#8220;Draft&#8221;, &#8220;DRAFT&#8221;, &#8220;Jet&#8221;, etc</li>
+ </ul></li>
+ <li><a href="#revision">REVISION</a>
+ <ul>
+ <li class="sublist"><a href="#revision-string">REVISION_STRING</a> &ndash; &#8220;Revision&#8221;, &#8220;Rev.&#8221;, &#8220;Révision&#8221;, etc</li>
+ </ul></li>
+ <li><a href="#copyright">COPYRIGHT</a></li>
+ <li><a href="#misc">MISC</a></li>
+ <li><a href="#covertitle">COVERTITLE</a> &ndash; frontispiece, title page, etc</li>
+ <li><a href="#doc-covertitle">DOC_COVERTITLE</a> &ndash; book cover, collated document cover, etc</li>
+ <li><a href="#pdftitle">PDF_TITLE</a> &ndash; window title for PDF viewers</li>
+ <li><a href="#toc-heading">TOC_HEADING</a> &ndash; single, non-pagenumbered line of text in table of contents</li>
+</ul>
+</div>
+
+<!-- -TITLE- -->
+
+<div class="macro-id-overline">
+<h3 id="title" class="macro-id">TITLE</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>TITLE</b> <kbd class="macro-args">[COVER | DOC_COVER] &quot;&lt;title string&gt;&quot; [&quot;&lt;2nd line&gt;&quot; [&quot;&lt;3rd line&gt;&quot; ... ] ]</kbd>
+</div>
+<p class="requires">
+&bull;&nbsp;Arguments must be enclosed in double-quotes
+</p>
+
+<p>
+The title string can be caps or caps/lower-case; it&#8217;s up to you. In
+<a href="#printstyle">PRINTSTYLE TYPESET</a>,
+the title will appear in the
+<a href="definitions.html#docheader">docheader</a>
+exactly as you typed it. However, mom converts the title to all
+caps in
+<a href="definitions.html#header">page headers</a>
+unless you turn that feature off (see
+<a href="headfootpage.html#_caps">HEADER_&lt;POSITION&gt;_CAPS</a>).
+In
+<a href="#printstyle">PRINTSTYLE TYPEWRITE</a>,
+the title always gets converted to caps.
+</p>
+
+<p>
+TITLE accepts multiple arguments, each surrounded by double-quotes.
+Each argument is printed on a separate line, permitting you to
+create multi-line titles in your docheaders.
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span>
+If your <kbd><a href="#doctype">DOCTYPE</a></kbd> is CHAPTER, TITLE
+should be the title of the opus, not &#8220;CHAPTER whatever&#8221;.
+</p>
+</div>
+
+<p>
+If the optional argument, <kbd>COVER</kbd> or <kbd>DOC_COVER</kbd>,
+is given to TITLE, the remaining string arguments represent the
+title that will appear on cover or document cover pages (see the
+<a href="cover.html#cover-intro">Introduction to cover pages</a>
+for a description of the difference between &#8220;document
+covers&#8221; and &#8220;covers&#8221;). Thus, it is possible
+to have differing titles appear on the document cover, the cover
+(&#8220;title&#8221;) page, and in the document header. For
+example,
+<br/>
+<span class="pre-in-pp">
+ .TITLE DOC_COVER "Collected Essays"
+ .TITLE COVER "The Meming of Meaning"
+ .TITLE "LOL Cat Corruption"
+ .AUTHOR "D. Rawkins"
+ .DOC_COVER TITLE AUTHOR
+ .COVER TITLE
+ .START
+</span>
+creates a document cover with &#8220;Collected Essays&#8221; and the
+author, a cover page with &#8220;The Meming of Meaning&#8221;,
+and a docheader title, &#8220;LOL Cat Corruption&#8221; at the top
+of the essay.
+</p>
+
+<p>
+Alternatively, you can use the macros
+<a href="#doc-covertitle">DOC_COVERTITLE</a>
+and
+<a href="#covertitle">COVERTITLE</a>
+to accomplish the same thing.
+</p>
+
+<h4 id="no-toc-entry" class="docs">Table of Contents exceptions</h4>
+<p>
+Except for standalone documents (i.e. non-collated documents such
+as essays), the TITLE string appears as an entry in the Table of
+Contents. If you would like a document section not to appear in the
+Table of Contents (e.g. the copyright page), invoke the macro
+<kbd>.NO_TOC_ENTRY</kbd> after <kbd>.TITLE</kbd>.
+</p>
+
+
+<!-- -DOCTITLE- -->
+
+<div class="macro-id-overline">
+<h3 id="doc-title" class="macro-id">DOCUMENT TITLE</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>DOCTITLE</b> <kbd class="macro-args">&quot;&lt;overall document title&gt;&quot; [&quot;&lt;2nd line&gt;&quot; [&quot;&lt;3rd line&gt;&quot; ... ] ]</kbd>
+</div>
+<p class="requires">
+&bull;&nbsp;Arguments must be enclosed in double-quotes
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span>
+This macro should be used only if your <a
+href="#doctype">DOCTYPE</a> is <kbd>DEFAULT</kbd> (which is
+mom&#8217;s default). If your DOCTYPE is CHAPTER, use
+<a href="#title">TITLE</a>
+to set the overall document title for cover pages, document cover
+pages, and page headers or footers.
+</p>
+</div>
+
+<p style="margin-top: -.5em;">
+When you&#8217;re creating a single document, say, an essay or a
+short story, you have no need of this macro.
+<a href="#title">TITLE</a>
+takes care of all your title needs.
+</p>
+
+<p>
+However if you&#8217;re
+<a href="rectoverso.html#collate">collating</a>
+a bunch of documents together, say, to print out a report containing
+many articles with different titles, or a book of short stories with
+different authors, you need DOCTITLE.
+</p>
+
+<p>
+DOCTITLE tells mom the title of the complete document (as opposed to
+the title of each article or entitled section), and appears
+</p>
+
+<ol style="list-style-type: lower-alpha">
+ <li>as the window title in PDF viewers (e.g. Okular or Evince)</li>
+ <li>in the initial rightmost position of page headers in the document</li>
+</ol>
+
+<p>
+Moreover, DOCTITLE does not appear in the
+<a href="definitions.html#pdfoutline">PDF outline</a>,
+as its presence in window title would make it redundant.
+</p>
+
+<p>
+The doctitle string can be caps or caps/lower-case; it&#8217;s up to
+you. In
+<a href="#printstyle">PRINTSTYLE TYPESET</a>,
+by default, the doctitle in
+<a href="definitions.html#header">page headers</a>
+is all in caps, unless you turn that feature off (see
+<a href="headfootpage.html#_caps">HEADER_&lt;POSITION&gt;_CAPS</a>).
+In
+<a href="#printstyle">PRINTSTYLE TYPEWRITE</a>,
+the doctitle always gets converted to caps.
+</p>
+
+<p>
+DOCTITLE accepts multiple arguments, each surrounded
+by double-quotes. Each argument is printed on a separate line,
+permitting you to create multi-line document titles for use on
+<a href="cover.html#cover">Covers</a>
+and/or
+<a href="cover.html#doc-cover">Doc covers</a>.
+</p>
+
+<!-- -SUBTITLE- -->
+
+<div class="macro-id-overline">
+<h3 id="subtitle" class="macro-id">SUBTITLE</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>SUBTITLE</b> <kbd class="macro-args">[COVER | DOC_COVER] &quot;&lt;subtitle&gt;&quot; [&quot;&lt;2nd line&gt;&quot; [&quot;&lt;3rd line&gt;&quot; ... ] ]</kbd>
+</div>
+<p class="requires">
+&bull;&nbsp;String arguments must be enclosed in double-quotes
+</p>
+
+<p>
+The subtitle string can be caps or caps/lower-case. I recommend
+caps/lower case.
+</p>
+
+<p>
+SUBTITLE accepts multiple arguments, each surrounded
+by double-quotes. Each argument is printed on a separate line,
+permitting you to create multi-line subtitles.
+</p>
+
+<p>
+If the optional argument, <kbd>COVER</kbd> or <kbd>DOC_COVER</kbd>,
+is given to SUBTITLE, the remaining string
+arguments represent the subtitle that will appear on cover or
+document cover pages (see the
+<a href="cover.html#cover-intro">Introduction to cover pages</a>
+for a description of the difference between &#8220;document
+covers&#8221; and &#8220;covers&#8221;). Thus, it is possible to have
+differing subtitles appear on the document cover, the cover
+(&#8220;title&#8221;) page, and in the document header. An extreme
+example would be:
+<br/>
+<span class="pre-in-pp">
+ .SUBTITLE "The Docheader Subtitle"
+ .SUBTITLE DOC_COVER "The Document Cover Subtitle"
+ .SUBTITLE COVER "The Cover Subtitle"
+</span>
+The first invocation of <kbd>.SUBTITLE</kbd> establishes the
+subtitle that appears in the docheader at the top of the first page
+of a document. The second invocation establishes the subtitle that
+appears on the document cover; the third establishes the subtitle
+that appears on the cover (&#8220;title&#8221;) page.
+</p>
+
+<p>
+If you don&#8217;t require differing subtitles for doc cover and cover
+pages, <kbd>.SUBTITLE</kbd>, without the optional first argument, is
+sufficient, provided you give the word, <kbd>SUBTITLE</kbd>, as an
+argument to the macro
+<a href="cover.html#doc-cover">DOC_COVER</a>
+or
+<a href="cover.html#cover">COVER</a>
+</p>
+
+<!-- -AUTHOR- -->
+
+<div class="macro-id-overline">
+<h3 id="author" class="macro-id">AUTHOR</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>AUTHOR</b> <kbd class="macro-args">[COVER | DOC_COVER] &quot;&lt;author&gt;&quot; [ &quot;&lt;author2&gt;&quot; [&quot;&lt;author3&gt;&quot; ... ] ]</kbd>
+</div>
+
+<p class="alias" style="margin-bottom: 0;">
+<i>Alias:</i> <b>EDITOR</b>
+</p>
+<p class="requires">
+&bull;&nbsp;String arguments must be enclosed in double-quotes
+</p>
+
+<p>
+Each author string can hold as many names as you like, e.g.
+<br/>
+<span class="pre-in-pp" style="margin-bottom: -1em;">
+ .AUTHOR "Joe Blow"
+</span>
+or
+<br/>
+<span class="pre-in-pp" style="margin-top: -.5em;">
+ .AUTHOR "Joe Blow, Jane Doe" "John Hancock"
+</span>
+Mom prints each string that&#8217;s enclosed in double-quotes on a
+separate line in the
+<a href="definitions.html#docheader">docheader</a>,
+however only the first string appears in
+<a href="definitions.html#header">page headers</a>.
+If you want mom to put something else in the author part of page
+headers (say, just the last names of a document&#8217;s two
+authors), redefine the appropriate part of the header (see
+<a href="headfootpage.html#header-control">header/footer control</a>).
+</p>
+
+<p>
+The strings can be caps or caps/lower-case. I recommend caps/lower
+case.
+</p>
+
+<p>
+If the optional argument, <kbd>COVER</kbd> or <kbd>DOC_COVER</kbd>,
+is given to AUTHOR, the remaining string arguments represent the
+author(s) that will appear on cover or document cover pages (see the
+<a href="cover.html#cover-intro">Introduction to cover pages</a>
+for a description of the difference between &#8220;document
+covers&#8221; and &#8220;covers&#8221;). Thus, it is possible
+to have differing authors on the document cover, the cover
+(&#8220;title&#8221;) page, in the document first-page header and
+subsequent page headers/footers. An example might be:
+<br/>
+<span class="pre-in-pp">
+ .AUTHOR "Joe Blow"
+ .EDITOR DOC_COVER "John Smith" "and" "Jane Doe" \" EDITOR is an alias for AUTHOR
+ .AUTHOR COVER "Joe Blow" "(assisted by Jane Doe)"
+</span>
+The first invocation of <kbd>.AUTHOR</kbd> establishes the author
+that appears in the docheader at the top of the first page of
+a document and in subsequent page headers/footers. The second
+invocation establishes the authors (editors, in this instance) that
+appear on the document cover; the third establishes the author(s)
+that appear(s) on the cover (&#8220;title&#8221;) page.
+</p>
+
+<p>
+If you don&#8217;t require differing authors for doc cover and cover
+pages, <kbd>.AUTHOR</kbd>, without the optional first argument, is
+sufficient, provided you give the word, <kbd>AUTHOR</kbd> as an
+argument to the macro
+<a href="cover.html#doc-cover">DOC_COVER</a>
+or
+<a href="cover.html#cover">COVER</a>
+</p>
+
+<!-- -CHAPTER- -->
+
+<div class="macro-id-overline">
+<h3 id="chapter" class="macro-id">CHAPTER</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>CHAPTER</b> <kbd class="macro-args">&lt;chapter number&gt;</kbd>
+</div>
+
+<p>
+The chapter number can be in any form you like&mdash;a digit, a roman
+numeral, a word. If you choose
+<a href="#doctype">DOCTYPE CHAPTER</a>,
+mom prints whatever argument you pass CHAPTER beside the word,
+&#8220;Chapter&#8221;, as a single line
+<a href="definitions.html#docheader">docheader</a>.
+She also puts the same thing in the middle of
+<a href="definitions.html#header">page headers</a>.
+</p>
+
+<p>
+Please note that if your argument to CHAPTER runs to more than one
+word, you must enclose the argument in double-quotes.
+</p>
+
+<p>
+If you&#8217;re not using DOCTYPE CHAPTER, the macro can
+be used to identify any document as a chapter <i>for the purpose of
+prepending a chapter number to numbered head elements</i>, provided
+you pass it a
+<a href="definitions.html#numericargument">numeric argument</a>.
+See
+<a href="docelement.html#prefix-chapter-number">PREFIX_CHAPTER_NUMBER</a>.
+</p>
+
+<!-- -CHAPTER_STRING- -->
+
+<h3 id="chapter-string" class="docs">Chapter string</h3>
+
+<p>
+If you&#8217;re not writing in English, you can ask mom to use the
+word for &#8220;chapter&#8221; in your own language by telling her
+what it is with the CHAPTER_STRING macro, like this:
+<br/>
+<span class="pre">
+ .CHAPTER_STRING "Chapître"
+</span>
+</p>
+
+<p>
+If you would like a blank chapter string, i.e., you&#8217;d like the
+chapter number to appear without &#8220;Chapter&#8221; beforehand,
+enter <kbd>.CHAPTER_STRING "\&amp;"</kbd>.
+</p>
+
+<!-- -CHAPTER_TITLE- -->
+
+<div class="macro-id-overline">
+<h3 id="chapter-title" class="macro-id">CHAPTER_TITLE</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>CHAPTER_TITLE</b> <kbd class="macro-args">&quot;&lt;chapter title&gt;&quot; [&quot;&lt;2nd line&gt;&quot; [&quot;&lt;3rd line&gt;&quot; ... ] ]</kbd>
+</div>
+<p class="requires">
+&bull;&nbsp;Arguments must be enclosed in double-quotes
+</p>
+
+<p>
+If, either in addition to or instead of &#8220;Chapter
+&lt;n&gt;&#8221; appearing at the top of chapters, you want your
+chapter to have a title, use CHAPTER_TITLE, with your title enclosed
+in double-quotes, like this:
+<br/>
+<span class="pre">
+ .CHAPTER_TITLE "The DMCA Nazis"
+</span>
+</p>
+
+<p>
+CHAPTER_TITLE accepts multiple arguments, each surrounded by
+double-quotes. Each argument is printed on a separate line,
+permitting you to create multi-line chapter titles in your
+docheaders.
+</p>
+
+<p>
+If you&#8217;ve used
+<a href="#chapter">CHAPTER</a>
+to give the chapter a number, both &#8220;Chapter &lt;n&gt;&#8221;
+and the chapter title will appear at the top of the chapter, like
+this:
+<br/>
+<span class="pre-in-pp">
+ Chapter 1
+ The DMCA Nazis
+</span>
+In such a case, by default, only the chapter&#8217;s title will appear in
+the
+<a href="definitions.html#header">page headers</a>,
+not &#8220;Chapter &lt;n&gt;&#8221;.
+</p>
+
+<p>
+If you omit CHAPTER when setting up your reference macros, only the
+title will appear, both at the top of page one and in subsequent
+page headers.
+</p>
+
+<p>
+The style of the chapter title can be altered by
+<a href="docelement.html#docelement-control">control macros</a>,
+e.g. CHAPTER_TITLE_FAMILY, CHAPTER_TITLE_FONT, etc. The default
+family, font and point size are Times Roman, Bold Italic, 4 points
+larger than
+<a href="definitions.html#running">running text</a>.
+</p>
+
+<!-- -DRAFT- -->
+
+<div class="macro-id-overline">
+<h3 id="draft" class="macro-id">DRAFT</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>DRAFT</b> <kbd class="macro-args">&lt;draft number&gt;</kbd>
+</div>
+
+<p>
+DRAFT only gets used with
+<a href="#copystyle">COPYSTYLE&nbsp;DRAFT</a>.
+If the COPYSTYLE is FINAL (the default), mom ignores DRAFT. DRAFT
+accepts both alphabetic and numeric arguments, hence it&#8217;s
+possible to do either
+<br/>
+<span class="pre">
+ .DRAFT 2
+ or
+ .DRAFT Two
+</span>
+</p>
+
+<p>
+Mom prints the argument to <kbd>.DRAFT</kbd> (i.e. the draft number)
+beside the word &#8220;Draft&#8221; in the middle part of
+<a href="definitions.html#header">page headers</a>.
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">A small word of caution:</span>
+If your argument to <kbd>.DRAFT</kbd> is more than one word long,
+you must enclose the argument in double-quotes.
+</p>
+</div>
+
+<p>
+You may, if you wish, invoke <kbd>.DRAFT</kbd> without an
+argument, in which case, no draft number will be printed beside
+&#8220;Draft&#8221; in headers or footers.
+</p>
+
+<!-- -DRAFT_STRING- -->
+
+<h3 id="draft-string" class="docs">The draft string</h3>
+
+<p>
+If you&#8217;re not writing in English, you can ask mom
+to use the word for &#8220;draft&#8221; in your own language by
+telling her what it is with the DRAFT_STRING macro,
+like this:
+<br/>
+<span class="pre">
+ .DRAFT_STRING "Jet"
+</span>
+</p>
+
+<p>
+Equally, DRAFT_STRING can be used to roll your own solution to
+something other than the word &#8220;Draft.&#8221; For example, you
+might want &#8220;Trial run alpha-three&#8221; to appear in the
+headers of a draft version. You&#8217;d accomplish this by doing
+<br/>
+<span class="pre">
+ .DRAFT alpha-three
+ .DRAFT_STRING "Trial run"
+</span>
+</p>
+
+<p>
+If you wanted only &#8220;Trial run&#8221; to appear, entering
+<kbd>.DRAFT</kbd> without an argument as well as
+<kbd>.DRAFT_STRING&nbsp;"Trial&nbsp;run"</kbd> is how you&#8217;d do it.
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span>
+If you define both a blank <kbd>.DRAFT</kbd> and a blank
+<kbd>.DRAFT_STRING</kbd>, mom skips the draft field in headers
+entirely. If this is what you want, this is also the only way
+to do it. Simply omitting invocations of <kbd>.DRAFT</kbd> and
+<kbd>.DRAFT_STRING</kbd> will result in mom using her default, which
+is to print &#8220;Draft &lt;number&gt;&#8221;.
+</p>
+</div>
+
+<!-- -REVISION- -->
+
+<div class="macro-id-overline">
+<h3 id="revision" class="macro-id">REVISION</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>REVISION</b> <kbd class="macro-args">&lt;revision number&gt;</kbd>
+</div>
+
+<p>
+REVISION only gets used with
+<a href="#copystyle">COPYSTYLE DRAFT</a>.
+If the COPYSTYLE is FINAL (the default), mom ignores the REVISION
+macro. REVISION accepts both alphabetic and numeric arguments, hence
+it&#8217;s possible to do either
+<br/>
+<span class="pre" style="margin-bottom: -1em;">
+ .REVISION 2
+</span>
+or
+<span class="pre" style="margin-top: -.5em;">
+ .REVISION Two
+</span>
+</p>
+
+<p>
+Mom prints the revision number beside the shortform
+&#8220;Rev.&#8221; in the middle part of
+<a href="definitions.html#header">page headers</a>.
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">A small word of caution:</span>
+If your argument to <kbd>.REVISION</kbd> is more than one word long,
+you must enclose the argument in double-quotes.
+</p>
+</div>
+
+<p>
+You may, if you wish, invoke <kbd>.REVISION</kbd> without an
+argument, in which case, no revision number will be printed beside
+&#8220;Rev.&#8221; in headers or footers.
+</p>
+
+<!-- -REVISION_STRING- -->
+
+<h3 id="revision-string" class="docs">The revision string</h3>
+
+<p>
+If you&#8217;re not writing in English, you can ask mom
+to use the word for &#8220;revision,&#8221; or a shortform
+thereof, in your own language by telling her what it is with the
+REVISION_STRING macro, like this:
+<br/>
+<span class="pre">
+ .REVISION_STRING "Rév."
+</span>
+</p>
+
+<p>
+Additionally, you may sometimes want to make use of mom&#8217;s
+<a href="#copystyle">COPYSTYLE DRAFT</a>
+but not actually require any draft information. For example,
+you might like mom to indicate only the revision number of
+your document. The way to do that is to define an empty
+<kbd>.DRAFT</kbd> and <kbd>.DRAFT_STRING</kbd> in addition to
+<kbd>.REVISION</kbd>, like this:
+<br/>
+<span class="pre">
+ .DRAFT
+ .DRAFT_STRING
+ .REVISION 2
+</span>
+</p>
+
+<p>
+Equally, if you want to roll your own solution to what revision
+information appears in headers, you could do something like this:
+<br/>
+<span class="pre">
+ .DRAFT
+ .DRAFT_STRING
+ .REVISION "two-twenty-two"
+ .REVISION_STRING "Revision"
+</span>
+</p>
+
+<p>
+The above, naturally, has no draft information. If you want to roll
+your own <kbd>.DRAFT</kbd> and/or <kbd>.DRAFT_STRING</kbd> as well,
+simply supply arguments to either or both.
+</p>
+
+<!-- -COPYRIGHT- -->
+
+<div class="macro-id-overline">
+<h3 id="copyright" class="macro-id">COPYRIGHT</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>COPYRIGHT</b> <kbd class="macro-args">[COVER | DOC_COVER] &quot;&lt;copyright info&gt;&quot;</kbd>
+</div>
+
+<p class="requires">
+&bull;&nbsp;Argument must be enclosed in double-quotes
+</p>
+
+<p>
+The required argument to COPYRIGHT is only used on cover or doc cover
+pages, and then only if the argument COPYRIGHT is passed to
+<a href="cover.html#cover">COVER</a>
+or
+<a href="cover.html#doc-cover">DOC_COVER</a>.
+Do not include the copyright symbol in the argument passed to
+COPYRIGHT; mom puts it in for you.
+</p>
+
+<p>
+The optional argument, <kbd>COVER</kbd> or <kbd>DOC_COVER</kbd>,
+should only be used if you have both a doc cover and a cover and want
+differing copyright information on each (see the
+<a href="cover.html#cover-intro">Introduction to cover pages</a>
+for a description of the difference between &#8220;document
+covers&#8221; and &#8220;covers&#8221;). Thus, it is possible to
+have differing copyright information on the document cover and on
+the cover (&#8220;title&#8221;) page. An example might be:
+<br/>
+<span class="pre-in-pp">
+ .COPYRIGHT DOC_COVER "2010 John Smith and Jane Doe"
+ .COPYRIGHT COVER "2008 Joe Blow"
+</span>
+The first invocation of <kbd>.COPYRIGHT</kbd> establishes the
+copyright information that appears on the document cover; the second
+establishes the copyright information that appears on the cover
+(&#8220;title&#8221;) page.
+</p>
+
+<p>
+If you don&#8217;t require differing copyright information for
+doc cover and cover pages, <kbd>.COPYRIGHT</kbd>, without the
+optional first argument, is sufficient, provided you give the word,
+<kbd>COPYRIGHT</kbd>, as an argument to the macro
+<a href="cover.html#doc-cover">DOC_COVER</a>
+or
+<a href="cover.html#cover">COVER</a>
+</p>
+
+<p>
+Style parameters for the copyright line may be
+entered as individual macros or
+<a href="docelement.html#grouping">grouped</a>,
+e.g.
+<br/>
+<span class="pre-in-pp">
+ .COPYRIGHT_FAMILY H
+ .COPYRIGHT_FONT R
+ .COPYRIGHT_SIZE -2
+</span>
+or
+<br/>
+<span class="pre-in-pp">
+ .COPYRIGHT_STYLE \
+ FAMILY H \
+ FONT R \
+ SIZE -2
+</span>
+The vertical position of the copyright line may be raised (-) or
+lowered (+) with the macro COPYRIGHT_V_ADJUST. For example, to
+raise the copyright line by 3
+<a href="definitions.html#picaspoints">points</a>, you&#8217;d do
+<br/>
+<span class="pre-in-pp">
+ .COPYRIGHT_V_ADJUST -3p
+</span>
+Alternatively, the COPYRIGHT_STYLE macro may be used with the
+argument <kbd>V_ADJUST</kbd>:
+<span class="pre-in-pp">
+ .COPYRIGHT_STYLE \
+ FAMILY H \
+ FONT R \
+ SIZE -2 \
+ V_ADJUST -3p
+</span>
+</p>
+
+<!-- -MISC- -->
+
+<div class="macro-id-overline">
+<h3 id="misc" class="macro-id">MISC</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>MISC</b> <kbd class="macro-args">[COVER | DOC_COVER] &quot;&lt;argument 1&gt;&quot; [&quot;&lt;argument 2&gt;&quot; &quot;&lt;argument 3&gt;&quot; ...]</kbd>
+</div>
+
+<p class="requires">
+&bull;&nbsp;String arguments must be enclosed in double-quotes
+</p>
+
+<p>
+The argument(s) passed to MISC are only used on cover or doc cover
+pages, and then only if the argument <kbd>MISC</kbd> is passed to
+<a href="cover.html#cover">COVER</a>
+or
+<a href="cover.html#doc-cover">DOC_COVER</a>.
+MISC can contain any information you like. Each argument appears on
+a separate line at the bottom of the cover or doc cover page.
+</p>
+
+<p>
+For example, if you&#8217;re submitting an essay where the prof has
+requested that you include the course number, his name and the date,
+you could do
+<br/>
+<span class="pre-in-pp">
+ .MISC "Music History 101" "Professor Hasbeen" "Dec. 24, 2010"
+</span>
+and the information would appear on the essay&#8217;s cover page.
+</p>
+
+<p>
+If the optional argument, <kbd>COVER</kbd> or <kbd>DOC_COVER</kbd>,
+is given to MISC, the string arguments represent the miscellaneous
+information that will appear on cover or document cover pages (see
+the
+<a href="cover.html#cover-intro">Introduction to cover pages</a>
+for a description of the difference between &#8220;document
+covers&#8221; and &#8220;covers&#8221;). Thus, it is possible to
+have differing miscellaneous information on the document cover and
+on the cover (&#8220;title&#8221;) page. An example might be:
+<br/>
+<span class="pre">
+ .MISC DOC_COVER "Music History 101" "Professor Hasbeen"
+ .MISC COVER "Spring Term Paper"
+</span>
+</p>
+
+<p>
+The first invocation of <kbd>.MISC</kbd> establishes the
+miscellaneous information that appears on the document cover; the
+second establishes the miscellaneous information that appears on the
+cover (&#8220;title&#8221;) page.
+</p>
+
+<p>
+If you don&#8217;t require differing miscellaneous information
+for doc cover and cover pages, <kbd>.MISC</kbd>, without the
+optional first argument, is sufficient, provided you give the word
+&#8220;MISC&#8221; as an argument to the macro
+<a href="cover.html#doc-cover">DOC_COVER</a>
+or
+<a href="cover.html#cover">COVER</a>
+</p>
+
+<!-- -COVER_TITLE- -->
+
+<div class="macro-id-overline">
+<h3 class="macro-id">COVERTITLE &amp; DOC_COVERTITLE</h3>
+</div>
+
+<div id="covertitle" class="box-macro-args">
+Macro: <b>COVERTITLE</b> <kbd class="macro-args">&quot;&lt;user defined cover page title&gt;&quot; [&quot;&lt;2nd line&gt;&quot; [&quot;&lt;3rd line&gt;&quot; ... ] ]</kbd>
+</div>
+<p class="requires">
+&bull;&nbsp;Arguments must be enclosed in double-quotes
+</p>
+
+<div id="doc-covertitle" class="box-macro-args">
+Macro: <b>DOC_COVERTITLE</b> <kbd class="macro-args">&quot;&lt;user defined document cover page title&gt;&quot; [&quot;&lt;2nd line&gt;&quot; [&quot;&lt;3rd line&gt;&quot; ... ] ]</kbd>
+</div>
+<p class="requires">
+&bull;&nbsp;Arguments must be enclosed in double-quotes
+</p>
+
+<p>
+The arguments passed to COVERTITLE or DOC_COVERTITLE are only
+used on cover or doc cover pages, and then only if the argument
+<kbd>COVERTITLE</kbd> or <kbd>DOC_COVERTITLE</kbd> is explicitly
+passed to
+<a href="cover.html#cover">COVER</a>
+or
+<a href="cover.html#doc-cover">DOC_COVER</a>.
+</p>
+
+<p>
+COVERTITLE and DOC_COVERTITLE accept multiple arguments, each
+surrounded by double-quotes. Each argument is printed on a separate
+line, permitting you to create multi-line titles on your cover
+and/or doc cover pages.
+</p>
+
+<p>
+You only require COVERTITLE or DOC_COVERTITLE if they differ from
+TITLE. Note that
+<a href="#title">TITLE</a>
+itself has two optional arguments that accomplish the same thing.
+</p>
+
+<div class="macro-id-overline">
+<h3 class="macro-id">PDF Title</h3>
+</div>
+
+<div id="pdftitle" class="box-macro-args">
+Macro: <b>PDF_TITLE</b> <kbd class="macro-args">&quot;&lt;pdf viewer window title&gt;&quot;</kbd>
+</div>
+<p class="requires">
+&bull;&nbsp;Argument must be enclosed in double-quotes
+</p>
+
+<p>
+Except for
+<a href="#doc-title">DOCTITLE</a>,
+mom does not, by default, provide PDF viewers with a document title.
+You may set one, if you like, with PDF_TITLE.
+</p>
+
+<div class="macro-id-overline">
+<h3 class="macro-id">TOC heading</h3>
+</div>
+
+<div id="toc-heading" class="box-macro-args">
+Macro: <b>TOC_HEADING</b> <kbd class="macro-args">&quot;&lt;single line TOC heading&gt;&quot;</kbd>
+</div>
+<p class="requires">
+&bull;&nbsp;Argument must be enclosed in double-quotes
+</p>
+
+<p>
+Mom generates tables of contents automatically (see
+<a href="tables-of-contents.html#toc">TOC</a>).
+You may sometimes want to insert a line of text into the table of
+contents without it referring to a page number, for example to
+identify a &#8220;Part I&#8221; and a &#8220;Part II.&#8221;
+</p>
+
+<p>
+Placed before any instance of
+<a href="#start">START,</a>
+TOC_HEADING inserts its text into the table of contents with a
+modest amount of whitespace around it to distinguish it easily
+from table of contents entries.
+</p>
+
+<p>
+The appearance of the heading may be controlled with
+the macro
+<a href="#toc-heading-style">TOC_HEADING_STYLE</a>.
+</p>
+
+<div id="toc-heading-style" class="box-macro-args">
+Macro: <b>TOC_HEADING_STYLE</b> <kbd class="macro-args">&quot;&lt;arguments&gt;&quot;</kbd>
+</div>
+
+<p>
+TOC_HEADING_STYLE controls the look of TOC headings. It is a
+<a href="docelement.html#grouping">&#8220;grouping&#8221;</a>
+style macro with multiple arguments. It is recommended that
+you use the backslash character to separate them into individual
+lines rather than entering a single, very long line.
+</p>
+
+<p>
+TOC_HEADING_STYLE accepts as many or as few arguments as you need:
+<span class="pre-in-pp">
+ FAMILY &lt;family&gt; \
+ FONT &lt;font&gt; \
+ SIZE &lt;+|-n&gt; \
+ COLOR &lt;colorname&gt;* \
+ QUAD L | C | R \
+ SPACE_ABOVE &lt;n&gt;** \
+ SPACE_BENEATH &lt;n&gt;**
+</span>
+&nbsp;&nbsp;* <kbd>COLOR</kbd> must be pre-initialized with
+<a href="color.html#newcolor">NEWCOLOR</a>
+or
+<a href="color.html#xcolor">XCOLOR</a>.
+<br/>
+** <kbd>SPACE_ABOVE</kbd> and <kbd>SPACE_BENEATH</kbd> require a
+<a href="definitions.html#unitofmeasure">unit of measure</a>
+to be appended to their numeric argument.
+</p>
+
+<p>
+For example, if you want your TOC headings to be bold, slightly
+larger than the rest of the table of contents, centred, and with
+one linespace beforehand,
+<span class="pre-in-pp">
+ FONT B \
+ SIZE +.5 \
+ QUAD C \
+ SPACE_ABOVE 1v
+</span>
+</p>
+
+<p>
+ See
+<a href="docelement.html#control-macro-args">Arguments to the control macros</a>
+for further information about the arguments. Note that
+<kbd>SPACE_ABOVE</kbd> and <kbd>SPACE_BENEATH</kbd> are unique to
+TOC_HEADING_STYLE.
+
+</p>
+
+<div class="rule-short"><hr/></div>
+
+<!-- ======================================================================== -->
+
+<h2 id="docstyle-macros" class="macro-group">The docstyle macros</h2>
+
+<p>
+The docstyle macros tell mom what type of document you&#8217;re
+writing, whether you want the output typeset or &#8220;typewritten,
+double-spaced&#8221;, and whether you want a draft copy (with draft
+and revision information in the headers) or a final copy.
+</p>
+
+<div class="macro-list-container">
+<h3 id="index-docstyle" class="macro-list">Docstyle macros</h3>
+<ul class="macro-list">
+ <li><a href="#doctype">DOCTYPE</a></li>
+ <li><a href="#printstyle">PRINTSTYLE</a> &ndash; non-optional macro required for document processing
+ <ul style="margin-left: -.5em; list-style-type: disc;">
+ <li><a href="#typeset-defaults">Defaults for PRINTSTYLE TYPESET</a></li>
+ <li><a href="#typewrite-defaults">Defaults for PRINTSTYLE TYPEWRITE</a>
+ <ul style="margin-left: -.5em; list-style-type: circle;">
+ <li><a href="#typewrite-control">PRINTSTYLE TYPEWRITE control macros</a>
+ <ul style="margin-left: -1.5em; list-style-type: square;">
+ <li><a href="#typewriter-family">Family</a></li>
+ <li><a href="#typewriter-size">Point size</a></li>
+ <li><a href="#typewriter-underlining">Underlining of italics</a></li>
+ </ul></li>
+ </ul></li>
+ </ul></li>
+ <li><a href="#copystyle">COPYSTYLE</a></li>
+</ul>
+</div>
+
+<!-- -DOCTYPE- -->
+
+<div class="macro-id-overline">
+<h3 id="doctype" class="macro-id">DOCTYPE</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>DOCTYPE</b> <kbd class="macro-args">DEFAULT | CHAPTER | NAMED &quot;&lt;name&gt;&quot; | LETTER | SLIDES</kbd>
+</div>
+
+<p>
+The arguments <kbd>DEFAULT,</kbd> <kbd>CHAPTER</kbd> and
+<kbd>NAMED</kbd> tell mom what to put in the
+<a href="definitions.html#docheader">docheader</a>
+and
+<a href="definitions.html#header">page headers</a>.
+<kbd>LETTER</kbd> and <kbd>SLIDES</kbd> tells her you want to write
+a letter or create slides.
+</p>
+
+<p>
+Mom&#8217;s default DOCTYPE is <kbd>DEFAULT</kbd>. If that&#8217;s
+what you want, you don&#8217;t have to give a DOCTYPE command.
+</p>
+
+<p id="default-doctype">
+<kbd>DEFAULT</kbd> prints a
+<a href="definitions.html#docheader">docheader</a>
+containing the title, subtitle and author information given to the
+<a href="#reference-macros">reference macros</a>,
+and page headers with the author and title. (See
+<a href="headfootpage.html#header-style">Default specs for headers</a>
+for how mom outputs each part of the page header.)
+</p>
+
+<p>
+<kbd>CHAPTER</kbd> prints &#8220;Chapter &lt;n&gt;&#8221; in place
+of a
+<a href="definitions.html#docheader">docheader</a>
+(&lt;n&gt; is what you gave to the
+<a href="#reference-macros">reference macro</a>,
+<kbd><a href="#chapter">CHAPTER</a></kbd>).
+If you give the chapter a title with
+<a href="#chapter-title">CHAPTER_TITLE</a>,
+mom prints &#8220;Chapter &lt;n&gt;&#8221; and the
+title underneath. If you omit the
+<a href="#chapter">CHAPTER</a>
+reference macro but supply a
+<a href="#chapter-title">CHAPTER_TITLE</a>,
+mom prints only the chapter title.
+</p>
+
+<p>
+The page headers in DOCTYPE <kbd>CHAPTER</kbd> contain the author,
+the title of the book (which you gave with
+<a href="#title">TITLE</a>),
+and &#8220;Chapter &lt;n&gt;&#8221; (or the chapter title). See
+<a href="headfootpage.html#header-style">Default Specs for Headers</a>
+for mom&#8217;s default type parameters for each part of
+the page header.
+</p>
+
+<p>
+<kbd>NAMED</kbd> takes an additional argument: a name for this
+particular kind of document (e.g. outline, synopsis, abstract,
+memorandum), enclosed in double-quotes. <kbd>NAMED</kbd> is
+identical to <kbd>DEFAULT</kbd> except that mom prints the argument
+to <kbd>NAMED</kbd> beneath the
+<a href="definitions.html#docheader">docheader</a>,
+as well as in page headers.
+(See
+<a href="headfootpage.html#header-style">Default specs for headers</a>
+for how mom outputs each part of the page header.)
+</p>
+
+<div class="box-tip">
+<p id="doctype-note" class="tip">
+<span class="note">Note: version 2.1 change</span>
+<br/>
+<kbd>DOCTYPE NAMED "string"</kbd> no longer accepts a colour
+argument after <kbd>"string"</kbd>. Setting the colour
+of the string is now done with <kbd><span class="nobr">DOCTYPE_COLOR
+&lt;color&gt;</span></kbd>. Default underscoring of
+<kbd>"string"</kbd> in the docheader and on covers
+has been removed. Use <kbd>DOCTYPE_UNDERSCORE</kbd>,
+<kbd>DOC_COVER_DOCTYPE_UNDERSCORE</kbd> and/or
+<kbd>COVER_DOCTYPE_UNDERSCORE</kbd> to re-enable it. All three take
+the same arguments listed in the
+<a href="docelement.html#underscore">Underscore style, rule weight</a>
+section of
+<a href="docelement.html#control-macro-args">Arguments to the control macros</a>.
+</p>
+</div>
+
+<p>
+<kbd>LETTER</kbd> tells mom you&#8217;re writing a letter. See the
+section
+<a href="letters.html#letters">Writing Letters</a>
+for instructions on using mom to format letters.
+</p>
+
+<h4 id="slides" class="docs" style="font-size: 100%; text-transform: uppercase">Slides</h4>
+
+<p>
+PDF slides are a special kind of mom document, formatted for viewing
+in a PDF reader&#8217;s presentation mode. In most respects, they
+behave identically to the other document types. Key differences
+are:
+</p>
+<ul style="margin-top: -.5em">
+<li>headers, footers, and pagination are disabled by default</li>
+<li>type is set
+<a href="typesetting.html#quad">QUAD CENTER</a>
+by default</li>
+<li>
+<a href="#flex">flex-spacing</a>
+and
+<a href="#shim">shimming</a>
+are disabled by default; shimming may
+be re-enabled (with <kbd>NO_SHIM OFF</kbd>), but not flex-spacing</li>
+<li>there&#8217;s no need for
+<a href="#printstyle">PRINTSTYLE</a></li>
+</ul>
+
+<p>
+DOCTYPE SLIDES takes up to five optional arguments, which come
+immediately after SLIDES. They may be entered in any order.
+<br/>
+<span class="pre-in-pp">
+ DOCTYPE SLIDES \
+ ASPECT 4:3 | 16:9 \
+ HEADER "left" "centre" "right" \
+ FOOTER "left" "centre" "right" \
+ TRANSITION "&lt;slide transition effect&gt;" (mode + parameters) \
+ PAUSE "&lt;text reveal effect&gt;" (mode + parameters)
+</span>
+For convenience, you many want to enter each argument on a single
+line as shown above; all but the last must be terminated by a
+backslash.
+</p>
+
+<h5 class="docs" style="margin-top: .5em">Aspect</h5>
+
+<p>
+Slides can be formatted for one of two aspect ratios common to
+monitors and screens: 4:3 and 16:9. The default is 16:9.
+<span class="pre-in-pp">
+ 4:3 16:9
+ media size: 11" x 8.25" media size: 11" x 8.1875"
+ left/right margins: 36 points left/right margins: 36 points
+ top margin: 90 points top margin: 80 points
+ bottom margin: 84 points bottom margin: 72 points
+ base text size: 16 points base text size: 14 points
+ autoleading: 6 points, adjusted autoleading: 4 points, adjusted
+ (header/footer size: -3 points) (header/footer size: -2 points)
+</span>
+Note that both media sizes fit on either A4 or US LETTER papersizes.
+</p>
+
+<h5 class="docs" style="margin-top: .5em">Headers, footers, and pagination</h5>
+
+<p>
+If you want a header, footer, or both for your slides, pass SLIDES
+the <kbd>HEADER</kbd> and/or <kbd>FOOTER</kbd> argument(s). Both
+take three additional
+<a href="definitions.html#stringargument">string arguments</a>,
+which must be enclosed in double-quotes, defining the left, centre,
+and right parts of the header/footer. Any parts you want left blank
+should be entered as two double-quotes. For example,
+<span class="pre-in-pp">
+ HEADER "" "My slide presentation" ""
+</span>
+will result in a header with only the centre part.
+</p>
+
+<p>
+Normal pagination is disabled for slides. If you want your slides
+numbered, the slide number must be given to one of the header/footer
+parts with the
+<a href="definitions.html#inlines">inline escape</a>
+<br/>
+<kbd><span class="nobr">\*[SLIDE#]</span></kbd>. For example:
+<span class="pre-in-pp">
+ HEADER "" "My slide presentation" "" \
+ FOOTER "" "" "\*[SLIDE#]"
+</span>
+will give you a centred header with numbering at the bottom right of
+the slide.
+</p>
+
+<p>
+The overall family, size, and colour of headers may be set with
+HEADER_FAMILY, HEADER_SIZE, and HEADER_COLOR. If you request
+FOOTERS, you may use the FOOTER_ equivalent of these macros.
+If you request both headers and footers, use one or the other but
+not both. For example, in a header/footer situation, HEADER_FAMILY
+would determine the family for both headers and footers, but if you
+attempted to do this
+<span class="pre-in-pp">
+ .HEADER_FAMILY T
+ .FOOTER_FAMILY H
+</span>
+FOOTER_FAMILY would take precedence, and your header family would be
+&#8220;<kbd>H</kbd>&#8221;.
+</p>
+
+<p>
+All other formatting of individual header/footer parts must be
+entered as inline escapes inside the double-quotes. If you want,
+say, your headers to be red but your footer page numbering to be
+black and two points larger, this is how you&#8217;d do it:
+<span class="pre-in-pp">
+ .HEADER_COLOR red
+ .DOCTYPE SLIDES \
+ HEADER "" "My slide presentation" "" \
+ FOOTER "" "" "\*[black]\*S[+2]\*[SLIDE#]\*S[-2]"
+</span>
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span>
+Do not use mom&#8217;s
+<a href="inlines.html#inline-size-mom"><kbd><span class="nobr">\*[SIZE&nbsp;&plusmn;n]</span></kbd></a>
+inline escape to change point size in the strings
+passed to HEADER or FOOTER. Prefer either mom&#8217;s
+<kbd><span class="nobr">\*S[&plusmn;n]</span></kbd> or groff&#8217;s
+<kbd><span class="nobr">\s[&plusmn;n]</span></kbd>.
+</p>
+</div>
+
+<h5 class="docs" style="margin-top: .5em">Transition</h5>
+
+<p>
+&#8220;Transition&#8221; refers to how new slides appear during a
+presentation. The official PDF specification lists a number of modes,
+each with a choice of configurable parameters. Modes include Box,
+Blinds, Wipe, Fade, and several others. Parameters include things
+like duration, dimension, and direction. There are a total of
+twelve modes; for each one there are from one to six configurable
+parameters. Consult <kbd>man&nbsp;gropdf(1)</kbd> for a complete listing
+of modes and parameters.
+</p>
+
+<p>
+If you pass SLIDES the <kbd>TRANSITION</kbd> argument, you must
+at a minimum follow it with a mode. Afterwards, you may give as
+many or as few parameters as you wish. Parameters are, in order,
+<span class="pre-in-pp">
+ 1. duration
+ 2. dimension
+ 3. motion
+ 4. direction
+ 5. scale
+ 6. bool
+</span>
+You don&#8217;t have to fill them all out. If you only need the
+first three, that&#8217;s all you need to input. If you need the
+first and third, enter the second as a period (dot), which is used
+any time you want to leave a parameter at its current default or
+when it isn&#8217;t applicable. For example, if you want a Box
+transition that lasts 1 second, filling the screen from the centre
+outwards, you&#8217;d enter
+<span class="pre-in-pp">
+ TRANSITION "Box 1 . O"
+</span>
+because Box does not take a &#8220;dimension&#8221; parameter but it
+does take a motion parameter.
+</p>
+
+<p>
+Notice that the entire string (mode+parameters) must be enclosed in
+double-quotes.
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span>
+Not all PDF viewers support all modes. Any that are not supported
+are replaced by the &#8220;R&#8221; mode, which simply replaces one
+slide with the next unless the PDF viewer has a different default
+transition mode.
+</p>
+</div>
+
+<h5 class="docs" style="margin-top: .5em">Pause</h5>
+
+<p>
+A &#8220;pause&#8221; occurs when material on a slide is halted (see
+<a href="#pause">PAUSE</a>),
+awaiting a mouse click, PgDown, Next, or the spacebar to reveal
+subsequent material. All the same modes and parameters as
+<kbd>TRANSITION</kbd> may be used. The manner of entering them is
+is identical, including that the entire mode+parameter string must
+be enclosed in double-quotes.
+</p>
+
+<div class="macro-id-overline">
+<h3 id="slide-macros" class="macro-id">SLIDE MACROS</h3>
+</div>
+
+<div id="newslide" class="box-macro-args">
+Macro: <b>NEWSLIDE</b> <kbd class="macro-args">["&lt;transition mode and parameters&gt;"]</kbd>
+</div>
+
+<p>
+Unless you want material from one slide to flow onto the next, you
+need to tell mom when to start a new slide with the macro NEWSLIDE.
+Without any arguments, the new slide will appear with the default
+TRANSITION you gave to DOCTYPE SLIDES.
+</p>
+
+<p>
+If you would like a different transition, you may pass NEWSLIDE a
+new mode and associated parameters, following the same rules as the
+TRANSITION argument to DOCTYPE. Note that the new effect becomes
+the default. If you wish to return to the original transition, you
+must give it explicitly to the appropriate NEWSLIDE.
+</p>
+
+<div id="pause" class="box-macro-args">
+Macro: <b>PAUSE</b> <kbd class="macro-args">["&lt;pause mode and parameters&gt;"]</kbd>
+</div>
+
+<p>
+Pauses in slides are accomplished by entering the macro PAUSE at
+desired locations in your input file. Subsequent material will be
+revealed using the pause mode given to DOCTYPE SLIDES.
+</p>
+
+<p>
+If you would like a different mode, you may pass PAUSE a
+new mode and associated parameters, following the same rules as the
+PAUSE argument to DOCTYPE.
+</p>
+
+<div id="transition" class="box-macro-args">
+Macro: <b>TRANSITION</b> <kbd class="macro-args">["&lt;transition mode and parameters&gt;"]</kbd>
+</div>
+
+<p>
+If for some reason you have material that flows from one slide to
+the next <i>and</i> you want the next slide to have a transition
+different from the current one, you can tell mom about the new
+transition with the macro TRANSITION anywhere prior to the break to
+the next slide.
+</p>
+
+<h4 id="slide-printing" class="docs" style="font-size: 100%; text-transform: uppercase">Printing slides</h4>
+
+<p>
+If you want to print slides as handouts, you have to tell
+<kbd>pdfmom</kbd> or <kbd>gropdf</kbd>, otherwise printing will
+stop at the first pause. Simply precede <kbd>pdfmom</kbd> or
+<kbd>gropdf</kbd> with GROPDF_NOSLIDE=1, like this:
+<br/>
+<span class="pre-in-pp">
+ GROPDF_NOSLIDE=1 pdfmom &lt;options&gt; slidefile.mom &gt; slidefile.pdf
+</span>
+
+</p>
+
+<!-- -PRINTSTYLE- -->
+
+<div class="macro-id-overline">
+<h3 id="printstyle" class="macro-id">PRINTSTYLE</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>PRINTSTYLE</b> <kbd class="macro-args">TYPESET | TYPEWRITE [ SINGLESPACE ]</kbd>
+</div>
+
+<p class="requires">
+&bull;&nbsp;Required for document processing, except in the case of
+slides
+<br/>
+Must come before any changes to default document style
+</p>
+
+<p>
+PRINTSTYLE tells mom whether to typeset a document, or to print it
+out &#8220;typewritten, doubled-spaced&#8221;.
+</p>
+
+<div class="box-important">
+<p class="tip-top">
+<span class="important">Important:</span>
+<b>This macro may not be omitted.</b> In order for document
+processing to take place, mom requires a PRINTSTYLE. If you
+don&#8217;t give one, mom will warn you on stderr and print a single
+page with a nasty message.
+</p>
+
+<p class="tip-bottom">
+<span class="important">Just as important:</span>
+<b>PRINTSTYLE must precede any and all page and style
+parameters associated with a document</b> with the exception of
+<kbd>PAPER</kbd>, which should be placed at the top of your file.
+PRINTSTYLE sets up complete templates that include default margins,
+family, fonts, point sizes, and so on. Therefore, changes to any
+aspect of document style must come afterwards. For example,
+<br/>
+<span class="pre-in-pp">
+ .PAPER A4
+ .LS 14
+ .QUAD LEFT
+ .PRINTSTYLE TYPESET
+</span>
+will not change mom&#8217;s default document leading to 14 points,
+nor the default justification style (fully justified) to left
+justified, whereas
+<br/>
+<span class="pre-in-pp">
+ .PAPER A4
+ .PRINTSTYLE TYPESET
+ .LS 14
+ .QUAD LEFT
+</span>
+will.
+</p>
+
+</div>
+
+<p>
+<kbd>TYPESET</kbd>, as the argument implies, typesets
+documents (by default in Times Roman; see
+<a href="#typeset-defaults">TYPESET defaults</a>).
+You have full access to all the
+<a href="typesetting.html#macros-typesetting">typesetting macros</a>
+as well as the
+<a href="definitions.html#style-control">style control macros</a>
+of document processing.
+</p>
+
+<p>
+With <kbd>TYPEWRITE</kbd>, mom does her best to reproduce the look
+and feel of typewritten, double-spaced copy (see
+<a href="#typewrite-defaults">TYPEWRITE defaults</a>).
+<a href="docelement.html#docelement-control">Control macros</a>
+and
+<a href="typesetting.html#intro-macros-typesetting">typesetting macros</a>
+that alter family, font, point size, and
+<a href="definitions.html#leading">leading</a>
+are (mostly) ignored. An important exception is
+<a href="headfootpage.html#hdrftr-global-size">HEADER_SIZE</a>
+(and, by extension, FOOTER_SIZE), which allows you to reduce the
+point size of headers/footers should they become too crowded. Most
+of mom&#8217;s inlines affecting the appearance of type are also
+ignored
+(<a href="inlines.html#inline-size-mom"><kbd><span class="nobr">\*S[&lt;size&gt;]</span></kbd></a>
+is an exception; there may be a few others).
+</p>
+
+<p>
+In short, <kbd>TYPEWRITE</kbd> never produces effects
+other than those available on a typewriter. Don&#8217;t be fooled
+by how brainless this sounds; mom is remarkably sophisticated when
+it comes to conveying the typographic sense of a document within the
+confines of <kbd>TYPEWRITE</kbd>.
+</p>
+
+<p>
+The primary uses of <kbd>TYPEWRITE</kbd> are: outputting hard
+copy drafts of your work (for editing) and producing documents
+for submission to publishers and agents who (wisely) insist on
+typewritten, double-spaced copy. To get a nicely typeset version of
+work that&#8217;s in the submission phase of its life (say, to show
+fellow writers for critiquing), simply change <kbd>TYPEWRITE</kbd>
+to <kbd>TYPESET</kbd> and print out a copy.
+</p>
+
+<p>
+If, for some reason, you would prefer the output of
+<kbd>TYPEWRITE</kbd> single-spaced, pass PRINTSTYLE
+<kbd>TYPEWRITE</kbd> the optional argument, <kbd>SINGLESPACE</kbd>.
+</p>
+
+<div class="defaults-container">
+<h3 id="typeset-defaults" class="docs defaults" style="margin-top: 0;">PRINTSTYLE TYPESET defaults</h3>
+<span class="pre defaults">
+ Family = Times Roman
+ Point size = 12.5
+ Paragraph leading = 16 points, adjusted
+ Fill mode = justified
+ Hyphenation = enabled
+ max. lines = 2
+ margin = 36 points
+ interword adjustment = 1 point
+ Kerning = enabled
+ Ligatures = enabled
+ Smartquotes = enabled
+ Word space = groff default
+ Sentence space = 0
+</span>
+</div>
+
+<div class="defaults-container">
+<h3 id="typewrite-defaults" class="docs defaults" style="margin-top: 0;">PRINTSTYLE TYPEWRITE defaults</h3>
+<span class="pre defaults">
+ Family = Courier
+ Italics = underlined
+ Point size = 12
+ Paragraph leading = 24 points, adjusted; 12 points for SINGLESPACE
+ Fill mode = left
+ Hyphenation = disabled
+ Kerning = disabled
+ Ligatures = disabled
+ Smartquotes = disabled
+ Word space = groff default
+ Sentence space = groff default
+ Columns = ignored
+</span>
+</div>
+
+<div class="box-tip" style="margin-top: 1.5em;">
+<h3 id="typewrite-control" class="docs control">PRINTSTYLE TYPEWRITE control macros</h3>
+
+<h4 id="typewriter-family" class="docs">Family</h4>
+
+<p style="margin-top: .5em;">
+If you&#8217;d prefer a monospace
+<a href="definitions.html#family">family</a>
+for PRINTSTYLE <kbd>TYPEWRITE</kbd> other than mom&#8217;s
+default, Courier, you can change it with
+<kbd>.TYPEWRITER_FAMILY&nbsp;&lt;family&gt;</kbd> (or
+<kbd>.TYPEWRITER_FAM</kbd>). Since groff ships with only the
+Courier family, you will have to install any other monospace family
+yourself. See
+<a href="appendices.html#fonts">Adding fonts to
+groff</a>.
+</p>
+
+<h4 id="typewriter-size" class="docs">Point size</h4>
+
+<p style="margin-top: .5em;">
+If you&#8217;d like a smaller or larger point size for
+PRINTSTYLE <kbd>TYPEWRITE</kbd> (mom&#8217;s default is 12-point),
+you can change it with
+<kbd>.TYPEWRITER_SIZE&nbsp;&lt;size&gt;</kbd>. There&#8217;s no need to
+add a
+<a href="definitions.html#unitofmeasure">unit of measure</a>
+to the <kbd>&lt;size&gt;</kbd> argument; points is assumed. Be
+aware, however, that regardless of point size, mom&#8217;s
+leading/linespacing for <kbd>TYPEWRITE</kbd> is fixed at 24-point
+for double-spaced, and 12-point for single-spaced.
+</p>
+
+<h4 id="typewriter-underlining" class="docs">Underlining of italics</h4>
+
+<p>
+In PRINTSTYLE <kbd>TYPEWRITE</kbd>, mom, by default, underlines
+anything that looks like italics. This includes the
+<a href="typesetting.html#slant-inline"><kbd><span class="nobr">\*[SLANT]</span></kbd></a>
+<a href="definitions.html#inlines">inline escape</a>
+for pseudo-italics. (See
+<a href="goodies.html#underline">UNDERLINE</a>
+for a note on how to process TYPEWRITE files that underline
+italics.)
+</p>
+
+<p id="printstyle-italics">
+If you&#8217;d prefer that mom were less bloody-minded
+about pretending to be a typewriter (i.e., you&#8217;d like italics and
+pseudo-italics to come out as italics), use the control macros
+<br/>
+<span class="pre-in-pp">
+ .ITALIC_MEANS_ITALIC
+</span>
+and
+<span class="pre-in-pp">
+ .SLANT_MEANS_SLANT
+</span>
+Neither requires an argument.
+</p>
+
+<p>
+Although it&#8217;s unlikely, should you wish to reverse
+the sense of these macros in the midst of a document,
+<kbd>.UNDERLINE_ITALIC</kbd> and <kbd>.UNDERLINE_SLANT</kbd> restore
+underlining of italics and pseudo-italics.
+</p>
+
+<p id="underline-quotes">
+Additionally, by default, mom underlines
+<a href="definitions.html#quotes">quotes</a>
+(but not
+<a href="definitions.html#blockquotes">blockquotes</a>)
+in PRINTSTYLE <kbd>TYPEWRITE</kbd>. If you don&#8217;t like this
+behaviour, turn it off with
+<br/>
+<span class="pre">
+ .UNDERLINE_QUOTES OFF
+</span>
+</p>
+
+<p>
+To turn underlining of quotes back on, use UNDERLINE_QUOTES without
+an argument.
+</p>
+
+<p>
+While most of the
+<a href="docelement.html#docelement-control">control macros</a>
+have no effect on PRINTSTYLE <kbd>TYPEWRITE</kbd>, there
+is an important exception:
+<a href="headfootpage.html#hdrftr-global-size">HEADER_SIZE</a>
+(and by extension, FOOTER_SIZE). This is
+particularly useful for reducing the point size of
+headers/footers should they become crowded (quite likely to
+happen if the title of your document is long and your
+<a href="#copystyle">COPYSTYLE</a>
+is <kbd>DRAFT</kbd>).
+</p>
+
+<p class="tip-bottom">
+Finally, note that colour is disabled for <kbd>TYPEWRITE</kbd>. If
+you would like it enabled, for example so PDF links are colourised,
+invoke the groff
+<a href="definitions.html#primitives">primitive</a>
+'<kbd>.color</kbd>' after PRINTSTYLE.
+</p>
+
+</div>
+
+<!-- -COPYSTYLE- -->
+
+<div class="macro-id-overline">
+<h3 id="copystyle" class="macro-id">COPYSTYLE</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>COPYSTYLE</b> <kbd class="macro-args">DRAFT | FINAL</kbd>
+</div>
+
+<p>
+Mom&#8217;s default COPYSTYLE is <kbd>FINAL</kbd>, so you
+don&#8217;t have to use this macro unless you want to.
+</p>
+
+<p>
+COPYSTYLE <kbd>DRAFT</kbd> exhibits the following behaviour:
+</p>
+<ol style="margin-top: -.5em;">
+ <li>Documents start on page 1, whether or not you
+ request a different starting page number with
+ <a href="headfootpage.html#pagenumber">PAGENUMBER</a>.
+ </li>
+ <li>Page numbers are set in lower case roman numerals.</li>
+ <li>The draft number supplied by
+ <a href="#draft">DRAFT</a>
+ and a revision number, if supplied with
+ <a href="#revision">REVISION</a>
+ (see
+ <a href="#reference-macros">reference macros</a>),
+ appear in the centre part of
+ <a href="definitions.html#header">page headers</a>
+ (or footers, depending on which you&#8217;ve selected) along with
+ any other information that normally appears there.
+ </li>
+</ol>
+
+<div class="box-important">
+<p class="tip">
+<span class="important">Important:</span>
+If you define your own centre part for page headers with
+<a href="headfootpage.html#hdrftr-center">HEADER_CENTER</a>,
+no draft and/or revision number will appear there. If you want
+draft and revision information in this circumstance, use
+<a href="headfootpage.html#draft-with-pagenumber">DRAFT_WITH_PAGENUMBER</a>.
+</p>
+</div>
+
+<p>
+COPYSTYLE <kbd>FINAL</kbd> differs from <kbd>DRAFT</kbd> in that:
+</p>
+<ol style="margin-top: -.5em;">
+ <li>It respects the starting page number you give the document.</li>
+ <li>Page numbers are set in normal (Arabic) digits.</li>
+ <li>No draft or revision number appears in the page headers.</li>
+</ol>
+
+<div class="box-tip">
+<p id="copystyle-note" class="tip">
+<span class="note">Note:</span>
+The centre part of page headers can get crowded, especially with
+<a href="docprocessing.html#doctype">DOCTYPE <kbd>CHAPTER</kbd></a>
+and
+<a href="docprocessing.html#doctype">DOCTYPE <kbd>NAMED</kbd></a>,
+when the COPYSTYLE is <kbd>DRAFT</kbd>. Three mechanisms are
+available to overcome this problem. One is to reduce the overall
+size of headers (with
+<a href="headfootpage.html#hdrftr-global-size">HEADER_SIZE</a>).
+Another, which only works with
+<a href="docprocessing.html#printstyle">PRINTSTYLE <kbd>TYPESET</kbd></a>,
+is to reduce the size of the header&#8217;s centre part only (with
+<a href="headfootpage.html#_size">HEADER_CENTER_SIZE</a>).
+And finally, you can elect to have the draft/revision information
+attached to page numbers instead of having it appear in the centre
+of page headers (see
+<a href="headfootpage.html#draft-with-pagenumber">DRAFT_WITH_PAGENUMBER</a>).
+</p>
+</div>
+
+<div class="rule-short"><hr/></div>
+
+<!-- ======================================================================== -->
+
+<h2 id="start-macro" class="macro-group">Initiate document processing</h2>
+
+<p>
+In order to use mom&#8217;s document element macros (tags), you have
+to tell her you want them. The macro to do this is
+<a href="#start">START</a>.
+</p>
+
+<p>
+START collects the information you gave mom in the setup section at
+the top of your file (see
+<a href="#docprocessing-tut">Tutorial &ndash; Setting up a mom document</a>),
+merges it with her defaults, sets up headers and page numbering,
+and prepares mom to process your document using the document
+element tags. No document processing takes place until you invoke
+<kbd>.START</kbd>.
+</p>
+
+<!-- -START- -->
+
+<div class="macro-id-overline">
+<h3 id="start" class="macro-id">START</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>START</b>
+</div>
+<p class="requires">
+&bull;&nbsp;Required for document processing
+</p>
+
+<p>
+START takes no arguments. It simply instructs mom to begin document
+processing. If you don&#8217;t want document processing (i.e., you
+only want the
+<a href="typesetting.html#macros-typesetting">typesetting macros</a>),
+don&#8217;t use START.
+</p>
+
+<p>
+At a barest minimum before START, you must enter a
+<a href="#printstyle">PRINTSTYLE</a>
+command.
+</p>
+
+<div class="rule-short"><hr/></div>
+
+<!-- ======================================================================== -->
+
+<h2 id="style-before-start" class="macro-group">Establishing typestyle and formatting parameters before START</h2>
+
+<p>
+In the third (optional) part of setting up a document (the
+stylesheet; see
+<a href="#docprocessing-tut">Tutorial &ndash; Setting up a mom document</a>),
+you can use the
+<a href="typesetting.html">typesetting macros</a>
+to change mom&#8217;s document-wide defaults for margins,
+line length, family, base point size,
+<a href="definitions.html#leading">leading</a>,
+and justification style.
+</p>
+
+<p>
+Two additional style concerns have to be addressed here (i.e. in
+macros before
+<a href="#start">START</a>):
+changes to the
+<a href="definitions.html#docheader">docheader</a>,
+and whether you want you want the document&#8217;s nominal leading
+adjusted to fill pages fully to the bottom margin.
+</p>
+
+<div class="macro-list-container" style="margin-top: 2em;">
+<h3 id="index-style-before-start" class="macro-list">Type &amp; formatting parameters before START</h3>
+<ul class="macro-list">
+ <li><a href="#type-before-start">Behaviour of the typesetting macros before START</a>
+ <ul class="sublist" style="font-size: 100%; line-height: 120%; margin-bottom: .25em;">
+ <li><a href="#meanings">List of meanings</a></li>
+ <li><a href="#lrc-note">Special note on LEFT, RIGHT and CENTER</a></li>
+ <li><a href="#color">Initializing colours</a></li>
+ </ul></li>
+ <li><a href="#include">Including (sourcing) style sheets and files</a></li>
+ <li><a href="#doc-lead-adjust">DOC_LEAD_ADJUST</a> &ndash; adjust linespacing to fill pages and align bottom margins</li>
+ <li><a href="#docheader">DOCHEADER</a>
+ <ul class="sublist" style="font-size: 100%; line-height: 120%;">
+ <li><a href="#docheader-control">Docheader control</a></li>
+ </ul></li>
+ <li><a href="#columns">COLUMNS</a>
+ <ul class="sublist" style="font-size: 100%; line-height: 120%;">
+ <li><a href="#col-next">COL_NEXT</a></li>
+ <li><a href="#col-break">COL_BREAK</a></li>
+ </ul></li>
+</ul>
+</div>
+
+<h3 id="type-before-start" class="docs">Behaviour of the typesetting macros before START</h3>
+
+<p>
+From time to time (or maybe frequently), you&#8217;ll want the
+overall look of a document to differ from mom&#8217;s defaults.
+Perhaps you&#8217;d like her to use a different
+<a href="definitions.html#family">family</a>,
+or a different overall
+<a href="definitions.html#leading">leading</a>,
+or have different left and/or right page margins.
+</p>
+
+<p>
+To accomplish such alterations, use the appropriate
+<a href="typesetting.html#macros-typesetting">typesetting macros</a>
+(listed below) after
+<a href="#printstyle">PRINTSTYLE</a>
+and before
+<a href="#start">START</a>.
+</p>
+
+<p>
+More than one user has, quite understandably, not fully grasped the
+significance of the preceding sentence. The part they&#8217;ve missed is
+<i>after</i> PRINTSTYLE.
+</p>
+
+<p>
+Changes to any aspect of the default look and/or formatting of a mom
+document must come after PRINTSTYLE. For example, it might seem
+natural to set up page margins at the very top of a document with
+<br/>
+<span class="pre-in-pp">
+ .L_MARGIN 1i
+ .R_MARGIN 1.5i
+</span>
+However, when you invoke <kbd>.PRINTSTYLE</kbd>, those margins
+will be overridden. The correct place to set margins&mdash;and
+all other changes to the look of a document&mdash;is <i>after</i>
+PRINTSTYLE.
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="important">Important:</span>
+Do not use the macros listed in
+<a href="#intro-doc-param">Changing document-wide typesetting parameters after START</a>
+prior to START; they are exclusively for use afterwards.
+</p>
+</div>
+
+<div id="meanings" class="defaults-container">
+<h3 class="docs defaults" style="margin-top: 0;">Meanings</h3>
+<p style="margin-left: 9px; margin-top: -.25em;">
+When used before START, the
+<a href="typesetting.html#macros-typesetting">typesetting macros</a>,
+below have the following meanings:
+<br/>
+<span class="pre">
+ L_MARGIN Left margin of pages, including headers/footers
+ R_MARGIN Right margin of pages, including headers/footers
+ T_MARGIN The point at which running text (i.e. not
+ headers/footers or page numbers) starts on each
+ page
+ B_MARGIN* The point at which running text (i.e. not
+ (see note) headers/footers or page numbers) ends on each page
+
+ PAGE If you use PAGE, its final four arguments have the
+ same meaning as L_ R_ T_ and B_MARGIN (above).
+
+ LL The line length for everything on the page;
+ equivalent to setting the right margin with
+ R_MARGIN
+ FAMILY The family of all type in the document
+ PT_SIZE The point size of type in paragraphs; mom uses
+ this to calculate automatic point size changes
+ (e.g. for heads, footnotes, quotes, headers, etc)
+ LS/AUTOLEAD** The leading used in paragraphs; all leading and
+ spacing of running text is calculated from this
+
+ QUAD/JUSTIFY Affects paragraphs only
+ LEFT*** No effect
+ RIGHT*** No effect
+ CENTER*** No effect
+
+------
+ *See <a href="headfootpage.html#footer-margin">FOOTER MARGIN AND BOTTOM MARGIN</a> for an important warning
+ **See <kbd><a href="#doc-lead-adjust">DOC_LEAD_ADJUST</a></kbd>
+***See <a href="#lrc-note">Special note</a>
+</span>
+</p>
+</div>
+
+<p style="margin-top: -.75em;">
+Other macros that deal with type style, or refinements thereof
+(<a href="typesetting.html#kern">KERN</a>,
+<a href="typesetting.html#ligatures">LIGATURES</a>,
+<a href="typesetting.html#hy">HY</a>,
+<a href="typesetting.html#ws">WS</a>,
+<a href="typesetting.html#ss">SS</a>,
+etc.), behave normally. It is not recommended that you set up tabs
+or indents prior to START.
+</p>
+
+<p>
+If you want to change any of the basic parameters (above)
+<i>after</i> START and have them affect a document globally (as if
+you&#8217;d entered them <i>before</i> START), you must use the macros
+listed in
+<a href="#intro-doc-param">Changing document-wide typesetting parameters after START</a>.
+</p>
+
+<h4 id="lrc-note" class="docs">Special note on LEFT, RIGHT and CENTER prior to START</h4>
+
+<p>
+In a word, these three macros have no effect on document processing
+when invoked prior to START.
+</p>
+
+<p>
+All mom&#8217;s document element tags
+(<a href="docelement.html#pp">PP</a>,
+<a href="docelement.html#heading">HEADING</a>,
+<a href="docelement.html#blockquote">BLOCKQUOTE</a>,
+<a href="docelement.html#footnote">FOOTNOTE</a>,
+etc.) except
+<a href="docelement.html#quote">QUOTE</a>
+set a
+<a href="definitions.html#filled">fill mode</a>
+as soon as they&#8217;re invoked. If you wish to turn fill mode off
+for the duration of any tag (with
+<a href="typesetting.html#lrc">LEFT, RIGHT or CENTER</a>)
+you must do so immediately after invoking the tag. Furthermore,
+the change affects <i>only</i> the current invocation of the tag.
+Subsequent invocations of the same tag for which you want the same
+change require that you invoke <kbd>.LEFT</kbd>, <kbd>.RIGHT</kbd>
+or <kbd>.CENTER</kbd> immediately after every invocation of the tag.
+</p>
+
+<!-- -INCLUDE- -->
+
+<h4 id="include" class="docs">Including (sourcing) style sheets and files</h4>
+
+<p>
+If you routinely make the same changes to mom&#8217;s defaults in
+order to create similar documents in a similar style&mdash;in other
+words, you need a template&mdash; you can create stylesheet files
+and include, or &#8220;source&#8221;, them into your mom documents
+with the macro <kbd>.INCLUDE</kbd>. The right place for such style
+sheets is after
+<a href="#printstyle">PRINTSTYLE</a>
+and before
+<a href="#start">START</a>.
+</p>
+
+<p>
+Say, for example, in a particular kind of document, you always
+want main heads set in Helvetica Bold Italic, flush left, with
+no underscore. You&#8217;d create a file, let&#8217;s call it
+<kbd>head-template</kbd>, in which you&#8217;d place the pertinent
+HEADIING control macros.
+<br/>
+<span class="pre-in-pp">
+ .HEADING_STYLE 1 \
+ FAMILY H \
+ FONT BI \
+ QUAD L \
+ NO_UNDERSCORE
+</span>
+Then, in the preliminary document set-up section of your main file,
+you&#8217;d include the style sheet, or template, like this:
+<br/>
+<span class="pre-in-pp">
+ .TITLE "Sample Document
+ .AUTHOR "Joe Blow
+ .PRINTSTYLE TYPESET
+ \#
+ .INCLUDE head-template
+ \#
+ .START
+</span>
+
+The blank comment lines ( <kbd>\#</kbd> ) aren&#8217;t required, but
+they do make your file(s) easier to read.
+</p>
+
+<p>
+If the file to be included is in the same directory as the file
+you&#8217;re working, you simply enter the filename after
+<kbd>.INCLUDE</kbd>. If the file&#8217;s in another directory, you must
+provide a full path name to it. For example, if you&#8217;re working in
+a directory called <kbd>/home/joe/stories</kbd> and your
+stylesheet is in <kbd>/home/joe/stylesheets</kbd>, the above
+example would have to look like this:
+<br/>
+<span class="pre-in-pp">
+ .TITLE "Sample Document
+ .AUTHOR "Joe Blow
+ .PRINTSTYLE TYPESET
+ \#
+ .INCLUDE /home/joe/stylesheets/head-template
+ \#
+ .START
+</span>
+</p>
+
+<p>
+INCLUDE is not restricted to style sheets or templates. You can
+include any file at any point into a document, provided the file
+contains only text and valid groff or mom formatting commands.
+Neither is INCLUDE restricted to use with mom&#8217;s document
+processing macros. You can use it in plain typeset documents as
+well.
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span>
+INCLUDE is an alias for the groff request <kbd>.so</kbd>. If the
+sourced file contains material that requires pre-processing (e.g.
+a table made with <b>tbl(1)</b> or non-English characters), use
+<kbd>.so</kbd> rather than INCLUDE and invoke pdfmom thus:
+<br/>
+<span class="pre-in-pp">
+ soelim file.mom | pdfmom [flags] &gt; file.pdf
+</span>
+<b>soelim</b> only looks for lines that begin with <kbd>.so</kbd>,
+which furthermore must not have any space between the period and
+the &#8220;s&#8221;.
+</p>
+</div>
+
+<!-- -COLOUR- -->
+
+<h4 id="color" class="docs">Initializing colours</h4>
+
+<p>
+Although it doesn&#8217;t really matter where you define/initialize
+colours for use in document processing (see
+<a href="color.html#newcolor">NEWCOLOR</a>
+and
+<a href="color.html#xcolor">XCOLOR</a>
+in the section
+<a href="color.html#color-intro">Coloured text</a>),
+I recommend doing so before you begin document processing with
+<kbd><a href="#start">START</a></kbd>.
+</p>
+
+<p>
+The macro
+<a href="color.html#color">COLOR</a>
+and the
+<a href="definitions.html#inlines">inline escape</a>,
+<a href="color.html#color-inline"><kbd><span class="nobr">\*[&lt;colorname&gt;]</span></kbd></a>
+can be used at any time during document processing for occasional
+colour effects. However, consistent and reliable colourising of
+various document elements (the docheader, heads, linebreaks,
+footnotes, pagenumbers, and so on) must be managed through the use
+of the
+<a href="docelement.html#docelement-control">document element control macros</a>.
+</p>
+
+<p>
+Please note that colour is disabled if your
+<a href="#printstyle">PRINTSTYLE</a>
+is <kbd>TYPEWRITE</kbd>. If you would like it enabled, for example
+so PDF links are colourised, invoke the groff
+<a href="definitions.html#primitives">primitive</a>
+'<kbd>.color</kbd>' after PRINTSTYLE.
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span>
+If you plan to have mom generate a
+<a href="docelement.html#toc">table of contents</a>,
+do not embed colour
+<a href="definitions.html#inlines">inline escapes</a>
+(<a href="color.html#color-inline"><kbd><span class="nobr">\*[&lt;colourname&gt;]</span></kbd></a>)
+in the
+<a href="definitions.html#stringargument">string arguments</a>
+given to any of the
+<a href="docprocessing.html#reference-macros">reference macros</a>,
+nor in the string arguments given to
+<a href="docelement.html#heading">HEADING</a>.
+Use, rather, the
+<a href="definitions.html#controlmacro">control macros</a>
+mom provides to automatically colourise these elements.
+</p>
+</div>
+
+<!-- -DOC LEAD ADJUST- -->
+
+<div class="macro-id-overline">
+<h3 id="doc-lead-adjust" class="macro-id">Adjust linespacing to fill pages and align bottom margins</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>DOC_LEAD_ADJUST</b> <kbd class="macro-args">toggle</kbd>
+</div>
+
+<p class="requires">
+&bull;&nbsp;Must come after
+<a href="typesetting.html#ls"><span class="normal">LS</span></a>
+or
+<a href="typesetting.html.#autoloead"><span class="normal">AUTOLEAD</span></a>
+and before
+<a href="#start"><span class="normal">START</span></a>
+</p>
+
+<p>
+DOC_LEAD_ADJUST is a special macro to adjust document
+<a href="definitions.html#leading">leading</a>
+so that bottom margins fall precisely where you expect.
+</p>
+
+<p>
+When you invoke <kbd>.DOC_LEAD_ADJUST</kbd>, mom takes the number
+of lines that fit on the page at your requested leading, then
+incrementally adds
+<a href="definitions.html#units">machine units</a>
+to the leading until the maximum number of lines at the new leading
+that fit on the page coincides perfectly with the bottom margin of
+<a href="definitions.html#running">running text</a>.
+</p>
+
+<p>
+In most instances, the difference between the requested lead and
+the adjusted lead is unnoticeable, and since in almost all cases
+adjusted leading is what you want, it&#8217;s mom&#8217;s default
+and you don&#8217;t have to invoke it explicitly.
+</p>
+
+<p>
+However, should you not want adjusted document leading, you must
+turn it off manually, like this:
+<br/>
+<span class="pre">
+ .DOC_LEAD_ADJUST OFF
+</span>
+</p>
+
+<p>
+If you set the document leading prior to START with
+<a href="typesetting.html#leading">LS</a>
+or
+<a href="typesetting.html#autolead">AUTOLEAD</a>,
+<kbd>.DOC_LEAD_ADJUST&nbsp;OFF</kbd> must come afterwards, like
+this:
+<br/>
+<span class="pre-in-pp">
+ .LS 12
+ .DOC_LEAD_ADJUST OFF
+</span>
+In this scenario, the maximum number of lines that fit on a page at
+a
+<a href="definitions.html#leading">leading</a>
+of 12
+<a href="definitions.html#picaspoints">points</a>
+determine where mom ends a page. The effect will be that last lines
+usually fall (slightly) short of the &#8220;official&#8221; bottom
+margin.
+</p>
+
+<p>
+In
+<a href="docprocessing.html#printstyle">PRINTSTYLE</a>&nbsp;<kbd>TYPEWRITE</kbd>,
+the leading is always adjusted and can&#8217;t be turned off.
+</p>
+
+<div class="box-tip">
+<p class="tip-top">
+<span class="note">Note:</span>
+DOC_LEAD_ADJUST, if used, must be invoked after
+<a href="typesetting.html#leading">LS</a>
+or
+<a href="typesetting.html#autolead">AUTOLEAD</a>
+and before
+<a href="#start">START</a>.
+</p>
+
+<p class="tip-bottom">
+<span class="additional-note">Additional note:</span>
+Even if you disable DOC_LEAD_ADJUST, mom will still adjust the
+leading of endnotes pages and toc pages. See
+<a href="docelement.html#endnote-lead">ENDNOTE_LEAD</a>
+and
+<a href="docelement.html#toc-lead">TOC_LEAD</a>
+for an explanation of how to disable this default behaviour.
+</p>
+</div>
+
+<!-- -DOCHEADER- -->
+
+<div class="macro-id-overline">
+<h3 id="docheader" class="macro-id">Managing the docheader</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>DOCHEADER</b> <kbd class="macro-args">&lt;toggle&gt; [ distance to advance from top of page ] [ NO_SHIM ]</kbd>
+</div>
+
+<p class="requires">
+&bull;&nbsp;Must come before
+<a href="#start"><span class="normal">START</span></a>; <kbd><span class="normal">distance</span></kbd> requires a <a href="definitions.html#unitofmeasure">unit of measure</a>
+</p>
+
+<p>
+By default, mom prints a
+<a href="definitions.html#docheader">docheader</a>
+on the first page of any document (see
+<a href="#docheader-desc">below</a>
+for a description of the docheader). If you don&#8217;t want a docheader,
+turn it off with
+<br/>
+<span class="pre-in-pp">
+ .DOCHEADER OFF
+</span>
+DOCHEADER is a toggle macro, so the argument doesn&#8217;t
+have to be OFF; it can be anything you like.
+</p>
+
+<p>
+If you turn the docheader off, mom, by default, starts
+the running text of your document on the same top
+<a href="definitions.html#baseline">baseline</a>
+as all subsequent pages. If you&#8217;d like her to start at a different
+vertical position, give her the distance you&#8217;d like as a second
+argument.
+<br/>
+<span class="pre-in-pp">
+ .DOCHEADER OFF 1.5i
+</span>
+This starts the document 1.5 inches from the top of the page plus
+whatever spacing adjustment mom has to make in order to ensure that
+the first baseline of running text falls on a &#8220;valid&#8221;
+baseline (i.e., one that ensures that the bottom margin of the first
+page falls where it should). The distance is measured from the top
+edge of the paper to the
+<a href="definitions.html#baseline">baseline</a>
+of the first line of type.
+</p>
+
+<p>
+With <kbd>.DOCHEADER OFF</kbd>, it is possible to create your own
+custom docheaders (after
+<a href="#start">START</a>)
+using mom&#8217;s typesetting macros. It is recommended that if you
+do create a custom docheader, you make
+<a href="docprocessing.html#shim"><kbd>.SHIM</kbd></a>
+the last macro before the first item of your document (for
+example, <kbd>.PP</kbd> or <kbd>.HEADING&nbsp;1</kbd>.
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span>
+You may have tried <kbd>DOCHEAHER&nbsp;OFF</kbd> with a distance argument
+and discovered that mom will not budge the starting position of the document
+from her chosen default location. This is byproduct of
+<a href="#shim">shimming</a>,
+which mom always applies before the first line of running text after
+the docheader, regardless of which
+<a href="#vertical-whitespace-management">vertical whitespace management</a>
+strategy is in effect. If you encounter the problem, pass
+<kbd>DOCHEADER&nbsp;OFF&nbsp;&lt;distance&gt;</kbd>
+the additional final argument, <kbd>NO_SHIM</kbd>.
+</p>
+</div>
+
+<!-- DOCHEADER CONTROL -->
+
+<h3 id="docheader-control" class="docs">Docheader control: How to change the look of docheaders</h3>
+
+<p>
+In
+<a href="#printstyle">PRINTSTYLE <kbd>TYPEWRITE</kbd></a>,
+the look of docheaders is carved in stone. In
+<a href="#printstyle">PRINTSTYLE <kbd>TYPESET</kbd></a>,
+however, you can make a lot of changes. Macros that alter
+docheaders must come before
+<a href="#start">START</a>.
+</p>
+
+<h4 id="docheader-desc" class="docs">Docheader description</h4>
+
+<p>
+A typeset docheader has the following characteristics:
+</p>
+<div class="box-code" style="margin-left: 24px;">
+<span class="pre" style="color: #302419;">
+ TITLE bold, 3.5 points larger than running text (not necessarily caps)
+ Subtitle medium, same size as running text
+ by medium italic, same size as running text
+ Author(s) medium italic, same size as running text
+
+(Document type) bold italic, 3 points larger than running text
+</span>
+</div>
+
+<p>
+Or, if the
+<a href="#doctype">DOCTYPE</a>
+is <kbd>CHAPTER</kbd>,
+</p>
+<div class="box-code" style="margin-left: 24px;">
+<span class="pre" style="color: #302419;">
+ Chapter &lt;n&gt; bold, 4 points larger than running text
+Chapter Title bold italic, 4 points larger than running text
+</span>
+</div>
+
+<p>
+The
+<a href="definitions.html#family">family</a>
+is the prevailing family of the whole document. Title, subtitle,
+author, and document type are what you supply with the
+<a href="#reference-macros">reference macros</a>.
+Any you leave out will not appear; mom will compensate:
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span>
+If your DOCTYPE is <kbd>CHAPTER</kbd> and you have both &#8220;Chapter
+&lt;n&gt;&#8221; and a &#8220;Chapter Title&#8221; (as above), mom
+inserts a small amount of whitespace between them, equal to
+one-quarter of the
+<a href="definitions.html#leading">leading</a>
+in effect. If this doesn&#8217;t suit you, you can remove or alter
+the space with
+<a href="#space-before">CHAPTER_TITLE_SPACE_BEFORE</a>.
+</p>
+</div>
+
+<div class="macro-list-container">
+<h3 id="index-docheader-control" class="macro-list">Docheader control</h3>
+
+<p style="margin-top: -1.5em; margin-left: .5em; margin-right: .5em">
+With the docheader control macros, you can change the family,
+colour, leading, and quad direction of the entire docheader. You can
+also set the style parameters for each part individually. Style
+parameters include family, font, size, colour, lead, space before,
+caps, smallcaps, and underscoring.
+</p>
+
+<ul class="macro-list" style="margin-top: -.5em">
+ <li><a href="#change-whole-docheader">1. Changes to the whole docheader</a>
+ <ul style="list-style-type: disc">
+ <li><a href="#change-start">Change the starting position of the docheader</a></li>
+ <li><a href="#docheader-family">Change the family of the whole docheader</a></li>
+ <li><a href="#docheader-color">Change the colour of the whole docheader</a></li>
+ <li><a href="#docheader-lead">Change the leading of the whole docheader</a></li>
+ <li><a href="#docheader-quad">Change the quad direction of the docheader</a></li>
+ </ul>
+ </li>
+ <li><a href="#part-by-part">2. Part by part changes</a>
+ <ul style="list-style-type: disc">
+ <li><a href="#list-of-params">List of parameters and arguments</a></li>
+ <li><a href="#grouping">Grouping part/parameter changes</a> &ndash; very handy</li>
+ </ul>
+ </li>
+ <li><a href="#change-attribute">3. Changing or removing the attribution string (&#8220;by&#8221;)</a></li>
+</ul>
+</div>
+
+<h4 id="change-whole-docheader" class="docs" style="font-size: 100%">1. Changes to the whole docheader</h4>
+
+<h5 id="change-start" class="docs">Change the starting position of the docheader</h5>
+
+<p>
+By default, a docheader starts on the same
+<a href="definitions.html#baseline">baseline</a>
+as
+<a href="definitions.html#running">running text</a>.
+If you&#8217;d like it to start somewhere else, use the macro
+DOCHEADER_ADVANCE and give it the distance you want (measured from
+the top edge of the paper to the first baseline of the docheader),
+like this:
+<br/>
+<span class="pre-in-pp">
+ .DOCHEADER_ADVANCE 4P
+</span>
+A
+<a href="definitions.html#unitofmeasure">unit of measure</a>
+is required.
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span>
+If
+<a href="headfootpage.html#headers">HEADERS</a>
+are <kbd>OFF</kbd>, mom&#8217;s normal top margin for
+<a href="definitions.html#running">running text</a>
+(7.5
+<a href="definitions.html#picaspoints">picas</a>)
+changes to 6 picas (visually approx. 1 inch). Since the first
+baseline of the docheader falls on the same baseline as the first
+line of running text (on pages after page 1), you might find the
+docheaders a bit high when headers are off. Use DOCHEADER_ADVANCE
+to place them where you want.
+</p>
+</div>
+
+<h5 id="docheader-quad" class="docs">Change the quad direction of the docheader</h5>
+
+<p>
+By default, mom centres the docheader. If you&#8217;d prefer to
+have your docheaders set flush left or right, or need to restore
+the default centering, invoke <kbd>.DOCHEADER_QUAD</kbd> with the
+quad direction you want, either <kbd>LEFT</kbd> (or <kbd>L</kbd>),
+<kbd>RIGHT</kbd> (or <kbd>R</kbd>) or <kbd>CENTER</kbd> (or
+<kbd>C</kbd>).
+</p>
+
+<h5 id="docheader-family" class="docs">Change the family of the entire docheader</h5>
+
+<p>
+By default, mom sets the docheader in the same
+family used for
+<a href="definitions.html#running">running text</a>.
+If you&#8217;d prefer to have your docheaders set in a different
+family, invoke <kbd>.DOCHEADER_FAMILY</kbd> with the family you
+want. The argument to DOCHEADER_FAMILY is the same as for
+<a href="typesetting.html#family">FAMILY</a>.
+</p>
+
+<p>
+For example, mom&#8217;s default family for running text is Times
+Roman. If you&#8217;d like to keep that default, but have the
+docheaders set entirely in Helvetica,
+<br/>
+<span class="pre-in-pp">
+ .DOCHEADER_FAMILY H
+</span>
+is how you&#8217;d do it.
+</p>
+
+<p>
+Please note that if you use DOCHEADER_FAMILY, you can still alter
+the family of individual parts of the docheader.
+</p>
+
+<h5 id="docheader-color" class="docs">Change the colour of the entire docheader</h5>
+
+<p>
+The default colour for docheaders is black, as you&#8217;d expect.
+If you wish to change it, use
+<kbd>.DOCHEADER_COLOR&nbsp;&lt;colour&gt;</kbd>, where
+<kbd>&nbsp;&lt;colour&gt;</kbd> is a colour pre-initialized with
+<a href="color.html#xcolor">XCOLOR</a>
+or
+<a href="color.html#newcolor">NEWCOLOR</a>.
+</p>
+
+<h5 id="docheader-lead" class="docs">Change the leading of the entire docheader</h5>
+
+<p>
+By default, mom uses the leading in effect for
+<a href="definitions.html#running">running text</a>
+for docheaders. If you want to increase or
+decrease the overall docheader leading, use
+<kbd>.DOCHEADER_LEAD&nbsp;+|-&lt;amount&gt;</kbd>, where
+<kbd>&lt;amount&gt;</kbd> is the number of
+<a href="definitions.html#picaspoints">points</a>
+by which to make the adjustment.
+</p>
+
+<h4 id="part-by-part" class="docs" style="font-size: 100%">2. Part by part changes</h4>
+
+<p>
+Whenever you want to change the style parameters for any part of
+the docheader, simply join the name of the part to the parameter
+you wish to change using an underscore, then supply any necessary
+arguments. The subtitle double-underlined? No problem.
+<br/>
+<span class="pre-in-pp">
+ .SUBTITLE_UNDERSCORE DOUBLE
+</span>
+Author in red?
+<br/>
+<span class="pre-in-pp">
+ .AUTHOR_COLOR red
+</span>
+Title in smallcaps?
+<span class="pre-in-pp">
+ .TITLE_SMALLCAPS
+</span>
+</p>
+
+<div class="box-tip" style="margin-top: -1em;">
+<p class="tip">
+<span class="note">Note:</span>
+Use <kbd>ATTRIBUTE</kbd> as the part name for the attribution string
+(&#8220;by&#8221;) that precedes the author, and <kbd>DOCTYPE</kbd>
+as the name for the string passed to <kbd>DOCTYPE NAMED&nbsp;"string"</kbd>.
+</p>
+</div>
+
+<h5 id="list-of-params" class="docs">List of parameters with arguments</h5>
+
+<dl>
+ <dt class="params">_FAMILY</dt>
+ <dd>
+ Takes the same argument as <a href="typesetting.html#family">FAMILY</a>.
+ </dd>
+ <dt class="params">_FONT</dt>
+ <dd>
+ Takes the same argument as <a href="typesetting.html#font">FT</a>.
+ </dd>
+ <dt class="params">_SIZE</dt>
+ <dd>
+ Takes a <kbd>+</kbd> or <kbd>-</kbd> value relative to the size of
+ <a href="definitions.html#running">running text</a>.
+ </dd>
+ <dt class="params">_COLOR</dt>
+ <dd>
+ Takes the same argument as <a href="color.html#color">COLOR</a>.
+ Colours should be pre-initialized with
+ <a href="color.html#xcolor">XCOLOR</a>
+ or
+ <a href="color.html#newcolor">NEWCOLOR</a>.
+ </dd>
+ <dt class="params">_LEAD</dt>
+ <dd>
+ Takes an absolute leading value, i.e. not relative to the
+ overall leading of the docheader. The leading applies to
+ multiple lines of type within the same docheader part, e.g.
+ several authors or a long title that must be split over two
+ lines. No
+ <a href="definitions.html#unitofmeasure">unit of measure</a>
+ is required;
+ <a href="definitions.html#picaspoints">points</a>
+ is assumed.
+ </dd>
+ <dt id="space-before" class="params">_SPACE</dt>
+ <dd>
+ Takes a numeric value with a
+ <a href="definitions.html#unitofmeasure">unit of measure</a>
+ appended to it. The value may be negative. This allows you
+ to adjust the whitespace before a docheader part, for example
+ if you want more whitespace between the title and the author.
+ <span style="display: block; margin-top: .5em">
+ Note that <kbd>TITLE</kbd> does not have a <kbd>_SPACE</kbd>
+ parameter; use
+ <a href="#change-start">DOCHEADER_ADVANCE</a>
+ to move the title further down on the page.
+ </span>
+ </dd>
+ <dt class="params">_CAPS</dt>
+ <dd>
+ Capitalizes the entire docheader part. No argument is
+ required.
+ </dd>
+ <dt class="params">_NO_CAPS</dt>
+ <dd>
+ Only used if you need to reverse the sense of <kbd>_CAPS</kbd>, as
+ can sometimes happen when
+ <a href="rectoverso.html#collate">collating</a>
+ documents that have differing docheader style requirements.
+ </dd>
+ <dt class="params">_SMALLCAPS</dt>
+ <dd>
+ Set the entire docheader part in smallcaps. No argument is
+ required.
+ </dd>
+ <dt class="params">_NO_SMALLCAPS</dt>
+ <dd>
+ Only used if you need to reverse the sense of
+ <kbd>_SMALLCAPS</kbd>, as can sometimes happen when
+ <a href="rectoverso.html#collate">collating</a>
+ documents that have differing docheader style requirements.
+ </dd>
+ <dt class="params">_UNDERSCORE</dt>
+ <dd>
+ With no argument, underscores the docheader part. With a
+ single, possibly decimal numeric argument, sets the weight of
+ the underscore. A second numeric argument to which a
+ <a href="definitions.html#unitofmeasure">unit of measure</a>
+ is appended (most likely <kbd>p</kbd>) sets the distance
+ between the baseline and the underscore.
+ <span style="display: block; margin-top: .5em">
+ If the argument <kbd>DOUBLE</kbd> is given, double underscores
+ the docheader part. With a single, possibly decimal numeric
+ argument afterwards, sets the weight of the underscore rules.
+ A third numeric argument to which a
+ <a href="definitions.html#unitofmeasure">unit of measure</a>
+ is appended (most likely <kbd>p</kbd>) sets the distance
+ between the baseline and the first underscore rule. A fourth
+ numeric argument to which a unit of measure is appended sets
+ the distance between the two underscore rules.
+ </span>
+ <span style="display: block; margin-top: .5em">
+ You may give <kbd>_UNDERLINE</kbd> as the parameter instead of
+ <kbd>_UNDERSCORE</kbd> if you prefer.
+ </span>
+ </dd>
+ <dt class="params">NO_UNDERSCORE</dt>
+ <dd>
+ Only used if you need to reverse the sense of
+ <kbd>_UNDERSCORE</kbd>, as can sometimes happen when
+ <a href="rectoverso.html#collate">collating</a>
+ documents that have differing docheader style requirements.
+ </dd>
+</dl>
+
+<h5 id="grouping" class="docs">Grouping part/parameter changes</h5>
+
+<p>
+If you want to change several parameters for a particular docheader
+part, you may group the changes together in a single macro by
+joining the name of the part to <kbd>STYLE</kbd> with an underscore,
+for example <kbd>TITLE_STYLE</kbd> or <kbd>AUTHOR_STYLE</kbd>.
+The following demonstrates:
+<span class="pre-in-pp">
+ .CHAPTER_TITLE_STYLE \
+ FAMILY T \
+ SIZE +4 \
+ UNDERSCORE 2 \
+ SMALLCAPS
+</span>
+Notice the use of the backslash character, which is required after
+the macro name and all parameters except the last. Grouping reduces
+clutter and the finger fatigue caused by entering
+<span class="pre-in-pp">
+ .CHAPTER_TITLE_FAMILY T
+ .CHAPTER_TITLE_SIZE +4
+ .CHAPTER_TITLE_UNDERSCORE 2
+ .CHAPTER_TITLE_SMALLCAPS
+</span>
+</p>
+
+<h4 id="change-attribute" class="docs" style="font-size: 100%">3. Changing or removing the attribution string (&#8220;by&#8221;)</h4>
+
+<p>
+If you&#8217;re not writing in English, you can change what mom
+prints where &#8220;by&#8221; appears in docheaders. For example,
+<br/>
+<span class="pre-in-pp">
+ .ATTRIBUTE_STRING "par"
+</span>
+changes &#8220;by&#8221; to &#8220;par&#8221;. ATTRIBUTE_STRING
+can also be used, for example, to make the attribution read
+&#8220;Edited by&#8221;.
+</p>
+
+<p>
+If you don&#8217;t want an attribution string at all, simply pass
+ATTRIBUTE_STRING an empty argument, like this:
+<br/>
+<span class="pre-in-pp">
+ .ATTRIBUTE_STRING ""
+</span>
+Mom will deposit a blank line where the attribution string normally
+appears.
+</p>
+
+<p>
+If the optional argument <kbd>COVER</kbd> or <kbd>DOC_COVER</kbd>
+is given to ATTRIBUTE_STRING, the string argument represents the
+attribution string that will appear on cover or document cover pages
+(see the
+<a href="cover.html#cover-intro">Introduction to cover pages</a>
+for a description of the difference between &#8220;document
+covers&#8221; and &#8220;covers&#8221;). Thus, it is possible to
+have different attribution strings on the document cover page, the
+cover (&#8220;title&#8221;) page, and in the first-page docheader.
+An extreme example would be:
+<br/>
+<span class="pre-in-pp">
+ .ATTRIBUTE_STRING ""
+ .ATTRIBUTE_STRING DOC_COVER "Edited by"
+ .ATTRIBUTE_STRING COVER "by"
+</span>
+The first invocation of <kbd>.ATTRIBUTE_STRING</kbd> establishes a
+blank attribution string that will be incorporated in the first-page
+docheader. The second will print &#8220;Edited by&#8221; on the
+document cover; the third will print &#8220;by&#8221; on the cover
+(&#8220;title&#8221;) page.
+</p>
+
+<p>
+If you don&#8217;t require differing attribute strings for
+doc cover pages, cover pages, or the first-page docheader,
+<kbd>.ATTRIBUTE_STRING</kbd>, without either of the optional first
+arguments, is sufficient.
+</p>
+
+<div class="rule-short"><hr/></div>
+
+<!-- -COLUMNS- -->
+
+<h2 id="columns-intro" class="docs">Setting documents in columns</h2>
+
+<p>
+Setting documents in columns is easy with mom. All you have to do
+is say how many columns you want and how much space you want
+between them (the
+<a href="definitions.html#gutter">gutters</a>).
+That&#8217;s it. Mom takes care of everything else, from soup to
+nuts.
+</p>
+
+<h3 class="docs">Some words of advice</h3>
+
+<p>
+If you want your type to achieve a pleasing
+<a href="definitions.html#just">justification</a>
+or
+<a href="definitions.html#rag">rag</a>
+in columns, reduce the point size of type (and probably the
+<a href="definitions.html#leading">leading</a>
+as well). Mom&#8217;s default document point size is 12.5, which
+works well across her default 39
+<a href="definitions.html#picaspoints">pica</a>
+full page line length, but with even just two columns on a page, the
+default point size is awkward to work with.
+</p>
+
+<p>
+Furthermore, you&#8217;ll absolutely need to reduce the indents for
+<a href="docelement.html#epigraph-control">epigraphs</a>,
+<a href="docelement.html#quote-general">quotes</a>,
+and
+<a href="docelement.html#blockquote-general">blockquotes</a>
+(and probably the
+<a href="docelement.html#para-indent">paragraph first-line indent</a>
+as well).
+</p>
+
+<!-- -COLUMN- -->
+
+<div class="macro-id-overline">
+<h3 id="columns" class="macro-id">COLUMNS</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>COLUMNS</b> <kbd class="macro-args">&lt;number of columns&gt; &lt;width of gutters&gt;</kbd>
+</div>
+
+<p class="requires">
+&bull;&nbsp;Should be the last macro before START
+<br/>
+
+<i>The second argument requires a <a href="definitions.html#unitofmeasure">unit of measure</a></i>
+</p>
+
+<p>
+COLUMNS takes two arguments: the number of columns you want on
+document pages, and the width of the
+<a href="definitions.html#gutter">gutter</a>
+between them. For example, to set up a page with two columns
+separated by an 18 point gutter, you&#8217;d do
+<br/>
+<span class="pre-in-pp">
+ .COLUMNS 2 18p
+</span>
+Nothing to it, really. However, as noted above, COLUMNS should
+always be the last document setup macro prior to
+<a href="#start">START</a>.
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span>
+Mom ignores columns completely when the
+<a href="#printstyle">PRINTSTYLE</a>
+is <kbd>TYPEWRITE</kbd>. The notion of typewriter-style
+output in columns is just too ghastly for her to bear.
+</p>
+</div>
+
+<h3 class="docs" id="marking-col-start">Marking the first page column start position</h3>
+
+<p>
+If you insert or remove space after the docheader, i.e. immediately after
+<a href="#start">START</a>
+in your input file, mom needs to know where your first column begins
+in order to align subsequent columns on the first page.
+</p>
+
+<div id="col-mark" class="box-macro-args">
+Macro: <b>COL_MARK</b>
+</div>
+
+<p>
+<kbd>COL_MARK</kbd> tells mom where the first column after the
+docheader begins, in order for the top of subsequent columns on the
+first page to be aligned. Note that if you do not manually add
+or remove space after the docheader, there is no need to invoke
+<kbd>COL_MARK</kbd>.
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span>
+If you do add or subtract space after the docheader, e.g. with
+<a href="typesetting.html#ald">ALD</a>
+or
+<a href="typesetting.html#SP">SP</a>,
+and your
+<a href="definitions.html#unitofmeasure">unit of measure</a>
+is something other than a multiple of &#8220;<kbd>v</kbd>&#8221;, be
+sure to follow the spacing command with
+<a href="docprocessing.html#shim">SHIM</a>
+before entering <kbd>.COL_MARK</kbd> unless shimming has been
+disabled with
+<a href="#no-shim">NO_SHIM</a>.
+If your document is being flex-spaced, do not use
+<a href="docprocessing.html#flex">FLEX</a>.
+Rather, disable flex-spacing temporarily with
+<br/>
+<span class="pre-in-pp">
+ .NO_FLEX
+ .NO_SHIM off
+ .SHIM
+ .COL_MARK
+</span>
+and re-enable it afterwards with
+<span class="pre-in-pp">
+ .NO_SHIM
+ .NO_FLEX off
+</span>
+</p>
+</div>
+
+<h3 class="docs">Using tabs when COLUMNS are enabled</h3>
+
+<p>
+Mom&#8217;s tabs (both
+<a href="typesetting.html#typesetting-tabs">typesetting tabs</a>
+and
+<a href="typesetting.html#string-tabs">string tabs</a>)
+behave as you&#8217;d expect during document processing, even
+when COLUMNS are enabled. Tab structures set up during document
+processing carry over from page to page and column to column.
+</p>
+
+<!-- -BREAKING COLUMNS- -->
+
+<h3 id="breaking-columns" class="docs">Breaking columns manually</h3>
+
+<p>
+Mom takes care of breaking columns when they reach the bottom
+margin of a page. However, there may be times you want to break
+the columns yourself. There are two macros for breaking columns
+manually: COL_NEXT and COL_BREAK.
+</p>
+
+<div id="col-next" class="box-macro-args">
+Macro: <b>COL_NEXT</b>
+</div>
+
+<p>
+<kbd>.COL_NEXT</kbd> breaks the line just before it,
+<a href="definitions.html#quad">quads</a>
+it left (assuming the type is justified or quad left), and moves over
+to the top of the next column. If the column happens to be the last
+(rightmost) one on the page, mom starts a new page
+at the &#8220;column 1&#8221; position. This is the macro to use when
+you want to start a new column after the end of a paragraph.
+</p>
+
+<div id="col-break" class="box-macro-args">
+Macro: <b>COL_BREAK</b>
+</div>
+
+<p>
+<kbd>.COL_BREAK</kbd> is almost the same as <kbd>.COL_NEXT</kbd>,
+except that instead of breaking and quadding the line preceding it,
+mom breaks and spreads it (see
+<a href="typesetting.html#spread">SPREAD</a>).
+Use this macro whenever you need to start a new column in the middle
+of a paragraph.
+</p>
+
+<div class="box-important">
+<p class="tip">
+<span class="important">Warning:</span>
+If you need COL_BREAK in the middle of a blockquote or (god help
+you) an epigraph, you must do the following in order for COL_BREAK
+to work:
+<br/>
+<span class="pre-in-pp">
+ .SPREAD
+ \!.COL_BREAK
+</span>
+</p>
+</div>
+
+<div class="rule-short"><hr/></div>
+
+<!-- ======================================================================== -->
+
+<!-- *** -->
+
+
+<h2 id="style-after-start" class="macro-group">Changing basic type and formatting parameters after START</h2>
+
+<ul id="changing-basic-type">
+ <li><a href="#behaviour">Behaviour of the typesetting macros during document processing</a>
+ <ul style="margin-left: -.5em;">
+ <li><a href="#behaviour-specific">Effect of specific typesetting macros</a></li>
+ </ul></li>
+ <li><a href="#tb-margins">Top and bottom margins in document processing</a></li>
+ <li><a href="#space">Inserting space at the top of a new page</a>
+ <ul style="margin-left: -.5em;">
+ <li><a href="#add-space">ADD_SPACE</a></li>
+ </ul></li>
+</ul>
+
+<div class="rule-medium"><hr/></div>
+
+<h3 id="behaviour" class="docs">Behaviour of the typesetting macros during document processing</h3>
+
+<p>
+During document processing, most of the
+<a href="typesetting.html#macros-typesetting">typesetting macros</a>
+affect type in the document globally. For example, if you turn
+kerning off, pairwise kerning is disabled not only in paragraphs,
+but also in headers, footers, quotes, and so on.
+</p>
+
+<p>
+Typesetting macros that alter margins and line lengths affect
+<a href="definitions.html#running">running text</a>
+globally (or at least try to), but leave headers/footers and
+footnotes alone. (To indent footnotes, see the full explanation of
+the
+<a href="docelement.html#footnote">FOOTNOTE</a>
+macro.)
+</p>
+
+<p>
+Mom&#8217;s tabs (both
+<a href="typesetting.html#typesetting-tabs">typesetting tabs</a>
+and
+<a href="typesetting.html#string-tabs">string tabs</a>)
+behave as expected in running text during document processing. Tab
+structures that do not exceed the line length of running text are
+preserved sensibly from page to page, and, if
+<a href="docprocessing.html#columns">COLUMNS</a>
+are enabled, from column to column.
+</p>
+
+<p>
+Some typesetting macros, however, when used during document
+processing, behave in special ways. These are the macros that deal
+with the basic parameters of type style: horizontal and vertical
+margins, line length,
+<a href="definitions.html#family">family</a>,
+<a href="definitions.html#font">font</a>,
+<a href="definitions.html#ps">point size</a>,
+<a href="definitions.html#leading">leading</a>,
+and
+<a href="definitions.html#quad">quad</a>.
+</p>
+
+<p>
+Mom assumes that any changes to these parameters stem from a
+temporary need to set type in a style different from that provided
+by mom&#8217;s
+<a href="docelement.html#index-docelement">document element tags</a>.
+In other words, you need to do a bit of creative typesetting in the
+middle of a document.
+</p>
+
+<p>
+The following lists those typesetting macros whose behaviour during
+document processing requires some explanation.
+(Please refer to
+<a href="#tb-margins">Top and bottom margins in document processing</a>
+for information on how mom interprets
+<a href="typesetting.html#t-margin">T_MARGIN</a>
+and
+<a href="typesetting.html#b-margin">B_MARGIN</a>
+in document processing. Additionally, see
+<a href="#add-space">ADD_SPACE</a>
+if you encounter the problem of trying to get mom to put space at
+the tops of pages after the first.)
+</p>
+
+<div id="behaviour-specific" class="box-code" style="margin-left: 3.5%">
+<span class="pre" style="color: #302419;">
+ MACRO EFFECT DURING DOCUMENT PROCESSING
+ ----- ---------------------------------
+
+ L_MARGIN &bull;The left margin of all running text
+ assumes the new value.
+
+ &bull;The line length remains unaltered.
+
+ &bull;The header and footer left margin
+ remain at the current document default.
+
+ (You won&#8217;t use this often by itself. Most
+ likely, you&#8217;ll use it in combination with
+ R_MARGIN or LL.)
+
+ R_MARGIN &bull;The right margin of all running text
+ assumes the new value. In other words,
+ the line length is altered.
+
+ &bull;The header and footer right margin
+ remain at the current document default.
+
+ LL &bull;The line length of all running text
+ is set to the new value.
+
+ &bull;The header and footer line length remain
+ at the current document default.
+
+ FAMILY &bull;Changes family for the duration of the
+ current tag only. As soon as another document
+ element tag is invoked, the family reverts to
+ the current default for the new tag.
+
+ FT &bull;Changes font for the duration of the
+ current tag only. As soon as another document
+ element tag is entered, the font reverts
+ to the current default for the new tag.
+
+ N.B. &mdash; \*[SLANT] and \*[BOLDER] affect
+ paragraph text, and remain in effect for all
+ paragraphs until turned off. If you want to
+ use them in a macro that takes a string
+ argument, include the escape in the string.
+ \*[COND] and \*[EXT] behave similarly.
+
+ PT_SIZE &bull;Changes point size for the duration of the
+ current tag only. As soon as another document
+ element tag is entered, the point size reverts
+ to the current document default for the new
+ tag.
+
+ LS &bull;Changes line space for the duration of the
+ current tag only. As soon as another document
+ element tag is entered, the line space reverts
+ to the current document default for the new
+ tag.
+
+ Using LS to temporarily change leading within
+ a document will almost certainly result in a
+ bottom margin that doesn&#8217;t align with the
+ bottom margin of subsequent pages. You&#8217;ll
+ need to use the SHIM or FLEX macro to get mom back
+ on track when you&#8217;re ready to return to the
+ document&#8217;s default leading.
+
+ <a id="autolead" style="margin-top: -1em">AUTOLEAD</a> &bull;Invoked before START, sets the overall document
+ leading as a function of the overall document
+ point size (i.e. the point size used in paragraphs);
+ subsequently disabled after START, except for calls
+ to DOC_PT_SIZE
+
+ &bull;DOC_LEAD before DOC_PT_SIZE cancels the AUTOLEAD
+ set before START
+
+ &bull;Invoked after START, remains in effect for all
+ subsequent point size changes made with PT_SIZE,
+ but does not affect the leading of the document
+ element tags (e.g. HEADING, PP, QUOTE...), or calls
+ to DOC_PT_SIZE
+
+ QUAD &bull;Changes quad for the duration of the
+ current tag only. As soon as another document
+ element tag is entered, the quad reverts to
+ the current document default for the new
+ tag.
+
+ N.B. &mdash; Line-for-line quadding macros
+ (LEFT, CENTER, RIGHT) are also temporary,
+ overridden by the QUAD value of any subsequent
+ document element tag.
+</span>
+</div>
+
+<h3 id="tb-margins" class="docs" style="margin-top: 1.5em;">Top and bottom margins in document processing</h3>
+
+<p>
+Normally, mom establishes the top and bottom
+margins of
+<a href="definitions.html#running">running text</a>
+in documents from the values of <b>HEADER_MARGIN +
+HEADER_GAP</b> and <b>FOOTER_MARGIN + FOOTER_GAP</b>
+respectively. However, if you invoke
+<a href="typesetting.html#t-margin">T_MARGIN</a>
+or
+<a href="typesetting.html#b-margin">B_MARGIN</a>
+either before or after
+<a href="docelement.html#start">START</a>,
+they set the top and bottom margins of running text irrespective of
+HEADER_GAP and FOOTER_GAP.
+</p>
+
+<p>
+Put another way, in document processing, T_MARGIN
+and B_MARGIN set the top and bottom margins of
+running text, but have no effect on the placement of
+<a href="definitions.html#header">headers</a>,
+<a href="definitions.html#footer">footers</a>,
+or page numbers.
+</p>
+
+<!-- ==================================================================== -->
+
+<h3 id="space" class="docs">Inserting space at the top of a new page</h3>
+
+<p>
+Occasionally, you may want to insert space before the start of
+<a href="definitions.html#running">running text</a>
+on pages after the first.
+</p>
+
+<p>
+You might have tried using
+<a href="typesetting.html#ald">ALD</a>
+or
+<a href="typesetting.html#space">SPACE</a>
+and found it did nothing. This is because mom normally inhibits
+any extra space before the start of running text on pages after the
+first.
+</p>
+
+<p>
+If you need the space, you must use the macro ADD_SPACE in
+conjunction with
+<a href="typesetting.html#newpage">NEWPAGE</a>.
+</p>
+
+<!-- -ADD_SPACE- -->
+
+<div class="macro-id-overline">
+<h3 id="add-space" class= "macro-id">ADD_SPACE/RESTORE_SPACE</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>ADD_SPACE</b> <kbd class="macro-args">&lt;amount of space&gt;</kbd>
+<br/>
+Macro: <b>RESTORE_SPACE</b>
+</div>
+
+<p class="requires">
+&bull;&nbsp;Requires a <a href="definitions.html#unitofmeasure">unit of measure</a>
+</p>
+
+<p>
+If your
+<a href="#doctype">DOCTYPE</a>
+is DEFAULT, CHAPTER, NAMED, or LETTER, ADD_SPACE takes as its
+single argument the distance you want mom to advance from the normal
+baseline position at the top of any page <i>after the first</i> (i.e.
+the one on which the docheader is normally printed). A
+<a href="definitions.html#unitofmeasure">unit of measure</a> is
+required.
+</p>
+
+<p>
+For example, say you wanted to insert 2 inches of space before the
+start of
+<a href="definitions.html#running">running text</a>
+on a page other than the first. You&#8217;d accomplish it with
+<br/>
+<span class="pre-in-pp">
+ .NEWPAGE
+ .ADD_SPACE 2i
+</span>
+which would terminate your current page, break to a new page, print
+the header (assuming headers are on) and insert 2 inches of space
+before the start of running text.
+</p>
+
+<p>
+Since adding space in this way is almost sure to disrupt mom&#8217;s
+ability to guarantee perfectly flush bottom margins, I highly
+recommend using the
+<a href="docprocessing.html#shim">SHIM</a>
+or
+<a href="docprocessing.html#flex">FLEX</a>
+macro immediately after ADD_SPACE, which will add the space plus
+whatever correction is required by the
+<a href="docprocessing.html#vertical-whitespace-management">vertical whitespace management</a>
+strategy in effect.
+</p>
+
+<p>
+If your
+<a href="#doctype">DOCTYPE</a>
+is SLIDES, ADD_SPACE may be used on any slide <i>including the
+first</i> to introduce additional white space at the top.
+</p>
+
+<h4 class="docs doc-param-macros" style="margin-top: .5em">RESTORE_SPACE</h4>
+
+<p style="margin-top: .5em">
+You may sometimes find that mom refuses to respect
+<a href="typesetting.html#space">SP</a>,
+<a href="typesetting.html#index-aldrld">ALD/RLD</a>,
+<a href="docprocessing.html#shim">SHIM</a>,
+or
+<a href="docprocessing.html#flex">FLEX</a>
+after the first element (line of text, floated material) output
+at the top of a page. Should this happen, insert the macro
+RESTORE_SPACE before issuing the spacing command.
+</p>
+
+<!-- *** -->
+
+<h2 id="intro-doc-param" class="macro-group">Changing document-wide typesetting parameters after START</h2>
+
+<p>
+In the normal course of things, you establish the basic type style
+parameters of a document prior to invoking
+<a href="#start">START</a>,
+using the
+<a href="typesetting.html#macros-typesetting">typesetting macros</a>
+(<b>L_MARGIN, FAMILY, PT_SIZE, LS,</b> etc). After START, you must
+use the following macros if you wish to make global changes to the
+basic type style parameters, for example changing the overall leading or
+the justification style.
+</p>
+
+<div class="box-important">
+<p class="tip">
+<span class="important">Important:</span>
+Because these macros globally update the chosen parameter, they
+should only be used immediately prior to
+<a href="rectoverso.html#collate">COLLATE</a>
+or, if an occasional effect is desired,
+<a href="typesetting.html#newpage">NEWPAGE</a>.
+<a href="#doc-pt-size">DOC_PT_SIZE</a>,
+for example, updates the point size of every page element, including
+headers, footers, page numbers, and so on, which is almost certainly
+not what you want in the middle of a page.
+</p>
+</div>
+
+<div class="macro-list-container">
+<h3 id="index-doc-param" class="macro-list">Post-START global style change macros</h3>
+<ul class="macro-list">
+ <li><a href="#doc-left-margin">DOC_LEFT_MARGIN</a></li>
+ <li><a href="#doc-right-margin">DOC_RIGHT_MARGIN</a></li>
+ <li><a href="#doc-line-length">DOC_LINE_LENGTH</a></li>
+ <li><a href="#doc-family">DOC_FAMILY</a></li>
+ <li><a href="#doc-pt-size">DOC_PT_SIZE</a></li>
+ <li><a href="#doc-lead">DOC_LEAD</a></li>
+ <li><a href="#doc-lead-adjust">DOC_LEAD_ADJUST</a></li>
+ <li><a href="#doc-quad">DOC_QUAD</a></li>
+</ul>
+</div>
+
+<!-- -DOC_LEFT_MARGIN -->
+
+<div class="macro-id-overline">
+<h3 id="doc-left-margin" class="macro-id">DOC_LEFT_MARGIN</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>DOC_LEFT_MARGIN</b> <kbd class="macro-args">&lt;left margin&gt;</kbd>
+</div>
+
+<p class="requires">
+&bull;&nbsp;Requires a <a href="definitions.html#unitofmeasure">unit of measure</a>
+</p>
+
+<h4 class="docs doc-param-macros">Arguments and behaviour</h4>
+
+<ul class="doc-param-macros">
+ <li>the argument is the same as for
+ <a href="typesetting.html#l-margin">L_MARGIN</a>
+ </li>
+ <li>changes all left margins, including headers, footers, and page
+ numbers to the new value
+ </li>
+ <li>any document elements that use a left indent calculate
+ the indent from the new value
+ </li>
+ <li>the line length remains the same (i.e., the right margin
+ shifts when you change the left margin)
+ </li>
+</ul>
+
+<!-- -DOC_RIGHT_MARGIN -->
+
+<div class="macro-id-overline">
+<h3 id="doc-right-margin" class="macro-id">DOC_RIGHT_MARGIN</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>DOC_RIGHT_MARGIN</b> <kbd class="macro-args">&lt;right margin&gt;</kbd>
+</div>
+
+<p class="requires">
+&bull;&nbsp;Requires a <a href="definitions.html#unitofmeasure">unit of measure</a>
+</p>
+
+<h4 class="docs doc-param-macros">Arguments and behaviour</h4>
+
+<ul class="doc-param-macros">
+ <li>the argument is the same as for
+ <a href="typesetting.html#r-margin">R_MARGIN</a>
+ </li>
+ <li>changes all right margins, including headers, footers, and
+ page numbers to the new value;
+ </li>
+ <li>any document elements that use a right indent calculate
+ the indent from the new value
+ </li>
+</ul>
+
+<!-- -DOC_RIGHT_MARGIN -->
+
+<div class="macro-id-overline">
+<h3 id="doc-line-length" class="macro-id">DOC_LINE_LENGTH</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>DOC_LINE_LENGTH</b> <kbd class="macro-args">&lt;length&gt;</kbd>
+</div>
+
+<p class="requires">
+&bull;&nbsp;Requires a <a href="definitions.html#unitofmeasure">unit of measure</a>
+</p>
+
+<h4 class="docs doc-param-macros">Arguments and behaviour</h4>
+
+<ul class="doc-param-macros">
+ <li>the argument is the same as for
+ <a href="typesetting.html#linelength">LL</a>
+ </li>
+ <li>exactly equivalent to changing the right margin with
+ DOC_RIGHT_MARGIN (see
+ <a href="#doc-right-margin">above</a>);
+ </li>
+</ul>
+
+<!-- -DOC_FAMILY- -->
+
+<div class="macro-id-overline">
+<h3 id="doc-family" class="macro-id">DOC_FAMILY</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>DOC_FAMILY</b> <kbd class="macro-args">&lt;family&gt;</kbd>
+</div>
+
+<h4 class="docs doc-param-macros" style="margin-top: 1em;">Arguments and behaviour</h4>
+
+<ul class="doc-param-macros">
+ <li>the argument is the same as for
+ <a href="typesetting.html#family">FAMILY</a>
+ </li>
+ <li>globally changes the type family for
+ <ul>
+ <li style="margin-left: -.5em;">the <a href="definitions.html#docheader">docheader</a></li>
+ <li style="margin-left: -.5em;">all <a href="docelement.html#index-docelement">document element tags</a>, including footnotes</li>
+ <li style="margin-left: -.5em;"><a href="definitions.html#header">headers and/or footers</a></li>
+ <li style="margin-left: -.5em;"><a href="docelement.html#number-lines-intro">line numbering</a></li>
+ <li style="margin-left: -.5em;"><a href="headfootpage.html#pagination">page numbering</a></li>
+ </ul></li>
+ <li>does <i>not</i> change the family of
+ <ul>
+ <li><a href="cover.html#doc-cover">document cover pages</a></li>
+ <li><a href="cover.html#cover">cover pages</a></li>
+ <li><a href="docelement.html#endnote-intro">endnotes pages</a></li>
+ <li><a href="docelement.html#toc-intro">table of contents</a></li>
+ </ul></li>
+ <li>any page elements (e.g. headers page numbers, footnotes) whose
+ families you wish to remain at their old values must be
+ reset with the appropriate
+ <a href="docelement.html#docelement-control">control macros</a>
+ </li>
+</ul>
+
+<!-- -DOC_PT_SIZE- -->
+
+<div class="macro-id-overline">
+<h3 id="doc-pt-size" class="macro-id">DOC_PT_SIZE</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>DOC_PT_SIZE</b> <kbd class="macro-args">&lt;point size&gt;</kbd>
+</div>
+
+<p class="requires">
+&bull;&nbsp;Does not require a <a href="definitions.html#unitofmeasure">unit of measure</a>; points is assumed
+</p>
+
+<h4 class="docs doc-param-macros">Arguments and behaviour</h4>
+
+<ul class="doc-param-macros">
+ <li>the argument is the same as for
+ <a href="typesetting.html#ps">PT_SIZE</a>,
+ and refers to the point size of type in paragraphs
+ </li>
+ <li>all automatic point size changes (heads, quotes,
+ footnotes, headers, etc.) are affected by the new size;
+ anything you do not want affected must be reset to
+ its former value (see the Control Macros section of
+ the pertinent document element for instructions on
+ how to do this)
+ </li>
+ <li>if
+ <a href="typesetting.html#autolead">AUTOLEAD</a>
+ was invoked before START; the value of AUTOLEAD will be used
+ to update the leading of all document element tags except
+ FOOTNOTE and EPIGRAPH
+ </li>
+</ul>
+
+<!-- -DOC_LEAD- -->
+
+<div class="macro-id-overline">
+<h3 id="doc-lead" class="macro-id">DOC_LEAD</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>DOC_LEAD</b> <kbd class="macro-args">&lt;points&gt; [ ADJUST ]</kbd>
+</div>
+
+<p class="requires">
+&bull;&nbsp;Does not require a <a href="definitions.html#unitofmeasure">unit of measure</a>; points is assumed
+</p>
+
+<h4 class="docs doc-param-macros">Arguments and behaviour</h4>
+
+<ul class="doc-param-macros">
+ <li>the argument is the same as for
+ <a href="typesetting.html#leading">LS</a>,
+ and refers to the
+ <a href="definitions.html#lead">leading</a>
+ of paragraphs
+ </li>
+ <li>because paragraphs will have a new leading, the leading and
+ spacing of most running text is influenced by the new value
+ </li>
+ <li>epigraphs and footnotes remain unaffected;
+ if you wish to change their leading, use
+ <a href="docelement.html#epigraph-autolead">EPIGRAPH_AUTOLEAD</a>
+ and
+ <a href="docelement.html#footnote-autolead">FOOTNOTE_AUTOLEAD</a>.
+ </li>
+ <li>the optional argument <kbd>ADJUST</kbd> performs
+ leading adjustment as explained in
+ <a href="#doc-lead-adjust">DOC_LEAD_ADJUST</a>
+ </li>
+ <li>if
+ <a href="typesetting.html#autolead">AUTOLEAD</a>
+ was invoked before START; the value of that AUTOLEAD will be
+ cancelled
+ </li>
+</ul>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span>
+Even if you don&#8217;t pass DOC_LEAD the optional argument
+<kbd>ADJUST</kbd>, mom will still adjust the leading of endnotes
+pages and toc pages. See
+<a href="docelement.html#endnote-lead">ENDNOTE_LEAD</a>
+and
+<a href="docelement.html#toc-lead">TOC_LEAD</a>
+for an explanation of how to disable this default behaviour.
+</p>
+</div>
+
+<!-- -DOC_QUAD- -->
+
+<div class="macro-id-overline">
+<h3 id="doc-quad" class="macro-id">DOC_QUAD</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>DOC_QUAD</b> <kbd class="macro-args">L | R | C | J</kbd>
+</div>
+
+<h4 class="docs doc-param-macros" style="margin-top: 1em;">Arguments and behaviour</h4>
+
+<ul class="doc-param-macros">
+ <li>the arguments are the same as for
+ <a href="typesetting.html#quad">QUAD</a>
+ </li>
+ <li>affects paragraphs, epigraphs and footnotes; does not
+ affect blockquotes
+ </li>
+</ul>
+
+<h2 id="terminating" class="macro-group">Terminating a document</h2>
+
+<p>
+You need do nothing special to terminate a document. When groff
+finishes processing the last
+<a href="definitions.html#inputline">input line</a>
+of a file, the page is ejected, subject to whatever routines are
+needed to complete it (e.g. printing footnotes or adding the page
+number).
+</p>
+
+<p>
+It happens sometimes, however, that a last line of
+<a href="definitions.html#running">running text</a>,
+falling on or very near the bottom of the page, tricks groff into
+breaking to a new page before terminating. The result is a blank
+page at the end of the formatted document.
+</p>
+
+<p>
+The situation is rare, generally occurring only when some additional
+macro is required after the input text, e.g. to exit a
+<a href="docelement.html#list-intro">list</a>
+or terminate a
+<a href="docelement.html#quote">quote</a>.
+To prevent it from ever happening, I recommend getting into the habit
+of following the final input line of all your mom files with
+<a href="typesetting.html#el"><kbd>.EL</kbd></a>.
+Depending on the
+<a href="definitions.html#filled">fill mode</a>
+in effect, you may also have to append the &#8220;join line&#8221;
+<a href="definitions.html#inlines">escape</a>,
+<kbd>\c</kbd>, to the final line.</p>
+
+<p>
+Thus, for normal text at the end of a paragraph, which is in fill
+mode,
+<br/>
+<span class="pre-in-pp">
+ and they all lived happily ever after.
+ .EL
+</span>
+or for ending a
+<a href="docelement.html#list-intro">LIST</a>
+(also in fill mode)
+<span class="pre-in-pp">
+ .ITEM
+ peaches, pears, plums
+ .EL
+ .LIST OFF
+</span>
+whereas, at the end of a
+<a href="docelement.html#quote-intro">QUOTE</a>
+(which is in nofill mode),
+<span class="pre-in-pp">
+ Shall be lifted\[em]nevermore!\c
+ .EL
+ .QUOTE OFF
+</span>
+Notice that the <kbd>.EL</kbd> comes after the last line of input
+text, not any macros following.
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span>
+<a href="inlines.html#b"><kbd><span class="nobr">\*[B]</span></kbd></a>
+cannot be used as a replacement for <kbd>.EL</kbd> when terminating
+a document.
+</p>
+</div>
+
+<!-- Navigation links -->
+<table style="width: 100%; margin-top: 12px;">
+<tr>
+ <td style="width: 33%;"><a href="toc.html">Back to Table of Contents</a></td>
+ <td style="width: 24%; text-align: center;"><a href="#top">Top</a></td>
+ <td style="width: 43%; text-align: right;"><a href="docelement.html#top">Next: The document element tags</a></td>
+</tr>
+</table>
+
+</div>
+
+<div class="bottom-spacer"><br/></div>
+
+</body>
+</html>
diff --git a/contrib/mom/momdoc/goodies.html b/contrib/mom/momdoc/goodies.html
new file mode 100644
index 0000000..7c39e14
--- /dev/null
+++ b/contrib/mom/momdoc/goodies.html
@@ -0,0 +1,1785 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+This file is part of groff, the GNU roff type-setting system.
+
+Copyright (C) 2004-2020 Free Software Foundation, Inc.
+Written by Peter Schaffter (peter@schaffter.ca).
+
+Permission is granted to copy, distribute and/or modify this document
+under the terms of the GNU Free Documentation License, Version 1.3 or
+any later version published by the Free Software Foundation; with no
+Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
+Texts.
+
+A copy of the Free Documentation License is included as a file called
+FDL in the main directory of the groff source package.
+-->
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+<head>
+ <meta http-equiv="content-type" content="text/html;charset=utf-8"/>
+ <title>Mom -- Goodies</title>
+ <link rel="stylesheet" type="text/css" href="stylesheet.css" />
+</head>
+
+<body style="background-color: #f5faff;">
+
+<!-- ==================================================================== -->
+
+<div id="top" class="page">
+
+<!-- Navigation links -->
+<table style="width: 100%;">
+<tr>
+ <td><a href="toc.html">Back to Table of Contents</a></td>
+ <td style="text-align: right;"><a href="inlines.html#top">Next: Inline escapes</a></td>
+</tr>
+</table>
+
+<h1 id="goodies" class="docs">Goodies</h1>
+
+<p>
+The macros in this section are a collection of useful (and sometimes
+nearly indispensable) routines to simplify typesetting.
+</p>
+
+<div id="goodies-macros-mini-toc" style="margin-top: -1em; font-size: 95%;">
+<div class="mini-toc-col-1">
+<ul class="no-enumerator">
+<li class="list-head-goodies"><a href="#alias">ALIAS</a> <span class="normal-smaller">&ndash; rename macros</span></li>
+<li class="list-head-goodies"><a href="#caps">CAPS</a> <span class="normal-smaller">&ndash; convert to upper case</span></li>
+<li class="list-head-goodies"><a href="#center-block">CENTER_BLOCK</a> <span class="normal-smaller">&ndash; centre blocks of type with quad intact</span></li>
+<li class="list-head-goodies"><a href="#esc-char">ESC_CHAR</a> <span class="normal-smaller">&ndash; change the escape character to something other than a backslash</span></li>
+<li class="list-head-goodies"><a href="#hang">HANG</a> <span class="normal-smaller">&ndash; hang character(s) outside right margin (inline escape)</span></li>
+<li class="list-head-goodies"><a href="#left-hang">LEFT_HANG</a> <span class="normal-smaller">&ndash; hang character(s) outside left margin</span></li>
+<li class="list-head-goodies"><a href="#silent">SILENT</a> <span class="normal-smaller">&ndash; hide input lines from output</span></li>
+<li class="list-head-goodies"><a href="#sizespecs">SIZESPECS</a> <span class="normal-smaller">&ndash; get cap-height, x-height and descender depth of a font</span></li>
+<li class="list-head-goodies"><a href="#smartquotes">SMARTQUOTES</a> <span class="normal-smaller">&ndash; convert typewriter doublequotes to proper doublequotes</span></li>
+<li class="list-head-goodies"><a href="#string">STRING</a> <span class="normal-smaller">&ndash; user-definable strings</span></li>
+<li class="list-head-goodies"><a href="#trap">TRAP</a> <span class="normal-smaller">&ndash; suspend/re-invoke traps</span></li>
+<li class="list-head-goodies no-anchor"><span style="font-size: 90%;">Underscoring/underlining</span>
+<ul class="sublist">
+ <li class="list-head-goodies text-color"><a href="#underscore">UNDERSCORE</a> <span class="normal-smaller">&ndash; single underscore</span>
+ <ul class="sublist sub">
+ <li class="list-head-goodies text-color"><a href="#underscore-weight">Controlling the weight of underscores</a></li>
+ <li class="list-head-goodies text-color"><a href="#underscore-color">Colourising underscores</a></li>
+ </ul></li>
+ <li class="list-head-goodies text-color"><a href="#underscore2">UNDERSCORE2</a> <span class="normal-smaller">&ndash; double underscore</span></li>
+ <li class="list-head-goodies text-color"><a href="#underline">UNDERLINE</a>
+ <ul class="sublist sub">
+ <li class="list-head-goodies text-color"><a href="#ul">\*[UL]</a> <span class="normal-sub-sub">&ndash; inline escape to underline</span></li>
+ </ul></li>
+</ul></li>
+<li class="list-head-goodies no-anchor"><span style="font-size: 90%;">Padding</span>
+<ul class="sublist">
+ <li class="list-head-goodies text-color"><a href="#pad">PAD</a> <span class="normal-smaller">&ndash; insert equalized whitespace into lines</span>
+ <ul class="sublist sub">
+ <li class="list-head-goodies text-color"><a href="#pad-marker">PAD_MARKER</a> <span class="normal-sub-sub">&ndash; change/set the marker used with PAD</span></li>
+ </ul></li>
+</ul></li>
+</ul>
+</div>
+<div class="mini-toc-col-2">
+<ul class="no-enumerator">
+<li class="list-head-goodies no-anchor"><span style="font-size: 90%;">Leaders</span>
+<ul class="sublist">
+ <li class="list-head-goodies text-color"><a href="#leader">\*[LEADER]</a> <span class="normal-smaller">&ndash; inline escape to add leaders to a line</span></li>
+ <li class="list-head-goodies text-color"><a href="#leader-character">LEADER_CHARACTER</a> <span class="normal-smaller">&ndash; change/set the leader character</span></li>
+</ul></li>
+<li class="list-head-goodies no-anchor"><span style="font-size: 90%;">Drop caps</span>
+<ul class="sublist">
+ <li class="list-head-goodies text-color"><a href="#dropcap">DROPCAP</a> <span class="normal-smaller">&ndash; set a drop cap</span></li>
+ <li class="list-head-goodies text-color" style="list-style-type: none;"><a href="#dropcap-support"><span class="normal-smaller" style="font-weight: bold;">Support macros for DROPCAP</span></a>
+ <ul class="sublist sub">
+ <li class="list-head-goodies text-color"><a href="#dropcap-family">DROPCAP_FAMILY</a> <span class="normal-sub-sub">&ndash; change drop cap family</span></li>
+ <li class="list-head-goodies text-color"><a href="#dropcap-font">DROPCAP_FONT</a> <span class="normal-sub-sub">&ndash; change drop cap font</span></li>
+ <li class="list-head-goodies text-color"><a href="#dropcap-adjust">DROPCAP_ADJUST</a> <span class="normal-sub-sub">&ndash; alter size of drop cap</span></li>
+ <li class="list-head-goodies text-color"><a href="#dropcap-color">DROPCAP_COLOR</a> <span class="normal-sub-sub">&ndash; change colour of drop cap</span></li>
+ <li class="list-head-goodies text-color"><a href="#dropcap-gutter">DROPCAP_GUTTER</a> <span class="normal-sub-sub">&ndash; change space between drop cap and running text</span></li>
+ </ul></li>
+</ul></li>
+<li class="list-head-goodies text-color no-anchor"><span style="font-size: 90%;">Superscripts</span>
+<ul class="sublist">
+ <li class="list-head-goodies text-color"><a href="#sup">\*[SUP]</a> <span class="normal-smaller">&ndash; inline escape to set superscripts</span>
+ <ul class="sublist sub">
+ <li class="list-head-goodies text-color"><a href="#sup-raise">SUPERSCRIPT_RAISE_AMOUNT</a> <span class="normal-sub-sub">(control superscript raise amount</span></li>
+ <li class="list-head-goodies text-color"><a href="#cond-or-ext-sup">\*[CONDSUP]</a> <span class="normal-sub-sub">&ndash; condensed superscripts</span></li>
+ <li class="list-head-goodies text-color"><a href="#cond-or-ext-sup">\*[EXTSUP]</a> <span class="normal-sub-sub">&ndash; extended superscripts</span></li>
+ </ul></li>
+</ul></li>
+</ul>
+</div>
+</div>
+
+<div class="rule-medium" style="padding-bottom: 1em;"><hr/></div>
+
+<!-- -ALIAS- -->
+
+<div class="macro-id-overline">
+<h3 id="alias" class="macro-id">Rename macros</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>ALIAS</b> <kbd class="macro-args">&lt;new name&gt; &lt;old name&gt;</kbd>
+</div>
+
+<p>
+The ALIAS macro may well be your best friend. With it, you can
+change the name of a macro to anything you like (provided the new
+name is not already being used by mom).
+</p>
+
+<p>
+Groff has always been a bit intimidating for new users because
+its standard macro packages use very terse macro names. Mom
+doesn&#8217;t like people to feel intimidated; she wants them
+to feel welcome. Consequently, she tries for easy-to-grasp,
+self-explanatory macro names. However, mom knows that people have
+their own ways of thinking, their own preferences, their own habits.
+Some of her macro names may not suit you; they might be too long,
+or aren&#8217;t what you automatically think of when you want to
+do a particular thing, or might conflict with habits you&#8217;ve
+developed over the years.
+</p>
+
+<p>
+If you don&#8217;t like one of mom&#8217;s macro names, say,
+PAGEWIDTH, change it, like this:
+<br/>
+<span class="pre-in-pp">
+ .ALIAS PW PAGEWIDTH
+ | |
+ new--+ +--official
+ name name
+</span>
+The first argument to ALIAS is the new name you want for a macro.
+The second is the &#8220;official&#8221; name by which the macro is
+normally invoked. After ALIAS, either can be used.
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="tip">Tip:</span>
+A particularly good candidate for ALIAS is the macro
+<a href="typesetting.html#ps">PT_SIZE</a>.
+A more natural name for it would simply be PS, but PS conflicts
+with the <b>eqn</b> equation preprocessor and thus mom uses the
+longer form. However, if you&#8217;re not using <b>eqn</b>, you can
+happily rename PT_SIZE to
+PS:
+<br/>
+<span class="pre-in-pp">
+ .ALIAS PS PT_SIZE
+</span>
+</p>
+</div>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span>
+If you use ALIAS a lot, and always for the same things, consider
+creating an aliases file of the form
+<br/>
+<span class="pre-in-pp">
+ .ALIAS &lt;new name&gt; &lt;old name&gt;
+ .ALIAS &lt;new name&gt; &lt;old name&gt;
+ .ALIAS &lt;new name&gt; &lt;old name&gt;
+ ...etc
+</span>
+Put the file someplace convenient and source it (include it) at the
+beginning of your documents with the
+<a href="docprocessing.html#include">INCLUDE</a>
+macro. Assuming that you&#8217;ve created an aliases file called
+<b>mom-aliases</b> in your home directory under a directory called
+<b>Mom</b>, you&#8217;d source it by placing
+<br/>
+<span class="pre-in-pp">
+ .INCLUDE /home/&lt;username&gt;/Mom/mom-aliases
+</span>
+at the top of your documents.
+</p>
+
+<p class="tip-bottom">
+If you share documents that make use of an alias file, remember that
+other people don&#8217;t have the file. Paste the whole thing at
+the top of your documents, please.
+</p>
+</div>
+
+<div class="box-tip">
+<p class="tip">
+<span class="experts">Experts:</span>
+ALIAS is an alias of <kbd>.als</kbd>. You can use either, or mix
+&#8217;n&#8217; match with impunity.
+</p>
+</div>
+
+<!-- -SILENT- -->
+<div class="macro-id-overline">
+<h3 id="silent" class="macro-id">Hide input lines from output</h3>
+</div>
+
+<div class="box-macro-args">
+ Macro: <b>SILENT</b> <kbd class="macro-args">toggle</kbd>
+</div>
+
+<p class="alias" style="margin-bottom: 0;">
+<i>Alias:</i> <b>COMMENT</b>
+</p>
+
+<p>
+Sometimes, you want to &#8220;hide&#8221;
+<a href="definitions.html#inputline">input lines</a>
+from final output. This is most likely to be the case when setting
+up string tabs (see the
+<a href="typesetting.html#string-tabs-tut">quickie tutorial on string tabs</a>
+for an example), but there are other places where you might want
+input lines to be invisible as well. Any place you don&#8217;t want
+input lines to appear in the output, use the SILENT macro.
+</p>
+
+<p>
+SILENT is a toggle. Invoking it without an argument turns it on;
+any argument turns it off. E.g.,
+<br/>
+<span class="pre-in-pp">
+ .SILENT
+ A line of text
+ .SILENT OFF
+</span>
+The line &#8220;A line of text&#8221; will not appear in the
+output copy.
+</p>
+
+<p>
+SILENT is aliased as COMMENT. If you want to insert non-printing
+comments into your documents, you may prefer this.
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="tip">Tip:</span>
+SILENT does not automatically break an
+<a href="definitions.html#inputline">input line</a>
+(see
+<a href="typesetting.html#br">BR</a>)
+when you&#8217;re in one of the
+<a href="definitions.html#filled">fill modes</a>
+(<a href="typesetting.html#justify">JUSTIFY</a>
+or
+<a href="typesetting.html#quad">QUAD&nbsp;L&nbsp;|&nbsp;R&nbsp;|&nbsp;C&nbsp;|&nbsp;J</a>).
+The same applies to tabs
+(<a href="typesetting.html#tab-set">typesetting</a>
+or
+<a href="typesetting.html#st">string</a>)
+to which you&#8217;ve passed the J or QUAD argument. You must
+insert <kbd>.BR</kbd> yourself, or risk a portion of your text
+disappearing into a black hole.
+</p>
+</div>
+
+<!-- -TRAP- -->
+
+<div class="macro-id-overline">
+<h3 id="trap" class="macro-id">Suspend / re-invoke traps</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>TRAP</b> <kbd class="macro-args">toggle</kbd>
+</div>
+
+<p>
+Traps are vertical positions on the output page at which
+you or mom have instructed groff to start doing something
+automatically. Commonly, this is near the bottom of the page, where
+behind-the-scenes processing is needed in order for one page to
+finish and another to start.
+</p>
+
+<p>
+Sometimes, traps get sprung when you don&#8217;t want them. If this
+happens, surround just the offending macros and input lines with
+<br/>
+<span class="pre-in-pp">
+ .TRAP OFF
+ ...
+ .TRAP
+</span>
+TRAP is a toggle, therefore any argument turns it off (i.e., suspends
+the trap), and no argument turns it (back) on.
+</p>
+
+<!-- -SMARTQUOTES- -->
+
+<div class="macro-id-overline">
+<h3 id="smartquotes" class="macro-id">Convert typewriter doublequotes to proper doublequotes</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>SMARTQUOTES</b> <kbd class="macro-args">[&lt;off&gt;] [ ,, | &gt;&gt; | &lt;&lt; ]</kbd>
+</div>
+
+<span style="margin-left: .5em">or</span>
+
+<div class="box-macro-args">
+Macro: <b>SMARTQUOTES</b> <kbd class="macro-args">DA | DE | ES | FR | IT | NL | NO | PT | SV</kbd>
+</div>
+
+<p>
+If you invoke SMARTQUOTES without an argument, mom converts all
+instances of the inch-mark, (<kbd>"</kbd>), also called
+a doublequote, into the appropriate instances of true Anglo-American
+open-and close-doublequotes. (See
+<a href="#sq-international">Internationalization</a>
+for how to get SMARTQUOTES to behave correctly for non-English
+quoting styles.)
+</p>
+
+<p>
+Typographically, there is a difference between the inch-mark and
+quotation marks&mdash;a big difference. Sadly, typewriters and computer
+keyboards supply only one: the inch-mark. While using inches for
+doublequotes is, and always has been, acceptable in typewriter-style
+copy, it has never been, and, God willing, never will be acceptable in
+typeset copy. Failure to turn inches into quotes is the first thing
+a professional typesetter notices in documents prepared by amateurs.
+And you don&#8217;t want to look like an amateur, do you?
+</p>
+
+<h3 id="sq-international" class="docs">Internationalization</h3>
+<p>
+If you invoke SMARTQUOTES with one of the optional arguments
+(<kbd>,,</kbd> or <kbd>&gt;&gt;</kbd>
+or <kbd>&lt;&lt;</kbd>) you can use
+<kbd>&quot;</kbd> (i.e. the inch-mark/doublequotes key)
+as &#8220;cheap&#8221; open-and close-quotes when inputting text in
+a language other than English, and have mom convert them, on output,
+into the chosen open-and close-quote style.
+</p>
+
+<p>
+<kbd>,,</kbd> opens quotes with &#8220;lowered
+doublequotes&#8221; and closes them with &#8220;raised
+doublequotes&#8221;, as in this ascii approximation:
+<br/>
+<span class="pre-in-pp">
+ ,,Hilfe !``
+</span>
+
+<kbd>&gt;&gt;</kbd> opens quotes with guillemets
+pointing to the right, and closes them with guillemets pointing to
+the left, as in this ascii approximation:
+<br/>
+<span class="pre-in-pp">
+ &gt;&gt;Zurück !&lt;&lt;
+</span>
+<kbd>&lt;&lt;</kbd> opens quotes with guillemets
+pointing to the left, and closes them with guillemets pointing to
+the right, as in this ascii approximation:
+<br/>
+<span class="pre-in-pp">
+ &lt;&lt;Mais monsieur! Je ne suis pas ce genre de fille!&gt;&gt;
+</span>
+Please note: the above arguments to SMARTQUOTES are literal
+ASCII characters. <kbd>,,</kbd> is two commas;
+<kbd>&lt;&lt;</kbd> is two less-than signs;
+<kbd>&gt;&gt;</kbd> is two greater-than signs.
+</p>
+
+<p>
+Alternatively, you can pass SMARTQUOTES the two-letter, ISO 639
+abbreviation for the language you&#8217;re writing in, and mom will
+output the correct quotes.
+<br/>
+<span class="pre-in-pp">
+ .SMARTQUOTES DA = Danish &gt;&gt;text&lt;&lt;
+ .SMARTQUOTES DE = German ,,text``
+ .SMARTQUOTES ES = Spanish ``text´´
+ .SMARTQUOTES FR = French &lt;&lt; text &gt;&gt;
+ .SMARTQUOTES IT = Italian &lt;&lt; text &gt;&gt;
+ .SMARTQUOTES NL = Dutch ´´text´´
+ .SMARTQUOTES NO = Norwegian &lt;&lt;text&gt;&gt;
+ .SMARTQUOTES PT = Portuguese &lt;&lt;text&gt;&gt;
+ .SMARTQUOTES SV = Swedish &gt;&gt;text&gt;&gt;
+</span>
+</p>
+
+<p>
+Turn SMARTQUOTES off by passing it any argument not in the argument
+list (e.g. <kbd>OFF</kbd>, <kbd>QUIT</kbd>, <kbd>X</kbd>, etc)
+</p>
+
+<p>
+If you&#8217;re using the
+<a href="docprocessing.html#docprocessing">document processing macros</a>
+with
+<a href="docprocessing.html#printstyle">PRINTSTYLE&nbsp;TYPESET</a>,
+smartquotes are on by default (in the Anglo-American style); with
+<a href="docprocessing.html#printstyle">PRINTSTYLE&nbsp;TYPEWRITE</a>,
+it&#8217;s off by default (and should probably stay that way).
+</p>
+
+<p>
+Finally, if you&#8217;re fussy about the kerning of quote marks in
+relation to the text they surround, or have special quoting needs,
+you have to enter quote marks by hand using groff&#8217;s native
+<a href="definitions.html#inlines">inline escapes</a>
+for special characters (see <kbd>man&nbsp;groff-char</kbd>
+for a complete list of special characters). Entering quote marks
+this way allows you to use mom&#8217;s
+<a href="inlines.html#inline-kerning-mom">inline kerning escapes</a>
+to fine-tune the look of quotes.
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span>
+SMARTQUOTES does not work on single quotes, which most people
+input with the apostrophe (found at the right-hand end of the
+&#8220;home row&#8221; on a QWERTY keyboard). Groff will interpret
+all instances of the apostrophe as an apostrophe, making the symbol
+useless as an open-single-quote. For open single quotes, input
+the backtick character typically found under the tilde on most
+keyboards. Here&#8217;s an example of correct input copy with
+single quotes:
+<br/>
+<span class="pre-in-pp">
+ "But she said, `I don&#8217;t want to!'"
+</span>
+</p>
+
+<p class="tip-bottom" style="margin-top: -1em;">
+<span class="additional-note">Additional note:</span>
+Whether or not you have SMARTQUOTES turned on, get into the habit of
+entering the foot-and inch-marks, when you need them, with the
+<a href="definitions.html#inlines">inline escapes</a>
+<kbd><span class="nobr">\*[FOOT]</span></kbd> and
+<kbd><span class="nobr">\*[INCH]</span></kbd>, instead of
+<kbd>'</kbd> and <kbd>"</kbd>.
+</p>
+</div>
+
+<!-- -CAPS- -->
+
+<div class="macro-id-overline">
+<h3 id="caps" class="macro-id">Convert to upper case</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>CAPS</b> <kbd class="macro-args">toggle</kbd>
+</div>
+
+<p>
+CAPS converts all lower case letters to upper case.
+Primarily, it&#8217;s a support macro used by the
+<a href="docprocessing.html#docprocessing">document processing macros</a>,
+but you may find it helpful on occasion. CAPS is a toggle, therefore
+no argument turns it on, any argument (<kbd>OFF</kbd>,
+<kbd>QUIT</kbd>, <kbd>X</kbd>, etc) turns it off.
+<br/>
+<span class="pre-in-pp">
+ .CAPS
+ All work and no play makes Jack a dull boy.
+ .CAPS OFF
+</span>
+
+produces, on output
+<br/>
+<span class="pre-in-pp">
+ ALL WORK AND NO PLAY MAKES JACK A DULL BOY.
+</span>
+If you wish to capitalise a section of type inline, use the
+<a href="definitions.html#inlines">inline escapes</a>,
+<a href="inlines.html#uc-lc"><kbd><span class="nobr">\*[UC]...\*[LC]</span></kbd></a>
+like this:
+<br/>
+<span class="pre-in-pp">
+ All work \*[UC]and\*[LC] no play makes Jack a dull boy.
+</span>
+
+The above produces, on output
+<br/>
+<span class="pre-in-pp">
+ All work AND no play makes Jack a dull boy.
+</span>
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span>
+<kbd>\*[LC]</kbd> must come after a terminating period.
+<br/>
+<span class="pre-in-pp">
+ \*[UC]All work and no play makes Jack a dull boy.\*[LC]
+</span>
+not
+<span class="pre-in-pp">
+ \*[UC]All work and no play makes Jack a dull boy\*[LC].
+</span>
+Conversely, an initial period must come <em>before</em>
+<kbd>\*[UC]</kbd>, or be preceded by <kbd>\&amp;</kbd>, like this:
+<br/>
+<span class="pre-in-pp">
+ .\*[UC]start\*[LC] is used to begin document processing.
+</span>
+or
+<span class="pre-in-pp">
+ \*[UC]\&amp;.start\*[LC] is used to begin document processing.
+</span>
+Upon output, either will produce
+<br/>
+<span class="pre-in-pp">
+ START is used to begin document processing.
+</span>
+</p>
+</div>
+
+<!-- -STRING- -->
+
+<div class="macro-id-overline">
+<h3 id="string" class="macro-id">User-defined strings</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>STRING</b> <kbd class="macro-args">&lt;name&gt; &lt;what you want in the string&gt;</kbd>
+</div>
+
+<p>
+You may find sometimes that you have to type out portions of text
+repeatedly. If you&#8217;d like not to wear out your fingers, you can
+define a string that, whenever you call it by name, outputs whatever
+you put into it.
+</p>
+
+<p>
+For example, say you&#8217;re creating a document that repeatedly uses
+the phrase &#8220;the Montreal/Windsor corridor&#8221;. Instead
+of typing all that out every time, you could define a string, like
+this:
+<br/>
+<span class="pre-in-pp">
+ .STRING mw the Montreal/Windsor corridor
+</span>
+Once a string is defined, you can call it any time with the
+<a href="definitions.html#inlines">inline escape</a>
+<kbd><span class="nobr">\*[&lt;name&gt;]</span></kbd>. Using the example
+string above
+<br/>
+<span class="pre-in-pp">
+ The schedule for trains along \*[mw]:
+</span>
+produces, on output
+<br/>
+<span class="pre-in-pp">
+ The schedule for trains along the Montreal/Windsor corridor:
+</span>
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span>
+Be very careful not to put any spaces at the ends of strings
+you&#8217;re defining, unless you want them. Everything after
+the name argument you pass to STRING goes into the string,
+including trailing spaces. It&#8217;s a good idea to get into the
+habit of using groff&#8217;s native commenting mechanism, <kbd
+class="bold">\"</kbd>, immediately following any string definition
+in order to avoid spaces you can&#8217;t see, like this
+<br/>
+<span class="pre-in-pp">
+ .STRING mw the Montreal/Windsor corridor\"
+</span>
+</p>
+</div>
+
+<div class="box-tip">
+<p class="tip">
+<span class="experts">Experts:</span>
+STRING is an alias for <b>ds</b>. You can use either, or mix
+&#8217;n&#8217; match with impunity.
+</p>
+</div>
+
+<!-- -ESC_CHAR- -->
+
+<div class="macro-id-overline">
+<h3 id="esc-char" class="macro-id">Change the escape character</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>ESC_CHAR</b> <kbd class="macro-args">&lt;new character&gt; | &lt;anything&gt;</kbd>
+</div>
+
+<p>
+Groff&#8217;s and mom&#8217;s default escape character is
+the backslash. Sometimes, you may want to include a literal
+backslash in your document. There are two ways to accomplish
+this. One is simply to double the backslash character (<kbd
+class="bold">\\</kbd>), which is convenient if you don&#8217;t have
+a lot of backslashes to input. If you need to input a whole batch
+of backslashes (say, when including code snippets in your document),
+you can use ESC_CHAR to make the change permanent (until you decide
+to restore the escape character to its default, the backslash).
+</p>
+
+<p>
+ESC_CHAR with a single character argument changes the escape
+character to whatever the argument is. ESC_CHAR with no argument
+restores the escape character to the backslash.
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="important">Important:</span>
+Changing the escape character prevents macros, which require that
+the backslash be the escape character, from functioning correctly.
+Do not introduce any subsequent macros without first restoring the
+escape character to its default.
+</p>
+</div>
+
+<div class="box-tip">
+<p class="tip">
+<span class="experts">Experts:</span>
+ESC_CHAR is an alias of <kbd>.ec</kbd>. Mix &#8217;n&#8217; match
+the two with impunity.
+</p>
+</div>
+
+<!-- -SIZESPECS- -->
+
+<div class="macro-id-overline">
+<h3 id="sizespecs" class="macro-id">Get cap-height, x-height and descender depth of a font</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>SIZESPECS</b>
+</div>
+
+<p>
+Whenever you need to get the
+<a href="definitions.html#capheight">cap-height</a>,
+<a href="definitions.html#xheight">x-height</a>
+or
+<a href="definitions.html#descender">descender</a>
+depth of type at the current point size, invoke <kbd
+class="bold">.SIZESPECS</kbd>, which takes no argument.
+The dimensions are stored in the string registers
+<b><span class="nobr">\*[$CAP_HEIGHT]</span></b>,
+<b><span class="nobr">\*[$X_HEIGHT]</span></b>,
+and
+<b><span class="nobr">\*[$DESCENDER]</span></b>, respectively, in
+<a href="definitions.html#units">machine units</a>
+to which the
+<a href="definitions.html#unitofmeasure">unit of measure</a>,
+<b>u</b>, is already appended.
+</p>
+
+<p>
+Thus, if you wanted to advance 2 inches from your current position
+on the page plus the cap-height of the current point size of type
+<br/>
+<span class="pre-in-pp">
+ .PT_SIZE &lt;n&gt;
+ .SIZESPECS
+ .ALD 2i+\*[$CAP_HEIGHT]
+</span>
+would do the trick.
+</p>
+
+<!-- -UNDERSCORE- -->
+
+<div class="macro-id-overline">
+<h3 id="underscore" class="macro-id">Single underscore</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>UNDERSCORE</b> <kbd class="macro-args">[ &lt;distance below baseline&gt; ] [ PREFIX &lt;prefix&gt; ] [ SUFFIX &lt;suffix&gt; ] &quot;&lt;string&gt;&quot;</kbd>
+</div>
+
+<p class="requires">
+&bull;&nbsp;&lt;distance below baseline&gt; requires a <a href="definitions.html#unitofmeasure">unit of measure</a>
+</p>
+
+<p>
+By default, UNDERSCORE places an underscore 2 points beneath the
+required
+<a href="definitions.html#stringargument">string argument</a>.
+The string must be enclosed in double-quotes, like this:
+<br/>
+<span class="pre-in-pp">
+ .UNDERSCORE "Unmonitored monopolies breed high prices and poor products"
+</span>
+If you wish to change the distance of the rule from the baseline,
+use the optional argument
+<kbd>&lt;distance&nbsp;below&nbsp;baseline&gt;</kbd>
+(with a unit of measure).
+<br/>
+<span class="pre-in-pp">
+ .UNDERSCORE 3p "Unmonitored monopolies breed high prices and poor products"
+</span>
+The above places the upper edge of the underscore 3 points below the
+<a href="definitions.html#baseline">baseline</a>.
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Tip:</span>
+UNDERSCORE can also be used for strikethrough effects by supplying a
+negative value to the distance argument.
+</p>
+</div>
+
+<p>
+<kbd>PREFIX</kbd> and <kbd>SUFFIX</kbd> allow you to add
+non-underscored punctuation (or other glyphs) to the beginning
+and/or end of the underscored string. If the argument to either
+<kbd>PREFIX</kbd> or <kbd>SUFFIX</kbd> contains spaces, surround the
+argument with double-quotes. For example, the following underscores
+the text string but not the surrounding punctuation.
+<br/>
+<span class="pre-in-pp">
+ .UNDERSCORE PREFIX ( SUFFIX .) "Unmonitored monopolies breed high prices and poor products"
+</span>
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span>
+UNDERSCORE does not work across line breaks in output copy, which is
+to say that you can&#8217;t underscore a multi-line passage simply
+by putting the text of the whole thing in the string you pass to
+UNDERSCORE. If you need to underscore several lines of type, use
+<a href="#underline">UNDERLINE</a>.
+</p>
+</div>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Additional note:</span>
+In
+<a href="definitions.html#filled">nofill modes</a>,
+UNDERSCORE causes a break before and after, meaning the underscored
+word or phrase will appear as a separate line in your output. If
+you wish to embed an underscored word or phrase into non-filled
+text, temporarily change to the corresponding fill mode with
+<a href="typesetting.html#quad">QUAD</a>
+and insert breaks manually with
+<a href="typesetting.html#br">BR</a>
+as appropriate, reverting to the original nofill mode afterwards.
+</p>
+</div>
+
+<h3 id="underscore-weight" class="docs">Controlling the weight of underscores</h3>
+<p>
+The weight (thickness) of underscores may be controlled with the
+macro UNDERSCORE_WEIGHT. Thus, if you want underscores with a
+weight of 1-1/2 points, you&#8217;d invoke:
+<br/>
+<span class="pre-in-pp">
+ .UNDERSCORE_WEIGHT 1.5
+</span>
+prior to invoking <kbd>.UNDERSCORE</kbd>. Every
+subsequent instance of <kbd>.UNDERSCORE</kbd> will use
+this weight.
+</p>
+
+<p>
+Mom&#8217;s default underscore weight is 1/2 point.
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span>
+UNDERSCORE_WEIGHT also sets the weight of
+<a href="#UNDERSCORE2">double underscores.</a>
+</p>
+</div>
+
+<h3 id="underscore-color" class="docs">Colourising underscored text</h3>
+<p>
+If you want underscored text to be in a different colour from the
+text around it, use the
+<a href="color.html#color">COLOR</a>
+macro rather than the
+<a href="color.html#color-inline">inline escape for changing colour</a>.
+In other words, assuming your prevailing text colour is black and
+you want underscored text in red
+<br/>
+<span class="pre-in-pp">
+ .COLOR red
+ .UNDERSCORE "text to underscore"
+ .COLOR black
+</span>
+rather than
+<br/>
+<span class="pre-in-pp">
+ .UNDERSCORE "\*[red]text to underscore\*[black]"
+</span>
+The latter will render the text in red but the underscore in black.
+You can, of course, use this to create rainbow effects if that's
+what you want, e.g. text in red, underscore in blue, and prevailing
+type in black:
+<br/>
+<span class="pre-in-pp">
+ .UNDERSCORE "\*[red]text to underscore\*[blue]"
+ .COLOR black
+</span>
+</p>
+
+<!-- -UNDERSCORE2- -->
+
+<div class="macro-id-overline">
+<h3 id="underscore2" class="macro-id">Double underscore</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>UNDERSCORE2</b> <kbd class="macro-args">[ &lt;distance below baseline&gt; [ &lt;distance between rules&gt; ] [ PREFIX &lt;prefix&gt; ] [ SUFFIX &lt;suffix&gt; ] &quot;&lt;string&gt;&quot;</kbd>
+</div>
+
+<p class="requires">
+&bull;&nbsp;&lt;distance below baseline&gt;
+and
+&lt;distance between rules&gt;
+require a <a href="definitions.html#unitofmeasure">unit of measure</a>
+</p>
+
+<p>
+By default, UNDERSCORE2 places a double underscore 2 points beneath
+the required
+<a href="definitions.html#stringargument">string argument</a>.
+The string must be enclosed in double-quotes, like this:
+<br/>
+<span class="pre-in-pp">
+ .UNDERSCORE2 "Unmonitored monopolies breed high prices and poor products"
+</span>
+The default distance between the two rules is 2 points, measured
+from the bottom edge of the upper rule to the top edge of the lower
+one.
+</p>
+
+<p>
+If you wish to change the distance of the double underscore from the
+<a href="definitions.html#baseline">baseline</a>,
+use the optional argument
+<kbd>&lt;distance&nbsp;below&nbsp;baseline&gt;</kbd>
+(with a unit of measure), e.g.
+<br/>
+<span class="pre-in-pp">
+ .UNDERSCORE2 3p "Unmonitored monopolies breed high prices and poor products"
+</span>
+which places the upper edge of the first rule of the double
+underscore 3 points below the baseline.
+</p>
+
+<p>
+If you wish to change the distance between the two rules as well,
+use the second optional argument
+<kbd>&lt;distance&nbsp;between&nbsp;rules&gt;</kbd>
+(with a unit of measure). The distance between the two rules
+is measured from the bottom edge of the upper rule to the top
+edge of the lower one. Be aware that you must give a value for
+<kbd>&lt;distance&nbsp;below&nbsp;baseline&gt;</kbd> if you want to
+use <kbd>&lt;distance&nbsp;between&nbsp;rules&gt;</kbd>.
+</p>
+
+<p>
+<kbd>PREFIX</kbd> and <kbd>SUFFIX</kbd> allow you to add
+non-underscored punctuation (or other glyphs) to the beginning
+and/or end of the double-underscored string. If the argument to
+either <kbd>PREFIX</kbd> or <kbd>SUFFIX</kbd> contains spaces,
+surround the argument with double-quotes. For example, the
+following double-underscores the text string but not the surrounding
+punctuation.
+<br/>
+<span class="pre-in-pp">
+ .UNDERSCORE2 PREFIX ( SUFFIX .) "Unmonitored monopolies breed high prices and poor products"
+</span>
+The weight (thickness) of double underscores may be controlled with
+the macro
+<a href="#underscore-weight">UNDERSCORE_WEIGHT</a>
+(q.v).
+</p>
+
+<p>
+See
+<a href="#underscore-color">here</a>
+for advice on colourising double-underscored text.
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span>
+In
+<a href="definitions.html#filled">nofill modes</a>,
+UNDERSCORE2 causes a break before and after, meaning the double-underscored
+word or phrase will appear as a separate line in your output. If
+you wish to embed a double-underscored word or phrase into non-filled
+text, temporarily change to the corresponding fill mode with
+<a href="typesetting.html#quad">QUAD</a>
+and insert breaks manually with
+<a href="typesetting.html#br">BR</a>
+as appropriate, reverting to the original nofill mode afterwards.
+</p>
+</div>
+
+<!-- -UNDERLINE- -->
+<div class="macro-id-overline">
+<h3 id="underline" class="macro-id">Underline</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>UNDERLINE</b> <kbd class="macro-args">toggle</kbd>
+</div>
+
+<p>
+The distinction between underscoring and underlining is that
+underscoring is suitable for occasional effects (a word here,
+a phrase there), whereas underlining underlines whole passages
+of type. Furthermore, you cannot colourise underlining.
+There&#8217;s a special macro,
+<a href="#underline-specs">UNDERLINE_SPECS</a>,
+to control the weight and distance from the baseline of the
+underline.
+</p>
+
+<p>
+Lastly, files that use UNDERLINE must be processed with
+<br/>
+<span class="pre-in-pp">
+ pdfmom -Tps filename.mom | ps2pdf - filename.pdf
+</span>
+since groff&#8217;s pdf driver does not recognize UNDERLINE.
+</p>
+
+<p>
+Note that
+<a href="docprocessing.html#printstyle">PRINTSTYLE&nbsp;TYPEWRITE</a>
+uses UNDERLINE to underline italics
+and pseudo-italics (<a href="typesetting.html#slant-inline">SLANT</a>)
+by default. The default may be changed (see
+<a href="docprocessing.html#printstyle-italics">Underlining of italics</a>)
+but if it's what you want, you must process your document as shown
+above.
+</p>
+
+<p>
+UNDERLINE is a toggle macro, therefore you invoke it by itself (i.e.
+with no argument) to initiate underlining, and with any argument
+(<kbd>OFF</kbd>, <kbd>QUIT</kbd>, <kbd>END</kbd>, <kbd>X</kbd>, etc)
+to turn it off.
+</p>
+
+<div class="box-tip">
+<p class="tip-top">
+<span class="note">Note:</span>
+Underlining may also be turned on and off
+<a href="definitions.html#inlines">inline</a>
+with the escapes
+<a href="#ul"><kbd><span class="nobr">\*[UL]...\*[ULX]</span></kbd></a>.
+</p>
+
+<p class="tip-bottom">
+<span class="additional-note">Additional note:</span>
+In document processing, neither <kbd>.UNDERLINE</kbd> nor
+<kbd><span class="nobr">\*[UL]</span></kbd> persist past the current document element tag.
+For example, if you turn underlining on in a paragraph
+(<kbd><a href="docelement.html#pp">.PP</a></kbd>),
+your next paragraph will not be underlined.
+</p>
+</div>
+
+<h4 id="underline-specs" class="docs">UNDERLINE_SPECS</h4>
+
+<p>
+The weight of underlining and the distance from the baseline is
+set with
+<br/>
+<span class="pre-in-pp">
+ .UNDERLINE_SPECS &lt;weight&gt; &lt;distance&gt;
+</span>
+The <kbd>&lt;weight&gt;</kbd> argument can be expressed in any
+<a href="definitions.html#unitofmeasure">unit of measure</a>
+you like, but points is the most usual. Mom&#8217;s default is 1/2 point
+(.5p). The same holds for the <kbd>&lt;distance&gt;</kbd> argument;
+mom&#8217;s default is 1-1/4 points (1.25p).
+</p>
+
+<!-- -UL- -->
+
+<h4 id="ul" class="docs">INLINE ESCAPE FOR UNDERLINING</h4>
+
+<p>
+The macro pair,
+<kbd><a href="#underline">.UNDERLINE</a></kbd> /
+<kbd>.UNDERLINE&nbsp;OFF</kbd>, and the inline escapes,
+<span class="nobr"><kbd>\*[UL]</kbd> / <kbd>\*[ULX]</kbd></span>, are
+functionally identical, hence, in
+<a href="definitions.html#filled">fill</a>
+modes
+<br/>
+<span class="pre-in-pp">
+ Which should I heed?
+ .UNDERLINE
+ Just do it
+ .UNDERLINE OFF
+ or
+ .UNDERLINE
+ just say no?
+ .UNDERLINE OFF
+</span>
+produces the same result as
+<br/>
+<span class="pre-in-pp">
+ Which should I heed? \*[UL]Just do it\*[ULX] or \*[UL]just say no?\*[ULX]
+</span>
+In either case, this is a misuse of UNDERLINE.
+<a href="#underscore">UNDERSCORE</a>
+is preferable.
+</p>
+
+<!-- -PAD- -->
+
+<div class="macro-id-overline">
+<h3 id="pad" class="macro-id">Insert equalized whitespace into lines</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>PAD</b> <kbd class="macro-args">&quot;&lt;string with pad markers inserted&gt;&quot; [ NOBREAK ]</kbd>
+</div>
+
+<p>
+With PAD, you can insert proportional amounts of whitespace into a
+line. The optional <kbd id="nobreak" class="bold">NOBREAK</kbd>
+argument tells mom not to advance on the page after the PAD macro
+has been invoked.
+</p>
+
+<p>
+PAD calculates the difference between the length of text on the line
+and the distance remaining to its end, then inserts the difference
+(as whitespace) at the place(s) you specify.
+</p>
+
+<p>
+Take, for example, the following relatively common typesetting
+situation, found at the bottom of legal agreements:
+<br/>
+<span class="pre">
+ Date Signature |
+</span>
+</p>
+
+<p>
+The person signing the agreement is supposed to fill in the date
+as well as a signature. Space needs to be left for both, but the
+exact amount is neither known, nor important. All that matters is
+that there be a little space after Date, and rather more space after
+Signature. (In the above, <kbd>|</kbd> represents the
+end of the line at the prevailing line length.)
+</p>
+
+<p>
+The
+<a href="goodies.html#pad-marker">pad marker</a>
+(see below) is <kbd>#</kbd> (the pound or number sign
+on your keyboard) and can be used multiple times in a line. With
+that in mind, here&#8217;s how you&#8217;d input the Date/Signature line
+(assuming a length of 30 picas):
+<br/>
+<span class="pre">
+ .LL 30P
+ .PAD "Date#Signature###"
+</span>
+</p>
+
+<p>
+When the line is output, the space remaining on the line, after
+&quot;Date&quot; and &quot;Signature&quot; have been taken into
+account, is split into four (because there are four # signs). One
+quarter of the space is inserted between Date and Signature, the
+remainder is inserted after Signature.
+</p>
+
+<div class="examples-container">
+<h3 id="pad-example" class="docs notes">Example of PAD usage</h3>
+<p style="margin-top: .5em;">
+One rarely wants merely to insert space in a line; one usually wants
+to fill it with something, hence PAD is particularly useful in
+conjunction with
+<a href="typesetting.html#string-tabs">string tabs</a>.
+The following uses the Date/Signature example, above, but adds
+rules into the whitespace through the use of string tabs and
+mom&#8217;s
+<a href="definitions.html#inlines">inline escape</a>
+<a href="inlines.html#inline-rule-mom"><kbd><span class="nobr">\*[RULE]</span></kbd></a>.
+<br/>
+<span class="pre-in-pp">
+ .LL 30P
+ .PAD "Date \*[ST1]#\*[ST1X] Signature \*[ST2]###\*[ST2X]" NOBREAK
+ .ST 1 J
+ .ST 2 J
+ .TAB 1
+ \*[RULE]
+ .TN
+ \*[RULE]
+ .TQ
+</span>
+</p>
+
+<p>
+Here&#8217;s what the example does:
+</p>
+<ol style="margin-top: -.5em; margin-bottom: -.5em;">
+ <li>Pads the Date/Signature line with a shorter space for Date
+ (<kbd>#</kbd>) and a longer space for Signature
+ (<kbd>###</kbd>), encloses the padded space with string tabs
+ markers, and outputs the line without advancing on the page.
+ </li>
+ <li>Sets the quad for the two string tabs (in this instance, justified).
+ </li>
+ <li>Calls the first string tab and draws a rule to its full
+ length.
+ </li>
+ <li>Calls the second tab with
+ <a href="typesetting.html#tn">TN</a>
+ (which moves to tab 2 and stays on the same baseline)
+ then draws a rule to the full length of string tab 2.
+ </li>
+</ol>
+
+<p>
+Often, when setting up string tabs this way, you don&#8217;t want the
+padded line to print immediately. To accomplish this, use
+<kbd><a href="#silent">SILENT</a></kbd>.
+See the
+<a href="typesetting.html#string-tabs-tut">quickie tutorial on string tabs</a>
+for an example.
+</p>
+</div>
+
+<div class="box-tip">
+<p class="tip-top">
+<span class="note">Note:</span>
+Because the pound sign
+(<kbd>#</kbd>) is used as the pad marker, you
+can&#8217;t use it as a literal part of the pad string. If you need
+the sign to appear in the text of a padded line, change the pad
+marker with
+<kbd><a href="#pad-marker">PAD_MARKER</a></kbd>.
+Also, be aware that <kbd>#</kbd> as a pad marker
+only applies within the PAD macro; at all other times it prints
+literally, just as you&#8217;d expect.
+</p>
+
+<p class="tip-bottom">
+Another important consideration when using PAD is that because the
+string must be enclosed in double-quotes, you can&#8217;t use the
+double-quote (<kbd>"</kbd>) as part of the string. The
+way to circumvent this is to use the groff
+<a href="definitions.html#inlines">inline escapes</a>
+<kbd>\(lq</kbd> and <kbd>\(rq</kbd>
+(leftquote and rightquote respectively) whenever double-quotes are
+required in the string passed to PAD.
+</p>
+</div>
+
+<!-- -PAD_MARKER- -->
+
+<div class="macro-id-overline">
+<h3 id="pad-marker" class="macro-id">Change/set the marker used with PAD</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>PAD_MARKER</b> <kbd class="macro-args">"&lt;character to use as the pad marker&gt;</kbd>
+</div>
+
+<p>
+If you need to change mom&#8217;s default pad marker (<kbd
+class="bold">#</kbd>), either because you want a literal # in
+the padded line, or simply because you want to use another character
+instead, use PAD_MARKER, whose argument is the new pad marker
+character you want.
+<br/>
+<span class="pre-in-pp">
+ .PAD_MARKER @
+</span>
+changes the pad marker to <kbd>@</kbd>.
+</p>
+
+<p>
+Once you&#8217;ve changed the pad marker, the new marker remains in effect
+for every instance of
+<a href="#pad">PAD</a>
+until you change it again (say, back to the pound sign).
+</p>
+
+<!-- -\*[LEADER]- -->
+
+<div class="macro-id-overline">
+<h3 id="leader" class="macro-id">Inline escape to add leaders to a line</h3>
+</div>
+
+<div class="box-macro-args">
+Inline: <b>\*[LEADER]</b>
+</div>
+
+<p>
+Whenever you want to fill a line or tab with
+<a href="definitions.html#leader">leaders</a>,
+use the
+<a href="definitions.html#inlines">inline escape</a>
+<kbd><span class="nobr">\*[LEADER]</span></kbd>. The remainder of the line or
+tab will be filled with the leader character. Mom&#8217;s default
+leader character is a period (dot), but you can change it to any
+character you like with
+<kbd><a href="#leader-character">LEADER_CHARACTER</a></kbd>.
+</p>
+
+<div class="box-tip">
+<p class="tip-top">
+<span class="note">Note:</span>
+<kbd>\*[LEADER]</kbd> fills lines or tabs right to
+their end. You cannot insert leaders into a line or tab and have
+text following the leader on the same line or in the same tab.
+Should you wish to achieve such an effect typographically, create
+tabs for each element of the line and fill them appropriately with
+the text and leaders you need.
+<a href="typesetting.html#string-tabs">String tabs</a>
+are perfect for this. An example follows.
+<br/>
+<span class="pre">
+ .LL 30P
+ .PAD "Date\*[ST1]#\*[ST1X] Signature\*[ST2]###\*[ST2X]" NOBREAK
+ .EL
+ .ST 1 J
+ .ST 2 J
+ .TAB 1
+ \*[LEADER]
+ .TN
+ \*[LEADER]
+ .TQ
+</span>
+</p>
+
+<p class="tip-bottom">
+The PAD line sets the words Date and Signature, and marks string
+tabs around the pad space inserted in the line. The string tabs are
+then &quot;set&quot;, called, and filled with leaders. The result
+looks like this:
+<br/>
+<span class="pre" style="margin-bottom: -1em;">
+ Date.............Signature.....................................
+</span>
+</p>
+</div>
+
+<!-- -LEADER_CHARACTER- -->
+
+<div class="macro-id-overline">
+<h3 id="leader-character" class="macro-id">Change/set the leader character</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>LEADER_CHARACTER</b> <kbd class="macro-args">&lt;character&gt;</kbd>
+</div>
+
+<p>
+LEADER_CHARACTER takes one argument: a single character you would
+like to be used for
+<a href="definitions.html#leader">leaders</a>.
+(See
+<a href="#leader"><kbd><span class="nobr">\*[LEADER]</span></kbd></a>
+for an explanation of how to fill lines with leaders.)
+</p>
+
+<p>
+For example, to change the leader character from mom&#8217;s
+default (a period) to the underscore character, enter
+<br/>
+<span class="pre-in-pp">
+ .LEADER_CHARACTER _
+</span>
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="tip">Tip:</span>
+A particularly useful function of LEADER_CHARACTER is that it can be
+used to increase the spacing of mom&#8217;s default leaders. This is
+done by assigning to LEADER_CHARACTER both the period (dot) and a
+space. The technique requires a little low-level groffing:
+<br/>
+<span class="pre-in-pp">
+ .char \[leader] . \"
+ .LEADER_CHARACTER \[leader]
+</span>
+The <kbd>.char</kbd>
+<a href="definitions.html#primitives">primitive</a>
+allows you to define a character called <kbd>leader</kbd>, to which
+you assign a period and a space. The <kbd>\"</kbd>, which, in
+groff, is used to add non-printing comments to a line, is not
+strictly necessary. Its presence here lets you see that
+there&#8217;s a space after the period.
+</p>
+</div>
+
+<!-- -DROPCAP- -->
+
+<div class="macro-id-overline">
+<h3 id="dropcap" class="macro-id">Drop caps</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>DROPCAP</b> <kbd class="macro-args">&lt;dropcap letter&gt; &lt;number of lines to drop&gt; [ COND &lt;percentage&gt; | EXT &lt;percentage&gt; ]</kbd>
+</div>
+
+<p>
+The first two arguments to DROPCAP are the letter you want to be the
+<a href="definitions.html#dropcap">drop cap</a>
+and the number of lines you want it to drop. By default, mom uses
+the current family and font for the drop cap.
+</p>
+
+<p>
+The optional argument (<kbd>COND</kbd> or <kbd>EXT</kbd>) indicates
+that you want the drop cap condensed (narrower) or extended (wider).
+If you use <kbd class="bold">COND</kbd> or <kbd>EXT</kbd>, you must
+follow the argument with the percentage of the letter&#8217;s normal
+width you want it condensed or extended. No percent sign
+(<kbd>%</kbd>) is required.
+</p>
+
+<p>
+Mom will do her very best to get the drop cap to line up with the
+first line of text indented beside it, then set the correct number
+of indented lines, and restore your left margin when the number of
+drop cap lines has been reached.
+</p>
+
+<p>
+Beginning a paragraph with a drop cap &#8220;T&#8221; looks like this:
+<br/>
+<span class="pre">
+ .DROPCAP T 3 COND 90
+ he 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...
+</span>
+</p>
+
+<p>
+The drop cap, slightly condensed but in the current family and font,
+will be three lines tall, with whatever text fills those three
+lines indented to the right of the letter. The remainder of the
+paragraph&#8217;s text will revert to the left margin.
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span>
+When using the
+<a href="docprocessing.html#docprocessing">document processing macro</a>
+<a href="docelement.html#pp">PP</a>,
+DROPCAP only works
+</p>
+<ul style="margin-top: -1em; margin-bottom: -.5em;">
+ <li>with initial paragraphs (i.e. at the start of the document,
+ or after
+ <a href="docelement.html#heading">HEADING</a>),</li>
+ <li>when <kbd>.DROPCAP</kbd> comes immediately after <kbd>.PP</kbd>,</li>
+ <li>the
+ <a href="docprocessing.html#printstyle">PRINTSTYLE</a>
+ is TYPESET.</li>
+</ul>
+<p>
+If these conditions aren&#8217;t met, DROPCAP is silently ignored.
+</p>
+
+<p class="tip-bottom" style="margin-top: -1em;">
+<span class="additional-note">Additional note:</span>
+If you have dropcaps after
+<a href="docelement.html#heading">HEADING</a>s,
+you must increase the <kbd>NEEDS</kbd> argument to
+<a href="docelement.html#heading-style">HEADING_STYLE</a>
+to match the number of dropcap lines. For example, assuming
+dropcaps that are three lines tall:
+<br/>
+<span class="pre-in-pp">
+ .HEADING_STYLE 1 NEEDS 3
+</span>
+</p>
+</div>
+
+<div class="box-important">
+<p class="tip">
+<span class="important">Warning:</span>
+DROPCAP puts a bit of a strain on resource-challenged systems. If
+you have such a system and use drop caps extensively in a document,
+be prepared for a wait while mom does her thing.
+</p>
+</div>
+
+<h3 id="dropcap-support" class="docs control-macros-header">Support macros for DROPCAP</h3>
+<p>
+Drop caps are the bane of most typesetters&#8217; existence.
+It&#8217;s very difficult to get the size of the drop cap right
+for the number of drop lines, especially if the drop cap is in a
+different family from the prevailing family of running text. Not
+only that, but there&#8217;s the gutter around the drop cap to take
+into account, plus the fact that the letter may be too wide or too
+narrow to look anything but odd or misplaced.
+</p>
+
+<p>
+Mom solves the last of these problems with the <kbd>COND</kbd> and
+<kbd>EXT</kbd> arguments. The rest she solves with macros that
+change the default behaviour of DROPCAP, namely
+</p>
+<ul class="no-enumerator" style="margin-top: -.5em; margin-left: -.5em;">
+ <li><a href="#dropcap-family">DROPCAP_FAMILY</a></li>
+ <li><a href="#dropcap-font">DROPCAP_FONT</a></li>
+ <li><a href="#dropcap-color">DROPCAP_COLOR</a></li>
+ <li><a href="#dropcap-adjust">DROPCAP_ADJUST</a></li>
+ <li><a href="#dropcap-gutter">DROPCAP_GUTTER</a></li>
+</ul>
+
+<p style="margin-top: -.5em;">
+These macros must, of course, come before you invoke DROPCAP.
+</p>
+
+<h3 id="dropcap-family" class="control-macro">&bull;&nbsp;DROPCAP_FAMILY</h3>
+<p style="margin-left: .66em;">
+Set the drop cap family by giving DROPCAP_FAMILY the name of the
+family you want, e.g.
+<br/>
+<span class="pre-in-pp">
+ .DROPCAP_FAMILY H
+</span>
+which will set the family to Helvetica for the drop cap only.
+</p>
+
+<h3 id="dropcap-font" class="control-macro">&bull;&nbsp;DROPCAP_FONT</h3>
+<p style="margin-left: .66em;">
+Set the drop cap font by giving DROPCAP_FONT the name of the font
+you want, e.g.
+<br/>
+<span class="pre-in-pp">
+ .DROPCAP_FONT I
+</span>
+which will set the font to italic for the drop cap only.
+</p>
+
+<h3 id="dropcap-adjust" class="control-macro">&bull;&nbsp;DROPCAP_ADJUST</h3>
+<p style="margin-left: .66em;">
+If the size mom calculates for the drop cap isn&#8217;t precisely
+what you want, you can increase or decrease it with DROPCAP_ADJUST,
+like this: e.g.
+<br/>
+<span class="pre-in-pp">
+ .DROPCAP_ADJUST +1
+</span>
+or
+<br/>
+<span class="pre">
+ .DROPCAP_ADJUST -.75
+</span>
+</p>
+
+<p style="margin-left: .66em;">
+DROPCAP_ADJUST only understands
+<a href="definitions.html#picaspoints">points</a>,
+therefore do not append any
+<a href="definitions.html#unitofmeasure">unit of measure</a>
+to the argument. And always be sure to prepend the plus or
+minus sign, depending on whether you want the drop cap larger or
+smaller.
+</p>
+
+<h3 id="dropcap-color" class="control-macro">&bull;&nbsp;DROPCAP_COLOR</h3>
+<p style="margin-left: .66em;">
+If you&#8217;d like your drop cap colourized, simply invoke
+<kbd>.DROPCAP_COLOR&nbsp;&lt;color&gt;</kbd> with the name of a
+colour you&#8217;ve already created (&#8220;initialized&#8221;) with
+<a href="color.html#newcolor">NEWCOLOR</a>
+or
+<a href="color.html#xcolor">XCOLOR</a>.
+Only the drop cap will be colourized; all other text will remain at
+the current colour default (usually black).
+</p>
+
+<h3 id="dropcap-gutter" class="control-macro">&bull;&nbsp;DROPCAP_GUTTER</h3>
+<p style="margin-left: .66em;">
+By default, mom puts three points of space between the drop cap
+and the text indented beside it. If you want another value, use
+DROPCAP_GUTTER (with a unit of measure), like this:
+<br/>
+<span class="pre-in-pp">
+ .DROPCAP_GUTTER 6p
+</span>
+</p>
+
+<!-- -\*[SUP]- -->
+
+<div class="macro-id-overline">
+<h3 id="sup" class="macro-id">Superscript</h3>
+</div>
+
+<div class="box-macro-args">
+Inlines: <kbd>\*[SUP]...\*[SUPX]</kbd>
+</div>
+
+<p>
+Superscripts are accomplished
+<a href="definitions.html#inlines">inline</a>.
+Whenever you need one, typically for numerals, all you need
+to do is surround the superscript with the inlines above.
+<kbd><span class="nobr">\*[SUP]</span></kbd> begins superscripting;
+<kbd><span class="nobr">\*[SUPX]</span></kbd> turns it off.
+</p>
+
+<p id="cond-or-ext-sup">
+If your running type is
+<a href="typesetting.html#cond-inline">pseudo-condensed</a>
+or
+<a href="typesetting.html#ext-inline">pseudo-extended</a>
+and you want your superscripts to be equivalently pseudo-condensed
+or -extended, use
+<br/>
+<kbd><span class="nobr">\*[CONDSUP]...\*[CONDSUPX]</span></kbd> or
+<kbd><span class="nobr">\*[EXTSUP]...\*[EXTSUPX]</span></kbd>.
+</p>
+
+<p>
+The superscript inlines are primarily used by the
+<a href="docprocessing.html#docprocessing">document processing macros</a>
+for automatic generation of numbered footnotes. However, you may
+find them useful for other purposes.
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span>
+Mom does a pretty fine job of making superscripts look good in any
+font and at any size. If you&#8217;re fussy, though (and I am),
+about precise vertical placement, kerning, weight, size, and so on,
+you may want to roll your own solution.
+</p>
+</div>
+
+<h3 id="sup-raise" class="docs">SUPERSCRIPT RAISE AMOUNT</h3>
+<p>
+By default, mom raises superscripts 1/3 of an
+<a href="definitions.html#em">em</a>
+above the baseline. If you&#8217;re not happy with this default,
+you can change it by invoking SUPERSCRIPT_RAISE_AMOUNT with the
+amount you want them raised. A
+<a href="definitions.html#unitofmeasure">unit of measure</a>
+must be appended directly to the amount. Thus, if you want
+superscripts raised by 3
+<a href="definitions.html#picaspoints">points</a>
+instead of 1/3 em, you&#8217;d do
+<br/>
+<span class="pre-in-pp">
+ .SUPERSCRIPT_RAISE_AMOUNT 3p
+</span>
+and all subsequent superscripts would be raised by 3 points.
+</p>
+
+<!-- -CENTER BLOCK- -->
+
+<div class="macro-id-overline">
+<h3 id="center-block" class="macro-id">Centre blocks of type</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>CENTER_BLOCK</b> <kbd class="macro-args">&lt;toggle&gt;</kbd>
+</div>
+
+<p>
+Blocks of type sometimes need to be centred on the page with their quad
+direction (left, centre, right) left intact. The
+document processing macros
+<a href="docelement.html#quote">QUOTE</a>
+and
+<a href="docelement.html#blockquote">BLOCKQUOTE</a>
+take care of this automatically, but there are other situations
+where you may want to centre blocks of type. An example might be
+left-quadded
+<a href="docelement.html#list-intro">nested lists</a>.
+</p>
+
+<p>
+Whenever you want to centre a block of type on the page, surround it
+with <kbd>.CENTER_BLOCK/.CENTER_BLOCK OFF</kbd> (or <kbd>QUIT</kbd>,
+<kbd>X</kbd>, etc).
+</p>
+
+<div class="macro-id-overline">
+<h3 id="left-hang" class="macro-id">Hanging characters</h3>
+</div>
+<br/>
+<div class="box-macro-args">
+Macro: <b>LEFT_HANG</b> <kbd class="macro-args">&lt;character&gt; [ &lt;gutter&gt;</kbd> ]
+</div>
+<p class="requires">
+&bull;&nbsp;left-hung characters
+</p>
+
+<div class="box-macro-args" style="margin-top: 1em">
+Inline: <b>\*[HANG <kbd class="macro-args">&lt;character&gt;</kbd>]</b>
+</div>
+<p class="requires">
+&bull;&nbsp;right-hung characters
+</p>
+
+<p>
+Hung characters, frequently punctuation, fall outside the left or
+right margin. Their purpose is usually to fine-tune justification.
+Consider the following:
+</p>
+
+<table style="margin-left: 3%; margin-right: 6%; text-align: justify">
+<tr>
+<td style="padding-right: 1em">
+&#8220;Play the man, Master Ridley; we
+shall this day light such a candle,
+by God's grace, in England, as I
+trust shall never be put out.&#8221;
+</td>
+<td>
+&nbsp;&nbsp;
+</td>
+<td style="margin-right: 0; padding-right: 0">
+&#8220;
+<br/>
+<br/>
+<br/>
+<br/>
+</td>
+<td style="margin-left: 0; padding-left: 0">
+Play the man, Master Ridley; we
+shall this day light such a candle,
+by God's grace, in England, as I
+trust shall never be put out.&#8221;</td>
+</tr>
+</table>
+
+<p>
+In the right hand example, the opening double-quote hangs outside
+the left margin, creating a uniform left margin for the text.
+</p>
+
+<h4 class="docs">Left hung characters</h4>
+
+<p>
+LEFT_HANG hangs its first argument, the character to be hung, to
+the left of the left margin. The optional second argument lets you
+specify an amount of space to insert between the hung character and
+the text.
+</p>
+
+<p>
+Input text after LEFT_HANG must begin with the character to be hung
+PLUS a
+<a href="inlines.html#inline-horizontal-mom">horizontal motion</a>
+corresponding to <kbd>&lt;gutter&gt;</kbd> if one was given.
+If the hung character is a left double-quote, <kbd>\[lq]</kbd>
+must be used as the argument to LEFT_HANG and the usual keyboard
+double-quote (<kbd>"</kbd>) entered as the input text so as not to
+confuse
+<a href="goodies.html#smartquotes">SMARTQUOTES</a>
+The following example demonstrates:
+<br/>
+<span class="pre-in-pp">
+ .LEFT_HANG \[lq] 1p
+ "\*[FWD 1p]This line will have its opening double-quote
+ plus one point of space hung outside the left margin."
+</span>
+</p>
+
+<p style="margin-top: -1em">
+Note that what follows LEFT_HANG must be an input line and therefore
+it cannot be used to left-hang a
+<a href="docelement.html#heading">HEADING</a>
+character.
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="important">Important:</span>
+Versions of mom lower than 2.5_a that included LEFT_HANG required
+that the character and its gutter be entered as a single,
+concatenated argument, using horizontal motions to establish the
+gutter
+(e.g.
+<a href="inlines.html#inline-horizontal-mom">FWD</a>,
+<a href="inlines.html#inline-horizontal-mom">BCK</a>).
+Documents created with versions prior to 2.5_a may have to be
+updated.
+</p>
+</div>
+
+<h4 class="docs">Right hung characters</h4>
+
+<p>
+The <kbd>\*[HANG&nbsp;c]</kbd> inline escape hangs its argument outside
+the right margin of justified or quad right copy. The argument may
+be a single character, or a single character preceded by a
+horizontal motion, effectively establishing a gutter between the
+right margin and the hung character:
+<br/>
+<span class="pre-in-pp" style="margin-bottom: .25em">
+ This line will have its closing period hung outside
+ the right margin with a one point gutter\*[HANG \*[FWD 1p].]
+</span>
+If the hung character is a right double-quote, <kbd>"\[rq]"</kbd>
+must be used as the argument (that is, the <kbd>\[rq]</kbd>
+character surrounded by double-quotes). The double-quotes are
+required for all special characters of the form
+<kbd style="whitespace: nowrap">\[name]</kbd>.
+Horizontal motion, if any, must fall inside the double-quotes:
+<br/>
+<span class="pre-in-pp">
+ ...and they all lived happily ever after.\*[HANG "\*[FWD 1p]\[rq]"]
+</span>
+</p>
+
+<p>
+If the hung character is a hyphen,
+<kbd style="whitespace: nowrap"><span class="nobr">\*[HANG&nbsp;-]</span></kbd>
+must come at the end of an
+<a href="definitions.html#inputline">input line</a>.
+This restriction does not apply to other characters, which may come
+anywhere in an input line provided that, on output, the line breaks
+at the point you introduced the hung character.
+</p>
+
+<p>
+For the exceptionally fussy, <kbd>\*[HANG]</kbd> may also be used to
+improve visual centring; when text is centred, <kbd
+style="whitespace: nowrap">\*[HANG&nbsp;c]</kbd>
+hangs the character to the right of the centred line instead of the
+margin.
+</p>
+
+<div class="rule-long"><hr/></div>
+
+<!-- Navigation links -->
+<table style="width: 100%; margin-top: 12px;">
+<tr>
+ <td style="width: 33%;"><a href="toc.html">Back to Table of Contents</a></td>
+ <td style="width: 33%; text-align: center;"><a href="#top">Top</a></td>
+ <td style="width: 33%; text-align: right;"><a href="inlines.html#top">Next: Inline escapes</a></td>
+</tr>
+</table>
+
+</div>
+
+<div class="bottom-spacer"><br/></div>
+
+</body>
+</html>
diff --git a/contrib/mom/momdoc/graphical.html b/contrib/mom/momdoc/graphical.html
new file mode 100644
index 0000000..0f373b7
--- /dev/null
+++ b/contrib/mom/momdoc/graphical.html
@@ -0,0 +1,689 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+This file is part of groff, the GNU roff type-setting system.
+
+Copyright (C) 2004-2020 Free Software Foundation, Inc.
+Written by Peter Schaffter (peter@schaffter.ca).
+
+Permission is granted to copy, distribute and/or modify this document
+under the terms of the GNU Free Documentation License, Version 1.3 or
+any later version published by the Free Software Foundation; with no
+Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
+Texts.
+
+A copy of the Free Documentation License is included as a file called
+FDL in the main directory of the groff source package.
+-->
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+<head>
+ <meta http-equiv="content-type" content="text/html;charset=utf-8"/>
+ <title>Mom -- Graphical Objects</title>
+ <link rel="stylesheet" type="text/css" href="stylesheet.css" />
+</head>
+
+<body style="background-color: #f5faff;">
+
+<!-- ==================================================================== -->
+
+<div id="top" class="page">
+
+<!-- Navigation links -->
+<table style="width: 100%;">
+<tr>
+ <td><a href="toc.html">Back to Table of Contents</a></td>
+ <td style="text-align: right;"><a href="docprocessing.html#top">Next: Document processing</a></td>
+</tr>
+</table>
+
+<h1 class="docs">Graphical objects</h1>
+
+<div style="text-align: center;">
+<ul class="no-enumerator" style="margin-left: -2.5em;">
+ <li><a href="#intro-graphical">Introduction to graphical objects</a></li>
+ <li><a href="#behaviour">Graphical objects behaviour</a></li>
+ <li><a href="#order">Order of arguments</a></li>
+ <li><a href="#index-graphical">Index of graphical objects macros</a></li>
+</ul>
+</div>
+
+<div class="rule-medium"><hr/></div>
+
+<h2 id="intro-graphical" class="docs">Introduction to graphical objects</h2>
+
+<p>
+Groff has a number of
+<a href="definitions.html#inlines">inline escapes</a>
+for drawing rules, polygons, ellipses and splines. All begin with
+<kbd>\D</kbd> (presumably for &#8220;Draw&#8221;) and are documented
+in the groff info manual:
+<br/>
+<span class="pre-in-pp">
+ info groff \D
+</span>
+The escapes allow you to draw just about any simple graphical object
+you can think of, but owing to their syntax they&#8217;re not always easy
+to read, which can make tweaking them difficult. Additionally,
+while they perform in a <i>consistent</i> manner, they don&#8217;t
+always perform in an <i>expected</i> manner.
+</p>
+
+<p>
+Experience shows that the most common graphical elements typesetters
+need are rules (horizontal and vertical), boxes, and circles (or
+ellipses). For this reason, mom provides macros
+to draw these objects in an easy-to-understand way; the results are
+predictable, and mom&#8217;s syntax makes fixes or tweaks
+painless.
+</p>
+
+<p id="graphical-example">
+For example, if you want to draw a 2-inch square outline box at the left
+margin using groff&#8217;s <kbd>\D</kbd> escapes, it looks like this:
+<br/>
+<span class="pre-in-pp">
+ back up
+ by
+ weight
+ +-------+
+ | |
+ \D't 500'\h'-500u'\D'p 2i 0 0 2i -2i 0 0 -2i'
+ | | | |
+ +-------+ +------------------------+
+ set rule draw box, 1 line at a time
+ weight
+</span>
+
+Obviously, this isn&#8217;t very efficient for something as simple as a
+box.
+</p>
+
+<p>
+Here&#8217;s the same box, drawn with mom&#8217;s box drawing
+macro
+<kbd><a href="#dbx">DBX</a></kbd>:
+<br/>
+<span class="pre-in-pp">
+ left margin indent--+ +--box width
+ | |
+ .DBX .5 0 2i 2i
+ | |
+ rule weight--+ +--box depth
+ (in points)
+</span>
+</p>
+
+<p>
+Mom&#8217;s graphical object macros allow&mdash;in fact,
+require&mdash;giving the rule weight (&#8220;thickness&#8221;) for
+the object (or saying that you want it filled), an indent from the
+left margin where the object begins, the dimensions of the object,
+and optionally a colour for the object.
+</p>
+
+<p>
+There are no defaults for the arguments to mom&#8217;s graphical
+object macros, which means you must supply the arguments every time
+you invoke them.
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span>
+As stated above, mom only provides macros for commonly-used
+graphical objects (rules, boxes, circles). More complex objects
+(polygons, non-straight lines, splines) must be drawn using
+groff&#8217;s <kbd>\D</kbd> escapes.
+</p>
+</div>
+
+<h3 id="behaviour" class="docs">Graphical object behaviour</h3>
+
+<p>
+Mom&#8217;s graphical object macros all behave in the following,
+carved-in-stone ways:
+</p>
+<ol style="margin-top: -.5em; margin-bottom: -.5em;">
+ <li>Objects are drawn from the
+ <a href="definitions.html#baseline">baseline</a>
+ down, including horizontal rules.</li>
+ <li>Objects begin precisely at the left indent supplied as
+ an argument to the macro.</li>
+ <li>Objects are drawn from left to right.</li>
+ <li>Enclosed objects (boxes, circles) are drawn from the
+ perimeter <i>inward</i>.</li>
+ <li>Objects return to their horizontal/vertical point of origin.</li>
+</ol>
+
+<p>
+The consistency means that once you&#8217;ve mastered the very
+simple order of arguments that applies to invoking graphical
+object macros, you can draw objects with full confidence that you
+know exactly where they&#8217;re placed and how much room they
+occupy. Furthermore, because all return to their point of origin,
+you&#8217;ll know exactly where you are on the page.
+</p>
+
+<h3 id="order" class="docs">Order of arguments</h3>
+
+<p>
+The order of arguments to the graphical object macros is the same
+for every macro:
+</p>
+<ul style="margin-top: -.5em; margin-bottom: -.5em;">
+ <li>the rule weight
+ <ul style="margin-left: -.75em;">
+ <li>the single word <kbd>SOLID</kbd> may be used in place
+ of <kbd>weight</kbd> if you want boxes or circles filled</li>
+ </ul></li>
+ <li>the indent from the current left margin at which to begin
+ the object
+ </li>
+ <li>the width of the object if applicable</li>
+ <li>the depth of the object if applicable</li>
+ <li>the colour of the object (optional)</li>
+</ul>
+
+<div class="macro-list-container">
+<h3 id="index-graphical" class="macro-list">Graphical objects macros</h3>
+
+<ul class="macro-list">
+ <li><a href="#drh">DRH</a>
+ &ndash; horizontal rules</li>
+ <li><a href="#drv">DRV</a>
+ &ndash; vertical rules</li>
+ <li><a href="#dbx">DBX</a>
+ &ndash; box</li>
+ <li><a href="#dcl">DCL</a>
+ &ndash; circles or ellipses</li>
+</ul>
+</div>
+
+<!-- -DRH- -->
+
+<div class="macro-id-overline">
+<h3 id="drh" class="macro-id">Drawing horizontal rules</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>DRH</b> <kbd class="macro-args">&lt;none&gt; | &lt;weight&gt; &lt;indent&gt; &lt;width&gt; [&lt;colour&gt;]</kbd>
+</div>
+
+<p class="requires">
+&bull;&nbsp;
+the argument to <kbd class="normal">&lt;weight&gt;</kbd> is in
+<a href="definitions.html#picaspoints" class="normal">points</a>,
+but do <span class="normal">not</span> append the
+<a href="definitions.html#unitsofmeasure">unit of measure</a>,
+<kbd class="normal">p</kbd>
+<br/>
+&bull;&nbsp;
+<kbd class="normal">&lt;indent&gt;</kbd>
+and
+<kbd class="normal">&lt;width&gt;</kbd>
+require a unit of measure
+<br/>
+&bull;&nbsp;
+arithmetic expressions to
+<kbd class="normal">&lt;indent&gt;</kbd>
+and
+<kbd class="normal">&lt;width&gt;</kbd>
+must be surrounded by parentheses
+</p>
+
+<p>
+If all you want is to draw a rule from your current left
+margin to your current right margin (in other words, a &quot;full
+measure&quot; rule), you may invoke <kbd>.DRH</kbd> without any
+arguments.
+</p>
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span>
+DRH is the only graphical object macro that may be invoked
+without arguments. The weight (&#8220;thickness&#8221;) of
+the rule is determined by the argument you last gave the
+macro
+<a href="inlines.html#rule-weight">RULE_WEIGHT</a>.
+DRH, used this way, is exactly equivalent to entering the
+<a href="definitions.html#inlines">inline escape</a>
+<a href="inlines.html#inline-rule-mom"><kbd><span class="nobr">\*[RULE]</span></kbd></a>.
+</p>
+</div>
+
+<p style="margin-top: -.5em;">
+To draw horizontal rules of a specified width, you must, at
+a minimum, supply DRH with the arguments <kbd>weight,</kbd>
+<kbd>indent</kbd> (measured from the current left margin) and
+<kbd>width</kbd>.
+</p>
+
+<p>
+Optionally, you may give a <kbd>color</kbd> argument. The colour
+may be either one defined with
+<a href="color.html#newcolor">NEWCOLOR</a>,
+or a named X-color initialized with
+<a href="color.html#xcolor">XCOLOR</a>,
+or an X-color alias (again, initialized with XCOLOR).
+</p>
+
+<p>
+Say, for example, you want to draw a 1-1/4 point horizontal rule
+that starts 2 picas from the current left margin and runs for 3
+inches. To do so, you&#8217;d invoke <kbd>.DRH</kbd> like this:
+<br/>
+<span class="pre-in-pp">
+ weight width
+ | |
+ .DRH 1.25 2P 3i
+ |
+ indent
+</span>
+(Note that the rule weight argument, which is expressed in points,
+must not have the unit of measure <kbd>p</kbd> appended to it.)
+</p>
+
+<p>
+If, in addition, you want the rule blue:
+<br/>
+<span class="pre-in-pp">
+ .DRH 1.25 2P 3i blue
+</span>
+</p>
+
+<h3 class="docs">How mom handles the positioning of horizontal rules</h3>
+
+<p>
+Horizontal rules are drawn from left to right, and from the baseline
+down. &#8220;From the baseline down&#8221; means that if you request
+a rule with a weight of four points, the four points of rule fall
+entirely below the baseline.
+</p>
+
+<p>
+Furthermore, after the rule is drawn, mom returns you to the current
+left margin, at the same vertical position on the page as when DRH
+was invoked. In other words, DRH causes no movement on the page,
+either horizontal or vertical.
+</p>
+
+<!-- -DRV- -->
+
+<div class="macro-id-overline">
+<h3 id="drv" class="macro-id">Drawing vertical rules</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>DRV</b> <kbd class="macro-args">&lt;weight&gt; &lt;indent&gt; &lt;depth&gt; [&lt;colour&gt;]</kbd>
+</div>
+
+<p class="requires">
+&bull;&nbsp;
+the argument to <kbd class="normal">&lt;weight&gt;</kbd> is in
+<a href="definitions.html#picaspoints" class="normal">points</a>,
+but do <span class="normal">not</span> append the
+<a href="definitions.html#unitsofmeasure">unit of measure</a>,
+<kbd class="normal">p</kbd>
+<br/>
+&bull;&nbsp;
+<kbd class="normal">&lt;indent&gt;</kbd>
+and
+<kbd class="normal">&lt;depth&gt;</kbd>
+require a unit of measure
+<br/>
+&bull;&nbsp;
+arithmetic expressions to
+<kbd class="normal">&lt;indent&gt;</kbd>
+and
+<kbd class="normal">&lt;depth&gt;</kbd>
+must be surrounded by parentheses
+</p>
+
+<p>
+To draw vertical rules of a specified depth, you must, at
+a minimum, supply DRV with the arguments <kbd>weight,</kbd>
+<kbd>indent</kbd> (measured from the current left margin) and
+<kbd>depth</kbd>.
+</p>
+
+<p>
+Optionally, you may give a <kbd>color</kbd> argument. The colour
+may be either one defined with
+<a href="color.html#newcolor">NEWCOLOR</a>,
+or a named X-color initialized with
+<a href="color.html#xcolor">XCOLOR</a>,
+or an X-color alias (again, initialized with XCOLOR).
+</p>
+
+<p>
+Say, for example, you want to draw a 3/4-point vertical rule that
+starts 19-1/2 picas from the current left margin and has a depth of
+6 centimetres. To do so, you&#8217;d invoke <kbd>.DRV</kbd> like
+this:
+<br/>
+<span class="pre-in-pp">
+ weight depth
+ | |
+ .DRV .75 19P+6p 6c
+ |
+ indent
+</span>
+(Note that the rule weight argument, which is expressed in points,
+must not have the unit of measure <kbd>p</kbd> appended to it.)
+</p>
+
+<p>
+If, in addition, you want the rule red:
+<br/>
+<span class="pre-in-pp">
+ .DRV .75 19P+6p 6c red
+</span>
+</p>
+
+<h3 class="docs">How mom handles the positioning of vertical rules</h3>
+
+<p>
+Vertical rules are drawn from the baseline down, and from left to
+right. &quot;Left to right&quot; means that if you request a rule
+with a weight of four points, the four points of rule fall entirely
+to the right of the indent given to DRV.
+</p>
+
+<p>
+Furthermore, after the rule is drawn, mom returns you to the current
+left margin, at the same vertical position on the page as when DRV
+was invoked. In other words, DRV causes no movement on the page,
+either horizontal or vertical.
+</p>
+
+<!-- -DBX- -->
+
+<div class="macro-id-overline">
+<h3 id="dbx" class="macro-id">Drawing boxes</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>DBX</b> <kbd class="macro-args">&lt;weight&gt;|SOLID &lt;indent&gt; &lt;width&gt;|FULL_MEASURE &lt;depth&gt; [&lt;color&gt;]</kbd>
+</div>
+
+<p class="requires">
+&bull;&nbsp;
+the argument to <kbd class="normal">&lt;weight&gt;</kbd> is in
+<a href="definitions.html#picaspoints" class="normal">points</a>,
+but do <span class="normal">not</span> append the
+<a href="definitions.html#unitsofmeasure">unit of measure</a>
+<kbd class="normal">p</kbd>
+<br/>
+&bull;&nbsp;<kbd class="normal">&lt;indent&gt;</kbd>,
+<kbd class="normal">&lt;width&gt;</kbd>,
+and
+<kbd class="normal">&lt;depth&gt;</kbd>
+require a unit of measure
+<br/>
+&bull;&nbsp;
+arithmetic expressions to
+<kbd class="normal">&lt;indent&gt;</kbd>,
+<kbd class="normal">&lt;width&gt;</kbd>,
+and
+<kbd class="normal">&lt;depth&gt;</kbd>
+must be enclosed in parentheses.
+</p>
+
+<p>
+To draw boxes you must, at a minimum, supply DBX with the arguments
+<kbd>weight</kbd> or <kbd>SOLID</kbd>, <kbd>indent</kbd>,
+<kbd>width</kbd> or <kbd>FULL_MEASURE</kbd>, and <kbd>depth</kbd>.
+</p>
+
+<p>
+<kbd>weight</kbd> is the rule weight of outlined boxes, given in
+points but without the
+<a href="definitions.html#unitsofmeasure">unit of measure</a>
+<kbd>p</kbd> appended.
+</p>
+
+<p>
+If <kbd>SOLID</kbd> is given as the first argument, the box is
+filled rather than outlined and no <kbd>weight</kbd> argument should
+be supplied.
+</p>
+
+<p>
+<kbd>indent</kbd> is measured from the current left margin. If
+<kbd>FULL_MEASURE</kbd> is given, <kbd>indent</kbd> should be set to
+&#8220;0&#8221;.
+</p>
+
+<p>
+<kbd>width</kbd> is the width of the box with a
+<a href="definitions.html#unitsofmeasure">unit of measure</a>
+appended, caclculated from <kbd>indent</kbd> argument.
+</p>
+
+<p>
+If <kbd>FULL_MEASURE</kbd> is given instead of <kbd>width</kbd>,
+it circumvents having to calculate the width when left and/or right
+indents are in effect; mom draws the box from the current left
+margin to the current right margin. When no indents are in effect,
+<kbd>FULL_MEASURE</kbd> or <kbd>\n[.l]u</kbd>&#8212;the groff
+way of saying &#8220;the current line length&#8221;&#8212;have the
+same effect.
+</p>
+
+<p>
+Optionally, you may give a <kbd>color</kbd> argument. The colour
+may be either one defined with
+<a href="color.html#newcolor">NEWCOLOR</a>,
+or a named X-color initialized with
+<a href="color.html#xcolor">XCOLOR</a>,
+or an X-color alias (again, initialized with XCOLOR).
+</p>
+
+<p>
+Say, for example, you want to draw a 1/2 point outline box that
+starts one inch from the current left margin and has the dimensions
+12 picas x 6 picas. To do so, you&#8217;d invoke <kbd>.DBX</kbd>
+like this:
+<br/>
+<span class="pre-in-pp">
+ indent depth
+ | |
+ .DBX .5 1i 12P 6P
+ | |
+ weight width
+</span>
+(Note that the box weight argument, which is expressed in points,
+must not have the unit of measure <kbd>p</kbd> appended to it.)
+</p>
+
+<p>
+If you want the same box, but solid (&#8220;filled&#8221;) rather
+than drawn as an outline:
+<br/>
+<span class="pre-in-pp">
+ .DBX SOLID 1i 12P 6P
+</span>
+Additionally, if you want the box green:
+<br/>
+<span class="pre-in-pp">
+ .DBX .5 1i 12P 6P green
+</span>
+or
+<span class="pre-in-pp">
+ .DBX SOLID 1i 12P 6P green
+</span>
+</p>
+
+<h3 class="docs">How mom handles the positioning of boxes</h3>
+
+<p>
+Boxes are drawn from the baseline down, from left to right, and
+from the perimeter <i>inward</i>. &#8220;From the perimeter
+inward&#8221; means that if you request a box weight of six points,
+the 6-point rules used to draw the outline of the box fall entirely
+<i>within</i> the dimensions of the box.
+</p>
+
+<p>
+Furthermore, after the box is drawn, mom returns you to the current
+left margin, at the same vertical position on the page as when DBX
+was invoked. In other words, DBX causes no movement on the page,
+either horizontal or vertical.
+</p>
+
+<!-- -DCL- -->
+
+<div class="macro-id-overline">
+<h3 id="dcl" class="macro-id">Drawing circles (ellipses)</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>DCL</b> <kbd class="macro-args">&lt;weight&gt;|SOLID &lt;indent&gt; &lt;width&gt;|FULL_MEASURE &lt;depth&gt; [&lt;color&gt;]</kbd>
+</div>
+
+<p class="requires">
+&bull;&nbsp;
+the argument to <kbd class="normal">&lt;weight&gt;</kbd> is in
+<a href="definitions.html#picaspoints" class="normal">points</a>,
+but do <span class="normal">not</span> append the
+<a href="definitions.html#unitsofmeasure">unit of measure</a>
+<kbd class="normal">p</kbd>
+<br/>
+&bull;&nbsp;<kbd class="normal">&lt;indent&gt;</kbd>,
+<kbd class="normal">&lt;width&gt;</kbd>,
+and
+<kbd class="normal">&lt;depth&gt;</kbd>
+require a unit of measure
+<br/>
+&bull;&nbsp;
+arithmetic expressions to
+<kbd class="normal">&lt;indent&gt;</kbd>,
+<kbd class="normal">&lt;width&gt;</kbd>,
+and
+<kbd class="normal">&lt;depth&gt;</kbd>
+must be enclosed in parentheses.
+</p>
+
+<p>
+To draw circles you must, at a minimum, supply DCL with the arguments
+<kbd>weight</kbd> or <kbd>SOLID</kbd>, <kbd>indent</kbd>,
+<kbd>width</kbd> or <kbd>FULL_MEASURE</kbd>, and <kbd>depth</kbd>.
+</p>
+
+<p>
+<kbd>weight</kbd> is the rule weight of outlined circles, given in
+points but without the unit of measure
+<a href="definitions.html#unitsofmeasure">unit of measure</a>
+<kbd>p</kbd> appended.
+</p>
+
+<p>
+If <kbd>SOLID</kbd> is given as the first argument, the circle is
+filled rather than outlined and no <kbd>weight</kbd> argument should
+be supplied.
+</p>
+
+<p>
+<kbd>indent</kbd> is measured from the current left margin. If
+<kbd>FULL_MEASURE</kbd> is given, <kbd>indent</kbd> should be set to
+&#8220;0&#8221;.
+</p>
+
+<p>
+<kbd>width</kbd> is the width of the circle with a
+<a href="definitions.html#unitsofmeasure">unit of measure</a>
+appended, caclculated from <kbd>indent</kbd> argument.
+</p>
+
+<p>
+If <kbd>FULL_MEASURE</kbd> is given instead of <kbd>width</kbd>,
+it circumvents having to calculate the width when left and/or right
+indents are in effect; mom draws the circle from the current left
+margin to the current right margin. When no indents are in effect,
+<kbd>FULL_MEASURE</kbd> or <kbd>\n[.l]u</kbd>&#8212;the groff
+way of saying &#8220;the current line length&#8221;&#8212;have the
+same effect.
+</p>
+
+<p>
+Optionally, you may give a <kbd>color</kbd> argument. The colour
+may be either one defined with
+<a href="color.html#newcolor">NEWCOLOR</a>,
+or a named X-color initialized with
+<a href="color.html#xcolor">XCOLOR</a>,
+or an X-color alias (again, initialized with XCOLOR).
+</p>
+
+<p>
+Say, for example, you want to draw a 1/2 point outline circle that
+starts one inch from the current left margin and has the dimensions
+12 picas x 6 picas. To do so, you&#8217;d invoke <kbd>.DCL</kbd>
+like this:
+<br/>
+<span class="pre-in-pp">
+ indent depth
+ | |
+ .DCL .5 1i 12P 6P
+ | |
+ weight width
+</span>
+(Note that the circle weight argument, which is expressed in points,
+must not have the unit of measure <kbd>p</kbd> appended to it.)
+</p>
+
+<p>
+If you want the same circle, but solid (&#8220;filled&#8221;) rather
+than drawn as an outline:
+<br/>
+<span class="pre-in-pp">
+ .DCL SOLID 1i 12P 6P
+</span>
+Additionally, if you want the circle green:
+<br/>
+<span class="pre-in-pp">
+ .DCL .5 1i 12P 6P green
+</span>
+or
+<span class="pre-in-pp">
+ .DCL SOLID 1i 12P 6P green
+</span>
+</p>
+
+
+<h3 class="docs">How mom handles the positioning of circles (ellipses)</h3>
+
+<p>
+Circles (ellipses) are drawn from the baseline down, from left
+to right, and from the perimeter <i>inward</i>. &#8220;From the
+perimeter inward&#8221; means that if you request a circle weight of
+six points, the 6-point rule used to draw the outline of the circle
+or ellipse falls entirely <i>within</i> the dimensions of the
+circle or ellipse.
+</p>
+
+<p>
+Furthermore, after the circle is drawn, mom returns you to the
+current left margin, at the same vertical position on the page as
+when DCL was invoked. In other words, DCL causes no movement on the
+page, either horizontal or vertical.
+</p>
+
+<div class="rule-long"><hr/></div>
+
+<!-- Navigation links -->
+<table style="width: 100%; margin-top: 12px;">
+<tr>
+ <td style="width: 33%;"><a href="toc.html">Back to Table of Contents</a></td>
+ <td style="width: 33%; text-align: center;"><a href="#top">Top</a></td>
+ <td style="width: 33%; text-align: right;"><a href="docprocessing.html#top">Next: Document processing</a></td>
+</tr>
+</table>
+
+</div>
+
+<div class="bottom-spacer"><br/></div>
+
+</body>
+</html>
diff --git a/contrib/mom/momdoc/headfootpage.html b/contrib/mom/momdoc/headfootpage.html
new file mode 100644
index 0000000..1c11ab1
--- /dev/null
+++ b/contrib/mom/momdoc/headfootpage.html
@@ -0,0 +1,2341 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+This file is part of groff, the GNU roff type-setting system.
+
+Copyright (C) 2004-2020 Free Software Foundation, Inc.
+Written by Peter Schaffter (peter@schaffter.ca).
+
+Permission is granted to copy, distribute and/or modify this document
+under the terms of the GNU Free Documentation License, Version 1.3 or
+any later version published by the Free Software Foundation; with no
+Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
+Texts.
+
+A copy of the Free Documentation License is included as a file called
+FDL in the main directory of the groff source package.
+-->
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+<head>
+ <meta http-equiv="content-type" content="text/html;charset=utf-8"/>
+ <title>Mom -- Document processing, page headers/footers and pagination</title>
+ <link rel="stylesheet" type="text/css" href="stylesheet.css" />
+</head>
+
+<body style="background-color: #f5faff;">
+
+<!-- ==================================================================== -->
+
+<div id="top" class="page">
+
+<!-- Navigation links -->
+<table style="width: 100%;">
+<tr>
+ <td><a href="toc.html">Back to Table of Contents</a></td>
+ <td style="text-align: right;"><a href="rectoverso.html#top">Next: Recto/verso printing, collating</a></td>
+</tr>
+</table>
+
+<h1 class="docs">Page headers/footers, pagination</h1>
+
+<div style="text-align: center;">
+<ul class="no-enumerator" style="margin-left: -2.5em;">
+ <li><a href="#headfootpage-intro">Introduction &ndash; VERY IMPORTANT; read me!</a></li>
+ <li> <a href="#pagination-note">An important note on pagination</a></li>
+ <li><a href="#description-general">General description of headers/footers</a></li>
+ <li><a href="#header-style">Default specs for headers/footers</a></li>
+ <li><a href="#vertical-spacing">Vertical placement and spacing of headers/footers</a></li>
+</ul>
+</div>
+
+<div class="rule-medium"><hr/></div>
+
+<h2 id="toc-doc-head-foot-page" class="docs" style="text-align: center;">Table of contents</h2>
+
+<h3 class="toc toc-docproc-header" style="margin-top: 1em;"><a class="header-link" href="#headfoot-management">Managing page headers and footers</a></h3>
+<ul class="toc-docproc" style="margin-top: .5em;">
+ <li><a href="#headers">HEADERS</a> &ndash; on or off</li>
+ <li><a href="#footers">FOOTERS</a> &ndash; on or off</li>
+ <li><a href="#footer-on-first-page">FOOTER_ON_FIRST_PAGE</a></li>
+</ul>
+<h3 class="toc toc-docproc-header"><a class="header-link" href="#headfoot-control">Control macros for headers/footers</a></h3>
+ <ul class="toc-docproc" style="margin-top: .5em;">
+ <li><a href="#index-headfoot-control">Header/footer control macros and defaults</a>
+ <ul class="toc-docproc">
+ <li><a href="#hdrftr-strings">Header/footer strings</a>
+ <ul class="toc-docproc">
+ <li><a href="#reserved-strings">Using mom&#8217;s reserved strings in header/footer definitions</a> (TITLE, AUTHOR, etc.)</li>
+ </ul></li>
+ <li><a href="#hdrftr-style">Header/footer style</a>
+ <ul class="toc-docproc">
+ <li><a href="#hdrftr-style-global">Global changes</a></li>
+ <li><a href="#hdrftr-style-part">Part-by-part changes</a></li>
+ </ul></li>
+ <li><a href="#hdrftr-vertical">Vertical placement and spacing of headers/footers</a>
+ <ul class="toc-docproc">
+ <li><a href="#hdrftr-margin">HEADER_MARGIN&nbsp;/&nbsp;FOOTER_MARGIN</a>
+ <ul class="toc-docproc no-enumerator" style="margin-left: -2em;">
+ <li>&ndash;&nbsp;<a href="#footer-margin">Important: FOOTER_MARGIN and bottom margins</a></li>
+ </ul></li>
+ </ul></li>
+ <li><a href="#hdrftr-separator">The header/footer separator rule</a>
+ <ul class="toc-docproc">
+ <li><a href="#hdrftr-rule">HEADER_RULE</a> &ndash; on or off</li>
+ <li><a href="#hdrftr-rule-weight">HEADER_RULE_WEIGHT</a> &ndash; weight of the rule</li>
+ <li><a href="#hdrftr-rule-gap">HEADER_RULE_GAP</a> &ndash; distance of rule from header/footer</li>
+ <li><a href="#hdrftr-rule-color">HEADER_RULE_COLOR</a> &ndash; colour of the header/footer rule</li>
+ </ul></li>
+ </ul></li>
+</ul>
+<h3 class="toc toc-docproc-header"><a class="header-link" href="#userdef-hdrftr-rv">User-defined, single string recto/verso headers/footers</a></h3>
+<ul class="toc-docproc" style="margin-top: .5em;">
+ <li><a href="#hdrftr-recto">HEADER_RECTO, HEADER_VERSO</a>
+ <ul style="margin-left: -.5em">
+ <li><a href="#userdef-hdrftr">User-defined, single string headers/footers (no recto/verso)</a></li>
+ <li><a href="#padding-hdrftr">Padding the header-recto/header-verso string</a></li>
+ </ul></li>
+</ul>
+<h3 class="toc toc-docproc-header"><a class="header-link" href="#headers-and-footers-intro">Headers and footers on the same page</a></h3>
+<h3 class="toc toc-docproc-header" style="margin-top: .75em;"><a class="header-link" href="#pagination-intro">Pagination</a></h3>
+<ul class="toc-docproc" style="margin-top: .5em;">
+ <li><a href="#index-pagination">Pagination macros</a></li>
+ <li><a href="#index-paginate-control">Pagination control macros and defaults</a></li>
+</ul>
+<h3 class="toc toc-docproc-header"><a class="header-link" href="#blank-pages">Inserting blank pages into a document</a></h3>
+
+<div class="rule-medium" style="margin-top: 1.5em;"><hr/></div>
+
+<h2 id="headfootpage-intro" class="macro-group">Managing page headers and footers</h2>
+
+<div id="headerfooter" class="box-tip">
+<p class="tip-top">
+<span class="note">Note:</span>
+Because headers and footers are virtually identical, this
+documentation addresses itself only to headers. In all cases,
+unless otherwise noted, descriptions of headers describe footers as
+well.
+</p>
+
+<p class="tip-bottom">
+Furthermore, any
+<a href="definitions.html#controlmacro">control macro</a>
+that begins with HEADER_ may be used to control footers, simply by
+replacing HEADER_ with FOOTER_.
+</p>
+</div>
+
+<p style="margin-top: -.75em;">
+<a href="definitions.html#header">Headers</a>
+and
+<a href="definitions.html#footer">footers</a>,
+as defined in the section
+<a href="definitions.html#mom">Mom&#8217;s Document Processing Terms</a>,
+are those parts of a document that contain information about the document
+itself which appear in the margins either above or below
+<a href="definitions.html#running">running text</a>.
+They are, in all respects but two, identical. The differences are:
+</p>
+<ol style="margin-top: -.5em; margin-bottom: -.5em;">
+ <li>headers appear in the margin <i>above</i> running text while
+ footers appear in the margin <i>beneath</i> running text;
+ </li>
+ <li>the (optional) rule that separates headers from running
+ text appears <i>below</i> the header while
+ the (optional) rule that separates footers from running
+ text appears <i>above</i> the footer.
+ </li>
+</ol>
+
+<div id="pagination-note" class="box-tip" style="margin-top: 1.5em;">
+<p class="tip">
+<span class="note">Note:</span>
+While the single page number that mom generates in either the top
+or bottom margin above or below running text is technically a kind
+of header/footer, mom and this documentation treat it as a separate
+page element.
+</p>
+</div>
+
+<div id="author-note" class="box-tip">
+<p class="tip">
+<span class="note">Author&#8217;s note:</span>
+Left to their own devices (i.e. if you&#8217;re happy with the way
+mom does things by default), headers are something you never have to
+worry about. You can skip reading this section entirely. But if
+you want to change them, be advised that headers have more macros to
+control their appearance than any other document element. The text
+of this documentation becomes correspondingly dense at this point.
+</p>
+</div>
+
+<h3 id="description-general" class="docs">General description of headers/footers</h3>
+
+<p>
+Headers comprise three distinct parts: a left part, a centre part,
+and a right part. Each part contains text (a &#8220;string&#8221;)
+that identifies some aspect of the document as a whole.
+</p>
+
+<p>
+The left part (&#8220;header-left&#8221;) lines up with the
+document&#8217;s left margin. The centre part (&#8220;header
+centre&#8221;) is centred on the document&#8217;s line length.
+The right part (&#8220;header-right&#8221;) lines up with the
+document&#8217;s right margin. Not all parts need contain a string,
+and if you don&#8217;t want headers at all, you can turn them off
+completely.
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note to groff experts:</span>
+Although mom&#8217;s headers resemble the three-part titles
+generated by <kbd>.tl</kbd>, they&#8217;re in no way related to it,
+nor based upon it. <kbd>.tl</kbd> is not used at all in mom.
+</p>
+</div>
+
+<p>
+Normally, mom fills headers with strings appropriate to the document
+type selected by
+<a href="docprocessing.html#doctype">DOCTYPE</a>,
+with the author left, the document title right, and chapter or
+document type information in the centre. You can, however, supply
+whatever strings you like&mdash;including page numbers&mdash;to go
+in any part of headers. What&#8217;s more, you can set the family,
+font, size, colour and capitalization style (caps, caps/lower-case,
+or smallcaps) for each header part individually.
+</p>
+
+<p>
+By default, mom prints a horizontal rule beneath headers to separate
+them visually from running text. In the case of footers, the rule
+is above. You can increase or decrease the space between the header
+and the rule if you like (with
+<kbd><a href="#hdrftr-rule-gap">HEADER_RULE_GAP</a></kbd>),
+or remove it completely.
+</p>
+
+<h3 id="header-style" class="docs">Default specs for headers/footers</h3>
+
+<p>
+Mom makes small type adjustments to each part of the header (left,
+centre, right) to achieve an aesthetically pleasing result. The
+defaults are listed below. (The strings mom puts by default in each
+part are explained in
+<a href="docprocessing.html#doctype">DOCTYPE</a>.)
+</p>
+
+<div class="defaults-container" style="padding-bottom: 8px;">
+<p class="defaults" style="padding-top: 6px; padding-bottom: 6px; text-align: center;">
+<i>Note:</i> Except for capitalization (all caps or caps/lower-case),
+these defaults apply only to
+<a href="docprocessing.html#printstyle">PRINTSTYLE&nbsp;<kbd>TYPESET</kbd></a>.
+</p>
+<span class="pre defaults">
+TYPE SPEC HEADER LEFT HEADER CENTER HEADER RIGHT
+--------- ----------- ------------- ------------
+Family document default document default document default
+Font roman italic roman
+Colour (black) (black) (black)
+All caps no no yes
+Size* -.5 (points) -.5 (points) -2 (points)
+ (-2 if all caps) (-2 if all caps) (-.5 if not all caps)
+
+*Relative to the point size of <a href="definitions.html#running">running text</a>
+</span>
+</div>
+
+<p style="margin-top: -1.5em;">
+You can, of course, change any of the defaults using the appropriate
+control macros. And should you wish to design headers from the
+ground up, mom has a special macro
+<a href="#hdrftr-plain">HEADER_PLAIN</a>
+that removes all type adjustments to headers. The
+type specs for running text are used instead, providing a simple
+reference point for any alterations you want to make to the family,
+font, size, and capitalization style of any header part.
+</p>
+
+<h3 id="vertical-spacing" class="docs">Vertical placement and spacing of headers/footers</h3>
+
+<p>
+As explained in the section,
+<a href="docprocessing.html#behaviour">Typesetting macros during document processing</a>,
+the top and bottom margins of a mom document are the vertical start
+and end positions of
+<a href="definitions.html#running">running text</a>,
+not the vertical positions of headers or footers, which, by definition,
+appear in the margins above (or below) running text.
+</p>
+
+<p>
+The vertical placement of headers is controlled by the macro
+<a href="#hdrftr-margin">HEADER_MARGIN</a>,
+which establishes the
+<a href="definitions.html">baseline</a>
+position of headers relative to the top edge of the page. The
+header rule, whose position is relative to the header itself, is
+controlled by a separate macro.
+</p>
+
+<p>
+FOOTER_MARGIN is the counterpart to HEADER_MARGIN, and establishes
+the baseline position of footers relative to the bottom edge of the
+page.
+</p>
+
+<p>
+The distance between headers and the start
+of running text can be controlled with the macro
+<a href="#hdrftr-gap">HEADER_GAP</a>,
+effectively making HEADER_MARGIN + HEADER_GAP the top margin of
+running text unless you give mom a literal top margin (with
+<a href="typesetting.html#t-margin">T_MARGIN</a>)
+or
+<a href="typesetting.html#page">PAGE</a>,
+in which case she ignores HEADER_GAP and begins the running text at
+whatever top margin you give.
+</p>
+
+<p>
+FOOTER_GAP and
+<a href="typesetting.html#b-margin">B_MARGIN</a>
+work similarly, except they determine where running text <i>ends</i>
+on the page. (See
+<a href="#footer-margin">Important &ndash; footer margin and bottom margins</a>
+for a warning about possible conflicts between the footer margin and
+the bottom margin.)
+</p>
+
+<p>
+Confused? Mom apologizes. It&#8217;s really quite simple. By
+default, mom sets headers <span class="nobr">4-1/2</span>
+<a href="definitions.html#picaspoints">picas</a>
+down from the top of the page and begins the running text 3 picas
+(the HEADER_GAP) beneath that, which means the effective top margin
+of the running text is <span class="nobr">7-1/2</span> picas (visually approx. 1
+inch). However, if you give mom a literal top margin (with
+<a href="typesetting.html#t-margin">T_MARGIN</a>),
+she ignores the HEADER_GAP and starts the running text at whatever
+top margin you give.
+</p>
+
+<p>
+Footers are treated similarly. Mom sets footers 3 picas up from the
+bottom of the page, and interrupts the processing of running text 3
+picas (the FOOTER_GAP) above that (again, visually approx. 1 inch).
+However, if you give mom a literal bottom margin (with
+<a href="typesetting.html#b-margin">B_MARGIN</a>),
+she ignores the FOOTER_GAP and interrupts the processing of running
+text at whatever bottom margin you give.
+</p>
+
+<p>
+If mom is paginating your document (she does, by default, at the
+bottom of each page), the vertical spacing and placement of page
+numbers, whether at the top or the bottom of the page, is managed
+exactly as if the page numbers were headers (or footers), and are
+controlled by the same macros. See
+<a href="#index-paginate-control">Pagination control</a>.
+</p>
+
+<div class="rule-short"><hr/></div>
+
+<!-- ======================================================================== -->
+
+<h2 id="headfoot-management" class="macro-group">Managing headers/footers</h2>
+
+<p>
+The following are the basic macros for turning
+<a href="definitions.html#header">headers</a>
+or
+<a href="definitions.html#footer">footers</a>
+on or off. They should be invoked prior to
+<a href="docprocessing.html#start">START</a>.
+</p>
+
+<p>
+By default, mom prints page headers. If you turn
+them off, she will begin the
+<a href="definitions.html#running">running text</a>
+on each page with a default top margin of 6
+<a href="definitions.html#picaspoints">picas</a>
+unless you have requested a different top margin (with
+<a href="typesetting.html#t-margin">T_MARGIN</a>)
+prior to
+<a href="docprocessing.html#start">START</a>.
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span>
+<a href="#headers">HEADERS</a>
+and
+<a href="#footers">FOOTERS</a>
+are mutually exclusive. If headers are on, footers (but not
+bottom-of-page numbering) are automatically turned off. Equally,
+if footers are on, headers (but not top-of-page numbering) are
+automatically turned off. Thus, if you&#8217;d prefer footers in a
+document, you need only invoke
+<kbd><a href="#footers">.FOOTERS</a></kbd>;
+there&#8217;s no need to turn headers off first.
+</p>
+</div>
+
+<p style="margin-top: -.5em">
+If you need both headers and footers, there&#8217;s a special macro
+<a href="#headers-and-footers">HEADERS_AND_FOOTERS</a>
+that allows you to set it up.
+</p>
+
+<div class="macro-list-container">
+<h3 id="index-hdrftr" class="macro-list">Header/footer macros</h3>
+<ul class="macro-list">
+ <li><a href="#headers">HEADERS</a> &ndash; on or off</li>
+ <li><a href="#footers">FOOTERS</a> &ndash; on or off</li>
+ <li><a href="#footer-on-first-page">FOOTER_ON_FIRST_PAGE</a></li>
+ <li><a href="#userdef-hdrftr-rv">User-defined, single string recto/verso headers/footers</a>
+ <ul>
+ <li><a href="#hdrftr-rectoverso">HEADER_RECTO, HEADER_VERSO</a>
+ <ul style="margin-left: -.5em;">
+ <li><a href="#userdef-hdrftr">User-defined, single string headers/footers (no recto/verso)</a></li>
+ </ul></li>
+ <li><a href="#reserved-strings">Using mom&#8217;s reserved strings in header/footer definitions</a>
+ (title, author, etc.)
+ </li>
+ </ul></li>
+ <li><a href="#headers-and-footers-intro">HEADERS_AND_FOOTERS</a> &ndash;
+ putting both headers and footers on document pages
+ </li>
+ <li><a href="#headfoot-control">Header and footer control macros</a></li>
+</ul>
+</div>
+
+<!-- -HEADERS- -->
+
+<div class="macro-id-overline">
+<h3 class="macro-id">Headers</h3>
+</div>
+
+<div id="headers" class="box-macro-args">
+Macro: <b>HEADERS</b> <kbd class="macro-args">toggle</kbd>
+</div>
+
+<p>
+<a href="definitions.html#header">Page headers</a>
+are on by default. If you don&#8217;t want them, turn them off by
+invoking <kbd>.HEADERS</kbd> with any argument (<kbd>OFF</kbd>,
+<kbd>QUIT</kbd>, <kbd>END</kbd>, <kbd>X</kbd>...), e.g.
+<br/>
+<span class="pre-in-pp">
+ .HEADERS OFF
+</span>
+</p>
+
+<p>
+<b>NOTE:</b> HEADERS automatically
+disables
+<a href="definitions.html#footer">footers</a>
+but not the page numbers that normally appear at the bottom of the
+page. If you want both headers and footers, you must use the macro
+<a href="#headers-and-footers">HEADERS_AND_FOOTERS</a>.
+</p>
+
+<p>
+<b>ADDITIONAL NOTE:</b> If HEADERS are OFF, mom&#8217;s normal top
+margin for
+<a href="definitions.html#running">running text</a>
+(7.5
+<a href="definitions.html#picaspoints">picas</a>)
+changes to 6 picas (visually approx. 1 inch). This does NOT apply
+to the situation where footers have been explicitly turned on
+(with
+<kbd><a href="#footers">FOOTERS</a></kbd>).
+Explicitly invoking footers moves page numbering to the
+top of the page, where its placement and spacing are the same as
+for headers (i.e. the top margin of running text remains 7.5
+picas.)
+</p>
+
+<!-- -FOOTERS- -->
+
+<div class="macro-id-overline">
+<h3 id="footers" class="macro-id">Footers</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>FOOTERS</b> <kbd class="macro-args">toggle</kbd>
+</div>
+
+<p>
+<a href="definitions.html#footer">Page footers</a>
+are off by default. If you want them instead of
+<a href="definitions.html#header">headers</a>,
+turn them on by invoking
+<kbd>.FOOTERS</kbd> without an argument, e.g.
+<br/>
+<span class="pre-in-pp">
+ .FOOTERS
+</span>
+FOOTERS automatically disables headers, and
+mom shifts the placement of page numbers from their
+normal position at page bottom to the top of the page.
+</p>
+
+<p>
+<b>NOTE:</b> If you want both headers and footers, you must use the
+macro
+<a href="#headers-and-footers">HEADERS_AND_FOOTERS</a>.
+</p>
+
+<p>
+<b>NOTE:</b> By default, when footers are on,
+mom does not print a page number on the first
+page of a document, nor on first pages after
+<a href="rectoverso.html#collate">COLLATE</a>.
+If you don&#8217;t want this behaviour, you can change it with
+<kbd><a href="#pagenum-on-first-page">PAGENUM_ON_FIRST_PAGE</a></kbd>.
+</p>
+
+<!-- -FOOTER_ON_FIRST_PAGE- -->
+
+<div class="macro-id-overline">
+<h3 id="footer-on-first-page" class="macro-id">Footer on first page</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>FOOTER_ON_FIRST_PAGE</b> <kbd class="macro-args">toggle</kbd>
+</div>
+
+<p>
+If you invoke
+<a href="#footers"><kbd>.FOOTERS</kbd></a>,
+mom, by default, does not print a footer on the
+first page of the document. (The
+<a href="definitions.html">docheader</a>
+on page 1 makes it redundant.) However, should you wish a footer on
+page 1, invoke <kbd>.FOOTER_ON_FIRST_PAGE</kbd> without any argument.
+</p>
+
+<div class="rule-short"><hr/></div>
+
+<h2 id="headfoot-control" class="macro-group">Control macros for headers/footers</h2>
+
+<p>
+Virtually every part of headers (and footers; see the note on how
+<a href="#headerfooter">&#8220;headers&#8221; means &#8220;footers&#8221;</a>
+in the
+<a href="#headfootpage-intro">Introduction</a>
+to headers/footers) can be designed to your own specifications.
+</p>
+
+<div class="macro-list-container">
+<h3 id="index-headfoot-control" class="macro-list">Header/footer control macros and defaults</h3>
+
+<ol style="margin-top: -1.5em; padding-bottom: 6px;">
+ <li><a href="#hdrftr-strings">Header/footer strings</a>
+ <ul style="margin-left: -.5em;">
+ <li><a href="#hdrftr-left">HEADER_LEFT</a></li>
+ <li><a href="#hdrftr-centre">HEADER_CENTER</a>
+ <ul style="margin-left: -.5em;">
+ <li><a href="#hdrftr-centre-pad">Padding the header-centre string</a></li>
+ </ul></li>
+ <li><a href="#hdrftr-right">HEADER_RIGHT</a></li>
+ <li><a href="#reserved-strings">Using mom&#8217;s reserved strings in header/footer definitions</a>
+ (e.g. <kbd>\E*[$TITLE]</kbd> when you want
+ the title, <kbd>\E*[$AUTHOR]</kbd> when you want the author, etc.)
+ </li>
+ <li><a href="#page-number-symbol">Replacing header-left, centre or right with the page number</a></li>
+ <li><a href="#page-number-incl">Including the page number in header-left, centre or right</a></li>
+ </ul></li>
+ <li><a href="#hdrftr-style">Header/footer style</a>
+ <ul style="margin-left: -.5em;">
+ <li><a href="#hdrftr-style-global">Global changes</a>
+ <ul style="margin-left: -.5em;">
+ <li><a href="#hdrftr-plain">HEADER_PLAIN</a> &ndash; disable default adjustments to header parts</li>
+ <li><a href="#hdrftr-global-family">HEADER_FAMILY</a> &ndash; family for entire header</li>
+ <li><a href="#hdrftr-global-size">HEADER_SIZE</a> &ndash; size for entire header</li>
+ <li><a href="#hdrftr-color">HEADER_COLOR</a> &ndash; colourize the header</li>
+ </ul></li>
+ <li><a href="#hdrftr-style-part">Part-by-part changes</a>
+ <ul style="margin-left: -.5em;">
+ <li><a href="#_family">_FAMILY</a> &ndash; left, centre or right family</li>
+ <li><a href="#_font">_FONT</a> &ndash; left, centre or right font</li>
+ <li><a href="#_size">_SIZE</a> &ndash; left, centre or right size</li>
+ <li><a href="#_caps">_CAPS</a> &ndash; left, centre or right all caps</li>
+ <li><a href="#_smallcaps">_SMALLCAPS</a> &ndash; left, centre or right smallcaps</li>
+ <li><a href="#_color">_COLOR</a> &ndash; left, centre or right colour</li>
+ </ul></li>
+ </ul></li>
+ <li><a href="#hdrftr-vertical">Header/footer vertical placement and spacing</a>
+ <ul style="margin-left: -.5em;">
+ <li><a href="#hdrftr-margin">HEADER_MARGIN</a></li>
+ <li><a href="#hdrftr-gap">HEADER_GAP</a></li>
+ </ul></li>
+ <li><a href="#hdrftr-separator">Header/footer separator rule</a>
+ <ul style="margin-left: -.5em;">
+ <li><a href="#hdrftr-rule">HEADER_RULE</a></li>
+ <li><a href="#hdrftr-rule-weight">HEADER_RULE_WEIGHT</a></li>
+ <li><a href="#hdrftr-rule-gap">HEADER_RULE_GAP</a></li>
+ <li><a href="#hdrftr-rule-color">HEADER_RULE_COLOR</a></li>
+ </ul></li>
+</ol>
+</div>
+
+<!-- -HDRFTR_STRINGS- -->
+
+<h4 id="hdrftr-strings" class="docs">1. Header/footer strings</h4>
+
+<div id="hdrftr-left" class="box-macro-args" style="margin-top: 1em;">
+&#8221;Macro: <b>HEADER_LEFT</b> <kbd class="macro-args">&#8220;&lt;text of header-left&gt; | #</kbd>
+</div>
+
+<div id="hdrftr-centre" class="box-macro-args" style="margin-top: 1em;">
+&#8221;Macro: <b>HEADER_CENTER</b> <kbd class="macro-args">&#8220;&lt;text of header-centre&gt; | #</kbd>
+</div>
+
+<div id="hdrftr-right" class="box-macro-args" style="margin-top: 1em;">
+&#8221;Macro: <b>HEADER_RIGHT</b> <kbd class="macro-args">&#8220;&lt;text of header-right&gt; | #</kbd>
+</div>
+
+<p>
+To change the text (the &#8220;string&#8221;) of the left, centre,
+or right part of headers, invoke the appropriate macro, above,
+with the string you want. For example, mom, by default, prints
+the document&#8217;s author in the header-left position. If your
+document has, say, two authors, and you want both their names to
+appear header-left, change HEADER_LEFT like this:
+<br/>
+<span class="pre-in-pp">
+ .HEADER_LEFT "R. Stallman, E. Raymond"
+</span>
+</p>
+
+<p>
+Because the arguments to HEADER_LEFT, _CENTER,
+and _RIGHT are
+<a href="definitions.html#stringargument">string arguments</a>,
+they must be enclosed in double-quotes.
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span>
+Replace HEADER_, above, with FOOTER_ to change the strings in
+footers.
+</p>
+</div>
+
+<h3 id="hdrftr-centre-pad" class="docs">Padding the header/footer centre string</h3>
+
+<div class="box-macro-args" style="margin-top: 1em;">
+Macro: <b>HEADER_CENTER_PAD</b> <kbd class="macro-args">LEFT | RIGHT &lt;amount of space by which to pad centre string left or right&gt;</kbd>
+</div>
+
+<p class="requires">
+&bull;&nbsp;Requires a <a href="definitions.html#unitofmeasure">unit of measure</a>
+</p>
+
+<p>
+By default, mom centres the header-centre string on the line length
+in effect for page headers.
+</p>
+
+<p>
+In some cases, notably when the header-left or header-right
+strings are particularly long, the effect isn&#8217;t pretty. The
+offendingly long header-left or right crowds, or even overprints,
+the header-centre. That&#8217;s where HEADER_CENTER_PAD comes
+in. With a bit of experimentation (yes, you have to preview the
+document), you can use HEADER_CENTER_PAD to move the header-centre
+string left or right until it looks acceptably centred between the
+two other strings.
+</p>
+
+<p>
+For example, say your document is an outline for a novel called
+<i>By the Shores of Lake Attica</i>. You&#8217;ve told mom you want
+<br/>
+<span class="pre-in-pp">
+ .DOCTYPE NAMED "Outline"
+</span>
+but when you preview your work, you see that &#8220;Outline&#8221;,
+in the centre of the page header, is uncomfortably close to the
+title, which is to the right. By invoking
+<br/>
+<span class="pre-in-pp">
+ .HEADER_CENTER_PAD RIGHT 3P
+</span>
+you can scoot the word "Outline" over three
+<a href="definitions.html#picaspoints">picas</a>
+<i>to the left</i> (because the padding is added onto the right of the
+string) so that your head looks nicely spaced out. Invoking
+<kbd>.HEADER_CENTER_PAD</kbd> with the <kbd>LEFT</kbd> argument puts
+the padding on the left side of the string so that it scoots
+right.
+</p>
+
+<p>
+Most reassuring of all is that if you use HEADER_CENTER_PAD
+conjunction with
+<a href="rectoverso.html#recto-verso">RECTO_VERSO</a>,
+mom will pad the centre string appropriately left OR right,
+depending on which page you&#8217;re on, without you having to tell
+her to do so.
+</p>
+
+<h3 id="reserved-strings" class="docs">Using mom&#8217;s reserved strings in header/footer definitions</h3>
+
+<p>
+As pointed out in the
+<a href="#author-note">Author&#8217;s note</a>
+in the introduction to headers/footers, headers and footers are
+something you don&#8217;t normally have to worry much about. Mom
+usually knows what to do.
+</p>
+
+<p>
+However, situations do arise where you need to manipulate what goes
+in the header/footer strings, setting and resetting them as you go
+along.
+</p>
+
+<p>
+A case where you might want to do this would be if you want to
+output endnotes at the end of each document in a series of
+<a href="rectoverso.html#collate">collated</a>
+documents, and you want the word "Endnotes" to go in the header
+centre position of the endnotes, but want, say, the
+<a href="docprocessing.html#title">TITLE</a>
+to go back into the centre position for the next output document.
+</p>
+
+<p>
+In scenarios like the above, mom has a number of reserved strings
+you can plug into the HEADER_LEFT, _CENTER and _RIGHT macros. They
+are:
+<br/>
+<span class="pre-in-pp">
+ \E*[$TITLE] &mdash;the current argument passed to .TITLE
+ \E*[$DOCTITLE] &mdash;the current argument passed to .DOCTITLE
+ \E*[$DOC_TYPE] &mdash;the NAMED argument passed to .DOCTYPE
+ \E*[$AUTHOR] &mdash;the current first argument passed to .AUTHOR
+ \E*[$AUTHOR_1...9] &mdash;the current arguments passed to .AUTHOR
+ \E*[$AUTHORS] &mdash;a comma-separated concatenated string
+ of all the current arguments passed to .AUTHOR
+ (i.e. a list of authors)
+ \E*[$CHAPTER_STRING] &mdash;the current argument passed to .CHAPTER_STRING,
+ if invoked, otherwise, "Chapter"
+ \E*[$CHAPTER] &mdash;the current argument (typically a number) passed
+ to .CHAPTER
+ \E*[$CHAPTER_TITLE] &mdash;the current argument passed to .CHAPTER_TITLE
+</span>
+Returning to the scenario above, first, you&#8217;d define a centre
+string for the endnotes page:
+<br/>
+<span class="pre-in-pp">
+ .HEADER_CENTER "Endnotes"
+</span>
+Then, you&#8217;d output the endnotes:
+<br/>
+<span class="pre-in-pp">
+ .ENDNOTES
+</span>
+Then, you&#8217;d prepare mom for the next document:
+<br/>
+<span class="pre-in-pp">
+ .COLLATE
+ .TITLE "New Doc Title"
+ .AUTHOR "Josephine Blough"
+</span>
+Then, you&#8217;d redefine the header-centre string using the
+reserved string <kbd><span class="nobr">\*[$TITLE]</span></kbd>, like this:
+<br/>
+<span class="pre-in-pp">
+ .HEADER_CENTER "\E*[$TITLE]"
+</span>
+And last, you&#8217;d do:
+<br/>
+<span class="pre-in-pp">
+ .START
+</span>
+Voilà! Any argument you pass to
+<a href="docprocessing.html#title">TITLE</a>
+from here on in (say, for subsequent documents) is back in the
+header-centre position. Here&#8217;s the whole routine again:
+<br/>
+<span class="pre-in-pp">
+ .HEADER_CENTER "Endnotes"
+ .ENDNOTES
+ .COLLATE
+ .TITLE "New Doc Title"
+ .AUTHOR "Josephine Blough"
+ .HEADER_CENTER "\E*[$TITLE]"
+ .START
+</span>
+</p>
+
+<p>
+If need be, you can concatenate the strings, as in the following
+example.
+<br/>
+<span class="pre-in-pp">
+ .HEADER_CENTER "\E*[$CHAPTER_STRING] \E*[$CHAPTER]"
+</span>
+which, assuming a <kbd>.CHAPTER_STRING</kbd> of
+<kbd>"Chapter"</kbd> and a <kbd>.CHAPTER</kbd> of
+<kbd>"2"</kbd>, would put &#8220;Chapter 2&#8221; in the
+header-centre position.
+</p>
+
+<h3 id="page-number-symbol" class="docs">Replacing header-left, -centre or -right with the page number</h3>
+
+<p>
+If you would like to have the current page number appear in the
+header-left, -centre, or -right position instead of a text string,
+invoke the appropriate macro, above, with the single argument
+<kbd>#</kbd> (the &#8220;number&#8221; or &#8220;pound&#8221; sign).
+Do not surround the pound size with double-quotes, as you would
+normally do if the argument to <kbd>.HEADER_CENTER</kbd> were a
+string. For example,
+<br/>
+<span class="pre-in-pp">
+ .HEADER_CENTER #
+</span>
+(notice, no double-quotes) will print the current page number in the
+centre part of headers.
+</p>
+
+<h3 id="page-number-incl" class="docs">Including the page number in header-left, -CENTER or -right</h3>
+
+<p>
+If you would like to <i>include</i> the current page number in the
+string you pass to HEADER_LEFT, _CENTER, or _RIGHT, (as
+opposed to replacing the string with the page number), use the
+special
+<a href="definitions.html#inlines">inline escape</a>
+<kbd><span class="nobr">\*[PAGE#]</span></kbd> in the string argument.
+</p>
+
+<p>
+For example, say you have a document that&#8217;s ten pages long,
+and you want header-right to say &#8220;page &lt;whichever&gt; of
+10&#8221;, invoke <kbd>.HEADER_RIGHT</kbd> as follows:
+<br/>
+<span class="pre-in-pp">
+ .HEADER_RIGHT "page \*[PAGE#] of 10"
+</span>
+The header-right of page two will read &#8220;page 2 of 10&#8221;,
+the header-right of page three will read &#8220;page 3 of 10&#8221;,
+and so on.
+</p>
+
+<!-- -HDRFTR_STYLE- -->
+
+<h4 id="hdrftr-style" class="docs">2. Header/footer style</h4>
+
+<h5 id="hdrftr-style-global" class="docs" style="margin-top: 1em;">Global changes</h5>
+
+<p style="margin-top: .5em;">
+The following macros allow you to make changes that affect all parts
+of the header at once.
+</p>
+
+<div class="macro-list-container">
+<ul style="padding-top: 6px; padding-bottom: 6px; margin-left: -.5em;">
+ <li><a href="#hdrftr-plain">HEADER_PLAIN</a></li>
+ <li><a href="#hdrftr-global-family">HEADER_FAMILY</a></li>
+ <li><a href="#hdrftr-global-size">HEADER_SIZE</a></li>
+ <li><a href="#hdrftr-color">HEADER_COLOR</a></li>
+</ul>
+</div>
+
+<div id="hdrftr-plain" class="box-macro-args">
+Macro: <b>HEADER_PLAIN</b>
+</div>
+
+<p>
+By default, mom makes adjustments to the font, size, and
+capitalization style of each part of headers to achieve an
+aesthetically pleasing look. Should you wish to design your own
+headers from the ground up without worrying how changes to the
+various elements of header style interact with mom&#8217;s defaults,
+invoke <kbd>.HEADER_PLAIN</kbd> by itself, with no argument. Mom
+will disable her default behaviour for headers, and reset all
+elements of header style to the same family, font, point size and
+colour as she uses in paragraphs.
+</p>
+
+<p>
+Replace HEADER_, above, with FOOTER_ to disable mom&#8217;s default
+behaviour for the various elements of footer style.
+</p>
+
+<div id="hdrftr-global-family" class="box-macro-args">
+Macro: <b>HEADER_FAMILY</b> <kbd class="macro-args">&lt;family&gt;</kbd>
+</div>
+
+<p>
+By default, mom uses the default document family for headers. If
+you would like her to use another
+<a href="definitions.html#family">family</a>
+in headers, invoke <kbd>.HEADER_FAMILY</kbd> with the identifier
+for the family you want. The argument is the same as for the
+typesetting macro
+<a href="typesetting.html#family">FAMILY</a>.
+</p>
+
+<p>
+Replace HEADER_, above, with FOOTER_ to change the footer family.
+</p>
+
+<div id="hdrftr-global-size" class="box-macro-args">
+Macro: <b>HEADER_SIZE</b> <kbd class="macro-args">&lt;+|-number of points&gt;</kbd>
+</div>
+<p class="requires">
+&bull;&nbsp;Argument is relative to the point size of type in paragraphs.
+See
+<span style="font-style: normal;"><a href="docelement.html#control-macro-args">Arguments to the control macros</a></span>
+for an explanation of how control macros ending in
+_SIZE work.
+</p>
+
+<p>
+By default, mom makes small adjustments to the size of each part
+of a header to achieve an aesthetically pleasing result. If
+you&#8217;d like her to continue to do so, but would like the
+overall appearance of headers to be a little smaller or a little
+larger, invoke <kbd>.HEADER_SIZE</kbd> with + or - the number of <a
+href="definitions.html#picaspoints">points</a> (fractions allowed)
+by which you want her to in/decrease the size of headers. For
+example,
+<br/>
+<span class="pre-in-pp">
+ .HEADER_SIZE +.75
+</span>
+increases the size of every part of a header by 3/4 of a point while
+respecting mom&#8217;s own little size changes.
+</p>
+
+<p>
+Replace HEADER_, above, with FOOTER_ to change the footer size.
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span>
+Normally, macros that control headers have no effect on
+<a href="docprocessing.html#printstyle">PRINTSTYLE <kbd>TYPEWRITE</kbd></a>.
+HEADER_SIZE is an exception. While all parts of a header in
+PRINTSTYLE&nbsp;<kbd>TYPEWRITE</kbd> are always the same size, you
+can use HEADER_SIZE with PRINTSTYLE&nbsp;<kbd>TYPEWRITE</kbd> to
+reduce the header&#8217;s overall point size. You&#8217;ll most
+likely require this when the
+<a href="docprocessing.html#copystyle">COPYSTYLE</a>
+is <kbd>DRAFT</kbd>, since portions of the header may overprint if,
+say, the title of your document is very long.
+</p>
+</div>
+
+<div id="hdrftr-color" class="box-macro-args">
+Macro: <b>HEADER_COLOR</b> <kbd class="macro-args">&lt;colorname&gt;</kbd>
+</div>
+
+<p>
+If you want your headers in a colour different from the document
+default (usually black), invoke <kbd>.HEADER_COLOR</kbd> with the
+name of a colour pre-defined (or &#8220;initialized&#8221;) with
+<a href="color.html#newcolor">NEWCOLOR</a>
+or
+<a href="color.html#xcolor">XCOLOR</a>.
+</p>
+
+<p>
+HEADER_COLOR will set all the parts of the header
+plus the header rule in the colour you give it as an argument. If
+you wish finer control over colour in headers, you can use
+<a href="#_color">HEADER_&lt;POSITION&gt;_COLOR</a>
+to colourize each part of the header separately, as well as
+<a href="#hdrftr-rule-color">HEADER_RULE_COLOR</a>
+to change the colour of the header rule.
+</p>
+
+<p>
+Replace HEADER_, above, with FOOTER_ to colourize footers.
+</p>
+
+<h4 id="hdrftr-style-part" class="docs">3. Part by part changes</h4>
+
+<p>
+When using the following control &#8221;macros, replace
+&#8220;&lt;POSITION&gt; by <b>LEFT, CENTER,</b> or RIGHT as
+appropriate.
+</p>
+
+<div class="macro-list-container">
+<ul style="padding-top: 6px; padding-bottom: 6px; margin-left: -.5em;">
+ <li><a href="#_family">HEADER_&lt;POSITION&gt;_FAMILY</a></li>
+ <li><a href="#_font">HEADER_&lt;POSITION&gt;_FONT</a></li>
+ <li><a href="#_size">HEADER_&lt;POSITION&gt;_SIZE</a></li>
+ <li><a href="#_caps">HEADER_&lt;POSITION&gt;_CAPS</a></li>
+ <li><a href="#_smallcaps">HEADER_&lt;POSITION&gt;_SMALLCAPS</a></li>
+ <li><a href="#_color">HEADER_&lt;POSITION&gt;_COLOR</a></li>
+ <li><a href="#grouping">Grouping style parameters for the individual header/footer parts</a></li>
+</ul>
+</div>
+
+<div id="_family" class="box-macro-args">
+Macro: <b>HEADER_&lt;POSITION&gt;_FAMILY</b> <kbd class="macro-args">&lt;family&gt;</kbd>
+</div>
+
+<p>
+Use HEADER_&lt;POSITION&gt;_FAMILY to change the
+<a href="definitions.html#family">family</a>
+of any part of headers. See
+<a href="docelement.html#control-macro-args">Arguments to the control macros</a>
+for an explanation of how control macros ending in _FAMILY work.
+</p>
+
+<p>
+Replace HEADER_, above, with FOOTER_ to change a footer part&#8217;s family.
+</p>
+
+<div id="_font" class="box-macro-args">
+Macro: <b>HEADER_&lt;POSITION&gt;_FONT</b> <kbd class="macro-args">&lt;font&gt;</kbd>
+</div>
+
+<p>
+Use HEADER_&lt;POSITION&gt;_FONT to change the
+<a href="definitions.html#font">font</a>
+of any part of headers. See
+<a href="docelement.html#control-macro-args">Arguments to the control macros</a>
+for an explanation of how control macros ending in _FONT work.
+</p>
+
+<p>
+Replace HEADER_, above, with FOOTER_ to change a footer part&#8217;s font.
+</p>
+
+<div id="_size" class="box-macro-args">
+Macro: <b>HEADER_&lt;POSITION&gt;_SIZE</b> <kbd class="macro-args">&lt;+|-number of points&gt;</kbd>
+</div>
+
+<p>
+Use HEADER_&lt;POSITION&gt;_SIZE to change the size of any part of
+headers (relative to the point size of type in paragraphs). See
+<a href="docelement.html#control-macro-args">Arguments to the control macros</a>
+for an explanation of how control macros ending in _SIZE work.
+</p>
+
+<p>
+Replace HEADER_, above, with FOOTER_ to change a footer part&#8217;s size.
+</p>
+
+<div id="_caps" class="box-macro-args">
+Macro: <b>HEADER_&lt;POSITION&gt;_CAPS</b> <kbd class="macro-args">toggle</kbd>
+</div>
+
+<p>
+HEADER_&lt;POSITION&gt;_CAPS is a
+<a href="definitions.html#toggle">toggle macro</a>.
+If you want any part of headers to be set in all caps, regardless of
+the capitalization of that part&#8217;s string as given to the
+<a href="docprocessing.html#reference-macros">reference macros</a>
+or as defined by you with the
+<a href="#hdrftr-strings">header string control macros</a>,
+simply invoke this macro (using the appropriate position) with no
+argument. If you wish to turn capitalization off (say, for the
+header-right string that mom capitalizes by default), invoke the
+macro with any argument (e.g. <kbd>OFF</kbd>, <kbd>QUIT</kbd>,
+<kbd>END</kbd>, <kbd>X</kbd>...).
+</p>
+
+<p>
+Replace HEADER_, above, with FOOTER_ to change a footer part&#8217;s
+capitalization style.
+</p>
+
+<div id="_smallcaps" class="box-macro-args">
+Macro: <b>HEADER_&lt;POSITION&gt;_SMALLCAPS</b> <kbd class="macro-args">toggle</kbd>
+</div>
+
+<p>
+HEADER_&lt;POSITION&gt;_SMALLCAPS is a
+<a href="definitions.html#toggle">toggle macro</a>.
+If you want any part of headers to be set in smallcaps, simply
+invoke this macro (using the appropriate position) with no argument.
+If you wish to turn the smallcaps off, invoke the macro with any
+argument (e.g. <kbd>OFF</kbd>, <kbd>QUIT</kbd>, <kbd>END</kbd>,
+<kbd>X</kbd>...).
+</p>
+
+<p>
+Replace HEADER,_ above, with FOOTER_ to invoke smallcaps for footer
+parts.
+</p>
+
+<div id="_color" class="box-macro-args">
+Macro: <b>HEADER_&lt;POSITION&gt;_COLOR</b> <kbd class="macro-args">&lt;colorname&gt;</kbd>
+</div>
+
+<p>
+HEADER_&lt;POSITION&gt;_COLOR allows you to set a colour for each of
+the three possible parts of a page header separately. For example,
+say you want the right part of the header (by default, the document
+title) in red, this is how you&#8217;d get it:
+<br/>
+<span class="pre-in-pp">
+ .HEADER_RIGHT_COLOR red
+</span>
+The other parts of the header will be in the default header colour
+(usually black, but that can be changed with
+<a href="#hdrftr-color">HEADER_COLOR</a>).
+</p>
+
+<p>
+Remember that you have to define (or &#8220;initialize&#8221;) a
+colour with
+<a href="color.html#newcolor">NEWCOLOR</a>
+or
+<a href="color.html#xcolor">XCOLOR</a>
+before you can use the colour.
+</p>
+
+<p>
+If you create a
+<a href="#userdef-hdrftr-rv">user-defined header</a>
+with
+<a href="#hdrftr-rectoverso">HEADER_RECTO</a>
+or
+<a href="#hdrftr-rectoverso">HEADER_VERSO</a>,
+and you want various elements within the header to be colourized,
+embed the colours in the string passed to HEADER_RECTO or
+HEADER_VERSO with the
+<a href="color.html#color-inline"><kbd><span class="nobr">\*[&lt;colorname&gt;]</span></kbd></a>
+<a href="definitions.html#inlines">inline escape</a>.
+</p>
+
+<p>
+Replace HEADER_, above, with FOOTER_ to set the colours for the
+various elements of footers.
+</p>
+
+<h5 id="grouping" class="docs">Grouping style parameters for the individual header parts</h5>
+
+<p>
+Instead of using control macros for the style parameters
+of an individual header part, the parameters may be
+<a href="docelement.html#grouping">grouped</a>
+by invoking <kbd>HEADER_&lt;POSITION&gt;_STYLE</kbd> with a list of
+keyword/value pairs. Acceptable keywords are
+<kbd>FAMILY FONT SIZE COLOR CAPS</kbd> and <kbd>SMALLCAPS</kbd>.
+Keyword/value pairs may appear on the same line as the macro, or
+separated into several lines using the backslash character
+(<kbd>\</kbd>). If you use the latter style, all but the final
+parameter must be terminated with the backslash.
+</p>
+
+<p>
+Thus, to set the header-left part in Helvetica bold, red, 1 point larger
+than
+<a href="definitions.html#running">running text</a>
+and all caps, you could do either
+<br/>
+<span class="pre-in-pp">
+ .HEADER_LEFT_STYLE FAMILY H FONT B SIZE +1 COLOR red CAPS
+</span>
+or
+<br/>
+<span class="pre-in-pp">
+ .HEADER_LEFT_STYLE \
+ FAMILY H \
+ FONT B \
+ SIZE +1 \
+ COLOR red \
+ CAPS
+</span>
+If you need to reverse the sense of <kbd>CAPS</kbd>
+or <kbd>SMALLCAPS</kbd>, use <kbd>NO_CAPS</kbd> or
+<kbd>NO_SMALLCAPS</kbd>.
+</p>
+
+<!-- -HDRFTR_VERTICAL- -->
+
+<h4 id="hdrftr-vertical" class="docs">3. Header/footer vertical placement and spacing</h4>
+
+<p>
+See
+<a href="#vertical-spacing">Vertical placement and spacing of headers/footers</a>
+for an explanation of how mom deals with
+headers, footers, and top/bottom page margins.
+</p>
+
+<div class="macro-list-container">
+<ul style="padding-top: 6px; padding-bottom: 6px; margin-left: -.5em;">
+ <li><a href="#hdftr_margin">HEADER_MARGIN</a></li>
+ <li><a href="#hdftr_gap">HEADER_GAP</a></li>
+</ul>
+</div>
+
+<!-- -HDRFTR_MARGIN- -->
+
+<div id="hdrftr-margin" class="box-macro-args">
+Macro: <b>HEADER_MARGIN</b> <kbd class="macro-args">&lt;distance to baseline of header&gt;</kbd>
+</div>
+
+<p class="requires">
+&bull;&nbsp;Requires a <a href="definitions.html#unitofmeasure">unit of measure</a>
+</p>
+
+<p>
+Use HEADER_MARGIN to set the distance from the top edge of the page to the
+<a href="definitions.html#baseline">baseline</a>
+of type in headers. A unit of measure is required, and decimal
+fractions are allowed.
+</p>
+
+<p>
+Mom&#8217;s default header margin is 4-1/2
+<a href="definitions.html#picaspoints">picas</a>,
+but if you want a different margin, say, 1/2-inch, do
+<br/>
+<span class="pre-in-pp">
+ .HEADER_MARGIN .5i
+</span>
+If your document uses
+<a href="definitions.html#footer">footers</a>,
+replace HEADER_, above, with FOOTER_. The argument to FOOTER_MARGIN
+is the distance from the bottom edge of the page to the baseline of
+type in footers. Mom&#8217;s default footer margin is 3
+<a href="definitions.html#picaspoints">picas</a>.
+</p>
+
+<h3 class="docs">Header/footer margins and page numbering</h3>
+
+<p>
+Mom uses HEADER_MARGIN and FOOTER_MARGIN to establish the baseline
+position of page numbers in addition to the baseline position of
+headers and footers proper.
+</p>
+
+<p>
+By default, page numbers appear at the bottom of the page, therefore
+if you want the default position (bottom), but want to change the
+baseline placement, use FOOTER_MARGIN. Conversely, if page numbers
+are at the top of the page, either because you turned
+<a href="#footers">FOOTERS</a>
+on or because you instructed mom to put them there with
+<a href="#pagenum-pos">PAGENUM_POS</a>,
+you&#8217;d use HEADER_MARGIN to change their baseline placement.
+</p>
+
+<div id="footer-margin" class="box-important" style="padding-bottom: 15px;">
+<p class="tip-top">
+<span class="important" style="display: block; margin-bottom: -1em;">Important &ndash; FOOTER_MARGIN and bottom margins</span>
+<br/>
+Mom requires a footer margin (i.e. the distance from the bottom of
+the page at which to place footers) for proper operation, hence she
+sets one, even if you don&#8217;t. As stated above, her default
+footer margin is 3-picas.
+</p>
+
+<p>
+If you use
+<a href="typesetting.html#b-margin">B_MARGIN</a>
+or
+<a href="typesetting.html#page">PAGE</a>
+to set a bottom margin for your document (prior to
+<a href="docprocessing.html#start">START</a>),
+and the margin&#8217;s too close to mom&#8217;s default
+footer margin (or a footer margin you set yourself with
+FOOTER_MARGIN), mom will not print your footers; additionally,
+she&#8217;ll give you a warning and some advice on standard error.
+When this happens, you must reset either B_MARGIN or FOOTER_MARGIN
+so there&#8217;s an adequate amount of space for mom to print the
+bottom line of running text and the footer.
+</p>
+
+<p>
+If you see the warning even when footers and/or bottom-of-page page
+numbering are disabled, set a nominal footer margin of 0 prior to
+<a href="docprocessing.html#start">START</a>,
+as in these examples.
+</p>
+
+<div id="examples-footnotes-1" class="examples-container" style="padding-bottom: 1em;">
+<div class="examples" style="margin-top: 0; margin-bottom: -.25em;">Example 1</div>
+<span class="pre">
+ &lt;reference macros, etc&gt;
+ .PAGINATION OFF
+ .B_MARGIN .25i
+ .FOOTER_MARGIN O
+ .START
+</span>
+</div>
+
+<div id="examples-footnotes-2" class="examples-container" style="margin-top: 1em; padding-bottom: 1em;">
+<div class="examples" style="margin-top: 0;">Example 2</div>
+<span class="pre">
+ &lt;reference macros, etc&gt;
+ .HEADERS OFF
+ .PAGENUM_POS TOP RIGHT
+ .B_MARGIN .25i
+ .FOOTER_MARGIN O
+ .START
+</span>
+</div>
+</div>
+
+<!-- -HDRFTR_GAP- -->
+
+<div id="hdrftr-gap" class="box-macro-args">
+Macro: <b>HEADER_GAP</b> <kbd class="macro-args">&lt;distance from header to start of running text&gt;</kbd>
+</div>
+
+<p class="requires">
+&bull;&nbsp;Requires a <a href="definitions.html#unitofmeasure">unit of measure</a>
+</p>
+
+<p>
+Use HEADER_GAP to set the distance from the
+<a href="definitions.html#baseline">baseline</a>
+of type in headers to the start of
+<a href="definitions.html#running">running text</a>.
+A unit of measure is required, and decimal fractions are allowed.
+</p>
+
+<p>
+As explained in
+<a href="#vertical-spacing">Vertical placement and spacing of headers/footers</a>,
+HEADER_MARGIN + HEADER_GAP determine the default vertical starting
+position of running text on the page unless you have given mom your
+own top margin (with
+<a href="typesetting.html#t-margin">T_MARGIN</a>).
+If you give a top margin, mom ignores HEADER_GAP; running text
+starts at your stated top margin.
+</p>
+
+<p>
+Mom&#8217;s default header gap is 3
+<a href="definitions.html#picaspoints">picas</a>,
+but if you want a different gap, say, 2 centimetres, do
+<br/>
+<span class="pre-in-pp">
+ .HEADER_GAP 2c
+</span>
+If your document uses
+<a href="definitions.html#footer">footers</a>,
+replace HEADER_, above, with FOOTER_. The argument to FOOTER_GAP
+is the distance from the baseline of type in footers to the last
+baseline of running text on the page.
+</p>
+
+<p>
+As explained in
+<a href="#vertical-spacing">Vertical placement and spacing of headers/footers</a>,
+FOOTER_MARGIN + FOOTER_GAP determine the default vertical end
+position of running text on the page unless you have given mom a
+bottom margin (with
+<a href="typesetting.html#b-margin">B_MARGIN</a>).
+If you give a bottom margin, mom ignores FOOTER_GAP; running text
+ends at your stated bottom margin, subject to the restriction outlined
+<a href="#footer-margin">here</a>.
+</p>
+
+<p>
+Mom&#8217;s default footer gap is 3
+<a href="definitions.html#picaspoints">picas</a>.
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span>
+Mom uses HEADER_GAP and FOOTER_GAP to establish the start and end
+baseline positions of running text with respect to both headers and
+footers AND page numbers. If you wish to change the gap between the
+last line of running text and a bottom page number, use FOOTER_GAP.
+If page numbers are at the top of the page, change the gap between
+the number and the first line of running text with HEADER_GAP.
+</p>
+</div>
+
+<div id="gap-note" class="box-tip">
+<p class="tip-top">
+<span class="note">Additional note:</span>
+HEADER_GAP and FOOTER_GAP may only be used once, at the start of a
+document. In
+<a href="rectoverso.html#collate">collated documents</a>,
+this means that HEADER_GAP or FOOTER_GAP cannot be used to change
+the gaps once they have been set. The same applies to the Table of
+Contents, Endnotes, Bibliographies, and Lists of...&nbsp;.
+</p>
+
+<p class="tip-bottom">
+In the event that you need to change the header or footer gap after
+the start of a document, you must do so with
+<a href="typesetting.html#t-margin">T_MARGIN</a>
+or
+<a href="typesetting.html#b-margin">B_MARGIN</a>,
+which raise or lower the top and bottom margins of
+<a href="definitions.html#running">running text</a>
+but do not affect the placement headers and footers.
+(See
+<a href="tables-of-contents.html#toc-page-settings-example">here</a>
+for a demonstration.)
+</p>
+</div>
+
+<!-- -HDRFTR_SEPARATOR- -->
+
+<h4 id="hdrftr-separator" class="docs">4. Header/footer separator rule</h4>
+
+<p>
+The header/footer separator rule is a modest horizontal rule,
+set slightly below the header (or above the footer), that runs
+the length of the
+<a href="definitions.html#header">header</a>
+and helps separate it visually from
+<a href="definitions.html#running">running text</a>. If
+you don&#8217;t want the rule, you can turn it off. If you want it,
+but at a different vertical position relative to the header (or
+footer), you can alter its placement.
+</p>
+
+<div class="macro-list-container">
+<ul style="padding-top: 6px; padding-bottom: 6px; margin-left: -.5em;">
+ <li><a href="#hdrftr-rule">HEADER_RULE</a> &ndash; on or off</li>
+ <li><a href="#hdrftr-rule-weight">HEADER_RULE_WEIGHT</a> &ndash; weight of the rule</li>
+ <li><a href="#hdrftr-rule-gap">HEADER_RULE_GAP</a> &ndash; distance of rule from header</li>
+ <li><a href="#hdrftr-rule-color">HEADER_RULE_COLOR</a> &ndash; color of rule header</li>
+</ul>
+</div>
+
+<!-- -HDRFTR_RULE- -->
+
+<div id="hdrftr-rule" class="box-macro-args">
+Macro: <b>HEADER_RULE</b> <kbd class="macro-args">toggle</kbd>
+</div>
+
+<p>
+By default, mom prints a header separator rule underneath headers
+(or above footers). If you don&#8217;t want the rule, turn it off by
+invoking <kbd>.HEADER_RULE</kbd> with any argument (<kbd>OFF</kbd>,
+<kbd>QUIT</kbd>, <kbd>END</kbd>, <kbd>X</kbd>...), e.g.
+<br/>
+<span class="pre-in-pp">
+ .HEADER_RULE OFF
+</span>
+To turn the rule (back) on, invoke <kbd>.HEADER_RULE</kbd>
+without any argument.
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span>
+Replace HEADER_, above, with FOOTER_ to enable/disable the printing
+of the footer separator rule. (Most likely, if you&#8217;re using
+<kbd><a href="#footers">FOOTERS</a></kbd>,
+you&#8217;ll want it off.)
+</p>
+</div>
+
+<!-- -HDRFTR_RULE_WEIGHT- -->
+
+<div id="hdrftr-rule-weight" class="box-macro-args">
+Macro: <b>HEADER_RULE_WEIGHT</b> <kbd class="macro-args">&lt;weight in points&gt;</kbd>
+</div>
+
+<p class="requires">
+&bull;&nbsp;Argument must <span class="normal">NOT</span> have a <a href="definitions.html#unitofmeasure">unit of measure</a> appended
+</p>
+
+<p>
+HEADER_RULE_WEIGHT controls the weight (&#8220;thickness&#8221;) of
+the header rule. Like
+<a href="inlines.html#rule-weight">RULE_WEIGHT</a>,
+it takes a single argument: the weight of the header rule expressed
+in
+<a href="definitions.html#picaspoints">points</a>
+but without the unit of measure, <kbd>p</kbd>, appended. The
+argument to HEADER_RULE_WEIGHT must be greater than 0 and less than
+100; decimal fractions are allowed.
+</p>
+
+<p>
+Say, for example, you want a really strong header separator rule.
+<br/>
+<span class="pre-in-pp">
+ .HEADER_RULE_WEIGHT 4
+</span>
+which sets the separator rule weight to 4 points, is how you&#8217;d do
+it.
+</p>
+
+<p>
+Mom&#8217;s default header rule weight is 1/2 point.
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span>
+Replace HEADER_, above, with FOOTER_ to set the weight of the footer
+separator rule.
+</p>
+</div>
+
+<!-- -HDRFTR_RULE_GAP- -->
+
+<div id="hdrftr-rule-gap" class="box-macro-args">
+Macro: <b>HEADER_RULE_GAP</b> <kbd class="macro-args">&lt;distance of rule beneath header&gt;</kbd>
+</div>
+
+<p class="requires">
+&bull;&nbsp;Requires a <a href="definitions.html#unitofmeasure">unit of measure</a>
+</p>
+
+<p>
+HEADER_RULE_GAP is the distance from the
+<a href="definitions.html#baseline">baseline</a>
+of type in headers to the top edge of the rule underneath. (If
+FOOTER_RULE_GAP, the gap is the distance from the top of the highest
+<a href="definitions.html#ascender">ascender</a>
+to the bottom edge of the rule.) A unit of measure is required, and
+decimal fractions are allowed. Please note that HEADER_RULE_GAP has
+no effect on
+<a href="#hdrftr-gap">HEADER_GAP</a>
+(i.e., HEADER_RULE_GAP is NOT added to HEADER_GAP when mom calculates
+the space between headers and the start of
+<a href="definitions.html#running">running text</a>).
+</p>
+
+<p>
+By default, the header rule gap is 4
+<a href="definitions.html#picaspoints">points</a>.
+If you&#8217;d like to change it to, say, 1/4
+<a href="definitions.html#em">em</a>, do
+<br/>
+<span class="pre-in-pp">
+ .HEADER_RULE_GAP .25m
+</span>
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span>
+Replace HEADER_, above, with FOOTER_ if you&#8217;re using
+<a href="definitions.html#footer">footers</a>
+and want to change the separator rule gap. In footers, the gap is
+measured from the top of the tallest
+<a href="definitions.html#ascender">ascender</a>
+in the footer.
+</p>
+
+<p class="tip-bottom">
+<span class="additional-note">Additional note:</span>
+When using
+<a href="#hdrftr-recto">FOOTER_RECTO</a>
+and
+<a href="#hdrftr-verso">FOOTER_VERSO</a>,
+make sure that the default size for footers
+(<a href="#footer-global-size">FOOTER_SIZE</a>)
+is set to the largest size of type that will be used in the footer
+or mom may not get the rule gap right. Inline changes to the size
+of type in FOOTER_RECTO and FOOTER_VERSO should always be negative
+(smaller) than the default.
+</p>
+</div>
+
+<!-- -HDRFTR_RULE_COLOR- -->
+
+<div id="hdrftr-rule-color" class="box-macro-args">
+Macro: <b>HEADER_RULE_COLOR</b> <kbd class="macro-args">&lt;colorname&gt;</kbd>
+</div>
+
+<p>
+If you wish to change the colour of the header rule, invoke
+<kbd>.HEADER_RULE_COLOR</kbd> with the name of a colour pre-defined
+(or &#8220;initialized&#8221;) with
+<a href="color.html#newcolor">NEWCOLOR</a>
+or
+<a href="color.html#xcolor">XCOLOR</a>.
+</p>
+
+<p>
+HEADER_RULE_COLOR overrides the colour set with
+<a href="#hdrftr-color">HDRFTR_COLOR</a>,
+so it&#8217;s possible to have the heads entirely in, say, blue (set
+with HEADER_COLOR), and the header rule in, say, red.
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span>
+Replace HEADER_, above, with FOOTER_ to change the colour of the
+footer rule.
+</p>
+</div>
+
+<div class="rule-short"><hr/></div>
+
+<!-- -USERDEF_HDRFTR- -->
+
+<h2 id="userdef-hdrftr-rv" class="macro-group">User-defined, single string recto/verso headers/footers</h2>
+
+<p>
+Sometimes, you&#8217;ll find you can&#8217;t get mom&#8217;s
+handling of 3-part headers or footers to do exactly what you want in
+the order you want. This is most likely happen when you want the
+information contained in the headers/footers split over two pages,
+as is often the case with recto/verso documents.
+</p>
+
+<p>
+Say, for example, you want recto page headers to contain a
+document&#8217;s author, centred, and verso page headers to contain
+the document&#8217;s title, also centred, like this:
+<br/>
+<span class="pre-in-pp">
+ +------------------------+ +------------------------+
+ | Author | | Title |
+ | | | |
+ | | | |
+ | | | |
+ | | | |
+ | | | |
+ | | | |
+ | | | |
+ | | | |
+ | | | |
+ | | | |
+ | | | |
+ | | | |
+ | | | |
+ +------------------------+ +------------------------+
+</span>
+With mom&#8217;s standard 3-part headers, this isn&#8217;t possible,
+even when
+<a href="rectoverso.html#recto-verso">RECTO_VERSO</a>
+is enabled. RECTO_VERSO switches the left and right parts of
+headers on alternate pages, but the centre part remains unchanged.
+</p>
+
+<p>
+Any time you need distinctly different headers on alternate pages,
+mom has macros that let you manually design and determine what goes
+into headers on recto pages, and what goes into headers on verso
+pages. The macros are
+<a href="#hdrftr-recto">HEADER_RECTO</a>
+and
+<a href="#hdrftr-verso">HEADER_VERSO</a>.
+Both allow you to state whether the header is flush left, centred,
+or flush right, and both take a single
+<a href="definitions.html#stringargument">string argument</a>
+with which, by combining text and
+<a href="definitions.html#inlines">inline escapes</a>,
+you can make the headers come out just about any way you want. Use
+of the <kbd><span class="nobr">\*[PAGE#]</span></kbd> escape is permitted in the
+string argument (see
+<a href="#page-number-incl">Including the page number in header-left, -centre or -right</a>),
+and, as an added bonus, mom provides a special mechanism whereby
+it&#8217;s possible to
+<a href="#padding-hdrftr">pad</a>
+the string as well. The padding mechanism lets you create headers
+that contain left, centre and right parts like mom&#8217;s defaults
+but entirely of your own design.
+</p>
+
+<div class="macro-list-container">
+<ul style="padding-top: 6px; padding-bottom: 6px; margin-left: -.5em;">
+ <li><a href="#hdrftr-recto">HEADER_RECTO</a></li>
+ <li><a href="#hdrftr-verso">HEADER_VERSO</a>
+ <ul style="margin-left: -.5em;">
+ <li><a href="#userdef-hdrftr">User-defined single string headers/footers (no recto/verso)</a></li>
+ <li><a href="#padding-hdrftr">Padding the header-recto/header-verso string</a></li>
+ </ul></li>
+</ul>
+</div>
+
+<!-- -HDRFTR_RECTOVERSO- -->
+
+<div id="hdrftr-recto" class="box-macro-args">
+Macro: <b>HEADER_RECTO</b> <kbd class="macro-args">LEFT | CENTER | RIGHT [ CAPS ] "&lt;header recto string&gt;"</kbd>
+</div>
+
+<div id="hdrftr-verso" class="box-macro-args" style="margin-top: 1em;">
+Macro: <b>HEADER_VERSO</b> <kbd class="macro-args">LEFT | CENTER | RIGHT [ CAPS ] "&lt;header verso string&gt;"</kbd>
+</div>
+
+<div id="userdef-hdrftr" class="box-important">
+
+<p class="tip">
+<span class="tip" style="display: block; margin-bottom: -1.25em; color: #000056; font-size: 100%;">User-defined single string headers/footers (no recto/verso)</span>
+<br/>
+HEADER_RECTO may be used to create user-defined, single string
+headers (or footers, with FOOTER_RECTO), even when recto/verso is
+not enabled (with
+<a href="rectoverso.html#recto-verso">RECTO_VERSO</a>).
+In such cases, the header/footer you create is the one used on
+every page, making HEADER_RECTO your &#8220;I need to design my own
+headers from scratch&#8221; solution.
+</p>
+</div>
+
+<p>
+HEADER_RECTO and HEADER_VERSO behave identically, hence all
+references to HEADER_RECTO in this section also refer to
+HEADER_VERSO. Furthermore, FOOTER_ can be used instead of HEADER_
+to set up recto/verso footers.
+</p>
+
+<p>
+The first argument to HEADER_RECTO is the direction in which you
+want the header
+<a href="definitions.html#quad">quadded</a>.
+<kbd>L</kbd>, <kbd>C</kbd>, and <kbd>R</kbd> may be used in place of
+<kbd>LEFT</kbd>, <kbd>CENTER</kbd>, and <kbd>RIGHT</kbd>.
+</p>
+
+<p>
+The second argument (optional) tells mom to capitalize the text of
+the header. <b>Please note:</b> Do not use
+<a href="inlines.html#uc-lc"><kbd><span class="nobr">\*[UC]...\*[LC]</span></kbd></a>
+inside the string passed to HEADER_RECTO.
+</p>
+
+<p>
+The final argument is a string, surrounded by double-quotes,
+containing what you want in the header. HEADER_RECTO disables
+mom&#8217;s normal 3-part headers, therefore anything you want in
+the headers must be entered by hand in the string, including colours
+(via the
+<a href="definitions.html#inlines">inline escape</a>
+<a href="color.html#color-inline"><kbd><span class="nobr">\*[&lt;colorname&gt;]</span></kbd></a>).
+</p>
+
+<p>
+By default, HEADER_RECTO is set at the same size, and in the same
+family and font, as paragraph text. The control macros
+<a href="#hdrftr-global-family">HEADER_FAMILY</a>
+and
+<a href="#hdrftr-global-size">HEADER_SIZE</a>
+may be used to change the default family and size. Changes to the
+font(s) within the string must be accomplished with the
+<a href="definitions.html#inlines">inline escapes</a>
+<kbd><span class="nobr">\*[ROM]</span></kbd>,
+<kbd><span class="nobr">\*[IT]</span></kbd>,
+<kbd><span class="nobr">\*[BD]</span></kbd>,
+<kbd><span class="nobr">\*[BDI]</span></kbd>,
+and <kbd><span class="nobr">\*[PREV]</span></kbd> (see
+<a href="inlines.html#inline-fonts-mom">Changing fonts</a>).
+Additional refinements to the style of the header-recto string,
+including horizontal spacing and/or positioning, can also be made
+with inline escapes.
+</p>
+
+<p>
+To include the current page number in the string, use the
+<kbd><span class="nobr">\*[PAGE#]</span></kbd>
+<a href="definitions.html#inlines">inline escape</a>.
+</p>
+
+<h3 id="padding-hdrftr" class="docs">Padding the header-recto/header-verso string</h3>
+
+<p>
+You can &#8220;pad&#8221; the header-recto string, a convenience
+you&#8217;ll appreciate in circumstances such as the following.
+<br/>
+<span class="pre-in-pp">
+ VERSO RECTO
+ +------------------------+ +------------------------+
+ | Author Page# | | Page# Title |
+ | | | |
+ | | | |
+ | | | |
+ | | | |
+ | | | |
+ | | | |
+ | | | |
+ | | | |
+ | | | |
+ | | | |
+ | | | |
+ | | | |
+ | | | |
+ +------------------------+ +------------------------+
+</span>
+</p>
+
+<p>
+There are two steps to padding the string argument passed to HEADER_RECTO
+(if you&#8217;re unsure what padding is, see
+<a href="goodies.html#pad">Insert space into lines</a>).
+</p>
+<ol style="margin-top: -.5em; margin-left: -.5em; margin-bottom: -.5em;">
+ <li>Begin and end the string (inside the double-quotes) with the caret character (<kbd>^</kbd>).</li>
+ <li>Enter the pound sign (<kbd>#</kbd>) at any point in the string where you want an equalized amount of whitespace inserted.</li>
+</ol>
+
+<p>
+The situation depicted above is accomplished like this:
+<br/>
+<span class="pre-in-pp">
+ .HEADER_RECTO LEFT "^\*[PAGE#]#\E*[$TITLE]^"
+ .HEADER_VERSO LEFT "^\E*[$AUTHOR]#\*[PAGE#]^"
+</span>
+Notice that the quad argument, <kbd>LEFT</kbd>, is used in both
+cases. When padding a header, it doesn&#8217;t matter which
+quad argument you use, although you must be sure to supply
+one. Also note that mom does not interpret the <kbd>#</kbd> in
+<kbd><span class="nobr">\*[PAGE#]</span></kbd> as a padding marker (i.e. as a
+place to insert whitespace).
+</p>
+
+<div class="box-important">
+<p class="tip">
+<span class="important">Important:</span>
+The
+<a href="goodies.html#pad-marker">PAD_MARKER</a>
+macro, which changes the default pad marker (<kbd>#</kbd>) used by
+<a href="goodies.html#pad">PAD</a>,
+has no effect on the pad marker used in the HEADER_RECTO string. If
+you absolutely must have a literal pound sign in your HEADER_RECTO
+string, use the escape sequence for the pound sign
+(&nbsp;<kbd>\[sh]</kbd>&nbsp;) where you want the pound sign to go.
+</p>
+</div>
+
+<!-- -HDRFTR_RECTOVERSO- -->
+
+<h2 id="headers-and-footers-intro" class="macro-group">Headers and footers on the same page</h2>
+
+<p>
+Normally, mom prints either a header or a footer, but not both, depending on whether
+<a href="#headers">HEADERS</a>
+or
+<a href="#footers">FOOTERS</a>
+is enabled. (Page numbering, whether in the top margin
+or the bottom, is not considered a header or a footer.)
+Should you need both headers and footers on the same page, the
+single macro HEADERS_AND_FOOTERS is the way to set it up.
+</p>
+
+<div id="headers-and-footers" class="box-macro-args">
+Macro: <b>HEADERS_AND_FOOTERS</b> <kbd class="macro-args">(see Invocation)</kbd>
+</div>
+
+<p>
+Invocation:
+<br/>
+<span class="pre-in-pp" style="margin-bottom: -1em;">
+ .HEADERS_AND_FOOTERS \
+ &lt;L | C | R&gt; "&lt;header-recto string&gt;" \
+ &lt;L | C | R&gt; "&lt;footer-recto string&gt;" \
+ &lt;L | C | R&gt; "&lt;header-verso string&gt;" \
+ &lt;L | C | R&gt; "&lt;footer-verso string&gt;"
+</span>
+or
+<span class="pre-in-pp" style="margin-top: -.5em;">
+ .HEADERS_AND_FOOTERS &lt;anything&gt;
+</span>
+</p>
+
+<p>
+Unlike the macros,
+<a href="#headers">HEADERS</a>
+and
+<a href="#footers">FOOTERS</a>,
+which are
+<a href="definitions.html#toggle">toggle</a>
+macros, HEADERS_AND_FOOTERS requires that you supply the information
+you want in the headers and footers yourself. Mom does no automatic
+generation of things like the title and the author in headers and
+footers when you&#8217;re using HEADERS_AND_FOOTERS. Furthermore,
+style changes&mdash;family, font, pointsize, colour, capitalization,
+etc &mdash;are entirely your responsibility and must be made with
+<a href="definitions.html#inlines">inline escapes</a>
+in the arguments passed to <kbd>&#8220;&lt;recto
+&#8221;header string&gt;&#8220;</kbd>, <kbd>&lt;recto footer
+string&gt;&#8220;</kbd>, etc. By default, mom sets the headers and
+footers created with HEADERS_AND_FOOTERS in the same family, font,
+point size, capitalization style and colour as
+<a href="definitions.html#running">running text</a>.
+</p>
+
+<p>
+The manner of entering what you want is identical to the way you
+input
+<a href="#userdef-hdrftr-rv">single string headers and footers</a>.
+I suggest reading up on them, as well as looking at the entries,
+<a href="#hdrftr-rectoverso">HEADER_RECTO</a>
+and
+<a href="#reserved-strings">Using mom&#8217;s reserved strings in header/footer definitions</a>.
+</p>
+
+<p>
+The same
+<a href="#padding-hdrftr">padding mechanism</a>
+used in HEADER_RECTO and HEADER_VERSO is available in the
+<a href="definitions.html#stringargument">string arguments</a>
+passed to HEADERS_AND_FOOTERS, allowing you to simulate two- and
+three-part headers and footers.
+</p>
+
+<p>
+<kbd>L | C | R</kbd> in the arguments to HEADERS_AND_FOOTERS refers
+to whether you want the specific header or footer part on the left,
+in the middle, or on the right. (You can also use the longer forms,
+<kbd>LEFT</kbd>, <kbd>CENTER</kbd> and <kbd>RIGHT</kbd>.) The
+string you give afterwards is whatever text you want, including
+mom&#8217;s
+<a href="#reserved-strings">reserved strings</a>,
+and whatever
+<a href="definitions.html#inlines">inline escapes</a>
+you need to change things like family and font, pointsize, colour,
+etc. as you go along.
+</p>
+
+<p>
+Note the backslashes in the invocation, above. Every set of
+arguments given this way to HEADERS_AND_FOOTERS <i>except the
+last</i> requires a backslash after it. The use of backslashes
+isn&#8217;t required if you want to put the entire argument list on
+the same (very long!) line as the macro itself; I recommend sticking
+to the style shown above to keep things manageable.
+</p>
+
+<p>
+If you want to disable having both headers and footers on the same
+page, invoke <kbd>.HEADERS_AND_FOOTERS</kbd> with any argument
+you want (e.g. <kbd>OFF</kbd>, <kbd>QUIT</kbd>, <kbd>END</kbd>,
+<kbd>X</kbd>...). Mom will restore her default behaviour of setting
+automatically generated page headers, with the page number,
+centered, at the bottom of the page. If you would prefer footers
+instead of headers after turning HEADERS_AND_FOOTERS off, invoke
+<a href="#footers"><kbd>.FOOTERS</kbd></a>
+afterwards.
+</p>
+
+<h4 class="docs" style="margin-bottom: 1em;">Examples of HEADERS_AND_FOOTERS usage</h4>
+
+<div id="examples-userdef-hdrftr-1" class="examples-container" style="padding-bottom: 0;">
+<div class="examples" style="margin-top: 12px; margin-bottom: 0;">Example 1: Header and footer the same on every page</div>
+<span class="pre">
+.HEADERS_AND_FOOTERS \ +-----------------------+
+C "\E*[$TITLE]" \ | Title |
+L "^\E*[$AUTHOR]#\*[PAGE#]^" | |
+ | |
+ | |
+ | |
+ | |
+ | |
+ | |
+ | |
+ | |
+ | |
+ | |
+ | |
+ | Author Pg. # |
+ +-----------------------+
+</span>
+
+<p>
+<kbd><span class="nobr">\E*[$TITLE]</span></kbd> and
+<kbd><span class="nobr">\E*[$AUTHOR]</span></kbd> will print the strings you pass
+to
+<a href="docprocessing.html#title">TITLE</a>
+and
+<a href="docprocessing.html#author">AUTHOR</a>;
+<kbd><span class="nobr">\*[PAGE#]</span></kbd> is how you include the page number
+in a header or footer string. (For a list of special strings you
+can use in headers and footers, see
+<a href="#reserved-strings">here</a>.)
+</p>
+
+<p>
+You don&#8217;t have to use these special strings. You can type
+in anything you like. I&#8217;ve only used them here to show that
+they&#8217;re available.
+</p>
+</div>
+
+<div id="examples-userdef-hdrftr-2" class="examples-container" style="margin-top: 1em; padding-bottom: 18px;">
+<div class="examples" style="margin-top: 12px; margin-bottom: 0;">Example 2: Different headers and footers on recto/verso pages</div>
+<span class="pre">
+.HEADERS_AND_FOOTERS \
+C "BOOK TITLE" \
+L "^\*[PAGE#]#\E*[$AUTHOR]^" \
+C "Story Title" \
+L "^\E*[$AUTHOR]#\*[PAGE#]^"
+
+ +-----------------------+ +------------------------+
+ | BOOK TITLE | | Story Title |
+ | | | |
+ | | | |
+ | | | |
+ | | | |
+ | | | |
+ | | | |
+ | | | |
+ | | | |
+ | | | |
+ | | | |
+ | | | |
+ | | | |
+ | Pg. # Author | | Author Pg.# |
+ +-----------------------+ +------------------------+
+</span>
+</div>
+
+<div class="rule-short" style="margin-top: 1.25em;"><hr/></div>
+
+<!-- ==================================================================== -->
+
+<h2 id="pagination-intro" class="macro-group">Pagination</h2>
+
+<p>
+By default, mom paginates documents. Page numbers
+appear in the bottom margin of the page, centred between two hyphens.
+As with all elements of mom&#8217;s document processing,
+most aspects of pagination style can be altered to suit your taste
+with control macros.
+</p>
+
+
+<div class="macro-list-container">
+<h3 id="index-pagination" class="macro-list">Pagination macros</h3>
+<ul class="macro-list">
+ <li><a href="#paginate">PAGINATE</a> &ndash; pagination on or off</li>
+ <li><a href="#pagenumber">PAGENUMBER</a> &ndash; user-defined (starting) page number</li>
+ <li><a href="#pagenum-style">PAGENUM_STYLE</a> &ndash; digits, roman numerals, etc</li>
+ <li><a href="#pagenum-on-first-page">PAGENUM_ON_FIRST_PAGE</a> &ndash; put page number on first page when numbering is at the top of the page</li>
+ <li><a href="#draft-with-pagenumber">DRAFT_WITH_PAGENUMBER</a> &ndash; attach draft/revision information to page numbers</li>
+ <li><a href="#pagenumber-string">PAGENUMBER_STRING</a> &ndash; user-defined page number string</li>
+ <li><a href="#index-paginate-control">Pagination control macros and defaults</a></li>
+</ul>
+</div>
+
+<!-- -PAGINATE- -->
+
+<div id="paginate" class="box-macro-args">
+Macro: <b>PAGINATE</b> <kbd class="macro-args">toggle</kbd>
+</div>
+
+<p class="alias" style="margin-bottom: 0;">
+<i>Alias:</i> <b>PAGINATION</b>
+</p>
+
+<p>
+By default, mom paginates documents (in the bottom margin). If
+you&#8217;d prefer she not paginate, turn pagination off by
+invoking <kbd>.PAGINATE</kbd> with any argument (<kbd>OFF</kbd>,
+<kbd>NO</kbd>, <kbd>QUIT</kbd>, <kbd>END</kbd>, <kbd>X</kbd>...),
+e.g.
+<br/>
+<span class="pre-in-pp">
+ .PAGINATE NO
+</span>
+To (re)start pagination, invoke <kbd>.PAGINATE</kbd> without any
+argument.
+</p>
+
+<!-- -PAGENUMBER- -->
+
+<div id="pagenumber" class="box-macro-args">
+Macro: <b>PAGENUMBER</b> <kbd class="macro-args">&lt;number&gt;</kbd>
+</div>
+
+<p>
+As is to be expected, pagination of documents begins at page 1. If
+you&#8217;d prefer that mom begin with a different number on the
+first page of a document, invoke <kbd>.PAGENUMBER</kbd> with the
+number you want.
+</p>
+
+<p>
+PAGENUMBER need not be used only to give mom a "first page" number.
+It can be used at any time to tell mom what number you want a page
+to have. Subsequent page numbers will, of course, be incremented by
+1 from that number.
+</p>
+
+<!-- -PAGENUM_STYLE- -->
+
+<div id="pagenum-style" class="box-macro-args">
+Macro: <b>PAGENUM_STYLE</b> <kbd class="macro-args">DIGIT | ROMAN | roman | ALPHA | alpha</kbd>
+</div>
+
+<p>
+PAGENUM_STYLE lets you tell mom what kind of page numbering you
+want.
+<br/>
+<span class="pre-in-pp">
+ DIGIT Arabic digits (1, 2, 3...)
+ ROMAN upper case roman numerals (I, II, III...)
+ roman lower case roman numerals (i, ii, iii...)
+ ALPHA upper case letters (A, B, C...)
+ alpha lower case letters (a, b, c...)
+</span>
+</p>
+
+<!-- -PAGENUM_ON_FIRST_PAGE- -->
+
+<div id="pagenum-on-first-page" class="box-macro-args">
+Macro: <b>PAGENUM_ON_FIRST_PAGE</b> <kbd class="macro-args">toggle</kbd>
+</div>
+
+<p>
+This macro applies only if you&#8217;ve enabled
+<a href="#footers">FOOTERS</a>.
+If FOOTERS are on, mom automatically places page numbers at the tops
+of pages except on the first page of a document (or on first pages
+after
+<a href="rectoverso.html#collate">COLLATE</a>).
+If you&#8217;d like the page number to appear on &#8220;first&#8221; pages
+when footers are on, invoke
+<br/>
+<span class="pre-in-pp">
+ .PAGENUM_ON_FIRST_PAGE
+</span>
+with no argument. Any other argument turns the feature off
+(<kbd>OFF</kbd>, <kbd>QUIT</kbd>, <kbd>END</kbd>, <kbd>X</kbd>,
+etc).
+</p>
+
+<p>
+As with most of the
+<a href="definitions.html#controlmacro">control macros</a>,
+PAGENUM_ON_FIRST_PAGE can be invoked at any time, meaning that if
+you don&#8217;t want a page number on the very first page of a
+document, but do want one on pages that appear after COLLATE, omit
+it before the first
+<a href="docprocessing.html#start">START</a>
+of the document, then invoke it either just before or after your
+first COLLATE.
+</p>
+
+<!-- -DRAFT_WITH_PAGENUMBER- -->
+
+<div id="draft-with-pagenumber" class="box-macro-args">
+Macro: <b>DRAFT_WITH_PAGENUMBER</b>
+</div>
+
+<p>
+Sometimes, in
+<a href="docprocessing.html#copystyle">COPYSTYLE <kbd>DRAFT</kbd></a>,
+the CENTER part of page headers gets overcrowded because of
+the draft and revision information that go there by default.
+DRAFT_WITH_PAGENUMBER is one way to fix the problem.
+</p>
+
+<p>
+Invoked without an argument, <kbd>.DRAFT_WITH_PAGENUMBER</kbd>
+removes draft/revision information from the page headers and
+attaches it instead to the document&#8217;s page numbering, in the
+form
+<br/>
+<span class="pre-in-pp">
+ Draft #, Rev. # / &lt;pagenumber&gt;
+</span>
+If you have not supplied mom with a draft number (with
+<a href="docprocessing.html#draft">DRAFT</a>)
+DRAFT_WITH_PAGENUMBER will assume &#8220;Draft 1&#8220;, and will
+print it before the page number.
+</p>
+
+<p>
+See the note in
+<a href="docprocessing.html#copystyle-note">COPYSTYLE <kbd>DRAFT</kbd>
+</a>
+for other ways of dealing with crowded page headers when formatting
+draft-style copy.
+</p>
+
+<!-- -PAGENUMBER_STRING- -->
+
+<div id="pagenumber-string" class="box-macro-args">
+Macro: <b>PAGENUMBER_STRING</b> "&lt;text of page number string&gt;"
+</div>
+
+<p>
+If you want page numbering to contain text in addition to the page
+number itself, use PAGENUMBER_STRING.
+</p>
+
+<p>
+The most common use for PAGENUMBER_STRING is to include the total
+number of pages along with the page number, for example
+&#8220;Page 1 of 10, Page 2 of 10...&#8221; To accomplish this,
+you&#8217;d enter
+<br/>
+<span class="pre-in-pp">
+ .PAGENUMBER_STRING "Page \*[PAGE#] of 10"
+</span>
+Notice that the page number is entered symbolically with the
+<a href="definitions.html#inlines">inline escape</a>
+<span style="white-space:nowrap"><kbd><span class="nobr">\*[PAGE#]</span></kbd>,</span>
+while the total number of pages must be entered explicitly after the
+document is complete and the total number of pages known.
+</p>
+
+<!-- -PAGINATE_CONTROL- -->
+
+<div class="macro-list-container">
+<h3 id="index-paginate-control" class="macro-list">Pagination control macros and defaults</h3>
+
+<ol style="margin-top: -1.5em; padding-bottom: 6px;">
+ <li><a href="#paginate-general">Family/font/size/colour</a></li>
+ <li><a href="#pagenum-pos">Page number position (vertical and horizontal)</a></li>
+ <li><a href="#pagenum-hyphens">Enclose page numbers with hyphens (on or off)</a></li>
+</ol>
+</div>
+
+<h4 id="paginate-general" class="docs">1. Page number family/font/size/colour</h4>
+
+<div class="defaults-container" style="margin-top: 1em; padding-bottom: 8px;">
+<p class="defaults" style="padding-top: 6px;">
+See
+<a href="docelement.html#control-macro-args">Arguments to the control macros</a>.
+<br/>
+The following control macros may also be
+<a href="docelement.html#grouping">grouped</a>
+using PAGENUMBER_STYLE.*
+</p>
+<span class="pre defaults">
+.PAGENUM_FAMILY default = prevailing document family
+.PAGENUM_FONT default = roman
+.PAGENUM_SIZE default = +0 (i.e. same size as paragraph text)
+.PAGENUM_COLOR default = black
+</span>
+</div>
+
+<p style="margin-top: -2em">
+*Note: Do not confuse PAGENUMBER_STYLE with
+<a href="#pagenum-style">PAGENUM_STYLE</a>.
+</p>
+
+<h4 id="pagenum-pos" class="docs" style="margin-top: 0em;">2. Page number position</h4>
+
+<div class="box-macro-args" style="margin-top: 1em;">
+Macro: <b>PAGENUM_POS</b> <kbd class="macro-args">[ TOP | BOTTOM ]&nbsp;&nbsp;[ LEFT | CENTER | RIGHT ]</kbd>
+</div>
+
+<p>
+Use PAGENUM_POS to change the default position of automatic page
+numbering. PAGENUM_POS requires <i>two</i> arguments: a vertical
+position (<kbd>TOP</kbd> or <kbd>BOTTOM</kbd>) and a horizontal
+position (<kbd>LEFT</kbd> or <kbd>CENTER</kbd> or <kbd>RIGHT</kbd>).
+</p>
+
+<p>
+For example, if you turn both
+<a href="definitions.html#header">headers</a>
+and
+<a href="definitions.html#footer">footers</a>
+off (with <kbd>.HEADERS&nbsp;OFF</kbd> and
+<kbd>.FOOTERS&nbsp;OFF</kbd>) and you want mom to number your pages
+at the top right position, enter
+<br/>
+<span class="pre-in-pp">
+ .PAGENUM_POS TOP RIGHT
+</span>
+</p>
+
+<div id="pagenum-pos-note" class="box-tip" style="margin-top: 1em;">
+<p class="tip">
+<span class="note">Note:</span>
+HEADERS must be OFF for PAGENUM_POS TOP to work.
+</p>
+</div>
+
+<h4 id="pagenum-hyphens" class="docs" style="margin-top: -1em;">3. Enclose page numbers with hyphens (on or off)</h4>
+
+<div class="box-macro-args" style="margin-top: 1em;">
+Macro: <b>PAGENUM_HYPHENS</b> <kbd class="macro-args">toggle</kbd>
+</div>
+
+<p>
+By default, mom encloses page numbers between hyphens. If you
+don&#8217;t want this behaviour, invoke the macro PAGENUM_HYPHENS
+with any argument (<kbd>OFF</kbd>, <kbd>QUIT</kbd>, <kbd>END</kbd>,
+<kbd>X</kbd>, etc), like this:
+<br/>
+<span class="pre-in-pp">
+ .PAGENUM_HYPHENS OFF
+</span>
+If, for some reason, you want to turn page number hyphens back
+on, invoke the macro without an argument.
+</p>
+
+<!-- -BLANK_PAGE- -->
+
+<h2 id="blank-pages" class="macro-group">Inserting blank pages into a document</h2>
+
+<div class="box-macro-args">
+Macro: <b>BLANKPAGE</b> <kbd class="macro-args">&lt;# of blank pages to insert&gt; [DIVIDER [NULL]]</kbd>
+</div>
+
+<p>
+This one does exactly what you&#8217;d expect&mdash;inserts a blank
+page (or pages) into a document. Unless you give the optional argument,
+<kbd>NULL</kbd>, mom silently increments the page number of every
+blank page and keeps track of
+<a href="rectoverso.html#recto-verso">recto/verso</a>
+stuff, but otherwise does nothing. This is useful for forcing new
+sections of a document onto recto pages, but may have other
+applications as well.
+</p>
+
+<p>
+The required argument to BLANK_PAGE is the number of blank pages to
+insert. The argument is not optional, hence even if you only want
+one blank page, you have to tell mom:
+<br/>
+<span class="pre-in-pp">
+ .BLANKPAGE 1
+</span>
+The optional argument <kbd>DIVIDER</kbd> must be given if
+you&#8217;re inserting a blank page before the start of major
+document sections (chapters, endnotes, bibliographies,
+or tables of contents&#8211;provided the table of contents is not being
+<a href="tables-of-contents.html#auto-relocate-toc">autorelocated</a>).
+Without the <kbd>DIVIDER</kbd> argument, mom simply
+inserts the blank pages and prepares the next page to receive
+<a href="definitions.html#running">running text</a>.
+</p>
+
+<p>
+<kbd>NULL</kbd>, which is also optional, allows you to output the
+specified number of pages without mom incrementing the page number
+for each blank page. She will, however, continue to keep track
+of which pages are recto/verso if recto/verso printing has been
+enabled.
+</p>
+
+<div id="blankpage-note" class="box-tip" style="margin-top: 1.5em;">
+<p class="tip">
+<span class="note">Note:</span>
+Do not use BLANKPAGE before TOC if the table of contents is being
+<a href="tables-of-contents.html#auto-relocate-toc">autorelocated</a>.
+</p>
+</div>
+
+<div class="rule-long"><hr/></div>
+
+<!-- Navigation links -->
+<table style="width: 100%; margin-top: 12px;">
+<tr>
+ <td style="width: 33%;"><a href="toc.html">Back to Table of Contents</a></td>
+ <td style="width: 24%; text-align: center;"><a href="#top">Top</a></td>
+ <td style="width: 42%; text-align: right;"><a href="rectoverso.html">Next: Recto/verso printing, collating</a></td>
+</tr>
+</table>
+
+</div>
+
+<div class="bottom-spacer"><br/></div>
+
+</body>
+</html>
diff --git a/contrib/mom/momdoc/images.html b/contrib/mom/momdoc/images.html
new file mode 100644
index 0000000..dc1837f
--- /dev/null
+++ b/contrib/mom/momdoc/images.html
@@ -0,0 +1,3515 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+This file is part of groff, the GNU roff type-setting system.
+
+Copyright (C) 2004-2020 Free Software Foundation, Inc.
+Written by Peter Schaffter (peter@schaffter.ca).
+
+Permission is granted to copy, distribute and/or modify this document
+under the terms of the GNU Free Documentation License, Version 1.3 or
+any later version published by the Free Software Foundation; with no
+Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
+Texts.
+
+A copy of the Free Documentation License is included as a file called
+FDL in the main directory of the groff source package.
+-->
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+<head>
+ <meta http-equiv="content-type" content="text/html;charset=utf-8"/>
+ <title>Mom -- Graphics, floats, and preprocessor support</title>
+ <link rel="stylesheet" type="text/css" href="stylesheet.css" />
+</head>
+
+<body style="background-color: #f5faff;">
+
+<!-- ==================================================================== -->
+
+<div id="top" class="page">
+
+<!-- Navigation links -->
+<table style="width: 100%;">
+<tr>
+ <td><a href="toc.html">Back to Table of Contents</a></td>
+ <td style="text-align: right;"><a href="headfootpage.html#top">Next: Page headers/footers, pagination</a></td>
+</tr>
+</table>
+
+<h1 class="docs">Graphics, floats, and preprocessor support</h1>
+
+<div style="width: 80%; margin: auto;">
+<ul class="no-enumerator" style="margin-left: -1em;">
+ <li><a href="#images-intro">Inserting images and graphics</a>
+ <ul>
+ <li><a href="#converting">Image conversion and file processing</a>
+ <ul style="margin-left: -1em">
+ <li><a href="#pdf">PDF</a></li>
+ <li><a href="#eps">EPS</a></li>
+ </ul></li>
+ <li><a href="#pdf-image">The PDF_IMAGE macro</a>
+ <ul style="margin-left: -1em">
+ <li><a href="#pdf-image-frame">PDF_IMAGE_FRAME</a>&mdash;set parameters for image frames</li>
+ </ul></li>
+ <li><a href="#pspic">The PSPIC macro</a></li>
+ </ul></li>
+ <li><a href="#floats-intro">Floats</a>
+ <ul>
+ <li><a href="#float">The FLOAT macro</a></li>
+ <li><a href="#float-label-caption">Labelling and captioning floats</a>
+ <ul style="margin-left: -1em">
+ <li><a href="#label">LABEL</a></li>
+ <li><a href="#caption">CAPTION</a></li>
+ </ul></li>
+ </ul></li>
+ <li><a href="#preprocessor-support">Preprocessor support</a>
+ <ul>
+ <li><a href="#tbl">tbl</a>
+ <ul style="margin-left: -1em;">
+ <li><a href="#ts-te">.TS / .TH / .TE macros and arguments</a></li>
+ </ul></li>
+ <li><a href="#eqn">eqn</a>
+ <ul style="margin-left: -1em;">
+ <li><a href="#eq-en">.EQ / .EN macros and arguments</a></li>
+ </ul></li>
+ <li><a href="#pic">pic</a>
+ <ul style="margin-left: -1em;">
+ <li><a href="#ps-pe">.PS / .PE macros and arguments</a></li>
+ <li><a href="#pic-text-style">PIC_TEXT_STYLE</a>&mdash;set parameters for text in diagrams</li>
+ </ul></li>
+ <li><a href="#grap">grap</a></li>
+ <li><a href="#refer">refer</a></li>
+ </ul></li>
+ <li><a href="#captions-and-labels">Captions and labels</a>
+ <ul>
+ <li><a href="#autolabel">AUTOLABEL</a></li>
+ <li><a href="#set-autolabel">SET_AUTOLABEL</a></li>
+ <li><a href="#caption-after-label">CAPTION_AFTER_LABEL</a></li>
+ <li><a href="#captions-labels-sources">CAPTIONS / LABELS / SOURCES</a>&mdash;set parameters for each</li>
+ <li><a href="#mla">MLA</a></li>
+ </ul></li>
+ <li><a href="#lists-of">Lists of Figures, Tables, and Equations</a>
+ <ul>
+ <li><a href="#lists-placement">Placement of Lists</a></li>
+ <li><a href="#lists-macros">Macros to generate Lists</a></li>
+ <li><a href="#formatting-lists">Formatting and style parameters for Lists</a>
+ <ul style="margin-left: -1em">
+ <li><a href="#lists-style">LISTS_STYLE</a></li>
+ </ul></li>
+ </ul></li>
+ <li><a href="#box-intro">Shaded backgrounds and frames (boxes)</a>
+ <ul>
+ <li><a href="#box-intro">Introduction and description</a></li>
+ <li><a href="#box">The BOX macro</a></li>
+ <li><a href="#box-notes">Additional notes on box usage and behaviour</a>
+ <ul>
+ <li><a href="#qbef">QUOTE, BLOCKQUOTE, EPIGRAPH, FLOAT</a></li>
+ <li><a href="#code">CODE</a></li>
+ <li><a href="#quotes">Description of boxed BLOCKQUOTEs and EPIGRAPHs</a>
+ <ul style="margin-left: -1em; list-style: disc;">
+ <li><a href="#leftover">Leftover box syndrome</a></li>
+ </ul></li>
+ <li><a href="#slides">Slides</a></li>
+ <li><a href="#footnotes">Footnotes</a></li>
+ </ul></li>
+ <li><a href="#page-color-intro">Page colour</a></li>
+ </ul>
+ </li>
+</ul>
+</div>
+
+<div class="rule-medium"><hr/></div>
+
+<h2 id="images-intro" class="docs">Inserting images and graphics</h2>
+
+<p>
+In order to include images in mom documents, the images must be in
+either PDF (.pdf) or EPS (.eps) format. Each format requires its own
+macro, but both take the same arguments, and in the same order.
+</p>
+
+<p>
+Please note that there are differences in the way the files
+containing PDF and EPS images must be processed, hence documents may
+not contain a mix.
+</p>
+
+<h3 id="converting" class="docs">Image conversion and file processing</h3>
+
+<p>
+When your image files are not in PDF or EPS format&mdash;jpgs,
+for example&mdash;you must convert them before including them in
+a mom document. Any utility for converting images may used. The
+ImageMagick suite of programmes, present on most GNU/Linux
+systems, contains <b>convert</b>, which is simple and effective.
+</p>
+
+<h4 id="pdf" class="docs">PDF</h4>
+
+<p>
+Assuming a jpg image, conversion to PDF is done like this:
+<br/>
+<span class="pre-in-pp">
+ convert &lt;image&gt;.jpg &lt;image&gt;.pdf
+</span>
+Any image type supported by <b>convert</b> may be converted this
+way.
+</p>
+
+<p>
+Mom files containing PDF images must be processed using
+groff&#8217;s pdf driver. Use of
+<a href="using.html#pdfmom" style="font-weight: bold">pdfmom</a>
+is strongly recommended, which natively invokes the pdf driver.
+<br/>
+<span class="pre-in-pp">
+ pdfmom doc.mom &gt; doc.pdf
+</span>
+</p>
+
+<h4 id="eps" class="docs">EPS</h4>
+
+<p>
+Assuming a jpg image, conversion to EPS is done like this:
+<br/>
+<span class="pre-in-pp">
+ convert &lt;image&gt;.jpg &lt;image&gt;.eps
+</span>
+Any image type supported by <b>convert</b> may be converted this
+way. There have been reports of trouble with PostScript level 2
+images, so don&#8217;t save your images in this format.
+</p>
+
+<p>
+Mom files containing EPS images must be processed using
+groff&#8217;s postscript driver. Use of
+<a href="using.html#pdfmom" style="font-weight: bold">pdfmom</a>,
+which can be told to use the postscript driver, is strongly
+recommended.
+<br/>
+<span class="pre-in-pp">
+ pdfmom -Tps doc.mom &gt; doc.pdf
+</span>
+</p>
+
+<!-- -PDF_IMAGE- -->
+
+<div class="macro-id-overline">
+<h3 id="pdf-image" class= "macro-id">PDF_IMAGE</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>PDF_IMAGE</b> \
+<br/>
+<kbd class="macro-args">[ -L | -C | -R | -I &lt;indent&gt; ] \
+<br/>
+&lt;pdf image file&gt; &lt;width&gt; &lt;height&gt; [ SCALE &lt;factor&gt; ] \
+<br/>
+[ ADJUST +|-&lt;vertical adjustment&gt; ] [ NO_SHIM ] [ NO_FLEX ] \
+<br/>
+[ FRAME ] \
+<br/>
+[ CAPTION "&lt;caption&gt;" ] [ SHORT_CAPTION "&lt;short caption&gt;" ] \
+<br/>
+[ LABEL "&lt;label&gt;" ] [ TARGET "&lt;name&gt;" ]</kbd>
+</div>
+<p class="requires">
+&bull;&nbsp;<span style="font-style: normal">
+<kbd>&lt;indent&gt;</kbd>,
+<kbd>&lt;width&gt;</kbd>,
+<kbd>&lt;height&gt;</kbd></span>
+and
+<span style="font-style: normal">
+<kbd>&lt;vertical adjustment&gt;</kbd></span>
+require a
+<a href="definitions.html#unitofmeasure">unit of measure</a>
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span>
+Mom files with embedded PDF images must be processed with
+pdfmom&nbsp;doc.mom&nbsp;&gt;&nbsp;doc.pdf. Arguments may be broken
+into several lines using the &#8220;line-continued&#8221; backslash
+(<b>\</b>), as shown above.
+</p>
+</div>
+
+<p>
+Unlike
+<a href="#pspic">PSPIC</a>,
+which it resembles, PDF_IMAGE requires that the pdf image&#8217;s
+dimensions (the bounding box,
+<a href="#bounding-box">see below</a>)
+be supplied each time it&#8217;s called.
+</p>
+
+<p>
+The first optional argument tells mom how to align the image
+horizontally, with <kbd>-L</kbd>, <kbd>-C</kbd>, and <kbd>-R</kbd>
+standing for left, centre and right respectively. If you need more
+precise placement, the <kbd>-I</kbd> argument allows you to give an
+indent from the left margin. Thus, to indent a PDF image 6
+<a href="definitions.html#picaspoints">picas</a>
+from the left margin
+<br/>
+<span class="pre-in-pp">
+ .PDF_IMAGE -I 6P &lt;remaining arguments&gt;
+</span>
+If you omit the first argument, the image will be centred.
+</p>
+
+<p>
+<kbd>&lt;pdf image&gt;</kbd> must be in PDF format, with a .pdf
+extension. If it is not, mom will abort with a message. See
+<a href="#pdf">here</a>
+for instructions on converting image formats to PDF.
+</p>
+
+<p id="bounding-box">
+<kbd>&lt;width&gt;</kbd> and <kbd>&lt;height&gt;</kbd> are the
+dimensions of the image&#8217;s bounding box. The most reliable way
+of getting the bounding box is with the utility, <strong>pdfinfo</strong>:
+<br/>
+<span class="pre-in-pp">
+ pdfinfo &lt;image.pdf&gt; | grep "Page *size"
+</span>
+This will spit out a line that looks like this:
+<br/>
+<span class="pre-in-pp">
+ Page size: width x height pts
+</span>
+<kbd>pts</kbd> means
+<a href="definitions.html#picaspoints">points</a>,
+therefore the unit of measure appended to <kbd>&lt;width&gt;</kbd>
+and <kbd>&lt;height&gt;</kbd> must be <kbd>p</kbd>.
+</p>
+
+<p>
+The remaining arguments are optional and may be entered in any
+order, although it&#8217;s best to put <kbd>CAPTION</kbd>,
+<kbd>SHORT_CAPTION</kbd>, and <kbd>LABEL</kbd> last.
+</p>
+
+<h5 class="docs" style="margin-top: 1em; text-transform: none">SCALE</h5>
+
+<p>
+<kbd>SCALE</kbd> allows you to scale the image by
+<kbd>&lt;factor&gt;</kbd>. The factor is a percentage of the
+image&#8217;s original dimensions, thus <kbd>SCALE&nbsp;50</kbd>
+scales the image to 50 percent of its original size. No percent
+sign or unit of measure should be appended.
+</p>
+
+<h5 class="docs" style="margin-top: 1em; text-transform: none">ADJUST</h5>
+
+<p>
+<kbd>ADJUST</kbd> lets you raise (<kbd>-</kbd>) or lower
+(<kbd>+</kbd>) the image
+<span style="font-style: italic">within the space allotted for it</span>
+by the amount you specify. This is useful for achieving good
+optical centering between surrounding blocks of type. A unit of
+measure is required.
+</p>
+
+<div class="box-tip">
+<p class="tip-top">
+<span class="note">Tip:</span>
+You may sometimes find that a PDF_IMAGE at the bottom of a page
+doesn&#8217;t sit flush on the bottom margin, however attempts to lower it
+by adding space beforehand result in it being deferred to the next
+page.
+</p>
+
+<p class="tip-bottom">
+The solution is to introduce <i>negative</i> space before the image
+so that it displays on the page, then lower it to the bottom margin
+with PDF_IMAGE&#8217;s ADJUST argument.
+</p>
+</div>
+
+<h5 class="docs" style="margin-top: 1em; text-transform: none">NO_SHIM</h5>
+
+<p>
+<kbd>NO_SHIM</kbd> instructs mom not to apply
+<a href="docprocessing.html#shim-vs-flex">shimming</a>
+after an image, which she will do automatically when shimming is
+enabled, which it is by default. Shimming ensures that running text
+after the image falls properly on the page&#8217;s
+<a href="definitions.html#baseline-grid">baseline grid</a>,
+but can result in slightly unequal spacing above and below
+(correctable with the <kbd>ADJUST</kbd> argument).
+<kbd>NO_SHIM</kbd> is useful when you have several images on the
+page and there are visible differences in the spacing beneath them
+as a result of shimming. To ensure a flush bottom margin, the last
+image on the page should be shimmed, i.e. should not be given the
+<kbd>NO_SHIM</kbd> argument.
+</p>
+
+<h5 class="docs" style="margin-top: 1em; text-transform: none">NO_FLEX</h5>
+
+<p>
+<kbd>NO_FLEX</kbd> instructs mom not to apply
+<a href="docprocessing.html#shim-vs-flex">flex-spacing</a>
+after an image, which she will do automatically when flex-spacing is
+enabled. <kbd>NO_FLEX</kbd> is useful when you have several images
+on the page and you want to distribute excess vertical
+whitespace on the page amongst other flex-spacing points on the
+page. If there are no others, the final image should be
+flex-spaced, i.e. not given the <kbd>NO_FLEX</kbd> argument.
+</p>
+
+<h5 class="docs" style="margin-top: 1em; text-transform: none">FRAME</h5>
+
+<p>
+<kbd>FRAME</kbd> instructs mom to put a frame around the image.
+Parameters for the frame are set with
+<a href="#pdf-image-frame">PDF_IMAGE_FRAME</a>.
+</p>
+
+<h5 class="docs" style="margin-top: 1em; text-transform: none">CAPTION</h5>
+
+<p>
+<kbd>CAPTION</kbd> allows you to give the image a caption. By
+default, the caption appears above the image, but may be attached to
+the label that appears beneath the image. See
+<a href="#caption-after-label">CAPTION_AFTER_LABEL</a>
+in
+<a href="#captions-and-labels">Captions and labels</a>.
+The text of the caption must be surrounded by double-quotes.
+</p>
+
+<h5 class="docs" style="margin-top: 1em; text-transform: none">SHORT_CAPTION</h5>
+
+<p>
+<kbd>SHORT_CAPTION</kbd> allows you to trim long captions for
+inclusion in the List of Figures. The text you supply, surrounded
+by double-quotes, is what will appear in the List.
+</p>
+
+<h5 class="docs" style="margin-top: 1em; text-transform: none">LABEL</h5>
+
+<p>
+<kbd>LABEL</kbd>, if given, appears beneath the image. The text you
+supply, surrounded by double-quotes, is how the image is labelled
+in both the document proper and the List of Figures. Mom provides
+an auto-labelling facility for images (see
+<a href="#autolabel">AUTOLABEL</a>),
+which, if enabled, overrides the <kbd>LABEL</kbd> argument.
+</p>
+
+<h5 class="docs" style="margin-top: 1em; text-transform: none">TARGET</h5>
+
+<p>
+<kbd>TARGET</kbd> followed by a unique name surrounded by
+double-quotes creates a PDF target for the image so that it may be
+linked to from other places in the file (with PDF_LINK; see
+<a href="version-2.html#mom-pdf">Producing PDFs with groff and mom</a>).
+</p>
+
+<p>
+<b><i>Please note:</i></b> The following functionality is available
+only with groff 1.22.4 or later.
+</p>
+
+<p>
+When
+<a href="#autolabel">autolabelling</a>
+is enabled and the document is processed with
+<a href="using.html#pdfmom" style="font-weight: bold">pdfmom</a>,
+the target name can be used to generate the target&#8217;s label
+number in running text if it is entered as a groff string, i.e. of the
+form <kbd><span class="nobr">\*[name]</span></kbd>. For example, if you create
+a target named &#8220;foo&#8221; for a pdf image whose autolabel
+number would be 3, entering
+<br/>
+<span class="pre-in-pp">
+ See
+ .PDF_LINK foo "Figure \*[foo]"
+</span>
+anywhere in running text would result in a pdf link that reads
+&#8220;Figure 3&#8221;. If chapter numbers are being prefixed to
+labels, the same string in, say, chapter 5 would produce the pdf
+link &#8220;Figure 5.3&#8221;.
+</p>
+
+<div class="box-tip">
+<p class="tip-top">
+<span class="note">Note: Version 2.0-c change</span>
+<br/>
+Mom now treats all pdf images identically to
+<a href="#floats-intro">floats</a>,
+which is to say that if an image doesn&#8217;t fit on the output
+page, she will defer it to the top of the next page while continuing
+to process
+<a href="definitions.html#running">running text</a>.
+<kbd>ADJUST</kbd> is ignored whenever an image is the first to be
+deferred, except when moving from column to column on the same page,
+when the image may need to be optically adjusted. Subsequent images
+that do not fit, if any, are output in order immediately after the
+first.
+</p>
+
+<p class="tip-bottom">
+Prior to 2.0-c, it was recommended that images be wrapped inside
+<a href="#float">FLOAT</a>,
+but this is now no longer required, and should, in fact, be avoided.
+</p>
+</div>
+
+<!-- -PDF_IMAGE_FRAME- -->
+
+<div class="macro-id-overline">
+<h3 id="pdf-image-frame" class= "macro-id">PDF_IMAGE_FRAME</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>PDF_IMAGE_FRAME</b> <kbd class="macro-args">&lt;inset amount&gt; &lt;rule weight&gt; &lt;color&gt;</kbd>
+</div>
+<p class="requires">
+&bull;&nbsp;<span style="font-style: normal"><kbd>&lt;inset amount&gt;</kbd></span>
+requires a
+<a href="definitions.html#unitofmeasure">unit of measure</a>;
+conversely,
+<span style="font-style: normal"><kbd>&lt;rule weight&gt;</kbd></span>
+must not have a unit of measure appended
+</p>
+
+<p>
+PDF_IMAGE_FRAME establishes the parameters for subsequent invocations of
+<a href="#pdf-image">PDF_IMAGE</a>
+when the <kbd>FRAME</kbd> argument is given. Arguments must appear
+in order, and any you wish left at the current value should be
+entered as two adjacent double-quotes. So, for example,
+<br/>
+<span class="pre-in-pp">
+ .PDF_IMAGE_FRAME "" "" blue
+</span>
+leaves the inset value and rule weight at their current value and
+changes the frame colour to blue.
+</p>
+
+<p>
+Frames are drawn <span class="italic">outside</span> the image at
+its requested dimensions inclusive of scaling. Colours must be
+pre-initialized with
+<a href="color.html#xcolor">XCOLOR</a>
+or
+<a href="color.html#newcolor">NEWCOLOR</a>.
+</p>
+
+<p>
+The default inset is 6 <a
+href="definitions.html#picaspoints">points</a>, the default rule
+weight is .5 (points), and the default colour is black.
+</p>
+
+<!-- -PSPIC- -->
+
+<div class="macro-id-overline">
+<h3 id="pspic" class= "macro-id">PSPIC</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>PSPIC</b> <kbd class="macro-args">[ -L | -R | -I &lt;n&gt; ] &lt;file&gt; [ width [ height ] ]</kbd>
+</div>
+
+<p>
+PSPIC is not actually part of mom, but rather a macro included with
+every groff installation. <kbd>man groff_tmac</kbd> contains the
+documentation for PSPIC, but I&#8217;ll repeat it here with a few
+modifications for clarity.
+</p>
+
+<div class="examples-container">
+<h3 id="groff-tmac" class="docs" style="margin-top: .5em;">From <span style="text-transform: none">groff_tmac</span></h3>
+<p style="margin-top: .5em; margin-bottom: .5em;">
+<kbd>&lt;file&gt;</kbd> is the name of the file containing the
+image; <kbd>width</kbd> and <kbd>height</kbd> give the desired
+width and height of the image as you wish it to appear within the
+document. The width and height arguments may have
+<a href="definitions.html#unitofmeasure">units of measure</a>
+attached; the default unit of measure is <kbd>i</kbd>. PSPIC will
+scale the graphic uniformly in the x and y directions so that
+it is no more than <kbd>width</kbd> wide and <kbd>height</kbd>
+high. By default, the graphic will be horizontally centred. The
+<kbd>-L</kbd> and <kbd>-R</kbd> options cause the graphic to be
+left-aligned and right-aligned, respectively. The <kbd>-I</kbd>
+option causes the graphic to be indented by <kbd>&lt;n&gt;</kbd>;
+the default unit of measure is <kbd>m</kbd>
+(<a href="definitions.html#em">ems</a>).
+</p>
+</div>
+
+<p>
+It is not necessary to pass PSPIC the <kbd>&lt;width&gt;</kbd>
+and <kbd>&lt;height&gt;</kbd> arguments unless you are scaling
+the image, in which case you will most likely need the original
+dimensions of the EPS image&#8217;s bounding box. These can be
+found with
+<br/>
+<span class="pre-in-pp">
+ gs -q -dBATCH -dNOPAUSE -sDEVICE=bbox &lt;image file&gt;.pdf 2&gt;&amp;1 \
+ | grep "%%BoundingBox" | cut -d " " -f4,5
+</span>
+The two digits returned are in
+<a href="definitions.html#picaspoints">points</a>,
+therefore the
+<a href="definitions.html#unitofmeasure">unit of measure</a>
+<kbd>p</kbd> must be appended to them.
+</p>
+
+<p>
+Because PSPIC lacks the <kbd>ADJUST</kbd> option offered by
+<a href="#pdf-image">PDF_IMAGE</a>
+a certain amount of manual tweaking of the vertical placement of the
+image will probably be required, typically by using the
+<a href="typesetting.html#ald">ALD</a>
+and
+<a href="typesetting.html#rld">RLD</a>
+macros. Wrapping the image in a
+<a href="#float">float</a>
+and using FLOAT&#8217;s <kbd>ADJUST</kbd> option can also be used to
+correct optical centering.
+</p>
+
+<p>
+Additionally, non-floated EPS images
+will almost certainly disrupt the baseline placement of
+<a href="definitions.html#running">running text</a>.
+In order to get mom back on track after inserting a non-floated
+<kbd>.PSPIC</kbd> image, insert the
+<a href="docprocessing.html#shim">SHIM</a>
+or
+<a href="docprocessing.html#flex">FLEX</a>
+macro afterwards, depending on the
+<a href="docprocessing.html#vertical-whitespace-management">vertical whitespace management</a>
+strategy in effect, so that the bottom margin of running text falls
+where it should.
+</p>
+
+<p>
+Remember that mom files with embedded EPS images must be processed
+with
+<br/>
+<span class="pre-in-pp">
+ pdfmom -Tps doc.mom &gt; doc.pdf
+</span>
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Please note:</span>
+<kbd>PSPIC</kbd> does not support
+<a href="autolabel">autolabelling</a>,
+labels, captions, or inclusion in the List of Figures. If you wish
+this functionality,
+<a href="#converting">convert your images to pdf</a>
+and use
+<a href="#pdf-image">PDF_IMAGE</a>
+instead, then process the file with
+<a href="using.html#pdfmom" style="font-weight: bold">pdfmom</a>
+(without the <kbd>-Tps</kbd> option).
+</p>
+</div>
+<div class="rule-medium"><hr/></div>
+
+<h2 id="floats-intro" class="docs">Introduction to floats</h2>
+
+<p>
+Non-textual insertions in a document (tables, for example) sometimes
+do not fit on the output page of a PDF or PostScript document at
+the place they&#8217;re inserted in the input file. It&#8217;s
+necessary, therefore, to defer them to the next page while carrying
+on with
+<a href="definitions.html#running">running text</a>.
+</p>
+
+<p>
+Whenever you need this functionality, mom provides the FLOAT macro.
+</p>
+
+<p>
+Floats are usually used for images and graphics, but can contain
+anything you like, including text. Whatever&#8217;s in the
+float will be kept together as a block, output immediately if
+there&#8217;s room, or deferred to the top of the next output page
+when there isn&#8217;t; running text continues to the bottom of the
+previous page without interruption.
+</p>
+
+<p>
+In the case of a float that doesn&#8217;t fit being followed by
+one that does, both are deferred and output one after the other.
+Note that this represents a change from versions 2.1-b_1 and earlier
+where the second float was output in position and the first was
+deferred.
+</p>
+
+<p>
+A key distinction between a float and a
+<a href="docelement.html#quote">QUOTE</a>
+or
+<a href="docelement.html#blockquote">BLOCKQUOTE</a>
+is that while a float keeps everything together and defers output if
+necessary, quotes and blockquotes are output immediately, and may
+start on one page and finish on the next.
+</p>
+
+<p>
+Floats always begin in
+<a href="definitions.html#filled">no-fill mode</a>.
+Text entered immediately after FLOAT will be set line-for-line
+unless a
+<a href="typesetting.html#justify">JUSTIFY</a>
+or
+<a href="typesetting.html#quad">QUAD&nbsp;L|R|C</a>
+precedes it. Alternatively, any macro that sets a quad direction
+may be used, e.g.
+<a href="docelement.html#pp">PP</a>.
+</p>
+
+<p>
+Floats always deposit a break before they begin, which means the
+line beforehand will not be
+<a href="definitions.html#filled">filled</a>.
+Floats, therefore, cannot be inserted in the middle of a paragraph
+without studying the output file and determining where to break or
+<a href="typesetting.html#spread">spread</a>
+the line before the float. Furthermore, if you want a float between
+paragraphs, the float should come before <kbd>.PP</kbd>, like this:
+<br/>
+<span class="pre-in-pp">
+ .FLOAT
+ ...
+ .FLOAT OFF
+ .PP
+</span>
+not
+<br/>
+<span class="pre-in-pp">
+ .PP
+ .FLOAT
+ ...
+ .FLOAT OFF
+</span>
+</p>
+
+<p id="float-spacing">
+Floats begin on the baseline immediately below the running text
+preceding them. No additional whitespace surrounds them, above or
+below. Running text below a float is, however,
+<a href="docprocessing.html#shim">shimmed</a>
+or
+<a href="docprocessing.html#flex">flex-spaced</a>,
+depending on the
+<a href="docprocessing.html#vertical-whitespace-management">vertical whitespace management</a>
+strategy in effect. This behaviour can be disabled for individual
+floats with <kbd>NO_SHIM</kbd> or <kbd>NO_FLEX</kbd>.
+</p>
+
+<p>
+If you&#8217;d like more space around a float, you must add it
+manually, for example with
+<a href="typesetting.html#ald">ALD</a>
+or
+<a href="typesetting.html#space">SPACE</a>.
+</p>
+
+<!-- -FLOAT- -->
+
+<div class="macro-id-overline">
+<h3 id="float" class= "macro-id">FLOAT</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>FLOAT</b> <kbd class="macro-args">&lt;arguments&gt; | &lt;anything&gt;
+<br/>
+Arguments:
+<br/>
+[ ADJUST +|-&lt;amount&gt; ] \
+<br/>
+[ FORCE ] \
+<br/>
+[ SPAN ] \
+<br/>
+[ INDENT &lt;value&gt; ] \
+<br/>
+[ CENTER ] \
+<br/>
+[ RIGHT ] \
+<br/>
+[ NO_SHIM] \
+<br/>
+[ NO_FLEX ] \
+<br/>
+[ TARGET "&lt;name&gt;" ]</kbd>
+<br/>
+</div>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span>
+FLOAT is intended for use with the document processing macros only.
+</p>
+</div>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span>
+As a general rule, avoid consecutive floats that have no intervening
+<a href="definitions.html#running">running text</a>.
+Rather, wrap all the material into a single float.
+</p>
+</div>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span>
+Deferred floats are output with the left indent that was in effect
+when they were input. If you do not want this behaviour, disable
+the indent prior to inputting the float and re-enable it afterward.
+</p>
+</div>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span>
+Mom treats <b>pic</b> pre-processor directives and pdf images as
+floats so it is not necessary to wrap them inside FLOAT unless
+additional material is included in what is floated.
+</p>
+</div>
+
+<p style="margin-top: -.5em">
+To begin a float, simply invoke <kbd>.FLOAT</kbd> and follow it with
+whatever you want the float to contain. When you&#8217;re done,
+invoke <kbd>.FLOAT&nbsp;OFF</kbd> (or <kbd>OFF</kbd>,
+<kbd>QUIT</kbd>, <kbd>END</kbd>, <kbd>X</kbd>, etc).
+</p>
+
+<h5 class="docs" style="margin-top: 1em; text-transform: none">ADJUST</h5>
+
+<p>
+The optional <kbd>ADJUST</kbd> argument tells mom to raise
+(<kbd>+</kbd>) or lower (<kbd>-</kbd>) the float <i>within
+the space allotted to it</i> by the specified amount.
+<kbd>&lt;amount&gt;</kbd> must have a
+<a href="definitions.html#unitofmeasure">unit of measure</a>
+appended. <kbd>ADJUST</kbd> gives you precise control over
+the vertical centering of floats, allowing you to compensate for
+unequal spacing that may result from the automatic
+<a href="docprocessing.html#shim">shimming</a>
+or
+<a href="docprocessing.html#flex">flex-spacing</a>
+floats.
+</p>
+
+<p>
+<kbd>ADJUST</kbd> is ignored for the first float deferred to
+a following page but respected for subsequent deferred floats
+output immediately afterwards.
+</p>
+
+<h5 class="docs" style="margin-top: 1em; text-transform: none">FORCE</h5>
+
+<p>
+The <kbd>FORCE</kbd> argument instructs mom to output the float
+exactly where it occurs in the input file. With <kbd>FORCE</kbd>,
+mom immediately breaks to a new page to output the float if it does
+not fit on the current page. While this is somewhat contrary to the
+notion of floats (i.e. that running text should continue to fill the
+page), there are circumstances where it may be desirable.
+</p>
+
+<p>
+If you need to force a page break after completion of a float that
+has been deferred to a subsequent page, insert <kbd>\!.bp</kbd>
+immediately before terminating the float.
+</p>
+
+<h5 class="docs" style="margin-top: 1em; text-transform: none">SPAN</h5>
+
+<p>
+The <kbd>SPAN</kbd> argument tells mom that a float, if deferred,
+may carry onto multiple pages. Please note that <kbd>SPAN</kbd> may
+not be used for floats containing a boxed table; mom will abort with
+a warning should this occur. Unboxed tables, on the other hand, are
+acceptable within floats that are given the <kbd>SPAN</kbd> argument.
+</p>
+
+<h5 class="docs" style="margin-top: 1em; text-transform: none">INDENT</h5>
+
+<p>
+<kbd>INDENT</kbd> allows you to indent a float from the left margin
+by a specified value. The value must have a
+(<a href="definitions.html#unitofmeasure">unit of measure</a>
+appended to it.
+</p>
+
+<h5 class="docs" style="margin-top: 1em; text-transform: none">CENTER</h5>
+
+<p>
+<kbd>CENTER</kbd> instructs mom to center a float if it is not
+already centered by default.
+</p>
+
+<h5 class="docs" style="margin-top: 1em; text-transform: none">RIGHT</h5>
+
+<p>
+<kbd>RIGHT</kbd> instructs mom to place a float at the right of the
+page; the longest line in the float will be flush with the
+page&#8217;s right margin.
+</p>
+
+<h5 class="docs" style="margin-top: 1em; text-transform: none">NO_SHIM</h5>
+
+<p>
+<kbd>NO_SHIM</kbd> instructs mom not to apply
+<a href="docprocessing.html#shim-vs-flex">shimming</a>
+after a float, which she will do automatically when shimming is
+enabled, which it is by default. Shimming ensures that running text
+after the float falls properly on the page&#8217;s
+<a href="definitions.html#baseline-grid">baseline grid</a>,
+but can result in slightly unequal spacing above and below
+(correctable with the <kbd>ADJUST</kbd> argument).
+<kbd>NO_SHIM</kbd> is useful when you have several floats on the
+page and there are visible differences in the spacing beneath them
+as a result of shimming. To ensure a flush bottom margin, the last
+float on the page should be shimmed, i.e. should not be given the
+<kbd>NO_SHIM</kbd> argument.
+</p>
+
+<h5 class="docs" style="margin-top: 1em; text-transform: none">NO_FLEX</h5>
+
+<p>
+<kbd>NO_FLEX</kbd> instructs mom not to apply
+<a href="docprocessing.html#shim-vs-flex">flex-spacing</a>
+after a float, which she will do automatically when flex-spacing is
+enabled. <kbd>NO_FLEX</kbd> is useful when you have several floats
+on the page and you want to distribute excess vertical
+whitespace on the page amongst other flex-spacing points on the
+page. If there are no others, the final float should be
+flex-spaced, i.e. not given the <kbd>NO_FLEX</kbd> argument.
+</p>
+
+<h5 class="docs" style="margin-top: 1em; text-transform: none">TARGET</h5>
+
+<p>
+<kbd>TARGET</kbd> followed by a unique name surrounded by
+double-quotes creates a PDF target for the float so that it may be
+linked to from other places in the file (with PDF_LINK; see
+<a href="version-2.html#mom-pdf">Producing PDFs with groff and mom</a>).
+</p>
+
+<p>
+Floats cannot be autolabelled, so unlike pdf images and
+pre-processor material, the target name cannot be used as a string
+to generate the target&#8217;s label number in running text. Label
+numbers for floats must be entered explicitly running text, however
+they may be entered symbolically in the argument to
+<a href="#label">LABEL</a>.
+See
+<a href="#reserved-label-strings">Reserved variables for
+labels</a>.
+</p>
+
+
+<div class="box-tip">
+<p class="tip-top">
+<span class="note">Note:</span>
+Floats use
+<a href="definitions.html#filled">no-fill mode</a>,
+with each input line beginning at the left margin. If this is not
+what you want, you must specify the preferred horizontal alignment
+<i>within the float</i> (e.g.
+<a href="typesetting.html#lrc">CENTER</a>
+or
+<a href="typesetting.html#lrc">RIGHT</a>).
+</p>
+
+<p class="tip-bottom">
+Furthermore, if you want text
+<a href="definitions.html#filled">filled</a>,
+you must specify
+<a href="typesetting.html#quad"><kbd>.QUAD&nbsp;L|R|C</kbd></a>
+or
+<a href="typesetting.html#justify"><kbd>.JUSTIFY</kbd></a>&mdash;again,
+within the float.
+</p>
+</div>
+
+<h2 id="float-label-caption" class="docs">Labelling and captioning floats</h2>
+
+<p>
+Labelling and captioning of tables (<b>tbl</b>), equations
+(<b>eq</b>), diagrams (<b>pic</b>) and pdf images
+(<a href="#pdf-image">PDF_IMAGE</a>)
+are handled by the macros that initiate them, regardless of whether
+they&#8217;re wrapped inside a float. However, since a float may
+contain any valid input, it is sometimes necessary to add a label
+and/or caption to the float itself.
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="important">Important:</span>
+Always use the native labelling/captioning facilities for
+preprocessor output and pdf images rather than labelling the
+containing float, if any.
+</p>
+</div>
+
+<p>
+The macros to label and caption floats are
+<a href="#label">LABEL</a>
+and
+<a href="#caption">CAPTION</a>.
+If a label or caption is to appear above the float, the appropriate
+macro is entered immediately after
+<a href="#float">FLOAT</a>.
+If a label or caption is to appear beneath the float, the appropriate
+macro is entered immediately before ending the float with
+<kbd>FLOAT&nbsp;OFF</kbd>.
+</p>
+
+<p>
+If a label and caption are to be joined, the <b>LABEL</b> macro is
+used to enter both by passing the <kbd>CAPTION</kbd> argument to
+<kbd>LABEL</kbd>.
+</p>
+
+<p>
+It is impossible for mom to know the contents of a float, so
+floats cannot be autolabelled. Each label must be entered
+explicitly. Mom does, however, provide a way to enter both
+chapter numbers and incrementing label numbers
+<a href="#reserved-label-strings">symbolically</a>,
+easing the burden of keeping the numbering scheme intact as
+labelled floats are added to or subtracted from a document.
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Tip:</span>
+<a href="docelement.html#blockquote">QUOTE</a>
+and
+<a href="docelement.html#blockquote">BLOCKQUOTE</a>
+may also be labelled and captioned using <b>LABEL</b> and
+<b>CAPTION</b>.
+</p>
+</div>
+
+<h4 class="docs">Spacing</h4>
+
+<p>
+If a float has a caption at the top, the caption is whitespaced
+1/4 linespace from running text and the float itself begins
+an additional 1/4 linespace below the caption. If the float has
+no corresponding label at the bottom, the float observes the
+bottom-spacing rules for all floats, namely that no extra space is
+added other than
+<a href="docprocessing.html#shim">shimming</a>
+or
+<a href="docprocessing.html#shim-vs-flex">flex-spacing</a>,
+depending on the
+<a href="docprocessing.html#vertical-whitespace-management">vertical whitespace management</a>
+in effect.
+</p>
+
+<p>
+If a float has a label at the bottom but no caption at the top, the
+float begins exactly where started, i.e. with no extra whitespace
+between running text and the float. The label (and attached
+caption, if any) are whitespaced 1/4 linespace below the float,
+with an additional 1/4 linespace underneath <i>plus</i> shimming or
+flex-spacing.
+</p>
+
+<p>
+Labelled/captioned quotes and blockquotes inside floats treat the
+labels/captions as part of the quote so the spacing above and
+below the whole float block is what you&#8217;d expect from quotes
+normally, while the spacing between the label/caption and the quote
+is 1/4 linespace.
+</p>
+
+<div class="macro-id-overline">
+<h3 id="label" class="macro-id">LABEL</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>LABEL</b>
+<kbd class="macro-args">"&lt;label&gt;" [ CAPTION "&lt;caption&gt;" ] [ SHORT_CAPTION ] \
+<br/>
+[ TO_LIST FIGURES | TABLES | EQUATIONS ]</kbd>
+</div>
+
+<p>
+The placement of a float&#8217;s label depends on where you put it
+inside the float.
+</p>
+
+<p>
+If you want a label at the top, put <kbd>LABEL</kbd> immediately
+underneath
+<a href="#float">FLOAT</a>
+and follow it with the text of the label surrounded by double-quotes:
+<br/>
+<span class="pre-in-pp">
+ .FLOAT
+ .LABEL "Fig. 1"
+</span>
+If you want a label at the bottom, put <kbd>LABEL</kbd> immediately
+before ending the float:
+<br/>
+<span class="pre-in-pp">
+ .FLOAT
+ &lt;contents of float&gt;
+ .LABEL "Fig. 1"
+ .FLOAT OFF
+</span>
+</p>
+
+<h3 id="reserved-label-strings" class="docs" style="text-transform: none">Reserved variables for labels</h3>
+
+<p>
+Mom reserves strings you may use when entering
+label text after the <kbd>LABEL</kbd> argument.
+<kbd><span class="nobr">\*[chapter]</span></kbd> holds the current chapter
+or major section number. <kbd><span class="nobr">\*[fig-label]</span></kbd>,
+<kbd><span class="nobr">\*[tbl-label]</span></kbd>, and
+<kbd><span class="nobr">\*[eqn-label]</span></kbd> increment the label number of
+the appropriate label type by one, and are initially set to zero
+after each invocation of
+<a href="docprocessing.html#start">START</a>
+when the
+<a href="docprocessing.html#doctype">DOCTYPE</a>
+is <kbd>CHAPTER</kbd>. Thus, in every chapter requiring numbered
+float labels, you can enter
+<br/>
+<span class="pre-in-pp">
+ .LABEL "Fig. \*[chapter].\*[fig-label]. TO_LIST FIGURES
+</span>
+which, assuming the third autolabelled float of Chapter 2, will
+produce <kbd>Fig. 2.3.</kbd>
+</p>
+
+<p>
+If your <b>DOCTYPE</b> is <kbd>DEFAULT</kbd> or <kbd>NAMED</kbd>,
+you must reset <kbd><span class="nobr">\*[&lt;type&gt;-label]</span></kbd> after
+each
+<a href="docprocessing.html#collate">COLLATE</a>
+by entering
+<br/>
+<span class="pre-in-pp">
+ .AUTOLABEL_&lt;list type&gt;
+</span>
+before <kbd>.START</kbd>.
+</p>
+
+<p>
+If
+<a href="#autolabel">autolabelling</a>
+is enabled, e.g. <kbd>.AUTOLABEL_IMAGES</kbd> (List
+of Figures) or <kbd>.AUTOLABEL_PIC</kbd> (also List of Figures),
+the prefix is stripped from the label when it appears in
+the List. Thus, if you have invoked <kbd>.AUTOLABEL_PIC</kbd>,
+<br/>
+<span class="pre-in-pp">
+ .LABEL "Fig. 1.1."
+ CAPTION "Caption for label \
+ TO_LIST FIGURES
+</span>
+or
+<br/>
+<span class="pre-in-pp">
+ .LABEL "Fig. \*[chapter].\*[label]." \
+ CAPTION "Caption for label \
+ TO_LIST FIGURES
+</span>
+will appear in the List of Figures as &#8220;1.1.&nbsp;&nbsp;Caption for
+label&#8221;.
+</p>
+
+<h3 class="docs">CAPTION</h3>
+
+<p>
+If you&#8217;d like a caption attached to the label, pass
+<kbd>LABEL</kbd> the optional argument <kbd>CAPTION</kbd> followed
+by the text of the caption as a single string surrounded by
+double-quotes:
+<br/>
+<span class="pre-in-pp">
+ .FLOAT
+ &lt;contents of float&gt;
+ .LABEL "Fig. 1" CAPTION "Caption for Fig. 1"
+ .FLOAT OFF
+</span>
+Note that the
+<a href="#caption">CAPTION</a>
+macro by itself permits entering several strings, each output on
+a line by itself, whereas the <kbd>CAPTION</kbd> argument to
+<kbd>LABEL</kbd> accepts only a single string.
+</p>
+
+<h3 class="docs">SHORT_CAPTION</h3>
+
+<p>
+If your caption runs long and you&#8217;re including the
+float in a &#8220;List of ...&#8221;, (see
+<a href="#list-of">TO_LIST</a>, below)
+<kbd>SHORT_CAPTION</kbd> tells
+mom how you&#8217;d like the caption to appear in the List.
+</p>
+
+<h3 class="docs">TO_LIST</h3>
+
+<p>
+The optional argument <kbd>TO_LIST</kbd> tells mom to add the
+float&#8217;s label and attached caption, if present, to the specified
+<a href="#lists-of">list</a>,
+which may be one of <kbd>FIGURES</kbd>, <kbd>TABLES</kbd>, or
+<kbd>EQUATIONS</kbd>.
+</p>
+
+<p>
+If, for some reason, you want only the caption appended to the List,
+give <kbd>\&amp;</kbd> as the first argument to LABEL, followed by
+<kbd>CAPTION&nbsp;&#8220;caption&#8221;</kbd>:
+<br/>
+<span class="pre-in-pp">
+ .LABEL \&amp; \
+ CAPTION "caption"
+</span>
+</p>
+
+<div class="box-tip">
+<p class="tip-top">
+<span class="note">Tip:</span>
+<kbd>TO_LIST</kbd> can be used to handle situations where labelled
+floats need to go to a uniquely named &#8220;List of ...&#8221;.
+</p>
+
+<p class="tip-bottom">
+Suppose, for example, your document contains figures (e.g.
+<b>pic</b> output or pdf-images) and tables, and you need a
+&#8220;List of Examples&#8221; for floats labelled &#8220;Example
+n.n&#8221;. By changing the default title string for
+<a href="#lists-macros">LIST_OF_EQUATIONS</a>
+to &#8220;List of Examples&#8221;, you may include the float in your
+List of Examples with
+<br/>
+<span class="pre-in-pp">
+ .TO_FIGURES EQUATIONS
+</span>
+</p>
+</div>
+
+<div class="macro-id-overline">
+<h3 id="caption" class="macro-id">CAPTION</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>CAPTION</b>
+<kbd class="macro-args">"&lt;caption&gt;" \
+<br/>
+[ "&lt;additional line&gt;" [ "&lt;additional line&gt;"... ] ] \
+<br/>
+[ TO_LIST FIGURES | TABLES | EQUATIONS ]</kbd>
+</div>
+
+<p>
+The placement of a float&#8217;s caption depends on where you put it
+inside the float.
+</p>
+
+<p>
+If you want a caption at the top, put <kbd>CAPTION</kbd> immediately
+underneath
+<a href="#float">FLOAT</a>
+and follow it with the text of the caption surrounded by double-quotes:
+<br/>
+<span class="pre-in-pp">
+ .FLOAT
+ .CAPTION "Caption at top of float"
+</span>
+<b>CAPTION</b> can take multiple string arguments, allowing for
+captions that run to several lines. There is a caveat: the strings
+are not automatically broken into individual lines. You must
+provide strings that include literal breaks or spaces:
+<br/>
+<span class="pre-in-pp">
+ .FLOAT
+ .CAPTION "Caption" ".BR" "at top" ".BR" "of float"
+</span>
+or, easier to read:
+<br/>
+<span class="pre-in-pp">
+ .FLOAT
+ .CAPTION "Caption" \
+ ".BR" \
+ "at top" \
+ ".BR" \
+ "of float"
+</span>
+If you want a caption at the bottom, put <kbd>CAPTION</kbd> immediately
+before ending the float:
+<br/>
+<span class="pre-in-pp">
+ .FLOAT
+ &lt;contents of float&gt;
+ .CAPTION "Caption at bottom of float"
+ .FLOAT OFF
+</span>
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span>
+If you want a caption attached to a label, do not use
+<b>CAPTION</b> by itself. Rather, invoke
+<a href="#label"><kbd>.LABEL</kbd></a>
+with the <kbd>CAPTION</kbd> argument.
+</p>
+</div>
+
+<div class="rule-medium"><hr/></div>
+
+<h2 id="preprocessor-support" class="docs">Preprocessor support</h2>
+
+<p>
+Mom offers full support for the <b>eqn</b> (equations), <b>pic</b>
+(diagrams), <b>grap</b> (graphs), <b>tbl</b> (tables) and
+<b>refer</b> (bibliographies/citations) preprocessors, including
+captions, labelling, autolabelling, and inclusion in the Lists of
+Equations, Figures, and Tables.
+</p>
+
+<p>
+Other than <b>refer</b>, which is discussed at length in the <a
+href="refer.html">Bibliographies and references</a> section, it is
+beyond the scope of this documentation to cover full preprocessor
+usage. Consult the manpages <b>eqn(1)</b>, <b>pic(1)</b>,
+<b>grap(1)</b> and <b>tbl(1)</b> for instructions.
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Version 2.0-c changes</span>
+<br/>
+Preprocessor support has been revised and expanded as of version 2.0-c.
+Please read the following sections thoroughly and update any
+documents created with versions prior to 2.0-c as necessary.
+</p>
+</div>
+
+<h3 id="tbl" class="docs">tbl support</h3>
+
+<p>
+Mom documents can include tables generated with the groff
+preprocessor <b>tbl</b>. If you are unfamiliar with <b>tbl</b>, I
+recommend downloading a copy of
+<a href="http://plan9.bell-labs.com/10thEdMan/tbl.pdf">Tbl - A Program to Format Tables</a>,
+which, in addition to providing a thorough introduction, contains
+some fine examples. If you use <b>tbl</b>, you must pass groff or
+pdfmom the <b>-t</b> flag when you process the file.
+</p>
+
+<p>
+Tables formatted with <kbd>tbl</kbd> begin with the macro
+<kbd>.TS</kbd> (<b>T</b>able <b>S</b>tart) and end with
+<kbd>.TE</kbd> (<b>T</b>able <b>E</b>nd). Depending on where you
+want your tables output in a document, you may need to wrap
+your <kbd>tbl</kbd> code inside a
+<a href="#floats-intro">float</a>,
+or pass the <kbd>H</kbd> argument to <kbd>.TS</kbd>.
+</p>
+
+<p>
+If you put <kbd>tbl</kbd> code inside a float, the table will be
+output immediately if it fits on the page, or deferred to the top
+of the next page if it doesn&#8217;t. If you prefer a table to
+begin where you say and span over to the next page, or if you know
+for certain a boxed table will run to multiple pages, simply pass the
+<kbd>H</kbd> argument to <kbd>.TS</kbd>, along with a corresponding
+<a href="#th"><kbd>TH</kbd></a>
+and do not wrap the table inside a float.
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span>
+If you create a boxed table that will span several pages, do not
+wrap the table inside a float. Boxed, multipage tables and FLOAT
+should be considered mutually exclusive. This restriction is
+imposed by the <kbd>tbl</kbd> preprocessor itself, not groff or
+mom. Unboxed tables that span several pages, however, are
+acceptable within FLOAT.
+</p>
+</div>
+
+<h4 id="tbl-placement" class="docs">tbl placement in mom docs</h4>
+
+<p>
+If you use <kbd>.TS</kbd> without the <kbd>H</kbd> argument (and
+therefore no <kbd>.TH</kbd>), tables that fit on the page are output
+in position. If there is not enough room to output the table,
+<kbd>tbl</kbd> will abort with message instructing you to use
+<kbd>.TS H/.TH</kbd>. Given that <kbd>.TS</kbd> without <kbd>H</kbd>
+may sometimes fail, it is advisable to begin all <b>tbl</b> blocks
+with <kbd>.TS H</kbd>.
+</p>
+
+<p>
+If you give <kbd>.TS</kbd> the <kbd>H</kbd> argument (with a
+corresponding <kbd>.TH</kbd>), tables will be output in position and
+span as many pages as necessary to complete output. A table header
+will be printed at the top of each page&#8217;s table output. In the
+event that there is not enough room to print the table header and
+at least one row of table data near the bottom of a page, mom will
+break to a new page before beginning table output, leaving a gap
+in
+<a href="definitions.html#running">running text</a>.
+</p>
+
+<p>
+Boxed tables inside
+<a href="#floats-intro">floats</a>
+are output in position if they fit on the page. If not, they are
+deferred to the top of the next page without a break in running
+text. Boxed tables within floats may not, however, span multiple
+pages; mom will abort with a message should a boxed table in a float
+run longer than the page.
+</p>
+
+<p>
+Unboxed tables inside floats may span multiple pages provided the
+<kbd>SPAN</kbd> argument has been given to
+<a href="#float">FLOAT</a>.
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span>
+The vertical spacing around unfloated tables may appear slightly
+unequal, especially if there are several tables on the page. This
+is a result of the
+<a href="docprocessing.html#shim">shimming</a>
+or
+<a href="docprocessing.html#flex">flex-spacing</a>
+that mom applies automatically after each table, depending on which
+<a href="docprocessing.html#vertical-whitespace-management">vertical whitespace management</a>
+is in effect. You may
+disable shimming or flex-spacing with
+<a href="docprocessing.html#no-shim">NO_SHIM</a>
+or
+<a href="docprocessing.html#no-flex">NO_FLEX</a>,
+or by passing the <kbd>NO_SHIM</kbd> or <kbd>NO_FLEX</kbd> argument
+to <kbd>.TS</kbd>. In either case, you will still likely want to
+adjust the spacing around with table with the <kbd>ADJUST</kbd>
+argument to <kbd>.TS</kbd>. Tables inside floats should be adjusted
+with the <kbd>ADJUST</kbd> argument to
+<a href="#float">FLOAT</a>,
+not the <kbd>ADJUST</kbd> argument to <kbd>.TS</kbd>.
+</p>
+</div>
+
+<div class="macro-id-overline">
+<h3 id="ts-te" class= "macro-id">.TS / .TH / .TE</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <a href="#ts"><b>TS</b></a>
+<kbd class="macro-args"><br/>
+Arguments:
+<br/>
+&nbsp;&nbsp;[ H ]
+<br/>
+&nbsp;&nbsp;[ BOXED ]
+<br/>
+&nbsp;&nbsp;[ CENTER ]
+<br/>
+&nbsp;&nbsp;[ NEEDS ]
+<br/>
+&nbsp;&nbsp;[ ADJUST +|-&lt;vertical adjustment&gt;]</kbd>
+<span style="font-size: 95%">
+(<a href="definitions.html#unitofmeasure">unit of measure</a>
+required)
+</span>
+<kbd class="macro-args"><br/>
+&nbsp;&nbsp;[ NO_SHIM ]
+<br/>
+&nbsp;&nbsp;[ NO_FLEX ]
+<br/>
+&nbsp;&nbsp;[ CAPTION "&lt;caption&gt;" ]
+<br/>
+&nbsp;&nbsp;[ SHORT_CAPTION "&lt;short caption&gt;" ]
+<br/>
+&nbsp;&nbsp;[ LABEL "&lt;label&gt;" ]
+<br/>
+&nbsp;&nbsp;[ TARGET "&lt;name&gt;" ]
+</kbd>
+<br/>
+Macro: <a href="#th"><b>TH</b></a> <kbd class="macro-args">(optional, only if .TS H)</kbd>
+<br/>
+Macro: <a href="#te"><b>TE</b></a> <kbd class="macro-args">[ SOURCE "&lt;text of table source&gt;" ]</kbd>
+</div>
+
+<p>
+Tables to be formatted with <kbd>tbl</kbd> begin with the macro
+<kbd>.TS</kbd> and end with <kbd>.TE</kbd>. Global <kbd>tbl</kbd>
+options (&#8220;flags&#8221;), formatting, and data (per
+<kbd>tbl(1)</kbd>) come between the two macros.
+<br/>
+<span class="pre-in-pp">
+ .TS
+ &lt;tbl options, formatting, and data&gt;
+ .TE
+</span>
+Tables may be wrapped inside a
+<a href="#float-intro">float</a>,
+in which case, the entire table will be output on the current page
+if it fits, or deferred to the next page if it doesn&#8217;t.
+<br/>
+<span class="pre-in-pp">
+ .FLOAT
+ .TS
+ &lt;tbl options, formatting, and data&gt;
+ .TE
+ .FLOAT OFF
+</span>
+</p>
+
+<div class="macro-id-overline">
+<h4 id="ts" class="docs" style="font-size: 100%; margin-top: .5em">The .TS macro</h4>
+</div>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note: Version 2.0-c change</span>
+<br/>
+2.0-c introduces revisions to the handling of labels and/or
+captions, which, along with <kbd>NO_SHIM</kbd>, must now be given
+as arguments to <kbd>.TS</kbd> rather than <kbd>.TE</kbd>, as was
+the case formerly. Please read this section carefully if you have
+documents containing tables as they may need to be updated.
+</p>
+</div>
+
+<div class="box-important" style="margin-top: 1em">
+<p class="tip">
+<span class="important">IMPORTANT:</span>
+All arguments to <b>TS</b> must appear on the same line as
+<kbd>.TS</kbd>. Do not attempt to break them up with the
+&#8220;line-continued&#8221; backslash. You may want to set your
+text editor to &#8220;wrap&#8221; mode in order to see all your
+arguments. This annoyance stems from the preprocessor mechanism
+itself, not groff or mom.
+</p>
+</div>
+
+<p>
+The <b>TS</b> macro must be invoked before entering a <kbd>tbl</kbd>
+block. You may give as many or as few of its arguments as required,
+in any order, although it is advisable to put <kbd>CAPTION</kbd>,
+<kbd>SHORT_CAPTION</kbd>, and/or <kbd>LABEL</kbd> last.
+</p>
+
+<h5 id="h" class="docs" style="margin-top: 1em; text-transform: none">H</h5>
+
+<p>
+With the <b>H</b> argument, a table will span as many pages as
+necessary, with or without a running header. The placement of the
+corresponding
+<a href="#th"><kbd>.TH</kbd></a>,
+which is required whenever the <b>H</b> argument is given,
+determines what, if anything, goes in the header. Compare the
+following:
+<span class="pre-in-pp">
+ .TS H .TS H
+ c s s c s s
+ c s s c s s
+ c c c c c c
+ n n n. n n n.
+ Percent Increase .TH
+ 2002-2012 Percent Increase
+ .TH 2002-2012
+ &lt;tbl data&gt; &lt;tbl data&gt;
+ .TE .TE
+</span>
+The first example will create a table that spans multiple
+pages if necessary, with a running header (&#8220;Percent
+Increase&nbsp;/&nbsp;2002-2012&#8221;) for that table appearing at
+the top of each page until the table ends. The second example,
+equally, may run to several pages, but without the running header.
+See
+<a href="#th"><b>TH</b></a>
+for an explanation of <kbd>.TH</kbd> placement.
+</p>
+
+<div id="h-tip" class="box-tip">
+<p class="tip">
+<span class="note">Tip:</span>
+Generally speaking, it&#8217;s a good idea to get into the habit
+of using <kbd>.TS H</kbd> all the time, since there are no
+circumstances under which it fails, whereas <kbd>.TS</kbd> without
+<kbd>H</kbd> will fail on tables that exceed the page length.
+</p>
+</div>
+
+<h5 class="docs" style="margin-top: 1em; text-transform: none">BOXED</h5>
+
+<p>
+If a table is to be boxed (i.e., <kbd>tbl</kbd> is given the flags
+<kbd>'box'</kbd> or <kbd>'allbox'</kbd>) you must pass the argument
+<kbd>BOXED</kbd> to <kbd>.TS</kbd>, as in this example:
+<br/>
+<span class="pre-in-pp">
+ .TS BOXED
+ allbox;
+ c s s
+ c c c
+ n n n.
+ &lt;tbl data&gt;
+ .TE
+</span>
+</p>
+
+<h5 class="docs" style="margin-top: 1em; text-transform: none">CENTER</h5>
+
+<p>
+If a table is to be centered on the page, (i.e., <kbd>tbl</kbd> is
+given the <kbd>'center'</kbd> flag), you must pass the argument
+<kbd>CENTER</kbd> to <kbd>.TS</kbd>, as in this example, which
+creates a (possibly) multipage boxed table, centered on the page,
+with a running header.
+<span class="pre-in-pp">
+ .TS H BOXED CENTER
+ allbox center;
+ c s s
+ c s s
+ c c c
+ n n n.
+ Percent Increase
+ 2002-2012
+ .TH
+ &lt;tbl data&gt;
+ .TE
+</span>
+</p>
+
+<h5 class="docs" style="margin-top: 1em; text-transform: none">NEEDS</h5>
+
+<p>
+If a table is not inside a float and you pass <kbd>.TS </kbd> the
+<kbd>H</kbd> argument (which you should; see the tip
+<a href="#h-tip">here</a>),
+mom begins output immediately where the table occurs in the
+input file <i>if there is enough room on the output page for the
+table header plus at least one row of table data</i>. If there
+isn&#8217;t enough room, mom breaks to a new page before beginning
+the table, leaving a gap in
+<a href="definitions.html#running">running text</a>
+at the bottom of the previous page. If, for aesthetic reasons,
+you would prefer that mom require more than one row of table data
+beneath the header near the bottom of a page, you may increase the
+number with the <kbd>NEEDS</kbd> argument, followed by the desired
+number of rows.
+</p>
+
+<h5 class="docs" style="margin-top: 1em; text-transform: none">ADJUST</h5>
+
+<p>
+<kbd>ADJUST</kbd> lets you raise (<kbd>-</kbd>) or lower
+(<kbd>+</kbd>) the table
+<span style="font-style: italic">within the space allotted for it</span>
+by the amount you specify. This is useful for achieving good
+optical centering between surrounding blocks of type. A unit of
+measure is required.
+</p>
+
+<h5 class="docs" style="margin-top: 1em; text-transform: none">NO_SHIM</h5>
+
+<p>
+<kbd>NO_SHIM</kbd> instructs mom not to apply
+<a href="docprocessing.html#shim-vs-flex">shimming</a>
+after a table, which she will do automatically when shimming is
+enabled, which it is by default. Shimming ensures that running text
+after the table falls properly on the page&#8217;s
+<a href="definitions.html#baseline-grid">baseline grid</a>,
+but can result in slightly unequal spacing above and below
+(correctable with the <kbd>ADJUST</kbd> argument).
+<kbd>NO_SHIM</kbd> is useful when you have several tables on the
+page and there are visible differences in the spacing beneath them
+as a result of shimming. To ensure a flush bottom margin, the last
+table on the page should be shimmed, i.e. should not be given the
+<kbd>NO_SHIM</kbd> argument.
+</p>
+
+<h5 class="docs" style="margin-top: 1em; text-transform: none">NO_FLEX</h5>
+
+<p>
+<kbd>NO_FLEX</kbd> instructs mom not to apply
+<a href="docprocessing.html#shim-vs-flex">flex-spacing</a>
+after a table, which she will do automatically when flex-spacing is
+enabled. <kbd>NO_FLEX</kbd> is useful when you have several tables
+on the page and you want to distribute excess vertical
+whitespace on the page amongst other flex-spacing points on the
+page. If there are no others, the final table should be
+flex-spaced, i.e. not given the <kbd>NO_FLEX</kbd> argument.
+</p>
+
+<h5 class="docs" style="margin-top: 1em; text-transform: none">CAPTION</h5>
+
+<p>
+<kbd>CAPTION</kbd> allows you to give the table a caption. By
+default, the caption appears above the table, but may be attached to
+the label that appears beneath the table. See
+<a href="#caption-after-label">CAPTION_AFTER_LABEL</a>
+in
+<a href="#captions-and-labels">Captions and labels</a>.
+The text of the caption must be surrounded by double-quotes.
+</p>
+
+<p>
+Please note that if your table has a caption, you must invoke
+<kbd>TS</kbd> with the <kbd>H</kbd> flag, which also entails the use
+of
+<a href="#th">TH</a>.
+</p>
+
+<h5 class="docs" style="margin-top: 1em; text-transform: none">SHORT_CAPTION</h5>
+
+<p>
+<kbd>SHORT_CAPTION</kbd> allows you to trim long captions for
+inclusion in the List of Tables. The text you supply, surrounded
+by double-quotes, is what will appear in the List.
+</p>
+
+<h5 class="docs" style="margin-top: 1em; text-transform: none">LABEL</h5>
+
+<p>
+<kbd>LABEL</kbd>, if given, appears beneath the table. The text you
+supply, surrounded by double-quotes, is how the table is labelled
+in both the document proper and the List of Tables. Mom provides
+an auto-labelling facility for tables (see
+<a href="#autolabel">AUTOLABEL</a>),
+which, if enabled, overrides the <kbd>LABEL</kbd> argument.
+</p>
+
+<h5 class="docs" style="margin-top: 1em; text-transform: none">TARGET</h5>
+
+<p>
+<kbd>TARGET</kbd> followed by a unique name surrounded by
+double-quotes creates a PDF target for the table so that it may be
+linked to from other places in the file (with PDF_LINK; see
+<a href="version-2.html#mom-pdf">Producing PDFs with groff and mom</a>).
+</p>
+
+<p>
+<b><i>Please note:</i></b> The following functionality is available
+only with groff 1.22.4 or later.
+</p>
+
+<p>
+When
+<a href="#autolabel">autolabelling</a>
+is enabled and the document is processed with
+<a href="using.html#pdfmom" style="font-weight: bold">pdfmom</a>,
+the target name can be used to generate the target&#8217;s label
+number in running text if it is entered as a groff string, i.e. of
+the form <kbd><span class="nobr">\*[name]</span></kbd>. For example, if you
+create a target called &#8220;foo&#8221; for a table whose autolabel
+number would be 3, entering
+<br/>
+<span class="pre-in-pp">
+ See
+ .PDF_LINK foo "Table \*[foo]"
+</span>
+anywhere in running text would result in a pdf link that reads
+&#8220;Table 3&#8221;. If chapter numbers are being prefixed to
+labels, the same string in, say, chapter 5 would produce the pdf
+link &#8220;Table 5.3&#8221;.
+</p>
+
+<div class="macro-id-overline">
+<h4 id="th" class="docs" style="font-size: 100%; margin-top: .5em">The .TH macro</h4>
+</div>
+
+<p>
+The <b>TH</b> macro (<b>T</b>able <b>H</b>eader), which is required
+when you begin a table with <kbd>.TS H</kbd>, allows you to
+determine what goes in a table&#8217;s running header if it spans
+multiple pages. Placing <kbd>.TH</kbd> under the first row of
+<kbd>tbl</kbd> data makes the first row the header. If placed under
+the second row, the first and second rows form the header, and so
+on.
+</p>
+
+<p>
+As there are sometimes reasons to run <kbd>.TS H</kbd> when
+you don&#8217;t, in fact, want a running header (e.g. when
+your table has a caption), you can suppress it by placing
+<kbd>.TH</kbd> immediately underneath your <kbd>tbl</kbd> formatting
+specifications, the last line of which always ends with a period
+(see <kbd>tbl(1)</kbd>).
+</p>
+
+<p>
+See the
+<kbd><a href="#h">H</a></kbd>
+argument to <kbd>.TS</kbd> for examples demonstrating <kbd>.TH</kbd>
+placement.
+</p>
+
+<div class="macro-id-overline">
+<h4 id="te" class="docs" style="font-size: 100%; margin-top: .5em">The .TE macro</h4>
+</div>
+
+<p>
+<kbd>tbl</kbd> blocks must be terminated with <kbd>.TE</kbd>,
+which, as of version 2.0-c, takes a single, optional argument,
+<kbd>SOURCE</kbd>. (Formerly, <kbd>TE</kbd> took a label/caption
+argument along with arguments controlling placement.) The argument
+is followed by the text of the table&#8217;s source, surrounded by
+double-quotes. The SOURCE argument may only be used if
+<a href="#mla">MLA</a>
+(Modern Language Association) style is enabled.
+</p>
+
+<div class="rule-medium"><hr/></div>
+
+<h3 id="pic" class="docs">pic support</h3>
+
+<p>
+Mom documents can include diagrams generated with the groff
+preprocessor <b>pic</b>. If you are unfamiliar with <b>pic</b>, I
+recommend downloading a copy of
+<a href="http://www.kohala.com/start/troff/gpic.raymond.ps">Making Pictures with GNU PIC</a>
+which provides a thorough introduction and contains many examples.
+If you use <b>pic</b>, you must pass groff or pdfmom the <b>-p</b>
+flag when you process the file.
+
+</p>
+
+<p>
+Diagrams created with <kbd>pic</kbd> begin with the macro
+<kbd>.PS</kbd> (<b>P</b>ic <b>S</b>tart) and end with
+<kbd>.PE</kbd> (<b>P</b>ic <b>E</b>nd). Everything between them is
+interpreted by the preprocessor as pic instructions. Please note:
+<i>Making Pictures with GNU PIC</i> says that <kbd>.PF</kbd> can
+also be used to terminate a pic diagram, but this is not supported
+by mom.
+</p>
+
+<p>
+Pic diagrams are always centered. Note that this represents a
+change from version 2.0-b of mom, where centering diagrams required
+passing <kbd>-mpic</kbd> to <b>groff</b> or
+<a href="using.html#pdfmom" style="font-weight: bold">pdfmom</a>
+on the command line.
+</p>
+
+<p>
+In addition, mom treats <b>pic</b> diagrams identically to
+<a href="#floats-intro">floats</a>,
+which is to say that if a diagram doesn&#8217;t fit on the output
+page, she will defer it to the top of the next page while continuing
+to process
+<a href="definitions.html#running">running text</a>.
+<kbd>ADJUST</kbd> is ignored whenever a diagram is deferred, except
+when moving from column to column on the same page, when the diagram
+may need to be optically adjusted. Subsequent diagrams that do not
+fit, if any, are output in order immediately after the first.
+</p>
+
+<p>
+Lastly, if your diagrams contain text, you may set all the type
+parameters for the text (family, font, size, leading) separately
+from the <b>pic</b> block with the macro
+<a href="#pic-text-style">PIC_TEXT_STYLE</a>.
+If you need to change the type parameters within the block
+on-the-fly, you must use <b>pic</b>&#8217;s native facilities for
+doing so.
+</p>
+
+<div class="macro-id-overline">
+<h3 id="ps-pe" class= "macro-id">.PS / .PE</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>PS</b>
+<kbd class="macro-args">
+<br/>
+Arguments: [ &lt;width&gt;&nbsp;&lt;height&gt; ]
+<kbd class="macro-args">
+<br/>
+&nbsp;&nbsp;[ LEFT ]</kbd>
+<br/>
+&nbsp;&nbsp;[ ADJUST +|-&lt;vertical adjustment&gt;]</kbd>
+<span style="font-size: 95%">
+(<a href="definitions.html#unitofmeasure">unit of measure</a>
+required)
+</span>
+<kbd class="macro-args"><br/>
+&nbsp;&nbsp;[ NO_SHIM ]
+<br/>
+&nbsp;&nbsp;[ NO_FLEX ]
+<br/>
+&nbsp;&nbsp;[ CAPTION "&lt;caption&gt;" ]
+<br/>
+&nbsp;&nbsp;[ SHORT_CAPTION "&lt;short caption&gt;" ]
+<br/>
+&nbsp;&nbsp;[ LABEL "&lt;label&gt;" ]
+<br/>
+&nbsp;&nbsp;[ TARGET "&lt;name&gt;" ]
+</kbd>
+<br/>
+Macro: <b>PE</b> <span style="font-size: 95%">(no arguments; ends
+the <b>pic</b> block)</span>
+</div>
+
+<div class="box-important" style="margin-top: 1.5em">
+<p class="tip">
+<span class="important">IMPORTANT:</span>
+All arguments to <b>PS</b> must appear on the same line as
+<kbd>.PS</kbd>. Do not attempt to break them up with the
+&#8220;line-continued&#8221; backslash. You may want to set your
+text editor to &#8220;wrap&#8221; mode in order to see all your
+arguments. This annoyance stems from the preprocessor mechanism
+itself, not groff or mom.
+</p>
+</div>
+
+<h5 class="docs" style="margin-top: 1em; text-transform: none">'width' and 'height'</h5>
+
+<p>
+The <kbd>width</kbd> and <kbd>height</kbd> arguments to
+<kbd>.PS</kbd> are idiosyncratic owing to the preprocessor itself.
+Both are optional and both expect a value in inches, so neither
+argument should have a
+(<a href="definitions.html#unitofmeasure">unit of measure</a>
+appended.
+</p>
+
+<p>
+If the <kbd>width</kbd> argument is supplied, the diagram, but
+not any text it contains, is scaled to the given width. If a
+literal width argument of <kbd>0</kbd> (zero) is given and a
+<kbd>height</kbd> argument is supplied, the diagram, but not any
+text it contains, will be scaled to the requested height. In the
+case of two non-zero arguments being given, only the height scaling
+is applied.
+</p>
+
+<h5 class="docs" style="margin-top: 1em; text-transform: none">LEFT</h5>
+
+<p>
+By default, pic diagrams are centred on the page. If you would
+prefer them to be flush left, pass <kbd>PS</kbd> the <kbd>LEFT</kbd>
+argument.
+</p>
+<h5 class="docs" style="margin-top: 1em; text-transform: none">ADJUST</h5>
+
+<p>
+<kbd>ADJUST</kbd> lets you raise (<kbd>-</kbd>) or lower
+(<kbd>+</kbd>) a diagram
+<span style="font-style: italic">within the space allotted for it</span>
+by the amount you specify. This is useful for achieving good
+optical centering between surrounding blocks of type. A unit of
+measure is required.
+</p>
+
+<h5 class="docs" style="margin-top: 1em; text-transform: none">NO_SHIM</h5>
+
+<p>
+<kbd>NO_SHIM</kbd> instructs mom not to apply
+<a href="docprocessing.html#shim-vs-flex">shimming</a>
+after a <b>pic</b> diagram, which she will do automatically when
+shimming is enabled, which it is by default. Shimming ensures that
+running text after the diagram falls properly on the page&#8217;s
+<a href="definitions.html#baseline-grid">baseline grid</a>,
+but can result in slightly unequal spacing above and below
+(correctable with the <kbd>ADJUST</kbd> argument).
+<kbd>NO_SHIM</kbd> is useful when you have several diagrams on the
+page and there are visible differences in the spacing beneath them
+as a result of shimming. To ensure a flush bottom margin, the last
+diagram on the page should be shimmed, i.e. should not be given the
+<kbd>NO_SHIM</kbd> argument.
+</p>
+
+<h5 class="docs" style="margin-top: 1em; text-transform: none">NO_FLEX</h5>
+
+<p>
+<kbd>NO_FLEX</kbd> instructs mom not to apply
+<a href="docprocessing.html#shim-vs-flex">flex-spacing</a>
+after a <b>pic</b> diagram, which she will do automatically when
+flex-spacing is enabled. <kbd>NO_FLEX</kbd> is useful when you
+have several diagrams on the page and you want to distribute excess
+vertical whitespace on the page amongst other flex-spacing points
+on the page. If there are no others, the final diagram should be
+flex-spaced, i.e. not given the <kbd>NO_FLEX</kbd> argument.
+</p>
+
+<h5 class="docs" style="margin-top: 1em; text-transform: none">CAPTION</h5>
+
+<p>
+<kbd>CAPTION</kbd> allows you to give the diagram a caption. By
+default, the caption appears above the diagram, but may be attached to
+the label that appears beneath it. See
+<a href="#caption-after-label">CAPTION_AFTER_LABEL</a>
+in
+<a href="#captions-and-labels">Captions and labels</a>.
+The text of the caption must be surrounded by double-quotes.
+</p>
+
+<h5 class="docs" style="margin-top: 1em; text-transform: none">SHORT_CAPTION</h5>
+
+<p>
+<kbd>SHORT_CAPTION</kbd> allows you to trim long captions for
+inclusion in the List of Figures. The text you supply, surrounded
+by double-quotes, is what will appear in the List.
+</p>
+
+<h5 class="docs" style="margin-top: 1em; text-transform: none">LABEL</h5>
+
+<p>
+<kbd>LABEL</kbd>, if given, appears beneath the diagram. The text you
+supply, surrounded by double-quotes, is how the diagram is labelled
+in both the document proper and the List of Figures. Mom provides
+an auto-labelling facility for diagrams (see
+<a href="#autolabel">AUTOLABEL</a>),
+which, if enabled, overrides the <kbd>LABEL</kbd> argument.
+</p>
+
+<h5 class="docs" style="margin-top: 1em; text-transform: none">TARGET</h5>
+
+<p>
+<kbd>TARGET</kbd> followed by a unique name surrounded by
+double-quotes creates a PDF target for the diagram so that it may be
+linked to from other places in the file (with PDF_LINK; see
+<a href="version-2.html#mom-pdf">Producing PDFs with groff and mom</a>).
+</p>
+
+<p>
+<b><i>Please note:</i></b> The following functionality is available
+only with groff 1.22.4 or later.
+</p>
+
+<p>
+When
+<a href="#autolabel">autolabelling</a>
+is enabled and the document is processed with
+<a href="using.html#pdfmom" style="font-weight: bold">pdfmom</a>,
+the target name can be used to generate the target&#8217;s label
+number in running text if it is entered as a groff string, i.e. of
+the form <kbd><span class="nobr">\*[name]</span></kbd>. For example, if you
+create a target called &#8220;foo&#8221; for a diagram whose
+autolabel number would be 3, entering
+<br/>
+<span class="pre-in-pp">
+ See
+ .PDF_LINK foo "Figure \*[foo]"
+</span>
+anywhere in running text would result in a pdf link that reads
+&#8220;Figure 3&#8221;. If chapter numbers are being prefixed to
+labels, the same string in, say, chapter 5 would produce the pdf
+link &#8220;Figure 5.3&#8221;.
+</p>
+
+<!-- PIC_TEXT_STYLE -->
+
+<div class="macro-id-overline">
+<h3 id="pic-text-style" class= "macro-id">PIC_TEXT_STYLE</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>PIC_TEXT_STYLE</b> \
+<br/>
+<kbd class="macro-args">
+&nbsp;&nbsp;[ FAMILY ] "&lt;family&gt;" \
+<br/>
+&nbsp;&nbsp;[ FONT ] "&lt;font&gt;" \
+<br/>
+&nbsp;&nbsp;[ SIZE ] "+|-&lt;size&gt;" \
+<br/>
+&nbsp;&nbsp;[ AUTOLEAD ] "&lt;value&gt;"
+</kbd>
+</div>
+
+<p>
+Diagrams drawn with <b>pic</b> may contain text, and groff
+<a href="inlines.html#intro-inlines">inline escapes</a>
+may be used to alter the text parameters. A problem that arises
+from so doing is that, in many cases, it clutters up the <b>pic</b>
+code unnecessarily.
+</p>
+
+<p>
+PIC_TEXT_STYLE lets you establish the type parameters for text
+inside a <b>pic</b> block all at once in cases where so doing
+improves the readability of your mom source files.
+</p>
+
+<p>
+The arguments to PIC_TEXT_STYLE behave identically to the arguments
+to other control macros, explained
+<a href="docelement.html#control-macro-args">here</a>.
+They may be given in any order, and you may use as many or as few as
+you like.
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span>
+Text within <b>pic</b> diagrams does not scale when you provide a
+scaling argument to <kbd>.PS</kbd>. This is a limitation of the
+preprocessor itself, not groff or mom.
+</p>
+</div>
+
+<div class="rule-medium"><hr/></div>
+
+<h3 id="grap" class="docs">grap support</h3>
+
+<p>
+Grap is a <b>pic</b> preprocessor for creating graphs. Grap
+usage is covered in the <kbd>grap(1)</kbd> manpage. Its mom
+implementation is the same as for <b>pic</b> except that instead of
+enclosing directives between
+<a href="#ps-pe">.PS&nbsp;/&nbsp;.PE</a>,
+they are enclosed between <b>.G1/.G2</b>. If you use <b>grap</b>,
+you must pass groff or pdfmom the <b>-G</b> flag when you process
+the file.
+
+</p>
+
+<p>
+<b>.G1</b> takes all the same arguments as
+<a href="#ps-pe">PS</a>
+with one exception: the argument <b>GRAP</b> must always be given to
+<b>.G1</b>. So, for example, a skeleton grap block raised 2 points
+and with a caption would be entered:
+<br/>
+<span class="pre-in-pp">
+ .G1 GRAP ADJUST +2p CAPTION "Graph caption"
+ &lt;grap directives&gt;
+ .G2
+</span>
+
+</p>
+
+<div class="rule-medium"><hr/></div>
+
+<h3 id="eqn" class="docs">eqn support</h3>
+
+<p>
+Support for <b>eqn</b> is provided via extensions to the standard
+<kbd>.EQ/.EN</kbd> macros. <kbd>eqn</kbd> usage itself is beyond
+the scope of this documentation, but is covered in the manpage
+<kbd>eqn(1)</kbd>. You can also download a copy of Ted
+Harding&#8217;s
+<a href="http://lists.gnu.org/archive/html/groff/2013-10/pdfTyBN2VWR1c.pdf">
+A Guide to Typesetting Mathematics Using GNU eqn
+</a>,
+which contains useful examples. If you use <b>eqn</b>, you must give groff or
+pdfmom the <b>-e</b> flag.
+
+</p>
+
+<div class="macro-id-overline">
+<h3 id="eq-en" class= "macro-id">.EQ / .EN</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <a href="#eq"><b>EQ</b></a>
+<br/>
+<kbd class="macro-args">Arguments:
+<br/>
+&nbsp;&nbsp;[ -L | -C | -I &lt;indent&gt; ]</kbd>
+<span style="font-size: 95%">
+(<a href="definitions.html#unitofmeasure">unit of measure</a>
+required)
+</span>
+<kbd class="macro-args"><br/>
+&nbsp;&nbsp;[ ADJUST +|-&lt;vertical adjustment&gt;]</kbd>
+<span style="font-size: 95%">
+(<a href="definitions.html#unitofmeasure">unit of measure</a>
+required)
+</span>
+<kbd class="macro-args"><br/>
+&nbsp;&nbsp;[ NO_SHIM ]
+<br/>
+&nbsp;&nbsp;[ NO_FLEX ]
+<br/>
+&nbsp;&nbsp;[ CAPTION "&lt;caption&gt;" ]
+<br/>
+&nbsp;&nbsp;[ LABEL "&lt;label&gt;" ]
+<br/>
+&nbsp;&nbsp;[ SHIFT_LABEL +|-&lt;vertical adjustment&gt; ]
+<br/>
+&nbsp;&nbsp;[ SHORT_CAPTION "&lt;short caption&gt;" ]
+<br/>
+&nbsp;&nbsp;[ TARGET "&lt;name&gt;" ]
+<br/>
+&nbsp;&nbsp;[ CONTINUED | CONT | ... ]</kbd>
+</div>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note: Version 2.0-c change</span>
+<br/>
+2.0-c introduces revisions to <b>EQ</b>, including the addition
+of a dash (<kbd>-</kbd>) to the positioning arguments
+(<kbd>-L</kbd>, <kbd>-C</kbd>, and <kbd>-I</kbd>) and the removal of a
+default value for <kbd>-I</kbd>. Other changes include passing all
+options to <kbd>.EQ</kbd> (including the label) such that
+<kbd>.EN</kbd> takes only a single, optional argument saying whether
+the equation is to be continued at the next invocation of
+<kbd>.EQ</kbd>. Please read this section carefully if you have
+documents containing equations as they may need to be updated.
+</p>
+</div>
+
+<div class="box-important" style="margin-top: 1em">
+<p class="tip">
+<span class="important">IMPORTANT:</span>
+All arguments to <b>EQ</b> must appear on the same line as
+<kbd>.EQ</kbd>. Do not attempt to break them up with the
+&#8220;line-continued&#8221; backslash. You may want to set your
+text editor to &#8220;wrap&#8221; mode in order to see all your
+arguments. This annoyance stems from the preprocessor mechanism
+itself, not groff or mom.
+</p>
+</div>
+
+<div class="macro-id-overline" style="margin-top: .5em">
+<h4 id="eq" class="docs" style="font-size: 100%; margin-top: .5em">The .EQ macro</h4>
+</div>
+
+<p>
+Equations to be set with <b>eqn</b> begin with <kbd>.EQ</kbd>,
+followed by <b>eqn</b> code. Equations are centered by default,
+but may be set flush left or indented from the left margin
+if <kbd>-L</kbd> or <kbd>-I</kbd> are passed as arguments to
+<kbd>.EQ</kbd>.
+</p>
+
+<h5 class="docs" style="margin-top: 1em; text-transform: none">ADJUST</h5>
+
+<p>
+<kbd>ADJUST</kbd> lets you raise (<kbd>-</kbd>) or lower
+(<kbd>+</kbd>) an equation
+<span style="font-style: italic">within the space allotted for it</span>
+by the amount you specify. This is useful for achieving good
+optical centering between surrounding blocks of type. A unit of
+measure is required.
+</p>
+
+<h5 class="docs" style="margin-top: 1em; text-transform: none">NO_SHIM</h5>
+
+<p>
+<kbd>NO_SHIM</kbd> instructs mom not to apply
+<a href="docprocessing.html#shim-vs-flex">shimming</a>
+after an equation, which she will do automatically when shimming is
+enabled, which it is by default. Shimming ensures that running text
+after the equation falls properly on the page&#8217;s
+<a href="definitions.html#baseline-grid">baseline grid</a>,
+but can result in slightly unequal spacing above and
+below (correctable with the <kbd>ADJUST</kbd> argument).
+<kbd>NO_SHIM</kbd> is useful when you have several equations on the
+page and there are visible differences in the spacing beneath them
+as a result of shimming. To ensure a flush bottom margin, the last
+equation on the page should be shimmed, i.e. should not be given the
+<kbd>NO_SHIM</kbd> argument.
+</p>
+
+<h5 class="docs" style="margin-top: 1em; text-transform: none">NO_FLEX</h5>
+
+<p>
+<kbd>NO_FLEX</kbd> instructs mom not to apply
+<a href="docprocessing.html#shim-vs-flex">flex-spacing</a>
+after an equation, which she will do automatically when flex-spacing
+is enabled. <kbd>NO_FLEX</kbd> is useful when you have several
+equations on the page and you want to distribute excess vertical
+whitespace on the page amongst other flex-spacing points on
+the page. If there are no others, the final equation should be
+flex-spaced, i.e. not given the <kbd>NO_FLEX</kbd> argument.
+</p>
+
+<h5 class="docs" style="margin-top: 1em; text-transform: none">CAPTION</h5>
+
+<p>
+<kbd>CAPTION</kbd> allows you to give the equation a caption.
+Equation captions always appear beneath the equation.
+</p>
+
+<h5 class="docs" style="margin-top: 1em; text-transform: none">SHORT_CAPTION</h5>
+
+<p>
+<kbd>SHORT_CAPTION</kbd> allows you to trim long captions for
+inclusion in the List of Equations. The text you supply, surrounded
+by double-quotes, is what will appear in the List.
+</p>
+
+<h5 class="docs" style="margin-top: 1em; text-transform: none">LABEL</h5>
+
+<p>
+<kbd>LABEL</kbd>, if given, appears on the same baseline as the last line of the
+equation, flush with the left or right margin, depending on the
+equation&#8217;s horizontal position. The text you supply, surrounded by
+double-quotes, is how
+the equation is labelled in both the document proper and the List of
+Equations. Mom provides an auto-labelling facility for equations (see
+<a href="#autolabel">AUTOLABEL</a>),
+which, if enabled, overrides the <kbd>LABEL</kbd> argument.
+</p>
+
+<h5 class="docs" style="margin-top: 1em; text-transform: none">SHIFT_LABEL</h5>
+
+<p>
+<kbd>SHIFT_LABEL</kbd> allows you to raise (<kbd>-</kbd>) or lower
+(<kbd>+</kbd>) the equation label. It&#8217;s primary use is to
+center equation labels vertically on the equation rather than flush
+with the last line. Assuming a three-line equation,
+<kbd>.EQ&nbsp;SHIFT_LABEL&nbsp;-1v</kbd> would raise the label by
+one line, thus centering it vertically on the equation.
+</p>
+
+<h5 class="docs" style="margin-top: 1em; text-transform: none">TARGET</h5>
+
+<p>
+<kbd>TARGET</kbd> followed by a unique name surrounded by
+double-quotes creates a PDF target for the equation so that it may
+be linked to from other places in the file (with PDF_LINK; see
+<a href="version-2.html#mom-pdf">Producing PDFs with groff and mom</a>).
+</p>
+
+<p>
+<b><i>Please note:</i></b> The following functionality is available
+only with groff 1.22.4 or later.
+</p>
+
+<p>
+When
+<a href="#autolabel">autolabelling</a>
+is enabled and the document is processed with
+<a href="using.html#pdfmom" style="font-weight: bold">pdfmom</a>,
+the target name can be used to generate the target&#8217;s label
+number in running text if it is entered as a groff string, i.e. of
+the form <kbd><span class="nobr">\*[name]</span></kbd>. For example, if you
+create a target called &#8220;foo&#8221; for an equation whose
+autolabel number would be 3, entering
+<br/>
+<span class="pre-in-pp">
+ See
+ .PDF_LINK foo "Equation \*[foo]"
+</span>
+anywhere in running text would result in a pdf link that reads
+&#8220;Equation 3&#8221;. If chapter numbers are being prefixed to
+labels, the same string in, say, chapter 5 would produce the pdf
+link &#8220;Equation 5.3&#8221;.
+</p>
+
+
+<div class="macro-id-overline" style="margin-top: .5em">
+<h4 id="en" class="docs" style="font-size: 100%; margin-top: .5em">The .EN macro</h4>
+</div>
+
+<p>
+A block of <b>eqn</b> code is terminated with <kbd>.EN</kbd>.
+</p>
+
+<p>
+If an equation needs to span multiple lines, possibly aligned
+with <b>eqn</b>&#8217;s <kbd>'mark'</kbd> and <kbd>'lineup'</kbd>
+directives, separate invocations of <kbd><span class="nobr">.EQ/.EN</span></kbd>
+are required for each line, and the optional argument,
+<kbd>CONTINUED</kbd> (or <kbd>CONT</kbd>, or <kbd>...</kbd> [three
+dots, an ellipsis]), must be passed to <kbd>.EN</kbd>.
+</p>
+
+<p>
+If <kbd>-L</kbd> or <kbd>-I</kbd> is given to the first
+<kbd>.EQ</kbd> of a multi-line equation, they remain in effect
+until an <kbd>.EN</kbd> without the <kbd>CONTINUED</kbd> argument
+is reached.
+</p>
+
+<p>
+Mom does not treat equations as floats, therefore it is possible to
+begin an equation on one page and terminate it on the next. If you
+wish to keep all lines of an equation together, you must wrap the
+equation, including all invocations of <kbd>.EQ/.EN</kbd>, inside
+a
+<a href="#floats-intro">float</a>.
+</p>
+
+<div class="rule-medium"><hr/></div>
+
+<h3 id="refer" class="docs">refer support</h3>
+
+<p>
+<b>refer</b> support is covered in the section
+<a href="refer.html">Bibliographies and references</a>.
+</p>
+
+<div class="rule-medium"><hr/></div>
+
+<h2 id="captions-and-labels" class="docs">Captions and labels</h2>
+
+<ul>
+ <li><a href="#autolabel">AUTOLABEL</a></li>
+ <li><a href="#caption-after-label">CAPTION_AFTER_LABEL</a></li>
+ <li><a href="#mla">MLA</a>&mdash;MLA-style captioning and labelling</li>
+ <li><a href="#captions-labels-sources">Set style parameters for captions, labels, and sources</a></li>
+</ul>
+
+<p>
+Mom includes facilities for adding captions and labels to figures,
+tables, equations, and pdf images, including auto-labelling. If
+Lists of Figures, Tables, and Equations are desired, captions (if
+any) and labels (if any) are collected and output in the Lists with
+the appropriate page number.
+</p>
+
+<p>
+The distinction between a caption and a label is that labels are
+identifiers, e.g. &#8220;Fig. 1&#8221; or &#8220;Table 3&#8221;,
+while captions are descriptive or informative. For most types of
+writing, it is usual to provide both.
+</p>
+
+<p>
+By default, mom sets captions above figures (i.e. <b>pic</b> output and
+pdf images) and tables. This behaviour may be modified with the
+macro
+<a href="#caption-after-label">CAPTION_AFTER_LABEL</a>.
+Equations always have their captions set underneath. All aspects of
+the text style for captions may be set with the macro
+<a href="#captions-labels-sources">CAPTIONS</a>.
+</p>
+
+<p>
+Labels for tables are set underneath the table unless the
+<a href="#mla">MLA</a>
+macro has been invoked, in which case the label and caption appear
+above the table, per MLA style, and the source for the table, if
+any, appears underneath. Labels for figures are set underneath.
+Equation labels, by default, are set on the same baseline as the
+last line of the equation. Like captions, all aspects of text style
+for labels may be established with a single macro
+<a href="#labels">LABELS</a>.
+Furthermore, mom can autolabel figures, tables, and equations, with
+or without a prefixed chapter number.
+</p>
+
+<div class="macro-id-overline">
+<h3 id="autolabel" class="macro-id">Autolabel</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>AUTOLABEL_EQUATIONS</b>
+<br/>
+Macro: <b>AUTOLABEL_IMAGES</b>
+<br/>
+Macro: <b>AUTOLABEL_PIC</b>
+<br/>
+Macro: <b>AUTOLABEL_TABLES</b>
+<br/>
+<kbd class="macro-args">Arguments:
+<br/>
+[ PREFIX "&lt;string&gt;"] [ SUFFIX "&lt;string&gt;"] [ PREFIX_CHAPTER [ &lt;n&gt; ] ]
+</kbd>
+</div>
+
+<p>
+<b>AUTOLABEL_&lt;type&gt;</b> takes care of labelling &lt;type&gt; by
+identifying each with a separate, incrementing numeric scheme, which
+is also collected for output in Lists of Figures, Equations, and
+Tables.
+</p>
+
+<p>
+Autolabelling may be disabled on-the-fly by giving any argument
+other than <kbd>PREFIX</kbd>, <kbd>SUFFIX</kbd>, or
+<kbd>PREFIX_CHAPTER</kbd> to the appropriate macro. For example,
+<br/>
+<span class="pre-in-pp">
+ .AUTOLABEL_IMAGES NO
+</span>
+would disable autolabelling of images.
+</p>
+
+<h4 class="docs" style="margin-top: -.5em">Prefixes and suffixes</h4>
+
+<p>
+By default, when <b>AUTOLABEL</b> is enabled, the label numbers are
+prefixed, and, in the case of equations, suffixed, with strings such
+that they appear for tables as &#8220;Table&nbsp;&lt;n&gt;&#8221;, for
+<b>pic</b> diagrams and pdf images as &#8220;Fig.&nbsp;&lt;n&gt;&#8221;,
+and for equations as &#8220;Eq.&nbsp;(&lt;n&gt;)&#8221;.
+</p>
+
+<p>
+You can use <kbd>PREFIX&nbsp;&lt;"string"&gt;</kbd> to change what
+comes before the automatic numbering. For example, if you are
+including musical excerpts in your document, MLA style requires that
+they be labelled &#8220;Ex.&nbsp;&lt;n&gt;&#8221;. Since musical
+excerpts are likely to be scanned images (in pdf format, don&#8217;t
+forget), you have to change the prefix string for pdf images:
+<br/>
+<span class="pre-in-pp">
+ .AUTOLABEL_IMAGES \
+ PREFIX "Ex. " \
+ SUFFIX ""
+</span>
+If you need a suffix after the automatic numbering, use
+<kbd>SUFFIX&nbsp;&lt;"string"&gt;</kbd>, like this:
+<br/>
+<span class="pre-in-pp">
+ .AUTOLABEL_IMAGES \
+ PREFIX "(Fig. " \
+ SUFFIX ")"
+</span>
+Note from the above that both arguments, <kbd>PREFIX</kbd> and
+<kbd>SUFFIX</kbd>, are required should you want either. Two
+adjacent double-quotes leaves the string blank.
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span>
+In automatically formatted
+<a href="#lists-macros">&#8220;Lists of ...&#8221;</a>,
+label number prefixes are stripped when autolabelling is enabled.
+</p>
+</div>
+
+<h4 class="docs" style="margin-top: -.5em">Prefixing chapter numbers</h4>
+
+<p>
+If you would like mom to prefix chapter numbers to the label,
+pass <kbd>AUTOLABEL_&lt;type&gt;</kbd> the argument
+<kbd>PREFIX_CHAPTER</kbd>.
+</p>
+
+<p>
+If for some reason you need to specify the chapter number,
+you may do so by passing the number as an argument to
+<kbd>PREFIX_CHAPTER</kbd>. Subsequent chapters or major sections
+will increment by one as expected.
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span>
+For the purposes of labelling, mom treats
+<a href="docprocessing.html#doctype">DOCTYPE&nbsp;DEFAULT</a>
+as if it were <b>DOCTYPE&nbsp;CHAPTER</b>, hence, with
+<kbd>PREFIX_CHAPTER</kbd>, each collated <b>DEFAULT</b>
+doctype&#8217;s prefixed &#8220;chapter&#8221; number is
+incremented and the label number itself reset to &#8220;1&#8221;.
+If you do not supply the <kbd>PREFIX_CHAPTER</kbd> argument, the
+label number is <i>not</i> reset automatically. To reset it, invoke
+<kbd>.AUTOLABEL_&lt;type&gt;</kbd> after each
+<a href="docprocessing.html#collate">COLLATE</a>.
+</p>
+</div>
+
+<div id="set-autolabel" class="box-macro-args" style="margin-top: .5em">
+Macro: <b>SET_AUTOLABEL</b> <kbd class="macro-args">FIG | TBL | PIC | EQN &lt;n&gt;</kbd>
+</div>
+
+<p>
+You may sometimes need to set or reset the autolabel number for a
+particular type of pre-processor or for PDF images. This is likely
+to occur if you are using
+<a href="#float">FLOAT</a>
+in conjunction with the <kbd>TO_LIST</kbd> argument.
+</p>
+
+<p>
+For example, if your document has Figures (PDF images, pic diagrams)
+and you want your tables to be labelled as Figures as well, you have
+to wrap the tables inside a float and label the float manually as
+&#8220;Fig.&nbsp;n&#8221;, sending it to the List of Figures with
+<kbd>TO_LIST FIGURES</kbd>.
+</p>
+
+<p>
+Mom does not autolabel floats or assign them automatically
+to a list, so she doesn&#8217;t know you&#8217;ve interrupted the
+auto-incrementing label numbers. Use SET_AUTOLABEL get her back on
+track. The number you give as an argument after telling her which
+kind of label number to set is the one you want to appear next.
+<br/>
+<span class="pre-in-pp">
+ .SET_AUTOLABEL FIG 6
+</span>
+means the next autolabelled Figure will be &#8220;Fig. 6.&#8221;
+</p>
+
+<div class="macro-id-overline">
+<h3 id="caption-after-label" class="macro-id">Captions after labels</h3>
+</div>
+
+<div class="box-macro-args" style="margin-top: .5em">
+Macro: <b>CAPTION_AFTER_LABEL</b> <kbd class="macro-args">IMG | PIC | TBL | ALL [ &lt;anything&gt; ]</kbd>
+</div>
+
+<p>
+By default, mom sets captions above figures (<b>pic</b> output
+and pdf images) and tables; labels are always underneath.
+</p>
+
+<p>
+<kbd>.CAPTION_AFTER_LABEL</kbd>, with one of the required arguments,
+instructs mom to attach captions directly to the appropriate
+labels, beginning on the same line. Any argument after the first
+disables this behaviour, restoring caption placement to mom&#8217;s
+default. For example,
+<br/>
+<span class="pre-in-pp">
+ .CAPTION_AFTER_LABEL ALL
+</span>
+would enable captions after labels globally, while a subsequent
+<br/>
+<span class="pre-in-pp">
+ .CAPTION_AFTER_LABEL IMG OFF
+</span>
+would disable captions after labels for pdf images only.
+<kbd>OFF</kbd> can be anything you like (<kbd>X</kbd>,
+<kbd>NO</kbd>, etc).
+</p>
+
+<p>
+If
+<a href="#mla">MLA</a>
+is enabled, there&#8217;s no need to invoke
+<kbd>CAPTION_AFTER_LABEL</kbd> as this is implied.
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span>
+A separate invocation of <kbd>.CAPTION_AFTER_LABEL</kbd> is required
+for each one of the required first arguments. You cannot, for
+example, do
+<br/>
+<span class="pre-in-pp">
+ .CAPTION_AFTER_LABEL IMG TBL
+</span>
+Rather, you must do
+<br/>
+<span class="pre-in-pp">
+ .CAPTION_AFTER_LABEL IMG
+ .CAPTION_AFTER_LABEL TBL
+</span>
+</p>
+</div>
+
+<div class="macro-id-overline">
+<h3 id="mla" class="macro-id">MLA-style captioning and labelling</h3>
+</div>
+
+<div class="box-macro-args" style="margin-top: .5em">
+Macro: <b>MLA</b> <kbd class="macro-args"> [ &lt;anything&gt; ]</kbd>
+</div>
+
+<p>
+Modern Language Association style dictates that captions should
+always go after labels. Furthermore, labels and captions for tables
+should go <i>above</i> the tables, with the source for the table, if
+any, underneath.
+</p>
+
+<p>
+Invoking <kbd>.MLA</kbd> by itself takes care of these details. If
+you need to disable MLA-style captioning and labelling mid-document,
+<kbd>.MLA&nbsp;OFF</kbd> does the trick. <kbd>OFF</kbd> can be
+anything you like (<kbd>X</kbd>, <kbd>NO</kbd>, etc).
+</p>
+
+<div class="macro-id-overline" style="margin-top: 1em">
+<h3 id="captions-labels-sources" class="macro-id">Style parameters for captions, labels and sources</h3>
+</div>
+
+<div class="box-macro-args" style="margin-top: .5em">
+Macro: <b>CAPTIONS</b> <kbd class="macro-args">EQN | IMG | PIC | TBL | FLOATING | ALL</kbd>
+<br/>
+Macro: <b>LABELS</b> <kbd class="macro-args">EQN | IMG | PIC | TBL | FLOATING | ALL</kbd>
+<br/>
+Macro: <b>SOURCES</b> <kbd class="macro-args">TBL</kbd>
+<br/>
+<kbd class="macro-args">Style arguments:
+<br/>
+&nbsp;&nbsp;FAMILY &lt;family&gt; \
+<br/>
+&nbsp;&nbsp;FONT &lt;font&gt; \
+<br/>
+&nbsp;&nbsp;SIZE +|-&lt;size&gt; \
+<br/>
+&nbsp;&nbsp;AUTOLEAD &lt;value&gt; \
+<br/>
+&nbsp;&nbsp;COLOR &lt;color&gt; \
+<br/>
+&nbsp;&nbsp;QUAD LEFT | CENTER | RIGHT [ ON_LL ] \
+<br/>
+&nbsp;&nbsp;INDENT &lt;indent&gt; \
+<br/>
+&nbsp;&nbsp;ADJUST +|-&lt;vertical adjustment&gt;
+</kbd>
+</div>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span>
+Arguments may be broken into several lines using the
+&#8220;line-continued&#8221; backslash (<b>\</b>), as shown above.
+</p>
+</div>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Additional note:</span>
+Mom&#8217;s default style for labels, captions, and sources is
+the same as the style used for running text, with two exceptions:
+labels are set in bold, except for eqn which is roman medium, and
+the autolead value for all three is &#8220;2&#8221;, effectively
+tightening the lead. Furthermore, they are quadded left (except
+eqn, which is quadded right.)
+</p>
+</div>
+
+<p>
+With the exception of <kbd>ADJUST</kbd> and <kbd>QUAD</kbd> (which
+requires a bit of explanation), the style arguments to <kbd>CAPTIONS</kbd>,
+<kbd>LABELS</kbd>, and <kbd>SOURCES</kbd> (which is only available
+for tables) behave identically to the
+<a href="docelement.html#control-macro-args">arguments to control macros</a>.
+</p>
+
+<p>
+The first, required argument after <kbd>CAPTIONS</kbd>,
+<kbd>LABELS</kbd>, or <kbd>SOURCES</kbd> indicates the preprocessor
+type for which you are setting the parameters. (For convenience
+PDF_IMAGE&mdash;argument <kbd>IMG</kbd>&mdash;is here treated as a
+preprocessor.) <kbd>FLOATING</kbd> sets the style for the macros
+<a href="#caption">CAPTION</a>
+and
+<a href="#label">LABEL</a>,
+which are used to label floats, quotes, and blockquotes.
+</p>
+
+<p>
+An argument of <kbd>ALL</kbd> sets a unified style for all
+preprocessors, floats, quotes, and blockquotes. If the
+<kbd>ALL</kbd> argument is given, arguments to subsequent
+invocations of <kbd>CAPTIONS</kbd>, <kbd>LABELS</kbd>, or
+<kbd>SOURCES</kbd> overwrite only the explicitly named style
+parameters.
+</p>
+
+<h4 class="docs">QUAD &mdash; quadding of labels, captions, and sources</h4>
+
+<h5 class="docs" style="text-transform: none">&bull;&nbsp;pic, tbl, pdf images</h5>
+
+<p>
+By default, figures (<b>pic</b> output and pdf images) and tables
+have their captions and labels set quad left. Sources (for
+tables) are also set quad left. Equations have their labels
+set quad right, and their captions centered.
+</p>
+
+<p>
+Regardless of the quad direction, captions, labels and sources
+are set on the width of the figure, table, or pdf image
+unless you pass the optional <kbd>ON_LL</kbd> argument to
+<kbd><span class="nobr">QUAD&nbsp;&lt;direction&gt;</span></kbd>, in which case
+the prevailing document line length is used instead.
+</p>
+
+<h5 class="docs" style="text-transform: none">&bull;&nbsp;eqn</h5>
+
+<p>
+Equations behave differently. By default, equation labels are
+set flush right with the page&#8217;s right margin regardless of
+equation positioning, which is, again by default, centered. If the
+equation is positioned left, the label will appear at the right
+margin regardless of the direction you give to <kbd>QUAD</kbd>. If
+the equation is indented with the
+<kbd><span class="nobr">-I&nbsp;&lt;indent&gt;</span></kbd> option, a quad
+direction of <kbd>LEFT</kbd> is observed, but may overprint the last
+line of the equation.
+</p>
+
+<p>
+Note that there is no <kbd>CENTER</kbd> option for equation labels,
+and that captions are always quadded over the prevailing document
+line length.
+</p>
+
+<h5 class="docs" style="text-transform: none">&bull;&nbsp;quotes and blockquotes</h5>
+
+<p>
+Floating labels attached to <b>QUOTE</b>s are quadded on the
+prevailing document line length, and require the <kbd>INDENT</kbd>
+argument if you want to align them with the left and/or right edges
+the quote.
+</p>
+
+<p>
+Floating labels attached to <b>BLOCKQUOTE</b>s are always quadded on
+the indent and line length of the blockquote.
+</p>
+
+<h5 class="docs" style="text-transform: none">&bull;&nbsp;floats</h5>
+
+<p>
+Floating labels and captions attached to <b>FLOAT</b>s are always
+quadded over the prevailing document line length, and require the
+<kbd>INDENT</kbd> argument if you want to align them with the left
+and/or right edges of the float&#8217;s contents.
+</p>
+
+<h4 class="docs">INDENT</h4>
+
+<p>
+The <kbd>INDENT</kbd> argument may only be used if the label
+or caption type is <kbd>FLOATING</kbd>, and only applies to
+<b>FLOAT</b>s and <b>QUOTE</b>s, not <b>BLOCKQUOTE</b>s.
+</p>
+
+<p>
+It is not possible for mom to know the width of a float before
+setting a label or caption attached to a float. She therefore sets
+it on the prevailing document line length. While this isn&#8217;t
+much of an issue when the label or caption quad is <b>CENTER</b>,
+you may want to adjust the horizontal positioning when the quad is
+<b>LEFT</b> or <b>RIGHT</b>.
+</p>
+
+<p>
+<kbd>INDENT</kbd>, with a numeric value to which a
+<a href="definitions.html#unitofmeasure">unit of measure</a>
+is appended, allows you to indent a floating label or caption so
+it lines up with the left edge of a <b>FLOAT</b> or <b>QUOTE</b>.
+<kbd>INDENT&nbsp;RIGHT</kbd> (with a value) allows you to shorten the
+line length to the appropriate width. If you need both a left and
+right indent, invoke <kbd>LABELS</kbd> or <kbd>CAPTIONS</kbd> twice,
+one instance containing <kbd>INDENT&nbsp;&lt;indent&gt;</kbd> and
+the other <kbd>INDENT&nbsp;RIGHT&nbsp;&lt;indent&gt;</kbd>.
+</p>
+
+<h4 class="docs">ADJUST</h4>
+
+<p>
+The <kbd>ADJUST</kbd> argument allows you to add(<kbd>+</kbd>) or
+subtract (<kbd>-</kbd>) vertical space between labels and captions
+and the output to which they are attached. The argument requires a
+<a href="definitions.html#unitofmeasure">unit of measure</a>.
+For example, if you find that table labels are a bit too close to
+the table itself,
+<br/>
+<span class="pre-in-pp">
+ .LABELS TBL ADJUST +3p
+</span>
+would put three extra points of space between the bottoms of tables
+and the labels that appear beneath them.
+</p>
+
+<h2 id="lists-of" class="docs">Lists of Figures, Tables, and Equations</h2>
+
+<p>
+Besides a
+<a href="tables-of-contents.html">Table of Contents</a>,
+mom can generate Lists of Figures, Tables, and Equations. Labels
+and captions are collected and concatenated, and output in lists
+with the appropriate page number, just like a Table of Contents.
+Including such lists in a document is as simple as adding whichever
+you need of
+<br/>
+<span class="pre-in-pp">
+ .LIST_OF_FIGURES
+ .LIST_OF_EQUATIONS
+ .LIST_OF_TABLES
+</span>
+to the end of your input file.
+</p>
+
+<p>
+Also like the Table of Contents, entries in the Lists&#8217; output
+are clickable PDF links when a document is viewed at the screen.
+</p>
+
+<h3 id="lists-placement" class="docs">Placement of Lists</h3>
+
+<p>
+Lists normally appear after the Table of Contents, and continue
+the page numbering scheme used for it. By default, the Table of
+Contents begins on roman-numeral page &#8220;i&#8221;.
+</p>
+
+<p>
+If you are using mom&#8217;s
+<a href="tables-of-contents.html#auto-relocate-toc">AUTO_RELOCATE_TOC</a>
+feature, you have two options for placement of the Lists within the
+document. If you want the Lists shifted to the top of the document
+along with the Table of Contents, invoke the Lists macros <i>after</i>
+<a href="tables-of-contents.html#toc"><kbd>.TOC</kbd></a>.
+If you prefer to have the Lists at the end of the document, invoke
+the Lists macros <i>before</i> <kbd>.TOC</kbd>.
+</p>
+
+<p>
+Lists shifted with the Table of Contents do not appear in the Table
+of Contents itself, but do appear as clickable links in the PDF
+outline typically available in the left panel of most PDF viewers.
+Lists that are not shifted with the Table of Contents appear in both
+the Table of Contents itself and the PDF outline.
+</p>
+
+<div class="macro-id-overline" style="margin-top: 1em">
+<h3 id="lists-macros" class="macro-id">Macros to generate Lists</h3>
+</div>
+
+<div class="box-macro-args" style="margin-top: .5em">
+Macro: <b>LIST_OF_EQUATIONS</b>
+<br/>
+Macro: <b>LIST_OF_FIGURES</b>
+<br/>
+Macro: <b>LIST_OF_TABLES</b>
+<br/>
+<kbd class="macro-args">Arguments:
+<br/>
+&nbsp;&nbsp;[ TITLE_STRING "&lt;string&gt;" ] [ START_PAGENUM &lt;page number&gt; ]
+</kbd>
+</div>
+
+<p>
+The first optional argument to the <kbd>LIST_OF_&lt;type&gt;</kbd>
+macros allows you to change the title that appears at the top of the
+page. This is useful not only for internationalization, or to meet
+the requirements of various style guides, but is also useful
+for, say, documents containing musical examples, which, per
+MLA-style, should be labelled &#8220;Example &#8221; or
+&#8220;Ex. &#8221;. When it comes time to output the List of
+Figures (to which musical examples, usually scanned pdf images, belong),
+<br/>
+<span class="pre-in-pp">
+ LIST_OF_FIGURES TITLE_STRING "List of Examples"
+</span>
+ensures that the title of the List is correct.
+</p>
+
+<p>
+The second optional argument allows you to give a starting page
+number for a list in cases where mom&#8217;s pagination scheme does
+not provide the List with the starting page number you want.
+</p>
+<h3 id="formatting-lists" class="docs">Formatting and style parameters for Lists</h3>
+
+<p>
+Like the Table of Contents, nearly every aspect of Lists can be
+designed independently of a document&#8217;s overall style. By
+default, Lists follow the formatting and style parameters of the
+Table of Contents, both mom&#8217;s defaults and any changes you may
+have made to the Table of Contents.
+</p>
+
+<p>
+If you wish to make changes to any aspect of Lists formatting
+or styling, the macro <kbd>LISTS_STYLE</kbd> provides all the
+tools necessary. It is unlikely that you&#8217;ll want the
+formatting of the various list types to differ one from the other,
+so <kbd>LISTS_STYLE</kbd> applies to all Lists. In the event that
+you do need to change some aspect of the formatting for different
+list types, simply invoke <kbd>LISTS_STYLE</kbd> immediately prior
+to each list whose formatting needs to be changed.
+</p>
+
+<div class="macro-id-overline" style="margin-top: 1em">
+<h3 id="lists-style" class="macro-id">Lists style</h3>
+</div>
+
+<div class="box-macro-args" style="margin-top: .5em">
+Macro: <b>LISTS_STYLE</b> <kbd class="macro-args">
+<br/>
+Arguments:
+<br/>
+&nbsp;&nbsp;FAMILY &lt;family&gt; \
+<br/>
+&nbsp;&nbsp;FONT &lt;font&gt; \
+<br/>
+&nbsp;&nbsp;PT_SIZE &lt;size&gt; \
+<br/>
+&nbsp;&nbsp;LEAD &lt;leading&gt; \
+<br/>
+&nbsp;&nbsp;TITLE_FAMILY &lt;family&gt; \
+<br/>
+&nbsp;&nbsp;TITLE_FONT &lt;font&gt; \
+<br/>
+&nbsp;&nbsp;TITLE_SIZE +|-&lt;size&gt; \
+<br/>
+&nbsp;&nbsp;TITLE_QUAD LEFT | CENTER | RIGHT \
+<br/>
+&nbsp;&nbsp;TOC_HEADER_UNDERSCORE default = none
+<br/>
+&nbsp;&nbsp;TITLE_COLOR &lt;color&gt; \
+<br/>
+&nbsp;&nbsp;PN_FAMILY &lt;family&gt; \
+<br/>
+&nbsp;&nbsp;PN_FONT &lt;font&gt; \
+<br/>
+&nbsp;&nbsp;PN_SIZE +|-&lt;size&gt; \
+<br/>
+&nbsp;&nbsp;EQN_PN_PADDING &lt;placeholders&gt; \
+<br/>
+&nbsp;&nbsp;FIG_PN_PADDING &lt;placeholders&gt; \
+<br/>
+&nbsp;&nbsp;TBL_PN_PADDING &lt;placeholders&gt; \
+<br/>
+&nbsp;&nbsp;PAGENUM_STYLE DIGIT | ROMAN | roman | ALPHA | alpha \
+<br/>
+&nbsp;&nbsp;NO_PAGINATION
+</kbd>
+</div>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span>
+Arguments may be broken into several lines using the
+&#8220;line-continued&#8221; backslash (<b>\</b>), as shown above.
+</p>
+</div>
+
+<p>
+<kbd>FAMILY</kbd> is the family for the entirety of Lists pages.
+</p>
+
+<p>
+<kbd>FONT</kbd> is the font for the entirety of Lists pages.
+</p>
+
+<p>
+<kbd>PT_SIZE</kbd> is the base point size for the entirety of Lists
+pages.
+</p>
+
+<p>
+<kbd>LEAD</kbd> is the base leading for the entirety of Lists pages.
+</p>
+
+<p>
+<kbd>TITLE_FAMILY</kbd> is the family for the Lists titles if you
+want it different from the family otherwise used for the Lists
+pages.
+</p>
+
+<p>
+<kbd>TITLE_FONT</kbd> is the font for the Lists titles if you want
+it different from the font otherwise used for the Lists pages.
+</p>
+
+<p>
+<kbd>TITLE_SIZE</kbd> tells mom by how much to increase
+(<kbd>+</kbd>) or decrease (<kbd>-</kbd>) the point size of the
+titles relative to the overall point size of Lists pages.
+</p>
+
+<p>
+<kbd>TITLE_QUAD</kbd> tells mom how to position the title
+horizontally.
+</p>
+
+<p>
+<kbd>TITLE_COLOR</kbd> sets the colour for the titles. The colour
+must be pre-initialized with
+<a href="color.html#newcolor">NEWCOLOR</a>
+or
+<a href="color.html#xcolor">XCOLOR</a>.
+</p>
+
+<p>
+<kbd>PN_FAMILY</kbd> sets the family for entry pagenumbers.
+</p>
+
+<p>
+<kbd>PN_FONT</kbd> sets the font for entry pagenumbers.
+</p>
+
+<p>
+<kbd>PN_SIZE</kbd> tells mom by how much to increase (<kbd>+</kbd>)
+or decrease (<kbd>-</kbd>) the point size of entry pagenumbers
+relative to the overall point size of Lists pages.
+</p>
+
+<p>
+<kbd>EQN_PN_PADDING</kbd>, <kbd>FIG_PN_PADDING</kbd>, and
+<kbd>TBL_PN_PADDING</kbd> tells mom how many placeholders to reserve
+for the entry pagenumbers in their respective Lists. If, for example,
+a document with both tables and figures runs to over a hundred
+pages, but there are no tables after page 99,
+<br/>
+<span class="pre-in-pp">
+ LISTS_STYLE FIG_PN_PADDING 3
+ LISTS_STYLE TBL_PN_PADDING 2
+</span>
+would prevent an unneeded, reserved placeholder from putting too
+much space between the leader and the entry pagenumber in the List of
+Tables.
+</p>
+
+<p>
+The padding in effect, unless you change it, is whatever was set for
+the Tables of Contents; mom&#8217;s default is &#8220;3&#8221;.
+</p>
+
+<p>
+<kbd>PAGENUM_STYLE</kbd> tells mom which pagination format to use
+for the page numbers of the Lists pages themselves. By default,
+since Lists observe what is in effect for the Table of Contents, the
+pagination format is &#8220;roman&#8221;. Please note that the
+starting page number for any of the Lists is given as an argument to
+the
+<a href="#lists-of">LISTS_0F_&lt;type&gt;</a>
+macro.
+</p>
+
+<p>
+<kbd>NO_PAGINATION</kbd> disables pagination of Lists pages.
+</p>
+
+<h2 id="box-intro" class="docs">Shaded backgrounds and frames (boxes)</h2>
+
+<p>
+Mom lets you add shaded backgrounds and frames to text and other
+material. For convenience, she calls backgrounds and frames
+&#8220;boxes.&#8221; Entire passages may be boxed, or individual
+document elements like headings, quotes, or pre-processor output.
+Furthermore, boxes may be nested.
+</p>
+
+<p>
+Boxes start on the baseline where the boxed material would have
+started were it not for the box, subject to minor aesthetic
+corrections mom takes the liberty of making.
+</p>
+
+<p>
+Boxes extend from the current left margin to the current right
+margin, respecting any active left and/or right indents. There are
+two exceptions,
+<a href="docelement.html#epigraph">EPIGRAPH BLOCK</a>
+and
+<a href="docelement.html#blockquote">BLOCKQUOTE</a>,
+which are discussed
+<a href="#quotes">here</a>.
+</p>
+
+<p>
+After a box is started, active left and right indents are
+cleared. The box&#8217;s inset determines the new left and right
+margins. Indents set inside a box are relative to the inset.
+When a box is stopped, formerly active left and right indents
+are restored.
+</p>
+
+<p>
+Frames are drawn from the perimeter inward. The inset is
+relative to the inner edge of the frame.
+</p>
+
+<p>
+If a box (including the bottom inset) can complete on a page, it
+does, even if there is no further room for type. This may, on
+occasion, result in slight deviations from normal bottom margin
+alignment.
+</p>
+
+<p>
+Boxes span pages whenever the boxed material continues on the next
+page. Spanning boxes extend fully to the bottom margin of the page
+on which they begin, leaving a slightly larger inset at the bottom
+than around the other sides.
+</p>
+
+<p>
+When there is not enough room to set at least one line of type
+inside a box, mom defers starting the box until the next page,
+leaving a gap.
+</p>
+
+<p>
+Boxed material is not
+<a href="docprocessing.html#shim-vs-flex">shimmed</a>
+or
+<a href="docprocessing.html#shim-vs-flex">flexed</a>.
+If either was active prior to the box, it is restored when the box
+ends and mom automatically shims or flexes whatever comes next.
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="important">NOTE:</span>
+Shaded backgrounds and frames are not available when your
+<a href="docprocessing.html#printstyle">PRINTSTYLE</a>
+is <kbd>TYPEWRITE</kbd> or when
+<a href="docprocessing.html#columns">COLUMNS</a> are enabled.
+</p>
+</div>
+
+<div class="macro-id-overline">
+<h3 id="box" class= "macro-id">BOX</h3>
+</div>
+
+<div id="box-macro" class="box-macro-args" style="margin-top: .5em">
+Macro: <b>BOX</b> <kbd class="macro-args"> [ &lt;arguments&gt; ] | &lt;anything&gt;
+<br/>
+Arguments:
+<br/>
+[ SHADED &lt;color&gt; | OUTLINED &lt;colour&gt; ] \
+<br/>
+[ INSET &lt;dist&gt; ] \
+<br/>
+[ WEIGHT &lt;wt&gt; ] \
+<br/>
+[ ADJUST +|-&lt;amount&gt; ] \
+<br/>
+[ EQN | PIC | GRAP | IMG ]
+</kbd>
+</div>
+
+<p>
+Without arguments, BOX begins a shaded grey background.
+The material inside is inset by one
+<a href="definitions.html#picaspoints">pica</a>.
+Any other type of box requires at a minimum either
+<kbd>SHADED</kbd> or <kbd>OUTLINED</kbd>. In the case of boxes
+that are to contain pdf images or pre-processor material for
+<a href="#eqn">eqn</a>,
+<a href="#pic">pic</a>,
+or
+<a href="#grap">grap</a>,
+<kbd>IMG</kbd>, <kbd>EQN</kbd>, <kbd>PIC</kbd>, or <kbd>GRAP</kbd>
+must also be given. Note that
+<a href="#tbl">tbl</a>
+does not have this requirement.
+</p>
+
+<p>
+BOX is a
+<a href="definitions.html#toggle">toggle macro</a>,
+so any argument other than one in the list completes the box
+(<kbd>QUIT</kbd>, <kbd>END</kbd>, <kbd>X</kbd>, etc).
+</p>
+
+<p>
+Boxes should be started inside toggle macros like
+<a href="docelement.html#quote">QUOTE</a>
+or
+<a href="#float">FLOAT</a>
+just after the macro is called, and terminated just before toggling
+the macro off (unless you wish the box to enclose further material).
+</p>
+
+<p>
+Non-toggle macros like
+<a href="docelement.html#heading">HEADING</a>
+or
+<a href="docelement.html#pp">PP</a>
+require that the box be started beforehand. Boxed pre-processor
+material must be fully enclosed by BOX&nbsp;/&nbsp;BOX&nbsp;OFF, as
+in this recipe for a one-off boxed pic diagram:
+<span class="pre-in-pp">
+.BOX
+.PS
+&lt;pic commands&gt;
+.PE
+.BOX OFF
+</span>
+Arguments to BOX are not sticky. Each time you invoke BOX, you
+must invoke it with arguments unless you want mom&#8217;s default grey
+background. If all or several boxes in a document require the same
+arguments, create a macro at the top of the input file that calls
+BOX with the arguments you want, e.g.
+<span class="pre-in-pp">
+&nbsp;&nbsp;.de PINK_BOX
+&nbsp;&nbsp;.BOX \
+&nbsp;&nbsp;&nbsp;&nbsp;SHADED pink \
+&nbsp;&nbsp;&nbsp;&nbsp;OUTLINED darkred \
+&nbsp;&nbsp;&nbsp;&nbsp;WEIGHT 1p \
+&nbsp;&nbsp;&nbsp;&nbsp;INSET 9p
+&nbsp;&nbsp;..
+</span>
+<kbd>.PINK_BOX</kbd> may then be used instead of <kbd>.BOX</kbd> any
+time you want a box with those arguments.
+</p>
+
+<h3 class="docs">SHADED | OUTLINED</h3>
+
+<p>
+<kbd>SHADED</kbd> or <kbd>OUTLINED</kbd> are required. Both may
+be given, resulting in a shaded background with a frame, and both
+require a colour, e.g.
+<span class="pre-in-pp">
+&nbsp;&nbsp;.BOX SHADED blue OUTLINED black
+</span>
+The colour may be
+</p>
+
+<ul style="margin-top: -1em;">
+ <li>an xcolor name</li>
+ <li>a colour initialized with
+ <a href="color.html#newcolor">NEWCOLOR</a>
+ or
+ <a href="color.html#xcolor">XCOLOR</a>
+ </li>
+ <li>an RGB hexadecimal string beginning with (e.g. #FF0000)</li>
+</ul>
+
+<p>
+Note that without <kbd>SHADED</kbd>, the above would simply draw a
+black frame.
+</p>
+
+<h3 class="docs">WEIGHT</h3>
+
+<p>
+Mom&#8217;s default weight for <kbd>OUTLINED</kbd> is 1/2
+<a href="definitions.html#picaspoints">point</a>.
+If you&#8217;d like to change it, give <kbd>WEIGHT</kbd> the desired
+value with a unit of measure appended, typically points, e.g.
+<span class="pre-in-pp">
+&nbsp;&nbsp;.BOX OUTLINED black WEIGHT 1p
+</span>
+</p>
+
+<h3 class="docs">INSET</h3>
+
+<p>
+Mom&#8217;s default inset for boxes is one
+<a href="definitions.html#picaspoints">pica</a>
+on all sides. If you&#8217;d like a larger or smaller inset, give
+<kbd>INSET</kbd> the distance you want with a unit of measure
+appended, e.g.
+<span class="pre-in-pp">
+&nbsp;&nbsp;.BOX SHADED pink INSET 2m
+</span>
+</p>
+
+<h3 class="docs">ADJUST</h3>
+
+<p>
+If you are not happy with the starting position of a box, you can
+change it by giving <kbd>ADJUST</kbd> the distance you want it
+raised (-) or lowered (+) with a unit of measure appended. For
+example, to lower a box three points,
+<span class="pre-in-pp">
+&nbsp;&nbsp;.BOX OUTLINED black ADJUST +3p
+</span>
+To raise it,
+<span class="pre-in-pp">
+&nbsp;&nbsp;.BOX OUTLINED black ADJUST -3p
+</span>
+</p>
+
+<h3 class="docs">PIC / GRAP / EQN / IMG</h3>
+
+<p>
+The <kbd>PIC</kbd> argument must be given to BOX if the box contains
+any
+<a href="#pic">pic</a>
+diagrams. Likewise, graphs made with
+<a href="#grap">grap</a>,
+equations made with
+<a href="#eqn">eqn</a>,
+and
+<a href="#pdf-image">pdf images</a>
+require a corresponding <kbd>GRAP</kbd>, <kbd>EQN</kbd>, or
+<kbd>IMG</kbd> argument.
+</p>
+
+<p>
+If you&#8217;re boxing a single diagram, graph, or pdf image, wrap
+it in a float, like this:
+<span class="pre-in-pp">
+&nbsp;&nbsp;.FLOAT
+&nbsp;&nbsp;.BOX PIC &lt;other parameters&gt;
+&nbsp;&nbsp;.PS
+&nbsp;&nbsp;&lt;pic input&gt;
+&nbsp;&nbsp;.PE
+&nbsp;&nbsp;.BOX OFF
+&nbsp;&nbsp;.FLOAT OFF
+</span>
+Notice that in the case of pdf images, pic, and grap, this
+represents a change from the norm, where the use of FLOAT may be
+destructive and is discouraged.
+</p>
+
+<h2 id="box-notes" class="docs">Additional notes on BOX usage and behaviour</h2>
+
+<h3 id="qbef" class="docs">QUOTE, BLOCKQUOTE, EPIGRAPH, FLOAT</h3>
+
+<p>
+<a href="docelement.html#quote">QUOTE</a>,
+<a href="docelement.html#blockquote">BLOCKQUOTE</a>,
+<a href="docelement.html#epigraph">EPIGRAPH</a>,
+and
+<a href="images.html#float">FLOAT</a>
+require that boxes be started <i>after</i> they are
+invoked and stopped just before they are toggled off:
+<span class="pre-in-pp">
+&nbsp;&nbsp;.QUOTE
+&nbsp;&nbsp;.BOX &lt;parameters&gt;
+&nbsp;&nbsp;Text of quote
+&nbsp;&nbsp;.BOX OFF
+&nbsp;&nbsp;.QUOTE OFF
+</span>
+</p>
+
+<h3 id="code" class="docs">CODE</h3>
+
+<p>
+If you&#8217;re boxing
+<a href="docelement.html#code">CODE</a>
+that&#8217;s wrapped inside
+<a href="docelement.html#quote">QUOTE</a>,
+as described
+<a href="docelement.html#quote-code">here</a>,
+set the quote indent to &#8220;0&#8221; with
+<span class="pre-in-pp">
+&nbsp;&nbsp;.QUOTE_STYLE INDENT 0
+</span>
+so that the box&#8217;s leftmost inset is respected.
+</p>
+
+<p>
+Here&#8217;s a recipe for setting boxed code with an 18-point inset:
+<span class="pre-in-pp">
+&nbsp;&nbsp;.QUOTE_STYLE INDENT 0
+&nbsp;&nbsp;.QUOTE
+&nbsp;&nbsp;.CODE
+&nbsp;&nbsp;.BOX INSET 18p
+&nbsp;&nbsp;Hello, world.
+&nbsp;&nbsp;.BOX OFF
+&nbsp;&nbsp;.QUOTE OFF
+</span>
+Note that CODE, wrapped inside QUOTE, does not require a corresponding CODE OFF.
+</p>
+
+<h4 id="quotes" class="docs">Description of boxed BLOCKQUOTES and EPIGRAPH BLOCKS</h4>
+
+<p>
+When you box a BLOCKQUOTE, or an EPIGRAPH with the <kbd>BLOCK</kbd>
+argument, the box is centred on the page and is only as wide as the
+blockquote or epigraph plus the box&#8217;s inset.
+</p>
+
+<p>
+QUOTE and EPIGRAPH (without the <kbd>BLOCK</kbd> argument), on the
+other hand, set the box fully to the left and right margins.
+</p>
+
+<h4 id="leftover" class="docs">Leftover box syndrome</h4>
+
+<p>
+Boxed quotes and blockquotes sometimes exhibit leftover box
+syndrome, where the page after a fully terminated boxed quote or
+blockquote begins with an empty bit of box. Equally, you may
+sometimes see the lower edge of a quote&#8217;s or
+blockquote&#8217;s box falling slightly below the page&#8217;s
+bottom margin.
+</p>
+
+<p>
+The solution in both situations is to use the <kbd>ADJUST</kbd>
+argument to raise or lower the box&#8217;s starting position.
+Leftover box syndrome is usually fixed by raising the box slightly.
+When the box runs too deep, lowering it is generally recommended,
+although this will result in a widowed line at the top of the next
+page. In either case, some experimentation is necessary.
+</p>
+
+<h3 id="slides" class="docs">SLIDES</h3>
+
+<p>
+On a slide with no pauses, boxes behave as they do in printed
+documents.
+</p>
+
+<p>
+When a slide contains pauses, only the material up to the first
+pause is boxed. As subsequent material is revealed, the box changes
+location, moving down to surround each new item. This behaviour
+persists until the box is stopped, making it useful for highlighting
+material as it is revealed.
+</p>
+
+<h3 id="footnotes" class="docs">Footnotes</h3>
+
+<p>
+You don&#8217;t have to worry about boxes encroaching on footnotes.
+Mom makes sure they don&#8217;t.
+</p>
+
+<h2 id="page-color-intro" class="docs">Page colour</h2>
+
+<p>
+Mom lets you change the page (&#8220;paper&#8221;) colour
+from white to anything you like. While this has limited application
+in printed documents, it can be effective in
+<a href="docprocessing.html#slides">slide presentations</a>.
+</p>
+
+<div class="macro-id-overline">
+<h3 id="page-color" class= "macro-id">PAGE_COLOR</h3>
+</div>
+
+<div id="page-color-macro" class="box-macro-args" style="margin-top: .5em">
+Macro: <b>PAGE_COLOR</b> <kbd class="macro-args"> &lt;color&gt; | OFF | off</kbd>
+</div>
+<p class="requires" style="font-style: normal">
+<i>Aliased as</i> <kbd>PAGE_COLOUR</kbd>, <kbd>SLIDE_COLOR</kbd>,
+<i>and</i> <kbd>SLIDE_COLOUR</kbd>.
+</p>
+
+<p>
+When you invoke PAGE_COLOR with a <kbd>color</kbd> argument, the
+current and subsequent pages turn the colour you request. If
+more than one instance of PAGE_COLOR appears before a page break,
+including <kbd>PAGE_COLOR OFF</kbd>, only the last applies.
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span>
+Unlike other
+<a href="definitions.html#toggle">toggle macros</a>,
+PAGE_COLOR requires the use of <kbd>OFF</kbd> or <kbd>off</kbd>
+to terminate it rather than an arbitrary string (<kbd>OFF</kbd>,
+<kbd>QUIT</kbd>, <kbd>END</kbd>, <kbd>X</kbd>, etc).
+</p>
+</div>
+
+<div class="rule-long"><hr/></div>
+
+<!-- Navigation links -->
+<table style="width: 100%; margin-top: 12px;">
+<tr>
+ <td style="width: 33%;"><a href="toc.html">Back to Table of Contents</a></td>
+ <td style="width: 20%; text-align: center;"><a href="#top">Top</a></td>
+ <td style="width: 46%; text-align: right;"><a href="headfootpage.html">Next: Page headers/footers, pagination</a></td>
+</tr>
+</table>
+
+</div>
+
+<div class="bottom-spacer"><br/></div>
+
+</body>
+</html>
diff --git a/contrib/mom/momdoc/inlines.html b/contrib/mom/momdoc/inlines.html
new file mode 100644
index 0000000..8613161
--- /dev/null
+++ b/contrib/mom/momdoc/inlines.html
@@ -0,0 +1,1112 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+This file is part of groff, the GNU roff type-setting system.
+
+Copyright (C) 2004-2020 Free Software Foundation, Inc.
+Written by Peter Schaffter (peter@schaffter.ca).
+
+Permission is granted to copy, distribute and/or modify this document
+under the terms of the GNU Free Documentation License, Version 1.3 or
+any later version published by the Free Software Foundation; with no
+Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
+Texts.
+
+A copy of the Free Documentation License is included as a file called
+FDL in the main directory of the groff source package.
+-->
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <meta http-equiv="content-type" content="text/html;charset=utf-8"/>
+ <title>Mom -- Inline escapes</title>
+ <link rel="stylesheet" type="text/css" href="stylesheet.css" />
+</head>
+
+<body style="background-color: #f5faff;">
+
+<!-- ==================================================================== -->
+
+<div id="top" class="page">
+
+<!-- Navigation links -->
+<table style="width: 100%;">
+<tr>
+ <td><a href="toc.html">Back to Table of Contents</a></td>
+ <td style="text-align: right;"><a href="color.html#top">Next: Coloured text</a></td>
+</tr>
+</table>
+
+<h1 id="inline-escapes" class="docs">Inline escapes</h1>
+
+<div style="text-align: center;">
+<a href="#index-inlines">List of inline escapes</a>
+</div>
+
+<div class="rule-medium"><hr/></div>
+
+<h2 id="intro-inlines" class="docs">Introduction</h2>
+<p>
+Inline escapes, as described in the
+<a href="definitions.html#inlines">groff terms</a>
+section of this manual, are typesetting commands that appear in text
+<a href="definitions.html#inputline">input lines</a>,
+as opposed to macros and other
+<a href="definitions.html#controllines">control lines</a>
+that must appear on lines by themselves.
+</p>
+
+<p>
+Aside from altering type parameters within a line, inlines also tell
+groff about special characters&mdash;em-dashes, bullets,
+<a href="definitions.html#figurespace">figure/digit-width spaces</a>,
+and so on. It is beyond the scope of this manual to provide
+a complete list of groff&#8217;s inline functions and special
+characters. I recommend having a look at the
+<a href="intro.html#canonical">canonical reference materials</a>
+should you need more information than is contained herein.
+</p>
+
+<p>
+In groff, the escape character is the backslash (<kbd>\</kbd>).
+Groff interprets everything following the backslash as instructions,
+not literal text, until the escape sequence is complete. Should
+you need the actual backslash character as part of a line of text,
+simply enter it twice (<kbd>\\</kbd>). Groff understands that this
+means &#8220;please print a backslash character.&#8221;
+</p>
+
+<p>
+You can also use <kbd>\e</kbd> to print a literal backslash, or use
+<a href="goodies.html#esc-char">ESC_CHAR</a> to change the escape
+character to something other than the backslash, which lets you
+use a single backslash as a literal backslash.
+</p>
+
+<p>
+Groff has a number of ways of recognizing what constitutes a
+complete escape sequence. This is both a boon and a curse; some
+escape sequences have no terminating delimiter and consequently
+become difficult to distinguish from real input text. Others
+require the use of an opening parenthesis with no corresponding
+closing parenthesis. Still others need to be enclosed in square
+brackets.
+</p>
+
+<p>
+Mom recognizes that certain escapes get used more often than others.
+For these, she has a consistent input style that takes the form
+<kbd><span class="nobr">\*[...]</span></kbd>, which makes them stand out well
+from the text of your documents. These escapes are the ones listed
+under
+<a href="#inlines-mom">Mom&#8217;s personal inline escapes</a>.
+</p>
+
+<p>
+Despite mom&#8217;s best intentions, there are still
+a number of typesetting functions that can only be accomplished
+with groff&#8217;s native inline escapes. I&#8217;ve listed the
+ones that strike me as essential, but there are many others. If you
+want to know what they are, please read the
+<a href="intro.html#canonical">canonical reference materials</a>
+pertaining to groff.
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="tip">Helpful bit of information:</span>
+Inline escapes can be used in
+<a href="docprocessing.html#docprocessing">document processing macros</a>
+that take
+<a href="definitions.html#stringargument">string arguments</a>.
+</p>
+</div>
+
+<div class="macro-list-container">
+<h3 id="index-inlines" class="macro-list">List of inline escapes</h3>
+
+<ul class="macro-list">
+<li id="inlines-mom"><a href="#inlines-mom-top">Mom&#8217;s personal inline escapes</a>
+<ul class="no-enumerator" style="margin-left: -1.5em;">
+ <li><a href="#inline-fonts-mom">Changing fonts</a></li>
+ <li><a href="#inline-size-mom">Changing point size</a></li>
+ <li><a href="#uc-lc">Capitalise a section of type</a></li>
+ <li><a href="#inline-kerning-mom">Pairwise kerning</a></li>
+ <li><a href="#inline-horizontal-mom">Horizontal movement</a></li>
+ <li><a href="#inline-vertical-mom">Vertical movement</a></li>
+ <li><a href="#inline-b-mom">Terminate a line without advancing on the page</a></li>
+ <li><a href="#tb-plus-mom">Call the next sequential tab without advancing on the page</a></li>
+ <li><a href="#inline-rule-mom">Full measure rules</a>
+ <ul class="sublist" style="font-size: 100%;">
+ <li><a href="#rule-weight">Macro to control the weight of rules</a></li>
+ </ul></li>
+</ul></li>
+<li id="inlines-groff"><a href="#inlines-groff-top">Commonly-used groff inline escapes</a>
+<ul class="no-enumerator" style="margin-left: -1.5em;">
+ <li><kbd>\f</kbd>&nbsp;<a href="#inline-fonts-groff">Font control</a></li>
+ <li><kbd>\h</kbd>&nbsp;<a href="#inline-horizontal-groff">Inline horizontal motions</a></li>
+ <li><kbd>\v</kbd>&nbsp;<a href="#inline-vertical-groff">Inline vertical motions</a></li>
+ <li><kbd>\w</kbd>&nbsp;<a href="#inline-stringwidth-groff">String width function</a></li>
+ <li><kbd>\l</kbd>&nbsp;<a href="#inline-linedrawing-groff">Horizontal line drawing function</a></li>
+ <li style="margin-left: 1.6em;"><a href="#inline-characters-groff">Special characters</a></li>
+</ul></li>
+</ul>
+</div>
+
+<div class="rule-medium"><hr/></div>
+
+<!-- -INLINE_FONTS_MOM- -->
+
+<h2 id="inlines-mom-top" class="macro-group">Mom&#8217;s personal inline escapes</h2>
+
+<h3 id="inline-fonts-mom" class="docs">Changing fonts</h3>
+
+<p>
+Mom provides five escapes for changing fonts inline:
+<br/>
+<span class="pre-in-pp">
+ \*[ROM] Change to the medium roman font
+ \*[IT] Change to the medium italic font
+ \*[BD] Change to the bold roman font
+ \*[BDI] Change to the bold italic font
+ \*[PREV] Revert to the previous font (once only)*
+</span>
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">*Note:</span>
+<kbd><span class="nobr">\*[PREV]</span></kbd> does not operate "stack
+style". It returns to the previous font once only, and
+afterwards has no effect. In other words, in the case of
+<kbd><span class="nobr">\*[PREV]\*[PREV]</span></kbd>, only the first
+<kbd><span class="nobr">\*[PREV]</span></kbd> is respected; the second one is silently
+ignored.
+</p>
+</div>
+
+<p>
+These escapes are provided for merely for convenience, legibility,
+and consistency when typesetting with mom. For more complete and
+flexible inline font control, please see
+<a href="#inline-fonts-groff">font control with <kbd>\f</kbd></a>.
+</p>
+
+<div class="box-notes">
+<h3 id="inlines-docprocessing-fonts" class="docs notes">Notes concerning document processing</h3>
+<p style="margin-top: .5em;">
+If you&#8217;re using the
+<a href="docprocessing.html#docprocessing">document processing macros</a>,
+inline font changes remain in effect only for the duration of the
+current document element tag.
+</p>
+
+<p class="tip-bottom">
+Additionally, if you&#8217;re designing your own
+<a href="headfootpage.html#headfootpage-intro">HEADERS or FOOTERS</a>
+and want to use mom&#8217;s inline escapes for changing fonts as
+part of the left, centre and/or right strings, or in the strings
+for
+<a href="headfootpage.html#hdrftr-rectoverso">recto</a>
+and/or
+<a href="headfootpage.html#hdrftr-rectoverso">verso</a>
+HEADERS or FOOTERS, or in the strings passed to
+<a href="headfootpage.html#headers-and-footers">HEADERS_AND_FOOTERS</a>,
+you must enter the inlines beginning with <kbd>\E*</kbd>
+rather than just <kbd><span class="nobr">\*</span></kbd>, e.g.
+<kbd><span class="nobr">\E*[BD]</span></kbd>. You may, in such cases, prefer to
+use the simpler groff inline escape
+<a href="#inline-fonts-groff"><kbd>\f</kbd></a>.
+</p>
+</div>
+
+<!-- -INLINE_SIZE_MOM- -->
+
+<h3 id="inline-size-mom" class="docs">Changing point size</h3>
+<p>
+Mom has two inline escapes for changing point size:
+<br/>
+<span class="pre-in-pp">
+ \*[SIZE &lt;size&gt;]
+</span>
+and
+<br/>
+<span class="pre-in-pp">
+ \*S[&lt;size&gt;]
+</span>
+where &#8220;size&#8221; is the new size you want. You can use
+either; they behave exactly the same way. For example, to change
+the point size of type inline to 12 points, you could enter either
+<br/>
+<span class="pre-in-pp">
+ \*[SIZE 12]
+</span>
+or
+<br/>
+<span class="pre-in-pp">
+ \*S[12]
+</span>
+Entering either <kbd><span class="nobr">\*[SIZE]</span></kbd> or
+<kbd><span class="nobr">\*S[]</span></kbd> with no argument reverts to the former
+point size.
+</p>
+
+<p>
+The advantage of the first form is that it&#8217;s easy to remember,
+and follows mom&#8217;s usual inline syntax. The advantage of the
+second is that it&#8217;s more concise.
+</p>
+
+<p>
+Notice that in both cases, the new size does not require a
+<a href="definitions.html#unitofmeasure">unit of measure</a>;
+<a href="definitions.html#picaspoints">points</a>
+is assumed. However, a unit of measure may be appended to the size
+if that&#8217;s what you wish. Fractional sizes are, of course,
+allowed.
+</p>
+
+<p>
+The size given to <kbd><span class="nobr">\*[SIZE&nbsp;&lt;size&gt;]</span></kbd>
+or <kbd><span class="nobr">\*S[&lt;size&gt;]</span></kbd> may be expressed in
+plus or minus terms, which can be very useful. In the following
+examples, the word &#8220;mom&#8221; will be output 2 points larger
+than the point size of the rest of the line.
+<br/>
+<span class="pre-in-pp">
+ While she isn't perfect, \*S[+2]mom\*S[-2] isn't half bad.
+ While she isn't perfect, \*[SIZE +2]mom\*[SIZE -2] isn't half bad.
+</span>
+Please note that inline size changes do not update the leading if
+<a href="typesetting.html#autolead">AUTOLEAD</a>
+is enabled.
+</p>
+
+<div class="box-notes">
+<h3 id="inline-docprocessing-ps" class="docs notes">NOTE CONCERNING DOCUMENT PROCESSING</h3>
+<p style="margin-top: .5em;">
+If you&#8217;re using the
+<a href="docprocessing.html#docprocessing">document processing macros</a>
+and wish to design your own
+<a href="headfootpage.html#headfootpage-intro">HEADERS or FOOTERS</a>
+using mom&#8217;s inline escape for changing point size as part of
+the left, centre and/or right strings, or in the strings for
+<a href="headfootpage.html#hdrftr-rectoverso">recto</a>
+and/or
+<a href="headfootpage.html#hdrftr-rectoverso">verso</a>
+HEADERS or FOOTERS, or in the strings passed to
+<a href="headfootpage.html#headers-and-footers">HEADERS_AND_FOOTERS</a>,
+you <i>must</i> use the form <kbd><span class="nobr">\*S[&lt;n&gt;]</span></kbd>
+and enter the inline beginning with <kbd>\E*</kbd>, like this:
+<kbd><span class="nobr">\E*S[&lt;+|-&gt;&lt;n&gt;]</span></kbd>.
+</p>
+
+<p class="tip-bottom">
+<span class="additional-note">Additional note:</span>
+If you&#8217;re accustomed to groff&#8217;s usual way of handling
+inline size requests <kbd>(\sN, \s±N, \s(NN, \s±(NN, \s[NNN],
+\s±[NNN]),</kbd> feel free to continue with your old habits. Mom
+doesn&#8217;t care.
+</p>
+</div>
+
+<!-- -CAPITALISATION- -->
+
+<h3 id="uc-lc" class="docs">Capitalise a section of type</h3>
+<p>
+If you need to capitalise a region of type inline,
+bracket the region of type with the inline escapes,
+<kbd><span class="nobr">\*[UC]</span></kbd> (Upper Case) and
+<kbd><span class="nobr">\*[LC]</span></kbd> (Lower Case), like this:
+<br/>
+<span class="pre-in-pp">
+ All work \*[UC]and\*[LC] no play makes Jack a dull boy.
+</span>
+The above produces, on output
+<br/>
+<span class="pre-in-pp">
+ All work AND no play makes Jack a dull boy.
+</span>
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span>
+<kbd>\*[UC]</kbd> and <kbd>\*[LC]</kbd> must not be used inside the
+<a href="definitions.html#stringargument">string arguments</a>
+passed to the
+<a href="headfootpage.html#hdrftr-strings">HEADER_&lt;POSITION&gt;</a>
+macro. Instead, use the control macro
+<a href="headfootpage.html#_caps">HEADER_&lt;POSITION&gt;_CAPS.</a>
+For
+<a href="headfootpage.html#hdrftr-rectoverso">HEADER_RECTO</a>
+(or _VERSO) or
+<a href="headfootpage.html#hdrftr-rectoverso">FOOTER_RECTO</a>
+(or _VERSO), supply the <kbd>CAPS</kbd> option to the appropriate
+macro.
+</p>
+</div>
+
+<!-- -INLINE_KERNING_MOM- -->
+
+<h3 id="inline-kerning-mom" class="docs">Pairwise kerning</h3>
+<p>
+Pairwise kerning means moving specific letter pairs closer
+together or further apart (see
+<a href="definitions.html#kern">Typesetting terms, kerning</a>
+for more details).
+</p>
+
+<p>
+Mom permits inline pairwise kerning through the use of the inline
+escapes
+<br/>
+<span class="pre-in-pp">
+ \*[BU &lt;n&gt;]&nbsp;Closes the space between letters (Back Units).
+ \*[FU &lt;n&gt;]&nbsp;Opens the space between letters (Forward Units).
+</span>
+<b>&lt;n&gt;</b> is the number of
+<a href="definitions.html#kernunit">kern units</a>
+by which to close or open the space between letters.
+</p>
+
+<p>
+For example,
+<br/>
+<span class="pre-in-pp">
+ THE HUMAN COST OF COMMODIF\*[FU 1]YING FRESH W\*[BU 4]A\*[BU 5]TER
+</span>
+moves the letter Y in &#8220;COMMODIFYING&#8221; one kern unit away
+from the letter F, and the letter A in &#8220;WATER&#8221; four
+kern units closer to the letter W. Additionally, the letter T in
+&#8220;WATER&#8221; is moved five kern units closer to the letter A.
+</p>
+
+<p>
+For backward compatibility, the forms
+<br/>
+<span class="pre-in-pp">
+ \*[BU1]...\*[BU36]&nbsp;Move backward 1...36 <a href="definitions.html#kernunit">kern units</a>
+ \*[FU1]...\*[FU36]&nbsp;Move forward 1...36 <a href="definitions.html#kernunit">kern units</a>
+</span>
+also exist (i.e. with no space before the number of kern units desired,
+up to a limit of 36).
+</p>
+
+<p id="kernunit">
+The default size of a kern unit is 1/36 of the current point size;
+this may be changed by invoking the macro <kbd>.KERN_UNIT</kbd>
+with the desired value, which represents a fraction of the current
+point size. For example, to change the kern unit to 1/54 of the
+current point size,
+<br/>
+<span class="pre-in-pp">
+ .KERN_UNIT 54
+</span>
+To restore the kern unit to its default, invoke
+<kbd>.KERN_UNIT</kbd> with an argument of <kbd>DEFAULT</kbd>.
+</p>
+
+
+<div class="box-notes">
+<h3 id="inlines-docprocessing-kerning" class="docs notes">Notes concerning document processing</h3>
+<p style="margin-top: .5em;">
+If you&#8217;re using the
+<a href="docprocessing.html#docprocessing">document processing macros</a>
+and wish to design your own
+<a href="headfootpage.html#headfootpage-intro">HEADERS or FOOTERS</a>
+using mom&#8217;s inline escapes for kerning as part of the left,
+centre and/or right strings, or in the strings for
+<a href="headfootpage.html#hdrftr-rectoverso">recto</a>
+and/or
+<a href="headfootpage.html#hdrftr-rectoverso">verso</a>
+HEADERS or FOOTERS, or in the strings passed to
+<a href="headfootpage.html#headers-and-footers">HEADERS_AND_FOOTERS</a>,
+you <i>must</i> use the forms
+<kbd><span class="nobr">\E*[BU&lt;n&gt;]</span></kbd> and
+<kbd><span class="nobr">\E*[FU&lt;n&gt;]</span></kbd> (i.e. with no space),
+and enter the inline beginning with <kbd><span class="nobr">\E*</span></kbd>
+rather than just <kbd><span class="nobr">\*</span></kbd>, e.g.
+<kbd><span class="nobr">\E*[BU4]</span></kbd>.
+</p>
+
+<p class="tip-bottom">
+<span class="additional-note">Additional note:</span>
+Using the <kbd>BU</kbd> or <kbd>FU</kbd> escapes between characters
+pairs that are already automatically kerned (see
+<a href="typesetting.html#kern">KERN</a>)
+disables the automatic kerning and uses the value you give to
+<kbd>BU</kbd> or <kbd>FU</kbd> instead.
+</p>
+</div>
+
+<!-- -INLINE_HORIZONTAL_MOM- -->
+
+<h3 id="inline-horizontal-mom" class="docs">Horizontal inline movement</h3>
+<p>
+Sometimes, you may need to insert a specified amount of white
+space into an
+<a href="definitions.html#outputline">output line</a>,
+or&mdash;occasionally&mdash;back up to a previous position on an
+<a href="definitions.html#inputline">output</a>
+line in order to create special typographic effects.
+</p>
+
+<p>
+Mom&#8217;s inline escapes for these horizontal movements are
+<br/>
+<span id="bck" class="pre-in-pp">
+ \*[BCK &lt;n unit&gt;]&nbsp;&nbsp;Move backward inline the specified number of
+ <a href="definitions.html#unitofmeasure">units of measure</a>; decimal fractions are allowed.
+</span>
+and
+<span id="fwd" class="pre-in-pp">
+ \*[FWD &lt;n unit&gt;]&nbsp;&nbsp;Move forward inline the specified number of
+ <a href="definitions.html#unitofmeasure">units of measure</a>; decimal fractions are allowed.
+</span>
+</p>
+
+<p>
+For example,
+<br/>
+<span class="pre-in-pp">
+ 1.\*[FWD 12p]The Free Trade Play-Offs: WalMart 100, Mexico 0
+</span>
+puts 12 points of space between <kbd>1.</kbd> and
+<kbd>The</kbd>.
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span>
+For backward compatibility, the forms
+<br/>
+<span class="pre-in-pp">
+ \*[BP.25]...\*[BP12.75]&nbsp;Move backward .25...12.75 points
+ \*[FP.25]...\*[FP12.75]&nbsp;Move forward .25...12.75 points
+</span>
+also exist (i.e. with no space before the digit and points being
+the unit of measure, hence no unit of measure required). Both
+accept quarter points, so it&#8217;s possible to do,
+for example, <kbd><span class="nobr">\*[FP.5]</span></kbd> or
+<kbd><span class="nobr">\*[BP1.25]</span></kbd> up to a limit of 12.75 points.
+</p>
+</div>
+
+<div class="box-notes">
+<h3 id="inlines-docprocessing-horizontal" class="docs notes">Note concerning document processing</h3>
+<p style="margin-top: .5em; padding-bottom: .5em;">
+If you&#8217;re using the
+<a href="docprocessing.html#docprocessing">document processing macros</a>
+and wish to design your own
+<a href="headfootpage.html#headfootpage-intro">HEADERS or FOOTERS</a>
+using mom&#8217;s inline escapes for horizontal movements as part of
+the left, centre and/or right strings, or in the strings for
+<a href="headfootpage.html#hdrftr-rectoverso">recto</a>
+and/or
+<a href="headfootpage.html#hdrftr-rectoverso">verso</a>
+HEADERS or FOOTERS, or in the strings passed to
+<a href="headfootpage.html#headers-and-footers">HEADERS_AND_FOOTERS</a>,
+you <i>must</i> use the forms
+<kbd><span class="nobr">\E*[BP&lt;n&gt;]</span></kbd> and
+<kbd><span class="nobr">\E*[FP&lt;n&gt;]</span></kbd> (i.e. with no space),
+and enter the inline beginning with <kbd><span class="nobr">\E*</span></kbd>
+rather than just <kbd><span class="nobr">\*</span></kbd>, e.g.
+<kbd><span class="nobr">\E*[BP.75]</span></kbd>. You may, in such cases, prefer
+to use the native groff inline escape
+<a href="#inline-horizontal-groff"><kbd>\h</kbd></a>.
+</p>
+</div>
+
+<!-- -INLINE_VERTICAL_MOM- -->
+
+<h3 id="inline-vertical-mom" class="docs">Vertical inline movement</h3>
+<p>
+If you need to move portions of type up or down on a line, mom
+provides the following inline escapes:
+<br/>
+<span id="down" class="pre-in-pp">
+ \*[DOWN &lt;n unit&gt;]&nbsp;Move down inline the specified number of
+ <a href="definitions.html#unitofmeasure">units of measure</a>
+
+ <span id="up">\*[UP &lt;n unit&gt;]&nbsp;Move up inline the specified number of
+ <a href="definitions.html#unitofmeasure">units of measure</a></span>
+</span>
+For example,
+<br/>
+<span class="pre-in-pp">
+ Tel: 905\*[UP 1p]-\*[DOWN 1p]4072
+</span>
+moves the hyphen in the telephone number up by 1 point, then
+moves back down by the same amount.
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span>
+<kbd><span class="nobr">\*[UP]</span></kbd> and
+<kbd><span class="nobr">\*[DOWN]</span></kbd>
+do not work in conjunction with the inline escape,
+<a href="#inline-rule-mom"><kbd><span class="nobr">\*[RULE]</span></kbd></a>.
+</p>
+
+<p>
+<span class="additional-note">Additional note:</span>
+For backward compatibility, the following are also available:
+<br/>
+<span class="pre-in-pp">
+ \*[ALD.25]...\*[ALD12.75] Advance lead .25...12.75 points (move downward)
+ \*[RLD.25]...\*[RLD12.75] Reverse lead .25...12.75 points (move upward)
+</span>
+</p>
+
+<p class="tip-bottom">
+Both <kbd><span class="nobr">\*[ALD]</span></kbd> and
+<kbd><span class="nobr">\*[RLD]</span></kbd> work in points, hence you
+mustn&#8217;t use a unit of measure.
+</p>
+</div>
+
+<div class="box-notes">
+<h3 id="inline-docprocessing-vertical" class="docs notes">Note concerning document processing</h3>
+<p style="margin-top: .5em; padding-bottom: .5em;">
+If you&#8217;re using the
+<a href="docprocessing.html#docprocessing">document processing macros</a>
+and wish to design your own
+<a href="headfootpage.html#headfootpage-intro">HEADERS or FOOTERS</a>
+using mom&#8217;s inline escapes for vertical movements as part of
+the left, centre and/or right strings, or in the strings for
+<a href="headfootpage.html#hdrftr-rectoverso">recto</a>
+and/or
+<a href="headfootpage.html#hdrftr-rectoverso">verso</a>
+HEADERS or FOOTERS, or in the strings passed to
+<a href="headfootpage.html#headers-and-footers">HEADERS_AND_FOOTERS</a>,
+you <i>must</i> use the forms
+<kbd><span class="nobr">\E*[ALD&lt;n&gt;]</span></kbd> and
+<kbd>\E*[RLD&lt;n&gt;]</kbd> (i.e. with no space), and enter the
+inline beginning with <kbd><span class="nobr">\E*</span></kbd> rather than just
+<kbd><span class="nobr">\*</span></kbd>,
+e.g. <kbd><span class="nobr">\E*[ALD.5]</span></kbd>.
+You may, in such cases, prefer to use the native groff inline
+escape
+<a href="#inline-vertical-groff"><kbd>\v</kbd></a>.
+
+</p>
+</div>
+
+<!-- -INLINE_B_MOM- -->
+
+<h3 id="inline-b-mom" class="docs">Terminate a line without advancing on the page</h3>
+<p>
+Sometimes, you want mom to break a line but not advance on the page.
+This can be accomplished with the macro
+<a href="typesetting.html#el">EL</a>
+or with the escape <kbd><span class="nobr">\*[B]</span></kbd>. Simply attach
+<kbd><span class="nobr">\*[B]</span></kbd> to the end of any input line. Using
+the example given in the document entry for EL, you&#8217;d use
+<kbd><span class="nobr">\*[B]</span></kbd> like this:
+<br/>
+<span class="pre-in-pp">
+ .LEFT
+ .LS 12.5
+ A line of text.\*[B]
+ .ALD 24p
+ The next line of text.
+</span>
+
+<kbd>\*[B]</kbd> works reliably regardless of the current
+<a href="definitions.html#filled">fill mode</a>.
+</p>
+
+<!-- -INLINE_TB+_MOM- -->
+
+<h3 id="tb-plus-mom" class="docs">Call the next sequential tab without advancing on the page</h3>
+<p>
+Sometimes, you want mom to move to the next tab in sequence (e.g.
+from TAB 1 to TAB 2, or TAB 8 to TAB 9) without mom advancing on the
+page. (See the NOTE
+<a href="typesetting.html#note-tn">here</a>
+if you&#8217;re not clear how mom manages tabs and linebreaks.) To
+do so, simply attach the escape <kbd><span class="nobr">\*[TB+]</span></kbd> to
+the end of the input line in previous tab, like this:
+<br/>
+<span class="pre-in-pp">
+ .TAB 1
+ Some text\*[TB+] \" In tab 1
+ Some more text \" In tab 2, same baseline.
+</span>
+
+<kbd><span class="nobr">\*[TB+]</span></kbd> works reliably regardless of the
+current
+<a href="definitions.html#filled">fill mode</a>.
+</p>
+
+<!-- -INLINE_RULE_MOM- -->
+
+<h3 id="inline-rule-mom" class="docs">Full measure rules</h3>
+<p>
+I find I often need rules drawn to the full measure of the
+current line or tab length. The official way to do this is
+<kbd><span class="nobr">\l'\n[.l]u'</span></kbd>, which is annoying to type,
+and doesn&#8217;t mean a whole heck of a lot if you&#8217;re new
+to groff. The inline, <kbd><span class="nobr">\*[RULE]</span></kbd>, is a
+simple replacement for <kbd><span class="nobr">\l'\n[.l]u'</span></kbd>. Use it
+whenever you need a rule drawn to the full measure of the current
+line or tab length, for example:
+<br/>
+<span class="pre-in-pp">
+ .LL 6P
+ \*[RULE]
+</span>
+
+The above draws a rule the full measure of the 6-pica line length.
+For another way to draw full measure rules, see the macro
+<a href="graphical.html#drh">DRH</a>.
+</p>
+
+<p>
+<kbd>\*[RULE]</kbd> must appear on an
+<a href="definitions.html#inputline">input line</a>
+by itself, and always causes a break when entered after a normal
+input line of text. It does not, however, deposit a break when used
+immediately after a macro.
+</p>
+
+<p>
+The weight of the rule drawn with <kbd><span class="nobr">\*[RULE]</span></kbd>
+is controlled with the macro
+<a href="#rule-weight">RULE_WEIGHT</a>.
+Mom&#8217;s default is 1/2 point.
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span>
+<kbd><span class="nobr">\*[RULE]</span></kbd> draws the rule to the full measure,
+hence it cannot be used to fill the remainder of a partial line with
+a rule in this way:
+<br/>
+<span class="pre-in-pp">
+ Signature__________________________________________
+</span>
+If you wish to accomplish this effect, you have to use
+<kbd>\*[RULE]</kbd> in conjunction with the
+<a href="goodies.html#pad">PAD</a>
+macro and
+<a href="typesetting.html#string-tabs">string tabs</a>.
+(See the
+<a href="goodies.html#pad-example">example</a>
+provided with PAD.)
+<a name="RULE_EXCEPTION"></a>
+</p>
+
+<p>
+Please also note that the inline escapes
+<a href="#up"><kbd><span class="nobr">\*[UP]</span></kbd></a>
+and
+<a href="#down"><kbd>\*[DOWN]</kbd></a>
+cannot be used in conjunction with <kbd><span class="nobr">\*[RULE]</span></kbd>.
+</p>
+
+<p>
+This <i>doesn&#8217;t</i> work:
+<br/>
+<span class="pre-in-pp">
+ \*[DOWN 2p]\*[RULE]\*[UP 2p]
+</span>
+whereas this does:
+<br/>
+<span class="pre-in-pp">
+ .ALD 2p
+ \*[RULE]
+ .RLD 2p
+</span>
+</p>
+
+<p class="tip-bottom">
+See groff&#8217;s
+<a href="#inline-linedrawing-groff">Horizontal line drawing function</a>
+for more information on drawing horizontal rules.
+</p>
+</div>
+
+<!-- -RULE_WEIGHT- -->
+
+<div id="rule-weight" class="box-macro-args">
+Macro: <b>RULE_WEIGHT</b> <kbd>&lt;weight in points&gt;</kbd>
+</div>
+
+<p class="requires">
+&bull;&nbsp;Must <span class="normal">not</span> have a
+<a href="definitions.html#unitofmeasure">unit of measure</a>
+appended.
+<br/>
+&nbsp;&nbsp;Argument must be greater than 0 and less than 100; decimal
+fractions are allowed.
+</p>
+
+<p>
+RULE_WEIGHT allows you to tell mom how heavy (in other words, how
+&#8220;thick&#8221;) you want the rules drawn with the inline
+escape,
+<a href="#inline-rule-mom"><kbd><span class="nobr">\*[RULE]</span></kbd></a>.
+It takes a single argument: the weight of the rule in
+<a href="definitions.html#picaspoints">points</a>
+<i>but without the</i>
+<a href="definitions.html#unitofmeasure">unit of measure</a>
+<kbd>p</kbd> <i>attached</i>. Thus, to set the weight of rules
+drawn with <kbd><span class="nobr">\*[RULE]</span></kbd> to 1-1/4 points,
+you&#8217;d do
+<br/>
+<span class="pre-in-pp">
+ .RULE_WEIGHT 1.25
+</span>
+</p>
+
+<p>
+RULE_WEIGHT also sets the weight of rules drawn
+with
+<a href="graphical.html#drh"><kbd>.DRH</kbd></a>
+when DRH is not given any arguments.
+</p>
+
+<div class="rule-medium"><hr/></div>
+
+<!-- -INLINE_FONT_GROFF- -->
+
+<h2 id="inlines-groff-top" class="macro-group">Commonly-used groff inline escapes</h2>
+
+<h3 id="inline-fonts-groff" class="docs">Font control (<kbd style="text-transform: none">\f</kbd>)</h3>
+
+<p>
+Groff&#8217;s basic mechanism for inline font control is the escape
+<kbd>\f[&lt;font&gt;]</kbd>.
+<br/>
+<span class="pre-in-pp">
+ \f[R] Change to the medium roman font (equivalent to mom's \*[ROM])
+ \f[I] Change to the medium italic font (equivalent to mom's \*[IT])
+ \f[B] Change to the bold roman font (equivalent to mom's \*[BD])
+ \f[BI] Change to the bold italic font (equivalent to mom's \*[BDI])
+ \f[P] Revert to the previous font (equivalent to mom's \*[PREV])
+</span>
+</p>
+
+<p>
+<kbd>\f[&lt;font&gt;]</kbd> can be used with any valid
+<a href="definitions.html#font">font style</a>
+registered with groff. (See
+<a href="appendices.html#style-extensions">here</a>
+for a list of pre-registered font styles provided by mom).
+</p>
+
+<p>
+<kbd>\f[&lt;family&gt;&lt;font&gt;]</kbd> can also take a complete valid
+family+font name combo. This is especially useful should you
+need to change both family and font inline. For example, if your
+prevailing family and font are Times Roman and you want a few words
+in Courier Bold Italic, you could do this:
+<br/>
+<span class="pre-in-pp">
+ .FAM T
+ .FT R
+ The command \f[CBI]ls -l\f[P] gives a "long" directory listing.
+</span>
+The Unix command <kbd>ls -l</kbd> will appear in Courier Bold Italic
+in a line that is otherwise in Times Roman.
+</p>
+
+<!-- -INLINE_HORIZONTAL_GROFF- -->
+
+<h3 id="inline-horizontal-groff" class="docs">Inline horizontal motions (<kbd style="text-transform: none;">\h</kbd>)</h3>
+
+<p>
+Whenever you need to move forward or backward on a line, use the
+inline
+<br/>
+<span class="pre-in-pp">
+ \h'&lt;distance&gt;'
+</span>
+In order to avoid unpleasant surprises, always append a
+<a href="definitions.html#unitofmeasure">unit of measure</a>
+to <kbd>&lt;distance&gt;</kbd>. For example,
+<br/>
+<span class="pre-in-pp">
+ \h'1.25i'
+</span>
+moves you 1.25 inches to the right (forward) of the horizontal
+position on the current
+<a href="definitions.html#outputline">output line</a>.
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span>
+<kbd>\h'&lt;distance&gt;'</kbd> is exactly equivalent to a
+<a href="#fwd"><kbd><span class="nobr">\*[FWD&nbsp;n&lt;unit&gt;]</span></kbd></a>.
+</p>
+</div>
+
+<p>
+To move backwards by the same amount, do
+<br/>
+<span class="pre-in-pp">
+ \h'-1.25i'
+</span>
+</p>
+
+<div class="box-tip">
+<p class="tip" style="margin-top: -1em;">
+<span class="note">Note:</span>
+<kbd>\h'-&lt;distance&gt;'</kbd> is exactly equivalent to
+<a href="#bck"><kbd><span class="nobr">\*[BCK&nbsp;n&lt;unit&gt;]</span></kbd></a>.
+</p>
+</div>
+
+<!-- -INLINE_VERTICAL_GROFF- -->
+
+<h3 id="inline-vertical-groff" class="docs">Inline vertical motions (<kbd style="text-transform: none;">\v</kbd>)</h3>
+
+<p>
+If you need to raise or lower type on a line (say, for sub- or
+superscripts, or any other special effect), use
+<br/>
+<span class="pre-in-pp">
+ \v'&lt;distance&gt;'
+</span>
+In order to avoid unpleasant surprises, always append a
+<a href="definitions.html#unitofmeasure">unit of measure</a>
+to <kbd>&lt;distance&gt;</kbd>. For example,
+<br/>
+<span class="pre-in-pp">
+ \v'.6m'
+</span>
+moves you (approx.) 2/3 of an
+<a href="definitions.html#em">em</a>
+downward on the current
+<a href="definitions.html#outputline">output line</a>.
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span>
+<kbd>\v'&lt;distance&gt;'</kbd> is exactly equivalent to
+<a href="#down"><kbd><span class="nobr">\*[DOWN&nbsp;n&lt;unit&gt;]</span></kbd></a>.
+</p>
+</div>
+
+<p style="margin-top: -.5em;">
+To move upward an equivalent amount, do
+<br/>
+<span class="pre-in-pp">
+ \v'-.6m'
+</span>
+</p>
+
+<div class="box-tip" style="margin-top: -1em;">
+<p class="tip">
+<span class="note">Note:</span>
+<kbd>\v'&lt;-distance&gt;'</kbd> is exactly equivalent to
+<a href="#up"><kbd><span class="nobr">\*[UP&nbsp;n&lt;unit&gt;]</span></kbd></a>.
+</p>
+</div>
+
+<div class="box-important">
+<p class="tip">
+<span class="important">Important:</span>
+The vertical motion of <kbd>\v</kbd> only affects type on the
+current
+<a href="definitions.html#outputline">output line</a>.
+When groff breaks the output line, the effect of
+<kbd>\v</kbd> is cancelled; the baseline of the next output line
+is where it would be if you hadn&#8217;t used <kbd>\v</kbd>.
+</p>
+</div>
+
+<div class="box-tip">
+<p class="tip">
+<span class="tip">Tip:</span>
+When using <kbd>\v</kbd> for occasional effects in a line,
+don&#8217;t forget to reverse it when you&#8217;ve done what you
+want to do. Otherwise, the remaining type will be set too high (if
+you used <kbd>\v</kbd> with the minus sign) or too low (if you used
+<kbd>\v</kbd> without the minus sign).
+</p>
+</div>
+
+<!-- -INLINE_STRINGWIDTH_GROFF- -->
+
+<h3 id="inline-stringwidth-groff" class="docs">String width function (<kbd style="text-transform: none;">\w</kbd>)</h3>
+
+<p>
+In the context of mom, the string width inline
+<kbd>\w'&lt;string&gt;'</kbd> primarily serves to let you establish the
+horizontal measure of something (e.g. indents) based on the length
+of a bit of text. For example, if you want a left indent the length
+of the word &#8220;Examples:&#8221; plus a space, you can set it with
+the <kbd>\w</kbd> inline escape:
+<br/>
+<span class="pre-in-pp">
+ .IL "\w'Examples: '"
+</span>
+</p>
+
+<div class="box-tip" style="margin-top: -1em;">
+<p class="tip">
+<span class="note">Note:</span>
+Whenever you pass <kbd>\w'string'</kbd>
+to a macro that normally requires a
+<a href="definitions.html#unitofmeasure">unit of measure</a>,
+<i>do NOT add a unit of measure to the</i>
+<kbd>\w'string'</kbd> <i>argument.</i>
+</p>
+
+<p class="tip-bottom">
+Furthermore, if the <kbd>\w</kbd> is used in place of a
+<a href="definitions.html#numericargument">numeric argument</a>
+to a macro and <kbd>string</kbd> is composed of several words
+separated by spaces, you must surround the whole escape with double
+quotes, as in the example above.
+</p>
+</div>
+
+<!-- -INLINE_LINEDRAWING_GROFF- -->
+
+<h3 id="inline-linedrawing-groff" class="docs">Horizontal line drawing function (<kbd style="text-transform: none;">\l</kbd>)</h3>
+
+<p>
+The <kbd>\l'distance'</kbd> inline allows you to draw a horizontal
+rule of the specified distance. You must supply a
+<a href="definitions.html#unitofmeasure">unit of measure</a>.
+Therefore, to set a 3-pica rule into a line of text, you&#8217;d do
+<br/>
+<span class="pre-in-pp">
+ A line of text with a superfluous \l'3P' 3-pica rule in it.
+</span>
+<kbd>\l'3P'</kbd>, above, not only draws the rule, but advances 3
+picas horizontally as well, just as you&#8217;d expect.
+</p>
+
+<p>
+For an easy way of drawing rules to the full measure of the current
+line or tab length, see
+<a href="#inline-rule-mom">Full measure rules</a>.
+</p>
+
+<p>
+The weight (thickness) of rules varies according to the point
+size in effect when you invoke <kbd>\l</kbd>, but you can&#8217;t fix
+the weight with any real precision. A point size of 12 produces
+a tastefully moderate rule weight of between one-half and one
+point (depending on your printer).
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span>
+Besides <kbd>\l</kbd>, <b>groff</b> provides a number of more
+sophisticated &#8220;drawing&#8221; escapes. It is well beyond
+the scope of this documentation to demonstrate their usage; see
+<br/>
+<span class="pre-in-pp">
+ info groff \\D
+</span>
+for directions concerning their use. The drawing escapes can be a
+bit unwieldy, so mom provides &#8220;user-friendly&#8221; macros for
+the
+<a href="graphical.html#top">graphical objects</a>
+most commonly encountered in typesetting: horizontal and vertical
+rules, boxes, and circles (ellipses).
+</p>
+
+<p class="tip-bottom">
+Additionally, groff comes with two &#8220;preprocessors&#8221; that
+let you create ruled tables and vector diagrams (line drawings):
+<b>tbl</b> and <b>pic</b>. The documentation for <b>tbl</b> can be
+downloaded from
+<br/>
+ <a style="display: inline-block; margin-left: 2em; margin-top: .5em; margin-bottom: .5em" href="http://cm.bell-labs.com/cm/cs/doc/76/tbl.ps.gz">http://cm.bell-labs.com/cm/cs/doc/76/tbl.ps.gz</a>
+<br/>
+and <b>pic</b> from
+<br/>
+ <a style="display: inline-block; margin-left: 2em; margin-top: .5em; margin-bottom: .5em" href="http://www.kohala.com/start/troff/gpic.raymond.ps">http://www.kohala.com/start/troff/gpic.raymond.ps</a>
+<br/>
+Both are powerful tools, but they can be nasty to learn&mdash;at
+first, anyway. You may prefer to use a vector drawing program
+to create diagrams and tables; inserting the results into a
+document is easy enough with
+<a href="images.html#pdf-image">PDF_IMAGE</a>
+or
+<a href="images.html#pspic">PSPIC</a>.
+</p>
+</div>
+
+<!-- -INLINE_CHARACTERS_GROFF- -->
+
+<h3 id="inline-characters-groff" class="docs">Special characters and symbols</h3>
+<p>
+Here follows a short list of commonly-used special characters
+available via inline escapes. If you&#8217;re not sure of the
+meaning of some of these characters, consult the
+<a href="definitions.html#top">Definitions of Terms</a>.
+</p>
+
+<p>
+For a complete list of special characters and glyphs (i.e. just
+about anything you&#8217;d ever want to appear on the printed
+page, including mathematical symbols, accented characters, unusual
+ligatures and letters unique to various European languages), consult
+<kbd>man groff_char</kbd>.
+</p>
+
+<span class="pre">
+ CHARACTER ESCAPE SEQUENCE
+ --------- ---------------
+ Comment line \# or .\"
+ Fixed-width space \&lt;space&gt;
+ Unbreakable space \~
+ Digit-width (figure) space \0
+ Zero-width character \&amp;
+ Discretionary hyphen \%
+ Backslash \\ or \e
+ Plus&#47;minus (arithmetic) \[+-]
+ Subtract (arithmetic) \[mi]
+ Multiply (arithmetic) \[mu]
+ Divide (arithmetic) \[di]
+ Em-dash \[em]
+ En-dash \[en]
+ Left double-quote \[lq]
+ Right double-quote \[rq]
+ Open (left) single-quote \[oq]
+ Close (right) single-quote \[cq]
+ Bullet \[bu]
+ Ballot box \[sq]
+ One-quarter \[14]
+ One-half \[12]
+ Three-quarters \[34]
+ Degree sign \[de]
+ Dagger \[dg]
+ Foot mark \[fm]
+ Cent sign \[ct]
+ Registered trademark \[rg]
+ Copyright \[co]
+ Section symbol \[se]
+</span>
+<br/>
+
+<div class="rule-long"><hr/></div>
+
+<!-- Navigation links -->
+<table style="width: 100%; margin-top: 12px;">
+<tr>
+ <td style="width: 33%;"><a href="toc.html">Back to Table of Contents</a></td>
+ <td style="width: 33%; text-align: center;"><a href="#top">Top</a></td>
+ <td style="width: 33%; text-align: right;"><a href="color.html#top">Next: Coloured text</a></td>
+</tr>
+</table>
+
+</div>
+
+<div class="bottom-spacer"><br/></div>
+
+</body>
+</html>
diff --git a/contrib/mom/momdoc/intro.html b/contrib/mom/momdoc/intro.html
new file mode 100644
index 0000000..3e25631
--- /dev/null
+++ b/contrib/mom/momdoc/intro.html
@@ -0,0 +1,487 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+This file is part of groff, the GNU roff type-setting system.
+
+Copyright (C) 2004-2020 Free Software Foundation, Inc.
+Written by Peter Schaffter (peter@schaffter.ca).
+
+Permission is granted to copy, distribute and/or modify this document
+under the terms of the GNU Free Documentation License, Version 1.3 or
+any later version published by the Free Software Foundation; with no
+Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
+Texts.
+
+A copy of the Free Documentation License is included as a file called
+FDL in the main directory of the groff source package.
+-->
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+<head>
+ <meta http-equiv="content-type" content="text/html;charset=utf-8"/>
+ <title>What is mom?</title>
+ <link rel="stylesheet" type="text/css" href="stylesheet.css" />
+</head>
+
+<body style="background-color: #f5faff;">
+
+<!-- ==================================================================== -->
+
+<div id="top" class="page">
+
+<!-- Navigation links -->
+<table style="width: 100%;">
+ <tr>
+ <td><a href="toc.html">Back to Table of Contents</a></td>
+ <td style="text-align: right;"><a href="definitions.html#top">Next: Definitions</a></td>
+ </tr>
+ </table>
+
+<h1 id="intro" class="docs">What is mom?</h1>
+
+<div style="text-align: center;">
+<ul class="no-enumerator" style="margin-left: -2.5em;">
+ <li ><a href="#intro-intro">Who is mom meant for?</a></li>
+ <li ><a href="#intro-typesetting">Typesetting with mom</a></li>
+ <li ><a href="#intro-docprocessing">Document processing with mom</a></li>
+ <li ><a href="#intro-philosophy">Mom&#8217;s philosophy</a></li>
+ <li ><a href="#intro-documentation">A note on mom&#8217;s documentation</a></li>
+ <li ><a href="#canonical">Canonical reference materials</a></li>
+ <li ><a href="#macro-args">How to read macro arguments</a></li>
+</ul>
+</div>
+
+<div class="rule-short" style="margin-top: 18px;"><hr/></div>
+
+<h2 id="intro-intro" class="docs">Who is mom meant for?</h2>
+
+<p>
+Mom (&#8220;my own macros&#8221;, &#8220;my other macros&#8221;,
+&#8220;maximum overdrive macros&#8221;...) is a macro set for groff,
+designed to format documents in Portable Document Format (.pdf) and
+PostScript (.ps). She&#8217;s aimed at three kinds of users:
+</p>
+
+<ol style="margin-top: -.5em; margin-bottom: -.5em;">
+ <li>Typesetters who suspect groff might be the right
+ tool for the job but who are frustrated,
+ intimidated, or puzzled by groff&#8217;s terse,
+ not-always-typographically-intuitive
+ <a href="definitions.html#primitives">primitives</a>;
+ </li>
+ <li>Writers who need to format their work easily, with a
+ minimum of clutter;
+ </li>
+ <li>Newcomers to groff, typesetting, or document processing
+ who need a well-documented macro set to get them started.
+ </li>
+</ol>
+
+<p>
+Mom is actually two macro packages in one: a very complete set
+of typesetting macros, and an equally thorough set of document
+formatting macros. The typesetting macros afford fine-grained
+control over all visible aspects of page layout and design (margins,
+fonts, sizes, kerning, etc), while the document formatting macros
+focus on the logical structure of a document (titles, headings,
+paragraphs, lists, etc) and call on groff to render logical
+structure into pleasing type.
+</p>
+
+<h2 id="intro-typesetting" class="docs">Typesetting with mom</h2>
+
+<p>
+Mom&#8217;s typesetting macros control the basic parameters
+of type: margins, line lengths, type family, font, point size,
+linespacing, and so on. In addition, they allow you to move
+around on the page horizontally and vertically, and to set up
+tabs, indents, and columns. Finally, they let you adjust such
+typographic details as justification style, letter spacing, word
+spacing, hyphenation, and kerning.
+</p>
+
+<p>
+The typesetting macros also provide the means to create horizontal
+and vertical rules, rectangles (boxes, frames), and ellipses
+(circles).
+</p>
+
+<p>
+In terms of typographic control, the typesetting macros provide
+access to groff&#8217;s primitives in a way that&#8217;s consistent,
+sensible, and easy to use. With them, you can create individual
+pages designed from the ground up. Provided you have not signalled
+to mom that you want document processing (via the
+<a href="docprocessing.html#start">START</a>
+macro; see below), every typesetting macro is a literal command
+that remains in effect until you modify it or turn it off. This
+means that if you want to create flyers, surveys, tabulated forms,
+curricula vitae and so on, you may do so in the good old-fashioned
+way: one step at a time with complete control over every element on
+the page.
+</p>
+
+<p>
+Years of experience have convinced me that no program can ever
+replace the human eye and human input when it comes to high quality
+typesetting. Words and punctuation on the printed page are too
+variable, too fluid, to be rendered flawlessly by any algorithm,
+no matter how clever.
+</p>
+
+<p>
+Mom, therefore, does not try to guess solutions for issues like
+hanging punctuation, or left-margin adjustments for troublesome
+letters like T, V and W. Rather, she provides tools that allow
+knowledgeable typesetters to handle these typographic challenges in
+ways that are easier and more intuitive than manipulating groff at
+the primitive level.
+</p>
+
+<h2 id="intro-docprocessing" class="docs">Document processing with mom</h2>
+
+<p>
+Mom&#8217;s document processing macros let you format documents
+without having to worry about the typographic details. In this
+respect, mom is similar to other groff macro packages, as well as
+to html and LaTeX. Where mom differs is in the degree of control
+you have over the look and placement of the various elements of a
+document. For example, if you&#8217;d like your headings underlined,
+or in caps, or centred rather than flush left, you can make the
+changes easily and have them apply to the whole document. Temporary
+and one-off changes are easy, too.
+</p>
+
+<p>
+Mom has some features other macro sets don&#8217;t provide. For
+example, you can switch between draft-style and final-copy output.
+If you regularly make submissions to publishers and editors who
+insist on "typewritten, double-spaced," there&#8217;s a special
+macro&mdash;
+<a href="docprocessing.html#printstyle">PRINTSTYLE <kbd>TYPEWRITE</kbd></a>&mdash;
+that changes typeset documents into ones that would make an
+old-school typing teacher proud. Footnotes, endnotes, tables of
+contents, multiple columns, nested lists, recto/verso printing and
+user designable headers and footers are also part of the fun.
+</p>
+
+<h2 id="intro-philosophy" class="docs">Mom&#8217;s philosophy</h2>
+
+<p>
+Formatting documents should be easy, from soup to nuts. Writers
+need to focus on what they&#8217;re writing, not on how it looks.
+From the moment you fire up an editor to the moment you add
+"FINIS" to your opus, nothing should interfere with the flow of
+your words. The commands needed to format your work should be
+easy to remember, comprehensible, and stand out well from the
+text. There shouldn&#8217;t be too much clutter. Your documents
+should be as readable inside a text editor as they are on the
+printed page.
+</p>
+
+<p>
+Unfortunately, in computerland, &#8220;easy,&#8221;
+&#8220;comprehensible,&#8221; and &#8220;readable&#8221; often
+mean &#8220;you&#8217;re stuck with what you get.&#8221; No
+document formatting system can give you exactly what you want all
+the time, every time. Documents always need to be tweaked, either
+to satisfy a typographic whim or to clarify some aspect of their
+content.
+</p>
+
+<p>
+Groff has traditionally solved the problem of formatting vs.
+tweaking by requiring users of the common macro packages (mm, ms,
+me and their offspring) to resort to groff
+<a href="definitions.html#primitives">primitives</a>
+and
+<a href="definitions.html#inlines">inline escapes</a>
+for their special typesetting needs. Not to put too fine a point
+on it, groff primitives tend toward the abstruse, and most inline
+escapes are about as readable as an encrypted password. This does
+not make for happy-camper writers, who either find themselves stuck
+with a formatting style they don&#8217;t like, or are forced to
+learn groff from the ground up&mdash;a daunting task, to say the
+least.
+</p>
+
+<p>
+Mom aims to make creating documents a simple matter, but with no
+corresponding loss of user control. The document processing macros
+provide an initial set of reasonable defaults, but anything that
+is not to your liking can be changed. In combination with the
+typesetting macros, you have all the tools you need to massage
+passages and tweak pages until they look utterly professional.
+</p>
+
+<p>
+One rarely hears the term &#8220;user interface&#8221; in
+conjunction with document processing. Since formatting takes
+place inside a text editor, little thought is given to the
+look and feel of the formatting commands. Mom attempts to
+rectify this by providing users with a consistent, readable
+&#8220;coding&#8221; style. Most of the macros (especially in
+the document processing set) have humanly-readable names. Not
+only does this speed up learning the macros, it makes the sense
+of what&#8217;s going on in a document easier to decipher,
+typographically and structurally.
+</p>
+
+<p>
+Mom does not try to be all things to all people. In contrast to
+the normal groff philosophy, she does not try to produce output
+that looks good no matter where it&#8217;s displayed. She&#8217;s
+designed for primarily for PDF or PostScript output, although
+with
+<a href="docprocessing.html#printstyle">PRINTSTYLE <kbd>TYPEWRITE</kbd></a>
+she produces acceptable terminal copy. No attempt is made to be
+compatible with older versions of troff.
+</p>
+
+<p>
+One special feature in mom&#8217;s design is the attention she pays
+to aligning the bottom margins of every page. Nothing screams
+shoddy in typeset documents louder than bottom margins that
+wander, or, in typesetter jargon, &#8220;hang.&#8221; There are,
+of course, situations where whitespace at the bottom of a page
+may be unavoidable (for example, you wouldn&#8217;t want a head
+to appear at the bottom of the page without some text underneath
+it), but in all cases where hanging bottom margins can be avoided,
+mom does avoid them, by clever adjustments to leading (&#8220;line
+spacing&#8221;) and the spacing between different elements on the
+page.
+</p>
+
+<h2 id="intro-documentation" class="docs">A note on mom&#8217;s documentation</h2>
+
+<p>
+Writing documentation is tough, no doubt about it. One is never
+quite sure of the user&#8217;s level of expertise. Is s/he new to
+the application, new to its underlying protocols and programs, new
+to the operating system? At some point, one has to decide for whom
+the documentation is intended. Making the wrong choice can mean the
+difference between a program that gets used and a program that gets
+tossed.
+</p>
+
+<p>
+Mom&#8217;s documentation assumes users know their way around
+their own operating system (basic file management, how to use
+the command line, how to use a text editor, etc). I run GNU/Linux,
+and while the documentation may exhibit a GNU/Linux bias, mom
+and groff can, in fact, be run on other platforms.
+</p>
+
+<p>
+The documentation further assumes users at least know what groff
+is, even if they don&#8217;t know much about it. Lastly,
+it assumes that everyone&mdash;groff newbies and experts
+alike&mdash;learns faster from a few well-placed examples than
+from manpage-style reference docs. What mom&#8217;s documentation
+doesn&#8217;t assume is that you know everything&mdash;not about
+groff, not about typesetting, not about document processing. Even
+experts have odd lacunae in their knowledge base. Therefore,
+whenever I suspect that a term or procedure will cause head
+scratching, I offer an explanation. And when explanations
+aren&#8217;t enough, I offer examples.
+</p>
+
+<h3 id="canonical" class="docs">Canonical reference materials</h3>
+
+<p>
+The canonical reference materials for groff are
+<strong>cstr54</strong> (a downloadable PostScript copy of which
+is available
+<a href="http://www.kohala.com/start/troff/cstr54.ps">here</a>)
+and the <strong>troff</strong> and <strong>groff_diff</strong>
+manpages. The most complete and up-to-date source of information is
+the groff info pages, available by typing <kbd>info groff</kbd> at
+the command line (assuming you have the TeXinfo standalone browser
+installed on your system, which is standard for most GNU/Linux
+distributions). And for inputting special characters, see <kbd>man
+groff_char</kbd>.
+</p>
+
+<p style="margin-top: 24px;">
+I&#8217;ve tried to avoid reiterating the information contained
+in these documents; however, in a few places, this has proved
+impossible. But be forewarned: I have no qualms about
+sidestepping excruciating completeness concerning groff usage;
+I&#8217;m more interested in getting mom users up and running.
+<i>Mea culpa.</i>
+</p>
+
+<p>
+Groff has ancillary programmes (pre-processors) for generating
+tables (<strong>tbl</strong>), diagrams (<strong>pic</strong>), and
+equations (<strong>eqn</strong>), which may be used in conjunction
+with mom. The manuals describing their usage are found at:
+<br/>
+<span style="display:block; margin-top: .5em">
+<kbd>&nbsp;&nbsp;tbl</kbd>&nbsp;<a href="http://www.kohala.com/start/troff/v7man/tbl/tbl.ps">http://www.kohala.com/start/troff/v7man/tbl/tbl.ps</a>
+<br/>
+<kbd>&nbsp;&nbsp;pic</kbd>&nbsp;<a href="http://www.kohala.com/start/troff/gpic.raymond.ps">http://www.kohala.com/start/troff/gpic.raymond.ps</a>
+<br/>
+<kbd>&nbsp;&nbsp;eqn</kbd>&nbsp;<a href="http://www.kohala.com/start/troff/v7man/eqn/eqn2e.ps">http://www.kohala.com/start/troff/v7man/eqn/eqn2e.ps</a>
+</span>
+</p>
+
+<div class="box-tip">
+<p class="tip-top" style="padding-bottom: 9px;">
+<b>Note:</b> Mom&#8217;s macro file (om.tmac) is heavily
+commented. Each macro is preceded by a description of its
+arguments, function and usage, which may give you information in
+addition to what&#8217;s contained in this documentation.
+</p>
+</div>
+
+<div class="rule-short" style="padding-top: 6px; padding-bottom: 3px;"><hr/></div>
+
+<h2 id="macro-args" class="docs">How to read macro arguments</h2>
+
+<p>
+The concise descriptions of macros in this documentation typically
+look like this:
+</p>
+
+<div class="box-macro-args">
+Macro: <b>MACRO_NAME</b> <kbd class="macro-args">arguments</kbd>
+</div>
+
+<p>
+<kbd>arguments</kbd> lists the macro&#8217;s
+arguments using conventions that should be familiar to anyone who
+has ever read a manpage. Briefly:
+</p>
+
+<ol>
+ <li>Macro arguments are separated from each other by spaces.</li>
+ <li>If an argument is surrounded by chevrons
+ (<kbd>&lt;&nbsp;&gt;</kbd>), it&#8217;s a description
+ of the argument, not the argument itself.
+ </li>
+ <li>If an argument begins with or is surrounded by double-quotes, the
+ double quotes must be included in the argument.
+ </li>
+ <li>If the user has a choice between several arguments, each of the
+ choices is separated by the pipe character
+ (<kbd>|</kbd>), which means &#8220;or.&#8221;
+ </li>
+ <li>Arguments that are optional are surrounded by square brackets.</li>
+ <li><kbd>&lt;off&gt;</kbd> or <kbd>&lt;anything&gt;</kbd> in an argument
+ list means that any argument other than those in the argument
+ list turns the macro off.
+ </li>
+</ol>
+
+<h3 id="toggle-macro" class="docs">Toggle macros</h3>
+
+<p>
+Some macros don&#8217;t require an argument. They simply start
+something. When you need to turn them off, the same macro with
+any argument will do the trick. That&#8217;s right: <em>any</em>
+argument (in caps, lowercase, or a mixture thereof). This permits
+choosing whatever works for you: <kbd>OFF</kbd>, <kbd>end</kbd>,
+<kbd>Quit</kbd>, <kbd>Q</kbd>, <kbd>X</kbd>, and so on.
+</p>
+
+<p>
+Since these macros toggle things on and off, the argument list
+simply reads <kbd>toggle</kbd>.
+</p>
+
+<div id="examples" class="examples-container">
+<h2 class="docs" style="margin-top: .5em;">Examples</h2>
+
+<div class="examples">Example 1: An argument requiring double-quotes</div>
+
+<div class="box-macro-args" style="max-width: 684px;">
+Macro: <b>TITLE</b> <kbd class="macro-args">&quot;&lt;title of document&gt;&quot;</kbd>
+</div>
+
+<p>
+The required argument to TITLE is the title of your document.
+Since it&#8217;s surrounded by double-quotes, you must include
+them in the argument, like this:
+<br/>
+<span class="pre-in-pp">
+ .TITLE "My Pulitzer Novel"
+</span>
+</p>
+
+<div class="examples" style="margin-top: -1em;">Example 2: A macro with required and optional arguments</div>
+
+<div class="box-macro-args" style="width: 684px;">
+Macro: <b>TAB_SET</b> <kbd class="macro-args">&lt;tab number&gt; &lt;indent&gt; &lt;length&gt; [ L | R | C | J [ QUAD ] ]&nbsp;</kbd>
+</div>
+
+<p>
+The first required argument is a number that identifies the tab
+(say, "3"). The second required argument is an indent from the
+left margin (say, 6 picas). The third required argument is the
+length of the tab (say, 3 picas). Therefore, at a minimum, when
+using this macro, you would enter:
+<br/>
+<span class="pre-in-pp">
+ .TAB_SET 3 6P 3P
+</span>
+The remaining two arguments are optional. The first is a
+single letter, either <kbd>L, R, C</kbd> or
+<kbd>J</kbd>. The second, which is itself
+optional after <kbd>L, R, C</kbd> or
+<kbd>J</kbd>, is the word <kbd>QUAD</kbd>.
+Therefore, depending on what additional information you wish to
+pass to the macro, you could enter:
+<br/>
+<span class="pre-in-pp">
+ .TAB_SET 3 6P 3P L
+</span>
+or
+<br/>
+<span class="pre-in-pp">
+ .TAB_SET 3 6P 3P L QUAD
+</span>
+</p>
+
+<div id="toggle-example" class="examples" style="margin-top: -1em;">Example 3: A sample toggle macro:</div>
+
+<div class="box-macro-args" style="max-width: 684px;">
+Macro: <b>QUOTE</b> <kbd class="macro-args">toggle</kbd>
+</div>
+
+<p>
+<kbd>QUOTE</kbd> begins a section of quoted text
+in a document and doesn&#8217;t require an argument. When the
+quote&#8217;s finished, you have to tell mom it&#8217;s done.
+<span class="pre">
+ .QUOTE
+ So runs my dream, but what am I?
+ An infant crying in the night
+ An infant crying for the light
+ And with no language but a cry.
+ .QUOTE OFF
+</span>
+</p>
+
+<p>
+ Alternatively, you could have turned the quote off with
+ <kbd>END</kbd>, or <kbd>X</kbd>, or something else.
+ </p>
+</div>
+
+<!-- Navigation links -->
+<table style="width: 100%; margin-top: 12px;">
+<tr>
+ <td style="width: 33%;"><a href="toc.html">Back to Table of Contents</a></td>
+ <td style="width: 33%; text-align: center;"><a href="#top">Top</a></td>
+ <td style="width: 33%; text-align: right;"><a href="definitions.html#top">Next: Definitions</a></td>
+</tr>
+</table>
+
+</div>
+
+<div class="bottom-spacer"><br/></div>
+
+</body>
+</html>
diff --git a/contrib/mom/momdoc/letters.html b/contrib/mom/momdoc/letters.html
new file mode 100644
index 0000000..3021eb2
--- /dev/null
+++ b/contrib/mom/momdoc/letters.html
@@ -0,0 +1,577 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+This file is part of groff, the GNU roff type-setting system.
+
+Copyright (C) 2004-2020 Free Software Foundation, Inc.
+Written by Peter Schaffter (peter@schaffter.ca).
+
+Permission is granted to copy, distribute and/or modify this document
+under the terms of the GNU Free Documentation License, Version 1.3 or
+any later version published by the Free Software Foundation; with no
+Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
+Texts.
+
+A copy of the Free Documentation License is included as a file called
+FDL in the main directory of the groff source package.
+-->
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+<head>
+ <meta http-equiv="content-type" content="text/html;charset=utf-8"/>
+ <title>Mom -- Writing letters</title>
+ <link rel="stylesheet" type="text/css" href="stylesheet.css" />
+</head>
+
+<body style="background-color: #f5faff;">
+
+<!-- ==================================================================== -->
+
+<div id="top" class="page">
+
+<!-- Navigation links -->
+<table style="width: 100%;">
+<tr>
+ <td><a href="toc.html">Back to Table of Contents</a></td>
+ <td style="text-align: right;"><a href="macrolist.html#top">Next: Quick reference guide</a></td>
+</tr>
+</table>
+
+<h1 class="docs">Writing letters</h1>
+
+<div style="width: 33%; margin: auto;">
+<ul class="no-enumerator">
+ <li><a href="#letters-intro">Introduction</a></li>
+ <li><a href="#letters-tutorial">Tutorial</a></li>
+ <li><a href="#letters-defaults">Mom&#8217;s default letter style</a></li>
+ <li><a href="#index-letters-macros">The letter macros</a></li>
+</ul>
+</div>
+
+<div class="rule-medium"><hr/></div>
+
+<h2 id="letters-intro" class="docs">Introduction</h2>
+
+<p>
+Mom&#8217;s simple but effective letter-writing macros are a subset
+of the
+<a href="docprocessing.html#docprocessing">document processing macros</a>,
+designed to ease the creation of correspondence.
+</p>
+
+<p>
+Because the letter macros are a subset of the document processing
+macros, you can use
+<a href="definitions.html#controlmacro">control macros</a>
+to design correspondence to your own specifications. However,
+mom makes no pretence of providing complete design flexibility in
+the matter of letters, which are, after all, simple communicative
+documents whose only real style requirements are that they be neat
+and professional-looking.
+</p>
+
+<div class="examples-container" style="margin-top: 1.5em; margin-bottom: 1.5em;">
+<h3 id="letters-tutorial" class="docs">Tutorial &ndash; writing letters</h3>
+
+<p>
+Mom letters begin, like all mom-processed documents, with
+<a href="docprocessing.html#reference-macros">reference macros</a>
+(in this case,
+<a href="docprocessing.html#author">AUTHOR</a>),
+a
+<a href="docprocessing.html#doctype">DOCTYPE</a>
+(LETTER, obviously), the essential
+<a href="docprocessing.html#printstyle">PRINTSTYLE</a>
+macro, and
+<a href="docprocessing.html#start">START</a>,
+like this:
+<br/>
+<span class="pre-in-pp">
+ .AUTHOR "Yannick P. Guique"
+ .DOCTYPE LETTER
+ .PRINTSTYLE TYPESET
+ .START
+</span>
+PRINTSTYLE, above, could also be <kbd>TYPEWRITE</kbd>. Mom has no
+objection to creating letters that look like they were typed on an
+Underwood by a shapely secretary with 1940s gams.
+</p>
+
+<p>
+Please note that if you choose <kbd>PRINTSTYLE TYPEWRITE</kbd>,
+there&#8217;s no need to give the <kbd>SINGLESPACE</kbd> option, as
+this is the unalterable default for letters.
+</p>
+
+<p>
+After the START macro, you enter headers pertinent to your letter:
+the date, the addressee (in business correspondence, typically both
+name and address), the addresser (that&#8217;s you; in business
+correspondence, typically both name and address), and a greeting
+(in full, e.g. &#8220;Dear Mr. Smith,&#8221; or &#8220;Dear
+Mr. Smith:&#8221;).
+</p>
+
+<p>
+The macros for entering the headers are simple (they&#8217;re not even
+<a href="definitions.html#toggle">toggles</a>):
+<br/>
+<span class="pre-in-pp">
+ .DATE
+ .TO
+ .FROM
+ .GREETING
+</span>
+You may enter them in any order you like, except for GREETING, which
+must come last. Mom ignores any headers you omit and spaces the
+letter&#8217;s opening according to what you do include. See
+<a href="#letters-defaults">Default for letters</a>
+to find out how mom formats the headers.
+</p>
+
+<p>
+Once you&#8217;ve filled in what you need to get a letter started,
+simply type the letter, introducing each and every paragraph,
+including the first, with the
+<a href="docelement.html#pp">PP</a>
+macro.
+</p>
+
+<p>
+At the end of the letter, should you wish a closing (&#8220;Yours
+truly,&#8221; &#8220;Sincerely,&#8221; &#8220;Hugs and
+kisses&#8221;), invoke the macro <kbd>.CLOSING</kbd> on a line
+by itself, and follow it with the text of the closing. <b>N.B.</b>
+Don&#8217;t put your name here; mom supplies it automatically from
+<a href="docprocessing.html#author">AUTHOR</a>),
+with enough space to leave room for your signature. If you omit the
+closing, mom simply adds your name (from AUTHOR), again with enough
+space for your signature.
+</p>
+
+<p>
+Assuming our tutorial letter is for business correspondence,
+here&#8217;s what the complete letter looks like.
+<br/>
+<span class="pre-in-pp">
+ .AUTHOR "Yannick P. Guique"
+ .DOCTYPE LETTER
+ .PRINTSTYLE TYPESET
+ .START
+ .DATE
+ August 25, 2010
+ .TO
+ GUILLAUME BARRIÈRES
+ Minidoux Corporation
+ 5000 Pannes Drive
+ Redmond, Virginia
+ .FROM
+ Y.P. GUIQUE
+ 022 Umask Road
+ St-Sauveur-en-dehors-de-la-mappe, Québec
+ .GREETING
+ Dear Mr. Barrières,
+ .PP
+ It has come to my attention that you have once again been
+ lobbying the US government to prohibit the use of open source
+ software by endeavouring to outlaw so-called "warranty
+ free" applications.
+ .PP
+ I feel it is my duty to inform you that the success of your
+ operating system relies heavily on open source programs and
+ protocols, notably TCP/IP.
+ .PP
+ Therefore, in the interests of your corporation&#8217;s fiscal health,
+ I strongly advise that you withdraw support for any US
+ legislation that would cripple or render illegal open source
+ development.
+ .CLOSING
+ Sincerely,
+</span>
+This produces a letter with headers that follow the North American
+standard for business correspondence. If you&#8217;d prefer another style
+of correspondence, for example, British, you&#8217;d set up the same
+letter like this:
+<br/>
+<span class="pre-in-pp">
+ .AUTHOR "Yannick P. Guique"
+ .DOCTYPE LETTER
+ .PRINTSTYLE TYPESET
+ .START
+ .FROM
+ .RIGHT
+ Y.P. GUIQUE
+ 022 Umask Road
+ St-Sauveur-en-dehors-de-la-mappe, Québec
+ .TO
+ GUILLAUME BARRIÈRES
+ Minidoux Corporation
+ 5000 Pannes Drive
+ Redmond, Virginia
+ .DATE
+ .RIGHT
+ August 25, 2004
+ .GREETING
+ Dear Mr. Barrières,
+</span>
+Notice the use of <kbd>.RIGHT</kbd> after <kbd>.FROM</kbd> and
+<kbd>.DATE</kbd> in this example, used to change the default quad
+for these macros.
+</p>
+</div>
+
+<h2 id="letters-defaults" class="docs">Default letter style</h2>
+
+<p>
+In letters, if the order of header macros is
+</p>
+<ol style="margin-top: -.5em;">
+ <li><kbd>.DATE</kbd></li>
+ <li><kbd>.TO</kbd>&nbsp;&nbsp;(the addressee)</li>
+ <li><kbd>.FROM</kbd>&nbsp;&nbsp;(the addresser)</li>
+ <li><kbd>.GREETING</kbd>&nbsp;&nbsp;(&#8220;Dear Whoever,&#8221; &#8220;To Whom It May Concern,&#8221; etc.)</li>
+</ol>
+<p style="margin-top: -.5em;">
+mom sets
+</p>
+<ul style="margin-top: -.5em;">
+ <li>the date flush right, page right, at the top of page one,
+ with a gap of two linespaces underneath
+ </li>
+ <li>the addressee (<kbd>.TO</kbd>) in a block flush left, page
+ left, with a gap of one linespace underneath
+ </li>
+ <li>the addresser (<kbd>.FROM</kbd>) in a block flush left, page
+ left, with a gap of one linespace underneath
+ </li>
+ <li>the greeting flush left, with a gap of one linespace
+ underneath
+ </li>
+</ul>
+<p style="margin-top: -.5em;">
+which is the standard for North American business correspondence.
+</p>
+
+<p>
+If you switch the order of <kbd>.DATE</kbd>, <kbd>.TO</kbd> and/or
+<kbd>.FROM</kbd>, mom sets all the headers
+flush left, with a gap of one linespace underneath each. (The
+default left quad of any header can be changed by invoking the
+<kbd>.RIGHT</kbd> macro, on a line by itself, immediately before
+inputting the text of the header.)
+</p>
+
+<p>
+Following the headers, mom sets
+</p>
+<ul style="margin-top: -.5em;">
+ <li>the body of the letter justified</li>
+ <li>in multi-page letters:
+ <ul style="margin-left: -.5em;">
+ <li>a footer indicating there&#8217;s a next page (of the form <kbd>.../#</kbd>)</li>
+ <li>the page number at the top of every page after page one</li>
+ </ul></li>
+ <li>the closing/signature lines flush left, indented halfway across the page</li>
+</ul>
+
+<p>
+Other important style defaults are listed below, and may be changed
+via the
+<a href="typesetting.html#top">typesetting macros</a>
+or the document processing
+<a href="definitions.html#controlmacro">control macros</a>
+prior to
+<a href="docprocessing.html#start">START</a>.
+Assume that any style parameter not listed below is the same as for
+any document processed with
+<a href="docprocessing.html#typeset-defaults">PRINTSTYLE <kbd>TYPESET</kbd></a>
+or
+<a href="docprocessing.html#typewrite-defaults">PRINTSTYLE <kbd>TYPEWRITE</kbd></a>.
+</p>
+
+<div class="defaults-container" style="padding-bottom: 8px;">
+<span class="pre defaults">
+ PARAMETER PRINTSTYLE TYPESET PRINTSTYLE TYPEWRITE
+
+ Paper size 8.5 x 11 inches 8.5 x 11 inches
+ Left/right margins 1.125 inches 1.125 inches
+ Header margin 3.5 picas 3.5 picas
+ (for page numbers)
+ Header gap 3 picas 3 picas
+ (for page numbers)
+ Family Times Roman Courier
+ Font roman roman
+ Point size 12 12
+ Line space 13.5 12 (i.e. singlespaced)
+ Paragraph indent 3 ems 3 picas
+ Spaced paragraphs yes no
+ Footers* yes yes
+ Footer margin 3 picas 3 picas
+ Footer gap 3 picas 3 picas
+ Page numbers top, centred top, centred
+
+ *Footers contain a &quot;next page&quot; number of the form .../#
+</span>
+</div>
+
+<div class="rule-medium"><hr/></div>
+
+
+<div class="macro-list-container">
+<h3 id="index-letters-macros" class="macro-list">The letter macros</h3>
+<p style="margin-left: 9px; margin-top: -1.5em;">
+All letter macros must come after
+<a href="docprocessing.html#start">START</a>,
+except NO_SUITE, which must come after
+<a href="docprocessin.html#start">PRINTSTYLE</a>
+and before
+<a href="docprocessing.html#start">START</a>.
+</p>
+
+<ul class="macro-list" style="margin-top: -.75em;">
+ <li><a href="#date">DATE</a></li>
+ <li><a href="#to">TO</a></li>
+ <li><a href="#from">FROM</a></li>
+ <li><a href="#greeting">GREETING</a></li>
+ <li><a href="#closing">CLOSING</a>
+ <ul style="margin-left: -.5em;">
+ <li><a href="#closing-indent">CLOSING_INDENT</a></li>
+ <li><a href="#signature-indent">SIGNATURE_INDENT</a></li>
+ </ul></li>
+ <li><a href="#no-suite">NO_SUITE</a> &ndash; turn the &#8220;next page&#8221; footer off</li>
+</ul>
+</div>
+
+<!-- -DATE- -->
+
+<div id="date" class="box-macro-args">
+Macro: <b>DATE</b>
+</div>
+
+<p>
+Invoke <kbd>.DATE</kbd> on a line by itself, with the date
+underneath, like this:
+<br/>
+<span class="pre-in-pp">
+ .DATE
+ October 31, 2012
+</span>
+If you wish to change the default quad direction for the date,
+enter <kbd>.LEFT</kbd> or <kbd>.RIGHT</kbd>, on a line by itself,
+immediately after <kbd>.DATE</kbd>.
+</p>
+
+<p>
+If you wish to insert additional space between the date and any
+letter header that comes after it, do so after inputting the date,
+not at the top of the next header macro, like this:
+<br/>
+<span class="pre-in-pp">
+ .DATE
+ October 31, 2012
+ .SPACE \"Or, more simply, .SP
+</span>
+If you wish to remove the default space,
+<br/>
+<span class="pre-in-pp">
+ .SPACE -1v \"Or, more simply, .SP -1v
+</span>
+will do the trick.
+</p>
+
+<!-- -TO- -->
+
+<div id="to" class="box-macro-args">
+Macro: <b>TO</b>
+</div>
+
+<p>
+Invoke <kbd>.TO</kbd> on a line by itself, with the name and address
+of the addressee underneath, like this:
+<br/>
+<span class="pre-in-pp">
+ .TO
+ JOHN SMITH
+ 10 Roberts Crescent
+ Bramladesh, Ont.
+</span>
+If you wish to change the default quad direction for the address,
+enter <kbd>.LEFT</kbd> or <kbd>.RIGHT</kbd>, on a line by itself,
+immediately after <kbd>.TO</kbd>.
+</p>
+
+<p>
+If you wish to insert additional space between the address and
+any letter header that comes after it, do so after inputting the
+address, not at the top of the next header macro, like this:
+<br/>
+<span class="pre-in-pp">
+ .TO
+ JOHN SMITH
+ 10 Roberts Crescent
+ Bramladesh, Ont.
+ .SPACE \"Or, more simply, .SP
+</span>
+If you wish to remove the default space,
+<br/>
+<span class="pre-in-pp">
+ .SPACE -1v \"Or, more simply, .SP -1v
+</span>
+will do the trick.
+</p>
+
+<!-- -FROM- -->
+
+<div id="from" class="box-macro-args">
+Macro: <b>FROM</b>
+</div>
+
+<p>
+Invoke <kbd>.FROM</kbd> on a line by itself, with the name and
+address of the addresser underneath, like this:
+<br/>
+<span class="pre-in-pp">
+ .FROM
+ JOE BLOW
+ 15 Brunette Road
+ Ste-Vieille-Andouille, Québec
+</span>
+If you wish to change the default quad direction for the address,
+enter <kbd>.LEFT</kbd> or <kbd>.RIGHT</kbd>, on a line by itself,
+immediately after <kbd>.FROM</kbd>.
+</p>
+
+<p>
+If you wish to insert additional space between the address and
+any letter header that comes after it, do so after inputting the
+address, not at the top of the next header macro, like this:
+<br/>
+<span class="pre-in-pp">
+ .FROM
+ JOE BLOW
+ 15 Brunette Road
+ Ste-Vieille-Andouille, Québec
+ .SPACE \"Or, more simply, .SP
+</span>
+If you wish to remove the default space,
+<br/>
+<span class="pre-in-pp">
+ .SPACE -1v \"Or, more simply, .SP -1v
+</span>
+will do the trick.
+</p>
+
+<!-- -GREETING- -->
+
+<div id="greeting" class="box-macro-args">
+Macro: <b>GREETING</b>
+</div>
+
+<p>
+Invoke <kbd>.GREETING</kbd> on a line by itself, with the full
+salutation you want for the letter underneath, like this:
+<br/>
+<span class="pre-in-pp">
+ .GREETING
+ Dear Mr. Smith,
+</span>
+</p>
+
+<!-- -CLOSING- -->
+
+<div id="closing" class="box-macro-args">
+Macro: <b>CLOSING</b>
+</div>
+
+<p>
+Invoke <kbd>.CLOSING</kbd> on a line by itself after the body of
+the letter, with the closing you&#8217;d like (e.g. &#8220;Yours
+truly,&#8221;) underneath, like this:
+<br/>
+<span class="pre-in-pp">
+ .CLOSING
+ Yours truly,
+</span>
+</p>
+
+<div class="box-tip" style="background-color: #E3D2B1;">
+<p class="tip">
+<span class="tip" style="display: inline-block; padding-bottom: .5em; color: #000056;">CLOSING control macros and defaults</span>
+<br/>
+Two macros control the behaviour of <kbd>.CLOSING</kbd>:
+</p>
+<ul style="margin-top: -1.25em;">
+ <li>CLOSING_INDENT</li>
+ <li>SIGNATURE_SPACE</li>
+</ul>
+
+<p id="closing-indent" style="margin-top: -.25em;">
+The first, CLOSING_INDENT, indicates the distance from the left
+margin you&#8217;d like to have your closing indented. It takes a
+single
+<a href="definitions.html#numericargument">numeric argument</a>
+and must have a
+<a href="definitions.html#unitofmeasure">unit of measure</a>
+appended to it, unless you want an indent of 0 (zero). Mom&#8217;s
+default is one half the width of the letter&#8217;s line length
+(i.e. halfway across the page). If you wanted, instead, an indent of
+6
+<a href="definitions.html#picaspoints">picas</a>,
+you&#8217;d do it like this:
+<br/>
+<span class="pre-in-pp">
+ .CLOSING_INDENT 6P
+</span>
+Or, if you wanted to have no indent at all:
+<br/>
+<span class="pre-in-pp">
+ .CLOSING_INDENT 0
+</span>
+</p>
+
+<p id="signature-space" style="margin-top: -1.25em;">
+The second, SIGNATURE_SPACE, controls how much room to leave for the
+signature. It takes a single
+<a href="definitions.html#numericargument">numeric argument</a>
+and must have a
+<a href="definitions.html#unitofmeasure">unit of measure</a>
+appended to it. Mom&#8217;s default is 3 line spaces, but if you
+wanted to change that to, say, 2 line spaces, you&#8217;d do:
+<br/>
+<span class="pre-in-pp">
+ .SIGNATURE_SPACE 2v
+</span>
+</p>
+</div>
+
+<!-- -NO_SUITE- -->
+
+<div id="no-suite" class="box-macro-args" style="margin-top: 2em;">
+Macro: <b>NO_SUITE</b>
+</div>
+
+<p>
+If you don&#8217;t want mom to print a &#8220;next page&#8221;
+number at the bottom of multi-page letters, invoke
+<kbd>.NO_SUITE</kbd>, on a line by itself, prior to
+<a href="docprocessing.html#start">START</a>.
+</p>
+
+<div class="rule-long"><hr/></div>
+
+<!-- Navigation links -->
+<table style="width: 100%; margin-top: 12px;">
+<tr>
+ <td style="width: 33%;"><a href="toc.html">Back to Table of Contents</a></td>
+ <td style="width: 33%; text-align: center;"><a href="#top">Top</a></td>
+ <td style="width: 33%; text-align: right;"><a href="macrolist.html">Next: Quick reference guide</a></td>
+</tr>
+</table>
+
+</div>
+
+<div class="bottom-spacer"><br/></div>
+
+</body>
+</html>
diff --git a/contrib/mom/momdoc/macrolist.html b/contrib/mom/momdoc/macrolist.html
new file mode 100644
index 0000000..81ebd7c
--- /dev/null
+++ b/contrib/mom/momdoc/macrolist.html
@@ -0,0 +1,1529 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+This file is part of groff, the GNU roff type-setting system.
+
+Copyright (C) 2004-2020 Free Software Foundation, Inc.
+Written by Peter Schaffter (peter@schaffter.ca).
+
+Permission is granted to copy, distribute and/or modify this document
+under the terms of the GNU Free Documentation License, Version 1.3 or
+any later version published by the Free Software Foundation; with no
+Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
+Texts.
+
+A copy of the Free Documentation License is included as a file called
+FDL in the main directory of the groff source package.
+-->
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+<head>
+ <meta http-equiv="content-type" content="text/html;charset=utf-8"/>
+ <title>Mom -- Quick reference guide</title>
+ <link rel="stylesheet" type="text/css" href="stylesheet.css" />
+</head>
+
+<body style="background-color: #f5faff;">
+
+<!-- ==================================================================== -->
+
+<div id="top" class="page" style="width: 800px">
+
+<!-- Navigation links -->
+<table style="width: 100%;">
+<tr>
+ <td><a href="toc.html">Back to Table of Contents</a></td>
+ <td style="text-align: right;"><a href="appendices.html#top">Next: Appendices</a></td>
+</tr>
+</table>
+
+<h1 class="docs">Quick reference guide</h1>
+
+<p>
+Once you know your way around mom, you may find this guide
+preferable to using the Table of Contents. It lists mom&#8217;s
+major user-space macros. The links point to references found
+elsewhere in the documentation.
+</p>
+
+<div class="macro-list-container" style="padding-left: 9px; padding-right: 9px; padding-bottom: 9px;">
+<h2 class="docs" style="text-align: center; padding-top: 15px;">Index to the quick reference guide</h2>
+<div style="width: 50%; float: left; margin-right: 9px;">
+<h3 class="docs" style="margin-top: 1.25em;">TYPESETTING MACROS</h3>
+<ul style="margin-top: .5em; margin-left: 0; padding-left: 0; list-style-type: none;">
+ <li><a href="#qr-1">Paper size, margins, line length</a></li>
+ <li><a href="#qr-2">Family, font, point size</a></li>
+ <li><a href="#qr-3">Font modifications</a></li>
+ <li><a href="#qr-4">Linespacing (leading)</a></li>
+ <li><a href="#qr-5">Justification, quad, breaking lines</a></li>
+ <li><a href="#qr-6">Hyphenation</a></li>
+ <li><a href="#qr-7">Word and sentence spacing</a></li>
+ <li><a href="#qr-8">Kerning, ligatures, smartquotes</a></li>
+ <li><a href="#qr-9">Horizontal/vertical motions, columns</a></li>
+ <li><a href="#qr-10">Indents</a></li>
+ <li><a href="#qr-11">Tabs</a></li>
+ <li><a href="#qr-12">Underscoring, underlining</a></li>
+ <li><a href="#qr-13">Superscipts</a></li>
+ <li><a href="#qr-14">Nested lists</a></li>
+ <li><a href="#qr-15">Colour</a></li>
+ <li><a href="#qr-16">Dropcaps</a></li>
+ <li><a href="#qr-56">Smallcaps</a></li>
+ <li><a href="#qr-17">Utilities</a></li>
+ <li><a href="#qr-18">Graphical objects and images</a></li>
+</ul>
+<h3 class="docs" style="margin-top: -.5em;">DOCUMENT PROCESSING MACROS</h3>
+<ul style="margin-top: .5em; margin-left: 0; padding-left: 0; list-style-type: none;">
+ <li><a href="#qr-19">Reference macros (metadata)</a></li>
+ <li><a href="#qr-20">Document type and initial defaults</a></li>
+ <li><a href="#qr-59">&nbsp;&nbsp;&ndash;&nbsp;Slides</a></li>
+ <li><a href="#qr-23">TYPEWRITE control macros</a></li>
+ <li><a href="#qr-57">Vertical whitespace management</a></li>
+ <li><a href="#qr-47">Document and section cover (title) pages</a></li>
+ <li><a href="#qr-22">Set documents in columns</a></li>
+ <li><a href="#qr-21">Line numbering</a></li>
+ <li><a href="#qr-24">Initiate document processing</a></li>
+</ul>
+</div>
+<ul style="margin-top: 1.75em; margin-left: 0; padding-left: 0; list-style-type: none;">
+ <li><a href="#qr-42">Global print style changes after START</a></li>
+ <li><a href="#qr-43">Managing the docheader</a></li>
+ <li><a href="#qr-25">Epigraphs</a></li>
+ <li><a href="#qr-26">Headings</a></li>
+ <li><a href="#qr-30">Paragraphs</a></li>
+ <li><a href="#qr-31">Quotes (line for line quotes)</a> </li>
+ <li><a href="#qr-32">Blockquotes (cited passages of text)</a></li>
+ <li><a href="#qr-33">Code snippets (inserting bits of programming code)</a></li>
+ <li><a href="#qr-34">Author linebreaks (section breaks)</a></li>
+ <li><a href="#qr-35">Document termination string</a></li>
+ <li><a href="#qr-36">Footnotes</a></li>
+ <li><a href="#qr-37">Endnotes</a></li>
+ <li><a href="#qr-38">Margin notes</a></li>
+ <li><a href="#qr-49">Floats</a></li>
+ <li><a href="#qr-53">Images and graphics</a></li>
+ <li><a href="#qr-60">Shaded backgrounds, frames, page colour</a></li>
+ <li><a href="#qr-51">eqn support</a></li>
+ <li><a href="#qr-52">pic support</a></li>
+ <li><a href="#qr-58">grap support</a></li>
+ <li><a href="#qr-50">tbl support</a></li>
+ <li><a href="#qr-54">Captions and labels</a></li>
+ <li><a href="#qr-39">Bibliographic references</a></li>
+ <li><a href="#qr-40">Tables of contents</a></li>
+ <li><a href="#qr-55">Lists of Figures, Tables, and Equations</a></li>
+ <li><a href="#qr-41">Letter (correspondence) macros</a></li>
+ <li><a href="#qr-44">Managing page headers and footers</a></li>
+ <li><a href="#qr-45">Recto/verso page headers and footers</a></li>
+ <li><a href="#qr-46">Pagination</a></li>
+ <li><a href="#qr-48">Utilities</a></li>
+</ul>
+</div>
+
+<h2 class="docs">Quick reference guide</h2>
+
+<div style="display: inline-block; margin-top: 1em; margin-bottom: .5em; border-bottom: 2px solid #302419;"><kbd>TYPESETTING MACROS</kbd></div>
+
+<table class="quick-ref">
+<tr>
+<th id="qr-1" class="quick-ref" colspan="2">
+<a href="typesetting.html#page-setup-intro">+++ Paper size, margins, line length</a></th>
+</tr>
+<tr>
+<td><a href="typesetting.html#paper">PAPER</a></td><td>-- set common paper sizes (letter, A4, etc)</td>
+</tr>
+<tr>
+<td><a href="typesetting.html#pagewidth">PAGEWIDTH</a></td><td>-- set a custom page width</td>
+</tr>
+<tr>
+<td><a href="typesetting.html#pagelength">PAGELENGTH</a></td><td>-- set a custom page length</td>
+</tr>
+<tr>
+<td><a href="typesetting.html#page">PAGE</a></td><td>-- set explicit page dimensions and margins</td>
+</tr>
+<tr>
+<td><a href="typesetting.html#t-margin">T_MARGIN</a></td><td>-- set a top margin</td>
+</tr>
+<tr>
+<td><a href="typesetting.html#b-margin">B_MARGIN</a></td><td>-- set a bottom margin</td>
+</tr>
+<tr>
+<td><a href="typesetting.html#l-margin">L_MARGIN</a></td><td>-- set a left margin (page offset)</td>
+</tr>
+<tr>
+<td><a href="typesetting.html#r-margin">R_MARGIN</a></td><td>-- set a right margin</td>
+</tr>
+<tr>
+<td><a href="typesetting.html#linelength">LL</a></td><td>-- set a line length</td>
+</tr>
+</table>
+
+<table class="quick-ref">
+<tr><th id="qr-2" class="quick-ref" colspan="2">
+<a href="typesetting.html#basic-params-intro">+++ Family, font, point size</a></th></tr>
+<tr>
+<td><a href="typesetting.html#family">FAMILY</a></td><td>-- set the family of type</td>
+</tr>
+<tr>
+<td><a href="typesetting.html#font">FT</a></td><td>-- set the font style (roman, italic, etc)</td>
+</tr>
+<tr>
+<td><a href="typesetting.html#fallback-font">FALLBACK_FONT</a></td><td>-- establish a fallback font (for missing fonts)</td>
+</tr>
+<tr>
+<td><a href="typesetting.html#ps">PT_SIZE</a></td><td>-- set the point size</td>
+</tr>
+<tr>
+<td><a href="inlines.html#inline-size-mom">\*[SIZE n]</a></td><td>-- change the point size inline</td>
+</tr>
+</table>
+
+<table class="quick-ref">
+<tr>
+<th id="qr-3" class="quick-ref" colspan="2">
+<a href="typesetting.html#modifications-intro">+++ Font modifications</a></th>
+</tr>
+<tr><td style="padding-left: 0;">Pseudo italic</td></tr>
+<tr>
+<td><a href="typesetting.html#setslant">SETSLANT</a></td><td>-- set the degree of slant</td>
+</tr>
+<tr>
+<td><a href="typesetting.html#slant-inline">\*[SLANT]</a></td><td>-- invoke pseudo italic inline</td>
+</tr>
+<tr>
+<td><a href="typesetting.html#slant-inline">\*[SLANTX]</a></td><td>-- turn off pseudo italic inline</td>
+</tr>
+<tr><td style="padding-left: 0;">Pseudo bold</td></tr>
+<tr>
+<td><a href="typesetting.html#setbolder">SETBOLDER</a></td><td>-- set the amount of emboldening</td>
+</tr>
+<tr>
+<td><a href="typesetting.html#bolder-inline">\*[BOLDER]</a></td><td>-- invoke pseudo bold inline</td>
+</tr>
+<tr>
+<td><a href="typesetting.html#bolder-inline">\*[BOLDERX]</a></td><td>-- turn off pseudo bold inline</td>
+</tr>
+<tr><td style="padding-left: 0;">Pseudo condensed</td></tr>
+<tr>
+<td><a href="typesetting.html#condense">CONDENSE</a></td><td>-- set the amount to pseudo condense</td>
+</tr>
+<tr>
+<td><a href="typesetting.html#cond-inline">\*[COND]</a></td><td>-- invoke pseudo condensing inline</td>
+</tr>
+<tr>
+<td><a href="typesetting.html#cond-inline">\*[CONDX]</a></td><td>-- turn off pseudo condensing inline</td>
+</tr>
+<tr><td style="padding-left: 0;">Pseudo extended</td></tr>
+<tr>
+<td><a href="typesetting.html#extend">EXTEND</a></td><td>-- set the amount to pseudo extend</td>
+</tr>
+<tr>
+<td><a href="typesetting.html#ext-inline">\*[EXT]</a></td><td>-- invoke pseudo extending inline</td>
+</tr>
+<tr>
+<td><a href="typesetting.html#ext-inline">\*[EXTX]</a></td><td>-- turn off pseudo condensing inline</td>
+</tr>
+</table>
+
+<table class="quick-ref">
+<tr>
+<th id="qr-4" class="quick-ref" colspan="2">
+<a href="typesetting.html#leading">+++ Linespacing (leading)</a></th>
+</tr>
+<tr>
+<td><a href="typesetting.html#leading">LS</a></td><td>-- set the linespacing (leading)</td>
+</tr>
+<tr>
+<td><a href="typesetting.html#autolead">AUTOLEAD</a></td><td>-- set the linespacing relative to the point size</td>
+</tr>
+</table>
+
+<table class="quick-ref">
+<tr>
+<th id="qr-5" class="quick-ref" colspan="2">
+<a href="typesetting.html#justification-intro">+++ Justification, quad, line-by-line setting, breaking lines</a></th>
+</tr>
+<tr>
+<td><a href="typesetting.html#justify">JUSTIFY</a></td><td>-- justify text to both margins</td>
+</tr>
+<tr>
+<td><a href="typesetting.html#quad">QUAD</a></td><td>-- "justify" text left, centre, or right</td>
+</tr>
+<tr>
+<td><a href="typesetting.html#lrc">LEFT</a></td><td>-- set line-by-line quad left</td>
+</tr>
+<tr>
+<td><a href="typesetting.html#lrc">CENTER</a></td><td>-- set line-by-line quad centre</td>
+</tr>
+<tr>
+<td><a href="typesetting.html#lrc">RIGHT</a></td><td>-- set line-by-line quad right</td>
+</tr>
+<tr>
+<td><a href="typesetting.html#br">BR</a></td><td>-- break a justified line</td>
+</tr>
+<tr>
+<td><a href="typesetting.html#spread">SPREAD</a></td><td>-- force justify a line</td>
+</tr>
+<tr>
+<td><a href="typesetting.html#el">EL</a></td><td>-- break a line without advancing on the page</td>
+</tr>
+</table>
+
+<table class="quick-ref">
+<tr>
+<th id="qr-6" class="quick-ref" colspan="2">
+<a href="typesetting.html#hy">+++ Hyphenation</a></th>
+</tr>
+<tr>
+<td><a href="typesetting.html#hy">HY</a></td><td>-- automatic hyphenation on/off</td>
+</tr>
+<tr>
+<td><a href="typesetting.html#hy-set">HY_SET</a></td><td>-- set automatic hyphenation parameters</td>
+</tr>
+</table>
+
+<table class="quick-ref">
+<tr>
+<th id="qr-7" class="quick-ref" colspan="2">
+<a href="typesetting.html#ws">+++ Word and sentence spacing</a></th>
+</tr>
+<tr>
+<td><a href="typesetting.html#ws">WS</a></td><td>-- set the minimum word space size</td>
+</tr>
+<tr>
+<td><a href="typesetting.html#ss">SS</a></td><td>-- set the sentence space size</td>
+</tr>
+</table>
+
+<table class="quick-ref">
+<tr>
+<th id="qr-8" class="quick-ref" colspan="2">
+<a href="typesetting.html#kern">+++ Kerning, ligatures, smartquotes</a></th>
+</tr>
+<tr>
+<td><a href="typesetting.html#kern">KERN</a></td><td>-- automatic character pair kerning on/off</td>
+</tr>
+<tr>
+<td><a href="inlines.html#inline-kerning-mom">\*[BU n]</a></td><td>-- move characters pairs closer together inline</td>
+</tr>
+<tr>
+<td><a href="inlines.html#inline-kerning-mom">\*[FU n]</a></td><td>-- move character pairs further apart inline</td>
+</tr>
+<tr>
+<td><a href="typesetting.html#rw">RW</a></td><td>-- uniformly tighten space between characters</td>
+</tr>
+<tr>
+<td><a href="typesetting.html#ew">EW</a></td><td>-- uniformly loosen space between characters</td>
+</tr>
+<tr>
+<td><a href="typesetting.html#br-at-line-kern">BR_AT_LINE_KERN</a></td><td>-- break previous line when RW or EW is invoked</td>
+</tr>
+<tr>
+<td><a href="typesetting.html#ligatures">LIGATURES</a></td><td>-- automatic generation of ligatures on/off</td>
+</tr>
+<tr>
+<td><a href="goodies.html#smartquotes">SMARTQUOTES</a></td><td>-- smartquoting on/off</td>
+</tr>
+</table>
+
+<table class="quick-ref">
+<tr>
+<th id="qr-9" class="quick-ref" colspan="2">
+<a href="typesetting.html#aldrld-intro">+++ Horizontal and vertical movements, columnar setting</a></th>
+</tr>
+<tr>
+<td><a href="typesetting.html#ald">ALD</a></td><td>-- move downards on the page</td>
+</tr>
+<tr>
+<td><a href="typesetting.html#rld">RLD</a></td><td>-- move upwards on the page</td>
+</tr>
+<tr>
+<td><a href="typesetting.html#space">SPACE</a></td><td>-- insert space between lines on a page</td>
+</tr>
+<tr>
+<td><a href="inlines.html#down">\*[DOWN n]</a></td><td>-- temporarily move downwards in a line</td>
+</tr>
+<tr>
+<td><a href="inlines.html#up">\*[UP n]</a></td><td>-- temporarily move upwards in a line</td>
+</tr>
+<tr>
+<td><a href="inlines.html#fwd">\*[FWD n]</a></td><td>-- move forward in a line</td>
+</tr>
+<tr>
+<td><a href="inlines.html#bck">\*[BCK n]</a></td><td>-- move backwards in a line</td>
+</tr>
+<tr>
+<td><a href="typesetting.html#mco">MCO</a></td><td>-- multiple columns on</td>
+</tr>
+<tr>
+<td><a href="typesetting.html#mcr">MCR</a></td><td>-- recto vertical position of column start</td>
+</tr>
+<tr>
+<td><a href="typesetting.html#mcx">MCX</a></td><td>-- multiple columns off, advance past longest column</td>
+</tr>
+</table>
+
+<table class="quick-ref">
+<tr>
+<th id="qr-10" class="quick-ref" colspan="2">
+<a href="typesetting.html#indents-intro">+++ Indents</a></th>
+</tr>
+<tr>
+<td><a href="typesetting.html#il">IL</a></td><td>-- set and turn on a left indent</td>
+</tr>
+<tr>
+<td><a href="typesetting.html#ir">IR</a></td><td>-- set and turn on a right indent</td>
+</tr>
+<tr>
+<td><a href="typesetting.html#ib">IB</a></td><td>-- set and turn on indents both left and right</td>
+</tr>
+<tr>
+<td><a href="typesetting.html#iq">IQ</a></td><td>-- quit (exit) all indents</td>
+</tr>
+<tr>
+<td><a href="typesetting.html#ti">TI</a></td><td>-- set and turn on a temporary (one line) indent</td>
+</tr>
+<tr>
+<td><a href="typesetting.html#hi">HI</a></td><td>-- set and turn on a hanging indent</td>
+</tr>
+<tr>
+<td><a href="typesetting.html#iq">ILX</a></td><td>-- left indents off</td>
+</tr>
+<tr>
+<td><a href="typesetting.html#iq">IRX</a></td><td>-- right indents off</td>
+</tr>
+<tr>
+<td><a href="typesetting.html#iq">IBX</a></td><td>-- both left and right indents off</td>
+</tr>
+</table>
+
+<table class="quick-ref">
+<tr>
+<th id="qr-11" class="quick-ref" colspan="2">
+<a href="typesetting.html#tabs-intro">+++ Tabs</a></th>
+</tr>
+<tr>
+<td><a href="typesetting.html#tab-set">TAB_SET</a></td><td>-- set up a typesetting tab</td>
+</tr>
+<tr>
+<td><a href="typesetting.html#tab">TAB &lt;n&gt;</a></td><td>-- call tab &lt;n&gt;</td>
+</tr>
+<tr>
+<td><a href="typesetting.html#tq">TQ</a></td><td>-- quit (exit) tabs</td>
+</tr>
+<tr>
+<td><a href="typesetting.html#inline-st">\*[ST&lt;n&gt;]...</a></td><td>-- string tabs (mark tab positions inline)</td>
+</tr>
+<tr>
+<td><a href="typesetting.html#inline-st">\*[ST&lt;n&gt;X]</a></td>
+</tr>
+<tr>
+<td><a href="typesetting.html#tn">TN</a></td><td>-- move to tab&lt;n+1&gt; without advancing on the page</td>
+</tr>
+<tr>
+<td><a href="typesetting.html#st">ST</a></td><td>-- set quad/fill for string tabs</td>
+</tr>
+</table>
+
+<table class="quick-ref">
+<tr>
+<th id="qr-12" class="quick-ref" colspan="2">
+<a href="goodies.html#underscore">+++ Underscoring, underlining</a></th>
+</tr>
+<tr>
+<td><a href="goodies.html#underscore">UNDERSCORE</a></td><td>-- underscore</td>
+</tr>
+<tr>
+<td><a href="goodies.html#underscore2">UNDERSCORE2</a></td><td>-- double underscore</td>
+</tr>
+<tr>
+<td><a href="goodies.html#underline">UNDERLINE</a></td><td>-- underline (fixed width fonts only)</td>
+</tr>
+<tr>
+<td><a href="goodies.html#ul">\*[UL]...</a></td><td>-- invoke underlining inline (fixed width fonts only)</td>
+</tr>
+<tr>
+<td><a href="goodies.html#ul">\*[ULX]</a></td>
+</tr>
+</table>
+
+<table class="quick-ref">
+<tr>
+<th id="qr-13" class="quick-ref" colspan="2">
+<a href="goodies.html#sup">+++ Superscipts</a></th>
+</tr>
+<tr>
+<td><a href="goodies.html#sup">\*[SUP]...\*[SUPX]</a></td><td>-- superscript</td>
+</tr>
+<tr>
+<td><a href="goodies.html#sup">\*[CONDSUP]...\*[CONDSUPX]</a></td><td>-- pseudo-condensed superscript</td>
+</tr>
+<tr>
+<td><a href="goodies.html#sup">\*[EXTSUP]...\*[EXTSUPX]</a></td><td>-- pseudo extended supercript</td>
+</tr>
+<tr>
+<td><a href="goodies.html#sup-raise">SUPERSCRIPT_RAISE_AMOUNT</a></td><td>-- vertical offset of superscripts</td>
+</tr>
+</table>
+
+<table class="quick-ref">
+<tr>
+<th id="qr-14" class="quick-ref" colspan="2">
+<a href="docelement.html#list-intro">+++ Nested lists</a></th>
+</tr>
+<tr>
+<td><a href="docelement.html#list">LIST</a></td><td>-- begin a list</td>
+</tr>
+<tr>
+<td><a href="docelement.html#item">ITEM</a></td><td>-- begin an item in a list</td>
+</tr>
+<tr>
+<td><a href="docelement.html#shift-list">SHIFT_LIST</a></td><td>-- change the indent of a list</td>
+</tr>
+<tr>
+<td><a href="docelement.html#reset-list">RESET_LIST</a></td><td>-- clear and reset a list&#8217;s enumerator</td>
+</tr>
+<tr>
+<td><a href="docelement.html#pad-list-digits">PAD_LIST_DIGITS</a></td><td>-- reserve space for digits</td>
+</tr>
+</table>
+
+<table class="quick-ref">
+<tr>
+<th id="qr-15" class="quick-ref" colspan="2">
+<a href="color.html#color-intro">+++ Colour</a></th>
+</tr>
+<tr>
+<td><a href="color.html#newcolor">NEWCOLOR</a></td><td>-- initialize (define) a colour</td>
+</tr>
+<tr>
+<td><a href="color.html#color">COLOR</a></td><td>-- begin using an initialized colour</td>
+</tr>
+<tr>
+<td><a href="color.html#xcolor">XCOLOR</a></td><td>-- initialize a "named" X colour</td>
+</tr>
+<tr>
+<td><a href="color.html#color-inline">\*[&lt;colorname&gt;]</a></td><td>-- begin using an initialized colour inline</td>
+</tr>
+</table>
+
+<table class="quick-ref">
+<tr>
+<th id="qr-16" class="quick-ref" colspan="2">
+<a href="goodies.html#dropcap">+++ Dropcaps</a></th>
+</tr>
+<tr>
+<td><a href="goodies.html#dropcap">DROPCAP</a></td><td>-- set a dropcap</td>
+</tr>
+<tr>
+<td><a href="goodies.html#dropcap-family">DROPCAP_FAMILY</a></td><td>-- set a dropcap&#8217;s family</td>
+</tr>
+<tr>
+<td><a href="goodies.html#dropcap-font">DROPCAP_FONT</a></td><td>-- set a dropcap&#8217;s font style</td>
+</tr>
+<tr>
+<td><a href="goodies.html#dropcap-color">DROPCAP_COLOR</a></td><td>-- set a dropcap&#8217;s colour</td>
+</tr>
+<tr>
+<td><a href="goodies.html#dropcap-adjust">DROPCAP_ADJUST</a></td><td>-- adjust size of a dropcap</td>
+</tr>
+<tr>
+<td><a href="goodies.html#dropcap-gutter">DROPCAP_GUTTER</a></td><td>-- adjust space between a dropcap and regular text</td>
+</tr>
+</table>
+
+<table class="quick-ref">
+<tr>
+<th id="qr-56" class="quick-ref" colspan="2">
+<a href="typesetting.html#smallcaps">+++ Smallcaps</a></th>
+</tr>
+<tr>
+<td><a href="typesetting.html#smallcaps">SMALLCAPS</a></td>
+</tr>
+<tr>
+<td><a href="typesetting.html#smallcaps-style">SMALLCAPS_STYLE</a></td>
+</tr>
+</table>
+
+
+<table class="quick-ref">
+<tr>
+<th id="qr-17" class="quick-ref" colspan="2">+++ Utilities</th>
+</tr>
+<tr>
+<td><a href="goodies.html#alias">ALIAS</a></td><td>-- give a macro a new name</td>
+</tr>
+<tr>
+<td><a href="goodies.html#caps">CAPS</a></td><td>-- set type all caps</td>
+</tr>
+<tr>
+<td><a href="goodies.html#silent">COMMENT</a></td><td>-- silently embed comments in a document</td>
+</tr>
+<tr>
+<td><a href="goodies.html#esc-char">ESC_CHAR</a></td><td>-- change the default escape character</td>
+</tr>
+<tr>
+<td><a href="goodies.html#leader">\*[LEADER]</a></td><td>-- insert leaders at the end of a line</td>
+</tr>
+<tr>
+<td><a href="goodies.html#leader-character">LEADER_CHARACTER</a></td><td>-- change the character used for leaders</td>
+</tr>
+<tr>
+<td><a href="typesetting.html#newpage">NEWPAGE</a></td><td>-- break to a new page</td>
+</tr>
+<tr>
+<td><a href="docprocessing.html#newslide">NEWSLIDE</a></td><td>-- break to a new slide</td>
+</tr>
+<tr>
+<td><a href="docprocessing.html#pause">PAUSE</a></td><td>-- pause slide presentation</td>
+</tr>
+<tr>
+<td><a href="docprocessing.html#transition">TRANSITION</a></td><td>-- transition effect for slides</td>
+</tr>
+<tr>
+<td><a href="goodies.html#pad">PAD</a></td><td>-- insert equalized whitespace into a line</td>
+</tr>
+<tr>
+<td><a href="goodies.html#pad-marker">PAD_MARKER</a></td><td>-- change the pad marker</td>
+</tr>
+<tr>
+<td><a href="inlines.html#inline-rule-mom">\*[RULE]</a></td><td>-- draw a full measure rule</td>
+</tr>
+<tr>
+<td><a href="goodies.html#sizespecs">SIZESPECS</a></td><td>-- cap-height, x-height, descender depth</td>
+</tr>
+<tr>
+<td><a href="goodies.html#silent">SILENT</a></td><td>-- output processing off or on</td>
+</tr>
+<tr>
+<td><a href="goodies.html#trap">TRAP</a></td><td>-- enable or disable page position traps</td>
+</tr>
+<tr>
+<td><a href="goodies.html#left-hang">LEFT_HANG / \*[HANG]</a></td><td>-- hanging punctuation</td>
+</tr>
+</table>
+
+<table class="quick-ref">
+<tr>
+<th id="qr-18" class="quick-ref" colspan="2">
+<a href="graphical.html#intro-graphical">+++ Graphical objects and images</a></th>
+</tr>
+<tr>
+<td><a href="graphical.html#drh">DRH</a></td><td>-- draw a horizontal rule</td>
+</tr>
+<tr>
+<td><a href="graphical.html#drv">DRV</a></td><td>-- draw a vertical rule</td>
+</tr>
+<tr>
+<td><a href="graphical.html#dbx">DBX</a></td><td>-- draw a box</td>
+</tr>
+<tr>
+<td><a href="graphical.html#dcl">DCL</a></td><td>-- draw a circle (ellipse)</td>
+</tr>
+<tr>
+<td><a href="inlines.html#rule-weight">RULE_WEIGHT</a></td><td>-- set weight of rules drawn with \*[RULE]</td>
+</tr>
+<tr>
+<td><a href="images.html#pdf-image">PDF_IMAGE</a></td><td>-- insert a PDF image</td>
+</tr>
+<tr>
+<td><a href="images.html#pspic">PSPIC</a></td><td>-- insert a PostScript image</td>
+</tr>
+</table>
+
+<div style="display: inline-block; margin-top: 1em; margin-bottom: .5em; border-bottom: 2px solid #302419;"><kbd>DOCUMENT PROCESSING MACROS</kbd></div>
+
+<table class="quick-ref">
+<tr>
+<th id="qr-19" class="quick-ref" colspan="2">
+<a href="docprocessing.html#reference-macros">+++ Reference macros</a></th>
+</tr>
+<tr>
+<td><a href="docprocessing.html#title">TITLE</a></td><td>-- document title</td>
+</tr>
+<tr>
+<td><a href="docprocessing.html#doc-title">DOCTITLE</a></td><td>-- document title (if different from TITLE)</td>
+</tr>
+<tr>
+<td><a href="docelement.html#endnote-title">ENDNOTE_TITLE</a></td><td>-- document/chapter id string for endnotes</td>
+</tr>
+<tr>
+<td><a href="docprocessing.html#chapter">CHAPTER</a></td><td>-- chapter number</td>
+</tr>
+<tr>
+<td><a href="docprocessing.html#chapter-title">CHAPTER_TITLE</a></td><td>-- chapter title</td>
+</tr>
+<tr>
+<td><a href="docprocessing.html#chapter-string">CHAPTER_STRING</a></td><td>-- what to use in place of &#8220;Chapter&#8221;</td>
+</tr>
+<tr>
+<td><a href="docprocessing.html#subtitle">SUBTITLE</a></td><td>-- document subtitle</td>
+</tr>
+<tr>
+<td><a href="docprocessing.html#author">AUTHOR</a></td><td>-- document author(s)</td>
+</tr>
+<tr>
+<td><a href="docprocessing.html#covertitle">DOC_COVERTITLE</a></td><td>-- document title cover</td>
+</tr>
+<tr>
+<td><a href="docprocessing.html#covertitle">COVERTITLE</a></td><td>-- section cover title</td>
+</tr>
+<tr>
+<td><a href="docprocessing.html#copyright">COPYRIGHT</a></td><td>-- copyright</td>
+</tr>
+<tr>
+<td><a href="docprocessing.html#misc">MISC</a></td><td>-- miscellaneous cover information</td>
+</tr>
+<tr>
+<td><a href="docprocessing.html#draft">DRAFT</a></td><td>-- document&#8217;s draft number</td>
+</tr>
+<tr>
+<td><a href="docprocessing.html#draft-string">DRAFT_STRING</a></td><td>-- what to use in place of &#8220;Draft&#8221;</td>
+</tr>
+<tr>
+<td><a href="docprocessing.html#revision">REVISION</a></td><td>-- document&#8217;s revision number</td>
+</tr>
+<tr>
+<td><a href="docprocessing.html#revision-string">REVISION_STRING</a></td><td>-- what to use in place of &#8220;Revision&#8221;</td>
+</tr>
+<tr>
+<td><a href="docprocessing.html#pdftitle">PDF_TITLE</a></td><td>-- PDF viewer window title</td>
+</tr>
+<tr>
+<td><a href="docprocessing.html#toc-heading">TOC_HEADING</a></td><td>-- non-pagenumbered line inserted into the TOC</td>
+</tr>
+</table>
+
+<table class="quick-ref">
+<tr>
+<th id="qr-20" class="quick-ref" colspan="2">
+<a href="docprocessing.html#docstyle-macros">+++ General document formatting directives</a></th>
+</tr>
+<tr>
+<td><a href="docprocessing.html#doctype">DOCTYPE</a></td><td>-- general document type</td>
+</tr>
+<tr>
+<td id="qr-59"><a href="docprocessing.html#slides">DOCTYPE SLIDES</a></td><td>-- create slide presentation</td>
+</tr>
+<tr>
+<td><a href="docprocessing.html#copystyle">COPYSTYLE</a></td><td>-- draft or final copy</td>
+</tr>
+<tr>
+<td><a href="docprocessing.html#printstyle">PRINTSTYLE</a></td><td>-- typeset or &#8220;typewritten&#8221;</td>
+</tr>
+</table>
+
+<table class="quick-ref">
+<tr>
+<th id="qr-21" class="quick-ref" colspan="2">
+<a href="docelement.html#number-lines-intro">+++ Line numbering</a></th>
+</tr>
+<tr>
+<td><a href="docelement.html#number-lines">NUMBER_LINES</a></td><td>-- automatic line numbering on/off</td>
+</tr>
+<tr>
+<td><a href="docelement.html#number-quote-lines">NUMBER_QUOTE_LINES</a></td><td>-- numbering of QUOTE lines on/off</td>
+</tr>
+<tr>
+<td><a href="docelement.html#number-blockquote-lines">NUMBER_BLOCKQUOTE_LINES</a></td><td>-- numbering of BLOCKQUOTE lines on/off</td>
+</tr>
+<tr>
+<td><a href="docelement.html#number-lines-control">Control macros</a></td><td></td>
+</tr>
+</table>
+
+<table class="quick-ref">
+<tr>
+<th id="qr-22" class="quick-ref" colspan="2">
+<a href="docprocessing.html#columns-intro">+++ Set documents in columns</a></th>
+</tr>
+<tr>
+<td><a href="docprocessing.html#columns">COLUMNS</a></td>
+</tr>
+<tr>
+<td><a href="docprocessing.html#col-next">COL_NEXT</a></td>
+</tr>
+<tr>
+<td><a href="docprocessing.html#col-break">COL_BREAK</a></td>
+</tr>
+</table>
+
+<table class="quick-ref">
+<tr>
+<th id="qr-23" class="quick-ref" colspan="2">+++ TYPEWRITE control macros</th>
+</tr>
+<tr>
+<td><a href="docprocessing.html#typewriter-family">TYPEWRITER_FAMILY</a></td><td>alternative to Courier</td>
+</tr>
+<tr>
+<td><a href="docprocessing.html#typewriter-size">TYPEWRITER_SIZE</a></td><td>point size of typewriter font</td>
+</tr>
+<tr>
+<td><a href="docprocessing.html#typewriter-underlining">UNDERLINE_ITALIC</a></td><td>-- underlining of italics on</td>
+</tr>
+<tr>
+<td><a href="docprocessing.html#printstyle-italics">UNDERLINE_QUOTES</a></td><td>-- underlining of QUOTEs on/off</td>
+</tr>
+<tr>
+<td><a href="docprocessing.html#printstyle-italics">ITALIC_MEANS_ITALIC</a></td><td>-- use real italics (not underlining)</td>
+</tr>
+<tr>
+<td><a href="docprocessing.html#typewriter-underlining">UNDERLINE_SLANT</a></td><td>-- underlining of pseudo-italics on</td>
+</tr>
+<tr>
+<td><a href="docprocessing.html#typewriter-underlining">SLANT_MEANS_SLANT</a></td><td>-- use pseudo italics (not underlining)</td>
+</tr>
+</table>
+
+<table class="quick-ref">
+<tr>
+<th id="qr-24" class="quick-ref" colspan="2">
+<a href="docprocessing.html#start-macro">+++ Initiate document processing</a></th>
+</tr>
+<tr>
+<td><a href="docprocessing.html#start">START</a></td><td>-- begin document processing</td>
+</tr>
+</table>
+
+<table class="quick-ref">
+<tr>
+<th id="qr-25" class="quick-ref" colspan="2">
+<a href="docelement.html#epigraph-intro">+++ Epigraphs</a></th>
+</tr>
+<tr>
+<td><a href="docelement.html#epigraph">EPIGRAPH</a></td><td>-- set an epigraph underneath the docheader</td>
+</tr>
+<tr>
+<td><a href="docelement.html#epigraph-control">Control macros</a></td><td>-- change default style of epigraphs</td>
+</tr>
+</table>
+
+<table class="quick-ref">
+<tr>
+<th id="qr-26" class="quick-ref" colspan="2">
+<a href="docelement.html#heading-intro">+++ Headings</a></th>
+</tr>
+<tr>
+<td><a href="docelement.html#heading">HEADING</a></td><td>-- hierarchical headings</td>
+</tr>
+<tr>
+<td><a href="docelement.html#heading-control">Control macros</a></td><td>-- style heading levels</td>
+</tr>
+<tr>
+<td><a href="docelement.html#heading-style">&nbsp;HEADING_STYLE</a></td><td>-- set style parameters for heading levels</td>
+</tr>
+<tr>
+<td><a href="docelement.html#prefix-chapter-number">&nbsp;PREFIX_CHAPTER_NUMBER</a></td><td>-- add chapter number to heading numbering</td>
+</tr>
+</table>
+
+<table class="quick-ref">
+<tr>
+<th id="qr-30" class="quick-ref" colspan="2">
+<a href="docelement.html#pp-intro">+++ Paragraphs</a></th>
+</tr>
+<tr>
+<td><a href="docelement.html#pp">PP</a></td><td>-- set a paragraph</td>
+</tr>
+<tr>
+<td><a href="docelement.html#pp-control">Control macros</a></td><td>-- managing paragraph style concerns</td>
+</tr>
+<tr>
+<td><a href="docelement.html#pp-font">&nbsp;PP_FONT</a></td><td>-- globally change font of regular paragraphs</td>
+</tr>
+<tr>
+<td><a href="docelement.html#para-indent">&nbsp;PARA_INDENT</a></td><td>-- set the paragraph first-line indent</td>
+</tr>
+<tr>
+<td><a href="docelement.html#para-indent-first">&nbsp;INDENT_FIRST_PARAS</a></td><td>-- indenting of paragraph first-lines on/off</td>
+</tr>
+<tr>
+<td><a href="docelement.html#pp-space">&nbsp;PARA_SPACE</a></td><td>-- linespace between paragraphs on/off</td>
+</tr>
+</table>
+
+<table class="quick-ref">
+<tr>
+<th id="qr-31" class="quick-ref" colspan="2">
+<a href="docelement.html#quote-intro">+++ Quotes (line for line verbatim quotes)</a></th>
+</tr>
+<tr>
+<td><a href="docelement.html#quote">QUOTE</a></td><td>-- set quoted text line for line </td>
+</tr>
+<tr>
+<td><a href="docelement.html#quote-general">Control macros</a></td><td>-- change default style of quotes</td>
+</tr>
+<tr>
+<td><a href="docelement.html#always-fullspace-quotes">&nbsp;ALWAYS_FULLSPACE_QUOTES</a></td><td>-- control vertical space around quotes</td>
+</tr>
+</table>
+
+<table class="quick-ref">
+<tr>
+<th id="qr-32" class="quick-ref" colspan="2">
+<a href="docelement.html#blockquote-intro">+++ Blockquotes (cited passages of text)</a></th>
+</tr>
+<tr>
+<td><a href="docelement.html#blockquote">BLOCKQUOTE</a></td><td>-- set passages of cited text</td>
+</tr>
+<tr>
+<td><a href="docelement.html#blockquote-general">Control macros</a></td><td>-- change default blockquote style</td>
+</tr>
+<tr>
+<td><a href="docelement.html#always-fullspace-quotes">&nbsp;ALWAYS_FULLSPACE_BLOCKQUOTES</a></td><td>-- control vertical spacing</td>
+</tr>
+</table>
+
+<table class="quick-ref">
+<tr>
+<th id="qr-49" class="quick-ref" colspan="2">
+<a href="images.html#floats-intro">+++ Floats</a></th>
+</tr>
+<tr>
+<td style="vertical-align: top"><a href="images.html#float">FLOAT</a></td><td>-- keep blocks of input together, output on next page
+<br/>
+&nbsp;&nbsp;&nbsp;if necessary</td>
+</tr>
+</table>
+
+<table class="quick-ref">
+<tr>
+<th id="qr-53" class="quick-ref" colspan="2">
+<a href="images.html#images-intro">+++ Images and graphics</a></th>
+</tr>
+<tr>
+<td style="vertical-align: top"><a href="images.html#pdf">PDF_IMAGE</a></td><td>-- inserting pdf images</td>
+</tr>
+<tr>
+<td style="vertical-align: top"><a href="images.html#pdf-image-frame">&nbsp;PDF_IMAGE_FRAME</a></td><td>-- set parameters for pdf image frames</td>
+</tr>
+<tr>
+<td style="vertical-align: top"><a href="images.html#pspic">PSPIC</a></td><td>-- inserting PostScript images</td>
+</tr>
+</table>
+
+<table class="quick-ref">
+<tr>
+<th id="qr-60" class="quick-ref" colspan="2">
+<a href="images.html#box-intro">+++ Shaded backgrounds, frames, page colour</a></th>
+</tr>
+<tr>
+<td style="vertical-align: top"><a href="images.html#box-macro">BOX</a>&nbsp;-- shaded backgrounds and frames</td>
+</tr>
+<tr>
+<td style="vertical-align: top"><a href="images.html#page-color">PAGE_COLOR</a></td>
+</tr>
+
+</table>
+<table class="quick-ref">
+<tr>
+<th id="qr-51" class="quick-ref" colspan="2">
+<a href="images.html#eqn">+++ eqn support</a></th>
+</tr>
+<tr>
+<td><a href="images.html#eq-en">EQ</a></td><td>-- begin an eqn block</td>
+</tr>
+<tr>
+<td><a href="images.html#eq-en">EN</a></td><td>-- end an eqn block</td>
+</tr>
+</table>
+
+<table class="quick-ref">
+<tr>
+<th id="qr-52" class="quick-ref" colspan="2">
+<a href="images.html#pic">+++ pic support</a></th>
+</tr>
+<tr>
+<td><a href="images.html#ps-pe">PS</a></td><td>-- begin a pic block</td>
+</tr>
+<tr>
+<td><a href="images.html#ps-pe">PE</a></td><td>-- end a pic block</td>
+</tr>
+<tr>
+<td><a href="images.html#pic-text-style">PIC_TEXT_STYLE</a></td><td>-- set style for pic text</td>
+</tr>
+</table>
+
+<table class="quick-ref">
+<tr>
+<th id="qr-58" class="quick-ref" colspan="2">
+<a href="images.html#grap">+++ grap support</a></th>
+</tr>
+<tr>
+<td><a href="images.html#grap">G1</a></td><td>-- begin a grap block</td>
+</tr>
+<tr>
+<td><a href="images.html#grap">G2</a></td><td>-- end a grap block</td>
+</tr>
+</table>
+
+<table class="quick-ref">
+<tr>
+<th id="qr-50" class="quick-ref" colspan="2">
+<a href="images.html#tbl">+++ tbl support</a></th>
+</tr>
+<tr>
+<td><a href="images.html#ts-te">TS</a></td><td>-- begin a tbl block</td>
+</tr>
+<tr>
+<td><a href="images.html#ts-te">TH</a></td><td>-- running table header (after TS H)</td>
+</tr>
+<tr>
+<td><a href="images.html#ts-te">TE</a></td><td>-- end tbl block</td>
+</tr>
+</table>
+
+<table class="quick-ref">
+<tr>
+<th id="qr-54" class="quick-ref" colspan="2">
+<a href="images.html#captions-and-labels">+++ Captions and labels</a></th>
+</tr>
+<tr>
+<td><a href="images.html#autolabel">AUTOLABEL</a></td><td>-- auto-label figures, tables, equations</td>
+</tr>
+<tr>
+<td><a href="images.html#set-autolabel">SET_AUTOLABEL</a></td><td>-- set or reset autolabel numbers</td>
+</tr>
+<tr>
+<td><a href="images.html#caption-after-label">CAPTION_AFTER_LABEL</a></td><td>-- place captions after labels</td>
+</tr>
+<tr>
+<td><a href="images.html#mla">MLA</a></td><td>-- MLA-style labelling and captioning</td>
+</tr>
+<tr>
+<td><a href="images.html#caption">CAPTION</a></td><td>-- add a caption to a float or (block)quote</td>
+</tr>
+<tr>
+<td><a href="images.html#label">LABEL</a></td><td>-- add a label to a float or (block)quote</td>
+</tr>
+<tr>
+<td><a href="images.html#captions-labels-sources">CAPTIONS</a></td><td>-- set style for captions</td>
+</tr>
+<tr>
+<td><a href="images.html#captions-labels-sources">LABELS</a></td><td>-- set style for labels</td>
+</tr>
+<tr>
+<td><a href="images.html#captions-labels-sources">SOURCES</a></td><td>-- set style for sources (tbl only)</td>
+</tr>
+</table>
+
+<table class="quick-ref">
+<tr>
+<th id="qr-55" class="quick-ref" colspan="2">
+<a href="images.html#lists-of">+++ Lists of Figures, Tables, and Equations</a></th>
+</tr>
+<tr>
+<td><a href="images.html#lists-macros">LIST_OF_FIGURES</a></td><td>-- generate a List of Figures</td>
+</tr>
+<tr>
+<td><a href="images.html#lists-macros">LIST_OF_TABLES</a></td><td>-- generate a List of Tables</td>
+</tr>
+<tr>
+<td><a href="images.html#lists-macros">LIST_OF_EQUATIONS</a></td><td>-- generate a List of Equations</td>
+</tr>
+<tr>
+<td><a href="images.html#lists-style">LISTS_STYLE</a></td><td>-- set style parameters for Lists</td>
+</tr>
+</table>
+
+<table class="quick-ref">
+<tr>
+<th id="qr-33" class="quick-ref" colspan="2">
+<a href="docelement.html#code-intro">+++ Code snippets</a></th>
+</tr>
+<tr>
+<td><a href="docelement.html#code">CODE</a></td><td>-- set a code snippet</td>
+</tr>
+<tr>
+<td><a href="docelement.html#code-control">Control macros</a></td><td>-- change default style of code snippets</td>
+</tr>
+<tr>
+<td><a href="docelement.html#code-general">&nbsp;General</a></td><td>-- family, font, and colour</td>
+</tr>
+<tr>
+<td><a href="docelement.html#code-size">&nbsp;CODE_SIZE</a></td><td>-- code size as a percentage of prevailing text</td>
+</tr>
+</table>
+
+<table class="quick-ref">
+<tr>
+<th id="qr-34" class="quick-ref" colspan="2">
+<a href="docelement.html#linebreak-intro">+++ Author linebreaks (section breaks)</a></th>
+</tr>
+<tr>
+<td><a href="docelement.html#linebreak">LINEBREAK</a></td><td>-- insert an author linebreak (section break)</td>
+</tr>
+<tr>
+<td><a href="docelement.html#linebreak-control">Control macros</a></td><td>-- change default style of linebreaks</td>
+</tr>
+<tr>
+<td><a href="docelement.html#linebreak-char">&nbsp;LINEBREAK_CHAR</a></td><td>-- character to use for author linebreaks</td>
+</tr>
+<tr>
+<td><a href="docelement.html#linebreak-color">&nbsp;LINEBREAK_COLOR</a></td><td>-- colour of author linebreak character</td>
+</tr>
+</table>
+
+<table class="quick-ref">
+<tr>
+<th id="qr-35" class="quick-ref" colspan="2">
+<a href="docelement.html#finis-intro">+++ Document termination string</a></th>
+</tr>
+<tr>
+<td><a href="docelement.html#finis">FINIS</a></td><td>-- insert a document termination string</td>
+</tr>
+<tr>
+<td><a href="docelement.html#finis-control">Control macros</a></td><td>-- change default style finis string</td>
+</tr>
+<tr>
+<td><a href="docelement.html#finis-string">&nbsp;FINIS_STRING</a></td><td>-- set the document termination string</td>
+</tr>
+<tr>
+<td><a href="docelement.html#finis-string-caps">&nbsp;FINIS_STRING_CAPS</a></td><td>-- capitalization of termination string</td>
+</tr>
+<tr>
+<td><a href="docelement.html#finis-color">&nbsp;FINIS_COLOR</a></td><td>-- set the document termination string colour</td>
+</tr>
+</table>
+
+<table class="quick-ref">
+<tr>
+<th id="qr-36" class="quick-ref" colspan="2">
+<a href="docelement.html#footnote-intro">+++ Footnotes</a></th>
+</tr>
+<tr>
+<td><a href="docelement.html#footnote">FOOTNOTE</a></td><td>-- set a footnote</td>
+</tr>
+<tr>
+<td><a href="docelement.html#footnote-general">Control macros</a></td><td>-- change default style of footnotes</td>
+</tr>
+<tr>
+<td><a href="docelement.html#footnote-markers">&nbsp;FOOTNOTE_MARKERS</a></td><td>-- footnote markers on/off</td>
+</tr>
+<tr>
+<td><a href="docelement.html#footnote-marker-style">&nbsp;FOOTNOTE_MARKER_STYLE</a></td><td>-- type of footnote marker to use</td>
+</tr>
+<tr>
+<td><a href="docelement.html#reset-footnote-number">&nbsp;RESET_FOOTNOTE_NUMBER</a></td><td>-- reset footnote numbering</td>
+</tr>
+<tr>
+<td><a href="docelement.html#footnote-rule">&nbsp;FOOTNOTE_RULE</a></td><td>-- footnote separator rule on/off</td>
+</tr>
+<tr>
+<td><a href="docelement.html#footnote-rule-adj">&nbsp;FOOTNOTE_RULE_ADJ</a></td><td>-- adjust position of footnote rule</td>
+</tr>
+<tr>
+<td><a href="docelement.html#footnote-rule-length">&nbsp;FOOTNOTE_RULE_LENGTH</a></td><td>-- adjust length of footnote rule</td>
+</tr>
+<tr>
+<td style="vertical-align: top;"><a href="docelement.html#footnotes-run-on">&nbsp;FOOTNOTES_RUN_ON</a></td>
+ <td>-- instruct footnotes to be continuous</td>
+</tr>
+</table>
+
+<table class="quick-ref">
+<tr>
+<th id="qr-37" class="quick-ref" colspan="2">
+<a href="docelement.html#endnote-intro">+++ Endnotes</a></th>
+</tr>
+<tr>
+<td><a href="docelement.html#endnote">ENDNOTE</a></td><td>-- set an endnote</td>
+</tr>
+<tr>
+<td style="vertical-align: top;"><a href="docelement.html#en-mark">\*[EN-MARK]</a></td>
+ <td>-- mark initial line of a range of line numbers<br />
+&nbsp;&nbsp;&nbsp;(for use with line numbered endnotes)</td>
+</tr>
+<tr>
+<td><a href="docelement.html#endnotes">ENDNOTES</a></td><td>-- output endnotes</td>
+</tr>
+<tr>
+<td><a href="docelement.html#endnote-control">Control macros</a></td><td></td>
+</tr>
+</table>
+
+<table class="quick-ref" style="margin-top: -.5em; margin-left: 1em;">
+<tr>
+<td><a href="docelement.html#endnotes-general">General style control</a></td>
+</tr>
+<tr>
+<td><a href="docelement.html#endnotes-pagination">Pagination</a></td>
+</tr>
+<tr>
+<td><a href="docelement.html#endnotes-header-control">Header/footer control</a></td>
+</tr>
+<tr>
+<td><a href="docelement.html#endnotes-header-string-control">Title control</a></td>
+</tr>
+<tr>
+<td><a href="docelement.html#endnotes-doc-title">Document/section identification control</a></td>
+</tr>
+<tr>
+<td><a href="docelement.html#endnotes-numbering">Identification style</a></td>
+</tr>
+</table>
+
+<table class="quick-ref">
+<tr>
+<th id="qr-38" class="quick-ref" colspan="2">
+<a href="docelement.html#margin-notes-intro">+++ Margin notes</a></th>
+</tr>
+<tr>
+<td><a href="docelement.html#mn-init">MN_INIT</a></td><td>-- initialize margin notes</td>
+</tr>
+<tr>
+<td><a href="docelement.html#mn">MN</a></td><td>-- set a margin note</td>
+</tr>
+</table>
+
+<table class="quick-ref">
+<tr>
+<th id="qr-39" class="quick-ref" colspan="2">
+<a href="refer.html#intro-ref">+++ Bibliographic references</a></th>
+</tr>
+<tr>
+<td><a href="refer.html#ref">REF</a></td><td>-- begin a reference</td>
+</tr>
+<tr>
+<td><a href="refer.html#footnote-refs">FOOTNOTE_REFS</a></td><td>-- place references in footnotes</td>
+</tr>
+<tr>
+<td><a href="refer.html#endnote-refs">ENDNOTE_REFS</a></td><td>-- place references in endnotes</td>
+</tr>
+<tr>
+<td><a href="refer.html#bracket-refs">REF( / REF)</a></td><td>-- put parentheses around embedded references</td>
+</tr>
+<tr>
+<td><a href="refer.html#bracket-refs">REF[ / REF]</a></td><td>-- put square brackets around embedded references</td>
+</tr>
+<tr>
+<td><a href="refer.html#bracket-refs">REF{ / REF}</a></td><td>-- put curly braces around embedded references</td>
+</tr>
+<tr>
+<td><a href="refer.html#bibliography">BIBLIOGRAPHY</a></td><td>-- output a bibliography</td>
+</tr>
+<tr>
+<td><a href="refer.html#biblio-control">Control macros</a></td>
+</tr>
+</table>
+
+<table class="quick-ref" style="margin-top: -.5em; margin-left: 1em;">
+<tr>
+<td><a href="refer.html#bibliography-type">BIBLIOGRAPHY_TYPE</a>&nbsp;-- "plain" or enumerated list</td>
+</tr>
+<tr>
+<td><a href="refer.html#biblio-general">General style control</a></td>
+</tr>
+<tr>
+<td><a href="refer.html#biblio-header-control">Header/footer control</a></td>
+</tr>
+<tr>
+<td><a href="refer.html#biblio-main-title">Main head control</a></td>
+</tr>
+</table>
+
+<table class="quick-ref">
+<tr>
+<th id="qr-40" class="quick-ref" colspan="2">
+<a href="tables-of-contents.html">+++ Tables of contents</a></th>
+</tr>
+<tr>
+<td><a href="tables-of-contents.html#toc">TOC</a></td><td>-- output a table of contents</td>
+</tr>
+<tr>
+<td><a href="docprocessing.html#no-toc-entry">NO_TOC_ENTRY</a></td><td>-- omit a document section from the TOC</td>
+</tr>
+<tr>
+<td><a href="docprocessing.html#toc-heading">TOC_HEADING</a></td><td>-- insert a heading into the TOC</td>
+</tr>
+<tr>
+<td><a href="tables-of-contents.html#index-toc-control">Control macros</a></td>
+</tr>
+</table>
+
+<table class="quick-ref" style="margin-top: -.5em; margin-left: 1em;">
+<tr>
+<td><a href="tables-of-contents.html#toc-general">General style control</a></td>
+</tr>
+<tr>
+<td><a href="tables-of-contents.html#toc-pagenumbering">Page numbering</a></td>
+</tr>
+<tr>
+<td><a href="tables-of-contents.html#toc-header">Header string control</a></td>
+</tr>
+<tr>
+<td><a href="tables-of-contents.html#toc-style">Entries and reference page numbers style control</a></td>
+</tr>
+<tr>
+<td><a href="tables-of-contents.html#toc-title-style">TOC_TITLE_STYLE</a></td>
+</tr>
+<tr>
+<td><a href="tables-of-contents.html#toc-entry-style">TOC_ENTRY_STYLE</a></td>
+</tr>
+<tr>
+<td><a href="docprocessing.html#toc-heading-style">TOC_HEADING_STYLE</a></td>
+</tr>
+<tr>
+<td><a href="tables-of-contents.html#toc-additional">Additional table of contents control macros</a></td>
+</tr>
+</table>
+
+<table class="quick-ref">
+<tr>
+<th id="qr-41" class="quick-ref" colspan="2">
+<a href="letters.html">+++ Letter (correspondence) macros</a></th>
+</tr>
+<tr>
+<td><a href="letters.html#date">DATE</a></td><td>-- letter&#8217;s date</td>
+</tr>
+<tr>
+<td><a href="letters.html#from">FROM</a></td><td>-- letter&#8217;s addresser</td>
+</tr>
+<tr>
+<td><a href="letters.html#to">TO</a></td><td>-- letter&#8217;s addressee</td>
+</tr>
+<tr>
+<td><a href="letters.html#greeting">GREETING</a></td><td>-- letter&#8217;s salutation</td>
+</tr>
+<tr>
+<td><a href="letters.html#closing">CLOSING</a></td><td>-- letter&#8217;s closing salutation</td>
+</tr>
+<tr>
+<td><a href="letters.html#closing-indent">CLOSING_INDENT</a></td><td>-- indentation of the closing salutation</td>
+</tr>
+<tr>
+<td><a href="letters.html#signature-space">SIGNATURE_SPACE</a></td><td>-- room to leave for the signature</td>
+</tr>
+<tr>
+<td><a href="letters.html#no-suite">NO_SUITE</a></td><td>-- printing of &quot;next page number&quot; off or on</td>
+</tr>
+</table>
+
+<table class="quick-ref">
+<tr>
+<th id="qr-42" class="quick-ref" colspan="2">
+<a href="docprocessing.html#style-after-start">+++ Changing global print style parameters after START</a></th>
+</tr>
+<tr>
+<td><a href="docprocessing.html#doc-left-margin">DOC_LEFT_MARGIN</a></td><td>-- left margin of everything on the page</td>
+</tr>
+<tr>
+<td><a href="docprocessing.html#doc-right-margin">DOC_RIGHT_MARGIN</a></td><td>-- right margin of everything on the page</td>
+</tr>
+<tr>
+<td><a href="docprocessing.html#doc-line-length">DOC_LINE_LENGTH</a></td><td>-- document&#8217;s base line length</td>
+</tr>
+<tr>
+<td><a href="docprocessing.html#doc-family">DOC_FAMILY</a></td><td>-- document&#8217;s base family</td>
+</tr>
+<tr>
+<td><a href="docprocessing.html#doc-pt-size">DOC_PT_SIZE</a></td><td>-- document&#8217;s base point size</td>
+</tr>
+<tr>
+<td><a href="docprocessing.html#doc-lead">DOC_LEAD</a></td><td>-- document&#8217;s base lead</td>
+</tr>
+<tr>
+<td><a href="docprocessing.html#doc-quad">DOC_QUAD</a></td><td>-- document&#8217;s base quad directions</td>
+</tr>
+</table>
+
+<table class="quick-ref">
+<tr>
+<th id="qr-43" class="quick-ref" colspan="2">
+<a href="docprocessing.html#docheader">+++ Managing a document&#8217;s first-page header</a></th>
+</tr>
+<tr>
+<td><a href="docprocessing.html#docheader">DOCHEADER</a></td><td>-- document first-page header on/off</td>
+</tr>
+<tr>
+<td><a href="docprocessing.html#index-docheader-control">Control macros</a></td><td>-- change default style of docheader elements</td>
+</tr>
+</table>
+
+<table class="quick-ref">
+<tr>
+<th id="qr-44" class="quick-ref" colspan="2">
+<a href="headfootpage.html#headfoot-management">+++ Managing page headers and footers</a></th>
+</tr>
+<tr>
+<td><a href="headfootpage.html#headers">HEADERS</a></td><td>-- page headers on/off</td>
+</tr>
+<tr>
+<td><a href="headfootpage.html#footers">FOOTERS</a></td><td>-- page footers on/off</td>
+</tr>
+<tr>
+<td style="vertical-align: top;"><a href="headfootpage.html#headers-and-footers">HEADERS_AND_FOOTERS</a></td><td>-- enable generation of both headers and<br/>
+&nbsp;&nbsp;&nbsp;footers</td>
+</tr>
+<tr>
+<td><a href="headfootpage.html#headfoot-control">Control macros</a></td>
+</tr>
+</table>
+
+<table class="quick-ref" style="margin-top: -.5em; margin-left: 1em;">
+<tr>
+<td><a href="headfootpage.html#hdrftr-strings">Strings</a></td><td>-- left-right-center strings</td>
+</tr>
+<tr>
+<td><a href="headfootpage.html#hdrftr-style">Style</a></td><td>-- change defaults for headers and/or footers</td>
+</tr>
+<tr>
+<td><a href="headfootpage.html#hdrftr-style-global">Global</a></td><td>-- global style changes</td>
+</tr>
+<tr>
+<td><a href="headfootpage.html#hdrftr-style-part">Part-by-part</a></td><td>-- part-by-part style changes</td>
+</tr>
+<tr>
+<td><a href="headfootpage.html#vertical-spacing">Vertical placement</a></td><td>-- adjust position of headers and/or footers</td>
+</tr>
+<tr>
+<td><a href="headfootpage.html#hdrftr-separator">Separator rule</a></td><td>-- manage the header/footer separator rule</td>
+</tr>
+</table>
+
+<table class="quick-ref">
+<tr>
+<th id="qr-45" class="quick-ref" colspan="2">
+<a href="rectoverso.html">+++ Recto/verso page headers and footers</a></th>
+</tr>
+<tr>
+<td><a href="rectoverso.html#recto-verso">RECTO_VERSO</a></td><td>-- recto/verso headers and/or footers on/off</td>
+</tr>
+<tr>
+<td><a href="rectoverso.html#force-recto">FORCE_RECTO</a></td><td>-- insert blank pages so chapters start recto</td>
+</tr>
+<tr>
+<td><a href="rectoverso.html#switch-hdrftr">SWITCH_HEADERS</a></td><td>-- switch recto or verso header</td>
+</tr>
+<tr>
+<td><a href="rectoverso.html#switch-hdrftr">SWITCH_FOOTERS</a></td><td>-- switch recto or verso footer</td>
+</tr>
+<tr>
+<td><a href="headfootpage.html#hdrftr-recto">HEADER_RECTO</a></td><td>-- string that constitutes a recto header</td>
+</tr>
+<tr>
+<td><a href="headfootpage.html#hdrftr-verso">HEADER_VERSO</a></td><td>-- string that constitutes a verso header</td>
+</tr>
+<tr>
+<td><a href="headfootpage.html#hdrftr-recto">FOOTER_RECTO</a></td><td>-- string that constitutes a recto footer</td>
+</tr>
+<tr>
+<td><a href="headfootpage.html#hdrftr-verso">FOOTER_VERSO</a></td><td>-- string that constitutes a recto footer</td>
+</tr>
+</table>
+
+<table class="quick-ref">
+<tr>
+<th id="qr-46" class="quick-ref" colspan="2">
+<a href="headfootpage.html#pagination-intro">+++ Pagination</a></th>
+</tr>
+<tr>
+<td><a href="headfootpage.html#paginate">PAGINATE</a></td><td>-- pagination on/off</td>
+</tr>
+<tr>
+<td><a href="headfootpage.html#index-paginate-control">Control macros</a></td><td>-- change default style for pagination</td>
+</tr>
+<tr>
+<td><a href="headfootpage.html#pagenumber">&nbsp;PAGENUMBER</a></td><td>-- user-defined (starting) page number</td>
+</tr>
+<tr>
+<td><a href="headfootpage.html#pagenum-style">&nbsp;PAGENUM_STYLE</a></td><td>-- digits, roman numerals, etc</td>
+</tr>
+<tr>
+<td><a href="headfootpage.html#pagenumber-string">&nbsp;PAGENUMBER_STRING</a></td><td>-- user-defined page numbering string</td>
+</tr>
+<tr>
+<td><a href="headfootpage.html#pagenum-on-first-page">&nbsp;PAGENUM_ON_FIRST_PAGE</a></td><td>-- when page numbering is at page top</td>
+</tr>
+<tr>
+<td style="vertical-align: top;"><a href="headfootpage.html#draft-with-pagenumber">&nbsp;DRAFT_WITH_PAGENUMBER</a></td><td>-- attach draft/revision to page number</td>
+</tr>
+</table>
+
+<table class="quick-ref">
+<tr>
+<th id="qr-57" class="quick-ref" colspan="2">
+<a href="docprocessing.html#vertical-whitespace-management">+++ Vertical whitespace management</a></th>
+</tr>
+<tr>
+<td><a href="docprocessing.html#shim">SHIM</a></td><td>-- align to the baseline grid</td>
+</tr>
+<tr>
+<td><a href="docprocessing.html#flex">FLEX</a></td><td>-- insert flexible whitespace</td>
+</tr>
+</table>
+
+
+<table class="quick-ref">
+<tr>
+<th id="qr-47" class="quick-ref" colspan="2">
+<a href="cover.html">+++ Document and section cover (title) pages</a></th>
+</tr>
+<tr>
+<td><a href="cover.html#cover">DOC_COVER</a></td><td>-- information to include in a document cover</td>
+</tr>
+<tr>
+<td><a href="cover.html#cover">COVER</a></td><td>-- information to include in a section cover</td>
+</tr>
+<tr>
+<td><a href="cover.html#on-off">DOC_COVERS</a></td><td>-- printing of document covers on/off</td>
+</tr>
+<tr>
+<td><a href="cover.html#on-off">COVERS</a></td><td>-- printing of section covers on/off</td>
+</tr>
+<tr>
+<td><a href="cover.html#covertext">DOC_COVERTEXT</a></td><td>-- user-added text for document covers</td>
+</tr>
+<tr>
+<td><a href="cover.html#covertext">COVERTEXT</a></td><td>-- user-added text for section covers</td>
+</tr>
+<tr>
+<td><a href="cover.html#coverimage">DOC_COVER_IMAGE</a></td><td>-- add images to document covers</td>
+</tr>
+<tr>
+<td><a href="cover.html#coverimage">COVER_IMAGE</a></td><td>-- add images to document covers</td>
+</tr>
+<tr>
+<td><a href="cover.html#cover-control">Control macros</a></td><td>-- change style defaults for covers</td>
+</tr>
+</table>
+
+<table class="quick-ref">
+<tr>
+<th id="qr-48" class="quick-ref" colspan="2">+++ Utilities</th>
+</tr>
+<tr>
+<td><a href="docprocessing.html#add-space">ADD_SPACE</a></td><td>-- add space to the top of a page</td>
+</tr>
+<tr>
+<td><a href="docprocessing.html#add-space">RESTORE_SPACE</a></td><td>-- restore spacing at the top of a page</td>
+</tr>
+<tr>
+<td><a href="headfootpage.html#blank-pages">BLANKPAGE</a></td><td>-- output one or more blank pages</td>
+</tr>
+<tr>
+<td><a href="docprocessing.html#doc-lead-adjust">DOC_LEAD_ADJUST</a></td><td>-- adjust leading to fill pages</td>
+</tr>
+<tr>
+<td><a href="rectoverso.html#collate">COLLATE</a></td><td>-- join documents (chapters/sections)</td>
+</tr>
+<tr>
+<td><a href="goodies.html#center-block">CENTER_BLOCK</a></td><td>-- centre blocks of type</td>
+</tr>
+</table>
+
+<div class="rule-long"><hr/></div>
+
+<!-- Navigation links -->
+<table style="width: 100%; margin-top: 12px;">
+<tr>
+ <td style="width: 33%;"><a href="toc.html">Back to Table of Contents</a></td>
+ <td style="width: 33%; text-align: center;"><a href="#top">Top</a></td>
+ <td style="width: 33%; text-align: right;"><a href="appendices.html">Next: Appendices</a></td>
+</tr>
+</table>
+
+</div>
+
+<div class="bottom-spacer"><br/></div>
+
+</body>
+</html>
diff --git a/contrib/mom/momdoc/rectoverso.html b/contrib/mom/momdoc/rectoverso.html
new file mode 100644
index 0000000..92cf80f
--- /dev/null
+++ b/contrib/mom/momdoc/rectoverso.html
@@ -0,0 +1,350 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+This file is part of groff, the GNU roff type-setting system.
+
+Copyright (C) 2004-2020 Free Software Foundation, Inc.
+Written by Peter Schaffter (peter@schaffter.ca).
+
+Permission is granted to copy, distribute and/or modify this document
+under the terms of the GNU Free Documentation License, Version 1.3 or
+any later version published by the Free Software Foundation; with no
+Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
+Texts.
+
+A copy of the Free Documentation License is included as a file called
+FDL in the main directory of the groff source package.
+-->
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+<head>
+ <meta http-equiv="content-type" content="text/html;charset=utf-8"/>
+ <title>Mom -- Recto/verso printing, collating</title>
+ <link rel="stylesheet" type="text/css" href="stylesheet.css" />
+</head>
+
+<body style="background-color: #f5faff;">
+
+<!-- ==================================================================== -->
+
+<div id="top" class="page">
+
+<!-- Navigation links -->
+<table style="width: 100%;">
+<tr>
+ <td><a href="toc.html">Back to Table of Contents</a></td>
+ <td style="text-align: right;"><a href="cover.html#top">Next: Cover pages</a></td>
+</tr>
+</table>
+
+<h1 class="docs">Recto/verso printing, collating</h1>
+
+<div style="width: 50%; margin: auto;">
+<ul class="no-enumerator" style="margin-left: -1em;">
+ <li><a href="#rectoverso-intro">Introduction to recto/verso printing</a>
+ <ul style="margin-left: -.5em; list-style-type: disc;">
+ <li><a href="#rectoverso-list">Macro list</a></li>
+ </ul></li>
+ <li><a href="#collate-intro">Introduction to collating</a>
+ <ul style="margin-left: -.5em; list-style-type: disc;">
+ <li><a href="#collate">The COLLATE macro</a></li>
+ </ul></li>
+</ul>
+</div>
+
+<div class="rule-medium"><hr/></div>
+
+<h2 id="rectoverso-intro" class="docs">Introduction to recto/verso printing</h2>
+
+<p>
+Recto/verso printing allows you to set up a mom document in such
+a way that it can be printed on both sides of a printer sheet and
+subsequently bound.
+</p>
+
+<p>
+With recto/verso, mom automatically takes control of the following
+aspects of alternating page layout:
+</p>
+<ul style="margin-top: -.5em; margin-left: -.5em; margin-bottom: -.5em;">
+ <li>switching left and right margins (if they&#8217;re not equal)</li>
+ <li>switching the left and right parts of the default 3-part
+ <a href="definitions.html#header">headers</a>
+ or
+ <a href="definitions.html#footer">footers</a>
+ (see the
+ <a href="headfootpage.html#description-general">General description of headers</a>)
+ </li>
+ <li>switching
+ <a href="headfootpage.html#hdrftr-recto">HEADER_RECTO</a>
+ and
+ <a href="headfootpage.html#hdrftr-recto">HEADER_VERSO</a>
+ if user-defined, single string recto/verso headers
+ or footers are used in place of the default 3-part
+ headers or footers
+ </li>
+ <li>switching the page number position (if page numbers are not centred)</li>
+</ul>
+<br/>
+
+<div class="macro-list-container">
+<h3 id="rectoverso-list" class="macro-list">Recto/verso macros</h3>
+<ul class="macro-list">
+ <li><a href="#recto-verso">RECTO_VERSO</a></li>
+ <li><a href="#force-recto">FORCE_RECTO</a></li>
+ <li><a href="#switch-hdrftr">SWITCH_HEADERS (also FOOTERS)</a>
+ &ndash; switch starting position of the header parts (left and right)
+ </li>
+</ul>
+</div>
+
+<!-- -RECTO_VERSO- -->
+
+<div id="recto-verso" class="box-macro-args">
+Macro: <b>RECTO_VERSO</b>
+</div>
+
+<p>
+If you want mom to set up alternating pages for recto/verso
+printing, simply invoke RECTO_VERSO, with no argument, anywhere in
+your document (most likely before
+<a href="docprocessing.html#start">START</a>).
+</p>
+
+<div class="box-tip">
+<p class="tip-top">
+<span class="note">Note:</span>
+Recto/verso always switches the left and right parts of
+<a href="definitions.html#header">headers</a>
+or
+<a href="definitions.html#footer">footers</a>
+on odd/even pages. However, it only switches the left and right
+margins if the margins aren&#8217;t equal. Consequently, it is
+your responsibility to set the appropriate differing left and right
+margins with
+<a href="typesetting.html#l-margin">L_MARGIN</a>
+and
+<a href="typesetting.html#r-margin">R_MARGIN</a>
+(prior to
+<a href="docprocessing.html#start">START</a>)
+or with
+<a href="docprocessing.html#doc-left-margin">DOC_LEFT_MARGIN</a>
+and
+<a href="docprocessing.html#doc-right-margin">DOC_RIGHT_MARGIN</a>
+(before or after START).
+</p>
+
+<p class="tip-bottom">
+Equally, recto/verso only switches the page number position if page
+numbers aren&#8217;t centred, which means you have to set the page
+number position with
+<a href="headfootpage.html#pagenum-pos">PAGENUM_POS</a>
+(before or after START).
+</p>
+</div>
+
+<!-- -FORCE_RECTO- -->
+
+<div id="force-recto" class="box-macro-args" style="margin-top: 1em;">
+Macro: <b>FORCE_RECTO</b>
+</div>
+
+<p>
+It is a common convention with two-sided printing to ensure that
+cover pages, title pages, and chapters or major sections of a document
+always begin on the recto side of a page. This sometimes
+necessitates inserting a blank page before the start of a new
+chapter or major section.
+</p>
+
+<p>
+If you would like mom to take care of this for you automatically,
+simply invoke <kbd>FORCE_RECTO</kbd> before the first
+<a href="docprocessing.html#start">START</a>
+of the document.
+</p>
+
+<!-- -SWITCH_HDRFTR- -->
+
+<div id="switch-hdrftr" class="box-macro-args" style="margin-top: 1em;">
+Macro: <b>SWITCH_HEADERS</b>
+</div>
+
+<p>
+SWITCH_HEADERS switches the location of the header left string
+(by default, the author) and the header right string (by default,
+the document title). If you don&#8217;t like mom&#8217;s default
+placement of author and title, use SWITCH_HEADERS to reverse it.
+</p>
+
+<p>
+SWITCH_HEADERS can also be useful in conjunction with
+<a href="#recto-verso">RECTO_VERSO</a>.
+The assumption of RECTO_VERSO is that the first page of a document
+(i.e. recto/odd) represents the norm for header-left and header-right,
+meaning that the second (and all subsequent verso/even) pages of the
+document will reverse the order of header-left and header-right.
+</p>
+
+<p>
+If mom&#8217;s behaviour in this matter is not what you want, simply
+invoke SWITCH_HEADERS on the first page of your recto/verso document
+to reverse her default treatment of header parts. The remainder of
+your document (with respect to headers) will come out as you want.
+</p>
+
+<div class="rule-medium"><hr/></div>
+
+<!-- ===================================================================== -->
+
+<h2 id="collate-intro" class="docs">Introduction to collating</h2>
+
+<p>
+Many people wisely keep chapters of a long work in separate
+files, previewing or printing them as needed during the draft
+phase. However, when it comes to the final version, mom requires
+a single, collated file in order to keep track of page numbering
+and recto/verso administration, generating tables of contents and
+endnotes, ensuring that
+<a href="definitions.html#docheader">docheaders</a>
+get printed correctly, and a host of other details.
+</p>
+
+<p>
+The COLLATE macro, which can be used with any
+<a href="docprocessing.html#doctype">DOCTYPE</a>
+except <kbd>LETTER</kbd>, lets you glue mom-formatted input files
+together. You need only concatenate chapters into a single file
+(most likely with <kbd>cat(1)</kbd>), and put
+<kbd>.COLLATE</kbd> at the end of each concatenated chapter.
+Assuming all the files begin with the required
+<a href="docprocessing.html#reference-macros">reference macros</a>
+(metadata), style parameters, and
+<a href="docprocessing.html#start">START</a>,
+each chapter will begin on a fresh page and behave as expected.
+</p>
+
+<p>
+Even if you work with monolithic, multi-chapter files, every
+chapter and its associated metadata plus <kbd>.START</kbd>
+still needs to be preceded by <kbd>.COLLATE</kbd>.
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span>
+COLLATE assumes you are collating documents/files with similar
+type-style parameters hence there&#8217;s no need for PRINTSTYLE
+to appear after COLLATE, although if you&#8217;re collating
+documents that were created as separate files, chances are the
+PRINTSTYLE&#8217;s already there.
+</p>
+</div>
+
+<div class="box-tip">
+<p id="caution" class="tip">
+<b>Two words of caution:</b>
+</p>
+<ol style="margin-top: -1.25em; padding-bottom: .5em;">
+ <li>Do not collate documents of differing
+ PRINTSTYLES (i.e., don&#8217;t try to
+ collate a <kbd>TYPESET</kbd> document and <kbd>TYPEWRITE</kbd>
+ document).
+ </li>
+ <li>Use <kbd>.DOC_FAMILY</kbd> instead of
+ <kbd>.FAMILY</kbd> if, for some reason, you want to
+ change the family of all the document elements after
+ <kbd>.COLLATE</kbd>. <kbd>.FAMILY</kbd>, by itself, will
+ change the family of paragraph text only.
+ </li>
+</ol>
+</div>
+
+<!-- -COLLATE- -->
+
+<div class="macro-id-overline">
+<h3 id="collate" class="macro-id">collate</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>COLLATE</b>
+</div>
+
+<p>
+The most basic (and most likely) collating situation looks like
+this:
+<br/>
+<span class="pre-in-pp">
+ .COLLATE
+ .CHAPTER 17
+ .START
+</span>
+A slightly more complex version of the same thing, for chapters
+that require their own titles, looks like this:
+<br/>
+<span class="pre-in-pp">
+ .COLLATE
+ .CHAPTER_TITLE "Geek Fatigue: Symptoms and Causes"
+ .START
+</span>
+</p>
+
+<div class="box-tip" style="margin-top: -1em">
+<p class="tip">
+<span class="tip">Tip:</span>
+If the last line of text before <kbd>.COLLATE</kbd>
+falls too close to the bottom margin, or if the line is followed
+by a macro likely to cause a linebreak (e.g. <kbd>.LIST OFF</kbd> or
+<kbd>.IQ</kbd>), mom may output a superfluous blank page before
+the start of the following document.
+</p>
+
+<p class="tip-bottom" style="margin-top: -1em">
+In order to avoid this, insert
+<a href="docprocessing.html#EL"><kbd>.EL</kbd></a>
+after the last line of text, before <kbd>.COLLATE</kbd> and/or any
+concluding macros. For example,
+<br/>
+<span class="pre-in-pp">
+ some concluding text.\c
+ .EL
+ .COLLATE
+</span>
+or
+<br/>
+<span class="pre-in-pp">
+ some concluding text.\c
+ .EL
+ .LIST OFF
+ .COLLATE
+</span>
+</p>
+</div>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span>
+See the
+<a href="#caution">two words of caution</a>,
+above.
+</p>
+</div>
+
+<div class="rule-long"><hr/></div>
+
+<!-- Navigation links -->
+<table style="width: 100%; margin-top: 12px;">
+<tr>
+ <td style="width: 33%;"><a href="toc.html">Back to Table of Contents</a></td>
+ <td style="width: 33%; text-align: center;"><a href="#top">Top</a></td>
+ <td style="width: 33%; text-align: right;"><a href="cover.html">Next: Cover pages</a></td>
+</tr>
+</table>
+
+</div>
+
+<div class="bottom-spacer"><br/></div>
+
+</body>
+</html>
diff --git a/contrib/mom/momdoc/refer.html b/contrib/mom/momdoc/refer.html
new file mode 100644
index 0000000..5f11814
--- /dev/null
+++ b/contrib/mom/momdoc/refer.html
@@ -0,0 +1,2129 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+This file is part of groff, the GNU roff type-setting system.
+
+Copyright (C) 2004-2020 Free Software Foundation, Inc.
+Written by Peter Schaffter (peter@schaffter.ca).
+
+Permission is granted to copy, distribute and/or modify this document
+under the terms of the GNU Free Documentation License, Version 1.3 or
+any later version published by the Free Software Foundation; with no
+Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
+Texts.
+
+A copy of the Free Documentation License is included as a file called
+FDL in the main directory of the groff source package.
+-->
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+<head>
+ <meta http-equiv="content-type" content="text/html;charset=utf-8"/>
+ <title>Mom -- Document processing, bibliographies and references</title>
+ <link rel="stylesheet" type="text/css" href="stylesheet.css" />
+</head>
+
+<body style="background-color: #f5faff;">
+
+<!-- ==================================================================== -->
+
+<div id="top" class="page">
+
+<!-- Navigation links -->
+<table style="width: 100%;">
+<tr>
+ <td><a href="toc.html">Back to Table of Contents</a></td>
+ <td style="text-align: right;"><a href="letters.html#top">Next: Writing letters</a></td>
+</tr>
+</table>
+
+<h1 class="docs">Bibliographies and references</h1>
+
+<div style="width: 75%; margin: auto;">
+<ul class="no-enumerator">
+ <li><a href="#intro-ref">Introduction to bibliographies and references</a></li>
+ <li><a href="#tutorial-ref">Tutorial on <kbd>refer</kbd> usage with mom</a>
+ <ul style="margin-left: -.5em; list-style-type: disc;">
+ <li><a href="#db-ref">Create a <kbd>refer</kbd> database</a></li>
+ <li><a href="#rcommands-ref">Insert a <kbd>refer</kbd> block</a></li>
+ <li><a href="#placement-ref">Tell mom where you want your references (if footnotes or endnotes)</a></li>
+ <li><a href="#accessing-ref">Accessing references in the database</a></li>
+ <li><a href="#fn-en-recipe">Entering footnote/endnote references</a></li>
+ <li><a href="#parenthetical">Parenthetical insertions</a></li>
+ <li><a href="#bibliography-from-embedded">Generating a bibliography from parenthetical insertions</a></li>
+ <li><a href="#bibliography-recipe">Generating a comprehensive bibliography</a></li>
+ <li><a href="#invoking-ref">Invoking groff with mom and <kbd>refer</kbd></a></li>
+ </ul></li>
+ <li><a href="#mla">MLA (Modern Language Association) style</a>
+ <ul style="margin-left: -.5em; list-style-type: disc;">
+ <li><a href="#ref-styles">Types of references (endnote, footnote, or embedded in text)</a></li>
+ <li><a href="#parenthetical">Inserting parenthetical references into the text</a></li>
+ </ul></li>
+ <li><a href="#database">The <kbd>refer</kbd> database</a>
+ <ul style="margin-left: -.5em; list-style-type: disc;">
+ <li><a href="#database-intro">Introduction</a></li>
+ <li><a href="#database-rules">Rules</a></li>
+ <li><a href="#fields-quick">Quick guide to field identifiers (%A for author, %T for title, etc)</a></li>
+ <li><a href="#fields-specifics">Field identifiers: specifics, usage and examples</a></li>
+ </ul></li>
+ <li><a href="#index-ref">The bibliography and reference macros</a>
+ <ul style="margin-left: -.5em; list-style-type: disc;">
+ <li><a href="#biblio-control">Bibliography control macros and defaults</a></li>
+ </ul></li>
+</ul>
+</div>
+
+<div class="rule-medium"><hr/></div>
+
+<h2 id="intro-ref" class="docs">Introduction to bibliographies and references</h2>
+
+<p>
+Mom provides the ability to format and generate bibliographies, as
+well as footnote or endnote references, in MLA (Modern Language
+Association) style. She accomplishes this by working in conjunction
+with a special groff program called <kbd>refer</kbd>.
+</p>
+
+<p>
+<kbd>Refer</kbd> requires first that you create a database of works
+that will be cited in your documents. Once that&#8217;s done, special
+macros let you briefly key in references to entries in the database
+and have mom format them with respect to order, punctuation and
+italicization in footnotes, endnotes, or a full bibliography.
+</p>
+
+<p>
+<kbd>Refer</kbd> has been around for a long time. It&#8217;s
+powerful and has many, many features. Unfortunately, the manpage
+(<kbd>man&nbsp;refer</kbd>), while complete and accurate, is
+dense and not a good introduction. (It&#8217;s a classic manpage
+Catch-22: the manpage is useful only after you know how to use the
+program.)
+</p>
+
+<p>
+In order to get mom users up and running with <kbd>refer</kbd>,
+this section of mom&#8217;s documentation focuses exclusively, in a
+recipe-like manner, on what you need to know to use <kbd>refer</kbd>
+satisfactorily in conjunction with mom. The instructions are not to
+be taken as a manual on full <kbd>refer</kbd> usage.
+</p>
+
+<p>
+If you&#8217;re already a <kbd>refer</kbd> user, the information
+herein will be useful for adapting your current <kbd>refer</kbd>
+usage to mom&#8217;s way of doing things. If you&#8217;ve never
+used <kbd>refer</kbd>, the information is essential, and, in many
+cases, may be all you need.
+</p>
+
+<p>
+I encourage anyone interested in what MLA style looks
+like&mdash;and, by extension, how your bibliographies and references
+will look after mom formats them&mdash;to check out
+<br/>
+<span class="pre-in-pp">
+ <a href="http://www.aresearchguide.com/12biblio.html">http://www.aresearchguide.com/12biblio.html</a>
+</span>
+or any other website or reference book on MLA style.
+</p>
+
+<div class="rule-short" style="margin-top: 1em;"><hr/></div>
+
+<div class="examples-container" style="margin-top: 1.5em; margin-bottom: 1.5em;">
+<h3 id="tutorial-ref" class="docs">Tutorial on refer usage with mom</h3>
+<ol style="margin-top: 1em; margin-bottom: -.5em;">
+ <li><a href="#db-ref">Create a <kbd>refer</kbd> database</a>
+ <ul style="margin-left: -.5em; list-style-type: disc;">
+ <li><a href="#example-refer-database">example <kbd>refer</kbd> database</a></li>
+ </ul></li>
+ <li><a href="#rcommands-ref">Insert a <kbd>refer</kbd> block</a>
+ <ul style="margin-left: -.5em; list-style-type: disc;">
+ <li><a href="#fn-en-block">refer block for footnotes/endnotes</a></li>
+ <li><a href="#in-text-block">refer block for parenthetical insertions into running text</a></li>
+ <li><a href="#bibliography-block">refer block for comprehensive bibliographies (reading lists)</a></li>
+ </ul></li>
+ <li><a href="#placement-ref">Tell mom where you want your references (if footnotes or endnotes)</a></li>
+ <li><a href="#accessing-ref">Accessing references in the database</a></li>
+ <li><a href="#fn-en-recipe">Entering footnote/endnote references</a></li>
+ <li><a href="#parenthetical-insertions">Parenthetical insertions</a></li>
+ <li><a href="#bibliography-from-embedded">Generating a bibliography from parenthetical insertions</a></li>
+ <li><a href="#bibliography-recipe">Generating a comprehensive bibliography</a></li>
+ <li><a href="#invoking-ref">Invoking groff with mom and <kbd>refer</kbd></a></li>
+</ol>
+
+<h4 id="db-ref" class="docs">1. Create a refer database</h4>
+
+<p>
+The first step in using <kbd>refer</kbd> with mom is creating a
+database. The database is a text file containing entries for the
+works you will be citing. You may set up separate databases for
+individual documents, or create a large database that can be
+accessed by many documents.
+</p>
+
+<p>
+Entries (&#8220;records&#8221; in refer-speak) in the database
+are separated from each other by a single, blank line. The records
+themselves are composed of single lines (&#8220;fields&#8221;) with
+no blank lines between them. Each field begins with a percent
+sign and a single letter (the &quot;field identifier&quot;)
+e.g. <kbd>%A</kbd> or <kbd>%T</kbd>. The letter identifies
+what part of a bibliographic entry the field refers to: Author,
+Title, Publisher, Date, etc. After the field identifier comes
+a single space, followed by the information appropriate to
+field.
+</p>
+
+<!-- Add rules for punctuation and italics -->
+
+<p>
+Here&#8217;s an example database containing two records so you can
+visualize what the above paragraph says.
+</p>
+
+<div id="example-refer-database" class="examples" style="margin-top: -.5em;">Example <kbd>refer</kbd> database</div>
+<div class="examples-container" style="padding-bottom: 1em;">
+<span class="pre">
+%A Terry Pratchett
+%A Neil Gaiman
+%T Good Omens
+%C London
+%I Gollancz
+%D 1990
+
+%A Peter Schaffter
+%T The Schumann Proof
+%C Toronto
+%I RendezVous Press
+%D 2004
+</span>
+</div>
+
+<p>
+The order in which you enter fields doesn&#8217;t matter.
+<kbd>Refer</kbd> will re-arrange them for you.
+</p>
+
+<h4 id="rcommands-ref" class="docs">2. Insert a refer block</h4>
+
+<p>
+Having set up your database, you now need to put some
+<kbd>refer</kbd>-specific commands in your mom file.
+</p>
+
+<p>
+<kbd>Refer</kbd> commands are introduced by a single line
+containing <kbd>.R1</kbd>, and concluded with a single line
+containing <kbd>.R2</kbd>. What goes between the <kbd>.R1</kbd>
+and <kbd>.R2</kbd> lines is called a &#8220;refer block&#8221;.
+<kbd>Refer</kbd> commands in a refer block should be entered one per
+line, in lowercase letters, <i>with no initial period</i> (dot).
+The actual commands depend on whether you want your references
+</p>
+<ul>
+<li>in footnotes/endnotes</li>
+<li>parenthetically inserted (in abbreviated form) into running text,
+referring to a works-cited list (bibliography)</li>
+<li>to generate a comprehensive bibliography (a reading list)</li>
+</ul>
+
+<h5 id="fn-en-block" class="docs" style="font-size: 90%; margin-top: .25em;">Refer block for footnotes/endnotes</h5>
+
+<p style="margin-top: .5em;">
+If you want footnote or endnote references, place this block at
+the <i>top</i> of your mom file.
+</p>
+
+<div id="refer-block1" class="examples" style="margin-top: -.5em;">
+<div class="examples-container" style="padding-bottom: 1em;">
+<span class="pre">
+.R1
+no-label-in-text
+no-label-in-reference
+join-authors " and " ", " ", and "
+database &lt;full path to database&gt;
+.R2
+</span>
+</div>
+</div>
+<p style="margin-top: .5em; font-size: 95%; line-height: 120%;">
+<kbd>&lt;full&nbsp;path&nbsp;to&nbsp;the&nbsp;database&gt;</kbd>
+means the full path including the filename, e.g.
+<kbd>/home/user/refer/my-database-file</kbd>.
+</p>
+
+<h5 id="in-text-block" class="docs" style="font-size: 90%; margin-top: .25em;">Refer block for parenthetical insertions into running text</h5>
+
+<p style="margin-top: .5em;">
+If you want short, parenthetical insertions into running text,
+referring to works cited in a bibliography, place this block at
+the <i>top</i> of your mom file.
+</p>
+
+<div id="refer-block2" class="examples" style="margin-top: -.5em;">
+<div class="examples-container" style="padding-bottom: 1em;">
+<span class="pre">
+.R1
+label "(A.n|Q)"
+bracket-label " (" ")" ", "
+join-authors ", and " ", " ", and "
+move-punctuation
+reverse A1
+sort A1Q1T1B1E1
+database &lt;full path to database&gt;
+.R2
+</span>
+</div>
+</div>
+<p style="margin-top: .5em; font-size: 95%; line-height: 120%;">
+<kbd>&lt;full&nbsp;path&nbsp;to&nbsp;the&nbsp;database&gt;</kbd>
+means the full path including the filename, e.g.
+<kbd>/home/user/refer/my-database-file</kbd>.
+</p>
+
+<h5 id="bibliography-block" class="docs" style="font-size: 90%; margin-top: .25em;">Refer block for comprehensive bibliographies</h5>
+
+<p style="margin-top: .5em;">
+If you want to output an entire <kbd>refer</kbd> database, or
+generate a comprehensive bibliography (a reading list) from a
+database, place this block at the <i>bottom</i> of your mom file,
+either prior to or immediately after invoking
+<a href="#bibliography">BIBLIOGRAPHY</a>.
+</p>
+
+<div id="refer-block3" class="examples" style="margin-top: -.5em;">
+<div class="examples-container" style="padding-bottom: 1em;">
+<span class="pre">
+.R1
+no-label-in-text
+no-label-in-reference
+join-authors ", and " ", " ", and "
+sort A1Q1T1B1E1
+reverse A1
+database &lt;full path to database&gt;
+.R2
+</span>
+</div>
+</div>
+
+<p style="margin-top: .5em; font-size: 95%; line-height: 120%;">
+<kbd>&lt;full&nbsp;path&nbsp;to&nbsp;the&nbsp;database&gt;</kbd>
+means the full path including the filename, e.g.
+<kbd>/home/user/refer/my-database</kbd>.
+</p>
+
+<h4 id="placement-ref" class="docs">3. Tell mom where you want your references</h4>
+
+<p>
+If you want references in footnotes, issue the instruction
+<br/>
+<span class="pre-in-pp">
+ .FOOTNOTE_REFS
+</span>
+anywhere before the first citation in your file. Footnote markers
+will be inserted into the text, and the bibliographic information
+for the citation will appear as a footnote.
+</p>
+
+<p>
+If you want references in endnotes, issue the instruction
+<br/>
+<span class="pre-in-pp">
+ .ENDNOTE_REFS
+</span>
+anywhere before the first citation in your file. Endnote markers
+will be inserted into the text, and the bibliographic information
+for the citation will appear as an endnote entry.
+</p>
+
+<p>
+Note that if you want references parenthetically inserted
+into running text, referring to entries in a works-cited list
+(bibliography) that <kbd>mom</kbd> and <kbd>refer</kbd> assemble
+automatically, no special instructions are required. See
+<a href="#bibliography-from-embedded">Generating a bibliography from parenthetical insertions</a>
+for how to output the collected references.
+</p>
+
+<p>
+For outputting an entire <kbd>refer</kbd> database, or
+generating a comprehensive reading list from a database, see the
+macro
+<a href="#bibliography">BIBLIOGRAPHY</a>.
+</p>
+
+<h4 id="accessing-ref" class="docs">4. Accessing references in the database</h4>
+
+<p>
+References are accessed by putting keywords from the desired database
+record between two special <kbd>refer</kbd> commands:
+<br/>
+<span class="pre-in-pp">
+ .[
+</span>
+and
+<br/>
+<span class="pre-in-pp">
+ .]
+</span>
+Keywords are any word, or set of words, that identify a database
+record unambiguously. Thus, if you have only one database record for
+the author Ray Bradbury,
+<br/>
+<span class="pre-in-pp">
+ .[
+ bradbury
+ .]
+</span>
+is sufficient. However, if your database contains several records
+for books by Bradbury, say, <i>Fahrenheit 451</i> and <i>The
+Martian Chronicles</i>,
+&#8220;<kbd>bradbury&nbsp;451</kbd>&#8221; and
+&#8220;<kbd>bradbury&nbsp;martian</kbd>&#8221; would identify the two records unambiguously.
+</p>
+
+<p>
+A special database field identifier, <kbd>%K</kbd>, lets you create
+unique keywords for database records to help clear up any ambiguity.
+</p>
+
+<p>
+Notice that you don&#8217;t have to worry about capitalization when
+entering keywords.
+</p>
+
+<h4 id="fn-en-recipe" class="docs">5. Entering footnote/endnote references</h4>
+
+<p>
+Depending on which you have issued, a
+<kbd><a href="#footnote-refs">.FOOTNOTE_REFS</a></kbd>
+or an
+<kbd><a href="#endnote-refs">.ENDNOTE_REFS</a></kbd>
+command, entering references is done like this:
+<br/>
+<span class="pre-in-pp">
+ .REF
+ .[
+ keyword(s)
+ .]
+ .REF
+</span>
+If FOOTNOTE_REFS is in effect, the reference between the first
+and second <kbd>.REF</kbd> will be treated as a footnote. If
+ENDNOTE_REFS, it will be treated as an endnote. Endnote references
+must be explicitly output with
+<a href="docelement.html#ENDNOTES">ENDNOTES</a>
+at the end of your file, before
+<a href="tables-of-contents.html#TOC">TOC</a>.
+</p>
+
+<div class="box-important">
+<p class="tip">
+<span class="important">Important:</span>
+REF behaves identically to
+<a href="docelement.html#footnote">FOOTNOTE</a>
+and
+<a href="docelement.html#endnote">ENDNOTE</a>
+with respect to the use of the <kbd>\c</kbd> inline escape. Please
+read the
+<a href="docelement.html#footnote-note">HYPER IMPORTANT NOTE</a>
+found in the document entry for FOOTNOTE (which also applies to
+ENDNOTE).
+</p>
+</div>
+
+<h4 id="parenthetical-insertions" class="docs">6. Parenthetical insertions</h4>
+
+<p>
+See
+<a href="#parenthetical">Inserting parenthetical references into
+text</a>.
+</p>
+
+<h4 id="bibliography-from-embedded" class="docs">7. Generating a bibliography from parenthetical insertions</h4>
+
+<p>
+To generate a bibliography from works cited by parenthetical
+insertions in the text, put this at the end of your document, before
+<kbd><a href="tables-of-contest.html#TOC">.TOC</a></kbd>.
+<br/>
+<span class="pre-in-pp">
+ .BIBLIOGRAPHY
+ .[
+ $LIST$
+ .]
+ .BIBLIOGRAPHY OFF
+</span>
+</p>
+
+<h4 id="bibliography-recipe" class="docs">8. Generating a comprehensive bibliography</h4>
+
+<p>
+You can also generate a comprehensive bibliography, which is to say a
+bibliography containing more works than are actually cited (a
+&#8220;reading list&#8221;), by placing references between
+<kbd><a href="#bibliography">.BIBLIOGRAPHY</a></kbd>
+and
+<kbd><a href="#bibliography">.BIBLIOGRAPHY&nbsp;OFF</a></kbd>.
+Once you have input the desired references, insert
+<br/>
+<span class="pre-in-pp">
+ .[
+ $LIST$
+ .]
+</span>
+and follow it with <kbd>.BIBLIOGRAPHY&nbsp;OFF</kbd>. Study the
+example below if you&#8217;re having trouble visualizing this.
+</p>
+
+<div id="example-bibliography" class="examples" style="margin-top: -.5em;">Example bibliography</div>
+<div class="examples-container" style="padding-bottom: 1em;">
+<span class="pre">
+.BIBLIOGRAPHY
+.R1
+no-label-in-text
+no-label-in-reference
+join-authors ", and " ", " ", and "
+sort A1Q1T1B1E1
+reverse A1
+database &lt;full path to database&gt;
+.R2
+.[
+bradbury
+.]
+.[
+pratchett
+.]
+.[
+$LIST$
+.]
+.BIBLIOGRAPHY OFF
+</span>
+</div>
+
+<p>
+Alternatively, you can output an entire database as a
+bibliography. Do the following at the end of your document, before
+<kbd><a href="tables-of-contest.html#TOC">.TOC</a></kbd>.
+<br/>
+<span class="pre-in-pp">
+ .BIBLIOGRAPHY
+ .R1
+ no-label-in-text
+ no-label-in-reference
+ join-authors ", and " ", " ", and "
+ sort A1Q1T1B1E1
+ reverse A1
+ bibliography &lt;full path to database&gt;
+ .R2
+ .BIBLIOGRAPHY OFF
+</span>
+</p>
+
+<h4 id="invoking-ref" class="docs">9. Invoking groff with mom and refer</h4>
+
+<p>
+So, now you&#8217;ve got a document formatted properly to use
+references processed with <kbd>refer</kbd>, what do you do to output
+the document?
+</p>
+
+<p>
+It&#8217;s simple. Pass the <kbd>-R</kbd> flag to pdfmom or groff,
+like this:
+<br/>
+<span class="pre-in-pp">
+ pdfmom -R &lt;filename&gt; ...
+</span>
+</p>
+</div>
+
+<div class="rule-medium" style="margin-top: 1em;"><hr/></div>
+
+<h2 id="mla" class="docs">MLA (Modern Language Association) style</h2>
+
+<h3 id="ref-styles" class="docs">Types of references (endnote, footnote, or embedded in text)</h3>
+
+<p>
+MLA allows for three types of references, or referencing styles:
+</p>
+<ul style="margin-top: -.5em;">
+ <li>short, parenthetical references in the text, linked to a
+ works-cited list (bibliography) at the end of the document</li>
+ <li>footnote references</li>
+ <li>endnote references</li>
+</ul>
+
+<p style="margin-top: -.5em;">
+There are significant differences between the way footnote/endnote
+references should be formatted, and the formatting style of
+bibliographies. One example is that footnote/endnote references
+should have their first lines indented, whereas bibliographic
+references should have their second lines indented. Fortunately,
+with mom, there&#8217;s no need to concern yourself with the differences;
+they&#8217;re taken care of automatically.
+</p>
+
+<p>
+In terms of inserting references into your documents,
+footnote/endnote references are input in a manner similar to
+entering any other kind of
+<a href="docelement.html#footnote-into">footnote</a>
+or
+<a href="docelement.html#endnote-into">endnote</a>.
+Parenthetical references, however, need to be handled differently.
+See the next section.
+</p>
+
+<h3 id="parenthetical" class="docs">Inserting parenthetical references into the text</h3>
+
+<p>
+MLA style prefers restricting the information in parenthetical
+references to the barest minimum needed to identify works
+in the works-cited list (the bibliography). Typically, a
+parenthetical insertion is just the author&#8217;s last name
+followed by the page number of the cited work (if only one work by
+that author is cited), or by the author, a shortened title of the
+work, and the page number (if more than one work is cited).
+</p>
+
+<p>
+This necessitates a slightly fiddly way of entering parenthetical
+references, though not by any means difficult or hard to make sense
+of.
+</p>
+
+<p>
+The <kbd>refer</kbd> block suggested
+<a href="#refer-block2">here</a>
+for parenthetical references prints only the author&#8217;s
+last name from the database record identified by your keywords
+(the <kbd>label</kbd> command), surrounded by parentheses (the
+<kbd>bracket-label</kbd> command). Therefore, assuming you are
+citing Ray Bradbury&#8217;s <i>The Martian Chronicles</i>, and it is
+the only work by Bradbury mentioned in the text,
+<br/>
+<span class="pre-in-pp">
+ ...end of sentence.
+ .[
+ martian chronicles
+ .]
+ A new sentence...
+</span>
+will insert &#8220;<span style="font-family: times; font-size: 105%; font-weight: bold">...end of sentence (Bradbury). A new sentence...</span>&#8221; into the text.
+<i>The Martian Chronicles</i> will be added
+to the works-cited list generated at the end of the document if it
+is not already present as the result of an earlier reference.
+</p>
+
+<p>
+If you need a page number to identify where in <i>The Martian
+Chronicles</i> to find a specific quote
+<br/>
+<span class="pre-in-pp">
+ "...aluminum roaches and iron crickets."
+ .[
+ [ martian chronicles
+ .] 168)
+ A new sentence...
+</span>
+results in <span style="font-family: times; font-size: 105%; font-weight: bold">&#8220;...aluminum roaches and iron crickets.&#8221; (Bradbury 168) A new sentence...</span>&#8221;
+(which is excruciatingly correct MLA style). The
+&#8220;<kbd>[</kbd>&#8221; before <kbd>martian&nbsp;chronicles</kbd> tells
+refer to print the opening parenthesis; any text immediately
+following the &#8220;<kbd>.]</kbd>&#8221;, including spaces,
+<i>replaces</i> the closing parenthesis. (Notice that you have to
+add the closing parenthesis yourself after the page number.)
+</p>
+
+<p>
+If your document cites more than one work by Bradbury and you need
+a title and page number in addition to the author&#8217;s name in
+the inline reference,
+<br/>
+<span class="pre-in-pp">
+ "...aluminum roaches and iron crickets."
+ .[
+ [ bradbury martian
+ .], \fIChronicles\fP 168)
+ A new sentence...
+</span>
+will produce &#8220;<span style="font-family: times; font-size: 105%; font-weight: bold">&#8220;...aluminum roaches and iron crickets.&#8221; (Bradbury, <i>Chronicles</i> 168) A new sentence...</span>&#8221;.
+</p>
+
+<div class="examples-container" style="margin-top: 1.5em; margin-bottom: 1.5em;">
+<h3 class="docs">The <span style="text-transform: none">&#8216;label&#8217;</span><span style="text-transform: uppercase"> and</span> <span style="text-transform: none">&#8216;bracket-label&#8217;</span><span style="text-transform: uppercase"> commands</span></h3>
+
+<p>
+The <kbd>label</kbd> and <kbd>bracket-label</kbd> commands in
+the refer block allow you to customize what information goes
+into parenthetical references, and how they should be formatted.
+<kbd>label</kbd> dictates which fields from the database record
+to print and how to punctuate them. <kbd>bracket-label</kbd>
+controls the bracketing style. Users are encouraged to consult
+<kbd>man&nbsp;refer</kbd> for usage.
+</p>
+
+<p>
+Here&#8217;s an example of how to set up APA-style references, which
+require the author and date of publication, optionally with a page
+number or range of pages.
+<br/>
+<span class="pre-in-pp">
+ .R1
+ label "(A.n|Q) ', ' D.y"
+ bracket-label " (" ")" ", "
+ join-authors ", and " ", " ", and "
+ move-punctuation
+ reverse A1
+ sort A1Q1T1B1E1
+ database /home/peter/Groff-mom/Testing/Refer/refer-database
+ .R2
+</span>
+Assuming a reference to a work by Ursula Leguin published in 1980
+<br/>
+<span class="pre-in-pp">
+ .[
+ leguin
+ .]
+</span>
+produces
+<span style="font-family: times; font-size: 105%; font-weight: bold">
+(Leguin, 1980)
+</span>.
+If a page number is also required
+<br/>
+<span class="pre-in-pp">
+ .[
+ [ leguin
+ .], p. 73)
+</span>
+produces
+<span style="font-family: times; font-size: 105%; font-weight: bold">(Leguin, 1980, p. 73)</span>.
+</p>
+</div>
+
+<div class="rule-medium" style="margin-top: 1em;"><hr/></div>
+
+<h2 id="database" class="docs">The refer database</h2>
+
+<h3 id="database-intro" class="docs">Introduction</h3>
+
+<p style="margin-top: .5em;">
+The heart and soul of <kbd>refer</kbd> is the bibliographic
+database. Knowing how to create records (i.e. the entries for works
+cited in a document) is largely a question matching data (author,
+title, publisher, etc) with the correct field identifier. For
+example, if you&#8217;re citing from a scholarly journal, you need to know
+that <kbd>%J</kbd> is the field identifier for journal names and
+<kbd>%N</kbd> is the field identifier for the journal number. Use
+the
+<a href="#fields-quick">Quick list of field identifiers</a>
+as your guide.
+</p>
+
+<h3 id="database-rules" class="docs">The rules</h3>
+
+<p style="margin-top: .5em;">
+Entering the data correctly is also important. Fortunately, there
+are very few rules, and those there are make sense. In a nutshell:
+</p>
+<ul style="margin-top: -.5em;">
+ <li>enter the data in each field in natural order; author John Smith is
+ &#8220;John Smith&#8221;, editor Jane Doe is &#8220;Jane Doe&#8221;</li>
+ <li>capitalize all proper nouns and words in titles as you expect
+ to see them; otherwise, use lowercase</li>
+ <li>use no terminating punctuation unless required; typically,
+ required punctuation is the period after a shortform
+ (&#8220;ed.&#8221; or &#8220;eds.&#8221;, &#8220;Jr.&#8221;,
+ etc) or a question mark or exclamation mark at the end of a
+ title</li>
+ <li>if part of a field needs to be set off in single-quotes, use
+ <kbd>\[oq]</kbd> and <kbd>\[cq]</kbd> (openquote, closequote) rather than the
+ single-quote (or apostrophe) character on your keyboard</li>
+ <li>if part of a field needs to be forced into italics, use the
+ escapes <kbd><span class="nobr">\*[IT]</span></kbd> and
+ <kbd><span class="nobr">\*[PREV]</span></kbd>; if the italicized portion
+ concludes the field, omit <kbd><span class="nobr">\*[PREV]</span></kbd></li>
+ <li>if you require characters with accents, ligatures or special
+ symbols, use groff&#8217;s &#8220;named&#8221; glyphs (e.g.
+ <kbd>\['e]</kbd> for <kbd>é</kbd>); a full list can be found in
+ <kbd>man groff_char</kbd></li>
+</ul>
+
+<h3 id="fields-quick" class="docs" style="margin-top: 1.25em; margin-bottom: .5em;">Quick guide to field identifiers <span style="text-transform: none;">(click on any that are links for more information)</span></h3>
+
+<div class="examples-container" style="padding-bottom: 1em;">
+<span class="pre">
+<a class="quick" href="#A">%A</a> author &ndash; records may contain multiple authors,
+ one per line
+<a class="quick" href="#Q">%Q</a> non-human author &ndash; corporate author, e.g. National Geographic;
+ may also be used for exceptional reference types
+<a class="quick" href="#m">%m</a> multiple authors &ndash; whenever "et al." is desirable
+<a class="quick" href="#i">%i</a> idem &ndash; multiple works by the same author
+<a class="quick" href="#p">%p</a> post-author &ndash; post-author information (e.g. appendix,
+ foreword, letter)
+%T title &ndash; primary title (of a book) or the
+ title of an article (within a scholarly
+ journal or a magazine)
+%B book title &ndash; when %T contains the title of an article;
+<a class="quick" href="#q">%q</a> force quote &ndash; force a title into double-quotes
+%t reprint title &ndash; if different from a work's original title
+%b main author &ndash; when citing a preface, foreword,
+ introduction, or afterword, the author of
+ the complete original work
+<a class="quick" href="#E">%E</a> editor &ndash; records may contain multiple editors,
+ one per line
+<a class="quick" href="#l">%l</a> translator &ndash; if more than one translator, all the
+ names
+%r translator &ndash; if tr. and ed. are one in the same
+ and editor
+%M magazine or &ndash; when %T contains the title of an article
+ newspaper
+%J journal &ndash; when %T contains the title of an article
+%e edition &ndash; number or name of an edition
+ (e.g. Second, 2nd, Collector's, etc.)
+%S series &ndash; series name of books or journals
+%V volume &ndash; volume number (of books)
+%N journal number &ndash; journal or magazine number
+%R report number &ndash; technical report number
+%G gov&#8217;t. &ndash; government ordering number
+<a class="quick" href="#O">%O</a> other &ndash; information for which there is no appropriate
+ field letter
+<a class="quick" href="#C">%C</a> city &ndash; city of publication
+%I publisher &ndash; publisher
+%D date &ndash; publication date
+<a class="quick" href="#d">%d</a> original
+ publication date &ndash; if different from date of publication
+<a class="quick" href="#P">%P</a> page(s) &ndash; page number or range
+<a class="quick" href="#n">%n</a> annotation &ndash; annotation to the reference
+%s site name &ndash; for internet references, the website name
+%c content &ndash; for internet references, the source of
+ the material (e.g. Web or Email); for websites,
+ the content, if unclear
+%o organization &ndash; for internet sites, the organization, group
+ or sponsor of the site
+%a access date &ndash; for internet sites, the date of access
+%u URL &ndash; for internet sites, the full URL
+<a class="quick" href="#K">%K</a> keywords &ndash; words that help clear up ambiguities in
+ the database
+</span>
+</div>
+
+<h3 id="fields-specifics" class="docs">Field identifiers: specifics, usage and examples</h3>
+
+<h4 id="A" class="docs fields">%A &ndash; author field</h4>
+
+<p>
+For multiple authors, enter each in a separate <kbd>%A</kbd>
+field in the order in which they should appear. If the author on
+the title page is the editor (say, a book of short stories edited by
+Ray Bradbury), add <kbd>, ed.</kbd> to the end of the
+<kbd>%A</kbd> field, like this:
+<br/>
+<span class="pre-in-pp">
+ %A Ray Bradbury, ed.
+</span>
+Do not use the <kbd>%E</kbd> field in these instances. If the work
+has several such editors, enter each in a separate <kbd>%A</kbd>
+field, as for multiple authors, and add <kbd>, eds.</kbd> to the
+last one, like this:
+<br/>
+<span class="pre-in-pp">
+ %A Jane Dearborne
+ %A Bill Parsons, eds.
+</span>
+</p>
+
+<h4 id="Q" class="docs fields">%Q &ndash; exceptional entries</h4>
+
+<p>
+Sometimes, a work has no author or title information, for example a
+book review in a newspaper. In such cases, use <kbd>%Q</kbd>, like
+this:
+<br/>
+<span class="pre-in-pp">
+ %Q Rev. of \*[IT]Mean Streets Omnibus\*[PREV], ed. Raymond Hammett
+ %M Times Literary Supplement
+ %D 7 July 1972
+</span>
+</p>
+
+<h4 id="m" class="docs fields">%m &ndash; multiple authors (et al.)</h4>
+
+<p>
+Whenever it&#8217;s desirable to abbreviate a list of authors with
+&#8220;et al.&#8221; enter it in the <kbd>%m field</kbd>, like this:
+<br/>
+<span class="pre-in-pp">
+ %A Paul Lauter
+ %A Doug Scofield
+ %m et al.
+</span>
+</p>
+
+<h4 id="i" class="docs fields">%i &ndash; idem</h4>
+
+<p>
+Whenever there are several works by the same author, fill out the
+<kbd>%A</kbd> field with the author&#8217;s name and follow it with the
+<kbd>%i idem</kbd>, like this:
+<br/>
+<span class="pre-in-pp">
+ %A Jonathon Schmidt
+ %i idem
+</span>
+Per MLA style, the author&#8217;s name will be replaced by a long dash.
+</p>
+
+<p>
+If it&#8217;s necessary to state the role the author served (say,
+editor or translator), fill out the <kbd>%i</kbd> field with the
+information minus <kbd>idem</kbd>, like this:
+<br/>
+<span class="pre-in-pp">
+ %A Ray Bradbury
+ %i ed.
+ %T Timeless Stories for Today and Tomorrow
+</span>
+</p>
+
+<h4 id="p" class="docs fields">%p &ndash; post-author information</h4>
+
+<p>
+When citing from a preface, foreword, introduction, afterword,
+or appendix, MLA requires that the information come between the
+author&#8217;s name and the work&#8217;s title, like this:
+<br/>
+<span class="pre-in-pp">
+ %A Martin Packham, Jr.
+ %p appendix
+ %T Why the West was Won
+</span>
+Do not capitalize the first word in the <kbd>%p</kbd> field unless
+it is a proper noun.
+</p>
+
+<h4 id="q" class="docs fields">%q &ndash; force title into double-quotes</h4>
+
+<p>
+Occasionally, you may not be able to use <kbd>%T</kbd> for the
+title because doing so will cause it to come out in italics when
+double-quotes are called for. An example of this is when citing
+from a dissertation. Use <kbd>%q</kbd> to get around the problem,
+like this:
+<br/>
+<span class="pre-in-pp">
+ %A Carol Sakala
+ %q Maternity Care Policy in the United States
+ %O diss., Boston U, 1993
+</span>
+</p>
+
+<h4 id="E" class="docs fields">%E &ndash; editor</h4>
+
+<p>
+Use this only if the author and the editor are not one in the same,
+e.g.
+<br/>
+<span class="pre-in-pp">
+ %A Geoffrey Chaucer
+ %T The Works of Geoffrey Chaucer
+ %E F. W. Robinson
+</span>
+</p>
+
+<h4 id="l" class="docs fields">%l &ndash; translator</h4>
+
+<p>
+If there is more than one translator, enter all the names, with
+appropriate conjunctions and punctuation, like this:
+<br/>
+<span class="pre-in-pp">
+ %A Feodor Dostoevsky
+ %T Crime and Punishment
+ %l Jessie Coulson, Marjorie Benton, and George Bigian
+</span>
+</p>
+
+<h4 id="O" class="docs fields">%O &ndash; other</h4>
+
+<p>
+Occasionally, MLA requires additional information after the title
+but before the publication data (city/publisher/date), for instance,
+the number of volumes in a series, or the fact that the work cited
+is a dissertation. Here are two examples:
+<br/>
+<span class="pre-in-pp">
+ %A Arthur M. Schlesinger
+ %T History of U.S. Political Parties
+ %O 4 vols.
+ %C New York
+ %I Chelsea
+ %D 1973
+
+ %A Carol Sakala
+ %q Maternity Care Policy in the United States
+ %O diss., Boston U, 1993
+</span>
+Do not capitalize the first word of the <kbd>%O</kbd> field unless
+it is a proper noun.
+</p>
+
+<p>
+Generally, consider <kbd>%O</kbd> a catch-all for information that
+does not match the criterion of any existing field identifier.
+</p>
+
+<h4 id="C" class="docs fields">%C &ndash; city</h4>
+
+<p>
+Normally, <kbd>%C</kbd> takes the name of the city of publication,
+and that&#8217;s all. In the case of a republished book, if new material
+has been added, put such information in the <kbd>%C</kbd>
+field, like this:
+<br/>
+<span class="pre-in-pp">
+ %A Theodore Dreiser
+ %T Sister Carrie
+ %d 1900
+ %C Introd. E. L. Doctorow, New York
+</span>
+</p>
+
+<h4 id="d" class="docs fields">%d &ndash; original date of publication</h4>
+
+<p>
+Normally, all that is required in the <kbd>%d</kbd> field is the
+original date of publication. However, if supplementary original
+publication data is desired, include it in the field, like this:
+<br/>
+<span class="pre-in-pp">
+ %A Kazuo Ishiguro
+ %T The Remains of the Day
+ %d London: Faber, 1989
+ %C New York
+ %I Knopf
+ %D 1990
+</span>
+</p>
+
+<h4 id="K" class="docs fields">%K &ndash; keywords</h4>
+
+<p>
+<kbd>Refer</kbd> hates ambiguity, and complains when encountering
+it. Ambiguities result from the duplication of any word in more
+than one database record when that word is used to identify a
+reference in your input file. Use <kbd>%K</kbd> to create unique
+keywords found nowhere else in the database.
+</p>
+
+<p>
+Imagine, for example, that your database contains records for
+Ray Bradbury&#8217;s <i>The Illustrated Man</i>, another record for
+<i>The Illustrated Bradbury</i> and a third for <i>Bradbury,
+Illustrated</i>. <kbd>%K</kbd> can be used to clear up any
+ambiguities by assigning a unique word to each record, for example
+<kbd>%K ill-man</kbd> for the first, <kbd>%K ill-brad</kbd> for the
+second, and <kbd>%K brad-ill</kbd> for the third.
+</p>
+
+<h4 id="P" class="docs fields">%P &ndash; pages</h4>
+
+<p>
+When citing page numbers, which is often the case with footnotes
+and endnotes, it is not necessary to put the numbers in the database
+records. The <kbd>%P</kbd> field can be added underneath the
+keyword(s) in the <kbd>.[</kbd> / <kbd>.]</kbd> entries in your
+input file, allowing you to recycle database records. For example,
+<br/>
+<span class="pre-in-pp">
+ %A Frye
+ %T Anatomy
+ %K frye-anat
+</span>
+could be your short record for Northrop Frye&#8217;s <i>The Anatomy of
+Criticism</i>. Any time you wanted to cite a particular page or
+range of pages from that work in a footnote or endnote, you can
+put
+<br/>
+<span class="pre-in-pp">
+ .REF
+ .[
+ frye-anat
+ %P 67-8
+ .]
+ .REF
+</span>
+in your input file, and have it show up with the correct page(s).
+</p>
+
+<h4 id="n" class="docs fields">%n &ndash; annotations</h4>
+
+<p>
+Annotations come at the very end of references. Capitalize all
+words that require it, including, for bibliographic references (but not
+for footnotes/endnotes) the first.
+</p>
+
+<div class="rule-short"><hr/></div>
+
+<div class="macro-list-container">
+<h3 id="index-ref" class="macro-list">The bibliography and reference macros</h3>
+<ul class="macro-list">
+ <li><a href="#ref">REF</a> &ndash; begin/end a <kbd>refer</kbd> reference that will go in a footnote or endnote</li>
+ <li><a href="#footnote-refs">FOOTNOTE_REFS</a> &ndash; instruct mom to put REFs in footnotes</li>
+ <li><a href="#endnote-refs">ENDNOTE_REFS</a> &ndash; instruct mom to put REFs in endnotes</li>
+ <li><a href="#indent-refs">INDENT_REFS</a> &ndash; manage indenting of references, per MLA standards</li>
+ <li><a href="#hyphenate-refs">HYPHENATE_REFS</a> &ndash; enable/disable hyphenation of references</li>
+ <li><a href="#bibliography">BIBLIOGRAPHY</a> &ndash; begin a bibliography</li>
+ <li><a href="#bibliography-type">BIBLIOGRAPHY_TYPE</a> &ndash; plain, or numbered list bibliography</li>
+ <li><a href="#biblio-control">Bibliography control macros and defaults</a></li>
+</ul>
+</div>
+
+<!-- -REF- -->
+
+<div class="macro-id-overline">
+<h3 id="ref" class="macro-id">Begin/end a reference that goes in a footnote or endnote</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>REF</b>
+</div>
+
+<p>
+The macro REF tells mom that what follows is
+<kbd>refer</kbd>-specific, a keyword-identified reference to a
+<kbd>refer</kbd> database record. Depending on whether you&#8217;ve issued
+a
+<kbd><a href="#footnote-refs">.FOOTNOTE_REFS</a></kbd>
+or
+<kbd><a href="#endnote-refs">.ENDNOTE_REFS</a></kbd>
+instruction, the reference will be formatted and placed in a
+footnote, or collected for output in the endnotes. Parenthetical
+insertion of references into the text do not require
+<kbd>.REF</kbd> (see
+<a href="#parenthetical">Inserting parenthetical references into the text</a>.)
+</p>
+
+<p>
+Before you use REF, you must create a <kbd>refer</kbd> block
+containing <kbd>refer</kbd> commands (see
+<a href="#rcommands-ref">Required refer commands</a>
+in the tutorial, above).
+</p>
+
+<p>
+REF usage always looks like this:
+<br/>
+<span class="pre-in-pp">
+ .REF
+ .[
+ keyword(s)
+ .]
+ .REF
+</span>
+Notice that REF &#8220;brackets&#8221; the <kbd>refer</kbd> instructions,
+and never takes an argument.
+</p>
+
+<p>
+What REF really is is a convenience. One could, for example, put a
+reference in a footnote by doing
+<br/>
+<span class="pre-in-pp">
+ .FOOTNOTE
+ .[
+ keyword(s)
+ .]
+ .FOOTNOTE OFF
+</span>
+However, if you have a lot of references going into footnotes (or
+endnotes), it&#8217;s much shorter to type <kbd>.REF/.REF</kbd>
+than <kbd>.FOOTNOTE/.FOOTNOTE&nbsp;OFF</kbd>. It also helps you
+distinguish&mdash;visually, in your input file&mdash;between
+footnotes (or endnotes) which are references, and footnotes (or
+endnotes) which are explanatory, or expand on the text.
+</p>
+
+<div class="box-tip">
+<p class="tip-top">
+<span class="note">Note:</span>
+If you&#8217;re using REF to put references in footnotes and your
+footnotes need to be indented, you may (indeed, should) pass REF the
+same arguments used to indent footnotes. See
+<a href="docelement.html#footnote">FOOTNOTE</a>.
+</p>
+
+<p class="tip-bottom">
+<span class="additional-note">Additional note:</span>
+REF behaves identically to
+<a href="docelement.html#footnote">FOOTNOTE</a>
+or
+<a href="docelement.html#footnote">ENDNOTE</a>,
+so please read the HYPER IMPORTANT NOTE found in the document entry
+for
+<a href="docelement.html#footnote-note">FOOTNOTE</a>
+and/or
+<a href="docelement.html#endnote-note">ENDNOTE</a>
+for instructions on correct entry of text preceding and following REF.
+</p>
+</div>
+
+<!-- -FOOTNOTE_REFS- -->
+
+
+<div class="macro-id-overline">
+<h3 id="footnote-refs" class="macro-id">Instruct mom to put references in footnotes</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>FOOTNOTE_REFS</b>
+</div>
+
+<p>
+FOOTNOTE_REFS is an instruction to
+<a href="#ref">REF</a>,
+saying, &#8220;put all subsequent references bracketed by the REF
+macro into footnotes.&#8221; You invoke it by itself, with no
+argument.
+</p>
+
+<p>
+When FOOTNOTE_REFS is in effect, regular footnotes, (i.e.
+those introduced with <kbd>.FOOTNOTE</kbd> and terminated with
+<kbd>.FOOTNOTE OFF</kbd>) continue to behave normally.
+</p>
+
+<p>
+You may switch between FOOTNOTE_REFS and
+<a href="#endnote-refs">ENDNOTE_REFS</a>
+at any time.
+</p>
+
+<p>
+By default, FOOTNOTE_REFS sets the
+<a href="docelement.html#footnote-marker-style">FOOTNOTE_MARKER_STYLE</a>
+to <kbd>NUMBER</kbd> (i.e. superscript numbers). You may change
+change that if you wish by invoking FOOTNOTE_MARKER_STYLE, with the
+argument you want, after FOOTNOTE_REFS.
+</p>
+
+<p>
+If you have a lot of footnote references, and are identifying
+footnotes by line number rather than by markers in the text, you may
+want to enable
+<a href="docelement.html#footnotes-run-on">FOOTNOTES_RUN_ON</a>
+in conjunctions with FOOTNOTE_REFS.
+</p>
+
+<!-- -ENDNOTE_REFS- -->
+
+<div class="macro-id-overline">
+<h3 id="endnote-refs" class="macro-id">Instruct mom to put references in endnotes</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>ENDNOTE_REFS</b>
+</div>
+
+<p>
+ENDNOTE_REFS is an instruction to
+<a href="#ref">REF</a>,
+saying, &#8220;add all subsequent references bracketed by the REF
+macro to endnotes.&#8221; You invoke it by itself, with no argument.
+</p>
+
+<p>
+When ENDNOTE_REFS is in effect, mom continues to format regular
+endnotes, (i.e. those introduced with <kbd>.ENDNOTE</kbd> and
+terminated with <kbd>.ENDNOTE&nbsp;OFF</kbd>) in the normal way.
+</p>
+
+<p>
+You may switch between ENDNOTE_REFS and
+<a href="#footnote-refs">FOOTNOTE_REFS</a>
+at any time.
+</p>
+
+<!-- -INDENT_REFS- -->
+
+<div class="macro-id-overline">
+<h3 id="indent-refs" class="macro-id">Manage indenting of references, per MLA standards</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>INDENT_REFS</b> <kbd class="macro-args">FOOTNOTE | ENDNOTE | BIBLIO &lt;indent&gt; </kbd>
+</div>
+
+<p class="requires">
+&bull;&nbsp;<kbd style="font-style: normal;">&lt;indent&gt;</kbd> requires a <a href="definitions.html#unitofmeasure">unit of measure</a>
+</p>
+
+<p>
+MLA-style requires that footnote or endnote references should
+have their first lines indented, whereas bibliographic references
+should have their second and subsequent lines indented. Thus, if
+you invoke INDENT_REFS with a first argument of <kbd>FOOTNOTE</kbd>
+or <kbd>ENDNOTE</kbd>, the value you give to
+<kbd>&lt;indent&gt;</kbd> sets the indent of the first line for
+those types of references; if you invoke it with <kbd>BIBLIO</kbd>,
+the value you give <kbd>&lt;indent&gt;</kbd> sets the indent of
+second and subsequent lines in bibliographies.
+</p>
+
+<p>
+By default, the indent for all three types of references is 1/2-inch
+for
+<a href="docprocessing.html#printstyle">PRINTSTYLE <kbd>TYPEWRITE</kbd></a>
+and 2
+<a href="definitions.html#em">ems</a>
+for
+<a href="docprocessing.html#printstyle">PRINTSTYLE <kbd>TYPESET</kbd></a>.
+</p>
+
+<p>
+If you&#8217;d like to change the indent for footnote, endnote or
+bibliography references, just invoke <kbd>.INDENT_REFS</kbd> with
+a first argument saying which one you want the indent changed for, and
+a second argument saying what you&#8217;d like the indent to be.
+For example, if you want the second-line indent of references on a
+bibliography page to be 3
+<a href="definitions.html#picas-points">picas</a>,
+<br/>
+<span class="pre-in-pp">
+ .INDENT_REFS BIBLIO 3P
+</span>
+is how you&#8217;d set it up.
+</p>
+
+<div class="box-tip">
+<p class="tip-top">
+<span class="tip">Tip:</span>
+If you are identifying endnotes by line number
+(<a href="docelement.html#endnote-marker-style">ENDNOTE_MARKER_STYLE&nbsp;<kbd>LINE</kbd></a>)
+and have instructed mom to put references bracketed by
+<kbd><a href="#ref">.REF</a></kbd>
+into endnotes (with
+<a href="#endnote-refs">ENDNOTE_REFS</a>),
+you will almost certainly want to adjust the second-line indent for
+references in endnotes, owing to the way mom formats line-numbered
+endnotes. Study the output of such documents to see whether an
+indent adjustment is required.
+</p>
+
+<p>
+The same advice applies to references in endnotes when you have enabled
+<br/>
+<span class="pre-in-pp">
+ <a href="docelement.html#endnote-numbers-align-left">.ENDNOTE_NUMBERS_ALIGN_LEFT</a>
+</span>
+in favour of mom&#8217;s default, which is to align them right.
+Study the output to determine what size of second-line indent works
+best.
+</p>
+
+<p class="tip-bottom">
+<i>(Frankly, endnote references formatted in MLA-style combined with
+left-aligned endnote numbers is a no-win situation, and so is best
+avoided. Wherever you set the indent, you&#8217;ll end up with the
+endnote numbers appearing to hang into the left margin, so you might
+as well have them hang, as is the case with
+<kbd style="font-style: normal;">.ENDNOTE_NUMBERS_ALIGN_RIGHT</kbd>.</i>&nbsp;&nbsp;&ndash;&nbsp;Ed.)
+</p>
+</div>
+
+<!-- -HYPHENATE_REFS- -->
+
+<div class="macro-id-overline">
+<h3 id="hyphenate-refs" class="macro-id">Enable/disable hyphenation of references</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>HYPHENATE_REFS</b> <kbd class="macro-args">&lt;toggle&gt;</kbd>
+</div>
+
+<p>
+If you have hyphenation turned on for a document (see
+<a href="typesetting.html#hy">HY</a>),
+and in most cases you probably do, mom will hyphenate references
+bracketed by the
+<a href="#ref">REF</a>
+macro. Since references typically contain quite a lot of proper
+names, which shouldn&#8217;t be hyphenated, you may want to disable
+hyphenation for references.
+</p>
+
+<p>
+HYPHENATE_REFS is a toggle macro; invoking it by itself will turn
+automatic hyphenation of REF-bracketed references on (the default).
+Invoking it with any other argument (<kbd>OFF</kbd>, <kbd>NO</kbd>,
+<kbd>X</kbd>, etc.) will disable automatic hyphenation for
+references bracketed by REF.
+</p>
+
+<p>
+An alternative to turning reference hyphenation off is to prepend
+to selected proper names in your <kbd>refer</kbd> database
+the groff
+<a href="definitions.html#discretionaryhyphen">discretionary hyphen</a>
+character, <kbd>\%</kbd>. (See
+<a href="#ref-disc-hy">here</a>
+in the tutorial for an example.)
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span>
+References embedded in the body of a document are considered part of
+<a href="definitions.html#running">running text</a>,
+and are hyphenated (or not) according to whether hyphenation is
+turned on or off for running text. Therefore, if you want to
+disable hyphenation for such references, you must do so temporarily,
+with
+<a href="typesetting.html#hy">HY</a>,
+like this:
+<br/>
+<span class="pre-in-pp">
+ .HY OFF
+ .[
+ keyword(s)
+ .]
+ .HY
+</span>
+Alternatively, sprinkle your database fields liberally with
+<kbd>\%</kbd>.
+</p>
+</div>
+
+<!-- -BIBLIOGRAPHY- -->
+
+<div class="macro-id-overline">
+<h3 id="bibliography" class="macro-id">Begin a bibliography</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>BIBLIOGRAPHY</b> <kbd class="marco-args">toggle</kbd>
+</div>
+
+<p>
+To append a bibliography to your document, whether of references
+inserted parenthetically into text or a comprehensive reading list
+derived from a large <kbd>refer</kbd> database, all you need
+do is invoke <kbd>.BIBLIOGRAPHY</kbd>. <kbd>.BIBLIOGRAPHY</kbd>
+breaks to a new page, prints the title (BIBLIOGRAPHY by default, but
+that can be changed), and awaits <kbd>refer</kbd> instructions. How
+to create bibliographies is covered in the tutorial section,
+<a href="#bibliography-from-embedded">Generating a bibliography from parenthetical insertions</a>
+and
+<a href="#bibliography-recipe">Generating a comprehensive bibliography</a>.
+When all the required data has been entered, type
+<br/>
+<span class="pre-in-pp">
+ .BIBLIOGRAPHY OFF
+</span>
+to complete the bibliography.
+</p>
+
+<p>
+See the
+<a href="#biblio-control">Bibliography control macros and defaults</a>
+for macros to tweak, design and control the appearance of
+bibliography pages.
+</p>
+
+<!-- -BIBLIOGRAPHY_TYPE- -->
+
+<div class="macro-id-overline">
+<h3 id="bibliography-type" class="macro-id">Plain, or numbered list bibliography</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>BIBLIOGRAPHY_TYPE</b> <kbd class="macro-args">PLAIN | LIST [ &lt;list separator&gt; ] [ &lt;list prefix&gt; ]</kbd>
+</div>
+
+<p>
+Mom offers two styles of bibliography output: plain, or numbered
+list style. With the argument, <kbd>PLAIN</kbd>, bibliography entries are output
+with no enumerators. With the argument, <kbd>LIST</kbd>, each entry is numbered.
+</p>
+
+<p>
+The two optional arguments, <kbd>&lt;list&nbsp;separator&gt;</kbd>
+and <kbd>&lt;list&nbsp;prefix&gt;</kbd> have the same meaning as the
+equivalent arguments to
+<a href="docelement.html#list">LIST</a>
+(i.e. <kbd>&lt;separator&gt;</kbd> and <kbd>&lt;prefix&gt;</kbd>).
+</p>
+
+<p>
+You may enter the BIBLIOGRAPHY_TYPE either before or after
+<kbd>.BIBLIOGRAPHY</kbd>. It must, however, always come before
+any <kbd>refer</kbd> commands. See
+<a href="#bibliography-from-embedded">Generating a bibliography from parenthetical insertions</a>
+and
+<a href="#bibliography-recipe">Generating a comprehensive bibliography</a>.
+</p>
+
+<p>
+Mom&#8217;s default BIBLIOGRAPHY_TYPE is <kbd>PLAIN</kbd>.
+</p>
+
+<!-- -BIBLIO_CONTROL- -->
+
+<div class="defaults-container" style="background-color: #ded4bd; border: none;">
+<h3 id="biblio-control" class="docs defaults">Bibliography control macros and defaults</h3>
+
+<p style="margin-top: .25em; margin-left: 9px;">
+Mom processes bibliography pages in a manner very similar to the
+way she processes endnotes pages. The bibliography page control
+macros, therefore, behave in the same way as their endnotes pages
+equivalents.
+</p>
+
+<ol style="margin-top: -.5em; padding-bottom: .5em;">
+ <li><a href="#biblio-general"><b>General bibliography style control</b></a>
+ <ul style="margin-left: -.5em;">
+ <li><a href="#biblio-style">Base family/font/quad</a></li>
+ <li><a href="#biblio-pt-size">Base point size</a></li>
+ <li><a href="#biblio-lead">Leading</a></li>
+ <li><a href="#biblio-spacing">Adjust the space between bibliography entries</a></li>
+ <li><a href="#singlespace-biblio">Singlespace bibliographies (for TYPEWRITE only)</a></li>
+ <li><a href="#biblio-no-columns">Turning off column mode during bibliography output</a></li>
+ </ul></li>
+ <li><a href="#biblio-pagination"><b>Pagination of bibliographies</b></a>
+ <ul style="margin-left: -.5em;">
+ <li><a href="#biblio-pagenum-style">Page numbering style</a></li>
+ <li><a href="#biblio-first-pagenumber">Setting the first page number of bibliographies</a></li>
+ <li><a href="#biblio-no-first-pagenum">Omitting a page number on the first page of bibliographies</a></li>
+ <li><a href="#suspend-pagination">Suspending pagination during bibliography output</a></li>
+ </ul></li>
+ <li><a href="#biblio-header-control"><b>Header/footer control</b></a>
+ <ul style="margin-left: -.5em;">
+ <li><a href="#biblio-modify-hdrftr">Modifying what goes in bibliography headers/footers</a></li>
+ <li><a href="#biblio-hdrftr-center">Header/footer centre string when doctype is CHAPTER</a></li>
+ <li><a href="#biblio-allows-headers">Allow headers on bibliography pages</a></li>
+ </ul></li>
+ <li><a href="#biblio-main-title"><b>Bibliography first-page title control</b></a>
+ <ul>
+ <li><a href="#biblio-string">Title string</a></li>
+ <li><a href="#biblio-string-control">Title string control macros and defaults</a></li>
+ <li><a href="#biblio-string-placement">Title string placement</a></li>
+ <li><a href="#biblio-string-underline">Title string underscoring</a></li>
+ <li><a href="#biblio-string-caps">Title string capitalization</a></li>
+ </ul></li>
+</ol>
+</div>
+
+<h4 id="biblio-general" class="docs" style="margin-top: -1.5em; margin-bottom: .5em;">1. General bibliography page style control</h4>
+
+<h5 id="biblio-style" class="docs" style="margin-top: 0; margin-bottom: .5em; margin-left: .5em;">&bull;&nbsp;Base family/font/quad</h5>
+
+<div class="defaults-container" style="padding-bottom: 8px;">
+<p class="defaults" style="padding-top: 6px;">
+See
+<a href="#control-macro-args">Arguments to the control macros</a>.
+</p>
+<span class="pre defaults">
+.BIBLIOGRAPHY_FAMILY default = prevailing document family; default is Times Roman
+.BIBLIOGRAPHY_FONT default = roman
+.BIBLIOGRAPHY_QUAD* default = justified
+
+*Note: BIBLIOGRAPHY_QUAD must be set to either L (LEFT) or J (JUSTIFIED);
+ R (RIGHT) and C (CENTER) will not work.
+</span>
+</div>
+
+<!-- -BIBLIO_PT_SIZE- -->
+
+<h5 id="biblio-pt-size" class="docs" style="margin-top: -1.5em; margin-bottom: .5em; margin-left: .5em;">&bull;&nbsp;Base point size</h5>
+
+<div class="box-macro-args">
+Macro: <b>BIBLIOGRAPHY_PT_SIZE</b> <kbd class="macro-args">&lt;base type size of bibliography&gt;</kbd>
+</div>
+
+<p>
+Unlike most other control macros that deal with size of document
+elements, BIBLIOGRAPHY_PT_SIZE takes as its argument an absolute
+value, relative to nothing. Therefore, the argument represents the
+size of bibliography type in
+<a href="definitions.html#picaspoints">points</a>,
+unless you append an alternative
+<a href="definitions.html#unitofmeasure">unit of measure</a>.
+For example,
+<br/>
+<span class="pre-in-pp">
+ .BIBLIOGRAPHY_PT_SIZE 12
+</span>
+sets the base point size of type on the bibliography page to 12
+points, whereas
+<br/>
+<span class="pre-in-pp">
+ .BIBLIOGRAPHY_PT_SIZE .6i
+</span>
+sets the base point size of type on the bibliography page to 1/6 of an
+inch.
+</p>
+
+<p>
+The type size set with BIBLIOGRAPHY_PT_SIZE is the size of type used
+for the text of the bibliographies, and forms the basis from which
+the point size of other bibliography page elements is calculated.
+</p>
+
+<p>
+The default for
+<a href="docprocessing.html#printstyle">PRINTSTYLE <kbd>TYPESET</kbd></a>
+is 12.5 points (the same default size used in the body of the
+document).
+</p>
+
+<!-- -BIBLIO_LEAD- -->
+
+<h5 id="biblio-lead" class="docs" style="margin-top: -.5em; margin-bottom: .5em; margin-left: .5em;">&bull;&nbsp;Leading</h5>
+
+<div class="box-macro-args">
+Macro: <b>BIBLIOGRAPHY_LEAD</b> <kbd class="macro-args">&lt;base leading of bibliographies&gt; [ ADJUST ]</kbd>
+</div>
+
+<p class="requires">
+&bull;&nbsp;Does not require a <a href="definitions.html#unitofmeasure">unit of measure</a>; points is assumed
+</p>
+
+<p>
+Unlike most other control macros that deal with leading of document
+elements, BIBLIOGRAPHY_LEAD takes as its argument an absolute value,
+relative to nothing. Therefore, the argument represents the
+<a href="definitions.html#leading">leading</a>
+of bibliographies in
+<a href="definitions.html#picaspoints">points</a>
+unless you append an alternative
+<a href="definitions.html#unitofmeasure">unit of measure</a>.
+For example,
+<br/>
+<span class="pre-in-pp">
+ .BIBLIOGRAPHY_LEAD 14
+</span>
+sets the base leading of type on the bibliography page to 14
+points, whereas
+<br/>
+<span class="pre-in-pp">
+ .BIBLIOGRAPHY_LEAD .5i
+</span>
+sets the base leading of type on the bibliography page to 1/2 inch.
+</p>
+
+<p>
+If you want the leading of bibliographies adjusted to fill the page,
+pass BIBLIOGRAPHY_LEAD the optional argument,
+<kbd>ADJUST</kbd>. (See
+<a href="docprocessing.html#doc-lead-adjust">DOC_LEAD_ADJUST</a>
+for an explanation of leading adjustment.)
+</p>
+
+<p>
+The default for
+<a href="docprocessing.html#printstyle">PRINTSTYLE <kbd>TYPESET</kbd></a>
+is the prevailing document lead (16 by default), adjusted.
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span>
+Even if you give mom a <kbd>.DOC_LEAD_ADJUST&nbsp;OFF</kbd> command,
+she will still, by default, adjust bibliography leading. You
+<i>must</i> enter <kbd>BIBLIOGRAPHY_LEAD&nbsp;&lt;lead&gt;</kbd>
+with no <kbd>ADJUST</kbd> argument to disable this default
+behaviour.
+</p>
+</div>
+
+<!-- -BIBLIO_SPACING- -->
+
+<h5 id="biblio-spacing" class="docs" style="margin-top: -.5em; margin-bottom: .5em; margin-left: .5em;">&bull;&nbsp;Adjust the space between bibliography entries</h5>
+
+<div class="box-macro-args">
+Macro: <b>BIBLIOGRAPHY_SPACING</b> <kbd class="macro-args">&lt;amount of space&gt; </kbd>
+</div>
+
+<p class="requires">
+&bull;&nbsp;Requires a <a href="definitions.html#unitofmeasure">unit of measure</a>
+</p>
+
+<p>
+By default, mom inserts no space between bibliography entries.
+If you&#8217;d prefer she add some, instruct her to do so with
+BIBLIOGRAPHY_SPACING. Say, for example, you want a half a linespace
+between entries,
+<br/>
+<span class="pre-in-pp">
+ .BIBLIOGRAPHY_SPACING .5v
+</span>
+would do the trick.
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span>
+As with endnotes pages, inserting space between bibliography entries
+will most likely result in hanging bottom margins.
+</p>
+</div>
+
+<!-- -SINGLESPACE_BIBLIO- -->
+
+<h5 id="singlespace-biblio" class="docs" style="margin-top: -.5em; margin-bottom: .5em; margin-left: .5em;">&bull;&nbsp;Singlespace bibliography (TYPEWRITE only)</h5>
+
+<div class="box-macro-args">
+Macro: <b>SINGLESPACE_BIBLIOGRAPHY</b> <kbd class="macro-args">&lt;toggle&gt;</kbd>
+</div>
+
+<p>
+If your
+<a href="docprocessing.html#printstyle">PRINTSTYLE</a>
+is <kbd>TYPEWRITE</kbd> and you use TYPEWRITE&#8217;s default
+double-spacing, bibliographies are double-spaced. If your document
+is single-spaced, bibliographies are single-spaced.
+</p>
+
+<p>
+If, for some reason, you&#8217;d prefer that bibliographies be
+single-spaced in an otherwise double-spaced document (including
+double-spaced
+<a href="rectoverso.html#collate">collated</a>
+documents), invoke <kbd>.SINGLESPACE_BIBLIOGRAPHY</kbd> with no
+argument.
+</p>
+
+<!-- -BIBLIO_NO_COLUMNS- -->
+
+<h5 id="biblio-no-columns" class="docs" style="margin-top: -.5em; margin-bottom: .5em; margin-left: .5em;">&bull;&nbsp;Turning off column mode during bibliography output</h5>
+
+<div class="box-macro-args">
+Macro: <b>BIBLIOGRAPHY_NO_COLUMNS</b> <kbd class="macro-args">&lt;toggle&gt;</kbd>
+</div>
+
+<p>
+By default, if your document is set in
+<a href="docprocessing.html#columns">columns</a>,
+mom sets the bibliographies in columns, too. However, if your
+document is set in columns and you&#8217;d like the bibliographies
+not to be, just invoke <kbd>.BIBLIOGRAPHY_NO_COLUMNS</kbd> with
+no argument. The bibliography pages will be set to the full page
+measure of your document.
+</p>
+
+<p>
+If you output bibliographies at the end of each document in a
+<a href="rectoverso.html#collate">collated</a>
+document set in columns, column mode will automatically be
+reinstated for each document, even with BIBLIOGRAPHY_NO_COLUMNS
+turned on. In such circumstances, you must re-enable
+BIBLIOGRAPHY_NO_COLUMNS for each separate collated document.
+</p>
+
+<h4 id="biblio-pagination" class="docs" style="margin-bottom: .5em;">2. Pagination of bibliographies</h4>
+
+<!-- -BIBLIO_PAGENUM_STYLE- -->
+
+<h5 id="biblio-pagenum-style" class="docs" style="margin-top: 0; margin-bottom: .5em; margin-left: .5em;">&bull;&nbsp;Page numbering style</h5>
+
+<div class="box-macro-args">
+Macro: <b>BIBLIOGRAPHY_PAGENUM_STYLE</b> <kbd class="macro-args">DIGIT | ROMAN | roman | ALPHA | alpha</kbd>
+</div>
+
+<p>
+Use this macro to set the page numbering style of bibliography
+pages. The arguments are identical to those for
+<a href="headfootpage.html#pagenum-style">PAGENUM_STYLE</a>.
+The default is <kbd>digit</kbd>. You may want to change it to, say,
+<kbd>alpha</kbd>, which you would do with
+<br/>
+<span class="pre-in-pp">
+ .BIBLIOGRAPHY_PAGENUM_STYLE alpha
+</span>
+</p>
+
+<!-- -BIBLIO_FIRST_PAGENUMBER- -->
+
+<h5 id="biblio-first-pagenumber" class="docs" style="margin-top: -.5em; margin-bottom: .5em; margin-left: .5em;">&bull;&nbsp;Setting the first page number of bibliographies</h5>
+
+<div class="box-macro-args">
+Macro: <b>BIBILOGRAPHY_FIRST_PAGENUMBER</b> <kbd class="macro-args">&lt;page # that appears on page 1 of bibliographies&gt;</kbd>
+</div>
+
+<p>
+Use this macro with caution. If the bibliography for a
+<a href="rectoverso.html#collate">collated</a>
+document is to be output at the document&#8217;s end,
+BIBLIOGRAPHY_FIRST_PAGENUMBER tells mom what page number to put on
+the first page of the bibliography.
+</p>
+
+<p>
+However, if you&#8217;re outputting a bibliography at the end of each
+section (chapter, article, etc) of a collated document,
+you have to reset every section&#8217;s first page number after
+<a href="rectoverso.html#collate">COLLATE</a>
+and before
+<a href="docprocessing.html#start">START</a>.
+</p>
+
+<!-- -BIBLIO_NO_FIRST_PAGENUN- -->
+
+<h5 id="biblio-no-first-pagenum" class="docs" style="margin-top: -.25em; margin-bottom: .5em; margin-left: .5em;">&bull;&nbsp;Omitting a page number on the first page of bibliographies</h5>
+
+<div class="box-macro-args">
+Macro: <b>BIBLIOGRAPHY_NO_FIRST_PAGENUM</b> <kbd class="macro-args">&lt;toggle&gt;</kbd>
+</div>
+
+<p>
+This macro is for use only if
+<a href="headfootpage.html#footers">FOOTERS</a>
+are on. It tells
+<kbd><a href="#bibliography">BIBLIOGRAPHY</a></kbd>
+not to print a page number on the first bibliography page.
+Mom&#8217;s default is to print the page number.
+</p>
+
+<!-- -SUSPEND_PAGINATION- -->
+
+<h5 id="suspend-pagination" class="docs" style="margin-top: -.5em; margin-bottom: .5em; margin-left: .5em;">&bull;&nbsp;Suspending pagination during bibliography output</h5>
+
+<div class="box-macro-args" style="margin-bottom: 1em;">
+Macro: <b>SUSPEND_PAGINATION</b>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>RESTORE_PAGINATION</b>
+</div>
+
+<p>
+SUSPEND_PAGINATION doesn&#8217;t take an argument. Invoked
+immediately prior to
+<kbd><a href="#bibliography">BIBLIOGRAPHY</a></kbd>,
+it turns off pagination for the duration of the bibliography. Mom
+continues, however to increment page numbers silently.
+</p>
+
+<p>
+To restore normal document pagination after bibliographies, invoke
+<kbd>.RESTORE_PAGINATION</kbd> (again, with no argument) immediately
+after you&#8217;ve finished with your bibliography.
+</p>
+
+<h4 id="biblio-header-control" class="docs" style="margin-bottom: .5em;">3. Header/footer control</h4>
+
+<h5 id="biblio-modify-hdrftr" class="docs" style="margin-top: 0; margin-bottom: .5em; margin-left: .5em;">&bull;&nbsp;Modifying what goes in the bibliography header/footer</h5>
+
+<p style="margin-top: 0">
+If you wish to modify what appears in the header/footer that appears
+on bibliography pages, make the changes before you invoke
+<a href="#bibliography"><kbd>.BIBLIOGRAPHY</kbd></a>,
+not afterwards.
+</p>
+
+<p>
+Except in the case of
+<a href="docprocessing.html#doctype">DOCTYPE <kbd>CHAPTER</kbd></a>,
+mom prints the same header or footer used throughout the document
+on bibliography pages. Chapters get treated differently in that,
+by default, mom does not print the header/footer centre string
+(normally the chapter number or chapter title.) In most cases, this
+is what you want. However, should you not want mom to remove the
+centre string from the bibliography pages&#8217; headers/footers, or
+you would like her to add one in cases where there hasn&#8217;t been
+one before (e.g. DOCTYPE DEFAULT) invoke
+<kbd><a href="#bibliography-hdrftr-center">.BIBLIOGRAPHY_HEADER_CENTER</a></kbd>
+with no argument.
+</p>
+
+<p>
+An important change you may want to make is to put the word
+&#8220;Bibliography&#8221; in the header/footer centre position. To
+do so, invoke
+<br/>
+<span class="pre-in-pp" style="margin-bottom: -1em;">
+ .BIBLIOGRAPHY_HEADER_CENTER
+ .HEADER_CENTER "Bibliography"
+</span>
+or
+<span class="pre-in-pp" style="margin-top: -.5em;">
+ .BIBLIOGRAPHY_FOOTER_CENTER
+ .FOOTER_CENTER "Bibliography"
+</span>
+prior to invoking <kbd>.BIBLIOGRAPHY</kbd>.
+</p>
+
+<div class="box-important">
+<p class="tip">
+<span class="important">Important:</span>
+Unless you have a running centre string in your headers or footers, you must invoke
+<span class="pre-in-pp" style="margin-top: -.5em;">
+ <a href="#endnotes-hdrftr-center">.BIBLIOGRAPHY_HEADER_CENTER</a>
+</span>
+or
+<span class="pre-in-pp" style="margin-top: -.5em;">
+ <a href="#endnotes-hdrftr-center">.BIBLIOGRAPHY_FOOTER_CENTER</a>
+</span>
+in order for the centre string to appear, as demonstrated above.
+</p>
+</div>
+
+<h5 id="biblio-hdrftr-center" class="docs" style="margin-top: 0; margin-bottom: .5em; margin-left: .5em;">&bull;&nbsp;Header/footer centre string when doctype is CHAPTER</h5>
+
+<div class="box-macro-args">
+Macro: <b>BIBLIOGRAPHY_HEADER_CENTER</b> <kbd class="macro-args">toggle</kbd>
+</div>
+
+<p>
+If your
+<a href="docprocessing.html#doctype">DOCTYPE</a>
+is <kbd>CHAPTER</kbd> and you want mom to include a centre
+string in the headers/footers that appear on bibliography
+pages, or if you do not have a running header/footer
+centre string in the body of the document, invoke
+<kbd>.BIBLIOGRAPHY_HEADER_CENTER</kbd> (or
+<kbd>.BIBLIOGRAPHY_FOOTER_CENTER</kbd>) with no argument before
+defining the centre string . Mom&#8217;s default is NOT to print the
+centre string.
+</p>
+
+<p>
+If, for some reason, having enabled the header/footer centre string
+on bibliography pages, you wish to disable it, invoke the same macro
+with any argument (<kbd>OFF</kbd>, <kbd>QUIT</kbd>, <kbd>Q</kbd>,
+<kbd>X</kbd>...).
+</p>
+
+<h5 id="biblio-allows-headers" class="docs" style="margin-top: -.5em; margin-bottom: .5em; margin-left: .5em;">&bull;&nbsp;Allow headers on bibliography pages</h5>
+
+<div class="box-macro-args">
+Macro: <b>BIBLIOGRAPHY_ALLOWS_HEADERS</b> <kbd class="macro-args">&lt;none&gt; | ALL</kbd>
+</div>
+
+<p>
+By default, if HEADERS are on, mom prints page headers on all
+bibliography pages except the first. If you don&#8217;t want her to
+print headers on bibliography pages, do
+<br/>
+<span class="pre-in-pp">
+ .BIBLIOGRAPHY_ALLOWS_HEADERS OFF
+</span>
+If you want headers on every page including the first, do
+<br/>
+<span class="pre-in-pp">
+ .BIBLIOGRAPHY_ALLOWS_HEADERS ALL
+</span>
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span>
+If FOOTERS are on, mom prints footers on every bibliography page.
+This is a style convention. In mom, there is no such beast as
+BIBLIOGRAPHY_ALLOWS_FOOTERS&nbsp;OFF.
+</p>
+</div>
+
+<h4 id="biblio-main-title" class="docs">4. Bibliography first-page title control</h4>
+
+<!-- -BIBLIO_STRING- -->
+
+<h5 id="biblio-string" class="docs" style="margin-top: 1em; margin-bottom: .5em; margin-left: .5em;">&bull;&nbsp;Title string</h5>
+
+<div class="box-macro-args">
+Macro: <b>BIBLIOGRAPHY_STRING</b> <kbd class="macro-args">&quot;&lt;title to print at the top of bibliography pages&gt;&quot;</kbd>
+</div>
+<p class="alias" style="margin-bottom: 0;">
+<i>Alias:</i> <b>BIBLIOGRAPHY_HEADER</b>
+</p>
+
+<p>
+By default, mom prints the word &#8220;BIBLIOGRAPHY&#8221; as a title
+at the top of the first page of a bibliography. If you want her to
+print something else, invoke <kbd>.BIBLIOGRAPHY_STRING</kbd> with
+the title you want, surrounded by double-quotes.
+</p>
+
+<p>
+If you don&#8217;t want a title at the top of the first bibliography
+page, invoke <kbd>.BIBLIOGRAPHY_STRING</kbd> with a blank argument
+(either two double-quotes side by
+side&mdash;<kbd>&quot;&quot;</kbd>&mdash;or no argument at all).
+</p>
+
+<!-- -BIBLIO_STRING_CONTROL- -->
+
+<h5 id="biblio-string-control" class="docs" style="margin-top: -.5em; margin-bottom: .5em; margin-left: .5em;">&bull;&nbsp;Title string control macros and defaults</h5>
+
+<div class="defaults-container" style="padding-bottom: 8px;">
+<p class="defaults" style="padding-top: 6px;">
+See
+<a href="#control-macro-args">Arguments to the control macros</a>.
+</p>
+<span class="pre defaults">
+.BIBLIOGRAPHY_STRING_FAMILY default = prevailing document family; default is Times Roman
+.BIBLIOGRAPHY_STRING_FONT default = bold
+.BIBLIOGRAPHY_STRING_SIZE* default = +1
+.BIBLIOGRAPHY_STRING_QUAD default = centred
+
+*Relative to the size of the bibliography text (set with BIBLIOGRAPHY_PT_SIZE)
+</span>
+</div>
+
+<!-- -BIBLIOGRAPHY_STRING_ADVANCE- -->
+
+<h5 id="biblio-string-placement" class="docs" style="margin-top: -1em; margin-bottom: .5em; margin-left: .5em;">&bull;&nbsp;Title string placement</h5>
+
+<div class="box-macro-args">
+Macro: <b>BIBLIOGRAPHY_STRING_ADVANCE</b> <kbd class="macro-args">&lt;distance from top of page&gt;</kbd>
+</div>
+
+<p class="requires">
+&bull;&nbsp;Argument requires a <a href="definitions.html#unitofmeasure">unit of measure</a>
+</p>
+
+<p>
+By default, mom places the title (the docheader, as it were) of
+bibliographies (typically "BIBLIOGRAPHY") on the same
+<a href="definitions.html#baseline">baseline</a>
+that is used for the start of
+<a href="definitions.html#running">running text</a>.
+If you&#8217;d prefer another location, higher or lower on the page
+(thereby also raising or lowering the starting position of the
+bibliography itself), invoke <kbd>.BIBLIOGRAPHY_STRING_ADVANCE</kbd>
+with an argument stating the distance from the top edge of the page
+at which you&#8217;d like the title placed.
+</p>
+
+<p>
+The argument requires a unit of measure, so if you&#8217;d like the title
+to appear 1-1/2 inches from the top edge of the page, you&#8217;d tell
+mom about it like this:
+<br/>
+<span class="pre-in-pp">
+ .BIBLIOGRAPHY_STRING_ADVANCE 1.5i
+</span>
+</p>
+
+<!-- -BIBLIO_STRING_UNDERLINE- -->
+
+<h5 id="biblio-string-underline" class="docs" style="margin-top: -1em; margin-bottom: .5em; margin-left: .5em;">&bull;&nbsp;Title string underscoring</h5>
+
+<div class="box-macro-args">
+Macro: <b>BIBLIOGRAPHY_STRING_UNDERSCORE</b> <kbd class="macro-args">[DOUBLE] [&lt;underline weight&gt; [&lt;underline gap&gt; [&lt;distance between double rules]]] | &lt;none&gt; | &lt;anything&gt;</kbd>
+</div>
+
+<p class="alias" style="margin-bottom: 0;">
+<i>Alias:</i> <b>BIBLIOGRAPHY_STRING_UNDERLINE</b>
+</p>
+
+<p class="requires">
+&bull;&nbsp;The argument
+<span style="font-style: normal"><kbd>&lt;underscore weight&gt;</kbd></span>
+must not have the
+<a href="definitions.html#unitofmeasure">unit of measure</a>,
+<span style="font-style: normal;"><kbd>p</kbd></span>, appended to it
+</p>
+
+<p>
+Invoked without an argument,
+<kbd>.BIBLIOGRAPHY_STRING_UNDERSCORE</kbd> will place a single rule
+underneath the bibliography&#8217;s first-page title. Invoked with the
+argument, <kbd>DOUBLE</kbd>, BIBLIOGRAPHY_STRING_UNDERSCORE will
+double-underscore the title. Invoked with any other non-numeric
+argument, (e.g. <kbd>OFF</kbd>, <kbd>NO</kbd>, <kbd>X</kbd>, etc.)
+the macro disables underlining of the title.
+</p>
+
+<p>
+In addition, you can use BIBLIOGRAPHY_STRING_UNDERSCORE to control
+the weight of the underscore rule(s), the gap between the title and
+the underscore, and, in the case of double-underscores, the distance
+between the two rules.
+</p>
+
+<p>
+Some examples:
+<br/>
+<span class="pre-in-pp">
+ .BIBLIOGRAPHY_STRING_UNDERLINE 1
+ - turn underlining on; set the rule weight to 1 point
+
+ .BIBLIOGRAPHY_STRING_UNDERLINE 1 3p
+ - turn underlining on; set the rule weight to 1 point; set
+ the gap between the string and the underline to 3 points
+
+ .BIBLIOGRAPHY_STRING_UNDERLINE DOUBLE .75 3p
+ - turn double-underlining on; set the rule weight to 3/4 of
+ a point; set the gap between the string and the upper
+ underline to 3 points; leave the gap between the upper
+ and the lower underline at the default
+
+ .BIBLIOGRAPHY_STRING_UNDERLINE DOUBLE 1.5 1.5p 1.5p
+ - turn double-underlining on; set the rule weight to 1-1/2
+ points; set the gap between the string and the upper
+ underline to 1-1/2 points; set the gap between the upper
+ and the lower underline to 1-1/2 points
+</span>
+Note, from the above, that in all instances, underscoring (single or
+double) is enabled whenever BIBLIOGRAPHY_STRING_UNDERSCORE is used
+in this way.
+</p>
+
+<p>
+By default, mom double-underscores the title if your
+<a href="docprocessing.html#printstyle">PRINTSTYLE</a>
+is <kbd>TYPEWRITE</kbd>.
+</p>
+
+<!-- -BIBLIO_STRING_CAPS- -->
+
+<h5 id="biblio-string-caps" class="docs" style="margin-top: -.5em; margin-bottom: .5em; margin-left: .5em;">&bull;&nbsp;Title string capitalization</h5>
+
+<div class="box-macro-args">
+Macro: <b>BIBLIOGRAPHY_STRING_CAPS</b> <kbd class="macro-args">toggle</kbd>
+</div>
+
+<p>
+Invoked by itself, <kbd>.BIBLIOGRAPHY_STRING_CAPS</kbd> will
+automatically capitalize the bibliography first-page title. Invoked
+with any other argument, the macro disables automatic capitalization
+of the title.
+</p>
+
+<p>
+If you&#8217;re generating a table of contents, you may want the
+bibliography first-page title to be in caps, but the toc entry in
+caps/lower case. If the argument to
+<kbd><a href="#bibliography-string">BIBLIOGRAPHY_STRING</a></kbd>
+is in caps/lower case and BIBLIOGRAPHY_STRING_CAPS is
+on, this is exactly what will happen.
+</p>
+
+<p>
+Mom&#8217;s default is to capitalize the bibliography first-page
+title.
+</p>
+
+<div class="rule-long"><hr/></div>
+
+<!-- Navigation links -->
+<table style="width: 100%; margin-top: 12px;">
+<tr>
+ <td style="width: 33%;"><a href="toc.html">Back to Table of Contents</a></td>
+ <td style="width: 33%; text-align: center;"><a href="#top">Top</a></td>
+ <td style="width: 33%; text-align: right;"><a href="letters.html">Next: Writing letters</a></td>
+</tr>
+</table>
+
+</div>
+
+<div class="bottom-spacer"><br/></div>
+
+</body>
+</html>
diff --git a/contrib/mom/momdoc/reserved.html b/contrib/mom/momdoc/reserved.html
new file mode 100644
index 0000000..4cdab3b
--- /dev/null
+++ b/contrib/mom/momdoc/reserved.html
@@ -0,0 +1,2736 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+This file is part of groff, the GNU roff type-setting system.
+
+Copyright (C) 2004-2020 Free Software Foundation, Inc.
+Written by Peter Schaffter (peter@schaffter.ca).
+
+Permission is granted to copy, distribute and/or modify this document
+under the terms of the GNU Free Documentation License, Version 1.3 or
+any later version published by the Free Software Foundation; with no
+Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
+Texts.
+
+A copy of the Free Documentation License is included as a file called
+FDL in the main directory of the groff source package.
+-->
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+<head>
+ <meta http-equiv="content-type" content="text/html;charset=utf-8"/>
+ <title>Mom -- Reserved words (macros, strings, registers)</title>
+ <link rel="stylesheet" type="text/css" href="stylesheet.css" />
+</head>
+
+<body style="background-color: #f5faff;">
+
+<!-- ==================================================================== -->
+
+<div id="top" class="page" style="width: 800px;">
+
+<!-- Navigation links -->
+<table style="width: 100%;">
+<tr>
+ <td><a href="toc.html">Back to Table of Contents</a></td>
+</tr>
+</table>
+
+<h1 id="reserved-words" class="docs">List of reserved words (macros, strings, registers)</h1>
+
+<p>
+The following is a list of reserved words used by mom. Before
+changing the name of any macro or document element tag with
+<a href="goodies.html#ALIAS">ALIAS</a>,
+I strongly recommend doing a search of this page for your proposed
+new name. If you find it in the left hand column, choose something
+else instead.
+</p>
+
+<p>
+Anyone interested in hacking/patching mom&#8217;s macro file
+(om.tmac) will also find this list useful since it lists most of
+the macros, strings, diversions, aliases, and number registers
+mom uses, along with brief descriptions of their functions.
+</p>
+
+<p>
+The list is not exhaustive. PDF-related macros, strings, registers,
+and diversions, as well as those associated with preprocessor
+support and &#8220;Lists of&#8221; are not included.
+</p>
+
+<div class="rule-medium"><hr/></div>
+
+<span class="pre" style="scroll: none;">
+<span style="display: block; text-decoration: underline;">TYPESETTING</span>
+<span style="display: block; margin-top: -1em;">+++MACROS+++</span>
+<span style="display: block; margin-top: -1em; margin-bottom: -1em;">*Page layout</span>
+ PAGELENGTH Page width
+ PAGE Page width/length; left, right, top, bottom margins
+ PAGEWIDTH Page width
+ PAPER Letter, legal, or A4
+ B_MARGIN Space to leave at page bottom
+ L_MARGIN Page offset
+ R_MARGIN Line length as a function of
+ pagewidth minus pageoffset minus rightmargin
+ T_MARGIN Advance lead from page top
+
+<span style="display: block; margin-top: -.75em; margin-bottom: -1em;">*Page control</span>
+ DO_B_MARGIN Margin at bottom of page; trap-invoked
+ DO_T_MARGIN Margin at top of page; trap-invoked
+
+<span style="display: block; margin-top: -.75em; margin-bottom: -1em;">*Style</span>
+ COLOR Change color of text to predefined value
+ CONDENSE Set percentage of pseudo-condense (alias of
+ CONDENSE_OR_EXTEND)
+ EXTEND Set percentage of pseudo-extend (alias of
+ CONDENSE_OR_EXTEND)
+ FAMILY Family
+ FT Font
+ FALLBACK_FONT Font to use whenever FAMILY or FT errors occur
+ LL Line length
+ LS Leading (.vs)
+ NEWCOLOR Define a text color
+ PT_SIZE Point size
+ SETBOLDER Set degree of emboldening (pseudo-bold) in units
+ SETSLANT Set degree of pseudo-italic
+ XCOLOR Initialize a color from rgb.txt
+
+<span style="display: block; margin-top: -.75em; margin-bottom: -1em;">*Autolead</span>
+ AUTOLEAD Always lead n points more than .PT_SIZE
+
+<span style="display: block; margin-top: -.75em; margin-bottom: -1em;">*Quad, fill, justification</span>
+ JUSTIFY Justified text
+ QUAD Filled text, left, right, or centre
+
+<span style="display: block; margin-top: -.75em; margin-bottom: -1em;">*Quad, no-fill</span>
+ CENTER Line-for-line, non-filled text, centre
+ LEFT Line-for-line, non-filled text, left
+ RIGHT Line-for-line, non-filled text, right
+
+<span style="display: block; margin-top: -.75em; margin-bottom: -1em;">*Hyphenation</span>
+ HY Turn hyphenation on/off, or set LINES, MARGIN, SPACE
+ HY_SET Set LINES, MARGIN, SPACE in a single command
+
+<span style="display: block; margin-top: -.75em; margin-bottom: -1em;">*Advanced style</span>
+ KERN Turn automatic kerning on or off
+ LIGATURES Turn ligatures on or off
+ SS Sentence space control
+ WS Word space control
+
+<span style="display: block; margin-top: -.75em; margin-bottom: -1em;">*Line breaks</span>
+ BR Alias of br
+ EL Breaks line but doesn't advance
+ SPACE Alias of sp
+ SPREAD Alias of brp
+
+<span style="display: block; margin-top: -.75em; margin-bottom: -1em;">*Vertical motions</span>
+ ALD Advance lead
+ RLD Reverse lead
+
+<span style="display: block; margin-top: -.75em; margin-bottom: -1em;">*Indents</span>
+ HI Indent hang
+ IB Indent both
+ IBX Indent both off
+ IL Indent left
+ ILX Indent left off
+ IQ Indents off
+ IR Indent right
+ IRX Indent right off
+ IX Indents off -- deprecated
+ TI Indent temporary
+
+<span style="display: block; margin-top: -.75em; margin-bottom: -1em;">*Tabs</span>
+ ST String tab
+ TAB_SET Tab Set
+ TN Tab Next
+ TQ Tab Quit
+
+<span style="display: block; margin-top: -.75em; margin-bottom: -1em;">*Columnar tabs</span>
+ MCO Turn on multi-column mode
+ MCR Return to top of column
+ MCX Turn off multi-column mode
+
+<span style="display: block; margin-top: -.75em; margin-bottom: -1em;">*Underscore</span>
+ UNDERSCORE Underscores words or phrases
+ UNDERSCORE2 Double underscores words or phrases
+
+<span style="display: block; margin-top: -.75em; margin-bottom: -1em;">*Underline</span>
+ UNDERLINE Underlines whole passages (Courier only)
+
+<span style="display: block; margin-top: -.75em; margin-bottom: -1em;">*Smart Quotes</span>
+ SMARTQUOTES Turns smart quotes on or off
+
+<span style="display: block; margin-top: -.75em; margin-bottom: -1em;">*Graphical objects</span>
+ RULE_WEIGHT Weight of rules drawn with \*[RULE]
+ DBX Draw box
+ DCL Draw circle (ellipse)
+ DRH Draw horizontal rule
+ DRV Draw vertical rule
+
+<span style="display: block; margin-top: -.75em; margin-bottom: -1em;">*Misc + Support</span>
+ BR_AT_LINE_KERN Deposit a break before RW and WE
+ CAPS Convert u/lc to UC
+ COMMENT Don't print lines till COMMENT OFF (alias of SILENT)
+ DROPCAP_ADJUST Points (poss. fractional) to add/subtract
+ from drop caps
+ DROPCAP Create drop cap
+ DROPCAP_FAMILY Drop cap family
+ DROPCAP_FONT Drop cap font
+ DROPCAP_GUTTER Drop cap gutter
+ DROPCAP_OFF Support only; restores .in if there was one
+ ESC_CHAR Alias for .ec
+ EW Extra white -- loosen overall line kern
+ (character spacing)
+ LEADER_CHARACTER Sets leader character
+ PAD Insert padding spaces at marked places
+ PADMARKER Sets character to use instead of # in PAD
+ PRINT Simply prints args passed to it; keeps my code
+ indented nicely
+ RW Reduce white -- tighten overall line kern
+ (character spacing)
+ SILENT Don't print lines till SILENT OFF
+ SIZESPECS Get cap-height, x-height and descender depth for
+ current point size
+ SUPERSCRIPT_RAISE_AMOUNT Change default vertical displacement of superscripts
+ TRAP Turn traps off or on
+
+<span style="display: block; margin-top: -.5em; margin-bottom: -2.5em;">+++DIVERSIONS+++</span>
+
+ NO_FLASH Diverts output of SILENT or COMMENT so they don't print
+ NULL Diverts SIZESPECS in PRINT_HDRFTR so it doesn't screw up
+ FOOTER and FOOTNOTE processing when FOOTERS are on
+ PAD_STRING Diverts $PAD_STRING for processing
+ TYPESIZE Diverts SIZESPECS routine so it doesn't print
+
+<span style="display: block; margin-top: -.5em; margin-bottom: -2.5em;">+++NUMBER REGISTERS+++</span>
+
+ #ABORT_FT_ERRORS Abort on FT errors? (boolean)
+ #ALD ALD value
+ #ARGS_TO_LIST Tells LIST whether LIST was invoked with a valid
+ arg; controls LIST OFF processing
+ #ARGS_TO_SQ Tells SMARTQUOTES whether it was invoked with a
+ valid arg; controls SMARTQUOTES OFF
+ processing
+ #AUTOLEAD_FACTOR Using FACTOR arg to AUTOLEAD? (boolean)
+ #AUTO_LEAD Using autolead? (boolean)
+ #AUTOLEAD_VALUE Auto leading value
+ #BL_INDENT Value of left indent when IB
+ #B_MARGIN Bottom margin
+ #B_MARGIN_SET Has a bottom margin been set with B_MARGIN? (boolean)
+ #BOLDER_UNITS Number of units to embolden type
+ #BR_AT_LINE_KERN Break when EW/RW are invoked? (boolean)
+ #BR_INDENT Value of right indent when IB
+ #BX_SOLID Draw box filled? (boolean)
+ c column mark
+ #CAPS_ON Is CAPS enabled? (boolean)
+ #CL_SOLID Draw circle filled? (boolean)
+ #CODE_FAM Use different family from Courier for CODE? (boolean)
+ #CODE_FT Use different font from roman for CODE? (boolean)
+ #CONDENSE Are we in pseudo-condense mode? (boolean)
+ #CONDENSE_WAS_ON For restoring \*[COND] in DROPCAP
+ #COND_WIDTH Width of pseudo-condensed type
+ (pointsize x $COND_PERCENT)
+ #CURRENT_HY \\n[.hy] when ref*normal-print called
+ #CURRENT_L_LENGTH Current line length at first invocation of LIST;
+ like #ORIG_L_LENGTH
+ #CURRENT_TAB Current tab number
+ #DC_COLOR Colorize dropcap? (boolean)
+ #DC_GUT Width of dropcap gutter
+ #DC_HEIGHT Dropcap height
+ #DC_LINES Number of lines for dropcap
+ #DEGREES # of degrees slant for pseudo-italic
+ #ENUMERATOR&lt;n&gt; Number register enumerator for depth &lt;n&gt; in lists
+ #EW Is EW in effect? (boolean)
+ #EXT_WIDTH Width of pseudo-extended type
+ (pointsize x $EXT_PERCENT)
+ #EXTEND Are we in pseudo-extend mode? (boolean)
+ #EXTEND_WAS_ON For restoring \*[EXT] in DROPCAP
+ #FILL_MODE Which fill mode are we in? ( \n[.j] )
+ #FILLED Are we in a fill mode? (boolean)
+ #H_INDENT Value of left indent when IH
+ #HL_INDENT&lt;n&gt; Hanging indent for LIST depth &lt;n&gt;
+ #HL_INDENT Value of the hang when IH
+ #HY_SET Did we manually set hyphenation parameters?
+ (boolean)
+ #HYPHEN_ADJ Amount by which to raise hyphens surrounding page
+ numbers
+ #HYPHENATE Hyphenation on? (boolean)
+ #IN_ITEM Are we in a list item? (boolean)
+ #IN_ITEM_L_INDENT Value passed to IL if #IN_ITEM=1
+ #IN_TAB Are we in a tab? (boolean)
+ Set in macro TAB; used in ST to determine
+ whether to add #ST_OFFSET to #ST&lt;n&gt;_OFFSET
+ #INDENT_ACTIVE Indicates whether an indent is active (boolean)
+ #INDENT_BOTH_ACTIVE Toggle
+ #INDENT_LEFT_ACTIVE Toggle
+ #INDENT_RIGHT_ACTIVE Toggle
+ #INDENT_STYLE_BOTH Indicates IB when #INDENT_ACTIVE=1 (boolean)
+ #INDENT_STYLE_HANG Indicates IH when #INDENT_ACTIVE=1 (boolean)
+ #INDENT_STYLE_LEFT Indicates IL when #INDENT_ACTIVE=1 (boolean)
+ #INDENT_STYLE_RIGHT Indicates IR when #INDENT_ACTIVE=1 (boolean)
+ #INDENT_STYLE_TEMP Indicates IT when #INDENT_ACTIVE=1 (boolean)
+ #IGNORE_COLUMNS Don't set document in columns (boolean)
+ #IN_DIVER Are we in a diversion? (boolean)
+ #IX_WARN Toggles to 1 the first time IX is user-invoked
+ #JUSTIFY In EW/RW, when BR_AT_LINE_KERN, whether to
+ break or break-spread preceding line (boolean)
+ #KERN Kern on? (boolean)
+ #KERN_UNIT Size of kern units (1/36 of current point size)
+ #KERN_WAS_ON Indicates kerning was on; used in list ITEMs (boolean)
+ #LAST_TAB Last tab number set in multi-columns
+ #LAST_FN_COUNT_FOR_COLS #FN_COUNT_FOR_COLS at top of HEADER
+ #LEAD Leading (alias)
+ #LIGATURES Ligatures on? (boolean)
+ #LIST_INDENT&lt;n&gt; Left indent of list &lt;n&gt;
+ #L_INDENT Value of left indent
+ #L_LENGTH Line length
+ #L_MARGIN Page offset if set with LMARGIN;
+ if .po used, \n[.o] returns page offset
+ #LOOP In EPIGRAPH, #LOOP=1 if a while loop executes;
+ otherwise 0. Elsewhere, an arbitrary incrementing
+ register used to read in strings
+ #MCX_ALD Amount to advance past end of longest column
+ #NEWPAGE Was NEWPAGE just invoked? (boolean)
+ #NEXT_DEPTH_BACK Next list level back in lists
+ #NEXT_TAB Current tab number + 1 (used in TN)
+ #NEXT_TAB Next tab in an n+1 sequence
+ #NOFILL Are we in a nofill mode? (boolean)
+ #NOFILL_MODE Nofill mode
+ #OLD_LEAD Lead in effect prior to changing it with .vs
+ in .LS or .AUTOLEAD
+ #OPEN_CLOSE Manipulates character " to print `` or ''
+ #ORIGINAL_L_LENGTH Used in LIST for IB processing; holds \n[.l]
+ p Output line horiz position at end of
+ $PAD_STRING
+ #PAD_COUNT Number of times # was included in arg to PAD
+ #PAD_LIST_DIGITS Pad list digits to the left? (boolean)
+ #PAD_SPACE Size of padding space
+ #PAGE_LENGTH Page length (alias)
+ #PAGE_WIDTH Page width
+ #PP_ACTIVE Are we in the context of a para? (boolean)
+ #PRINT_FOOTER_ON_PAGE_1 (boolean)
+ #PSEUDO_FILL Signals that LEFT, RIGHT or CENTER is
+ in effect (booleand off, i.e. to 0, when
+ QUAD &lt;arg&gt; or JUSTIFY is called)
+ #PT_SIZE Point size (fractional) in units (alias)
+ #Q_AT_TOP Does a quote start at the top of a new page?
+ (boolean)
+ #QUAD In autoquad mode? (boolean)
+ #QUIT Tells LIST whether to exit lists completely
+ (boolean)
+ #REMOVE Used in LIST OFF cleanup
+ #RESTORE_FILL Used to restore \[.u] state if temporarily changed
+ #RESTORE_LEAD Lead value in effect prior to AUTOLEAD
+ #RESTORE_LINE_LENGTH Restores actual line length in RULE
+ #RESTORE_LN_NUMBER Start linenumbering again with stored
+ #NEXT_LN? (boolean)
+ #RESTORE_PT_SIZE Stores current point size (in units) prior
+ to underscore
+ #R_INDENT Value of right indent
+ #R_MARGIN Right margin
+ #RESTORE_PREV_INDENT Tells LIST OFF what kind of indent was active
+ prior to first invocation of LIST
+ #RESTORE_TRAP Did we have to disable traps? Used in
+ graphical object macros (boolean)
+ #RESTORE_SQ Instructs SMARTQUOTES to restore smartquotes if
+ SMARTQUOTES invoked without an arg
+ #RLD RLD value
+ #RULE_WEIGHT Weight given to RULE_WEIGHT
+ #RULE_WEIGHT_ADJ RULE_WEIGHT/2
+ #RW Is RW in effect? (boolean)
+ #SHIFT_LIST&lt;n&gt; Value to add to #LIST_INDENT&lt;n&gt; for shifted lists
+ #SILENT Is silent on? (boolean)
+ #SIZE_FOR_PAD Used to ensure that the size in effect prior
+ to PAD is restored at the start of every
+ iteration of $PAD_STRING
+ #SLANT_ON Is SLANT on? (boolean)
+ #SPACE_TO_END Whitespace at end of string passed to PAD
+ #SQ_WAS_ON Instructs CODE OFF to restore smartquotes if they
+ were on prior to CODE
+ #ST&lt;n&gt;_LENGTH Length of ST&lt;n&gt;; calculated during ST &lt;n&gt;
+ #ST&lt;n&gt;_MARK Page offset of autotab &lt;n&gt; at ST&lt;n&gt;X
+ #ST_NUM Incrementing counter for autotab identification
+ #ST&lt;n&gt;_OFFSET Offset (from current tab) to add to #ST&lt;n&gt;_OFFSET
+ when calculating string indents set from within
+ tabs
+ #ST&lt;n&gt;_OFFSET Indent of autotab &lt;n&gt; (page offset)
+ #STORED_L_INDENT Current left indent at first invocation of LIST
+ #STORED_R_INDENT Current right indent at first invocation of LIST
+ #STORED_BL_INDENT Current "both, left" indent at first invocation
+ of LIST
+ #STORED_BR_INDENT Current "both, right" indent at first invocation
+ of LIST
+ #STORED_HL_INDENT Current hanging indent at first invocation
+ of LIST
+ #STORED_T_INDENT Current temporary indent at first invocation
+ of LIST
+ #STR_LENGTH Holds string length derived from .length request
+ tbl Are we in a tbl? (boolean)
+ #T_INDENT Value of temporary indent
+ #T_MARGIN Top margin
+ #TAB_ACTIVE Are we in a tab? (boolean)
+ #TAB_NUMBER Tab number given to TAB_SET
+ #TAB_LENGTH Tab length given to TAB_SET
+ #TAB_OFFSET Tab indent given to TAB_SET
+ #TEXT_WIDTH Width of string to underscore
+ #TN Was TN (or \*[T+] called? (boolean)
+ #TOP Set to 1 in T_MARGIN, DO_T_MARGIN and ALD; tells
+ the first LS or AUTOLEAD on a page to maintain
+ the baseline position prior to the LS call
+ #TOP_BASELINE_ADJ Amount by which to adjust the baseline position
+ of the first line on the page if an LS or AUTOLEAD
+ request differs from the lead current at the end of
+ the previous page
+ #TOTAL_LISTS Total number of lists in a nest
+ #UNDERSCORE_WEIGHT Weight of underscores
+ #UNDERSCORE_WEIGHT_ADJ UNDERSCORE_WEIGHT/2
+ #USER_SET_L_LENGTH Did user invoke LL? (boolean)
+ #USER_SET_TITLE_ITEM Did user invoke TOC_TITLE_ENTRY?
+ #WEIGHT Weight given to #RULE_WEIGHT
+ #WEIGHT_ADJ RULE_WEIGHT/2
+ u Horiz position of start of underscore
+
+<span style="display: block; margin-top: -.5em; margin-bottom: -2.5em;">+++STRINGS+++</span>
+
+ $ARG String holding substrings derived from .substring
+ request
+ $COND_PERCENT Percentage by which to pseudo-condense type
+ $COLOR_SCHEME Color scheme used in NEWCOLOR
+ $&lt;colorname&gt;_FILL XCOLOR "alias" with _FILL attached; used to determine if
+ the alias exists when the alias is passed to DBX SOLID
+ or DCL SOLID
+ $CURRENT_QUAD Restores current quad value in RULE
+ $CURRENT_TAB Current tab number
+ $DC_ADJUST +|- # of points to subtract from dropcap
+ $DC_FAM Drop cap family
+ $DC_FT Drop cap font
+ $DROPCAP The dropcap letter
+ $ENUMERATOR&lt;n&gt; String enumerator for depth &lt;n&gt; in lists
+ $ENUMERATOR_TYPE&lt;n&gt; Type of enumerator used in LIST&lt;n&gt;
+ $EW Value passed to EW
+ $EXT_PERCENT Percentage by which to pseudo-extend type
+ $FAMILY Family
+ $FAMILY_FOR_PAD Used to ensure that the family in effect prior
+ to PAD is restored at the start of every
+ iteration of $PAD_STRING
+ $FONT Font
+ $FONT_FOR_PAD Used to ensure that the font in effect prior
+ to PAD is restored at the start of every
+ iteration of $PAD_STRING
+ $PAD_MARKER Character to mark off padding in PAD
+ $PAD_STRING Arg passed to PAD
+ $PREFIX&lt;n&gt; Prefix for enumerator of LIST&lt;n&gt;
+ $QUAD_VALUE Quad value (left, right, centre, justify)
+ $QUOTE0 Open quotation marks
+ $QUOTE1 Close quotation marks
+ $RESTORE_COND Restores the pseudo-condense value in effect
+ prior to DROPCAP
+ $RESTORE_EXT Restores the pseudo-extend value in effect
+ prior to DROPCAP
+ $RESTORE_FAM Used to restore the family in effect
+ prior to DROPCAP
+ $RESTORE_FT Used to restore the font/fontstyle in effect
+ prior to DROPCAP
+ $RESTORE_PT_SIZE Used to restore the point size of normal
+ running text after a dropcap
+ $RESTORE_QUAD_VALUE Quad value for use in restoring L, R, C, J
+ (after tabs)
+ $RESTORE_SQ The smartquoting string last passed to SMARTQUOTES
+ $RULE_GAP Distance between underscore rules
+ $RW Value passed to RW
+ $SAVED_STYLE Current style, if there is one (used in FAMILY)
+ $SAVED_UNDERSCORE_GAP Temporarily holds string in $UNDERSCORE_GAP
+ $SEPARATOR&lt;n&gt; Separator for depth &lt;n&gt; in lists
+ $SS_VAR Holds + or - sentence space value
+ $ST&lt;n&gt;_FILL Always QUAD if QUAD passed to ST &lt;n&gt;
+ ST\n[#LOOP] Used to initialize string tab markers (1-19)
+ ST\n[#LOOP]X Used to initialize string tab markers (1-19)
+ $ST&lt;n&gt;_QUAD_DIR Quad direction supplied to ST for &lt;n&gt;
+ $SUP_LOWER Vertical displacement amount of superscripts
+ $SUP_RAISE Vertical displacement amount of superscripts
+ $SUP_RAISE_AMOUNT Argument passed to SUPERSCRIPT_RAISE_AMOUNT
+ $TAB_NUMBER Argument passed to TAB macro to call TAB# macro
+ created in TAB_SET
+ $UNDERSCORE_GAP Distance between text and underscore rule
+ $WS_CONSTANT 12; used to hold groff default wordspace
+ $WS Holds WS value; concatenation of WS_CONSTANT and
+ WS_VAR
+ $WS_VAR + or - value to add to $WS_CONSTANT
+ BLACK Pre-defined black color
+ black Pre-defined black color
+ WHITE Pre-defined white color
+ white Pre-defined white color
+
+<span style="display: block; margin-top: -.5em; margin-bottom: -2.5em;">+++ALIASES+++</span>
+
+ ALIAS als
+ ALIASN aln
+ BR br
+ CENTRE CENTER
+ COLOUR COLOR
+ COMMENT SILENT
+ CONDENSE CONDENSE_OR_EXTEND
+ EXTEND CONDENSE_OR_EXTEND
+ FAM FAMILY
+ FT FONT
+ HYPHENATE HY
+ HYPHENATION HY
+ INCLUDE so
+ LIG LIGATURES
+ LL LINE_LENGTH
+ MAC de
+ NEW_PAGE bp
+ NEWCOLOUR NEWCOLOR
+ NEWPAGE NEW_PAGE
+ PAGELENGTH PAGE_LENGTH
+ PAGE_LENGTH pl
+ PAGEWIDTH PAGE_WIDTH
+ SPREAD brp
+ SP sp
+ STRING ds
+ TABSET TAB_SET
+ TB TAB
+ TI IT
+ UNDERSCORE_2 UNDERSCORE2
+ XCOLOUR XCOLOR
+
+<span style="display: block; margin-top: -.5em; margin-bottom: -2.5em;">+++ALIASES FOR NUMBER REGISTERS+++</span>
+
+ #DIVER_DEPTH dn -- diversion depth
+ #DIVER_WIDTH dl -- diversion width
+ #INDENT .i -- value of current indent
+ #LEAD .v -- line space (.vs, not .ls)
+ #L_LENGTH .l -- line length
+ #NUM_ARGS .$ -- number of arguments passed to a macro
+ #PAGE_LENGTH .p -- page length
+ #PT_SIZE .ps -- current point size (fractional) in units
+ #TRAP_DISTANCE .t -- distance to next trap
+
+<span style="display: block; margin-top: -.5em; margin-bottom: -2.5em;">+++INLINE ESCAPES+++</span>
+
+ ALD&lt;n&gt; Move down inline by &lt;n&gt; (between .25 and 12.75)
+ B Inline equivalent to .EL
+ BCK Inline backward horizontal movement
+ BD Bold font
+ BDI Bold italic font
+ BLACK Color
+ black color
+ BOLDER Pseudo-bold on
+ BOLDERX Pseudo-bold off
+ BP Back points (horizontal movement)
+ BP&lt;n&gt; Back points by &lt;n&gt; (between .25 and 12.75)
+ BU Back units (inline pairwise kerning)
+ BU&lt;n&gt; Back units by &lt;n&gt; (between 1 and 36)
+ COND Pseudo-condense type
+ COND_FOR_SUP Pseudo-condense string for use with superscripts
+ (called with CONDSUP)
+ COND_FOR_SUP Pseudo-extend string for use with superscripts (called
+ with EXTSUP)
+ CONDSUP Pseudo-condensed superscript (using value set with
+ CONDENSE)
+ CONDSUPX Pseudo-condensed superscript off
+ CONDX Pseudo-condense off
+ DOWN Inline downward vertical movement
+ EN-MARK Inline escape to indicate the beginning of a
+ range of lines used to identify an endnote
+ EXT Pseudo-extend type
+ EXTX Pseudo-extend off
+ EXTSUP Pseudo-extended superscript
+ EXTSUPX Pseudo-extended superscript off
+ FN-MARK Inline escape to indicate the beginning of a
+ range of lines used to identify a footnote
+ FP&lt;n&gt; Forward points by &lt;n&gt; (between .25 and 12.75)
+ FP Forward points (horizontal movement)
+ FU Forward units (inline pairwise kerning)
+ FU&lt;n&gt; Forward units by &lt;n&gt; (between 1 and 36)
+ FWD Inline forward horizontal movement
+ PREV Return to previous font in effect
+ RLD&lt;n&gt; Move up, inline, by &lt;n&gt; (between .25 and 12.75)
+ ROM Roman (medium) font
+ S Same \s
+ SLANT Slant (pseudo-italic on
+ SLANTX Slant off
+ ST&lt;n&gt; String tab end marker
+ ST&lt;n&gt; String tab start marker
+ SUP Superscript
+ SUPX Superscript off
+ TB+ Move to next tab number (n+1) without advancing on the page
+ UP Inline upward vertical movement
+ WHITE Color
+ white Color
+
+<span style="display: block; margin-top: -.5em; margin-bottom: -2.5em;">+++SPECIAL CHARACTERS+++</span>
+
+ FOOT The foot character \(fm
+ INCH The inch character \(fm\(fm
+ LEADER Deposit leader to end of current LL or TAB
+ RULE Draw a rule to the full measure of the current line or
+ tab length
+<span style="display: block; margin-top: 1em; text-decoration: underline;">DOCUMENT PROCESSING</span>
+<span style="display: block; margin-top: -1em;">+++MACROS+++</span>
+<span style="display: block; margin-top: -1em; margin-bottom: -1em;">*Document info (reference macros)</span>
+ AUTHOR Author
+ CHAPTER Chapter number
+ CHAPTER_TITLE Chapter title
+ COPYRIGHT Copyright info (covers only)
+ DOCTITLE Overall doc title (for collated docs)
+ DRAFT Draft number
+ MISC Misc info (covers only)
+ REVISION Revision number
+ SUBTITLE Doc subtitle
+ TITLE Doc title
+
+<span style="display: block; margin-top: -.75em; margin-bottom: -1em;">*Covers</span>
+ COVER What goes on cover
+ COVERS Whether covers get printed (boolean)
+ COVER_ADVANCE Set vertical start position of cover material
+ COVER_LEAD Overall leading of covers
+ COVERTITLE User-defined cover title string
+ DOC_COVER What goes on doc cover
+ DOC_COVERS Whether doc covers get printed
+ DOC_COVER_ADVANCE Set vertical start position of doc cover material
+ DOC_COVER_LEAD Overall leading of doc covers
+ DOC_COVERTITLE User-defined doc cover title string
+
+<span style="display: block; margin-top: -.75em; margin-bottom: -1em;">*Document style</span>
+ COPYSTYLE Output style (DRAFT or FINAL)
+ DEFAULTS In START, sets defaults
+ DOCTYPE Kind of doc (DEFAULT, CHAPTER, NAMED, LETTER)
+ PAGENUMBER Page number that appears on 1st page of doc
+ PAPER Paper size (LETTER, LEGAL, A4)
+ PRINTSTYLE Print style (TYPEWRITE or TYPESET)
+ NUMBER_LINES Number output lines in the left margin
+
+<span style="display: block; margin-top: -.75em; margin-bottom: -1em;">*Document tags and macros</span>
+ ADD_SPACE Special macro to add space to the top of a pages after
+ page 1; must be preceded by NEWPAGE
+ BIBLIOGRAPHY Begin a bibliography page
+ BIBLIOGRAPHY_TYPE LIST or PLAIN
+ BLOCKQUOTE Block-indented, quoted text
+ COL_BREAK Breaks and spreads line before invocation; moves to
+ next column on page or 1st col of next page. An
+ alias of COL_NEXT.
+ COL_NEXT Moves to next column on page or 1st col of next page
+ ENDNOTE Endnote
+ ENDNOTE_REFS Send REFs to endnotes
+ ENDNOTES Output endnotes
+ EPIGRAPH Epigraph before 1st para
+ EQ/EN eqn block
+ FINIS Prints --END--
+ FLOAT Keep material together as a block; defer output
+ to following page if not enough room to print
+ FOOTNOTE Collects footnotes in text for printing at bottom
+ of page
+ FOOTNOTE_REFS Send REFs to footnotes
+ HEAD Section title (main heads)
+ HYPHENATE_REFS Turn on/off hyphenation of REF references
+ ITEM Begin a list item
+ LINEBREAK Break between narrative sections
+ LIST Initialize a list
+ MN Margin note
+ MN_INIT Initialize parameters for margin notes
+ NUMBER_LINES Number text lines
+ NUMBER_BLOCKQUOTE_LINES Number blockquote lines
+ NUMBER_QUOTE_LINES Number quote lines
+ PAD_LIST_DIGITS Leave space for two-numeral digit enumerators
+ in a list
+ PARAHEAD Paragraph head
+ PP Paragraph
+ QUOTE Poetic or line for line quotes
+ REF Wrapper around FOOTNOTE or ENDNOTE, depending
+ on FOOTNOTE_REFS or ENDNOTE_REFS
+ REF( Begin embedded reference, parens
+ REF) End embedded reference, parens
+ REF[ Begin embedded reference, square brackets
+ REF] End embedded reference, square brackets
+ REF{ Begin embedded reference, braces
+ REF} End embedded reference, braces
+ REF_INDENT Amount of 2nd line indent of references for
+ footnote, endnote or bibliography refs
+ RESET_LIST Reset digit or alpha list enumerator
+ SHIFT_LIST Move a list over to the right
+ START Sets doc defaults and prints info collected
+ with doc info macros
+ SUBHEAD Subheads
+ SUBSUBHEAD Subsubheads
+ TH Running tbl header
+ TS/TE Begin/end a tbl block
+
+<span style="display: block; margin-top: -.75em; margin-bottom: -1em;">*Headers/footers</span>
+ DO_FOOTER Prints footer (after footnote processing, if any)
+ FOOTER_ON_FIRST_PAGE Print footer on first page? (boolean)
+ FOOTER Trap-invoked footer macro
+ HEADER Trap-invoked header macro
+ PAGINATE Turns page numbering on or off (doc default=on)
+ PAGINATE_TOC Turns pagination of toc on or off (default=on)
+ RECTO_VERSO Enables switch HEADER_LEFT and HEADER_RIGHT on
+ alternate pages
+
+<span style="display: block; margin-top: -.75em; margin-bottom: -1em;">*Control macros</span>
+-General-
+ ALWAYS_FULLSPACE_QUOTES Fullspace quotes instead of default
+ 1/2 spacing them.
+ ATTRIBUTE_STRING What to print before author (default is "by")
+ CHAPTER_STRING What to print whenever the word "chapter"
+ is required
+ COLUMNS Print in columns
+ DOC_FAMILY Overall doc family
+ DOCHEADER Print doc header?
+ DOCHEADER_ADVANCE Start position of docheader (relative to top
+ of page)
+ DOCHEADER_LEAD +|- value applied to #DOC_LEAD to in/decrease
+ leading of doc header
+ DOC_LEAD_ADJUST Adjust #DOC_LEAD to fill page to #B_MARGIN
+ DOC_LEAD Overall doc leading
+ DOC_LEFT_MARGIN Doc left margin
+ DOC_LINE_LENGTH Doc line length
+ DOC_PT_SIZE Overall doc point size
+ DOC_RIGHT_MARGIN Doc right margin
+ DOC_TITLE Overall doc title that gets printed in
+ headers/footers (mostly for use with collated
+ docs where each doc is an article with a
+ different title
+ DRAFT_STRING What to print whenever the word "draft" is
+ required
+ DRAFT_WITH_PAGENUMBER Attach draft/revision info to page number
+ (instead of putting it HEADER centre)
+ REVISION_STRING What to print whenever the word "revision"
+ is required
+
+-Covers-
+ COVER_ADVANCE Vertical place on page to start outputting
+ cover material
+ COVER_LEAD Lead in/decrease for cover pages
+ COVERS_COUNT_PAGES Whether to include cover pages in pagination scheme
+ DOC_COVER_ADVANCE Vertical place on page to start outputting
+ doc cover material
+ DOC_COVER_LEAD Lead in/decrease for doc cover pages
+ DOC_COVERS_COUNT_PAGES Whether to include doc cover pages in pagination
+ scheme
+
+-Epigraphs and finis-
+ EPIGRAPH_AUTOLEAD Autolead value for epigraphs
+ EPIGRAPH_INDENT Value by which to multiply PP_INDENT for
+ block epigraphs
+ FINIS_STRING What to print when FINIS is invoked
+ FINIS_STRING_CAPS Whether to capitalize the finis string
+
+-eqn-
+ EQ_INDENT Indent value if 'EQ I'
+
+-Footnotes-
+ FOOTNOTE_AUTOLEAD Autolead to use in footnotes
+ FOOTNOTE_LINENUMBER_BRACKETS Brackets for footnote linenumbers
+ FOOTNOTE_LINENUMBER_SEPARATOR Separator for footnote linenumbers
+ FOOTNOTE_MARKERS Turns footnote markers on or off
+ FOOTNOTE_MARKER_STYLE STAR or NUMBER; default=STAR
+ FOOTNOTE_RULE_ADJ # of points to raise footnote rule from its
+ baseline
+ FOOTNOTE_RULE_LENGTH Length of footnote separator rule
+ FOOTNOTE_RULE Turns printing of fn separator rule on or off;
+ default is on
+ FOOTNOTE_SPACING Post footnote item spacing
+ FOOTNOTES_RUN_ON Run footnotes on (line numbering mode only)
+ RESET_FOOTNOTE_NUMBER Reset fn# to 1, or, if arg PAGE, reset
+ automatically to 1 on every page
+ RUNON_WARNING Utility macro; warns if FOOTNOTES_RUN_ON
+ was called when fn marker style is STAR or
+ NUMBER
+
+-Endnotes-
+ ENDNOTE_LEAD Leading for endnotes page
+ ENDNOTE_LINENUMBER_BRACKETS Brackets around line numbers identifying
+ endnotes and text
+ ENDNOTE_LINENUMBER_GAP Amount of space to leave between line
+ ENDNOTE_LINENUMBER_SEPARATOR Separator between line numbers identifying
+ endnotes and the endnote item text
+ endnotes and text
+ ENDNOTE_MARKER_STYLE NUMBER or LINE
+ ENDNOTE_NUMBERS_ALIGN_RIGHT Hang endnote numbers and align right
+ ENDNOTE_NUMBERS_ALIGN_LEFT Don't hang endnote numbers and align left
+ ENDNOTE_PARA_INDENT First line indent of paras in multi-para
+ endnotes
+ ENDNOTE_PARA_SPACE Whether to space paras in multi-para endnotes
+ ENDNOTE_PT_SIZE Base point size for endnotes page
+ FOOTNOTE_SPACING Post endnotenote item spacing
+ ENDNOTE_STRING Endnotes page head
+ ENDNOTE_STRING_ADVANCE Distance of title string "ENDNOTES" from top
+ edge of page
+ ENDNOTE_STRING_CAPS Capitalize the endnotes string
+ ENDNOTE_STRING_UNDERLINE Underscoring of endnotes page head
+ ENDNOTE_TITLE Endnotes identifying title
+ ENDNOTE_TITLE_SPACE Distance from top of page to endnotest title
+ ENDNOTE_TITLE_UNDERLINE Underscoring of endnotes identifying title
+ ENDNOTES_ALLOWS_HEADERS Page headers on endnotes pages? (boolean)
+ ENDNOTES_FIRST_PAGENUMBER Page number to appear on page 1 of endnotes
+ pages
+ ENDNOTES_HDRFTR_CENTER Print header/footer centre string on endnotes
+ pages?
+ ENDNOTES_HEADER_CENTER Print header centre string on endnotes pages?
+ ENDNOTES_FOOTER_CENTER Print footer centre string on endnotes pages?
+ ENDNOTES_NO_COLUMNS Turn columnar mode off for endnotes pages
+ ENDNOTES_NO_FIRST_PAGENUM Don't print a pagenumber on page 1 of
+ endnotes.
+ ENDNOTES_PAGENUM_STYLE Set numbering style for endnotes pages page
+ numbers
+ SINGLESPACE_ENDNOTES Single space TYPEWRITE endnotes
+
+-Bibliographies-
+ BIBLIOGRAPHY_ALLOWS_HEADERS Allow headers on bib pages
+ BIBLIOGRAPHY_FIRST_PAGENUMBER Starting page number for bibliographies
+ BIBLIOGRAPHY_HDRFTR_CENTER Header/footer center string for bib pages
+ BIBLIOGRAPHY_LEAD Base lead of bib pages
+ BIBLIOGRAPHY_NO_COLUMNS De-columnize bibliographies
+ BIBLIOGRAPHY_NO_FIRST_PAGENUM Don't print a page number on the first
+ page of bibliographies
+ BIBLIOGRAPHY_PAGENUM_STYLE Format for bib pages page numbering
+ BIBLIOGRAPHY_PT_SIZE Base point size for bib pages
+ BIBLIOGRAPHY_SPACING Post bib entry space
+ BIBLIOGRAPHY_STRING String for bib title
+ BIBLIOGRAPHY_STRING_ADVANCE Distance of title string "BIBLIOGRAPHY" from
+ top edge of page
+ BIBLIOGRAPHY_STRING_CAPS Capitalize bib title string
+ BIBLIOGRAPHY_STRING_UNDERLINE Underscore bib title string
+ SINGLESPACE_BIBLIOGRAPHY Singlespace bibs if PRINTSTYLE TYPEWRITE
+
+-Headers and footers-
+ FOOTER_COLOR Footer color
+ FOOTER_GAP Distance between running text and footer
+ FOOTER_MARGIN Distance from footer to bottom of page
+ FOOTERS Turns footers on or off
+ HDRFTR_CENTER String to go in centre part of header/footer;
+ default doctype
+ HDRFTR_CENTER_CAPS Centre part of header/footer in caps? (boolean)
+ HDRFTR_CENTER_PAD Pad hdrftr CENTER left or right by specified
+ amount
+ HDRFTR_GAP Distance from header/footer to running text
+ HDRFTR_LEFT_CAPS Left part of header/footer in caps? (boolean)
+ HDRFTR_LEFT String to go in left part of header/footer;
+ default is AUTHOR_1
+ HDRFTR_LEFT The header/footer left string
+ HDRFTR_MARGIN Distance from top of page to header
+ HDRFTR_PLAIN Header/footer fam/ft/ps all same as running
+ text
+ HDRFTR_RECTO User-defined, single string recto
+ header/footer
+ HDRFTR_RIGHT_CAPS Right part of header/footer in caps? (boolean)
+ HDRFTR_RIGHT The header/footer right string
+ HDRFTR_RULE_GAP Space between header/footer and header/footer
+ rule
+ HDRFTR_RULE_INTERNAL Prints the header/footer rule
+ HDRFTR_RULE Turns header/footer rule on or off
+ When invoked internally, prints the rule.
+ HDRFTR_VERSO User-defined, single string verso
+ header/footer
+ HEADERS Turns headers on or off
+ HEADER_GAP Space between header and running text
+ HEADER_MARGIN Space from top of page to header
+ HEADERS_AND_FOOTERS Enables and permits the creation of
+ headers and footers that appear on the
+ same page
+ SWITCH_HDRFTR Switch HDRFTR_LEFT and HDRFTR_RIGHT
+
+-Page numbering-
+ PAGENUM_HYPHENS Turns on/off hyphens surrounding page numbers
+ PAGENUM_ON_FIRST_PAGE Print page number on first page when footers
+ are on (boolean)
+ PAGENUM_POS Controls placement of page numbers;
+ default=bottom/centred
+ PAGENUM_SIZE How much to in/decrease point size of page
+ numbers
+ PAGENUM_STYLE Page # in roman, Arabic, or alphabetic
+ RESTORE_PAGINATION Restore pagination after outputting non-
+ paginated endnotes.
+ SUSPEND_PAGINATION Suspend pagination prior to outputting
+ endnotes
+
+-Heads-
+ HEAD_CAPS Print section titles in caps? (boolean)
+ HEAD_SPACE Give HEADs 2 line-spaces before. If OFF,
+ only 1. Default is on.
+ HEAD_UNDERLINE Underline section titles? (boolean)
+ NUMBER_HEADS Print head numbers
+ RESET_HEAD_NUMBER Reset head number
+ HEAD_BASELINE_ADJUST Amount to raise head above baseline
+
+-Subheads-
+ NUMBER_SUBHEADS Print subhead numbers
+ RESET_SUBHEAD_NUMBER Reset subhead number
+ SUBHEAD_BASELINE_ADJUST Amount to raise subhead above baseline
+
+-Subsubheads-
+ NUMBER_SUBSUBHEADS Print subhead numbers
+ RESET_SUBSUBHEAD_NUMBER Reset subhead number
+ SUBSUBHEAD_BASELINE_ADJUST Amount to raise subhead above baseline
+
+-Para heads-
+ NUMBER_PARAHEADS Print parahead numbers
+ PARAHEAD_INDENT How much to indent paraheads
+ RESET_PARAHEAD_NUMBER Reset parahead number
+
+ PREFIX_CH_NUM_WARNING Macro to abort PREFIX_CHAPTER_NUMBER
+ with a warning if the arg to CHAPTER isn't
+ a digit, and user hasn't supplied a digit
+ to PREFIX_CHAPTER_NUMBER
+ PREFIX_CHAPTER_NUMBER Prefix the chapter number to numbered
+ heads, subheads and paraheads
+-Paragraphs-
+ INDENT_FIRST_PARAS Indent 1st paras? (doc default=not indented)
+ PARA_INDENT Size of para indent
+ PARA_SPACE Put a line space before paras
+ PP_FONT Overall doc font
+
+-Quotes-
+ Q_FITS Utility macro for DO_QUOTE
+ Q_NOFIT Utility macro for DO_QUOTE
+ QUOTE_AUTOLEAD Leading of (block)quotes
+
+-Line/section breaks-
+ LINEBREAK_CHAR Linebreak character, iterations and positioning
+
+-Printstyle TYPEWRITE-
+ ITALIC_MEANS_ITALIC For TYPEWRITE; render .FT I in italic.
+ SLANT_MEANS_SLANT In TYPEWRITE, render \*[SLANT] as slant
+ UNDERLINE_ITALIC In TYPEWRITE, render .FT I as underlined
+ UNDERLINE_QUOTES In TYPEWRITE, underline quotes? (boolean)
+ UNDERLINE_SLANT In TYPEWRITE, render \*[SLANT] as underlined
+
+-Table of contents-
+ TOC_APPENDS_AUTHORS Appends author(s) to toc doc title entries
+ TOC_LEAD Leading of toc pages
+ TOC_PADDING Number of placeholders for toc entries page
+ numbers
+ TOC_HEAD_INDENT Indent of toc head entries
+ TOC_HEADER_STRING TOC header string (default=Contents)
+ TOC_PAGENUM_STYLE Page numbering style (hdrftr nums) of
+ toc pages
+ TOC_RV_SWITCH Switch L/R margins of toc pages
+ TOC_PARAHEAD_INDENT Indent of toc parahead entries
+ TOC_SUBHEAD_INDENT Indent of toc subhead entries
+ TOC_TITLE_ENTRY User supplied toc doc title entry
+ TOC_TITLE_INDENT Indent of toc doc title entries
+
+<span style="display: block; margin-top: -.75em; margin-bottom: -1em;">*Aliases for header/footer control macros</span>
+ HEADER_SIZE HDRFTR_SIZE
+ HEADER_RIGHT_PS HDRFTR_RIGHT_SIZE
+ HEADER_RIGHT_SIZE HDRFTR_RIGHT_SIZE
+ HEADER_RIGHT_FAM HDRFTR_RIGHT_FAMILY
+ HEADER_RIGHT_FAMILY HDRFTR_RIGHT_FAMILY
+ HEADER_RIGHT_FONT HDRFTR_RIGHT_FONT
+ HEADER_RIGHT_FT HDRFTR_RIGHT_FONT
+ HEADER_LEFT_PS HDRFTR_LEFT_SIZE
+ HEADER_LEFT_SIZE HDRFTR_LEFT_SIZE
+ HEADER_LEFT_FAM HDRFTR_LEFT_FAMILY
+ HEADER_LEFT_FAMILY HDRFTR_LEFT_FAMILY
+ HEADER_LEFT_FONT HDRFTR_LEFT_FONT
+ HEADER_LEFT_FT HDRFTR_LEFT_FONT
+ HEADER_CENTRE_PS HDRFTR_CENTER_SIZE
+ HEADER_CENTRE_SIZE HDRFTR_CENTER_SIZE
+ HEADER_FAM HDRFTR_FAMILY
+ HEADER_FAMILY HDRFTR_FAMILY
+ HEADER_CENTRE_FAM HDRFTR_CENTER_FAMILY
+ HEADER_CENTRE_FAMILY HDRFTR_CENTER_FAMILY
+ HEADER_CENTRE_FONT HDRFTR_CENTER_FONT
+ HEADER_CENTRE_FT HDRFTR_CENTER_FONT
+ HEADER_CENTER_PS HDRFTR_CENTER_SIZE
+ HEADER_CENTER_SIZE HDRFTR_CENTER_SIZE
+ HEADER_CENTER_FAM HDRFTR_CENTER_FAMILY
+ HEADER_CENTER_FAMILY HDRFTR_CENTER_FAMILY
+ HEADER_CENTER_FONT HDRFTR_CENTER_FONT
+ HEADER_CENTER_FT HDRFTR_CENTER_FONT
+ FOOTER_SIZE HDRFTR_SIZE
+ FOOTER_RIGHT_PS HDRFTR_RIGHT_SIZE
+ FOOTER_RIGHT_SIZE HDRFTR_RIGHT_SIZE
+ FOOTER_RIGHT_FAM HDRFTR_RIGHT_FAMILY
+ FOOTER_RIGHT_FAMILY HDRFTR_RIGHT_FAMILY
+ FOOTER_RIGHT_FONT HDRFTR_RIGHT_FONT
+ FOOTER_RIGHT_FT HDRFTR_RIGHT_FONT
+ FOOTER_LEFT_PS HDRFTR_LEFT_SIZE
+ FOOTER_LEFT_SIZE HDRFTR_LEFT_SIZE
+ FOOTER_LEFT_FAM HDRFTR_LEFT_FAMILY
+ FOOTER_LEFT_FAMILY HDRFTR_LEFT_FAMILY
+ FOOTER_LEFT_FONT HDRFTR_LEFT_FONT
+ FOOTER_LEFT_FT HDRFTR_LEFT_FONT
+ FOOTER_CENTRE_PS HDRFTR_CENTER_SIZE
+ FOOTER_CENTRE_SIZE HDRFTR_CENTER_SIZE
+ FOOTER_FAM HDRFTR_FAMILY
+ FOOTER_FAMILY HDRFTR_FAMILY
+ FOOTER_CENTRE_FAM HDRFTR_CENTER_FAMILY
+ FOOTER_CENTRE_FAMILY HDRFTR_CENTER_FAMILY
+ FOOTER_CENTRE_FT HDRFTR_CENTER_FONT
+ FOOTER_CENTER_PS HDRFTR_CENTER_SIZE
+ FOOTER_CENTER_SIZE HDRFTR_CENTER_SIZE
+ FOOTER_CENTER_FAM HDRFTR_CENTER_FAMILY
+ FOOTER_CENTER_FAMILY HDRFTR_CENTER_FAMILY
+ FOOTER_CENTER_FONT HDRFTR_CENTER_FONT
+ FOOTER_CENTER_FT HDRFTR_CENTER_FONT
+
+<span style="display: block; margin-top: -.5em; margin-bottom: -2.5em;">+++LETTER MACROS+++</span>
+
+ CLOSING Closing (i.e. Yours truly,)
+ CLOSING_INDENT Left indent of CLOSING
+ DATE Date for letters
+ FROM Addresser's name and address
+ GREETING Full salutation (e.g. Dear John Smith,)
+ NO_SUITE Remove suite page numbers from bottom of letter pages
+ SIGNATURE_SPACE Amount of room to leave for signature
+ TO Addressee's name and address
+ ALL_DONE .em (the "end macro") for letters
+
+<span style="display: block; margin-top: -.5em; margin-bottom: -2.5em;">+++SUPPORT+++</span>
+
+ CHECK_INDENT Applies indents to doc elements inside ev's
+ (head, subhead, etc)
+ CLEANUP_DEFAULTS Removes selected rregisters and strings
+ from DEFAULTS after START
+ DO_COVER Formats and outputs covers
+ DO_DOC_COVER Formats and outputs doc covers
+ D0_QUOTE Outputs quotes with space adjustments before
+ and after
+ DIVER_FN_1_PRE -+
+ DIVER_FN_2_PRE | Manage footnotes called inside diversions
+ | QUOTE, BLOCKQUOTE and EPIGRAPH
+ DIVER_FN_2_POST -+
+ DIVERT_FN_LEFTOVER Diverts excess fn stored in FN_OVERFLOW into
+ FOOTNOTE
+ DIVERT_FN_OVERFLOW Diverts excess fn stored in FN_OVERFLOW when
+ FN_DEFER into FOOTNOTE
+ DO_EPIGRAPH Outputs epigraphs with space adjustments before
+ and after
+ FN_OVERFLOW_TRAP Fixed at B_MARGIN; if footnotes run longer than
+ B_MARGIN, diverts excess into FN_OVERFLOW
+ GET_ROMAN_INDENT Figures out amount of space to reserve
+ for roman numerals in lists
+ HDRFTR_RULE Prints rule under header or over footer
+ MN_OVERFLOW_TRAP Trap-invoked macro to collect margin note
+ overflows
+ NO_SHIM Disable SHIM
+ PRINT_FOOTNOTE_RULE An alias of PRINT_FOOTNOTE; prints footnote
+ separator rule
+ PRINT_HDRFTR Prints header/footer (trap invoked)
+ PRINT_PAGE_NUMBER Invoked in HEADER or FOOTER
+ PRINT_USERDEF_HDRFTR Prints user defined, single string recto/verso
+ header/footer
+ PROCESS_SHIM Calculates #SHIM when \n[.d] is lower on the
+ page than #T_MARGIN
+ PROCESS_FN_IN_DIVER Processes footnotes gathered in a diversion (called
+ at page/column breaks)
+ REMOVE_INDENT Removes indents set with CHECK_INDENT
+ Q_FITS Handles spacing of quotes when quote fits on the page
+ Q_NOFIT Handles spacing of quotes when quote does not fit on
+ the page
+ QUIT_LISTS Exit lists cleanly and completely
+ SET_LIST_INDENT Restore indent of a prev. level of list
+ SHIM Advance to next "valid" baseline
+ TBL*CLEANUP Remove selected registers and strings created
+ by TS/TH/TE
+ TBL*GET_QUAD Establish quad of tbl caption
+ tbl*float-warning If tbl in a float exceeds page limits
+ tbl*print-header Administrivia for printing tbl headers
+ tbl@top-hook Trap-invoked (HEADER); prints running tbl header
+ and moves FOOTER/FN_OVERFLOW_TRAP_POS traps
+ to accommodate tbl
+ TERMINATE .em that ensures deferred footnotes get output
+ on final pages
+ TRAPS Sets hdrftr traps; optionally adjusts #DOC_LEAD
+ to fill page to #B_MARGIN
+ TYPEWRITER Sets family (C), font (R) and point size (12)
+ for PRINTSTYLE TYPEWRITE
+ VFP_CHECK Trap-sprung macro, 1 valid baseline higher than
+ where FOOTER will be sprung; checks whether
+ there is, in fact, just enough room for
+ another line of running text to be added to
+ the page without jamming footnotes too close
+ to running text.
+
+<span style="display: block; margin-top: -.5em; margin-bottom: -2.5em;">+++DIVERSIONS+++</span>
+
+ B_QUOTE Block (indented) quote text
+ CLOSING_TEXT Closing (i.e. Yours truly,)
+ EPI_TEXT Epigraph text
+ END_NOTES Endnotes text
+ FLOAT*DIV Float content
+ FN_IN_DIVER Footnotes gathered from inside a diversion
+ FN_OVERFLOW Excess footnotes when B_MARGIN is reached
+ FOOTNOTES Text of footnotes
+ GREETING Full salutation (e.g. Dear John Smith,)
+ LETTERHEAD&lt;n&gt; Date, addresser, addressee or greeting;
+ &lt;n&gt; is from 1 to 4, supplied by #FIELD
+ P_QUOTE Line for line (poetic) quote text
+ RUNON_FOOTNOTES Special diversion for run-on footnotes
+ RUNON_FN_IN_DIVER Special diversion for run-on footnotes inside
+ (block)quotes
+ tbl*header-div Running tbl header
+ TOC_ENTRIES TOC entries
+
+<span style="display: block; margin-top: -.5em; margin-bottom: -2.5em;">+++NUMBER REGISTERS+++</span>
+
+ #ADJ_BIB_LEAD Adjust BIB_LEAD? (boolean)
+ #ADJ_DOC_LEAD Adjust DOC_LEAD? (boolean)
+ #ADJ_EN_LEAD Adjust EN_LEAD? (boolean)
+ #ADJ_TOC_LEAD Adjust TOC_LEAD? (boolean)
+ #ADVANCE_FROM_TOP Distance from page top to start of
+ running text if no docheader
+ #ARG_NUM Keeps track of number of args passed to a
+ macro
+ #ARGS_TO_LIST Was LIST passed some args? (boolean)
+ #ATTRIBUTE_COLOR Colorize attribute string? (boolean)
+ #AUTHOR_&lt;n&gt; Strings passed to AUTHOR
+ #AUTHOR_COLOR Colorize author(s)? (boolean)
+ #AUTHOR_COVER_NUM Incrementing register used in defining
+ $AUTHOR_COVER_&lt;n&gt; strings
+ #AUTHOR_DOCCOVER_NUM Incrementing register used in defining
+ $AUTHOR_COVER_&lt;n&gt; strings
+ #AUTHOR_NUM Keeps track of user-defined string
+ AUTHOR_&lt;n&gt; in AUTHOR
+ #AUTHORS Equals final value of AUTHOR_NUM;
+ used for authors in doc header
+ #BASELINE_MARK In PP, the vertical position on the page
+ (when paragraph spacing is on) after a
+ quote or blockquote has been output and
+ the post-quote space has been added.
+ #BMARG Position of unvarying bottom margin
+ during doc processing; required for
+ collecting footnotes inside diversions
+ #BIB_ALLOWS_HEADERS Put headers on bib pages? (boolean)
+ #BIB_ALLOWS_HEADERS_ALL Put headers on all bib pages? (boolean)
+ #BIB_FIRST_PAGE Tells PRINT_PAGE_NUMBER about bibliography
+ first page number
+ #BIB_FIRST_PN Starting pagenumber for bibliographies
+ #BIB_HDRFTR_CENTER Put a center string in bib page headers?
+ (boolean)
+ #BIB_LEAD Bibliography lead, expressed in points
+ #BIB_LIST Output bibs in list style? (boolean)
+ #BIB_NO_COLS De-columnize bibliographies? (boolean)
+ #BIB_NO_FIRST_PN Put a page number on the first page of
+ bibliographies? (boolean)
+ #BIB_SINGLESPACE Single-space TYPEWRITE bibliographies? (boolean)
+ #BIB_SPACE Post item space for bibliography pages
+ #BIB_STRING_ADVANCE Vertical position of "BIBLIOGRAPHY" string
+ (relative to the top edge of the page)
+ #BIB_STRING_CAPS Capitalize bib title? (boolean)
+ #BIB_STRING_UNDERLINE Underscore bib title? 0=no; 1=yes; 2=double
+ #BIB_STRING_UNDERLINE_WEIGHT Underline weight in units
+ #BIB_STRING_UNDERLINE_WEIGHT_ADJ Underline weight/2
+ #BIB_PS Base point size for bibliography pages expressed
+ in points
+ #BIBLIOGRAPHY Are we doing a bib page? (boolean)
+ #BQ_AUTOLEAD Register created by BLOCKQUOTE_AUTOLEAD
+ #BQ_LEAD Leading of blockquotes
+ #BQUOTE_COLOR Colorize blockquotes? (boolean)
+ #BQUOTE_LN Number blockquotes? (boolean)
+ #CAP_HEIGHT_ADJUST Tallest cap height of strings LEFT, CENTER,
+ and RIGHT in footers; used to place rule
+ over footer
+ #CAPS_WAS_ON In HDRFTR, to re-enable running text CAPS
+ (boolean)
+ #CENTER_CAP_HEIGHT Cap height of CENTER string in
+ headers/footers
+ #CH_NUM The chapter number obtained by
+ PREFIX_CHAPTER_NUMBER
+ #CHAPTER_CALLED Has CHAPTER been invoked? (boolean); used
+ by PREFIX_CHAPTER_NUMBER to see whether
+ to try to get the chapter number from
+ the arg passed to CHAPTER
+ #CHAPTER_TITLE_NUM Incrementing register used to define strings
+ $CHAPTER_TITLE_&lt;n&gt;
+ #CHAPTER_TITLE_COLOR Colorize chapter title? (boolean)
+ #CLOSING Is there a closing (for letters)? (boolean)
+ #CODE_COLOR Colorize CODE? (boolean)
+ #CODE_SIZE_ADJ Percentage by which to scale CODE font
+ #COL_L_LENGTH Line length of columns
+ #COL_&lt;n&gt;_L_MARGIN Left margin of column &lt;n&gt;
+ #COL_NEXT Was COL_NEXT invoked? (boolean; used in
+ FOOTER)
+ #COL_NUM Incrementing counter of num of columns;
+ for use with #COL_&lt;n&gt;_L_MARGIN
+ #COL_TOTAL #COL_L_LENGTH + #GUTTER; used to calculate
+ #COL_&lt;n&gt;_L_MARGIN
+ #COLLATE Are we performing a COLLATE? (boolean)
+ #COLLATED_DOC If 1, instructs TOC that this is a collated
+ doc
+ #COLUMNS Are columns turned on? (boolean)
+ #COLUMNS_WERE_ON Stores columnar state prior to outputting
+ endnotes in no-columns mode
+ #COPY_STYLE 1=draft, 2=final
+ #COUNTERS_RESET Tells FOOTNOTE if fn counters have
+ been reset because of footnotes gathered
+ inside a diversion
+ #COVER Print a COVER? (boolean)
+ #COVER_ATTRIBUTE_COLOR Colorize cover attribution string? (boolean)
+ #COVER_AUTHOR Put AUTHOR(s) on COVER? (boolean)
+ #COVER_AUTHOR_COLOR Colorize cover author(s)? (boolean)
+ #COVER_BLANKPAGE Output blankpage after COVER? (boolean)
+ #COVER_COLOR Colorize COVER? (boolean)
+ #COVER_COPYRIGHT Put copyright on COVER? (boolean)
+ #COVER_COPYRIGHT_COLOR Colorize cover copyright line? (boolean)
+ #COVER_DOCTYPE Put doctype on COVER? (boolean)
+ #COVER_DOCTYPE_COLOR Colorize cover doctype? (boolean)
+ #COVER_END Are we ending a COVER? (boolean)
+ #COVER_LEAD Cover leading
+ #COVER_MISC Put misc on COVER? (boolean)
+ #COVER_MISC_COLOR Colorize cover misc line? (boolean)
+ #COVER_RULE_WEIGHT Doctype underline weight on COVER
+ #COVER_RULE_WEIGHT_ADJ COVER_RULE_WEIGHT/2
+ #COVER_START_POS Vertical starting pos of cover material
+ #COVER_SUBTITLE Put subtitle on COVER? (boolean)
+ #COVER_TITLE Put title on COVER? (boolean)
+ #COVER_TITLE_NUM Number of cover title items
+ #COVER_TITLE_COLOR Colorize cover title? (boolean)
+ #COVER_SUBTITLE_COLOR Colorize cover subtitle? (boolean)
+ #COVER_UNDERLINE Underline doctype on COVER? (boolean)
+ #COVER_UNDERLINE_WEIGHT Doctype underline weight on COVER
+ #COVER_UNDERLINE_WEIGHT_ADJ COVER_UNDERLINE_WEIGHT/2
+ #CURRENT_V_POS \n[.d] ; used in SHIM
+ #COVERS Print covers? (boolean)
+ #COVERS_COUNT Include COVER in pagination scheme? (boolean)
+ #COVERS_OFF Don't print COVERs (boolean)
+ #DATE_FIRST Was .DATE invoked as first letter
+ header after .START? (boolean)
+ dc "mark" register for document columns
+ DD Vert. space before and after eqn blocks
+ defer / new-defer Appended to FLOAT*DIV: if float deferred
+ #DEFER_BIB_SPACING Tells DEFAULTS to do BIBLIOGRAPHY_SPACING
+ if it was called before START
+ #DEFER_PAGINATION Tells COLLATE to restore pagination (from
+ RESTORE_PAGINATION
+ #DEFER_SPACE_ADDED Was space added between two "first" footnotes that
+ appear on the same page? (boolean)
+ #DELAY_SHIM Instructs DO_QUOTE to delay SHIM when quote
+ falls at the top of a page
+ #DEPTH LIST depth
+ #DEPTH_1 Doc header depth with lead adjustment
+ (#DOCHEADER_LINES * #DOCHEADER_LEAD)
+ #DEPTH_2 Doc header depth without lead adjustment
+ (#DOCHEADER_LINES * #DOC_LEAD)
+ #DEPTH_TO_B_MARGIN Page length minus #B_MARGIN
+ D-float Depth of float containing/ending with
+ DRH, DRV, DBX, or DCL
+ DI eqn indent if EQ I
+ #DIVER_FN Register that tells FOOTNOTE whether to
+ "move" or "defer" a footnote collected
+ inside a diversion
+ #DIVERSIONS_HY_MARGIN A reasonable value for .hym applied to
+ QUOTE, BLOCKQUOTE and EPIGRAPH to
+ avoid excessive hyphenation if these are
+ set quad left
+ #DIVERTED Set to 1 in DIVERT_FN_OVERFLOW; reset
+ subsequently in FOOTNOTES when called by
+ PROCESS_FN_LEFTOVER to 2 or 3 for use by
+ FOOTER to decide whether to in/decrease
+ #FN_DEPTH when outputting footnotes
+ #DOC_COVER Are we doing a DOC_COVER? (boolean)
+ #DOC_COVER_AUTHOR Put AUTHOR(s) on DOC_COVER? (boolean)
+ #DOCCOVER_BLANKPAGE Output blank page after DOC_COVER? (boolean)
+ #DOC_COVER_CHAPTER_TITLE_COLOR Colorize CHAPTER_TITLE on DOC_COVER? (boolean)
+ #DOC_COVER_COPYRIGHT Put copyright on DOC_COVER? (boolean)
+ #DOC_COVER_DOCTYPE Put doctype on DOC_COVER? (boolean)
+ #DOCCOVER_END Are we finishing a DOC_COVER? (boolean)
+ #DOC_COVER_LEAD Doc cover leading
+ #DOC_COVER_MISC Put misc on DOC_COVER? (boolean)
+ #DOC_COVER_START_POS Vertical starting pos of doc cover material
+ #DOC_COVER_COLOR Colorize cover? (boolean)
+ #DOC_COVER_START_POS Vertical starting pos of cover material
+ #DOC_COVER_TITLE_COLOR Colorize doc cover title? (boolean)
+ #DOC_COVER_SUBTITLE_COLOR Colorize doc cover subtitle? (boolean)
+ #DOC_COVER_ATTRIBUTE_COLOR Colorize doc cover attribution string? (boolean)
+ #DOC_COVER_AUTHOR_COLOR Colorize doc cover author(s)? (boolean)
+ #DOC_COVER_DOCTYPE_COLOR Colorize doc cover doctype? (boolean)
+ #DOC_COVER_COPYRIGHT_COLOR Colorize doc cover copyright line? (boolean)
+ #DOC_COVER_MISC_COLOR Colorize doc cover misc line? (boolean)
+ #DOC_COVER_SUBTITLE Put subtitle on DOC_COVER? (boolean)
+ #DOC_COVER_TITLE Put title on DOC_COVER? (boolean)
+ #DOC_COVER_TITLE_NUM Number of doc cover title items
+ #DOC_COVERS Print doc covers? (boolean)
+ #DOC_COVERS_OFF Don't print DOC_COVERs (boolean)
+ #DOCCOVER_RULE_WEIGHT Doctype underline weight on DOC_COVER
+ #DOCCOVER_RULE_WEIGHT_ADJ DOCCOVER_RULE_WEIGHT/2
+ #DOCCOVER_UNDERLINE Underline doctype on DOC_COVER? (boolean)
+ #DOCCOVER_UNDERLINE_WEIGHT Doctype underline weight on DOC_COVER
+ #DOCCOVER_UNDERLINE_WEIGHT_ADJ DOCCOVER_UNDERLINE_WEIGHT/2
+ #DOCCOVERS_COUNT Include DOC_COVER in pagination scheme? (boolean)
+ #DOC_HEADER Whether to print a doc header (boolean)
+ #DOC_LEAD_ADJ Incrementing value (in units) added to
+ #DOC_LEAD to fill page to #B_MARGIN
+ #DOC_LEAD Leading used in body
+ #DOC_L_LENGTH Global L_LENGTH
+ #DOC_L_MARGIN Global L_MARGIN
+ #DOC_LR_MARGIN_TMP In HEADER, if RECTO_VERSO=1, temporarily
+ holds DOC_L_MARGIN during page margin switch
+ #DOC_PT_SIZE Point size used for body text
+ #DOC_R_MARGIN Global R_MARGIN
+ #DOC_TYPE 1=default, 2=chapter, 3=named, 4=letter
+ #DOCHEADER_ADVANCE Distance from top-of-page to baseline of
+ docheader
+ #DOCHEADER_COLOR Colorize docheader? (boolean)
+ #DOCHEADER_DEPTH Depth of docheader
+ #DOCHEADER_LEAD Lead of doc header
+ (#DOC_LEAD + #DOCHEADER_LEAD_ADJ)
+ #DOC_LEAD_ADJUST_OFF Don't adjust DOC_LEAD (boolean)
+ #DOCS Always 1 after START
+ #DOCTITLE_NUM Number of doctitle items
+ #DOCTYPE_COLOR Colorize doctype? (boolean)
+ #DOCTYPE_RULE_WEIGHT Doctype underline weight
+ #DOCTYPE_RULE_WEIGHT_ADJ DOCTYPE_RULE_WEIGHT/2
+ #DOCTYPE_UNDERLINE Underline doctype? (boolean)
+ #DOCTYPE_UNDERLINE_WEIGHT Weight of doctype underline
+ #DOCTYPE_UNDERLINE_WEIGHT_ADJ DOCTYPE_UNDERLINE_WEIGHT/2
+ #DOING_COVER Tells PRINT_AUTHORS that it's printing
+ the authors for a cover or doc cover
+ #DONE_ONCE Keeps track of how many times footnotes
+ have been collected inside the same diversion
+ #DONT_RULE_ME Rule this (apparent) first footnote? (boolean)
+ #DIVER_LN_OFF Turn linenumbering off in (block)quotes?
+ (boolean)
+ #DRAFT_WITH_PAGENUM Are we attaching draft/revision info to page
+ number? (boolean)
+ #EM_ADJUST Amount to raise \(em at END
+ #EN_ALLOWS_HEADERS Put page headers on endnotes pages? (boolean)
+ #EN_ALLOWS_HEADERS_ALL Put page headers on all endnotes pages?
+ (boolean)
+ #EN_BQ_AUTOLEAD Register created by EN_BLOCKQUOTE_AUTOLEAD
+ #EN_BQ_LEAD Leading of blockquotes on endnotes pages
+ #EN_FIGURE_SPACE Width of \0, for use with formatting endnotes
+ #EN_FIRST_PAGE Tells PRINT_PAGE_NUMBER about endnotes
+ first page number
+ #EN_FIRST_PN Page number that appears on page 1 of
+ endnotes pages.
+ #EN_HDRFTR_CENTER Should we print centre string of
+ headers/footers on endnotes pages? (boolean)
+ #EN_LEAD Lead of endnotes
+ #EN_LN_BRACKETS Are we using brackets for line-numbered
+ endnotes (boolean)
+ #EN_LN_SEP Are we using a separator for line-numbered
+ endnotes (boolean)
+ #EN_MARK \n[ln] when \*[EN-MARK] is called
+ #EN_MARK_2 \n[ln] when ENDNOTE is called
+ #EN_MARKER_STYLE 1=NUMBER; 2=LINE
+ #EN_NO_COLS Do not set endnotes in columns? (boolean)
+ #EN_NO_FIRST_PN Put pagenumber on 1st page of endnotes?
+ (boolean)
+ #EN_NUMBER Number of current endnote
+ #EN_NUMBER_PLACEHOLDERS Number of placeholders to reserve for endnotes
+ numbers
+ #EN_NUMBERS_ALIGN_RIGHT Hang and align endnote numbers right?
+ (boolean)
+ #EN_NUMBERS_ALIGN_LEFT Align endnote numbers with left margin?
+ (boolean)
+ #EN_NUMBERS_PLACEHOLDERS Number of placeholders when endnote numbers
+ hang and align right
+ #EN_NUMBER_L_LENGTH Line length for endnote numbers when they're
+ right aligned
+ #EN_PP_INDENT First line indent of paras in multi-para
+ endnotes
+ #EN_PP_SPACE Space multi-paras in endnotes? (boolean)
+ #EN_PS ps of endnotes
+ #EN_Q_AUTOLEAD Register created by EN_QUOTE_AUTOLEAD
+ #EN_Q_LEAD Leading of quotes on endnotes pages
+ #EN_REF Put REFs in endnotes? (boolean)
+ #EN_SINGLESPACE Single space endnotes pages? (boolean)
+ #EN_STRING_ADVANCE Vertical position of "ENDNOTES" string (relative to
+ the top edge of the page)
+ #EN_STRING_CAPS Should ENDNOTES capitalize the endnotes
+ string? (boolean)
+ #EN_STRING_UNDERLINE Underscore endnotes page head? (boolean)
+ #EN_STRING_UNDERLINE_WEIGHT Weight of endnotes page title underscore
+ #EN_STRING_UNDERLINE_WEIGHT_ADJ EN_STRING_UNDERLINE_WEIGHT_ADJ/2
+ #EN_TEXT_INDENT Page offset for text of endnotes when
+ numbers right align
+ #EN_TITLE_UNDERLINE Underscore endnotes document identifier?
+ (boolean)
+ #EN_TITLE_UNDERLINE_WEIGHT Weight of endnotes document identification
+ underscore
+ #EN_TITLE_UNDERLINE_WEIGHT_ADJ #EN_STRING_UNDERLINE_WEIGHT_ADJ/2
+ #END_QUOTE For PP=0 indenting; did we just end a quote?
+ (boolean)
+ #ENDNOTE Are we in an endnote? (boolean)
+ #ENDNOTE_REFS Are REFs going to endnotes? (boolean)
+ #ENDNOTES Are we in an endnote (for FOOTERs; boolean)
+ #EPI_ACTIVE Are we in an epigraph? (boolean)
+ #EPI_AUTOLEAD Autolead value for epigraphs
+ #EPI_COLOR Colorize epigraphs? (boolean)
+ #EPI_DEPTH Depth of epigraph from first baseline to
+ last
+ #EPI_FITS Does epigraph fit on page/column? (boolean)
+ #EPIGRAPH Did we have an epigraph? (boolean)
+ #EPI_LEAD_DIFF Difference between #DOC_LEAD and #EPI_LEAD
+ #EPI_LEAD Leading of epigraph; set by AUTOLEAD
+ #EPI_LINES_EVEN Even # of lines at end of epi crossing page in
+ TYPEWRITE (d-spaced)?
+ #EPI_LINES Number of lines in the epigraph
+ #EPI_LINES_TO_END Number of epigraph lines remaining after
+ footer trap is sprung
+ #EPI_LINES_TO_TRAP Number of epigraph lines till footer trap is
+ sprung
+ #EPI_L_LENGTH Epigraph line length
+ #EPI_OFFSET Left margin of epigraphs
+ #EPI_OFFSET_VALUE Epigraph indent as a function of page offset
+ #EPI_ON Are we in an epigraph? (boolean)
+ #EPI_WHITESPACE Space after epigraph to compensate for
+ epigraph leading
+ #FIELD Incrementing register tacked onto LETTERHEAD
+ #FINIS Was FINIS invoked? (boolean)
+ #FINIS_STRING_CAPS Capitalize finis string? (boolean)
+ #FINIS_COLOR Colorize FINIS? (boolean)
+ #FIRST_DOC_TITLE_PN Page number of 1st (collated) doc (for TOC)
+ #FIRST_DOC_TOC_PN_PADDING Padding for 1st page number of 1st (collated) doc
+ (for TOC)
+ float*after-shim / \n[nl]; tests if SHIM has stayed on the same
+ float*before-shim baseline
+ float-span Float can run to multiple pages? (boolean)
+ float*with-tbl Float contains a tbl block
+ #FN_AUTOLEAD Autolead value of footnotes
+ #FN_BL_INDENT Left indent of INDENT BOTH in footnotes
+ #FN_BR_INDENT Right indent of INDENT BOTH in footnotes
+ #FN_COUNT Which fn marker to print; also to
+ tell mom to reserve space for and print
+ the rule above footnotes
+ #FN_COUNT_AT_FOOTER The FN_COUNT after FOOTNOTES has been
+ output in FOOTER
+ #FN_COUNT_FOR_COLS Holds a separate footnote count for columns
+ (so they don't reset to 0 1 until page break)
+ #FN_DEFER Defer footnote to next page/column? (boolean)
+ If 0, don't defer.
+ #FN_DEFER_SPACE Whether to deposit space before
+ footnote 1 because there's a deferred
+ footnote on the page
+ #FN_DEPTH Depth of footnote diversion(s)
+ #FN_FOR_EPI Signals to epigraph that a footnote is being
+ processed
+ #FN_GAP When there are footnotes on a page, the
+ difference between where FOOTER will be
+ sprung and the next valid baseline.
+ Used in VFP_CHECK.
+ #FN_LEAD Lead in footnotes after FN_AUTOLEAD is
+ applied
+ #FN_L_INDENT Left indent of INDENT LEFT in footnotes
+ #FN_LINES Number of lines in fn; used to calculate
+ fn depth
+ #FN_LN_BRACKETS Are footnote linenumber brackets being used?
+ (boolean)
+ #FN_LN_SEP Is a footnote linenumber separator being used?
+ (boolean)
+ #FN_MARK \n[ln] when \*[FN-MARK] is called
+ #FN_MARK_2 \n[nl] when FOOTNOTE is called
+ #FN_MARKER_STYLE 1=STAR; 2=NUMBER
+ #FN_MARKERS Print footnote markers? (boolean)
+ #FN_NUMBER The footnote number attached to running text
+ (and fns) when numbers instead of
+ star/dagger is being used for footnootes
+ numbers
+ #FN_OVERFLOW_DEPTH Depth of leftover from footnote processing
+ #FN_OVERFLOW_TRAP_POS The register that sets the position of
+ trap FN_OVERFLOW_TRAP.
+ #FN_R_INDENT Right indent of INDENT RIGHT in footnotes
+ #FN_REF Put REFs in footnotes? (boolean)
+ #FN_RULE Print fn rule? (boolean)
+ #FN_RULE_ADJ # of points to raise footnote separator from
+ its baseline
+ #FN_RULE_LENGTH Length of footnote separator rule
+ #FN_RULE_WEIGHT Weight of the footnote separator rule
+ #FN_RULE_WEIGHT_ADJ FN_RULE_WEIGHT/2
+ #FN_WAS_DEFERED Tells HEADER about a deferred footnote
+ #FOOTER_DIFF In TRAPS, the difference between the
+ original #B_MARGIN and #VISUAL_B_MARGIN
+ #FOOTER_GAP Amount of space between end of text and
+ page #
+ #FOOTER_MARGIN Amount of space between page # and bottom
+ of page
+ #FOOTER_POS Position of footer trap (required for
+ collecting footnotes inside a diversion)
+ #FOOTER_RULE Print footer rule? (boolean)
+ #FOOTER_RULE_GAP Gap between footer and separator rule above
+ #FOOTER_RULE_WEIGHT Weight of footer rule
+ #FOOTER_RULE_WEIGHT_ADJ #FOOTER_RULE_WEIGHT/2
+ #FOOTERS_ON Are we using footers? (boolean)
+ #FOOTERS_WERE_ON Were footers on? - used in FINIS and BLANKPAGE
+ (boolean)
+ #FOOTNOTE_COLOR Colorize footnotes? (boolean)
+ #FORCE Force float? (boolean)
+ #FROM_BIB_STRING Tells UNDERSCORE it's underscoring $BIB_STRING
+ #FROM_COVER Tells UNDERSCORE it's underscoring on a cover
+ #FROM_DOC_COVER Tells UNDERSCORE it's underscoring on a doccover
+ #FROM_DOCTYPE Tells UNDERSCORE it's underscoring the doctype
+ #FROM_EN_STRING Tells UNDERSCORE it's underscoring $EN_STRING
+ #FROM_EN_TITLE Tells UNDERSCORE it's underscoring $EN_TITLE
+ #FROM_HEAD Tells UNDERSCORE it's underscoring a head
+ #FROM_DIVERT_FN Signals to FOOTNOTE, when run from
+ within DIVERT_FN_LEFTOVER, to set
+ #SPACE_REMAINING to the total area
+ allowable for running text
+ #FROM_FOOTER In col to col footnote processing, tells
+ FOOTNOTE that FOOTNOTES was output from
+ FOOTER.
+ #FROM_HEADER In col to col footnote processing, tells
+ FOOTNOTE that FOOTNOTES was output from
+ HEADER.
+ #FULLSPACE_QUOTES Should we fullspace quotes? (boolean)
+ #GET_DC_HEIGHT Used in routine to get the correct point size for
+ dropcaps
+ #GET_DEPTH Signals to FOOTNOTE that it should
+ measure the depth of current footnotes
+ plus the most recently added one, except
+ where the footnote is to be deferred to
+ the next page or column
+ #GUTTER Width of gutter between columns
+ #H_BASELINE_ADJ Vertical spacing adjustment for heads (default=0)
+ #HDRFTR_BOTH Are we setting both headers and footers? (boolean)
+ #HDRFTR_CENTER_CAPS CENTER part of header/footer in caps?
+ (boolean; default=off)
+ #HDRFTR_CENTER_COLOR Colorize header/footer center? (boolean)
+ #HDRFTR_COLOR Colorize headers/footers? (boolean)
+ #HDRFTR_CTR_PAD_LEFT Amount of hdrftr CENTER padding on the left
+ #HDRFTR_CTR_PAD_RIGHT Amount of hdrftr CENTER padding on the right
+ #HDRFTR_CTR_PAD_TMP Temp storage of left hdrftr CENTER padding
+ (for recto/verso switch)
+ #HDRFTR_HEIGHT Cap height of $HDRFTR_RECTO/$HDRFTR_VERSO
+ strings
+ #HDRFTR_LEFT_CAPS Left part of header/footer in caps?
+ (boolean; default=off)
+ #HDRFTR_LEFT_COLOR Colorize header/footer left? (boolean)
+ #HDRFTR_PT_SIZE Initial point size of headers/footers
+ #HDRFTR_RECTO_CAPS Header/footer recto caps? (boolean)
+ #HDRFTR_RIGHT_CAPS Right part of header/footer in caps?
+ (boolean; default=on)
+ #HDRFTR_RIGHT_COLOR Colorize header/footer right? (boolean)
+ #HDRFTR_RULE Print head/footer rule? (boolean)
+ #HDRFTR_RULE_COLOR Colorize header/footer rule? (boolean)
+ #HDRFTR_RULE_GAP Space between header/footer and
+ header/footer rule
+ #HDRFTR_RULE_WEIGHT Weight of header/footer rule
+ #HDRFTR_RULE_WEIGHT_ADJ HDRFTR_RULE_WEIGHT/2
+ #HDRFTR_TMP_CAPS_SWITCH Temporarily holds HDRFTR_LEFT_CAPS value if
+ #SWITCH_HDRFTR=1
+ #HDRFTR_VERSO_CAPS Header/footer verso caps? (boolean)
+ #HEAD 1=main/section head 2=subhead
+ #HEAD_CAPS Print section titles in caps? (boolean)
+ #HEAD_COLOR Colorize heads? (boolean)
+ #HEADER_GAP Distance from header to running text
+ #HEAD_NUM Head number
+ #HEAD_SPACE 2 line spaces before heads? (boolean)
+ #HEAD_UNDERLINE Underline heads? (boolean)
+ #HEAD_UNDERLINE_WEIGHT Head underline weight
+ #HEAD_UNDERLINE_WEIGHT_ADJ HEAD_UNDERLINE_WEIGHT/2
+ #HEADER_MARGIN Distance from top of page to header
+ #HEADER_RULE Print header rule? (boolean)
+ #HEADER_RULE_GAP Gap between header and header rule
+ #HEADER_RULE_WEIGHT Header rule weight
+ #HEADER_RULE_WEIGHT_ADJ HEADER_RULE_WEIGHT/2
+ #HEADERS_ON Headers on? (boolean)
+ #HEADER_STATE Saves header state in COLLATE for use in
+ START after COLLATE
+ #HEADERS_WERE_ON Were headers on? - used in BLANKPAGE (boolean)
+ #HF_OFF Has HEADERS_AND_FOOTERS been turned off? (boolean)
+ #HORIZ_MARK Horizontal
+ #HOW_MANY Number of blank pages to output
+ #IGNORE Should we ignore this macro? Set to 1 in
+ TYPEWRITE.
+ #IN_BIB_LIST Tells ITEM we're doing a bibliography in
+ list style
+ #INDENT_FIRST_PARAS Indent first paras? (boolean)
+ #INDENT_FIRSTS Tells footnotes to leave INDENT_FIRST_PARAS
+ alone if it's on for running text.
+ #ITALIC_MEANS_ITALIC For TYPEWRITE. (boolean)
+ #ITEM Counter for removing _1, _2, _3... strings
+ in TITLE, CHAPTER_TITLE, etc.
+ #L_LENGTH_FOR_EPI Stores line length at top of doc for use
+ with EPIGRAPH when columns are on
+ #L_MARGIN_DIFF Difference between DOC_L_MARGIN and
+ L_MARGIN
+ #LB_CHAR_ITERATIONS Number of linebreak character iterations
+ #LEFT_CAP_HEIGHT Cap height of left string in headers/footers
+ #VALID_BASELINE Calculates vert. position of next valid
+ baseline in SHIM
+ #LETTER_STYLE 1=BUSINESS 2=PERSONAL
+ #LINEBREAK Did we have a linebreak? (boolean)
+ #LINEBREAK_COLOR Colorize linebreak? (boolean)
+ #LINENUMBER_COLOR Colorize linenumbers? (boolean)
+ #LINENUMBERS Holds various states of line-numbering when
+ line numbering is enabled
+ #LINES_PER_PAGE # of lines (at DOC_LEAD) that fit on
+ page after #B_MARGIN is set
+ #LN Test 1st arg to NUMBER_LINES for digit or string
+ MN-active Are we doing a margin note? (boolean)
+ MN-curr Current margin note
+ MN-div-&lt;n&gt;-depth Depth of margin note &lt;n&gt;
+ MN-hy Hyphenation flag of margin notes
+ #MNinit Have margin notes been initialized? (boolean)
+ #MNinit_DEFERRED Did we have to defer a margin note? (boolean)
+ MN-last-pos Baseline of previous margin note
+ MN-lead-adj Difference between the current DOC_LEAD and the
+ leading used in margin notes
+ MN-left Number of current left margin note
+ MN-left-start Horizontal start position of left margin note
+ MN-left-width Width of left margin note
+ MN-right Number of current right margin note
+ MN-right-start Horizontal start position of right margin note
+ MN-right-width Width of right margin note
+ MN-sep Gutter between margin notes and running text
+ MN-shifted Did we have to shift a margin note down?
+ (boolean)
+ MN-size Point size of margin notes
+ MN-spacing Leading of margin notes
+ #MISC_&lt;n&gt; Used to print "next" misc lines in DO_COVER
+ #MISC_COVER_NUM Number of cover misc items
+ #MISC_DOCCOVER_NUM Number od doc cover misc items
+ #MISC_NUM Number of MISC items
+ #MISCS =#MISC_NUM in DO_COVER
+ #MN_OVERFLOW_LEFT If 1, left margin note text overflows
+ #MN_OVERFLOW_RIGHT If 1, right margin note text overflows
+ #n%_AT_PAGENUM_SET Page # from n% when PAGENUMBER invoked
+ #NEEDS_SPACE Instruct FOOTNOTE, when called by
+ PROCESS_FN_IN_DIVER, that if the footnote
+ had to be deferred, the VFP must be
+ raised by 1v (set in DIVER_FN_2_PRE)
+ #NEITHER Should we print no covers? (boolean)
+ #NEXT_AUTHOR Supplies correct digit to AUTHOR_&lt;n&gt;
+ when printing authors in doc header
+ #NEXT_LN Next linenumber when \n[ln] has to be stored
+ because linenumbering suspended
+ #NEXT_MISC Incrementing counter for misc lines in
+ DO_COVER
+ #NEXT_SUBTITLE Incrementing register used to print subtitles
+ #no-repeat-MN-left Don't repeat left margin note (boolean)
+ #no-repeat-MN-right Don't repeat right margin note (boolean)
+ #NO_BACK_UP Instructs FN_OVERFLOW_TRAP not to
+ subtract 1 line of footnote lead from
+ FN_OVERFLOW in a PREV_FN_DEFERRED
+ situation.
+ #NO_BREAK Set to 1 in COLLATE if last line of
+ text before COLLATE falls at the bottom
+ of the page; instructs NEWPAGE to use
+ 'br instead of .br
+ #NO_COLUMNS Don't print document in columns (boolean)
+ #NO_FN_MARKER Don't print footnote markers (boolean)
+ #NO_SHIM Should SHIM shim? (boolean)
+ #NO_SPACE When para spacing is active, instructs
+ PP not to add space after a quote or blockquote
+ #NO_TRAP_RESET Should we reset page traps? (boolean)
+ #NOT_YET_ADJUSTED Line on which a footnote was called has not yet
+ been adjusted by groff (boolean)
+ #NUM_AUTHORS # of authors mod 2 to test if odd or even
+ # of authors
+ #NUM_MISCS Number of args passed to MISC
+ #NUM_MISCS_COVER Number of args passed to MISC COVER
+ #NUM_MISCS_DOCCOVER Number of args passed to MISC DOC_COVER
+ #NUMBER_HEAD Are heads numbered? (boolean)
+ #NUMBER_PH Are paraheads numbered? (boolean)
+ #NUMBER_SH Are subheads numbered? (boolean)
+ #NUMBER_SSH Are subsubheads numbered? (boolean)
+ #NUM_COLS Number of columns per page
+ #NUMBERED If set to 1, lets PARAHEAD know that
+ main-, sub-, and subsubhead numbers have already been
+ prefixed to the parahead string
+ #NUM_FIELDS Incrementing register used to match
+ #TOTAL_FIELDS
+ #OK_PROCESS_LEAD Initial processing of TOC and endnote
+ leading is deferred until OK_PROCESS_LEAD=1
+ #ORIGINAL_B_MARGIN The value for #B_MARGIN as set by the
+ macro B_MARGIN
+ #ORIG_DOC_LEAD DOC_LEAD before endnotes, bibliographies, tocs
+ #ORIG_L_LENGTH \\n[.l] before starting LISTs
+ #ORIGINAL_DOC_LEAD The lead for PRINT_STYLE 1 as set in
+ PRINTSTYLE; required so that PRINT_STYLE 1
+ footnotes have an unadjusted lead of
+ 12 points
+ #OVERFLOW Signals to FOOTNOTE that some of the
+ footnote text won't fit on the page
+ #OVERFLOW_LEFT Does left margin note overflow? (boolean)
+ #OVERFLOW_RIGHT Does right margin note overflow? (boolean)
+ #P Page number for margin notes
+ #PAD_LIST_DIGITS&lt;n&gt; Pad LIST digits for LIST &lt;n&gt;? (boolean)
+ #PAGE_NUM_ADJ What to add to n% to get #PAGENUMBER
+ #PAGE_NUM_H_POS 1=left 2=CENTER 3=right; default=2
+ #PAGE_NUM_COLOR Colorize pagenumbers? (boolean)
+ #PAGE_NUM_HYPHENS Print hyphens surrounding page numbers?
+ (boolean)
+ #PAGE_NUM_HYPHENS_SET Did user set (or unset) hyphens around page
+ numbers? (boolean)
+ #PAGE_NUM_POS_SET Did user set page number position? (boolean)
+ #PAGE_NUM_SET Test if PAGE_1_NUM was used to set 1st page
+ number
+ #PAGE_NUM_V_POS 1=top 2=bottom; default=2
+ #PAGE_NUMS Print page numbers? (boolean)
+ #PAGE_POS Exact position on page during a diversion
+ (required for collecting footnotes inside
+ a diversion)
+ #PAGE_TOP \n[nl] after HEADER completes itself
+ #PAGENUM_STYLE_SET Did we set pagenumber style? (boolean)
+ #PAGENUMBER The page number
+ #PAGES Number of blank pages to output
+ #PAGINATE Are we paginating? (boolean)
+ #PAGINATE_TOC Is toc pagination on? (boolean)
+ #PAGINATE_WAS_ON Keeps track of pagination state while
+ outputting blank pages
+ #PAGINATION_STATE Saves pagination state in COLLATE for use in
+ START after a COLLATE
+ #PAGINATION_WAS_ON Was pagination on? - used in FINIS (boolean)
+ #PH_COLOR Colorize paraheads? (boolean)
+ #PH_INDENT Size of parahead indent
+ #PH_NUM Parahead number
+ #PP 0 at first para; auto-increments
+ #PP_AT_PAGE_BREAK # of last (incl. partial) para on page
+ #PP_INDENT How much to indent paras
+ #PP_SPACE Put space before paras? (boolean)
+ #PP_SPACE_SUSPEND Suspend para spacing for blockquotes and
+ epigraphs
+ #PP_STYLE_PREV In footnotes, stores PP style in effect
+ prior to invoking FOOTNOTE
+ #PP_STYLE Regular para=1; quote or epi para=2
+ #PRE_COLLATE Set to 1 in COLLATE; prevents FAMILY
+ from clobbering a user-set DOC_FAMILY
+ #PREFIX_CH_NUM Prefix the chapter number to numbered
+ heads, subheads and/or paraheads? (boolean)
+ #PREV_FN_DEFERRED Was previous footnote deferred? (boolean)
+ #PRINT_PAGENUM_ON_PAGE_1 Should we print the page number on first
+ page of doc when footers are on? (boolean)
+ #PRINT_STYLE Typewrite=1, typeset=2
+ #PT_SIZE_IN_UNITS Stored value of \n[.ps] from last time
+ PT_SIZE was called
+ #Q_AUTOLEAD Register created by QUOTE_AUTOLEAD
+ #Q_DEPTH Depth of quote
+ #Q_FITS Does this quote fit on one page/column?
+ (boolean)
+ #Q_LEAD Leading of quotes
+ #Q_LEAD_DIFF Difference between leading of running text
+ and the leading used in quotes/blockquotes
+ #Q_LEAD_REAL Leading of quotes and blockquotes saved at the
+ ends of their respective diversions
+ #Q_L_LENGTH Line length of quotes
+ #Q_OFFSET Page offset for quotes
+ #Q_OFFSET_VALUE Factor by which to multiply PP_INDENT to
+ offset quotes
+ #Q_PARTIAL_DEPTH The amount of a quote/blockquote that fits at
+ the bottom of a page when a quote/blockquote
+ spans pages
+ #Q_PP In PP, stores para # in QUOTE. Removed in
+ ENDQUOTE.
+ #Q_SPACE_ADJ The flexible amount of whitespace to add before
+ and after a quote/blockquote
+ #Q_TOP Vertical place on page that a quote starts
+ #QUOTE 1=PQUOTE, 2=BQUOTE
+ #QUOTE_COLOR Colorize quotes (poetic)? (boolean)
+ #QUOTE_LN Linenumber quotes? (boolean)
+ #RECTO_VERSO Switch HEADER_LEFT and HEADER_RIGHT on
+ alternate pages? (boolean)
+ ref*suppress-period Suppress period at end of ref field? (boolean)
+ ref*type Kind of reference we're building
+ #REF Was REF called? (boolean)
+ #REF_HY Hyphenate REFs? (boolean)
+ #REF_WARNING Have we issued a ref warning? (boolean)
+ #REPEAT Number of times to repeat linebreak
+ character
+ #RERUN_TRAPS Should we invoke TRAPS? (boolean)
+ #RESERVED_SPACE Just enough room to put 1 more line of
+ footnotes on the page
+ #RESET_EN_PP Holds value of register #EN_PP_INDENT
+ #RESET_EN_PP_INDENT Holds value of register #EN_PP_INDENT
+ #RESET_FN_COUNTERS 1 = "moved" footnote collected in a diversion
+ 2 = "deferred" fn collected in a diversion
+ #RESET_FN_NUMBER Should fn# start at 1 on every page?
+ (boolean)
+ #RESET_L_LENGTH Stores current line length when necessary
+ #RESET_PARA_SPACE Holds current value of boolean register
+ #PP_SPACE
+ #RESET_PP_INDENT Stores value of PP_INDENT when needed
+ #RESET_QUOTE_SPACING Stores value of boolean register
+ #FULLSPACE_QUOTES (used in endnotes)
+ #RESTORE_ADJ_DOC_LEAD Stores value of #ADJ_DOC_LEAD whenever needed
+ #RESTORE_B_MARGIN Stores #B_MARGIN whenever needed
+ #RESTORE_DOC_LEAD Stores value of current doc lead (used in
+ endnotes)
+ #RESTORE_HY Restore hyphenation after .][? (boolean)
+ #RESTORE_INDENT Store \n[.i] whenever needed
+ #RESTORE_L_LENGTH Stores \n[.l] whenever needed
+ #RESTORE_LN_NUM Should we restore line numbering? (boolean)
+ #RESTORE_OFFSET Page offset at moment footer trap is sprung;
+ not currently used
+ #RESTORE_UNDERLINE Instructs CODE OFF to restore underlining of
+ italics (TYPEWRITE) if underlining was
+ formerly on
+ #RIGHT_CAP_HEIGHT Cap height of right string in
+ headers/footers
+ #RULED Tells FOOTNOTE if a rule (or space has been
+ put above the first footnote on the page
+ #RUNON_FN_IN_DIVER If #LN=1, if we're in a (block)quote, instructs
+ FOOTNOTE to unformat diversion RUNON_FN_IN_DIVER
+ #RUNON_FOOTNOTES If #LN=1, instructs FOOTNOTE to unformat
+ diversion RUNON_FOOTNOTES
+ #RUN_ON Are we using run-on footnotes? (boolean)
+ #SAVED_DIVER_FN_COUNT In the case of a footnote inside a
+ diversion that should be treated as a
+ "normal" footnote, FOOTNOTE needs to
+ distinguish between a "normal" deferred
+ footnote (always the 1st footnote on the
+ page) and one that only looks as if
+ it should be deferred, when, in fact,
+ it's an overflow; this register lets
+ FOOTNOTE know whether the diversion
+ footnote is, in fact, the first on the
+ page.
+ #SAVED_DOC_LEAD Stored value of #DOC_LEAD (used in DEFAULTS after
+ a COLLATE)
+ #SAVED_FN_COUNT #FN_COUNT+1 prior to +#FN_COUNT; used
+ in FOOTNOTES while gathering fns inside
+ diversions
+ #SAVED_FN_COUNT_FOR_COLS #FN_COUNT_FOR_COLS+1 prior to
+ +#FN_COUNT_FOR_COLS; used in FOOTNOTES
+ while gathering fns inside diversions
+ #SAVED_FN_DEPTH_1 Footnote depth prior to adding footnote
+ diversion depth to FN_DEPTH; used when
+ footnote text will overflow
+ #SAVED_FN_DEPTH_2 Footnote depth after to adding footnote
+ diversion depth to FN_DEPTH; used when
+ footnote text will overflow
+ #SAVED_FN_NUMBER Stores current FN_NUMBER whenever needed
+ #SAVED_FOOTER_POS Position of FOOTER in DO_QUOTE (hack)
+ #SAVED_LEAD In FOOTER and DO_FOOTER, stores the
+ lead in effect prior to outputting
+ FOOTNOTES or performing either
+ PROCESS_FN_LEFTOVER or
+ PROCESS_FN_IN_DIVERSION; both the
+ diversion FOOTNOTES and the two macros
+ have, for PRINT_STYLE 2, an AUTOLEAD
+ call, which requires that an LS be
+ performed with the #SAVED_LEAD in
+ order to remove register #AUTO_LEAD or
+ #AUTO_LEAD_FACTOR.
+ #SAVED_UNDERSCORE_WEIGHT Stores underscore weight whenever needed
+ #SAVED_UNDERSCORE_WEIGHT_ADJ SAVED_UNDERSCORE_WEIGHT/2
+ #SAVED_VFP Store variable footer position whenever needed
+ #SAVED_WEIGHT Stores weight given to RULE_WEIGHT whenever needed
+ #SAVED_WEIGHT_ADJ SAVED_UNDERSCORE_WEIGHT/2
+ #SEP_TYPE Set to 1 if LIST separator is ( or [ or {
+ #SH_COLOR Colorize subheads? (boolean)
+ #SH_BASELINE_ADJ #DOC_LEAD/8 (TYPESET) or /5 (TYPEWRITE)
+ (used for subhead vertical spacing)
+ #SH_NUM Subhead number
+ #SHIM Amount of lead required to advance to
+ next valid baseline
+ #SILENT_BQUOTE_LN "Silently" linenumber blockquotes? (boolean)
+ #SILENT_QUOTE_LN "Silently" linenumber quotes? (boolean)
+ #SINGLE_SPACE Is TYPEWRITE in single space mode? (boolean)
+ #SKIP ENTRY If one, don't print the first entry (the
+ document title) in the TOC of uncollated docs.
+ #SKIP_FOOTER If 1, instructs DO_FOOTER to do nothing
+ if B_MARGIN falls below FOOTER_MARGIN
+ #SLANT_MEANS_SLANT For TYPEWRITE. (boolean)
+ #SLANT_WAS_ON Keeps track of SLANT when it needs to go off
+ for a while
+ #SPACE_REMAINING Space remaining to footer trap; used to
+ decide whether or not to defer a footnote
+ #SPACE_TO_FOOTER Distance to FOOTER trap; used to calculate
+ available space when FOOTNOTE is called inside
+ a diversion
+ #SR_ADJ_FACTOR An adjustment factor that compensates
+ for the fact that #SPACE_REMAINING
+ sometimes reports a fractionally larger
+ space than is actually available for
+ footnote text.
+ #SSH_BASELINE_ADJ #DOC_LEAD/8 (TYPESET) or /5 (TYPEWRITE)
+ (used for subsubhead vertical spacing)
+ #START If 1, signals completion of START
+ #START_FOR_FOOTERS Toggle set in START; signals to
+ PRINT_HDRFTR that START has been invoked,
+ allowing PRINT_HDRFTR to decide whether or
+ not to print a footer on page 1
+ #START_FOR_MNinit If 1, defer processing MN_INIT until #START
+ #STORED_PP_INDENT Temporarily holds value of #PP_INDENT
+ #SUBHEAD Was subhead the last macro invoked? (boolean)
+ Controls vert. space between SUBHEAD and
+ SUBSUBHEAD
+ #SUBTITLE_COLOR Colorize subtitle? (boolean)
+ #SUBTITLE_COVER_NUM Incrementing register used to define strings
+ $SUBTITLE_COVER_&lt;n&gt;
+ #SUBTITLE_DOCCOVER_NUM Incrementing register used to define strings
+ $SUBTITLE_DOCCOVER_&lt;n&gt;
+ #SUBTITLE_NUM Incrementing register used to define strings
+ $SUBTITLE_&lt;n&gt;
+ #SUBTITLES Holds number of subtitle items
+ #SUITE Current page number (for letters)
+ #SUP_PT_SIZE Point size of superscript
+ #SUSPEND_PAGINATION Suspend pagination prior to endnotes?
+ #SWITCH_HDRFTR Switch HDRFTR_LEFT and HDRFTR_RIGHT?
+ (boolean)
+ tbl*boxed tbl has box or allbox (boolean)
+ tbl*center-label-on-table Is tbl caption centered? (boolean)
+ tbl*have-header tbl has a running header (boolean)
+ tbl*header-ht Depth of tbl*header-div
+ tbl*left-label-on-table Is tbl caption quad left? (boolean)
+ tbl*move-fn-overflow-trap Whether to move FN_OVERFLOW_TRAP_POS
+ to accommodate tbl
+ tbl*move-fn-overflow Amount by which to change
+ FN_OVERFLOW_TRAP_POS to accommodate tbl
+ tbl*move-footer Amount by which to change FOOTER trap
+ to accommodate tbl
+ tbl*move-footer-trap Whether to move FOOTER trap to accommodate
+ tbl
+ tbl*no-shim Whether to SHIM tbl (boolean)
+ tbl*right-label-on-table Is tbl caption quad right? (boolean)
+ #T_MARGIN_LEAD_ADJ \n[.v]-12000; ensures critically accurate
+ placement of first lines on pages when
+ doc processing is not being used and
+ a T_MARGIN has been set
+ #TAB_OFFSET# "#" at the end is from $CURRENT_TAB
+ #TERMINATE Has TERMINATE been called? (boolean)
+ #TITLE_COLOR Colorize title? (boolean)
+ #TITLE_NUM Number of title items
+ #TOC_AUTHORS Whether to append author(s) to toc doc
+ title entries (boolean)
+ #TOC_ENTRY_PN Current page number when a toc entry is
+ collected
+ #TOC_FIRST_PAGE If 1, tells PRINT_PAGE_NUMBER that this
+ is the first page of the toc
+ #TOC_LEAD Leading of toc pages
+ #TOC_PN_PADDING Max. # of placeholders for toc entries
+ page numbers
+ #TOC_PS Point size of toc pages
+ #TOC_RV_SWITCH Switch L/R margins of toc pages
+ #TOC_HEAD_INDENT Indent of toc head entries
+ #TOC_HEAD_SIZE_CHANGE ps in/decrease of toc head entries
+ #TOC_PH_INDENT Indent of toc parahead entries
+ #TOC_PH_SIZE_CHANGE ps in/decrease of toc parahead entries
+ #TOC_SH_INDENT Indent of toc subhead entries
+ #TOC_SH_SIZE_CHANGE ps in/decrease of toc subhead entries
+ #TOC_TITLE_INDENT Indent of toc doc title entries
+ #TOC_TITLE_SIZE_CHANGE ps in/decrease of toc doc title entries
+ @TOP Controls .ns at page top;
+ trap-invoked (FOOTER); mostly trap-removed
+ (RR_@TOP)
+ #TOTAL_FIELDS Total number of letter header fields
+ #TRAP \n[.t]-1 (used in DO_QUOTE)
+ #TW Width of tbl block
+ #UNADJUSTED_DOC_LEAD Argument passed to DOC_LEAD prior to
+ adjusting (set in TRAPS)
+ #UNDERLINE_ITALIC For TYPEWRITE. (boolean)
+ #UNDERLINE_ON Was UNDERLINE called? (boolean)
+ #UNDERLINE_QUOTES Was UNDERLINE_QUOTES called? (boolean)
+ #UNDERLINE_QUOTE Underline pquotes? (boolean)
+ #UNDERLINE_SLANT For TYPEWRITE. (boolean)
+ #UNDERLINE_WAS_ON Was underlining on prior to the
+ invocation of current macro? (boolean)
+ #UNDERLINE_WAS_ON_FN As above, but for footnotes only
+ #USER_DEF_HDRFTR_CENTER Has user defined hdrftr center? (boolean)
+ #USER_DEF_HDRFTR_LEFT Has user defined hdrftr left? (boolean)
+ #USER_DEF_HDRFTR_RIGHT Has user defined hdrftr right? (boolean)
+ #USER_DEF_HEADER_CENTER User defined CENTER title? (boolean);
+ used in COPYSTYLE
+ #USER_DEF_HEADER_LEFT User defined CENTER title? (boolean);
+ used in COPYSTYLE
+ #USER_DEF_HEADER_RIGHT User defined CENTER title? (boolean)
+ used in COPYSTYLE
+ #USERDEF_HDRFTR User defined single string recto/verso
+ header/footer? (boolean)
+ #USERDEF_HDRFTR_RECTO_QUAD 1=left, 2=CENTER, 3=right
+ #USERDEF_HDRFTR_VERSO_QUAD 1=left, 2=CENTER, 3=right
+ #VARIABLE_FOOTER_POS Wandering trap position for processing
+ footnotes and footers; pos depends on number of
+ footnotes
+ #VISUAL_B_MARGIN Set in TRAPS, what \n[nl] would report
+ on the last line of running text before
+ FOOTER is sprung.
+ #VFP_DIFF #FN_DEPTH minus #SAVED_FN_DEPTH; the
+ number of footnote lines that will fit
+ on the page when there will be over, and
+ therefore the amount by which to raise
+ the VFP for footnotes with overflow after
+ the 1st footnote.
+ y Vertical position stored with mk in hdrftrs.
+
+<span style="display: block; margin-top: -.5em; margin-bottom: -2.5em;">+++STRINGS+++</span>
+
+ $1ST_LETTER First letter of first arg to LIST
+ $ADJUST_BIB_LEAD 2nd arg to BIBLIOGRAPHY_LEAD; if not blank
+ adjust bib leading
+ $ADJUST_EN_LEAD 2nd arg to ENDNOTE_LEAD; if not blank adjust
+ endnote leading
+ $ADJUST_TOC_LEAD 2nd arg to TOC_LEAD; if not blank adjust
+ toc leading
+ $ATTRIBUTE_COLOR Attribution string color
+ $ATTRIBUTE_STRING Attribution string in doc header
+ $ATTRIBUTE_STRING_COVER Attribution string on cover
+ $ATTRIBUTE_STRING_DOCCOVER Attribution string on doc cover
+ $AUTHOR_&lt;n&gt; Document author(s)
+ $AUTHOR The author, or the first argument
+ passed to .AUTHOR ($AUTHOR_1)
+ $AUTHOR_COLOR Author color
+ $AUTHOR_COVER_&lt;n&gt; Author(s) on cover
+ $AUTHOR_DOCCOVER_&lt;n&gt; Author(s) on doc cover
+ $AUTHOR_FAM Family to use for author in doc header
+ $AUTHOR_FT Font to use for author in doc header
+ $AUTHOR_SIZE_CHANGE ps in/decrease of author in doc header
+ $AUTHOR_PT_SIZE Absolute ps of authors
+ $AUTHORS Comma-separated concatenated
+ string of all args passed to .AUTHOR
+ $BIB_FAM Bibliography page family
+ $BIB_FT Bibliography page font
+ $BIB_LEAD Base leading for bibliographies
+ $BIB_LIST_SEPARATOR Separator between enumerator and text
+ when outputting bibliographies in
+ LIST style
+ $BIB_LIST_PREFIX Prefix before enumerator when outputting
+ bibliographies in LIST style
+ $BIB_PN_STYLE Format of bibliography page numbers
+ $BIB_QUAD
+ $BIB_SPACE Post entry space for bibliographies
+ $BIB_STRING Bibliography title string
+ $BIB_STRING_FAM Bib title family
+ $BIB_STRING_FT Bib title font
+ $BIB_STRING_QUAD Bib title quad
+ $BIB_STRING_RULE_GAP Distance between the underscores when
+ BIB_STRING (bib first-page header) is
+ double-underlined
+ $BIB_STRING_SIZE_CHANGE Bib title size (+ or -)
+ $BIB_STRING_UNDERLINE_GAP Distance between BIB_STRING text and (first)
+ underline rule
+ $BQ_LN_GUTTER Gutter between line numbers and bquotes in
+ bquotes
+ $BQUOTE_COLOR Blockquote color
+ $BQUOTE_FAM Family to use for blockquotes
+ $BQUOTE_FT Font to use for blockquotes
+ $BQUOTE_QUAD Quad value for blockquotes
+ $BQUOTE_SIZE_CHANGE ps in/decrease of blockquotes
+ $BX_COLOR Box color
+ $BX_DEPTH Box depth
+ $BX_INDENT Box left margin starting position
+ $BX_WEIGHT Box rule weight
+ $BX_WIDTH Box width
+ $CENTER_TITLE What to put in the middle of header
+ title
+ $CH_NUM Chapter number (as a string)
+ $CHAPTER The chapter number
+ $CHAPTER_STRING What to print whenever the word
+ "chapter" is required
+ $CHAPTER_TITLE Concatenated args passed to CHAPTER_TITLE
+ $CHAPTER_TITLE_&lt;n&gt; Chapter title items
+ $CHAPTER_TITLE_FAM Family of chapter title
+ $CHAPTER_TITLE_FT Font of chapter title
+ $CHAPTER_TITLE_SIZE_CHANGE ps in/decrease of chapter title
+ $CHAPTER_TITLE_PT_SIZE Absolute ps of chapter title
+ $CHAPTER_TITLE_COLOR Color of chapter title
+ $CL_COLOR Circle (ellipse) color
+ $CL_DEPTH Circle (ellipse) depth
+ $CL_INDENT Circle (ellipse) left margin starting
+ position
+ $CL_WEIGHT Circle (ellipse) rule weight
+ $CL_WIDTH Circle (ellipse) width
+ $CLOSE_INDENT Argument passed to CLOSING_INDENT
+ $CODE_FAM Family to use with CODE
+ $CODE_FT Font to use with CODE
+ $CODE_COLOR Color of CODE
+ $COLOR_SCHEME Color scheme arg passed to NEWCOLOR
+ $COPY_STYLE DRAFT or FINAL
+ $COPYRIGHT Copyright info
+ $COPYRIGHT_COVER Copyright info for cover
+ $COPYRIGHT_DOCCOVER Copyright info for doc cover
+ $COPYRIGHT_FAM Copyright line family
+ $COPYRIGHT_FT Copyright line font
+ $COPYRIGHT_PT_SIZE Base string to which $COPYRIGHT_SIZE_CHANGE
+ is appended
+ $COPYRIGHT_SIZE_CHANGE Copyright line size
+ $COPYRIGHT_COLOR Copyright line color
+ $COPYRIGHT_QUAD Copyright line quad direction
+ $COVER_ATTRIBUTE_COLOR Cover attribution string color
+ $COVER_AUTHOR_COLOR Cover author(s) color
+ $COVER_AUTHOR_FAM Cover author(s) family
+ $COVER_AUTHOR_FT Cover author(s) font
+ $COVER_AUTHOR_PT_SIZE Author point size on cover
+ $COVER_AUTHOR_SIZE_CHANGE Cover author(s) size
+ $COVER_CHAPTER_TITLE_COLOR Color of chapter title on cover
+ $COVER_CHAPTER_TITLE_PT_SIZE Size of chapter title on cover
+ $COVER_COLOR Overall cover color
+ $COVER_COPYRIGHT_PT_SIZE Size of copyright info on cover
+ $COVER_DOCTYPE_PT_SIZE Size of doctype on cover
+ $COVER_FAM Overall cover family
+ $COVER_LEAD_ADJ String appended to DOC_LEAD to arrive at
+ base leading of covers
+ $COVER_SUBTITLE_PT_SIZE Size of subtitle on cover
+ $COVER_TITLE_PT_SIZE Size of title on cover
+ $COVER_TITLE User-defined cover title string
+ $COVER_TITLE_&lt;n&gt; Cover title items
+ $COVER_TITLE_FAM Cover title family
+ $COVER_TITLE_FT Cover title font
+ $COVER_TITLE_SIZE_CHANGE Cover title size
+ $COVER_TITLE_COLOR Cover title color
+ $COVER_UNDERLINE_GAP Distance between baseline of the doctype
+ on covers and the underline
+ $COVER_SUBTITLE_FAM Cover subtitle family
+ $COVER_SUBTITLE_FT Cover subtitle font
+ $COVER_SUBTITLE_SIZE_CHANGE Cover subtitle size
+ $COVER_SUBTITLE_COLOR Cover subtitle color
+ $COVER_DOCTYPE_FAM Cover doctype family
+ $COVER_DOCTYPE_FT Cover doctype font
+ $COVER_DOCTYPE_SIZE_CHANGE Cover doctype size
+ $COVER_DOCTYPE_COLOR Cover doctype color
+ $COVER_COPYRIGHT_FAM Cover copyright family
+ $COVER_COPYRIGHT_FT Cover copyright font
+ $COVER_COPYRIGHT_SIZE_CHANGE Cover copyright size
+ $COVER_COPYRIGHT_COLOR Cover copyright color
+ $COVER_MISC_FAM Cover misc family
+ $COVER_MISC_FT Cover misc font
+ $COVER_MISC_SIZE_CHANGE Cover misc size
+ $COVER_MISC_COLOR Cover misc color
+ $CURRENT_EV \n[.ev] at REF_BRACKETS_START
+ $DC_COLOR Dropcap color
+ $DOC_COVER_ATTRIBUTE_COLOR Doc cover attribution string color
+ $DOC_COVER_AUTHOR_COLOR Doc cover author(s) color
+ $DOC_COVER_AUTHOR_FAM Doc cover author(s) family
+ $DOC_COVER_AUTHOR_FT Doc cover author(s) font
+ $DOC_COVER_AUTHOR_PT_SIZE Size of author on doc cover
+ $DOC_COVER_AUTHOR_SIZE_CHANGE Doc cover author(s) size
+ $DOC_COVER_CHAPTER_TITLE_COLOR Color of chapter title on doc cover
+ $DOC_COVER_CHAPTER_TITLE_PT_SIZE Size of chapter title on doc cover
+ $DOC_COVER_COLOR Overall doc cover color
+ $DOC_COVER_COPYRIGHT_COLOR Doc cover copyright color
+ $DOC_COVER_COPYRIGHT_FAM Doc cover copyright family
+ $DOC_COVER_COPYRIGHT_FT Doc cover copyright font
+ $DOC_COVER_COPYRIGHT_PT_SIZE Size of copyright info on doc cover
+ $DOC_COVER_COPYRIGHT_SIZE_CHANGE Doc cover copyright size
+ $DOC_COVER_DOCTYPE_COLOR Doc cover doctype color
+ $DOC_COVER_DOCTYPE_FAM Doc cover doctype family
+ $DOC_COVER_DOCTYPE_FT Doc cover doctype font
+ $DOC_COVER_DOCTYPE_PT_SIZE Size of doctype on doc cover
+ $DOC_COVER_DOCTYPE_SIZE_CHANGE Doc cover doctype size
+ $DOC_COVER_MISC_COLOR Doc cover misc color
+ $DOC_COVER_MISC_FAM Doc cover misc family
+ $DOC_COVER_MISC_FT Doc cover misc font
+ $DOC_COVER_MISC_SIZE_CHANGE Doc cover misc size
+ $DOC_COVER_FAM Overall doc cover family
+ $DOC_COVER_LEAD_ADJ String appended to DOC_LEAD to arrive at base
+ leading of doc covers
+ $DOC_COVER_SUBTITLE_FAM Doc cover subtitle family
+ $DOC_COVER_SUBTITLE_FT Doc cover subtitle font
+ $DOC_COVER_SUBTITLE_PT_SIZE Size of subtitle on doc cover
+ $DOC_COVER_SUBTITLE_SIZE_CHANGE Doc cover subtitle size
+ $DOC_COVER_SUBTITLE_COLOR Doc cover subtitle color
+ $DOC_COVER_TITLE User-defined doc cover title string
+ $DOC_COVER_TITLE_&lt;n&gt; Doc cover title items
+ $DOC_COVER_TITLE_COLOR Doc cover title color
+ $DOC_COVER_TITLE_FAM Doc cover title family
+ $DOC_COVER_TITLE_FT Doc cover title font
+ $DOC_COVER_TITLE_PT_SIZE Size of title on doc cover
+ $DOC_COVER_TITLE_SIZE_CHANGE Doc cover title size
+ $DOC_FAM Predominant font family used in the
+ document
+ $DOC_QUAD Quad used for body text (justified or
+ left)
+ $DOC_TITLE Concatenated args passed to DOCTITLE
+ $DOC_TITLE_&lt;n&gt; DOCTITLE items
+ $DOC_TYPE Document type (default, chapter, named,
+ letter)
+ $DOCCOVER_UNDERLINE_GAP Distance between baseline of doctype and the
+ underline on covers
+ $DOCHEADER_COLOR Color of docheader
+ $DOCHEADER_FAM Family used for all parts of the docheader
+ $DOCHEADER_QUAD Quad direction (LRC) of docheader
+ $DOCHEADER_LEAD_ADJ +|- value applied to #DOC_LEAD to
+ in/decrease leading of doc header
+ $DOCTYPE_COLOR Color of DOCTYPE string in doc header
+ $DOCTYPE_FAM Family to use for DOCTYPE string in
+ doc header
+ $DOCTYPE_FT Font to use for DOCTYPE string in
+ doc header
+ $DOCTYPE_SIZE_CHANGE ps in/decrease of DOCTYPE string in
+ doc header
+ $DOCTYPE_PT_SIZE Absolute ps of DOCTYPE
+ $DOCTYPE_UNDERLINE_GAP Distance between baseline of DOCTYPE and the
+ underline in doc header
+ $DRAFT The draft number (string valued)
+ $DRAFT_STRING What to print whenever the word "draft"
+ is required
+ EN_MARK Inline, gets #EN_MARK (\(ln)
+ $EN_CLOSE_BRACKET Close bracket for line-number enumerated
+ endnotes
+ $EN_FAMILY Family for endnotes
+ $EN_FT Font for endnotes
+ $EN_LEAD Leading of endnotes pages
+ $EN_LINENUMBER String to print for line-number enumerators
+ in line-numbered endnotes
+ $EN_LN_FAM Family for line-numbers in line-number
+ identified endnotes
+ $EN_LN_FT Font for line-numbers in line-number
+ identified endnotes
+ $EN_LN_GAP Gap to leave in initial endnote lines
+ between line-number identifies and text
+ $EN_LN_SEP User-defined separator to use between line
+ number(s) and endnotes when endnotes are
+ identified by line number
+ $EN_LN_SIZE_CHANGE Size change (+ or -) for line-numbers in
+ line-number identified endnotes
+ $EN_OPEN_BRACKET Open bracket for line-number enumerated
+ endnotes
+ $EN_PN_STYLE Pagenumbering style for endnotes pages
+ $EN_QUAD Quad for endnotes
+ $EN_STRING Endnotes page head
+ $EN_STRING_FAM Endnotes page head family
+ $EN_STRING_FT Endnotes page head font
+ $EN_STRING_QUAD Endnotes page head quad direction
+ $EN_STRING_RULE_GAP Distance between rules when EN_STRING is
+ double-underlined
+ $EN_STRING_UNDERLINE_GAP Distance between baseline of EN_STRING and
+ underline rule
+ $EN_STRING_SIZE_CHANGE Endnotes page head size
+ $EN_TITLE Endnote document identifier
+ $EN_TITLE_FAM Endnote document identifier family
+ $EN_TITLE_FT Endnote document identifier font
+ $EN_TITLE_QUAD Endnote document identifier quad
+ direction
+ $EN_TITLE_SIZE_CHANGE Endnote document identifier size
+ $EN_TITLE_UNDERLINE_GAP Distance between baseline of EN_TITLE and
+ underline rule
+ $EN_NUMBER_FAM Endnote numbering family
+ $EN_NUMBER_FT Endnote numbering font
+ $EN_NUMBER_SIZE_CHANGE Endnote numbering size
+ $EPI_AUTOLEAD Autolead value (decimals ok) of
+ epigraphs
+ $EPI_COLOR Color of epigraphs
+ $EPI_FAM Family to use in epigraphs
+ $EPI_FT Font to use in epigraphs
+ $EPI_OFFSET_VALUE Arg passed to EPIGRAPH_INDENT if the
+ arg has a unit of measure appended to it
+ $EPI_QUAD Quad in block-style epigraphs
+ (justified or left)
+ $EPI_SIZE_CHANGE ps in/decrease of epigraphs
+ $EVAL_BIB_SPACE Temporary string to find out if the
+ arg to BIBLIOGRAPHY_SPACING ended in "v"
+ $EVAL_EI_ARG Temporary string to find out whether
+ the arg to EPIGRAPH_INDENT ended with
+ a unit of measure
+ $EVAL_QI_ARG Temporary string to find out whether
+ the arg to QUOTE_INDENT ended with
+ a unit of measure
+ eval*[B Used to get substring of \*([B
+ eval*[S Used to get substring of \*([S
+ eval*[s Used to get substring of \*([s
+ $FINIS_COLOR Color of FINIS string
+ $FINIS_STRING What to print when FINIS macro is
+ invoked
+ float-adj:bottom A + or - sign
+ float-adj:top A + or - sign
+ float*type Used with tbl; 'boxed' or 'table'
+ FN_MARK Inline, gets #FN_MARK ( \n[ln] )
+ $FN_CLOSE_BRACKET Close bracket for line-number identified
+ footnotes
+ $FN_FAM Family used in footnotes
+ $FN_FT Font used in footnotes
+ $FN_LINENUMBER String to print before footnotes when
+ line-numbering enabled for footnotes
+ $FN_LN_SEP Separator after line-number identified
+ footnotes
+ $FN_OPEN_BRACKET Open bracket for line-number identified
+ footnotes
+ $FN_QUAD Quad used in footnotes
+ $FN_SIZE_CHANGE ps in/decrease of footnotes
+ $FN_SPACE Post footnote space
+ $FOOTNOTE_COLOR Footnote color
+ $FTR_RECTO_QUAD Quad direction of footer recto
+ $FTR_RECTO_STRING String for footer recto
+ $FTR_VERSO_QUAD Quad direction of footer verso
+ $FTR_VERSO_STRING String for footer verso
+ $HDR_RECTO_QUAD Quad of header recto
+ $HDR_RECTO_STRING String for header recto
+ $HDR_VERSO_QUAD Quad of header verso
+ $HDR_VERSO_STRING String for header verso
+
+<span style="display: block; border-top: 1px solid black; border-bottom: 1px solid black; padding-top: 2px;">**Note: "header", in the descriptions below, means either headers or footers</span>
+ $HDRFTR_CENTER What to put in CENTER part of headers;
+ default doctype
+ $HDRFTR_CENTER_COLOR Color of CENTER part of headers
+ $HDRFTR_CENTER_FAM Family of CENTER part of headers
+ $HDRFTR_CENTER_FT Font of centre part of headers
+ $HDRFTR_CENTER_NEW HDRFTR_CENTER after the start of TOC;
+ defined in HDRFTR_CENTER if
+ HDRFTR_CENTER is called as
+ FOOTER_CENTER
+ $HDRFTR_CENTER_OLD HDRFTR_CENTER just prior to start of
+ TOC; defined in HDRFTR_CENTER if
+ HDRFTR_CENTER is called as
+ FOOTER_CENTER
+ $HDRFTR_CENTER_SIZE_CHANGE ps in/decrease of centre title in
+ headers
+ $HDRFTR_COLOR Color of headers/footers
+ $HDRFTR_FAM Family to use in headers
+ $HDRFTR_LEFT_COLOR Color of LEFT part of headers
+ $HDRFTR_LEFT_FAM Family of left part of headers
+ $HDRFTR_LEFT_FT Font of left part of headers
+ $HDRFTR_LEFT_SIZE_CHANGE ps in/decrease of author in headers
+ $HDRFTR_LEFT What to put in left part of headers;
+ default author
+ $HDRFTR_RIGHT_COLOR Color of RIGHT part of headers
+ $HDRFTR_RIGHT_FAM Family of right part of headers
+ $HDRFTR_RIGHT_FT Font of right part of headers
+ $HDRFTR_RIGHT_SIZE_CHANGE ps in/decrease of right part of
+ headers
+ $HDRFTR_RIGHT What to put in right part of headers;
+ default title
+ $HDRFTR_RULE_COLOR Color of header rule
+ $HDRFTR_SIZE_CHANGE ps in/decrease of headers
+ $HDRFTR_TMP_SIZE_CHANGE_SWITCH Temporarily holds
+ HDRFTR_LEFT_SIZE_CHANGE if
+ #SWITCH_HDRFTRS=1
+ $HDRFTR_TMP_SWITCH Temporarily holds HDRFTR_LEFT if
+ #SWITCH_HDRFTRS=1
+ $HDRFTR_TMP_COLOR_SWITCH Temporarily holds HDRFTR_LEFT_COLOR if
+ #SWITCH_HDRFTRS=1
+ $HEAD_COLOR Head color
+ $HEAD_FAM Family to use for section titles
+ $HEAD_FT Font to use for section titles
+ $HEAD_QUAD Quad value of section titles
+ $HEAD_SIZE_CHANGE ps in/decrease of section titles
+ $HEAD_UNDERLINE_GAP Distance between a head and the underline
+ $HYPHEN Vertically adjusted hyphen used around page
+ numbers
+ $LHS Holds digits on the left side of the decimal
+ in weight arg passed to RULE_WEIGHT
+ $LINEBREAK_CHAR Character that marks line breaks
+ $LINEBREAK_CHAR_V_ADJ +|- amount by which to raise/lower
+ linebreak character
+ $LAST_CHAR Temporary string used to discover whether
+ user has remembered to put a digit after
+ ROMAN or roman in arg to LIST
+ $LINEBREAK_COLOR Linebreak color
+ $LIST_ARG_1 The first arg to LIST (minus digits if
+ ROMAN or roman
+ $LN_COLOR Linenumber color
+ $LN_FAMILY Linenumber family
+ $LN_FONT Linenumber font
+ $LN_GUTTER Gutter to leave between line numbers
+ and text
+ $LN_INC 2nd arg to NUMBER_LINES as a string
+ $LN_NUM 1st arg to NUMBER_LINES as a string
+ $LN_SIZE_CHANGE ps in/decrease of linenumbers
+ $MISC_&lt;n&gt; Position of args pass to MISC
+ $MISC_COLOR Misc color
+ $MISC_COVER_&lt;n&gt; Misc items for cover
+ $MISC_DOCCOVER_&lt;n&gt; Misc items for doc cover
+ $MISC_QUAD Misc quad direction
+ $MN-arg&lt;n&gt; Sequentially numbered args passed to MNinit
+ MN-color Color of margin note
+ MN-curr Number of current margin note
+ MN-dir Left or right margin note
+ MN-font Font of margin note
+ MN-left-ad Fill mode of margin note
+ PAGE# For use in hdrftr strings where page #
+ is needed; \*[PAGE]
+ $PAGENUM_COLOR Page number color
+ $PAGENUM_STYLE String passed to PAGENUM_STYLE
+ $PAGE_NUM_FAM Family of page numbers
+ $PAGE_NUM_FT Font of page numbers
+ $PAGE_NUM_SIZE_CHANGE ps in/decrease of page numbers
+ $PAPER Paper size (LETTER, A4, LEGAL);
+ default=LETTER
+ $PH_COLOR Parahead color
+ $PH_FAM Parahead family
+ $PH_FT Parahead font
+ $PH_SIZE_CHANGE ps in/decrease of paraheads
+ $PH_SPACE Amount of horizontal space between a parahead
+ and the start of paragraph text
+ $PP_FT Font used in paragraphs
+ $RESTORE_PAGENUM_STYLE Hold previous page numbering style
+ $ROMAN_WIDTH&lt;n&gt; The digit(s) appended by user to ROMAN or
+ roman when LIST is invoked
+ $Q_LN_GUTTER Gutter between linenumbers and quotes
+ in quotes
+ $Q_OFFSET_VALUE Arg passed to QUOTE_INDENT if the
+ arg has a unit of measure appended to it
+ $QUOTE_COLOR Quote (poetic) color
+ $QUOTE_FAM Family to use for pquotes
+ $QUOTE_FT Font to use for pquotes
+ $QUOTE_SIZE_CHANGE ps in/decrease of pquotes
+ ref*post-punct Final punctuation mark of references
+ ref*spec!&lt;n&gt; Holds fields required by differing reference
+ types
+ ref*string The data passed to a reference
+ $REF_BIB_INDENT 2nd line indent value for references in
+ bibliographies
+ $REF_EN_INDENT 2nd line indent value for references in
+ endnotes
+ $REF_FN_INDENT 2nd line indent value for references in
+ footnotes
+ $REF_STYLE MLA bibliography-style or footnote/endnote
+ style; used in ref*add-&lt;x&gt;
+ $RESTORE_SS_VAR Saves \*[$SS_VAR] for use with ref*build
+ #REVISION The revision number (string valued)
+ $REVISION_STRING What to print whenever the word
+ "revision" is required
+ $RHS Holds digits on the right side of the decimal
+ in weight arg passed to RULE_WEIGHT
+ $RL_COLOR Rule color (DRH/DRV)
+ $RL_DEPTH Rule depth (DRH/DRV)
+ $RL_INDENT Left start position of rule (DRH/DRV)
+ $RL_LENGTH Rule length (DRH/DRV)
+ $RL_WEIGHT Rule weight (DRH/DRV)
+ $SAVED_COPYRIGHT Temporarily holds string in $COPYRIGHT
+ $SAVED_RULE_GAP Temporarily holds string in $RULE_GAP
+ $SAVED_DOC_FAM Document family in effect before COLLATE
+ $SAVED_PP_FT $PP_FT in effect at start of
+ .COLLATE; tested for and removed
+ in .PP
+ $SH_FAM Family to use in subheads
+ $SH_FT Font to use in subheads
+ $SH_SIZE_CHANGE ps in/decrease of subheads
+ $SH_COLOR Subhead color
+ $SIG_SPACE Arg passed to macro, SIGNATURE_SPACE
+ $SUBTITLE Concatenated args passed to SUBTITLE
+ $SUBTITLE_&lt;n&gt; Subtitle items for doc header
+ $SUBTITLE_COLOR Color of subtitle
+ $SUBTITLE_COVER_&lt;n&gt; Subtitle items for cover
+ $SUBTITLE_DOCCOVER_&lt;n&gt; Subtitle items for doc cover
+ $SUBTITLE_FAM Family to use for subtitle in doc
+ header
+ $SUBTITLE_FT Font to use for subtitle in doc header
+ $SUBTITLE_SIZE_CHANGE ps in/decrease of subtitle
+ $SUBTITLE_PT_SIZE Absolute ps of subtitle
+ $SUITE The #SUITE number register
+ tbl*center 'C' if set
+ tbl*label Text of tbl caption
+ tbl*needs # of rows of tbl data required to print
+ tbl near bottom of page
+ tbl*user-add-space User-added space before a tbl caption
+ $TITLE Concatenated args pass to TITLE
+ $TITLE_&lt;n&gt; Title items
+ $TITLE_COLOR Color of title
+ $TITLE_FAM Family to use for title in doc header
+ $TITLE_FT Font to use for title in doc header
+ $TITLE_PT_SIZE Absolute point size of title in docheader
+ $TITLE_SIZE_CHANGE ps in/decrease of title in doc header
+ $TOC_AUTHORS What to print after toc doc title entry
+ if #TOC_AUTHORS=1
+ $TOC_FAM Family to use on toc pages
+ $TOC_HEAD_FAM Family of toc head entries
+ $TOC_HEAD_FT Font of toc head entries
+ $TOC_HEAD_ITEM A head as collected for TOC_ENTRIES
+ $TOC_HEADER_FAM Family to use for "Contents"
+ $TOC_HEADER_FT Font to use for "Contents"
+ $TOC_HEADER_QUAD Quad direction of "Contents"
+ $TOC_HEADER_SIZE ps in/decrease of "Contents"****
+ $TOC_HEADER_STRING Header string of first toc page
+ $TOC_LEAD Leading of toc pages
+ $TOC_PH_ITEM Toc parahead entry
+ $TOC_PN Sets up toc leaders + entry pn
+ (typeset)
+ $TOC_PN_FAM Family for toc entries page numbers
+ $TOC_PN_FT Font for toc entries page numbers
+ $TOC_PN_SIZE_CHANGE ps in/decrease of toc entries page
+ numbers
+ $TOC_PN_STYLE Page-numbering style of toc pages
+ $TOC_PN_TYPEWRITE Sets up toc leaders + entry pn
+ (typewrite)
+ $TOC_PH_FAM Family of toc parahead entries
+ $TOC_PH_FT Font of toc parahead entries
+ $TOC_PARAHEAD_ITEM A parahead collected for TOC_ENTRIES
+ $TOC_SH_FAM Family of toc subhead entries
+ $TOC_SH_FT Font of toc subhead entries
+ $TOC_SH_ITEM A subhead collected for TOC_ENTRIES
+ $TOC_TITLE_FAM Family of toc doc title entries
+ $TOC_TITLE_FT Font of toc doc title entries
+ $TOC_TITLE_ITEM Toc document title item
+ $USER_SET_TITLE_ITEM User defined toc doc title entry as
+ set by TOC_TITLE_ENTRY
+ $UR_PAGINATION_STYLE Pagination style prior to endnotes
+ $USERDEF_HDRFTR_RECTO User defined header/footer recto string
+ $USERDEF_HDRFTR_VERSO User defined header/footer verso string
+
+<span style="display: block; margin-top: -.5em; margin-bottom: -2.5em;">+++PREPROCESSOR KEYWORDS+++</span>
+
+ (eqn) EQ EN (grn) GS GE GF (pic) PS PE (refer) R1 R2 [ ]
+
+ (tbl) TS TE TH (grap) G1 G2 (ideal) IS IE (chem) cstart cend
+
+<span style="display: block; margin-top: -.5em; margin-bottom: -2.5em;">+++ALIASES+++</span>
+
+<span style="display: block; border: 1px solid black; padding-left: 12px; padding-bottom: 9px;">
+<span style="display: block; margin-top: -1em;">Please note:</span>
+Prior to version 1.1.9, all macros that included the word COLOR had
+aliases that used COLOUR instead. This convenience has now been
+removed, in an effort to reduce the size of the om.tmac file.
+
+Furthermore, if you want the convenience, you&#8217;ll have to edit the
+om.tmac file. Simply aliasing, say, HEAD_COLOR as HEAD_COLOUR will
+not work, owing to significant changes in the handling of
+docelement control macros that end in _COLOR.
+</span>
+
+<span style="display: block; margin-top: -1.5em; margin-bottom: -2.5em;">+++These aliases are for convenience, and header/footer management+++</span>
+
+ BIBLIOGRAPHY_STRING_UNDERSCORE BIBLIOGRAPHY_STRING_UNDERLINE
+ CITATION BLOCKQUOTE
+ CITE BLOCKQUOTE
+ COL_BREAK COL_NEXT
+ DOC_FAM DOC_FAMILY
+ DOC_L_LENGTH DOC_LINE_LENGTH
+ DOC_L_LENGTH DOC_LINE_LENGTH
+ DOC_L_MARGIN DOC_LEFT_MARGIN
+ DOC_L_MARGIN DOC_LEFT_MARGIN
+ DOC_LS DOC_LEAD
+ DOC_PS DOC_PT_SIZE
+ DOC_R_MARGIN DOC_RIGHT_MARGIN
+ DOC_R_MARGIN DOC_RIGHT_MARGIN
+ ENDNOTE_STRING_UNDERSCORE ENDNOTE_STRING_UNDERLINE
+ ENDNOTE_TITLE_UNDERSCORE ENDNOTE_TITLE_UNDERLINE
+ FOOTER_CENTER_CAPS HDRFTR_CENTER_CAPS
+ FOOTER_CENTER HDRFTR_CENTER
+ FOOTER_CENTRE_CAPS HDRFTR_CENTER_CAPS
+ FOOTER_CENTRE HDRFTR_CENTER
+ FOOTER_LEFT_CAPS HDRFTR_LEFT_CAPS
+ FOOTER_LEFT HDRFTR_LEFT
+ FOOTER_PLAIN HDRFTR_PLAIN
+ FOOTER_RECTO HDRFTR_RECTO
+ FOOTER_RIGHT_CAPS HDRFTR_RIGHT_CAPS
+ FOOTER_RIGHT HDRFTR_RIGHT
+ FOOTER_RULE_GAP HDRFTR_RULE_GAP
+ FOOTER_RULE HDRFTR_RULE
+ FOOTER_VERSO HDRFTR_VERSO
+ HDRFTR_RULE_INTERNAL HDRFTR_RULE
+ HEADER_CENTER_CAPS HDRFTR_CENTER_CAPS
+ HEADER_CENTER HDRFTR_CENTER
+ HEADER_CENTRE_CAPS HDRFTR_CENTER_CAPS
+ HEADER_CENTRE HDRFTR_CENTER
+ HEADER_LEFT_CAPS HDRFTR_LEFT_CAPS
+ HEADER_LEFT HDRFTR_LEFT
+ HEADER_PLAIN HDRFTR_PLAIN
+ HEADER_RECTO HDRFTR_RECTO
+ HEADER_RIGHT_CAPS HDRFTR_RIGHT_CAPS
+ HEADER_RIGHT HDRFTR_RIGHT
+ HEADER_RULE_GAP HDRFTR_RULE_GAP
+ HEADER_RULE HDRFTR_RULE
+ HEADER_VERSO HDRFTR_VERSO
+ PAGENUM PAGENUMBER
+ PAGINATION PAGINATE
+ PP_FT PP_FONT
+ PRINT_FOOTNOTE_RULE FOOTNOTE_RULE
+ SWITCH_FOOTERS SWITCH_HDRFTR
+ SWITCH_HEADERS SWITCH_HDRFTR
+ TOC_LS TOC_LEAD
+ TOC_PS TOC_PT_SIZE
+
+<span style="display: block; margin-top: -.5em; margin-bottom: -2.5em;">+++These aliases are used for docelement type-style control+++</span>
+
+ AUTHOR_FAMILY _FAMILY
+ AUTHOR_FONT _FONT
+ AUTHOR_SIZE _SIZE
+ BIBLIOGRAPHY_FAMILY _FAMILY
+ BIBLIOGRAPHY_FONT _FONT
+ BIBLIOGRAPHY_FOOTER_CENTER BIBLIOGRAPHY_HDRFTR_CENTER
+ BIBLIOGRAPHY_FOOTER_CENTRE BIBLIOGRAPHY_HDRFTR_CENTRE
+ BIBLIOGRAPHY_HEADER_CENTER BIBLIOGRAPHY_HDRFTR_CENTER
+ BIBLIOGRAPHY_HEADER_CENTRE BIBLIOGRAPHY_HDRFTR_CENTRE
+ BIBLIOGRAPHY_QUAD _QUAD
+ BIBLIOGRAPHY_STRING_FAMILY _FAMILY
+ BIBLIOGRAPHY_STRING_FONT _FONT
+ BIBLIOGRAPHY_STRING_QUAD _QUAD
+ BIBLIOGRAPHY_STRING_SIZE _SIZE
+ BLOCKQUOTE_AUTOLEAD Q_AUTOLEAD
+ BLOCKQUOTE_AUTOLEAD QUOTE_AUTOLEAD
+ BLOCKQUOTE_COLOR _COLOR
+ BLOCKQUOTE_FAMILY _FAMILY
+ BLOCKQUOTE_FONT _FONT
+ BLOCKQUOTE_QUAD _QUAD
+ BLOCKQUOTE_SIZE _SIZE
+ CHAPTER_TITLE_COLOR _COLOR
+ CHAPTER_TITLE_FAMILY _FAMILY
+ CHAPTER_TITLE_FONT _FONT
+ CHAPTER_TITLE_SIZE _SIZE
+ COVER_ATTRIBUTE_COLOR _COLOR
+ COVER_AUTHOR_COLOR _COLOR
+ COVER_AUTHOR_FAMILY _FAMILY
+ COVER_AUTHOR_FONT _FONT
+ COVER_AUTHOR_SIZE _SIZE
+ COVER_COLOR _COLOR
+ COVER_COPYRIGHT_COLOR _COLOR
+ COVER_COPYRIGHT_FAMILY _FAMILY
+ COVER_COPYRIGHT_FONT _FONT
+ COVER_COPYRIGHT_QUAD _QUAD
+ COVER_COPYRIGHT_SIZE _SIZE
+ COVER_DOCTYPE_COLOR _COLOR
+ COVER_DOCTYPE_FAMILY _FAMILY
+ COVER_DOCTYPE_FONT _FONT
+ COVER_DOCTYPE_SIZE _SIZE
+ COVER_FAMILY _FAMILY
+ COVER_MISC_COLOR _COLOR
+ COVER_MISC_QUAD _QUAD
+ COVER_SUBTITLE_COLOR _COLOR
+ COVER_SUBTITLE_FAMILY _FAMILY
+ COVER_SUBTITLE_FONT _FONT
+ COVER_SUBTITLE_SIZE _SIZE
+ COVER_TITLE_COLOR _COLOR
+ COVER_TITLE_FAMILY _FAMILY
+ COVER_TITLE_FONT _FONT
+ COVER_TITLE_SIZE _SIZE
+ DOC_COVER_ATTRIBUTE_COLOR _COLOR
+ DOC_COVER_AUTHOR_COLOR _COLOR
+ DOC_COVER_AUTHOR_FAMILY _FAMILY
+ DOC_COVER_AUTHOR_FONT _FONT
+ DOC_COVER_AUTHOR_SIZE _SIZE
+ DOC_COVER_COLOR _COLOR
+ DOC_COVER_COPYRIGHT_COLOR _COLOR
+ DOC_COVER_COPYRIGHT_FAMILY _FAMILY
+ DOC_COVER_COPYRIGHT_FONT _FONT
+ DOC_COVER_COPYRIGHT_QUAD _QUAD
+ DOC_COVER_COPYRIGHT_SIZE _SIZE
+ DOC_COVER_DOCTYPE_COLOR _COLOR
+ DOC_COVER_DOCTYPE_FAMILY _FAMILY
+ DOC_COVER_DOCTYPE_FONT _FONT
+ DOC_COVER_DOCTYPE_SIZE _SIZE
+ DOC_COVER_FAMILY _FAMILY
+ DOC_COVER_MISC_COLOR _COLOR
+ DOC_COVER_MISC_QUAD _QUAD
+ DOC_COVER_SUBTITLE_COLOR _COLOR
+ DOC_COVER_SUBTITLE_FAMILY _FAMILY
+ DOC_COVER_SUBTITLE_FONT _FONT
+ DOC_COVER_SUBTITLE_SIZE _SIZE
+ DOC_COVER_TITLE_COLOR _COLOR
+ DOC_COVER_TITLE_FAMILY _FAMILY
+ DOC_COVER_TITLE_FONT _FONT
+ DOC_COVER_TITLE_SIZE _SIZE
+ DOCHEADER_COLOR _COLOR
+ DOCHEADER_FAMILY _FAMILY
+ DOCHEADER_QUAD _QUAD
+ DOC_QUAD _QUAD
+ DOCTYPE_FAMILY _FAMILY
+ DOCTYPE_FONT _FONT
+ DOCTYPE_SIZE _SIZE
+ ENDNOTE_BLOCKQUOTE_AUTOLEAD Q_AUTOLEAD
+ ENDNOTE_BLOCKQUOTE_AUTOLEAD QUOTE_AUTOLEAD
+ ENDNOTE_FAMILY _FAMILY
+ ENDNOTE_FONT _FONT
+ ENDNOTE_LINENUMBER_FAMILY _FAMILY
+ ENDNOTE_LINENUMBER_FONT _FONT
+ ENDNOTE_LINENUMBER_SIZE _SIZE
+ ENDNOTE_NUMBER_FAMILY _FAMILY
+ ENDNOTE_NUMBER_FONT _FONT
+ ENDNOTE_NUMBER_SIZE _SIZE
+ ENDNOTE_QUAD _QUAD
+ ENDNOTE_QUOTE_AUTLOEAD Q_AUTOLEAD
+ ENDNOTE_QUOTE_AUTOLEAD QUOTE_AUTOLEAD
+ ENDNOTE_STRING_FAMILY _FAMILY
+ ENDNOTE_STRING_FONT _FONT
+ ENDNOTE_STRING_QUAD _QUAD
+ ENDNOTE_STRING_SIZE _SIZE
+ ENDNOTE_TITLE_FAMILY _FAMILY
+ ENDNOTE_TITLE_FONT _FONT
+ ENDNOTE_TITLE_QUAD _QUAD
+ ENDNOTE_TITLE_SIZE _SIZE
+ EPIGRAPH_COLOR _COLOR
+ EPIGRAPH_FAMILY _FAMILY
+ EPIGRAPH_FONT _FONT
+ EPIGRAPH_QUAD _QUAD
+ EPIGRAPH_SIZE _SIZE
+ FINIS_COLOR _COLOR
+ FOOTNOTE_COLOR _COLOR
+ FOOTNOTE_FAMILY _FAMILY
+ FOOTNOTE_FONT _FONT
+ FOOTNOTE_QUAD _QUAD
+ FOOTNOTE_SIZE _SIZE
+ HDRFTR_CENTER_FAMILY _FAMILY
+ HDRFTR_CENTER_FONT _FONT
+ HDRFTR_CENTER_SIZE _SIZE
+ HDRFTR_COLOR _COLOR
+ HDRFTR_FAMILY _FAMILY
+ HDRFTR_LEFT_FAMILY _FAMILY
+ HDRFTR_LEFT_FONT _FONT
+ HDRFTR_LEFT_SIZE _SIZE
+ HDRFTR_RIGHT_FAMILY _FAMILY
+ HDRFTR_RIGHT_FONT _FONT
+ HDRFTR_RIGHT_SIZE _SIZE
+ HDRFTR_RULE_COLOR _COLOR
+ HDRFTR_SIZE _SIZE
+ HEAD_COLOR _COLOR
+ HEAD_FAMILY _FAMILY
+ HEAD_FONT _FONT
+ HEAD_QUAD _QUAD
+ HEAD_SIZE _SIZE
+ LINEBREAK_COLOR _COLOR
+ LINENUMBER_FAMILY _COLOR
+ LINENUMBER_FONT _COLOR
+ LINENUMBER_SIZE _COLOR
+ LINENUMBER_COLOR _COLOR
+ MISC_COLOR _COLOR
+ MISC_QUAD _QUAD
+ PAGENUM_COLOR _COLOR
+ PAGENUM_FAMILY _FAMILY
+ PAGENUM_FONT _FONT
+ PARAHEAD_COLOR _COLOR
+ PARAHEAD_FAMILY _FAMILY
+ PARAHEAD_FONT _FONT
+ PARAHEAD_SIZE _SIZE
+ QUOTE_COLOR _COLOR
+ QUOTE_FAMILY _FAMILY
+ QUOTE_FONT _FONT
+ QUOTE_INDENT _INDENT
+ QUOTE_SIZE _SIZE
+ REF_INDENT INDENT_REFS
+ REF) REF_BRACKETS_END
+ REF] REF_BRACKETS_END
+ REF} REF_BRACKETS_END
+ REF( REF_BRACKETS_START
+ REF[ REF_BRACKETS_START
+ REF{ REF_BRACKETS_START
+ SUBHEAD_COLOR _COLOR
+ SUBHEAD_FAMILY _FAMILY
+ SUBHEAD_FONT _FONT
+ SUBHEAD_SIZE _SIZE
+ SUBTITLE_COLOR _COLOR
+ SUBTITLE_FAMILY _FAMILY
+ SUBTITLE_FONT _FONT
+ SUBTITLE_SIZE _SIZE
+ TITLE_COLOR _COLOR
+ TITLE_FAMILY _FAMILY
+ TITLE_FONT _FONT
+ TITLE_SIZE _SIZE
+ TOC_FAM _FAMILY
+ TOC_FAMILY _FAMILY
+ TOC_HEADER_FAMILY _FAMILY
+ TOC_HEADER_FONT _FONT
+ TOC_HEADER_QUAD _QUAD
+ TOC_HEADER_SIZE _SIZE
+ TOC_HEAD_FAMILY _FAMILY
+ TOC_HEAD_FONT _FONT
+ TOC_HEAD_SIZE _SIZE
+ TOC_PARAHEAD_FAMILY _FAMILY
+ TOC_PARAHEAD_FONT _FONT
+ TOC_PARAHEAD_SIZE _SIZE
+ TOC_PN_FAMILY _FAMILY
+ TOC_PN_FONT _FONT
+ TOC_PN_SIZE _SIZE
+ TOC_PT_SIZE _SIZE
+ TOC_SUBHEAD_FAMILY _FAMILY
+ TOC_SUBHEAD_FONT _FONT
+ TOC_SUBHEAD_SIZE _SIZE
+ TOC_TITLE_FAMILY _FAMILY
+ TOC_TITLE_FONT _FONT
+ TOC_TITLE_SIZE _SIZE
+
+<span style="display: block; margin-top: -.5em; margin-bottom: -2.5em;">+++These aliases are used to control underlining/underscoring weights+++</span>
+
+ UNDERSCORE_WEIGHT RULE_WEIGHT
+ HEAD_UNDERLINE_WEIGHT RULE_WEIGHT
+ HEADER_RULE_WEIGHT RULE_WEIGHT
+ FOOTER_RULE_WEIGHT RULE_WEIGHT
+ FOOTNOTE_RULE_WEIGHT RULE_WEIGHT
+ COVER_UNDERLINE_WEIGHT RULE_WEIGHT
+ DOC_COVER_UNDERLINE_WEIGHT RULE_WEIGHT
+ ENDNOTE_STRING UNDERLINE_WEIGHT RULE_WEIGHT
+ ENDNOTE_TITLE UNDERLINE_WEIGHT RULE_WEIGHT
+ BIBLIOGRAPHY_STRING UNDERLINE_WEIGHT RULE_WEIGHT
+</span>
+
+<div class="rule-long" style="margin-top: 2em;"><hr/></div>
+
+<!-- Navigation links -->
+<table style="width: 100%; margin-top: 12px;">
+<tr>
+ <td style="width: 33%;"><a href="toc.html">Back to Table of Contents</a></td>
+ <td style="width: 33%; text-align: right;"><a href="#top">Top</a></td>
+</tr>
+</table>
+
+</div>
+
+<div class="bottom-spacer"><br/></div>
+
+</body>
+</html>
diff --git a/contrib/mom/momdoc/stylesheet.css b/contrib/mom/momdoc/stylesheet.css
new file mode 100644
index 0000000..9d9efa3
--- /dev/null
+++ b/contrib/mom/momdoc/stylesheet.css
@@ -0,0 +1,691 @@
+/* Copyright (C) 2004-2020 Free Software Foundation, Inc. */
+/* This file is part of mom, which is part of groff, a free software */
+/* project. */
+
+/* You can redistribute it and/or modify it under the terms of the */
+/* "GNU General Public License" as published by the "Free Software */
+/* Foundation", version 2.
+
+/* The license text is available in the internet at */
+/* <http://www.gnu.org/licenses/gpl-2.0.html> */
+
+/* stylesheet for the mom macros documentation */
+
+a:link { color: blue; text-decoration: none; }
+a:hover { color: red; text-decoration: underline; }
+a:visited { color: purple; text-decoration: none; }
+a:visited:hover { color: purple; text-decoration: underline; }
+a.header-link:visited { color: #6e70cc ; }
+a.header-link:visited:hover { color: #6e70cc ; }
+
+a:link.quick { text-decoration: underline; }
+.version /* version number for top of toc.html */
+{
+ font-size: 90% ;
+ text-align: center ;
+}
+
+.page /* Page setup: page color, size and border */
+{
+ width: 67% ;
+ position: relative ;
+ top: 12px ;
+ bottom: 12px ;
+ margin: auto ;
+ padding: 12px ;
+ border: solid 1px #ceac8d ;
+ color: #302419 ;
+ background-color: #ffffeb ;
+ font: 1em/1.5em arial,sans-serif ;
+ font-variant-ligatures: none;
+}
+
+.nobr /* Make <nobr> a class property */
+{
+ white-space: nowrap ;
+ hyphens: none ;
+}
+
+/* Heads */
+
+h1.docs
+{
+ font-family: arial,sans-serif ;
+ font-size: 125% ;
+ text-align: center ;
+ color: #002b56 ;
+ background-color: #e2f1ff ;
+ outline: solid 1px #99cccc ;
+ padding: 6px ;
+}
+h2.docs
+{
+ margin-bottom: -.25em ;
+ font-size: 105% ;
+ color: #000056 ;
+}
+h2.macro-group /* ie "Page setup" or "Indents" or "Multi-columns" */
+{
+ margin-top: 1em ;
+ font-size: 120% ;
+ color: #000056 ;
+ background-color: #dfccad ;
+ padding: 6px ;
+}
+h3.docs
+{
+ margin-bottom: -.5em ;
+ font-size: 95% ;
+ color: #000056 ;
+ text-transform: uppercase ;
+}
+h3.appendices
+{
+ font-size: 100% ;
+ text-transform: none ;
+}
+h3.notes
+{
+ display: inline-block ;
+ margin-top: .5em ;
+}
+h3.control
+{
+ padding-top: .5em ;
+ font-size: 100% ;
+ text-transform: none ;
+}
+h3.numbered
+{
+ font-size: 100% ;
+ margin-bottom: -.5em ;
+}
+h3.macro-id
+{
+ font-size: 105% ;
+ color: #000056 ;
+ text-transform: uppercase ;
+ margin-top: 3px ;
+ margin-bottom: 0px ;
+}
+h4.docs
+{
+ font-size: 95% ;
+ margin-bottom: -.5em ;
+ color: #000056 ;
+}
+h4.doc-param-macros
+{
+ margin-top: -.5em ;
+}
+h4.arg-list
+{
+ margin-top: -.5em ;
+}
+h4.fields
+{
+ color: #302419 ;
+}
+h5.docs
+{
+ margin-bottom: -.5em ;
+ font-size: 95% ;
+ color: #000056 ;
+ text-transform: uppercase ;
+}
+ul.doc-param-macros
+{
+ margin-top: .75em ;
+ margin-left: -.5em ;
+}
+.control-macros-header
+{
+ display: inline-block ;
+ margin-bottom: -.25em ;
+ padding: 2px 6px 0 6px ;
+ outline: 1px solid #000058 ;
+ font-size: 100% ;
+ background-color: #e2f1ff ;
+}
+.control-macro
+{
+ font-size: 100% ;
+ margin-bottom: -.75em ;
+ color: #2f2f71 ;
+}
+.macro-id-overline
+{
+ display: inline-block ;
+ border-top: solid 2px #8d8775 ;
+ margin-bottom: .5em ;
+}
+
+/* Paragraphs */
+
+p.no-indent
+{
+ text-indent: 0px ;
+}
+p.requires
+{
+ font-family: arial,sans-serif ;
+ font-style: italic ;
+ text-indent: 0px ;
+ margin-top: .25em ;
+}
+p.alias
+{
+ font-family: arial,sans-serif ;
+ font-style: normal ;
+ text-indent: 0px ;
+ margin-top: .25em ;
+}
+
+/* Horizontal rules */
+
+hr /* horizontal rules need a border to be colorized) */
+{
+ border: solid 1px #8d8775 ;
+}
+div.rule-short /* for section breaks; top/bottom margins set manually */
+{
+ display: block ;
+ width: 25% ;
+ margin: auto;
+ clear: both ;
+}
+div.rule-medium /* underneath mini-tocs; top/bottom margins set manually */
+{
+ display: block ;
+ width: 40% ;
+ margin: auto;
+ clear: both ;
+}
+div.rule-long /* precedes nav bar at bottom of page */
+{
+ display: block ;
+ width: 90% ;
+ margin: auto;
+}
+
+/* Boxed text */
+
+.box-macro-args /* Macro name+args */
+{
+ display: block ;
+ border: solid 1px #302419 ;
+ padding-top: 5px ;
+ padding-bottom: 3px ;
+ padding-left: 15px ;
+ padding-right: 15px ;
+ background-color: #ffffff ;
+ white-space: nowrap ;
+ overflow: auto ;
+}
+.box-code
+{
+ display: block ;
+ width: 100% ;
+ border: solid 1px #302419 ;
+ padding-top: 5px ;
+ padding-bottom: 18px ;
+ padding-left: 15px ;
+ padding-right: 15px ;
+ color: #6f614a ;
+ background-color: #ffffff ;
+ white-space: nowrap ;
+}
+.box-tip
+{
+ outline: solid 1px #ceac8d ;
+ padding-left: 15px ;
+ padding-right: 15px ;
+ text-align: justify ;
+ background-color: #f9f9d9 ;
+ margin-bottom: 1.5em ;
+ }
+.box-example-layout
+{
+ outline: solid 1px #ceac8d ;
+ padding-left: 15px ;
+ padding-right: 15px ;
+ text-align: justify ;
+ background-color: #f9f9d9 ;
+ margin-bottom: 2.5em ;
+ }
+.box-notes
+{
+ outline: solid 1px #ceac8d ;
+ padding-left: 15px ;
+ padding-right: 15px ;
+ text-align: justify ;
+ background-color: #f9f9d9 ;
+ margin-bottom: 1.5em ;
+ }
+.box-important
+{
+ outline: solid 1px #ce7a65 ;
+ padding-left: 15px ;
+ padding-right: 15px ;
+ text-align: justify ;
+ background-color: #f9f9d9 ;
+ margin-bottom: 1.5em ;
+}
+p.tip
+{
+ padding-top: 9px ;
+ padding-bottom: 9px ;
+ text-indent: 0px ;
+}
+p.tip-top
+{
+ padding-top: 9px ;
+ text-indent: 0px ;
+}
+p.tip-bottom
+{
+ padding-bottom: 9px ;
+ text-indent: 0px ;
+}
+
+/* Pre-formatted code */
+
+span.pre /* pre-formatted multi-line blocks; indent must be exactly 2 spaces */
+{
+ display: block ;
+ position: relative ;
+ top: -1em ;
+ margin-bottom: -1.5em ;
+ font-family: "Lucida Console",monospace ;
+ font-weight: bolder ;
+ font-size: 95% ;
+ white-space: pre ;
+ overflow: auto ;
+}
+span.defaults
+{
+ margin-left: 6px ;
+ padding-bottom: 1em ;
+ font-size: 95% ;
+}
+span.pre-in-pp
+{
+ display: block ;
+ position: relative ;
+ top: -1em ;
+ margin-bottom: -.5em ;
+ font-family: "Lucida Console",monospace ;
+ font-weight: bolder ;
+ font-size: 95% ;
+ white-space: pre ;
+ overflow: auto ;
+}
+span.important
+{
+ font-family: arial,sans-serif ;
+ font-weight: bolder ;
+ color: #8b0000 ;
+}
+span.note
+{
+ font-family: arial,sans-serif ;
+ font-weight: bolder ;
+ color: #443526 ;
+}
+span.additional-note
+{
+ font-family: arial,sans-serif ;
+ font-weight: bolder ;
+ font-style: italic ;
+ color: #443526 ;
+}
+span.tip
+{
+ font-family: arial,sans-serif ;
+ font-weight: bolder ;
+ color: #443526 ;
+}
+span.experts
+{
+ font-family: arial,sans-serif ;
+ font-weight: bolder ;
+ color: #443526 ;
+}
+/* Mini-tocs (usually at top of page) */
+
+/* 1-column, centered mini-toc */
+ul.mini-toc-centered
+{
+ text-align: center ;
+ list-style-type: none ;
+ margin-left: -40px ;
+}
+
+/* 2-column mini-toc column defs*/
+.mini-toc-col-1
+{
+ float: left ;
+ width: 49% ;
+ margin-left: -10px ;
+}
+.mini-toc-col-2
+{
+ float: left ;
+ width: 51% ;
+ clear: right ;
+}
+
+/* 3-column mini-toc column defs */
+.col-1-definitions
+{
+ float: left ;
+ width: 32% ;
+ height: 55em ;
+ padding-bottom: 9px;
+ background-color: #ded4bd ;
+ margin-right: 2% ;
+}
+.col-2-definitions
+{
+ float: left ;
+ width: 32% ;
+ height: 55em ;
+ padding-bottom: 9px;
+ background-color: #ded4bd ;
+ margin-right: 2% ;
+}
+.col-3-definitions
+{
+ float: left ;
+ width: 32% ;
+ height: 55em ;
+ padding-bottom: 9px;
+ background-color: #ded4bd ;
+ margin-bottom: 24px ;
+}
+
+/* List styles */
+
+ul.toc
+{
+ margin-top: .5em ;
+}
+ul.no-enumerator
+{
+ list-style-type: none ;
+}
+.list-head
+{
+ font-family: arial,sans-serif ;
+ font-weight: bolder ;
+ font-size: 110% ;
+ color: #000056 ;
+}
+.list-head-goodies
+{
+ font-family: arial,sans-serif ;
+ font-weight: normal ;
+ font-size: 110% ;
+ color: #000056 ;
+}
+.no-anchor
+{
+ color: #302419 ;
+ font-weight: bold ;
+}
+.text-color
+{
+ color: #302419 ;
+}
+li.item
+{
+ font-family: arial,sans-serif ;
+ font-weight: normal ;
+ font-size: 100% ;
+ margin-left: -10px ;
+ list-style-type: disc ;
+}
+.mini-toc
+{
+ margin-top: -1em ;
+ font-size: 90% ;
+}
+.sublist
+{
+ margin-left: -1em ;
+ font-size: 90% ;
+ color: #302419 ;
+ list-style-type: disc ;
+}
+.sub
+{
+ list-style-type: circle ;
+}
+.normal
+{
+ font-style: normal ;
+ font-size: 100% ;
+}
+.normal-smaller
+{
+ font-weight: normal ;
+ color: #302419 ;
+ font-size: 90% ;
+}
+.normal-sub-sub
+{
+ font-weight: normal ;
+ color: #302419 ;
+ font-size: 90% ;
+}
+
+/* Macro lists / defaults */
+
+div.macro-list-container
+{
+ background-color: #ded4bd ;
+ margin-bottom: 1.5em ;
+}
+h3.macro-list
+{
+ font-size: 100% ;
+ color: #000056 ;
+ text-transform: uppercase ;
+ padding: 9px ;
+}
+ul.macro-list
+{
+ margin-left: -21px ;
+ padding-right: 12px ;
+ list-style-type: none ;
+ font-family: arial,sans-serif ;
+ margin-top: -1.25em ;
+ padding-bottom: 6px ;
+}
+ol.macro-list
+{
+ font-family: arial,sans-serif ;
+ margin-top: -1.25em ;
+ padding-bottom: 6px ;
+}
+
+.defaults-container
+{
+ background-color: #e3d2b1 ;
+ border: 1px solid #3f2c00 ;
+ margin-bottom: 2.5em ;
+}
+h3.defaults
+{
+ font-size: 100% ;
+ color: #000056 ;
+ text-transform: uppercase ;
+ padding: 9px ;
+}
+p.defaults
+{
+ margin-top: .25em ;
+ margin-left: 6px ;
+ margin-right: 12px ;
+ margin-bottom: 0 ;
+}
+#toc-title, #toc-head, #toc-subhead, #toc-parahead
+{
+ display: block ;
+ margin-top: -1em ;
+ margin-bottom: -1em ;
+}
+
+/* Bottom of page spacer */
+
+div.bottom-spacer
+{
+ display: block ;
+ height: 24px ;
+}
+
+/* General markup */
+
+kbd
+{
+ font-family: "Lucida Console",monospace ;
+ font-weight: bold ;
+ font-size: 98% ;
+}
+kbd.macro-args
+{
+ margin-right: .5em ;
+ color: #6f614a ;
+ white-space: nowrap ;
+ overflow: auto ;
+}
+
+/* tocs */
+
+h1.toc
+{
+ font-family: arial,sans-serif ;
+ font-size: 175% ;
+ text-align: center ;
+ color: #002b56 ;
+ background-color: #e2f1ff ;
+ outline: solid 1px #99cccc ;
+ padding: 6px ;
+}
+h2.toc
+{
+ font-size: 120% ;
+ color: #000056 ;
+}
+h3.toc
+{
+ margin-top: -.5em ;
+ margin-bottom: -.5em ;
+ font-size: 100% ;
+ color: #6e70cc ;
+}
+.highlight
+{
+ font-weight: bold ;
+}
+.fourth-level
+{
+ margin-left: -1.25em ;
+ list-style-type: none ;
+}
+ul.toc-docproc
+{
+ margin-left: -1em ;
+}
+.toc-docproc-header
+{
+ margin-top: -.5em ;
+ text-transform: uppercase ;
+}
+a.header-link
+{
+ color: #6e70cc ;
+ font-size: 95% ;
+}
+
+/* Examples */
+
+.examples-container
+{
+ border: solid 1px #917963 ;
+ background-color: #f9f9d9 ;
+ padding-left: 24px ;
+ padding-right: 24px ;
+ padding-top: 3px ;
+ padding-bottom: 3px ;
+}
+
+.examples
+{
+ font-weight: bolder ;
+ font-size: 98% ;
+ color: #524b3f ;
+ margin-top: 12px ;
+ margin-bottom: 3px ;
+}
+
+/* definitions.html */
+
+table.definitions /* mini-toc is set up as a table */
+{
+ margin-top: 12px ;
+ text-align: left ;
+ margin-left: 12px ;
+}
+th.definitions
+{
+ padding-bottom: 6px ;
+ font-size: 120% ;
+ color: #000056 ;
+}
+dt /* definition terms in italic*/
+{
+ font-style: italic ;
+}
+dt.no-italic
+{
+ font-style: normal ;
+}
+
+/* Tables */
+table.quick-ref
+{
+ margin-top: .25em ;
+}
+table.quick-ref, th.quick-ref
+{
+ padding-bottom: .25em ;
+ font-family: "Lucida Console",monospace ;
+ font-weight: bold ;
+ text-align: left ;
+}
+
+td
+{
+ padding: 0 ;
+ padding-left: .5em ;
+}
+
+/* Misc */
+
+span.book-title
+{
+ font-style: italic ;
+}
+
+dt.params
+{
+ font-style: normal ;
+ font-weight: bold ;
+}
+
+dd.cover-args
+{
+ margin-bottom: .25em;
+ margin-left: 1.25em ;
+}
diff --git a/contrib/mom/momdoc/tables-of-contents.html b/contrib/mom/momdoc/tables-of-contents.html
new file mode 100644
index 0000000..1f9affb
--- /dev/null
+++ b/contrib/mom/momdoc/tables-of-contents.html
@@ -0,0 +1,1224 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+This file is part of groff, the GNU roff type-setting system.
+
+Copyright (C) 2004-2020 Free Software Foundation, Inc.
+Written by Peter Schaffter (peter@schaffter.ca).
+
+Permission is granted to copy, distribute and/or modify this document
+under the terms of the GNU Free Documentation License, Version 1.3 or
+any later version published by the Free Software Foundation; with no
+Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
+Texts.
+
+A copy of the Free Documentation License is included as a file called
+FDL in the main directory of the groff source package.
+-->
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+<head>
+ <meta http-equiv="content-type" content="text/html;charset=utf-8"/>
+ <title>Mom -- Document processing, tables of contents</title>
+ <link rel="stylesheet" type="text/css" href="stylesheet.css" />
+</head>
+
+<body style="background-color: #f5faff;">
+
+<!-- ==================================================================== -->
+
+<div id="top" class="page">
+
+<!-- Navigation links -->
+<table style="width: 100%;">
+<tr>
+ <td><a href="toc.html">Back to Table of Contents</a></td>
+ <td style="text-align: right;"><a href="refer.html#top">Next: Bibliographies and references</a></td>
+</tr>
+</table>
+
+<h1 class="docs">Tables of contents</h1>
+
+<div style="width: 68%; margin: auto;">
+<ul class="no-enumerator">
+ <li><a href="#toc-intro">Introduction to tables of contents</a></li>
+ <li><a href="#toc-appearance">Tables of contents appearance and behaviour</a></li>
+ <li><a href="#pdf-output">PDF output</a>
+ <ul style="margin-left: -.5em; list-style-type: disc;">
+ <li><a href="#positioning">Positioning the table of contents</a></li>
+ <li><a href="#auto-relocate-toc">AUTO_RELOCATE_TOC</a></li>
+ <li><a href="#psselect"><kbd>psselect</kbd></a></li>
+ </ul></li>
+ <li><a href="#toc">The TOC macro</a>
+ <ul style="margin-left: -.5em; list-style-type: disc;">
+ <li><a href="#toc-heading">TOC_HEADING</a></li>
+ </ul></li>
+ <li><a href="#toc-control-top">Control macros for tables of contents</a>
+ <ul style="margin-left: -.5em; list-style-type: disc;">
+ <li><a href="#index-toc-control">Table of contents control macros</a></li>
+ </ul></li>
+</ul>
+</div>
+
+<div class="rule-medium"><hr/></div>
+
+<h2 id="toc-intro" class="docs">Introduction to tables of contents</h2>
+
+<p>
+Want a table of contents for your document? Easy. Just enter
+<br/>
+<span class="pre-in-pp">
+ .TOC
+</span>
+as the very last macro of your input file. Mom will have picked
+up all document titles (in
+<a href="rectoverso.html#collate">collated</a>
+documents) and headings, as well as the endnotes section and
+bibliography, if they exist, and assigned them the appropriate page
+number. Talk about a no-brainer!
+</p>
+
+<p>
+That said, tables of contents have even more control macros than
+endnotes. As always, the reason for so many control macros is so
+that if you want to change just about any aspect of the table of
+contents&#8217; typographic appearance, you can.
+</p>
+
+<h2 id="toc-appearance" class="docs">Tables of contents appearance and behaviour</h2>
+
+<p>
+When you output a table of contents (with
+<kbd><a href="#toc">.TOC</a></kbd>),
+mom finishes processing the last page of your document then breaks
+to a new page for printing the table of contents.
+</p>
+
+<p>
+Mom follows standard typesetting conventions for tables of contents.
+To this end, if
+<a href="headfootpage.html#headers">HEADERS</a>
+are enabled for the document, the first page of the table of
+contents has no page header, but does have a first page number
+(roman numeral), always &#8220;i&#8221;, in the bottom margin. If
+<a href="headfootpage.html#footers">FOOTERS</a>
+are enabled for the document, the first page has neither a footer,
+nor a page number in the top margin. (If you absolutely must have
+a page footer on the first page of the table of contents, simply
+invoke
+<a href="headfootpage.html#footer-on-first-page"><kbd>.FOOTER_ON_FIRST_PAGE</kbd></a>
+immediately before <kbd>.TOC</kbd>.) Subsequent table of contents
+pages have both page headers or footers and a page number.
+</p>
+
+<p>
+Entries in a table of contents are hierarchically indented, as you
+would expect, and if headings are numbered in the body of the document,
+you can instruct mom to number them in the table of contents as
+well (see
+<a href="#toc-entry-numbers">TOC_ENTRY_NUMBERS</a>).
+</p>
+
+<p>
+Tables of contents are never set in columns, regardless of whether
+the rest of the document is. Lastly, if
+<a href="rectoverso.html#recto-verso">recto/verso</a>
+printing is enabled, the table of contents respects it. This
+sometimes leads to tables of contents that begin with the wrong
+margins, but the margins can be corrected either by outputting a
+<a href="headfootpage.html#blank-pages">BLANKPAGE</a>
+or by using the control macro
+<a href="#toc-rv-switch">TOC_RV_SWITCH</a>.
+</p>
+
+<p>
+The overall table of contents
+<a href="definitions.html#family">family</a>,
+<a href="definitions.html#ps">point size</a>
+and
+<a href="definitions.html#leading">lead</a>
+can be altered with
+<a href="definitions.html#controlmacro">control macros</a>,
+as can the family,
+<a href="definitions.html#font">font</a>,
+point size and indent of each level of entry. Furthermore, the page
+numbering style can be changed, as can the amount of visual space
+reserved for entry page numbers.
+</p>
+
+<h2 id="pdf-output" class="docs">PDF output</h2>
+
+<p>
+When files containing a table of contents are processed with
+<a href="using.html#pdfmom" style="font-weight: bold">pdfmom</a>,
+entries in the table of contents are clickable links when the
+document is viewed at the screen. The colour of the links is the
+last <kbd>.PDF_LINK_COLOR</kbd> in effect, so if you wish another
+colour, it should be set just before issuing <kbd>.TOC</kbd>.
+</p>
+
+<p>
+When preparing files for printing, coloured links in both the table
+of contents and elsewhere in the document may not be desirable.
+You can disable the colour by passing
+<a href="using.html#pdfmom" style="font-weight: bold">pdfmom</a>
+the <kbd>-c</kbd> option, like this: <br/>
+<span class="pre-in-pp">
+ pdfmom -c doc.mom &gt; doc.pdf
+</span>
+</p>
+
+<h3 id="positioning" class="docs">Positioning the Table of Contents</h3>
+
+<p>
+Because a table of contents can&#8217;t be generated until the
+end of a document (hence the last macro in the file), it is also
+the last page of the document. While this is desirable for some
+language conventions&mdash;French, for example&mdash;it is not
+desirable for others.
+</p>
+
+<h4 id="auto-relocate-toc" class="docs">Automatic PDF relocation of the Table of Contents</h4>
+
+<p>
+When
+<a href="using.html#pdfmom" style="font-weight: bold">pdfmom</a>
+is used to process files with a table of contents, the macro
+<kbd>.AUTO_RELOCATE_TOC</kbd> can be used to reposition the table
+of contents to the top of the output document, with the presence
+of a cover and/or title page sensibly taken into account. Full
+AUTO_RELOCATE_TOC usage is described in the manual,
+<a href="https://www.schaffter.ca/mom/pdf/mom-pdf.pdf"><span class="book-title">Producing PDFs with groff and mom</span></a>.
+</p>
+
+<p>
+In order to take advantage of automatic table of contents
+repositioning, you must use
+<a href="using.html#pdfmom" style="font-weight: bold">pdfmom</a>
+with groff&#8217;s native PDF driver (i.e. without the
+<strong>-Tps</strong> flag). Files that need to be processed with
+the <strong>-Tps</strong> flag require you to reposition the table
+of contents yourself with <strong>psselect</strong>, described
+below.
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span>
+<kbd>AUTO_RELOCATE_TOC</kbd> must come before
+<a href="docprocessing.html#start">START</a>.
+</p>
+</div>
+
+<h4 id="psselect" class="docs"><span style="text-transform: none">Using psselect to relocate the Table of Contents in PostScript documents</span></h4>
+
+<p>
+To change the location of the table of contents in files
+processed with <kbd>pdfmom -Tps</kbd>, you have two choices:
+rearrange the pages by hand (okay for one or two hard copies),
+or use the <strong>psselect</strong> programme provided by the
+<strong>psutils</strong> suite of tools (which you may have to
+install as a package from your distribution if it is not already on
+your system).
+</p>
+
+<p>
+The procedure for using <strong>psselect</strong> to put the
+table of contents near the beginning of a document begins by
+you determining how many pages it contains. You can do this by
+previewing the document with the document viewer of your choice
+(gv, Okular, Evince, etc).
+</p>
+
+<p>
+Once you know the number of pages in the table of contents, you use
+<strong>psselect</strong> to place them where you want.
+</p>
+
+<p>
+Say, for example, the table of contents runs to just one page. The
+command to place a one-page table of contents at the start of a
+document is:
+<br/>
+<span class="pre-in-pp">
+ psselect -p _1,1-_2
+</span>
+The <kbd>-p</kbd> option instructs <kbd>psselect</kbd> that what
+follows is a comma-separated list of the order in which you want
+pages of a document rearranged. The underscore character means
+"counting backwards from the end of the document". Thus, the above
+says: "Put the last page first (i.e. the table of contents), followed
+by all pages from the original first page up to the second to last
+(i.e. the last page before the table of contents)."
+</p>
+
+<p>
+If your table of contents runs to two pages, the option to
+<kbd>psselect</kbd> would look like this:
+<br/>
+<span class="pre-in-pp">
+ psselect -p _1-_2,1-_3
+</span>
+If your table of contents runs to two pages and you have a cover
+page, the command would look like this:
+<br/>
+<span class="pre-in-pp">
+ psselect -p 1,_1-_2,2-_3
+</span>
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span>
+<kbd>psselect</kbd> outputs to stdout, so you have to redirect the
+output to a new file.
+<br/>
+<span class="pre-in-pp" style="margin-bottom: -1em">
+ psselect -p &lt;page list&gt; &lt;file&gt;.ps &gt; &lt;new-file&gt;.ps
+</span>
+</p>
+</div>
+
+<!-- -TOC- -->
+
+<div class="macro-id-overline">
+<h3 id="toc" class="macro-id">The TOC macro</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>TOC</b> <kbd class="macro-args">[ INCLUDE_TITLE ]</kbd>
+</div>
+
+<p>
+If you want a table of contents, just place <kbd>.TOC</kbd> at the
+very end of your document. Mom takes care of the rest.
+</p>
+
+<p>
+The optional argument, <kbd>INCLUDE_TITLE</kbd>, is needed only
+if your document is standalone, i.e. is not collated, for example
+an essay. By default, mom does not include the title (and page
+number) of standalone documents in the Table of Contents since it
+is largely redundant. If you would like her to include the title,
+invoke <kbd>.TOC</kbd> with <kbd>INCLUDE_TITLE</kbd>.
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span>
+If the last line of text in a document, before <kbd>.TOC</kbd>,
+falls too close to the bottom margin, or if the line is followed
+by a macro likely to cause a linebreak (e.g. <kbd>.LIST OFF</kbd> or
+<kbd>.IQ</kbd>), mom may output a superfluous blank page before the
+Table of Contents.
+</p>
+
+<p class="tip-bottom" style="margin-top: -1em">
+In order to avoid this, insert
+<a href="typesetting.html#el"><kbd>.EL</kbd></a>
+after the last line of text, before <kbd>.TOC</kbd> and/or any
+concluding macros. For example,
+<br/>
+<span class="pre-in-pp">
+ some concluding text.
+ .EL
+ .TOC
+</span>
+or
+<br/>
+<span class="pre-in-pp">
+ some concluding text.
+ .EL
+ .LIST OFF
+ .TOC
+</span>
+</p>
+</div>
+
+<div class="macro-id-overline">
+<h3 class="macro-id">TOC heading</h3>
+</div>
+
+<div id="toc-heading" class="box-macro-args">
+Macro: <b>TOC_HEADING</b> <kbd class="macro-args">&quot;&lt;single line TOC heading&gt;&quot;</kbd>
+</div>
+<p class="requires">
+&bull;&nbsp;Argument must be enclosed in double-quotes
+</p>
+
+<p>
+You may sometimes want to insert a line of text into the table of
+contents without it referring to a page number, for example to
+identify a &#8220;Part I&#8221; and a &#8220;Part II&#8221;.
+</p>
+
+<p>
+Placed before any instance of the
+<a href="docprocessing.html#start">START</a>
+macro, TOC_HEADING inserts its text into the table of contents
+before the next section title or heading. A modest amount of
+whitespace is introduced above and beneath to distinguish it easily
+from table of contents entries.
+</p>
+
+<p>
+The appearance of the heading may be controlled with
+the macro
+<a href="docprocessing.html#toc-heading-style">TOC_HEADING_STYLE</a>.
+</p>
+
+
+<div class="rule-short"><hr/></div>
+
+<h2 id="toc-control-top" class="macro-group">Control macros for tables of contents</h2>
+
+<p>
+Aside from allowing you to set the style of table of contents
+entries on a per-level basis, the control macros let you design
+the table of contents as if they were a complete document unto
+themselves (overall family, headers/footers, pagination, etc).
+</p>
+
+<div class="defaults-container" style="background-color: #ded4bd; border: none;">
+<h3 id="index-toc-control" class="docs defaults">Table of contents control macros</h3>
+
+<ol style="margin-top: .5em; padding-bottom: .5em;">
+ <li><a href="#toc-general">General table of contents style control</a>
+ <ul style="margin-left: -.5em;">
+ <li><a href="#toc-family">TOC_FAMILY</a> &ndash; base family for tables of contents</li>
+ <li><a href="#toc-pt-size">TOC_PT_SIZE</a> &ndash; base point size for tables of contents</li>
+ <li><a href="#toc-lead">TOC_LEAD</a> &ndash; leading of tables of contents</li>
+ </ul></li>
+ <li><a href="#toc-pagenumbering">Page numbering</a>
+ <ul style="margin-left: -.5em;">
+ <li><a href="#paginate-toc">PAGINATE_TOC</a> &ndash; turn table of contents pagination on or off</li>
+ <li><a href="#toc-pagenum-style">TOC_PAGENUM_STYLE</a> &ndash; table of contents page numbering style</li>
+ </ul></li>
+ <li><a href="#toc-header">Header string (e.g. &#8220;Contents&#8221;) and style</a>
+ <ul style="margin-left: -.5em;">
+ <li><a href="#toc-header-string">Changing the header string</a></li>
+ <li><a href="#toc-header-v-pos">Header string vertical placement</a></li>
+ <li><a href="#toc-header-style">Header string control macros and defaults</a></li>
+ </ul></li>
+ <li><a href="#toc-style">Entries and reference page number style</a>
+ <ul style="margin-left: -.5em;">
+ <li><a href="#toc-pn">Reference page numbers style control</a></li>
+ <li><a href="#toc-title-style">Title entry style control</a></li>
+ <li><a href="#toc-entry-style">Heading entry style control</a></li>
+ <li>Numbering table of contents items
+ <ul style="margin-left: -.75em; list-style: disc">
+ <li><a href="#toc-prefix-ch-number">Prefix chapter/section numbers</a>
+ <ul style="margin-left: -.75em;">
+ <li><a href="#toc-pad-ch-numbers">Pad chapter/section numbers</a></li>
+ </ul></li>
+ <li><a href="#toc-entry-numbers">Numbering heading entries</a></li>
+ </ul></li>
+ </ul></li>
+ <li><a href="#toc-additional">Additional table of contents control macros</a>
+ <ul style="margin-left: -.5em;">
+ <li><a href="#toc-appends-author">Append author(s) to table of contents title entries</a></li>
+ <li><a href="#toc-title-entry">Alter the wording of a table of contents title entry</a></li>
+ <li><a href="#space-toc-items">Space table of contents entries pleasingly</a></li>
+ <li><a href="#toc-padding">Establish the number of placeholders to leave for page reference numbers</a></li>
+ <li><a href="#toc-rv-switch">Switch tables of contents page margins</a></li>
+ </ul></li>
+ <li><a href="#toc-more">I still need more!</a></li>
+</ol>
+</div>
+
+<h4 id="toc-general" class="docs" style="margin-top: -1.5em; margin-bottom: .5em;">1. General tables of contents style control</h4>
+
+<!-- -TOC_FAMILY- -->
+
+<div id="toc-family" class="box-macro-args">
+Macro: <b>TOC_FAMILY</b> <kbd class="macro-args">&lt;family&gt;</kbd>
+</div>
+
+<p>
+TOC_FAMILY establishes the default family for every page element in
+a table of contents, including the table of contents&#8217; header
+string (by default, &#8220;Contents&#8221;) and the page
+number in the top or bottom margin. The default is the prevailing
+document family.
+</p>
+
+<p>
+All page elements in the table of contents also have their own
+_FAMILY control macros, which can be used on a case-by-case basis to
+override the default family set with TOC_FAMILY.
+</p>
+
+<!-- -TOC_PT_SIZE- -->
+
+<div id="toc-pt-size" class="box-macro-args">
+Macro: <b>TOC_PT_SIZE</b> <kbd class="macro-args">&lt;base type size of the toc&gt;</kbd>
+</div>
+
+<p class="requires">
+&bull;&nbsp;Does not require a <a href="definitions.html#unitofmeasure">unit of measure</a>; points is assumed
+</p>
+
+<p>
+Unlike most other control macros that deal with size of document
+elements, TOC_PT_SIZE takes as its argument an absolute value,
+relative to nothing. (Compare this with the
+<a href="docelement.html#point-size">_SIZE</a>
+control macros.) The argument represents the base point size
+of tables of contents from which the size of all other table of
+contents elements are calculated.
+</p>
+
+<p>
+The default for
+<a href="docprocessing.html#printstyle">PRINTSTYLE <kbd>TYPESET</kbd></a>
+is 12.5 points (the same default size used in the body of the
+document).
+</p>
+
+<!-- -TOC_LEAD- -->
+
+<div id="toc-lead" class="box-macro-args">
+Macro: <b>TOC_LEAD</b> <kbd class="macro-args">&lt;leading of the toc&gt; [ ADJUST ]</kbd>
+</div>
+
+<p class="requires">
+&bull;&nbsp;Does not require a <a href="definitions.html#unitofmeasure">unit of measure</a>; points is assumed
+</p>
+
+<p>
+Unlike most other control macros that deal with leading of document
+elements, TOC_LEAD takes as its argument an absolute value, relative
+to nothing. Therefore, the argument represents the
+<a href="definitions.html#leading">leading</a>
+of tables of contents in
+<a href="definitions.html#picaspoints">points</a>
+unless you append an alternative
+<a href="definitions.html#unitofmeasure">unit of measure</a>.
+For example,
+<br/>
+<span class="pre-in-pp">
+ .TOC_LEAD 14
+</span>
+sets the base leading of tables of contents to 14 points, whereas
+<br/>
+<span class="pre-in-pp">
+ .TOC_LEAD .5i
+</span>
+sets the base leading of tables of contents to 1/2 inch.
+</p>
+
+<p>
+If you want the leading of tables of contents adjusted to fill the
+page, pass TOC_LEAD the optional argument <kbd>ADJUST</kbd>. (See
+<a href="docprocessing.html#doc-lead-adjust">DOC_LEAD_ADJUST</a>
+for an explanation of leading adjustment.)
+</p>
+
+<p>
+The default for
+<a href="docprocessing.html#printstyle">PRINTSTYLE TYPESET</a>
+is the prevailing document lead (16 by default), adjusted.
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span>
+Even if you give mom a <kbd>.DOC_LEAD_ADJUST&nbsp;OFF</kbd> command,
+she will still, by default, adjust the leading of the table of
+contents. You <i>must</i> enter
+<kbd>TOC_LEAD&nbsp;&lt;lead&gt;</kbd> with no <kbd>ADJUST</kbd>
+argument to disable this default behaviour.
+</p>
+
+<p class="tip-bottom">
+<span class="additional-note">Additional note:</span>
+Tables of contents are always double-spaced in
+<a href="docprocessing.html#printstyle">PRINTSTYLE <kbd>TYPEWRITE</kbd></a>,
+regardless of whether the body of the document is single-spaced.
+</p>
+</div>
+
+<h4 id="toc-pagenumbering" class="docs">2. Page numbering</h4>
+
+<p>
+The pagination style of tables of contents is controlled by the same
+macros that control
+<a href="headfootpage.html#pagination-intro">document page numbering</a>,
+except
+<a href="headfootpage.html#pagenum">PAGENUM</a>
+(tables of contents always start on page 1). The defaults are the
+same as for the rest of the document, with the exception that tables
+of contents, by default, have roman numeral page numbers.
+</p>
+
+<p>
+Therefore, if you wish to change some aspect of table of contents
+pagination style, use the
+<a href="headfootpage.html#index-pagination-control">document pagination control macros</a>
+immediately prior to <kbd>.TOC</kbd>.
+</p>
+
+<p>
+A special macro,
+<a href="#toc-pagenum-style">TOC_PAGENUM_STYLE</a>,
+controls the style of table of contents pagination (i.e. the actual
+table of contents pages&#8217; numbers, not the page number
+references of entries).
+</p>
+
+<!-- -PAGINATE_TOC- -->
+
+<div id="paginate-toc" class="box-macro-args">
+Macro: <b>PAGINATE_TOC</b> <kbd class="macro-args">&lt;toggle&gt;</kbd>
+</div>
+
+<p>
+By default, mom paginates tables of contents. If you&#8217;d like
+her not to, do
+<br/>
+<span class="pre-in-pp">
+ .PAGINATE_TOC OFF
+</span>
+(or <kbd>NO, X,</kbd> etc).
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span>
+Simply invoking
+<kbd>.PAGINATION&nbsp;OFF</kbd>
+or
+<kbd>.PAGINATE&nbsp;OFF</kbd>
+disables table of contents pagination <i>for the first
+page of the table of contents only.</i> You must use
+<kbd>.PAGINATE_TOC&nbsp;OFF</kbd> to disable table of contents
+pagination completely, even if pagination is turned off elsewhere in
+your document.
+</p>
+</div>
+
+<!-- -TOC_PAGENUM_STYLE- -->
+
+<div id="toc-pagenum-style" class="box-macro-args">
+Macro: <b>TOC_PAGENUM_STYLE</b> <kbd class="macro-args">&lt;DIGIT | ROMAN | roman | ALPHA | alpha&gt;</kbd>
+</div>
+<p class="requires">
+See
+<a href="headfootpage.html#pagenum-style"><span style="font-style: normal;">PAGENUM_STYLE</span></a>
+for an explanation of the arguments.
+</p>
+
+<p>
+By default, mom uses roman numerals to number table of contents
+pages. Use TOC_PAGENUM_STYLE if you&#8217;d prefer something else.
+For example, to have standard digits instead of roman numerals, do
+the following:
+<br/>
+<span class="pre-in-pp">
+ .TOC_PAGENUM_STYLE DIGIT
+</span>
+</p>
+
+<h4 id="toc-header" class="docs" style="margin-top: -.5em;">3. Header string and style</h4>
+
+<p>
+The table of contents header string is the title that appears at the top of the
+table of contents. By default, it&#8217;s &#8220;Contents&#8221;.</p>
+
+<div id="toc-header-string" class="box-macro-args">
+Macro: <b>TOC_HEADER_STRING</b> <kbd class="macro-args">&lt;string&gt;</kbd>
+</div>
+
+<p>
+If you&#8217;d like the title of the table of contents to read
+something other than &#8220;Contents&#8221;, do, for
+example
+<br/>
+<span class="pre-in-pp">
+ .TOC_HEADER_STRING "Table of Contents"
+</span>
+</p>
+
+<h5 id="toc-header-v-pos" class="docs" style="margin-top: 1em; text-transform: none;">Header string vertical placement</h5>
+
+<div id="toc-header-v-pos1" class="box-macro-args" style="margin-top: 1em">
+Macro: <b>TOC_HEADER_V_POS</b> <kbd class="macro-args">&lt;distance from top of page&gt;</kbd>
+</div>
+<p class="requires">
+&bull;&nbsp;Requires a <a href="definitions.html#unitofmeasure">unit of measure</a>
+</p>
+
+<p>
+Normally, the TOC header string falls at the same vertical position
+as the
+<a href="definitions.html#docheader">docheader</a>.
+If you&#8217;d like it to fall at a different position, say 2 inches, use
+<br/>
+<span class="pre-in-pp">
+ .TOC_HEADER_V_POS 2i
+</span>
+</p>
+
+<h5 id="toc-header-style" class="docs" style="margin-top: -.5em; text-transform: none;">Header string control macros and defaults</h5>
+
+<div class="defaults-container" style="margin-top: 1em; padding-bottom: 8px;">
+<p class="defaults" style="padding-top: 6px;">
+See
+<a href="docelement.html#control-macro-args">Arguments to the control macros</a>.
+<br/>
+The following TOC_HEADER control macros may also be
+<a href="#grouping">grouped</a>
+using TOC_HEADER_STYLE.
+</p>
+<span class="pre defaults">
+.TOC_HEADER_FAMILY default = prevailing doc family
+.TOC_HEADER_FONT default = bold
+.TOC_HEADER_SIZE default = +4
+.TOC_HEADER_QUAD default = left
+.TOC_HEADER_COLOR default = black
+.TOC_HEADER_CAPS default = no
+.TOC_HEADER_SMALLCAPS default = no
+.TOC_HEADER_UNDERSCORE default = none
+</span>
+</div>
+
+<h4 id="toc-style" class="docs" style="margin-top: -.5em;">4. Entries and reference page numbers style</h4>
+
+<p>
+&#8220;Entries&#8221; refers to the hierarchical arrangement of
+section titles (in
+<a href="rectoverso.html#collate-intro">collated</a>
+documents) and headings as they appear in the table of contents:
+<span class="pre-in-pp">
+ Section title
+ Head level 1
+ Head level 2
+ Head level 3
+ ...
+</span>
+The style for title entries (e.g. chapter numbers or titles) and
+heading levels is controlled by
+<a href="#toc-title-style">TOC_TITLE_STYLE </a>
+and
+<a href="#toc-entry-style">TOC_ENTRY_STYLE</a>
+respectively.
+</p>
+
+<p id="toc-pn">
+&#8220;Reference page numbers&#8221; means the page numbers
+associated with entries. Macros to control their style take the
+form <kbd>.TOC_PN_&lt;SPEC&gt;</kbd>, and the defaults are listed
+here.
+</p>
+
+<div class="defaults-container" style="margin-top: 1em; padding-bottom: 8px;">
+<p class="defaults" style="padding-top: 6px;">
+See
+<a href="docelement.html#control-macro-args">Arguments to the control macros</a>.
+
+<span class="pre defaults">
+.TOC_PN_FAMILY default = prevailing doc family
+.TOC_PN_FONT default = roman
+.TOC_PN_SIZE default = 0
+</span>
+</p>
+</div>
+
+<!-- -TOC_TITLE_STYLE- -->
+
+<div id="toc-title-style" class="box-macro-args">
+Macro: <b>TOC_TITLE_STYLE</b> <kbd class="macro-args">&lt;see below for args&gt;</kbd>
+</div>
+
+<p>
+TOC_TITLE_STYLE allows you to set all the style parameters for
+title entries in the tables of contents with one macro. The
+number of arguments can run long, so you may want to break them into
+several lines with the backslash character (<kbd>\</kbd>). The
+arguments are:
+<br/>
+<span class="pre-in-pp">
+ FAMILY &lt;family&gt;
+ FONT &lt;font&gt;
+ SIZE +|-&lt;n&gt;
+ COLOR &lt;color&gt;
+ INDENT &lt;amount&gt;
+ CAPS | NO_CAPS
+</span>
+The arguments may be entered in any order.
+</p>
+
+<p>
+The family, font, size, and color arguments behave identically
+to the individual control macros that govern other tags, therefore see
+<a href="docelement.html#control-macro-args">Arguments to the control macros</a>
+for usage. Their defaults are the same as for paragraphs in
+<a href="definitions.html#running">running text</a>.
+</p>
+
+<p>
+<kbd>INDENT</kbd> lets you indent title entries by the amount specified, and
+requires a
+<a href="definitions.html#unitofmeasure">unit of measure</a>.
+The default is zero.
+</p>
+
+<p>
+<kbd>CAPS</kbd> instructs mom to capitalize title entries.
+Capitalization may be enabled or disabled on a per-entry-level
+basis.
+</p>
+
+<p>
+As an example, if you want title entries bold, slightly larger than other
+entries and capitalized, you could do either
+<br/>
+<span class="pre-in-pp">
+ .TOC_TITLE_ENTRY FONT B SIZE +.5 CAPS
+</span>
+or
+<br/>
+<span class="pre-in-pp">
+ .TOC_TITLE_ENTRY \
+ FONT B \
+ SIZE +.5 \
+ CAPS
+</span>
+</p>
+
+<!-- -TOC_ENTRY_STYLE- -->
+
+<div id="toc-entry-style" class="box-macro-args">
+Macro: <b>TOC_ENTRY_STYLE</b> <kbd class="macro-args">&lt;level&gt; &lt;see below for remaining args&gt;</kbd>
+</div>
+
+<p>
+TOC_ENTRY_STYLE allows you to set individually all the style
+parameters for any level of entry (beneath titles) in the tables
+of contents. The number of arguments can run long, so you may
+want to break them into several lines with the backslash character
+(<kbd>\</kbd>).
+</p>
+
+<p>
+<kbd>&lt;level&gt;</kbd> corresponds to a
+<a href="docelement.html#heading">HEADING</a>
+level assigned in the body of the document. The remaining arguments
+are as follows.
+<br/>
+<span class="pre-in-pp">
+ FAMILY &lt;family&gt;
+ FONT &lt;font&gt;
+ SIZE +|-&lt;n&gt;
+ COLOR &lt;color&gt;
+ INDENT &lt;amount&gt;
+ CAPS | NO_CAPS
+</span>
+The arguments may be entered in any order.
+</p>
+
+<p>
+The family, font, size, and color arguments behave identically
+to the individual control macros that govern other tags, therefore see
+<a href="docelement.html#control-macro-args">Arguments to the control macros</a>
+for usage. Their defaults are the same as for paragraphs in
+<a href="definitions.html#running">running text</a>.
+</p>
+
+<p>
+<kbd>INDENT</kbd> lets you indent entries by the amount specified, and
+requires a
+<a href="definitions.html#unitofmeasure">unit of measure</a>.
+Mom sensibly indents and aligns all levels of entry. If you change
+the indent for any level, all levels beneath it are still indented
+according to mom&#8217;s normal arrangement, but with the indent
+assigned to <kbd>level</kbd> taken into account. When you use
+<kbd>INDENT</kbd>, the indent is measured from the left edge of
+the text of the previous level, including numbering, if any.
+</p>
+
+<p>
+<kbd>CAPS</kbd> instructs mom to capitalize title entries.
+Capitalization may be enabled or disabled on a per-title basis.
+</p>
+
+<p>
+As an example, if you want a particular entry level, say
+&#8220;2&#8221;, to be in Helvetica, italics, and slightly larger
+than other entries, you could do either
+<br/>
+<span class="pre-in-pp">
+ .TOC_ENTRY_STYLE 2 FAMILY H FONT I SIZE +.25
+</span>
+or
+<br/>
+<span class="pre-in-pp">
+ .TOC_ENTRY_STYLE 2 \
+ FAMILY H
+ FONT I \
+ SIZE +.25
+</span>
+</p>
+
+<!-- -PREFIX_CHAPTER_NUMBERS- -->
+
+<div id="toc-prefix-ch-number" class="box-macro-args">
+Macro: <b>TOC_PREFIX_CHAPTER_NUMBER</b> <kbd class="macro-args">&lt;none&gt; &lt;anything&gt;</kbd>
+</div>
+<p class="alias" style="margin-bottom: 0;">
+<i>Alias:</i> <b>TOC_PREFIX_SECTION_NUMBER</b>
+</p>
+
+<p>
+By default, mom does not prefix a chapter number to chapters or
+section titles in the table of contents. If you would like her to
+do so, invoke <kbd>.TOC_PREFIX_CHAPTER_NUMBER</kbd> without an
+argument before
+<a href="docprocessing.html#start">START</a>.
+</p>
+
+<p>
+You may subsequently disable the prefixing of chapter numbers
+by supplying the macro with any argument (<kbd>OFF</kbd>,
+<kbd>QUIT</kbd>, <kbd>Q</kbd>, <kbd>X</kbd>...) prior to the
+<kbd>.START</kbd> that comes after
+<a href="rectoverso.html#collate"><kbd>.COLLATE</kbd></a>.
+</p>
+
+<p>
+This macro is useful you want chapters numbered in the table of
+contents but the chapters themselves are identified by title only.
+It can be used with both
+<a href="docprocessing.html#doctype">DOCTYPE CHAPTER</a>
+and
+<a href="docprocessing.html#doctype">DOCTYPE DEFAULT</a>.
+The alias <b>TOC_PREFIX_SECTION_NUMBER</b> may be preferable
+in the latter case.
+</p>
+
+<!-- -PAD_TOC_CHAPTER_NUMBERS- -->
+
+<div id="toc-pad-ch-numbers" class="box-macro-args">
+Macro: <b>PAD_TOC_CHAPTER_NUMBERS</b> <kbd class="macro-args">&lt;number of chapters&gt;</kbd>
+</div>
+<p class="alias" style="margin-bottom: 0;">
+<i>Alias:</i> <b>PAD_TOC_SECTION_NUMBERS</b>
+</p>
+
+
+<p>
+If the number of chapters or major sections
+(<a href="docprocessing.html#doctype">DOCTYPE DEFAULT</a>)
+exceeds 9, you can have mom pad the numbers so the rightmost
+numerals of the chapter numbers align. Simply invoke
+<kbd>PAD_TOC_CHAPTER_NUMBERS</kbd> with the number of chapters in
+the document.
+</p>
+
+<p>
+Without padding:
+<br/>
+<span class="pre-in-pp">
+ 9. Chapter Title.....................100
+ 10. Chapter Title....................123
+</span>
+With padding:
+<br/>
+<span class="pre-in-pp">
+ 9. Chapter Title....................100
+ 10. Chapter Title....................123
+</span>
+</p>
+
+<!-- -TOC_ENTRY_NUMBERS- -->
+
+<div id="toc-entry-numbers" class="box-macro-args">
+Macro: <b>TOC_ENTRY_NUMBERS</b> <kbd class="macro-args">&lt;FULL&gt; &lt;TRUNCATE&gt; &lt;NONE&gt;</kbd>
+</div>
+
+<p>
+If numbering is enabled for any level of
+<a href="docelement.html#heading">HEADING</a>,
+mom, by default, includes the numbering in that level&#8217;s
+entries in table of contents. If you would prefer that
+numbering not be included in the table of contents,
+issue <kbd>.TOC_ENTRY_NUMBERS&nbsp;NONE</kbd>. If
+you&#8217;d like to include numbering, but not the full,
+concatenated numbering used in the body of the document, issue
+<kbd>.TOC_ENTRY_NUMBERS&nbsp;TRUNCATE</kbd>.
+</p>
+
+<p>
+Assuming numbering is enabled for HEADINGs 1, 2, and 3,
+<kbd>.TOC_ENTRY_NUMBERS FULL</kbd> (mom&#8217;s default), would
+result in
+<br/>
+<span class="pre-in-pp">
+ 1. Level-1 entry
+ 1.1. Level-2 entry
+ 1.1.1. Level-3 entry
+ 2. Level-1 entry
+ 2.1. Level-2 entry
+ 2.1.1. Level-3 entry
+</span>
+whereas <kbd>.TOC_ENTRY_NUMBERS TRUNCATE</kbd> would produce
+<br/>
+<span class="pre-in-pp">
+ 1. Level-1 entry
+ 1. Level-2 entry
+ 1. Level-3 entry
+ 2. Level-1 entry
+ 1. Level-2 entry
+ 1. Level-3 entry
+</span>
+and <kbd>.TOC_ENTRY_NUMBERS NONE</kbd> would remove numbering
+completely.
+<br/>
+<span class="pre-in-pp">
+ Level-1 entry
+ Level-2 entry
+ Level-3 entry
+ Level-1 entry
+ Level-2 entry
+ Level-3 entry
+</span>
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span>
+<kbd>.TOC_ENTRY_NUMBERS TRUNCATE</kbd> removes the numbering
+associated with table of contents chapter or section titles
+when
+<a href="docelement.html#prefix-chapter-number">PREFIX_CHAPTER_NUMBER</a>
+is enabled. To enable the numbering of chapter or section titles
+in this circumstance, use
+<a href="#toc-prefix-ch-number">TOC_PREFIX_CHAPTER_NUMBER</a>.
+</p>
+</div>
+
+<h4 id="toc-additional" class="docs" style="margin-top: -1em;">5. Additional table of contents control macros</h4>
+
+<p>
+The following five macros allow you to
+</p>
+<ul style="margin-top: -.5em; margin-left: -.5em;">
+ <li>instruct mom to <a href="#toc-appends-author">append author(s) to</a> <a href="docprocessing.html#title">TITLE</a> <a href="toc-appends-author">entries</a></li>
+ <li><a href="#toc-title-entry">alter the wording of</a> <a href="docprocessing.html#title">TITLE</a> <a href="#toc-title-entry">entries</a></li>
+ <li>instruct mom to <a href="#space-toc-items">space table of contents entries</a> pleasingly</li>
+ <li>establish <a href="#toc-padding">how many placeholders to leave for page number references</a></li>
+ <li><a href="#toc-rv-switch">switch table of contents page margins</a> should they be incorrect for recto/verso printing</li>
+</ul>
+
+<!-- -TOC_APPENDS_AUTHOR- -->
+
+<div id="toc-appends-author" class="box-macro-args">
+Macro: <b>TOC_APPENDS_AUTHOR</b> <kbd class="macro-args">&lt;none&gt; | &quot;&lt;name(s) of authors&gt;&quot;</kbd>
+</div>
+
+<p>
+In certain kinds of collated documents, different authors are
+responsible for the articles or stories contained within them. In
+such documents, you may wish to have the author or authors appended
+to the table of contents&#8217; title entry for each story or
+article.
+</p>
+
+<p>
+If you invoke <kbd>.TOC_APPENDS_AUTHOR</kbd> <i>without</i> an
+argument, mom appends the first argument you passed to
+<a href="docprocessing.html#author">AUTHOR</a>
+to table of contents title entries, separated by a front-slash.
+</p>
+
+<p>
+If you invoke <kbd>.TOC_APPENDS_AUTHOR</kbd> <i>with</i> an argument
+(surrounded by double-quotes), mom will append it to the table of
+contents title entries instead. This is useful if you have multiple
+authors you wish to identify by last name only. For example, if
+three authors&mdash;Joe Blough, Jane Doe, and John Deere&mdash;are
+responsible for a single article
+<br/>
+<span class="pre-in-pp">
+ .TOC_APPENDS_AUTHOR "Blough et al."
+</span>
+would be a good way to identify them in the table of contents.
+</p>
+
+<!-- -TOC_TITLE_ENTRY- -->
+
+<div id="toc-title-entry" class="box-macro-args">
+Macro: <b>TOC_TITLE_ENTRY</b> <kbd class="macro-args">&quot;&lt;alternate wording for a title entry in the toc&gt;&quot;</kbd>
+</div>
+
+<p>
+In
+<a href="rectoverso.html#collate">collated</a>
+documents, the title of each chapter appears in the table of
+contents. It may sometimes happen that you don&#8217;t want the
+title as it appears in the table of contents to be the same as what
+appears in the
+<a href="definitions.html#docheader">docheader</a>.
+You might, for example, want to shorten it. Or, in the case of
+chapters where the docheader contains both a chapter number and a
+chapter title, like this
+<br/>
+<span class="pre-in-pp">
+ Chapter 6
+ Burning Bush &mdash; Maybe God Was Right
+</span>
+you might want only the chapter title, not the chapter number, to
+show up in the table of contents. (By default, <kbd>.TOC</kbd>
+generates both.)
+</p>
+
+<p>
+If you want to change the wording of a title entry in the table of
+contents, simply invoke
+<br/>
+<span class="pre-in-pp">
+ .TOC_TITLE_ENTRY
+</span>
+with the desired wording, enclosed in double-quotes. Using the
+example, above,
+<br/>
+<span class="pre-in-pp">
+ .CHAPTER 6
+ .CHAPTER_TITLE "Burning Bush &mdash; Maybe God Was Right"
+ .TOC_TITLE_ENTRY "Burning Bush"
+ .DOCTYPE CHAPTER
+</span>
+
+would identify chapter 6 in the table of contents simply as
+&#8220;Burning Bush&#8221;.
+</p>
+
+<!-- -SPACE_TOC_ITEMS- -->
+
+<div id="space-toc-items" class="box-macro-args">
+Macro: <b>SPACE_TOC_ITEMS</b>
+</div>
+
+<p>
+If you&#8217;d like mom to add a small amount of space between table
+of contents entry levels, use <kbd>.SPACE_TOC_ITEMS</kbd>. Mom will
+visually group entry levels in a way that&#8217;s pleasing to the
+eye. The only catch to this macro is that the bottom margins of
+table of contents pages may not align perfectly.
+</p>
+
+<p>
+Please note that
+<kbd>SPACE_TOC_ITEMS</kbd> is only available with
+<a href="docprocessing.html#printstyle">PRINTSTYLE TYPESET</a>.
+</p>
+
+
+<!-- -TOC_PADDING- -->
+
+<div id="toc-padding" class="box-macro-args">
+Macro: <b>TOC_PADDING</b> <kbd class="macro-args">&lt;number of placeholders to allow for page number listings&gt;</kbd>
+</div>
+
+<p>
+By default, mom allows room for 3 digits in the page number
+references of table of contents entries. If you&#8217;d like some
+other number of placeholders, say 2 (if your document runs to less
+than 100 pages), do
+<br/>
+<span class="pre-in-pp">
+ .TOC_PADDING 2
+</span>
+</p>
+
+<!-- -TOC_RV_SWITCH- -->
+
+<div id="toc-rv-switch" class="box-macro-args">
+Macro: <b>TOC_RV_SWITCH</b>
+</div>
+
+<p>
+TOC_RV_SWITCH doesn&#8217;t take an argument. It simply instructs
+mom to switch the left and right margins of the first table of
+contents page in
+<a href="rectoverso.html#recto-verso">recto/verso</a>
+documents should the table of contents happen to begin on an even
+page when you want an odd, or vice versa.
+</p>
+
+<p>
+The same result can be accomplished by outputting a
+<a href="headfootpage.html#blank-pages">BLANKPAGE</a>.
+</p>
+
+<h4 id="toc-more" class="docs" style="margin-top: -.5em;">6. I still need more!</h4>
+
+<p>
+If there is some aspect of Table of Contents formatting for which
+no TOC control macros are provided, mom has a special
+<a href="definitions.html#toggle">toggle macro</a>
+to help out: TOC_PAGE_SETTINGS.
+</p>
+
+<p>
+TOC_PAGE_SETTINGS allows you to enter extra formatting changes for
+the Table of Contents as if it were simply another collated section
+or chapter of a document. Because it&#8217;s a toggle macro,
+invoking it by itself begins collecting your formatting directives,
+and invoking it with any argument (<kbd>OFF</kbd>, <kbd>QUIT</kbd>,
+<kbd>END</kbd>...) stops the collection.
+</p>
+
+<p>
+TOC_PAGE_SETTINGS is special in that the formatting commands
+contained within it must be preceded by <kbd>\!</kbd> (that&#8217;s
+backslash-exclamation point).
+</p>
+
+<p id="toc-page-settings-example">
+For example, say you want to redesign the default page headers for
+the Tables of Contents so that it only contains the document title
+on the left and &#8220;Contents&#8221; in italics on the right, and
+furthermore adjust the footer margin and footer gap, this is how
+you&#8217;d do it:
+<br/>
+<span class="pre-in-pp">
+ .TOC_PAGE_SETTINGS
+ \!.HEADER_RECTO L "^\E*[$TITLE]#\*[IT]Contents\*[PREV]^"
+ \!.FOOTER_MARGIN 3P
+ \!.B_MARGIN 6P+3p
+ .TOC_PAGE_SETTINGS END
+</span>
+(For an explanation of why the example uses <kbd>.B_MARGIN</kbd> to
+set/change the footer gap, see
+<a href="headfootpage.html#gap-note">here</a>.)
+</p>
+
+<p>
+TOC_PAGE_SETTINGS can be put in the stylesheet section of a document
+(i.e. after
+<a href="docprocessing.html#printstyle">PRINTSTYLE</a>
+and before
+<a href="docprocessing.html#start">START</a>)
+or invoked just before
+<a href="#toc">TOC</a>.
+</p>
+
+<div class="rule-long"><hr/></div>
+
+<!-- Navigation links -->
+<table style="width: 100%; margin-top: 12px;">
+<tr>
+ <td style="width: 33%;"><a href="toc.html">Back to Table of Contents</a></td>
+ <td style="width: 24%; text-align: center;"><a href="#top">Top</a></td>
+ <td style="width: 42%; text-align: right;"><a href="refer.html">Next: Bibliographies and references</a></td>
+</tr>
+</table>
+
+</div>
+
+<div class="bottom-spacer"><br/></div>
+
+</body>
+</html>
diff --git a/contrib/mom/momdoc/toc.html b/contrib/mom/momdoc/toc.html
new file mode 100644
index 0000000..6273751
--- /dev/null
+++ b/contrib/mom/momdoc/toc.html
@@ -0,0 +1,476 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+This file is part of groff, the GNU roff type-setting system.
+
+Copyright (C) 2004-2020 Free Software Foundation, Inc.
+Written by Peter Schaffter (peter@schaffter.ca).
+
+Permission is granted to copy, distribute and/or modify this document
+under the terms of the GNU Free Documentation License, Version 1.3 or
+any later version published by the Free Software Foundation; with no
+Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
+Texts.
+
+A copy of the Free Documentation License is included as a file called
+FDL in the main directory of the groff source package.
+-->
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+<head>
+ <meta http-equiv="content-type" content="text/html;charset=utf-8"/>
+ <title>Mom, version 2.5_d -- Table of Contents</title>
+ <link rel="stylesheet" type="text/css" href="stylesheet.css" />
+</head>
+
+<body style="background-color: #f5faff;">
+
+<!-- ==================================================================== -->
+
+<div class="page">
+
+ <div class="version">
+ mom, version 2.5_d
+ </div>
+
+<h1 class="toc" style="margin-top: 9px;">Table of Contents</h1>
+
+ <p style="margin-left: 2.75em; margin-right: 2.75em; text-align:center ">
+ The table of contents is large. To ease navigation,
+ click on any link in the
+ <br/>
+ <a href="#quick-toc">Quick Table of Contents</a>
+ <br/>
+ which will take you to the corresponding entry in the
+ <br/>
+ <a href="#detailed-toc">Detailed Table of Contents</a>.
+ <br/>
+ If you&#8217;ve been using mom for a while, you may prefer the
+ <br/>
+ <a href="macrolist.html#top">Quick Reference Guide</a>,
+ <br/>
+ which gives a convenient, categorized list of mom&#8217;s
+ user-space macros with links to corresponding entries in the
+ documentation.
+ </p>
+
+<div class="rule-medium"><hr/></div>
+
+<!-- -QUICK TABLE OF CONTENTS- -->
+
+ <h2 id="quick-toc" class="toc" style="margin-top: 18px; text-align: center;">Quick Table of Contents</h2>
+
+ <div style="width: 50%; margin-top: .75em; margin-left: 12px; float: left;">
+ <h3 id="version-2" class="toc"><a style="color: #6e70cc" href="#v2-notes">VERSION 2.0 NOTES</a></h3>
+ <br/>
+
+ <h3 id="introductory" class="toc"><a style="color: #6e70cc" href="#what">INTRODUCTION TO MOM</a></h3>
+
+ <ul class="toc">
+ <li><a href="#what">What is mom?</a></li>
+ <li><a href="#defs">Definitions of terms used in this manual</a></li>
+ <li><a href="#using">Using mom</a></li>
+ </ul>
+
+ <h3 id="typesetting" class="toc"><a style="color: #6e70cc" href="#typeset">TYPESETTING WITH MOM</a></h3>
+
+ <ul class="toc">
+ <li><a href="#type-intro">Introduction to the typesetting macros</a></li>
+ <li><a href="#page">Page setup</a></li>
+ <li><a href="#param">Basic typesetting parameters</a></li>
+ <li><a href="#just">Justifying, quadding, etc.</a></li>
+ <li><a href="#refine">Refinements</a></li>
+ <li><a href="#mod">Modifying type</a></li>
+ <li><a href="#vert">Vertical movements</a></li>
+ <li><a href="#tab">Tabs</a></li>
+ <li><a href="#col">Multiple columns</a></li>
+ <li><a href="#ind">Indents</a></li>
+ <li><a href="#goodies">Goodies</a></li>
+ <li><a href="#escapes">Inline escapes</a></li>
+ <li><a href="#color">Coloured text</a></li>
+ <li><a href="#graphical">Graphical objects</a></li>
+ </ul>
+ </div>
+
+ <div style="margin-left: 332px;">
+ <h3 id="document-processing" class="toc" style="margin-top: 1.25em;"><a style="color: #6e70cc" href="#doc-proc">DOCUMENT PROCESSING WITH MOM</a></h3>
+
+ <ul class="toc" style="margin-left: 3em;">
+ <li><a href="#doc-proc">Introduction to document processing</a></li>
+ <li><a href="#doc-defaults">Document defaults</a></li>
+ <li><a href="#vert-ws">Vertical whitespace management</a></li>
+ <li><a href="#prelim">Preliminary document setup</a></li>
+ <li><a href="#typemacdoc">Behaviour of the typesetting macros during document processing</a></li>
+ <li><a href="#tags">The document element tags</a> &ndash; headings, paragraphs, quotes, etc.</li>
+ <li><a href="#images">Graphics, floats, and preprocessor support</a></li>
+ <li><a href="#box">Shaded backgrounds and frames</a></li>
+ <li><a href="#hdrftr">Page headers and footers</a></li>
+ <li><a href="#paginate">Pagination</a></li>
+ <li><a href="#rv">Recto/verso printing and collating</a></li>
+ <li><a href="#cover">Cover pages</a></li>
+ <li><a href="#tocs">Tables of contents</a></li>
+ <li><a href="#ref">Bibliographies and references</a></li>
+ <li><a href="#letter">Writing letters</a>
+ <ul style="list-style-type: none;">
+ <li style="display: inline-block; width: 212px; height: 0; margin-top: .5em; margin-left: -2.5em; border: solid 1px #8d8775;">&nbsp;</li>
+ </ul></li>
+ <li style="margin-top: -1em;"><a href="#quick">Quick reference guide</a></li>
+ <li><a href="#appendices">Appendices</a></li>
+ </ul>
+ </div>
+
+ <div class="rule-long" style="clear: both;"><hr/></div>
+
+<!-- -FULL TABLE OF CONTENTS- -->
+
+ <h2 id="detailed-toc" class="toc" style="margin-top: 24px; text-align: center;">Detailed Table of Contents</h2>
+
+ <div style="margin-left: 12px;">
+ <h3 id="v2-notes" class="toc"><a style="color: #6e70cc" href="version-2.html#top">VERSION 2.0 NOTES</a></h3>
+
+ <ul class="toc">
+ <li><a href="version-2.html#prefatory">Prefatory comments</a></li>
+ <li><a href="version-2.html#differences">Differences between 2.0 and 1.x</a>
+ <ul>
+ <li><a href="version-2.html#pdf-support">PDF Support</a></li>
+ <li><a href="version-2.html#covers">Covers</a></li>
+ <li><a href="version-2.html#headings">Headings</a></li>
+ <li><a href="version-2.html#margin-notes">Margin notes</a></li>
+ <li><a href="version-2.html#floats">Floats</a></li>
+ <li><a href="version-2.html#table-of-contents">Table of Contents</a></li>
+ </ul></li>
+ <li><a href="version-2.html#pdfmom">The <strong>pdfmom</strong> wrapper around groff</a></li>
+ <li><a href="version-2.html#install-font">The <strong>install-font</strong> script</a></li>
+ </ul>
+
+ <h3 id="what" class="toc"><a style="color: #6e70cc" href="intro.html#top">1. WHAT IS MOM?</a></h3>
+
+ <ul class="toc">
+ <li><a href="intro.html#intro-intro">1.1 Who is mom meant for?</a></li>
+ <li><a href="intro.html#intro-typesetting">1.2 Typesetting with mom</a></li>
+ <li><a href="intro.html#intro-docprocessing">1.3 Document processing with mom</a></li>
+ <li><a href="intro.html#intro-philosophy">1.4 Mom&#8217;s philosophy</a></li>
+ <li><a href="intro.html#intro-documentation">1.5 A note on mom&#8217;s documentation</a>
+ <ul>
+ <li><a href="intro.html#canonical">1.5.1 Canonical reference materials</a></li>
+ <li><a href="intro.html#macro-args">1.5.2 How to read macro arguments</a></li>
+ <li><a href="intro.html#toggle-macro">1.5.3 &#8220;Toggle&#8221; macros</a></li>
+ <li><a href="intro.html#examples">1.5.4 Examples</a></li>
+ </ul>
+ </li>
+ </ul>
+
+ <h3 id="defs" class="toc"><a style="color: #6e70cc" href="definitions.html#top">2. DEFINITIONS OF TERMS USED IN THIS MANUAL</a></h3>
+
+ <ul class="toc">
+ <li><a href="definitions.html#typesetting-terms">2.1 Typesetting terms</a></li>
+ <li><a href="definitions.html#groff-terms">2.2 Groff terms</a></li>
+ <li><a href="definitions.html#mom-terms">2.3 Mom&#8217;s document processing terms</a></li>
+ </ul>
+
+ <h3 id="using" class="toc"><a style="color: #6e70cc" href="using.html#top">3. USING MOM</a></h3>
+
+ <ul class="toc">
+ <li><a href="using.html#using-intro">3.1 Introduction</a></li>
+ <li><a href="using.html#using-macros">3.2 How to input mom&#8217;s macros</a></li>
+ <li><a href="using.html#viewing">3.3 Processing and viewing documents</a>
+ <ul>
+ <li><a href="using.html#pdf">Mom and pdf</a></li>
+ <li><a href="using.html#pdfmom">pdfmom</a></li>
+ </ul></li>
+ <li><a href="using.html#previewing">3.4 Automatic previewing of documents</a></li>
+ </ul>
+
+<!-- -TYPESETTING MACROS- -->
+
+ <h3 id="typeset" class="toc"><a style="color: #6e70cc" href="typesetting.html#top">4. TYPESETTING WITH MOM</a></h3>
+
+ <ul class="toc">
+ <li><a id="type-intro" href="typesetting.html#typesetting-intro">4.1 Introduction to the typesetting macros</a></li>
+ <li><a id="page" href="typesetting.html#page-setup-intro">4.2 Page setup</a> &ndash; paper size and page margins
+ <ul>
+ <li><a href="typesetting.html#index-page-setup">4.2.1 Macro list</a></li>
+ </ul></li>
+ <li><a id="param" href="typesetting.html#basic-params-intro">4.3 Basic typesetting parameters</a> &ndash; family, font, fallback font, point size, line space, line length, autolead
+ <ul>
+ <li><a href="typesetting.html#index-basic">4.3.1 Macro list</a></li>
+ </ul></li>
+ <li><a id="just" href="typesetting.html#justification-intro">4.4 Justifying, quadding, filling and breaking lines</a>
+ <ul>
+ <li><a href="typesetting.html#index-justification">4.4.1 Macro list</a></li>
+ </ul></li>
+ <li><a id="refine" href="typesetting.html#refinements-intro">4.5 Refinements</a> &ndash; word space, sentence space, letter spacing (track kerning), hyphenation, kerning, ligatures
+ <ul>
+ <li><a href="typesetting.html#index-refinements">4.5.1 Macro list</a></li>
+ </ul></li>
+ <li><a id="mod" href="typesetting.html#modifications-intro">4.6 Modifying Type</a> &ndash; pseudo-italic, -bold, -condensed, and -extended
+ <ul>
+ <li><a href="typesetting.html#index-modifications">4.6.1 Macro list</a></li>
+ </ul></li>
+ <li><a id="vert" href="typesetting.html#aldrld-intro">4.7 Vertical Movements</a> &ndash; moving up and down on the page
+ <ul>
+ <li><a href="typesetting.html#index-aldrld">4.7.1 Macro list</a></li>
+ </ul></li>
+ <li><a id="tab" href="typesetting.html#tabs-intro">4.8 Tabs</a>
+ <ul>
+ <li><a href="typesetting.html#typesetting-tabs">4.8.1 Typesetting tabs</a>
+ <ul>
+ <li><a href="typesetting.html#typesetting-tabs-tut">4.8.1.1 Quickie tutorial</a></li>
+ </ul></li>
+ <li><a href="typesetting.html#string-tabs">4.8.2 String tabs (autotabs)</a>
+ <ul>
+ <li><a href="typesetting.html#string-tabs-tut">4.8.2.1 Quickie tutorial</a></li>
+ </ul></li>
+ <li><a href="typesetting.html#index-tabs">4.8.3 Macro list</a></li>
+ </ul></li>
+ <li><a id="col" href="typesetting.html#multicolumns-intro">4.9 Multiple columns</a>
+ <ul>
+ <li><a href="typesetting.html#index-multicolumns">4.9.1 Macro list</a></li>
+ </ul></li>
+ <li><a id="ind" href="typesetting.html#indents-intro">4.10 Indents</a>
+ <ul>
+ <li><a href="typesetting.html#indents-handling">4.10.1 A brief explanation of how mom handles indents</a></li>
+ <li><a href="typesetting.html#index-indents">4.10.2 Macro list</a></li>
+ </ul></li>
+ <li><a id="goodies" href="goodies.html#top">4.11 Goodies</a>
+ &ndash; aliases, transparent (comment) lines, smartquotes, caps,
+ underscoring/underlining, padding lines, leaders, drop
+ caps, superscripts, user-definable strings, changing the
+ escape character
+ <ul>
+ <li><a href="goodies.html#index-goodies">4.11.1 Macro list</a></li>
+ </ul></li>
+ <li><a id="escapes" href="inlines.html#top">4.12 Inline Escapes</a>
+ <ul>
+ <li><a href="inlines.html#intro-inlines">4.12.1 Introduction to inline escapes</a></li>
+ <li><a href="inlines.html#index-inlines">4.12.2 List of inline escapes</a></li>
+ <li><a href="inlines.html#inlines-mom-top">4.12.3 Mom&#8217;s personal inline escapes</a></li>
+ <li><a href="inlines.html#inlines-groff-top">4.12.4 Commonly-used groff inline escapes</a>
+ <ul>
+ <li><a href="inlines.html#inline-characters-groff">4.12.4.1 Special characters and symbols</a></li>
+ </ul></li>
+ </ul></li>
+ <li><a id="color" href="color.html#top">4.13 Coloured text</a>
+ <ul>
+ <li><a href="color.html#intro-color">4.13.1 Introduction to coloured text</a></li>
+ <li><a href="color.html#index-color">4.13.2 Macro list</a></li>
+ </ul></li>
+ <li><a id="graphical" href="graphical.html#top">4.14 Graphical objects</a>
+ &ndash; horizontal and vertical rules, boxes, ellipses (circles)
+ <ul>
+ <li><a href="graphical.html#intro-graphical">4.14.1 Introduction to graphical objects</a></li>
+ <li><a href="graphical.html#index-graphical">4.13.2 Macro list</a></li>
+ </ul></li>
+ </ul>
+
+<!-- -DOCUMENT PROCESSING MACORS- -->
+
+ <h3 id="doc-proc" class="toc"><a style="color: #6e70cc" href="docprocessing.html#top">5. DOCUMENT PROCESSING WITH MOM</a></h3>
+ <ul class="toc">
+ <li><a href="docprocessing.html#docprocessing-intro">5.1 Introduction to document processing</a></li>
+ <li><a id="doc-defaults" href="docprocessing.html#defaults">5.2 Document defaults</a> &ndash; papersize, margins, etc.
+ <ul>
+ <li><a id="vert-ws" href="docprocessing.html#vertical-whitespace-management">5.2.1 Vertical whitespace management</a>
+ <ul>
+ <li><a href="docprocessing.html#shim">5.2.1.1 SHIM</a></li>
+ <li><a href="docprocessing.html#flex">5.2.1.2 FLEX</a></li>
+ </ul></li>
+ </ul></li>
+ <li><a id="prelim" href="docprocessing.html#setup" class="highlight">5.3 PRELIMINARY DOCUMENT SETUP</a>
+ <ul>
+ <li><a href="docprocessing.html#docprocessing-tut">5.3.1 Tutorial</a> &ndash; setting up a mom document</li>
+ <li><a href="docprocessing.html#reference-macros">5.3.2 The reference macros</a> &ndash; metadata mom needs to do her job
+ <ul>
+ <li><a href="docprocessing.html#title">5.3.2.1 TITLE</a></li>
+ <li><a href="docprocessing.html#doc-title">5.3.2.2 DOCTITLE</a></li>
+ <li><a href="docprocessing.html#subtitle">5.3.2.3 SUBTITLE</a></li>
+ <li><a href="docprocessing.html#author">5.3.2.4 AUTHOR</a></li>
+ <li><a href="docprocessing.html#chapter">5.3.2.5 CHAPTER</a></li>
+ <li><a href="docprocessing.html#chapter-title">5.3.2.6 CHAPTER_TITLE</a></li>
+ <li><a href="docprocessing.html#draft">5.3.2.7 DRAFT</a></li>
+ <li><a href="docprocessing.html#revision">5.3.2.8 REVISION</a></li>
+ <li><a href="docprocessing.html#copyright">5.3.2.9 COPYRIGHT</a></li>
+ <li><a href="docprocessing.html#misc">5.3.2.10 MISC</a></li>
+ <li><a href="docprocessing.html#covertitle">5.3.2.11 COVERTITLE</a></li>
+ <li><a href="docprocessing.html#covertitle">5.3.2.12 DOC_COVERTITLE</a></li>
+ <li><a href="docprocessing.html#pdftitle">5.3.2.13 PDF_TITLE</a></li>
+ <li><a href="docprocessing.html#toc-heading">5.3.2.14 TOC_HEADING</a></li>
+ </ul></li>
+ <li><a href="docprocessing.html#docstyle-macros">5.3.3 The docstyle macros</a> &ndash; base templates; what kind of document you&#8217;re creating, how you want it to look overall
+ <ul>
+ <li><a href="docprocessing.html#doctype">5.3.3.1 DOCTYPE</a> &ndash; the kind of document (default, chapter, named, letter)
+ <ul style="list-style-type: circle">
+ <li><a href="docprocessing.html#slides">DOCTYPE SLIDES</a></li>
+ </ul></li>
+ <li><a href="docprocessing.html#printstyle">5.3.3.2 PRINTSTYLE</a> &ndash; typeset or &#8220;typewritten, double-spaced&#8221;</li>
+ <li><a href="docprocessing.html#copystyle">5.3.3.3 COPYSTYLE</a> &ndash; draft or final</li>
+ </ul></li>
+ <li><a href="docprocessing.html#start-macro">5.3.4 Initiate document processing</a>
+ <ul>
+ <li><a href="docprocessing.html#start">5.3.4.1 START</a> &ndash; the required macro to initiate document processing</li>
+ </ul></li>
+ <li><a href="docprocessing.html#docheader">5.3.5 Managing the DOCHEADER</a> &ndash; title, author, etc. on first page
+ <ul>
+ <li><a href="docprocessing.html#docheader-control">5.3.5.1 DOCHEADER control</a></li>
+ </ul></li>
+ <li><a href="docprocessing.html#columns-intro">5.3.6 Setting documents in columns</a></li>
+ <li><a href="docprocessing.html#style-before-start">5.3.7 Establishing type and formatting parameters <span style="font-style: italic">before</span> START</a>
+ <ul>
+ <li><a href="docprocessing.html#type-before-start">5.3.7.1 Use of the typesetting macros before START</a>
+ <ul class="fourth-level">
+ <li>&ndash; <a href="docprocessing.html#include">5.3.7.1.1 Including (sourcing) style sheets and files</a></li>
+ <li>&ndash; <a href="docprocessing.html#color">5.3.7.1.2 Initializing colours</a></li>
+ </ul></li>
+ <li><a href="docprocessing.html#doc-lead-adjust">5.3.7.2 DOC_LEAD_ADJUST</a> &ndash; adjust document
+ <a href="definitions.html#leading">leading</a>
+ to fill pages</li>
+ </ul></li>
+ <li><a href="docprocessing.html#style-after-start">5.3.8 Changing basic type and formatting parameters <span style="font-style: italic">after</span> START</a></li>
+ <li><ul>
+ <li><a id="typemacdoc" href="docprocessing.html#behaviour">5.3.8.1 Behaviour of the typesetting macros during document processing</a></li>
+ <li><a href="docprocessing.html#intro-doc-param">5.3.8.2 Post-START global style-change macros</a></li>
+ </ul></li>
+ </ul></li>
+ <li><a id="tags" class="highlight" href="docelement.html#top">5.4 THE DOCUMENT ELEMENT TAGS</a>
+ <ul>
+ <li><a href="docelement.html#docelement-intro">5.4.1 Introduction to the document element tags</a>
+ <ul>
+ <li><a href="docelement.html#docelement-control">5.4.1.1 Control macros</a> &ndash; changing style defaults for document element tags</li>
+ <li><a href="docelement.html#control-macro-args">5.4.1.2 Arguments to the control macros</a></li>
+ </ul></li>
+ <li><a href="docelement.html#epigraph-intro">5.4.2 Epigraphs</a></li>
+ <li><a href="docelement.html#pp-intro">5.4.3 Paragraphs</a></li>
+ <li><a href="docelement.html#heading-intro">5.4.4 Headings</a></li>
+ <li><a href="docelement.html#linebreak-intro">5.4.5 Linebreaks</a> &ndash; author linebreaks (section breaks)</li>
+ <li><a href="docelement.html#quote-intro">5.4.6 Quotes</a> &ndash; line for line poetic quotes or unformatted, verbatim text (e.g. blocks of code)</li>
+ <li><a href="docelement.html#blockquote-intro">5.4.7 Blockquotes</a> &ndash; cited material</li>
+ <li><a href="docelement.html#code">5.4.8 Code</a> &ndash; inserting code snippets</li>
+ <li><a href="docelement.html#list-intro">5.4.9 Lists</a> &ndash; nested lists</li>
+ <li><a href="docelement.html#number-lines-intro">5.4.10 Line numbering</a></li>
+ <li><a href="docelement.html#footnote-intro">5.4.11 Footnotes</a></li>
+ <li><a href="docelement.html#endnote-intro">5.4.12 Endnotes</a></li>
+ <li><a href="docelement.html#margin-notes-intro">5.4.13 Margin notes</a></li>
+ <li><a href="docelement.html#finis-intro">5.4.14 Document termination string</a> &ndash; FINIS</li>
+ </ul></li>
+ <li><a id="images" class="highlight" href="images.html#top">5.5 GRAPHICS, FLOATS, AND PREPROCESSOR SUPPORT</a>
+ <ul>
+ <li><a href="images.html#images-intro">5.5.1 Inserting images and graphics</a></li>
+ <li><a href="images.html#converting">5.5.2 Image conversion and file processing</a></li>
+ <li><a href="images.html#pdf-image">5.5.3 PDF_IMAGE</a>
+ <ul>
+ <li><a href="images.html#pdf-image-frame">5.5.3.1 PDF_IMAGE_FRAME</a></li>
+ </ul></li>
+ <li><a href="images.html#pspic">5.5.4 PSPIC</a></li>
+ <li><a href="images.html#floats-intro">5.5.5 Floats</a>
+ <ul>
+ <li><a href="images.html#float">5.5.5.1 FLOAT</a></li>
+ </ul></li>
+ <li><a href="images.html#preprocessor-support">5.5.6 Preprocessor support</a>
+ <ul>
+ <li><a href="images.html#tbl">5.5.6.1 tbl support</a></li>
+ <li><a href="images.html#eqn">5.5.6.2 eqn support</a></li>
+ <li><a href="images.html#pic">5.5.6.3 pic support</a></li>
+ <li><a href="images.html#grap">5.5.6.4 grap support</a>
+ <ul style="list-style-type: disc">
+ <li><a href="images.html#pic-text-style">5.5.6.3.1 PIC_TEXT_STYLE</a></li>
+ </ul></li>
+ <li><a href="images.html#refer">5.5.6.4 refer support</a></li>
+ </ul></li>
+ <li><a href="images.html#captions-and-labels">5.5.7 Captions and labels</a>
+ <ul>
+ <li><a href="images.html#autolabel">5.5.7.1 AUTOLABEL</a></li>
+ <li><a href="images.html#caption-after-label">5.5.7.2 CAPTION_AFTER_LABEL</a></li>
+ <li><a href="images.html#captions-labels-sources">5.5.7.3 CAPTIONS / LABELS / SOURCES&mdash;set style parameters</a></li>
+ <li><a href="images.html#mla">5.5.7.4 MLA</a></li>
+ </ul></li>
+ <li><a href="images.html#lists-of">5.5.8 Lists of Figures, Tables, and Equations</a>
+ <ul>
+ <li><a href="images.html#lists-placement">5.5.8.1 Placement of Lists</a></li>
+ <li><a href="images.html#lists-macros">5.5.8.2 Macros to generate Lists</a></li>
+ <li><a href="images.html#formatting-lists">5.5.8.3 Formatting and style parameters for Lists</a>
+ <ul>
+ <li><a href="#lists-style">5.5.8.3.1 LISTS_STYLE</a></li>
+ </ul></li>
+ </ul></li>
+ </ul></li>
+ <li><a id="box" class="highlight" href="headfootpage.html#top">5.6 SHADED BACKGROUNDS AND FRAMES</a>
+ <ul>
+ <li><a href="images.html#box-intro">5.6.1 Introduction</a></li>
+ <li><a href="images.html#box-macro">5.6.2 The BOX macro</a></li>
+ <li><a href="images.html#box-notes">5.6.3 Additional notes on BOX usage and behaviour</a></li>
+ <li><a href="images.html#page-color">5.6.4 PAGE_COLOR</a></li>
+ </ul>
+ </li>
+ <li><a id="hdrftr" class="highlight" href="headfootpage.html#top">5.7 PAGE HEADERS AND FOOTERS</a>
+ <ul>
+ <li><a href="headfootpage.html#headfootpage-intro">5.7.1 Introduction</a></li>
+ <li><a href="headfootpage.html#description-general">5.7.2 General description of headers/footers</a></li>
+ <li><a href="headfootpage.html#header-style">5.7.3 Default specs for headers/footers</a></li>
+ <li><a href="headfootpage.html#vertical-spacing">5.7.4 Vertical placement and spacing of headers/footers</a></li>
+ <li><a href="headfootpage.html#headfoot-management">5.7.5 Managing page headers and footers</a></li>
+ <li><a href="headfootpage.html#headfoot-control">5.7.6 Control macros for headers/footers</a></li>
+ <li><a href="headfootpage.html#userdef-hdrftr-rv">5.7.7 User-defined, single string recto/verso headers/footers</a>
+ <ul>
+ <li><a href="headfootpage.html#userdef-hdrftr">5.7.7.1 User-defined, single string headers/footers (no recto/verso)</a></li>
+ </ul></li>
+ <li><a href="headfootpage.html#headers-and-footers-intro">5.7.8 Headers and footers on the same page</a></li>
+ </ul></li>
+ <li><a id="paginate" class="highlight" href="headfootpage.html#pagination-intro">5.8 PAGINATION</a>
+ <ul>
+ <li><a href="headfootpage.html#pagination">5.8.1 Introduction</a></li>
+ <li><a href="headfootpage.html#index-pagination">5.8.2 Pagination macros list</a></li>
+ <li><a href="headfootpage.html#blank-pages">5.8.3 Blank pages</a></li>
+ </ul></li>
+ <li><a id="rv" class="highlight" href="rectoverso.html#top">5.9 RECTO/VERSO PRINTING, COLLATING</a>
+ <ul>
+ <li><a href="rectoverso.html#rectoverso-intro">5.9.1 Introduction to recto/verso printing</a>
+ <ul>
+ <li><a href="rectoverso.html#rectoverso-list">5.9.1.1 Macro list</a></li>
+ </ul></li>
+ <li><a href="rectoverso.html#collate-intro">5.9.2 Introduction to collating</a>
+ <ul>
+ <li><a href="rectoverso.html#collate">5.9.2.1 The COLLATE macro</a></li>
+ </ul></li>
+ </ul></li>
+ <li><a id="cover" class="highlight" href="cover.html#top">5.10 COVER PAGES</a></li>
+ <li><a id="tocs" class="highlight" href="tables-of-contents.html#top">5.11 TABLES OF CONTENTS</a>
+ <ul>
+ <li><a href="tables-of-contents.html#toc-intro">5.11.1 Introduction</a> &ndash; the TOC macro</li>
+ <li><a href="tables-of-contents.html#toc-appearance">5.11.2 Table of contents appearance and behaviour</a></li>
+ <li><a href="tables-of-contents.html#pdf-output">5.11.3 PDF output</a></li>
+ <li><a href="tables-of-contents.html#positioning">5.11.4 Positioning the table of contents</a>
+ <ul>
+ <li><a href="tables-of-contents.html#auto-relocate-toc">5.11.2 Automatic PDF relocation of the Table of Contents</a></li>
+ <li><a href="tables-of-contents.html#psselect">5.11.2 Using psselect to relocate the TOC in PostScript documents</a></li>
+ </ul></li>
+ <li><a href="tables-of-contents.html#index-toc-control">5.11.5 Table of contents control macros</a></li>
+ </ul></li>
+ <li><a id="ref" class="highlight" href="refer.html#top">5.12 BIBLIOGRAPHIES AND REFERENCES</a></li>
+ <li><a id="letter" class="highlight" href="letters.html#top">5.13 WRITING LETTERS</a>
+ <ul>
+ <li><a href="letters.html#letters-intro">5.13.1 Introduction to writing letters</a></li>
+ <li><a href="letters.html#letters-tutorial">5.13.2 Tutorial on writing letters</a></li>
+ <li><a href="letters.html#letters-defaults">5.13.3 Default letter style</a></li>
+ <li><a href="letters.html#index-letters-macros">5.13.4 The letter macros</a></li>
+ </ul></li>
+ </ul>
+ <h3 id="quick" class="toc highlight"><a style="color: #6e70cc" href="macrolist.html#top">6. QUICK REFERENCE GUIDE</a></h3>
+ <h3 id="appendices" class="toc" style="margin-top: .5em;"><a style="color: #6e70cc" href="appendices.html#top">7. APPENDICES</a></h3>
+ <ul class="toc">
+ <li><a href="appendices.html#fonts">7.1 Adding fonts to groff</a>
+ <ul>
+ <li><a href="appendices.html#steps">7.1.1 Step-by-step instructions</a></li>
+ </ul></li>
+ <li><a href="appendices.html#codenotes">7.2 Some reflections on mom</a></li>
+ <li><a href="reserved.html">7.3 List of reserved words (macros, registers, strings)</a></li>
+ <li><a href="appendices.html#contact">7.4 Contact the author</a></li>
+ </ul>
+ </div>
+
+</div>
+
+<div class="bottom-spacer"><br/></div>
+
+</body>
+</html>
diff --git a/contrib/mom/momdoc/typesetting.html b/contrib/mom/momdoc/typesetting.html
new file mode 100644
index 0000000..51d199e
--- /dev/null
+++ b/contrib/mom/momdoc/typesetting.html
@@ -0,0 +1,4988 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+This file is part of groff, the GNU roff type-setting system.
+
+Copyright (C) 2004-2020 Free Software Foundation, Inc.
+Written by Peter Schaffter (peter@schaffter.ca).
+
+Permission is granted to copy, distribute and/or modify this document
+under the terms of the GNU Free Documentation License, Version 1.3 or
+any later version published by the Free Software Foundation; with no
+Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
+Texts.
+
+A copy of the Free Documentation License is included as a file called
+FDL in the main directory of the groff source package.
+-->
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+<head>
+ <meta http-equiv="content-type" content="text/html;charset=utf-8"/>
+ <title>Mom -- Typesetting Macros</title>
+ <link rel="stylesheet" type="text/css" href="stylesheet.css" />
+</head>
+
+<body style="background-color: #f5faff;">
+
+<!-- ==================================================================== -->
+
+<div id="top" class="page">
+
+<!-- Navigation links -->
+<table style="width: 100%;">
+<tr>
+ <td><a href="toc.html">Back to Table of Contents</a></td>
+ <td style="text-align: right;"><a href="goodies.html#top">Next: Goodies</a></td>
+</tr>
+</table>
+
+<h1 id="typesetting" class="docs">The typesetting macros</h1>
+
+<div id="typesetting-macros-mini-toc" class="mini-toc">
+<div class="mini-toc-col-1">
+<ul class="no-enumerator">
+ <li class="list-head"><a href="#typesetting-macros">Introduction</a></li>
+ <li class="list-head"><a href="#page-setup-intro">Paper and page setup</a>
+ <ul>
+ <li class="item"><a href="#page-setup-note"><i>Important note on page dimensions &amp; papersize</i></a></li>
+ <li class="item"><a href="#index-page-setup">Macro list</a></li>
+ </ul></li>
+ <li class="list-head"><a href="#basic-params-intro">Basic typesetting parameters</a>
+ <ul>
+ <li class="item"><a href="#index-basic">Macro list</a></li>
+ </ul></li>
+ <li class="list-head"><a href="#justification-intro">Justification and quadding/
+ <br/>
+ <span style="margin-left: 1em;">breaking and joining lines</span></a>
+ <ul>
+ <li class="item"><a href="#index-justification">Macro list</a></li>
+ </ul></li>
+ <li class="list-head"><a href="#refinements-intro">Typographic refinements</a>
+ <ul>
+ <li class="item"><a href="#index-refinements">Macro list</a></li>
+ </ul></li>
+ <li class="list-head"><a href="#modifications-intro">Type modifications (pseudo font styles)</a>
+ <ul class="no-enumerator">
+ <li class="item"><a href="#index-modifications">Macro list</a></li>
+ </ul></li>
+ <li class="list-head"><a href="#aldrld-intro">Vertical movements</a>
+ <ul class="no-enumerator">
+ <li class="item"><a href="#index-aldrld">Macro list</a>
+ </li>
+ </ul></li>
+</ul>
+</div>
+<div class="mini-toc-col-2">
+ <ul class="no-enumerator">
+ <li class="list-head"><a href="#tabs-intro">Tabs</a>
+ <ul class="no-enumerator">
+ <li class="item"><a href="#typesetting-tabs">Typesetting tabs</a>
+ <ul style="margin-left: -.5em;">
+ <li class="item" style="margin-left: -.5em; list-style-type: circle;"><a href="#typesetting-tabs-tut">Quickie tutorial on typesetting tabs</a></li>
+ </ul></li>
+ <li class="item"><a href="#string-tabs">String tabs</a>
+ <ul style="margin-left: -.5em;">
+ <li class="item" style="margin-left: -.5em; list-style-type: circle;"><a href="#string-tabs-tut">Quickie tutorial on string tabs</a></li>
+ </ul></li>
+ <li class="item"><a href="#index-tabs">Macro list</a></li>
+ </ul></li>
+ <li class="list-head"><a href="#multicolumns-intro">Multiple columns</a>
+ <ul class="no-enumerator">
+ <li class="item"><a href="#index-multicolumns">Macro list</a>
+ </li>
+ </ul></li>
+ <li class="list-head"><a href="#indents-intro">Indents</a>
+ <ul class="no-enumerator">
+ <li class="item"><a href="#indents-handling">How mom handles indents</a></li>
+ <li class="item"><a href="#index-indents">Macro list</a>
+ </li>
+ </ul></li>
+ <li class="list-head"><a href="goodies.html#goodies">Goodies</a>
+ <ul class="no-enumerator">
+ <li class="item"><a href="goodies.html#goodies-macros">Macro list</a>
+ </li>
+ </ul></li>
+ <li class="list-head"><a href="inlines.html#top">Inline escapes</a>
+ <ul class="no-enumerator">
+ <li class="item"><a href="inlines.html#index-inlines">List of inline escapes</a>
+ </li>
+ </ul></li>
+ <li class="list-head"><a href="color.html">Coloured text</a>
+ <ul class="no-enumerator">
+ <li class="item"><a href="color.html#index-color">Macro list</a></li>
+ </ul></li>
+</ul>
+</div>
+</div>
+
+<div class="rule-medium"><hr/></div>
+
+<h2 id="typesetting-intro" class="docs">Introduction</h2>
+
+<p>
+Mom&#8217;s typesetting macros provide access to groff&#8217;s
+typesetting capabilities. Aside from controlling basic type
+parameters (family, font, line length, point size, leading),
+mom&#8217;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.
+</p>
+
+<p>
+In some cases, mom&#8217;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.
+</p>
+
+<p>
+Mom&#8217;s typesetting macros can be used as a standalone package,
+independent of the
+<a href="docprocessing.html#top">document processing macros</a>.
+With them, you can typeset on-the-fly. Book covers, your best
+friend&#8217;s résumé, a poster for a lost dog&mdash;none of these
+requires structured document processing (page headers, paragraphs,
+headings, footnotes, etc). What they do demand is precise control over
+every element on the page. The typesetting macros give you that
+control.
+</p>
+
+<div class="rule-short" style="margin-bottom: 24px;"><hr/></div>
+
+<!-- ==================================================================== -->
+
+<h2 id="page-setup-intro" class="macro-group">Paper and page setup: paper size &amp; page margins</h2>
+
+<p>
+The page setup macros establish the physical dimensions of your page
+and the margins you want it to have. The
+<a href="#paper">PAPER</a>
+macro provides a shortcut for setting the page to the correct
+dimensions for a number of common paper sizes. The
+<a href="#page">PAGE</a>
+macro provides a convenient way of setting the page dimensions and
+some or all of the page margins with a single macro.
+</p>
+
+<div class="box-notes">
+<h3 id="page-setup-note" class="docs notes">Important note on page dimensions and papersize</h3>
+
+<p style="margin-top: .5em;">
+When mom files are processed with
+<a href="using.html#pdfmom" style="font-weight: bold">pdfmom</a>,
+which is recommended (see
+<a href="http://www.schaffter.ca/mom/pdf/mom-pdf.pdf"><span class="book-title">Producing PDFs with groff and mom</span></a>),
+page dimensions are automatically passed to groff, and you
+don&#8217;t have to worry about them.
+</p>
+
+<p>
+Mom documents processed directly with <strong>groff</strong>, or with
+<strong>pdfroff</strong>, or with <strong>pdfmom&nbsp;&#8209;Tps</strong>, require
+that the papersize be given on the command line as well if the
+papersize is different from the default on your system. You can
+verify&mdash;or change&mdash;the default papersize by inspecting the
+files
+<br/>
+<span class="pre-in-pp">
+ &lt;path to groff&gt;/font/devps/DESC
+</span>
+and
+<br/>
+<span class="pre-in-pp">
+ &lt;path to groff&gt;/font/devpdf/DESC
+</span>
+(See <strong>man papersize</strong> for list of valid papersize
+names, as well as for instructions on how to enter a non-standard
+size.)
+</p>
+
+<p>
+If you occasionally need to print on sheets that do not
+conform to your default papersize, you must, in addition
+to setting the page dimensions in your mom file, pass the
+<kbd>-P-p&lt;papersize&gt;</kbd> option to <strong>groff</strong>,
+<strong>pdfroff</strong>, or <strong>pdfmom -Tps</strong>.
+</p>
+
+<p>
+For example, suppose your routine papersize is &#8220;letter&#8221;,
+and you need to print something on a legal-sized sheet. After
+telling mom about the legal-size sheet (with either
+<a href="#pagelength">PAGELENGTH</a>
+and
+<a href="#pagewidth">PAGEWIDTH</a>
+or
+<a href="#paper">PAPER</a>,
+or
+<a href="#page">PAGE</a>),
+you must include <kbd>-P-p&lt;papersize&gt;</kbd> on whichever
+command line you use, e.g.
+<br/>
+<span class="pre-in-pp">
+ pdfmom -Tps -mom -P-plegal
+</span>
+Remember, though, that
+<a href="using.html#pdfmom" style="font-weight: bold">pdfmom</a>,
+with no <kbd>-Tps</kbd> option, is smart enough to know the
+papersize from the dimensions provided in your mom file.
+</p>
+
+<p class="tip-bottom">
+Consult <kbd>man groff</kbd>, <kbd>man grops</kbd> and <kbd>man
+groff_font</kbd> for additional information concerning papersizes,
+as well as information on printing in &#8220;landscape&#8221;
+orientation.
+</p>
+</div>
+
+<div class="macro-list-container">
+<h3 id="index-page-setup" class="macro-list">Paper and page setup macros</h3>
+
+<ul class="macro-list">
+ <li><a href="#pagewidth">PAGEWIDTH</a> &ndash; page width</li>
+ <li><a href="#pagelength">PAGELENGTH</a> &ndash; page length</li>
+ <li><a href="#paper">PAPER</a> &ndash; common paper sizes</li>
+ <li><a href="#l-margin">L_MARGIN</a> &ndash; left margin</li>
+ <li><a href="#r-margin">R_MARGIN</a> &ndash; right margin</li>
+ <li><a href="#t-margin">T_MARGIN</a> &ndash; top margin</li>
+ <li><a href="#b-margin">B_MARGIN</a> &ndash; bottom margin</li>
+ <li><a href="#page">PAGE</a> &ndash; page dimensions and margins all in one fell swoop</li>
+ <li><a href="#newpage">NEWPAGE</a> &ndash; start a new page</li>
+</ul>
+</div>
+
+<!-- -PAGEWIDTH- -->
+
+<div class="macro-id-overline">
+<h3 id="pagewidth" class="macro-id">Page width</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>PAGEWIDTH</b> <kbd class="macro-args">&lt;width of printer sheet&gt;</kbd>
+</div>
+<p class="requires">
+&bull;&nbsp;Requires a <a href="definitions.html#unitofmeasure">unit of measure</a>
+</p>
+
+<p>
+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-1/2 inches, you enter
+<br/>
+<span class="pre-in-pp">
+ .PAGEWIDTH 8.5i
+</span>
+Please read the
+<a href="#page-setup-note">Important note on page dimensions and papersize</a>
+for information on ensuring groff respects your PAGEWIDTH.
+</p>
+
+<!-- -PAGELENGTH- -->
+
+<div class="macro-id-overline">
+<h3 id="pagelength" class="macro-id">Page length</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>PAGELENGTH</b> <kbd class="macro-args">&lt;length of printer sheet&gt;</kbd>
+</div>
+<p class="requires">
+&bull;&nbsp;Requires a <a href="definitions.html#unitofmeasure">unit of measure</a>
+</p>
+
+<p>
+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
+<br/>
+<span class="pre-in-pp">
+ .PAGELENGTH 11i
+</span>
+Please read the
+<a href="#page-setup-note">Important note on page dimensions and papersize</a>
+for information on ensuring groff respects your PAGELENGTH.
+</p>
+
+<!-- -PAPER- -->
+
+<div class="macro-id-overline">
+<h3 id="paper" class="macro-id">Paper</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>PAPER</b> <kbd class="macro-args">&lt;paper type&gt; [ LANDSCAPE ]</kbd>
+</div>
+
+<p>
+PAPER provides a convenient way to set the dimensions for some
+common printer sheet sizes. <kbd>&lt;paper&nbsp;type&gt;</kbd> can
+be one of:
+<br/>
+<span class="pre-in-pp">
+ LETTER EXECUTIVE
+ LEGAL 10x14
+ STATEMENT A3
+ TABLOID A4
+ LEDGER A5
+ FOLIO B4
+ QUARTO B5
+</span>
+Say, for example, you have A4-sized sheets in your printer. It&#8217;s
+shorter (and easier) to enter
+<br/>
+<span class="pre-in-pp">
+ .PAPER A4
+</span>
+than to remember the correct dimensions and enter
+<br/>
+<span class="pre-in-pp">
+ .PAGEWIDTH 595p
+ .PAGELENGTH 842p
+</span>
+If you&#8217;d like landscape orientation for your paper type,
+pass PAPER the <kbd>LANDSCAPE</kbd> argument.
+</p>
+
+<p>
+Please read the
+<a href="#page-setup-note">Important note on page dimensions and papersize</a>
+for information on ensuring groff respects your PAPER size.
+</p>
+
+<div class="box-important">
+<p class="tip">
+<span class="important">Important:</span> If you need PAPER,
+it should always be placed at the very top of your file.
+</p>
+</div>
+
+<!-- -L_MARGIN- -->
+
+<div class="macro-id-overline">
+<h3 id="l-margin" class="macro-id">Left margin</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>L_MARGIN</b> <kbd class="macro-args">&lt;left margin&gt;</kbd>
+</div>
+<p class="requires">
+&bull;&nbsp;Requires a <a href="definitions.html#unitofmeasure">unit of measure</a>
+</p>
+
+<p>
+L_MARGIN establishes the distance from the left edge of the printer
+sheet at which you want your type to start.
+<a href="#il">Left indents</a>
+and
+<a href="#tabs">tabs</a>
+are calculated from the value you pass to L_MARGIN.
+If you use the macros
+<a href="#pagewidth">PAGEWIDTH</a>
+or
+<a href="#paper">PAPER</a>
+without setting L_MARGIN, mom automatically sets the left margin to
+1 inch.
+</p>
+
+<p>
+A unit of measure is required and decimal fractions are allowed.
+Therefore, to set the left margin at 3 picas (1/2 inch), you&#8217;d
+enter either
+<br/>
+<span class="pre-in-pp">
+ .L_MARGIN 3P
+</span>
+or
+<span class="pre-in-pp">
+ .L_MARGIN .5i
+</span>
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span> L_MARGIN behaves in a special way
+when you&#8217;re using the
+<a href="docprocessing.html#docprocessing">document processing macros</a>.
+See
+<a href="docprocessing.html#behaviour">Typesetting macros during document processing</a>
+for an explanation.
+</p>
+</div>
+
+<!-- -R_MARGIN- -->
+
+<div class="macro-id-overline">
+<h3 id="r-margin" class="macro-id">Right margin</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>R_MARGIN</b> <kbd class="macro-args">&lt;right margin&gt;</kbd>
+</div>
+<p class="requires">
+&bull;&nbsp;Requires a <a href="definitions.html#unitofmeasure">unit of measure</a>
+</p>
+
+<div class="box-important">
+<p class="tip">
+<span class="important">IMPORTANT:</span> R_MARGIN, if used, must
+come after
+<a href="#paper">PAPER</a>,
+<a href="#pagewidth">PAGEWIDTH</a>,
+<a href="#l-margin">L_MARGIN</a>
+and/or
+<a href="#page">PAGE</a>
+(if a right margin isn&#8217;t given to PAGE). The reason is that
+R_MARGIN calculates line length from the overall page dimensions and
+the left margin. Mom can&#8217;t make the calculation if
+she doesn&#8217;t know the page width and the left margin.
+</p>
+</div>
+
+<p>
+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.
+</p>
+
+<p>
+The line length macro
+(<a href="#linelength">LL</a>)
+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.
+</p>
+
+<p>
+For example, if you&#8217;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:
+<br/>
+<span class="pre-in-pp">
+ .L_MARGIN 6P
+ .R_MARGIN 6P
+</span>
+That way, you don&#8217;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, e.g.
+<br/>
+<span class="pre-in-pp">
+ .LL 17P+3p
+</span>
+If you use the macros
+<a href="#page">PAGE</a>,
+<a href="#pagewidth">PAGEWIDTH</a>
+or
+<a href="#paper">PAPER</a>
+without invoking <kbd>.R_MARGIN</kbd> afterwards, mom automatically
+sets R_MARGIN to 1 inch. If you set a line length after these
+macros (with
+<a href="#linelength">LL</a>),
+the line length calculated by R_MARGIN is, of course, overridden.
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span> R_MARGIN behaves in a special way when you&#8217;re
+using the
+<a href="docprocessing.html#docprocessing">document processing macros</a>.
+See
+<a href="docprocessing.html#behaviour">Typesetting macros during document processing</a>
+for an explanation.
+</p>
+</div>
+
+<!-- -T_MARGIN- -->
+
+<div class="macro-id-overline">
+<h3 id="t-margin" class="macro-id">Top margin</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>T_MARGIN</b> <kbd class="macro-args">&lt;top margin&gt;</kbd>
+</div>
+<p class="requires">
+&bull;&nbsp;Requires a <a href="definitions.html#unitofmeasure">unit of measure</a>
+</p>
+
+<p>
+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 centimetres, you&#8217;d enter
+<br/>
+<span class="pre-in-pp">
+ .T_MARGIN 2.5c
+</span>
+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
+<a href="definitions.html#baseline">baseline</a>. Therefore,
+<br/>
+<span class="pre-in-pp">
+ .T_MARGIN 1.5i
+</span>
+puts the baseline of the first line of type 1-1/2 inches beneath the
+top of the page.
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span> T_MARGIN means something slightly
+different when you&#8217;re using the
+<a href="docprocessing.html#docprocessing">document processing macros</a>.
+See
+<a href="docprocessing.html#tb-margins">Top and bottom margins in document processing</a>
+for an explanation.
+</p>
+</div>
+
+<div class="box-important">
+<p class="tip">
+<span class="important">IMPORTANT:</span> T_MARGIN does two
+things: it establishes the top margin for pages that come after
+it <i>and</i> 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
+<a href="#newpage">NEWPAGE</a>,
+like this:
+<br/>
+<span class="pre-in-pp" style="margin-bottom: -1em;">
+ .NEWPAGE
+ .T_MARGIN 6P
+ &lt;text&gt;
+</span>
+</p>
+</div>
+
+<!-- -B_MARGIN- -->
+
+<div class="macro-id-overline">
+<h3 id="b-margin" class="macro-id">Bottom margin</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>B_MARGIN</b> <kbd class="macro-args">&lt;bottom margin&gt;</kbd>
+</div>
+<p class="requires">
+&bull;&nbsp;Requires a <a href="definitions.html#unitofmeasure">unit of measure</a>
+</p>
+
+<p>
+B_MARGIN sets a nominal position at the bottom of the page beyond
+which you don&#8217;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
+<br/>
+<span class="pre-in-pp">
+ .B_MARGIN .75i
+</span>
+Obviously, if you haven&#8217;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.
+</p>
+
+<p>
+Occasionally, owing to a peculiarity in groff, an extra line will
+fall below the nominal bottom margin. If you&#8217;re using the
+<a href="docprocessing.html#docprocessing">document processing macros</a>,
+this is unlikely to happen; the document processing macros are very
+hard-nosed about aligning bottom margins.
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span> The meaning of B_MARGIN is slightly
+different when you&#8217;re using the document processing macros.
+See
+<a href="docprocessing.html#tb-margins">Top and bottom margins in document processing</a>
+for an explanation.
+</p>
+</div>
+
+<!-- -PAGE- -->
+
+<div class="macro-id-overline">
+<h3 id="page" class="macro-id">Page</h3>
+</div>
+
+<div class="box-macro-args" style="overflow: auto;">
+Macro: <b>PAGE</b> <kbd class="macro-args">&lt;width&gt;&nbsp;[ &lt;length&gt; [ &lt;lm&gt; [ &lt;rm&gt; [ &lt;tm&gt; [ &lt;bm&gt; ] ] ] ] ]</kbd>
+</div>
+<p class="requires">
+&bull;&nbsp;All arguments require a <a href="definitions.html#unitofmeasure">unit of measure</a>
+</p>
+
+<div class="box-important">
+<p class="tip">
+<span class="important">IMPORTANT:</span> If you&#8217;re using the
+<a href="docprocessing.html#docprocessing">document processing macros</a>,
+PAGE must come after
+<a href="docprocessing.html#printstyle">PRINTSTYLE</a>.
+Otherwise, it should go at the top of a document, prior to any
+text. And remember, when you&#8217;re using the document processing
+macros, top margin and bottom margin mean something slightly
+different than when you&#8217;re using just the typesetting macros
+(see
+<a href="docprocessing.html#tb-margins">Top and bottom margins in document processing</a>).
+</p>
+</div>
+
+<p>
+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&#8217;t
+skip over any. <kbd>&lt;lm&gt;, &lt;rm&gt;, &lt;tm&gt;</kbd>, and
+<kbd>&lt;bm&gt;</kbd> refer to the left, right, top and bottom
+margins respectively.
+</p>
+
+<p>
+Assuming your page dimensions are 11 inches by 17 inches, and
+that&#8217;s all you want to set, enter
+<br/>
+<span class="pre-in-pp">
+ .PAGE 11i 17i
+</span>
+If you want to set the left margin as well, say, at 1 inch, PAGE
+would look like this:
+<br/>
+<span class="pre-in-pp">
+ .PAGE 11i 17i 1i
+</span>
+Now suppose you also want to set the top margin, say, at 1-1/2
+inches. &lt;tm&gt; comes after &lt;rm&gt; in the optional arguments,
+but you can&#8217;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:
+<br/>
+<span class="pre-in-pp">
+ .PAGE 11i 17i 1i 1i 1.5i
+ | |
+ required right---+ +---top margin
+ margin
+</span>
+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
+<br/>
+<span class="pre-in-pp">
+ .PAGE 8.5i 11i 45p 45p 45p 45p
+</span>
+This sets up an 8-1/2 by 11 inch page with margins of 45 points
+(5/8-inch) all around.
+</p>
+
+<p>
+Additionally, if you are not using the
+<a href="docprecessing.html">document processing macros</a>
+and invoke PAGE with a top margin argument, any macro you invoke
+after PAGE will likely move the
+<a href="definitions.html#baseline">baseline</a>
+of the first line of text down by one linespace. To compensate, do
+<br/>
+<span class="pre-in-pp">
+ .RLD 1v
+</span>
+immediately before entering any text.
+</p>
+
+<p>
+Please read the
+<a href="#page-setup-note">Important note on page dimensions and papersize</a>
+for information on ensuring groff respects your PAGE dimensions and
+margins.
+</p>
+
+<!-- -NEWPAGE- -->
+
+<div class="macro-id-overline">
+<h3 id="newpage" class="macro-id">Start a new page</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>NEWPAGE</b>
+</div>
+
+<p>
+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
+<a href="#t-margin">T_MARGIN</a>).
+</p>
+
+<div class="rule-short" style="margin-bottom: 24px;"><hr/></div>
+
+<!-- ==================================================================== -->
+
+<h2 id="basic-params-intro" class="macro-group">Basic typesetting parameters</h2>
+
+<p>
+The basic typesetting parameter macros deal with fundamental
+requirements for setting type: family, font, point size, leading,
+and line length.
+</p>
+
+<p>
+If you&#8217;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
+<a href="docprocessing.html#behaviour">Typesetting macros during document processing</a>
+for an explanation.
+</p>
+
+<div id="index-basic" class="macro-list-container">
+<h3 class="macro-list">Basic parameter macros</h3>
+<ul class="macro-list">
+ <li><a href="#family">FAMILY</a> &ndash; type family</li>
+ <li><a href="#font">FT</a> &ndash; font</li>
+ <li><a href="#fallback-font">FALLBACK_FONT</a> &ndash; for invalid fonts</li>
+ <li><a href="#ps">PT_SIZE</a> &ndash; point size of type</li>
+ <li><a href="#leading">LS</a> &ndash; line spacing/leading</li>
+ <li><a href="#autolead">AUTOLEAD</a> &ndash; automatic line spacing</li>
+ <li><a href="#linelength">LL</a> &ndash; line length</li>
+</ul>
+</div>
+
+<!-- -FAMILY- -->
+
+<div class="macro-id-overline">
+<h3 id="family" class="macro-id">Type family</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>FAMILY</b> <kbd class="macro-args">&lt;family&gt;</kbd>
+</div>
+<p class="alias">
+<i>Alias:</i> <b>FAM</b>
+</p>
+
+<p>
+FAMILY takes one argument: the name of the
+<a href="definitions.html#family">family</a>
+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:
+<br/>
+<span class="pre-in-pp">
+ A = Avant Garde
+ BM = Bookman
+ H = Helvetica
+ HN = Helvetica Narrow
+ N = New Century Schoolbook
+ P = Palatino
+ T = Times Roman
+ ZCM = Zapf Chancery
+</span>
+The argument you pass to FAMILY is the identifier at left, above.
+For example, if you want Helvetica, enter
+<br/>
+<span class="pre-in-pp">
+ .FAMILY H
+</span>
+</p>
+
+<div class="box-tip" style="margin-top: -1em;">
+<p class="tip-top">
+<span class="note">Note:</span> The font macro
+(<a href="#font">FT</a>)
+lets you 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. <kbd>ZCM</kbd>, for example,
+only exists in one style: Italic (<kbd>I</kbd>). Therefore,
+<kbd>.FT&nbsp;ZCMI</kbd> makes more sense than setting the family to
+<kbd>ZCM</kbd>, then setting the font to <kbd>I</kbd>.
+</p>
+
+<p>
+Furthermore, if you need to access a character from groff's Zapf
+Dingbats font directly, use <kbd>.FT&nbsp;ZD</kbd> or the
+<a href="definitions.html#inlines">inline escape</a>
+<kbd>\f[ZD]</kbd>. Commonly-used dingbats are
+available without changing to the ZD font by using groff's
+pre-defined character escapes, e.g. <kbd>\[rh]</kbd> for a pointing
+right hand; see <kbd>man groff_char</kbd> for a complete list.
+Dingbats that have not been pre-defined must be accessed with the
+<kbd>\N</kbd> escape. For example, <kbd>\f[ZD]\N'37'</kbd> prints
+the (undefined) telephone dingbat.
+</p>
+
+<p id="fam-add-note" class="tip-bottom">
+<span class="additional-note">Additional note:</span>
+If you are running a version of groff lower than 1.19.2, you must
+follow all FAMILY requests with a FT request, otherwise mom will set
+all type up to the next FT request in the
+<a href="#fallback-font">fallback font</a>.
+</p>
+</div>
+
+<p style="margin-top: -.5em;">
+If you are running a version of groff greater than or
+equal to 1.19.2, when you invoke the FAMILY macro, mom
+&#8220;remembers&#8221; the font style (Roman, Italic, etc)
+currently in use (if the font style exists in the new family) and
+will continue to use the same font style in the new family. For
+example:
+<br/>
+<span class="pre-in-pp">
+ .FAMILY BM \" Bookman family
+ .FT I \" Medium Italic
+ &lt;some text&gt; \" Bookman Medium Italic
+ .FAMILY H \" Helvetica family
+ &lt;more text&gt; \" Helvetica Medium Italic
+</span>
+However, if the font style does not exist in the new family, mom
+will set all subsequent type in the
+<a href="#fallback-font">fallback font</a>
+(by default, Courier Medium Roman) until she encounters a
+<a href="#font">FT</a>
+request that&#8217;s valid for the family. For example, assuming
+you don&#8217;t have the font &#8220;Medium Condensed Roman&#8221;
+(mom extension &#8220;CD&#8221;) in the Helvetica family:
+<br/>
+<span class="pre-in-pp">
+ .FAMILY UN \" Univers family
+ .FT CD \" Medium Condensed
+ &lt;some text&gt; \" Univers Medium Condensed
+ .FAMILY H \" Helvetica family
+ &lt;more text&gt; \" Courier Medium Roman!
+</span>
+In the above example, you must follow
+<kbd>.FAMILY&nbsp;H</kbd> with a FT request
+that&#8217;s valid for Helvetica.
+</p>
+
+<p>
+Please see the Appendices,
+<a href="appendices.html#fonts">Adding fonts to groff</a>,
+for information on adding fonts and families to groff, as well as
+to see a list of the extensions mom provides to groff&#8217;s basic
+<b>R</b>, <b>I</b>, <b>B</b>, <b>BI</b> styles.
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="tip">Suggestion:</span> When adding
+families to groff, I recommend following the established standard
+for the naming families and fonts. For example, if you add the
+Garamond family, name the font files
+<br/>
+<span class="pre-in-pp">
+ GARAMONDR
+ GARAMONDI
+ GARAMONDB
+ GARAMONDBI
+</span>
+GARAMOND then becomes a valid family name you can pass to FAMILY.
+(You could, of course, shorten GARAMOND to just G, or GD.) <b>R</b>,
+<b>I</b>, <b>B</b>, and <b>BI</b> after GARAMOND are the roman,
+italic, bold and bold-italic fonts respectively.
+</p>
+</div>
+
+<!-- -FT- -->
+
+<div class="macro-id-overline">
+<h3 id="font" class="macro-id">FT</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>FT</b> <kbd class="macro-args">R | I | B | BI | &lt;any other valid font style&gt;</kbd>
+</div>
+<p class="alias">
+<i>Alias:</i> <b>FONT</b>
+</p>
+
+<p>
+By default, groff permits FT to take one of four possible arguments
+specifying the desired font:
+<br/>
+<span class="pre-in-pp">
+ R = (Medium) Roman
+ I = (Medium) Italic
+ B = Bold (Roman)
+ BI = Bold Italic
+</span>
+For example, if your
+<a href="definitions.html#family">family</a>
+is Helvetica, entering
+<br/>
+<span class="pre-in-pp">
+ .FT B
+</span>
+will give you the Helvetica bold
+<a href="definitions.html#font">font</a>.
+If your family were Palatino, you&#8217;d get the Palatino bold
+font.
+</p>
+
+<p>
+Mom considerably extends the range of arguments you can pass to FT,
+making it more convenient to add and access fonts of differing
+<a href="definitions.html#weight">weights</a>
+and
+<a href="definitions.html#shape">shapes</a>
+within the same family. Have a look
+<a href="appendices.html#style-extensions">here</a>
+for a list of the weight/style arguments mom allows. Be aware,
+though, that you must have the fonts, correctly installed and named,
+in order to use the arguments. (See
+<a href="appendices.html#fonts">Adding fonts to groff</a>
+for instructions and information.) Please also read the
+<a href="#fam-add-note">Additional note</a>
+found in the description of the FAMILY macro.
+</p>
+
+<p>
+How mom reacts to an invalid argument to FT depends on which version
+of groff you&#8217;re using. If your groff version is greater than
+or equal to 1.19.2, mom will issue a warning and, depending on how
+you&#8217;ve set up the
+<a href="#fallback-font">fallback font</a>,
+either continue processing using the fallback font, or abort
+(allowing you to correct the problem). If your groff version is
+less than 1.19.2, mom will silently continue processing, using
+either the fallback font or the font that was in effect prior to the
+invalid FT call.
+</p>
+
+<p>
+FT will also accept, as an argument, a full family+font name. For
+example,
+<br/>
+<span class="pre-in-pp">
+ .FT HB
+</span>
+will set subsequent type in Helvetica Bold. However, I strongly
+recommend keeping family and font separate except where doing so is
+genuinely inconvenient.
+</p>
+
+<p>
+For inline control of fonts, see
+<a href="inlines.html#inline-fonts-mom">Inline Escapes, font control</a>.
+</p>
+
+
+<!-- -FALLBACK_FONT- -->
+
+<div class="macro-id-overline">
+<h3 id="fallback-font" class="macro-id">Fallback font</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>FALLBACK_FONT</b> <kbd class="macro-args">&lt;fallback font&gt; [ ABORT | WARN ]</kbd>
+</div>
+
+<p>
+In the event that you pass an invalid argument to
+<a href="#font">.FAMILY</a>
+(i.e. a non-existent family), mom, by default, uses the fallback
+font, Courier Medium Roman (CR), in order to continue processing
+your file.
+</p>
+
+<p>
+If you&#8217;d prefer another fallback font, pass FALLBACK_FONT the
+full family+font name of the font you&#8217;d like. For example, if
+you&#8217;d rather the fallback font were Times Roman Medium Roman,
+<br/>
+<span class="pre-in-pp">
+ .FALLBACK_FONT TR
+</span>
+would do the trick.
+</p>
+
+<p>
+Mom issues a warning whenever a font style set with
+<a href="#font">FT</a>
+does not exist, either because you haven&#8217;t registered the
+style (see
+<a href="appendices.html#register-style">here</a>
+for instructions on registering styles), or because the font style
+does not exist in the current family set with
+<a href="#family">FAMILY</a>.
+By default, mom then aborts, which allows you to correct the
+problem.
+</p>
+
+<p>
+If you&#8217;d prefer that mom not abort on non-existent fonts,
+but rather continue processing using a fallback font, you can pass
+FALLBACK_FONT the argument <kbd>WARN</kbd>, either by itself, or in
+conjunction with your chosen fallback font.
+</p>
+
+<p>
+Some examples of invoking FALLBACK_FONT:
+</p>
+
+<ul class="no-enumerator" style="margin-left: -1em;">
+<li style="margin-top: -.5em;">
+<kbd>.FALLBACK_FONT WARN</kbd>
+<br/>
+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.
+<br/>
+</li>
+<li style="margin-top: .5em;">
+<kbd>.FALLBACK_FONT TR WARN</kbd>
+<br/>
+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, &#8220;TR&#8221; will be
+the fallback font whenever you try to access a family that does not
+exist.
+</li>
+<li style="margin-top: .5em;">
+<kbd>.FALLBACK_FONT TR ABORT</kbd>
+<br/>
+mom will abort whenever you try to access a non-existent font, and
+will use the fallback font &#8220;TR&#8221; whenever you try to
+access a family that does not exist.
+</li>
+</ul>
+
+<p>
+If, for some reason, you want to revert to ABORT, just enter
+<kbd>.FALLBACK_FONT&nbsp;ABORT</kbd> and mom will once again abort
+on font errors.
+</p>
+
+<!-- -PT_SIZE- -->
+
+<div class="macro-id-overline">
+<h3 id="ps" class="macro-id">Point size of type</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>PT_SIZE</b> <kbd class="macro-args">&lt;size of type in points&gt;</kbd>
+</div>
+<p class="requires">
+&bull;&nbsp;Does not require a <a href="definitions.html#unitofmeasure">unit of measure</a>
+</p>
+
+<p>
+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&#8217;s a near universal convention that type size
+is measured in points. Therefore, to change the type size to, say,
+11 points, enter
+<br/>
+<span class="pre-in-pp">
+ .PT_SIZE 11
+</span>
+Point sizes may be fractional (e.g. 10.25 or 12.5).
+</p>
+
+<p>
+If you invoke PT_SIZE without an argument, it reverts to its former
+value. For example, if your point size is 10 and you change it to
+12 with <kbd>.PT_SIZE&nbsp;12</kbd>, entering <kbd>.PT_SIZE</kbd>
+(i.e. without an argument) resets the point size to 10.
+</p>
+
+<p>
+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
+<br/>
+<span class="pre-in-pp">
+ .PT_SIZE +2
+</span>
+then later reset it to 12 with
+<span class="pre-in-pp">
+ .PT_SIZE -2
+</span>
+or, more simply, just
+<span class="pre-in-pp">
+ .PT_SIZE
+</span>
+The size of type can also be changed inline. See
+<a href="inlines.html#inline-size-mom">Inline Escapes, changing point size</a>.
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span> It is unfortunate that the
+<kbd>pic</kbd> preprocessor has already taken the name,
+<kbd>PS</kbd>, and thus mom&#8217;s macro for setting point
+sizes can&#8217;t use it. However, if you aren&#8217;t using
+<kbd>pic</kbd>, you might want to
+<a href="goodies.html#alias">alias</a>
+PT_SIZE as PS, since there&#8217;d be no conflict. For example
+<br/>
+<span class="pre-in-pp">
+ .ALIAS PS PT_SIZE
+</span>
+would allow you to set point sizes with <kbd>.PS</kbd>.
+</p>
+</div>
+
+<!-- -LS- -->
+
+<div class="macro-id-overline">
+<h3 id="leading" class="macro-id">Line spacing / leading</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>LS</b> <kbd class="macro-args">&lt;distance between lines&gt;</kbd>
+</div>
+<p class="requires">
+&bull;&nbsp;Does not require a <a href="definitions.html#unitofmeasure">unit of measure</a>
+</p>
+
+<p>
+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
+<a href="definitions.html#leading">leading</a>
+is most often given in points. Therefore, to set the linespace to
+14 points, you would enter
+<br/>
+<span class="pre-in-pp">
+ .LS 14
+</span>
+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
+<br/>
+<span class="pre-in-pp">
+ .LS .25i
+</span>
+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
+<br/>
+<span class="pre-in-pp">
+ .LS +3
+</span>
+then later reset it to 14 points with
+<br/>
+<span class="pre-in-pp">
+ .LS -3
+</span>
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="experts">Experts:</span> LS should not be confused with
+the groff primitive <kbd>.ls</kbd>. LS acts like
+<kbd>.vs</kbd>. mom does not provide a macro analogous to
+<kbd>.ls</kbd>.
+</p>
+</div>
+
+<!-- -AUTOLEAD- -->
+
+<div class="macro-id-overline">
+<h3 id="autolead" class="macro-id">Automatic line spacing</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>AUTOLEAD</b> <kbd class="macro-args">&lt;amount of automatic leading&gt; [FACTOR]</kbd>
+</div>
+<p class="requires">
+&bull;&nbsp;Does not require a <a href="definitions.html#unitofmeasure">unit of measure</a>
+<br/>
+(Please see
+<a href="docprocessing.html#autolead">here</a>
+for information on using
+<span style="font-style: normal">AUTOLEAD</span> during document
+processing.)
+</p>
+
+<p>
+Without the <kbd>FACTOR</kbd> argument, AUTOLEAD calculates the
+linespace for you by adding its argument to the current point size
+of type. All subsequent
+<a href="#ps">PT_SIZE</a>
+requests automatically update the linespacing by the autolead amount.
+</p>
+
+<p>
+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).
+</p>
+
+<p>
+As an example, if your current point size of type is 12, entering
+<br/>
+<span class="pre-in-pp">
+ .AUTOLEAD 2
+</span>
+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
+<a href="definitions.html#inlines">inline</a>)
+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.
+</p>
+
+<p>
+Automatic updating of the linespacing continues until you enter a
+&#8220;manual&#8221; line space value with
+<a href="#leading">LS</a>.
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="experts">Experts:</span> Please note that the groff
+<a href="definitions.html#primitives">primitives</a>,
+<kbd>.vs</kbd> and <kbd>.ps</kbd>, are unaffected by, and have no
+effect, on AUTOLEAD.
+</p>
+</div>
+
+<p>
+If you give AUTOLEAD the optional FACTOR argument, AUTOLEAD
+calculates the line space as a factor of the
+<a href="definitions.html#numericargument">numeric argument</a>
+you gave AUTOLEAD. For example, if your point size is 12,
+<br/>
+<span class="pre-in-pp">
+ .AUTOLEAD 1.125 FACTOR
+</span>
+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).
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span> There&#8217;s no need to prepend a
+plus sign
+(<kbd>+</kbd>)
+to AUTOLEAD&#8217;s argument, although you may do so if you wish.
+</p>
+</div>
+
+<!-- -LL- -->
+
+<div class="macro-id-overline">
+<h3 id="linelength" class="macro-id">Line length</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>LL</b> <kbd class="macro-args">&lt;line length&gt;</kbd>
+</div>
+<p class="requires">
+&bull;&nbsp;Requires a <a href="definitions.html#unitofmeasure">unit of measure</a>
+</p>
+
+<p>
+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.
+</p>
+
+<p>
+LL requires a unit of measure. Therefore, to set the line length to
+39 picas, you would enter
+<br/>
+<span class="pre-in-pp">
+ .LL 39P
+</span>
+As with other macros that require a unit of measure, the argument to
+LL may be fractional. For example,
+<br/>
+<span class="pre-in-pp">
+ .LL 4.5i
+</span>
+sets the line length to 4-1/2 inches.
+</p>
+
+<p>
+Additionally, you may express a new line length relative to the
+current line length by prepending a plus or minus sign to the
+argument. Thus, if you wanted to increase the line length by 3
+<a href="definitions.html#picaspoints">points</a>, you could
+do
+<br/>
+<span class="pre-in-pp">
+ .LL +3p
+</span>
+This is especially handy when you want to &#8220;hang&#8221;
+punctuation outside the right margin since you can pass
+groff&#8217;s
+<a href="inlines.html#inline-stringwidth-groff"><kbd>\w</kbd></a>
+escape as the argument to LL, like this:
+<br/>
+<span class="pre-in-pp">
+ .LL +\w'.'u
+</span>
+The above example increases the current line length by the width of
+a period. Notice that you must append the
+<a href="definitions.html#unitofmeasure">unit of measure</a>,
+<b>u</b>, to the escape since LL requires a unit of measure.
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span> The right margin macro
+<a href="#r-margin">(R_MARGIN)</a>
+can also be used to set line length.
+</p>
+</div>
+
+<div class="rule-short"><hr/></div>
+
+<!-- ==================================================================== -->
+
+<h2 id="justification-intro" class="macro-group">Justification and quadding/breaking and joining lines</h2>
+
+<p>
+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 (centred).
+</p>
+
+<p>
+These macros also determine whether or not
+<a href="definitions.html#inputline">input lines</a>
+are joined and
+<a href="definitions.html#filled">filled</a>
+during output.
+</p>
+
+<p>
+Additionally, macros that deal with how to break
+<a href="definitions.html#outputline">output lines</a>
+are covered in this section, as is the
+<a href="definitions.html#inlines">inline escape</a>
+for joining input lines.
+</p>
+
+<p>
+You may encounter some words here that are unfamiliar. Refer to
+<a href="definitions.html#typesetting">Typesetting terms</a>
+and
+<a href="definitions.html#groff">Groff terms</a>
+for an explanation.
+</p>
+
+<div id="index-justification" class="macro-list-container">
+<h3 class="macro-list">Justification and quadding/breaking and joining lines macros</h3>
+<ul class="macro-list">
+ <li>Fill modes
+ <ul style="list-style-type: none; margin-left: -1em;">
+ <li><a href="#justify">JUSTIFY</a> &ndash; set lines justified</li>
+ <li><a href="#quad">QUAD</a> &ndash; set filled lines flush left, right or centred</li>
+ </ul></li>
+ <li>Nofill modes
+ <ul style="list-style-type: none; margin-left: -1em;">
+ <li><a href="#lrc">LEFT</a> &ndash; set non-filled lines flush left</li>
+ <li><a href="#lrc">RIGHT</a> &ndash; set non-filled lines flush right</li>
+ <li><a href="#lrc">CENTER</a> &ndash; set non-filled lines centred</li>
+ </ul></li>
+ <li>Breaking lines
+ <ul style="list-style-type: none; margin-left: -1em;">
+ <li><a href="#br">BR</a> &ndash; manually break an output line</li>
+ <li><a href="#el">EL</a> &ndash; break a line without advancing to the next output line</li>
+ <li><a href="#space">SPACE</a> &ndash; break a line and add space before the next output line</li>
+ <li><a href="#spread">SPREAD</a> &ndash; break and force-justify an output line</li>
+ </ul></li>
+ <li>Joining input lines in <a href="definitions.html#filled">nofill mode</a>
+ <ul style="list-style-type: none; margin-left: -1em;">
+ <li><a href="#join">\c</a> inline escape</li>
+ </ul></li>
+</ul>
+</div>
+
+<!-- -JUSTIFY- -->
+
+<div class="macro-id-overline">
+<h3 id="justify" class="macro-id">Justify lines</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>JUSTIFY</b>
+</div>
+
+<p class="requires">
+(See
+<a href="definitions.html#filled">fill mode</a>
+for a definition of the difference between &#8220;fill&#8221; and
+&#8220;no-fill&#8221; modes.)
+</p>
+
+<p>
+JUSTIFY doesn&#8217;t take an argument.
+<a href="definitions.html#inputline">Input lines</a>
+after JUSTIFY are
+<a href="definitions.html#filled">filled</a>
+and
+<a href="definitions.html#just">justified</a>
+upon output.
+</p>
+
+<p>
+To break lines and prevent them from being filled and justified, use
+the
+<a href="#br">BR</a>
+macro.
+</p>
+
+<!-- -QUAD- -->
+
+<div class="macro-id-overline">
+<h3 id="quad" class="macro-id">Quad lines left, right, or centre</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>QUAD</b> <kbd class="macro-args">L | LEFT | R | RIGHT | C | CENTER | J | JUSTIFY</kbd>
+</div>
+
+<p class="alias" style="margin-bottom: 0;">
+<i>Alias:</i> <b>FILL</b>
+</p>
+
+<p class="requires">(See
+<a href="definitions.html#filled">fill mode</a>
+for a definition of the difference between &#8220;fill&#8221; and
+&#8220;no-fill&#8221; modes.)
+</p>
+
+<p>
+QUAD takes one argument: the direction in which lines should be
+<a href="definitions.html#quad">quadded</a>.
+<a href="definitions.html#inputline">Input lines</a>
+after QUAD are
+<a href="definitions.html#filled">filled</a>
+upon output.
+</p>
+
+<p>
+If <kbd>L</kbd> or <kbd>LEFT</kbd>, type is set flush along the left
+margin.
+</p>
+
+<p>
+If <kbd>R</kbd> or <kbd>RIGHT</kbd>, type is set flush along the
+right margin.
+</p>
+
+<p>
+If <kbd>C</kbd> or <kbd>CENTER</kbd> type is set centred on the
+current line length.
+</p>
+
+<p>
+<kbd>J</kbd> and <kbd>JUSTIFY</kbd> justify text, and are
+included as a convenience only. Obviously, if text is
+justified, it isn&#8217;t quadded. <kbd>.QUAD&nbsp;J</kbd> and
+<kbd>.QUAD&nbsp;JUSTIFY</kbd> have exactly the same effect as
+<a href="#justify">JUSTIFY</a>.
+</p>
+
+<p>
+To break lines and prevent them from being filled, use the
+<a href="#br">BR</a>
+macro.
+</p>
+
+<!-- -LEFT, RIGHT, CENTER- -->
+
+<div class="macro-id-overline">
+<h3 id="lrc" class="macro-id">Set lines flush left, right or centered in no-fill mode</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>LEFT</b>
+<br/>
+Macro: <b>RIGHT</b>
+<br/>
+Macro: <b>CENTER</b> &nbsp;(alias CENTRE)
+</div>
+
+<p class="requires">
+(See
+<a href="definitions.html#filled">no-fill mode</a>
+for a definition of the difference between &#8220;fill&#8221; and
+&#8220;no-fill&#8221; modes.)
+</p>
+
+<p>
+LEFT, RIGHT, and CENTER let you enter text on a line for line basis
+without having to use the
+<a href="#br">BR</a>
+macro after each line. Consider the following:
+<br/>
+<span class="pre-in-pp">
+ .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
+</span>
+Because text after <kbd>.QUAD&nbsp;LEFT</kbd> is
+<a href="definitions.html#filled">filled</a>,
+you have to use the
+<a href="#br">BR</a>
+macro to prevent the lines from running together. Not only is this
+annoying to type, it&#8217;s awkward to read in a text editor. Much
+better to do
+<br/>
+<span class="pre-in-pp">
+ .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.
+</span>
+</p>
+
+<div class="box-important" style="margin-top: -.5em;">
+<p class="tip">
+<span class="important">IMPORTANT:</span> Because LEFT,
+RIGHT, and CENTER are nofill modes, groff does not always respect the
+current line length.
+<a href="definitions.html#inputline">Input lines</a>
+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.
+</p>
+</div>
+
+<!-- -BR- -->
+
+<div class="macro-id-overline">
+<h3 id="br" class="macro-id">Manually break lines</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>BR</b>
+</div>
+
+<p>
+When using
+<a href="#justify">JUSTIFY</a>
+or
+<a href="#quad">QUAD</a>,
+BR tells mom about partial lines that you want broken (as opposed to
+<a href="definitions.html#filled">filled</a>).
+Any partial
+<a href="definitions.html#outputline">output line</a>
+that immediately precedes BR will be
+<a href="definitions.html#quad">quadded</a>
+in the direction of the current quad, or set flush left if text is
+<a href="definitions.html#just">justified</a>.
+</p>
+
+<p>
+Most of the time, you won&#8217;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&#8217;d
+expect a break, mom puts it in herself. Equally, in macros where a
+break isn&#8217;t normally desirable, no break occurs. This means
+text files don&#8217;t get cluttered with annoying BR&#8217;s.
+</p>
+
+<div class="box-tip">
+<p class="tip-top">
+<span class="note">Note:</span> Lines of text in
+<a href="definitions.html#filled">nofill mode</a>
+never require a BR. Furthermore, in nofill mode, ALL macros cause a
+break. If a break is not desired, use the
+<a href="#join"><kbd>\c</kbd></a>
+<a href="definitions.html#inlines">inline escape</a>.
+</p>
+
+<p class="tip-bottom" style="margin-top: -1em">
+<span class="experts">Experts:</span> BR is an alias for
+<kbd>.br</kbd>. You can use either, or mix
+&#8217;n&#8217; match with impunity.
+</p>
+</div>
+
+<!-- -EL- -->
+
+<div class="macro-id-overline">
+<h3 id="el" class="macro-id">Manually break a line without advancing on the page</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>EL</b>
+</div>
+
+<p class="requires">
+In nofill modes
+<span style="font-style: normal;">
+(<a href="#left">LEFT</a>,
+<a href="#right">RIGHT</a>,
+<a href="#center">CENTER</a>)
+</span>
+you must terminate the line input preceding
+<span style="font-style: normal;">EL</span>
+with the
+<span style="font-style: normal;">
+<kbd>\c</kbd> inline escape.
+</span>
+</p>
+
+<p style="margin-top: -.5em">
+<i><b>Suggestion:</b> If you find remembering whether to put in the</i>
+<kbd>\c</kbd>
+<i>bothersome, you may prefer to use the</i>
+<a href="definitions.html#inlines">inline escape</a>
+<i>alternative to</i> EL,
+<a href="inlines.html#b"><kbd><span class="nobr">\*[B]</span></kbd></a>,
+<i>which works consistently regardless of the fill mode.
+</i>EL <i>does not work after the</i>
+<a href="goodies.html#pad">PAD</a>
+<i>macro. See</i>
+<a href="goodies.html#nobreak"><kbd>.PAD&nbsp;NOBREAK</kbd></a>
+<i>for the way around this.</i>
+</p>
+
+<p id="el-example">
+EL (&#8220;<span style="text-decoration: underline;">E</span>nd <span style="text-decoration: underline;">L</span>ine&#8221;)
+is conceptually equivalent to the notion of a carriage return with
+no linefeed. Its function is simple: it breaks a line without
+advancing on the page. As an example of where you might use it,
+imagine that you&#8217;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 instead of calculating the lead
+that needs to be added to 12.5 to get 24. To demonstrate:
+<br/>
+<span class="pre-in-pp">
+ .LEFT
+ .LS 12.5
+ A line of text.\c
+ .EL
+ .ALD 24p
+ The next line of text.
+</span>
+may be more intuitive than
+<br/>
+<span class="pre-in-pp">
+ .LEFT
+ .LS 12.5
+ A line of text.
+ .ALD 11.5p
+ The next line of text.
+</span>
+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&#8217;t have to recalculate the extra space.
+</p>
+
+<p>
+ALD in the above examples stands for
+&#8220;<span style="text-decoration: underline;">A</span>dvance
+<span style="text-decoration: underline;">L</span>ea<span style="text-decoration: underline;">D</span>&#8221;,
+which is covered in the section
+<a href="#aldrld-intro">Vertical movements</a>.
+</p>
+
+<!-- -SP- -->
+
+<div class="macro-id-overline">
+<h3 id="space" class="macro-id">Break lines and add space between</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>SPACE</b> <kbd class="macro-args">[&lt;space to add between lines&gt;]</kbd>
+</div>
+<p class="alias">
+<i>Alias:</i> <b>SP</b>
+</p>
+
+<p>
+SPACE breaks a line, just like
+<a href="#br">BR</a>,
+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
+<a href="definitions.html#unitofmeasure">unit of measure</a>,
+it advances that number of extra line spaces. For example:
+<br/>
+<span class="pre-in-pp">
+ .SPACE
+</span>
+breaks the line then adds an extra linespace, whereas
+<br/>
+<span class="pre-in-pp">
+ .SPACE 2
+</span>
+breaks the line and adds two extra linespaces.
+</p>
+
+<p>
+If you supply a unit of measure, SPACE breaks the line and advances
+the specified vertical distance, as in
+<br/>
+<span class="pre-in-pp">
+ .SPACE 6p
+</span>
+which breaks the line and advances six points further.
+</p>
+
+<div class="box-tip">
+<p class="tip-top">
+<span class="tip">Tip:</span> SPACE and
+<a href="#ald">ALD</a>
+can be used interchangeably (<kbd>.SPACE&nbsp;6p</kbd> and
+<kbd>.ALD&nbsp;6p</kbd> 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.
+</p>
+
+<p>
+<span class="experts">Experts:</span> SPACE is an alias of
+<kbd>.sp</kbd>. You can use either, or mix &#8217;n&#8217; match
+with impunity. Because SPACE aliases <kbd>.sp</kbd>, it may be used
+with groff&#8217;s absolute position modifier
+&#8220;<kbd>|</kbd>&#8221; (the pipe
+character) to move to a specified vertical location on the page.
+Consult
+<span class="pre-in-pp">
+ info&nbsp;groff&nbsp;&#8220;Manipulating Spacing&#8221;
+</span>
+or, more simply,
+<span class="pre-in-pp">
+ info&nbsp;groff&nbsp;sp.
+</span>
+</p>
+</div>
+
+<!-- -SPREAD- -->
+
+<div class="macro-id-overline">
+<h3 id="spread" class="macro-id">Break and force justify (spread) lines</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>SPREAD</b>
+</div>
+
+<p>
+Sometimes, you need to break a line of
+<a href="definitions.html#just">justified</a>
+text and have it come out fully justified, not
+<a href="definitions.html#quad">quadded</a>
+left the way it would be with the
+<a href="#br">BR</a>
+macro. An example of where you&#8217;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.
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="experts">Experts:</span> SPREAD is an alias for
+<kbd>.brp</kbd> You can use either, or mix &#8217;n&#8217; match
+with impunity.
+</p>
+</div>
+
+<!-- -JOIN- -->
+
+<div class="macro-id-overline">
+<h3 id="join" class="macro-id">Join input lines</h3>
+</div>
+
+<div class="box-macro-args">
+Inline: <kbd class="macro-args">\c</kbd>
+</div>
+
+<p>
+Sometimes, especially when in one of the
+<a href="definitions.html#filled">nofill modes</a>,
+a macro will cause a break where you don&#8217;t want one. In order
+to prevent this from happening (in other words, to join
+<a href="definitions.html#inputline">input lines</a>
+together, forming one
+<a href="definitions.html#outputline">output line</a>),
+use the groff
+<a href="definitions.html#inlines">inline escape</a>
+<kbd>\c</kbd> at the end of each input line to be
+joined to another, like this:
+<br/>
+<span class="pre-in-pp">
+ .LEFT
+ .FAMILY T
+ .FT R
+ Some lines of text to be \c
+ .FAMILY H
+ .FT B
+ joined \c
+ .FAMILY T
+ .FT R
+ together.
+</span>
+Upon output, the lines will be joined together to read
+<br/>
+<span class="pre-in-pp">
+ Some lines of text to be joined together.
+</span>
+with the word &#8220;joined&#8221; in Helvetica bold. Note the
+spaces before <kbd>\c</kbd>. Without them, the last three words of
+the output line would read
+<br/>
+<span class="pre-in-pp">
+ bejoinedtogether
+</span>
+Please also note that had the example been in one of the
+<a href="definitions.html#filled">fill modes</a>,
+there&#8217;d have been no need for the <kbd>\c</kbd>.
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<b>Addendum:</b> The example, above, is designed to demonstrate the
+use of <kbd>\c</kbd>. An easier and more intuitive way
+to accomplish the family/font change in the example would be with
+the groff
+<a href="definitions.html#inlines">inline escape</a>,
+<kbd><a href="inlines.html#inline-fonts-groff">\f</a></kbd>,
+like this:
+<br/>
+<span class="pre-in-pp" style="padding-bottom: 0px;">
+ Some lines of text to be \f[HB]joined\*[PREV] together.
+</span>
+</p>
+</div>
+
+<div class="rule-short" style="margin-bottom: 24px;"><hr/></div>
+
+<!-- ==================================================================== -->
+
+<h2 id="refinements-intro" class="macro-group">Typographic refinements</h2>
+
+<p>
+The macros in this section help you tweak groff&#8217;s behaviour,
+ensuring that your documents look typographically professional.
+</p>
+
+<div id="index-refinements" class="macro-list-container">
+<h3 class="macro-list">Typographic refinements macros</h3>
+
+<ul class="macro-list">
+ <li>Word and sentence spacing
+ <ul style="list-style-type: none; margin-left: -1em;">
+ <li><a href="#ws">WS</a> &ndash; word spacing</li>
+ <li><a href="#ss">SS</a> &ndash; sentence space</li>
+ </ul></li>
+ <li>Letter spacing (track kerning)
+ <ul style="list-style-type: none; margin-left: -1em;">
+ <li><a href="#rw">RW</a> &ndash; reduce whitespace</li>
+ <li><a href="#ew">EW</a> &ndash; expand whitespace</li>
+ <li><a href="#br-at-line-kern">BR_AT_LINE_KERN</a></li>
+ </ul></li>
+ <li>Hyphenation
+ <ul style="list-style-type: none; margin-left: -1em;">
+ <li><a href="#hy">HY</a> &ndash; turn auto hyphenation on/off, or set specific hyphenation parameters</li>
+ <li><a href="#hy-set">HY_SET</a> &ndash; set all hyphenation parameters</li>
+ </ul></li>
+ <li>Automatic kerning and ligatures
+ <ul style="list-style-type: none; margin-left: -1em;">
+ <li><a href="#kern">KERN</a> &ndash; turn automatic pairwise kerning on or off</li>
+ <li><a href="#ligatures">LIGATURES</a> &ndash; turn automatic generation of ligatures on or off</li>
+ </ul></li>
+</ul>
+</div>
+
+<!-- -WS- -->
+
+<div class="macro-id-overline">
+<h3 id="ws" class="macro-id">Word spacing</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>WS</b> <kbd class="macro-args">&lt;+|-wordspace&gt; | DEFAULT</kbd>
+</div>
+
+<p>
+WS (Word Space) increases or decreases the amount of space between
+words. In
+<a href="definitions.html#filled">nofill modes</a>,
+or if
+<a href="#quad">QUAD</a>
+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
+<a href="definitions.html#just">justified</a>,
+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.
+</p>
+
+<p>
+Word space is relative to point size. 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 between 3 and 5
+produces a subtle but noticeable difference. In/decreasing by a
+value greater than 6 is almost always apparent. You should preview
+your work to assess the effect of WS.
+</p>
+
+<p id="ws-usage">
+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
+<br/>
+<span class="pre-in-pp">
+ .WS -2
+</span>
+To increase it by a noticeable amount, you might enter
+<br/>
+<span class="pre-in-pp">
+ .WS +6
+</span>
+You can reset the word spacing to its previous value by switching
+the plus or minus sign, like this:
+<br/>
+<span class="pre-in-pp">
+ .WS +2
+ A line of text
+ .WS -2
+</span>
+The <kbd>.WS&nbsp;-2</kbd> undoes the effect of
+<kbd>.WS&nbsp;+2</kbd>. You can also reset WS to its groff default
+by entering
+<br/>
+<span class="pre-in-pp">
+ .WS DEFAULT
+</span>
+This can be particularly useful if you&#8217;ve been playing around
+with plus and minus values, and can&#8217;t remember by how much to
+in/decrease the word space to get it back to normal.
+</p>
+
+<!-- -SS- -->
+
+<div class="macro-id-overline">
+<h3 id="ss" class="macro-id">Sentence space</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>SS</b> <kbd class="macro-args">&lt;+sentence space&gt; | 0 | DEFAULT</kbd>
+</div>
+
+<p>
+SS (Sentence Space) tells groff how to treat double spaces it
+encounters between sentences in
+<a href="definitions.html#inputline">input lines</a>.
+If you use SS, input sentences with two spaces after them <i>and</i>
+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,
+<br/>
+<span class="pre-in-pp">
+ .SS +2
+</span>
+means that input sentences with two spaces after them receive a
+normal word space PLUS the +2 value passed to SS.
+</p>
+
+<p>
+Like
+<a href="#ws">WS</a>,
+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). Increasing by a
+value greater than 10 is always apparent. You should preview your
+work to assess the effect of SS.
+</p>
+
+<p>
+There&#8217;s an additional argument you can pass SS: the number
+zero (without the plus sign). It&#8217;s the argument you&#8217;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
+<br/>
+<span class="pre-in-pp">
+ .SS 0
+</span>
+at the top of your files.
+</p>
+
+<p>
+If you do use SS for something other than ensuring that you
+don&#8217;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
+<br/>
+<span class="pre-in-pp">
+ .SS DEFAULT
+</span>
+If you&#8217;re using the
+<a href="docprocessing.html">document processing macros</a>
+and your
+<a href="docprocessing.html#printstyle">PRINTSTYLE</a>
+is <kbd>TYPEWRITE</kbd>, <kbd>.SS&nbsp;DEFAULT</kbd> is the
+default, because you do want double spaces between sentences in copy
+that imitates the look of a typewritten document.
+</p>
+
+<div class="box-important">
+<p class="tip">
+<span class="important">IMPORTANT:</span> SS with an argument other
+than <kbd>0</kbd> (zero) should only be used if you&#8217;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.
+</p>
+</div>
+
+<!-- -HY- -->
+
+<div class="macro-id-overline">
+<h3 id="hy" class="macro-id">Automatic hyphenation control</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>HY</b> <kbd class="macro-args">LINES &lt;max. number of consecutive hyphenated lines&gt;</kbd>
+ <br/>
+Macro: <b>HY</b> <kbd class="macro-args">MARGIN &lt;size of hyphenation margin&gt;</kbd>
+ <br/>
+Macro: <b>HY</b> <kbd class="macro-args">SPACE &lt;extra interword spacing to prevent hyphenation&gt;</kbd>
+ <br/>
+Macro: <b>HY</b> <kbd class="macro-args">DEFAULT</kbd>
+ <br/>
+Macro: <b>HY</b> <kbd class="macro-args">toggle</kbd>
+</div>
+<p class="alias">
+<i>Aliases:</i> <b>HYPHENATE, HYPHENATION</b>
+</p>
+
+<p>
+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&#8217;ve broken them down into separate sections.
+</p>
+
+<h3 class="docs">1.&nbsp;&nbsp;HY</h3>
+
+<p>
+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
+<a href="intro.html#macro-args">How to read macro arguments</a>,
+you could turn HY off by entering
+<br/>
+<span class="pre-in-pp">
+ .HY OFF
+</span>
+or
+<span class="pre-in-pp">
+ .HY X
+</span>
+or
+<span class="pre-in-pp">
+ .HY END
+</span>
+A subsequent call to HY restores hyphenation with the parameters for
+LINES, MARGIN, or SPACE that were formerly in effect (see below).
+</p>
+
+<p>
+HY observes the following default hyphenation rules:
+</p>
+<ul style="margin-top: -.5em; margin-left: 18px;">
+ <li>Last lines (i.e. ones that will spring a trap&mdash;typically
+ the last line on a page) will not be hyphenated.
+ </li>
+ <li>The first and last two characters of a word are never
+ split off.
+ </li>
+</ul>
+
+<h3 class="docs numbered">2.&nbsp;&nbsp;HY LINES</h3>
+
+<p>
+HY LINES sets the maximum number of consecutive hyphenated lines
+that will appear in output copy. 2 is a very good choice, and
+you&#8217;d set it with
+<br/>
+<span class="pre-in-pp">
+ .HY LINES 2
+</span>
+By default, when you turn automatic hyphenation on, there is no
+limit to the number of consecutive hyphenated lines.
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span>
+<a href="definitions.html#discretionaryhyphen">Discretionary hyphens</a>
+count when groff is figuring out how many lines to hyphenate;
+explicit hyphens (i.e. the actual hyphen character) do not.
+</p>
+</div>
+
+<h3 class="docs numbered">3.&nbsp;&nbsp;HY MARGIN</h3>
+
+<p>
+HY MARGIN sets the amount of room allowed at the end of a line
+before hyphenation is tripped (e.g., if there&#8217;s only 6 points
+left at the end of a line, groff won&#8217;t try to hyphenate the
+next word). HY MARGIN only applies if you&#8217;re using
+<a href="#quad">QUAD</a>,
+and is really only useful if you&#8217;re using QUAD LEFT.
+</p>
+
+<p>
+As an example, if you don&#8217;t want groff to hyphenate words
+when there&#8217;s only 18 points of space left at the end of a
+left-quadded line, you&#8217;d enter
+<br/>
+<span class="pre-in-pp" style="margin-bottom: -1em">
+ .HY MARGIN 18p
+</span>
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span> The numeric argument after HY
+MARGIN requires a
+<a href="definitions.html#unitofmeasure">unit of measure</a>.
+</p>
+</div>
+
+<h3 class="docs numbered">4.&nbsp;&nbsp;HY SPACE</h3>
+
+<p>
+HY SPACE sets an amount of extra interword space that groff will
+try to put between words on a line in order to <i>prevent</i>
+hyphenation. HY SPACE applies only to
+<a href="definitions.html#just">justified lines</a>.
+Generally speaking, you&#8217;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&#8217;d set with
+<br/>
+<span class="pre-in-pp">
+ .HY SPACE .5p
+</span>
+or
+<span class="pre-in-pp" style="margin-bottom: -1em">
+ .HY SPACE 1p
+</span>
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span> The numeric argument after HY SPACE
+requires a
+<a href="definitions.html#unitofmeasure">unit of measure</a>.
+</p>
+</div>
+
+<h3 class="docs numbered">5.&nbsp;&nbsp;HY DEFAULT</h3>
+
+<p>
+HY DEFAULT resets automatic hyphenation to its default behaviour,
+cancelling any changes made with HY <kbd>LINES</kbd>, HY
+<kbd>MARGIN</kbd>, and/or HY <kbd>SPACE</kbd>.
+</p>
+
+<div class="box-notes">
+<h3 id="hyphenation-thoughts" class="docs notes">Thoughts on hyphenation in general</h3>
+
+<p style="margin-top: .5em">
+Hyphenation is a necessary evil. If it can be avoided, it
+should be. If it can&#8217;t be, it should occur infrequently.
+That&#8217;s the reason for the number of parameters you can set
+with HY.
+</p>
+
+<p class="tip-bottom">
+Furthermore, hyphenation in
+<a href="definitions.html#rag">rag</a>
+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.
+</p>
+</div>
+
+<!-- -HY_SET- -->
+
+<div class="macro-id-overline">
+<h3 id="hy-set" class="macro-id">Set hyphenation parameters all at once</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>HY_SET</b> <kbd class="macro-args">&lt;lines&gt; [ &lt;margin&gt; [ &lt;space&gt; ] ]</kbd>
+</div>
+
+<p class="alias">
+<i>Alias:</i> <b>HYSET</b>
+</p>
+
+<p>
+HY_SET lets you set the parameters for hyphenation
+with a single macro. <kbd>&lt;lines&gt;,</kbd>
+<kbd>&lt;margin&gt;</kbd>, and
+<kbd>&lt;space&gt;</kbd> correspond to the numeric
+values required by <kbd>LINES</kbd>,
+<kbd>MARGIN</kbd>, and <kbd>SPACE</kbd> as described
+<a href="#hy">above</a>.
+</p>
+
+<p>
+To set just the maximum number of consecutive hyphenated lines,
+you&#8217;d enter
+<br/>
+<span class="pre-in-pp">
+ .HY_SET 2
+</span>
+If you wanted the same number of maximum consecutive hyphenated
+lines and a hyphenation margin for use with
+<a href="definitions.html#rag">rag</a>
+copy,
+<br/>
+<span class="pre-in-pp">
+ .HY_SET 2 36p
+</span>
+would set the hyphenation margin to 36 points.
+</p>
+
+<p>
+If you wanted the same number of maximum consecutive hyphenated
+lines and a hyphenation space of 2 points for use with
+<a href="definitions.html#just">justified</a>
+copy,
+<br/>
+<span class="pre-in-pp">
+ .HYSET 2 0 2p
+</span>
+is how you&#8217;d do it.
+</p>
+
+<!-- -RW- -->
+
+<div class="macro-id-overline">
+<h3 id="rw" class="macro-id">Reduce whitespace</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>RW</b> <kbd class="macro-args">&lt;amount of whitespace reduction between letters&gt;</kbd>
+</div>
+
+<p>
+RW (<span style="text-decoration: underline;">R</span>educe <span style="text-decoration: underline;">W</span>hitespace)
+and its corresponding macro
+EW (<span style="text-decoration: underline;">E</span>xpand <span style="text-decoration: underline;">W</span>hitespace),
+allow you to tighten (or loosen)
+<a href="definitions.html#outputline">output lines</a>
+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.
+</p>
+
+<p>
+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&#8217;ll most likely use small
+decimal values when tightening lines. For example,
+<br/>
+<span class="pre-in-pp">
+ .RW .1
+</span>
+or
+<span class="pre-in-pp">
+ .RW .2
+</span>
+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.
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span> By default, RW does not deposit a
+<a href="#br">break</a>
+when it&#8217;s invoked if you&#8217;re in one of the
+<a href="definitions.html#fill">fill</a>
+modes (i.e.
+<a href="#quad">QUAD</a>
+L, R, C, J, or
+<a href="#justify">JUSTIFY</a>).
+If you want
+RW to break at the ends of the previous
+<a href="definitions.html#inputline">input lines</a>
+while you&#8217;re in a fill mode, tell mom
+that&#8217;s what you want by invoking
+<kbd><a href="#br-at-line-kern">.BR_AT_LINE_KERN</a></kbd>.
+</p>
+</div>
+
+<div class="box-important">
+<p class="tip">
+<span class="important">IMPORTANT:</span>
+RW (and its complement, EW, see below) only affects the current
+font, and remains in effect for that font every time it&#8217;s
+called, hence it must be reset to zero to cancel its effect
+(<kbd>.RW&nbsp;0</kbd>).
+</p>
+</div>
+
+<!-- -EW- -->
+
+<div class="macro-id-overline">
+<h3 id="ew" class="macro-id">Expand whitespace</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>EW</b> <kbd class="macro-args">&lt;amount of whitespace expansion between letters&gt;</kbd>
+</div>
+
+<p>
+EW (<span style="text-decoration: underline;">E</span>xpand <span style="text-decoration: underline;">W</span>hitespace)
+expands the amount of whitespace between letters, effectively
+&#8220;loosening&#8221; lines of type.
+</p>
+
+<p>
+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&#8217;ll most likely use small
+decimal values when loosening lines. For example,
+<br/>
+<span class="pre-in-pp">
+ .EW .1
+</span>
+or
+<span class="pre-in-pp">
+ .EW .2
+</span>
+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.
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span> By default, EW does not deposit a
+<a href="#br">break</a>
+when it&#8217;s invoked if you&#8217;re in one of the
+<a href="definitions.html#fill">fill</a>
+modes (i.e.
+<a href="#quad">QUAD</a>
+L, R, C, J, or
+<a href="#justify">JUSTIFY</a>).
+If you want
+EW to break at the ends of the previous
+<a href="definitions.html#inputline">input lines</a>
+while you&#8217;re in a fill mode, tell mom that&#8217;s what you
+want by invoking the
+<kbd><a href="#br-at-line-kern">.BR_AT_LINE_KERN</a></kbd>
+toggle macro.
+</p>
+</div>
+
+<div class="box-important">
+<p class="tip">
+<span class="important">IMPORTANT:</span>
+EW (and its complement, RW, see above) only affects the current
+font, and remains in effect for that font every time it&#8217;s
+called, hence it must be reset to zero to cancel its effect
+(<kbd>.RW&nbsp;0</kbd>).
+</p>
+</div>
+
+<!-- -BR_AT_LINE_KERN- -->
+
+<div class="macro-id-overline">
+<h3 id="br-at-line-kern" class="macro-id">Break before line kerning</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>BR_AT_LINE_KERN</b> <kbd class="macro-args">toggle</kbd>
+</div>
+
+<p>
+By default, in
+<a href="definitions.html#filled">fill</a>
+modes (i.e.
+<a href="#quad">QUAD</a>
+L, R, C, J, or
+<a href="#justify">JUSTIFY</a>)
+mom does not break
+<a href="definitions.html#inputline">input lines</a>
+when you invoke
+<a href="#rw">RW</a>
+or
+<a href="#ew">EW</a>.
+If you&#8217;d like her to break input lines prior to RW or EW,
+invoke <kbd>.BR_AT_INPUT_LINE</kbd> without any argument. To
+disable the breaks, invoke <kbd>.BR_AT_INPUT_LINE</kbd> with any
+argument (<kbd>OFF</kbd>, <kbd>QUIT</kbd>, <kbd>END</kbd>,
+<kbd>X</kbd>...), like this
+<br/>
+<span class="pre-in-pp">
+ .BR_AT_LINE_KERN OFF
+</span>
+or
+<span class="pre-in-pp">
+ .BR_AT_LINE_KERN X
+</span>
+With QUAD L, R, or C, mom simply breaks the line. With QUAD J (or
+just JUSTIFY, which is the same thing), she breaks and
+<a href="definitions.html#force">force justifies</a>
+the line prior to <kbd>.EW</kbd> or <kbd>.RW</kbd>.
+</p>
+
+<!-- -KERN- -->
+
+<div class="macro-id-overline">
+<h3 id="kern" class="macro-id">Automatic kerning</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>KERN</b> <kbd class="macro-args">toggle</kbd>
+</div>
+
+<p>
+By itself (i.e. with no argument), KERN turns automatic pairwise
+<a href="definitions.html#kern">kerning</a>
+on. With any argument (e.g. <kbd>OFF</kbd>, <kbd>Q</kbd>,
+<kbd>X</kbd>), pairwise kerning is turned off.
+</p>
+
+<p>
+Kerning of individual character pairs can be controlled with the two
+<a href="definitions.html#inlines">inline escapes</a>
+<br/>
+<kbd>\*[BU&nbsp;&lt;n&gt;]</kbd> and
+<kbd>\*[FU&nbsp;&lt;n&gt;]</kbd>. See
+<a href="inlines.html#inline-kerning-mom">Inline Escapes, kerning</a>.
+</p>
+
+<!-- -LIGATURES- -->
+
+<div class="macro-id-overline">
+<h3 id="ligatures" class="macro-id">Automatic ligature generation</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>LIGATURES</b> <kbd class="macro-args">toggle</kbd>
+</div>
+<p class="alias">
+<i>Alias:</i> <b>LIG</b>
+</p>
+
+<p>
+Provided your current font has
+<a href="definitions.html#ligatures">ligatures</a>,
+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 &#8220;finally&#8221;,
+the fi combination will be output as an fi ligature. Generally
+speaking, ligatures are A Good Thing, hence mom has them on by
+default.
+</p>
+
+<p>
+LIGATURES with any argument turns automatic ligature generation off.
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span> Not all fonts support ligatures.
+</p>
+</div>
+
+<div class="rule-short"><hr/></div>
+
+<!-- ==================================================================== -->
+
+<h2 id="modifications-intro" class="macro-group">Type modifications (pseudo font styles)</h2>
+
+<p>
+It sometimes happens that a
+<a href="definitions.html#family">family</a>
+doesn&#8217;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 the condensed version. That&#8217;s
+where these macros and inline escapes come in. With them, you
+can fake the fonts you&#8217;re missing. A word of caution,
+though: &#8220;faked&#8221; fonts are just that&mdash;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.
+</p>
+
+<div id="index-modifications" class="macro-list-container">
+<h3 class="macro-list">Type modifications macros</h3>
+
+<ul class="macro-list">
+ <li>Pseudo italic
+ <ul style="list-style: none; margin-left: -1em;">
+ <li><a href="#setslant">SETSLANT</a> &ndash; degree of pseudo-italicizing</li>
+ <li><a href="#slant-inline">\*[SLANT]</a> &ndash; inline escape for pseudo-italicizing type</li>
+ </ul></li>
+ <li>Pseudo bold
+ <ul style="list-style: none; margin-left: -1em;">
+ <li><a href="#setbolder">SETBOLDER</a> &ndash; amount of emboldening</li>
+ <li><a href="#bolder-inline">\*[BOLDER]</a> &ndash; inline escape for emboldening type</li>
+ </ul></li>
+ <li>Pseudo condensed
+ <ul style="list-style: none; margin-left: -1em;">
+ <li><a href="#condense">CONDENSE</a> &ndash; percentage for pseudo-condensed type</li>
+ <li><a href="#cond-inline">\*[COND]</a> &ndash; inline escape for pseudo-condensed type</li>
+ </ul></li>
+ <li>Pseudo extended
+ <ul style="list-style: none; margin-left: -1em;">
+ <li><a href="#extend">EXTEND</a> &ndash; percentage for pseudo-extended type</li>
+ <li><a href="#ext-inline">\*[EXT]</a> &ndash; inline escape for pseudo-extending</li>
+ </ul></li>
+ <li>Smallcaps
+ <ul style="list-style: none; margin-left: -1em;">
+ <li><a href="#smallcaps">SMALLCAPS</a> &ndash; enable smallcaps</li>
+ <li><a href="#smallcaps-style">SMALLCAPS_STYLE</a> &ndash; size, weight, and width of smallcaps</li>
+ </ul></li>
+</ul>
+</div>
+
+<!-- -SETSLANT- -->
+
+<div class="macro-id-overline">
+<h3 id="setslant" class="macro-id">Set degree of slant for pseudo-italicizing</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>SETSLANT</b> <kbd class="macro-args">&lt;degrees to slant type&gt; | RESET</kbd>
+</div>
+
+<p>
+Pseudo-italicizing 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&#8217;s default is 15, which produces an
+acceptable approximation of an italic font. If you want another
+value&mdash;say, 13 degrees&mdash;you&#8217;d set it by entering
+<br/>
+<span class="pre-in-pp">
+ .SETSLANT 13
+</span>
+If you change the degree of slant and later want to set it back to
+the mom default, do
+<br/>
+<span class="pre-in-pp">
+ .SETSLANT RESET
+</span>
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span> By itself, SETSLANT will not start
+pseudo-italicizing type; it merely tells mom what degree of slant
+you want. To start pseudo-italicizing, use the
+<a href="definitions.html#inlines">inline escape</a>
+<kbd>\*[SLANT]</kbd>.
+</p>
+</div>
+
+<!-- -\*[SLANT]- -->
+
+<div class="macro-id-overline">
+<h3 id="slant-inline" class="macro-id">Pseudo italic on/off</h3>
+</div>
+
+<div class="box-macro-args">
+Inline: <kbd class="macro-args">\*[SLANT]</kbd>
+<br/>
+Inline: <kbd class="macro-args">\*[SLANTX</kbd>]
+</div>
+
+<p>
+<kbd class="macro-args">\*[SLANT]</kbd> begins pseudo-italicizing. <kbd class="macro-args"><span class="nobr">\*[SLANTX]</span></kbd> turns
+the feature off. Both are <a href="definitions.html#inlines">inline
+escapes</a>,
+therefore they should not appear as separate lines, but rather be
+embedded in text lines, like this:
+<br/>
+<span class="pre-in-pp">
+ Not \*[SLANT]everything\*[SLANTX] is as it seems.
+</span>
+Alternatively, if you wanted the whole line pseudo-italicized,
+you&#8217;d do
+<br/>
+<span class="pre-in-pp">
+ \*[SLANT]Not everything is as it seems.\*[SLANTX]
+</span>
+Once <kbd><span class="nobr">\*[SLANT]</span></kbd> is invoked, it remains in
+effect until turned off.
+</p>
+
+<div class="box-tip" style="margin-top: .5em;">
+<p class="tip">
+<span class="note">Note:</span> If you&#8217;re using the
+<a href="docprocessing.html#docprocessing">document processing macros</a>
+with
+<a href="docprocessing.html#printstyle">PRINTSTYLE TYPEWRITE</a>,
+mom underlines pseudo-italics by default. To change this behaviour,
+use the special macro
+<a href="docprocessing.html#typewrite-control">SLANT_MEANS_SLANT</a>.
+</p>
+</div>
+
+<!-- -SETBOLDER- -->
+
+<div class="macro-id-overline">
+<h3 id="setbolder" class="macro-id">Set amount of emboldening</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>SETBOLDER</b> <kbd class="macro-args">&lt;amount of emboldening, in machine units&gt; | RESET</kbd>
+</div>
+
+<p>
+Emboldening of type is accomplished by printing characters twice;
+the second printing is slightly offset from the first, effectively
+&#8220;thickening&#8221; the character. SETBOLDER lets you set the
+number of
+<a href="definitions.html#units">machine units</a>
+for the offset. Mom&#8217;s default is 700 units, which produces an
+acceptable approximation of a bold font. If you want another
+value&mdash;say, 500 units&mdash;you&#8217;d set it by entering
+<br/>
+<span class="pre-in-pp">
+ .SETBOLDER 500
+</span>
+If you change the emboldening offset and later want to set it back
+to the mom default, do
+<br/>
+<span class="pre-in-pp">
+ .SETBOLDER RESET
+</span>
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span> 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
+<a href="definitions.html#inlines">inline escape</a>
+<kbd><span class="nobr">\*[BOLDER]</span></kbd>.
+</p>
+</div>
+
+<!-- -\*[BOLDER]- -->
+
+<div class="macro-id-overline">
+<h3 id="bolder-inline" class="macro-id">Emboldening on/off</h3>
+</div>
+
+<div class="box-macro-args">
+Inline: <kbd class="macro-args">\*[BOLDER]</kbd>
+<br/>
+Inline: <kbd class="macro-args">\*[BOLDERX]</kbd>
+</div>
+
+<p>
+<kbd class="macro-args">\*[BOLDER]</kbd> begins emboldening type.
+<kbd class="macro-args"><span class="nobr">\*[BOLDERX]</span></kbd> turns the
+feature off. Both are
+<a href="definitions.html#inlines">inline escapes</a>,
+therefore they should not appear as separate lines, but rather be
+embedded in text lines, like this:
+<br/>
+<span class="pre-in-pp">
+ Not \*[BOLDER]everything\*[BOLDERX] is as it seems.
+</span>
+Alternatively, if you wanted the whole line emboldened,
+you&#8217;d do
+<br/>
+<span class="pre-in-pp">
+ \*[BOLDER]Not everything is as it seems.\*[BOLDERX]
+</span>
+Once <kbd><span class="nobr">\*[BOLDER]</span></kbd> is invoked, it remains in
+effect until turned off.
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span> If you&#8217;re using the
+<a href="docprocessing.html#docprocessing">document processing macros</a>
+with
+<a href="docprocessing.html#printstyle">PRINTSTYLE TYPEWRITE</a>,
+mom ignores <kbd>\*[BOLDER]</kbd> requests.
+</p>
+</div>
+
+<!-- -CONDENSE- -->
+
+<div class="macro-id-overline">
+<h3 id="condense" class="macro-id">Set percentage for pseudo-condensed type</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>CONDENSE</b> <kbd class="macro-args">&lt;pseudo-condense percentage&gt;</kbd>
+</div>
+
+<p>
+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.
+</p>
+
+<p>
+Mom has no default value for CONDENSE, therefore you must set it
+before using the
+<a href="definitions.html#inlines">inline escape</a>
+<kbd><a href="#cond-inline"><span class="nobr">\*[COND]</span></a></kbd>.
+80 percent of the normal character width is a good value, and
+you&#8217;d set it like this:
+<br/>
+<span class="pre-in-pp">
+ .CONDENSE 80
+</span>
+</p>
+
+<div class="box-tip">
+<p class="tip-top">
+<span class="note">Note:</span> 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
+<a href="definitions.html#inlines">inline escape</a>
+<kbd><span class="nobr">\*[COND]</span></kbd>.
+</p>
+
+<p class="tip-bottom">
+<span class="additional-note">Additional note:</span> Make sure that
+pseudo-condensing is off (with
+<kbd><a href="#cond-inline"><span class="nobr">\*[CONDX]</span></a></kbd>)
+before making any changes to the pseudo-condense percentage
+with CONDENSE.
+</p>
+</div>
+
+<!-- -\*[COND]- -->
+
+<div class="macro-id-overline">
+<h3 id="cond-inline" class="macro-id">Pseudo-condensing on/off</h3>
+</div>
+
+<div class="box-macro-args">
+Inline: <kbd class="macro-args">\*[COND]</kbd>
+<br/>
+Inline: <kbd class="macro-args">\*[CONDX]</kbd>
+</div>
+
+<p>
+<kbd>\*[COND]</kbd> begins pseudo-condensing type.
+<kbd><span class="nobr">\*[CONDX]</span></kbd> turns the feature off. Both are
+<a href="definitions.html#inlines">inline escapes</a>,
+therefore they should not appear as separate lines, but rather be
+embedded in text lines, like this:
+<br/>
+<span class="pre-in-pp">
+ \*[COND]Not everything is as it seems.\*[CONDX]
+</span>
+<kbd><span class="nobr">\*[COND]</span></kbd> remains in effect until you turn it
+off with <kbd><span class="nobr">\*[CONDX]</span></kbd>.
+</p>
+
+<div class="box-important">
+<p class="tip">
+<span class="important">IMPORTANT:</span> You must turn
+<kbd><span class="nobr">\*[COND]</span></kbd> off before making any changes to
+the point size of your type, either via the
+<a href="#ps">PT_SIZE</a>
+macro or with the <kbd>\s</kbd> inline escape. If you wish
+the new point size to be pseudo-condensed, simply re-invoke
+<kbd><span class="nobr">\*[COND]</span></kbd> afterwards. Equally,
+<kbd><span class="nobr">\*[COND]</span></kbd> must be turned off before changing
+the condense percentage with
+<kbd><a href="#condense">.CONDENSE</a></kbd>.
+</p>
+</div>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span> If you&#8217;re using the
+<a href="docprocessing.html#docprocessing">document processing macros</a>
+with
+<a href="docprocessing.html#printstyle">PRINTSTYLE TYPEWRITE</a>,
+mom ignores <kbd>\*[COND]</kbd> requests.
+</p>
+</div>
+
+<!-- -EXTEND- -->
+
+<div class="macro-id-overline">
+<h3 id="extend" class="macro-id">Set percentage for pseudo-extended type</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>EXTEND</b> <kbd class="macro-args">&lt;pseudo-extend percentage&gt;</kbd>
+</div>
+
+<p>
+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.
+</p>
+
+<p>
+Mom has no default value for EXTEND, therefore you must set it
+before using the
+<a href="definitions.html#inlines">inline escape</a>
+<kbd><a href="#ext-inline"><span class="nobr">\*[EXT]</span></a></kbd>. 120% of
+the normal character width is a good value, and you&#8217;d set it
+like this:
+<br/>
+<span class="pre-in-pp">
+ .EXTEND 120
+</span>
+</p>
+
+<div class="box-tip">
+<p class="tip-top">
+<span class="note">Note:</span> 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
+<a href="definitions.html#inlines">inline escape</a>
+<kbd><span class="nobr">\*[EXT]</span></kbd>.
+</p>
+
+<p class="tip-bottom">
+<span class="additional-note">Additional note:</span> Make sure that
+pseudo-extending is off (with
+<a href="#ext-inline"><kbd>\*[EXTX]</kbd></a>)
+before making any changes to the pseudo-extend percentage
+with EXTEND.
+</p>
+</div>
+
+<!-- -\*[EXT]- -->
+
+<div class="macro-id-overline">
+<h3 id="ext-inline" class="macro-id">Pseudo-extending on/off</h3>
+</div>
+
+<div class="box-macro-args">
+Inline: <kbd class="macro-args">\*[EXT]</kbd>
+<br/>
+Inline: <kbd class="macro-args">\*[EXTX]</kbd>
+</div>
+
+<p>
+<kbd>\*[EXT]</kbd> begins pseudo-extending type.
+<kbd><span class="nobr">\*[EXTX]</span></kbd> turns the feature off. Both are
+<a href="definitions.html#inlines">inline escapes</a>,
+therefore they should not appear as separate lines, but rather be
+embedded in text lines, like this:
+<br/>
+<span class="pre-in-pp">
+ \*[EXT]Not everything is as it seems.\*[EXTX]
+</span>
+<kbd>\*[EXT]</kbd> remains in effect until you turn it off with
+<kbd><span class="nobr">\*[EXTX]</span></kbd>.
+</p> <div class="box-important"> <p class="tip">
+<span class="important">IMPORTANT:</span> You must turn
+<kbd><span class="nobr">\*[EXT]</span></kbd> off before making any changes to the
+point size of your type, either via the
+<a href="#ps">PT_SIZE</a>
+macro or with the <kbd>\s</kbd> inline escape. If you wish
+the new point size to be pseudo-extended, simply re-invoke
+<kbd><span class="nobr">\*[EXT]</span></kbd> afterwards. Equally,
+<kbd><span class="nobr">\*[EXT]</span></kbd> must be turned off before changing
+the extend percentage with
+<a href="#extend">EXTEND</a>.
+</p>
+</div>
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span> If you&#8217;re using the
+<a href="docprocessing.html#docprocessing">document processing macros</a>
+with
+<a href="docprocessing.html#printstyle">PRINTSTYLE TYPEWRITE</a>,
+mom ignores <kbd><span class="nobr">\*[EXT]</span></kbd> requests.
+</p>
+</div>
+
+<!-- SMALLCAPS -->
+
+<div class="macro-id-overline">
+<h3 id="smallcaps" class="macro-id">Smallcaps</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>SMALLCAPS</b> <kbd class="macro-args">&lt;toggle&gt;</kbd>
+</div>
+
+<p>
+To begin setting type in pseudo-smallcaps, simply invoke
+<kbd>.SMALLCAPS</kbd>. When you no longer want them, invoke
+<kbd>SMALLCAPS&nbsp;OFF</kbd> (or <kbd>END</kbd>, <kbd>STOP</kbd>,
+<kbd>DONE</kbd>, etc). If you are currently in a
+<a href="definitions.html#filled">no-fill mode</a>,
+(i.e.
+<a href="#lrc">LEFT</a>,
+<a href="#lrc">CENTER</a>,
+or
+<a href="#lrc">RIGHT</a>)
+and you want the smallcaps to continue on the same line,
+append a <kbd>\c</kbd> to the line, like this
+<br/>
+<span class="pre-in-pp">
+ A line of type\c
+ .SMALLCAPS
+ with a few words in smallcaps.
+ .SMALLCAPS OFF
+</span>
+The line preceding <kbd>.SMALLCAPS&nbsp;OFF</kbd> should also have a
+<kbd>\c</kbd> appended to it if you wish it to continue unbroken.
+</p>
+
+<div class="box-tip">
+<p class="tip-top">
+<span class="note">Note:</span>
+SMALLCAPS does not have an inline equivalent to
+<a href="inlines.html#uc-lc">
+<span class="nobr"><kbd>\*[UC]</kbd> / <kbd>\*[LC]</kbd></span>
+</a>.
+Furthermore, if you&#8217;re using the
+<a href="docprocessing.html#docprocessing">document processing macros</a>
+with
+<a href="docprocessing.html#printstyle">PRINTSTYLE TYPEWRITE</a>,
+mom ignores SMALLCAPS.
+</p>
+
+<p class="tip-bottom">
+Additionally, be aware that no automatic
+<a href="definitions.html#kern">kerning</a>
+takes place while pseudo-smallcaps are in effect.
+</p>
+</div>
+
+<div class="macro-id-overline">
+<h3 id="smallcaps-style" class="macro-id">Set size, weight, and width of smallcaps</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>SMALLCAPS_STYLE</b> <kbd class="macro-args">SIZE &lt;percentage&gt; WEIGHT_ADJ &lt;percentage&gt; EXTEND &lt;percentage&gt;</kbd>
+</div>
+
+<p>
+True smallcaps are not a font effect, but, like designer cuts of
+bold, condensed, and extended, actual fonts provided with some
+families. It is highly recommended that you acquire real smallcaps
+fonts rather than relying on mom&#8217;s pseudo version.
+</p>
+
+<p>
+To achieve a reasonable facsimile of designer-cut smallcaps fonts,
+mom needs to know the percentage of regular caps at a given point
+size by which to reduce the small caps. To make adjustments for
+the difference in weight and width of the smaller caps, she also
+needs to know by how much to embolden (&#8220;fatten&#8221;) the
+smallcaps, and by how much to increase their width.
+</p>
+
+<p>
+All three arguments to SMALLCAPS_STYLE reflect a
+percentage of the point size in effect when
+<a href="#smallcaps">SMALLCAPS</a>
+is invoked. Mom&#8217;s defaults for pseudo-smallcaps are:
+<br/>
+<span class="pre-in-pp">
+ SIZE = 74%
+ WEIGHT_ADJ = .3%
+ EXTEND = 5%
+</span>
+To change any or all of the defaults, you might enter
+<br/>
+<span class="pre-in-pp">
+ .SMALLCAPS_STYLE SIZE 80 WEIGHT_ADJ .25 EXTEND 3
+</span>
+or, more readably,
+<br/>
+<span class="pre-in-pp">
+ .SMALLCAPS_STYLE
+ SIZE 80 \
+ WEIGHT_ADJ .25 \
+ EXTEND 3
+</span>
+Note that you do not have to give SMALLCAPS_STYLE all three
+arguments, and that the arguments may be entered in any order. Any
+arguments you omit will remain at their former value.
+</p>
+
+<div class="rule-short" style="margin-bottom: 24px;"><hr/></div>
+
+<!-- ==================================================================== -->
+
+<h2 id="aldrld-intro" class="macro-group">Vertical movements</h2>
+
+The two macros in this section allow you to move down or up on the
+page relative to the current
+<a href="definitions.html#baseline">baseline</a>.
+
+<div id="index-aldrld" class="macro-list-container">
+<h3 class="macro-list">Vertical movements macros</h3>
+<ul class="macro-list">
+ <li><a href="#ald">ALD</a> &ndash; Advance Lead</li>
+ <li><a href="#rld">RLD</a> &ndash; Reverse Lead</li>
+ <li>(see also <a href="#space">SPACE</a>)</li>
+</ul>
+</div>
+
+<!-- -ALD- -->
+
+<div class="macro-id-overline">
+<h3 id="ald" class="macro-id">Advance Lead (move downward)</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>ALD</b> <kbd class="macro-args">&lt;distance to move downward&gt;</kbd>
+</div>
+<p class="requires">
+&bull;&nbsp;Requires a <a href="definitions.html#unitofmeasure">unit of measure</a>
+</p>
+
+<p>
+ALD takes one argument: the distance to move downward on the page
+relative to the current vertical position.
+</p>
+
+<p>
+ALD causes a line break, which means the argument is added to the
+current
+<a href="definitions.html#leading">leading</a>.
+For example, if your current leading is 12 points, a line of type
+after <kbd>.ALD 6p</kbd> will be 18 points distant from the previous
+line.
+</p>
+
+<p>
+If you wish to advance the argument's distance <i>from the
+current baseline,</i> it should be preceded by
+<a href="#el">EL</a>.
+For example,
+<br/>
+<span class="pre-in-pp">
+ .LEFT
+ .LS 12
+ First line.
+ Second line.\c
+ .EL
+ .ALD 15p
+ Third line.
+</span>
+would place the third line exactly 15 points beneath the second.
+</p>
+
+<p>
+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
+<br/>
+<span class="pre-in-pp">
+ .ALD .25i
+</span>
+or
+<br/>
+<span class="pre-in-pp">
+ .ALD 1P+6p
+</span>
+As the mnemonic
+(<span style="text-decoration: underline;">A</span>dvance <span style="text-decoration: underline;">L</span>ea<span style="text-decoration: underline;">D</span>)
+suggests, you&#8217;ll most often use ALD with
+<a href="definitions.html#picaspoints">points</a>
+of lead.
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span> 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 <kbd>-1v</kbd> (minus one
+line space), like this:
+<br/>
+<span class="pre-in-pp">
+ .ALD 1i-1v
+</span>
+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.
+</p>
+</div>
+
+<!-- -RLD- -->
+
+<div class="macro-id-overline">
+<h3 id="rld" class="macro-id">Reverse Lead (move upward)</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>RLD</b> <kbd class="macro-args">&lt;distance to move upward&gt;</kbd>
+</div>
+<p class="requires">
+&bull;&nbsp;Requires a <a href="definitions.html#unitofmeasure">unit of measure</a>
+</p>
+
+<p>
+RLD takes one argument: the distance to move upward on the page
+relative to the current vertical position.
+</p>
+
+<p>
+RLD causes a line break, which means the argument is subtracted from
+the current
+<a href="definitions.html#leading">leading</a>.
+For example, if your current leading is 12 points, a line of type
+after <kbd>.RLD 6p</kbd> will be 6 points distant from the previous
+line.
+</p>
+
+<p>
+If you wish to move upward <i>from the current baseline</i> by the
+argument's distance, RLD should be preceded by
+<a href="#el">EL</a>.
+For example,
+<br/>
+<span class="pre-in-pp">
+ .LEFT
+ .LS 18
+ First line.
+ Second line.\c
+ .EL
+ .RLD 3p
+ Third line.
+</span>
+would raise the third line by 3 points relative to the baseline of
+the second line. Put another way, if the <kbd>.RLD</kbd> in the
+example were 18p, the third line would fall on the same baseline as
+the second.
+</p>
+
+<p>
+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
+<br/>
+<span class="pre-in-pp">
+ .RLD .25i
+</span>
+or
+<span class="pre-in-pp">
+ .RLD 1P+6p
+</span>
+As the mnemonic
+(<span style="text-decoration: underline;">R</span>everse <span style="text-decoration: underline;">L</span>ea<span style="text-decoration: underline;">D</span>)
+suggests, you&#8217;ll most often use RLD with
+<a href="definitions.html#picaspoints">points</a>
+of lead.
+</p>
+
+<div class="rule-short" style="margin-bottom: 24px;"><hr/></div>
+
+<!-- ==================================================================== -->
+
+<h2 id="tabs-intro" class="macro-group">Tabs</h2>
+
+<p>
+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&#8217;s
+notion of tabs. I recommend reading this section carefully in order
+to understand how mom handles tabs.
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span> see the section
+<a href="docprocessing.html#behaviour">Typesetting macros during document processing</a>
+for reassuring information on the use of tabs during
+<a href="docprocessing.html#docprocessing">document processing</a>.
+</p>
+</div>
+
+<h3 id="typesetting-tabs" class="docs">Typesetting tabs</h3>
+
+<p>
+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
+<a href="#multicolumns-intro">multi-column macros</a>,
+typesetting tabs significantly facilitate tabular and columnar work.
+</p>
+
+<p>
+Typesetting tabs are created with the
+<a href="#tab-set">TAB_SET</a>
+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
+<a href="#tab">TAB</a>
+macro.
+</p>
+
+<div class="examples-container">
+<h3 id="typesetting-tabs-tut" class="docs notes">Quickie tutorial on typesetting tabs</h3>
+
+<p style="margin-top: .5em;">
+Say you want to set up three tabs to produce an employee evaluation
+that looks something like this:
+</p>
+
+<div class="box-code" style="padding-bottom: 0;">
+<span id="typsetting-tabs-sample" class="pre-in-pp" style="color: #302419">
+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.
+</span>
+</div>
+
+<p>
+You want the first tab, CRITERION,
+</p>
+<ul style="margin-top: -.5em; margin-bottom: -.5em;">
+<li>to begin at the left margin of the page &ndash; i.e. no indent</li>
+<li>to have a line length of 5 picas</li>
+<li>to be set flush left</li>
+</ul>
+
+<p>
+Tabs must be numbered, and each has to be set up with a separate
+<a href="#tab-set">TAB_SET</a>
+line. Therefore, to set up tab 1, you enter
+<br/>
+<span class="pre-in-pp">
+ .TAB_SET 1 0 5P L
+ | | | |
+ tab #--+ | | +--direction
+ | |
+ indent--+ +--length
+</span>
+You want the second tab, EVALUATION,
+</p>
+<ul style="margin-top: -.5em; margin-bottom: -.5em;">
+<li>to begin 8 picas from the left margin</li>
+<li>to have a length of 9 picas</li>
+<li>to be set centered</li>
+</ul>
+
+<p>
+You set it up like this:
+<br/>
+<span class="pre-in-pp">
+ .TAB_SET 2 8P 9P C
+ | | | |
+ tab #--+ | | +--direction
+ | |
+ indent--+ +--length
+</span>
+You want the third tab, COMMENTS,
+</p>
+<ul style="margin-top: -.5em; margin-bottom: -.5em;">
+<li>to begin 19 picas from the left margin</li>
+<li>to have a length of 17 picas</li>
+<li>to be set flush left, <a href="definitions.html#filled">filled</a></li>
+</ul>
+
+<p>
+The setup looks like this:
+<br/>
+<span class="pre-in-pp">
+ .TAB_SET 3 19P 17P L QUAD
+ | | | | |
+ | | | | +--fill output lines
+ | | | |
+ tab #--+ | | +--direction
+ | |
+ indent--+ +--length
+</span>
+Once the tabs are set up, you can call them in one of two ways:
+</p>
+<ul style="margin-top: -.5em; margin-bottom: -.5em;">
+<li>with <kbd><a href="#tab">.TAB</a></kbd> (passing the tab
+ number as an argument), which breaks the current line,
+ advances one linespace and calls the tab.</li>
+<li>with <kbd><a href="#tn">.TN</a></kbd> (Tab Next), which 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.), or, more
+ conveniently, with the
+ <kbd><a href="#tn">\*[TB+]</a></kbd>
+ <a href="definitions.html#inlines">inline escape</a></li>
+</ul>
+
+<p>
+To exit from tabs and restore your original left margin, line
+length, quad direction and fill mode, use
+<kbd><a href="#tq">.TQ</a></kbd>
+(Tab Quit).
+</p>
+
+<p>
+Here&#8217;s how the input for our sample employee evaluation looks
+(with some introductory parameters):
+</p>
+
+<div class="examples" style="margin-bottom: 0px;">Code:</div>
+<div class="box-code" style="height: 324px; padding-bottom: 18px; overflow: auto;">
+<span class="pre-in-pp">
+.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\*[TB+]
+EVALUATION\*[TB+]
+COMMENTS
+.SP
+.TAB 1
+Service\*[TB+]
+Good\*[TB+]
+Many clients specifically request support from Joe by name.
+.SP
+.TAB 1
+Punctuality\*[TB+]
+Satisfactory\*[TB+]
+Tends to arrive after 8:00am, but often works through lunch hour.
+.SP
+.TAB 1
+Team spirit\*[TB+]
+Needs work\*[TB+]
+Persistently gives higher priority to helping clients
+than respecting organizational hierarchy.
+.TQ
+</span>
+</div>
+
+<p>
+Try setting this up and processing it with
+<br/>
+<span class="pre-in-pp">
+ pdfmom filename.mom &gt; filename.pdf
+</span>
+then previewing the .pdf file. Notice how <kbd>.TN</kbd>
+simply moves over to the next tab, while the combination
+<kbd>.SP/.TAB&nbsp;1</kbd> breaks the line, advances by one extra
+linespace, and calls the first tab.
+</p>
+
+<p>
+Notice, too, how the <kbd>QUAD</kbd> argument passed to tab 3 means
+you don&#8217;t have to worry about the length of
+<a href="definitions.html#inputline">input lines</a>;
+mom
+<a href="definitions.html#filled">fills</a>
+the tab and sets the type flush left.
+</p>
+</div>
+
+<h3 id="string-tabs" class="docs">String tabs (autotabs)</h3>
+
+<p>
+String tabs let you mark off tab positions with
+<a href="definitions.html#inlines">inline escapes</a>
+embedded in
+<a href="definitions.html#inputline">input lines</a>.
+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.
+</p>
+
+<p>
+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
+<a href="goodies.html#silent">SILENT</a>
+macro.)
+</p>
+
+<p>
+Next, you invoke the
+<a href="#st">ST</a>
+macro for every string tab you defined, and optionally pass quad and
+fill information to it. That done, string tabs are called with the
+<a href="#tab">TAB</a>
+macro, just like typesetting tabs.
+</p>
+
+<p>
+In combination with the
+<a href="goodies.html#pad">PAD</a>
+macro and the groff inline escape
+<kbd><a href="inlines.html#inline-horizontal-groff">\h</a></kbd>
+(move horizontally across the page) or mom&#8217;s
+<kbd><a href="inlines.html#inline-horizontal-mom">\*[FWD&nbsp;&lt;distance&gt;]</a></kbd>
+(move forward) inline, string tabs provide tremendous flexibility in
+setting up complex tab structures.
+</p>
+
+<div class="examples-container">
+<h3 id="string-tabs-tut" class="docs notes">Quickie tutorial on string tabs</h3>
+<p style="margin-top: .5em;">
+Say you want to set up tabs for the
+<a href="#typsetting-tabs-sample">employee evaluation form</a>
+used as an example in the
+<a href="#typesetting-tabs-tut">typesetting tabs tutorial</a>.
+This time, though, you want to play around with the point size of
+type, so you can&#8217;t know exactly how long the tabs will be or
+where they should start. All you know is
+</p>
+<ul style="margin-top: -.5em; margin-bottom: -.5em;">
+<li>CRITERION is the longest line in tab 1</li>
+<li>EVALUATION is the longest line in tab 2</li>
+<li>tab 3 should extend to the current right margin</li>
+<li>you want a 1 pica gutter between each tab</li>
+</ul>
+
+<p>
+This is an ideal job for string tabs.
+</p>
+
+<p>
+The first thing you need for string tabs is an
+<a href="definitions.html#inputline">input line</a>
+with tab positions marked on it. Tabs are marked with the
+<a href="definitions.html#inlines">inline escapes</a>
+<a href="#inline-st"><kbd><span class="nobr">\*[ST&lt;n&gt;]</span></kbd></a>
+and
+<a href="#inline-st"><kbd><span class="nobr">\*[ST&lt;n&gt;X]</span></kbd></a>,
+where <kbd>&lt;n&gt;</kbd>
+is the number you want the tab to have. (In this example, we
+enclose the input line with the
+<a href="goodies.html#silent">SILENT</a>
+macro so the line doesn&#8217;t print. We also use the
+<a href="goodies.html#pad">PAD</a>
+macro to permit defining tab 3 as simply &#8220;the amount of space
+remaining on the input line.&#8221;)
+</p>
+
+<p>
+The setup looks like this:
+</p>
+
+<div class="examples" style="margin-bottom: 0px;">Code:</div>
+
+<div class="box-code">
+<span class="pre-in-pp">
+.SILENT
+.PAD "\*[ST1]CRITERION\*[ST1X]\*[FWD 12p]\*[ST2]EVALUATION\*[ST2X]\*[FWD 12p]\*[ST3]#\*[ST3X]"
+.SILENT OFF
+</span>
+</div>
+
+<p>
+The long line after <kbd>.PAD</kbd> looks scary, but
+it isn&#8217;t really. Here&#8217;s what it means when broken down
+into its component parts:
+</p>
+<ul style="margin-bottom: -1em;">
+<li>The longest line in tab 1 is &#8220;CRITERION&#8221;, so we
+ enclose CRITERION with begin/end markers for string tab 1:
+<br/>
+<span class="pre-in-pp" style="margin-bottom: -.25em;">
+ \*[ST1]CRITERION\*[ST1X]
+</span>
+</li>
+<li>We want a 1 pica (12 points) gutter between tab 1 and 2,
+ so we insert 12 points of space with <span class="nobr">\*[FWD&nbsp;12p]:</span>
+<br/>
+<span class="pre-in-pp" style="margin-bottom: -.25em;">
+ \*[FWD 12p]
+</span>
+</li>
+<li>The longest line in tab 2 is &#8220;EVALUATION&#8221;, so
+ we enclose EVALUATION with begin/end markers for string
+ tab 2:
+<span class="pre-in-pp" style="margin-bottom: -.25em;">
+ \*[ST2]EVALUATION\*[ST2X]
+</span>
+</li>
+<li>We want 1 pica (12 points) between tab 2 and 3, so we
+ insert it with:
+<br/>
+<span class="pre-in-pp" style="margin-bottom: -.25em;">
+ \*[FWD 12p]
+</span>
+</li>
+<li>We want tab 3 to be as long as whatever space remains on
+ the current line length, so we enclose the
+ <a href="goodies.html#pad-marker">pad marker</a>
+ (#) with begin/end markers for string tab 3:
+<span class="pre-in-pp">
+ \*[ST3]#\*[ST3X]
+</span>
+ </li>
+</ul>
+
+<p>
+The tabs are now defined, but they require
+<a href="definitions.html#quad">quad direction</a>
+and
+<a href="definitions.html#filled">fill</a>
+information. For each string tab defined above, enter a separate
+<kbd><a href="#st">.ST</a></kbd>
+line, like this:
+<br/>
+<span class="pre-in-pp">
+ .ST 1 L
+ .ST 2 L
+ .ST 3 L QUAD
+ | | |
+ | | +--fill output lines
+ | |
+tab #--+ +--direction
+</span>
+From here on in, you call the tabs with
+<kbd><a href="#tab">.TAB</a></kbd>,
+<kbd><a href="#tn">.TN</a></kbd>,
+or
+<a href="#tn"><kbd><span class="nobr">\*[TB+]</span></kbd></a>
+just like typesetting tabs (see
+<a href="#typesetting-tabs-tut">typesetting tabs tutorial</a>).
+</p>
+
+<p>
+Here&#8217;s the complete setup and entry for the sample employee
+evaluation form utilizing string tabs.
+</p>
+
+<div class="examples" style="margin-bottom: 0px;">Code:</div>
+<div class="box-code" style="height: 324px; padding-bottom: 18px; overflow: scroll;">
+<span class="pre-in-pp">
+.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]\*[FWD 12p]\*[ST2]EVALUATION\*[ST2X]\*[FWD 12p]\*[ST3]#\*[ST3X]"
+.SILENT OFF
+.ST 1 L
+.ST 2 L
+.ST 3 L QUAD
+.TAB 1
+CRITERION\*[TB+]
+EVALUATION\*[TB+]
+COMMENTS
+.SP
+.TAB 1
+Service\*[TB+]
+Good\*[TB+]
+Many clients specifically request support from Joe by name.
+.SP
+.TAB 1
+Punctuality\*[TB+]
+Satisfactory\*[TB+]
+Tends to arrive after 8:00am, but often works through lunch hour.
+.SP
+.TAB 1
+Team spirit\*[TB+]
+Needs work\*[TB+]
+Persistently gives higher priority to helping clients
+than respecting organizational hierarchy.
+.TQ
+</span>
+</div>
+
+<p>
+Try setting this up and processing it with
+<br/>
+<span class="pre-in-pp">
+ pdfmom filename.mom &gt; filename.pdf
+</span>
+and previewing the .pdf file.
+</p>
+
+<p>
+Now, change the point size of the above sample to 12 and preview it
+again. You&#8217;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.
+</p>
+
+<p>
+Now try increasing the gutters to 2 picas
+(<kbd><span class="nobr">\*[FWD&nbsp;24p]</span></kbd> or
+<kbd><span class="nobr">\*[FWD&nbsp;2P]</span></kbd> instead of
+<kbd><span class="nobr">\*[FWD&nbsp;12p]</span></kbd>). Preview the file again,
+and notice how the tab structure remains the same, but the gutters
+are wider.
+</p>
+</div>
+
+<div id="index-tabs" class="macro-list-container">
+<h3 class="macro-list">Tabs macros</h3>
+
+<ul class="macro-list">
+ <li><a href="#tab-set">TAB_SET</a> &ndash; create typesetting tabs</li>
+ <li><a href="#inline-st">\*[ST]...\*[STX]</a> &ndash; inline escapes for marking String Tabs</li>
+ <li><a href="#st">ST</a> &ndash; set String Tabs</li>
+ <li><a href="#tab">TAB</a> &ndash; call tabs</li>
+ <li><a href="#tn">TN</a> &ndash; Tab Next; call next tab in sequence</li>
+ <li><a href="#tn">\*[TB+]</a> &ndash; inline escape to call next tab in sequence</li>
+ <li><a href="#tq">TQ</a> &ndash; Tab Quit</li>
+</ul>
+
+</div>
+
+<!-- -TAB_SET- -->
+
+<div class="macro-id-overline">
+<h3 id="tab-set" class="macro-id">Set up typesetting tabs</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>TAB_SET</b> <kbd class="macro-args">&lt;tab number&gt; &lt;indent&gt; &lt;length&gt; L | R | C | J [ QUAD ]</kbd>
+</div>
+<p class="requires">
+&bull;&nbsp;<kbd style="font-style: normal;">&lt;indent&gt;</kbd> and <kbd style="font-style: normal;">&lt;length&gt;</kbd> require a <a href="definitions.html#unitofmeasure">unit of measure</a>
+</p>
+
+<p style="margin-bottom: -.5em;">
+TAB_SET creates typesetting tabs that later can be called with
+<kbd><a href="#tab">.TAB</a></kbd>.
+Typesetting tabs are numbered, and defined by an indent, a length,
+and a quad direction, hence TAB_SET has four required arguments:
+</p>
+<ul style="margin-top: .5em; margin-bottom: -.5em;">
+<li>a tab number</li>
+<li>an indent (measured from the left margin of the page,
+ or, if you&#8217;re already in a tab, from the left margin of the tab)</li>
+<li>a length</li>
+<li>a direction</li>
+</ul>
+
+<p>
+To set up a centred tab 6 picas long and 9 points from the left
+margin, you&#8217;d enter
+<br/>
+<span class="pre-in-pp">
+ .TAB_SET 1 9p 6P C
+</span>
+The tab number in the above (&#8221;1&#8221;) is simply an
+identifier. It could have been 4, or 17, or 296. There&#8217;s no
+need to set up tabs in numerical sequence.
+</p>
+
+<p>
+By default, tabs are in
+<a href="definitions.html#filled">nofill</a>
+mode, meaning you can enter text in tabs on a line-for-line basis
+without having to use the
+<a href="#br">BR</a>
+macro. If you want a tab to be
+<a href="definitions.html#filled">filled</a>,
+pass the optional argument <kbd>QUAD</kbd>,
+which will make the tab behave as if you&#8217;d entered
+<kbd class="bold">.QUAD&nbsp;L&nbsp;|&nbsp;R&nbsp;|&nbsp;C</kbd>.
+</p>
+
+<p>
+For
+<a href="definitions.html#just">justified</a>
+tabs, simply pass the argument J (without the QUAD argument), like
+this:
+<br/>
+<span class="pre-in-pp">
+ .TAB 1 9p 6P J
+</span>
+Once tabs are set, they can be called at any time with the
+<a href="#tab">TAB&nbsp;&lt;n&gt;</a>
+macro, where &lt;n&gt; is the number of the desired tab.
+</p>
+
+<p>
+You can set up any number of typesetting tabs. However, be aware
+that
+<a href="#string-tabs">string tabs</a>
+are also called with TAB&nbsp;&lt;n&gt;, so be careful that you
+don&#8217;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.
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span> If you use TAB_SET while
+you&#8217;re currently inside a tab, the indent argument is the
+distance from the tab&#8217;s left margin, not the left margin of
+the page. Therefore, you should exit tabs (with
+<kbd><a href="#tq">.TQ</a></kbd>)
+before creating new tabs (unless, of course, you want to set up a
+tab structure within the confines of an existing tab).
+</p>
+</div>
+
+<div class="box-important">
+<p class="tip">
+<span class="important">IMPORTANT:</span> Turn all indents off (see
+<a href="#indents">Indents</a>)
+before setting up tabs with TAB_SET, or mom may get confused.
+</p>
+</div>
+
+<!-- -INLINE_ST- -->
+
+<div class="macro-id-overline">
+<h3 id="inline-st" class="macro-id">Mark positions of string tabs</h3>
+</div>
+
+<div class="box-macro-args">
+Inlines: <kbd class="macro-args">\*[ST&lt;number&gt;]...\*[ST&lt;number&gt;X]</kbd>
+</div>
+
+<p class="requires">
+The <a href="definitions.html#quad">quad</a>
+direction must be
+<span style="font-style: normal">LEFT</span>
+or
+<span style="font-style: normal">JUSTIFY</span>
+(see
+<a href="#quad"><span style="font-style: normal">QUAD</span></a>
+and
+<a href="#justify"><span style="font-style: normal">JUSTIFY</span></a>)
+or the
+<a href="definitions.html#filled">no-fill mode</a>
+set to
+<a href="#lrc"><span style="font-style: normal">LEFT</span></a>
+in order for these inlines to function properly. Please see
+<a href="#important1"><span style="font-style: normal">IMPORTANT</span></a>,
+below.
+</p>
+
+<p>
+String tabs need to be marked off with
+<a href="definitions.html#inlines">inline escapes</a>
+before being set up with the
+<a href="#st">ST</a>
+macro. Any input line may contain string tab markers. <kbd
+class="bold">&lt;number&gt;</kbd>, above, means the numeric
+identifier of the tab. The following shows a sample input line with
+string tab markers.
+<br/>
+<span class="pre-in-pp">
+ \*[ST1]Now is the time\*[ST1X] for all \*[ST2]good men\*ST2X] to come to the aid of the party.
+</span>
+String tab 1 begins at the start of the line and ends after the word
+&#8220;time&#8221;. String tab 2 starts at &#8220;good&#8221; and
+ends after &#8220;men&#8221;. Inline escapes (e.g. font or point
+size changes, or horizontal movements, including
+<a href="goodies.html#pad">padding</a>)
+are taken into account when mom determines the position and length
+of string tabs.
+</p>
+
+<p>
+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.
+</p>
+
+<p>
+Once string tabs have been marked in input lines, they have to be
+&#8220;set&#8221; with
+<kbd><a href="#st">.ST</a></kbd>,
+after which they may be called, by number, with
+<kbd><a href="#tab">.TAB</a></kbd>.
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span> 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
+<a href="goodies.html#silent">SILENT</a>
+macro.
+</p>
+</div>
+
+<div class="box-important">
+<p class="tip-top">
+<span id="important1" class="important">IMPORTANT:</span>
+Owing to the way groff processes
+<a href="definitions.html#inputline">input lines</a>
+and turns them into
+<a href="definitions.html#outputline">output lines</a>,
+it is not possible for mom to &#8220;guess&#8221; the correct
+starting position of string tabs marked off in lines that are
+centered or set flush right.
+</p>
+
+<p>
+Equally, she cannot guess the starting position if a line is fully
+justified and broken with
+<a href="#spread">SPREAD</a>.
+</p>
+
+<p>
+In other words, in order to use string tabs,
+<a href="#lrc">LEFT</a>
+must be active, or, if
+<a href="#quad">QUAD&nbsp;LEFT</a>
+or
+<a href="#justify">JUSTIFY</a>
+are active, the line on which the string tabs are marked must be
+broken &#8220;manually&#8221; with
+<kbd><a href="#br">.BR</a></kbd>
+(but not
+<kbd><a href="#spread">.SPREAD</a></kbd>).
+</p>
+
+<p class="tip-bottom">
+To circumvent this behaviour, I recommend using the
+<a href="goodies.html#pad">PAD</a>
+to 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,
+<br/>
+<span class="pre-in-pp">
+ .CENTER
+ \*[ST1]A line of text\*[ST1X]\c
+ .EL
+ .ST 1
+ .TAB 1
+ .PT_SIZE 24
+ .ALD 3p
+ \*[RULE]
+ .RLD 3p
+ .TQ
+</span>
+you should do:
+<br/>
+<span class="pre-in-pp">
+ .QUAD CENTER
+ .PAD "#\*[ST1]A line of text\*[ST1X]#"
+ .EL
+ .ST 1
+ .TAB 1
+ .PT_SIZE 24
+ .ALD 3p
+ \*[RULE] \" Note that you can&#8217;t use \*[UP ] or \*[DOWN] with \*[RULE]
+ .RLD 3p
+ .TQ
+</span>
+</p>
+</div>
+
+<!-- -ST- -->
+
+<div class="macro-id-overline">
+<h3 id="st" class="macro-id">Set string tabs</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>ST</b> <kbd class="macro-args">&lt;tab number&gt; L | R | C | J [ QUAD ]</kbd>
+</div>
+
+<p>
+After string tabs have been marked off on an input line (see
+<a href="#inline-st"><kbd><span class="nobr">\*[ST]...\*[STX]</span></kbd></a>),
+you need to &#8220;set&#8221; them by giving them a direction and,
+optionally, the <kbd>QUAD</kbd> argument. In this respect, ST is
+like
+<a href="#tab-set">TAB_SET</a>
+except that you don&#8217;t have to give ST an indent or a
+line length (that&#8217;s already taken care of, inline, by
+<kbd><span class="nobr">\*[ST]...\*[STX]</span></kbd>). If you want string tab 1
+to be left, enter
+<br/>
+<span class="pre-in-pp">
+ .ST 1 L
+</span>
+If you want it to be left and
+<a href="definitions.html#filled">filled</a>, enter
+<br/>
+<span class="pre-in-pp">
+ .ST 1 L QUAD
+</span>
+If you want it to be justified, enter
+<br/>
+<span class="pre-in-pp">
+ .ST 1 J
+</span>
+See the
+<a href="#string-tabs-tut">Quickie tutorial on string tabs</a>
+for a full explanation of setting up string tabs.
+</p>
+
+<!-- -TAB- -->
+
+<div class="macro-id-overline">
+<h3 id="tab" class="macro-id">Call tabs</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>TAB</b> <kbd class="macro-args">&lt;tab number&gt;</kbd>
+</div>
+<p class="alias">
+<i>Alias:</i> <b>TB</b>
+</p>
+
+<p>
+After tabs have been defined (either with
+<a href="#tab-set">TAB_SET</a>
+or
+<a href="#st">ST</a>),
+TAB moves to whatever tab number you pass it as an argument. For
+example,
+<br/>
+<span class="pre-in-pp">
+ .TAB 3
+</span>
+moves you to tab 3.
+</p>
+
+<div id="note-tn" class="box-tip">
+<p class="tip-top">
+<span class="note">Note:</span> TAB breaks the line preceding it and
+advances 1 linespace. Hence,
+<br/>
+<span class="pre-in-pp">
+ .TAB 1
+ A line of text in tab 1.
+ .TAB 2
+ A line of text in tab 2.
+</span>
+produces, on output
+<br/>
+<span class="pre-in-pp">
+ A line of text in tab 1.
+ A line of text in tab 2.
+</span>
+If you want the tabs to line up, use
+<a href="#tn">TN</a>
+(Tab Next)
+or, more conveniently, the inline escape
+<a href="#tn"><span class="nobr">\*[TB+]</span></a>:
+<br/>
+<span class="pre-in-pp">
+ .TAB 1
+ A line of text in tab 1.\*[TB+]
+ A line of text in tab 2.
+</span>
+which produces
+<br/>
+<span class="pre-in-pp">
+ A line of text in tab 1. A line of text in tab 2.
+</span>
+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
+<a href="#multicolumns-intro">multi-column</a> macros.
+</p>
+
+<p id="tab-add-note" class="tip-bottom">
+<span class="additional-note">Additional note:</span> 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.
+</p>
+</div>
+
+<!-- -TN- -->
+
+<div class="macro-id-overline">
+<h3 id="tn" class="macro-id">Tab Next</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>TN</b>
+<br/>Inline escape: <b>\*[TB+]</b>
+</div>
+
+<p>
+TN moves over to the next tab in numeric sequence (tab n+1) without
+advancing on the page. See the
+<a href="#note-tn">NOTE</a>
+in the description of the TAB macro for an example of how TN works.
+</p>
+
+<p>
+In tabs that aren&#8217;t given the <kbd class="normal">QUAD</kbd>
+argument when they&#8217;re set up with
+<a href="#tab-set" class="normal">TAB&nbsp;SET</a>
+or
+<a href="#st" class="normal">ST</a>,
+you must terminate the line preceding <kbd class="normal">.TN</kbd>
+with the <kbd class="normal">\c</kbd> inline escape. Conversely,
+if you did give a <kbd>QUAD</kbd> argument to TAB_SET or ST, the
+<kbd>\c</kbd> must not be used.
+</p>
+
+<p>
+If you find remembering whether to put in the
+<kbd class="normal">\c</kbd> bothersome, you may prefer to use the
+<a href="definitions.html#inlines" class="normal">inline escape</a>
+alternative to
+<kbd class="normal">.TN</kbd>,
+<a href="inlines.html#tb-plus-mom"><kbd class="normal"><span class="nobr">\*[TB+]</span></kbd></a>,
+which works consistently regardless of the fill mode.
+</p>
+
+<div id="tn-note" class="box-tip">
+<p class="tip">
+<span class="note">Note:</span> You must put text in the
+<a href="definitions.html#inputline">input line</a>
+immediately after TN. Stacking of TN&#8217;s is not
+allowed. In other words, you cannot do
+<br/>
+<span class="pre-in-pp">
+ .TAB 1
+ Some text\c
+ .TN
+ Some more text\c
+ .TN
+ .TN
+ Yet more text
+</span>
+The above example, assuming tabs numbered from 1 to 4, should be entered
+<br/>
+<span class="pre-in-pp">
+ .TAB 1
+ Some text\c
+ .TN
+ Some more text\c
+ .TN
+ \&amp;\c
+ .TN
+ Yet more text
+</span>
+
+<kbd>\&amp;</kbd> is a zero-width, non-printing character that groff
+recognizes as valid input, hence meets the requirement for input
+text following <kbd>.TN</kbd>.
+</p>
+</div>
+
+<!-- -TQ- -->
+
+<div class="macro-id-overline">
+<h3 id="tq" class="macro-id">Tab Quit</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>TQ</b>
+</div>
+
+<p>
+TQ takes you out of whatever tab you were in, advances 1 linespace,
+and restores the left margin, line length, quad direction and
+<a href="definitions.html#filled">fill mode</a>
+that were in effect prior to invoking any tabs.
+</p>
+
+<div class="rule-short" style="margin-bottom: 24px;"><hr/></div>
+
+<!-- ==================================================================== -->
+
+<h2 id="multicolumns-intro" class="macro-group">Multiple columns</h2>
+
+<p>
+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
+<a href="definitions.html#baseline">baseline</a>
+of the first line in the previous tab. To demonstrate:
+<br/>
+<span class="pre-in-pp">
+ .TAB 1
+ Carrots
+ Potatoes
+ Broccoli
+ .TAB 2
+ $1.99/5 lbs
+ $0.25/lb
+ $0.99/bunch
+</span>
+produces, on output
+<br/>
+<span class="pre-in-pp">
+ Carrots
+ Potatoes
+ Broccoli
+ $1.99/5 lbs
+ $0.25/lb
+ $0.99/bunch
+</span>
+The multi-column macros allow you to set tabs in columnar fashion,
+rather than line by line. When you invoke multi-column mode (with
+<kbd><a href="#mco">.MCO</a></kbd> &ndash;
+<span style="text-decoration: underline">M</span>ulti-<span style="text-decoration: underline">C</span>olumn <span style="text-decoration: underline">O</span>n),
+mom saves the position of the current baseline.
+<kbd><a href="#mcr">.MCR</a></kbd>
+(<span style="text-decoration: underline">M</span>ulti-<span style="text-decoration: underline">C</span>olumn <span style="text-decoration: underline">R</span>eturn)
+at any point while multi-columns are on returns you to the saved
+position. Exiting multi-columns
+(<kbd><a href="#mcx">.MCX</a></kbd> &ndash;
+<span style="text-decoration: underline">M</span>ulti-<span style="text-decoration: underline">C</span>olumn e<span style="text-decoration: underline">X</span>it)
+quits the current tab (if you&#8217;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.)
+</p>
+
+<p>
+Using our example above, but setting it in multi-column mode,
+<br/>
+<span class="pre-in-pp">
+ .MCO
+ .TAB 1
+ Carrots
+ Potatoes
+ Broccoli
+ .MCR
+ .TAB 2
+ $1.99/5 lbs
+ $0.25/lb
+ $0.99/bunch
+ .MCX
+</span>
+produces
+<br/>
+<span class="pre-in-pp">
+ Carrots $1.99/5 lbs
+ Potatoes $0.25/lb
+ Broccoli $0.99/bunch
+</span>
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span> Do not confuse MCO with
+the
+<a href="docprocessing.html#columns">COLUMNS</a>
+macro in the
+<a href="docprocessing.html#docprocessing">document processing macros</a>.
+</p>
+</div>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Additional Note:</span>
+Do not use multi-columns with
+<a href="docprocessing.html#slide">DOCTYPE&nbsp;SLIDES</a>
+because MCX uses the lowest line on the page to determine column
+depth. Owing to the fact that both headers and footers are printed
+prior to slides receiving text, MCX will always go to the
+footer position. If you need functionality similar to MCO/MCX, use
+the groff requests <kbd>.mk</kbd> and <kbd>.rt</kbd>. See
+<kbd>info groff mk</kbd>.
+</p>
+</div>
+
+<div id="index-multicolumns" class="macro-list-container">
+<h3 class="macro-list">Multi-columns macros</h3>
+
+<ul class="macro-list">
+ <li><a href="#mco">MCO</a> &ndash; begin multi-column setting</li>
+ <li><a href="#mcr">MCR</a> &ndash; return to top of column</li>
+ <li><a href="#mcx">MCX</a> &ndash; exit multi-columns</li>
+</ul>
+</div>
+
+<!-- -MCO- -->
+
+<div class="macro-id-overline">
+<h3 id="mco" class="macro-id">Begin multi-column setting</h3>
+</div>
+
+<div class="box-macro-args">
+ Macro: <b>MCO</b>
+</div>
+
+<p>
+MCO (<span style="text-decoration: underline;">M</span>ulti-<span style="text-decoration: underline;">C</span>olumn <span style="text-decoration: underline;">O</span>n) is the macro you use to begin multi-column
+setting. It marks the current
+<a href="definitions.html#baseline">baseline</a>
+as the top of your columns, for use later with
+<a href="#mcr">MCR</a>.
+See the
+<a href="#multicolumns-intro">introduction to columns</a>
+for an explanation of multi-columns and some sample
+input.
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span> Do not confuse MCO with
+the
+<a href="docprocessing.html#columns">COLUMNS</a>
+macro in the
+<a href="docprocessing.html#docprocessing">document processing macros</a>.
+</p>
+</div>
+
+<!-- -MCR- -->
+
+<div class="macro-id-overline">
+<h3 id="mcr" class="macro-id">Return to top of column</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>MCR</b>
+</div>
+
+<p>
+Once you&#8217;ve turned multi-columns on (with
+<kbd><a href="#mco">.MCO</a></kbd>),
+<kbd>.MCR</kbd>, at any time, returns you to the top of
+your columns.
+</p>
+
+<!-- -MCX- -->
+
+<div class="macro-id-overline">
+<h3 id="mcx" class="macro-id">Exit multi-columns</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>MCX</b> <kbd class="macro-args">[ &lt;distance to advance below longest column&gt; ]</kbd>
+</div>
+<p class="requires">
+&bull;&nbsp;Optional argument requires a <a href="definitions.html#unitofmeasure">unit of measure</a>
+</p>
+
+<p>
+MCX takes you out of any tab you were in (by silently invoking
+<kbd><a href="#tq">.TQ</a></kbd>)
+and advances to the bottom of the longest column.
+</p>
+
+<p>
+Without an argument, MCX advances 1 linespace below the longest
+column. Linespace, in this instance, is the
+<a href="definitions.html#leading">leading</a>
+in effect at the moment MCX is invoked.
+</p>
+
+<p>
+If you pass the <kbd>&lt;distance&gt;</kbd> 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&#8217;d enter
+<br/>
+<span class="pre-in-pp">
+ .MCX 6p
+</span>
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span> If you wish to advance a precise
+distance below the
+<a href="definitions.html#baseline">baseline</a>
+of the longest column, use MCX with an argument of 0 (zero; no unit
+of measure required) in conjunction with the
+<a href="#ald">ALD</a>
+macro, like this:
+<br/>
+<span class="pre-in-pp" style="margin-bottom: -12px;">
+ .MCX 0
+ .ALD 24p
+</span>
+</p>
+</div>
+
+<p>
+The above advances to precisely 24 points below the baseline
+of the longest column.
+</p>
+
+<div class="rule-short" style="margin-bottom: 24px;"><hr/></div>
+
+<!-- ==================================================================== -->
+
+<h2 id="indents-intro" class="macro-group">Indents</h2>
+
+<p>
+With mom&#8217;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 &#8220;hanging&#8221; left indents (the reverse of a temporary
+indent; the first line isn&#8217;t indented, subsequent lines are).
+</p>
+
+<h3 id="indents-handling" class="docs">How mom handles indents</h3>
+
+<p>
+Mom provides five kinds of indents: left, right, both, temporary,
+and hanging. Each is invoked by its own name:
+</p>
+<ul style="margin-top: -.5em; margin-bottom: -.5em;">
+<li>IL &ndash; Indent Left</li>
+<li>IR &ndash; Indent Right</li>
+<li>IB &ndash; Indent Both</li>
+<li>HI &ndash; Hanging Indent</li>
+<li>TI &ndash; Temporary Indent</li>
+</ul>
+
+<p>
+In addition, there are four macros to control exiting from
+indents:
+</p>
+<ul style="margin-top: -.5em; margin-bottom: -.5em;">
+<li>IQ &ndash; quit all active indents</li>
+<li>ILX &ndash; exit indent style left</li>
+<li>IRX &ndash; exit indent style right</li>
+<li>IBX &ndash; exit indent style both</li>
+</ul>
+
+<p>
+This section deals exclusively with IL, IR, and IB. For an
+explanation of hanging and temporary indents&mdash;how they work and
+how to use them&mdash;see
+<a href="#hi">Hanging indents</a>
+and
+<a href="#ti">Temporary indents</a>.
+</p>
+
+<p>
+The first time you invoke any of mom&#8217;s indents, you must
+supply a measure. For example,
+<br/>
+<span class="pre-in-pp">
+ .IL 2P
+</span>
+indents text 2 picas from the left margin (or current tab indent).
+</p>
+
+<p>
+When you want to exit the above indent, use either
+<br/>
+<span class="pre-in-pp" style="margin-bottom: -1em;">
+ .IQ
+</span>
+or
+<span class="pre-in-pp" style="margin-top: -.5em;">
+ .ILX
+</span>
+The next time you want the same indent, invoke it without the
+argument, like this:
+<br/>
+<span class="pre-in-pp">
+ .IL
+</span>
+As you can see, once you&#8217;ve supplied a measure to an indent
+macro, mom stores the value, obviating the need to repeat it on
+subsequent invocations. And mom doesn&#8217;t just store the
+measure&mdash;she hangs on to it tenaciously. Arguments passed to
+IL, IR, and IB are additive. Consider the following:
+<br/>
+<span class="pre-in-pp">
+ .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...
+ ...
+ ...
+</span>
+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&#8217;d expect, set to the full measure.
+The third block of text&mdash;the one to pay attention to&mdash;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.
+</p>
+
+<p>
+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 <kbd>.IR</kbd> without an argument.
+</p>
+
+<p>
+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).
+<br/>
+<span class="pre-in-pp">
+ .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.
+</span>
+Sometimes, you may want to clear out the stored indent
+values&mdash;let mom start indenting with a clean slate, as it
+were. Giving the optional argument <kbd>CLEAR</kbd> to any of the
+&#8220;indent quit&#8221; macros resets them to zero.
+</p>
+<ul style="margin-top: -.5em; margin-bottom: -.5em;">
+ <li>IQ CLEAR &ndash; quit and clear all indents</li>
+ <li>ILX CLEAR &ndash; quit and clear indent style left</li>
+ <li>IRX CLEAR &ndash; quit and clear indent style right</li>
+ <li>IBX CLEAR &ndash; quit and clear indent style both</li>
+</ul>
+
+<p>
+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.
+<br/>
+<span class="pre-in-pp">
+ .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
+</span>
+If, at <kbd>.IRX</kbd>, you wanted the text afterwards to have no
+indents (either left or right), you would enter <kbd>.IQ</kbd>,
+which exits all indent styles at once.
+</p>
+
+<p>
+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&#8217;s better to use tabs, or actually change the left margin
+or the line length. Mom&#8217;s indenting macros are flexible and
+powerful, but easy to get tangled up in.
+</p>
+
+<div class="box-tip">
+<p class="tip">
+<span class="note">Note:</span> see the section
+<a href="docprocessing.html#behaviour">Typesetting macros during document processing</a>
+for information and advice on using indents with the
+<a href="docprocessing.html#docprocessing">document processing macros</a>.
+</p>
+</div>
+
+<div id="index-indents" class="macro-list-container">
+<h3 class="macro-list">Indents macros</h3>
+
+<ul class="macro-list">
+ <li><a href="#il">IL</a> &ndash; Indent left</li>
+ <li><a href="#ir">IR</a> &ndash; Indent right</li>
+ <li><a href="#ib">IB</a> &ndash; Indent both</li>
+ <li><a href="#ti">TI</a> &ndash; Temporary indent, left</li>
+ <li><a href="#hi">HI</a> &ndash; Hanging Indent
+ <ul style="margin-left: -.5em; list-style-type: disc;">
+ <li><a href="#num-lists">Recipe: a numbered list using hanging indents</a></li>
+ </ul></li>
+ <li><a href="#iq">IQ</a> &ndash; Quit indents, all</li>
+ <li><a href="#iq">ILX</a> &ndash; Exit indent style left</li>
+ <li><a href="#iq">IRX</a> &ndash; Exit indent style right</li>
+ <li><a href="#iq">IBX</a> &ndash; Exit indent style both</li>
+</ul>
+</div>
+
+<!-- -IL- -->
+
+<div class="macro-id-overline">
+<h3 id="il" class="macro-id">Indent left</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>IL</b> <kbd class="macro-args">[ &lt;measure&gt; ]</kbd>
+</div>
+<p class="requires">
+&bull;&nbsp;The optional argument requires a <a href="definitions.html#unitofmeasure">unit of measure</a>
+</p>
+
+<p>
+IL indents text from the left margin of the page, or if you&#8217;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.
+</p>
+
+<p>
+The first time you invoke <kbd>.IL</kbd>, 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
+<kbd><a href="inlines.html#inline-stringwidth-groff">\w</a></kbd>
+<a href="definitions.html#inlines">inline escape</a>
+may be used to specify a text-dependent measure, in which case no
+unit of measure is required. For example,
+<br/>
+<span class="pre-in-pp">
+ .IL \w'margarine'
+</span>
+indents text by the width of the word &#8220;margarine&#8221;.
+</p>
+
+<p>
+With no argument, IL after an ILX indents by its last active value. See the
+<a href="#indents-handling">explanation of how mom handles indents</a>
+for more details.
+</p>
+
+<div class="box-tip">
+<p class="tip-top">
+<span class="note">Note:</span> Calling a tab (with
+<kbd><a href="#tab">.TAB&nbsp;&lt;n&gt;</a></kbd>)
+automatically cancels any active indents.
+</p>
+
+<p class="tip-bottom">
+<span class="additional-note">Additional note:</span> Invoking IL
+automatically turns off IB.
+</p>
+</div>
+
+<!-- -IR- -->
+
+<div class="macro-id-overline">
+<h3 id="ir" class="macro-id">Indent right</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>IR</b> <kbd class="macro-args">[ &lt;measure&gt; ]</kbd>
+</div>
+<p class="requires">
+&bull;&nbsp;The optional argument requires a <a href="definitions.html#unitofmeasure">unit of measure</a>
+</p>
+
+<p>
+IR indents text from the right margin of the page, or if
+you&#8217;re in a tab, from the end of the tab.
+</p>
+
+<p>
+The first time you invoke <kbd>.IR</kbd>, 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
+<kbd><a href="inlines.html#inline-stringwidth-groff">\w</a></kbd>
+<a href="definitions.html#inlines">inline escape</a>
+may be used to specify a text-dependent measure, in which case no
+unit of measure is required. For example, <br/>
+<span class="pre-in-pp">
+ .IR \w'jello'
+</span>
+indents text by the width of the word &#8220;jello&#8221;.
+</p>
+
+<p>
+With no argument, IR after an IRX indents by its last active value. See the
+<a href="#indents-handling">explanation of how mom handles indents</a>
+for more details.
+</p>
+
+<div class="box-tip">
+<p class="tip-top">
+<span class="note">Note:</span> Calling a tab (with
+<kbd><a href="#tab">.TAB&nbsp;&lt;n&gt;</a></kbd>)
+automatically cancels any active indents.
+</p>
+
+<p class="tip-bottom">
+<span class="additional-note">Additional note:</span> Invoking IR
+automatically turns off IB.
+</p>
+</div>
+
+<!-- -IB- -->
+
+<div class="macro-id-overline">
+<h3 id="ib" class="macro-id">Indent both</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>IB</b> <kbd class="macro-args">[ &lt;indent-1&gt; &lt;indent-2&gt; ]</kbd>
+</div>
+<p class="requires">
+&bull;&nbsp;The optional arguments require a <a href="definitions.html#unitofmeasure">unit of measure</a>
+</p>
+
+<p>
+IB allows you to set or invoke a left and a right indent at the same
+time.
+</p>
+
+<p>
+If you supply only an <kbd>indent-1</kbd> argument, the argument is
+the amount to indent from both the left and right margins. If you
+give both <kbd>indent-1</kbd> and <kbd>indent-2</kbd>, the first is
+the indent from the left margin and the second is the indent from
+the right margin.
+</p>
+
+<p>
+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&#8217;ll save
+yourself a lot of grief.)
+</p>
+
+<p>
+A minus sign may be prepended to the arguments to subtract from
+their current values. The
+<a href="inlines.html#inline-stringwidth-groff"><kbd>\w</kbd></a>
+<a href="definitions.html#inlines">inline escape</a>
+may be used to specify text-dependent measures, in which case no
+unit of measure is required. For example,
+<br/>
+<span class="pre-in-pp">
+ .IB \w&#8217;margarine&#8217; \w'jello'
+</span>
+left indents text by the width of the word &#8220;margarine&#8221;
+and right indents by the width of &#8220;jello&#8221;.
+</p>
+
+<p>
+Like IL and IR, IB with no argument after an IBX indents by its
+last active values. See the
+<a href="#indents-handling">explanation of how mom handles indents</a>
+for more details.
+</p>
+
+<div class="box-tip">
+<p class="tip-top">
+<span class="note">Note:</span> Calling a tab (with
+<a href="#tab"><kbd>.TAB&nbsp;&lt;n&gt;</kbd></a>)
+automatically cancels any active indents.
+</p>
+
+<p class="tip-bottom">
+<span class="additional-note">Additional note:</span> Invoking IB
+automatically turns off IL and IR.
+</p>
+</div>
+
+<!-- -TI- -->
+
+<div class="macro-id-overline">
+<h3 id="ti" class="macro-id">Temporary (left) indent</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>TI</b> <kbd class="macro-args">[ &lt;measure&gt; ]</kbd>
+</div>
+<p class="requires">
+&bull;&nbsp;The optional argument requires a <a href="definitions.html#unitofmeasure">unit of measure</a>
+</p>
+
+<p>
+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&#8217;s
+<a href="docelement.html#pp">PP</a>
+macro, for example, uses a temporary indent.)
+</p>
+
+<p>
+The first time you invoke <kbd>.TI</kbd>, you must give
+it a measure. If you want to indent the first line of a paragraph
+by, say, 2
+<a href="definitions.html#em">ems</a>,
+do
+<br/>
+<span class="pre-in-pp">
+ .TI 2m
+</span>
+Subsequent invocations of TI do not require you to supply a measure;
+mom keeps track of the last measure you gave it.
+</p>
+
+<p>
+Because temporary indents are temporary, there&#8217;s no need to
+turn them off.
+</p>
+
+<div class="box-important">
+<p class="tip">
+<span class="important">IMPORTANT:</span> Unlike IL, IR, and IB,
+measures given to TI are <i>not</i> additive. In the following
+example, the second <kbd>.TI&nbsp;2P</kbd> is exactly 2 picas.
+<br/>
+<span class="pre-in-pp" style="margin-bottom: -18px;">
+ .TI 1P
+ The beginning of a paragraph...
+ .TI 2P
+ The beginning of another paragraph...
+</span>
+</p>
+</div>
+
+<!-- -HI- -->
+
+<div class="macro-id-overline">
+<h3 id="hi" class="macro-id">Hanging indent</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>HI</b> <kbd class="macro-args">[ &lt;measure&gt; ]</kbd>
+</div>
+<p class="requires">
+&bull;&nbsp;The optional argument requires a <a href="definitions.html#unitofmeasure">unit of measure</a>
+</p>
+
+<p>
+A hanging indent looks like this:
+<br/>
+<span class="pre-in-pp">
+ 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...
+</span>
+The first line of text &#8220;hangs&#8221; outside the left margin.
+</p>
+
+<p>
+In order to use hanging indents, you must first have a left indent
+active (set with either
+<kbd><a href="#il">.IL</a></kbd>
+or
+<kbd><a href="#ib">.IB</a></kbd>).
+Mom will not hang text outside the left margin set with
+<kbd><a href="#l-margin">.L_MARGIN</a></kbd>
+or outside the left margin of a tab.
+</p>
+
+<p>
+The first time you invoke <kbd>.HI</kbd>, you must give
+it a measure. If you want the first line of a paragraph to hang by,
+say, 1 pica, do
+<br/>
+<span class="pre-in-pp">
+ .IL 1P
+ .HI 1P
+</span>
+Subsequent invocations of HI do not require you to supply a measure;
+mom keeps track of the last measure you gave it.
+</p>
+
+<p>
+Generally speaking, you should invoke HI immediately prior to the
+line you want hung (i.e. without any intervening
+<a href="definitions.html#controllines">control lines</a>).
+And because hanging indents affect only one line, there&#8217;s no
+need to turn them off.
+</p>
+
+<div class="box-important">
+<p class="tip">
+<span class="important">IMPORTANT:</span> 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.
+</p>
+</div>
+
+<h4 id="num-lists" class="macro-id">Recipe: A numbered list using hanging indents</h4>
+
+<div class="box-tip" style="margin-top: -.5em; margin-bottom: -.5em;">
+<p class="tip">
+<span class="note">Note:</span> mom has macros for setting lists (see
+<a href="docelement.html#list-intro">Nested lists</a>).
+This recipe exists to demonstrate the use of hanging indents only.
+</p>
+</div>
+
+<p style="margin-top: 1.5em;">
+<span class="pre-in-pp">
+ .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.'
+ .HI \w'\0\0.'
+ 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&#8217;s word on the subject except
+ Mr. Adams&#8217;.
+ .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&#8217;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?
+</span>
+First, we invoke a left indent with a measure equal to the width of
+2
+<a href="definitions.html#figurespace">figures spaces</a>
+plus a period (using the
+<a href="inlines.html#inline-stringwidth-groff"><kbd>\w</kbd></a>
+inline escape). At this point, the left indent is active; text
+afterwards 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 &#8220;out to the left
+margin&#8221;). Because we begin the first line with a number,
+a period, and a figure space, the actual text (&#8220;The most
+important point...&#8221;) starts at exactly the same spot as the
+indented lines that follow.
+</p>
+
+<p>
+Notice that subsequent invocations of <kbd>.HI</kbd> don&#8217;t
+require a measure to be given.
+</p>
+
+<p>
+Paste the example above into a file and preview it with
+<br/>
+<span class="pre-in-pp">
+ pdfmom filename.mom &gt; filename.pdf
+</span>
+to see hanging indents in action.
+</p>
+
+<!-- -IX- -->
+
+<div class="macro-id-overline">
+<h3 id="iq" class="macro-id">Quitting indents</h3>
+</div>
+
+<div class="box-macro-args">
+Macro: <b>IQ</b> <kbd class="macro-args">[ CLEAR ]</kbd> (quit any/all indents &mdash; see IMPORTANT NOTE)
+</div>
+<br/>
+
+Macro: <b>ILX</b> <kbd class="macro-args">[ CLEAR ]</kbd> (exit Indent Left)
+<br/>
+
+Macro: <b>IRX</b> <kbd class="macro-args">[ CLEAR ]</kbd> (exit Indent Right)
+<br/>
+
+Macro: <b>IBX</b> <kbd class="macro-args">[ CLEAR ]</kbd> (exit Indent Both)
+
+<div class="box-important">
+<p class="tip-top">
+<span class="important">IMPORTANT NOTE:</span> 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.
+</p>
+
+<p class="tip-bottom">
+As a consequence of this change, ILX, IRX and IBX may now also be
+invoked as ILQ, IRQ and IBQ. Both forms are acceptable.
+</p>
+</div>
+
+<p>
+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.
+</p>
+
+<p>
+If you pass these macros the optional argument <kbd>CLEAR</kbd>,
+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.
+</p>
+
+<p>
+<kbd>.IQ&nbsp;CLEAR</kbd>, as you&#8217;d suspect,
+quits and clears the values for all indent styles at once.
+</p>
+
+<div class="rule-long"><hr/></div>
+
+<!-- Navigation links -->
+<table style="width: 100%; margin-top: 12px;">
+<tr>
+ <td style="width: 33%;"><a href="toc.html">Back to Table of Contents</a></td>
+ <td style="width: 33%; text-align: center;"><a href="#top">Top</a></td>
+ <td style="width: 33%; text-align: right;"><a href="goodies.html#top">Next: Goodies</a></td>
+</tr>
+</table>
+
+</div>
+
+<div class="bottom-spacer"><br/></div>
+
+</body>
+</html>
diff --git a/contrib/mom/momdoc/using.html b/contrib/mom/momdoc/using.html
new file mode 100644
index 0000000..c93e385
--- /dev/null
+++ b/contrib/mom/momdoc/using.html
@@ -0,0 +1,319 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+This file is part of groff, the GNU roff type-setting system.
+
+Copyright (C) 2004-2020 Free Software Foundation, Inc.
+Written by Peter Schaffter (peter@schaffter.ca).
+
+Permission is granted to copy, distribute and/or modify this document
+under the terms of the GNU Free Documentation License, Version 1.3 or
+any later version published by the Free Software Foundation; with no
+Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
+Texts.
+
+A copy of the Free Documentation License is included as a file called
+FDL in the main directory of the groff source package.
+-->
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+<head>
+ <meta http-equiv="content-type" content="text/html;charset=utf-8"/>
+ <title>Using mom</title>
+ <link rel="stylesheet" type="text/css" href="stylesheet.css" />
+</head>
+
+<body style="background-color: #f5faff;">
+
+<!-- ==================================================================== -->
+
+<div id="top" class="page">
+
+<!-- Navigation links -->
+<table style="width: 100%;">
+ <tr>
+ <td><a href="toc.html">Back to Table of Contents</a></td>
+ <td style="text-align: right;"><a href="typesetting.html#top">Next: The typesetting macros</a></td>
+ </tr>
+ </table>
+
+<h1 id="using" class="docs">Using mom</h1>
+
+<div style="text-align: left; margin-left: 33%">
+<ul class="no-enumerator" style="margin-left: -2.5em;">
+ <li><a href="#using-intro">Introduction</a></li>
+ <li><a href="#using-macros">How to input mom&#8217;s macros</a></li>
+ <li><a href="#viewing">Processing and viewing documents</a>
+ <ul>
+ <li class="item"><a href="#pdf">Mom and PDF</a></li>
+ <li class="item"><a href="#pdfmom">pdfmom</a></li>
+ </ul></li>
+ <li><a href="#previewing">Automatic previewing of documents</a></li>
+</ul>
+</div>
+
+<div class="rule-short" style="margin-top: 18px;"><hr/></div>
+
+<h2 id="using-intro" class="docs">Introduction</h2>
+
+<p>
+As explained in the section
+<a href="intro.html#top">What is mom?</a>,
+mom can be used in two ways: for straightforward typesetting or for
+document processing. The difference between the two is that in
+straightforward typesetting, every macro is a literal instruction
+that determines precisely how text following it will look. Document
+processing, on the other hand, uses markup tags (e.g. <kbd>.PP</kbd>
+for paragraphs, <kbd>.HEADING</kbd> for different levels of heads,
+<kbd>.FOOTNOTE</kbd> for footnotes, etc.) that perform typesetting
+operations automatically.
+</p>
+
+<p>
+You tell mom that you want to use the document processing macros
+with the
+<a href="docprocessing.html#start">START</a>
+macro. After START, mom determines the appearance of
+text following the markup tags automatically, although you, the
+user, can easily change how the tags are interpreted.
+</p>
+
+<h2 id="using-macros" class="docs">How to input mom&#8217;s macros</h2>
+
+<p>
+Regardless of whether you&#8217;re preparing a term paper or making a
+flyer for your lost dog, the following apply.
+</p>
+
+<ol style="margin-top: -.5em; margin-bottom: -.5em;">
+ <li>
+ You need a good text editor for inputting mom files.
+ <br/>
+ <span style="display: block; margin-top: .25em; margin-bottom: .5em;">
+ I cannot recommend highly enough that you use an editor that
+ lets you write syntax highlighting rules for mom&#8217;s
+ macros and
+ <a href="definitions.html#inlines">inline escapes</a>.
+ Simply colourizing macros and inlines to half-intensity can be
+ enough to make text stand out clearly from formatting commands.
+ Mom herself comes with a complete set of syntax highlighting
+ rules for the vim editor. A number of freely available editors
+ come with groff syntax highlighting rules, which are sufficient
+ for mom files, though not as colourful or complete as the vim
+ rules that ship with mom.
+ </span>
+ </li>
+ <li>
+ Macros begin with a period (dot) at the left margin of your text
+ editor&#8217;s screen, and must be entered in upper case (capital)
+ letters.
+ </li>
+ <li>
+ Macro
+ <a href="definitions.html#arguments">arguments</a>
+ are separated from the macro itself by spaces. Multiple
+ arguments to the same macro are separated from each
+ other by spaces. Any number of spaces may be used.
+ </li>
+ <li>
+ Arguments to a macro must appear on the same line as the
+ macro.
+ <br/>
+ <span style="display: block; margin-top: .25em; margin-bottom: .5em;">
+ If the argument list is very long, you may use the
+ backslash character (<kbd>\</kbd>) to break the line visually.
+ From groff&#8217;s point of view, the backslash and newline are
+ invisible. Thus, for example,
+ <span class="pre" style="margin-bottom: -2.25em">
+ .HEADING_STYLE 1 FAMILY Garamond FONT B SIZE +2
+ </span>
+ and
+ <span class="pre" style="margin-bottom: -2.25em">
+ .HEADING_STYLE 1 \
+ FAMILY Garamond \
+ FONT B \
+ SIZE +2
+ </span>
+ </span>
+ are exactly equivalent.
+ </li>
+ <li>
+ Any argument (except a
+ <a href="definitions.html#stringargument">string argument</a>)
+ that is not a digit must be entered in upper case
+ (capital) letters.
+ </li>
+ <li>
+ Any argument that requires a plus or minus sign must
+ have the plus or minus sign prepended to the argument
+ with no intervening space (e.g. <kbd>+2</kbd>).
+ </li>
+ <li>
+ Any argument that requires a
+ <a href="definitions.html#unitofmeasure">unit of measure</a>
+ must have the unit appended directly to the argument, with no
+ intervening space (e.g. <kbd>.5i</kbd>).
+ </li>
+ <li>
+ <a href="definitions.html#stringargument">String arguments</a>,
+ in the sense of this manual, must be surrounded by double-quotes
+ (e.g. <kbd>"text"</kbd>). Multiple
+ string arguments are separated from each other by spaces (with
+ each argument surrounded by double-quotes).
+ <br/>
+ <span style="display: block; margin-top: .25em; margin-bottom: .5em;">
+ If a string argument becomes
+ uncomfortably long, you may break it into two or more lines
+ with the backslash character.
+ <span class="pre">
+ .SUBTITLE "An In-Depth Consideration of the \
+ Implications of Forty-Two as the Answer to Life, \
+ The Universe, and Everything"
+ </span>
+ </span>
+ </li>
+</ol>
+
+<div class="box-tip">
+<p class="tip">
+<span class="tip">Tip:</span>
+It&#8217;s important that your documents be easy to read and
+understand in a text editor. One way to achieve this is to group
+macros that serve a similar purpose together, and separate them from
+other groups of macros with a comment line. In groff, that&#8217;s
+done with <kbd>\#</kbd> (backslash-pound) or <kbd>.\"</kbd>
+(period-backslash-doublequote) on a line by itself. Either
+instructs groff to ignore the remainder of the line, which may or
+may not contain text. Consider the following, which is a template
+for starting the chapter of a book.
+<br/>
+<span class="pre-in-pp">
+ \# Reference/meta-data
+ .TITLE "My Pulitzer Novel"
+ .AUTHOR "Joe Blow"
+ .CHAPTER 1
+ \# Template
+ .DOCTYPE CHAPTER
+ .PRINTSTYLE TYPESET
+ \# Type style
+ .FAM P
+ .PT_SIZE 10
+ .LS 12
+ \#
+ .START
+</span>
+You may also, if you wish, add a comment to the end of a line with
+<kbd>\"</kbd> (no period), like this:
+<br/>
+<span class="pre-in-pp">
+ .FAMILY P \" Maybe Garamond instead?
+</span>
+</p>
+</div>
+
+<h2 id="viewing" class="docs">Processing and viewing documents</h2>
+
+<p>
+The most basic command-line usage for processing a file formatted
+with the mom macros is
+<br/>
+<span class="pre-in-pp">
+ groff -mom filename.mom &gt; filename.ps
+</span>
+which processes the .mom file and dumps the output into a
+viewable/printable PostScript file.
+</p>
+
+<h3 id="pdf" class="docs">Mom and PDF</h3>
+
+<p>
+Adobe&#8217;s Portable Document Format (PDF) has largely supplanted
+PostScript, of which it is a subset, as the standard for typeset
+documents. While printed versions of documents in either format
+will be identical, PDF documents, when viewed at the screen, may
+also contain clickable links and a number of other special features.
+</p>
+
+<p>
+As of version 2.0, mom supports full PDF integration. The creation
+and processing of mom files into PostScript documents remains
+unchanged from 1.x, but the expected and recommended format of final
+documents is now PDF.
+</p>
+
+<p>
+The manual,
+<a href="http://www.schaffter.ca/mom/pdf/mom-pdf.pdf"><span class="book-title">Producing PDFs with groff and mom</span></a>,
+explains and demonstrates the PDF-specific macros that are available
+in mom, as well as the use of <strong>pdfmom</strong>, the
+recommended way to process mom files.
+</p>
+
+<h4 id="pdfmom" class="docs">pdfmom</h4>
+
+<p>
+Groff provides more than one way to generate PDF documents,
+but when processing files formatted with the mom macros,
+<strong>pdfmom</strong> is the recommended and most robust way to do
+it:
+<br/>
+<span class="pre-in-pp">
+ pdfmom filename.mom &gt; filename.pdf
+</span>
+<strong>pdfmom</strong> is a wrapper around groff, and accepts all
+groff&#8217;s command-line options as listed in the groff manpage.
+Full usage is explained in the manual,
+<a href="http://www.schaffter.ca/mom/pdf/mom-pdf.pdf"><span class="book-title">Producing PDFs with groff and mom</span></a>.
+</p>
+
+<p>
+PDF links in a document, including linked entries in the
+Table of Contents, are identified by colour. When printing
+documents with links, you will most likely not want the link
+text coloured. The groff option, <kbd>-c</kbd>, disables colour
+throughout a document; thus, when preparing a document for printing,
+you should use:
+<br/>
+<span class="pre-in-pp">
+ pdfmom -c filename.mom &gt; filename.pdf
+</span>
+<strong>pdfmom</strong> tends to produce large files. You may
+reduce their size by piping them through ps2pdf:
+<br/>
+<span class="pre-in-pp">
+ pdfmom -c filename.mom | ps2pdf - filename.pdf
+</span>
+Be aware, though, that files piped through ps2pdf will lose some pdf
+metadata, notably the document window title set with PDF_TITLE.
+</p>
+
+<h2 id="previewing" class="docs">Automatic previewing of documents</h2>
+
+<p>
+Most PDF viewers have a &#8220;Watch File&#8221; option, which
+automatically updates a displayed document whenever there&#8217;s
+a change. This is useful when preparing documents that require
+judgment calls. I recommend creating a keymapping in your
+text editor that both saves the mom file and processes it with
+<strong>pdfmom</strong>. The displayed PDF then automatically
+reflects whatever changes you save to the mom file.
+</p>
+
+<div class="rule-long"><hr/></div>
+
+<!-- Navigation links -->
+<table style="width: 100%; margin-top: 12px;">
+ <tr>
+ <td style="width: 33%;"><a href="toc.html">Back to Table of Contents</a></td>
+ <td style="width: 33%; text-align: center;"><a href="#top">Top</a></td>
+ <td style="width: 33%; text-align: right;"><a href="typesetting.html#top">Next: The typesetting macros</a></td>
+</tr>
+</table>
+
+</div>
+
+<div class="bottom-spacer"><br/></div>
+
+</body>
+</html>
diff --git a/contrib/mom/momdoc/version-2.html b/contrib/mom/momdoc/version-2.html
new file mode 100644
index 0000000..bd1cb8d
--- /dev/null
+++ b/contrib/mom/momdoc/version-2.html
@@ -0,0 +1,424 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+This file is part of groff, the GNU roff type-setting system.
+
+Copyright (C) 2004-2020 Free Software Foundation, Inc.
+Written by Peter Schaffter (peter@schaffter.ca).
+
+Permission is granted to copy, distribute and/or modify this document
+under the terms of the GNU Free Documentation License, Version 1.3 or
+any later version published by the Free Software Foundation; with no
+Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
+Texts.
+
+A copy of the Free Documentation License is included as a file called
+FDL in the main directory of the groff source package.
+-->
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+<head>
+ <meta http-equiv="content-type" content="text/html;charset=utf-8"/>
+ <title>Mom -- Version 2.0 notes</title>
+ <link rel="stylesheet" type="text/css" href="stylesheet.css" />
+</head>
+
+<body style="background-color: #f5faff;">
+
+<!-- ==================================================================== -->
+
+<div id="top" class="page">
+
+<!-- Navigation links -->
+<table style="width: 100%;">
+<tr>
+ <td><a href="toc.html">Back to Table of Contents</a></td>
+ <td style="text-align: right;"><a href="intro.html#top">Next: Introduction to mom</a></td>
+</tr>
+</table>
+
+<h1 class="docs">Version 2.0 notes</h1>
+
+<div style="width: 70%; margin: auto;">
+<ol style="margin-left: -1em;">
+ <li><a href="#prefatory">Prefatory comments</a></li>
+ <li><a href="#differences">Differences between 2.0 and 1.x</a>
+ <ul class="no-enumerator" style="padding-left: 0">
+ <li><a href="#pdf-support">2.1 PDF support</a>
+ <ul class="no-enumerator" style="padding-left: 1em">
+ <li><a href="#mom-pdf">2.1.1 The manual, <span class="book-title">Producing PDFs with groff and mom</span></a></li>
+ <li><a href="#pdf-image">2.1.2 PDF_IMAGE</a></li>
+ </ul></li>
+ <li><a href="#covers">2.2 Covers</a></li>
+ <li><a href="#headings">2.3 Headings</a></li>
+ <li><a href="#margin-notes">2.4 Margin notes</a></li>
+ <li><a href="#floats">2.5 Floats</a></li>
+ <li><a href="#table-of-contents">2.5 Tables of contents</a></li>
+ </ul></li>
+ <li><a href="#v2.1-changes">Version 2.1 changes</a></li>
+ <li><a href="#v2.2-changes">Version 2.2 changes</a></li>
+ <li><a href="#v2.5-changes">Version 2.5 changes</a></li>
+ <li><a href="#pdfmom">The <strong>pdfmom</strong> wrapper around groff</a></li>
+ <li><a href="#install-font">The <strong>install-font.sh</strong> script</a></li>
+</ol>
+</div>
+
+<div class="rule-medium"><hr/></div>
+
+<h2 id="prefatory" class="docs">1. Prefatory comments</h2>
+
+<p>
+Version 2.0 comes about as a result of Deri James&#8217;
+contribution of <strong>gropdf</strong> to <strong>groff</strong>,
+and his subsequent work integrating the device with
+<strong>mom</strong>.
+</p>
+
+<p>
+Whereas the 1.x releases were oriented toward PostScript output,
+2.0 focuses on PDF output, a bias reflected throughout this
+documentation. Users are strongly encouraged to process their files
+with
+<a href="#pdfmom"><strong>pdfmom</strong></a>,
+a wrapper around <strong>groff&nbsp;-Tpdf</strong>, in order to take
+full advantage of all PDF has to offer.
+</p>
+
+<p>
+While portions of mom have been rewritten, and new features
+introduced, 2.0 is backwardly compatible with 1.x releases. Changes
+are either transparent, or accompanied by notifications on stderr.
+</p>
+
+<p>
+The implementation of nested heads has been completely rethought,
+as has the manner of styling of them. There are no limits on
+how deep the nesting can go. The 1.x macros <kbd>HEAD</kbd>,
+<kbd>SUBHEAD</kbd>, and <kbd>SUBSUBHEAD</kbd> may still be used, but
+must be re-designed with the new <kbd>HEADING_STYLE</kbd> macro
+if their 1.x defaults are not desired.
+</p>
+
+<p>
+In conjunction with the changes to nested heads, Table of Contents
+generation has also been rethought. Greater flexibility in the
+inclusion of toc entry numbering been added. Like nested heads,
+there&#8217;s a new macro <kbd>TOC_ENTRY_STYLE</kbd> that permits
+styling of each level in the toc hierarchy separately. The default
+overall layout has also been significantly improved, achieving a
+level of typographical elegance formerly lacking. Best of all, the
+Table of Contents can now be repositioned to the correct spot at the
+top of a document from within the mom source file.
+</p>
+
+<p>
+When mom files are processed with <strong>pdfmom</strong>, a PDF
+outline for the Contents panel of PDF viewers is automatically
+generated. In addition, entries in the Table of Contents
+are clickable links when a document is viewed at the screen.
+<strong>pdfmom</strong> also permits setting a document&#8217;s
+papersize within the source file without the corresponding need for
+<kbd>-P-p&lt;papersize&gt;</kbd> on the command line.
+</p>
+
+<p>
+Lastly, while not strictly part of mom, a bash script,
+<strong>install-font.sh</strong>, has been posted at the
+<a href="https://www.schaffter.ca/mom/">mom site</a>.
+The script significantly eases the installation of new
+groff families and fonts, with conversion to .pfa
+and .t42 being performed by <strong>fontforge</strong>.
+</p>
+
+<h2 id="differences" class="docs">2. Differences between v2.0 and v1.x</h2>
+
+<h3 id="pdf-support" class="docs">2.1. PDF support</h3>
+
+<p>
+PDF support has been added, with features including the automatic
+generation of PDF outlines, embedding of images in PDF format (via
+the
+<a href="images.html#pdf-image">PDF_IMAGE</a>
+macro) and PDF linking (internal and external).
+</p>
+
+<h4 id="mom-pdf" class="docs">2.1.1. Producing PDFs with groff and mom</h4>
+
+<p>
+A manual in PDF format,
+<span class="book-title">Producing PDFs with groff and mom</span>,
+has been added to the documentation. The file,
+<strong>mom-pdf.pdf</strong> can be found in
+<br/>
+<span class="pre-in-pp">
+ /usr/local/share/doc/groff-&lt;version&gt;/pdf/
+</span>
+or
+<br/>
+<span class="pre-in-pp">
+ /usr/share/doc/groff-base/pdf/
+</span>
+or at
+<br/>
+<span class="pre-in-pp">
+ <a href="http://www.schaffter.ca/mom/momdoc/mom-pdf.pdf">http://www.schaffter.ca/mom/momdoc/mom-pdf.pdf</a>
+</span>
+PDF usage, and all associated macros except
+<a href="#pdf-image">PDF_IMAGE</a>,
+are fully explained in the manual, which should be considered an
+integral part of the present documentation. In addition, the mom
+source file for the manual can be found in
+<br/>
+<span class="pre-in-pp">
+ /usr/local/share/doc/groff-&lt;version&gt;/examples/mom
+</span>
+or
+<br/>
+<span class="pre-in-pp">
+ /usr/share/doc/groff-base/examples/mom/
+</span>
+and provides an excellent demonstration of mom usage.
+</p>
+
+<h4 id="pdf-image" class="docs">2.1.2. PDF_IMAGE</h4>
+
+<p>
+A new macro for embedding PDF images has been added,
+<a href="images.html#pdf-image">PDF_IMAGE</a>.
+</p>
+
+<p>
+PDF_IMAGE functions similarly to PSPIC and accepts the same
+arguments. Differences in implementation are that PDF_IMAGE
+requires the image dimensions (the bounding box) to be supplied.
+Instructions for getting the bounding box are included in the
+documentation entry for PDF_IMAGE. Two additional options,
+<kbd>SCALE</kbd> and <kbd>ADJUST</kbd>, allow scaling of the image
+and optical centering.
+</p>
+
+<h3 id="covers" class="docs">2.2. Covers</h3>
+
+<p>
+Arguments to
+<a href="cover.html#cover">COVER</a>
+and
+<a href="cover.html#doc-cover">DOC_COVER</a>
+may now be given in any order.
+</p>
+
+<h3 id="headings" class="docs">2.3. Headings</h3>
+
+<p>
+The 1.x macros HEAD, SUBHEAD, SUBSUBHEAD, are now deprecated and
+have been replaced by the single macro
+<a href="docelement.html#heading">HEADING <kbd>&lt;n&gt;</kbd></a>,
+where <kbd>&lt;n&gt;</kbd> is the heading level. The deprecated
+macros may still be used, and conform in style to their original
+defaults; they are, however, wrappers around HEADING levels 1
+&#8211; 3. Both the wrappers and HEADING itself can take a
+<kbd>NAMED&nbsp;&lt;id&gt;</kbd> argument, specifying a PDF link
+destination.
+</p>
+
+<p>
+Styling of headings is managed by the single macro <a
+href="docelement.html#heading">HEADING_STYLE &lt;n&gt;</a> where
+<kbd>&lt;n&gt;</kbd> conforms to a heading level. The control
+macros for HEAD, SUBHEAD and SUBSUBHEAD have been removed. Users
+wishing to style the wrappers must use HEADING_STYLE.
+</p>
+
+<p>
+PARAHEAD is no longer valid. Paragraph heads in 2.0 are created
+by passing the <kbd>PARAHEAD</kbd> argument to HEADING. Mom
+will abort with an informational message whenever she encounters
+<kbd>.PARAHEAD</kbd>.
+</p>
+
+<h3 id="margin-notes" class="docs">2.4. Margin notes</h3>
+
+<p>
+The macro for setting margin note parameters,
+<a href="docelement.html#mn-init">MN_INIT</a>,
+has been re-written such that each parameter now has the form
+<kbd>&lt;PARAMETER&gt; &lt;value&gt;</kbd>. This differs
+from 1.x where parameters were entered without a preceding
+<kbd>&lt;PARAMETER&gt;</kbd> flag. Parameters may be entered in any
+order. Any that are skipped are set to default values. Documents
+created with 1.x will have to have their <kbd>MN_INIT</kbd> updated
+accordingly.
+</p>
+
+<h3 id="floats" class="docs">2.5. Floats</h3>
+
+<p>
+A
+<a href="images.html#floats-intro">FLOAT</a>
+macro has been added, which functions similarly to the <kbd>ms</kbd>
+macros&#8217; <kbd>.KF/.KE</kbd>, i.e., the contents of the float are
+output immediately if there&#8217;s room on the page, otherwise
+normal text processing continues and the contents are output at the
+top of the next page. An <kbd>ADJUST</kbd> argument to FLOAT allows
+for optical centering.
+</p>
+
+<h3 id="table-of-contents" class="docs">2.6. Tables of contents</h3>
+
+<p>
+The default look of the Table of Contents has been overhauled to
+produce a more typographically pleasing result. All control macros
+for TOC title and entry styles have been removed, replaced by
+<a href="tables-of-contents.html#toc-title-style">TOC_TITLE_STYLE</a>
+and
+<a href="tables-of-contents.html#toc-title-style">TOC_ENTRY_STYLE <kbd>&lt;n&gt;</kbd></a>
+where <kbd>&lt;n&gt;</kbd> corresponds to a heading level. Both
+macros permit setting any or all of the style parameters for TOC
+titles (i.e. chapters or major sections/divisions of a collated
+document) and TOC entries (nested heading levels) at once.
+Documents created with 1.x that contain TOCs will need to have their
+TOC style updated if the new defaults are unsatisfactory.
+</p>
+
+<p>
+Two new TOC control macros have been added,
+<a href="tables-of-contents.html#space-toc-items">SPACE_TOC_ITEMS</a>
+and
+<a href="tables-of-contents.html#auto-relocate-toc">AUTO_RELOCATE_TOC</a>.
+SPACE_TOC_ITEMS groups TOC entry levels and separates them with a
+discrete amount of whitespace. This leads to improved legibility,
+and is highly recommended even though it is not mom&#8217;s
+default. AUTO_RELOCATE_TOC intelligently repositions the Table
+of Contents to the top of a document when the mom source file is
+processed with
+<a href="pdfmom">pdfmom</a>.
+</p>
+
+<h2 id="v2.1-changes" class="docs">3. Version 2.1 changes</h2>
+<p> Version 2.1 adds these features: </p> <ul style="margin-top: -.5em; width: 90%">
+ <li>expansion of cover, docheader, page header, and heading
+ control macros to permit caps, smallcaps, color, and
+ underscoring</li>
+ <li>the ability to style every element appearing in docheaders and
+ automatically-generated cover/title pages separately</li>
+ <li>macros to place images on cover/title pages</li>
+ <li>a new macro COVERTEXT that allows adding text (e.g. an
+ Abstract) to automatically-generated cover/title pages or to
+ create cover/title pages entirely by hand</li>
+ <li>separate indent control macros for QUOTES and BLOCKQUOTES</li>
+ <li>pseudo-smallcaps, including a control macro to choose the
+ size, weight, and width of the small caps</li>
+ <li>new &lt;element&gt;_STYLE macros that allow setting
+ parameters for &lt;element&gt; with a single macro using
+ keyword/value pairs</li>
+</ul>
+
+<p>
+The following changes have been made:
+</p>
+
+<ul style="margin-top: -.5em; width: 90%">
+ <li>MISC_AUTOLEAD (including COVER_MISC_AUTOLEAD and
+ DOC_COVER_MISC_AUTOLEAD) has been replaced in favour of MISC_LEAD,
+ which takes an absolute leading value rather than one derived
+ from the point size.</li>
+ <li>COVER_UNDERLINE and DOC_COVER_UNDERLINE have been
+ removed in favour of COVER_DOCTYPE_UNDERLINE and
+ DOC_COVER_DOCTYPE_UNDERLINE.</li>
+ <li>DOCTYPE NAMED <kbd>&lt;string&gt;</kbd> no longer accepts a
+ <kbd>color</kbd> argument; setting the colour for
+ <kbd>&lt;string&gt;</kbd> is accomplished with DOCTYPE_COLOR
+ <kbd>&lt;color&gt;</kbd>. In addition, the string now has a
+ complete set of control macros.</li>
+ <li>Default underscoring of the DOCTYPE NAMED string has been
+ removed, both in the docheader and on cover/title pages.</li>
+ <li>No cover/title page data persists, however formatting for the
+ elements on them does.</li>
+</ul>
+
+<h2 id="v2.2-changes" class="docs">4. Version 2.2 changes</h2>
+
+<p>
+Version 2.2 adds these features:
+</p>
+<ul style="margin-top: -.5em; width: 90%">
+ <li>flex-spacing, an alternative to mom&#8217;s default shimming
+ policy; flex-spacing balances vertical whitespace on the page by
+ distributing any excess equally at sensible points so that running
+ text always fills the page to the bottom margin (see
+ <a href="docprocessing.html#vertical-whitespace-management">
+ vertical whitespace management</a>)
+ </li>
+ <li>improvements to auto-labelling, such that it is now possible
+ to link symbolically to auto-labelled preprocessor material and
+ PDF images (note that you must be running groff 1.22.4 or higher
+ for this feature)
+ </li>
+</ul>
+
+<h2 id="v2.5-changes" class="docs">5. Version 2.5 changes</h2>
+
+<p>
+Version 2.5 adds shaded backgrounds and frames that span pages
+appropriately when necessary, and a macro to set page or slide
+background colour.
+</p>
+
+<h2 id="pdfmom" class="docs">6. pdfmom</h2>
+
+<p>
+Deri James has provided <strong>pdfmom</strong>, a wrapper around
+groff that processes mom source files with all the PDF bells and
+whistles. Its use is highly recommended. Usage is explained in the
+manual,
+<a href="http://www.schaffter.ca/mom/pdf/mom-pdf.pdf">
+ <span class="book-title">Producing PDFs with groff and mom</span>
+</a>.
+A significant convenience of pdfmom is that it can, with the
+<kbd>-Tps</kbd> flag, be used to pass processing over to Keith
+Marshall&#8217;s <strong>pdfroff</strong>. This is useful when
+processing files that contain PostScript images embedded with
+<a href="images.html#pspic">PSPIC</a>.
+pdfmom, without the flag, uses groff&#8217;s PDF device
+(<strong>gropdf</strong>), which only recognizes PDF images that
+have been embedded with
+<a href="images.html#pdf-image">PDF_IMAGE</a>.
+</p>
+
+<h2 id="install-font" class="docs">7. install-font.sh</h2>
+
+<p>
+A bash script, <strong>install-font.sh</strong>, has been posted at the
+<a href="http://www.schaffter.ca/mom/mom-01.html">mom site</a>.
+There&#8217;s nothing mom-specific about the script, and it is not
+an official part of groff.
+</p>
+
+<p>
+Installing groff fonts is a multi-step procedure, which, while not
+difficult, can be a nuisance. install-font.sh takes
+care of all the details, including converting fonts to formats
+acceptable to <strong>grops</strong> and <strong>gropdf</strong>,
+creating and installing the groff fonts in the appropriate
+directories, updating the download files, and installing the
+original fonts in a system-wide directory, if desired.
+</p>
+
+<div class="rule-long"><hr/></div>
+
+<!-- Navigation links -->
+<table style="width: 100%; margin-top: 12px;">
+<tr>
+ <td style="width: 33%;"><a href="toc.html">Back to Table of Contents</a></td>
+ <td style="width: 20%; text-align: center;"><a href="#top">Top</a></td>
+ <td style="width: 46%; text-align: right;"><a href="intro.html">Next: Introduction to mom</a></td>
+</tr>
+</table>
+
+</div>
+
+<div class="bottom-spacer"><br/></div>
+
+</body>
+</html>
diff --git a/contrib/mom/om.tmac b/contrib/mom/om.tmac
new file mode 100644
index 0000000..adb7508
--- /dev/null
+++ b/contrib/mom/om.tmac
@@ -0,0 +1,24571 @@
+.ig
+Mom -- a typesetting/document-processing macro set for groff.
+
+Copyright (C) 2002-2020 Free Software Foundation, Inc.
+ Written by Peter Schaffter <peter@schaffter.ca>
+ PDF integration contributed by Deri James <deri.james@chuzzlewit.co.uk>
+
+This file is part of groff.
+
+groff is free software; 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.
+
+groff is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+Version 2.5_d
+-------------
+Antoine de St-Exupéry asserted that elegance in engineering is
+achieved not when there is nothing left to add, but when there is
+nothing left to take away.
+
+By those standards, mom is a Rube Goldberg contraption. She was
+created over the years while groff, and my understanding of it,
+changed and evolved. However, I'm a firm believer in "if it ain't
+broke, don't fix it." Version 2.0 removed some of the redundancies
+and cruft, but mom still needs some nip and tuck.
+
+"<anything>" in the description of arguments that can be passed
+to a macro means that any argument turns the feature off.
+
+Thanks to everyone who has contributed suggestions and patches,
+and to those whose GPL'd work has been plundered. Special thanks
+to Werner Lemberg (margin notes), Tadziu Hoffman (underlining),
+Deri James (pdf integration), Robin Haberkorn (tbl integration, eqn
+extensions, and float management).
+..
+\#
+\# ====================================================================
+\#
+.if \n(.C \
+. ab [mom]: The groff mom macros do not work in compatibility mode.
+\# Check that GNU troff is being run
+.if !\n[.g]=1 \
+. ab [mom]: The mom macros require that you be running GNU troff.
+\# Check which version of groff is being run
+.if (\n[.x]\n[.y] < 118) \
+. ab [mom]: You need GNU troff version 1.18 or higher to run this version of mom.
+\# Mom version
+.ds version 2.5_d
+.if dVERSION \{\
+. ab [mom]: Version \*[version]
+.\}
+\# Groff revision
+.ds short_revision \n[.Y]
+.substring short_revision 0 0
+\#
+\# Add supplementary styles
+.sty \n[.fp] UL \" Ultra Light
+.sty \n[.fp] ULI \" Ultra Light Italic
+.sty \n[.fp] ULCD \" Ultra Light Condensed
+.sty \n[.fp] ULCDI \" Ultra Light Condensed Italic
+.sty \n[.fp] ULEX \" Ultra Light Extended
+.sty \n[.fp] ULEXI \" Ultra Light Extended Italic
+\#
+.sty \n[.fp] XL \" Extra Light
+.sty \n[.fp] XLI \" Extra Light Italic
+.sty \n[.fp] XLCD \" Extra Light Condensed
+.sty \n[.fp] XLCDI \" Extra Light Condensed Italic
+.sty \n[.fp] XLEX \" Extra Light Extended
+.sty \n[.fp] XLEXI \" Extra Light Extended Italic
+\#
+.sty \n[.fp] TH \" Thin
+.sty \n[.fp] THI \" Thin Italic
+.sty \n[.fp] THCD \" Thin Condensed
+.sty \n[.fp] THCDI \" Thin Condensed Italic
+.sty \n[.fp] THEX \" Thin Extended
+.sty \n[.fp] THEXI \" Thin Extended Italic
+\#
+.sty \n[.fp] L \" Light Roman
+.sty \n[.fp] LI \" Light Italic
+.sty \n[.fp] LCD \" Light Condensed
+.sty \n[.fp] LCDI \" Light Condensed Italic
+.sty \n[.fp] LEX \" Light Extended
+.sty \n[.fp] LEXI \" Light Extended Italic
+\#
+.sty \n[.fp] BK \" Book Roman
+.sty \n[.fp] BKI \" Book Italic
+.sty \n[.fp] BKCD \" Book Condensed
+.sty \n[.fp] BKCDI \" Book Condensed Italic
+.sty \n[.fp] BKEX \" Book Extended
+.sty \n[.fp] BKEXI \" Book Extended Italic
+\#
+.sty \n[.fp] CD \" Medium Condensed
+.sty \n[.fp] CDI \" Medium Condensed Italic
+.sty \n[.fp] EX \" Medium Extended
+.sty \n[.fp] EXI \" Medium Extended Italic
+\#
+.sty \n[.fp] DB \" DemiBold Roman
+.sty \n[.fp] DBI \" DemiBold Italic
+.sty \n[.fp] DBCD \" DemiBold Condensed
+.sty \n[.fp] DBCDI \" DemiBold Condensed Italic
+.sty \n[.fp] DBEX \" DemiBold Extended
+.sty \n[.fp] DBEXI \" DemiBold Extended Italic
+\#
+.sty \n[.fp] SB \" SemiBold Roman
+.sty \n[.fp] SBI \" SemiBold Italic
+.sty \n[.fp] SBCD \" SemiBold Condensed
+.sty \n[.fp] SBCDI \" SemiBold Condensed Italic
+.sty \n[.fp] SBEX \" SemiBold Extended
+.sty \n[.fp] SBEXI \" SemiBold Extended Italic
+\#
+.sty \n[.fp] BCD \" Bold Condensed
+.sty \n[.fp] BCDI \" Bold Condensed Italic
+.sty \n[.fp] BEX \" Bold Extended
+.sty \n[.fp] BEXI \" Bold Extended Italic
+.sty \n[.fp] BO \" Bold Outline
+\#
+.sty \n[.fp] XB \" Extra Bold
+.sty \n[.fp] XBI \" Extra Bold Italic
+.sty \n[.fp] XBCD \" Extra Bold Condensed
+.sty \n[.fp] XBCDI \" Extra Bold Condensed Italic
+.sty \n[.fp] XBEX \" Extra Bold Extended
+.sty \n[.fp] XBEXI \" Extra Bold Extended Italic
+\#
+.sty \n[.fp] UB \" Ultra Bold
+.sty \n[.fp] UBI \" Ultra Bold Italic
+.sty \n[.fp] UBCD \" Ultra Bold Condensed
+.sty \n[.fp] UBCDI \" Ultra Bold Condensed Italic
+.sty \n[.fp] UBEX \" Ultra Bold Extended
+.sty \n[.fp] UBEXI \" Ultra Bold Extended Italic
+\#
+.sty \n[.fp] HV \" Heavy
+.sty \n[.fp] HVI \" Heavy Italic
+.sty \n[.fp] HVCD \" Heavy Condensed
+.sty \n[.fp] HVCDI \" Heavy Condensed Italic
+.sty \n[.fp] HVEX \" Heavy Extended
+.sty \n[.fp] HVEXI \" Heavy Extended Italic
+\#
+.sty \n[.fp] BL \" Black
+.sty \n[.fp] BLI \" Black Italic
+.sty \n[.fp] BLCD \" Black Condensed
+.sty \n[.fp] BLCDI \" Black Condensed Italic
+.sty \n[.fp] BLEX \" Black Extended
+.sty \n[.fp] BLEXI \" Black Extended Italic
+.sty \n[.fp] BLO \" Black Outline
+\#
+.sty \n[.fp] XBL \" Extra Black
+.sty \n[.fp] XBLI \" Extra Black Italic
+.sty \n[.fp] XBLCD \" Extra Black
+.sty \n[.fp] XBLCDI \" Extra Black
+.sty \n[.fp] XBLEX \" Extra Black Italic
+.sty \n[.fp] XBLEXI \" Extra Black Italic
+\#
+.sty \n[.fp] UBL \" Ultra Black
+.sty \n[.fp] UBLI \" Ultra Black Italic
+.sty \n[.fp] UBLCD \" Ultra Black Condensed
+.sty \n[.fp] UBLCDI \" Ultra Black Condensed Italic
+.sty \n[.fp] UBLEX \" Ultra Black Extended
+.sty \n[.fp] UBLEXI \" Ultra Black Extended Italic
+\#
+.sty \n[.fp] SC \" Small Caps Roman
+.sty \n[.fp] SCI \" Small Caps Italic
+.sty \n[.fp] SCDB \" Small Caps Demibold
+.sty \n[.fp] SCDBI \" Small Caps Demibold Italic
+.sty \n[.fp] SCSB \" Small Caps Semibold
+.sty \n[.fp] SCSBI \" Small Caps Semibold Italic
+\#
+\# Instruct grops to use square linecaps and joins.
+\# This instruction is also executed in DO_B_MARGIN, NEWPAGE, and HEADER
+\#
+.if !n \X'ps: exec 0 setlinejoin'\X'ps: exec 0 setlinecap'
+\#
+\# The following PostScript, provided by Tadziu Hoffmann, permits
+\# no-fail underlining
+\#
+.de ul*ps
+ps: def
+grops begin
+/decornone { grops begin /X { } def /Y { } def /y2 -1 def end } def
+/decorline { grops begin u neg /uld exch def u /ulw exch def
+ /X { currentpoint /y0 exch def /x0 exch def } def
+ /Y { currentpoint /y1 exch def /x1 exch def
+ drawline /x2 x1 def /y2 y1 def } def end } def
+/drawline { gsave ulw setlinewidth 0 setlinecap x1 y1 uld sub moveto
+ y2 y0 eq { x2 y2 } { x0 y0 } ifelse uld sub lineto stroke
+ grestore } def
+decornone
+/uld 0 def
+/ulw 0 def
+/A { X show Y } def
+/B { 0 SC 3 -1 roll X widthshow Y } def
+/C { 0 exch X ashow Y } def
+/D { 0 exch 0 SC 5 2 roll X awidthshow Y } def
+/E { 0 rmoveto X show Y } def
+/F { 0 rmoveto 0 SC 3 -1 roll X widthshow Y } def
+/G { 0 rmoveto 0 exch X ashow Y } def
+/H { 0 rmoveto 0 exch 0 SC 5 2 roll X awidthshow Y } def
+/I { 0 exch rmoveto X show Y } def
+/J { 0 exch rmoveto 0 SC 3 -1 roll X widthshow Y } def
+/K { 0 exch rmoveto 0 exch X ashow Y } def
+/L { 0 exch rmoveto 0 exch 0 SC 5 2 roll X awidthshow Y } def
+/M { rmoveto X show Y } def
+/N { rmoveto 0 SC 3 -1 roll X widthshow Y } def
+/O { rmoveto 0 exch X ashow Y } def
+/P { rmoveto 0 exch 0 SC 5 2 roll X awidthshow Y } def
+/Q { moveto X show Y } def
+/R { moveto 0 SC 3 -1 roll X widthshow Y } def
+/S { moveto 0 exch X ashow Y } def
+/T { moveto 0 exch 0 SC 5 2 roll X awidthshow Y } def
+end
+..
+\#
+.if !n \Y[ul*ps]
+.if n .color 0
+.nr TOC.RELOCATE 0 \" TOC.RELOCATE is off by default
+.ds PDFHREF.TEXTCOL.DEFAULT 0.0 0.3 0.9
+.nr PDFHREF.VIEW.LEADING.C 3i
+.nr PDFHREF.VIEW.LEADING.T 1i
+.nr PDFHREF.VIEW.LEADING 0
+.nr PDFHREF.VIEW.LEADING.H \n[PDFHREF.VIEW.LEADING]
+\#
+\# ====================================================================
+\#
+\# TYPESETTING MACROS, STRINGS, AND ALIASES
+\# ========================================
+\#
+\# +++ALIASES+++
+\#
+\# Alias .als as ALIAS, and .aln (number registers) as ALIASN
+\#
+.als ALIAS als
+.als ALIASN aln
+\#
+\# ALIASES FOR GROFF REQUESTS
+\# --------------------------
+\#
+.ALIAS MAC de
+.ALIAS BR br
+.ALIAS SPREAD brp
+.ALIAS ESC_CHAR ec
+.ALIAS STRING ds
+.ALIAS INCLUDE so
+\#
+\# ALIASES FOR NUMBER REGISTERS
+\# ----------------------------
+\#
+.ALIASN #PT_SIZE .ps \"fractional point size in units
+.ALIASN #DIVER_DEPTH dn \"diversion depth
+.ALIASN #DIVER_WIDTH dl \"diversion width
+.ALIASN #TRAP_DISTANCE .t \"distance to next trap
+.ALIASN #LEAD .v \"line space
+.ALIASN #PAGE_LENGTH .p \"page length
+.ALIASN #NUM_ARGS .$ \"number of arguments passed to a macro
+.ALIASN #INDENT .i \"value of current indent
+\#
+\# ====================================================================
+\#
+\# MISCELLANEOUS
+\# =============
+.nr #L_MARGIN \n[.o] \" Tabs, etc require #L_MARGIN
+.cflags 4 /\[en] \" So slash and en-dashes get broken
+\#
+\# 'END' is used throughout as the 2nd arg to 'MAC' (alias of .de)
+\# Defining it as a macro here prevents groff from complaining
+\# that 'END' isn't defined.
+\#
+.de END
+..
+\#
+\# ====================================================================
+\#
+\# +++PAGE LAYOUT+++
+\#
+\# Macros that control the physical layout of the page: paper size
+\# and margins.
+\#
+\# PAGE WIDTH
+\# ----------
+\# *Argument:
+\# <width of printer sheet>
+\# *Function:
+\# Stores user supplied page width in register #PAGE_WIDTH.
+\# *Notes:
+\# #PAGE_WIDTH is used to establish the default LL (and right margin).
+\# Requires unit of measure.
+\#
+.MAC PAGEWIDTH END
+. br
+. nr #PAGE_WIDTH \\$1
+. if !r#L_MARGIN .L_MARGIN \\n[.o]
+. if !r#R_MARGIN .R_MARGIN 1i
+. if '\\*[.T]'pdf' \X'papersize=\\n[#PAGE_WIDTH]z,\\n[#PAGE_LENGTH]z'\c
+.END
+\#
+\# L_MARGIN
+\# --------
+\# *Argument:
+\# <offset from page left>
+\# *Function:
+\# Stores user supplied page offset in register #L_MARGIN.
+\# Sets .po to user supplied offset.
+\# *Notes:
+\# Requires unit of measure.
+\#
+.MAC L_MARGIN END
+. br
+. nr #L_MARGIN (\\$1)
+. po \\n[#L_MARGIN]u
+.END
+\#
+\# R_MARGIN
+\# --------
+\# *Argument:
+\# <width of right margin>
+\# *Function:
+\# Stores user supplied right margin in register #R_MARGIN.
+\# *Notes:
+\# This is a pseudo-margin. Right margin is actually a function of
+\# line length. The macro calculates line length from the page offset
+\# and the value plugged into #R_MARGIN.
+\#
+\# N.B. -- PAGEWIDTH and L_MARGIN have to be defined before R_MARGIN.
+\#
+\# Requires unit of measure.
+\#
+.MAC R_MARGIN END
+. br
+. nr #R_MARGIN (\\$1)
+. ll \\n[#PAGE_WIDTH]u-\\n[#L_MARGIN]u-\\n[#R_MARGIN]u
+. ta \\n[.l]u
+. nr #L_LENGTH \\n[.l]
+.END
+\#
+\# T_MARGIN
+\# --------
+\# *Argument:
+\# <distance to advance from top of page>
+\# *Function:
+\# Stores the user supplied top margin in register #T_MARGIN.
+\# Advances user supplied depth from the top of the page.
+\# *Notes:
+\# Requires unit of measure.
+\#
+.MAC T_MARGIN END
+. nr #T_MARGIN (\\$1)
+. if !\\n[#DOCS] .sp |\\n[#T_MARGIN]u-1v
+. wh 0i DO_T_MARGIN
+.END
+\#
+\# B_MARGIN
+\# --------
+\# *Argument:
+\# <space to leave at the bottom of the page>
+\# *Function:
+\# Stores the user supplied bottom margin in register #B_MARGIN.
+\# *Notes:
+\# Requires unit of measure.
+\#
+.MAC B_MARGIN END
+. br
+. nr #B_MARGIN (\\$1)
+. nr #ORIGINAL_B_MARGIN \\n[#B_MARGIN]
+. nr #B_MARGIN_SET 1
+. wh -\\n[#B_MARGIN]u DO_B_MARGIN
+.END
+\#
+\# PAGE
+\# ----
+\# *Arguments:
+\# <pagewidth> [pagelength [leftmargin [rightmargin [topmargin [bottommargin]]]]]
+\# *Function:
+\# Page set-up. Collects arguments and passes them to the appropriate
+\# macros.
+\# *Notes:
+\# All arguments after pagewidth are optional, but must appear
+\# in the order given above. (User can fill in as much or as
+\# little as desired.)
+\#
+\# All arguments require a unit of measure.
+\#
+.MAC PAGE END
+. br
+. PAGEWIDTH \\$1
+. PAGELENGTH \\$2
+. ie '\\$3'' .L_MARGIN \\n[.o]
+. el .L_MARGIN \\$3
+. ie '\\$4'' .R_MARGIN 1i
+. el .R_MARGIN \\$4
+. if !'\\$5'' .T_MARGIN \\$5
+. if !'\\$6'' .B_MARGIN \\$6
+.END
+\#
+\# gropdf: pass pagelength to postprocessor; no need for -P-p
+\#
+.MAC PAGELENGTH END
+. pl \\$*
+. if '\\*[.T]'pdf' \X'papersize=\\n[#PAGE_WIDTH]z,\\n[#PAGE_LENGTH]z'\c
+.END
+\#
+\# =====================================================================
+\#
+\# +++PAGE CONTROL+++
+\#
+\# Generic macros for breaking pages.
+\#
+\# DO_T_MARGIN
+\# -----------
+\# *Argument:
+\# <none>
+\# *Function:
+\# Plants the top margin at the top of each page.
+\# *Notes:
+\# The trap is set in .T_MARGIN or .PAGE
+\#
+.MAC DO_T_MARGIN END
+. ev T_MARGIN
+. sp |\\n[#T_MARGIN]u-1v
+. ev
+.END
+\#
+\# DO_B_MARGIN
+\# -----------
+\# *Argument:
+\# <none>
+\# *Function:
+\# Plants the bottom margin at the bottom of each page.
+\# *Notes:
+\# The trap is set in .B_MARGIN or .PAGE.
+\#
+.MAC DO_B_MARGIN END
+. nr #T_MARGIN_LEAD_ADJ \\n[#LEAD]-12000
+. ev B_MARGIN
+. if !n .nop \X'ps: exec 0 setlinejoin'\X'ps: exec 0 setlinecap'
+. ie \\n[#DOCS] \
+. if !\\n[#NEWPAGE] .bp
+. el .bp
+. ev
+.END
+\#
+\# NEWPAGE
+\# -------
+\# *Argument:
+\# <none>
+\# *Function:
+\# Breaks to a new page.
+\# *Notes:
+\# If a B_MARGIN has been set, processes that, otherwise, just
+\# breaks to a new page.
+\#
+.MAC NEWPAGE END
+. br
+. if \\n[#DOC_TYPE]=5 \{\
+. if \\n[#NUM_ARGS]>0 \
+. pdftransition PAGE \\$1
+. \}
+. if !\\n[defer] \{\
+. nr #NEWPAGE 1
+. rr tbl*no-print-header
+. \}
+. ie !\\n[#DOCS]=1 \
+. if \\n[#B_MARGIN_SET]=1 .DO_B_MARGIN
+. el \{\
+. if (\\n[#COLUMNS]=1):(\\n[#COLUMNS]=2) .nr #COL_NUM \\n[#NUM_COLS]
+. if !\\n[#FN_DEPTH] \{\
+. ch FN_OVERFLOW_TRAP
+. nr #RESET_FN_OVERFLOW_TRAP 1
+. \}
+. \}
+. if dPDF.EXPORT \
+. if \\n[#FLEX_ACTIVE] \
+. if !\\n[#NO_FLEX] \
+. tm .ds pre-newpage-\\n% \\n%@\\n[#COL_NUM]
+. ie \\n[#DOCS]=1 \{\
+. if (\\n[@TOP]=0):(\\n[#END_COVER]=1) .bp
+. rr #END_COVER
+. if \\n[#RESET_FN_OVERFLOW_TRAP] \{\
+. wh -\\n[#FN_OVERFLOW_TRAP_POS]u FN_OVERFLOW_TRAP
+. rr #RESET_FN_OVERFLOW_TRAP_POS
+. \}
+. \}
+. el .if !\\n[#B_MARGIN_SET]=1 .bp
+.END
+\#
+.ALIAS NEWSLIDE NEWPAGE
+\#
+\# =====================================================================
+\#
+\# +++GENERAL STYLE MACROS+++
+\#
+\# LINE LENGTH
+\# -----------
+\# *Argument:
+\# <line length>
+\# *Function:
+\# Stores user supplied line length in register #L_LENGTH.
+\# Sets .ll to #L_LENGTHu
+\# *Notes:
+\# Requires unit of measure.
+\#
+.MAC LL END
+. nr #USER_SET_L_LENGTH 1
+. ll \\$1
+. nr #L_LENGTH \\n[.l]
+. ta \\n[.l]u
+.END
+\#
+\# +++FAMILY AND FONT+++
+\#
+\# FALLBACK FONT
+\# -------------
+\# *Argument:
+\# <fallback font> [ ABORT | WARN ] | ABORT | WARN
+\# *Function:
+\# Sets register #ABORT_FT_ERRORS to 1, or defines a fallback font
+\# called "dummy" at font position 0.
+\# *Notes:
+\# Calls to non-existent families cause mom to continue processing
+\# files using the fallback font until a valid family is entered.
+\#
+\# Calls to non-existent fonts generate warnings. If ABORT is passed
+\# to FALLBACK_FONT, mom stops processing files after the warning.
+\# Otherwise, she continues to process files using the fallback font
+\# after the warning is issued. The default fallback font is CR; the
+\# default for font warnings is to abort.
+\#
+.MAC FALLBACK_FONT END
+. if \\n[#NUM_ARGS]=1 \{\
+. if '\\$1'ABORT' .nr #ABORT_FT_ERRORS 1
+. if '\\$1'WARN' \
+. if r #ABORT_FT_ERRORS .nr #ABORT_FT_ERRORS 0
+. if !'\\$1'ABORT' \
+. if !'\\$1'WARN' .fp 0 dummy \\$1
+. \}
+. if \\n[#NUM_ARGS]=2 \{\
+. fp 0 dummy \\$1
+. if '\\$2'ABORT' .nr #ABORT_FT_ERRORS 1
+. if '\\$2'WARN' .nr #ABORT_FT_ERRORS 0
+. \}
+.END
+\#
+.FALLBACK_FONT CR ABORT
+\#
+\# FAMILY
+\# ------
+\# *Argument:
+\# <font family>
+\# *Function:
+\# Stores user supplied font family in string $FAMILY. Sets .fam
+\# to $FAMILY.
+\#
+.MAC FAMILY END
+. if '\\n[.ev]'COVER_TEXT' .ds $SAVED_DOC_FAM \\n[.fam]
+. if \\n[#COLLATE] .rm $SAVED_DOC_FAM
+. ds $FAMILY \\$1
+. if \\n[#PRINT_STYLE]=1 \{\
+. fam \\*[$TYPEWRITER_FAM]
+. return
+. \}
+. if \\n[#IGNORE] \{\
+. fam \\*[$TYPEWRITER_FAM]
+. return
+. \}
+. if (\\n[.x]\\n[.y]\\*[short_revision] >= 1192) .ds $SAVED_STYLE \\n[.sty]
+. ft 0
+. fam \\*[$FAMILY]
+. if (\\n[.x]\\n[.y]\\*[short_revision] >= 1192) \{\
+. ft \\*[$SAVED_STYLE]
+. if !F\\n[.fn] .ft 0
+. \}
+. ie \\n[#PRE_COLLATE]=1 .
+. el \{\
+. if \\n[#COLLATE]=1 \
+. if !r#START .ds $DOC_FAM \\*[$FAMILY]
+. \}
+.END
+\#
+\# FONT
+\# ----
+\# *Argument:
+\# R | I | B | BI | <other style extension>
+\# *Function:
+\# Stores user supplied font in $FONT and sets .ft to $FONT.
+\#
+.MAC FT END
+. ds $FONT \\$1
+. if \\n[#PRINT_STYLE]=1 \{\
+. ie '\\$1'I' \{\
+. if \\n[#UNDERLINE_ITALIC]=1 \{\
+. UNDERLINE
+. return
+. \}
+. if \\n[#ITALIC_MEANS_ITALIC]=1 \{\
+. ds $FONT \\$1
+. ft \\*[$FONT]
+. return
+. \}
+. \}
+. el .UNDERLINE OFF
+. return
+. \}
+. ft 0
+. ft \\*[$FONT]
+. if (\\n[.x]\\n[.y]\\*[short_revision] >= 1192) \{\
+. if '\\n[.sty]'' \{\
+. if !F\\n[.fn] \{\
+. if !S\\*[$FONT] \{\
+. tm1 "[mom]: Font style "\\*[$FONT]" at line \\n[.c] has not been registered.
+. ie \\n[#ABORT_FT_ERRORS]=0 \
+. tm1 " Continuing to process using fallback font.
+. el .ab [mom]: Aborting '\\n[.F]' at \\$0, line \\n[.c].
+. \}
+. if \\n[.f]=0 \{\
+. tm1 "[mom]: Either font style "\\*[$FONT]" at line \\n[.c] does not exist in family "\\n[.fam]",
+. tm1 " or family "\\n[.fam]" has not been installed.
+. ie \\n[#ABORT_FT_ERRORS]=0 \
+. tm1 " Continuing to process using fallback font.
+. el .ab [mom]: Aborting '\\n[.F]' at \\$0, line \\n[.c].
+. \}
+. \}
+. \}
+. \}
+.END
+\#
+\# POINT SIZE
+\# ----------
+\# *Arguments:
+\# <point size of type>
+\# *Function:
+\# Sets point size to user supplied value in scaled points.
+\# If #AUTO_LEAD is on, resets lead accordingly.
+\# *Notes:
+\# Must NOT use a unit of measure.
+\#
+.MAC PT_SIZE END
+. if \\n[#PRINT_STYLE]=1 .return
+. if \\n[#IGNORE] .return
+. ps \\$1
+. nr #PT_SIZE_IN_UNITS \\n[.ps]
+. ie '\\$0'DOC_PT_SIZE' \{\
+. if !\\n[#DOCS] .DOC_MACRO_ERROR \\$0
+. br
+. nr #NEW_DOC_PT_SIZE \\n[.ps]
+. if \\n[#DOC_AUTOLEAD] \{\
+. ie !\\n[#DOC_AUTOLEAD_FACTOR] .nr #AUTOLEADING \\n[#DOC_AUTOLEAD]
+. el .nr #AUTOLEADING \\n[.ps]*\\n[#DOC_AUTOLEAD]/1000-\\n[.ps]
+. nr #DOC_LEAD \\n[.ps]+\\n[#AUTOLEADING]
+. nr #RESET_TRAPS 1
+. \}
+. \}
+. el \{\
+. if \\n[#AUTO_LEAD] \{\
+. nr #SAVED_VS \\n[.v]
+. vs \\n[.ps]u+\\n[#AUTOLEADING]u
+. \}
+. \}
+. if \\n[pdfbx-running]=1 \{\
+. nr #VS_DIFF \\n[#SAVED_VS]-\\n[.v]
+. ch FOOTER \\n[#VARIABLE_FOOTER_POS]u+\\n[#VS_DIFF]u
+. \}
+.END
+\#
+\# SIZE (inline)
+\# -------------
+\# *Arguments:
+\# <point size of type>
+\# *Function:
+\# Sets point size to user supplied value in scaled points.
+\# Intended to be called inline with \*[SIZE <n><unit>]
+\# *Notes:
+\# Can be used with a unit of measure or not.
+\#
+.MAC SIZE END
+\c
+.ps \\$1
+.END
+\#
+\# LEADING
+\# -------
+\# *Argument:
+\# <leading between lines of text>
+\# *Function:
+\# Turns off #AUTOLEAD if it's on.
+\# Sets .vs to user supplied value.
+\# *Notes:
+\# Does not require unit of measure. LS automatically turns off AUTOLEAD.
+\#
+.MAC LS END
+. br
+. if \\n[#PRINT_STYLE]=1 .return
+. if \\n[#IGNORE] .return
+. if \\n[#AUTO_LEAD] \{\
+. rr #AUTO_LEAD
+. rr #AUTOLEAD_VALUE
+. rr #AUTOLEADING
+. \}
+. nr #SAVED_VS \\n[.v]
+. vs \\$1
+. if \\n[pdfbx-running]=1 \{\
+. nr #VS_DIFF \\n[#SAVED_VS]-\\n[.v]
+. ch FOOTER \\n[#VARIABLE_FOOTER_POS]u+\\n[#VS_DIFF]u
+. \}
+. if !\\n[#START] \
+. if \\n[.t]<\\n[.v] 'bp
+.END
+\#
+\# AUTOLEAD
+\# --------
+\# *Argument:
+\# <leading value to add to #PT_SIZE> [FACTOR]
+\# *Function:
+\# Stores user supplied auto-lead value in register #AUTOLEAD_VALUE.
+\# Adds #AUT0LEAD_VALUE to #PT_SIZE when invoked to set leading.
+\# All subsequent PT_SIZE requests reset the leading in the same way until
+\# AUTOLEAD is turned off.
+\# *Notes:
+\# With the optional FACTOR argument, the current point size is
+\# multiplied by #AUTOLEAD_VALUE/1000 instead of the two being added
+\# together.
+\#
+.MAC AUTOLEAD END
+. if \\n[#PRINT_STYLE]=1 .return
+. if \\n[#IGNORE] .return
+. nr #AUTO_LEAD 1 \" autolead on or off
+. nr #AUTOLEAD_VALUE (p;\\$1) \" arg x 1000
+. ie '\\$2'FACTOR' \{\
+. if !\\n[#DOCS] .nr #DOC_AUTOLEAD_FACTOR \\n[#AUTOLEAD_VALUE] \" save for DOC_PT_SIZE
+. nr #AUTOLEADING \\n[.ps]*\\n[#AUTOLEAD_VALUE]/1000-\\n[.ps]
+. \}
+. el .nr #AUTOLEADING \\n[#AUTOLEAD_VALUE]
+. vs \\n[.ps]u+\\n[#AUTOLEADING]u
+.END
+\#
+\# STRINGS FOR INLINE CONTROL OF GENERAL TYPE STYLE
+\# ------------------------------------------------
+.ds ROM \Ef[R]
+.ds IT \Ef[I]
+.ds BD \Ef[B]
+.ds BDI \Ef[BI]
+.ds PREV \Ef[]
+.ds S \Es
+\#
+\# =====================================================================
+\#
+\# +++KERNING+++
+\#
+\# AUTOMATIC PAIRWISE KERNING
+\# --------------------------
+\# *Arguments:
+\# <none> | <anything>
+\# *Function:
+\# Turns automatic pairwise kerning on or off.
+\#
+.MAC KERN END
+. ie '\\$1'' \{\
+. kern
+. nr #KERN 1
+. \}
+. el \{\
+. kern 0
+. nr #KERN 0
+. \}
+.END
+\#
+\# INLINE KERNING AND HORIZONTAL MOVEMENT
+\# --------------------------------------
+\#
+\# Inline kerning provides a simple way to adjust the amount of
+\# space between any two letters. It's predicated on a unit of
+\# measure "U", which, by default, is 1/36 of the current point
+\# size as returned by \n[.ps]; e.g., if the current point size is
+\# 18, \n[.ps] returns 18000u, therefore U=500u. Since U remains
+\# proportional relative to the current point size, the amount of
+\# kerning between two letters as expressed in Us remains visually
+\# similar regardless of changes in point size.
+\#
+\# The default value for U may be changed or reset with the
+\# KERN_UNIT macro.
+\#
+.MAC KERN_UNIT END
+. ie '\\$1'DEFAULT' .ds $KERN_UNIT 36
+. el .ds $KERN_UNIT \\$1
+.END
+\#
+.ds $KERN_UNIT 36
+.ds BU \h'-(\En[.ps]u/\E*[$KERN_UNIT]u*\\$1u)'
+.ds FU \h'(\En[.ps]u/\E*[$KERN_UNIT]u*\\$1u)'
+\#
+\# Initialize strings for pre-1.1.3c-style BU and FU
+\#
+.nr #LOOP 0 1
+.while \n+[#LOOP]<37 \{\
+. ds BU\n[#LOOP] \h'-(\En[.ps]u/\E*[$KERN_UNIT]u*\n[#LOOP]u)'
+. ds FU\n[#LOOP] \h'(\En[.ps]u/\E*[$KERN_UNIT]u*\n[#LOOP]u)'
+.\}
+\#
+\# Horizontal movements
+\# --------------------
+\# BP1...12.75 and FP1...12.75 move backwards or forwards inline by the
+\# specified number of points.
+\#
+.ds BCK \h'-\\$1'
+.ds FWD \h'\\$1'
+\#
+.ds BP.25 \h'-.25'
+.ds BP.5 \h'-.5'
+.ds BP.75 \h'-.75'
+.ds BP1 \h'-1p'
+.ds BP1.25 \h'-1.25p'
+.ds BP1.5 \h'-1.5p'
+.ds BP1.75 \h'-1.75p'
+.ds BP2 \h'-2p'
+.ds BP2.25 \h'-2.25p'
+.ds BP2.5 \h'-2.5p'
+.ds BP2.75 \h'-2.75p'
+.ds BP3 \h'-3p'
+.ds BP3.25 \h'-3.25p'
+.ds BP3.5 \h'-3.5p'
+.ds BP3.75 \h'-3.75p'
+.ds BP4 \h'-4p'
+.ds BP4.25 \h'-4.25p'
+.ds BP4.5 \h'-4.5p'
+.ds BP4.75 \h'-4.75p'
+.ds BP5 \h'-5p'
+.ds BP5.25 \h'-5.25p'
+.ds BP5.5 \h'-5.5p'
+.ds BP5.75 \h'-5.75p'
+.ds BP6 \h'-6p'
+.ds BP6.25 \h'-6.25p'
+.ds BP6.5 \h'-6.5p'
+.ds BP6.75 \h'-6.75p'
+.ds BP7 \h'-7p'
+.ds BP7.25 \h'-7.25p'
+.ds BP7.5 \h'-7.5p'
+.ds BP7.75 \h'-7.75p'
+.ds BP8 \h'-8p'
+.ds BP8.25 \h'-8.25p'
+.ds BP8.5 \h'-8.5p'
+.ds BP8.75 \h'-8.75p'
+.ds BP9 \h'-9p'
+.ds BP9.25 \h'-9.25p'
+.ds BP9.5 \h'-9.5p'
+.ds BP9.75 \h'-9.75p'
+.ds BP10 \h'-10p'
+.ds BP10.25 \h'-10.25p'
+.ds BP10.5 \h'-10.5p'
+.ds BP10.75 \h'-10.75p'
+.ds BP11 \h'-11p'
+.ds BP11.25 \h'-11.25p'
+.ds BP11.5 \h'-11.5p'
+.ds BP11.75 \h'-11.75p'
+.ds BP12 \h'-12p'
+.ds BP12.25 \h'-12.25p'
+.ds BP12.5 \h'-12.5p'
+.ds BP12.75 \h'-12.75p'
+\#
+.ds FP.25 \h'.25'
+.ds FP.5 \h'.5'
+.ds FP.75 \h'.75'
+.ds FP1 \h'1p'
+.ds FP1.25 \h'1.25p'
+.ds FP1.5 \h'1.5p'
+.ds FP1.75 \h'1.75p'
+.ds FP2 \h'2p'
+.ds FP2.25 \h'2.25p'
+.ds FP2.5 \h'2.5p'
+.ds FP2.75 \h'2.75p'
+.ds FP3 \h'3p'
+.ds FP3.25 \h'3.25p'
+.ds FP3.5 \h'3.5p'
+.ds FP3.75 \h'3.75p'
+.ds FP4 \h'4p'
+.ds FP4.25 \h'4.25p'
+.ds FP4.5 \h'4.5p'
+.ds FP4.75 \h'4.75p'
+.ds FP5 \h'5p'
+.ds FP5.25 \h'5.25p'
+.ds FP5.5 \h'5.5p'
+.ds FP5.75 \h'5.75p'
+.ds FP6 \h'6p'
+.ds FP6.25 \h'6.25p'
+.ds FP6.5 \h'6.5p'
+.ds FP6.75 \h'6.75p'
+.ds FP7 \h'7p'
+.ds FP7.25 \h'7.25p'
+.ds FP7.5 \h'7.5p'
+.ds FP7.75 \h'7.75p'
+.ds FP8 \h'8p'
+.ds FP8.25 \h'8.25p'
+.ds FP8.5 \h'8.5p'
+.ds FP8.75 \h'8.75p'
+.ds FP9 \h'9p'
+.ds FP9.25 \h'9.25p'
+.ds FP9.5 \h'9.5p'
+.ds FP9.75 \h'9.75p'
+.ds FP10 \h'10p'
+.ds FP10.25 \h'10.25p'
+.ds FP10.5 \h'10.5p'
+.ds FP10.75 \h'10.75p'
+.ds FP11 \h'11p'
+.ds FP11.25 \h'11.25p'
+.ds FP11.5 \h'11.5p'
+.ds FP11.75 \h'11.75p'
+.ds FP12 \h'12p'
+.ds FP12.25 \h'12.25p'
+.ds FP12.5 \h'12.5p'
+.ds FP12.75 \h'12.75p'
+\#
+\# WHOLE LINE (TRACK) KERNING
+\# --------------------------
+\# *Argument:
+\# <amount of track kerning>
+\# *Function:
+\# Invokes .tkf (track kerning) for the current font with
+\# 1 as both the upper and lower point size limits, so that
+\# the value entered by the user applies regardless of point
+\# size. RW ("Reduce Whitespace") reduces the amount of space
+\# between all characters by an equal amount. EW ("Extra
+\# Whitespace") increases the amount of space.
+\# *Notes:
+\# Decimal values are acceptable.
+\#
+\# A value of 1 will produce an unacceptably tight or loose line
+\# at most text point sizes; therefore, effective use of RW and
+\# EW is in the fractional range below 1.
+\#
+\# \n[.f] holds the current font number, which is acceptable to .tkf.
+\#
+\# RW and EW must be reset to 0 to cancel their effect on subsequent
+\# output lines.
+\#
+.MAC RW END
+. if \\n[#BR_AT_LINE_KERN] \{\
+. ie \\n[#JUSTIFY]=1 .brp
+. el .br
+. \}
+. rr #EW
+. rm $EW
+. nr #RW 1
+. ds $RW \\$1
+. tkf \\n[.f] 1 -\\$1 1 -\\$1
+.END
+\#
+.MAC EW END
+. if \\n[#BR_AT_LINE_KERN] \{\
+. ie \\n[#JUSTIFY]=1 .brp
+. el .br
+. \}
+. rr #RW
+. rm $RW
+. nr #EW 1
+. ds $EW \\$1
+. tkf \\n[.f] 1 \\$1 1 \\$1
+.END
+\#
+\# BREAK AT LINE KERN
+\# ------------------
+\# *Arguments:
+\# toggle
+\# *Function:
+\# Enables/disables .br's before .RW and .EW
+\# *Notes:
+\# Mostly, users will want .br's before any kind of line kerning, but
+\# there may be cases where they don't. BR_AT_LINE_KERN is off by
+\# default and must be invoked explicitly.
+\#
+.MAC BR_AT_LINE_KERN END
+. ie '\\$1'' .nr #BR_AT_LINE_KERN 1
+. el .rr #BR_AT_LINE_KERN
+.END
+\#
+\# =====================================================================
+\#
+\# +++HYPHENATION+++
+\#
+\# AUTO HYPHENATION
+\# ----------------
+\# *Arguments:
+\# <none> | <anything> | DEFAULT
+\# or
+\# LINES <n> | MARGIN <n> | SPACE <n>
+\# *Function:
+\# Turns auto hyphenation on or off, resets the hyphenation style
+\# to default, or permits the setting of various hyphenation
+\# parameters.
+\# *Notes:
+\# HY, by itself, defaults to .hy 14, i.e. no hyphens after the
+\# first two or before the last two characters of a word, and no
+\# hyphenation of the last line prior to a trap (e.g., at the
+\# bottom of a page).
+\#
+\# HY DEFAULT resets the hyphenation style to .hy 14 (see
+\# above) if that behaviour is desired after changes have been
+\# made to LINES, MARGIN, or SPACE.
+\#
+\# HY LINES <n> sets the number of allowable consecutive hyphenated lines.
+\#
+\# HY MARGIN <n> sets the amount of space (ipPcm) allowed at the end
+\# of a line in QUAD mode before hyphenation is tripped (e.g. if there's
+\# only 6 points left, groff won't try to hyphenate the next word).
+\#
+\# HY SPACE sets the amount of extra interword space (ipPcm) that can
+\# be added in JUSTIFY mode to prevent a line from being hyphenated.
+\#
+.MAC HY END
+. ie '\\$1'' \{\
+. hy 14
+. if \\n[#LINES] .hlm \\n[#LINES]
+. if \\n[#MARGIN] .hym \\n[#MARGIN]]
+. if \\n[#SPACE] .hys \\n[#SPACE]
+. nr #HYPHENATE 1
+. \}
+. el \{\
+. if !'\\$1'LINES' \{\
+. nh
+. nr #HYPHENATE 0
+. \}
+. if !'\\$1'MARGIN' \{\
+. nh
+. nr #HYPHENATE 0
+. \}
+. if !'\\$1'SPACE' \{\
+. nh
+. nr #HYPHENATE 0
+. \}
+. if !'\\$1'DEFAULT' \{\
+. nh
+. nr #HYPHENATE 0
+. \}
+. if '\\$1'LINES' \{\
+. hlm \\$2
+. nr #HY_LINES \\$2
+. \}
+. if '\\$1'MARGIN' \{\
+. hym \\$2
+. nr #HY_MARGIN \\$2
+. \}
+. if '\\$1'SPACE' \{\
+. hys \\$2
+. nr #HY_SPACE \\$2
+. \}
+. if '\\$1'DEFAULT' \{\
+. hlm -1
+. hym 0
+. hys 0
+. rr #HY_LINES
+. rr #HY_SPACE
+. rr #HY_MARGIN
+. \}
+. \}
+.END
+\#
+\# HYPHENATION PARAMETERS
+\# ----------------------
+\# *Arguments:
+\# <# of lines> | <size of margin> | <amount of interword space>
+\# *Function:
+\# Allows user to specify .HY LINES, MARGIN, and SPACE with a single command.
+\#
+.MAC HY_SET END
+. nr #HY_SET 1
+. hlm \\$1
+. hym \\$2
+. hys \\$3
+.END
+\#
+\# =====================================================================
+\#
+\# +++VERTICAL SPACING+++
+\#
+\# ADVANCE LEAD
+\# ------------
+\# *Argument:
+\# <user supplied lead to advance below current baseline>
+\# *Function:
+\# Creates or modifies register #ALD. Adds user supplied lead
+\# below current baseline.
+\# *Notes:
+\# Requires a unit of measure.
+\#
+.MAC ALD END
+. if '\\$0'ALD' \{\
+. nr #ALD (u;\\$1)
+. sp \\n[#ALD]u
+. \}
+. if '\\$0'ADD_SPACE' \{\
+. vpt 0
+. nr #ALD \\$1
+. rs
+. nop \&
+. br
+. sp |\\n[#T_MARGIN]u-1v+\\n[#ALD]u
+. rr @TOP
+. nr #SPACE_ADDED 1
+. vpt
+. \}
+. if '\\$0'SPACE' .sp \\$1
+. if '\\$0'SP' .sp \\$1
+.END
+\#
+\# REVERSE LEAD
+\# ------------
+\# *Argument:
+\# <user supplied lead to reverse above current baseline>
+\# *Function:
+\# Creates or modifies register #RLD. Reverses user supplied
+\# lead above current baseline.
+\# *Notes:
+\# Requires a unit of measure.
+\#
+.MAC RLD END
+. br
+. nr #RLD (u;\\$1)
+. sp -\\n[#RLD]u
+.END
+\#
+\# ALD/RLD STRINGS
+\# ---------------
+\# The strings \*[ALD.25]...\*[ALD12.75] and their corresponding
+\# \*[RLD] forms have been left in for backward compatibility with
+\# documents created using mom-1.1.3c or earlier. The preferred methods
+\# of advancing and reversing on the page inline are \*[UP <n><unit>]
+\# and \*[DOWN <n><unit>].
+\#
+.ds DOWN \v'\\$1'
+.ds UP \v'-\\$1'
+\#
+.ds ALD.25 \v'.25p'
+.ds ALD.5 \v'.5p'
+.ds ALD.75 \v'.75p'
+.ds ALD1 \v'1p'
+.ds ALD1.25 \v'1.25p'
+.ds ALD1.5 \v'1.5p'
+.ds ALD1.75 \v'1.75p'
+.ds ALD2 \v'2p'
+.ds ALD2.25 \v'2.25p'
+.ds ALD2.5 \v'2.5p'
+.ds ALD2.75 \v'2.75p'
+.ds ALD3 \v'3p'
+.ds ALD3.25 \v'3.25p'
+.ds ALD3.5 \v'3.5p'
+.ds ALD3.75 \v'3.75p'
+.ds ALD4 \v'4p'
+.ds ALD4.25 \v'4.25p'
+.ds ALD4.5 \v'4.5p'
+.ds ALD4.75 \v'4.75p'
+.ds ALD5 \v'5p'
+.ds ALD5.25 \v'5.25p'
+.ds ALD5.5 \v'5.5p'
+.ds ALD5.75 \v'5.75p'
+.ds ALD6 \v'6p'
+.ds ALD6.25 \v'6.25p'
+.ds ALD6.5 \v'6.5p'
+.ds ALD6.75 \v'6.75p'
+.ds ALD7 \v'7p'
+.ds ALD7.25 \v'7.25p'
+.ds ALD7.5 \v'7.5p'
+.ds ALD7.75 \v'7.75p'
+.ds ALD8 \v'8p'
+.ds ALD8.25 \v'8.25p'
+.ds ALD8.5 \v'8.5p'
+.ds ALD8.75 \v'8.75p'
+.ds ALD9 \v'9p'
+.ds ALD9.25 \v'9.25p'
+.ds ALD9.5 \v'9.5p'
+.ds ALD9.75 \v'9.75p'
+.ds ALD10 \v'10p'
+.ds ALD10.25 \v'10.25p'
+.ds ALD10.5 \v'10.5p'
+.ds ALD10.75 \v'10.75p'
+.ds ALD11 \v'11p'
+.ds ALD11.25 \v'11.25p'
+.ds ALD11.5 \v'11.5p'
+.ds ALD11.75 \v'11.75p'
+.ds ALD12 \v'12p'
+.ds ALD12.25 \v'12.5p'
+.ds ALD12.5 \v'12.5p'
+.ds ALD12.75 \v'12.75p'
+\#
+.ds RLD.25 \v'-.25p'
+.ds RLD.5 \v'-.5p'
+.ds RLD.75 \v'-.75p'
+.ds RLD1 \v'-1p'
+.ds RLD1.25 \v'-1.25p'
+.ds RLD1.5 \v'-1.5p'
+.ds RLD1.75 \v'-1.75p'
+.ds RLD2 \v'-2p'
+.ds RLD2.25 \v'-2.25p'
+.ds RLD2.5 \v'-2.5p'
+.ds RLD2.75 \v'-2.75p'
+.ds RLD3 \v'-3p'
+.ds RLD3.25 \v'-3.25p'
+.ds RLD3.5 \v'-3.5p'
+.ds RLD3.75 \v'-3.75p'
+.ds RLD4 \v'-4p'
+.ds RLD4.25 \v'-4.25p'
+.ds RLD4.5 \v'-4.5p'
+.ds RLD4.75 \v'-4.75p'
+.ds RLD5 \v'-5p'
+.ds RLD5.25 \v'-5.25p'
+.ds RLD5.5 \v'-5.5p'
+.ds RLD5.75 \v'-5.75p'
+.ds RLD6 \v'-6p'
+.ds RLD6.25 \v'-6.25p'
+.ds RLD6.5 \v'-6.5p'
+.ds RLD6.75 \v'-6.75p'
+.ds RLD7 \v'-7p'
+.ds RLD7.25 \v'-7.25p'
+.ds RLD7.5 \v'-7.5p'
+.ds RLD7.75 \v'-7.75p'
+.ds RLD8 \v'-8p'
+.ds RLD8.25 \v'-8.25p'
+.ds RLD8.5 \v'-8.5p'
+.ds RLD8.75 \v'-8.75p'
+.ds RLD9 \v'-9p'
+.ds RLD9.25 \v'-9.25p'
+.ds RLD9.5 \v'-9.5p'
+.ds RLD9.75 \v'-9.75p'
+.ds RLD10 \v'-10p'
+.ds RLD10.25 \v'-10.25p'
+.ds RLD10.5 \v'-10.5p'
+.ds RLD10.75 \v'-10.75p'
+.ds RLD11 \v'-11p'
+.ds RLD11.25 \v'-11.25p'
+.ds RLD11.5 \v'-11.5p'
+.ds RLD11.75 \v'-11.75p'
+.ds RLD12 \v'-12p'
+.ds RLD12.25 \v'-12.5p'
+.ds RLD12.5 \v'-12.5p'
+.ds RLD12.75 \v'-12.75p'
+\#
+\# =====================================================================
+\#
+\# +++REFINEMENTS+++
+\#
+\# AUTOMATIC LIGATURES
+\# -------------------
+\# *Arguments:
+\# <none> | <anything>
+\# *Function:
+\# Turns automatic ligature generation on or off.
+\# *Notes:
+\# Ligatures may be supplied manually with \[fi], \[fl], etc.
+\#
+.MAC LIGATURES END
+. ie '\\$1'' \{\
+. lg
+. nr #LIGATURES 1
+. \}
+. el \{\
+. lg 0
+. nr #LIGATURES 0
+. \}
+.END
+\#
+\# SMARTQUOTES
+\# -----------
+\# *Arguments:
+\# [ ,, ] | [ << ] | [ >> ] | <anything>
+\# or
+\# [ DA | DE | EN | ES | FR | IT | NL | NO | PT | SV ] | <anything>
+\# *Function:
+\# Turns smartquotes on (optionally with a quoting style from the
+\# argument list, or off).
+\# If no quoting style is given, then EN (English) is used by default.
+\# If no quoting style is given and smart quotes have been turned off
+\# previously, the old quoting style will be restored.
+\# *Notes:
+\# The " character is read outside the macro when mom is
+\# processed. The strings for open/close ($QUOTE<n>) are then
+\# defined in the macro.
+\#
+.char " \\*[$QUOTE\\n[#OPEN_CLOSE]]\R'#OPEN_CLOSE (1-\\n[#OPEN_CLOSE])'
+.nr #SQ_ON 0
+\#
+.MAC SMARTQUOTES END
+.\" First " will be translated to $QUOTE0
+. nr #OPEN_CLOSE 0
+. if '\\$1'' \{\
+. if !'\\*[$RESTORE_SQ]'' \{\
+. SMARTQUOTES \\*[$RESTORE_SQ]
+. return
+. \}
+.\" Default smart quotes (English)
+. ds $QUOTE0 \[lq]
+. ds $QUOTE1 \[rq]
+. ds $RESTORE_SQ EN
+. nr #SQ_ON 1
+. return
+. \}
+. if '\\$1',,' \{\
+. ds $QUOTE0 \[Bq]
+. ds $QUOTE1 \[lq]
+. ds $RESTORE_SQ \\$1
+. nr #SQ_ON 1
+. return
+. \}
+. if '\\$1'<<' \{\
+. ds $QUOTE0 \[Fo]
+. ds $QUOTE1 \[Fc]
+. ds $RESTORE_SQ \\$1
+. nr #SQ_ON 1
+. return
+. \}
+. if '\\$1'>>' \{\
+. ds $QUOTE0 \[Fc]
+. ds $QUOTE1 \[Fo]
+. ds $RESTORE_SQ \\$1
+. nr #SQ_ON 1
+. return
+. \}
+. if '\\$1'DA' \{\
+. ds $QUOTE0 \[Fc]
+. ds $QUOTE1 \[Fo]
+. ds $RESTORE_SQ \\$1
+. nr #SQ_ON 1
+. return
+. \}
+. if '\\$1'DE' \{\
+. ds $QUOTE0 \[Bq]
+. ds $QUOTE1 \[lq]
+. ds $RESTORE_SQ \\$1
+. nr #SQ_ON 1
+. return
+. \}
+. if '\\$1'EN' \{\
+. ds $QUOTE0 \[lq]
+. ds $QUOTE1 \[rq]
+. ds $RESTORE_SQ \\$1
+. nr #SQ_ON 1
+. return
+. \}
+. if '\\$1'ES' \{\
+. ds $QUOTE0 \[lq]
+. ds $QUOTE1 \[rq]
+. ds $RESTORE_SQ \\$1
+. nr #SQ_ON 1
+. return
+. \}
+. if '\\$1'FR' \{\
+. ds $QUOTE0 \[Fo]\|
+. ds $QUOTE1 \|\[Fc]
+. ds $RESTORE_SQ \\$1
+. nr #SQ_ON 1
+. return
+. \}
+. if '\\$1'IT' \{\
+. ds $QUOTE0 \[Fo]\|
+. ds $QUOTE1 \|\[Fc]
+. ds $RESTORE_SQ \\$1
+. nr #SQ_ON 1
+. return
+. \}
+. if '\\$1'NL' \{\
+. ds $QUOTE0 \[rq]
+. ds $QUOTE1 \[rq]
+. ds $RESTORE_SQ \\$1
+. nr #SQ_ON 1
+. return
+. \}
+. if '\\$1'NO' \{\
+. ds $QUOTE0 \[Fo]
+. ds $QUOTE1 \[Fc]
+. ds $RESTORE_SQ \\$1
+. nr #SQ_ON 1
+. return
+. \}
+. if '\\$1'PT' \{\
+. ds $QUOTE0 \[Fo]
+. ds $QUOTE1 \[Fc]
+. ds $RESTORE_SQ \\$1
+. nr #SQ_ON 1
+. return
+. \}
+. if '\\$1'SV' \{\
+. ds $QUOTE0 \[Fc]
+. ds $QUOTE1 \[Fc]
+. ds $RESTORE_SQ \\$1
+. nr #SQ_ON 1
+. return
+. \}
+.\" None of the above -> turn smartquotes off
+. ds $QUOTE0 \[dq]
+. ds $QUOTE1 \[dq]
+. nr #SQ_ON 0
+.END
+\#
+.ds $QUOTE0 \[lq]
+.ds $QUOTE1 \[rq]
+\#
+\# Strings for foot and inch marks
+\#
+.ds FOOT \[fm]
+.ds INCH \[fm]\[fm]
+\#
+\# =====================================================================
+\#
+\# +++LINE BREAKS+++
+\#
+\# NO-SPACE BREAK
+\# --------------
+\# *Argument:
+\# <none>
+\# *Function:
+\# Breaks a line without advancing.
+\# *Notes:
+\# EL is the mnemonic used on older, dedicated typesetting machines
+\# to indicate "process the line, without advancing the galley
+\# medium." It stands for End Line.
+\#
+\# The \c inline must be appended to the end of input lines when in
+\# nofill mode; in fill modes, the \c inline must not be used.
+\#
+.MAC EL END
+. TRAP OFF
+. if \\n[#PSEUDO_FILL]=1 \&
+. br
+. sp -1v
+. TRAP
+.END
+\#
+\# An inline escape to accomplish the same thing.
+\# Preferable, since it works with filled and non-filled copy and
+\# doesn't require the user to remember whether to use (or not use)
+\# \c.
+\#
+.ds B \h'|0'\R'#NO_ADVANCE 1'\c
+\#
+\# =====================================================================
+\#
+\# +++FILLING/QUADDING/JUSTIFYING+++
+\#
+\# JUSTIFY
+\# -------
+\# *Argument:
+\# <none>
+\# *Function:
+\# Turns fill on and sets .ad to b.
+\# *Notes:
+\# Justifies text left and right.
+\#
+.MAC JUSTIFY END
+\#. if r pdfbx-top 'sp -1
+. if \\n[#TAB_ACTIVE]=0 \{\
+. nr #QUAD 1
+. ds $RESTORE_QUAD_VALUE \\*[$QUAD_VALUE]
+. \}
+' ce 0
+. QUAD J
+. if \\n[#PRINT_STYLE]=1 .QUAD L
+. nr #PSEUDO_FILL 0
+.END
+\#
+\# QUAD
+\# ----
+\# *Arguments:
+\# L | LEFT | R | RIGHT | C | CENTER/CENTRE
+\# *Function:
+\# Turns fill on and sets .ad to l, r, or c.
+\# *Notes:
+\# Terminology is a problem here. Some people call quad left
+\# left justified, flush left, or flush left/rag right (and the
+\# reverse for quad right). Quad center is sometimes called rag
+\# both. For our purposes, all "quad" modes mean that groff fill
+\# mode is enabled.
+\#
+.MAC QUAD END
+. if r pdfbx-top \{\
+' sp -1
+. rr pdfbx-top
+. \}
+.\" The QUAD in PP adds an unwanted linespace after a HEADING at the
+.\" top of a pdf box because of this .br, so HEADING assigns the
+.\" tmp register "bx-top\n[stack]" to inhibit it.
+. ie !r pdfbx-top\\n[stack] .br
+. el .rr pdfbx-top\\n[stack]
+. if \\n[#COVERTEXT_PP] \
+. ds $RESTORE_DOC_QUAD \\*[$QUAD_VALUE]
+. ds $QUAD_VALUE \\$1
+. substring $QUAD_VALUE 0 0
+. if \\n[#TAB_ACTIVE]=0 \{\
+. nr #QUAD 1
+. ds $RESTORE_QUAD_VALUE \\*[$QUAD_VALUE]
+. \}
+' ce 0
+' fi
+. if '\\*[$QUAD_VALUE]'L' \{\
+. nr #JUSTIFY 0
+. ad l
+. \}
+. if '\\*[$QUAD_VALUE]'R' \{\
+. nr #JUSTIFY 0
+. ad r
+. \}
+. if '\\*[$QUAD_VALUE]'C' \{\
+. nr #JUSTIFY 0
+. ad c
+. \}
+. if '\\*[$QUAD_VALUE]'J' \{\
+. nr #JUSTIFY 1
+. ad b
+. \}
+. nr #PSEUDO_FILL 0
+.END
+\#
+\# LEFT, RIGHT, AND CENTER
+\# -----------------------
+\# The purpose of these macros is to allow the user to enter lines
+\# of text that will be quadded LRC without having to stick .BR
+\# or .br between lines. For the sake of consistency, all three
+\# appear to behave similarly (from the point of view of the user),
+\# although the underlying primitives don't. For this reason, LEFT,
+\# RIGHT, and CENTER must be followed by .QUAD [L R C J] or .JUSTIFY
+\# to restore text to fill mode.
+\#
+\# LEFT
+\# ----
+\# *Argument:
+\# <none>
+\# *Function:
+\# Turns fill mode off. Allows user to quad lines left without
+\# requiring the .BR or .br macro.
+\# *Notes:
+\# LEFT simply turns fill off. Lines that exceed the current LL
+\# will not be broken. Note that this behaviour differs from the
+\# RIGHT and CENTER macros.
+\#
+.MAC LEFT END
+. if \\n[#TAB_ACTIVE]=0 \{\
+. rr #QUAD
+. ds $RESTORE_QUAD_VALUE LEFT
+. \}
+. ce 0
+. nf
+. nr #PSEUDO_FILL 1
+.\" Fix for a little conflict with DOCTYPE LETTER
+. if '\\n[.z]'LETTERHEAD1' .rr #DATE_FIRST
+.END
+\#
+\# RIGHT
+\# -----
+\# *Argument:
+\# <none>
+\# *Function:
+\# Turns fill on. Allows user to quad lines right without
+\# requiring the .BR or .br macro.
+\# *Notes:
+\# Lines that exceed the current LL will be broken, with the excess
+\# text quadded right.
+\#
+.MAC RIGHT END
+. if \\n[#TAB_ACTIVE]=0 \{\
+. rr #QUAD
+. ds $RESTORE_QUAD_VALUE RIGHT
+. \}
+. nf
+. rj 100000
+. nr #PSEUDO_FILL 1
+.END
+\#
+\# CENTER
+\# ------
+\# *Argument:
+\# <none>
+\# *Function:
+\# Turns fill off. Allows user to center lines without
+\# requiring the .BR or .br macro.
+\# *Notes:
+\# Lines that exceed the current LL will be broken, with the excess
+\# text centered.
+\#
+.MAC CENTER END
+. if \\n[#TAB_ACTIVE]=0 \{\
+. rr #QUAD
+. ds $RESTORE_QUAD_VALUE CENTER
+. \}
+. nf
+. ce 100000
+. nr #PSEUDO_FILL 1
+.END
+\#
+\# CENTER BLOCKS OF TYPE
+\# ---------------------
+\# *Arguments:
+\# <none> | <anything>
+\# *Function:
+\# Allows users to centre blocks of type on the page without
+\# altering their quad.
+\#
+.MAC CENTER_BLOCK END
+. br
+. ie !\\n[.$] .di CENTER*BLOCK
+. el \{\
+. di
+. in \\n[.l]u-\\n[dl]u/2u
+. if \\n[.u] .nr #FILLED 1
+. nf
+. CENTER*BLOCK
+. if \\n[#FILLED] .fi
+. rr #FILLED
+. in
+. \}
+.END
+\#
+.ALIAS CENTRE_BLOCK CENTER_BLOCK
+\#
+\# =====================================================================
+\#
+\# +++TABS+++
+\#
+\# There are two different kinds of tabs: typesetting tabs and
+\# string tabs.
+\#
+\# Typesetting tabs are set with TAB_SET, which requires a tab number,
+\# an indent (offset) from the left margin and a length (optionally
+\# with a quad direction and an instruction to fill lines). After tabs
+\# are set with TAB_SET, they are called with .TAB n, where "n"
+\# corresponds to the number passed to TAB_SET as a valid tab number.
+\#
+\# String tabs allow the user to mark off tab positions inline. Tab
+\# indents and lengths are calculated from the beginning and end
+\# positions of the marks. Up to 19 string tabs may be created,
+\# numbered 1-19. Once created, they are called with .TAB n,
+\# just like typesetting tabs.
+\#
+\# Setting up string tabs is a two-step procedure. First, the user
+\# enters an input line in which s/he wants to mark off string tabs.
+\# The beginning of a tab is marked with \*[STn], where "n" is
+\# the desired number of the tab. The end of the tab is marked
+\# with \*[STnX]. All ST's must have a matching STX. String tabs
+\# may be nested.
+\#
+\# Next, the user invokes .ST n for every string tab defined, and
+\# optionally passes quad information to it. That done, string tabs
+\# can be called just like typesetting tabs.
+\#
+\# Strings for string tab inlines
+\# ------------------------------
+\# Initialize string tab markers numbered 1 to 19.
+\#
+.nr #LOOP 0 1
+.while \n+[#LOOP]<20 \{\
+. ds ST\n[#LOOP] \Ek[#ST\n[#LOOP]_OFFSET]
+.\}
+\#
+.nr #LOOP 0 1
+.while \n+[#LOOP]<20 \{\
+. ds ST\n[#LOOP]X \Ek[#ST\n[#LOOP]_MARK]
+.\}
+.rr #LOOP
+\#
+\# These are reserved ST numbers for internal use
+.ds ST100 \Ek[#ST100_OFFSET]
+.ds ST100X \Ek[#ST100_MARK]
+.ds ST101 \Ek[#ST101_OFFSET]
+.ds ST101X \Ek[#ST101_MARK]
+.ds ST102 \Ek[#ST102_OFFSET]
+.ds ST102X \Ek[#ST102_MARK]
+.ds ST103 \Ek[#ST103_OFFSET]
+.ds ST103X \Ek[#ST103_MARK]
+\#
+\# QUAD AND SET STRING TABS
+\# ------------------------
+\# *Arguments:
+\# <stringtab number> L | R | C | J [QUAD]
+\# *Function:
+\# Creates strings $ST<#>_QUAD_DIR and $ST<#>_FILL, then sets up a
+\# tab based on the collected information.
+\# *Notes:
+\# Like TAB_SET, ST invoked without a quad direction will default to LEFT.
+\# If lines should be filled and quadded, use the optional argument QUAD.
+\# N.B. -- indents *must* be turned off before setting string tabs
+\# inside .PAD
+\#
+.MAC ST END
+. ds $ST\\$1_QUAD_DIR \\$2
+. if \\n[#NUM_ARGS]=3 .ds $ST\\$1_FILL QUAD
+. nr #ST\\$1_LENGTH \\n[#ST\\$1_MARK]-\\n[#ST\\$1_OFFSET]
+. ie \\n[#IN_TAB] \
+. TAB_SET \\$1 \\n[#ST\\$1_OFFSET]u+\\n[#ST_OFFSET]u \
+ \\n[#ST\\$1_LENGTH]u \\*[$ST\\$1_QUAD_DIR] \\*[$ST\\$1_FILL]
+. el \
+. TAB_SET \\$1 \\n[#ST\\$1_OFFSET]u \\n[#ST\\$1_LENGTH]u \
+ \\*[$ST\\$1_QUAD_DIR] \\*[$ST\\$1_FILL]
+.END
+\#
+\# TAB SET
+\# -------
+\# *Arguments:
+\# <n> ident(ipPcm) length(ipPcm) [L | R | C | J [QUAD]]
+\# *Function:
+\# Creates macros TABn and TAB n, where "n" is any arbitrary number.
+\# TABn is a typesetting tab (i.e. a tab defined as an indent
+\# from the page left offset plus a line length.)
+\# *Notes:
+\# n = arbitrary digit to identify the tab
+\# indent = indent from left margin; unit of measure required
+\# length = length of tab (unit of measure required; can be
+\# \w'<string>'u--if more than one word in string, surround
+\# with double quotes "\w'<three word string>'"
+\# LRCJ = quad for tab (left, right, center, justified)
+\# If option QUAD afterwards is not given, quad is line for line
+\# (no fill mode), meaning that there's no need for .BR or .br
+\# between lines.
+\# QUAD = fill tab (so it behaves as if .QUAD LRC or .JUSTIFY
+\# had been given).
+\#
+\# N.B. -- indents *must* be turned off before setting tabs
+\#
+\# Tabs are not columnar in behaviour. .TN and \*[TB+] permit
+\# bottom-line to bottom-line tab movement.
+\#
+\# When resetting tabs, .TQ must be invoked before .TAB_SET.
+\#
+\# Indents are turned off automatically whenever a new tab is called
+\# with TAB <n>.
+\#
+\# Generally, it's a good idea to make sure all indents are off
+\# before setting tabs.
+\#
+.MAC TAB_SET END
+. br
+. nr #TAB_NUMBER \\$1
+. ds $CURRENT_TAB \\n[#TAB_NUMBER]
+. nr #TAB_OFFSET (\\$2)
+. nr #TAB_LENGTH (\\$3)
+. MAC TAB\\n[#TAB_NUMBER]
+. if !\\\\n[#TB+]=1 .br
+. if \\\\n[#TB+]=1 \{\
+. EL
+. vpt 0
+. rr #TB+
+. \}
+. in 0
+. nr #TAB_ACTIVE 1
+. nr #CURRENT_TAB \\n[#TAB_NUMBER]
+. ds $CURRENT_TAB \\*[$CURRENT_TAB]
+. nr #TAB_OFFSET\\*[$CURRENT_TAB] \\n[#TAB_OFFSET]
+. nr #ST_OFFSET \\n[#TAB_OFFSET]
+. ie !'\\\\n[.z]'' \
+\!. po \\\\\\\\n[#L_MARGIN]u+\\\\n[#TAB_OFFSET\\\\*[$CURRENT_TAB]]u
+. el \
+. po \\\\n[#L_MARGIN]u+\\\\n[#TAB_OFFSET\\\\*[$CURRENT_TAB]]u
+. ll \\n[#TAB_LENGTH]u
+. ta \En[.l]u
+. ie '\\$5'QUAD' \{\
+. if '\\$4'L' .QUAD L
+. if '\\$4'R' .QUAD R
+. if '\\$4'C' .QUAD C
+. if '\\$4'J' .JUSTIFY
+. \}
+. el \{\
+. if '\\$4'' .LEFT
+. if '\\$4'L' .LEFT
+. if '\\$4'R' .RIGHT
+. if '\\$4'C' .CENTER
+. if '\\$4'J' .JUSTIFY
+. \}
+. if \\\\n[#TN]=1 \{\
+. TRAP
+. rr #TN
+. \}
+..
+. rr #TAB_ACTIVE
+.END
+\#
+\# TAB
+\# ---
+\# *Arguments:
+\# <tab number to tab into>
+\# *Function:
+\# Moves to tab number passed as an argument.
+\#
+.MAC TAB END
+. ds $TAB_NUMBER \\$1
+. TAB\\*[$TAB_NUMBER]
+. nr #IN_TAB 1
+.END
+\#
+\# TAB NEXT
+\# --------
+\# *Argument:
+\# <none>
+\# *Function:
+\# Automatically moves to TAB<n+1> on the same line as the last
+\# line of the previous tab.
+\# *Notes:
+\# The \c inline must be appended to the end of input lines when in
+\# nofill mode; in fill modes, the \c inline must not be used.
+\#
+.MAC TN END
+. nr #TN 1
+. vpt 0
+. sp -1v
+. nr #NEXT_TAB \\n[#CURRENT_TAB]+1
+. TAB\\n[#NEXT_TAB]
+. vpt
+.END
+\#
+\# An inline escape to accomplish the same thing. Preferable, since
+\# it works with filled and non-filled copy and doesn't require the
+\# user to remember to use (or not use) the \c.
+\#
+.ds TB+ \
+"\c\R'#TB+ 1'\R'#TN 1'\R'#NEXT_TAB \\n[#CURRENT_TAB]+1'\\*[TAB\\n[#NEXT_TAB]]\c
+\#
+\# TAB QUIT
+\# --------
+\# *Argument:
+\# <none>
+\# *Function:
+\# Sets #TAB_ACTIVE to "0" (off).
+\# Resets left margin to value in effect prior to tabs.
+\# Resets line length to value in effect prior to tabs.
+\# Checks #QUAD to see if we were in flush or quad mode
+\# prior to tabs (0=off, 1=on).
+\# Resets QUAD [ L|R|C ], LEFT, RIGHT, CENTER, or JUSTIFY
+\# in effect prior to tabs.
+\# *Notes:
+\# TQ must precede setting new tabs to get the tabs' indents
+\# measured from page left. Otherwise, the tabs' indents are
+\# measured from the left margin of the currently active tab.
+\#
+.MAC TQ END
+. br
+. rr #TAB_ACTIVE
+. rr #IN_TAB
+. nr #LOOP 0 1
+. while \\n+[#LOOP]<20 \{\
+. rm $ST\\n[#LOOP]_FILL
+. \}
+. rr #LOOP
+. ie !'\\n[.z]'' \{\
+\!. po \\n[#L_MARGIN]u
+\!. ll \\n[#L_LENGTH]u
+. \}
+. el \{\
+. po \\n[#L_MARGIN]u
+. ll \\n[#L_LENGTH]u
+. \}
+. ll \\n[#L_LENGTH]u
+. ta \\n[.l]u
+. ie \\n[#QUAD] \{\
+. ie '\\*[$RESTORE_QUAD_VALUE]'J' .JUSTIFY
+. el .QUAD \\*[$RESTORE_QUAD_VALUE]
+. \}
+. el \{\
+. if '\\*[$RESTORE_QUAD_VALUE]'LEFT' .LEFT
+. if '\\*[$RESTORE_QUAD_VALUE]'RIGHT' .RIGHT
+. if '\\*[$RESTORE_QUAD_VALUE]'CENTER' .CENTER
+. \}
+.END
+\#
+\# ====================================================================
+\#
+\# COLOR HANDLING
+\# ==============
+\#
+\# COLOR
+\# -----
+\# *Arguments:
+\# <pre-defined NEWCOLOR or XCOLOR>
+\# *Function:
+\# Allows the inline escape for setting color to be called
+\# as a macro.
+\#
+.MAC COLOR END
+. ie \\n[.u]=1 \{\
+\c
+\\*[\\$1]\c
+. \}
+. el \\*[\\$1]
+.END
+\#
+\# NEWCOLOR
+\# --------
+\# *Arguments:
+\# <color name> [<color scheme>] <color definition>
+\# *Function:
+\# Based on .defcolor, allows users to name and define colors using
+\# one of the four color schemes rgb, cmy, cmyk and grey. The new
+\# color is then defined as a string so that it can be called inline
+\# with \*[COLORNAME] or with .COLOR.
+\# *Notes:
+\# With only two args, the default color scheme is rgb.
+\#
+\# It is highly recommended that users define new colors as
+\# all-cap strings, to differentiate them from x colors, which must
+\# be in lower case.
+\#
+.MAC NEWCOLOR END
+. if \\n[#NUM_ARGS]=2 .defcolor \\$1 rgb \\$2
+. if \\n[#NUM_ARGS]=3 \{\
+. if '\\$2'RGB' .ds $COLOR_SCHEME rgb
+. if '\\$2'CYM' .ds $COLOR_SCHEME cym
+. if '\\$2'CMYK' .ds $COLOR_SCHEME cmyk
+. if '\\$2'GRAY' .ds $COLOR_SCHEME gray
+. if '\\$2'GREY' .ds $COLOR_SCHEME gray
+. defcolor \\$1 \\*[$COLOR_SCHEME] \\$3
+. \}
+. ds \\$1 \\m[\\$1]
+.END
+\#
+\# XCOLOR
+\# ------
+\# *Arguments:
+\# <x color name> [<alias>]
+\# *Function:
+\# Defines a string of x color name (i.e. a predefined x
+\# color). If <alias> is given, creates a string of <alias name>
+\# that references the x color name of the first argument.
+\# *Notes:
+\# The color name must be a valid color name from rgb.txt, and
+\# must be given entirely in lower case, all one word.
+\#
+.MAC XCOLOR END
+. ds \\$1 \m[\\$1]
+. if \\n[#NUM_ARGS]=2 \{\
+. ds \\$2 \m[\\$1]
+. ds $\\$2_FILL \\$1
+. ds COLAL_\\$2 \\$1
+. \}
+.END
+\#
+\# Pre-define xcolors black and white
+\#
+.ds black \m[black]
+.ds BLACK \m[black]
+.ds white \m[white]
+.ds WHITE \m[white]
+.ds default black
+\#
+\# =====================================================================
+\#
+\# +++MISCELLANEOUS USEFUL MACROS AND STRINGS+++
+\#
+.nr _w 500
+.nr _d 1250
+\#
+\# These string are used for creating aliases within loops that set
+\# style for doc-cover, cover, and docheader items. They're defined
+\# here because underscoring needs them.
+\#
+.ds TITLE_TYPE_1 ATTRIBUTE
+.ds TITLE_TYPE_2 AUTHOR
+.ds TITLE_TYPE_3 CHAPTER
+.ds TITLE_TYPE_4 CHAPTER_TITLE
+.ds TITLE_TYPE_5 COVERTITLE
+.ds TITLE_TYPE_6 DOCTITLE
+.ds TITLE_TYPE_7 DOCTYPE
+.ds TITLE_TYPE_8 DOC_COVERTITLE
+.ds TITLE_TYPE_9 SUBTITLE
+.ds TITLE_TYPE_10 TITLE
+.ds TITLE_TYPE_11 MISC
+.ds TITLE_TYPE_12 COPYRIGHT
+.ds TITLE_TYPE_13 DOC_COVER_TITLE
+.ds TITLE_TYPE_14 COVER_TITLE
+\#
+\# UNDERLINE
+\# ---------
+\# *Arguments:
+\# <none> | <anything>
+\# *Function:
+\# Simulates typewriter-style underlining of italic passages.
+\# *Notes:
+\# Defaults for rule weight and distance from baseline are below.
+\# UNDERLINE_SPECS lets user change them
+\#
+.MAC UNDERLINE_SPECS END
+. ie \B'\\$1' .nr _w (u;\\$1)
+. el \{\
+. ie '\\$1'DEFAULT' .nr _w 500
+. el \{\
+. nr _w 500
+. tm1 "[mom]: The first argument to \\$0 must be a numeric
+. tm1 " argument with a unit of measure appended, or DEFAULT.
+. tm1 " Setting underline weight to DEFAULT.
+. \}
+. \}
+. shift
+. ie \B'\\$1' .nr _d (u;\\$1)
+. el \{\
+. ie '\\$1'DEFAULT' .nr _d 1250
+. el \{\
+. nr _d 1250
+. tm1 "[mom]: The second argument to \\$0 must be a numeric
+. tm1 " argument with a unit of measure appended, or DEFAULT.
+. tm1 " Setting underline distance from baseline to DEFAULT.
+. \}
+. \}
+.END
+\#
+.MAC UNDERLINE END
+. ds $SAVED_SS_VAR \\*[$SS_VAR]
+. ie '\\$1'' \{\
+. nr #UNDERLINE_ON 1
+. ss \\n[.ss] 0
+. ie !n .nop \X'ps: exec \\n[_w] \\n[_d] decorline'\c
+. el .cu 1000
+. \}
+. el \{\
+. nr #UNDERLINE_ON 0
+. if !'\\*[$SAVED_SS_VAR]'' .SS \\*[$SAVED_SS_VAR]
+. ie !n .nop \X'ps: exec decornone'\c
+. el .cu 0
+. \}
+.END
+\#
+\# UL/ULX
+\# ------
+\# *Arguments:
+\# <none>
+\# *Function:
+\# Simulates typewriter-style underlining of italic passages.
+\# *Notes:
+\# Intended to be called with inline escapes \*[UL] (underline
+\# on) and \*[ULX] (underline off).
+\#
+.MAC UL END
+\c
+. ds $SAVED_SS_VAR \\*[$SS_VAR]
+. ss \\n[.ss] 0
+. ie !'\\n[.z]'' \{\
+\c
+. ie !n \{\
+. if !\\n[.k]=0 \?\h'-\w'\\n[.ss]'u'\?
+\?\R'#UNDERLINE_ON 1'\X'ps: exec \\n[_w] \\n[_d] decorline'\?\c
+. \}
+. el \{\
+\?\R'#UNDERLINE_ON 1'\?\c
+. cu 1000
+. \}
+. \}
+. el \{\
+. ie !n \{\
+. nr #UNDERLINE_ON 1
+. nop \X'ps: exec \\n[_w] \\n[_d] decorline'\c
+. \}
+. el \{\
+\R'#UNDERLINE_ON 1'\c
+. cu 1000
+. \}
+. \}
+.END
+\#
+.MAC ULX END
+\c
+. SS \\*[$SAVED_SS_VAR]
+. rm $SAVED_SS_VAR
+. ie !'\\n[.z]'' \{\
+\c
+. ie !n \{\
+\?\R'#UNDERLINE_ON 0'\X'ps: exec decornone'\?\c
+. \}
+. el \{\
+\?\R'#UNDERLINE_ON 0'\?\c
+. cu 0
+. \}
+. \}
+. el \{\
+. ie !n \{\
+. nr #UNDERLINE_ON 0
+. nop \X'ps: exec decornone'\c
+. \}
+. el \{\
+. nr #UNDERLINE_ON 0
+. cu 0
+. \}
+. \}
+.END
+\#
+\# UNDERSCORE
+\# ----------
+\# *Arguments:
+\# [<points below baseline>] "text"
+\# *Function:
+\# Places an underscore 2 points under the string if no lead given,
+\# otherwise places underscore under string by user specified amount.
+\# *Notes:
+\# When using this macro, the string to be underscored must begin
+\# with double-quotes ("), regardless of whether it's the sole
+\# argument or the second.
+\# E.g.:
+\# .UNDERSCORE "Text to be underscored
+\# or
+\# .UNDERSCORE 2p "Text to be underscored
+\#
+\# UNDERSCORE does not work across line breaks. Each line of text
+\# must be entered separately. If the UNDERSCORE begins in the
+\# middle of a line and crosses over a break, the portion before
+\# the break and the portion afterwards must be entered
+\# separately.
+\#
+.MAC UNDERSCORE END
+. nr #SAVED_UNDERSCORE_WEIGHT \\n[#UNDERSCORE_WEIGHT]
+. nr #SAVED_UNDERSCORE_WEIGHT_ADJ \\n[#UNDERSCORE_WEIGHT_ADJ]
+. ds $SAVED_UNDERSCORE_GAP \\*[$UNDERSCORE_GAP]
+. if \\n[#NUM_ARGS]>=2 \{\
+. if \B'\\$1' \{\
+. ds $UNDERSCORE_GAP \\$1
+. shift
+. \}
+. if '\\$1'PREFIX' \{\
+. ds $PREFIX \\$2
+. shift 2
+. \}
+. if '\\$1'SUFFIX' \{\
+. ds $SUFFIX \\$2
+. shift 2
+. \}
+. \}
+. if !'\\*[$TITLE_TYPE]'' \{\
+. nr #UNDERSCORE_WEIGHT \\n[#\\*[$TITLE_TYPE]_UNDERLINE_WEIGHT]
+. nr #UNDERSCORE_WEIGHT_ADJ \\n[#\\*[$TITLE_TYPE]_UNDERLINE_WEIGHT_ADJ]
+. ds $UNDERSCORE_GAP \\*[$\\*[$TITLE_TYPE]_UNDERLINE_GAP]
+. \}
+. nr #TEXT_WIDTH \w'\\$1'
+. ie \\n[.u]=1 \{\
+\\*[$PREFIX]\Z'\\$1'\
+\Z'\D't \\n[#UNDERSCORE_WEIGHT]''\
+\v'\\*[$UNDERSCORE_GAP]+\\n[#UNDERSCORE_WEIGHT_ADJ]u'\
+\D'l \\n[#TEXT_WIDTH]u 0'\
+\Z'\D't \\n[#RULE_WEIGHT]''\
+\v'-(\\*[$UNDERSCORE_GAP]+\\n[#UNDERSCORE_WEIGHT_ADJ]u)'\\*[$SUFFIX]\c
+. nop
+. \}
+. el \{\
+\\*[$PREFIX]\Z'\\$1'\
+\Z'\D't \\n[#UNDERSCORE_WEIGHT]''\
+\v'\\*[$UNDERSCORE_GAP]+\\n[#UNDERSCORE_WEIGHT_ADJ]u'\
+\D'l \\n[#TEXT_WIDTH]u 0'\
+\Z'\D't \\n[#RULE_WEIGHT]''\
+\v'-(\\*[$UNDERSCORE_GAP]+\\n[#UNDERSCORE_WEIGHT_ADJ]u)'\\*[$SUFFIX]
+. \}
+. nr #UNDERSCORE_WEIGHT \\n[#SAVED_UNDERSCORE_WEIGHT]
+. nr #UNDERSCORE_WEIGHT_ADJ \\n[#SAVED_UNDERSCORE_WEIGHT_ADJ]
+. ds $UNDERSCORE_GAP \\*[$SAVED_UNDERSCORE_GAP]
+. rr #SAVED_UNDERSCORE_WEIGHT
+. rr #SAVED_UNDERSCORE_WEIGHT_ADJ
+. rm $SAVED_UNDERSCORE_GAP
+. rm $PREFIX
+. rm $SUFFIX
+. rm $TITLE_TYPE
+.END
+\#
+\# DOUBLE UNDERSCORE
+\# -----------------
+\# *Arguments:
+\# [points below baseline] [points distance between rules] "text"
+\# *Function:
+\# Same as UNDERSCORE, except it produces a double underscore. The default
+\# distance between the rules is 2 points.
+\# *Notes:
+\# The same double-quote requirement as UNDERSCORE.
+\#
+.MAC UNDERSCORE2 END
+. nr #SAVED_UNDERSCORE_WEIGHT \\n[#UNDERSCORE_WEIGHT]
+. nr #SAVED_UNDERSCORE_WEIGHT_ADJ \\n[#UNDERSCORE_WEIGHT_ADJ]
+. ds $SAVED_UNDERSCORE_GAP \\*[$UNDERSCORE_GAP]
+. ds $SAVED_RULE_GAP \\*[$RULE_GAP]
+. if \\n[#NUM_ARGS]>=2 \{\
+. if \B'\\$1' \{\
+. ds $UNDERSCORE_GAP \\$1
+. shift
+. \}
+. if \B'\\$1' \{\
+. ds $RULE_GAP \\$1
+. shift
+. \}
+. if '\\$1'PREFIX' \{\
+. ds $PREFIX \\$2
+. shift 2
+. \}
+. if '\\$1'SUFFIX' \{\
+. ds $SUFFIX \\$2
+. shift 2
+. \}
+. if \\n[#NUM_ARGS]=3 \{\
+. ds $UNDERSCORE_GAP \\$1
+. ds $RULE_GAP \\$2
+. shift 2
+. \}
+. if !'\\*[$TITLE_TYPE]'' \{\
+. nr #UNDERSCORE_WEIGHT \\n[#\\*[$TITLE_TYPE]_UNDERLINE_WEIGHT]
+. nr #UNDERSCORE_WEIGHT_ADJ \\n[#\\*[$TITLE_TYPE]_UNDERLINE_WEIGHT_ADJ]
+. ds $UNDERSCORE_GAP \\*[$\\*[$TITLE_TYPE]_UNDERLINE_GAP]
+. ds $RULE_GAP \\*[$\\*[$TITLE_TYPE]_RULE_GAP]
+. \}
+. nr #TEXT_WIDTH \w'\\$1'
+. ie \\n[.u]=1 \{\
+\\*[$PREFIX]\Z'\\$1'\
+\Z'\D't \\n[#UNDERSCORE_WEIGHT]''\
+\v'\\*[$UNDERSCORE_GAP]+\\n[#UNDERSCORE_WEIGHT_ADJ]u'\
+\Z'\D'l \\n[#TEXT_WIDTH]u 0''\
+\v'\\*[$RULE_GAP]+\\n[#UNDERSCORE_WEIGHT]u'\
+\D'l \\n[#TEXT_WIDTH]u 0'\
+\Z'\D't \\n[#RULE_WEIGHT]''\
+\v'-(\\*[$UNDERSCORE_GAP]+\\*[$RULE_GAP])-(\\n[#UNDERSCORE_WEIGHT]u*2u)'\\*[$SUFFIX]\c
+. \}
+. el \{\
+\\*[$PREFIX]\Z'\\$1'\
+\Z'\D't \\n[#UNDERSCORE_WEIGHT]''\
+\v'\\*[$UNDERSCORE_GAP]+\\n[#UNDERSCORE_WEIGHT_ADJ]u'\
+\Z'\D'l \\n[#TEXT_WIDTH]u 0''\
+\v'\\*[$RULE_GAP]+\\n[#UNDERSCORE_WEIGHT]u'\
+\D'l \\n[#TEXT_WIDTH]u 0'\
+\Z'\D't \\n[#RULE_WEIGHT]''\
+\v'-(\\*[$UNDERSCORE_GAP]+\\*[$RULE_GAP])-(\\n[#UNDERSCORE_WEIGHT]u*2u)'\\*[$SUFFIX]
+. \}
+. nr #UNDERSCORE_WEIGHT \\n[#SAVED_UNDERSCORE_WEIGHT]
+. nr #UNDERSCORE_WEIGHT_ADJ \\n[#SAVED_UNDERSCORE_WEIGHT_ADJ]
+. ds $UNDERSCORE_GAP \\*[$SAVED_UNDERSCORE_GAP]
+. rr #SAVED_UNDERSCORE_WEIGHT
+. rr #SAVED_UNDERSCORE_WEIGHT_ADJ
+. rm $PREFIX
+. rm $SUFFIX
+. rm $SAVED_UNDERSCORE_GAP
+. rm $SAVED_RULE_GAP
+. rm $TITLE_TYPE
+.END
+\#
+\# Default underscoring underline and rule gaps
+\#
+.ds $BIB_STRING_RULE_GAP 2p
+.ds $BIB_STRING_UNDERLINE_GAP 2p
+.ds $EN_STRING_RULE_GAP 2p
+.ds $EN_STRING_UNDERLINE_GAP 2p
+.ds $EN_TITLE_UNDERLINE_GAP 2p
+.ds $RULE_GAP 2p
+.ds $TOC_HEADER_RULE_GAP 2p
+.ds $TOC_HEADER_UNDERLINE_GAP 2p
+.ds $UNDERSCORE_GAP 2p
+\#
+.nr #LOOP 0 1
+.while \n+[#LOOP]<=14 \{\
+. ds $\*[TITLE_TYPE_\n[#LOOP]]_RULE_GAP 2p
+. ds $COVER_\*[TITLE_TYPE_\n[#LOOP]]_RULE_GAP 2p
+. ds $DOC_COVER_\*[TITLE_TYPE_\n[#LOOP]]_RULE_GAP 2p
+. ds $\*[TITLE_TYPE_\n[#LOOP]]_UNDERLINE_GAP 2p
+. ds $COVER_\*[TITLE_TYPE_\n[#LOOP]]_UNDERLINE_GAP 2p
+. ds $DOC_COVER_\*[TITLE_TYPE_\n[#LOOP]]_UNDERLINE_GAP 2p
+.\}
+\#
+\# SUPERSCRIPT
+\# -----------
+\# *Function:
+\# Prints everything after inline invocation as superscript.
+\# *Notes:
+\# \*[SUP] and \*[SUPX] turn superscript on and off respectively.
+\# If running type is pseudo-condensed/expanded, invoke the superscript
+\# strings as \*[CONDSUP] or \*[EXTSUP] and turn off with \*[CONDSUPX]
+\# and \*[EXTSUPX] respectively.
+\#
+\# Default raise/lower amount
+.ds $SUP_RAISE \v'-.3m'
+.ds $SUP_LOWER \v'.3m'
+\#
+\# SUPERSCRIPT RAISE
+\# -----------------
+\# *Argument:
+\# <amount to raise superscript>
+\# *Function:
+\# Defines strings $SUP_RAISE and $SUP_LOWER for use with \*[SUP],
+\# \*[CONDSUP] and \*[EXTSUP].
+\#
+.MAC SUPERSCRIPT_RAISE_AMOUNT END
+. ds $SUP_RAISE_AMOUNT \\$1
+. ds $SUP_RAISE \v'-\\*[$SUP_RAISE_AMOUNT]'
+. ds $SUP_LOWER \v'\\*[$SUP_RAISE_AMOUNT]'
+.END
+\#
+.ds SUP \
+\R'#PT_SIZE_IN_UNITS \En[.ps]'\
+\R'#SUP_PT_SIZE \En[#PT_SIZE_IN_UNITS]u*6u/10u'\
+\s[\En[#PT_SIZE_IN_UNITS]u]\E*[$SUP_RAISE]\s[\En[#SUP_PT_SIZE]u]
+\#
+.ds SUPX \s[\En[#PT_SIZE_IN_UNITS]u]\E*[$SUP_LOWER]
+\#
+.ds CONDSUP \
+\R'#PT_SIZE_IN_UNITS \En[.ps]'\
+\R'#SUP_PT_SIZE \En[#PT_SIZE_IN_UNITS]u*6u/10u'\
+\s[\En[#PT_SIZE_IN_UNITS]u]\E*[$SUP_RAISE]\s[\En[#SUP_PT_SIZE]u]\E*[COND_FOR_SUP]
+\#
+.ds CONDSUPX \s[\En[#PT_SIZE_IN_UNITS]u]\E*[$SUP_LOWER]\E*[COND]
+\#
+.ds EXTSUP \
+\R'#PT_SIZE_IN_UNITS \En[.ps]'\
+\R'#SUP_PT_SIZE \En[#PT_SIZE_IN_UNITS]u*6u/10u'\
+\s[\En[#PT_SIZE_IN_UNITS]u]\E*[$SUP_RAISE]\s[\En[#SUP_PT_SIZE]u]\E*[EXT_FOR_SUP]
+\#
+.ds EXTSUPX \s[\En[#PT_SIZE_IN_UNITS]u]\E*[$SUP_LOWER]\E*[EXT]
+\#
+\# SLANT
+\# -----
+\#
+\# SETSLANT
+\# --------
+\# *Arguments:
+\# <number of degrees> | RESET
+\# *Function:
+\# Modifies register #DEGREES for use with \*[SLANT], or resets
+\# it to the default. Defines string \*[SLANTX]
+\# *Notes:
+\# \*[SLANT] permits pseudo-italicizing of a font in cases where
+\# no italic font exists in a particular family.
+\#
+\# Default # of degrees is 15.
+\#
+\# Do not use unit of measure with arg to SETSLANT.
+\#
+\# It may be necessary to adjust the spacing on either side of
+\# [SLANT] and [SLANTX].
+\#
+\# In docs, SLANT carries over from para to para.
+\#
+.nr #DEGREES 15
+.ds SLANT \ER'#SLANT_ON 1'\ES'\En[#DEGREES]'
+.ds SLANTX \ER'#SLANT_ON 0'\ES'0'
+\#
+.MAC SETSLANT END
+. ie '\\$1'RESET' \{\
+. nr #DEGREES 15
+. if \\n[#PRINT_STYLE]=1 \
+. if \\n[#UNDERLINE_SLANT] .return
+. ds SLANT \ER'#SLANT_ON 1'\ES'\En[#DEGREES]'
+. \}
+. el \{\
+. nr #DEGREES \\$1
+. if \\n[#PRINT_STYLE]=1 \
+. if \\n[#UNDERLINE_SLANT] .return
+. ds SLANT \ER'#SLANT_ON 1'\ES'\En[#DEGREES]'
+. \}
+. ds SLANTX \ER'#SLANT_ON 0'\ES'0'
+.END
+\#
+\# BOLDER
+\# ------
+\#
+\# SETBOLDER
+\# ---------
+\# *Arguments:
+\# <amount of emboldening> | RESET
+\# *Function:
+\# Modifies register #BOLDER_UNITS for use with \*[BOLDER], or resets
+\# it to the default 700 units.
+\# *Notes:
+\# \*[BOLDER] allows pseudo-emboldening of a font where no bold
+\# font exists in a particular family.
+\#
+\# Default for SETBOLDER is 700 units. Do not use unit of measure
+\# with arg to SETBOLDER.
+\#
+.nr #BOLDER_UNITS 700
+\#
+.MAC SETBOLDER END
+. if \\n[#IGNORE]=1 .return
+. ie '\\$1'RESET' .nr #BOLDER_UNITS 700
+. el .nr #BOLDER_UNITS \\$1
+.END
+\#
+.MAC BOLDER END
+\c
+.bd \\n[.f] \\n[#BOLDER_UNITS]
+.END
+\#
+.MAC BOLDERX END
+\c
+.bd \\n[.f]
+.END
+\#
+\# +++CONDENSE/EXTEND+++
+\#
+\# CONDENSE/EXTEND
+\# ---------------
+\# *Arguments:
+\# <percentage to condense/expand type size>
+\# *Function:
+\# Stores current point size in z's in #PT_SIZE_IN_UNITS, figures out
+\# new point size (for character width) from arg, and defines string
+\# COND or EXT, which set the type size to the new character width,
+\# and sets the height of type to the value stored in CURRENT_PT_SIZE
+\# *Notes:
+\# CONDENSE_OR_EXTEND is invoked from the aliases
+\# CONDENSE and EXTEND. CONDENSE implies <100, EXTEND
+\# implies >100. Do not use a percent sign in the argument.
+\#
+\# There is no default setting for CONDENSE or EXTEND.
+\# 80 is a good approximation of condensed type, 120 is okay
+\# for extended.
+\#
+\# The value set by CONDENSE or EXTEND applies to all
+\# subsequent \*[COND] or \*[EXT] escapes until a new value is set.
+\#
+\# \*[COND] or \*[EXT] must be turned off before all changes of point
+\# size, and reinvoked afterwards (if so desired). This refers to
+\# changes of point size via control lines AND via inlines.
+\#
+.MAC CONDENSE_OR_EXTEND END
+. if '\\$0'CONDENSE' \{\
+. ds $COND_PERCENT \\$1
+. if \\n[#PRINT_STYLE]=1 \{\
+. rm $COND_PERCENT
+. ds $COND_PERCENT 100
+. \}
+. ds COND \
+\R'#PT_SIZE_IN_UNITS \En[.ps]'\
+\R'#CONDENSE 1'\
+\R'#COND_WIDTH (\En[#PT_SIZE_IN_UNITS]u*\E*[$COND_PERCENT]u)/100'\
+\Es[\En[#COND_WIDTH]u]\EH'\En[#PT_SIZE_IN_UNITS]u'
+. ds COND_FOR_SUP \
+\R'#COND_WIDTH (\En[#SUP_PT_SIZE]u*\E*[$COND_PERCENT]u)/100'\
+\Es[\En[#COND_WIDTH]u]\H'\En[#SUP_PT_SIZE]u'
+. \}
+. if '\\$0'EXTEND' \{\
+. ds $EXT_PERCENT \\$1
+. if \\n[#PRINT_STYLE]=1 \{\
+. rm $EXT_PERCENT
+. ds $EXT_PERCENT 100
+. \}
+. ds EXT \
+\R'#PT_SIZE_IN_UNITS \En[.ps]'\
+\R'#EXTEND 1'\
+\R'#EXT_WIDTH (\En[#PT_SIZE_IN_UNITS]u*\E*[$EXT_PERCENT]u)/100'\
+\Es[\En[#EXT_WIDTH]u]\EH'\En[#PT_SIZE_IN_UNITS]u'
+. ds EXT_FOR_SUP \
+\R'#EXT_WIDTH (\En[#SUP_PT_SIZE]u*\E*[$EXT_PERCENT]u)/100'\
+\Es[\En[#EXT_WIDTH]u]\H'\En[#EXT_PT_SIZE]u'
+. \}
+.END
+\#
+.ds CONDX \
+\ER'#CONDENSE 0'\Es[0]\R'#PT_SIZE_IN_UNITS \En[.ps]'\H'\En[#PT_SIZE_IN_UNITS]u'
+.ds EXTX \
+\ER'#EXTEND 0'\Es[0]\R'#PT_SIZE_IN_UNITS \En[.ps]'\H'\En[#PT_SIZE_IN_UNITS]u'
+\#
+\# +++PAD LINES+++ (insert space)
+\#
+\# PAD MARKER
+\# ----------
+\# *Arguments:
+\# <character to use for marking pad points>
+\# *Function:
+\# Defines string $PAD_MARKER, used in PAD
+\# *Notes:
+\# $PAD_MARKER is normally # (the pound sign).
+\#
+.MAC PAD_MARKER END
+. ds $PAD_MARKER \\$1
+.END
+\#
+\# PAD
+\# ---
+\# *Arguments:
+\# "<string of text with padding markers inserted>"
+\# "<id of bookmark created by .PDF_BOOKMARK>"
+\# *Function:
+\# Defines and redefines padding character (default=pound sign
+\# unless padding character has been set with PAD_MARKER)
+\# several times so that when the string is output at the end
+\# of the macro, every # has been converted to an equal-sized
+\# amount of padding (blank space) on a line.
+\# *Notes:
+\# String tabs may be marked off during PAD.
+\#
+.MAC PAD END
+. if \\n[.u]=1 .nr fill 1
+. nf
+. if !d$PAD_MARKER .ds $PAD_MARKER #
+. char \\*[$PAD_MARKER] \R'#PAD_COUNT \En[#PAD_COUNT]+1'
+. ds $FAMILY_FOR_PAD \\n[.fam]
+.\" .if !n .fp \\n[.fp] \\n[.sty]
+. ds $FONT_FOR_PAD \\n[.sty]
+. nr #SIZE_FOR_PAD \\n[.ps]
+. ds $PAD_STRING \\$1
+. as $PAD_STRING \Ekp
+. di PAD_STRING
+. fam \\*[$FAMILY_FOR_PAD]
+\f[\\*[$FONT_FOR_PAD]]\s[\\n[#SIZE_FOR_PAD]u]\\*[$PAD_STRING]
+. br
+. di
+. if \\n[#INDENT_ACTIVE] \{\
+. if \\n[#INDENT_LEFT_ACTIVE] .ll -\\n[#L_INDENT]u
+. if \\n[#INDENT_RIGHT_ACTIVE] .ll -\\n[#R_INDENT]u
+. if \\n[#INDENT_BOTH_ACTIVE] .ll -\\n[#BR_INDENT]u
+. \}
+. char \\*[$PAD_MARKER] \
+\R'#SPACE_TO_END \En[.l]-\En[p]'\R'#PAD_SPACE \En[#SPACE_TO_END]/\En[#PAD_COUNT]'
+. di PAD_STRING
+. fam \\*[$FAMILY_FOR_PAD]
+\f[\\*[$FONT_FOR_PAD]]\s[\\n[#SIZE_FOR_PAD]u]\\*[$PAD_STRING]
+. br
+. di
+. if \\n[#INDENT_ACTIVE] \
+. if (\\n[#INDENT_LEFT_ACTIVE]=1):(\\n[#INDENT_BOTH_ACTIVE]) .ll
+. char \\*[$PAD_MARKER] \h'\En[#PAD_SPACE]u'
+. if \\n[#SILENT] .SILENT
+. fam \\*[$FAMILY_FOR_PAD]
+\f[\\*[$FONT_FOR_PAD]]\s[\\n[#SIZE_FOR_PAD]u]
+. ie '\\$2'' .nop \\*[$PAD_STRING]
+. el \{\
+. ie !'\\$2'NOBREAK' .pdfhref L -D "\\$2" -E -- \&\\*[$PAD_STRING]
+. el .nop \\*[$PAD_STRING]
+. \}
+. if \\n[#SILENT] .SILENT OFF
+. br
+. if \\n[fill] \{\
+. fi
+. rr fill
+. \}
+. rr #PAD_COUNT
+. rr #SPACE_TO_END
+. rr #PAD_SPACE
+. rm $PAD_STRING
+. rm PAD_STRING
+. rchar \\*[$PAD_MARKER]
+. if '\\$2'NOBREAK' \{\
+. TRAP OFF
+. EOL
+. TRAP
+. \}
+.END
+\#
+\# +++LEADERS+++
+\#
+\# The leader mechanism is primitive, but it works. Basically, every
+\# macro in this set that includes a line length also sets a single
+\# groff tab stop at the right hand end of the line. That way,
+\# whenever Ctrl-A is invoked (always at the end of an input line),
+\# leader of the correct length gets deposited. Ctrl-A is accessed by
+\# the string LEADER (i.e. inline, as \*[LEADER]). Leaders within tabs
+\# get their length from the tab line length.
+\#
+\# SET LEADER CHARACTER
+\# --------------------
+\# *Arguments:
+\# <character to use whenever \*[LEADER] is invoked>
+\# *Function:
+\# Set leader character.
+\#
+.MAC LEADER_CHARACTER END
+. lc \\$1
+.END
+\#
+.ds LEADER 
+\#
+\# +++DROP CAPS+++
+\#
+\# DROP CAP FAMILY
+\# ---------------
+\# *Argument:
+\# <family of drop cap>
+\# *Function:
+\# Creates or modifies string $DC_FAM.
+\#
+.MAC DROPCAP_FAMILY END
+. ds $DC_FAM \\$1
+.END
+\#
+\# DROP CAP FONT
+\# -------------
+\# *Argument:
+\# <font of drop cap>
+\# *Function:
+\# Creates or modifies string $DC_FT.
+\#
+.MAC DROPCAP_FONT END
+. ds $DC_FT \\$1
+.END
+\#
+\# DROPCAP COLOR
+\# -------------
+\# *Arguments:
+\# <pre-defined XCOLOR or NEWCOLOR>
+\# *Function:
+\# Defines string $DC_COLOR to argument.
+\# *Notes:
+\# User must define an XCOLOR or NEWCOLOR before using
+\# DC_COLOR.
+\#
+.MAC DROPCAP_COLOR END
+. if \\n[#PRINT_STYLE]=1 .return
+. nr #DC_COLOR 1
+. ds $DC_COLOR \\$1
+.END
+\#
+\# DROP CAP GUTTER
+\# ---------------
+\# *Argument:
+\# <width of gutter between drop cap and indented text>
+\# *Function:
+\# Creates or modifies register #DC_GUT.
+\# *Notes:
+\# Requires unit of measure. Default is 3p.
+\#
+.MAC DROPCAP_GUTTER END
+. nr #DC_GUT (\\$1)
+.END
+\#
+\# DROP CAP ADJUST
+\# ---------------
+\# *Argument:
+\# <+|- # of points to in/decrease point size of drop cap letter>
+\# *Function:
+\# Creates or modifies string $DC_ADJUST.
+\# *Notes:
+\# Despite its best efforts, DROPCAP doesn't always get the point
+\# size of the drop cap critically perfect. DROPCAP_ADJUST lets
+\# the user add or subtract points (or fractions of points) to
+\# get the size right.
+\#
+\# Requires the + or - sign.
+\#
+.MAC DROPCAP_ADJUST END
+. ds $DC_ADJUST \\$1
+.END
+\#
+\# DROP CAP
+\# --------
+\# *Arguments:
+\# <dropcap letter> <# of lines> [COND <% to condense> | EXT <% to extend>]
+\# *Function:
+\# Calculates point size of dropcap based on # of lines passed as
+\# arg 2. Sets indent for text based on dropcap width+gutter.
+\# Advances and prints dropcap; reverses and prints indented text
+\# to bottom of dropcap, then resets indent to left margin (plus
+\# any indent that was in effect prior to invoking DROPCAP).
+\# *Notes:
+\# Drop caps when using the doc processing macro PP only work with
+\# initial paragraphs (i.e. at doc start, or after heads), only when
+\# DROPCAPS comes immediately after PP, and only when the PRINTSTYLE
+\# is TYPESET. If these conditions aren't met, DROPCAPS is silently
+\# ignored.
+\#
+\# The COND or EXT argument are processed separately from all
+\# other COND or EXT inlines or macros, hence passing COND or
+\# EXT has no effect on running type.
+\#
+.MAC DROPCAP END
+. if \\n[#IGNORE]=1 \{\
+. PRINT \\$1\c
+. return
+. \}
+. br
+. if n \{\
+. PRINT \\$1\c
+. return
+. \}
+. if \\n[#DOCS] \{\
+. if \\n[#PRINT_STYLE]=1 \{\
+. PRINT \\$1\c
+. return
+. \}
+. if \\n[#PRINT_STYLE]=2 \{\
+. sp -1
+. if \\n[#PP_STYLE]=2 \{\
+. PRINT \\$1\c
+. return
+. \}
+. if \\n[#PP]>1 \{\
+. if \\n[#PP_INDENT] .ti \\n[#PP_INDENT]u
+. PRINT \\$1\c
+. return
+. \}
+. ti 0
+. \}
+. \}
+. ds $DROPCAP \\$1
+. nr #DC_LINES \\$2-1
+. if \\n[#CONDENSE]=1 \{\
+. ds $RESTORE_COND \\*[$COND_PERCENT]
+\\*[CONDX]
+. nr #CONDENSE_WAS_ON 1
+. \}
+. if \\n[#EXTEND]=1 \{\
+. ds $RESTORE_EXT \\*[$EXT_PERCENT]
+\\*[EXTX]
+. nr #EXTEND_WAS_ON 1
+. \}
+. if '\\$3'COND' .CONDENSE \\$4
+. if '\\$3'EXT' .EXTEND \\$4
+. if !r#DC_GUT .nr #DC_GUT 3p
+. ie \\n[#DOCS] .ds $RESTORE_FAM \\*[$DOC_FAM]
+. el .ds $RESTORE_FAM \\n[.fam]
+. ie \\n[#DOCS] .ds $RESTORE_FT \\*[$PP_FT]
+. el .ds $RESTORE_FT \\*[$FONT]
+. nr #RESTORE_PT_SIZE \\n[#PT_SIZE]
+. nr #RESTORE_INDENT \\n[.i]
+. SIZESPECS
+. nr #DC_HEIGHT \\n[#DC_LINES]*\\n[#LEAD]+\\n[#CAP_HEIGHT]
+. ie !d$DC_FAM .FAM \\n[.fam]
+. el .FAM \\*[$DC_FAM]
+. ie !d$DC_FT .FT \\*[$FONT]
+. el .FT \\*[$DC_FT]
+. while \\n[#GET_DC_HEIGHT]<\\n[#DC_HEIGHT] \{\
+. ps \\n[#PT_SIZE]u+100u
+. SIZESPECS
+. nr #GET_DC_HEIGHT \\n[#CAP_HEIGHT]
+. \}
+. if d$DC_ADJUST .ps \\*[$DC_ADJUST]p
+. nr #DC_LINES +1
+. if (\\n[#DC_LINES]v-1v)>(\\n[.t]-1) \{\
+. nr pgnum \\n%+\\n[#PAGE_NUM_ADJ] 1
+. if \\n[#COLUMNS]=1 .ds col-num ", column \\n[#COL_NUM]
+. tm1 \
+"[mom]: Dropcap at line \\n[.c] does not fit on page \\n[pgnum]\\*[col-num].
+. tm1 \
+" Shifting paragraph to next page or column.
+. ie \\n[#COLUMNS] .COL_NEXT
+. el .NEWPAGE
+. \}
+. ie \\n[#DC_COLOR]=1 \{\
+. ie !'\\$3'' \{\
+. ie '\\$3'COND' \
+. PRINT \
+\\*[DOWN \\n[#DC_LINES]v]\
+\m[\\*[$DC_COLOR]]\\*[COND]\\*[$DROPCAP]\\*[CONDX]\m[]\\*[UP \\n[#DC_LINES]v]
+. el \
+. PRINT \
+\\*[DOWN \\n[#DC_LINES]v]\
+\m[\\*[$DC_COLOR]]\\*[EXT]\\*[$DROPCAP]\\*[EXTX]\m[]\\*[UP \\n[#DC_LINES]v]
+. \}
+. el .PRINT \
+\\*[DOWN \\n[#DC_LINES]v]\
+\m[\\*[$DC_COLOR]]\\*[$DROPCAP]\m[]\\*[UP \\n[#DC_LINES]v]
+. \}
+. el \{\
+. ie !'\\$3'' \{\
+. ie '\\$3'COND' \
+. PRINT \
+\\*[DOWN \\n[#DC_LINES]v]\
+\\*[COND]\\*[$DROPCAP]\\*[CONDX]\\*[UP \\n[#DC_LINES]v]
+. el \
+. PRINT \
+\\*[DOWN \\n[#DC_LINES]v]\
+\\*[EXT]\\*[$DROPCAP]\\*[EXTX]\\*[UP \\n[#DC_LINES]v]
+. \}
+. el .PRINT \
+\\*[DOWN \\n[#DC_LINES]v]\
+\\*[$DROPCAP]\\*[UP \\n[#DC_LINES]v]
+. \}
+. if '\\$3'COND' \E*[COND]
+. if '\\$3'EXT' \E*[EXT]
+. ie \\n[.i] \{\
+. vs 0
+. br
+. in +\w'\\*[$DROPCAP]'u+\\n[#DC_GUT]u
+. vs
+. \}
+. el \{\
+. vs 0
+. br
+. in \w'\\*[$DROPCAP]'u+\\n[#DC_GUT]u
+. vs
+. \}
+. if '\\$3'COND' \E*[CONDX]\c
+. if '\\$3'EXT' \E*[EXTX]\c
+. FAM \\*[$RESTORE_FAM]
+. FT \\*[$RESTORE_FT]
+. ps \\n[#RESTORE_PT_SIZE]u
+. if \\n[#CONDENSE_WAS_ON] \{\
+. CONDENSE \\*[$RESTORE_COND]
+\\*[COND]\c
+. \}
+. if \\n[#EXTEND_WAS_ON] \{\
+. EXTEND \\*[$RESTORE_EXT]
+\\*[EXT]\c
+. \}
+. ie \\n[.u] .wh \\n[.d]u+\\n[#DC_HEIGHT]u-1v DROPCAP_OFF
+. el .wh \\n[.d]u+\\n[#DC_HEIGHT]u DROPCAP_OFF
+. rr #CONDENSE_WAS_ON
+. rr #EXTEND_WAS_ON
+. rm $DROPCAP
+. rr #DC_LINES
+. rm $RESTORE_COND
+. rm $RESTORE_EXT
+. rm $RESTORE_FAM
+. rm $RESTORE_FT
+. rr #RESTORE_PT_SIZE
+. rr #RESTORE_INDENT
+. rr #DC_HEIGHT
+. rr #GET_DC_HEIGHT
+. rr x
+.END
+\#
+.MAC DROPCAP_OFF END
+' in \\n[#RESTORE_INDENT]u
+. ch DROPCAP_OFF
+.END
+\#
+\# =====================================================================
+\#
+\# +++GRAPHICAL OBJECTS+++
+\#
+\# Set params for graphical objects.
+\#
+.MAC GRAPHICAL_OBJ END
+. rr #FILLED
+. rr #FILL_MODE
+. rr #NOFILL
+. rr #NOFILL_MODE
+. if \\n[.vpt]=1 \{\
+. vpt 0
+. nr #RESTORE_TRAP 1
+. \}
+. ie !\\n[#NO_ADVANCE]=1 .br
+. el \{\
+. sp -1v
+. rr #NO_ADVANCE
+. \}
+. ie \\n[.u]=1 \{\
+. nr #FILLED 1
+. nr #FILL_MODE \\n[.j]
+. \}
+. el \{\
+. nr #NOFILL 1
+. if \\n[.ce]>0 .nr #NOFILL_MODE 3
+. if \\n[.rj]>0 .nr #NOFILL_MODE 5
+. ce 0
+. rj 0
+. \}
+. nf
+.END
+\#
+\# HORIZONTAL RULE - DRH
+\# ---------------------
+\# *Arguments:
+\# <none> | <rule weight> <indent> <length> [ <color> ]
+\# *Function:
+\# With no arg, draws a full measure rule. With args, draws
+\# described horizontal rule.
+\# *Notes:
+\# Rules are drawn left-to-right, from the baseline down, and
+\# return to their point of origin. If no arg given (full measure
+\# rule), the rule weight is the one set by RULE_WEIGHT.
+\#
+.MAC DRH END
+. GRAPHICAL_OBJ
+. ds $RL_WEIGHT \\$1
+. ds $RL_INDENT \\$2
+. ds $RL_LENGTH \\$3
+. ie !'\\$4'' .ds $RL_COLOR \\$4
+. el \{\
+. ie '\\n[.m]'' .ds $RL_COLOR \\*[default]
+. el .ds $RL_COLOR \\n[.m]
+. \}
+. nr #SAVED_WEIGHT \\n[#RULE_WEIGHT]
+. nr #SAVED_WEIGHT_ADJ \\n[#RULE_WEIGHT_ADJ]
+. di NULL
+. if \\n[#NUM_ARGS]>=1 .RULE_WEIGHT \\*[$RL_WEIGHT]
+. di
+. COLOR \\*[$RL_COLOR]
+. ie \\n[#NUM_ARGS]=0 \{\
+. ie \\n[#INDENT_ACTIVE] \{\
+. nr #RESTORE_L_LENGTH \\n[.l]
+. if \\n[#INDENT_BOTH_ACTIVE] .ll \\n[.l]u-\\n[#BL_INDENT]u
+. if \\n[#INDENT_LEFT_ACTIVE] .ll \\n[.l]u-\\n[#L_INDENT]u
+\Z'\D't \\n[#RULE_WEIGHT]''\
+\h'\\*[$RL_INDENT]+\\n[#RULE_WEIGHT_ADJ]u'\
+\v'\\n[#RULE_WEIGHT_ADJ]u'\
+\D'l \En[.l]u 0'\v'-\\n[#RULE_WEIGHT_ADJ]u'\
+\v'-\\n[#RULE_WEIGHT_ADJ]u'\
+\Z'\D't \\n[#SAVED_RULE_WEIGHT]''
+. ll \\n[#RESTORE_L_LENGTH]u
+. rr #RESTORE_L_LENGTH
+. \}
+. el \{\
+\Z'\D't \\n[#RULE_WEIGHT]''\
+\h'\\*[$RL_INDENT]+\\n[#RULE_WEIGHT_ADJ]u'\
+\v'\\n[#RULE_WEIGHT_ADJ]u'\
+\D'l \En[.l]u 0'\v'-\\n[#RULE_WEIGHT_ADJ]u'\
+\v'-\\n[#RULE_WEIGHT_ADJ]u'\
+\Z'\D't \\n[#SAVED_RULE_WEIGHT]''
+. \}
+. \}
+. el \{\
+\Z'\D't \\n[#RULE_WEIGHT]''\
+\h'\\*[$RL_INDENT]+\\n[#RULE_WEIGHT_ADJ]u'\
+\v'\\n[#RULE_WEIGHT_ADJ]u'\
+\D'l \\*[$RL_LENGTH] 0'\
+\v'-\\n[#RULE_WEIGHT_ADJ]u'\
+\Z'\D't \\n[#SAVED_RULE_WEIGHT]''
+. rr #RESTORE_L_LENGTH
+. \}
+. if \\n[#FILLED]=1 \{\
+. if \\n[#FILL_MODE]=0 .QUAD LEFT
+. if \\n[#FILL_MODE]=1 .JUSTIFY
+. if \\n[#FILL_MODE]=3 .QUAD CENTER
+. if \\n[#FILL_MODE]=5 .QUAD RIGHT
+. rr #FILLED
+. \}
+. sp -1v
+. if \\n[#NOFILL]=1 \{\
+. if \\n[#NOFILL_MODE]=3 .CENTER
+. if \\n[#NOFILL_MODE]=5 .RIGHT
+. \}
+. gcolor
+. nr #RULE_WEIGHT \\n[#SAVED_WEIGHT]
+. nr #RULE_WEIGHT_ADJ \\n[#SAVED_WEIGHT_ADJ]
+. rr #SAVED_WEIGHT
+. rr #SAVED_WEIGHT_ADJ
+. if \\n[#RESTORE_TRAP]=1 \{\
+. vpt
+. rr #RESTORE_TRAP
+. \}
+. if '\\n[.z]'FLOAT*DIV' \
+. if !(\\n[.d]+\\n[#WEIGHT])<\\n[D-float] .nr D-float \\n[.d]+\\n[#WEIGHT]
+.END
+\#
+\# RULE
+\# ----
+\# *Argument:
+\# <none>
+\# *Function:
+\# Draws a rule the length of the current measure.
+\# *Notes:
+\# A convenience macro. DRH with no argument does the same thing.
+\# Kept in for backward compatibility.
+\#
+.MAC RULE END
+. if \\n[.u]=1 \{\
+. nr fill 1
+. ds $CURRENT_QUAD \\*[$QUAD_VALUE]
+. nf
+. \}
+. ie \\n[#INDENT_ACTIVE] \{\
+. if \\n[#INDENT_BOTH_ACTIVE] .ll \\n[.l]u-\\n[#BL_INDENT]u
+. if \\n[#INDENT_LEFT_ACTIVE] .ll \\n[.l]u-\\n[#L_INDENT]u
+. PRINT \
+\Z'\D't \\n[#RULE_WEIGHT]''\
+\v'\\n[#RULE_WEIGHT_ADJ]u'\
+\h'\\n[#RULE_WEIGHT_ADJ]u'\
+\D'l \En[.l]u 0'\v'-\\n[#RULE_WEIGHT_ADJ]u'\h'|0'\c
+. ll
+. rr #RESTORE_L_LENGTH
+. \}
+. el \{\
+. PRINT \
+\Z'\D't \\n[#RULE_WEIGHT]''\
+\v'\\n[#RULE_WEIGHT_ADJ]u'\
+\h'\\n[#RULE_WEIGHT_ADJ]u'\
+\D'l \En[.l]u 0'\v'-\\n[#RULE_WEIGHT_ADJ]u'\h'|0'\c
+. \}
+. if \\n[fill] \{\
+. fi
+. rr fill
+. QUAD \\*[$CURRENT_QUAD]
+. rm $CURRENT_QUAD
+. \}
+. EOL
+.END
+\#
+\# VERTICAL RULE - DRV
+\# -------------------
+\# *Arguments:
+\# <rule weight> <indent> <depth> [ <color> ]
+\# *Function:
+\# Draws described vertical rule.
+\# *Notes:
+\# Rules are drawn left-to-right, from the baseline down, and
+\# return to their point of origin.
+.MAC DRV END
+. GRAPHICAL_OBJ
+. ds $RL_WEIGHT \\$1
+. ds $RL_INDENT \\$2
+. ds $RL_DEPTH \\$3
+. ie !'\\$4'' \
+. ds $RL_COLOR \\$4
+. el \{\
+. ie '\\n[.m]'' .ds $RL_COLOR \\*[default]
+. el .ds $RL_COLOR \\n[.m]
+. \}
+. nr #SAVED_WEIGHT \\n[#RULE_WEIGHT]
+. nr #SAVED_WEIGHT_ADJ \\n[#RULE_WEIGHT_ADJ]
+. RULE_WEIGHT \\*[$RL_WEIGHT]
+. COLOR \\*[$RL_COLOR]
+\Z'\D't \\n[#RULE_WEIGHT]''\
+\h'\\*[$RL_INDENT]+\\n[#RULE_WEIGHT]u+\\n[#RULE_WEIGHT_ADJ]u'\
+\D'l 0 \\*[$RL_DEPTH]'\
+\D't \\n[#SAVED_RULE_WEIGHT]'
+. if \\n[#FILLED]=1 \{\
+. if \\n[#FILL_MODE]=0 .QUAD LEFT
+. if \\n[#FILL_MODE]=1 .JUSTIFY
+. if \\n[#FILL_MODE]=3 .QUAD CENTER
+. if \\n[#FILL_MODE]=5 .QUAD RIGHT
+. rr #FILLED
+. \}
+. sp -1v
+. if \\n[#NOFILL]=1 \{\
+. if \\n[#NOFILL_MODE]=3 .CENTER
+. if \\n[#NOFILL_MODE]=5 .RIGHT
+. \}
+. gcolor
+. nr #RULE_WEIGHT \\n[#SAVED_WEIGHT]
+. nr #RULE_WEIGHT_ADJ \\n[#SAVED_WEIGHT_ADJ]
+. if \\n[#RESTORE_TRAP]=1 \{\
+. vpt
+. rr #RESTORE_TRAP
+. \}
+. if '\\n[.z]'FLOAT*DIV' \
+. if !(\\n[.d]+\\*[$RL_DEPTH])<\\n[D-float] .nr D-float \\n[.d]+\\*[$RL_DEPTH]
+.END
+\#
+\# BOXES - DBX
+\# -----------
+\# *Arguments:
+\# <rule weight>|SOLID <indent> <width>|FULL_MEASURE <depth> [ <color> ]
+\# *Function:
+\# Draws described box.
+\# *Notes:
+\# Boxes are drawn left-to-right, from the baseline down, and
+\# return to their point of origin. Box rules are drawn from the
+\# perimeter inwards.
+\#
+.MAC DBX END
+. GRAPHICAL_OBJ
+. ie '\\$1'SOLID' .nr #BX_SOLID 1
+. el .ds $BX_WEIGHT \\$1
+. ds $BX_INDENT \\$2
+. ie '\\$3'FULL_MEASURE' \{\
+. ie (\\n[#INDENT_LEFT_ACTIVE]+\\n[#INDENT_RIGHT_ACTIVE]+\\n[#INDENT_BOTH_ACTIVE])=0 \{\
+. nr #WIDTH \\n[.l]
+. ds $BX_WIDTH \\n[#WIDTH]u
+. \}
+. el \{\
+. if \\n[#INDENT_LEFT_ACTIVE] \{\
+. nr #WIDTH \\n[.l]-\\n[#L_INDENT]
+. ds $BX_WIDTH \\n[#WIDTH]u
+. \}
+. if \\n[#INDENT_RIGHT_ACTIVE] \{\
+. nr #WIDTH \\n[.l]
+. ds $BX_WIDTH \\n[#WIDTH]u
+. \}
+. if \\n[#INDENT_BOTH_ACTIVE] \{\
+. nr #WIDTH \\n[.l]-(\\n[#BL_INDENT])
+. ds $BX_WIDTH \\n[#WIDTH]u
+. \}
+. \}
+. \}
+. el .ds $BX_WIDTH \\$3
+. ds $BX_DEPTH \\$4
+. ie !'\\$5'' \{\
+. ie d$\\$5_FILL .ds $BX_COLOR \\*[$\\$5_FILL]
+. el .ds $BX_COLOR \\$5
+. \}
+. el \{\
+. ie '\\n[.m]'' .ds $BX_COLOR \\*[default]
+. el .ds $BX_COLOR \\n[.m]
+. \}
+. nr #SAVED_WEIGHT \\n[#RULE_WEIGHT]
+. nr #SAVED_WEIGHT_ADJ \\n[#WEIGHT_ADJ]
+. if !'\\$1'SOLID' .RULE_WEIGHT \\*[$BX_WEIGHT]
+. ds $BX_INDENT \\*[$BX_INDENT]-\\n[#WEIGHT_ADJ]u
+. ie \\n[#BX_SOLID]=1 \{\
+. fcolor \\*[$BX_COLOR]
+\h'\\*[$BX_INDENT]+\\n[#BOX_WEIGHT_ADJ]u+\\n[#RULE_WEIGHT]u'\
+\D'P \\*[$BX_WIDTH] 0 0 \\*[$BX_DEPTH] -\\*[$BX_WIDTH] 0 0 -\\*[$BX_DEPTH]'
+. fcolor
+. rr #BX_SOLID
+. \}
+. el \{\
+. COLOR \\*[$BX_COLOR]
+\Z'\D't \\n[#RULE_WEIGHT]''\
+\h'\\*[$BX_INDENT]+\\n[#RULE_WEIGHT]u+\\n[#RULE_WEIGHT_ADJ]u'\
+\v'\\n[#WEIGHT_ADJ]u'\
+\D'p \\*[$BX_WIDTH]-\\n[#RULE_WEIGHT]u 0 0 \\*[$BX_DEPTH]-\\n[#RULE_WEIGHT]u -\\*[$BX_WIDTH]+\\n[#RULE_WEIGHT]u 0 0 -\\*[$BX_DEPTH]+\\n[#RULE_WEIGHT]u'\
+\v'-\\n[#WEIGHT_ADJ]u'\
+\Z'\D't \\n[#SAVED_RULE_WEIGHT]''
+. gcolor
+. \}
+. sp -1v
+. if \\n[#FILLED]=1 \{\
+. if \\n[#FILL_MODE]=0 .QUAD LEFT
+. if \\n[#FILL_MODE]=1 .JUSTIFY
+. if \\n[#FILL_MODE]=3 .QUAD CENTER
+. if \\n[#FILL_MODE]=5 .QUAD RIGHT
+. \}
+. if \\n[#NOFILL]=1 \{\
+. if \\n[#NOFILL_MODE]=3 .CENTER
+. if \\n[#NOFILL_MODE]=5 .RIGHT
+. \}
+. nr #RULE_WEIGHT \\n[#SAVED_WEIGHT]
+. nr #WEIGHT_ADJ \\n[#SAVED_WEIGHT_ADJ]
+. rr #SAVED_WEIGHT
+. rr #SAVED_WEIGHT_ADJ
+. if \\n[#RESTORE_TRAP]=1 \{\
+. vpt
+. rr #RESTORE_TRAP
+. \}
+. if '\\n[.z]'FLOAT*DIV' \
+. if !(\\n[.d]+\\*[$BX_DEPTH])<\\n[D-float] .nr D-float \\n[.d]+\\*[$BX_DEPTH]
+.END
+\#
+\# ELLIPSES - DCL
+\# --------------
+\# *Arguments:
+\# <rule weight>|SOLID <indent> <width>|FULL_MEASURE <depth> [ <color> ]
+\# *Function:
+\# Draws described ellipses.
+\# *Notes:
+\# Ellipses (circles) are drawn left-to-right, from the baseline
+\# down, and return to their point of origin. Ellipse rules are
+\# drawn from the perimeter inwards.
+\#
+.MAC DCL END
+. GRAPHICAL_OBJ
+. ie '\\$1'SOLID' .nr #CL_SOLID 1
+. el .ds $CL_WEIGHT \\$1
+. ds $CL_INDENT \\$2
+. ds $CL_WIDTH \\$3
+. ie '\\$3'FULL_MEASURE' \{\
+. ie (\\n[#INDENT_LEFT_ACTIVE]+\\n[#INDENT_RIGHT_ACTIVE]+\\n[#INDENT_BOTH_ACTIVE])=0 \
+. nr #WIDTH \\n[.l]
+. ds $CL_WIDTH \\n[#WIDTH]u
+. el \{\
+. if \\n[#INDENT_LEFT_ACTIVE] \{\
+. nr #WIDTH \\n[.l]-\\n[#L_INDENT]
+. ds $CL_WIDTH \\n[#WIDTH]u
+. \}
+. if \\n[#INDENT_RIGHT_ACTIVE] \{\
+. nr #WIDTH \\n[.l]
+. ds $CL_WIDTH \\n[#WIDTH]u
+. \}
+. if \\n[#INDENT_BOTH_ACTIVE] \{\
+. nr #WIDTH \\n[.l]-(\\n[#BL_INDENT])
+. ds $CL_WIDTH \\n[#WIDTH]u
+. \}
+. \}
+. \}
+. el .ds $CL_WIDTH \\$3
+. ds $CL_DEPTH \\$4
+. ie !'\\$5'' \{\
+. ie d$\\$5_FILL .ds $CL_COLOR \\*[$\\$5_FILL]
+. el .ds $CL_COLOR \\$5
+. \}
+. el \{\
+. ie '\\n[.m]'' .ds $CL_COLOR \\*[default]
+. el .ds $CL_COLOR \\n[.m]
+. \}
+. nr #SAVED_WEIGHT \\n[#RULE_WEIGHT]
+. nr #SAVED_WEIGHT_ADJ \\n[#WEIGHT_ADJ]
+. if !'\\$1'SOLID' .RULE_WEIGHT \\*[$CL_WEIGHT]
+. ds $CL_INDENT \\*[$CL_INDENT]-\\n[#WEIGHT_ADJ]u
+. ie \\n[#CL_SOLID]=1 \{\
+. fcolor \\*[$CL_COLOR]
+\h'\\*[$CL_INDENT]+\\n[#RULE_WEIGHT]u'\
+\v'\\*[$CL_DEPTH]/2u'\
+\D'E \\*[$CL_WIDTH]-\\n[#RULE_WEIGHT]u \\*[$CL_DEPTH]-\\n[#RULE_WEIGHT]u'\
+\v'-\\*[$CL_DEPTH]/2u'
+. fcolor
+. rr #CL_SOLID
+. \}
+. el \{\
+. COLOR \\*[$CL_COLOR]
+\Z'\D't \\n[#RULE_WEIGHT]''\
+\h'\\*[$CL_INDENT]+\\n[#RULE_WEIGHT]u+\\n[#RULE_WEIGHT_ADJ]u'\
+\v'\\*[$CL_DEPTH]/2u'\
+\D'e \\*[$CL_WIDTH]-\\n[#RULE_WEIGHT]u \\*[$CL_DEPTH]-\\n[#RULE_WEIGHT]u'\
+\v'-(\\*[$CL_DEPTH]/2u)'\
+\Z'\D't \\n[#SAVED_RULE_WEIGHT]''
+. gcolor
+. \}
+. sp -1v
+. if \\n[#FILLED]=1 \{\
+. if \\n[#FILL_MODE]=0 .QUAD LEFT
+. if \\n[#FILL_MODE]=1 .JUSTIFY
+. if \\n[#FILL_MODE]=3 .QUAD CENTER
+. if \\n[#FILL_MODE]=5 .QUAD RIGHT
+. rr #FILLED
+. \}
+. if \\n[#NOFILL]=1 \{\
+. if \\n[#NOFILL_MODE]=3 .CENTER
+. if \\n[#NOFILL_MODE]=5 .RIGHT
+. \}
+. nr #RULE_WEIGHT \\n[#SAVED_WEIGHT]
+. nr #WEIGHT_ADJ \\n[#SAVED_WEIGHT_ADJ]
+. rr #SAVED_WEIGHT
+. rr #SAVED_WEIGHT_ADJ
+. if \\n[#RESTORE_TRAP]=1 \{\
+. vpt
+. rr #RESTORE_TRAP
+. \}
+. if '\\n[.z]'FLOAT*DIV' \
+. if !(\\n[.d]+\\*[$CL_DEPTH])<\\n[D-float] .nr D-float \\n[.d]+\\*[$CL_DEPTH]
+.END
+\#
+\# RULE WEIGHT
+\# -----------
+\# *Argument:
+\# <weight of rules in points>
+\# *Function:
+\# Sets \D't <n>' to the correct number of machine units for the
+\# argument given in points.
+\# *Notes:
+\# Decimal fractions are allowed. Rule weight must be < 100.
+\#
+.MAC RULE_WEIGHT END
+. di NULL \" Diverted so there's no problem with breaks, spacing, etc.
+. ds $ARG \\$1
+. substring $ARG -1
+. if !\B'\\*[$ARG]' \{\
+. tm1 "[mom]: The argument to \\$0 must not have a unit of measure appended.
+. ab [mom]: Aborting '\\n[.F]' at \\$0, line \\n[.c].
+. \}
+. length #STR_LENGTH \\$1
+. ds $ARG \\$1
+. substring $ARG 0 0
+. ie '\\*[$ARG]'.' \{\
+. ds $ARG \\$1
+. substring $ARG 1 \\n[#STR_LENGTH]-1
+. nr #WEIGHT \\*[$ARG]*100
+. if (\\n[#WEIGHT]>=1000) \{\
+. while (\\n[#WEIGHT]>=1000) \{\
+. nr #WEIGHT \\n[#WEIGHT]/10
+. \}
+. \}
+. \}
+. el \{\
+. ds $ARG \\$1
+. length #ARG_LENGTH \\*[$ARG]
+. if \\n[#ARG_LENGTH]>1 .substring $ARG 1 1
+. ie '\\*[$ARG]'.' \{\
+. ds $LHS \\$1
+. substring $LHS 0 0
+. ds $RHS \\$1
+. substring $RHS 2
+. nr #WEIGHT \\*[$LHS]\\*[$RHS]*100
+. if (\\n[#WEIGHT]>=10000) \{\
+. while (\\n[#WEIGHT]>=10000) \{\
+. nr #WEIGHT \\n[#WEIGHT]/10
+. \}
+. \}
+. \}
+. el \{\
+. ie \\n[#STR_LENGTH]<=2 .nr #WEIGHT \\$1*1000
+. el \{\
+. ds $ARG \\$1
+. substring $ARG 2 2
+. ie !'\\*[$ARG]'.' \{\
+. tm1 "[mom]: Invalid argument given to macro \\$0 at line \\n[.c].
+. tm1 " Rule weight must be < 100 points.
+. tm1 " Falling back to default weight .5 points.
+. nr #WEIGHT 500
+. \}
+. el \{\
+. ds $LHS \\$1
+. substring $LHS 0 1
+. ds $RHS \\$1
+. substring $RHS 3
+. nr #WEIGHT \\*[$LHS]\\*[$RHS]*1000
+. if (\\n[#WEIGHT]>=100000) \{\
+. while (\\n[#WEIGHT]>=100000) \{\
+. nr #WEIGHT \\n[#WEIGHT]/10
+. \}
+. \}
+. \}
+. \}
+. \}
+. \}
+. nr #WEIGHT_ADJ \\n[#WEIGHT]/2
+. if '\\$0'BIBLIOGRAPHY_STRING_UNDERLINE_WEIGHT' \
+. ds $TITLE_TYPE BIB_STRING_
+. if '\\$0'ENDNOTE_TITLE_UNDERLINE_WEIGHT' \
+. ds $TITLE_TYPE EN_TITLE_
+. if '\\$0'EN_HEADER_UNDERLINE_WEIGHT' \
+. ds $TITLE_TYPE EN_STRING_
+. if !'\\*[$TITLE_TYPE]'BIB_STRING' \
+. if !'\\*[$TITLE_TYPE]'EN_TITLE' \
+. if !'\\*[$TITLE_TYPE]'EN_STRING' \
+. ds _TYPE \\$0
+. length type-len _TYPE
+. if \\n[type-len]>17 \{\
+. substring _TYPE 0 -17
+. ds $TITLE_TYPE \\*[_TYPE]
+. \}
+. if !'\\*[$TITLE_TYPE]'' \{\
+. nr #\\*[$TITLE_TYPE]UNDERLINE_WEIGHT \\n[#WEIGHT]
+. nr #\\*[$TITLE_TYPE]UNDERLINE_WEIGHT_ADJ \\n[#WEIGHT_ADJ]
+. \}
+. if '\\$0'RULE_WEIGHT' \{\
+. nr #RULE_WEIGHT \\n[#WEIGHT]
+. nr #RULE_WEIGHT_ADJ \\n[#WEIGHT_ADJ]
+. \}
+. if '\\$0'UNDERSCORE_WEIGHT' \{\
+. nr #UNDERSCORE_WEIGHT \\n[#WEIGHT]
+. nr #UNDERSCORE_WEIGHT_ADJ \\n[#WEIGHT_ADJ]
+. \}
+. if '\\$0'FOOTER_RULE_WEIGHT' \{\
+. nr #FOOTER_RULE_WEIGHT \\n[#WEIGHT]
+. nr #FOOTER_RULE_WEIGHT_ADJ \\n[#WEIGHT_ADJ]
+. \}
+. if '\\$0'FOOTNOTE_RULE_WEIGHT' \{\
+. nr #FN_RULE_WEIGHT \\n[#WEIGHT]
+. nr #FN_RULE_WEIGHT_ADJ \\n[#WEIGHT_ADJ]
+. \}
+. if '\\$0'HEADER_RULE_WEIGHT' \{\
+. nr #HEADER_RULE_WEIGHT \\n[#WEIGHT]
+. nr #HEADER_RULE_WEIGHT_ADJ \\n[#WEIGHT_ADJ]
+. \}
+. di
+.END
+\#
+\# Aliases for RULE_WEIGHT
+\#
+.ALIAS BIB_STRING_UNDERLINE_WEIGHT RULE_WEIGHT
+.ALIAS DOCTYPE_UNDERLINE_WEIGHT RULE_WEIGHT
+.ALIAS EN_STRING_UNDERLINE_WEIGHT RULE_WEIGHT
+.ALIAS EN_TITLE_UNDERLINE_WEIGHT RULE_WEIGHT
+.ALIAS FN_RULE_WEIGHT RULE_WEIGHT
+.ALIAS FOOTER_RULE_WEIGHT RULE_WEIGHT
+.ALIAS FOOTNOTE_RULE_WEIGHT RULE_WEIGHT
+.ALIAS HEADER_RULE_WEIGHT RULE_WEIGHT
+.ALIAS RULE_WEIGHT RULE_WEIGHT
+.ALIAS TOC_HEADER_UNDERLINE_WEIGHT RULE_WEIGHT
+.ALIAS UNDERSCORE_WEIGHT RULE_WEIGHT
+\#
+\# Default rule weights
+\#
+.nr #BIB_STRING_UNDERLINE_WEIGHT 500
+.nr #DOCTYPE_UNDERLINE_WEIGHT 500
+.nr #EN_STRING_UNDERLINE_WEIGHT 500
+.nr #EN_TITLE_UNDERLINE_WEIGHT 500
+.nr #FN_RULE_WEIGHT 500
+.nr #FOOTER_RULE_WEIGHT 500
+.nr #HEADER_RULE_WEIGHT 500
+.nr #RULE_WEIGHT 500
+.nr #TOC_HEADER_UNDERLINE_WEIGHT 500
+.nr #UNDERSCORE_WEIGHT 500
+\#
+.nr #BIB_STRING_UNDERLINE_WEIGHT_ADJ \n[#BIB_STRING_UNDERLINE_WEIGHT]/2
+.nr #DOCTYPE_UNDERLINE_WEIGHT_ADJ \n[#DOCTYPE_UNDERLINE_WEIGHT]/2
+.nr #EN_STRING_UNDERLINE_WEIGHT_ADJ \n[#EN_STRING_UNDERLINE_WEIGHT]/2
+.nr #EN_TITLE_UNDERLINE_WEIGHT_ADJ \n[#EN_TITLE_UNDERLINE_WEIGHT]/2
+.nr #FN_RULE_WEIGHT_ADJ \n[#FN_RULE_WEIGHT]/2
+.nr #FOOTER_RULE_WEIGHT_ADJ \n[#FOOTER_RULE_WEIGHT]/2
+.nr #HEADER_RULE_WEIGHT_ADJ \n[#HEADER_RULE_WEIGHT]/2
+.nr #RULE_WEIGHT_ADJ \n[#RULE_WEIGHT]/2
+.nr #TOC_HEADER_UNDERLINE_WEIGHT_ADJ \n[#TOC_HEADER_UNDERLINE_WEIGHT]/2
+.nr #UNDERSCORE_WEIGHT_ADJ \n[#UNDERSCORE_WEIGHT]/2
+\#
+\# Read in remaining aliases and default rule weights
+\#
+.nr #LOOP 0 1
+.while \n+[#LOOP]<=14 \{\
+. ALIAS \*[TITLE_TYPE_\n[#LOOP]]_UNDERLINE_WEIGHT RULE_WEIGHT
+. ALIAS COVER_\*[TITLE_TYPE_\n[#LOOP]]_UNDERLINE_WEIGHT RULE_WEIGHT
+. ALIAS DOC_COVER_\*[TITLE_TYPE_\n[#LOOP]]_UNDERLINE_WEIGHT RULE_WEIGHT
+. nr #\*[TITLE_TYPE_\n[#LOOP]]_UNDERLINE_WEIGHT 500
+. nr #COVER_\*[TITLE_TYPE_\n[#LOOP]]_UNDERLINE_WEIGHT 500
+. nr #DOC_COVER_\*[TITLE_TYPE_\n[#LOOP]]_UNDERLINE_WEIGHT 500
+. nr #\*[TITLE_TYPE_\n[#LOOP]]_UNDERLINE_WEIGHT_ADJ \
+ \n[#\*[TITLE_TYPE_\n[#LOOP]]_UNDERLINE_WEIGHT]/2
+. nr #COVER_\*[TITLE_TYPE_\n[#LOOP]]_UNDERLINE_WEIGHT_ADJ \
+ \n[#COVER_\*[TITLE_TYPE_\n[#LOOP]]_UNDERLINE_WEIGHT]/2
+. nr #DOC_COVER_\*[TITLE_TYPE_\n[#LOOP]]_UNDERLINE_WEIGHT_ADJ \
+ \n[#DOC_COVER_\*[TITLE_TYPE_\n[#LOOP]]_UNDERLINE_WEIGHT]/2
+.\}
+\#
+\# Set default rule weight
+\#
+.di NULL
+\D't 500'
+.di
+\#
+\# =====================================================================
+\#
+\# +++WORD AND SENTENCE SPACING+++
+\#
+\# WORD SPACE CONTROL
+\# ------------------
+\# *Argument:
+\# <+|->wordspace | DEFAULT
+\# *Function:
+\# Increases or decreases interword space by user supplied amount.
+\# If DEFAULT, value is set to 12 (groff default).
+\# *Notes:
+\# $WS_CONSTANT is the groff default word space.
+\# $WS_VAR is the user supplied amount by which to in/decrease word space.
+\# $WS is a concatenation of WS_CONSTANT and WS_VAR.
+\#
+\# \n[.sss] holds the current sentence space value.
+\#
+.MAC WS END
+. ds $WS_CURR \\n[.ss]
+. ds $WS_VAR \\$1
+. ie '\\$1'DEFAULT' .ss 12 \\n[.sss]
+. el \{\
+. ds $WS (\\*[$WS_CURR]+\\*[$WS_VAR])
+. ie \\n[.sss]=12 .ss \\*[$WS] 12
+. el \{\
+. ss \\*[$WS] (\\*[$WS]+\\*[$SS_VAR])
+. SS \\*[$SS_VAR]
+. \}
+. \}
+.END
+\#
+\# SENTENCE SPACE CONTROL
+\# ----------------------
+\# *Argument:
+\# <+-sentencespace> | 0 | DEFAULT
+\# *Function:
+\# Increases or decreases sentence space by user supplied amount.
+\# If 0, sentence spaces are ignored. If DEFAULT, value is
+\# set to 12 (groff default).
+\# *Notes:
+\# Because the user supplied value requires a literal + or - sign,
+\# the macro argument is stored in a string.
+\#
+\# Sentence space applies only to input where sentences are separated
+\# by two spaces (and/or, in fill mode [FLUSH L|R|C or JUSTIFY], an EOL).
+\# Changing .SS when sentences are separated by only one space has
+\# no effect on the space between sentences.
+\#
+\# \n[.ss] holds the current wordspace value.
+\# \n[.sss] holds the current sentence space value.
+\#
+.MAC SS END
+. ds $SS_VAR \\$1
+. ie '\\$1'0' .ss \\n[.ss] 0
+. el \{\
+. ie '\\$1'DEFAULT' .ss \\n[.ss]
+. el .ss \\n[.ss] \\*[$SS_VAR]
+. \}
+.END
+\#
+\# =====================================================================
+\#
+\# INDENTS
+\# -------
+\#
+\# +++INDENT LEFT+++
+\#
+.MAC IL END
+. if \\n[#INDENT_STYLE_BOTH] .IBX
+. nr #INDENT_STYLE_LEFT 1
+. nr #INDENT_ACTIVE 1
+. nr #INDENT_LEFT_ACTIVE 1
+. ie '\\$1'' \{\
+. br
+. in \\n[#L_INDENT]u
+. ta \\n[.l]u-\\n[#L_INDENT]u
+. if \\n[#IN_ITEM] .nr #IN_ITEM_L_INDENT 0
+. \}
+. el \{\
+. br
+. nr #L_INDENT +(u;\\$1)
+. in \\n[#L_INDENT]u
+. ta \\n[.l]u-\\n[#L_INDENT]u
+. if \\n[#IN_ITEM] .nr #IN_ITEM_L_INDENT +(u;\\$1)
+. \}
+.END
+\#
+\# +++INDENT RIGHT+++
+\#
+.MAC IR END
+. if \\n[#INDENT_STYLE_BOTH] .IBX
+. nr #INDENT_STYLE_RIGHT 1
+. nr #INDENT_ACTIVE 1
+. nr #INDENT_RIGHT_ACTIVE 1
+. ie '\\$1'' \{\
+. br
+. ie \\n[#TAB_ACTIVE] \{\
+. ll \\n[.l]u-\\n[#R_INDENT]u
+. ta \\n[.l]u-\\n[#L_INDENT]u
+. \}
+. el \{\
+. ll \\n[.l]u-\\n[#R_INDENT]u
+. ta \\n[.l]u-\\n[#L_INDENT]u
+. \}
+. \}
+. el \{\
+. br
+. nr #R_INDENT (u;\\$1)
+. ie \\n[#TAB_ACTIVE] \{\
+. ll \\n[.l]u-\\n[#R_INDENT]u
+. ta \\n[.l]u-\\n[#L_INDENT]u
+. \}
+. el \{\
+. ll \\n[.l]u-\\n[#R_INDENT]u
+. ta \\n[.l]u-\\n[#L_INDENT]u
+. \}
+. \}
+.END
+\#
+\# +++INDENT BOTH+++
+\#
+.MAC IB END
+. br
+. if \\n[#INDENT_STYLE_LEFT] .ILX
+. if \\n[#INDENT_STYLE_RIGHT] .IRX
+. nr #INDENT_STYLE_BOTH 1
+. nr #INDENT_ACTIVE 1
+. nr #INDENT_BOTH_ACTIVE 1
+. ie '\\$1'' \{\
+. ie \\n[#DOCS] \
+. ll \\n[#DOC_L_LENGTH]u-\\n[#BR_INDENT]u
+. el .ll \\n[.l]u-\\n[#BR_INDENT]u
+. in \\n[#BL_INDENT]u
+. ta \\n[.l]u
+. \}
+. el \{\
+. nr #BL_INDENT (\\n[#INDENT]+\\$1)
+. ie \\n[#NUM_ARGS]=2 .nr #BR_INDENT +(\\$2)
+. el .nr #BR_INDENT \\n[#BL_INDENT]
+. if '\\n[.z]'' .ll
+. ll \\n[.l]u-\\n[#BR_INDENT]u
+. in \\n[#BL_INDENT]u
+. ta \\n[.l]u-\\n[#BR_INDENT]u
+. \}
+.END
+\#
+\# +++TEMPORARY INDENT+++
+\#
+.MAC TI END
+. br
+. ie '\\$1'' \{\
+. ti \\n[#T_INDENT]u
+. if \\n[#INDENT_LEFT_ACTIVE] .ti \\n[#T_INDENT]u+\\n[#L_INDENT]u
+. if \\n[#INDENT_BOTH_ACTIVE] .ti \\n[#T_INDENT]u+\\n[#BL_INDENT]u
+. \}
+. el \{\
+. nr #T_INDENT (\\$1)
+. ti \\n[#T_INDENT]u
+. \}
+.END
+\#
+\# +++HANGING INDENT+++
+\#
+.MAC HI END
+. ie '\\$1'' .ti -\\n[#HL_INDENT]u
+. el \{\
+. nr #HL_INDENT (\\$1)
+. ti -\\n[#HL_INDENT]u
+. \}
+.END
+\#
+\# +++INDENTS OFF+++
+\#
+.MAC ILX END
+. ie \\n[#IN_ITEM] .nr #L_INDENT -\\n[#IN_ITEM_L_INDENT]
+. el \{\
+. br
+. ie \\n[pdfbx-running]=1 \
+. ie !r pdfbx-clear \{\
+. in \\*[wt\\n[stack]]+\\*[gap\\n[stack]]u+\\n[#IL_ACTIVE]u
+. el .in \\*[wt\\n[stack]]+\\*[gap\\n[stack]]u
+. \}
+. el .in 0
+. rr #INDENT_LEFT_ACTIVE
+. nr #L_INDENT_ILX \\n[#L_INDENT]
+. \}
+. if '\\$1'CLEAR' \{\
+. if \\n[pdfbx-running]=1 \
+. if !r pdfbx-clear \
+. in \\*[wt\\n[stack]]+\\*[gap\\n[stack]]u
+. rr #L_INDENT
+. rr #INDENT_STYLE_LEFT
+. rr #L_INDENT_ILX
+. rr #INDENT_ACTIVE
+. \}
+.END
+\#
+.MAC IRX END
+. br
+. rr #INDENT_RIGHT_ACTIVE
+. ie \\n[#TAB_ACTIVE] .TAB\\n[#CURRENT_TAB]
+. el \{\
+. ie \\n[#COLUMNS] \{\
+. ll \\n[#COL_L_LENGTH]u
+. ta \\n[.l]u
+. \}
+. el \{\
+. ie \\n[pdfbx-running]=1 \{\
+. if !r pdfbx-clear \
+. ll \\n[pdfbx-ll]u
+. \}
+. el .ll \\n[#DOC_L_LENGTH]u
+. ta \\n[.l]u
+. \}
+. \}
+. if '\\$1'CLEAR' \{\
+. if \\n[pdfbx-running]=1 \{\
+. if !r pdfbx-clear \
+. ll \\n[#L_LENGTH]u-(\\*[wt\\n[stack]]+\\*[gap\\n[stack]]u)
+. \}
+. rr #R_INDENT
+. rr #INDENT_STYLE_RIGHT
+. \}
+.END
+\#
+.MAC IBX END
+. br
+. in 0
+. rr #INDENT_ACTIVE
+. rr #INDENT_BOTH_ACTIVE
+. ie \\n[#TAB_ACTIVE] .TAB\\n[#CURRENT_TAB]
+. el \{\
+. ie \\n[#COLUMNS] \{\
+. ll \\n[#COL_L_LENGTH]u
+. ta \\n[.l]u
+. \}
+. el \{\
+. ll \\n[#L_LENGTH]u
+. ta \\n[.l]u
+. \}
+. \}
+. if '\\$1'CLEAR' \{\
+. rr #BL_INDENT
+. rr #BR_INDENT
+. rr #INDENT_STYLE_BOTH
+. \}
+.END
+\#
+.MAC IX END
+. if '\\$0'IX' \{\
+. if !\\n[#IX_WARN] \{\
+. tm1 "[mom]: Use of .IX is deprecated. Use .IQ instead.
+. tm1 " .IX will continue to behave as before, but to
+. tm1 " avoid this message, please update your document.
+. nr #IX_WARN 1
+. \}
+. \}
+. br
+. in 0
+. rr #INDENT_LEFT_ACTIVE
+. rr #INDENT_RIGHT_ACTIVE
+. rr #INDENT_BOTH_ACTIVE
+. rr #INDENT_ACTIVE
+. if \\n[#INDENT_STYLE_RIGHT] \{\
+. ie \\n[#TAB_ACTIVE] .TAB\\n[#CURRENT_TAB]
+. el \{\
+. ie \\n[#COLUMNS] \{\
+. ll \\n[#COL_L_LENGTH]u
+. ta \\n[.l]u
+. \}
+. el \{\
+. ll \\n[#L_LENGTH]u
+. ta \\n[.l]u
+. \}
+. \}
+. \}
+. if \\n[#INDENT_STYLE_BOTH] \{\
+. ie \\n[#TAB_ACTIVE] .TAB\\n[#CURRENT_TAB]
+. el \{\
+. ie \\n[#COLUMNS] \{\
+. ll \\n[#COL_L_LENGTH]u
+. ta \\n[.l]u
+. \}
+. el \{\
+. ll \\n[#L_LENGTH]u
+. ta \\n[.l]u
+. \}
+. \}
+. \}
+. if '\\$1'CLEAR' \{\
+. if \\n[#INDENT_STYLE_RIGHT] \{\
+. ie \\n[#TAB_ACTIVE] .TAB\\n[#CURRENT_TAB]
+. el \{\
+. ie \\n[#COLUMNS] \{\
+. ll \\n[#COL_L_LENGTH]u
+. ta \\n[.l]u
+. \}
+. el \{\
+. ll \\n[#L_LENGTH]u
+. ta \\n[.l]u
+. \}
+. \}
+. \}
+. if \\n[#INDENT_STYLE_BOTH] \{\
+. ie \\n[#TAB_ACTIVE] .TAB\\n[#CURRENT_TAB]
+. el \{\
+. ie \\n[#COLUMNS] \{\
+. ll \\n[#COL_L_LENGTH]u
+. ta \\n[.l]u
+. \}
+. el \{\
+. ll \\n[#L_LENGTH]u
+. ta \\n[.l]u
+. \}
+. \}
+. \}
+. rr #L_INDENT
+. rr #R_INDENT
+. rr #BL_INDENT
+. rr #BR_INDENT
+. rr #T_INDENT
+. rr #H_INDENT
+. rr #INDENT_STYLE_LEFT
+. rr #INDENT_STYLE_RIGHT
+. rr #INDENT_STYLE_BOTH
+. \}
+.END
+\#
+\# =====================================================================
+\#
+\# +++HANGING CHARACTERS+++
+\#
+\# LEFT_HANG hangs its argument to the left of the left margin.
+\# If enclosed in double-quotes, the argument may contain local
+\# horizontal motions. Input text after LEFT_HANG must begin
+\# by repeating the text of the argument including horizontal
+\# motions. If the hung character is a left double-quote,
+\# \[lq] must be used in the argument and the usual keyboard
+\# double-quote (") used for the input text (so as not to confuse
+\# SMARTQUOTES).
+\#
+\# HANG is called inline with \*[HANG <character>]. Hangs its
+\# single-character argument, typically a punctuation mark, to the
+\# right of the right margin in justified copy. Unlike LEFT_HANG,
+\# does not require repeating the character as part of input text.
+\#
+\# Except for hung hyphens, HANG may be used mid-line in input
+\# text. Hung hyphens must come at the end of input lines. If
+\# the hung character is a right double-quote, "\[rq]" must be
+\# used as the argument (that is, the rq character surrounded by
+\# double-quotes). The double-quotes are required for all special
+\# characters that have the form \[c].
+\#
+.MAC LEFT_HANG END
+. nr hang-char-width \w'\\$1'
+. ds hang-char-gutter \\$2
+. ie '\\*[hang-char-gutter]'' \
+. nr hang-char \\n[hang-char-width]
+. el \
+. nr hang-char \\n[hang-char-width]+\\*[hang-char-gutter]
+\h'-\\n[hang-char]u'\c
+.END
+\#
+.MAC HANG END
+\c
+.if '\\$1'\[rq]' .nr #OPEN_CLOSE 0
+\c
+\&\\$1\c
+\h'-\w'\\$1'u'\c
+.END
+\#
+\# =====================================================================
+\#
+\# +++MULTIPLE COLUMNS+++
+\#
+\# MULTIPLE COLUMNS ON
+\# -------------------
+\# *Arguments:
+\# <none>
+\# *Function:
+\# Marks the top of a column set
+\#
+.MAC MCO END
+. mk c
+.END
+\#
+\# MULTIPLE COLUMN RETURN
+\# ----------------------
+\# *Arguments:
+\# <none>
+\# *Function:
+\# Returns to the top of a column set
+\#
+.MAC MCR END
+. vpt 0
+. sp |\\n[c]u
+. vpt
+.END
+\#
+\# MULTIPLE COLUMNS OFF
+\# --------------------
+\# *Arguments:
+\# <none> | <lead to advance beneath bottom of deepest column>
+\# *Function:
+\# Advances to the end of a column set
+\# *Notes:
+\# With no argument, advances to the next baseline (at the current
+\# leading value) beneath the longest column. With an argument
+\# (which requires a unit of measure), advances arg distance
+\# beneath the baseline of the deepest column. If the argument
+\# is zero, advances to the baseline of the deepest column.
+\#
+.MAC MCX END
+. vpt 0
+. ie '\\$1'' \{\
+. if '\\n[.z]'FLOAT*DIV' \!.TQ
+. TQ
+. sp |\\n[.h]u
+. \}
+. el \{\
+. nr #MCX_ALD (\\$1)
+. TQ
+. ie \\n[#MCX_ALD]=0 .sp |\\n[.h]u-1v
+. el .sp |\\n[.h]u+\\n[#MCX_ALD]u
+. rr #MCX_ALD
+. \}
+. vpt
+.END
+\#
+\# =====================================================================
+\#
+\# +++TYPESETTING SUPPORT MACROS+++
+\#
+\# TRAP
+\# ----
+\# *Arguments:
+\# toggle
+\# *Function:
+\# Enables/disables traps.
+\# *Notes:
+\# EL and TN don't function as advertised on the last line before
+\# a trap (when they break the preceding line, they spring the
+\# trap, and groff won't back up to the line preceding the trap).
+\# TRAP is a kludge to get EL and TN work properly on last lines.
+\# The user simply encloses the offending lines in TRAP OFF/TRAP.
+\#
+.MAC TRAP END
+. ie '\\$1'' .vpt
+. el .vpt 0
+.END
+\#
+\# SILENT
+\# ------
+\# *Arguments:
+\# <none> | <anything>
+\# *Function:
+\# Diverts text so that it doesn't print, or turns the function off.
+\# *Notes:
+\# Useful for setting up autotabs where you don't want the line with
+\# the tab marks to print.
+\#
+\# Also aliased as COMMENT, in case user wants to input a batch of
+\# text that doesn't print.
+\#
+.MAC SILENT END
+. nr #SILENT 1
+. if \\n[#QUAD] .br
+. ie '\\$1'' .di NO_FLASH
+. el \{\
+. br
+. di
+. rm NO_FLASH
+. rr #SILENT
+. \}
+.END
+\#
+\# PRINT
+\# -----
+\# *Function:
+\# Prints anything. A macro that helps keep my code nicely indented.
+\#
+.MAC PRINT END
+. nop \\$*
+.END
+\#
+\# Numbered strings for while loop in SMALLCAPS.
+\#
+.ds $c1 a
+.ds $c2 b
+.ds $c3 c
+.ds $c4 d
+.ds $c5 e
+.ds $c6 f
+.ds $c7 g
+.ds $c8 h
+.ds $c9 i
+.ds $c10 j
+.ds $c11 k
+.ds $c12 l
+.ds $c13 m
+.ds $c14 n
+.ds $c15 o
+.ds $c16 p
+.ds $c17 q
+.ds $c18 r
+.ds $c19 s
+.ds $c20 t
+.ds $c21 u
+.ds $c22 v
+.ds $c23 w
+.ds $c24 x
+.ds $c25 y
+.ds $c26 z
+.ds $c27 \[`a]
+.ds $c28 \[^a]
+.ds $c29 \['a]
+.ds $c30 \[:a]
+.ds $c31 \[oa]
+.ds $c32 \[~a]
+.ds $c33 \[ae]
+.ds $c34 \[`e]
+.ds $c35 \[^e]
+.ds $c36 \['e]
+.ds $c37 \[:e]
+.ds $c38 \[`i]
+.ds $c39 \[^i]
+.ds $c40 \['i]
+.ds $c41 \[:i]
+.ds $c42 \[`o]
+.ds $c43 \[^o]
+.ds $c44 \['o]
+.ds $c45 \[:o]
+.ds $c46 \[~o]
+.ds $c47 \[/o]
+.ds $c48 \[`u]
+.ds $c49 \[^u]
+.ds $c50 \['u]
+.ds $c51 \[:u]
+.ds $c52 \[,c]
+.ds $c53 \[Sd]
+.ds $c54 \[~n]
+.ds $c55 \[Sd]
+.ds $c56 \[Tp]
+.ds $c57 \['y]
+.ds $c58 \[:y]
+\#
+.ds $C1 A
+.ds $C2 B
+.ds $C3 C
+.ds $C4 D
+.ds $C5 E
+.ds $C6 F
+.ds $C7 G
+.ds $C8 H
+.ds $C9 I
+.ds $C10 J
+.ds $C11 K
+.ds $C12 L
+.ds $C13 M
+.ds $C14 N
+.ds $C15 O
+.ds $C16 P
+.ds $C17 Q
+.ds $C18 R
+.ds $C19 S
+.ds $C20 T
+.ds $C21 U
+.ds $C22 V
+.ds $C23 W
+.ds $C24 X
+.ds $C25 Y
+.ds $C26 Z
+.ds $C27 \[`A]
+.ds $C28 \[^A]
+.ds $C29 \['A]
+.ds $C30 \[:A]
+.ds $C31 \[oA]
+.ds $C32 \[~A]
+.ds $C33 \[AE]
+.ds $C34 \[`E]
+.ds $C35 \[^E]
+.ds $C36 \['E]
+.ds $C37 \[:E]
+.ds $C38 \[`I]
+.ds $C39 \[^I]
+.ds $C40 \['I]
+.ds $C41 \[:I]
+.ds $C42 \[`O]
+.ds $C43 \[^O]
+.ds $C44 \['O]
+.ds $C45 \[:O]
+.ds $C46 \[~O]
+.ds $C47 \[/O]
+.ds $C48 \[`U]
+.ds $C49 \[^U]
+.ds $C50 \['U]
+.ds $C51 \[:U]
+.ds $C52 \[,C]
+.ds $C53 \[-D]
+.ds $C54 \[~N]
+.ds $C55 \[-D]
+.ds $C56 \[TP]
+.ds $C57 \['Y]
+.ds $C58 \[:Y]
+\#
+\# CAPS
+\# ----
+\# *Arguments:
+\# <none> | <anything>
+\# *Function:
+\# Converts text to caps, or, if OFF, reverts to normal caps/lc.
+\# *Notes:
+\# For inline control of capitalization style, use \*[UC] and
+\# \*[LC].
+\#
+.MAC CAPS END
+. ie '\\$1'' \{\
+. LC_TO_CAPS
+. nr #CAPS_ON 1
+. \}
+. el \{\
+. CAPS_TO_LC
+. rr #CAPS_ON
+. \}
+.END
+\#
+.MAC UC END
+\c
+. LC_TO_CAPS
+. nr #CAPS_ON 1
+.END
+\#
+.MAC LC END
+\c
+. CAPS_TO_LC
+. rr #CAPS_ON
+.END
+\#
+\# Perform lowercase conversion to caps or revert to lowercase
+\#
+.MAC CONVERT_CASE END
+. if '\\$0'LC_TO_CAPS' \{\
+. nr #LOOP 0 1
+. while \\n+[#LOOP]<=58 \{\
+. tr \\*[$c\\n[#LOOP]]\\*[$C\\n[#LOOP]]
+. \}
+. \}
+. if '\\$0'CAPS_TO_LC' \{\
+. nr #LOOP 0 1
+. while \\n+[#LOOP]<=58 \{\
+. tr \\*[$c\\n[#LOOP]]\\*[$c\\n[#LOOP]]
+. \}
+. \}
+.END
+.
+.ALIAS LC_TO_CAPS CONVERT_CASE
+.ALIAS CAPS_TO_LC CONVERT_CASE
+.
+\#
+\# SMALLCAPS
+\# ---------
+\# *Arguments:
+\# <none> | <anything>
+\# *Function:
+\# Converts text to smallcaps, or, if <anything>, reverts to normal
+\# caps/lc.
+\# *Notes:
+\# SMALLCAPS has no inline escape eqiv. to \*[UC].
+\#
+.MAC SMALLCAPS END
+. if \\n[#PRINT_STYLE]=2 \{\
+. if !\\n[.u] \
+. if \\n[.int] .nop \& \c
+. nr sc*size \\n[.ps]*\\n[sc*factor]/1000
+. if \\n[sc*wt-adj] .nr sc*wt-adj-factor \\n[sc*size]*\\n[sc*wt-adj]/1000
+. if \\n[sc*extend] .nr sc*extend-factor \\n[sc*size]*\\n[sc*extend]/1000
+. ie '\\$1'' \{\
+. nr #SMALLCAPS_ON 1
+. nr #LOOP 0 1
+. while \\n+[#LOOP]<=58 \{\
+. char \\*[$c\\n[#LOOP]] \
+\Z'\s[\\n[sc*size]u+\\n[sc*extend-factor]u]\H'-\\n[sc*extend-factor]u'\
+\\*[$C\\n[#LOOP]]'\
+\h'\\n[sc*wt-adj-factor]u'\\*[$C\\n[#LOOP]]\s[0]
+. \}
+. \}
+. el \{\
+. nr #LOOP 0 1
+. while \\n+[#LOOP]<=58 \{\
+. rchar \\*[$c\\n[#LOOP]]
+. \}
+. rr sc*wt-adj-factor
+. rr sc*extend-factor
+. rr #SMALLCAPS_ON
+. \}
+. \}
+.END
+\#
+\# SMALLCAPS_SIZE
+\# --------------
+\# *Arguments:
+\# <size> [ <weight adjustment>
+\# *Function:
+\# Sets registers 'sc*factor', 'sc*wt-adj', and sc*extend.
+\# *Notes:
+\# Weight adjustment pseudo-emboldens small caps to visually match the
+\# weight of the larger real caps.
+\#
+\# Both sc*factor (size) and sc*wt-adj (weight adjustment) args are
+\# expressed as percentages of type size.
+\#
+.MAC SMALLCAPS_STYLE END
+. nr #LOOP 0 1
+. while \\n+[#LOOP]<=\\n[#NUM_ARGS] \{\
+. if '\\$1'SIZE' \{\
+. shift
+. nr sc*factor (z;\\$1)/100
+. shift
+. \}
+. if '\\$1'WEIGHT_ADJ' \{\
+. shift
+. nr sc*wt-adj (z;\\$1)/100
+. shift
+. \}
+. if '\\$1'EXTEND' \{\
+. shift
+. nr sc*extend (z;\\$1)/100
+. shift
+. \}
+. \}
+. if \\n[sc*wt-adj]=0 .rr sc*wt-adj
+. if \\n[sc*extend]=0 .rr sc*extend
+.END
+.
+.SMALLCAPS_STYLE \
+SIZE 74 \
+WEIGHT_ADJ .3 \
+EXTEND 5
+\#
+\# SIZESPECS
+\# ---------
+\# Argument:
+\# <none>
+\# Function:
+\# Gets cap-height, x-height, and descender depth of the
+\# current font at the current point size.
+\# *Notes:
+\# The routine is diverted so it remains invisible to output.
+\#
+.MAC SIZESPECS END
+. if !'\\n[.z]'' \
+. if \\n[dn] .nr saved-dn \\n[dn]
+. di TYPESIZE
+E\R'#CAP_HEIGHT \\n[.cht]'
+e\R'#X_HEIGHT \\n[.cht]'
+y\R'#DESCENDER \\n[.cdp]'
+. br
+. ds $CAP_HEIGHT \\n[#CAP_HEIGHT]u
+. ds $X_HEIGHT \\n[#X_HEIGHT]u
+. ds $DESCENDER \\n[#DESCENDER]u
+. di
+. if !'\\n[.z]'' \
+. nr dn \\n[saved-dn]
+.END
+\#
+\# =====================================================================
+\#
+\# +++TYPESETTING ALIASES+++
+\#
+.ALIAS ADD_SPACE ALD
+.ALIAS CENTRE CENTER
+.ALIAS COLOUR COLOR
+.ALIAS COMMENT SILENT
+.ALIAS CONDENSE CONDENSE_OR_EXTEND
+.ALIAS EXTEND CONDENSE_OR_EXTEND
+.ALIAS FAM FAMILY
+.ALIAS FONT FT
+.ALIAS HYPHENATE HY
+.ALIAS HYPHENATION HY
+.ALIAS HYSET HY_SET
+.ALIAS IBQ IBX
+.ALIAS ILQ ILX
+.ALIAS IQ IX
+.ALIAS IRQ IRX
+.ALIAS LIG LIGATURES
+.ALIAS NEWCOLOUR NEWCOLOR
+.ALIAS PADMARKER PAD_MARKER
+.ALIAS SP ALD
+.ALIAS SPACE ALD
+.ALIAS TABSET TAB_SET
+.ALIAS TB TAB
+.ALIAS UNDERSCORE_2 UNDERSCORE2
+.ALIAS XCOLOUR XCOLOR
+\#
+\# ====================================================================
+\#
+\# DOCUMENT PROCESSING MACROS, STRINGS AND ALIASES
+\# ===============================================
+\#
+\# DOC_MACRO_ERROR
+\# ---------------
+\# *Arguments:
+\# None.
+\# *Function:
+\# Warning message if DOC_<PARAMETER> called before START.
+\#
+.MAC DOC_MACRO_ERROR END
+. if '\\$1'DOC_L_MARGIN' .ds $REPLACEMENT L_MARGIN
+. if '\\$1'DOC_R_MARGIN' .ds $REPLACEMENT R_MARGIN
+. if '\\$1'DOC_LINE_LENGTH' .ds $REPLACEMENT LL
+. if '\\$1'DOC_FAMILY' .ds $REPLACEMENT "FAMILY or FAM
+. if '\\$1'DOC_PT_SIZE' .ds $REPLACEMENT PT_SIZE
+. if '\\$1'DOC_LEAD' .ds $REPLACEMENT LS
+. if '\\$1'DOC_QUAD' .ds $REPLACEMENT QUAD
+. tm1 "[mom]: \\$1 at line \\n[.c] of '\\n[.F]' should not be used before START.
+. tm1 " Use \\*[$REPLACEMENT] instead.
+. ab [mom]: Aborting.
+.END
+\#
+\# +++PAGE DIMENSIONS+++
+\#
+\# PAPER SIZE
+\# ----------
+\# *Arguments:
+\# LETTER | LEGAL | STATEMENT | TABLOID | LEDGER | FOLIO | QUARTO | 10x14 | EXECUTIVE | A3 | A4 | A5 | B4 | B5
+\# *Function:
+\# Sets up dimensions for different paper sizes.
+\# *Notes:
+\# LANDSCAPE may be given after papersize arg.
+\#
+.MAC PAPER END
+. vs 0
+. ds $PAPER \\$1
+. if '\\*[$PAPER]'LETTER' \{\
+. PAGEWIDTH 8.5i
+. PAGELENGTH 11i
+. \}
+. if '\\*[$PAPER]'LEGAL' \{\
+. PAGEWIDTH 8.5i
+. PAGELENGTH 14i
+. \}
+. if '\\*[$PAPER]'STATEMENT' \{\
+. PAGEWIDTH 5.5i
+. PAGELENGTH 8.5i
+. \}
+. if '\\*[$PAPER]'TABLOID' \{\
+. PAGEWIDTH 11i
+. PAGELENGTH 17i
+. \}
+. if '\\*[$PAPER]'LEDGER' \{\
+. PAGEWIDTH 17i
+. PAGELENGTH 11i
+. \}
+. if '\\*[$PAPER]'FOLIO' \{\
+. PAGEWIDTH 8.5i
+. PAGELENGTH 13i
+. \}
+. if '\\*[$PAPER]'QUARTO' \{\
+. PAGEWIDTH 610p
+. PAGELENGTH 780p
+. \}
+. if '\\*[$PAPER]'10x14' \{\
+. PAGEWIDTH 10i
+. PAGELENGTH 14i
+. \}
+. if '\\*[$PAPER]'EXECUTIVE' \{\
+. PAGEWIDTH 7.25i
+. PAGELENGTH 10.5i
+. \}
+. if '\\*[$PAPER]'A3' \{\
+. PAGEWIDTH 842p
+. PAGELENGTH 1190p
+. \}
+. if '\\*[$PAPER]'A4' \{\
+. PAGEWIDTH 595p
+. PAGELENGTH 842p
+. \}
+. if '\\*[$PAPER]'A5' \{\
+. PAGEWIDTH 421p
+. PAGELENGTH 595p
+. \}
+. if '\\*[$PAPER]'B4' \{\
+. PAGEWIDTH 709p
+. PAGELENGTH 1002p
+. \}
+. if '\\*[$PAPER]'B5' \{\
+. PAGEWIDTH 501p
+. PAGELENGTH 709p
+. \}
+. if '\\$2'LANDSCAPE' \{\
+. nr #PAGE_WIDTH_TMP \\n[#PAGE_WIDTH]
+. PAGEWIDTH \\n[#PAGE_LENGTH]u
+. PAGELENGTH \\n[#PAGE_WIDTH_TMP]u
+. as $PAPER " LANDSCAPE\"
+. \}
+. if !r#L_MARGIN .L_MARGIN \\n[.o]
+. if !r#R_MARGIN .R_MARGIN \\n[#PAGE_WIDTH]u-\\n[#L_MARGIN]u-1i
+. if '\\*[.T]'pdf' .br
+. vs
+.END
+\#
+\# ====================================================================
+\#
+\# +++PRINTSTYLE -- TYPEWRITE OR TYPESET+++
+\#
+\# PRINTSTYLE
+\# ----------
+\# *Arguments:
+\# TYPESET | TYPEWRITE [SINGLESPACE]
+\# *Function:
+\# Sets type specs for typewriter-style or typeset output.
+\# *Notes:
+\# Number registers: TYPEWRITE=1, TYPESET=2.
+\#
+.MAC PRINTSTYLE END
+. if n \{\
+. if '\\$1'TYPESET' \{\
+. pl 1
+. ab [mom]: Terminal output requires PRINTSTYLE TYPEWRITE. Aborting.
+. \}
+. \}
+. if !\\n[#COLLATE]=1 \{\
+. if !d$PAPER \{\
+. PAGELENGTH 11i
+. PAGEWIDTH 8.5i
+. \}
+. if '\\$1'TYPEWRITE' \{\
+. nr #PRINT_STYLE 1
+. if !\\n[#DOC_TYPE]=4 \{\
+. L_MARGIN 6P
+. R_MARGIN 6P
+. \}
+. ds $TYPEWRITER_FAM C
+. ds $TYPEWRITER_PS 12
+. TYPEWRITER
+. color 0
+. ie '\\$2'SINGLESPACE' \{\
+. nr #SINGLE_SPACE 1
+. vs 12
+. ie \\n[#DOC_TYPE]=4 .nr #FOOTER_ADJ \\n[.v]
+. el .nr #FOOTER_ADJ \\n[.v]
+. nr #ORIGINAL_DOC_LEAD \\n[.v]
+. \}
+. el \{\
+. if !\\n[#DOC_TYPE]=4 \{\
+. vs 24
+. nr #FOOTER_ADJ \\n[.v]/2
+. nr #ORIGINAL_DOC_LEAD \\n[.v]
+. \}
+. \}
+. QUAD L
+. HY OFF
+. SMARTQUOTES OFF
+. if !\\n[#PP_INDENT] .nr #PP_INDENT 3P
+. HDRFTR_RIGHT_CAPS
+. nr #BOLDER_UNITS 0
+. nr #CONDENSE 0
+. nr #EXTEND 0
+. if !\\n[#ITALIC_MEANS_ITALIC] \{\
+. rm IT
+. rm PREV
+. UNDERLINE_ITALIC
+. \}
+. rm BD
+. rm BDI
+. if !\\n[#SLANT_MEANS_SLANT] .UNDERLINE_SLANT
+. if !\\n[#UNDERLINE_QUOTES] .UNDERLINE_QUOTES
+. nr #IGNORE_COLUMNS 1
+. nr #RULE_WEIGHT 500
+. char \[em] --
+. tr `'
+. tr \[lq]"
+. tr \[rq]"
+. \}
+. if '\\$1'TYPESET' \{\
+. nr #PRINT_STYLE 2
+. if !\\n[#DOC_TYPE]=5 \{\
+. if !\\n[#DOC_TYPE]=4 \{\
+. L_MARGIN 6P
+. R_MARGIN 6P
+. \}
+. \}
+. FAMILY T
+. FT R
+. if !\\n[#DOC_TYPE]=4 .ps 12.5
+. if !\\n[#DOC_TYPE]=4 .vs 16
+.\" In DEFAULTS, TRAPS is run with this leading, so we need a register to
+.\" hold it for use with the .sp in FOOTER
+. nr #FOOTER_ADJ 12000
+. JUSTIFY
+. HY
+. HY_SET 2 36p 1p
+. KERN
+. LIG
+. SS 0
+. SMARTQUOTES
+. if !\\n[#PP_INDENT] \{\
+. in 2m \"Set indent
+. nr #PP_INDENT \\n[.i] \"Read into #PP_INDENT
+. in 0 \"Remove indent
+. \}
+. HDRFTR_RIGHT_CAPS
+. rr #IGNORE_COLUMNS
+. \}
+.\" Set up default style for nine levels of headings
+. nr #HD_LEVEL 0 1 \" loop step
+. nr #LOOP 9 \" loop count
+. while \\n+[#HD_LEVEL]<=\\n[#LOOP] \{\
+. HEADING_STYLE \\n[#HD_LEVEL] \
+ FONT B \
+ SIZE +0 \
+ QUAD L \
+ NEEDS 1 \
+ COLOR black
+.\" Set up default style for nine levels of TOC headings
+. TOC_ENTRY_STYLE \\n[#HD_LEVEL] \
+ FONT R \
+ SIZE +0 \
+ COLOR black
+. \}
+.\" Set up decreasing sizes for headings levels 1 - 3, starting at +3
+. nr #HD_LEVEL 0 1 \" loop step
+. nr #LOOP 3 \" loop count
+. nr #HD_SIZE 4 1
+. while \\n+[#HD_LEVEL]<=\\n[#LOOP] \{\
+. nr #HD_SIZE_CHANGE \\n-[#HD_SIZE]
+. ds $HEAD_\\n[#HD_LEVEL]_SIZE +\\n[#HD_SIZE_CHANGE]
+. \}
+.\" Set up TOC title style
+. TOC_TITLE_STYLE FONT R SIZE +0 INDENT 0
+.\" Set up captions, labels, sources
+. LABELS ALL FONT B AUTOLEAD 2
+. LABELS EQN FONT R QUAD RIGHT
+. CAPTIONS ALL AUTOLEAD 2
+. CAPTIONS EQN QUAD CENTER
+. SOURCES TBL AUTOLEAD 2
+. \}
+.END
+\#
+\# Set limited parameters to TYPEWRITE.
+\#
+.MAC TYPEWRITER_FAMILY END
+. ds $TYPEWRITER_FAM \\$1
+.END
+\#
+.ALIAS TYPEWRITER_FAM TYPEWRITER_FAMILY
+\#
+.MAC TYPEWRITER_SIZE END
+. ds $TYPEWRITER_PS \\$1
+.END
+\#
+.MAC TYPEWRITER END
+. fam \\*[$TYPEWRITER_FAM]
+. ft R
+. ps \\*[$TYPEWRITER_PS]
+.END
+\#
+\# ITALIC MEANS ITALIC
+\# -------------------
+\# *Argument:
+\# <none>
+\# *Function:
+\# Instructs TYPEWRITE to treat italics as italics, whether
+\# invoked via control lines or inline.
+\# *Notes:
+\# ITALIC_MEANS_ITALIC and UNDERLINE_ITALIC are mutually exclusive,
+\# hence invoking the one automatically turns off the other.
+\#
+.MAC ITALIC_MEANS_ITALIC END
+. if \\n[#PRINT_STYLE]=1 \{\
+. nr #ITALIC_MEANS_ITALIC 1
+. rr #UNDERLINE_ITALIC
+. rm ROM
+. rm IT
+. rm PREV
+. ds ROM \Ef[R]
+. ds IT \Ef[I]
+. ds PREV \Ef[]
+. \}
+.END
+\#
+\# UNDERLINE ITALIC
+\# ----------------
+\# *Argument:
+\# <none>
+\# *Function:
+\# Instructs TYPEWRITE to underline italics, whether invoked
+\# via control lines or inline.
+\# *Notes:
+\# UNDERLINE_ITALIC and ITALIC_MEANS_ITALIC are mutually exclusive,
+\# hence invoking the one automatically turns off the other.
+\#
+\# UNDERLINE_ITALIC is the default for TYPEWRITE.
+\#
+.MAC UNDERLINE_ITALIC END
+. if \\n[#PRINT_STYLE]=1 \{\
+. nr #UNDERLINE_ITALIC 1
+. rr #ITALIC_MEANS_ITALIC
+. rm ROM
+. rm IT
+. rm PREV
+. ds ROM \E*[ULX]
+. ds IT \E*[UL]
+. ds PREV \f[P]\E*[ULX]
+. \}
+.END
+\#
+\# UNDERLINE SLANT
+\# ---------------
+\# *Arguments:
+\# <none> | <anything>
+\# *Function:
+\# Instructs TYPEWRITE to underline occurrences of \*[SLANT], or
+\# turns feature off.
+\# *Notes:
+\# Users may want \*[SLANT] to mean slant in TYPEWRITE, although
+\# most of the time, \*[SLANT] most likely means the user wanted
+\# italic but didn't have it, ergo the need to tell TYPEWRITE to
+\# treat \*[SLANT] as italic (i.e. underlined).
+\#
+\# UNDERLINE_SLANT and SLANT_MEANS_SLANT are mutually exclusive,
+\# hence invoking the one automatically turns off the other.
+\#
+\# UNDERLINE_SLANT is the default for TYPEWRITE.
+\#
+.MAC UNDERLINE_SLANT END
+. if \\n[#PRINT_STYLE]=1 \{\
+. rr #SLANT_MEANS_SLANT
+. nr #UNDERLINE_SLANT 1
+. rm SLANT
+. rm SLANTX
+. ds SLANT \ER'#SLANT_ON 1'\E*[UL]
+. ds SLANTX \ER'#SLANT_ON 0'\E*[ULX]
+. \}
+.END
+\#
+.MAC SLANT_MEANS_SLANT END
+. if \\n[#PRINT_STYLE]=1 \{\
+. rr #UNDERLINE_SLANT
+. nr #SLANT_MEANS_SLANT 1
+. rm SLANT
+. rm SLANTX
+. ds SLANT \ER'#SLANT_ON 1'\ES'\En[#DEGREES]'
+. ds SLANTX \ER'#SLANT_ON 0'\ES'0'
+. \}
+.END
+\#
+.MAC IGNORE_COLUMNS END
+. if \\n[#PRINT_STYLE]=1 .nr #NO_COLUMNS 1
+.END
+\#
+\# ====================================================================
+\#
+\# +++COPY STYLE -- DRAFT OR FINAL+++
+\#
+\# COPY STYLE
+\# ----------
+\# *Arguments:
+\# DRAFT | FINAL
+\# *Function:
+\# Sets registers that are used to determine what to put
+\# in the default header, and how to number pages.
+\# *Notes:
+\# DOCTYPE must come before COPYSTYLE.
+\#
+.MAC COPYSTYLE END
+. ds $COPY_STYLE \\$1
+. if '\\*[$COPY_STYLE]'DRAFT' \{\
+. nr #COPY_STYLE 1
+. if !d$DRAFT .DRAFT 1
+. \}
+. if '\\*[$COPY_STYLE]'FINAL' .nr #COPY_STYLE 2
+. if '\\*[$CHAPTER_STRING]'' .CHAPTER_STRING "Chapter"
+. if '\\*[$DRAFT_STRING]'' .DRAFT_STRING "Draft"
+. if '\\*[$REVISION_STRING]'' .REVISION_STRING "Rev."
+.\" Default
+. if \\n[#DOC_TYPE]=1 \{\
+. ie \\n[#COPY_STYLE]=1 \{\
+. ie \\n[#PAGENUM_STYLE_SET] .PAGENUM_STYLE \\*[$PAGENUM_STYLE]
+. el .PAGENUM_STYLE roman
+. if \\n[#USER_DEF_HDRFTR_CENTER]=0 \{\
+. ie \\n[#DRAFT_WITH_PAGENUM] .ds $HDRFTR_CENTER
+. el \{\
+. ie '\\*[$REVISION]'' \{\
+. ds $HDRFTR_CENTER \
+ \\*[$DRAFT_STRING]\\*[$DRAFT]
+. \}
+. el \{\
+. ds $HDRFTR_CENTER \
+ \\*[$DRAFT_STRING]\\*[$DRAFT], \
+ \\*[$REVISION_STRING] \\*[$REVISION]
+. \}
+. \}
+. \}
+. \}
+. el \{\
+. ie \\n[#PAGENUM_STYLE_SET] .PAGENUM_STYLE \\*[$PAGENUM_STYLE]
+. el .PAGENUM_STYLE DIGIT
+. if \\n[#DRAFT_WITH_PAGENUM] .rr #DRAFT_WITH_PAGENUM
+. if \\n[#USER_DEF_HDRFTR_CENTER]=0 \{\
+. ds $HDRFTR_CENTER
+. rr #USER_DEF_HDRFTR_CENTER
+. \}
+. \}
+. \}
+.\" Chapter
+. if \\n[#DOC_TYPE]=2 \{\
+.\" Copystyle DRAFT
+. ie \\n[#COPY_STYLE]=1 \{\
+. ie \\n[#PAGENUM_STYLE_SET] \
+. PAGENUM_STYLE \\*[$PAGENUM_STYLE]
+. el \
+. PAGENUM_STYLE roman
+. if \\n[#USER_DEF_HDRFTR_CENTER]=0 \{\
+. ie \\n[#DRAFT_WITH_PAGENUM] \{\
+. ie '\\*[$CHAPTER]'' \{\
+. ie !'\\*[$CHAPTER_TITLE_1]'' \
+. ds $HDRFTR_CENTER \\*[$CHAPTER_TITLE]
+. el .ds $HDRFTR_CENTER \\*[$CHAPTER_STRING]
+. \}
+. el \{\
+. ie !'\\*[$CHAPTER_TITLE_1]'' \
+. ds $HDRFTR_CENTER \\*[$CHAPTER_TITLE]
+. el .ds $HDRFTR_CENTER \\*[$CHAPTER_STRING] \\*[$CHAPTER]
+. \}
+. \}
+. el \{\
+. ie '\\*[$REVISION]'' \{\
+. ie '\\*[$CHAPTER]'' \{\
+. ie !'\\*[$CHAPTER_TITLE_1]'' \{\
+. ie '\\*[$DRAFT]'' \
+. ds $HDRFTR_CENTER \\*[$CHAPTER_TITLE]
+. el \{\
+. ds $HDRFTR_CENTER \
+ \\*[$CHAPTER_TITLE], \
+ \\*[$DRAFT_STRING]\\*[$DRAFT]
+. \}
+. \}
+. el \{\
+. ie '\\*[$DRAFT]'' \{\
+. ds $HDRFTR_CENTER \
+ \\*[$CHAPTER_STRING]
+. \}
+. el \{\
+. ds $HDRFTR_CENTER \
+ \\*[$CHAPTER_STRING], \
+ \\*[$DRAFT_STRING]\\*[$DRAFT]
+. \}
+. \}
+. \}
+. el \{\
+. ie !'\\*[$CHAPTER_TITLE_1]'' \{\
+. ie '\\*[$DRAFT]'' \
+. ds $HDRFTR_CENTER \\*[$CHAPTER_TITLE]
+. el \{\
+. ds $HDRFTR_CENTER \
+ \\*[$CHAPTER_TITLE_1], \
+ \\*[$DRAFT_STRING]\\*[$DRAFT]
+. \}
+. \}
+. el \{\
+. ie '\\*[$DRAFT]'' \{\
+. ds $HDRFTR_CENTER \
+ \\*[$CHAPTER_STRING] \\*[$CHAPTER]
+. \}
+. el \{\
+. ds $HDRFTR_CENTER \
+ \\*[$CHAPTER_STRING] \\*[$CHAPTER], \
+ \\*[$DRAFT_STRING]\\*[$DRAFT]
+. \}
+. \}
+. \}
+. \}
+. el \{\
+. ie '\\*[$CHAPTER]'' \{\
+. ie !'\\*[$CHAPTER_TITLE_1]'' \{\
+. ie '\\*[$DRAFT]'' \{\
+. ds $HDRFTR_CENTER \
+ \\*[$CHAPTER_TITLE], \
+ \\*[$REVISION_STRING] \\*[$REVISION]
+. \}
+. el \{\
+. ds $HDRFTR_CENTER \
+ \\*[$CHAPTER_TITLE], \
+ \\*[$DRAFT_STRING]\\*[$DRAFT], \
+ \\*[$REVISION_STRING] \\*[$REVISION]
+. \}
+. \}
+. el \{\
+. ie '\\*[$DRAFT]'' \{\
+. ds $HDRFTR_CENTER \
+ \\*[$CHAPTER_STRING], \
+ \\*[$REVISION_STRING] \\*[$REVISION]
+. \}
+. el \{\
+. ds $HDRFTR_CENTER \
+ \\*[$CHAPTER_STRING], \
+ \\*[$DRAFT_STRING]\\*[$DRAFT], \
+ \\*[$REVISION_STRING] \\*[$REVISION]
+. \}
+. \}
+. \}
+. el \{\
+. ie !'\\*[$CHAPTER_TITLE_1]'' \{\
+. ie '\\*[$DRAFT]'' \{\
+. ds $HDRFTR_CENTER \
+ \\*[$CHAPTER_TITLE], \
+ \\*[$REVISION_STRING] \\*[$REVISION]
+. \}
+. el \{\
+. ds $HDRFTR_CENTER \
+ \\*[$CHAPTER_TITLE], \
+ \\*[$DRAFT_STRING]\\*[$DRAFT], \
+ \\*[$REVISION_STRING] \\*[$REVISION]
+. \}
+. \}
+. el \{\
+. ie '\\*[$DRAFT]'' \{\
+. ds $HDRFTR_CENTER \
+ \\*[$CHAPTER_STRING] \\*[$CHAPTER], \
+ \\*[$REVISION_STRING] \\*[$REVISION]
+. \}
+. el \{\
+. ds $HDRFTR_CENTER \
+ \\*[$CHAPTER_STRING] \\*[$CHAPTER], \
+ \\*[$DRAFT_STRING]\\*[$DRAFT], \
+ \\*[$REVISION_STRING] \\*[$REVISION]
+. \}
+. \}
+. \}
+. \}
+. \}
+. \}
+. \}
+.\" Copystyle FINAL
+. el \{\
+. if \\n[#DRAFT_WITH_PAGENUM] .rr #DRAFT_WITH_PAGENUM
+. if \\n[#USER_DEF_HDRFTR_CENTER]=0 \{\
+. ie \\n[#PAGENUM_STYLE_SET] \
+. PAGENUM_STYLE \\*[$PAGENUM_STYLE]
+. el .PAGENUM_STYLE DIGIT
+. ie '\\*[$CHAPTER]'' \{\
+. ie !'\\*[$CHAPTER_TITLE_1]'' \
+. ds $HDRFTR_CENTER \\*[$CHAPTER_TITLE]
+. el \
+. ds $HDRFTR_CENTER \\*[$CHAPTER_STRING]
+. \}
+. el \{\
+. ie !'\\*[$CHAPTER_TITLE_1]'' \
+. ds $HDRFTR_CENTER \\*[$CHAPTER_TITLE]
+. el \
+. ds $HDRFTR_CENTER \\*[$CHAPTER_STRING] \\*[$CHAPTER]
+. \}
+. \}
+. \}
+. \}
+.\" Named
+. if \\n[#DOC_TYPE]=3 \{\
+. ie \\n[#COPY_STYLE]=1 \{\
+. ie \\n[#PAGENUM_STYLE_SET] .PAGENUM_STYLE \\*[$PAGENUM_STYLE]
+. el .PAGENUM_STYLE roman
+. ie \\n[#DRAFT_WITH_PAGENUM] \
+. ds $HDRFTR_CENTER \\*[$DOC_TYPE]
+. el \{\
+. if \\n[#USER_DEF_HDRFTR_CENTER]=0 \{\
+. ie '\\*[$REVISION]'' \{\
+. ie '\\*[$DRAFT]'' \
+. ds $HDRFTR_CENTER \\*[$DOC_TYPE]
+. el \{\
+. ds $HDRFTR_CENTER \
+ \\*[$DOC_TYPE], \
+ \\*[$DRAFT_STRING]\\*[$DRAFT]
+. \}
+. \}
+. el \{\
+. ie '\\*[$DRAFT]'' \{\
+. ds $HDRFTR_CENTER \
+ \\*[$DOC_TYPE], \
+ \\*[$REVISION_STRING] \\*[$REVISION]
+. \}
+. el \{\
+. ds $HDRFTR_CENTER \
+ \\*[$DOC_TYPE], \
+ \\*[$DRAFT_STRING]\\*[$DRAFT], \
+ \\*[$REVISION_STRING] \\*[$REVISION]
+. \}
+. \}
+. \}
+. \}
+. \}
+. el \{\
+. if \\n[#DRAFT_WITH_PAGENUM] .rr #DRAFT_WITH_PAGENUM
+. if \\n[#USER_DEF_HDRFTR_CENTER]=0 \{\
+. ie \\n[#PAGENUM_STYLE_SET] .PAGENUM_STYLE \\*[$PAGENUM_STYLE]
+. el .PAGENUM_STYLE DIGIT
+. ds $HDRFTR_CENTER \\*[$DOC_TYPE]
+. \}
+. \}
+. \}
+.END
+\#
+\# ====================================================================
+\#
+\# +++COLLECT DOC INFO (reference macros, metadata)+++
+\#
+\# *Arguments:
+\# various string/register arguments
+\# *Function:
+\# Set strings and registers for covers, docheaders, page headers.
+\#
+.MAC DOCTITLE END
+. rr #DOCTITLE_NUM
+. nr #DOCTITLE_NUM 0 1
+. while \\n[#NUM_ARGS]>\\n[#DOCTITLE_NUM] \{\
+. ds $DOCTITLE_\\n+[#DOCTITLE_NUM] \\$\\n[#DOCTITLE_NUM]
+. \}
+. ds $DOCTITLE \\$*
+. PDF_TITLE \\*[$DOCTITLE]
+.END
+\#
+.MAC TITLE END \"Document title
+. if '\\$1'DOC_COVER' \{\
+. shift
+. DOC_COVERTITLE \\$@
+. return
+. \}
+. if '\\$1'COVER' \{\
+. shift
+. COVERTITLE \\$@
+. return
+. \}
+. ie \\n[#NUM_ARGS]=0 \{\
+. if \\n[#TITLE_NUM] \{\
+. nr #ITEM 0 1
+. while \\n[#TITLE_NUM]>\\n[#ITEM] \{\
+. rm $TITLE_\\n+[#ITEM]
+. \}
+. rr #TITLE_NUM
+. \}
+. \}
+. el \{\
+. nr #TITLE_NUM 0 1
+. while \\n[#NUM_ARGS]>\\n[#TITLE_NUM] \{\
+. ds $TITLE_\\n+[#TITLE_NUM] \\$\\n[#TITLE_NUM]
+. \}
+. ds $TITLE \\$*
+. \}
+.END
+\#
+.MAC SUBTITLE END \"Document sub-title
+. ie \\n[#NUM_ARGS]=0 \{\
+. if \\n[#DOC_COVER_SUBTITLE_NUM] \
+. ds COVER_ DOC_COVER_
+. if \\n[#COVER_SUBTITLE_NUM] \
+. ds COVER_ COVER_
+. if \\n[#\\*[COVER_]SUBTITLE_NUM] \{\
+. nr #ITEM 0 1
+. while \\n[#\\*[COVER_]SUBTITLE_NUM]>\\n[#ITEM] \{\
+. rm $\\*[COVER_]SUBTITLE_\\n+[#ITEM]
+. \}
+. rr #\\*[COVER_]SUBTITLE_NUM
+. rm $SUBTITLE
+. \}
+. \}
+. el \{\
+. if '\\$1'DOC_COVER' \{\
+. ds COVER_ DOC_COVER_
+. shift
+. \}
+. if '\\$1'COVER' \{\
+. ds COVER_ COVER_
+. shift
+. \}
+. nr #\\*[COVER_]SUBTITLE_NUM 0 1
+. while \\n[#NUM_ARGS]>\\n[#\\*[COVER_]SUBTITLE_NUM] \{\
+. ds $\\*[COVER_]SUBTITLE_\\n+[#\\*[COVER_]SUBTITLE_NUM] \
+\\$\\n[#\\*[COVER_]SUBTITLE_NUM]
+. \}
+. rm COVER_
+. ds $SUBTITLE \\$*
+. \}
+.END
+\#
+.MAC CHAPTER END \"If document is a chapter, the chapter number
+. nr #CHAPTER_CALLED 1
+. ds $CHAPTER \\$1
+. if \B'\\*[$CHAPTER]' .nr #CH_NUM \\*[$CHAPTER]
+. if !r #CH_NUM .nr #CH_NUM 1
+.END
+.
+.MAC CHAPTER_NUMBER END
+. nr #CH_NUM \\$1
+.END
+\#
+.MAC CHAPTER_TITLE END \" This defines what comes after Chapter #
+. ie \\n[#NUM_ARGS]=0 \{\
+. if \\n[#CHAPTER_TITLE_NUM] \{\
+. nr #ITEM 0 1
+. while \\n[#CHAPTER_TITLE_NUM]>\\n[#ITEM] \{\
+. rm $CHAPTER_TITLE_\\n+[#ITEM]
+. \}
+. rr #CHAPTER_TITLE_NUM
+. rm $CHAPTER_TITLE
+. \}
+. \}
+. el \{\
+. rr #CHAPTER_TITLE_NUM
+. nr #CHAPTER_TITLE_NUM 0 1
+. while \\n[#NUM_ARGS]>\\n[#CHAPTER_TITLE_NUM] \{\
+. ds $CHAPTER_TITLE_\\n+[#CHAPTER_TITLE_NUM] \
+\\$\\n[#CHAPTER_TITLE_NUM]
+. \}
+. ds $CHAPTER_TITLE \\$*
+. \}
+.END
+\#
+.MAC DRAFT END \"Draft number
+. ie '\\$1'' .ds $DRAFT
+. el .ds $DRAFT " \\$1
+.END
+\#
+.MAC REVISION END \"Revision number
+. ds $REVISION \\$1
+.END
+\#
+.MAC DRAFT_WITH_PAGENUMBER END \"Attach draft/revision strings to page number
+. nr #DRAFT_WITH_PAGENUM 1
+.END
+\#
+.MAC AUTHOR END \"Author. Enclose all args fully in double quotes.
+. rr #NO_PRINT_AUTHOR
+. if '\\$1'DOC_COVER' \{\
+. ds COVER_ DOC_COVER_
+. shift
+. \}
+. if '\\$1'COVER' \{\
+. ds COVER_ COVER_
+. shift
+. \}
+. nr #\\*[COVER_]AUTHOR_NUM 0 1
+. while \\n[#NUM_ARGS]>\\n[#\\*[COVER_]AUTHOR_NUM] \{\
+. ds $\\*[COVER_]AUTHOR_\\n+[#\\*[COVER_]AUTHOR_NUM] \
+\\$\\n[#\\*[COVER_]AUTHOR_NUM]
+. if !'\\*[$\\*[COVER_]AUTHOR_\\n[#\\*[COVER_]AUTHOR_NUM]]'' \
+. as $AUTHORS \
+"\\*[$\\*[COVER_]AUTHOR_\\n[#\\*[COVER_]AUTHOR_NUM]], \"
+. \}
+. ds $AUTHOR \\*[$AUTHOR_1]
+. substring $AUTHORS 0 -2
+. ds PDF_AUTHORS \\*[$AUTHORS]
+. pdfmomclean PDF_AUTHORS
+. nop \!x X ps:exec [/Author (\\*[PDF_AUTHORS]) /DOCINFO pdfmark
+.END
+.
+.ALIAS EDITOR AUTHOR
+\#
+.MAC COPYRIGHT END \"For use on cover pages only
+. ie \\n[#NUM_ARGS]=1 \
+. ds $COVER_COPYRIGHT \[co]\\$1
+. el \{\
+. if '\\$1'COVER' .ds $COVER_COPYRIGHT \[co]\\$2
+. if '\\$1'DOC_COVER' .ds $DOC_COVER_COPYRIGHT \[co]\\$2
+. \}
+.END
+\#
+.MAC COPYRIGHT_V_ADJUST END
+. ds $COPYRIGHT_V_ADJ \\$1
+.END
+\#
+.MAC MISC END \"Doc cover and cover pages only; enclose all args in double quotes
+. rm COVER_
+. ie \\n[#NUM_ARGS]=0 \{\
+. if \\n[#DOC_COVER_MISC_LINES] \
+. ds COVER_ DOC_COVER_
+. if \\n[#COVER_MISC_LINES] \
+. ds COVER_ COVER_
+. if \\n[#\\*[COVER_]MISC_LINES] \{\
+. nr #LINE 0 1
+. while \\n[#\\*[COVER_]MISC_LINES]>\\n[#LINE] \{\
+. rm $\\*[COVER_]MISC_\\n+[#LINE]
+. \}
+. rr #\\*[COVER_]MISC_LINES
+. \}
+. \}
+. el \{\
+. if '\\$1'DOC_COVER' \{\
+. ds COVER_ DOC_COVER_
+. shift
+. \}
+. if '\\$1'COVER' \{\
+. ds COVER_ COVER_
+. shift
+. \}
+. nr #\\*[COVER_]MISC_LINE 0 1
+. while \\n[#NUM_ARGS]>\\n[#\\*[COVER_]MISC_LINE] \{\
+. ds $\\*[COVER_]MISC_\\n+[#\\*[COVER_]MISC_LINE] \
+\\$[\\n[#\\*[COVER_]MISC_LINE]]
+. \}
+. nr #\\*[COVER_]MISC_LINES \\n[#NUM_ARGS]
+. rm COVER_
+. \}
+.END
+\#
+\# Page number that appears on page one.
+.MAC PAGENUMBER END
+. nr #n%_AT_PAGENUM_SET \\n%
+. nr #PAGE_NUM_ADJ \\$1-\\n[#n%_AT_PAGENUM_SET]
+. rr #n%_AT_PAGENUM_SET
+. nr #PAGE_NUM_SET 1
+.END
+\#
+\# Replacement string for pagenumber.
+.MAC PAGENUMBER_STRING END
+. ds $PAGENUM_STRING \\$1
+.END
+\#
+\# ====================================================================
+\#
+\# +++TYPE OF DOCUMENT+++
+\#
+\# DOCUMENT TYPE
+\# -------------
+\# *Argument:
+\# DEFAULT | CHAPTER | NAMED "<whatever> | LETTER
+\# *Function:
+\# Creates strings and sets registers for document types.
+\# *Notes:
+\# Number registers: DEFAULT=1, CHAPTER=2, NAMED=3, LETTER=4,
+\# SLIDES=5
+\#
+.MAC DOCTYPE END
+. if '\\$1'DEFAULT' .nr #DOC_TYPE 1
+. if '\\$1'CHAPTER' .nr #DOC_TYPE 2
+. if '\\$1'NAMED' \{\
+. rr #NO_PRINT_DOCTYPE
+. ds $DOC_TYPE \\$2
+. nr #DOC_TYPE 3
+. \}
+. if '\\$1'LETTER' \{\
+. nr #DOC_TYPE 4
+. L_MARGIN 1.125i
+. R_MARGIN 1.125i
+. ps 12
+. vs 13.5
+. nr #FOOTER_ADJ \\n[.v]
+. DOCHEADER OFF
+. PARA_INDENT 3m
+. INDENT_FIRST_PARAS
+. PARA_SPACE
+. ds $SUITE \En[#SUITE]
+. HEADER_MARGIN 3P+6p
+. HEADER_GAP 3P
+. FOOTERS
+. FOOTER_RULE OFF
+. FOOTER_LEFT ""
+. FOOTER_CENTER ""
+. FOOTER_RIGHT_SIZE +0
+. FOOTER_RIGHT "\&.../\E*[$SUITE]
+. FOOTER_ON_FIRST_PAGE
+. em ALL_DONE
+. \}
+. if '\\$1'SLIDES' \{\
+. shift
+. nr #DOC_TYPE 5
+. PRINTSTYLE TYPESET
+. FAMILY H
+. QUAD CENTER
+. QUOTE_STYLE QUAD CENTER
+. BLOCKQUOTE_STYLE \
+ QUAD J \
+ INDENT \\n[.l]u/5u
+. PARA_INDENT 0
+. NO_SHIM
+. NO_FLEX
+. HEADING_STYLE 1 \
+ SIZE +8 \
+ QUAD CENTER
+. HEADING_STYLE 2 \
+ SIZE +4 \
+ QUAD CENTER
+. HEADING_STYLE 3 \
+ SIZE +2 \
+ QUAD CENTER
+. DOCHEADER off
+. PAGINATION off
+. PAGENUM_HYPHENS off
+. HEADERS off
+. FOOTERS off
+. HEADERS_PLAIN
+. FOOTERS_PLAIN
+. nr loop-count 0 1
+. nr loop-counter \\n[#NUM_ARGS]
+.\" Default 16:9 setup if no ASPECT
+. PAGE 11i 6.1875i 36p 36p 80p 72p
+. PT_SIZE 14
+. AUTOLEAD 4
+. HEADER_SIZE -2
+. while \\n+[loop-count]<=\\n[loop-counter] \{\
+. if '\\$1'ASPECT' \{\
+. if '\\$2'4:3' \{\
+. PAGE 11i 8.25i 36p 36p 90p 84p
+. PT_SIZE 16
+. AUTOLEAD 6
+. HEADER_SIZE -3
+. \}
+. if '\\$2'16:9' \{\
+. PAGE 11i 6.1875i 36p 36p 80p 72p
+. PT_SIZE 14
+. AUTOLEAD 4
+. HEADER_SIZE -2
+. \}
+. shift 2
+. \}
+. if '\\$1'HEADER' \{\
+. shift 1
+. nr #SLIDE_HEADERS 1
+. ds $SLIDE_HDR_L \\$1
+. ds $SLIDE_HDR_C \\$2
+. ds $SLIDE_HDR_R \\$3
+. HEADER_MARGIN 45p
+. shift 3
+. \}
+. if '\\$1'FOOTER' \{\
+. shift 1
+. nr #SLIDE_FOOTERS 1
+. ds $SLIDE_FTR_L \\$1
+. ds $SLIDE_FTR_C \\$2
+. ds $SLIDE_FTR_R \\$3
+. shift 3
+. \}
+. if '\\$1'TRANSITION' \{\
+. shift 1
+. ds $TRANS_TYPE \\$1
+. shift 1
+. \}
+. if '\\$1'PAUSE' \{\
+. shift 1
+. ds $PAUSE_TYPE \\$1
+. shift 1
+. \}
+. \}
+. if d $TRANS_TYPE \
+. pdftransition PAGE \\*[$TRANS_TYPE]
+. if d $PAUSE_TYPE \
+. pdftransition BLOCK \\*[$PAUSE_TYPE]
+. \}
+. ie \\n[#SLIDE_HEADERS]+\\n[#SLIDE_FOOTERS]=2 \{\
+. HEADERS_AND_FOOTERS L "^\\*[$SLIDE_HDR_L]#\\*[$SLIDE_HDR_C]#\\*[$SLIDE_HDR_R]^" \
+ L "^\\*[$SLIDE_FTR_L]#\\*[$SLIDE_FTR_C]#\\*[$SLIDE_FTR_R]^"
+. \}
+. el \{\
+. if \\n[#SLIDE_HEADERS] \{\
+. HEADERS
+. HEADER_RECTO L "^\\*[$SLIDE_HDR_L]#\\*[$SLIDE_HDR_C]#\\*[$SLIDE_HDR_R]^" \
+. \}
+. if \\n[#SLIDE_FOOTERS] \{\
+. FOOTERS
+. FOOTER_RECTO L "^\\*[$SLIDE_FTR_L]#\\*[$SLIDE_FTR_C]#\\*[$SLIDE_FTR_R]^"
+. \}
+. \}
+.END
+\#
+\# +++LETTER MACROS+++
+\#
+\# First, create a register to hold incrementing numbers to be
+\# appended to LETTERHEAD.
+\#
+.nr #FIELD 0 1
+\#
+\# DATE
+\# ----
+\# *Arguments:
+\# <none>
+\# *Function:
+\# Stores date (entered on the line after .DATE) in diversion
+\# LETTERHEAD<n>
+\#
+.MAC DATE END
+. if !'\\n[.z]'' .di
+. di LETTERHEAD\\n+[#FIELD]
+. ie \\n[#FIELD]=1 \{\
+. nr #DATE_FIRST 1
+. RIGHT
+. \}
+. el .LEFT
+.END
+\#
+\# TO
+\# --
+\# *Arguments:
+\# <none>
+\# *Function:
+\# Stores addressee address (entered on the line after .TO) in
+\# diversion LETTERHEAD<n>
+\#
+.MAC TO END
+. if !'\\n[.z]'' .di
+. di LETTERHEAD\\n+[#FIELD]
+. LEFT
+.END
+\#
+\# FROM
+\# ----
+\# *Arguments:
+\# <none>
+\# *Function:
+\# Stores addresser address (entered on the line after .FROM) in
+\# diversion LETTERHEAD<n>
+\#
+.MAC FROM END
+. if !'\\n[.z]'' .di
+. di LETTERHEAD\\n+[#FIELD]
+. LEFT
+.END
+\#
+\# GREETING
+\# --------
+\# *Arguments:
+\# <none>
+\# *Function:
+\# Stores greeting (entered on the line after .GREETING) in
+\# diversion LETTERHEAD<n>
+\#
+.MAC GREETING END
+. if !'\\n[.z]'' .di
+. di LETTERHEAD\\n+[#FIELD]
+. LEFT
+.END
+\#
+\# CLOSING
+\# -------
+\# *Arguments:
+\# <closing string>
+\# *Function:
+\# Stores greeting in diversion CLOSING.
+\#
+.MAC CLOSING END
+. if '\\*[$SIG_SPACE]'' .ds $SIG_SPACE 3v
+. ie ( (2v+\\*[$SIG_SPACE]) > \\n[.t] ) \{\
+. ie !\\n[@TOP] \{\
+. ch HEADER
+. ch FOOTER
+. br
+. tm1 "[mom]: Insufficient room for \\$0 and signature line.
+. ab [mom]: Terminating '\\n[.F]' before closing.
+. \}
+. el .sp
+. \}
+. el .br
+. nr #CLOSING 1
+. di CLOSING_TEXT
+.END
+\#
+\# CLOSING INDENT
+\# --------------
+\# *Argument:
+\# <amount to indent closing from left margin>
+\# *Function:
+\# Defines string $CLOSE_INDENT for use in macro, ALL_DONE.
+\#
+.MAC CLOSING_INDENT END
+. ds $CLOSE_INDENT \\$1
+.END
+\#
+\# SIGNATURE_SPACE
+\# ---------------
+\# *Argument:
+\# <amount of space to leave for signature>
+\# *Function:
+\# Defines string $SIG_SPACE for use in macro, ALL_DONE.
+\#
+.MAC SIGNATURE_SPACE END
+. ds $SIG_SPACE \\$1
+.END
+\#
+\# NO SUITE
+\# --------
+\# *Arguments:
+\# <none>
+\# *Function:
+\# Redefines $FOOTER_RIGHT to blank so that a suite number doesn't
+\# appear at the bottom of letter pages.
+\#
+.MAC NO_SUITE END
+. FOOTER_RIGHT ""
+.END
+\#
+\# ====================================================================
+\#
+\# +++DEFAULTS FOR DOCUMENT PROCESSING+++
+\#
+\# TYPE-STYLE CONTROL MACROS
+\# -------------------------
+\# The control macros for family, font, size, color and quad are
+\# here grouped together. Each (e.g., _FAMILY) uses the calling alias
+\# to determine the document element to which the style parameter
+\# applies. Defaults for all these guys are set in DEFAULTS, and
+\# listed in the "Control Macros" section of the documentation
+\# pertinent to the element whose style is to be changed.
+\#
+.MAC _FAMILY END
+. ds PARAM FAM
+. ds ELEMENT \\$0
+. if '\\$0'COPYRIGHT_FAMILY' \
+. ds ELEMENT COVER_COPYRIGHT_FAMILY
+. ds FROM_ALIAS \\$0
+. substring ELEMENT 0 -4 \" Strip 'ILY' from FAMILY
+. ASSIGN_ELEMENT \\$1
+.END
+\#
+.MAC _FONT END
+. ds PARAM FT
+. ds ELEMENT \\$0
+. ds FROM_ALIAS \\$0
+. if '\\$0'COPYRIGHT_FONT' \
+. ds ELEMENT COVER_COPYRIGHT_FONT
+. substring ELEMENT 0 -5
+. ds ELEMENT \\*[ELEMENT]FT \" ELEMENT is now \\$0_FT
+. ASSIGN_ELEMENT \\$1
+.END
+\#
+.MAC _SIZE END
+. ds PARAM SIZE_CHANGE
+. ds ELEMENT \\$0_CHANGE
+. if '\\$0'CODE_SIZE' \{\
+. ds PARAM SIZE_ADJ
+. ds ELEMENT \\$0_ADJ
+. \}
+. if '\\$0'COPYRIGHT_SIZE' \
+. ds ELEMENT COVER_COPYRIGHT_SIZE_CHANGE
+. ds FROM_ALIAS \\$0
+. ASSIGN_ELEMENT \\$1
+.END
+\#
+.MAC _COLOR END
+. if \\n[#PRINT_STYLE]=1 .return
+. ds PARAM COLOR
+. ds ELEMENT \\$0
+. if '\\$0'COPYRIGHT_COLOR' \
+. ds ELEMENT COVER_COPYRIGHT_COLOR
+. ds FROM_ALIAS \\$0
+. ASSIGN_ELEMENT \\$1
+.END
+\#
+.MAC _CAPS END
+. ds CAPS_TYPE \\$0
+. substring CAPS_TYPE 0 7
+. ds CALLED_AS \\$0
+. substring CALLED_AS -7
+. ie '\\*[CALLED_AS]'NO_CAPS' \{\
+. ie '\\*[CAPS_TYPE]'BIBLIOGR' \{\
+. if '\\$0'BIBLIOGRAPHY_HEADER_NO_CAPS' .rr #BIB_STRING_CAPS
+. if '\\$0'BIBLIOGRAPHY_STRING_NO_CAPS' .rr #BIB_STRING_CAPS
+. \}
+. el \{\
+. ie '\\*[CAPS_TYPE]'ENDNOTES' \{\
+. if '\\$0'ENDNOTES_HEADER_NO_CAPS' .rr #EN_STRING_CAPS
+. if '\\$0'ENDNOTES_STRING_NO_CAPS' .rr #EN_STRING_CAPS
+. \}
+. el \{\
+. ie '\\$0'TOC_HEADER_NO_CAPS' .rr #TOC_STRING_CAPS
+. el \{\
+. ds REGISTER_TYPE \\$0
+. substring REGISTER_TYPE 0 -8
+. as REGISTER_TYPE CAPS
+. rr #\\*[REGISTER_TYPE]
+. \}
+. \}
+. \}
+. \}
+. el \{\
+. ie '\\*[CAPS_TYPE]'BIBLIOGR' \{\
+. if '\\$0'BIBLIOGRAPHY_HEADER_CAPS' .nr #BIB_STRING_CAPS 1
+. if '\\$0'BIBLIOGRAPHY_STRING_CAPS' .nr #BIB_STRING_CAPS 1
+. \}
+. el .nr #\\$0 1
+. \}
+.END
+.
+.ALIAS _NO_CAPS _CAPS
+\#
+.MAC _SMALLCAPS END
+. ds SMALLCAPS_TYPE \\$0
+. substring SMALLCAPS_TYPE 0 7
+. ds CALLED_AS \\$0
+. substring CALLED_AS -12
+. ie '\\*[CALLED_AS]'NO_SMALLCAPS' \{\
+. ie '\\*[SMALLCAPS_TYPE]'BIBLIOGR' \{\
+. if '\\$0'BIBLIOGRAPHY_HEADER_NO_SMALLCAPS' .rr #BIB_STRING_SMALLCAPS
+. if '\\$0'BIBLIOGRAPHY_STRING_NO_SMALLCAPS' .rr #BIB_STRING_SMALLCAPS
+. \}
+. el \{\
+. ie '\\*[SMALLCAPS_TYPE]'ENDNOTES' \{\
+. if '\\$0'ENDNOTES_HEADER_NO_SMALLCAPS' .rr #EN_STRING_SMALLCAPS
+. if '\\$0'ENDNOTES_STRING_NO_SMALLCAPS' .rr #EN_STRING_SMALLCAPS
+. \}
+. el \{\
+. ie '\\$0'TOC_HEADER_NO_SMALLCAPS' .rr #TOC_STRING_SMALLCAPS
+. el \{\
+. ds REGISTER_TYPE \\$0
+. substring REGISTER_TYPE 0 -13
+. as REGISTER_TYPE SMALLCAPS
+. rr #\\*[REGISTER_TYPE]
+. \}
+. \}
+. \}
+. \}
+. el \{\
+. ie '\\*[SMALLCAPS_TYPE]'BIBLIOGR' \{\
+. if '\\$0'BIBLIOGRAPHY_HEADER_SMALLCAPS' .nr #BIB_STRING_SMALLCAPS 1
+. if '\\$0'BIBLIOGRAPHY_STRING_SMALLCAPS' .nr #BIB_STRING_SMALLCAPS 1
+. \}
+. el .nr #\\$0 1
+. \}
+.END
+.
+.ALIAS _NO_SMALLCAPS _SMALLCAPS
+\#
+.MAC _QUAD END
+. if '\\$0'BIBLIOGRAPHY_QUAD' \{\
+. if '\\$1'R' .QUAD-ERROR \\$0
+. if '\\$1'C' .QUAD-ERROR \\$0
+. \}
+. if '\\$0'ENDNOTE_QUAD' \{\
+. if '\\$1'R' .QUAD-ERROR \\$0
+. if '\\$1'C' .QUAD-ERROR \\$0
+. \}
+. if '\\$0'DOC_QUAD' \
+. if !\\n[#DOCS] .DOC_MACRO_ERROR \\$0
+. ds PARAM QUAD
+. ds ELEMENT \\$0
+. if '\\$0'COPYRIGHT_QUAD' \
+. ds ELEMENT COVER_COPYRIGHT_QUAD
+. ds FROM_ALIAS \\$0
+. ASSIGN_ELEMENT \\$1
+.END
+\#
+\# Special handling for QUOTE quadding
+\#
+.MAC QUOTE_QUAD END
+. ds $Q_QUAD \\$0
+. substring $Q_QUAD 6
+.END
+.
+.ALIAS QUOTE_LEFT QUOTE_QUAD
+.ALIAS QUOTE_CENTER QUOTE_QUAD
+.ALIAS QUOTE_RIGHT QUOTE_QUAD
+\#
+.MAC QUAD-ERROR END
+. tm1 "[mom]: \\$1 at line \\n[.c] of '\\n[.F]' must be set to either L or J.
+. ab [mom]: Aborting.
+.END
+\#
+.MAC ASSIGN_ELEMENT END
+. rm $\\*[ELEMENT] \" Clear this first
+.\" HDRFTR_<POSITION>_<PARAMETER> need special handling.
+. ds hdrftr \\*[FROM_ALIAS]
+. substring hdrftr 0 5
+. if '\\*[hdrftr]'HDRFTR' \{\
+. ds hdrftr-pos-element \\*[ELEMENT]
+.\" See if ELEMENT is of the form HDRFTR_<pos>_<param>
+. substring hdrftr-pos-element 0 7
+. substring hdrftr-pos-element -1
+. if !'\\*[ELEMENT]'HDRFTR_COLOR' \{\
+. if '\\*[hdrftr-pos-element]'L' .nr hdrftr-pos-element 1
+. if '\\*[hdrftr-pos-element]'C' .nr hdrftr-pos-element 1
+. if '\\*[hdrftr-pos-element]'R' .nr hdrftr-pos-element 1
+. \}
+. \}
+. if !\\n[hdrftr-pos-element] \{\
+. ds c1-c5 \\*[ELEMENT]
+. substring c1-c5 0 4 \" Grab first five letters of the alias
+. \}
+.\" If none of the following, convert the substring of the
+.\" calling alias, ie \*[ELEMENT], into the parameter string, e.g.,
+.\" $TITLE_FAM, assign arg, and set register.
+. if !'\\*[c1-c5]'BIBLI' \
+. if !'\\*[c1-c5]'BLOCK' \
+. if !'\\*[c1-c5]'CITAT' \
+. if !'\\*[c1-c5]'ENDNO' \
+. if !'\\*[c1-c5]'EPIGR' \
+. if !'\\*[c1-c5]'FOOTN' \
+. if !'\\*[c1-c5]'HDRFT' \
+. if !'\\*[c1-c5]'LINEN' \
+. if !'\\*[c1-c5]'PAGEN' \{\
+. ie '\\*[ELEMENT]'CODE_SIZE_ADJ' .nr #\\*[ELEMENT] \\$1
+. el \{\
+. ds $\\*[ELEMENT] \\$1
+. nr #\\*[ELEMENT] 1
+. \}
+. \}
+. if '\\*[$\\*[ELEMENT]]'' \{\
+. if '\\*[c1-c5]'BIBLI' .ASSIGN_PARAM BIB \\$1
+. if '\\*[c1-c5]'BLOCK' .ASSIGN_PARAM BQUOTE_ \\$1
+. if '\\*[c1-c5]'CITAT' .ASSIGN_PARAM BQUOTE_ \\$1
+. if '\\*[c1-c5]'ENDNO' .ASSIGN_PARAM EN \\$1
+. if '\\*[c1-c5]'EPIGR' .ASSIGN_PARAM EPI_ \\$1
+. if '\\*[c1-c5]'FOOTN' .ASSIGN_PARAM FN_ \\$1
+. if '\\*[c1-c5]'HDRFT' .ASSIGN_PARAM HDRFTR_ \\$1
+. if '\\*[c1-c5]'LINEN' .ASSIGN_PARAM LN_ \\$1
+. if '\\*[c1-c5]'PAGEN' .ASSIGN_PARAM PAGE_NUM_ \\$1
+. \}
+. if \\n[hdrftr-pos-element] \{\
+. if '\\*[hdrftr-pos-element]'L' .ds hdrftr-pos-element LEFT
+. if '\\*[hdrftr-pos-element]'C' .ds hdrftr-pos-element CENTER
+. if '\\*[hdrftr-pos-element]'R' .ds hdrftr-pos-element RIGHT
+. if '\\*[ELEMENT]'HDRFTR_\\*[hdrftr-pos-element]_FAM' \
+. ds $HDRFTR_\\*[hdrftr-pos-element]_FAM \\$1
+. \}
+. rr hdrftr-pos-element
+. rm hdrftr-pos-element
+.END
+\#
+.MAC ASSIGN_PARAM END
+. if '\\*[PARAM]'FAM' .nr substr-index -7
+. if '\\*[PARAM]'FT' .nr substr-index -5
+. if '\\*[PARAM]'SIZE_CHANGE' .nr substr-index -5
+. if '\\*[PARAM]'COLOR' .nr substr-index -6
+. if '\\*[PARAM]'QUAD' .nr substr-index -5
+. if '\\$1'BIB' \{\
+. ds ELEMENT \\*[FROM_ALIAS]
+. substring ELEMENT 12 \\n[substr-index]
+. if '\\*[ELEMENT]'_HEADER_' \
+. ds ELEMENT _STRING_
+. \}
+. if '\\$1'BQUOTE_' .rm ELEMENT
+. if '\\$1'EN' \{\
+. ds ELEMENT \\*[FROM_ALIAS]
+. substring ELEMENT 7 \\n[substr-index]
+. if '\\*[ELEMENT]'S_HEADER_' \
+. ds ELEMENT _STRING_
+. if '\\*[ELEMENT]'_LINENUMBER_' \
+. ds ELEMENT _LN_
+. \}
+. if '\\$1'EPI_' .rm ELEMENT
+. if '\\$1'FN_' .rm ELEMENT
+. if '\\$1'HDRFTR_' \{\
+. if '\\*[ELEMENT]'HDRFTR_FAM' \{\
+. nr #HDRFTR 1
+. ds $HDRFTR_FAM \\$2
+. ds $HDRFTR_LEFT_FAM \\$2
+. ds $HDRFTR_CENTER_FAM \\$2
+. ds $HDRFTR_RIGHT_FAM \\$2
+. \}
+. if '\\*[ELEMENT]'HDRFTR_COLOR' \{\
+. nr #HDRFTR 1
+. nr #HDRFTR_COLOR 1
+. ds $HDRFTR_COLOR \\$2
+. \}
+. if '\\*[ELEMENT]'HDRFTR_SIZE_CHANGE' \{\
+. nr #HDRFTR 1
+. ds $HDRFTR_SIZE_CHANGE \\$2
+. \}
+. if '\\*[PARAM]'SIZE_CHANGE' \{\
+. nr #HDRFTR 1
+. if '\\*[hdrftr-pos-element]'L' \
+. ds $HDRFTR_LEFT_SIZE_CHANGE \\$2
+. if '\\*[hdrftr-pos-element]'C' \
+. ds $HDRFTR_CENTER_SIZE_CHANGE \\$2
+. if '\\*[hdrftr-pos-element]'R' \
+. ds $HDRFTR_RIGHT_SIZE_CHANGE \\$2
+. \}
+. if !r #HDRFTR \{\
+. substring ELEMENT 7 \\n[substr-index]
+. if '\\*[ELEMENT]'_LEFT' .ds ELEMENT _STRING_
+. \}
+. \}
+. if '\\$1'LN_' .rm ELEMENT
+. if '\\$1'PAGE_NUM_' .rm ELEMENT
+. if !r #HDRFTR \{\
+. ds $\\$1\\*[ELEMENT]\\*[PARAM] \\$2
+. nr #\\$1\\*[ELEMENT]\\*[PARAM] 1
+. \}
+. rr #HDRFTR
+. rm hdrftr-pos-element
+. rr substr-index
+. rm FROM_ALIAS
+. rm ELEMENT
+.END
+\#
+.MAC TITLE_LEAD END
+. ds $TYPE \\$0
+. substring $TYPE 0 2
+. if '\\*[$TYPE]'DOC' .nr DOC_ 1
+. ds $TYPE \\$0
+. ie '\\*[$TYPE]'MISC_LEAD' .ds $TYPE COVER_MISC
+. el .substring $TYPE -6 0
+. ds $\\*[$TYPE]_LEAD \\$1
+. nr #\\*[$TYPE]_LEAD 1
+. rm $TYPE
+.END
+\#
+\# The _STYLE macro, called by various aliases, allows grouping
+\# style parameters for most document elements in a single macro
+\# using 'KEYWORD value' pairs.
+\#
+.MAC _STYLE END
+. SILENT \" Some of the invoked macros cause unwanted breaks
+. ds $STYLE_TYPE \\$0
+. substring $STYLE_TYPE 0 -7
+. ds $HDR_FTR \\*[$STYLE_TYPE]
+. length #HDR_FTR_STRING $HDR_FTR
+. if \\n[#HDR_FTR_STRING]<=5 .substring $HDR_FTR 0 5 \" HEADER or FOOTER
+. if '\\*[$HDR_FTR]'HEADER' .ds $HDR_FTR HEADER
+. if '\\*[$HDR_FTR]'FOOTER' .ds $HDR_FTR FOOTER
+. ds $POS \\$0
+. substring $POS 7 7
+. if '\\*[$POS]'L' .ds $POS LEFT
+. if '\\*[$POS]'C' .ds $POS CENTER
+. if '\\*[$POS]'R' .ds $POS RIGHT
+. if '\\*[$STYLE_TYPE]'\\*[$HDR_FTR]_\\*[$POS]' \{\
+. ds $\\*[$HDR_FTR]_\\*[$POS] \\*[$HDR_FTR]_\\*[$POS]
+. ds $STYLE_TYPE HDRFTR_\\*[$POS]
+. \}
+. if '\\*[$STYLE_TYPE]'ENDNOTES_HEADER' \
+. ds $BIB-EN-TOC EN_STRING
+. if '\\*[$STYLE_TYPE]'ENDNOTE_STRING' \
+. ds $BIB-EN-TOC EN_STRING
+. if '\\*[$STYLE_TYPE]'BIBLIOGRAPHY_HEADER' \
+. ds $BIB-EN-TOC BIB_STRING
+. if '\\*[$STYLE_TYPE]'BIBLIOGRAPHY_STRING' \
+. ds $BIB-EN-TOC BIB_STRING
+. if '\\*[$STYLE_TYPE]'TOC_HEADER' \
+. ds $BIB-EN-TOC TOC_STRING
+. if '\\*[$STYLE_TYPE]'PAGENUMBER' \
+. ds $STYLE_TYPE PAGENUM
+. nr #LOOP 0 1
+. nr #STYLE_PARAMS \\n[#NUM_ARGS]
+. while \\n+[#LOOP]<=\\n[#STYLE_PARAMS] \{\
+. if '\\$1'FAMILY' \{\
+. shift
+. \\*[$STYLE_TYPE]_FAMILY \\$1
+. shift
+. \}
+. if '\\$1'FONT' \{\
+. shift
+. \\*[$STYLE_TYPE]_FONT \\$1
+. shift
+. \}
+. if '\\$1'SIZE' \{\
+. shift
+. \\*[$STYLE_TYPE]_SIZE \\$1
+. shift
+. \}
+. if '\\$1'COLOR' \{\
+. shift
+. \\*[$STYLE_TYPE]_COLOR \\$1
+. shift
+. \}
+. if '\\$1'CAPS' \{\
+. if \\n[#\\*[$STYLE_TYPE]_SMALLCAPS] \{\
+. tm1 \
+"[mom]: '\\*[$STYLE_TYPE]_STYLE' contains CAPS and SMALLCAPS. \
+CAPS takes precedence.
+. rr #\\*[$STYLE_TYPE]_SMALLCAPS
+. \}
+. \\*[$STYLE_TYPE]_CAPS
+. if d $\\*[$HDR_FTR]_LEFT .HEADER_LEFT_CAPS
+. if d $\\*[$HDR_FTR]_CENTER .HEADER_CENTER_CAPS
+. if d $\\*[$HDR_FTR]_CENTRE .HEADER_CENTER_CAPS
+. if d $\\*[$HDR_FTR]_RIGHT .HEADER_RIGHT_CAPS
+. shift
+. \}
+. if '\\$1'NO_CAPS' \{\
+. nr #\\*[$STYLE_TYPE]_CAPS 0
+. if !'\\*[$BIB-EN-TOC]'' \
+. rr #\\*[$BIB-EN-TOC]_CAPS
+. shift
+. \}
+. if '\\$1'SMALLCAPS' \{\
+. if \\n[#\\*[$STYLE_TYPE]_CAPS] \{\
+. tm1 \
+"[mom]: '\\*[$STYLE_TYPE]_STYLE' contains CAPS and SMALLCAPS. \
+SMALLCAPS takes precedence.
+. rr #\\*[$STYLE_TYPE]_CAPS
+. \}
+. \\*[$STYLE_TYPE]_SMALLCAPS
+. shift
+. \}
+. if '\\$1'NO_SMALLCAPS' \{\
+. rr #\\*[$STYLE_TYPE]_SMALLCAPS
+. if !'\\*[$BIB-EN-TOC]'' \
+. rr #\\*[$BIB-EN-TOC]_SMALLCAPS
+. shift
+. \}
+. if '\\$1'LEAD' \{\
+. shift
+. \\*[$STYLE_TYPE]_LEAD \\$1
+. shift
+. \}
+. if '\\$1'AUTOLEAD' \{\
+. shift
+. \\*[$STYLE_TYPE]_AUTOLEAD \\$1
+. shift
+. \}
+. if '\\$1'SPACE' \{\
+. shift
+. \\*[$STYLE_TYPE]_SPACE \\$1
+. shift
+. \}
+. if '\\$1'QUAD' \{\
+. shift
+. ie '\\*[$STYLE_TYPE]'QUOTE' \{\
+. ds $QUAD_TYPE \\$1
+. substring $QUAD_TYPE 0 0
+. if '\\*[$QUAD_TYPE]'L' .QUOTE_LEFT
+. if '\\*[$QUAD_TYPE]'C' .QUOTE_CENTER
+. if '\\*[$QUAD_TYPE]'R' .QUOTE_RIGHT
+. \}
+. el .\\*[$STYLE_TYPE]_QUAD \\$1
+. shift
+. \}
+. if '\\$1'INDENT' \{\
+. shift
+. \\*[$STYLE_TYPE]_INDENT \\$1
+. shift
+. \}
+.\" UNDERLINE and UNDERSCORE are identical but we can't use : or &
+.\" in string comparisons.
+. if '\\$1'UNDERLINE' \{\
+. shift
+. if '\\$1'DOUBLE' \{\
+. as ul-args \\$1 \"
+. shift
+. \}
+. nr #COUNT 0 1
+. while \\n+[#COUNT]<=3 \{\
+. if \B'\\$1' \{\
+. as ul-args \\$1 \"
+. shift
+. \}
+. \}
+. \\*[$STYLE_TYPE]_UNDERSCORE \\*[ul-args]
+. \}
+. if '\\$1'UNDERSCORE' \{\
+. shift
+. if '\\$1'DOUBLE' \{\
+. as ul-args \\$1 \"
+. shift
+. \}
+. nr #COUNT 0 1
+. while \\n+[#COUNT]<=3 \{\
+. if \B'\\$1' \{\
+. as ul-args \\$1 \"
+. shift
+. \}
+. \}
+. \\*[$STYLE_TYPE]_UNDERSCORE \\*[ul-args]
+. \}
+. if '\\$1'NO_UNDERSCORE' \{\
+. rr #\\*[$STYLE_TYPE]_UNDERLINE
+. if !'\\*[$BIB-EN-TOC]'' \
+. rr #\\*[$BIB-EN-TOC]_UNDERLINE
+. shift
+. \}
+. if '\\$1'NO_UNDERLINE' \{\
+. rr #\\*[$STYLE_TYPE]_UNDERLINE
+. if !'\\*[$BIB-EN-TOC]'' \
+. rr #\\*[$BIB-EN-TOC]_UNDERLINE
+. shift
+. \}
+. if '\\$1'V_ADJUST' \{\
+. shift
+. COPYRIGHT_V_ADJUST \\$1
+. shift
+. \}
+. \}
+. rm $STYLE_TYPE
+. rm $HDR_FTR
+. rm $POS
+. rm $HEADER_LEFT
+. rm $HEADER_CENTER
+. rm $HEADER_RIGHT
+. rm $BIB-EN-TOC
+. rm ul-args
+. SILENT off
+.END
+.
+.ds STYLE_TYPE_1 ATTRIBUTE
+.ds STYLE_TYPE_2 AUTHOR
+.ds STYLE_TYPE_3 BIBLIOGRAPHY_HEADER
+.ds STYLE_TYPE_4 BIBLIOGRAPHY_STRING
+.ds STYLE_TYPE_5 BLOCKQUOTE
+.ds STYLE_TYPE_6 CHAPTER
+.ds STYLE_TYPE_7 CHAPTER_TITLE
+.ds STYLE_TYPE_8 CODE
+.ds STYLE_TYPE_9 COPYRIGHT
+.ds STYLE_TYPE_10 COVER
+.ds STYLE_TYPE_11 COVERTITLE
+.ds STYLE_TYPE_12 DOC_COVERTITLE
+.ds STYLE_TYPE_13 DOCHEADER
+.ds STYLE_TYPE_14 DOCTITLE
+.ds STYLE_TYPE_15 DOCTYPE
+.ds STYLE_TYPE_16 ENDNOTE_TITLE
+.ds STYLE_TYPE_17 ENDNOTES_HEADER
+.ds STYLE_TYPE_18 ENDNOTE_STRING
+.ds STYLE_TYPE_19 EPIGRAPH
+.ds STYLE_TYPE_20 FINIS
+.ds STYLE_TYPE_21 FOOTER_LEFT
+.ds STYLE_TYPE_22 FOOTER_CENTER
+.ds STYLE_TYPE_23 FOOTER_CENTRE
+.ds STYLE_TYPE_24 FOOTER_RIGHT
+.ds STYLE_TYPE_25 FOOTNOTE
+.ds STYLE_TYPE_26 HEADER_LEFT
+.ds STYLE_TYPE_27 HEADER_CENTER
+.ds STYLE_TYPE_28 HEADER_CENTRE
+.ds STYLE_TYPE_29 HEADER_RIGHT
+.ds STYLE_TYPE_30 LEAD
+.ds STYLE_TYPE_31 LINENUMBER
+.ds STYLE_TYPE_32 MISC
+.ds STYLE_TYPE_33 QUOTE
+.ds STYLE_TYPE_34 PAGENUMBER
+.ds STYLE_TYPE_35 SUBTITLE
+.ds STYLE_TYPE_36 TITLE
+.ds STYLE_TYPE_37 TOC_HEADER
+.
+.nr #LOOP 0 1
+.while \n+[#LOOP]<=37 \{\
+. ALIAS \*[STYLE_TYPE_\n[#LOOP]]_STYLE _STYLE
+. ALIAS COVER_\*[STYLE_TYPE_\n[#LOOP]]_STYLE _STYLE
+. ALIAS DOC_COVER_\*[STYLE_TYPE_\n[#LOOP]]_STYLE _STYLE
+.\}
+\#
+\# UNDERLINE CONTROL
+\# -----------------
+\# *Arguments:
+\# [ DOUBLE ] [ <underline weight> [<underline gap>] ] | <none> | <anything>
+\# *Function:
+\# Toggles underlining of the element indicated by the calling alias
+\# on or off. Uses #<element>_UNDERLINE_WEIGHT to set the weight,
+\# and defines string $<element>_UNDERLINE_GAP.
+\#
+.MAC _UNDERLINE END
+. ds $GET_TITLE_TYPE \\$0
+. substring $GET_TITLE_TYPE -2
+. ie '\\*[$GET_TITLE_TYPE]'NE' \{\
+.\" Called as _UNDERLINE
+. ds $GET_TITLE_TYPE \\$0
+. substring $GET_TITLE_TYPE 0 -10
+. ds $TITLE_TYPE \\*[$GET_TITLE_TYPE]
+. \}
+. el \{\
+.\" Called as _UNDERSCORE
+. ds $GET_TITLE_TYPE \\$0
+. substring $GET_TITLE_TYPE 0 -11
+. ds $TITLE_TYPE \\*[$GET_TITLE_TYPE]
+. \}
+. ds $GET_TITLE_TYPE \\$0
+. substring $GET_TITLE_TYPE 0 2
+. if '\\*[$GET_TITLE_TYPE]'BIB' .ds $TITLE_TYPE BIB_STRING_
+. if '\\*[$GET_TITLE_TYPE]'SUB' .ds $TITLE_TYPE SUBTITLE_
+. ds $GET_TITLE_TYPE \\$0
+. substring $GET_TITLE_TYPE 0 7
+. if '\\*[$GET_TITLE_TYPE]'ENDNOTES' .ds $TITLE_TYPE EN_STRING_
+. ds $GET_TITLE_TYPE \\$0
+. substring $GET_TITLE_TYPE 0 10
+. if '\\*[$GET_TITLE_TYPE]'ENDNOTE_STR' .ds $TITLE_TYPE EN_STRING_
+. if '\\*[$GET_TITLE_TYPE]'ENDNOTE_TIT' .ds $TITLE_TYPE EN_TITLE_
+. ie '\\$1'' .nr #\\*[$TITLE_TYPE]UNDERLINE 1
+. el \{\
+. ie \\n[#NUM_ARGS]=1 \{\
+. ie \B'\\$1' \{\
+. if !\\n[#PRINT_STYLE]=1 \{\
+. \\*[$TITLE_TYPE]UNDERLINE_WEIGHT \\$1
+. nr #\\*[$TITLE_TYPE]UNDERLINE 1
+. \}
+. \}
+. el \{\
+. ie '\\$1'DOUBLE' .nr #\\*[$TITLE_TYPE]UNDERLINE 2
+. el .nr #\\*[$TITLE_TYPE]UNDERLINE 0
+. \}
+. \}
+. el \{\
+. if !\\n[#PRINT_STYLE]=1 \{\
+. nr #\\*[$TITLE_TYPE]UNDERLINE 1
+. if '\\$1'DOUBLE' \{\
+. nr #\\*[$TITLE_TYPE]UNDERLINE 2
+. shift
+. \}
+. \\*[$TITLE_TYPE]UNDERLINE_WEIGHT \\$1
+. if !'\\$2'' \
+. ds $\\*[$TITLE_TYPE]UNDERLINE_GAP \\$2
+. if !'\\$3'' \
+. ds $\\*[$TITLE_TYPE]RULE_GAP \\$3
+. \}
+. \}
+. \}
+. rm $TITLE_TYPE
+.END
+.
+.ALIAS ENDNOTE_STRING_UNDERLINE _UNDERLINE
+.ALIAS ENDNOTE_STRING_UNDERSCORE _UNDERLINE
+\#
+\# DEFAULTS
+\# --------
+\# *Arguments:
+\# <none>
+\# *Function:
+\# Sets up defaults if no values are entered prior to START.
+\# *Notes:
+\# The defaults for $CHAPTER_STRING, $DRAFT_STRING, and
+\# $REVISION_STRING are in the COPYSTYLE macro.
+\#
+.MAC DEFAULTS END
+. if !\\n[#DOC_TYPE]=5 \{\
+. ie !d $PAPER \{\
+. PAGEWIDTH \\n[#PAGE_WIDTH]u
+. PAGELENGTH \\n[.p]u
+. \}
+. el .PAPER \\*[$PAPER]
+. \}
+. if !\\n[#DOC_TYPE] .DOCTYPE DEFAULT
+. if !r #CH_NUM .nr #CH_NUM 1
+. ie \\n[#PAGENUM_STYLE_SET] .PAGENUM_STYLE \\*[$PAGENUM_STYLE]
+. el \
+. if !\\n[#COPY_STYLE]=1 .PAGENUM_STYLE DIGIT
+. if !\\n[#COPY_STYLE] .COPYSTYLE FINAL
+. if \\n[#DRAFT_WITH_PAGENUM] .COPYSTYLE \\*[$COPY_STYLE]
+. if \\n[#DOC_TYPE]=4 \{\
+. if !\\n[#USER_SET_L_LENGTH] \{\
+. R_MARGIN \\n[#R_MARGIN]u
+. rr #USER_SET_L_LENGTH
+. \}
+. if \\n[#PRINT_STYLE]=1 .PRINTSTYLE TYPEWRITE SINGLESPACE
+. \}
+. if \\n[#COPY_STYLE]=1 \{\
+. COPYSTYLE DRAFT
+. PAGENUMBER 1
+. \}
+. if !r #DOC_HEADER .DOCHEADER
+. if !r #HEADERS_ON .HEADERS
+. if !r #PAGINATE .PAGINATE
+. if !r #HEADER_MARGIN .HEADER_MARGIN 4P+6p
+. if !r #HEADER_GAP .HEADER_GAP 3P
+. if \\n[#FOOTERS_ON] \{\
+. HEADERS OFF
+. ie \\n[#PAGINATE] \
+. if \\n[#PAGE_NUM_POS_SET]=0 .PAGENUM_POS TOP CENTER
+. el \
+. if !\\n[#T_MARGIN] .T_MARGIN 6P
+. \}
+. if !\\n[#HEADERS_ON] \{\
+. if !\\n[#FOOTERS_ON] \{\
+. ie \\n[#PAGE_NUM_V_POS]=1 \{\
+. HEADER_MARGIN \\n[#HEADER_MARGIN]
+. HEADER_GAP \\n[#HEADER_GAP]
+. \}
+. el .if !r #T_MARGIN .T_MARGIN 6P
+. \}
+. \}
+. if !r #T_MARGIN \
+. T_MARGIN \\n[#HEADER_MARGIN]+\\n[#HEADER_GAP]
+. if !r #DOCHEADER_ADVANCE \
+. nr #DOCHEADER_ADVANCE \\n[#T_MARGIN]
+. if !r #FOOTER_MARGIN .FOOTER_MARGIN 3P
+. if !r #FOOTER_GAP .FOOTER_GAP 3P
+. if !r #B_MARGIN \
+. B_MARGIN \\n[#FOOTER_MARGIN]u+\\n[#FOOTER_GAP]u
+. if !\\n[#HEADER_RULE_GAP] .HEADER_RULE_GAP 4p
+. if !\\n[#FOOTER_RULE_GAP] .FOOTER_RULE_GAP 4p
+. if !r #HDRFTR_RULE .HDRFTR_RULE
+. if !r #PAGE_NUM_SET .PAGENUMBER 1
+.\" Read in number registers and strings for type parameters
+. nr #DOC_L_MARGIN \\n[#L_MARGIN]
+. nr #DOC_L_LENGTH \\n[#L_LENGTH]
+. nr #DOC_R_MARGIN \\n[#PAGE_WIDTH]-(\\n[#DOC_L_MARGIN]+\\n[#L_LENGTH])
+. ie !'\\*[$SAVED_DOC_FAM]'' \{\
+. ds $DOC_FAM \\*[$SAVED_DOC_FAM]
+. rm $SAVED_DOC_FAM
+. \}
+. el .ds $DOC_FAM \\*[$FAMILY]
+. ie !r #DOC_PT_SIZE .nr #DOC_PT_SIZE \\n[#PT_SIZE]
+. el \
+. if !\\n[#DOC_PT_SIZE]=\\n[#PT_SIZE] \
+. nr #DOC_PT_SIZE \\n[#PT_SIZE]
+. if \\n[#TOC] .nr #DOC_PT_SIZE \\n[#TOC_PS]
+. if \\n[#ENDNOTES] .nr #DOC_PT_SIZE \\n[#EN_PS]
+. if \\n[#BIBLIOGRAPHY] .nr #DOC_PT_SIZE \\n[#BIB_PS]
+. if \
+(\\n[#TOC]=0)&\
+(\\n[#LIST_OF_FIGURES]=0)&\
+(\\n[#LIST_OF_TABLES]=0)&\
+(\\n[#LIST_OF_EQUATIONS]=0) \
+. nr #DOC_LEAD \\n[.v]
+. nr #DOC@LEAD \\n[#DOC_LEAD]
+. if \\n[#AUTO_LEAD] .nr #DOC_AUTOLEAD \\n[#AUTOLEAD_VALUE]
+.\" #SAVED_DOC_LEAD is set in COLLATE
+. if \\n[#SAVED_DOC_LEAD] \{\
+. if \
+(\\n[#TOC]=0)&\
+(\\n[#LIST_OF_FIGURES]=0)&\
+(\\n[#LIST_OF_TABLES]=0)&\
+(\\n[#LIST_OF_EQUATIONS]=0) \{\
+. ie !\\n[#DOC_LEAD]=\\n[#SAVED_DOC_LEAD] .nr #RERUN_TRAPS 1
+. el .nr #SKIP_TRAPS 1
+. \}
+. \}
+. ie \\n[#ADJ_DOC_LEAD]=1 .
+. el \
+. if !\\n[#DOC_LEAD_ADJUST_OFF] .DOC_LEAD_ADJUST
+. ie d$RESTORE_DOC_QUAD \{\
+. ds $DOC_QUAD \\*[$RESTORE_DOC_QUAD]
+. rm $RESTORE_DOC_QUAD
+. \}
+. el .ds $DOC_QUAD \\*[$QUAD_VALUE]
+. if '\\*[$FONT]'' .FT R
+. if '\\*[$PP_FT]'' .ds $PP_FT \\*[$FONT]
+. FT \\*[$PP_FT]
+.\" Counters
+. nr #PP 0
+. nr #FN_NUMBER 0 1
+. nr #EN_NUMBER 0 1
+. nr #FN_COUNT_FOR_COLS 0 1
+. nr #DONE_ONCE 0 1
+.\" Enable shimming if user hasn't turned it off
+. if \\n[#NO_SHIM]=2 \{\
+. rr #NO_SHIM
+. nr #NO_FLEX 1
+. \}
+.\" General style defaults for both PRINTSTYLEs
+. nr #PP_STYLE 1
+. PARA_INDENT \\n[#PP_INDENT]u
+. if !d $HDRFTR_FAM .ds $HDRFTR_FAM \\*[$DOC_FAM]
+. if !d $HDRFTR_SIZE_CHANGE .HDRFTR_SIZE +0
+. if !d $PAGE_NUM_FAM .PAGENUM_FAMILY \\*[$DOC_FAM]
+. if !d $PAGE_NUM_FT .PAGENUM_FONT R
+. if !d $PAGE_NUM_SIZE_CHANGE .PAGENUM_SIZE +0
+. if !r #PAGE_NUM_POS_SET .PAGENUM_POS BOTTOM CENTER
+. ie \\n[#PAGE_NUM_HYPHENS_SET] \{\
+. if \\n[#PAGE_NUM_HYPHENS]=0 .PAGENUM_HYPHENS OFF
+. if \\n[#PAGE_NUM_HYPHENS]=1 .PAGENUM_HYPHENS
+. \}
+. el \
+. if !d$PAGENUM_STRING .PAGENUM_HYPHENS
+. if !d $FN_FAM .FOOTNOTE_FAMILY \\*[$DOC_FAM]
+. if !d $FN_FT .FOOTNOTE_FONT R
+. if !d $FN_QUAD .FOOTNOTE_QUAD \\*[$DOC_QUAD]
+. if !r #FN_RULE .FOOTNOTE_RULE
+. if !r #FN_MARKERS .FOOTNOTE_MARKERS
+. if \\n[#FN_MARKERS]=1 \{\
+. if \\n[#FN_REF]=1 \
+. if !\\n[#FN_MARKER_STYLE] .FOOTNOTE_MARKER_STYLE NUMBER
+. if !\\n[#FN_MARKER_STYLE] .FOOTNOTE_MARKER_STYLE STAR
+. \}
+. if !r #EN_MARKER_STYLE .ENDNOTE_MARKER_STYLE SUPERSCRIPT
+. if !d $EN_PN_STYLE .ENDNOTES_PAGENUM_STYLE digit
+. if !d $EN_FAM .ENDNOTE_FAMILY \\*[$DOC_FAM]
+. if !d $EN_FT .ENDNOTE_FONT R
+. if !d $EN_QUAD \{\
+. ds quad-check \\*[$DOC_QUAD]
+. substring quad-check 0 0
+. if '\\*[$DOC_QUAD]'C' .nr quad-check 1
+. if '\\*[$DOC_QUAD]'R' .nr quad-check 1
+. ie \\n[quad-check] .ENDNOTE_QUAD J
+. el .ENDNOTE_QUAD \\*[$DOC_QUAD]
+. rr quad-check
+. \}
+. if !d $EN_STRING .ENDNOTES_HEADER_STRING "Endnotes"
+. if !d $EN_STRING_FAM .ENDNOTES_HEADER_FAMILY \\*[$EN_FAM]
+. if !d $EN_STRING_QUAD .ENDNOTES_HEADER_QUAD CENTER
+. if !d $EN_TITLE \{\
+. ie \\n[#DOC_TYPE]=2 \{\
+. ie !'\\*[$CHAPTER_TITLE_1]'' \{\
+. ie '\\*[$CHAPTER]'' .ENDNOTE_TITLE "\\*[$CHAPTER_TITLE]"
+. el .ENDNOTE_TITLE \
+"\\*[$CHAPTER_STRING] \\*[$CHAPTER]: \\*[$CHAPTER_TITLE]"
+. \}
+. el \{\
+. ie '\\*[$CHAPTER]'' .ENDNOTE_TITLE "\\*[$CHAPTER_STRING]"
+. el .ENDNOTE_TITLE "\\*[$CHAPTER_STRING] \\*[$CHAPTER]"
+. \}
+. \}
+. el .ENDNOTE_TITLE "\\*[$TITLE]"
+. \}
+. if !d $EN_TITLE_FAM .ENDNOTE_TITLE_FAMILY \\*[$EN_FAM]
+. if !d $EN_TITLE_QUAD .ENDNOTE_TITLE_QUAD LEFT
+. if !d $EN_NUMBER_FAM .ENDNOTE_NUMBER_FAMILY \\*[$EN_FAM]
+. if !d $EN_LN_FAM .ENDNOTE_LINENUMBER_FAMILY \\*[$EN_FAM]
+. if !r #EN_NUMBERS_ALIGN_LEFT \{\
+. if !r #EN_NUMBERS_ALIGN_RIGHT \{\
+. ie !\\n[#EN_MARKER_STYLE]=2 .ENDNOTE_NUMBERS_ALIGN RIGHT 2
+. el .ENDNOTE_NUMBERS_ALIGN RIGHT 4
+. \}
+. \}
+. if !r #EN_LN_GAP .ENDNOTE_LINENUMBER_GAP 1m
+. if !r #EN_ALLOWS_HEADERS .ENDNOTES_ALLOWS_HEADERS
+. if !d $BIB_PN_STYLE .BIBLIOGRAPHY_PAGENUM_STYLE digit
+. if !d $BIB_FAM .BIBLIOGRAPHY_FAMILY \\*[$DOC_FAM]
+. if !d $BIB_FT .BIBLIOGRAPHY_FONT R
+. if !d $BIB_QUAD \{\
+. ds quad-check \\*[$DOC_QUAD]
+. substring quad-check 0 0
+. if '\\*[$DOC_QUAD]'C' .nr quad-check 1
+. if '\\*[$DOC_QUAD]'R' .nr quad-check 1
+. ie \\n[quad-check] .BIBLIOGRAPHY_QUAD J
+. el .BIBLIOGRAPHY_QUAD \\*[$DOC_QUAD]
+. rr quad-check
+. \}
+. if !d $BIB_STRING .BIBLIOGRAPHY_STRING "Bibliography"
+. if !d $BIB_STRING_FAM .BIBLIOGRAPHY_STRING_FAMILY \\*[$BIB_FAM]
+. if !d $BIB_STRING_QUAD .BIBLIOGRAPHY_STRING_QUAD CENTER
+. if !d $TOC_HEADER_STRING .TOC_HEADER_STRING "Contents"
+. if !d $TOC_HEADER_QUAD .TOC_HEADER_QUAD LEFT
+. if !d $TOC_PN_STYLE .TOC_PAGENUM_STYLE roman
+. if !r #TOC_PN_PADDING .TOC_PADDING 3
+.\" Line numbering
+. if !r #LN_GUTTER .nr #LN_GUTTER 2
+. if !r #Q_LN_GUTTER .nr #Q_LN_GUTTER 2
+. if !r #BQ_LN_GUTTER .nr #BQ_LN_GUTTER 2
+. if !d $LN_FAM .ds $LN_FAM \\*[$DOC_FAM]
+. if !d $LN_FT .ds $LN_FT R
+. if !d $LN_SIZE_CHANGE .ds $LN_SIZE_CHANGE +0
+. if !d $LN_COLOR .ds $LN_COLOR black
+.\" PDF link colour
+. if !\\n[PDFHREF_COLOR_SET] .PDF_LINK_COLOR 0.0 0.3 0.9
+.\" PDF frame
+. if !d pdf-img:frame-weight .ds pdf-img:frame-weight .5
+. if !d pdf-img:frame-color .ds pdf-img:frame-color black
+.\" Captions, labels, sources
+.\" All at default doc specs except leading, which is autolead 2
+. nr label-type-counter 0 1
+. while \\n+[label-type-counter]<=5 \{\
+. if \\n[label-type-counter]=1 .ds label-type eqn
+. if \\n[label-type-counter]=2 .ds label-type pdf-img
+. if \\n[label-type-counter]=3 .ds label-type pic
+. if \\n[label-type-counter]=4 .ds label-type tbl
+. if \\n[label-type-counter]=5 .ds label-type floating
+. nr spec-type-counter 0 1
+. while \\n+[spec-type-counter]<=3 \{\
+. if \\n[spec-type-counter]=1 .ds spec-type label
+. if \\n[spec-type-counter]=2 .ds spec-type caption
+. if \\n[spec-type-counter]=3 .ds spec-type source
+. set-defaults
+. set-inline-specs
+. \}
+. rm label-type
+. rm spec-type
+. \}
+.\" String defaults for both PRINTSTYLEs
+. ie \\n[#DOC_TYPE]=1 \{\
+. ie '\\*[$DOCTITLE]'' \{\
+. if \\n[#USER_DEF_HDRFTR_LEFT]=0 .ds $HDRFTR_LEFT \\*[$AUTHOR_1]
+. if \\n[#USER_DEF_HDRFTR_RIGHT]=0 .ds $HDRFTR_RIGHT \\*[$TITLE]
+. \}
+. el \{\
+. if \\n[#COPY_STYLE]=1 .DRAFT_WITH_PAGENUMBER
+. if \\n[#USER_DEF_HDRFTR_LEFT]=0 .ds $HDRFTR_LEFT \\*[$AUTHOR_1]
+. if \\n[#USER_DEF_HDRFTR_CENTER]=0 .ds $HDRFTR_CENTER \\*[$TITLE]
+. if \\n[#USER_DEF_HDRFTR_RIGHT]=0 .ds $HDRFTR_RIGHT \\*[$DOCTITLE]
+. \}
+. \}
+. el \{\
+. if \\n[#USER_DEF_HDRFTR_LEFT]=0 .ds $HDRFTR_LEFT \\*[$AUTHOR_1]
+. if \\n[#USER_DEF_HDRFTR_RIGHT]=0 .ds $HDRFTR_RIGHT \\*[$TITLE]
+. \}
+. if !d $ATTRIBUTE_STRING .ds $ATTRIBUTE_STRING by
+. if !d $FINIS_STRING .FINIS_STRING "End"
+. if !r #FINIS_STRING_CAPS .nr #FINIS_STRING_CAPS 1
+.\" Covers
+. if !r #DOC_COVERS_OFF .nr #DOC_COVERS 1
+. if !r #COVERS_OFF .nr #COVERS 1
+. if !d $COVER_COPYRIGHT_QUAD .COVER_COPYRIGHT_QUAD R
+. if !d $COVER_MISC_QUAD .COVER_MISC_QUAD L
+. if !d $MISC_QUAD .MISC_QUAD L
+. if !d $DOC_COVER_COPYRIGHT_QUAD .DOC_COVER_COPYRIGHT_QUAD R
+. if !d $DOC_COVER_MISC_QUAD .DOC_COVER_MISC_QUAD L
+.\" Defaults for printstyle TYPEWRITE
+. if \\n[#PRINT_STYLE]=1 \{\
+. TYPEWRITER
+. SS DEFAULT
+. if \\n[#UNDERLINE_QUOTES]=1 .UNDERLINE_QUOTES
+. if \\n[#UNDERLINE_QUOTES]=0 .UNDERLINE_QUOTES OFF
+. if !\\n[#HDRFTR_PLAIN] \{\
+. if !r #HDRFTR_RIGHT_CAPS .nr #HDRFTR_RIGHT_CAPS 1
+. if \\n[#HDRFTR_RIGHT_CAPS]=0 \
+. if !d $HDRFTR_RIGHT_SIZE_CHANGE .HDRFTR_RIGHT_SIZE +0
+. \}
+.\" +Doctype underlining (if NAMED)
+. if !r #DOCTYPE_UNDERLINE .nr #DOCTYPE_UNDERLINE 1
+.\" +Quotes and blockquotes
+. if !r #Q_OFFSET_VALUE \
+. if '\\*[$Q_OFFSET_VALUE]'' \
+. QUOTE_INDENT \\n[#PP_INDENT]u+(\\n[#PP_INDENT]u/2u)
+. if !d $Q_QUAD .QUOTE_LEFT
+. if !d $BQUOTE_QUAD .BLOCKQUOTE_QUAD LEFT
+. if !r #BQ_OFFSET_VALUE \
+. if '\\*[$BQ_OFFSET_VALUE]'' \
+. BLOCKQUOTE_INDENT \\n[#PP_INDENT]u+(\\n[#PP_INDENT]u/2u)
+.\" +Epigraphs
+. if !r #EPI_OFFSET_VALUE \
+. if '\\*[$EPI_OFFSET_VALUE]'' .EPIGRAPH_INDENT 2
+.\" +Linebreaks
+. if !d $LINEBREAK_CHAR .LINEBREAK_CHAR * 3 2p
+.\" +Footnotes
+. if !d $FN_SIZE_CHANGE .FOOTNOTE_SIZE +0
+. if !r #FN_RULE_LENGTH .FOOTNOTE_RULE_LENGTH 2i
+.\" +Endnotes
+. if !r #EN_PP_INDENT .ENDNOTE_PARA_INDENT \\n[#PP_INDENT]
+. if !r #EN_STRING_CAPS .ENDNOTES_HEADER_CAPS
+. if !r #EN_STRING_UNDERLINE .nr #EN_STRING_UNDERLINE 2
+.\" +Footnotes
+. if !r #FN_RULE_ADJ .FOOTNOTE_RULE_ADJ 6p
+.\" +Slant stuff
+. if !r #SLANT_MEANS_SLANT \{\
+. ie \\n[#UNDERLINE_SLANT]=1 .UNDERLINE_SLANT
+. el .UNDERLINE_SLANT OFF
+. \}
+.\" +Bibliography
+. if !r #BIB_STRING_UNDERLINE .nr #BIB_STRING_UNDERLINE 2
+. if !r #BIB_STRING_CAPS .BIBLIOGRAPHY_STRING_CAPS
+. \}
+.\" Defaults for printstyle TYPESET
+. if \\n[#PRINT_STYLE]=2 \{\
+. if !d $DOCHEADER_LEAD_ADJ .DOCHEADER_LEAD +0
+.\" +Cover
+. if !d $COVER_LEAD_ADJ .COVER_LEAD +0
+. if !d $COVER_FAM .COVER_FAMILY \\*[$DOC_FAM]
+.\" (title)
+. if !d $COVER_TITLE_FAM \{\
+. ie !d $COVER_FAM .COVER_TITLE_FAMILY \\*[$DOC_FAM]
+. el .COVER_TITLE_FAMILY \\*[$COVER_FAM]
+. \}
+. if !d $COVER_TITLE_FT .COVER_TITLE_FONT B
+. if !d $COVER_TITLE_SIZE_CHANGE .COVER_TITLE_SIZE +3.5
+.\" (doctitle)
+. if !d $COVER_DOCTITLE_FAM \{\
+. ie !d $DOC_COVER_FAM .COVER_DOCTITLE_FAMILY \\*[$DOC_FAM]
+. el .COVER_DOCTITLE_FAMILY \\*[$COVER_FAM]
+. \}
+. if !d $COVER_DOCTITLE_FT .COVER_DOCTITLE_FONT B
+. if !d $COVER_DOCTITLE_SIZE_CHANGE .COVER_DOCTITLE_SIZE +3.5
+.\" (covertitle)
+. if !d $COVER_COVERTITLE_FAM \{\
+. ie !d $COVER_FAM .COVER_COVERTITLE_FAMILY \\*[$DOC_FAM]
+. el .COVER_COVERTITLE_FAMILY \\*[$COVER_FAM]
+. \}
+. if !d $COVER_COVERTITLE_FT .COVER_COVERTITLE_FONT B
+. if !d $COVER_COVERTITLE_SIZE_CHANGE .COVER_COVERTITLE_SIZE +3.5
+.\" (doc_covertitle)
+. if !d $COVER_DOC_COVERTITLE_FAM \{\
+. ie !d $COVER_FAM .COVER_DOC_COVERTITLE_FAMILY \\*[$DOC_FAM]
+. el .COVER_DOC_COVERTITLE_FAMILY \\*[$COVER_FAM]
+. \}
+. if !d $COVER_DOC_COVERTITLE_FT .COVER_DOC_COVERTITLE_FONT B
+. if !d $COVER_DOC_COVERTITLE_SIZE_CHANGE .COVER_DOC_COVERTITLE_SIZE +3.5
+.\" (chapter)
+. if !d $COVER_CHAPTER_FAM \{\
+. ie !d $COVER_FAM .COVER_CHAPTER_FAMILY \\*[$DOC_FAM]
+. el .COVER_CHAPTER_FAMILY \\*[$COVER_FAM]
+. \}
+. if !d $COVER_CHAPTER_FT .COVER_CHAPTER_FONT B
+. if !d $COVER_CHAPTER_SIZE_CHANGE .COVER_CHAPTER_SIZE +3.5
+.\" (chapter title)
+. if !d $COVER_CHAPTER_TITLE_FAM \{\
+. ie !d $COVER_FAM .COVER_CHAPTER_TITLE_FAMILY \\*[$DOC_FAM]
+. el .COVER_CHAPTER_TITLE_FAMILY \\*[$COVER_FAM]
+. \}
+. if !d $COVER_CHAPTER_TITLE_FT .COVER_CHAPTER_TITLE_FONT BI
+. if !d $COVER_CHAPTER_TITLE_SIZE_CHANGE .COVER_CHAPTER_TITLE_SIZE +4
+.\" (subtitle)
+. if !d $COVER_SUBTITLE_FAM \{\
+. ie !d $COVER_FAM .COVER_SUBTITLE_FAMILY \\*[$DOC_FAM]
+. el .COVER_SUBTITLE_FAMILY \\*[$COVER_FAM]
+. \}
+. if !d $COVER_SUBTITLE_FT .COVER_SUBTITLE_FONT R
+. if !d $COVER_SUBTITLE_SIZE_CHANGE .COVER_SUBTITLE_SIZE +0
+.\" (attribution and author[s])
+. if !d $COVER_ATTRIBUTE_FAM \{\
+. ie !d $COVER_FAM .COVER_ATTRIBUTE_FAMILY \\*[$DOC_FAM]
+. el .COVER_ATTRIBUTE_FAMILY \\*[$COVER_FAM]
+. \}
+. if !d $COVER_ATTRIBUTE_FT .COVER_ATTRIBUTE_FONT I
+. if !d $COVER_ATTRIBUTE_SIZE_CHANGE .COVER_ATTRIBUTE_SIZE +0
+. if !d $COVER_AUTHOR_FAM \{\
+. ie !d $COVER_FAM .COVER_AUTHOR_FAMILY \\*[$DOC_FAM]
+. el .COVER_AUTHOR_FAMILY \\*[$COVER_FAM]
+. \}
+. if !d $COVER_AUTHOR_FT .COVER_AUTHOR_FONT I
+. if !d $COVER_AUTHOR_SIZE_CHANGE .COVER_AUTHOR_SIZE +0
+.\" (doctype if "named")
+. if !d $COVER_DOCTYPE_FAM \{\
+. ie !d $COVER_FAM .COVER_DOCTYPE_FAMILY \\*[$DOC_FAM]
+. el .COVER_DOCTYPE_FAMILY \\*[$COVER_FAM]
+. \}
+. if !d $COVER_DOCTYPE_FT .COVER_DOCTYPE_FONT BI
+. if !d $COVER_DOCTYPE_SIZE_CHANGE .COVER_DOCTYPE_SIZE +3
+.\" (copyright)
+. if !d $COVER_COPYRIGHT_FAM \{\
+. ie !d $COVER_FAM .COVER_COPYRIGHT_FAMILY \\*[$DOC_FAM]
+. el .COVER_COPYRIGHT_FAMILY \\*[$COVER_FAM]
+. \}
+. if !d $COVER_COPYRIGHT_FT .COVER_COPYRIGHT_FONT R
+. if !d $COVER_COPYRIGHT_SIZE_CHANGE .COVER_COPYRIGHT_SIZE -2
+.\" (misc)
+. if !d $COVER_MISC_FAM .COVER_MISC_FAMILY \\*[$DOC_FAM]
+. if !d $COVER_MISC_FT .COVER_MISC_FONT R
+. if !d $COVER_MISC_SIZE_CHANGE .COVER_MISC_SIZE -2
+. if !r #COVER_MISC_LEAD .COVER_MISC_LEAD 14.5
+.\" +Doc cover
+. if !d $DOC_COVER_LEAD_ADJ .DOC_COVER_LEAD +0
+. if !d $DOC_COVER_FAM .DOC_COVER_FAMILY \\*[$DOC_FAM]
+.\" (title)
+. if !d $DOC_COVER_TITLE_FAM \{\
+. ie !d $DOC_COVER_FAM .DOC_COVER_TITLE_FAMILY \\*[$DOC_FAM]
+. el .DOC_COVER_TITLE_FAMILY \\*[$DOC_COVER_FAM]
+. \}
+. if !d $DOC_COVER_TITLE_FT .DOC_COVER_TITLE_FONT B
+. if !d $DOC_COVER_TITLE_SIZE_CHANGE .DOC_COVER_TITLE_SIZE +3.5
+.\" (doctitle)
+. if !d $DOC_COVER_DOCTITLE_FAM \{\
+. ie !d $DOC_COVER_FAM .DOC_COVER_DOCTITLE_FAMILY \\*[$DOC_FAM]
+. el .DOC_COVER_DOCTITLE_FAMILY \\*[$DOC_COVER_FAM]
+. \}
+. if !d $DOC_COVER_DOCTITLE_FT .DOC_COVER_DOCTITLE_FONT B
+. if !d $DOC_COVER_DOCTITLE_SIZE_CHANGE .DOC_COVER_DOCTITLE_SIZE +3.5
+.\" (covertitle)
+. if !d $DOC_COVER_COVERTITLE_FAM \{\
+. ie !d $COVER_FAM .DOC_COVER_COVERTITLE_FAMILY \\*[$DOC_FAM]
+. el .DOC_COVER_COVERTITLE_FAMILY \\*[$COVER_FAM]
+. \}
+. if !d $DOC_COVER_COVERTITLE_FT .DOC_COVER_COVERTITLE_FONT B
+. if !d $DOC_COVER_COVERTITLE_SIZE_CHANGE .DOC_COVER_COVERTITLE_SIZE +3.5
+.\" (doc_covertitle)
+. if !d $DOC_COVER_DOC_COVERTITLE_FAM \{\
+. ie !d $COVER_FAM .DOC_COVER_DOC_COVERTITLE_FAMILY \\*[$DOC_FAM]
+. el .DOC_COVER_DOC_COVERTITLE_FAMILY \\*[$COVER_FAM]
+. \}
+. if !d $DOC_COVER_DOC_COVERTITLE_FT .DOC_COVER_DOC_COVERTITLE_FONT B
+. if !d $DOC_COVER_DOC_COVERTITLE_SIZE_CHANGE .DOC_COVER_DOC_COVERTITLE_SIZE +3.5
+.\" (chapter)
+. if !d $DOC_COVER_CHAPTER_FAM \{\
+. ie !d $DOC_COVER_FAM .DOC_COVER_CHAPTER_FAMILY \\*[$DOC_FAM]
+. el .DOC_COVER_CHAPTER_FAMILY \\*[$DOC_COVER_FAM]
+. \}
+. if !d $DOC_COVER_CHAPTER_FT .DOC_COVER_CHAPTER_FONT B
+. if !d $DOC_COVER_CHAPTER_SIZE_CHANGE .DOC_COVER_CHAPTER_SIZE +3.5
+.\" (chapter title)
+. if !d $DOC_COVER_CHAPTER_TITLE_FAM \{\
+. ie !d $DOC_COVER_FAM .DOC_COVER_CHAPTER_TITLE_FAMILY \\*[$DOC_FAM]
+. el .DOC_COVER_CHAPTER_TITLE_FAMILY \\*[$DOC_COVER_FAM]
+. \}
+. if !d $DOC_COVER_CHAPTER_TITLE_FT .DOC_COVER_CHAPTER_TITLE_FONT BI
+. if !d $DOC_COVER_CHAPTER_TITLE_SIZE_CHANGE .DOC_COVER_CHAPTER_TITLE_SIZE +4
+.\" (subtitle)
+. if !d $DOC_COVER_SUBTITLE_FAM \{\
+. ie !d $DOC_COVER_FAM .DOC_COVER_SUBTITLE_FAMILY \\*[$DOC_FAM]
+. el .DOC_COVER_SUBTITLE_FAMILY \\*[$DOC_COVER_FAM]
+. \}
+. if !d $DOC_COVER_SUBTITLE_FT .DOC_COVER_SUBTITLE_FONT R
+. if !d $DOC_COVER_SUBTITLE_SIZE_CHANGE .DOC_COVER_SUBTITLE_SIZE +0
+.\" (attribution and author[s])
+. if !d $DOC_COVER_ATTRIBUTE_FAM \{\
+. ie !d $DOC_COVER_FAM .DOC_COVER_ATTRIBUTE_FAMILY \\*[$DOC_FAM]
+. el .DOC_COVER_ATTRIBUTE_FAMILY \\*[$DOC_COVER_FAM]
+. \}
+. if !d $DOC_COVER_ATTRIBUTE_FT .DOC_COVER_ATTRIBUTE_FONT I
+. if !d $DOC_COVER_ATTRIBUTE_SIZE_CHANGE .DOC_COVER_ATTRIBUTE_SIZE +0
+. if !d $DOC_COVER_AUTHOR_FAM \{\
+. ie !d $DOC_COVER_FAM .DOC_COVER_AUTHOR_FAMILY \\*[$DOC_FAM]
+. el .DOC_COVER_AUTHOR_FAMILY \\*[$DOC_COVER_FAM]
+. \}
+. if !d $DOC_COVER_AUTHOR_FT .DOC_COVER_AUTHOR_FONT I
+. if !d $DOC_COVER_AUTHOR_SIZE_CHANGE .DOC_COVER_AUTHOR_SIZE +0
+.\" (doctype if "named")
+. if !d $DOC_COVER_DOCTYPE_FAM \{\
+. ie !d $DOC_COVER_FAM .DOC_COVER_DOCTYPE_FAMILY \\*[$DOC_FAM]
+. el .DOC_COVER_DOCTYPE_FAMILY \\*[$DOC_COVER_FAM]
+. \}
+. if !d $DOC_COVER_DOCTYPE_FT .DOC_COVER_DOCTYPE_FONT BI
+. if !d $DOC_COVER_DOCTYPE_SIZE_CHANGE .DOC_COVER_DOCTYPE_SIZE +3
+.\" (copyright)
+. if !d $DOC_COVER_COPYRIGHT_FAM \{\
+. ie !d $DOC_COVER_FAM .DOC_COVER_COPYRIGHT_FAMILY \\*[$DOC_FAM]
+. el .DOC_COVER_COPYRIGHT_FAMILY \\*[$DOC_COVER_FAM]
+. \}
+. if !d $DOC_COVER_COPYRIGHT_FT .DOC_COVER_COPYRIGHT_FONT R
+. if !d $DOC_COVER_COPYRIGHT_SIZE_CHANGE .DOC_COVER_COPYRIGHT_SIZE -2
+.\" (misc)
+. if !d $DOC_COVER_MISC_FAM .DOC_COVER_MISC_FAMILY \\*[$DOC_FAM]
+. if !d $DOC_COVER_MISC_FT .DOC_COVER_MISC_FONT R
+. if !d $DOC_COVER_MISC_SIZE_CHANGE .DOC_COVER_MISC_SIZE -2
+. if !r #DOC_COVER_MISC_LEAD .DOC_COVER_MISC_LEAD 14.5
+.\" +Docheader
+. if !d $DOCHEADER_FAM .DOCHEADER_FAMILY \\*[$DOC_FAM]
+. if !d $TITLE_FAM \{\
+. ie !d $DOCHEADER_FAM .TITLE_FAMILY \\*[$DOC_FAM]
+. el .TITLE_FAMILY \\*[$DOCHEADER_FAM]
+. \}
+. if !d $TITLE_FT .TITLE_FONT B
+.\" Title size change
+. if !d $TITLE_SIZE_CHANGE \{\
+. ie \\n[#DOC_TYPE]=2 .TITLE_SIZE +4
+. el .TITLE_SIZE +3.5
+. \}
+. if !d $CHAPTER_FAM \{\
+. ie !d $DOCHEADER_FAM .CHAPTER_FAMILY \\*[$DOC_FAM]
+. el .CHAPTER_FAMILY \\*[$DOCHEADER_FAM]
+. \}
+. if !d $CHAPTER_FT .CHAPTER_FONT B
+. if !d $CHAPTER_SIZE_CHANGE .CHAPTER_SIZE +4
+. if !d $CHAPTER_TITLE_FAM \{\
+. ie !d $DOCHEADER_FAM .CHAPTER_TITLE_FAMILY \\*[$DOC_FAM]
+. el .CHAPTER_TITLE_FAMILY \\*[$DOCHEADER_FAM]
+. \}
+. if !d $CHAPTER_TITLE_FT .CHAPTER_TITLE_FONT BI
+. if !d $CHAPTER_TITLE_SIZE_CHANGE .CHAPTER_TITLE_SIZE +4
+. if !d $SUBTITLE_FAM \{\
+. ie !d $DOCHEADER_FAM .SUBTITLE_FAMILY \\*[$DOC_FAM]
+. el .SUBTITLE_FAMILY \\*[$DOCHEADER_FAM]
+. \}
+. if !d $SUBTITLE_FT .SUBTITLE_FONT R
+. if !d $SUBTITLE_SIZE_CHANGE .SUBTITLE_SIZE +0
+. if !d $ATTRIBUTE_FAM \{\
+. ie !d $DOCHEADER_FAM .ATTRIBUTE_FAMILY \\*[$DOC_FAM]
+. el .ATTRIBUTE_FAMILY \\*[$DOCHEADER_FAM]
+. \}
+. if !d $ATTRIBUTE_FT .ATTRIBUTE_FONT I
+. if !d $ATTRIBUTE_SIZE_CHANGE .ATTRIBUTE_SIZE +0
+. if !d $AUTHOR_FAM \{\
+. ie !d $DOCHEADER_FAM .AUTHOR_FAMILY \\*[$DOC_FAM]
+. el .AUTHOR_FAMILY \\*[$DOCHEADER_FAM]
+. \}
+. if !d $AUTHOR_FT .AUTHOR_FONT I
+. if !d $AUTHOR_SIZE_CHANGE .AUTHOR_SIZE +0
+. if !d $DOCTYPE_FAM \{\
+. ie !d $DOCHEADER_FAM .DOCTYPE_FAMILY \\*[$DOC_FAM]
+. el .DOCTYPE_FAMILY \\*[$DOCHEADER_FAM]
+. \}
+. if !d $DOCTYPE_FT .DOCTYPE_FONT BI
+. if !d $DOCTYPE_SIZE_CHANGE .DOCTYPE_SIZE +3
+.\" +Headers and footers
+. if !\\n[#HDRFTR_PLAIN] \{\
+. if !d $HDRFTR_LEFT_FAM \
+. HDRFTR_LEFT_FAMILY \\*[$DOC_FAM]
+. if !d $HDRFTR_LEFT_FT \
+. HDRFTR_LEFT_FONT R
+. if \\n[#HDRFTR_LEFT_CAPS] \
+. if !d $HDRFTR_LEFT_SIZE_CHANGE \
+. HDRFTR_LEFT_SIZE -2
+. if !d $HDRFTR_LEFT_SIZE_CHANGE \
+. HDRFTR_LEFT_SIZE -.5
+. if !d $HDRFTR_CENTER_FAM \
+. HDRFTR_CENTER_FAMILY \\*[$DOC_FAM]
+. if !d $HDRFTR_CENTER_FT .HDRFTR_CENTER_FONT I
+. if \\n[#HDRFTR_CENTER_CAPS] \
+. if !d $HDRFTR_CENTER_SIZE_CHANGE \
+. HDRFTR_CENTER_SIZE -2
+. if !d $HDRFTR_CENTER_SIZE_CHANGE \
+. HDRFTR_CENTER_SIZE -.5
+. if !d $HDRFTR_RIGHT_FAM \
+. HDRFTR_RIGHT_FAMILY \\*[$DOC_FAM]
+. if !d $HDRFTR_RIGHT_FT .HDRFTR_RIGHT_FONT R
+. ie !r #HDRFTR_RIGHT_CAPS \{\
+. nr #HDRFTR_RIGHT_CAPS 1
+. if !d $HDRFTR_RIGHT_SIZE_CHANGE \
+. HDRFTR_RIGHT_SIZE -2
+. \}
+. el \{\
+. if \\n[#HDRFTR_RIGHT_CAPS]=0 \
+. if !d $HDRFTR_RIGHT_SIZE_CHANGE \
+. HDRFTR_RIGHT_SIZE -.5
+. \}
+. ie !\\n[#HDRFTR_RIGHT_SMALLCAPS] \{\
+. if \\n[#HDRFTR_RIGHT_CAPS] \
+. if !d $HDRFTR_RIGHT_SIZE_CHANGE \
+. HDRFTR_RIGHT_SIZE -2
+. \}
+. el \{\
+. nr #SKIP_CAPS_SMALLCAPS_WARNING 1
+. if \\n[#HDRFTR_RIGHT_CAPS] .HDRFTR_RIGHT_CAPS OFF
+. \}
+. if !d $HDRFTR_RIGHT_SIZE_CHANGE .HDRFTR_RIGHT_SIZE -.5
+. \}
+.\" +Quotes
+. if !d $QUOTE_FAM .QUOTE_FAMILY \\*[$DOC_FAM]
+. if !d $QUOTE_FT .QUOTE_FONT I
+. if !d $QUOTE_SIZE_CHANGE .QUOTE_SIZE +0
+. if !r #Q_OFFSET_VALUE \
+. if '\\*[$Q_OFFSET_VALUE]'' .QUOTE_INDENT 3
+. if !d $Q_QUAD .QUOTE_LEFT
+.\" +Blockquotes
+.\" Note: the leading for quotes and blockquotes is set after .DEFAULTS in START
+. if !d $BQUOTE_FAM .BLOCKQUOTE_FAMILY \\*[$DOC_FAM]
+. if !d $BQUOTE_FT .BLOCKQUOTE_FONT R
+. if !d $BQUOTE_SIZE_CHANGE .BLOCKQUOTE_SIZE -1
+. if !d $BQUOTE_QUAD .BLOCKQUOTE_QUAD LEFT
+. if !r #BQ_OFFSET_VALUE \
+. if '\\*[$BQ_OFFSET_VALUE]'' .BLOCKQUOTE_INDENT 3
+.\" +Epigraphs
+. if !d $EPI_FAM .EPIGRAPH_FAMILY \\*[$DOC_FAM]
+. if !d $EPI_FT .EPIGRAPH_FONT R
+. if !d $EPI_SIZE_CHANGE .EPIGRAPH_SIZE -1.5
+. if !r #EPI_AUTOLEAD .EPIGRAPH_AUTOLEAD 2
+. if !d $EPI_QUAD .EPIGRAPH_QUAD \\*[$DOC_QUAD]
+. if !r #EPI_OFFSET_VALUE \
+. if '\\*[$EPI_OFFSET_VALUE]'' .EPIGRAPH_INDENT 3
+.\" +Linebreaks
+. if !d $LINEBREAK_CHAR .LINEBREAK_CHAR * 3 3p
+. if !d $LINEBREAK_COLOR .LINEBREAK_COLOR black
+.\" +Footnotes
+. if !r #FN_RULE_LENGTH .FOOTNOTE_RULE_LENGTH 4P
+. if !r #FN_RULE_ADJ .FOOTNOTE_RULE_ADJ 3p
+. if !d $FN_SIZE_CHANGE .FOOTNOTE_SIZE -2
+. if !r #FN_AUTOLEAD .FOOTNOTE_AUTOLEAD 2
+.\" +Endnotes
+. if !r #EN_PS .ENDNOTE_PT_SIZE (\\n[#DOC_PT_SIZE]u)
+. if !d $EN_STRING_FT .ENDNOTES_HEADER_FONT B
+. if !d $EN_STRING_SIZE_CHANGE .ENDNOTES_HEADER_SIZE +3.5
+. if !d $EN_TITLE_FT .ENDNOTE_TITLE_FONT B
+. if !d $EN_TITLE_SIZE_CHANGE .ENDNOTE_TITLE_SIZE +0
+. if !d $EN_NUMBER_FT .ENDNOTE_NUMBER_FONT B
+. if !d $EN_LN_FT .ENDNOTE_LINENUMBER_FONT R
+. if !d $EN_NUMBER_SIZE_CHANGE .ENDNOTE_NUMBER_SIZE +0
+. if !d $EN_LN_SIZE_CHANGE .ENDNOTE_LINENUMBER_SIZE +0
+. if !r #EN_PP_INDENT .ENDNOTE_PARA_INDENT 1.5m
+. if !d $EN_SPACE .ENDNOTE_SPACING 0
+.\" +Bibliography
+. if !r #BIB_LIST .BIBLIOGRAPHY_TYPE PLAIN
+. if !r #BIB_PS .BIBLIOGRAPHY_PT_SIZE (\\n[#DOC_PT_SIZE]u)
+. if !d $BIB_STRING_FT .BIBLIOGRAPHY_STRING_FONT B
+. if !d $BIB_STRING_SIZE_CHANGE .BIBLIOGRAPHY_STRING_SIZE +3.5
+.\" +Table of contents
+. if !d $TOC_FAM .TOC_FAMILY \\*[$DOC_FAM]
+. if !r #TOC_PS .TOC_PT_SIZE (\\n[#DOC_PT_SIZE]u)
+. if '\\*[$TOC_LEAD]'' .TOC_LEAD \\n[#DOC@LEAD]u ADJUST
+. if !d $TOC_HEADER_FAM .TOC_HEADER_FAMILY \\*[$TOC_FAM]
+. if !d $TOC_HEADER_SIZE_CHANGE .TOC_HEADER_SIZE +3.5
+. if !d $TOC_HEADER_FT .TOC_HEADER_FONT B
+. if !d $TOC_PN_FAM .TOC_PN_FAMILY \\*[$TOC_FAM]
+. if !d $TOC_PN_FT .TOC_PN_FONT R
+. if !d $TOC_PN_SIZE_CHANGE .TOC_PN_SIZE +0
+. if !d $TOC_TITLE_FAM .TOC_TITLE_FAMILY \\*[$TOC_FAM]
+. \}
+.\" +Refer support
+. if !r #EN_REF .nr #FN_REF 1
+. if !d $REF_FN_INDENT \{\
+. if \\n[#PRINT_STYLE]=1 .INDENT_REFS FOOTNOTE .5i
+. if \\n[#PRINT_STYLE]=2 .INDENT_REFS FOOTNOTE 2m
+. \}
+. if !d $REF_EN_INDENT \{\
+. if \\n[#PRINT_STYLE]=1 .INDENT_REFS ENDNOTE .5i
+. if \\n[#PRINT_STYLE]=2 .INDENT_REFS ENDNOTE 2m
+. \}
+. if !d $REF_BIB_INDENT \{\
+. if \\n[#PRINT_STYLE]=1 .INDENT_REFS BIBLIO .5i
+. if \\n[#PRINT_STYLE]=2 .INDENT_REFS BIBLIO 2m
+. \}
+.\" Define strings for idem entries
+. if \\n[#PRINT_STYLE]=1 .char \[idem] \[hy]\[hy]\[hy]
+. if \\n[#PRINT_STYLE]=2 .char \[idem] \v'-.3m'\l'3m'\v'.3m'
+.\" Adjust doc leading for PRINTSTYLE TYPESET
+. if \\n[#PRINT_STYLE]=2 \
+. if \\n[#ADJ_DOC_LEAD]=1 .DOC_LEAD_ADJUST
+.\" This diversion is to get a value for #FN_AUTOLEAD
+. di NULL
+. if \\n[#AUTO_LEAD] \{\
+. nr #RESTORE_AUTO_LEAD 1
+. nr #SAVED_AUTOLEAD_VALUE \\n[#AUTOLEAD_VALUE]
+. \}
+. ev NULL
+. if \\n[#PRINT_STYLE]=1 \{\
+. ps \\*[$TYPEWRITER_PS]
+. ie \\n[#SINGLE_SPACE]=1 .vs \\n[#ORIGINAL_DOC_LEAD]u
+. el .vs \\n[#ORIGINAL_DOC_LEAD]u/2u
+. \}
+. if \\n[#PRINT_STYLE]=2 \{\
+. ps \\n[#DOC_PT_SIZE]u\\*[$FN_SIZE_CHANGE]
+. vs \\n[.ps]u+\\n[#FN_AUTOLEAD]u
+. \}
+. nr #FN_LEAD \\n[#LEAD]
+. ev
+. di
+. if \\n[#RESTORE_AUTO_LEAD] \{\
+. nr #AUTO_LEAD 1
+. nr #AUTOLEAD_VALUE \\n[#SAVED_AUTOLEAD_VALUE]
+. \}
+. if !\\n[#SKIP_TRAPS] .TRAPS
+. rr #SKIP_TRAPS
+. if \\n[#REMOVE_ADJ] .DOC_LEAD \\n[#DOC_LEAD]u-\\n[#DOC_LEAD_ADJ]u
+. if (\\n[#FOOTER_MARGIN]+\\n[.v]>=\\n[#B_MARGIN]) \{\
+. tm1 "[mom]: Your chosen bottom margin for running text is too close to the footer margin.
+. tm1 " No footers or bottom-of-page page numbers will be printed.
+. tm1 " Please reset B_MARGIN or FOOTER_MARGIN to allow enough space.
+. tm1 " If no footers or bottom-of-page page numbers are required,
+. tm1 " invoke .FOOTER_MARGIN 0 before .START
+. nr #SKIP_FOOTER 1
+. \}
+.\" Endnote, bibliography and toc leading
+. nr #OK_PROCESS_LEAD 1
+. nr #RESTORE_DOC_LEAD \\n[.v]
+. nr #RESTORE_B_MARGIN \\n[#B_MARGIN]
+. if \\n[#PRINT_STYLE]=1 \{\
+. ie \\n[#SINGLE_SPACE] \{\
+. ENDNOTE_LEAD 12 ADJUST
+. BIBLIOGRAPHY_LEAD 12 ADJUST
+. \}
+. el \{\
+. ie \\n[#EN_SINGLESPACE] .ENDNOTE_LEAD 12 ADJUST
+. el .ENDNOTE_LEAD 24 ADJUST
+. ie \\n[#BIB_SINGLESPACE] .BIBLIOGRAPHY_LEAD 12 ADJUST
+. el .BIBLIOGRAPHY_LEAD 24 ADJUST
+. \}
+. \}
+. if \\n[#PRINT_STYLE]=2 \{\
+. ie !d $EN_LEAD .ENDNOTE_LEAD \\n[#UNADJUSTED_DOC_LEAD]u ADJUST
+. el .ENDNOTE_LEAD \\*[$EN_LEAD] \\*[$ADJUST_EN_LEAD]
+. ie !d $BIB_LEAD .BIBLIOGRAPHY_LEAD \\n[#UNADJUSTED_DOC_LEAD]u ADJUST
+. el .BIBLIOGRAPHY_LEAD \\*[$BIB_LEAD] \\*[$ADJUST_BIB_LEAD]
+. ie !d $TOC_LEAD .TOC_LEAD \\n[#UNADJUSTED_DOC_LEAD]u \\*[$ADJUST_TOC_LEAD]
+. el .TOC_LEAD \\*[$TOC_LEAD] \\*[$ADJUST_TOC_LEAD]
+. \}
+. ie !d $BIB_SPACE .BIBLIOGRAPHY_SPACING 0
+. el \{\
+. if \\n[#DEFER_BIB_SPACING]=1 \{\
+. BIBLIOGRAPHY_SPACING \\*[$BIB_SPACE]
+. rr #DEFER_BIB_SPACING
+. \}
+. \}
+. nr #DOC_LEAD \\n[#RESTORE_DOC_LEAD]u
+. nr #B_MARGIN \\n[#RESTORE_B_MARGIN]
+. vs \\n[#DOC_LEAD]u
+. if !\\n[#PRINT_STYLE]=1 \{\
+. if \\n[#RERUN_TRAPS] \{\
+. TRAPS
+. rr #RERUN_TRAPS
+. \}
+. \}
+.\" Set default heading and toc-entry family if not done already
+. nr #HD_LEVEL 0 1 \" loop step
+. nr #LOOP 9 \" loop count
+. while \\n+[#HD_LEVEL]<=\\n[#LOOP] \{\
+. if '\\*[$HEAD_\\n[#HD_LEVEL]_FAM]'' \
+. ds $HEAD_\\n[#HD_LEVEL]_FAM \\*[$DOC_FAM]
+. if '\\*[$HEAD_\\n[#HD_LEVEL]_BASELINE_ADJ]'' \
+. ds $HEAD_\\n[#HD_LEVEL]_BASELINE_ADJ \\n[.v]/10
+. if '\\*[$TOC_HEAD_\\n[#HD_LEVEL]_FAM]'' \
+. ds $TOC_HEAD_\\n[#HD_LEVEL]_FAM \\*[$TOC_FAM]
+. \}
+. if '\\*[$TOC_TITLE_FAM]'' .TOC_TITLE_FAMILY \\*[$DOC_FAM]
+.\" TOC heading (single, non-pagenumbered line insertion)
+. if !d $TOC_HEADING_FAM .ds $TOC_HEADING_FAM \\*[$DOC_FAM]
+. if !d $TOC_HEADING_FT .ds $TOC_HEADING_FT R
+. if !d $TOC_HEADING_SIZE .ds $TOC_HEADING_SIZE +0
+. if !d $TOC_HEADING_COLOR .ds $TOC_HEADING_COLOR black
+. if !d $TOC_HEADING_QUAD .ds $TOC_HEADING_QUAD L
+. if !d $SPACE_ABOVE .ds $SPACE_ABOVE .75v
+. if !d $SPACE_BENEATH .ds $SPACE_BENEATH .25v
+.\" Re-run MNinit to capture strings and registers set in DEFAULTS.
+. if !'\\*[$MN-arg1]'' \{\
+. MNinit \
+\\*[$MN-arg1] \\*[$MN-arg2] \
+\\*[$MN-arg3] \\*[$MN-arg4] \
+\\*[$MN-arg5] \\*[$MN-arg6] \
+\\*[$MN-arg7] \\*[$MN-arg8] \
+\\*[$MN-arg9]
+. \}
+. if \\n[#PRINT_STYLE]=1 .nr #IGNORE 1
+. if \\n[#AUTO_LEAD] \{\
+. rr #AUTO_LEAD
+. rr #AUTOLEAD_VALUE
+. \}
+.END
+\#
+\# =================================================================
+\#
+\# Macros and aliases needed for doccover, cover, and docheader in
+\# START.
+\#
+.MAC DOC_HEADER_QUAD END
+. if '\\$0'DOC_HEADER_QUAD' .ds $CALLING_MACRO DOCHEADER
+. if '\\$0'COVER_H_POS' .ds $CALLING_MACRO COVER
+. if '\\$0'DOC_COVER_H_POS' .ds $CALLING_MACRO DOC_COVER
+. ie !'\\*[$\\*[$CALLING_MACRO]_QUAD]'' \{\
+. substring $\\*[$CALLING_MACRO]_QUAD 0 0
+. if '\\*[$\\*[$CALLING_MACRO]_QUAD]'L' .LEFT
+. if '\\*[$\\*[$CALLING_MACRO]_QUAD]'C' .CENTER
+. if '\\*[$\\*[$CALLING_MACRO]_QUAD]'C' .RIGHT
+. \}
+. el .CENTER
+.END
+.
+.ALIAS COVER_H_POS DOC_HEADER_QUAD
+.ALIAS DOC_COVER_H_POS DOC_HEADER_QUAD
+\#
+.MAC DO_TITLE_OR_AUTHOR END
+. ie '\\$0'DO_AUTHORS' .ds $TTL_AUTH AUTHOR
+. el .ds $TTL_AUTH TITLE
+. if '\\*[$\\*[$PRFX]\\*[$TTL_AUTH]_1]'' \{\
+. if !'\\*[$\\*[$PRFX]DOC\\*[$TTL_AUTH]_1]'' \
+. ds $\\*[$PRFX]\\*[$TTL_AUTH]_1 "\&"
+. if !'\\*[$AUTHOR_1]'' .rm $PRFX
+. \}
+. if !'\\*[$\\*[$PRFX]\\*[$TTL_AUTH]_1]'' \{\
+. if '\\$0'DO_SUBTITLE' \{\
+. if '\\*[$PRFX]'\\*[DOC_]COVER_SUB' \{\
+. ds $PRFX SUB
+. nr #\\*[DOC_]COVER_SUB 1
+. \}
+. \}
+. if !\\n[#PRINT_STYLE]=1 \{\
+. if (\\n[#COVER]=1):(\\n[#DOC_COVER]=1) \
+. if !'\\*[$PRFX]'SUB' \
+. rn $PRFX $PRFX_SAVED
+. fam \\*[$\\*[$COVER_TYPE]\\*[$PRFX]\\*[$TTL_AUTH]_FAM]
+. ft \\*[$\\*[$COVER_TYPE]\\*[$PRFX]\\*[$TTL_AUTH]_FT]
+. ps \
+\\n[#DOC_PT_SIZE]u\\*[$\\*[$COVER_TYPE]\\*[$PRFX]\\*[$TTL_AUTH]_SIZE_CHANGE]
+. if '\\*[$COVER_TYPE]'' .vs \\n[#DOCHEADER_LEAD]u
+. if !'\\*[$\\*[$COVER_TYPE]\\*[$PRFX]\\*[$TTL_AUTH]_LEAD]'' \{\
+. vs \\*[$\\*[$COVER_TYPE]\\*[$PRFX]\\*[$TTL_AUTH]_LEAD]
+. if \\n[#DOCHEADER] .sp |\\n[#T_MARGIN]u-1v
+. \}
+. if \\n[#CHAPTER+TITLE]=1 .ALD \\n[.v]u/4u \" A little space before the chapter title
+. if \\n[#\\*[$COVER_TYPE]\\*[$PRFX]\\*[$TTL_AUTH]_COLOR]=1 \
+. COLOR \\*[$\\*[$COVER_TYPE]\\*[$PRFX]\\*[$TTL_AUTH]_COLOR]
+. if \\n[#\\*[$COVER_TYPE]\\*[$PRFX]\\*[$TTL_AUTH]_CAPS]=1 .CAPS
+. if \\n[#\\*[$COVER_TYPE]\\*[$PRFX]\\*[$TTL_AUTH]_SMALLCAPS]=1 .SMALLCAPS
+. if (\\n[#COVER]=1):(\\n[#DOC_COVER]=1) \
+. rn $PRFX_SAVED $PRFX
+. if \\n[#\\*[DOC_]COVER_TITLE]=2 \
+. ds $PRFX DOC
+. \}
+. if \\n[#\\*[DOC_]COVER_SUB] \{\
+. rr #\\*[DOC_]COVER_SUB
+. ds $PRFX \\*[DOC_]COVER_SUB
+. ds $SAVED_COVER_TYPE \\*[$COVER_TYPE]
+. rm $COVER_TYPE
+. \}
+. nr #ARG_NUM 0 1
+. while \\n[#\\*[$PRFX]\\*[$TTL_AUTH]_NUM]>=\\n+[#ARG_NUM] \{\
+. ie \\n[#\\*[$COVER_TYPE]\\*[$PRFX]\\*[$TTL_AUTH]_UNDERLINE] \{\
+. ds $TITLE_TYPE \\*[$COVER_TYPE]\\*[$PRFX]\\*[$TTL_AUTH]
+. ie \\n[#\\*[$COVER_TYPE]\\*[$PRFX]\\*[$TTL_AUTH]_UNDERLINE]=2 \{\
+. ie !\\n[#PRINT_STYLE]=1 \
+. UNDERSCORE2 \\*[$\\*[$PRFX]\\*[$TTL_AUTH]_UNDERLINE_GAP] \
+\\*[$\\*[$PRFX]\\*[$TTL_AUTH]_RULE_GAP] \
+"\\*[$\\*[$PRFX]\\*[$TTL_AUTH]_\\n[#ARG_NUM]]
+. el .UNDERSCORE "\\*[$\\*[$PRFX]\\*[$TTL_AUTH]_\\n[#ARG_NUM]]
+. \}
+. el \{\
+. ie !\\n[#PRINT_STYLE]=1 \
+. UNDERSCORE "\\*[$\\*[$PRFX]\\*[$TTL_AUTH]_\\n[#ARG_NUM]]
+. el .PRINT "\\*[$\\*[$PRFX]\\*[$TTL_AUTH]_\\n[#ARG_NUM]]
+. \}
+. \}
+. el \{\
+. PRINT "\\*[$\\*[$PRFX]\\*[$TTL_AUTH]_\\n[#ARG_NUM]]
+. \}
+. if \\n[#ARG_NUM]>1 .as PDF_BM " \"
+. as PDF_BM \\*[$\\*[$PRFX]\\*[$TTL_AUTH]_\\n[#ARG_NUM]]
+. \}
+. rm $TITLE_TYPE
+. if \\n[#PRINT_STYLE]=2 .vs
+. if \\n[#\\*[$COVER_TYPE]\\*[$PRFX]\\*[$TTL_AUTH]_COLOR]=1 \
+. gcolor
+. SMALLCAPS off
+. CAPS off
+. \}
+. if !'\\*[$SAVED_COVER_TYPE]'' \{\
+. ds $COVER_TYPE \\*[$SAVED_COVER_TYPE]
+. rm $SAVED_COVER_TYPE
+. \}
+.END
+.
+.ALIAS DO_TITLE DO_TITLE_OR_AUTHOR
+.ALIAS DO_SUBTITLE DO_TITLE_OR_AUTHOR
+.ALIAS DO_AUTHORS DO_TITLE_OR_AUTHOR
+\#
+.MAC DO_CHAPTER END
+. fam \\*[$\\*[DOC_]COVER_CHAPTER_FAM]
+. ft \\*[$\\*[DOC_]COVER_CHAPTER_FT]
+. ps \\n[#DOC_PT_SIZE]u\\*[$\\*[DOC_]COVER_CHAPTER_SIZE_CHANGE]
+. if \\n[#\\*[DOC_]COVER_CHAPTER_COLOR]=1 \
+. COLOR \\*[$\\*[DOC_]COVER_CHAPTER_COLOR]
+. if \\n[#\\*[DOC_]COVER_CHAPTER_CAPS]=1 .CAPS
+. if \\n[#\\*[DOC_]COVER_CHAPTER_SMALLCAPS]=1 .SMALLCAPS
+. ie \\n[#\\*[DOC_]COVER_CHAPTER_UNDERLINE] \{\
+. ds $TITLE_TYPE \\*[$COVER_TYPE]CHAPTER
+. ie \\n[#\\*[DOC_]COVER_CHAPTER_UNDERLINE]=2 \
+. UNDERSCORE2 \\*[$\\*[DOC_]COVER_CHAPTER_UNDERLINE_GAP] \
+\\*[$\\*[DOC_]COVER_CHAPTER_RULE_GAP] "\\*[$CHAPTER_STRING] \\*[$CHAPTER]"
+. el .UNDERSCORE "\\*[$CHAPTER_STRING] \\*[$CHAPTER]"
+. \}
+. el .PRINT "\\*[$CHAPTER_STRING] \\*[$CHAPTER]"
+. gcolor
+. SMALLCAPS off
+. CAPS off
+.END
+.
+.ALIAS DO_TITLE DO_TITLE_OR_AUTHOR
+.ALIAS DO_SUBTITLE DO_TITLE_OR_AUTHOR
+.ALIAS DO_AUTHORS DO_TITLE_OR_AUTHOR
+\#
+.MAC DO_CHAPTER END
+. fam \\*[$\\*[DOC_]COVER_CHAPTER_FAM]
+. ft \\*[$\\*[DOC_]COVER_CHAPTER_FT]
+. ps \\n[#DOC_PT_SIZE]u\\*[$\\*[DOC_]COVER_CHAPTER_SIZE_CHANGE]
+. if \\n[#\\*[DOC_]COVER_CHAPTER_COLOR]=1 \
+. COLOR \\*[$\\*[DOC_]COVER_CHAPTER_COLOR]
+. if \\n[#\\*[DOC_]COVER_CHAPTER_CAPS]=1 .CAPS
+. if \\n[#\\*[DOC_]COVER_CHAPTER_SMALLCAPS]=1 .SMALLCAPS
+. ie \\n[#\\*[DOC_]COVER_CHAPTER_UNDERLINE] \{\
+. ds $TITLE_TYPE \\*[$COVER_TYPE]CHAPTER
+. ie \\n[#\\*[DOC_]COVER_CHAPTER_UNDERLINE]=2 \
+. UNDERSCORE2 \\*[$\\*[DOC_]COVER_CHAPTER_UNDERLINE_GAP] \
+\\*[$\\*[DOC_]COVER_CHAPTER_RULE_GAP] "\\*[$CHAPTER_STRING] \\*[$CHAPTER]"
+. el .UNDERSCORE "\\*[$CHAPTER_STRING] \\*[$CHAPTER]"
+. \}
+. el .PRINT "\\*[$CHAPTER_STRING] \\*[$CHAPTER]"
+. gcolor
+. SMALLCAPS off
+. CAPS off
+.END
+\#
+\# Spacing adjustments for (doc)cover and docheader elements
+\#
+.MAC _SPACE END
+. ds $\\$0R \\$1
+.END
+.
+.ds SPACER_TYPE_1 SUBTITLE
+.ds SPACER_TYPE_2 ATTRIBUTE
+.ds SPACER_TYPE_3 AUTHOR
+.ds SPACER_TYPE_4 CHAPTER_TITLE
+.ds SPACER_TYPE_5 DOCTYPE
+.
+.nr #LOOP 0 1
+.while \n+[#LOOP]<=5 \{\
+. ALIAS \*[SPACER_TYPE_\n[#LOOP]]_SPACE _SPACE
+. ALIAS COVER_\*[SPACER_TYPE_\n[#LOOP]]_SPACE _SPACE
+. ALIAS DOC_COVER_\*[SPACER_TYPE_\n[#LOOP]]_SPACE _SPACE
+.\}
+\#
+.MAC DEFAULT_DOCHEADER END
+. nr #DOCHEADER 1
+. DOC_HEADER_QUAD
+. vs \\n[#DOCHEADER_LEAD]u
+. if \\n[#PRINT_STYLE]=2 \
+. if \\n[#DOCHEADER_COLOR]=1 \
+. COLOR \\*[$DOCHEADER_COLOR]
+. DO_TITLE
+. rr #DOCHEADER
+. if !'\\*[$SUBTITLE_1]'' \{\
+. ds $PRFX SUB
+. if !'\\*[$SUBTITLE_SPACER]'' .sp \\*[$SUBTITLE_SPACER]
+. if \\n[#PRINT_STYLE]=2 \
+. if \\n[#DOCHEADER_COLOR]=1 \
+. COLOR \\*[$DOCHEADER_COLOR]
+. DO_SUBTITLE
+. rm $PRFX
+. \}
+. if !\\n[#NO_PRINT_AUTHOR] \{\
+. if !'\\*[$AUTHOR_1]'' \{\
+. ie \\n[#PRINT_STYLE]=1 \{\
+. TYPEWRITER
+. ie \\n[#SINGLE_SPACE]=1 .vs \\n[#DOC_LEAD]u
+. el .vs \\n[#DOC_LEAD]u/2u
+. sp
+. \}
+. el .vs \\n[#DOC_LEAD]u\\*[$DOCHEADER_LEAD_ADJ]
+. if d$ATTRIBUTE_STRING \{\
+. FAMILY \\*[$ATTRIBUTE_FAM]
+. FT \\*[$ATTRIBUTE_FT]
+. ps \
+\\n[#DOC_PT_SIZE]u\\*[$ATTRIBUTE_SIZE_CHANGE]
+. if \\n[#DOCHEADER_COLOR]=1 \
+. COLOR \\*[$DOCHEADER_COLOR]
+. if \\n[#ATTRIBUTE_COLOR]=1 \
+. COLOR \\*[$ATTRIBUTE_COLOR]
+. if \\n[#ATTRIBUTE_CAPS]=1 .CAPS
+. if !'\\*[$ATTRIBUTE_SPACER]'' \
+. sp \\*[$ATTRIBUTE_SPACER]
+. ie \\n[#ATTRIBUTE_UNDERLINE] \{\
+. ds $TITLE_TYPE ATTRIBUTE
+. ie \\n[#ATTRIBUTE_UNDERLINE]=2 \
+. UNDERSCORE2 \\*[$ATTRIBUTE_UNDERLINE_GAP] \
+\\*[$ATTRIBUTE_RULE_GAP] "\\*[$ATTRIBUTE_STRING]"
+. el .UNDERSCORE "\\*[$ATTRIBUTE_STRING]"
+. \}
+. el .PRINT "\\*[$ATTRIBUTE_STRING]"
+. if \\n[#ATTRIBUTE_COLOR]=1 .gcolor
+. CAPS off
+. \}
+. if !'\\*[$AUTHOR_SPACER]'' .sp \\*[$AUTHOR_SPACER]
+. if \\n[#DOCHEADER_COLOR]=1 \
+. COLOR \\*[$DOCHEADER_COLOR]
+. DO_AUTHORS
+. \}
+. \}
+. FAMILY \\*[$DOC_FAM]
+. FT R
+.END
+\#
+.MAC DEFAULT_DOCHEADER_TYPEWRITE END
+. CENTER
+. TYPEWRITER
+. if !\\n[#SINGLE_SPACE] \{\
+. vs \\n[#DOC_LEAD]u/2u
+. sp |\\n[#T_MARGIN]u-1v
+. \}
+. if !'\\*[$TITLE_1]'' \{\
+. ie \\n[#SINGLE_SPACE] \
+. vs \\n[#DOC_LEAD]u+(\\n[#DOC_LEAD]u/4u)
+. el .vs (\\n[#DOC_LEAD]u/2u)+(\\n[#DOC_LEAD]u/4u)
+. CAPS
+. DO_TITLE
+. CAPS OFF
+. vs
+. \}
+. if !'\\*[$SUBTITLE]'' \{\
+. ds $PRFX SUB
+. sp
+. DO_SUBTITLE
+. rm $PRFX
+. \}
+. if !\\n[#NO_PRINT_AUTHOR] \{\
+. if !'\\*[$AUTHOR_1]'' \{\
+. sp
+. if d$ATTRIBUTE_STRING .PRINT "\\*[$ATTRIBUTE_STRING]
+. sp
+. DO_AUTHORS
+. \}
+. \}
+.END
+\#
+.MAC CHAPTER_DOCHEADER END
+. DOC_HEADER_QUAD
+. FAMILY \\*[$CHAPTER_FAM]
+. FT \\*[$CHAPTER_FT]
+. ps \\n[#DOC_PT_SIZE]u\\*[$CHAPTER_SIZE_CHANGE]
+. vs \\n[#DOCHEADER_LEAD]u
+.\" Chapter title only
+. ie '\\*[$CHAPTER]'' \{\
+. if \\n[#PRINT_STYLE]=2 \
+. if \\n[#DOCHEADER_COLOR]=1 \
+. COLOR \\*[$DOCHEADER_COLOR]
+. if !'\\*[$CHAPTER_TITLE_1]'' \{\
+. ds $PRFX CHAPTER_
+. nr #DOCHEADER 1
+. DO_TITLE
+. rr #DOCHEADER
+. rm $PRFX
+. \}
+. \}
+.\" Chapter string, possibly with a chapter title
+. el \{\
+. if \\n[#PRINT_STYLE]=2 \{\
+. if \\n[#DOCHEADER_COLOR]=1 \
+. COLOR \\*[$DOCHEADER_COLOR]
+. if \\n[#CHAPTER_COLOR]=1 \
+. COLOR \\*[$CHAPTER_COLOR]
+. \}
+. if \\n[#CHAPTER_CAPS]=1 .CAPS
+. ie \\n[#CHAPTER_UNDERLINE] \{\
+. ds $TITLE_TYPE CHAPTER
+. ie \\n[#CHAPTER_UNDERLINE]=2 \
+. UNDERSCORE2 \\*[$CHAPTER_UNDERLINE_GAP] \
+\\*[$CHAPTER_RULE_GAP] "\\*[$CHAPTER_STRING] \\*[$CHAPTER]"
+. el .UNDERSCORE "\\*[$CHAPTER_STRING] \\*[$CHAPTER]"
+. \}
+. el .PRINT "\\*[$CHAPTER_STRING] \\*[$CHAPTER]"
+. rm $TITLE_TYPE
+. if \\n[#PRINT_STYLE]=2 \
+. if \\n[#CHAPTER_COLOR]=1 .gcolor
+. CAPS off
+. if !'\\*[$CHAPTER_TITLE_1]'' \{\
+. ds $PRFX CHAPTER_
+. if \\n[#PRINT_STYLE]=2 \{\
+. nr #CHAPTER+TITLE 1
+. if \\n[#DOCHEADER_COLOR]=1 \
+. COLOR \\*[$DOCHEADER_COLOR]
+. \}
+. if !'\\*[$CHAPTER_TITLE_SPACER]'' \
+. sp \\*[$CHAPTER_TITLE_SPACER]
+. DO_TITLE
+. rm $PRFX
+. rr #CHAPTER+TITLE
+. \}
+. \}
+. FAMILY \\*[$DOC_FAM]
+. FT R
+.END
+\#
+.MAC CHAPTER_DOCHEADER_TYPEWRITE END
+. CENTER
+. TYPEWRITER
+. if !\\n[#SINGLE_SPACE] \{\
+. vs \\n[#DOC_LEAD]u/2u
+. sp |\\n[#T_MARGIN]u-1v
+. \}
+. ie '\\*[$CHAPTER]'' \{\
+. CAPS
+. ie !'\\*[$CHAPTER_TITLE]'' \{\
+. vs \\n[.v]u+(\\n[.v]u/3u)
+. nr #ARG_NUM 0 1
+. while \\n[#CHAPTER_TITLE_NUM]>=\\n+[#ARG_NUM] \{\
+. UNDERSCORE 3p "\\*[$CHAPTER_TITLE_\\n[#ARG_NUM]]"
+. \}
+. vs
+. \}
+. el \{\
+. CAPS
+. UNDERSCORE 3p "\\*[$CHAPTER_STRING]"
+. \}
+. CAPS OFF
+. RLD 1v
+. \}
+. el \{\
+. CAPS
+. UNDERSCORE 3p "\\*[$CHAPTER_STRING] \\*[$CHAPTER]
+. CAPS OFF
+. if !'\\*[$CHAPTER_TITLE]'' \{\
+. sp
+. nr #ARG_NUM 0 1
+. while \\n[#CHAPTER_TITLE_NUM]>=\\n+[#ARG_NUM] \{\
+. PRINT "\\*[$CHAPTER_TITLE_\\n[#ARG_NUM]]
+. \}
+. \}
+. sp -1
+. \}
+. vs \\n[#DOC_LEAD]u
+. if \\n[#SINGLE_SPACE] .sp 2
+.END
+\#
+.MAC NAMED_DOCHEADER END
+. DEFAULT_DOCHEADER
+. if !\\n[#NO_PRINT_DOCTYPE] \{\
+. FAMILY \\*[$DOCTYPE_FAM]
+. FT \\*[$DOCTYPE_FT]
+. ps \\n[#DOC_PT_SIZE]u\\*[$DOCTYPE_SIZE_CHANGE]
+. vs \\n[#DOCHEADER_LEAD]u
+. ALD \\n[#DOCHEADER_LEAD]u
+. if \\n[#DOCHEADER_COLOR]=1 \
+. COLOR \\*[$DOCHEADER_COLOR]
+. if \\n[#DOCTYPE_COLOR]=1 \
+. COLOR \\*[$DOCTYPE_COLOR]
+. if \\n[#DOCTYPE_CAPS]=1 .CAPS
+. if !'\\*[$DOCTYPE_SPACER]'' .sp \\*[$DOCTYPE_SPACER]
+. ie \\n[#DOCTYPE_UNDERLINE] \{\
+. ds $TITLE_TYPE DOCTYPE
+. ie \\n[#DOCTYPE_UNDERLINE]=2 \
+. UNDERSCORE2 \\*[$DOCTYPE_UNDERLINE_GAP] \
+\\*[$DOCTYPE_RULE_GAP] "\\*[$DOC_TYPE]
+. el .UNDERSCORE "\\*[$DOC_TYPE]
+. \}
+. el .PRINT "\\*[$DOC_TYPE]
+. gcolor
+. CAPS off
+. \}
+. FAMILY \\*[$DOC_FAM]
+. FT R
+.END
+\#
+\# COVER PAGE
+\# ----------
+\# *Arguments:
+\# TITLE | DOCTITLE | CHAPTER | CHAPTER_TITLE | CHAPTER+TITLE | COVERTITLE \
+\# [ SUBTITLE AUTHOR DOCTYPE COPYRIGHT MISC BLANKPAGE PDF_OUTLINE_LABEL ]
+\# *Function:
+\# Toggles the number register for each cover page element
+\# passed as an argument.
+\# *Notes:
+\# TITLE, DOCTITLE, CHAPTER, CHAPTER_TITLE or CHAPTER+TITLE must
+\# be supplied. After that, users may enter as many or as few of
+\# the arguments as they like. BLANKPAGE inserts a blank page
+\# after the cover.
+\#
+\# If called as DOC_COVER, performs the same operations, but
+\# applies everything to a doc cover.
+\#
+.MAC COVER END
+. rm DOC_
+. ie '\\$0'DOC_COVER' \{\
+. nr #DOC_COVER 1
+. ds DOC_ DOC_
+. \}
+. el .nr #COVER 1
+. if \\n[#NUM_ARGS]=1 \{\
+. if '\\$1'\\*[DOC_]COVERTEXT' \
+. nr #\\*[DOC_]COVERTEXT_ONLY 1
+. \}
+. if \\n[#NUM_ARGS]=3 \{\
+. if '\\$1'\\*[DOC_]COVERTEXT' \
+. if '\\$2'PDF_OUTLINE_LABEL' \
+. nr #\\*[DOC_]COVERTEXT_ONLY 1
+. if '\\$1'PDF_OUTLINE_LABEL' \
+. if '\\$2'\\*[DOC_]COVERTEXT' \
+. nr #\\*[DOC_]COVERTEXT_ONLY 1
+. \}
+. nr #ARG_NUM 0 1
+. nr #COVER_ITEM \\n[#NUM_ARGS] \"loop count
+. while \\n+[#ARG_NUM]<=\\n[#COVER_ITEM] \{\
+. if '\\$1'DOCTITLE' \{\
+. nr #\\*[DOC_]COVER_TITLE 2
+. shift
+. \}
+. if '\\$1'TITLE' \{\
+. nr #\\*[DOC_]COVER_TITLE 1
+. if \\n[#FROM_\\*[DOC_]COVERTITLE] \{\
+. nr #\\*[DOC_]COVER_TITLE 7
+. rr #FROM_\\*[DOC_]COVERTITLE
+. \}
+. shift
+. \}
+. if '\\$1'CHAPTER' \{\
+. nr #\\*[DOC_]COVER_TITLE 3
+. shift
+. \}
+. if '\\$1'CHAPTER_TITLE' \{\
+. nr #\\*[DOC_]COVER_TITLE 4
+. shift
+. \}
+. if '\\$1'CHAPTER+TITLE' \{\
+. nr #\\*[DOC_]COVER_TITLE 5
+. shift
+. \}
+. if '\\$1'COVERTITLE' \{\
+. nr #COVERTITLE 1
+. nr #\\*[DOC_]COVER_TITLE 6
+. shift
+. \}
+. if '\\$1'DOC_COVERTITLE' \{\
+. nr #DOC_COVERTITLE 1
+. nr #\\*[DOC_]COVER_TITLE 7
+. shift
+. \}
+. if '\\$1'SUBTITLE' \{\
+. nr #\\*[DOC_]COVER_SUBTITLE 1
+. shift
+. \}
+. if '\\$1'AUTHOR' \{\
+. nr #\\*[DOC_]COVER_AUTHOR 1
+. shift
+. \}
+. if '\\$1'EDITOR' \{\
+. nr #\\*[DOC_]COVER_AUTHOR 1
+. shift
+. \}
+. if '\\$1'DOCTYPE' \{\
+. nr #\\*[DOC_]COVER_DOCTYPE 1
+. shift
+. \}
+. if '\\$1'COPYRIGHT' \{\
+. nr #\\*[DOC_]COVER_COPYRIGHT 1
+. shift
+. \}
+. if '\\$1'MISC' \{\
+. nr #\\*[DOC_]COVER_MISC 1
+. shift
+. \}
+. if '\\$1'\\*[DOC_]COVERTEXT' \{\
+. nr #\\*[DOC_]COVERTEXT 1
+. shift
+. \}
+. if '\\$1'\\*[DOC_]COVER_IMAGE' \{\
+. nr #\\*[DOC_]COVER_IMAGE 1
+. shift
+. \}
+. if '\\$1'PDF_OUTLINE_LABEL' \{\
+. shift
+. ds $PDF_\\*[DOC_]COVER_LABEL \\$1
+. shift
+. \}
+. if '\\$1'BLANKPAGE' \{\
+. nr #\\*[DOC_]COVER_BLANKPAGE 1
+. shift
+. \}
+. \}
+. if '\\$0'DOC_COVER' .rm DOC_
+.END
+\#
+\# COVER TITLE
+\# -----------
+\# *Arguments:
+\# <covertitle>
+\# *Function:
+\# Stores cover title in string(s) for output on cover pages.
+\#
+.MAC COVERTITLE END
+. rm DOC_
+. if '\\$0'DOC_COVERTITLE' \
+. ds DOC_ DOC_
+. nr #FROM_\\*[DOC_]COVERTITLE 1
+. ie \\n[#NUM_ARGS]=0 \{\
+. nr argc 0 1
+. while \\n+[argc]<=3 \{\
+. if \\n[#\\*[DOC_]COVER_TITLE_NUM] \{\
+. nr #ITEM 0 1
+. while \\n[#\\*[DOC_]COVERTITLE_NUM]>\\n[#ITEM] \{\
+. rm $\\*[DOC_]COVERTITLE_\\n+[#ITEM]
+. \}
+. rr #\\*[DOC_]COVERTITLE_NUM
+. rm $\\*[DOC_]COVERTITLE
+. \}
+. \}
+. \}
+. el \{\
+. nr #\\*[DOC_]COVERTITLE_NUM 0 1
+. while \\n[#NUM_ARGS]>\\n[#\\*[DOC_]COVERTITLE_NUM] \{\
+. ds \
+$\\*[DOC_]COVERTITLE_\\n+[#\\*[DOC_]COVERTITLE_NUM] \\$\\n[#\\*[DOC_]COVERTITLE_NUM]
+. nr #\\*[DOC_]COVERTITLE_NUM \\n[#\\*[DOC_]COVERTITLE_NUM]
+. \}
+. ds $\\*[DOC_]COVERTITLE \\$*
+. \}
+.END
+\#
+.MAC COVER_ATTRIBUTE_STRING END
+. if '\\$0'DOC_COVER_ATTRIBUTE_STRING' \
+. ds DOC_ DOC_
+. ds $\\*[DOC_]COVER_ATTRIBUTE_STRING \\$1
+. rm DOC_
+.END
+.
+.ALIAS DOC_COVER_ATTRIBUTE_STRING COVER_ATTRIBUTE_STRING
+\#
+\# COVER TEXT
+\# ----------
+\# *Arguments:
+\# [ START <vertical pos> ] | <anything>
+\# *Function:
+\# With no arg, begins a diversion holding the cover text for
+\# output on the cover page. With START <pos>, sets a vertical
+\# starting position relative to the top edge of the page. With
+\# any other arg, ends the diversion.
+\# *Notes:
+\# Aliased as DOC_COVERTEXT.
+\#
+\# If no other items assigned to cover pages, starts 1/3 of the
+\# way down the cover page unless START pos is given, otherwise
+\# starts underneath the last of title, subtitle, author(s) or
+\# doctype, preceded by a blank line.
+\#
+\# Does not persist.
+\#
+.MAC COVERTEXT END
+. rm DOC_
+. if '\\$0'DOC_COVERTEXT' .ds DOC_ DOC_
+. if '\\$1'START' \{\
+. shift
+. nr #\\*[DOC_]COVERTEXT_START_POS (u;\\$1)
+. shift
+. \}
+. ie '\\$1'' \{\
+. nr #COVERTEXT_PP 1
+. di \\*[DOC_]COVER_TEXT
+. ev COVER_TEXT
+. evc 0
+\!. if \\\\n[#\\*[DOC_]COVERTEXT_ONLY] \
+. sp |\\\\n[#T_MARGIN]u-\\\\n[#DOC_LEAD]u
+\!. ie !\\n[#\\*[DOC_]COVERTEXT_START_POS] \{\
+\!. sp |\\n[.p]u/3u-1v
+\!. \}
+\!. el \{\
+\!. vs 0
+\!. sp |0i
+\!. vs \\\\n[#DOC_LEAD]u+\\\\*[$\\*[DOC_]COVER_LEAD_ADJ]
+\!. sp |\\n[#\\*[DOC_]COVERTEXT_START_POS]u-1
+\!. \}
+\!. vpt
+. \}
+. el \{\
+. br
+\!. vpt 0
+. ev
+. di
+. rm $FONT
+. rr #COVERTEXT_PP
+. IQ CLEAR
+. \}
+. rm DOC_
+.END
+.
+.ALIAS DOC_COVERTEXT COVERTEXT
+\#
+\# COVER IMAGE
+\# -----------
+\#*Arguments:
+\# <image file> <width> <height> [ -L|-C|-R|-I <ind> Y-pos [ X-pos ] ]
+\#*Function:
+\# Places an image on doccovers and covers.
+\#*Notes:
+\# Aliased as DOC_COVER_IMAGE.
+\#
+\# <width> and <height> are required. With no further args, images
+\# are set at 0,0 by default so that full page images fill the entire
+\# printer sheet.
+\#
+\# Positioning args are the same as PDF_IMAGE. -L, -R, -C and -I <ind>
+\# observe the left and right margins.
+\#
+\# Y-pos is required for all but full page images; without it, images
+\# are flush with the top of the page. X-pos is only needed if the
+\# user prefers to give absolute X,Y positioning.
+\#
+\# Note that Y-pos comes before X-pos in the args.
+\#
+.MAC COVER_IMAGE END
+. if '\\$0'DOC_COVER_IMAGE' .ds DOC_ DOC_
+. ds \\*[DOC_]COVER_IMG_FILE \\$1
+. nr \\*[DOC_]COVER_IMG_W (z;\\$2)
+. nr \\*[DOC_]COVER_IMG_H (z;\\$3)
+. if !'\\$4'' \{\
+. ie !\B'\\$4' \{\
+. if '\\$4'-L' .nr \\*[DOC_]COVER_IMG_IND \
+ \\n[#L_MARGIN]u
+. if '\\$4'-C' .nr \\*[DOC_]COVER_IMG_IND \
+ \\n[#PAGE_WIDTH]u-\\n[\\*[DOC_]COVER_IMG_W]u/2
+. if '\\$4'-R' .nr \\*[DOC_]COVER_IMG_IND \
+ \\n[#L_MARGIN]+\\n[.l]u-\\n[\\*[DOC_]COVER_IMG_W]u
+. if '\\$4'-I' \{\
+. nr \\*[DOC_]COVER_IMG_IND \\n[#L_MARGIN]+\\$5
+. if !'\\$6'' .nr \\*[DOC_]COVER_IMG_Y (u;\\$6)
+. shift \\n[#NUM_ARGS]
+. \}
+. if \B'\\$5' .nr \\*[DOC_]COVER_IMG_Y (u;\\$5)
+. \}
+. el \{\
+. nr \\*[DOC_]COVER_IMG_Y (u;\\$4)
+. if \B'\\$5' .nr \\*[DOC_]COVER_IMG_X (u;\\$5)
+. \}
+. \}
+. rm DOC_
+.END
+.
+.ALIAS DOC_COVER_IMAGE COVER_IMAGE
+\#
+.MAC DO_COVER_IMAGE END
+. ll \\n[#PAGE_WIDTH]u
+. po 0
+. vs 0
+. sp |0i
+. if \\n[\\*[DOC_]COVER_IMG_Y] .sp \\n[\\*[DOC_]COVER_IMG_Y]u
+. if \\n[\\*[DOC_]COVER_IMG_X] .in \\n[\\*[DOC_]COVER_IMG_X]u
+. if \\n[\\*[DOC_]COVER_IMG_IND] .in \\n[\\*[DOC_]COVER_IMG_IND]u
+. if \\n[.u]=1 .nf
+. nop \X'pdf: pdfpic \\*[\\*[DOC_]COVER_IMG_FILE] -L \
+\\n[\\*[DOC_]COVER_IMG_W]z \\n[\\*[DOC_]COVER_IMG_H]z'
+. in
+. vs
+. po
+. ll
+.END
+.
+.ALIAS DO_DOC_COVER_IMAGE DO_COVER_IMAGE
+\#
+\# COVER PAGE LEADING
+\# ------------------
+\# *Arguments:
+\# <+|- amount by which to in/decrease leading of cover/doc cover>
+\# *Function:
+\# Stores user supplied lead in/decrease in string $COVER_LEAD_ADJ
+\# or $DOC_COVER_LEAD_ADJ, depending on whether the macro was called
+\# with an alias (DOC_COVER_LEAD).
+\# *Notes:
+\# A unit of measure must be supplied. Decimal fractions OK.
+\# Default is +0, i.e. same as DOC_LEAD.
+\#
+.MAC COVER_LEAD END
+. ie '\\$0'DOC_COVER_LEAD' .ds $DOC_COVER_LEAD_ADJ \\$1
+. el .ds $COVER_LEAD_ADJ \\$1
+.END
+\#
+\# MISC_AUTOLEAD functionality has been removed. Leading for MISCs
+\# is now entered as an absolute value. The macro emits a warning.
+\#
+.MAC MISC_AUTOLEAD END
+. ds replacement \\$0
+. substring replacement 0 -9
+. ds replacement \\*[replacement]LEAD
+. ds cover-type \\$0
+. substring cover-type 0 2
+. ie '\\*[cover-type]'COV' .ds cover-type cover
+. el .ds cover-type doc-cover
+. tm1 "[mom]: \\$0 at line \\n[.c] of '\\n[.F]' is no longer valid.
+. tm1 " Leading of \\*[cover-type] MISC items is now set with \\*[replacement], which
+. tm1 " takes an absolute leading value. Please update your document.
+. ab [mom]: Aborting.
+.END
+.
+.ALIAS DOC_COVER_MISC_AUTOLEAD MISC_AUTOLEAD
+.ALIAS COVER_MISC_AUTOLEAD MISC_AUTOLEAD
+\#
+\# COVER PAGE START POSITION
+\# -------------------------
+\# *Arguments:
+\# <distance from page top at which to start cover/doc cover>
+\# *Function:
+\# Stores user supplied lead in/decrease in #COVER_START_POS
+\# or #DOC_COVER_START_POS, depending on whether the macro was
+\# called by an alias (DOC_COVER_ADVANCE).
+\# *Notes:
+\# A unit of measure must be supplied. Decimal fractions OK.
+\# If user doesn't invoke this macro, the default starting
+\# position for both covers and doc covers is 1/3 of the way
+\# down the page (setup in DO_COVER).
+\#
+.MAC COVER_ADVANCE END
+. ds COVER_TYPE \\$0
+. substring COVER_TYPE 0 2
+. ie 'COVER_TYPE'DOC' .nr #DOC_COVER_START_POS (\\$1)
+. el .nr #COVER_START_POS (\\$1)
+.END
+.
+.ALIAS DOC_COVER_ADVANCE COVER_ADVANCE
+.ALIAS DOC_COVER_START_POS COVER_ADVANCE
+.ALIAS COVER_ADVANCE COVER_ADVANCE
+.ALIAS COVER_START_POS COVER_ADVANCE
+\#
+\# COVERS - WHETHER TO PRINT
+\# -------------------------
+\# *Arguments:
+\# <none> | <anything>
+\# *Function:
+\# Creates or removes registers #COVERS and #COVERS_OFF, checked for
+\# in DEFAULTS (in START) prior to printing
+\#
+.MAC COVERS END
+. ie '\\$0'DOC_COVERS' \{\
+. ie '\\$1'' \{\
+. rr #DOC_COVERS_OFF
+. nr #DOC_COVERS 1
+. \}
+. el \{\
+. rr #DOC_COVERS
+. nr #DOC_COVERS_OFF 1
+. \}
+. \}
+. el \{\
+. ie '\\$1'' \{\
+. rr #COVERS_OFF
+. nr #COVERS 1
+. \}
+. el \{\
+. rr #COVERS
+. nr #COVERS_OFF 1
+. \}
+. \}
+.END
+\#
+\# COVER_COUNTS_PAGES
+\# ------------------
+\# *Arguments:
+\# <none> | <anything>
+\# *Function:
+\# Creates or removes registers #COVERS_COUNT or #DOCCOVERS_COUNT,
+\# used in END_COVER to determine whether to increment the page
+\# number silently when doc covers or covers are output.
+\#
+.MAC COVER_COUNTS_PAGES END
+. if '\\$0'DOC_COVER_COUNTS_PAGES' \{\
+. ie '\\$1'' .nr #DOCCOVERS_COUNT 1
+. el .rr #DOCCOVERS_COUNT
+. return
+. \}
+. if '\\$0'COVER_COUNTS_PAGES' \{\
+. ie '\\$1'' .nr #COVERS_COUNT 1
+. el .rr #COVERS_COUNT
+. return
+. \}
+.END
+\#
+.MAC DO_COVER END
+. nr #DOING_COVER 1
+. ev COVER
+. evc 0
+. vpt 0
+. if \\n[#PAGINATE]=1 \{\
+. nr #PAGINATION_WAS_ON 1
+. rr #PAGINATE
+. \}
+. if \\n[#HEADERS_ON]=1 \{\
+. nr #HEADERS_WERE_ON 1
+. HEADERS OFF
+. \}
+. if \\n[#FOOTERS_ON]=1 \{\
+. nr #FOOTERS_WERE_ON 1
+. FOOTERS OFF
+. \}
+. if \\n[#COLUMNS]=1 \{\
+. nr #COLUMNS_WERE_ON 1
+. rr #COLUMNS
+. \}
+. ds PDF_BM
+. ie '\\$0'DO_DOC_COVER' \{\
+. ds DOC_ DOC_
+. nr #DOC_COVER_DONE 1
+. if '\\*[$PDF_DOC_COVER_LABEL]'' \
+. ds $PDF_DOC_COVER_LABEL Cover:
+. \}
+. el \
+. if '\\*[$PDF_COVER_LABEL]'' \
+. ds $PDF_COVER_LABEL Title Page:
+. ds $COVER_TYPE \\*[DOC_]COVER_
+. if !r#\\*[DOC_]COVER_START_POS \
+. nr #\\*[DOC_]COVER_START_POS \\n[#PAGE_LENGTH]/3
+. if \\n[#PRINT_STYLE]=1 \
+. if !\\n[#SINGLE_SPACE]=1 .vs \\n[#DOC_LEAD]u/2u
+. if \\n[#PRINT_STYLE]=2 \{\
+. vs \\n[#DOC_LEAD]u\\*[$\\*[DOC_]COVER_LEAD_ADJ]
+. nr #\\*[DOC_]COVER_LEAD \\n[.v]
+. \}
+. if \\n[.ns] .rs
+. if '\\$0'DO_COVER' \{\
+. if \\n[TOC.RELOCATE]==5 \
+. if !rTOC_BH .TOC_BEFORE_HERE
+. \}
+. if '\\$0'DO_DOC_COVER' \{\
+. if \\n[TOC.RELOCATE]==3 \
+. if !rTOC_BH .TOC_BEFORE_HERE
+. \}
+. RV_HARD_SET_MARGINS
+.\" Cover image
+. if \\n[#\\*[DOC_]COVER_IMAGE]=1 \{\
+. DO_\\*[DOC_]COVER_IMAGE
+. rr #\\*[DOC_]COVER_IMAGE
+. \}
+.\" Start cover
+. sp |\\n[#\\*[DOC_]COVER_START_POS]u-1v
+. if !\\n[#PRINT_STYLE]=1 \
+. if \\n[#\\*[DOC_]COVER_COLOR]=1 \
+. COLOR \\*[$\\*[DOC_]COVER_COLOR]
+. \\*[DOC_]COVER_H_POS
+. if (\\n[#\\*[DOC_]COVER_TITLE]=1):(\\n[#\\*[DOC_]COVER_TITLE]=2) .ds DOC DOC
+. fam \\*[$\\*[DOC_]COVER_\\*[DOC]TITLE_FAM]
+. ft \\*[$\\*[DOC_]COVER_\\*[DOC]TITLE_FT]
+. ps \\*[$\\*[DOC_]COVER_\\*[DOC]TITLE_SIZE_CHANGE]
+. ie \\n[#PRINT_STYLE]=1 .TYPEWRITER
+. el .vs \\n[#\\*[DOC_]COVER_LEAD]u
+. nr PDFHREF.VIEW.LEADING \\n[PDFHREF.VIEW.LEADING.C]
+.\" Title and/or doctitle
+. if (\\n[#\\*[DOC_]COVER_TITLE]=1):(\\n[#\\*[DOC_]COVER_TITLE]=2) \{\
+. ie \\n[#PRINT_STYLE]=1 \{\
+. vs \\n[.v]u*2u
+. sp -1.5
+. CAPS
+. nr #ARG_NUM 0 1
+. while \\n[#TITLE_NUM]>=\\n+[#ARG_NUM] \{\
+. UNDERSCORE "\\*[$TITLE_\\n[#ARG_NUM]]"
+. if \\n[#ARG_NUM]>1 .as PDF_BM " \"
+. as PDF_BM \\*[$TITLE_\\n[#ARG_NUM]]
+. \}
+. CAPS OFF
+. vs
+. \}
+. el \{\
+. DO_TITLE
+. rm $PRFX
+. \}
+. PDF_BOOKMARK 1 \\*[$PDF_\\*[DOC_]COVER_LABEL] \\*[PDF_BM]
+. \}
+.\" Chapter
+. if \\n[#\\*[DOC_]COVER_TITLE]=3 \{\
+. ie \\n[#PRINT_STYLE]=1 \{\
+. CAPS
+. UNDERSCORE "\\*[$CHAPTER_STRING] \\*[$CHAPTER]
+. CAPS OFF
+. \}
+. el .DO_CHAPTER
+. PDF_BOOKMARK 1 \
+\\*[$PDF_\\*[DOC_]COVER_LABEL] \\*[$CHAPTER_STRING] \\*[$CHAPTER]
+. if \\n[#\\*[DOC_]COVER_CHAPTER_CAPS]=1 .CAPS off
+. \}
+.\" Chapter title
+. if \\n[#\\*[DOC_]COVER_TITLE]=4 \{\
+. ie \\n[#PRINT_STYLE]=1 \{\
+. CAPS
+. nr #ARG_NUM 0 1
+. vs \\n[.v]u*2u
+. sp -1.5
+. while \\n[#CHAPTER_TITLE_NUM]>=\\n[#ARG_NUM] \{\
+. UNDERSCORE "\\*[$CHAPTER_TITLE_\\n+[#ARG_NUM]]"
+. if \\n[#ARG_NUM]>1 .as PDF_BM " \"
+. as PDF_BM \\*[$CHAPTER_TITLE_\\n[#ARG_NUM]]
+. \}
+. CAPS OFF
+. vs
+. \}
+. el \{\
+. ds $PRFX CHAPTER_
+. DO_TITLE
+. rm $PRFX
+. \}
+. PDF_BOOKMARK 1 \\*[$PDF_\\*[DOC_]COVER_LABEL] \\*[PDF_BM]
+. \}
+.\" Chapter + chapter title
+. if \\n[#\\*[DOC_]COVER_TITLE]=5 \{\
+. ie \\n[#PRINT_STYLE]=1 \{\
+. CAPS
+. UNDERSCORE "\\*[$CHAPTER_STRING] \\*[$CHAPTER]
+. CAPS OFF
+. \}
+. el .DO_CHAPTER
+. if !'\\*[$CHAPTER_TITLE_1]'' \{\
+. ie \\n[#PRINT_STYLE]=1 \{\
+. ie \\n[#SINGLE_SPACE]=0 .vs \\n[#DOC_LEAD]u/2u
+. el .vs \\n[#DOC_LEAD]u
+. sp
+. nr #ARG_NUM 0 1
+. while \\n[#CHAPTER_TITLE_NUM]>=\\n+[#ARG_NUM] \{\
+. PRINT "\\*[$CHAPTER_TITLE_\\n[#ARG_NUM]]"
+. if \\n[#ARG_NUM]>1 .as PDF_BM " \"
+. as PDF_BM \\*[$CHAPTER_TITLE_\\n[#ARG_NUM]]
+. \}
+. if \\n[#SINGLE_SPACE]=0 .vs \\n[#DOC_LEAD]u
+. \}
+. el \{\
+. ds $PRFX CHAPTER_
+. if \\n[#PRINT_STYLE]=2 .nr #CHAPTER+TITLE 1
+. if !'\\*[$\\*[DOC_]COVER_CHAPTER_TITLE_SPACER]'' \
+. sp \\*[$\\*[DOC_]COVER_CHAPTER_TITLE_SPACER]
+. DO_TITLE
+. rr #CHAPTER+TITLE
+. rm $PRFX
+. \}
+. \}
+. PDF_BOOKMARK 1 \\*[$PDF_\\*[DOC_]COVER_LABEL] \\*[PDF_BM]
+. \}
+.\" (Doc)covertitle
+.\" Titles to (doc)covers that are entered with
+.\" .TITLE DOC_COVER title
+.\" and included in (DOC)COVER with TITLE get treated as
+.\" (DOC_)COVERTITLEs, so we define the appropriate strings and
+.\" registers from their (DOC_)COVER_TITLE equivalents.
+.\"
+. if (\\n[#\\*[DOC_]COVER_TITLE]=6):(\\n[#\\*[DOC_]COVER_TITLE]=7) \{\
+. ds $\\*[DOC_]COVER_\\*[DOC_]COVERTITLE_FAM \
+\\*[$\\*[DOC_]COVER_TITLE_FAM]
+. ds $\\*[DOC_]COVER_\\*[DOC_]COVERTITLE_FT \
+\\*[$\\*[DOC_]COVER_TITLE_FT]
+. ds $\\*[DOC_]COVER_\\*[DOC_]COVERTITLE_COLOR \
+\\*[$\\*[DOC_]COVER_TITLE_COLOR]
+. nr #\\*[DOC_]COVER_\\*[DOC_]COVERTITLE_COLOR \
+\\n[#\\*[DOC_]COVER_TITLE_COLOR]
+. nr #\\*[DOC_]COVER_\\*[DOC_]COVERTITLE_CAPS \
+\\n[#\\*[DOC_]COVER_TITLE_CAPS]
+. nr #\\*[DOC_]COVER_\\*[DOC_]COVERTITLE_SMALLCAPS \
+\\n[#\\*[DOC_]COVER_TITLE_SMALLCAPS]
+. ds $\\*[DOC_]COVER_\\*[DOC_]COVERTITLE_LEAD \
+\\*[$\\*[DOC_]COVER_TITLE_LEAD]
+. ds $\\*[DOC_]COVER_\\*[DOC_]COVERTITLE_SIZE_CHANGE \
+\\*[$\\*[DOC_]COVER_TITLE_SIZE_CHANGE]
+. nr #\\*[DOC_]COVER_\\*[DOC_]COVERTITLE_UNDERLINE \
+\\n[#\\*[DOC_]COVER_TITLE_UNDERLINE]
+. nr #\\*[DOC_]COVER_\\*[DOC_]COVERTITLE_UNDERLINE_WEIGHT \
+\\n[#\\*[DOC_]COVER_TITLE_UNDERLINE_WEIGHT]
+. nr #\\*[DOC_]COVER_\\*[DOC_]COVERTITLE_UNDERLINE_WEIGHT_ADJ \
+\\n[#\\*[DOC_]COVER_TITLE_UNDERLINE_WEIGHT_ADJ]
+. ds $\\*[DOC_]COVER_\\*[DOC_]COVERTITLE_UNDERLINE_GAP \
+\\*[$\\*[DOC_]COVER_TITLE_UNDERLINE_GAP]
+. ds $\\*[DOC_]COVER_\\*[DOC_]COVERTITLE_RULE_GAP \
+\\*[$\\*[DOC_]COVER_TITLE_RULE_GAP]
+. ie \\n[#PRINT_STYLE]=1 \{\
+. CAPS
+. vs \\n[.v]u*2u
+. nr #ARG_NUM 0 1
+. while \\n[#\\*[DOC_]COVERTITLE_NUM]>=\\n+[#ARG_NUM] \{\
+. UNDERSCORE "\\*[$\\*[DOC_]COVERTITLE_\\n[#ARG_NUM]]"
+. if \\n[#ARG_NUM]>1 .as PDF_BM " \"
+. as PDF_BM \\*[$\\*[DOC_]COVERTITLE_\\n[#ARG_NUM]]
+. \}
+. vs
+. CAPS OFF
+. \}
+. el \{\
+. ds $PRFX \\*[DOC_]COVER
+. DO_TITLE
+. rm $PRFX
+. \}
+. PDF_BOOKMARK 1 \\*[$PDF_\\*[DOC_]COVER_LABEL] \\*[PDF_BM]
+. \}
+. ie !'\\*[DOC_]'' \{\
+. if !\\n[#DOC_COVER_TITLE] \
+. if '\\*[$PDF_\\*[DOC_]COVER_LABEL]'' \
+. PDF_BOOKMARK 1 Cover page
+. \}
+. el \{\
+. if !\\n[#COVER_TITLE] \
+. if '\\*[$PDF_\\*[DOC_]COVER_LABEL]'' \
+. PDF_BOOKMARK 1 Title page
+. \}
+. rr #\\*[DOC_]COVER_TITLE
+.\" Subtitle
+. if \\n[#\\*[DOC_]COVER_SUBTITLE]=1 \{\
+. ie \\n[#PRINT_STYLE]=1 \{\
+. if !'\\*[$\\*[DOC_]COVER_SUBTITLE_1]'' \
+. ds $PRFX \\*[DOC_]COVER_
+. sp 2
+. nr #ARG_NUM 0 1
+. while \\n[#\\*[$PRFX]SUBTITLE_NUM]>=\\n+[#ARG_NUM] \{\
+. PRINT "\\*[$\\*[$PRFX]SUBTITLE_\\n[#ARG_NUM]]"
+. \}
+. rm $PRFX
+. \}
+. el \{\
+. ie !'\\*[$\\*[DOC_]COVER_SUBTITLE_1]'' .ds $PRFX \\*[DOC_]COVER_SUB
+. el .ds $PRFX SUB
+. if !'\\*[$\\*[DOC_]COVER_SUBTITLE_SPACER]'' \
+. sp \\*[$\\*[DOC_]COVER_SUBTITLE_SPACER]
+. DO_SUBTITLE
+. rm $PRFX
+. \}
+. \}
+. if \\n[#PRINT_STYLE]=1 \
+. if !r#\\*[DOC_]COVER_SUBTITLE .sp
+.\" Author (plus attribution)
+. if \\n[#\\*[DOC_]COVER_AUTHOR]=1 \{\
+. ie \\n[#PRINT_STYLE]=1 \
+. sp
+. el \{\
+. ie !'\\*[$\\*[DOC_]COVER_AUTHOR_LEAD]'' \
+. vs \\*[$\\*[DOC_]COVER_AUTHOR_LEAD]
+. el .vs \\n[#\\*[DOC_]COVER_LEAD]u
+. \}
+. if '\\*[$\\*[DOC_]COVER_ATTRIBUTE_STRING]'' \
+. ds $\\*[DOC_]COVER_ATTRIBUTE_STRING \
+ \\*[$ATTRIBUTE_STRING]
+. ie !\\n[#PRINT_STYLE]=1 \{\
+. fam \\*[$\\*[DOC_]COVER_ATTRIBUTE_FAM]
+. ft \\*[$\\*[DOC_]COVER_ATTRIBUTE_FT]
+. ps \
+\\n[#DOC_PT_SIZE]u\\*[$\\*[DOC_]COVER_ATTRIBUTE_SIZE_CHANGE]
+. if \\n[#\\*[DOC_]COVER_ATTRIBUTE_COLOR]=1 \
+. COLOR \\*[$\\*[DOC_]COVER_ATTRIBUTE_COLOR]
+. if \\n[#\\*[DOC_]COVER_ATTRIBUTE_CAPS]=1 .CAPS
+. if \\n[#\\*[DOC_]COVER_ATTRIBUTE_SMALLCAPS]=1 .SMALLCAPS
+. if !'\\*[$\\*[DOC_]COVER_ATTRIBUTE_SPACER]'' \
+. sp \\*[$\\*[DOC_]COVER_ATTRIBUTE_SPACER]
+. ie \\n[#\\*[DOC_]COVER_ATTRIBUTE_UNDERLINE] \{\
+. ds $TITLE_TYPE \\*[DOC_]COVER_ATTRIBUTE
+. ie \\n[#\\*[DOC_]COVER_ATTRIBUTE_UNDERLINE]=2 \
+. UNDERSCORE2 \\*[$\\*[DOC_]COVER_ATTRIBUTE_UNDERLINE_GAP] \
+\\*[$\\*[DOC_]COVER_ATTRIBUTE_RULE_GAP] "\\*[$\\*[DOC_]COVER_ATTRIBUTE_STRING]"
+. el .UNDERSCORE \\*[$\\*[DOC_]COVER_ATTRIBUTE_STRING]
+. \}
+. el .PRINT "\\*[$\\*[DOC_]COVER_ATTRIBUTE_STRING]"
+. SMALLCAPS off
+. CAPS off
+. if \\n[#\\*[DOC_]COVER_ATTRIBUTE_COLOR]=1 \
+. gcolor
+. \}
+. el \
+. PRINT "\\*[$\\*[DOC_]COVER_ATTRIBUTE_STRING]"
+. ie \\n[#PRINT_STYLE]=1 .sp
+. el \{\
+. if !'\\*[$\\*[DOC_]COVER_AUTHOR_SPACER]'' \
+. sp \\*[$\\*[DOC_]COVER_AUTHOR_SPACER]
+. \}
+. if '\\$0'DO_COVER' \
+. ds $PRFX COVER_
+. if '\\$0'DO_DOC_COVER' \
+. ds $PRFX DOC_COVER_
+. DO_AUTHORS
+. rm $PRFX
+. \}
+.\" Named doctype string
+. if \\n[#DOC_TYPE]=3 \{\
+. if \\n[#\\*[DOC_]COVER_DOCTYPE]=1 \{\
+. ie \\n[#PRINT_STYLE]=1 \{\
+. TYPEWRITER
+. sp 1.5
+. UNDERSCORE2 3p 2p "\\*[$DOC_TYPE]
+. \}
+. el \{\
+. fam \\*[$\\*[DOC_]COVER_DOCTYPE_FAM]
+. ft \\*[$\\*[DOC_]COVER_DOCTYPE_FT]
+. ps \
+\\n[#DOC_PT_SIZE]u\\*[$\\*[DOC_]COVER_DOCTYPE_SIZE_CHANGE]
+. if \\n[#\\*[DOC_]COVER_DOCTYPE_COLOR]=1 \
+. COLOR \\*[$\\*[DOC_]COVER_DOCTYPE_COLOR]
+. sp
+. if \\n[#\\*[DOC_]COVER_DOCTYPE_CAPS]=1 .CAPS
+. if \\n[#\\*[DOC_]COVER_DOCTYPE_SMALLCAPS]=1 .SMALLCAPS
+. if !'\\*[$\\*[DOC_]COVER_DOCTYPE_SPACER]'' \
+. sp \\*[$\\*[DOC_]COVER_DOCTYPE_SPACER]
+. ie \\n[#\\*[DOC_]COVER_DOCTYPE_UNDERLINE] \{\
+. ds $TITLE_TYPE \\*[DOC_]COVER_DOCTYPE
+. ie \\n[#\\*[DOC_]COVER_DOCTYPE_UNDERLINE]=2 \
+. UNDERSCORE2 \\*[$\\*[DOC_]COVER_DOCTYPE_UNDERLINE_GAP] \
+\\*[$\\*[DOC_]COVER_DOCTYPE_RULE_GAP] "\\*[$DOC_TYPE]"
+. el .UNDERSCORE "\\*[$DOC_TYPE]"
+. \}
+. el .PRINT "\\*[$DOC_TYPE]"
+. SMALLCAPS off
+. CAPS off
+. if \\n[#\\*[DOC_]COVER_DOCTYPE_COLOR]=1 \
+. gcolor
+. \}
+. \}
+. \}
+.\" Covertext
+. if \\n[#\\*[DOC_]COVERTEXT]=1 \{\
+. nr #DOING_COVERTEXT 1
+. if !\\n[#\\*[DOC_]COVERTEXT_START_POS] .sp
+. if \\n[#\\*[DOC_]COVERTEXT]=1 \{\
+. ev \\*[DOC_]COVERTEXT
+. nf
+. \\*[DOC_]COVER_TEXT
+. ev
+. \}
+. if \\n[#\\*[DOC_]COVERTEXT_ONLY] \
+. PDF_BOOKMARK 1 \\*[$PDF_\\*[DOC_]COVER_LABEL] \\*[PDF_BM]
+. rr #\\*[DOC_]COVERTEXT
+. rm \\*[DOC_]COVER_TEXT
+. rr #DOING_COVERTEXT
+. rr #\\*[DOC_]COVERTEXT_START_POS
+. \}
+. sp |\\n[#VISUAL_B_MARGIN]u
+.\" Copyright
+. ie \\n[#PRINT_STYLE]=1 \
+. if !\\n[#SINGLE_SPACE] .sp
+. el \{\
+. fam \\*[$\\*[DOC_]COVER_COPYRIGHT_FAM]
+. ft \\*[$\\*[DOC_]COVER_COPYRIGHT_FT]
+. ps \\n[#DOC_PT_SIZE]u\\*[$\\*[DOC_]COVER_COPYRIGHT_SIZE_CHANGE]
+. nr #COPYRIGHT_V_POS \\n[#DOC_LEAD]-\\n[.v]
+. sp \\n[#COPYRIGHT_V_POS]u
+. rr #COPYRIGHT_V_POS
+. \}
+. if \\n[#\\*[DOC_]COVER_COPYRIGHT]=1 \{\
+. if '\\*[$\\*[DOC_]COVER_COPYRIGHT]'' \
+. ds $\\*[DOC_]COVER_COPYRIGHT \\*[$COVER_COPYRIGHT]
+. QUAD \\*[$\\*[DOC_]COVER_COPYRIGHT_QUAD]
+. if \\n[#\\*[DOC_]COVER_COPYRIGHT_COLOR]=1 \
+. COLOR \\*[$\\*[DOC_]COVER_COPYRIGHT_COLOR]
+. ie !'\\*[$COPYRIGHT_V_ADJ]'' \
+. PRINT \v'\\*[$COPYRIGHT_V_ADJ]'\\*[$\\*[DOC_]COVER_COPYRIGHT]
+. el \
+. PRINT \\*[$\\*[DOC_]COVER_COPYRIGHT]
+. if \\n[#\\*[DOC_]COVER_COPYRIGHT_COLOR]=1 \
+. gcolor
+. \}
+. sp |\\n[#VISUAL_B_MARGIN]u
+.\" Misc
+. if \\n[#\\*[DOC_]COVER_MISC]=1 \{\
+. if \\n[#PRINT_STYLE]=2 \{\
+. fam \\*[$\\*[DOC_]COVER_MISC_FAM]
+. ft \\*[$\\*[DOC_]COVER_MISC_FT]
+. ps \\n[#DOC_PT_SIZE]u\\*[$\\*[DOC_]COVER_MISC_SIZE_CHANGE]
+. vs \\*[$\\*[DOC_]COVER_MISC_LEAD]
+. if \\n[#\\*[DOC_]COVER_MISC_COLOR]=1 \
+. COLOR \\*[$\\*[DOC_]COVER_MISC_COLOR]
+. \}
+. ie !'\\*[$\\*[DOC_]COVER_MISC_1]'' \{\
+. QUAD \\*[$\\*[DOC_]COVER_MISC_QUAD]
+. da MISC_DIV
+. nr #NEXT_MISC 0 1
+. while \\n[#\\*[DOC_]COVER_MISC_LINES]>=\\n+[#NEXT_MISC] \{\
+. nop \\*[$\\*[DOC_]COVER_MISC_\\n[#NEXT_MISC]]
+. br
+. \}
+. da
+. \}
+. el \{\
+. QUAD \\*[$MISC_QUAD]
+. da MISC_DIV
+. nr #NEXT_MISC 0 1
+. while \\n[#MISC_LINES]>=\\n+[#NEXT_MISC] \{\
+. nop \\*[$MISC_\\n[#NEXT_MISC]]
+. br
+. \}
+. da
+. \}
+. nr #MISC_V_ADJ \\n[#DOC_LEAD]-\\n[.v]
+. sp \\n[#MISC_V_ADJ]u
+. sp -\\n[dn]u+1
+. nf
+. MISC_DIV
+. if \\n[#MISC_COLOR]=1 .gcolor
+. if \\n[#\\*[DOC_]COVER_MISC_COLOR]=1 .gcolor
+. rm MISC_DIV
+. rr #MISC_DEPTH
+. \}
+. if \\n[TOC.RELOCATE]==1 \{\
+. if !\\n[#COVER_BLANKPAGE] \
+. if !rTOC_BH .TOC_AFTER_HERE
+. \}
+. if '\\$0'DO_COVER' \{\
+. if \\n[TOC.RELOCATE]==6 \
+. if !rTOC_BH .TOC_AFTER_HERE
+. \}
+. if '\\$0'DO_DOC_COVER' \{\
+. if \\n[TOC.RELOCATE]==4 \
+. if !rTOC_BH .TOC_AFTER_HERE
+. \}
+. END_COVER
+.END
+\#
+\# Macro to terminate (doc)cover processing
+\#
+.MAC END_COVER END
+. EOL
+. vpt
+. rr #\\*[DOC_]COVERTEXT_ONLY
+. rr #\\*[DOC_]COVER_TITLE
+. rr #\\*[DOC_]COVERTITLE
+. rr #\\*[DOC_]COVER_SUBTITLE
+. rr #\\*[DOC_]COVER_AUTHOR
+. rr #\\*[DOC_]COVER_DOCTYPE
+. rr #\\*[DOC_]COVER_COPYRIGHT
+. rr #\\*[DOC_]COVER_MISC
+. rr #\\*[DOC_]COVERTEXT
+. rr #\\*[DOC_]COVER_IMAGE
+. rr #\\*[DOC_]COVER_BLANKPAGE
+. rm $PDF_\\*[DOC_]COVER_LABEL
+. rr #\\*[DOC_]COVER
+. if '\\*[$COVER_TYPE]'DOC_COVER_' .ds DOC DOC
+. rm $COVER_TYPE
+. if \\n[#DOC_TYPE]=5 .nr #SKIP 1
+. nr #END_COVER 1
+. NEWPAGE
+. rr #NEWPAGE
+. rr #SKIP
+. if \\n[#PAGINATION_WAS_ON]=1 .nr % +1
+. ie \\n[#\\*[DOC_]COVER_BLANKPAGE]=1 \{\
+. if \\n[TOC.RELOCATE] \
+. if !\\n[#TOC_BH] .TOC_AFTER_HERE
+.\" Without the empty PDF_BOOKMARK, (doc)cover BLANKPAGE causes
+.\" the PDF outline to place the first doc or chapter before the TOC,
+.\" even though PDF output is correct.
+. PDF_BOOKMARK 1
+. nop \&
+. bp
+. rr #\\*[DOC_]COVER_BLANKPAGE
+. if !\\n[#\\*[DOC]COVERS_COUNT]=1 .nr % -2
+. rm DOC_
+. \}
+. el \
+. if !\\n[#\\*[DOC]COVERS_COUNT]=1 .nr #PAGE_NUM_ADJ -1
+. if !'\\n[.ev]'0' .ev
+. if \\n[#PAGINATION_WAS_ON] \{\
+. rr #PAGINATION_WAS_ON
+. PAGINATE
+. PAGENUMBER \\n%+\\n[#PAGE_NUM_ADJ]-1
+. \}
+. if \\n[#HEADERS_WERE_ON] \{\
+. rr #HEADERS_WERE_ON
+. HEADERS
+. \}
+. if \\n[#FOOTERS_WERE_ON] \{\
+. rr #FOOTERS_WERE_ON
+. FOOTERS
+. \}
+. if \\n[#COLUMNS_WERE_ON]=1 \{\
+. rr #COLUMNS_WERE_ON 1
+. nr #COLUMNS 1
+. \}
+. rr #DOING_COVER
+. if \\n[.ns] .nop \&
+. if \\n[#RECTO_VERSO] .nr #RV_POST_COVER 1
+. rm DOC_
+.END
+\#
+\# +++START THE DOCUMENT+++
+\#
+\# THE START MACRO
+\# ---------------
+\# *Arguments:
+\# <none>
+\# *Function:
+\# Macro to start document processing. Reads in default document
+\# style parameters and any parameters the user has changed before
+\# issuing START. Using the information gathered in the opening
+\# macros, prints appropriate title (or chapter #), subtitle,
+\# author and document type (if appropriate).
+\# *Notes:
+\# The .PRINT \& (zero-width character) is required to get the
+\# subsequent .sp request to work as advertised.
+\#
+\# The overall document line length, family, and point-size
+\# are stored in #DOC_L_LENGTH, $DOC_FAM, and #DOC_PT_SIZE for
+\# use in the HEADER and FOOTER macros.
+\#
+.MAC START END
+. nr #DOCS 1
+. if \\n[TOC.RELOCATE]==2 \
+. if !\\n[TOC_BH] .TOC_BEFORE_HERE
+. if !n .nop \X'ps: exec 0 setlinejoin'\X'ps: exec 0 setlinecap'
+. if !\\n[#PRINT_STYLE] \{\
+. PRINTSTYLE TYPEWRITE
+. PRINT \&
+. po 6P
+. ll 39P
+. ta \\n[.l]u
+. sp |1i-1v
+. CENTER
+. PRINT "You neglected to enter a PRINTSTYLE."
+. ab [mom]: PRINTSTYLE missing. Aborting '\\n[.F]'.
+. \}
+. if \\n[#LINENUMBERS]=1 \{\
+. nm
+. NUMBER_LINES OFF
+. nr #LINENUMBERS 2
+. \}
+. if \\n[#COLLATE] \{\
+. COPYSTYLE \\*[$COPY_STYLE]
+. nr #HEADERS_ON \\n[#HEADER_STATE]
+. if \\n[#PAGE_NUM_V_POS]=1 .nr #PAGINATE \\n[#PAGINATION_STATE]
+. PRINT \&
+. if !'\\*[$RESTORE_PAGENUM_STYLE]'' \{\
+. PAGENUM_STYLE \\*[$RESTORE_PAGENUM_STYLE]
+. rm $RESTORE_PAGENUM_STYLE
+. \}
+. if \\n[#PAGINATE_WAS_ON] \{\
+. PAGINATE
+. rr #PAGINATE_WAS_ON
+. \}
+. \}
+. DEFAULTS
+. nr #PAGE_TOP \\n[#T_MARGIN]u-\\n[#DOC_LEAD]u
+. rr #RESET_TRAPS
+. if !r#EN_Q_AUTOLEAD .nr #EN_Q_LEAD \\n[#EN_LEAD]
+. if !r#EN_BQ_AUTOLEAD .nr #EN_BQ_LEAD \\n[#EN_LEAD]
+.\" TOC/recto-verso stuff
+. nr @L_MARGIN \\n[#DOC_L_MARGIN]
+. nr @R_MARGIN \\n[#DOC_R_MARGIN]
+.\" Covers and doc covers
+. if \\n[#DOC_COVERS]=1 \{\
+. if \\n[#DOC_COVER]=1 .DO_DOC_COVER
+. \}
+. if \\n[#COVERS]=1 \{\
+. if \\n[#COVER]=1 .DO_COVER
+. \}
+. nr PDFHREF.VIEW.LEADING \\n[PDFHREF.VIEW.LEADING.T]
+. if !\\n[#TOC] .RV_HARD_SET_MARGINS
+. if \\n[#COLUMNS] .COLUMNS \\n[#NUM_COLS] \\n[#GUTTER]u
+. sp |\\n[#DOCHEADER_ADVANCE]u-\\n[#DOC_LEAD]u
+.\" Collect TITLE for TOC.
+. if !\\n[#TOC]=1 \{\
+. nr #TOC_ENTRY_PN \\n%+\\n[#PAGE_NUM_ADJ]
+. af #TOC_ENTRY_PN \\g[#PAGENUMBER]
+. ie \\n[#USER_SET_TITLE_ITEM] \{\
+. ds $TOC_TITLE_ITEM \\*[$USER_SET_TITLE_ITEM]
+. rr #USER_SET_TITLE_ITEM
+. rm $USER_SET_TITLE_ITEM
+. \}
+. el \{\
+. ie \\n[#DOC_TYPE]=2 \{\
+. ie '\\*[$CHAPTER_TITLE]'' \
+. ds $TOC_TITLE_ITEM \\*[$CHAPTER_STRING] \\*[$CHAPTER]
+. el \{\
+. ie '\\*[$CHAPTER]'' \
+. ds $TOC_TITLE_ITEM \\*[$CHAPTER_TITLE]
+. el \
+. ds $TOC_TITLE_ITEM \
+\\*[$CHAPTER_STRING] \\*[$CHAPTER]: \\*[$CHAPTER_TITLE]
+. \}
+. \}
+. el \
+. ds $TOC_TITLE_ITEM \\*[$TITLE]
+. \}
+. if \\n[#TOC_AUTHORS]=1 \{\
+. ie '\\*[$TOC_AUTHORS]'' \
+. as $TOC_TITLE_ITEM / \\*[$AUTHOR_1]
+. el \{\
+. as $TOC_TITLE_ITEM / \\*[$TOC_AUTHORS]
+. rm $TOC_AUTHORS
+. \}
+. \}
+. as $TOC_TITLE_ITEM \|
+. if \\n[#PREFIX_CH_NUM] \
+. ds $TOC_CH_NUM \
+ \\n[#CH_NUM].\[toc-hd-num-spacer]
+. if \\n[#TOC_PREFIX_CH_NUM] \{\
+. rn $TOC_TITLE_ITEM $TOC_TITLE_ITEM_OLD
+. ds $TOC_CH_NUM \
+ \\n[#CH_NUM].\[toc-hd-num-spacer]
+. if (\\n[#PAD_TOC_CH_NUM]=2)&(\\n[#CH_NUM]<10) \
+. ds $TOC_CH_NUM \h'\w'\0'u'\\*[$TOC_CH_NUM]
+. if \\n[#PAD_TOC_CH_NUM]=3 \{\
+. if \\n[#CH_NUM]<10 \
+. ds $TOC_CH_NUM \h'\w'\0'u*2u'\\*[$TOC_CH_NUM]
+. if (\\n[#CH_NUM]>=10)&(\\n[#CH_NUM]<100) \
+. ds $TOC_CH_NUM \h'\w'\0'u'\\*[$TOC_CH_NUM]
+. \}
+. if \\n[#PAD_TOC_CH_NUM]=4 \{\
+. if \\n[#CH_NUM]<10 \
+. ds $TOC_CH_NUM \h'\w'\0'u*3u'\\*[$TOC_CH_NUM]
+. if (\\n[#CH_NUM]>=10)&(\\n[#CH_NUM]<100) \
+. ds $TOC_CH_NUM \h'\w'\0'u*2u'\\*[$TOC_CH_NUM]
+. if (\\n[#CH_NUM]>=100)&(\\n[#CH_NUM]<1000) \
+. ds $TOC_CH_NUM \h'\w'\0'u'\\*[$TOC_CH_NUM]
+. \}
+. ds $TOC_TITLE_ITEM \\*[$TOC_CH_NUM]\\*[$TOC_TITLE_ITEM_OLD]
+. rm $TOC_TITLE_ITEM_OLD
+. \}
+. \}
+. if !'\\*[$TOC_HEADING]'' \{\
+. HEADING_TO_TOC
+. rm $TOC_HEADING
+. \}
+. if !\\n[#TOC] \{\
+. if !'\\*[$TOC_TITLE_ITEM]'' \{\
+. PDF_BOOKMARK 1 \\*[$TOC_TITLE_ITEM]
+. if !r #NO_TOC_ENTRY .TITLE_TO_TOC
+. if r #NO_TOC_ENTRY .rr #NO_TOC_ENTRY
+. \}
+. \}
+. if !\\n[#TOC] .nr #POST_TOP 1
+.\" End TITLE collection
+. if \\n[#PRINT_PAGENUM_ON_PAGE_1] \{\
+. if \\n[#PAGE_NUM_V_POS]=1 \{\
+. br
+. sp |\\n[#HEADER_MARGIN]u
+. PRINT_PAGE_NUMBER
+. \}
+. \}
+. rr #COLLATE
+. rr #PAGINATION_STATE
+.\" End collate stuff
+. if \\n[#DOC_TYPE]=5 \{\
+. rr @TOP
+. ch RR_@TOP
+. \}
+. sp |\\n[#DOCHEADER_ADVANCE]u-\\n[#DOC_LEAD]u
+. ie \\n[#DOC_HEADER]=0 \{\
+. if \\n[.ns] .rs
+. if \\n[#DOC_TYPE]=4 \
+. if !'\\n[.z]'' .di
+. nr #STORED_PP_INDENT \\n[#PP_INDENT]
+. PARA_INDENT 0
+. PP
+. PARA_INDENT \\n[#STORED_PP_INDENT]u
+. rr #STORED_PP_INDENT
+. ie r #ADVANCE_FROM_TOP \{\
+. br
+. sp |\\n[#ADVANCE_FROM_TOP]u-1v
+. if \\n[#ADJ_DOC_LEAD]=1 \
+. if !\\n[#DOCHEADER_NO_SHIM] .SHIM_1
+. \}
+. el \{\
+. br
+. sp |\\n[#T_MARGIN]u-1v
+. \}
+. if \\n[#COLUMNS] \{\
+. mk dc
+. nr #COL_NUM 0 1
+. po \\n[#COL_\\n+[#COL_NUM]_L_MARGIN]u
+. nr #L_MARGIN \\n[.o]
+. ll \\n[#COL_L_LENGTH]u
+. \}
+. nr #PP 0
+. \}
+. el \{\
+. if \\n[#AUTO_LEAD] .nr #RESTORE_AUTO_LEAD 1
+. nr #CURRENT_LEAD \\n[.v]
+. if \\n[#PRINT_STYLE]=2 .vs \\n[#DOC_LEAD]u\\*[$DOCHEADER_LEAD_ADJ]
+. nr #DOCHEADER_LEAD_DIFF \\n[#CURRENT_LEAD]-\\n[.v]
+. sp +\\n[#DOCHEADER_LEAD_DIFF]u
+. if \\n[#RESTORE_AUTO_LEAD] \{\
+. nr #AUTO_LEAD 1
+. nr #AUTOLEAD_VALUE \\n[#SAVED_AUTOLEAD_VALUE]
+. \}
+. nr #DOCHEADER_LEAD \\n[.v]
+. vpt 0
+.\" Default doctype
+. if \\n[#DOC_TYPE]=1 \{\
+. if \\n[.ns] \{\
+. rs
+. nop \&
+. sp -1
+. \}
+. ev DOCHEADER
+. evc 0
+. L_MARGIN \\n[#DOC_L_MARGIN]u
+. LL \\n[#DOC_L_LENGTH]u
+. ta \\n[.l]u
+. if \\n[#PRINT_STYLE]=1 .DEFAULT_DOCHEADER_TYPEWRITE
+. if \\n[#PRINT_STYLE]=2 .DEFAULT_DOCHEADER
+. ev
+. \}
+.\" Chapter doctype
+. if \\n[#DOC_TYPE]=2 \{\
+. if \\n[.ns] .rs
+. ev DOCHEADER
+. evc 0
+. if \\n[#DOCHEADER_COLOR]=1 \
+. COLOR \\*[$DOCHEADER_COLOR]
+. L_MARGIN \\n[#DOC_L_MARGIN]u
+. LL \\n[#DOC_L_LENGTH]u
+. ta \\n[.l]u
+. if \\n[#PRINT_STYLE]=1 .CHAPTER_DOCHEADER_TYPEWRITE
+. if \\n[#PRINT_STYLE]=2 .CHAPTER_DOCHEADER
+. ev
+. \}
+.\" Named
+. if \\n[#DOC_TYPE]=3 \{\
+. if \\n[.ns] \{\
+. rs
+. nop \&
+. sp -1
+. \}
+. ev DOCHEADER
+. evc 0
+. if \\n[#DOCHEADER_COLOR]=1 \
+. COLOR \\*[$DOCHEADER_COLOR]
+. L_MARGIN \\n[#DOC_L_MARGIN]u
+. LL \\n[#DOC_L_LENGTH]u
+. ta \\n[.l]u
+. if \\n[#PRINT_STYLE]=1 \{\
+. DEFAULT_DOCHEADER_TYPEWRITE
+. if !\\n[#NO_PRINT_DOCTYPE] \{\
+. sp
+. UNDERSCORE2 3p 2p "\\*[$DOC_TYPE]"
+. \}
+. \}
+. if \\n[#PRINT_STYLE]=2 .NAMED_DOCHEADER
+. ev
+. \}
+. if !\\n[#DOC_TYPE]=4 \{\
+. if \\n[#PRINT_STYLE]=1 .sp
+. if \\n[#PRINT_STYLE]=2 .sp \\n[#DOC_LEAD]u*2u
+. if \\n[#COLUMNS] \{\
+. nr #COL_NUM 0 1
+. nr #L_LENGTH_FOR_EPI \\n[#L_LENGTH]
+. ie \\n[#RV_POST_COVER] \{\
+. nr #COL_\\n+[#COL_NUM]_L_MARGIN \\n[#DOC_L_MARGIN]
+. po \\n[#COL_\\n[#COL_NUM]_L_MARGIN]u
+. nr #L_MARGIN \\n[.o]
+. rr #RV_POST_COVER
+. \}
+. el \{\
+. po \\n[#COL_\\n+[#COL_NUM]_L_MARGIN]u
+. nr #L_MARGIN \\n[.o]
+. \}
+. LL \\n[#COL_L_LENGTH]u
+. ta \\n[.l]u
+. \}
+. \}
+. nr #NO_PRINT_AUTHOR 1
+. nr #NO_PRINT_DOCTYPE 1
+. \}
+. vs \\n[#DOC_LEAD]u
+. if \\n[#PRINT_STYLE]=1 \
+. if \\n[#SINGLE_SPACE]=1 .sp
+. if \\n[#ADJ_DOC_LEAD]=1 \
+. if \\n[#ADVANCE_FROM_TOP]=0 \
+. if \\n[#DOC_HEADER]=1 \
+. if !\\n[#DOCHEADER_NO_SHIM] .SHIM_1
+. if \\n[#COLUMNS] .mk dc
+. FAMILY \\*[$DOC_FAM]
+. QUAD \\*[$DOC_QUAD]
+. CLEANUP_DEFAULTS
+. nr #START_FOR_FOOTERS 1
+. if !\\n[#DOC_TYPE]=4 .em TERMINATE
+. if \\n[#LINENUMBERS]=2 \{\
+. ie \\n[#PER_SECTION] .NUMBER_LINES 1
+. el .NUMBER_LINES RESUME
+. nr #LINENUMBERS 1
+. \}
+. if \\n[#RUN_ON]=1 \{\
+. if \\n[#FN_MARKER_STYLE]=1 .RUNON_WARNING
+. if \\n[#FN_MARKER_STYLE]=2 .RUNON_WARNING
+. \}
+. nr PDFHREF.VIEW.LEADING \\n[PDFHREF.VIEW.LEADING.H]
+. vpt
+. if !r flex .nr flex 1
+. nr flex-spaces 0
+.\" If one-page, don't flex.
+. if !dPDF.EXPORT \{\
+. if \\n[#FLEX_ACTIVE] \{\
+. if !\\n[#NO_FLEX] \{\
+. if d pre-toc-\\n%@\\n[#COL_NUM] \
+. nr #NO_FLEX 1
+. if d pre-list-\\n%@\\n[#COL_NUM] \
+. nr #NO_FLEX 1
+. if d page-\\n%@\\n[#COL_NUM] \
+. nr #NO_FLEX 1
+. if '\\*[last-page]'\\n%@\\n[#COL_NUM]' \
+. nr #NO_FLEX 1
+. \}
+. \}
+. \}
+. if \\n[#DOC_TYPE]=5 \{\
+. if \\n[#HDRFTR_BOTH] \
+. HEADER_RECTO \\*[$HDR_RECTO_QUAD] "\\*[$HDR_RECTO_STRING]"
+. if \\n[#SLIDE_HEADERS] .HEADER
+. if \\n[#HDRFTR_BOTH] \
+. FOOTER_RECTO \\*[$FTR_RECTO_QUAD] "\\*[$FTR_RECTO_STRING]"
+. if \\n[#SLIDE_FOOTERS] \
+. PRINT_FOOTER
+. sp |\\n[#T_MARGIN]u-\\n[#DOC_LEAD]u
+. vpt
+. \}
+.END
+\#
+.MAC RR_ADVANCE_FROM_TOP END
+. rr #ADVANCE_FROM_TOP
+. ch RR_ADVANCE_FROM_TOP
+.END
+\#
+.MAC CLEANUP_DEFAULTS END
+. nr #START 1
+. if \\n[#DOC_HEADER]=1 .nr #DOC_HEADER 2
+. rm $TOC_TITLE_ITEM
+. rr #MISC_NUM
+. rr #MISCS
+. rr #NEXT_AUTHOR
+. rr #NEXT_MISC
+. wh \\n[nl]u+1u RR_ADVANCE_FROM_TOP
+. rr #DOCHEADER_NO_SHIM
+.END
+\#
+\# ====================================================================
+\#
+\# +++MACROS TO CHANGE SOME DEFAULTS+++
+\#
+\# DOCUMENT HEADER
+\# ---------------
+\# *Argument:
+\# <none> | <anything> [distance to advance from top of page] [NO_SHIM]
+\# *Function:
+\# Turns printing of document header on or off. If a second
+\# numeric argument with units of measure is given, advances that
+\# distance from the top of the page without printing the document
+\# header.
+\# *Notes:
+\# Default is on. If the 1st argument is <anything> (which turns
+\# document headers off), the optional 2nd argument may be given
+\# (with a unit of measure).
+\#
+.MAC DOCHEADER END
+. if \\n[#NUM_ARGS]=0 .nr #DOC_HEADER 1
+. if \\n[#NUM_ARGS]=1 \{\
+. ie '\\$1'NO_SHIM' .nr #DOCHEADER_NO_SHIM 1
+. el .nr #DOC_HEADER 0
+. \}
+. if \\n[#NUM_ARGS]>1 \{\
+. nr #DOC_HEADER 0
+. if \B'\\$2' .nr #ADVANCE_FROM_TOP \\$2
+. if '\\$3'NO_SHIM' .nr #DOCHEADER_NO_SHIM 1
+. \}
+.END
+\#
+\# DOCUMENT HEADER LEADING
+\# -----------------------
+\# *Arguments:
+\# <+|- amount by which to in/decrease leading of doc header>
+\# *Function:
+\# Stores user supplied lead in/decrease in string $DOCHEADER_LEAD_ADJ.
+\# *Notes:
+\# A unit of measure must be supplied. Decimal fractions OK.
+\# Default is +0, i.e. same as DOC_LEAD.
+\#
+.MAC DOCHEADER_LEAD END
+. ds $DOCHEADER_LEAD_ADJ \\$1
+.END
+\#
+\# DOCHEADER ADVANCE
+\# -----------------
+\# *Arguments:
+\# <docheader start position>
+\# *Function:
+\# Creates register #DOCHEADER_ADVANCE, used in START.
+\# *Notes:
+\# Unit of measure required.
+\# Default is same as T_MARGIN.
+\#
+.MAC DOCHEADER_ADVANCE END
+. nr #DOCHEADER_ADVANCE \\$1
+.END
+\#
+\# DOCUMENT LEFT MARGIN
+\# --------------------
+\# *Argument:
+\# <left margin of document>
+\# *Function:
+\# Creates or modifies register #DOC_L_MARGIN.
+\# *Notes:
+\# Affects everything on the page.
+\#
+.MAC DOC_LEFT_MARGIN END
+. if !\\n[#DOCS] .DOC_MACRO_ERROR \\$0
+. br
+. nr #DOC_L_MARGIN (\\$1)
+. L_MARGIN \\n[#DOC_L_MARGIN]u
+.END
+\#
+\# DOCUMENT RIGHT MARGIN
+\# ---------------------
+\# *Argument:
+\# <right margin of document>
+\# *Function:
+\# Creates or modifies register #DOC_R_MARGIN.
+\# *Notes:
+\# Affects everything on the page.
+\#
+.MAC DOC_RIGHT_MARGIN END
+. br
+. nr #DOC_R_MARGIN (\\$1)
+. R_MARGIN \\n[#DOC_R_MARGIN]
+. nr #DOC_L_LENGTH \\n[#L_LENGTH]
+.END
+\#
+\# DOCUMENT LINE LENGTH
+\# --------------------
+\# *Argument:
+\# <line length of document>
+\# *Function:
+\# Creates or modifies register #DOC_L_LENGTH.
+\# *Notes:
+\# Affects everything on the page.
+\#
+.MAC DOC_LINE_LENGTH END
+. if !\\n[DOCS] .DOC_MACRO_ERROR \\$0
+. br
+. nr #DOC_L_LENGTH (\\$1)
+. LL \\n[#DOC_L_LENGTH]u
+. ta \\n[.l]u
+.END
+\#
+\# DOCUMENT FAMILY
+\# ---------------
+\# *Argument:
+\# <family of running text>
+\# *Function:
+\# Creates or modifies string $DOC_FAM.
+\# *Notes:
+\# Affects everything except headers and footers.
+\#
+.MAC DOC_FAMILY END
+. if !\\n[DOCS] .DOC_MACRO_ERROR \\$0
+. br
+. ds $DOC_FAM \\$1
+. ds $FAMILY \\*[$DOC_FAM]
+. AUTHOR_FAMILY \\*[$DOC_FAM]
+. BLOCKQUOTE_FAMILY \\*[$DOC_FAM]
+. DOCHEADER_FAMILY \\*[$DOC_FAM]
+. DOCTYPE_FAMILY \\*[$DOC_FAM]
+. EPIGRAPH_FAMILY \\*[$DOC_FAM]
+. FOOTNOTE_FAMILY \\*[$DOC_FAM]
+. HDRFTR_FAMILY \\*[$DOC_FAM]
+. LINENUMBER_FAMILY \\*[$DOC_FAM]
+. QUOTE_FAMILY \\*[$DOC_FAM]
+. SUBTITLE_FAMILY \\*[$DOC_FAM]
+. TITLE_FAMILY \\*[$DOC_FAM]
+.END
+\#
+\# DOCUMENT POINT SIZE
+\# -------------------
+\# *Argument:
+\# <point size of running text>
+\# *Function:
+\# Creates or modifies register #DOC_PT_SIZE.
+\# *Notes:
+\# DOC_PT_SIZE is the basis for calculating all type sizes in
+\# a document. Ignored if PRINTSTYLE TYPEWRITE.
+\#
+.ALIAS DOC_PT_SIZE PT_SIZE
+\#
+\# DOCUMENT LEAD
+\# -------------
+\# *Argument:
+\# <lead (".vs") of running text> [ADJUST]
+\# *Function:
+\# Creates or modifies register #DOC_LEAD. If the optional
+\# ADJUST argument is given, adjusts leading so that the last
+\# line of text falls exactly on #B_MARGIN.
+\# *Notes:
+\# DOC_LEAD is the basis for calculating all leading changes in
+\# a document. Default for TYPESET is 16; 24 for TYPEWRITE.
+\#
+\# Because the visible bottom or footer margin of a page depends
+\# on the overall document lead supplied by the register #DOC_LEAD,
+\# DOC_LEAD, in the body of a document, should always be associated
+\# with the start of a new page (in other words, just before or
+\# just after a manual NEWPAGE). Ignored if PRINTSTYLE TYPEWRITE.
+\#
+.MAC DOC_LEAD END
+. if \\n[#IGNORE] .return
+. if !\\n[#DOCS] .DOC_MACRO_ERROR \\$0
+. br
+. if '\\$0'DOC_LEAD' \{\
+. vs \\$1
+. rr #DOC_AUTOLEAD
+. rr #DOC_AUTOLEAD_FACTOR
+. nr #DOC_LEAD \\n[.v]
+. \}
+. nr #RESET_TRAPS 1
+. if !\\n[#ADJ_DOC_LEAD] .nr #REMOVE_ADJ 1
+. if !'\\$0'DOC_LEAD' \{\
+. if '\\$0'EN_LEAD' .nr #DOC_LEAD \\n[#EN_LEAD]
+. if '\\$0'BIB_LEAD' .nr #DOC_LEAD \\n[#BIB_LEAD]
+. if '\\$0'TOC_LEAD' .nr #DOC_LEAD \\n[#TOC_LEAD]
+. if '\\$2'ADJUST' .TRAPS
+. rr #RESET_TRAPS
+. \}
+.END
+\#
+\# ADJUST DOCUMENT LEAD
+\# --------------------
+\# *Arguments:
+\# <none> | <anything>
+\# *Function:
+\# Adjusts document lead so that the last line of text falls exactly
+\# on #B_MARGIN.
+\#
+.MAC DOC_LEAD_ADJUST END
+. ie '\\$1'' \{\
+. nr #ADJ_DOC_LEAD 1
+. rr #DOC_LEAD_ADJUST_OFF
+. \}
+. el \{\
+. nr #ADJ_DOC_LEAD 0
+. nr #DOC_LEAD_ADJUST_OFF 1
+. \}
+.END
+\#
+\# SHIM
+\# ----
+\# *Argument:
+\# None
+\# *Function:
+\# Advances to the next valid baseline.
+\# *Notes:
+\# If a user plays around with spacing in a doc (say, with ALD),
+\# it isn't easy to get mom back on track so she can achieve
+\# perfectly flush bottom margins. Any time SHIM is used, it
+\# ensures that the next output line falls on a valid baseline.
+\#
+\# First, a little convenience macro
+\#
+.MAC PROCESS_SHIM END
+. if !\\n[nl]=\\n[#VALID_BASELINE] \{\
+. while \\n+[#VALID_BASELINE]<\\n[#CURRENT_V_POS] .
+. nr #SHIM \\n[#VALID_BASELINE]-\\n[#CURRENT_V_POS]
+. \}
+.END
+\#
+\# And a macro to disable SHIM
+\#
+.MAC NO_SHIM END
+. ie '\\$1'' \{\
+. nr #NO_SHIM 1
+. nr #FLEX_ACTIVE 1
+. \}
+. el \{\
+. rr #NO_SHIM
+. rr #SHIM
+. rr #FLEX_ACTIVE
+. \}
+.END
+\#
+.nr #NO_SHIM 2 \" Restored to 1 in DEFAULTS.
+\#
+.MAC SHIM END
+. if \\n[#NO_SHIM] \
+. if !'\\$0'SHIM_1' .return
+. if !\\n[#NO_FLEX] \{\
+. if !'\\$0'SHIM_1' \{\
+. tm1 "[mom]: \
+SHIM, line \\n[.c], is incompatible with flex-spacing, which is enabled.
+. tm1 " \
+Flex-spacing must be disabled with NO_FLEX before using SHIM.
+. ab [mom]: Aborting '\\n[.F]', line \\n[.c].
+. \}
+. \}
+. nr #VALID_BASELINE \\n[#T_MARGIN]-\\n[#DOC_LEAD] \\n[#DOC_LEAD]
+. if !r#CURRENT_V_POS .nr #CURRENT_V_POS \\n[.d]
+. ie \\n[#ADVANCE_FROM_TOP] \{\
+. ie \\n[#CURRENT_V_POS]<(\\n[#T_MARGIN]-1v) \{\
+. while \\n-[#VALID_BASELINE]>\\n[#CURRENT_V_POS] .
+. nr #VALID_BASELINE +\\n[#DOC_LEAD]
+. nr #SHIM \\n[#VALID_BASELINE]-\\n[#CURRENT_V_POS]
+. \}
+. el .PROCESS_SHIM
+. \}
+. el .PROCESS_SHIM
+. nr #SHIM_MAX \\n[#DOC_LEAD]*10/15
+. if !\\n[#CALCULATE_ONLY] \{\
+. if !\\n[defer-count] \
+. if \\n[#SHIM]>\\n[#SHIM_MAX] .sp -1
+' sp \\n[#SHIM]u
+. \}
+. rr #CURRENT_V_POS
+.END
+\#
+.ALIAS SHIM_1 SHIM
+\#
+\# ====================================================================
+\#
+\# +++FLEX SPACING+++
+\#
+\# INSERT FLEX SPACE
+\# -----------------
+\# *Arguments:
+\# FORCE
+\# *Function:
+\# Inserts flexible whitespace ("flex-space").
+\# *Notes:
+\# FORCE restores flex-spacing if an .ns is preventing it.
+\# Useful in conjunction with deferred floated material that
+\# plants an .ns after outputting the last deferred float.
+\#
+.MAC FLEX END
+. if !\\n[#NO_SHIM] \{\
+. if \\n[#NO_FLEX] \{\
+. tm1 "[mom]: \
+FLEX, line \\n[.c], is incompatible with shimming, which is presently enabled.
+. tm1 " \
+Shimming must be disabled with NO_SHIM before using FLEX.
+. ab [mom]: Aborting '\\n[.F]', line \\n[.c].
+. \}
+. \}
+. if '\\$1'FORCE' \{\
+. nr flex:force 1
+. return
+. \}
+. if !\\n[#NO_FLEX] \{\
+. if !\\n[.ns] \{\
+. if !\\n[.t]<=\\n[.v] \{\
+. nr flex-spaces +1
+. if dflex-space:\\n[flex]@\\n[#COL_NUM] \{\
+. sp \\*[flex-space:\\n[flex]@\\n[#COL_NUM]]
+. \}
+. \}
+. \}
+. \}
+.END
+\#
+.MAC NO_FLEX END
+. rr flexed
+. ie '\\$1'' \{\
+. nr #NO_FLEX 1
+. if \\n[#FLEX_ACTIVE] .rr #FLEX_ACTIVE
+. \}
+. el \
+. if !\\n[#DOC_TYPE]=5 .rr #NO_FLEX
+.END
+\#
+\# CALCULATE FLEX SPACES
+\# ---------------------
+\# *Function:
+\# Derives flex-space size by dividing the space remaining before
+\# FOOTER by the number of times FLEX was used on the page/col.
+\# *Notes:
+\# .h is reliable for determining space remaining, but can't be used
+\# for columns because it can't be zeroed from one col to the
+\# next. Workaround is to use nl for columns and compensate for
+\# .br's, .sp's, and .ne's. Here be dragons.
+\#
+.MAC CALCULATE_FLEX END
+. nr flex:target-pos \\n[.p]+\\n[#VARIABLE_FOOTER_POS]-1
+. nr flex:current-pos \\n[.h]-\\n[.v]
+. if \\n[#COLUMNS] \{\
+. ie \\n[.trunc] \
+. nr flex:current-pos \\n[nl]-\\n[.v]-(\\n[.trunc]-1)
+. el .nr flex:current-pos \\n[nl]-\\n[.v]
+. if '\\n[.ev]'tbl*end' \{\
+. nr flex:current-pos \\n[nl]-(\\n[.trunc]-1)
+. if \\n[tbl*boxed] .nr flex:current-pos -.65v
+. \}
+. ie \\n[nl-from-heading] \{\
+. nr flex:current-pos \\n[nl-from-heading]-\\n[.v]
+. rr nl-from-heading
+. \}
+. el \{\
+. if !\\n[.pe] \{\
+. if \\n[nl]=(\\n[.p]+(\\n[#VARIABLE_FOOTER_POS]-1)) \
+. nr flex-spaces -1
+. \}
+. \}
+. \}
+. nr flex:space-remaining \
+ \\n[flex:target-pos]-\\n[flex:current-pos]
+. if \\n[flex-spaces] \{\
+. nr flex-space:\\n[flex]@\\n[#COL_NUM] \
+ \\n[flex:space-remaining]/\\n[flex-spaces]
+. if dPDF.EXPORT \{\
+. tm .ds flex-space:\\n[flex]@\\n[#COL_NUM] \
+ \\n[flex-space:\\n[flex]@\\n[#COL_NUM]]u
+.\" For debugging: catch edge-cases that result in negative
+.\" flex-spacing and don't apply flex to the page/column.
+. if \\n[flex-space:\\n[flex]@\\n[#COL_NUM]]<0 \{\
+. tm .ds flex-space:\\n[flex]@\\n[#COL_NUM] 0
+. tm .ds Negative flex space \\n%@\\n[#COL_NUM] (\\n[flex-space:\\n[flex]@\\n[#COL_NUM]])
+. \}
+. \}
+. \}
+.END
+\#
+\# ====================================================================
+\#
+\# +++INTERNATIONALIZATION+++
+\#
+\# ATTRIBUTE STRING
+\# ----------------
+\# *Argument:
+\# <what goes in the "by" slot before author in the document header>
+\# *Function:
+\# Creates or modifies string $ATTRIBUTE_STRING.
+\# *Notes:
+\# Default is "by". A blank string ("") may be used if no
+\# attribution is desired. Blank line results.
+\#
+.MAC ATTRIBUTE_STRING END
+. if !'\\$1'DOC_COVER' \
+. if !'\\$1'COVER' .nr #NEITHER 1
+. if !'\\$1'COVER' \
+. if !'\\$1'DOC_COVER' .nr #NEITHER 1
+. if '\\$1'DOC_COVER' \{\
+. ds $DOC_COVER_ATTRIBUTE_STRING \\$2
+. if '\\*[$DOC_COVER_ATTRIBUTE_STRING]'' \
+. ds $DOC_COVER_ATTRIBUTE_STRING \&
+. \}
+. if '\\$1'COVER' \{\
+. ds $COVER_ATTRIBUTE_STRING \\$2
+. if '\\*[$COVER_ATTRIBUTE_STRING]'' \
+. ds $COVER_ATTRIBUTE_STRING \&
+. \}
+. if \\n[#NEITHER]=1 \{\
+. ds $ATTRIBUTE_STRING \\$1
+. rr #NEITHER
+. \}
+.END
+\#
+\# CHAPTER STRING
+\# --------------
+\# *Argument:
+\# <what to print any time the word "chapter" is required>
+\# *Function:
+\# Creates or modifies string $CHAPTER_STRING.
+\# *Notes:
+\# Default is "chapter".
+\#
+.MAC CHAPTER_STRING END
+. ds $CHAPTER_STRING \\$1
+.END
+\#
+\# DRAFT STRING
+\# ------------
+\# *Argument:
+\# <what to print any time the word "draft" is required>
+\# *Function:
+\# Creates or modifies string $DRAFT_STRING.
+\# *Notes:
+\# Default is "draft".
+\#
+.MAC DRAFT_STRING END
+. ds $DRAFT_STRING \\$1
+.END
+\#
+\# REVISION STRING
+\# ---------------
+\# *Argument:
+\# <what to print any time the word "revision" is required>
+\# *Function:
+\# Creates or modifies string $REVISION_STRING.
+\# *Notes:
+\# Default is "revision".
+\#
+.MAC REVISION_STRING END
+. ds $REVISION_STRING \\$1
+.END
+\#
+\# FINIS STRING
+\# ------------
+\# *Argument:
+\# <what to print with the finis macro>
+\# *Function:
+\# Creates or modifies string $FINIS_STRING.
+\# *Notes:
+\# Default is "END".
+\#
+.MAC FINIS_STRING END
+. ds $FINIS_STRING \\$1
+.END
+\#
+\# ====================================================================
+\#
+\# +++RECTO/VERSO+++
+\#
+\# RECTO_VERSO
+\# -----------
+\# *Arguments:
+\# <none> | <anything>
+\# *Function:
+\# Switches HDRFTR_LEFT and HDRFTR_RIGHT on alternate pages. Also
+\# switches page numbers left and right if either is chosen rather
+\# than the default centered page numbers. Switches left and right
+\# margins if differing values have been entered.
+\# *Notes:
+\# Default is OFF.
+\#
+.MAC RECTO_VERSO END
+. ie '\\$1'' .nr #RECTO_VERSO 1
+. el .nr #RECTO_VERSO 0
+.END
+\#
+\# FORCE RECTO
+\# -----------
+\# *Function:
+\# Forces doccover and cover pages to recto
+\#
+.MAC FORCE_RECTO END
+. ie '\\$1'' \{\
+. nr #FORCE_RECTO 1
+. nr #DOC_COVER_BLANKPAGE 1
+. nr #COVER_BLANKPAGE 1
+. \}
+. el \{\
+. rr #FORCE_RECTO
+. rr #DOC_COVER_BLANKPAGE
+. rr #COVER_BLANKPAGE
+. \}
+.END
+\#
+.MAC RV_HARD_SET_MARGINS END
+. DOC_LEFT_MARGIN \\n[@L_MARGIN]u
+. DOC_RIGHT_MARGIN \\n[@R_MARGIN]u
+. po \\n[#DOC_L_MARGIN]u
+. LL \\n[#DOC_L_LENGTH]u
+.END
+\#
+\# ====================================================================
+\#
+\# +++EPIGRAPHS+++
+\#
+\# EPIGRAPH INDENT
+\# ---------------
+\# *Argument:
+\# <value by which to multiply PP_INDENT for block epigraphs>
+\# *Function:
+\# Creates or modifies register #EPI_OFFSET_VALUE.
+\# *Notes:
+\# Default is 2 for TYPEWRITE, 3 for TYPESET.
+\#
+.MAC EPIGRAPH_INDENT END
+. rr #EPI_OFFSET_VALUE
+. rm $EPI_OFFSET_VALUE
+. ds $EVAL_EI_ARG \\$1
+. substring $EVAL_EI_ARG -1
+. ie \B'\\*[$EVAL_EI_ARG]' .nr #EPI_OFFSET_VALUE \\$1
+. el .ds $EPI_OFFSET_VALUE \\$1
+. rm $EVAL_EI_ARG
+.END
+\#
+\# EPIGRAPH AUTOLEAD
+\# -----------------
+\# *Argument:
+\# <amount of lead to add to the epigraph ps for epigraph leading>
+\# *Function:
+\# Creates or modifies register #EPI_AUTOLEAD.
+\# *Notes:
+\# Default is 2 (for TYPESET; TYPEWRITE doesn't require this).
+\#
+.MAC EPIGRAPH_AUTOLEAD END
+. nr #EPI_AUTOLEAD (p;\\$1)
+.END
+\#
+\# EPIGRAPH
+\# --------
+\# *Arguments:
+\# BLOCK | <anything>
+\# *Function:
+\# Places an epigraph before the document's text, after the
+\# document header, or after a HEAD.
+\# *Notes:
+\# #EPIGRAPH 1 = centered; 2 = block
+\#
+\# By default, epigraphs are centered, allowing the user
+\# to input them on a line per line basis. To change this
+\# behaviour, the user can supply the argument BLOCK, which
+\# will produce indented, filled text similar to BLOCKQUOTE.
+\#
+\# If a block epigraph contains more than one para, ALL paras of
+\# the epigraph must be preceded by PP. Otherwise, PP is optional.
+\#
+.MAC EPIGRAPH END
+. nr #PP_STYLE 2
+. nr #Q_PP 0
+. if \\n[#LINENUMBERS]=1 \{\
+. NUMBER_LINES OFF
+. nr #LINENUMBERS 2
+. \}
+. if \\n[#START] \{\
+. if \\n[#PRINT_STYLE]=1 \
+. if \\n[#AUTHOR_LINES]=1 .sp \\n[#DOC_LEAD]u
+. \}
+. ie '\\$1'' \{\
+. nr #EPIGRAPH 1
+. ev EPIGRAPH
+. nr #IN_DIVER 1
+. ll \\n[#L_LENGTH]u
+. ta \\n[.l]u
+. CHECK_INDENT
+. if \\n[#COLUMNS] \{\
+. ie \\n[#START] \{\
+. ll \\n[#DOC_L_LENGTH]u
+. ta \\n[.l]u
+. \}
+. el \{\
+. ll \\n[#COL_L_LENGTH]u
+. ta \\n[.l]u
+. \}
+. \}
+. CENTER
+. if \\n[#PRINT_STYLE]=1 \{\
+. fam \\*[$TYPEWRITER_FAM]
+. ft R
+. if '\\*[$EPI_FT]'I' .FT I
+. ps \\*[$TYPEWRITER_PS]
+. ie \\n[#SINGLE_SPACE] .vs \\n[#DOC_LEAD]u
+. el .vs \\n[#DOC_LEAD]u/2u
+. nr #EPI_LEAD \\n[#LEAD]
+. nr #EPI_LEAD_DIFF \\n[#DOC_LEAD]-\\n[#EPI_LEAD]
+. \}
+. if \\n[#PRINT_STYLE]=2 \{\
+. FAMILY \\*[$EPI_FAM]
+. FT \\*[$EPI_FT]
+. ps \\n[#DOC_PT_SIZE]u\\*[$EPI_SIZE_CHANGE]
+. if \\n[#EPI_COLOR]=1 \{\
+. nf
+\m[\\*[$EPI_COLOR]]
+. EOL
+. \}
+. vs \\n[.ps]u+\\n[#EPI_AUTOLEAD]u
+. nr #EPI_LEAD \\n[#LEAD]
+. nr #EPI_LEAD_DIFF \\n[#DOC_LEAD]-\\n[#EPI_LEAD]
+. \}
+. di EPI_TEXT
+. nr #DIVERSIONS_HY_MARGIN (p;\\n[.ps]u*2.75)/1000
+. HY_SET 1 \\n[#DIVERSIONS_HY_MARGIN]u (\\n[#PT_SIZE]u/1000u/8u)p
+. hy 14
+. nr #EPI_ACTIVE 1
+. \}
+. el \{\
+. ie '\\$1'BLOCK' \{\
+. nr #EPIGRAPH 2
+. ev EPIGRAPH
+. evc 0
+. ie \\n[#START] \{\
+. ie \\n[#COLUMNS] \{\
+. ie r#EPI_OFFSET_VALUE \
+. ll \
+\\n[#L_LENGTH_FOR_EPI]u-(\\n[#PP_INDENT]u*(\\n[#EPI_OFFSET_VALUE]u*2u))
+. el \
+. ll \
+\\n[#L_LENGTH_FOR_EPI]u-(\\*[$EPI_OFFSET_VALUE]u*2u)
+. ta \\n[.l]u
+. \}
+. el \{\
+. ie r#EPI_OFFSET_VALUE \
+. ll \
+\\n[#L_LENGTH]u-(\\n[#PP_INDENT]u*(\\n[#EPI_OFFSET_VALUE]u*2u))
+. el \
+. ll \\n[#L_LENGTH]u-(\\*[$EPI_OFFSET_VALUE]*2u)
+. ta \\n[.l]u
+. \}
+. \}
+. el \{\
+. ie r#EPI_OFFSET_VALUE \
+. ll \
+\\n[#L_LENGTH]u-(\\n[#PP_INDENT]u*(\\n[#EPI_OFFSET_VALUE]u*2u))
+. el \
+. ll \\n[#L_LENGTH]u-(\\*[$EPI_OFFSET_VALUE]*2u)
+. ta \\n[.l]u
+. if \\n[#COLUMNS] \{\
+. ie r#EPI_OFFSET_VALUE \
+. ll \
+\\n[#COL_L_LENGTH]u-(\\n[#PP_INDENT]u*(\\n[#EPI_OFFSET_VALUE]u*2u))
+. el \
+. ll \\n[#COL_L_LENGTH]u-(\\*[$EPI_OFFSET_VALUE]*2u)
+. ta \\n[.l]u
+. \}
+. CHECK_INDENT
+. \}
+. if \\n[#PRINT_STYLE]=1 \{\
+. fam \\*[$TYPEWRITER_FAM]
+. ft R
+. if '\\*[$EPI_FT]'I' .FT I
+. ps \\*[$TYPEWRITER_PS]
+. ie \\n[#SINGLE_SPACE] .vs \\n[#DOC_LEAD]u
+. el .vs \\n[#DOC_LEAD]u/2u
+. QUAD LEFT
+. HY OFF
+. nr #EPI_LEAD \\n[#LEAD]
+. nr #EPI_LEAD_DIFF \\n[#DOC_LEAD]-\\n[#EPI_LEAD]
+. di EPI_TEXT
+. nr #EPI_ACTIVE 1
+. \}
+. if \\n[#PRINT_STYLE]=2 \{\
+. FAMILY \\*[$EPI_FAM]
+. FT \\*[$EPI_FT]
+. ps \\n[#DOC_PT_SIZE]u\\*[$EPI_SIZE_CHANGE]
+. if \\n[#EPI_COLOR]=1 \{\
+. nf
+\m[\\*[$EPI_COLOR]]
+. EOL
+. \}
+. vs \\n[.ps]u+\\n[#EPI_AUTOLEAD]u
+. QUAD \\*[$EPI_QUAD]
+. nr #DIVERSIONS_HY_MARGIN (p;\\n[.ps]u*2.75)/1000
+. HY_SET 1 \\n[#DIVERSIONS_HY_MARGIN]u (\\n[#PT_SIZE]u/1000u/8u)p
+. hy 14
+. nr #EPI_LEAD \\n[#LEAD]
+. nr #EPI_LEAD_DIFF \\n[#DOC_LEAD]-\\n[#EPI_LEAD]
+. di EPI_TEXT
+. nr #EPI_ACTIVE 1
+. \}
+. \}
+. el .DO_EPIGRAPH
+. \}
+.END
+\#
+\# DO EPIGRAPH
+\# -----------
+\# *Arguments:
+\# <none>
+\# *Function:
+\# Ends diversion started in EPIGRAPH. Makes spacing
+\# adjustments to compensate for the difference between epigraph
+\# leading and overall document leading, so that the bottom of
+\# the pages remain flush.
+\# *Notes:
+\# In addition to its usual place at the beginning of a
+\# document, EPIGRAPH may also be used after HEAD.
+\#
+.MAC DO_EPIGRAPH END
+. br
+. di
+. rr #IN_DIVER
+. if \\n[#RESET_FN_COUNTERS]=2 \{\
+. if !\\n[#FN_COUNT]=1 \{\
+. if ((\\n[#PAGE_LENGTH]+\\n[#VARIABLE_FOOTER_POS])+\\n[#DIVER_DEPTH])>(\\n[#PAGE_LENGTH]+\\n[#VARIABLE_FOOTER_POS]) \{\
+. DIVER_FN_2_POST
+. rr #RESET_FN_COUNTERS
+. \}
+. \}
+. \}
+. nr #SAVED_FN_NUMBER \\n[#FN_NUMBER]
+. nr #DONE_ONCE 0 1
+. REMOVE_INDENT
+. ev
+. nr #EPI_DEPTH \\n[#DIVER_DEPTH]-\\n[#EPI_LEAD]
+. nr #EPI_LINES \\n[#EPI_DEPTH]/\\n[#EPI_LEAD]
+. ie \\n[#START] \{\
+. if !\\n[#NO_SHIM] .RLD \\n[#SHIM]u
+. nr #EPI_WHITESPACE (\\n[#DOC_LEAD]*\\n[#EPI_LINES])-\\n[#EPI_DEPTH]
+. while \\n[#EPI_WHITESPACE]>\\n[#DOC_LEAD] \{\
+. nr #EPI_WHITESPACE -\\n[#DOC_LEAD]
+. \}
+. if \\n[#PRINT_STYLE]=1 \
+. if !\\n[#SINGLE_SPACE]=1 .ALD \\n[#DOC_LEAD]u
+. if \\n[#PRINT_STYLE]=2 \{\
+. ie !\\n[#DOC_TYPE]=2 .RLD \\n[#DOC_LEAD]u
+. el \{\
+. ie '\\*[$CHAPTER_TITLE]'' .RLD \\n[#DOC_LEAD]u
+. el .if '\\*[$CHAPTER]'' .RLD \\n[#DOC_LEAD]u
+. \}
+. if \\n[#EPI_WHITESPACE]<\\n[#DOC_LEAD] \
+. ALD \\n[#EPI_LEAD_DIFF]u+(\\n[#EPI_WHITESPACE]u/2u)
+. if \\n[#EPI_WHITESPACE]>\\n[#DOC_LEAD] \
+. ALD \
+\\n[#EPI_LEAD_DIFF]u+(\\n[#EPI_WHITESPACE]u/2u)-\\n[#DOC_LEAD]u
+. \}
+. \}
+. el \{\
+. ie \\n[#EPI_DEPTH]<\\n[#TRAP_DISTANCE] \{\
+. nr #EPI_FITS 1
+. nr #EPI_WHITESPACE (\\n[#DOC_LEAD]*\\n[#EPI_LINES])-\\n[#EPI_DEPTH]
+. while \\n[#EPI_WHITESPACE]>\\n[#DOC_LEAD] \{\
+. nr #EPI_WHITESPACE -\\n[#DOC_LEAD]
+. \}
+. ie \\n[#PRINT_STYLE]=1 \
+. ALD \\n[#DOC_LEAD]u/2u
+. el \{\
+. if \\n[#EPI_WHITESPACE]<\\n[#DOC_LEAD] \
+. ALD \
+\\n[#EPI_LEAD_DIFF]u+(\\n[#EPI_WHITESPACE]u/2u)
+. if \\n[#EPI_WHITESPACE]>\\n[#DOC_LEAD] \
+. ALD \
+\\n[#EPI_LEAD_DIFF]u+(\\n[#EPI_WHITESPACE]u/2u)-\\n[#DOC_LEAD]u
+. \}
+. if \\n[#DIVER_FN]=2 .rr #DIVER_FN
+. \}
+. el \{\
+. nr #EPI_LINES_TO_TRAP 0 1
+. while \\n[#EPI_LEAD]*\\n+[#EPI_LINES_TO_TRAP]<\\n[#TRAP_DISTANCE] \{\
+. nr #LOOP 1
+. \}
+. nr #EPI_LINES_TO_TRAP -1
+. nr #EPI_WHITESPACE \
+(\\n[#EPI_LINES_TO_TRAP]*\\n[#DOC_LEAD])-(\\n[#EPI_LINES_TO_TRAP]*\\n[#EPI_LEAD])
+. while \\n[#EPI_WHITESPACE]>\\n[#DOC_LEAD] \{\
+. nr #EPI_WHITESPACE -\\n[#DOC_LEAD]
+. \}
+. if \\n[#EPI_WHITESPACE]<\\n[#DOC_LEAD] \
+. ALD \\n[#EPI_WHITESPACE]u
+. if \\n[#EPI_WHITESPACE]>\\n[#DOC_LEAD] \
+. ALD \\n[#EPI_WHITESPACE]u-\\n[#DOC_LEAD]u
+. \}
+. \}
+. SET_EPI_OFFSET
+. nf
+. EPI_TEXT
+. br
+. ie \\n[#START] \{\
+. if \\n[#PRINT_STYLE]=1 .SHIM_1
+. if \\n[#PRINT_STYLE]=2 \{\
+. if \\n[#EPI_WHITESPACE]<\\n[#DOC_LEAD] \
+. ALD \\n[#EPI_WHITESPACE]u/2u
+. if \\n[#EPI_WHITESPACE]>\\n[#DOC_LEAD] \
+. ALD (\\n[#EPI_WHITESPACE]u/2u)-\\n[#DOC_LEAD]u
+. SHIM
+. \}
+. \}
+. el \{\
+. rr #EPI_ACTIVE
+. ie \\n[#EPI_FITS] \{\
+. ie \\n[#FN_FOR_EPI] \{\
+. nr #EPI_LINES_TO_END 1
+. nr #EPI_WHITESPACE \
+(\\n[#EPI_LINES_TO_END]*\\n[#DOC_LEAD])-(\\n[#EPI_LINES_TO_END]*\\n[#EPI_LEAD])
+. while \\n[#EPI_WHITESPACE]>\\n[#DOC_LEAD] \{\
+. nr #EPI_WHITESPACE -\\n[#DOC_LEAD]
+. \}
+. ALD \\n[#EPI_WHITESPACE]u-(\\n[#DOC_LEAD]u-\\n[#EPI_LEAD]u)
+. \}
+. el \{\
+. ie \\n[#PRINT_STYLE]=1 \
+. SHIM_1
+. el \{\
+. if \\n[#EPI_WHITESPACE]<\\n[#DOC_LEAD] \
+. ALD \\n[#EPI_WHITESPACE]u/2u
+. if \\n[#EPI_WHITESPACE]>\\n[#DOC_LEAD] \
+. ALD (\\n[#EPI_WHITESPACE]u/2u)-\\n[#DOC_LEAD]u
+. \}
+. \}
+. SHIM
+. \}
+. el \{\
+. nr #EPI_LINES_TO_END \\n[#EPI_LINES]-\\n[#EPI_LINES_TO_TRAP]
+. if \\n[#LOOP] .nr #EPI_LINES_TO_END +1
+. rr #LOOP
+. nr #EPI_WHITESPACE \
+(\\n[#EPI_LINES_TO_END]*\\n[#DOC_LEAD])-(\\n[#EPI_LINES_TO_END]*\\n[#EPI_LEAD])
+. while \\n[#EPI_WHITESPACE]>\\n[#DOC_LEAD] \{\
+. nr #EPI_WHITESPACE -\\n[#DOC_LEAD]
+. \}
+. ALD \\n[#EPI_WHITESPACE]u-(\\n[#DOC_LEAD]u-\\n[#EPI_LEAD]u)
+. if \\n[#PRINT_STYLE]=1 \{\
+. if !\\n[#SINGLE_SPACE] \{\
+. nr #EPI_LINES_EVEN \\n[#EPI_LINES_TO_END]%2
+. ie \\n[#EPI_LINES_EVEN] .ALD .5v
+. el .RLD .5v
+. rr #EPI_LINES_EVEN
+. \}
+. \}
+. \}
+. \}
+. nr #PP_STYLE 1
+. rr #EPI_FITS
+. ALD \\n[#DOC_LEAD]u
+. QUAD \\*[$DOC_QUAD]
+. po \\n[#L_MARGIN]u
+. if \\n[#COLUMNS] \{\
+. po \\n[#COL_\\n[#COL_NUM]_L_MARGIN]u
+. nr #L_MARGIN \\n[.o]
+. \}
+. if \\n[#START] \{\
+. if \\n[#COLUMNS] \{\
+. po \\n[#COL_\\n[#COL_NUM]_L_MARGIN]u
+. nr #L_MARGIN \\n[.o]
+. mk dc
+. \}
+. \}
+. if \\n[#LINENUMBERS]=2 \{\
+. NUMBER_LINES RESUME
+. nr #LINENUMBERS 1
+. \}
+.END
+\#
+.MAC SET_EPI_OFFSET END
+. if \\n[#EPIGRAPH]=1 \{\
+. po \\n[#L_MARGIN]u
+. if \\n[#COLUMNS] \{\
+. po \\n[#COL_\\n[#COL_NUM]_L_MARGIN]u
+. nr #L_MARGIN \\n[.o]
+. \}
+. \}
+. if \\n[#EPIGRAPH]=2 \{\
+. ie !\\n[#EPI_OFFSET_VALUE]=0 \
+. nr #EPI_OFFSET \
+\\n[#L_MARGIN]+(\\n[#PP_INDENT]*\\n[#EPI_OFFSET_VALUE])
+. el \
+. if !'\\*[$EPI_OFFSET_VALUE]'' \
+. nr #EPI_OFFSET \\n[#L_MARGIN]+\\*[$EPI_OFFSET_VALUE]
+. if \\n[#COLUMNS] \{\
+. ie !\\n[#EPI_OFFSET_VALUE]=0 \
+. nr #EPI_OFFSET \
+\\n[#COL_\\n[#COL_NUM]_L_MARGIN]+(\\n[#PP_INDENT]*\\n[#EPI_OFFSET_VALUE])
+. el \
+. if !'\\*[$EPI_OFFSET_VALUE]'' \
+. nr #EPI_OFFSET \
+\\n[#COL_\\n[#COL_NUM]_L_MARGIN]+\\*[$EPI_OFFSET_VALUE]
+. \}
+. if !'\\$0'GET_EPI_OFFSET' \
+. if !\\n[#EPI_OFFSET]=0 .po \\n[#EPI_OFFSET]u
+. \}
+.END
+.
+.ALIAS GET_EPI_OFFSET SET_EPI_OFFSET
+\#
+\# ====================================================================
+\#
+\# +++FINIS MACRO+++
+\#
+\# FINIS
+\# -----
+\# *Arguments:
+\# <none>
+\# *Function:
+\# Deposits --END-- at the end of a document.
+\#
+.MAC FINIS END
+. if !\\n[@TOP] \{\
+. if \\n[.t]<=2v \{\
+. tm1 "[mom]: '\\n[.F]': Insufficient room to print \\$0 on last page.
+. return
+. \}
+. \}
+. br
+. ev FINIS
+. evc 0
+. if \\n[#TAB_ACTIVE] .TQ
+. if \\n[#INDENT_ACTIVE] .IQ CLEAR
+. nr #EM_ADJUST (1m/8)
+. if \\n[#COLUMNS] \{\
+. po \\n[#COL_\\n[#COL_NUM]_L_MARGIN]u
+. nr #L_MARGIN \\n[.o]
+. \}
+. ALD \\n[#DOC_LEAD]u
+. CENTER
+. if \\n[#FINIS_STRING_CAPS]=1 .CAPS
+. if \\n[#PRINT_STYLE]=1 \{\
+. ie !\\n[#FINIS_NO_DASHES] .PRINT "--\\*[$FINIS_STRING]--
+. el .PRINT "\\*[$FINIS_STRING]
+. \}
+. if \\n[#PRINT_STYLE]=2 \{\
+. if \\n[#FINIS_COLOR]=1 .COLOR \\*[$FINIS_COLOR]
+. ie !\\n[#FINIS_NO_DASHES] .ds $FINIS_DASH \
+\v'-\\n[#EM_ADJUST]u'\[em]\v'+\\n[#EM_ADJUST]u'
+. el .rm $FINIS_DASH
+. PRINT \
+\\*[$FINIS_DASH]\\*[$FINIS_STRING]\\*[$FINIS_DASH]\c
+. \}
+. EL
+. if \\n[#FINIS_COLOR]=1 .gcolor
+. if \\n[#FINIS_STRING_CAPS]=1 .CAPS OFF
+. ev
+. pdfsync
+.END
+\#
+.MAC FINIS_STRING_CAPS END
+. ie '\\$1'' .nr #FINIS_STRING_CAPS 1
+. el .nr #FINIS_STRING_CAPS 0
+.END
+.
+.ALIAS FINIS_CAPS FINIS_STRING_CAPS
+\#
+.MAC FINIS_NO_DASHES END
+. nr #FINIS_NO_DASHES 1
+.END
+\#
+\# ====================================================================
+\#
+\# +++HEADERS/FOOTERS+++
+\#
+\# Define a string so that the current page number can be incorporated
+\# into the strings for hdrftr left, right, and center. NOTE: This is
+\# not the same thing as using the shortform # in hdrftr strings.
+\#
+.ds PAGE# \En[#PAGENUMBER]
+.ALIAS SLIDE# PAGE#
+\#
+.MAC RESTORE_SPACE END
+. if !\\n[#START] .vpt 0
+. if \\n[@TOP] \{\
+. ch RR_@TOP
+. rr @TOP
+. \}
+. if \\n[#NEWPAGE] .rr #NEWPAGE
+. if \\n[.u]=1 .nr #FILLED 1
+. nf
+. rs
+. nop \&
+. sp -1
+. if \\n[#FILLED] \{\
+. fi
+. rr #FILLED
+. \}
+. if !\\n[#START] .vpt
+.END
+\#
+\# HDRFTR RULE GAP
+\# ---------------
+\# *Argument:
+\# <amount of space between header/footer and header/footer rule>
+\# *Function:
+\# Creates or modifies register #HDRFTR_RULE_GAP to hold amount
+\# of space between header/footer and header/footer rule.
+\# *Notes:
+\# Default is 4p.
+\#
+.MAC HDRFTR_RULE_GAP END
+. nr #HDRFTR_RULE_GAP (\\$1)
+. if '\\$0'HEADER_RULE_GAP' \
+. nr #HEADER_RULE_GAP \\n[#HDRFTR_RULE_GAP]
+. if '\\$0'FOOTER_RULE_GAP' \
+. nr #FOOTER_RULE_GAP \\n[#HDRFTR_RULE_GAP]
+.END
+\#
+\# HDRFTR LEFT
+\# -----------
+\# *Argument:
+\# <what to put in the left position of page header/footers>
+\# *Function:
+\# Creates or modifies string $HDRFTR_LEFT.
+\# Creates register #USER_DEF_HDRFTR_LEFT, which, if 1,
+\# overrides the $HDRFTR_LEFT string created by default
+\# in DEFAULTS.
+\# *Notes:
+\# Especially useful if doc has more than one author, and a list
+\# of authors by last name is desired in header/footers.
+\# Default is author.
+\#
+\# If the argument is the # character, simply prints the current
+\# page number.
+\#
+\# If the user wants to incorporate the page number into the string,
+\# \*[PAGE#] must be used. For example, if the user wants to put
+\# an ellipsis before the page number in the string, s/he should use
+\# ...\*[PAGE#], not ...#
+\#
+.MAC HDRFTR_LEFT END
+. nr #USER_DEF_HDRFTR_LEFT 1
+. ds $HDRFTR_LEFT \\$1
+.END
+\#
+\# HDRFTR <POSITION> CAPS AND SMALLCAPS
+\# ------------------------------------
+\# *Argument:
+\# <none> | <anything>
+\# *Function:
+\# Turns capitalisation of $HDRFTR_<POSITION> on or off.
+\# *Notes:
+\# Default for RIGHT (ie AUTHOR) is on.
+\#
+.MAC CAPS_SMALLCAPS_WARNING END
+. tm1 "[mom]: At line \\n[.c], both CAPS and SMALLCAPS have been enabled for HEADER_\\$1.
+. tm1 " CAPS takes precedence.
+.END
+.
+.MAC _HDRFTR_CAPS END
+. ds $HDR_FTR \\$0
+. substring $HDR_FTR 0 5 \" HEADER or FOOTER
+. ds POSITION \\$0
+. substring POSITION 7 7
+. if '\\*[POSITION]'L' .ds POSITION LEFT
+. if '\\*[POSITION]'C' .ds POSITION CENTER
+. if '\\*[POSITION]'R' .ds POSITION RIGHT
+. if \\n[#HDRFTR_\\*[POSITION]_SMALLCAPS]=1 \
+. CAPS_SMALLCAPS_WARNING \\*[POSITION]
+. ie '\\$1'' .nr #HDRFTR_\\*[POSITION]_CAPS 1
+. el \{\
+. nr #HDRFTR_\\*[POSITION]_CAPS 0
+. ds $HDRFTR_\\*[POSITION]_SIZE_CHANGE +0
+. \}
+.END
+.
+.MAC _HDRFTR_SMALLCAPS END
+. ds $HDR_FTR \\$0
+. substring $HDR_FTR 0 5 \" HEADER or FOOTER
+. ds POSITION \\$0
+. substring POSITION 7 7
+. if '\\*[POSITION]'L' .ds POSITION LEFT
+. if '\\*[POSITION]'C' .ds POSITION CENTER
+. if '\\*[POSITION]'R' .ds POSITION RIGHT
+. if \\n[#HDRFTR_\\*[POSITION]_CAPS]=1 \
+. CAPS_SMALLCAPS_WARNING \\*[POSITION]
+. ie '\\$1'' .nr #HDRFTR_\\*[POSITION]_SMALLCAPS 1
+. el \
+. nr #HDRFTR_\\*[POSITION]_SMALLCAPS 0
+.END
+\#
+\# HDRFTR CENTER
+\# -------------
+\# *Argument:
+\# <what to put in the centre position of page header/footers>
+\# *Function:
+\# Creates or modifies string $HDRFTR_CENTER.
+\# Creates register #USER_DEF_HDRFTR_CENTER, which, if 1,
+\# overrides the $HDRFTR_CENTER string created by default
+\# in COPYSTYLE.
+\# *Notes:
+\# Default is document type if DOCTYPE NAMED, Chapter # if DOCTYPE
+\# CHAPTER, draft and revision number if COPYSTYLE DRAFT.
+\#
+\# If the argument is the # character, simply prints the current
+\# page number.
+\#
+\# If the user wants to incorporate the page number into the string,
+\# \*[PAGE#] must be used. For example, if the user wants to put
+\# an ellipsis before the page number in the string, s/he should use
+\# ...\*[PAGE#], not ...#
+\#
+.MAC HDRFTR_CENTER END
+. nr #USER_DEF_HDRFTR_CENTER 1
+. if '\\$0'HEADER_CENTER' \{\
+. ds $HDRFTR_CENTER_OLD \\*[$HDRFTR_CENTER]
+. ds $HDRFTR_CENTER_NEW \\$1
+. \}
+. if '\\$0'FOOTER_CENTRE' \{\
+. ds $HDRFTR_CENTER_OLD \\*[$HDRFTR_CENTER]
+. ds $HDRFTR_CENTER_NEW \\$1
+. \}
+. ie '\\$1'TOC' .ds $TOC_HDRFTR_CENTER \\$2
+. el .ds $HDRFTR_CENTER \\$1
+.END
+\#
+\# HDRFTR CENTER CAPS AND SMALLCAPS
+\# --------------------------------
+\# *Argument:
+\# <none> | <anything>
+\# *Function:
+\# Turns capitalisation of $HDRFTR_CENTER (typically, doctype of
+\# the document) on or off.
+\# *Notes:
+\# Default is on.
+\#
+.MAC HDRFTR_CENTER_SMALLCAPS END
+. if \\n[#HDRFTR_CENTER_SMALLCAPS]=1 \
+. CAPS_SMALLCAPS_WARNING CENTER
+. ie '\\$1'' .nr #HDRFTR_CENTER_SMALLCAPS 1
+. el \
+. nr #HDRFTR_CENTER_SMALLCAPS 0
+.END
+\#
+\# HDRFTR CENTER PADDING
+\# ---------------------
+\# *Argument:
+\# LEFT | RIGHT <amount of padding to put left or right of hdrftr
+\# center string>
+\# *Function:
+\# Creates or modifies registers #HDRFTR_CTR_PAD_LEFT or
+\# #HDRFTR_CTR_PAD_RIGHT.
+\# *Notes:
+\# By default, the HDRFTR_CENTER string is centered on the doc
+\# line length. Long titles or long author names can screw up
+\# visual centering, or create overprints. This macro allows the
+\# user to pad the center string by the specified amount of space
+\# to fix these problems.
+\#
+\# A unit of measure is required.
+\#
+.MAC HDRFTR_CENTER_PAD END
+. if '\\$1'LEFT' .nr #HDRFTR_CTR_PAD_LEFT (\\$2)
+. if '\\$1'RIGHT' .nr #HDRFTR_CTR_PAD_RIGHT (\\$2)
+.END
+\#
+\# SWITCH HDRFTR CENTER PADDING SIDE (support macro)
+\# -------------------------------------------------
+\# *Argument:
+\# <none>
+\# *Function:
+\# Switches the padding side of hdrftr center padding.
+\# *Notes:
+\# Required to keep spacing around hdrftr string constant
+\# in recto/verso documents.
+\#
+.MAC SWITCH_HDRFTR_CENTER_PAD END
+. nr #HDRFTR_CTR_PAD_TMP \\n[#HDRFTR_CTR_PAD_LEFT]
+. HDRFTR_CENTER_PAD LEFT \\n[#HDRFTR_CTR_PAD_RIGHT]u
+. HDRFTR_CENTER_PAD RIGHT \\n[#HDRFTR_CTR_PAD_TMP]u
+.END
+\#
+\# HDRFTR RIGHT
+\# ------------
+\# *Argument:
+\# <what to put in the right position of page header/footers>
+\# *Function:
+\# Creates or modifies string $HDRFTR_RIGHT.
+\# Creates register #USER_DEF_HDRFTR_RIGHT, which, if 1,
+\# overrides the $HDRFTR_RIGHT string created by default
+\# in DEFAULTS.
+\# *Notes:
+\# Default is document title.
+\#
+\# If the argument is the # character, simply prints the current
+\# page number.
+\#
+\# If the user wants to incorporate the page number into the string,
+\# \*[PAGE#] must be used. For example, if the user wants to put
+\# an ellipsis before the page number in the string, s/he should use
+\# ...\*[PAGE#], not ...#
+\#
+.MAC HDRFTR_RIGHT END
+. nr #USER_DEF_HDRFTR_RIGHT 1
+. ds $HDRFTR_RIGHT \\$1
+.END
+\#
+\# HDRFTR RIGHT CAPS AND SMALLCAPS
+\# -------------------------------
+\# *Argument:
+\# <none> | <anything>
+\# *Function:
+\# Turns capitalisation of $HDRFTR_RIGHT (typically, the title of
+\# the document) on or off.
+\# *Notes:
+\# Default is on.
+\#
+.MAC HDRFTR_RIGHT_SMALLCAPS END
+. if \\n[#HDRFTR_RIGHT_SMALLCAPS]=1 \
+. CAPS_SMALLCAPS_WARNING RIGHT
+. ie '\\$1'' .nr #HDRFTR_RIGHT_SMALLCAPS 1
+. el \
+. nr #HDRFTR_RIGHT_SMALLCAPS 0
+.END
+\#
+\# HDRFTR RULE
+\# -----------
+\# *Arguments:
+\# <none> | <anything>
+\# *Function:
+\# If invoked via the alias HDRFTR_RULE_INTERNAL in HDRFTR, prints a rule
+\# under the header/over the footer. Otherwise, turns HDRFTR_RULE
+\# on or off.
+\#
+.MAC HDRFTR_RULE END
+. if r #HEADERS_ON \
+. if \\n[#HEADERS_ON]=1 .nr #HDRFTR_RULE_GAP \\n[#HEADER_RULE_GAP]
+. if r #FOOTERS_ON \
+. if \\n[#FOOTERS_ON]=1 .nr #HDRFTR_RULE_GAP \\n[#FOOTER_RULE_GAP]
+. if '\\$0'HDRFTR_RULE_INTERNAL' \{\
+. ie \\n[#USERDEF_HDRFTR] \{\
+. nr #CAP_HEIGHT_ADJUST \\n[#HDRFTR_HEIGHT]
+. if \\n[#HEADERS_ON] \{\
+. rt \\n[y]u
+. ALD \\n[#HDRFTR_RULE_GAP]u
+. nr #HDRFTR_RULE_WEIGHT \\n[#HEADER_RULE_WEIGHT]
+. nr #HDRFTR_RULE_WEIGHT_ADJ \\n[#HEADER_RULE_WEIGHT_ADJ]
+. \}
+. if \\n[#FOOTERS_ON] \{\
+. rt \\n[y]u
+. RLD \
+\\n[#HDRFTR_RULE_GAP]u+\\n[#CAP_HEIGHT_ADJUST]u+\\n[#FOOTER_RULE_WEIGHT]u
+. nr #HDRFTR_RULE_WEIGHT \\n[#FOOTER_RULE_WEIGHT]
+. nr #HDRFTR_RULE_WEIGHT_ADJ \\n[#FOOTER_RULE_WEIGHT_ADJ]
+. \}
+. ie \\n[#HDRFTR_RULE_COLOR]=1 \{\
+\m[\\*[$HDRFTR_RULE_COLOR]]\
+\D't \\n[#HDRFTR_RULE_WEIGHT]u'\
+\h'|0'\
+\v'+\\n[#HDRFTR_RULE_WEIGHT_ADJ]u'\
+\D'l \\n[#DOC_L_LENGTH]u 0'\
+\D't \\n[#RULE_WEIGHT]u'\
+\h'-\\n[#RULE_WEIGHT]u'\
+\m[]
+. \}
+. el \{\
+\D't \\n[#HDRFTR_RULE_WEIGHT]u'\
+\h'|0'\
+\v'+\\n[#HDRFTR_RULE_WEIGHT_ADJ]u'\
+\D'l \\n[#DOC_L_LENGTH]u 0'\
+\D't \\n[#RULE_WEIGHT]u'\
+\h'-\\n[#RULE_WEIGHT]u'
+. \}
+. br
+. \}
+. el \{\
+. if \\n[#PRINT_STYLE]=1 .nr #CAP_HEIGHT_ADJUST \\n[#CAP_HEIGHT]
+. if \\n[#PRINT_STYLE]=2 \{\
+. ie \\n[#LEFT_CAP_HEIGHT]>\\n[#CENTER_CAP_HEIGHT] \
+. nr #CAP_HEIGHT_ADJUST \\n[#LEFT_CAP_HEIGHT]
+. el .nr #CAP_HEIGHT_ADJUST \\n[#CENTER_CAP_HEIGHT]
+. ie \\n[#CAP_HEIGHT_ADJUST]>\\n[#RIGHT_CAP_HEIGHT] \
+. nr #CAP_HEIGHT_ADJUST \\n[#CAP_HEIGHT_ADJUST]
+. el .nr #CAP_HEIGHT_ADJUST \\n[#RIGHT_CAP_HEIGHT]
+. \}
+. if \\n[#HEADERS_ON] \{\
+. rt \\n[y]u
+. ALD \\n[#HDRFTR_RULE_GAP]u
+. nr #HDRFTR_RULE_WEIGHT \\n[#HEADER_RULE_WEIGHT]
+. nr #HDRFTR_RULE_WEIGHT_ADJ \\n[#HEADER_RULE_WEIGHT_ADJ]
+. \}
+. if \\n[#FOOTERS_ON] \{\
+. rt \\n[y]u
+. RLD \
+\\n[#HDRFTR_RULE_GAP]u+\\n[#CAP_HEIGHT_ADJUST]u+\\n[#FOOTER_RULE_WEIGHT]u
+. nr #HDRFTR_RULE_WEIGHT \\n[#FOOTER_RULE_WEIGHT]
+. nr #HDRFTR_RULE_WEIGHT_ADJ \\n[#FOOTER_RULE_WEIGHT_ADJ]
+. \}
+. ie \\n[#HDRFTR_RULE_COLOR]=1 \{\
+\m[\\*[$HDRFTR_RULE_COLOR]]\
+\D't \\n[#HDRFTR_RULE_WEIGHT]u'\
+\h'|0'\
+\v'+\\n[#HDRFTR_RULE_WEIGHT_ADJ]u'\
+\D'l \\n[#DOC_L_LENGTH]u 0'\
+\D't \\n[#RULE_WEIGHT]u'\
+\h'-\\n[#RULE_WEIGHT]u'\
+\m[]
+. \}
+. el \{\
+\D't \\n[#HDRFTR_RULE_WEIGHT]u'\
+\h'|0'\
+\v'+\\n[#HDRFTR_RULE_WEIGHT_ADJ]u'\
+\D'l \\n[#DOC_L_LENGTH]u 0'\
+\D't \\n[#RULE_WEIGHT]u'\
+\h'-\\n[#RULE_WEIGHT]u'
+. \}
+. br
+. \}
+. \}
+. if '\\$0'HEADER_RULE' \{\
+. ie '\\$1'' \{\
+. nr #HEADER_RULE 1
+. nr #HDRFTR_RULE 1
+. \}
+. el \{\
+. nr #HEADER_RULE 0
+. nr #HDRFTR_RULE 0
+. \}
+. \}
+. if '\\$0'FOOTER_RULE' \{\
+. ie '\\$1'' \{\
+. nr #FOOTER_RULE 1
+. nr #HDRFTR_RULE 1
+. \}
+. el \{\
+. nr #FOOTER_RULE 0
+. nr #HDRFTR_RULE 0
+. \}
+. \}
+. if '\\$0'HDRFTR_RULE' \{\
+. ie '\\$1'' .nr #HDRFTR_RULE 1
+. el .nr #HDRFTR_RULE 0
+. \}
+.END
+.
+.ALIAS HDRFTR_RULE_INTERNAL HDRFTR_RULE
+\#
+\# HDRFTR PLAIN
+\# ------------
+\# *Arguments:
+\# <none>
+\# *Function:
+\# Sets the family, font, and point size of all strings in
+\# header/footers to the same family and point size as running
+\# text. Font for the header/footer becomes roman throughout.
+\#
+.MAC HDRFTR_PLAIN END
+. nr #HDRFTR_PLAIN 1
+. rm $HDRFTR_FAMILY
+. rm #HDRFTR_PT_SIZE
+. rm $HDRFTR_COLOR
+. rm $HDRFTR_LEFT_FAMILY
+. rm $HDRFTR_LEFT_FONT
+. rm $HDRFTR_LEFT_SIZE_CHANGE
+. rr #HDRFTR_LEFT_CAPS
+. rr #HDRFTR_LEFT_SMALLCAPS
+. rr #HDRFTR_LEFT_COLOR
+. rm $HDRFTR_CENTER_FAMILY
+. rm $HDRFTR_CENTER_FONT
+. rm $HDRFTR_CENTER_SIZE_CHANGE
+. rr #HDRFTR_CENTER_CAPS
+. rr #HDRFTR_CENTER_SMALLCAPS
+. rr #HDRFTR_CENTER_COLOR
+. rm $HDRFTR_RIGHT_FAMILY
+. rm $HDRFTR_RIGHT_FONT
+. rm $HDRFTR_RIGHT_SIZE_CHANGE
+. rr #HDRFTR_RIGHT_CAPS
+. rr #HDRFTR_RIGHT_SMALLCAPS
+. rr #HDRFTR_RIGHT_COLOR
+.END
+\#
+\# SWITCH HDRFTR
+\# -------------
+\# *Arguments:
+\# <none> | <anything>
+\# *Function:
+\# Creates or modifies register #SWITCH_HDRFTR, used to switch
+\# default location of HDRFTR_LEFT and HDRFTR_RIGHT.
+\# *Notes:
+\# Default is OFF.
+\#
+\# Typically, the author string appears at the left of header/footers,
+\# and the title string appears at the right. This switches the
+\# location of the two. Useful in conjunction with RECTO_VERSO to tweak
+\# switches on alternate pages to come out as the user wishes. The
+\# assumption of RECTO_VERSO is that the first page of the document
+\# (recto) is odd, and even though it has no header/footer, if it did
+\# have one, it would print as AUTHOR...CENTER...TITLE (or whatever
+\# strings the user has supplied for HDRFTR_LEFT/RIGHT), meaning that
+\# the next page, which does have a header/footer, will come out as
+\# TITLE...CENTER...AUTHOR (or whatever strings the user has supplied
+\# for HDRFTR_LEFT/RIGHT). SWITCH_HDRFTRS allows the user to get the
+\# desired string in the desired place on the desired recto/verso page.
+\#
+.MAC SWITCH_HDRFTR END
+. ie '\\$1'' .nr #SWITCH_HDRFTR 1
+. el .nr #SWITCH_HDRFTR 0
+.END
+\#
+\# USER DEFINED HDRFTR RECTO
+\# -------------------------
+\# *Arguments:
+\# L | LEFT | C | CENTER | CENTER | R | RIGHT <hdrftr_recto_string>
+\# *Function:
+\# Toggles #USERDEF_HDRFTR on, stores quad as #USERDEF_HDRFTR_RECTO_QUAD,
+\# stores string in $USERDEF_HDRFTR_RECTO.
+\# *Notes:
+\# For use when users don't want 3-part headers/footers, but rather
+\# want to design their own headers/footers and need different
+\# headers/footers on recto and verso pages. Using just
+\# HEADER_RECTO or FOOTER_RECTO, even when recto/verso is not on,
+\# allows users to design their own headers/footers for doc pages.
+\#
+.MAC HDRFTR_RECTO END
+. nr #USERDEF_HDRFTR 1
+. ds $QUAD_TYPE \\$1
+. substring $QUAD_TYPE 0 0
+. if '\\*[$QUAD_TYPE]'L' .nr #USERDEF_HDRFTR_RECTO_QUAD 1
+. if '\\*[$QUAD_TYPE]'C' .nr #USERDEF_HDRFTR_RECTO_QUAD 2
+. if '\\*[$QUAD_TYPE]'R' .nr #USERDEF_HDRFTR_RECTO_QUAD 3
+. shift
+. ie '\\$1'CAPS' \{\
+. nr #HDRFTR_RECTO_CAPS 1
+. ds $USERDEF_HDRFTR_RECTO \\$2
+. \}
+. el .ds $USERDEF_HDRFTR_RECTO \\$1
+.END
+\#
+\# USER DEFINED HDRFTR VERSO
+\# -------------------------
+\# *Arguments:
+\# L | LEFT | C | CENTER | CENTER | R | RIGHT <hdrftr_verso_string>
+\# *Function:
+\# Toggles #USERDEF_HDRFTR on, stores quad as #USERDEF_HDRFTR_VERSO_QUAD,
+\# stores string in $USERDEF_HDRFTR_VERSO.
+\# *Notes:
+\# For use when users don't want 3-part headers/footers, but rather
+\# want to design their own headers/footers and need different
+\# headers/footers on recto and verso pages.
+\#
+.MAC HDRFTR_VERSO END
+. nr #USERDEF_HDRFTR 1
+. ds $QUAD_TYPE \\$1
+. if !'\\*[$QUAD_TYPE]'' .substring $QUAD_TYPE 0 0
+. if '\\*[$QUAD_TYPE]'L' .nr #USERDEF_HDRFTR_VERSO_QUAD 1
+. if '\\*[$QUAD_TYPE]'C' .nr #USERDEF_HDRFTR_VERSO_QUAD 2
+. if '\\*[$QUAD_TYPE]'R' .nr #USERDEF_HDRFTR_VERSO_QUAD 3
+. shift
+. ie '\\$1'CAPS' \{\
+. nr #HDRFTR_VERSO_CAPS 1
+. ds $USERDEF_HDRFTR_VERSO \\$2
+. \}
+. el .ds $USERDEF_HDRFTR_VERSO \\$1
+.END
+\#
+\# PRINT FOOTER ON FIRST PAGE
+\# --------------------------
+\# *Arguments:
+\# <none> | <anything>
+\# *Function:
+\# Toggles register #PRINT_FOOTER_ON_PAGE_1
+\# *Notes:
+\# Lets user choose whether to print footer on first
+\# page of doc.
+\#
+.MAC FOOTER_ON_FIRST_PAGE END
+. ie '\\$1'' .nr #PRINT_FOOTER_ON_PAGE_1 1
+. el .rr #PRINT_FOOTER_ON_PAGE_1
+.END
+\#
+\# PRINT PAGE NUMBER ON FIRST PAGE
+\# -------------------------------
+\# *Arguments:
+\# <none> | <anything>
+\# *Function:
+\# Toggles register #PRINT_PAGENUM_ON_PAGE_1
+\# *Notes:
+\# Lets user choose whether to print page number on first
+\# page of doc and after collate when footers are on or page numbering
+\# has been user set at top of page.
+\#
+.MAC PAGENUM_ON_FIRST_PAGE END
+. ie '\\$1'' .nr #PRINT_PAGENUM_ON_PAGE_1 1
+. el .rr #PRINT_PAGENUM_ON_PAGE_1
+.END
+\#
+\# PRINT HEADER/FOOTER
+\# -------------------
+\# *Arguments:
+\# <none>
+\# *Function:
+\# Based on defaults or values entered by user, prints a
+\# three-part title at either the top or the bottom of the page.
+\# *Notes:
+\# Called from within either HEADER or FOOTER.
+\#
+.MAC PRINT_HDRFTR END
+. if \\n[#DOC_TYPE]=4 .nr #SUITE \En[.pn]
+. if \\n[#FOOTERS_ON] \{\
+. if \\n[#START_FOR_FOOTERS] \{\
+. rr #START_FOR_FOOTERS
+. if \\n[#DOC_TYPE]=5 \{\
+. if !\\n[#HDRFTR_BOTH] .PRINT_USERDEF_HDRFTR
+. return
+. \}
+. if !\\n[#PRINT_FOOTER_ON_PAGE_1] \{\
+. ie !\\n[#HDRFTR_BOTH] .return
+. el \{\
+. rr #FOOTERS_ON
+. if !\\n[#COLLATE] .nr #HEADERS_ON 1
+. ie \\n[#HEADER_RULE]=1 .HEADER_RULE
+. el .HEADER_RULE OFF
+. ie \\n[#HDRFTR_BOTH] .HEADER_VERSO \\*[$HDR_VERSO_QUAD] "\\*[$HDR_VERSO_STRING]"
+. el .HEADER_RECTO \\*[$HDR_RECTO_QUAD] "\\*[$HDR_RECTO_STRING]"
+. return
+. \}
+. \}
+. \}
+. \}
+. if \\n[#USERDEF_HDRFTR] \{\
+. PRINT_USERDEF_HDRFTR
+. return
+. \}
+. if \\n[#SWITCH_HDRFTR] \{\
+. ds $HDRFTR_TMP_SWITCH \\*[$HDRFTR_LEFT]
+. ds $HDRFTR_LEFT \\*[$HDRFTR_RIGHT]
+. ds $HDRFTR_RIGHT \\*[$HDRFTR_TMP_SWITCH]
+. ds $HDRFTR_TMP_SIZE_CHANGE_SWITCH \\*[$HDRFTR_LEFT_SIZE_CHANGE]
+. ds $HDRFTR_LEFT_SIZE_CHANGE \\*[$HDRFTR_RIGHT_SIZE_CHANGE]
+. ds $HDRFTR_RIGHT_SIZE_CHANGE \\*[$HDRFTR_TMP_SIZE_CHANGE_SWITCH]
+. nr #HDRFTR_TMP_CAPS_SWITCH \\n[#HDRFTR_LEFT_CAPS]
+. nr #HDRFTR_LEFT_CAPS \\n[#HDRFTR_RIGHT_CAPS]
+. nr #HDRFTR_TMP_SMALLCAPS_SWITCH \\n[#HDRFTR_LEFT_SMALLCAPS]
+. nr #HDRFTR_LEFT_SMALLCAPS \\n[#HDRFTR_RIGHT_SMALLCAPS]
+. nr #HDRFTR_RIGHT_CAPS \\n[#HDRFTR_TMP_CAPS_SWITCH]
+. ds $HDRFTR_TMP_COLOR_SWITCH \\*[$HDRFTR_LEFT_COLOR]
+. ds $HDRFTR_LEFT_COLOR \\*[$HDRFTR_RIGHT_COLOR]
+. ds $HDRFTR_RIGHT_COLOR \\*[$HDRFTR_TMP_COLOR_SWITCH]
+. rr #HDRFTR_TMP_CAPS_SWITCH
+. rm $HDRFTR_TMP_SWITCH
+. rm $HDRFTR_TMP_SIZE_CHANGE_SWITCH
+. rm $HDRFTR_TMP_COLOR_SWITCH
+. nr #SWITCH_HDRFTR 0
+. \}
+. nr #PAGENUMBER \\n%+\\n[#PAGE_NUM_ADJ]
+. if \\n[#ENDNOTES] .PAGENUM_STYLE \\*[$EN_PN_STYLE]
+. if \\n[#PRINT_STYLE]=1 \{\
+. if \\n[#FOOTERS_ON] \{\
+. di NULL
+. SIZESPECS
+. nr #LEFT_CAP_HEIGHT \\n[#CAP_HEIGHT]
+. di
+. \}
+. if o .RIGHT
+. if e .LEFT
+. if \\n[#RECTO_VERSO]=0 .LEFT
+. if \\n[#HDRFTR_LEFT_CAPS] .CAPS
+. ie '\\*[$HDRFTR_LEFT]'#' .PRINT \\n[#PAGENUMBER]
+. el \{\
+. ie !'\\*[$HDRFTR_LEFT]'' .PRINT \\*[$HDRFTR_LEFT]
+. el .PRINT \&
+. \}
+. if \\n[#HDRFTR_LEFT_CAPS] .CAPS OFF
+. CENTER
+. if \\n[#HDRFTR_CENTER_CAPS] .CAPS
+. rt \\n[y]u
+. ie '\\*[$HDRFTR_CENTER]'#' .PRINT \
+\h'\\n[#HDRFTR_CTR_PAD_LEFT]u'\\n[#PAGENUMBER]\h'\\n[#HDRFTR_CTR_PAD_RIGHT]u'
+. el \{\
+. ie !'\\*[$HDRFTR_CENTER]'' .PRINT \
+\h'\\n[#HDRFTR_CTR_PAD_LEFT]u'\\*[$HDRFTR_CENTER]\h'\\n[#HDRFTR_CTR_PAD_RIGHT]u'
+. el .PRINT \&
+. \}
+. if \\n[#HDRFTR_CENTER_CAPS] .CAPS OFF
+. if o .LEFT
+. if e .RIGHT
+. if \\n[#RECTO_VERSO]=0 .RIGHT
+. if \\n[#HDRFTR_RIGHT_CAPS] .CAPS
+. rt \\n[y]u
+. ie '\\*[$HDRFTR_RIGHT]'#' .PRINT \\n[#PAGENUMBER]
+. el \{\
+. ie !'\\*[$HDRFTR_RIGHT]'' .PRINT \\*[$HDRFTR_RIGHT]
+. el .PRINT \&
+. \}
+. if \\n[#HDRFTR_RIGHT_CAPS] .CAPS OFF
+. \}
+. if \\n[#PRINT_STYLE]=2 \{\
+. if \\n[#HDRFTR_COLOR]=1 \{\
+. nf
+\m[\\*[$HDRFTR_COLOR]]
+. \}
+. fam \\*[$HDRFTR_LEFT_FAM]
+. ft \\*[$HDRFTR_LEFT_FT]
+. ps \\n[#HDRFTR_PT_SIZE]u\\*[$HDRFTR_LEFT_SIZE_CHANGE]
+. if \\n[#FOOTERS_ON] \{\
+. di NULL
+. SIZESPECS
+. nr #LEFT_CAP_HEIGHT \\n[#CAP_HEIGHT]
+. di
+. \}
+. if o .LEFT
+. if e .RIGHT
+. if \\n[#RECTO_VERSO]=0 .LEFT
+. if \\n[#HDRFTR_LEFT_SMALLCAPS] .SMALLCAPS
+. if \\n[#HDRFTR_LEFT_CAPS] .CAPS
+. ie '\\*[$HDRFTR_LEFT]'#' \{\
+. ie \\n[#HDRFTR_LEFT_COLOR]=1 \
+. PRINT \m[\\*[$HDRFTR_LEFT_COLOR]]\\n[#PAGENUMBER]\m[]
+. el \
+. PRINT \\n[#PAGENUMBER]
+. \}
+. el \{\
+. ie !'\\*[$HDRFTR_LEFT]'' \{\
+. ie \\n[#HDRFTR_LEFT_COLOR]=1 \
+. PRINT \m[\\*[$HDRFTR_LEFT_COLOR]]\\*[$HDRFTR_LEFT]\m[]
+. el \
+. PRINT \\*[$HDRFTR_LEFT]
+. \}
+. el .nop \&
+. \}
+. if \\n[#HDRFTR_LEFT_CAPS] .CAPS OFF
+. if \\n[#HDRFTR_LEFT_SMALLCAPS] .SMALLCAPS OFF
+. fam \\*[$HDRFTR_CENTER_FAM]
+. ft \\*[$HDRFTR_CENTER_FT]
+. ps \\n[#HDRFTR_PT_SIZE]u\\*[$HDRFTR_CENTER_SIZE_CHANGE]
+. if \\n[#FOOTERS_ON] \{\
+. di NULL
+. SIZESPECS
+. nr #CENTER_CAP_HEIGHT \\n[#CAP_HEIGHT]
+. di
+. \}
+. CENTER
+. if \\n[#HDRFTR_CENTER_SMALLCAPS] .SMALLCAPS
+. if \\n[#HDRFTR_CENTER_CAPS] .CAPS
+. rt \\n[y]u
+. ie '\\*[$HDRFTR_CENTER]'#' \{\
+. ie \\n[#HDRFTR_CENTER_COLOR]=1 .PRINT \
+\h'\\n[#HDRFTR_CTR_PAD_LEFT]u'\m[\\*[$HDRFTR_CENTER_COLOR]]\
+\\n[#PAGENUMBER]\h'\\n[#HDRFTR_CTR_PAD_RIGHT]u'\m[]
+. el .PRINT \
+\h'\\n[#HDRFTR_CTR_PAD_LEFT]u'\\n[#PAGENUMBER]\h'\\n[#HDRFTR_CTR_PAD_RIGHT]u'
+. \}
+. el \{\
+. ie !'\\*[$HDRFTR_CENTER]'' \{\
+. ie \\n[#HDRFTR_CENTER_COLOR]=1 .PRINT \
+\h'\\n[#HDRFTR_CTR_PAD_LEFT]u'\m[\\*[$HDRFTR_CENTER_COLOR]]\
+\\*[$HDRFTR_CENTER]\h'\\n[#HDRFTR_CTR_PAD_RIGHT]u'\m[]
+. el .PRINT \
+\h'\\n[#HDRFTR_CTR_PAD_LEFT]u'\\*[$HDRFTR_CENTER]\h'\\n[#HDRFTR_CTR_PAD_RIGHT]u'
+. \}
+. el .PRINT \&
+. \}
+. if \\n[#HDRFTR_CENTER_CAPS] .CAPS OFF
+. if \\n[#HDRFTR_CENTER_SMALLCAPS] .SMALLCAPS OFF
+. fam \\*[$HDRFTR_RIGHT_FAM]
+. ft \\*[$HDRFTR_RIGHT_FT]
+. ps \\n[#HDRFTR_PT_SIZE]u\\*[$HDRFTR_RIGHT_SIZE_CHANGE]
+. if \\n[#FOOTERS_ON] \{\
+. di NULL
+. SIZESPECS
+. nr #RIGHT_CAP_HEIGHT \\n[#CAP_HEIGHT]
+. di
+. \}
+. if o .RIGHT
+. if e .LEFT
+. if \\n[#RECTO_VERSO]=0 .RIGHT
+. if \\n[#HDRFTR_RIGHT_SMALLCAPS] .SMALLCAPS
+. if \\n[#HDRFTR_RIGHT_CAPS] .CAPS
+. rt \\n[y]u
+. ie '\\*[$HDRFTR_RIGHT]'#' \{\
+. ie \\n[#HDRFTR_RIGHT_COLOR]=1 \
+. PRINT \m[\\*[$HDRFTR_RIGHT_COLOR]]\\n[#PAGENUMBER]\m[]
+. el \
+. PRINT \\n[#PAGENUMBER]
+. \}
+. el \{\
+. ie !'\\*[$HDRFTR_RIGHT]'' \{\
+. ie \\n[#HDRFTR_RIGHT_COLOR]=1 \
+. PRINT \m[\\*[$HDRFTR_RIGHT_COLOR]]\\*[$HDRFTR_RIGHT]\m[]
+. el \
+. PRINT \\*[$HDRFTR_RIGHT]
+. \}
+. el .PRINT \&
+. \}
+. if \\n[#HDRFTR_RIGHT_CAPS] .CAPS OFF
+. if \\n[#HDRFTR_RIGHT_SMALLCAPS] .SMALLCAPS OFF
+. \}
+. if \\n[#HDRFTR_RULE] .HDRFTR_RULE_INTERNAL
+. br
+.END
+\#
+\# PRINT USER DEFINED HEADER/FOOTER
+\# --------------------------------
+\# *Arguments:
+\# <none>
+\# *Function:
+\# Based on defaults or values entered by user, prints a single part
+\# (i.e. not 3-part) title at either the top or the bottom of the page.
+\# *Notes:
+\# Called from within PRINT_HDRFTR.
+\#
+.MAC PRINT_USERDEF_HDRFTR END
+. nr #PAGENUMBER \\n%+\\n[#PAGE_NUM_ADJ]
+. fc ^ #
+. if \\n[#PRINT_STYLE]=2 \{\
+. fam \\*[$HDRFTR_FAM]
+. ft R
+. ps \\n[#HDRFTR_PT_SIZE]u
+. if \\n[#HDRFTR_COLOR]=1 \{\
+. nf
+. COLOR \\*[$HDRFTR_COLOR]
+. \}
+. \}
+. ie \\n[#RECTO_VERSO] \{\
+. if o \{\
+. if \\n[#USERDEF_HDRFTR_RECTO_QUAD]=1 .LEFT
+. if \\n[#USERDEF_HDRFTR_RECTO_QUAD]=2 .CENTER
+. if \\n[#USERDEF_HDRFTR_RECTO_QUAD]=3 .RIGHT
+. if \\n[#HDRFTR_RECTO_CAPS]=1 .CAPS
+. if '\\n[.ev]'FOOTER' .vs 0
+. PRINT \\*[$USERDEF_HDRFTR_RECTO]
+. if '\\n[.ev]'FOOTER' .vs
+. if \\n[#HDRFTR_RECTO_CAPS]=1 .CAPS OFF
+. EOL
+. if \\n[#FOOTERS_ON] \{\
+. di NULL
+. SIZESPECS
+. nr #HDRFTR_HEIGHT \\n[#CAP_HEIGHT]
+. di
+. \}
+. \}
+. if e \{\
+. ie !'\\*[$USERDEF_HDRFTR_VERSO]'' \{\
+. if \\n[#USERDEF_HDRFTR_VERSO_QUAD]=1 .LEFT
+. if \\n[#USERDEF_HDRFTR_VERSO_QUAD]=2 .CENTER
+. if \\n[#USERDEF_HDRFTR_VERSO_QUAD]=3 .RIGHT
+. if \\n[#HDRFTR_VERSO_CAPS]=1 .CAPS
+. if '\\n[.ev]'FOOTER' .vs 0
+. PRINT \\*[$USERDEF_HDRFTR_VERSO]
+. if '\\n[.ev]'FOOTER' .vs
+. if \\n[#HDRFTR_VERSO_CAPS]=1 .CAPS OFF
+. EOL
+. if \\n[#FOOTERS_ON] \{\
+. di NULL
+. SIZESPECS
+. nr #HDRFTR_HEIGHT \\n[#CAP_HEIGHT]
+. di
+. \}
+. \}
+. el \{\
+. if \\n[#USERDEF_HDRFTR_RECTO_QUAD]=1 .LEFT
+. if \\n[#USERDEF_HDRFTR_RECTO_QUAD]=2 .CENTER
+. if \\n[#USERDEF_HDRFTR_RECTO_QUAD]=3 .RIGHT
+. if \\n[#HDRFTR_RECTO_CAPS]=1 .CAPS
+. if '\\n[.ev]'FOOTER' .vs 0
+. PRINT \\*[$USERDEF_HDRFTR_RECTO]
+. if '\\n[.ev]'FOOTER' .vs
+. if \\n[#HDRFTR_RECTO_CAPS]=1 .CAPS OFF
+. EOL
+. if \\n[#FOOTERS_ON] \{\
+. di NULL
+. SIZESPECS
+. nr #HDRFTR_HEIGHT \\n[#CAP_HEIGHT]
+. di
+. \}
+. \}
+. \}
+. \}
+. el \{\
+. if \\n[#USERDEF_HDRFTR_RECTO_QUAD]=1 .LEFT
+. if \\n[#USERDEF_HDRFTR_RECTO_QUAD]=2 .CENTER
+. if \\n[#USERDEF_HDRFTR_RECTO_QUAD]=3 .RIGHT
+. if \\n[#HDRFTR_RECTO_CAPS]=1 .CAPS
+. if '\\n[.ev]'FOOTER' .vs 0
+. if !r #SKIP .PRINT \\*[$USERDEF_HDRFTR_RECTO]
+. if '\\n[.ev]'FOOTER' .vs
+. if \\n[#HDRFTR_RECTO_CAPS]=1 .CAPS OFF
+. EOL
+. if \\n[#FOOTERS_ON] \{\
+. di NULL
+. SIZESPECS
+. nr #HDRFTR_HEIGHT \\n[#CAP_HEIGHT]
+. di
+. \}
+. \}
+. fc
+. if \\n[#PRINT_STYLE]=2 \{\
+. ie \\n[#HDRFTR_COLOR]=1 \m[\\*[$HDRFTR_COLOR]]
+. el \m[black]
+. \}
+. if \\n[#HDRFTR_RULE] \
+. HDRFTR_RULE_INTERNAL
+.END
+\#
+\# +++HEADERS+++
+\#
+\# HEADERS (off or on)
+\# -------------------
+\# *Arguments:
+\# <none> | <anything>
+\# *Function:
+\# Turns headers at the top of the page off or on.
+\# *Notes:
+\# Default is on.
+\#
+.MAC HEADERS END
+. ie '\\$1'' .nr #HEADERS_ON 1
+. el .nr #HEADERS_ON 0
+.END
+\#
+\# HEADER MARGIN
+\# -------------
+\# *Argument:
+\# <amount of space between top of page and header>
+\# *Function:
+\# Creates or modifies register #HEADER_MARGIN to hold amount
+\# of space between top of page and header.
+\# *Notes:
+\# Requires unit of measure. Default is 4P+6p, measured top-of-page
+\# to baseline.
+\#
+.MAC HEADER_MARGIN END
+. nr #HEADER_MARGIN (\\$1)
+.END
+\#
+\# HEADER GAP
+\# ----------
+\# *Argument:
+\# <amount of space between header and running text>
+\# *Function:
+\# Creates or modifies register #HEADER_GAP to hold amount
+\# of space between header and running text.
+\# *Notes:
+\# Default is 1P+6p.
+\#
+.MAC HEADER_GAP END
+. nr #HEADER_GAP (\\$1)
+.END
+\#
+\# HEADER
+\# ------
+\# *Arguments:
+\# <none>
+\# *Function:
+\# Resets margin notes, processes footnote and margin note
+\# leftover, takes care of recto-verso, prepares for columns after
+\# first, determines whether to flex-space the page,,outputs
+\# deferred floats, and does some tbl magic. If headers are
+\# enabled, prints header appropriate to DOC_TYPE, PRINTSTYLE, and
+\# COPYSTYLE.
+\#
+.MAC HEADER END
+. vpt 0
+. if \\n[#DOC_TYPE]=5 \{\
+. if \\n[#SLIDE_FOOTERS] \{\
+. PRINT_FOOTER
+. if \\n[#HDRFTR_BOTH] \
+. HEADER_RECTO \\*[$HDR_RECTO_QUAD] "\\*[$HDR_RECTO_STRING]"
+. \}
+. \}
+. nr flex-spaces 0
+. nr flex +1
+. if \\n[#NEW_DOC_PT_SIZE] .nr #DOC_PT_SIZE \\n[#NEW_DOC_PT_SIZE]
+. rr #NEW_DOC_PT_SIZE
+. if \\n[#RESET_TRAPS] \{\
+. TRAPS
+. if \\n[#REMOVE_ADJ] .nr #DOC_LEAD -\\n[#DOC_LEAD_ADJ]
+. \}
+. rr #REMOVE_ADJ
+. rr #RESET_TRAPS
+. MNtop
+. rr #FROM_FOOTER
+. nr #FROM_HEADER 1
+. nr #LAST_FN_COUNT_FOR_COLS \\n[#FN_COUNT_FOR_COLS]
+. if \\n[#FN_DEPTH] .PROCESS_FN_LEFTOVER
+. rr #RULED
+. if \\n[#RESET_FN_NUMBER] .nr #FN_NUMBER 0 1
+. if !\\n[#DIVERTED] .rr #PREV_FN_DEFERRED
+. po \\n[#DOC_L_MARGIN]u
+. if \\n[#RECTO_VERSO] \{\
+. if !\\n[#TOC_RV_SWITCH]=2 \{\
+. nr #DOC_LR_MARGIN_TMP \\n[#DOC_L_MARGIN]
+. DOC_LEFT_MARGIN \\n[#DOC_R_MARGIN]u
+. if \\n[#CROPS] .DOC_LEFT_MARGIN \\n[#DOC_R_MARGIN]u+\\n[cropmarks]u
+. DOC_RIGHT_MARGIN \\n[#DOC_LR_MARGIN_TMP]u
+. if \\n[#CROPS] .DOC_RIGHT_MARGIN \\n[#DOC_LR_MARGIN_TMP]u-\\n[cropmarks]u
+. SWITCH_HDRFTR_CENTER_PAD
+. \}
+. \}
+. ev HEADER
+. if \\n[#PAGE_NUM_V_POS]=1 .vs 0
+. sp |\\n[#HEADER_MARGIN]u-1v
+. mk y
+. ll \\n[#DOC_L_LENGTH]u
+. ta \\n[.l]u
+. if \\n[#PRINT_STYLE]=1 \{\
+. fam \\*[$TYPEWRITER_FAM]
+. ft R
+. ps \\*[$TYPEWRITER_PS]\\*[$HDRFTR_SIZE_CHANGE]
+. \}
+. if \\n[#PRINT_STYLE]=2 \{\
+. fam \\*[$HDRFTR_FAM]
+. ft R
+. ps \\n[#DOC_PT_SIZE]u\\*[$HDRFTR_SIZE_CHANGE]
+. \}
+. nr #HDRFTR_PT_SIZE \\n[#PT_SIZE]
+. if \\n[#CAPS_ON] \{\
+. nr #CAPS_WAS_ON 1
+. CAPS OFF
+. \}
+. if \\n[#PRINT_STYLE]=1 \{\
+. if \\n[#ENDNOTES]=1 \{\
+.\" Single-spaced endnotes have a different lead
+. if \\n[#EN_SINGLESPACE] \{\
+. nr #RESTORE_DOC_LEAD \\n[#DOC_LEAD]
+. nr #DOC_LEAD \\n[#EN_LEAD]u
+. \}
+. \}
+. \}
+. if !n .nop \X'ps: exec 0 setlinejoin'\X'ps: exec 0 setlinecap'
+. sp -1v
+. if \\n[#DOC_TYPE]=5 \{\
+. if \\n[#SLIDE_HEADERS] \{\
+. HEADERS
+. if \\n[#SLIDE_FOOTERS] \{\
+. FOOTERS off
+.\" So rule prints after header on first page
+. if !r #SKIP_RULE \{\
+. sp
+. if \\n[#HEADER_RULE] .HEADER_RULE
+. nr #SKIP_RULE 1
+. \}
+. \}
+. \}
+. \}
+. ie \\n[#HEADERS_ON] .PRINT_HDRFTR
+. el \{\
+. if \\n[#PAGE_NUM_V_POS]=1 \
+. if \\n[#PAGINATE] .PRINT_PAGE_NUMBER
+. \}
+. sp |\\n[#T_MARGIN]u-\\n[#DOC_LEAD]u
+. if \\n[#PRINT_STYLE]=1 \{\
+. if \\n[#ENDNOTES]=1 \{\
+. if \\n[#EN_SINGLESPACE] \{\
+. nr #DOC_LEAD \\n[#RESTORE_DOC_LEAD]u
+. rr #RESTORE_DOC_LEAD
+. \}
+. \}
+. \}
+. nr #PAGE_TOP \\n[nl]
+. ev
+.\" PDF boxes
+. if \\n[pdfbx-running]=1 \{\
+. if !\\n[pdfbx-div-start] \{\
+. ps \\n[#SIZE_AT_FOOTER]u
+. SIZESPECS
+. ds pdfbx-cap-adj \\*[$CAP_HEIGHT]
+. ps
+. sp |\\n[t]u-\\n[#LEAD_AT_FOOTER]u
+. sp (\\*[wt\\n[stack]]/2u)+\\*[pdfbx-cap-adj]+\\*[gap\\n[stack]]u
+. ch FOOTER \\n[#VFP\\n[stack]]u
+. \}
+. \}
+. po \\n[#L_MARGIN]u
+. if \\n[#RECTO_VERSO] .nr #L_MARGIN +\\n[#L_MARGIN_DIFF]
+. if \\n[#CAPS_WAS_ON] \{\
+. CAPS
+. rr #CAPS_WAS_ON
+. \}
+. if \\n[#TAB_ACTIVE] .TAB \\n[#CURRENT_TAB]
+. if \\n[#QUOTE] \{\
+. ie \\n[#TAB_ACTIVE] .TAB \\n[#CURRENT_TAB]
+. el \{\
+. ie r #\\*[BQ]_OFFSET_VALUE .nr #\\*[BQ]_OFFSET \
+\\n[#L_MARGIN]+(\\n[#PP_INDENT]*\\n[#\\*[BQ]_OFFSET_VALUE])
+. el .nr #\\*[BQ]_OFFSET \\n[#L_MARGIN]+\\*[$\\*[BQ]_OFFSET_VALUE]
+. ie \\n[#QUOTE]=1 \{\
+. if !'\\*[$Q_QUAD]'CENTER' \
+. if !'\\*[$Q_QUAD]'RIGHT' \
+. po \\n[#Q_OFFSET]u
+. \}
+. el .po \\n[#\\*[BQ]_OFFSET]u
+. \}
+. if !\\n[pdfbx-running]=0 \{\
+. if \\n[#PRINT_STYLE]=2 .sp \\n[#Q_LEAD_DIFF]u
+. \}
+. \}
+. if \\n[#IN_LIST] \
+. po +\\n[#LIST_OFFSET_VALUE]u
+. if \\n[#RESET_FN_COUNTERS]=1 \{\
+. rr #RESET_FN_COUNTERS
+. PROCESS_FN_IN_DIVER
+. nr #FN_COUNT \\n[#SAVED_FN_COUNT] 1
+. if \\n[#COLUMNS]=1 .nr #FN_COUNT_FOR_COLS \\n[#SAVED_FN_COUNT_FOR_COLS] 1
+. ie \\n[#RESET_FN_NUMBER]=1 .nr #FN_NUMBER \\n[#SAVED_FN_NUMBER] 1
+. el .nr #FN_NUMBER \\n[#FN_NUMBER] 1
+. rm FN_IN_DIVER
+. if dRUNON_FN_IN_DIVER .rm RUNON_FN_IN_DIVER
+. \}
+. if \\n[#EPIGRAPH] \{\
+. ie \\n[#TAB_ACTIVE] .TAB \\n[#CURRENT_TAB]
+. el \{\
+. ie r#EPI_OFFSET_VALUE \
+. nr #EPI_OFFSET \
+\\n[#L_MARGIN]+(\\n[#PP_INDENT]*\\n[#EPI_OFFSET_VALUE])
+. el \
+. nr #EPI_OFFSET \\n[#L_MARGIN]+\\*[$EPI_OFFSET_VALUE]
+. po \\n[#EPI_OFFSET]u
+. \}
+. \}
+. ie \\n[#EPIGRAPH] \{\
+. ie !\\n[#EPI_ACTIVE] \{\
+. ns
+. rr #EPI_ACTIVE
+. \}
+. el \{\
+. ie \\n[#EPI_FITS] .ns
+. el .sp \\n[#DOC_LEAD]u-\\n[#EPI_LEAD]u
+. \}
+. \}
+. el .ns
+. if \\n[#COLUMNS] \{\
+. nr #FN_COUNT_FOR_COLS 0 1
+. nr #L_MARGIN \\n[#DOC_L_MARGIN]
+. if \\n[#RECTO_VERSO] .COLUMNS \\n[#NUM_COLS] \\n[#GUTTER]u
+. nr #COL_NUM 0 1
+. mk dc
+. po \\n[#COL_\\n+[#COL_NUM]_L_MARGIN]u
+. nr #L_MARGIN \\n[.o]
+. if \\n[#TAB_ACTIVE] .TAB \\n[#CURRENT_TAB]
+. ll \\n[#COL_L_LENGTH]u
+. ta \\n[.l]u
+. if \\n[#QUOTE] \{\
+. ie \\n[#\\*[BQ]_OFFSET_VALUE] \
+. po +(\\n[#PP_INDENT]u*\\n[#\\*[BQ]_OFFSET_VALUE]u)
+. el \
+. po +\\*[$\\*[BQ]_OFFSET_VALUE]
+. \}
+. if \\n[#EPIGRAPH] \{\
+. if \\n[#EPI_ACTIVE] \{\
+. ie \\n[#EPI_FITS] .
+. el .nr dc -\\n[#EPI_LEAD_DIFF]
+. \}
+. ie r#EPI_OFFSET_VALUE \{\
+. po \
+\\n[#COL_\\n[#COL_NUM]_L_MARGIN]u+(\\n[#PP_INDENT]u*\\n[#EPI_OFFSET_VALUE]u)
+. \}
+. el .po \\n[#COL_\\n[#COL_NUM]_L_MARGIN]u+\\*[$EPI_OFFSET_VALUE]
+. \}
+. \}
+. rr #FROM_HEADER
+. rr #DEFER_SPACE_ADDED
+. if !\\n[#FN_DEPTH] .if r #DIVERTED .rr #DIVERTED
+. if \\n[#MN_OVERFLOW_LEFT]=1 \{\
+. MN LEFT
+. nf
+. MN_OVERFLOW_LEFT
+. MN
+. \}
+. if \\n[#MN_OVERFLOW_RIGHT]=1 \{\
+. MN RIGHT
+. nf
+. MN_OVERFLOW_RIGHT
+. MN
+. \}
+. rm MN_OVERFLOW_LEFT
+. rr #MN_OVERFLOW_LEFT
+. rr #no-repeat-MN-left
+. rm MN_OVERFLOW_RIGHT
+. rr #MN_OVERFLOW_RIGHT
+. rr #no-repeat-MN-right
+. if \\n[#PRE_COLLATE]=1 .rr #PRE_COLLATE
+. if \\n[#UNDERLINE_WAS_ON]=1 \{\
+. vs 0
+. ie !n \
+. nop \R'#UNDERLINE_ON 1'\X'ps: exec \\n[_w] \\n[_d] decorline'
+. el .cu 1000
+. br
+. ns
+. rr #UNDERLINE_WAS_ON
+. \}
+. if \\n[#RESTORE_PAGINATION] \{\
+. PAGINATE
+. rr #RESTORE_PAGINATION
+. \}
+. ch RR_@TOP
+. ie \\n[tbl*have-header] .rr @TOP
+. el .wh \\n[nl]u+1u RR_@TOP
+. if \\n[#FLEX_ACTIVE] \{\
+. if \\n[#RESTORE_FLEX] \{\
+. rr #NO_FLEX
+. rr #RESTORE_FLEX
+. \}
+. if \\n[#RESTORE_COL_FLEX] \{\
+. rr #NO_FLEX
+. rr #RESTORE_COL_FLEX
+. \}
+. \}
+.\" Don't flex the last page/col, or the page/col before a COLLATE,
+.\" NEWPAGE, COL_NEXT, or BLANKPAGE.
+. if !dPDF.EXPORT \{\
+. if \\n[#FLEX_ACTIVE] \
+. if !\\n[#NO_FLEX] \
+. nr #RESTORE_FLEX 1
+. if '\\*[last-page]'\\n%@\\n[#COL_NUM]' \
+. if !\\n[#NO_FLEX] .nr #NO_FLEX 1
+. if '\\*[pre-collate-\\n%]'\\n%@\\n[#COL_NUM]' \
+. if !\\n[#NO_FLEX] .nr #NO_FLEX 1
+. if '\\*[pre-newpage-\\n%]'\\n%@\\n[#COL_NUM]' \
+. if !\\n[#NO_FLEX] .nr #NO_FLEX 1
+. if d page-\\n%@\\n[#COL_NUM] .nr #NO_FLEX 1
+. \}
+. ie \\n[defer] .PROCESS_FLOATS
+. el \{\
+.\" These two sets of conditions only occur if the .br in .TS causes
+.\" a page break.
+. if !\\n[doing-tbl] \{\
+. if (\\n[tbl*have-caption]=1)&(\\n[tbl*caption-after-label]=0) \{\
+. RESTORE_SPACE
+. if !\\n[span] \{\
+. ie \\n[#MLA] .sp \\n[tbl*label-lead-diff]u
+. el .sp \\n[tbl*caption-lead-diff]u
+. \}
+. \}
+. \}
+. \}
+.\" So tables without TH that don't fit don't overprint first row
+.\" at top of page
+. ie \\n[tbl*no-header] \{\
+. rs
+. nop \&
+. vpt
+. rr \\n[tbl*no-header]
+. SHIM_1
+. \}
+. el .vpt
+. if \\n[span] \{\
+. ev FLOAT
+. if \\n[#INDENT_LEFT_ACTIVE] .in \\n[#L_INDENT]u/2u
+. nf
+. RESTORE_SPACE
+. if !\\n[tbl*no-top-hook] \
+. if \\n[tbl*have-header:1] .tbl*print-header
+. ch FOOTER \\n[#VARIABLE_FOOTER_POS]u
+. ch FN_OVERFLOW_TRAP -\\n[#FN_OVERFLOW_TRAP_POS]u
+. \}
+. if !\\n[begin-tbl] \
+. if !r tbl*no-top-hook .tbl@top-hook
+. rr tbl*no-top-hook
+. if r flex:force .rr flex:force
+. rr ref*last
+. if !\\n[float*defer] .ev 0
+. if (\\n[pdfbx-running]=1):(\\n[#DOC_TYPE]=5) \{\
+. rr @TOP
+. ch RR_@TOP
+. \}
+. if \\n[pdfbx-running]=1 \
+. ch FOOTER \\n[#VFP\\n[stack]]u
+.END
+\#
+\# ====================================================================
+\#
+\# +++FOOTERS+++
+\#
+\# FOOTERS (off or on)
+\# -------------------
+\# *Arguments:
+\# <none> | <anything>
+\# *Function:
+\# Turns footers at the bottom of the page off or on.
+\# *Notes:
+\# Default is off. If on, page numbers automatically go at
+\# the top, centered, unless pagination has been turned off,
+\# or the pagenumber position has been changed to left or right.
+\#
+.MAC FOOTERS END
+. ie '\\$1'' \{\
+. rr #HEADERS_ON
+. nr #FOOTERS_ON 1
+. PAGENUM_POS TOP CENTER
+. \}
+. el .nr #FOOTERS_ON 0
+.END
+\#
+\# FOOTER MARGIN
+\# -------------
+\# *Argument:
+\# <footer margin>
+\# *Function:
+\# Creates or modifies register #FOOTER_MARGIN which holds the
+\# amount of space to leave between the page number and the bottom
+\# of the page.
+\# *Notes:
+\# Unit of measure required. Default is 3P.
+\#
+.MAC FOOTER_MARGIN END
+. ie \\n%>0 .nr #FOOTER_MARGIN (\\$1)
+. el .
+.END
+\#
+\# FOOTER GAP
+\# ----------
+\# *Argument:
+\# <distance from end of running text to page # or footer>
+\# *Function:
+\# Creates or modifies register #FOOTER_GAP which holds the
+\# amount of space to leave between running text and the page number.
+\# *Notes:
+\# Requires unit of measure. Default is 3P. Measured baseline to
+\# baseline.
+\#
+.MAC FOOTER_GAP END
+. ie \\n%>0 .nr #FOOTER_GAP (\\$1)
+. el .
+.END
+\#
+\# FOOTER
+\# ------
+\# *Arguments:
+\# <none>
+\# *Function:
+\# Gathers strings for flex-spacing, processes margin notes and
+\# footnotes, prepares for move to next column or page. Places
+\# footer at bottom of page if #FOOTERS=1, otherwise places page
+\# number at bottom of page (if #PAGINATE=1). Page numbers are
+\# in arabic or roman according to COPYSTYLE. DRAFT starts the
+\# document at page 1 regardless of PAGENUMBER. FINAL respects
+\# PAGENUMBER.
+\#
+.MAC FOOTER END
+. if r #START .rr #START
+. if \\n[pdfbx-running] \{\
+. if \\n[#FN_COUNT] \{\
+. nr pdfbx-fn-trap \\n[nl]+\\*[wt\\n[stack]]+\\*[gap\\n[stack]]
+. nop \!x X pdf: background footnote \\n[pdfbx-fn-trap]z
+. rr pdfbx-fn-trap
+. \}
+. \}
+. CALCULATE_FLEX
+. if \\n[#DOING_COVERTEXT] \{\
+. tm1 "[mom]: COVERTEXT exceeds cover page depth.
+. ab [mom]: Aborting '\\n[.F]'.
+. \}
+. vpt 0
+. rr #LB_4_HD
+. rr #QUOTE_4_HD
+. nr #LEAD_AT_FOOTER \\n[.v]
+. nr #SIZE_AT_FOOTER \\n[.ps]
+. if !r pg-trans .nr pg-trans 0 1
+. ev PAGE_TRANSITION\\n+[pg-trans]
+. pdfmarksuspend
+. ie !n .nop \X'ps: exec decornone'
+. el .cu 0
+. br
+. if \\n[#UNDERLINE_ON]=1 .nr #UNDERLINE_WAS_ON 1
+. if \\n[MN-left]>0 \{\
+. if !\\n[#no-repeat-MN-left]=1 \{\
+. MNbottom-left
+. nr #no-repeat-MN-left 1
+. \}
+. if '\\n[.z]'MN_OVERFLOW_LEFT' \{\
+. di
+. nr #MN_OVERFLOW_LEFT 1
+. rr #OVERFLOW_LEFT
+. \}
+. \}
+. if \\n[MN-right]>0 \{\
+. if !\\n[#no-repeat-MN-right]=1 .MNbottom-right
+. if '\\n[.z]'MN_OVERFLOW_RIGHT' \{\
+. di
+. nr #MN_OVERFLOW_RIGHT 1
+. rr #OVERFLOW_RIGHT
+. \}
+. \}
+\# Table bottom hook, draws the table borders in
+\# multipage boxed tables.
+. tbl@bottom-hook
+. ch MN_OVERFLOW_TRAP
+. nr #L_MARGIN_DIFF \\n[#L_MARGIN]-\\n[#DOC_L_MARGIN]
+. if !\\n[#FN_DEFER] \{\
+. nr #DIVER_DEPTH 0
+. if \\n[#FN_DEPTH] \{\
+. if \\n[#DIVERTED]=3 .nr #FN_DEPTH +\\n[#VFP_DIFF]
+. vpt 0
+. sp \
+|\\n[#PAGE_LENGTH]u-(\\n[#B_MARGIN]u+\\n[#FN_DEPTH]u-\\n[#DOC_LEAD]u)
+. vpt
+. po \\n[#DOC_L_MARGIN]u
+. if \\n[#COLUMNS] \{\
+. po \\n[#COL_\\n[#COL_NUM]_L_MARGIN]u
+. nr #L_MARGIN \\n[.o]
+. nr #FROM_FOOTER 1
+. \}
+. nf
+. ch FN_OVERFLOW_TRAP -\\n[#FN_OVERFLOW_TRAP_POS]u
+. FOOTNOTES
+. rm FOOTNOTES
+. if d RUNON_FOOTNOTES .rm RUNON_FOOTNOTES
+. if \\n[#PRINT_STYLE]=1 .vs \\n[#LEAD_AT_FOOTER]u
+. if \\n[#PRINT_STYLE]=2 .vs \\n[#LEAD_AT_FOOTER]u
+. if '\\n[.z]'FN_OVERFLOW' \{\
+. di
+. nr #FN_OVERFLOW_DEPTH \\n[#DIVER_DEPTH]
+. \}
+. nr #FN_COUNT_AT_FOOTER \\n[#FN_COUNT]
+. nr #FN_COUNT 0
+. if \\n[#COL_NEXT] \{\
+. ie !\\n[#COL_NUM]=\\n[#NUM_COLS] .nr #COL_NUM \\n-[#COL_NUM]
+. el .nr #COL_NUM \\n[#NUM_COLS] 1
+. \}
+. \}
+. rr #DIVERTED
+. \}
+. nr @TOP 1
+. ie \\n[#COLUMNS]=1 \{\
+. ie (\\n[#COL_NUM]=\\n[#NUM_COLS]):(\\n[#NEWPAGE]=1) \{\
+. rr #NEWPAGE
+. DO_FOOTER
+. \}
+. el \{\
+. ie (\\n[#ENDNOTES]=1):(\\n[#BIBLIOGRAPHY]=1) \{\
+. if \\n[#ENDNOTES] .sp |\\n[ec]u-\\n[#EN_LEAD]u
+. if \\n[#BIBLIOGRAPHY] .sp |\\n[bc]u-\\n[#BIB_LEAD]u
+. \}
+. el \{\
+. vs \\n[#LEAD_AT_FOOTER]u
+. rt \\n[dc]u
+. nr flex-spaces 0
+. \}
+. if d page-\\n%@\\n[#COL_NUM] \{\
+. rr #NO_FLEX
+. rr #RESTORE_COL_FLEX
+. \}
+. po \\n[#COL_\\n+[#COL_NUM]_L_MARGIN]u
+. if !dPDF.EXPORT \{\
+. if \\n[#FLEX_ACTIVE] \{\
+. if !\\n[#NO_FLEX] \{\
+. if '\\*[last-page]'\\n%@\\n[#COL_NUM]' \
+. nr #NO_FLEX 1
+. if '\\*[pre-collate]'\\n%@\\n[#COL_NUM]' \
+. nr #NO_FLEX 1
+. if '\\*[pre-newpage-\\n%]'\\n%@\\n[#COL_NUM]' \{\
+. nr #NO_FLEX 1
+. nr #RESTORE_FLEX 1
+. \}
+. if d page-\\n%@\\n[#COL_NUM] \{\
+. nr #NO_FLEX 1
+. nr #RESTORE_COL_FLEX 1
+. \}
+. \}
+. \}
+. \}
+. nr #L_MARGIN \\n[.o]
+. if \\n[#FN_DEPTH] .PROCESS_FN_LEFTOVER
+. vs \\n[#LEAD_AT_FOOTER]u
+. if \\n[#PREV_FN_DEFERRED] .nr #PREV_FN_DEFERRED 2
+. rr #RULED
+. if !\\n[#EPIGRAPH] .rr #COL_NEXT
+. if !\\n[#QUOTE] .rr #COL_NEXT
+. if \\n[#RESET_FN_COUNTERS]=1 \{\
+. rr #RESET_FN_COUNTERS
+. PROCESS_FN_IN_DIVER
+. LS \\n[#LEAD_AT_FOOTER]u
+. nr #FN_COUNT \\n[#FN_COUNT] 1
+. nr #FN_COUNT_FOR_COLS \\n[#FN_COUNT_FOR_COLS] 1
+. rm FN_IN_DIVER
+. if dRUNON_FN_IN_DIVER .rm RUNON_FN_IN_DIVER
+. \}
+. rr #DEFER_SPACE_ADDED
+. if \\n[#TAB_ACTIVE] .TAB \\n[#CURRENT_TAB]
+. if \\n[#QUOTE] \{\
+. ie \\n[#TAB_ACTIVE] .TAB \\n[#CURRENT_TAB]
+. el \{\
+. ie \\n[#Q_OFFSET_VALUE] \
+. nr #Q_OFFSET \
+\\n[#L_MARGIN]+(\\n[#PP_INDENT]*\\n[#Q_OFFSET_VALUE])
+. el \
+. nr #Q_OFFSET \\n[#L_MARGIN]+\\*[$Q_OFFSET_VALUE]
+. if \\n[#COLUMNS] \{\
+. ie \\n[#Q_OFFSET_VALUE] .nr #Q_OFFSET \
+\\n[#COL_\\n[#COL_NUM]_L_MARGIN]+(\\n[#PP_INDENT]*\\n[#Q_OFFSET_VALUE])
+. el .nr #Q_OFFSET \
+\\n[#COL_\\n[#COL_NUM]_L_MARGIN]+\\*[$Q_OFFSET_VALUE]
+. \}
+. po \\n[#Q_OFFSET]u
+. \}
+. \}
+. if \\n[#EPIGRAPH] \{\
+. ie \\n[#TAB_ACTIVE] .TAB \\n[#CURRENT_TAB]
+. el \{\
+. ie r#EPI_OFFSET_VALUE .nr #EPI_OFFSET \
+\\n[#L_MARGIN]+(\\n[#PP_INDENT]*\\n[#EPI_OFFSET_VALUE])
+. el .nr #EPI_OFFSET \
+\\n[#L_MARGIN]+\\*[$EPI_OFFSET_VALUE]
+. if \\n[#COLUMNS] \{\
+. ie r#EPI_OFFSET_VALUE .nr #EPI_OFFSET \
+\\n[#COL_\\n[#COL_NUM]_L_MARGIN]+(\\n[#PP_INDENT]*\\n[#EPI_OFFSET_VALUE])
+. el .nr #EPI_OFFSET \
+\\n[#COL_\\n[#COL_NUM]_L_MARGIN]+\\*[$EPI_OFFSET_VALUE]
+. \}
+. po \\n[#EPI_OFFSET]u
+. \}
+. \}
+. ie \\n[tbl*interrupted] \{\
+. tbl*print-header
+. rr tbl*interrupted
+. \}
+. el .if !r tbl*no-top-hook .tbl@top-hook
+. rr tbl*no-top-hook
+. ie \\n[#EPIGRAPH] \{\
+. ie !\\n[#EPI_ACTIVE] \{\
+. ns
+. rr #EPI_ACTIVE
+. \}
+. el \{\
+. sp |\\n[dc]u+(\\n[#DOC_LEAD]u-\\n[#EPI_LEAD]u)
+. rr #EPI_ACTIVE
+. \}
+. \}
+. el .ns
+. ev
+. \}
+. ns
+. rr #DIVERTED
+. ch RR_@TOP
+. wh \\n[nl]u+1u RR_@TOP
+. if \\n[tbl*have-header] .tbl@bottom-hook
+. if \\n[defer] .PROCESS_FLOATS
+. ie \\n[tbl*no-header] \{\
+. rs
+. nop \&
+. vpt
+. rr \\n[tbl*no-header]
+. SHIM_1
+. \}
+. el .vpt
+. if '\\n[.ev]'caption' .rs
+. if \\n[tbl*interrupted] .tbl*print-header
+. rr tbl*interrupted
+. \}
+. el .DO_FOOTER
+. pdfmarkrestart
+.END
+\#
+\# PROCESS FOOTER
+\# --------------
+\# *Arguments:
+\# <none>
+\# *Function:
+\# Prints footer (page number, or 3-part footer).
+\# Resets CAPS and UNDERLINE if they were on.
+\#
+.MAC DO_FOOTER END
+.\" Kill pdfbackground if BoxStop causes a page break
+. if r pdfbxstop \{\
+. pdfbackground off
+. rr pdfbx-running
+. \}
+.\" Part of workaround for refer spitting out a blank page if the
+.\" last reference falls on the bottom line.
+. if \\n[num*refs] \{\
+. if \\n[ref*num]=\\n[num*refs] \{\
+. rr num*refs
+. nr ref*last 1
+. \}
+. \}
+. ie !\\n[#DOC_TYPE]=5 .PRINT_FOOTER
+. el .vpt
+. if !\\n[ref*last] \{\
+. ie \\n[defer]>0 \{\
+\c
+' bp
+. \}
+. el 'bp
+. \}
+.END
+\#
+.MAC PRINT_FOOTER END
+. if r #SAVED_FOOTER_POS .ch FOOTER \\n[#SAVED_FOOTER_POS]u
+. rr #SAVED_FOOTER_POS
+. vpt 0
+. sp -1
+. ev FOOTER
+. ie n \
+. sp |\\n[#PAGE_LENGTH]u-\\n[#FOOTER_MARGIN]u
+. el \
+. sp |\\n[#PAGE_LENGTH]u-\\n[#FOOTER_MARGIN]u-\\n[#FOOTER_ADJ]u
+. mk y
+. UNDERLINE OFF
+. po \\n[#DOC_L_MARGIN]u
+. ll \\n[#DOC_L_LENGTH]u
+. ta \\n[.l]u
+. if \\n[#PRINT_STYLE]=1 .TYPEWRITER
+. if \\n[#PRINT_STYLE]=2 \{\
+. fam \\*[$HDRFTR_FAM]
+. ft R
+. ps \\n[#DOC_PT_SIZE]u\\*[$HDRFTR_SIZE_CHANGE]
+. \}
+. nr #HDRFTR_PT_SIZE \\n[#PT_SIZE]
+. if \\n[#CAPS_ON] \{\
+. nr #CAPS_WAS_ON 1
+. CAPS OFF
+. \}
+. ie \\n[#FOOTERS_ON] \{\
+. if !\\n[#SKIP_FOOTER]>0 .PRINT_HDRFTR
+. if \\n[#HDRFTR_BOTH] \
+. HEADER_RECTO \\*[$HDR_RECTO_QUAD] "\\*[$HDR_RECTO_STRING]"
+. if \\n[#DOC_TYPE]=5 .FOOTERS
+. \}
+. el \{\
+. if \\n[#PAGINATE] \{\
+. if \\n[#PAGE_NUM_V_POS]=2 \
+. if !\\n[#SKIP_FOOTER]>0 .PRINT_PAGE_NUMBER
+. \}
+. \}
+. rr #SKIP_FOOTER
+. if \\n[#CAPS_WAS_ON] \{\
+. CAPS
+. rr #CAPS_WAS_ON
+. \}
+. ev
+. vpt
+.END
+\#
+\# ====================================================================
+\#
+\# +++HEADERS AND FOOTERS+++
+\#
+\# HEADERS_AND_FOOTERS
+\# -------------------
+\# *Arguments:
+\# HEADER_RECTO_QUAD \
+\# HEADER_RECTO_STRING \
+\# FOOTER_RECTO_QUAD \
+\# FOOTER_RECTO_STRING \
+\# HEADER_VERSO_QUAD \
+\# HEADER_VERSO_STRING \
+\# FOOTER_VERSO_QUAD \
+\# FOOTER_VERSO_STRING
+\# | <anything>
+\# *Function:
+\# Allows having both headers and footers. Sets register
+\# #HDRFTR_BOTH to 1; collects HEADER/FOOTER_RECTO/VERSO
+\# information; appends FOOTER_RECTO and FOOTER_VERSO to
+\# START and turns off pagination; appends to macros
+\# PRINT_USERDEF_HDRFTR and HEADER the necessary number
+\# register manipulations and redefinitions of the
+\# HEADER/FOOTER_RECTO/VERSO strings so that both
+\# headers and footers get printed, with the appropriate
+\# strings for each
+\# *Notes:
+\# Works in conjunction with HDRFTR_RECTO and HDRFTR_VERSO (qqv.),
+\# ergo all style changes must be done inline in the strings
+\# passed as arguments.
+\#
+.MAC HEADERS_AND_FOOTERS END
+. ie \\n[#NUM_ARGS]>1 \{\
+. nr #HDRFTR_BOTH 1
+. nr #FOOTERS_ON 1
+. if !r#HEADER_RULE .nr #HEADER_RULE 1
+. if !r#FOOTER_RULE .nr #FOOTER_RULE 1
+. ds $HDR_RECTO_QUAD \\$1
+. ds $HDR_RECTO_STRING \\$2
+. ds $FTR_RECTO_QUAD \\$3
+. ds $FTR_RECTO_STRING \\$4
+. ds $HDR_VERSO_QUAD \\$5
+. ds $HDR_VERSO_STRING \\$6
+. ds $FTR_VERSO_QUAD \\$7
+. ds $FTR_VERSO_STRING \\$8
+.am START DONE
+. if \\\\n[#HDRFTR_BOTH]=1 \{\
+. FOOTER_RECTO \\\\*[$FTR_RECTO_QUAD] "\\\\*[$FTR_RECTO_STRING]"
+. FOOTER_VERSO \\\\*[$FTR_VERSO_QUAD] "\\\\*[$FTR_VERSO_STRING]"
+. if \\\\n[#HEADER_RULE]=1 .HEADER_RULE
+. ie \\\\n[#FOOTER_RULE]=1 .FOOTER_RULE
+. el .FOOTER_RULE OFF
+. if r #PAGINATE .rr #PAGINATE
+. if r #PAGE_NUM_V_POS .rr #PAGE_NUM_V_POS
+. \}
+.DONE
+.am PRINT_USERDEF_HDRFTR DONE
+. if \\\\n[#HDRFTR_BOTH]=1 \{\
+. if \\n[#FOOTERS_ON]=1 \{\
+. if !\\\\n[#COLLATE]=1 \{\
+. HEADER_RECTO \\*[$HDR_RECTO_QUAD] "\\*[$HDR_RECTO_STRING]"
+. HEADER_VERSO \\*[$HDR_VERSO_QUAD] "\\*[$HDR_VERSO_STRING]"
+. rr #FOOTERS_ON
+. nr #HEADERS_ON 1
+. ie \\\\n[#HEADER_RULE]=1 .HEADER_RULE
+. el .HEADER_RULE OFF
+. \}
+. \}
+. if \\n[#HEADERS_ON]=1 \{\
+. FOOTER_RECTO \\*[$FTR_RECTO_QUAD] "\\*[$FTR_RECTO_STRING]"
+. FOOTER_VERSO \\*[$FTR_VERSO_QUAD] "\\*[$FTR_VERSO_STRING]"
+. \}
+. \}
+.DONE
+.am HEADER DONE
+. if \\\\n[#HDRFTR_BOTH]=1 \{\
+. if r #START_FOR_FOOTERS .rr #START_FOR_FOOTERS
+. rr #HEADERS_ON
+. nr #FOOTERS_ON 1
+. FOOTER_RECTO \\*[$FTR_RECTO_QUAD] "\\*[$FTR_RECTO_STRING]"
+. FOOTER_VERSO \\*[$FTR_VERSO_QUAD] "\\*[$FTR_VERSO_STRING]"
+. ie \\\\n[#FOOTER_RULE]=1 .FOOTER_RULE
+. el .FOOTER_RULE OFF
+. \}
+.DONE
+. \}
+. el \{\
+. rr #HDRFTR_BOTH
+. rr #USERDEF_HDRFTR
+. rm $USERDEF_HDRFTR_RECTO
+. rm $USERDEF_HDRFTR_VERSO
+. FOOTERS OFF
+. HEADERS
+. if \\n[#COLLATE]=1 \{\
+. nr #HEADER_STATE 1
+. nr #PAGINATION_STATE 1
+. \}
+. PAGINATE
+. PAGENUM_POS BOTTOM CENTER
+. nr #HF_OFF 1
+. \}
+.END
+\#
+\# ====================================================================
+\#
+\# +++HEADINGS+++
+\#
+.char \[hd-num-spacer] \0
+.char \[parahead-spacer] \~\~
+.char \[toc-hd-num-spacer] \h'\w'\[en]'u'
+.ds toc-word-space \ \" ie an unbreakable space
+\#
+\# HEADING
+\# -------
+\# *Arguments:
+\# <heading level> [PARAHEAD] [NAMED <pdf-id>] <heading text>
+\# *Function:
+\# Assigns a heading level to the heading text and prints heading
+\# in the style set up for that level. If PARAHEAD given, the
+\# heading is attached to the body of the paragraph. If NAMED
+\# given, creates a target for pdf links. Collects the heading
+\# for the TOC and sets TOC indenting appropriate for the level.
+\# *Notes:
+\# If PARAHEAD given, HEADING must come after PP.
+\#
+.MAC HEADING END
+. ie !r pdfbx-top \{\
+' br
+. if \\n[@TOP] .br
+. \}
+. el \{\
+. if r pdfbx-running .nr pdfbx-top 1
+. \}
+. if !\B'\\$1' \{\
+. tm1 "[mom]: The first argument to \\$0 must be a numeric heading level.
+. ab [mom]: Aborting '\\n[.F]' at \\$0, line \\n[.c].
+. \}
+. if r #QUOTE .rr #QUOTE
+. if r #END_QUOTE .rr #END_QUOTE
+. if r #EPIGRAPH .rr #EPIGRAPH
+. vs \\n[#DOC_LEAD]u
+. if \\$1<\\n[#LEVEL] \
+. nr #ACTIVE_LEVELS \\n[#LEVEL] \" loop count for resetting numbering registers
+. nr #LAST_LEVEL \\n[#LEVEL] \" used during TOC collection, if SPACE_TOC_ITEMS
+. nr #LEVEL \\$1 \" resets #LEVEL to arg
+. shift
+. nr #ARG_NUM 0 1
+. while \\n+[#ARG_NUM]<=2 \{\
+. if '\\$1'NAMED' \{\
+. ds PDF_NM "\\$1 \\$2
+. shift 2 \" \\$1 is now heading text
+. \}
+. if '\\$1'PARAHEAD' \{\
+. nr #PARAHEAD 1
+. shift \" \\$1 is now NAMED, if we have it; otherwise heading text
+. \}
+. \}
+.\" Spacing
+. if \\n[#Q_LEAD_DIFF_CHECK] .sp -1
+. if \\n[.t]<\\n[.v] .nr nl-from-heading \\n[nl]
+. ie !\\n[#PARAHEAD] \{\
+. if !\\n[@TOP] \{\
+. nr #HEAD 1
+. ie !\\n[#START] \{\
+. nr #HEADING_NEEDS \\n[#NUM_ARGS]v+\\*[$HEAD_\\n[#LEVEL]_NEEDS]v+1v
+. if \\n[#HEAD_\\n[#LEVEL]_SPACE_AFTER] .nr #HEADING_NEEDS +1v
+. if \\n[.t]<\\n[#HEADING_NEEDS] .sp \\n[.t]u
+. vpt 0
+. if !r pdfbx-top \
+. if !\\n[#SPACE_ADDED] .if !\\n[#LINEBREAK] .sp
+. \}
+. el \{\
+. ie !\\n[#PP] \{\
+. rr #START
+. RESTORE_SPACE
+. if !\\n[#SPACE_ADDED] \
+. if !\\n[#COLUMNS] .sp
+. \}
+. el .sp
+. \}
+. if \\n[#EPIGRAPH] \
+. if \\n[#SINGLE_SPACE] .sp
+. \}
+. if \\n[#PP_SPACE] \
+. if \\n[#QUOTE_4_HD] .sp .5v
+. ie !\\n[#SPACE_ADDED] \{\
+. if !\\n[.ns] \{\
+. ie !\\n[#NO_SHIM] \
+. if !\\n[#HEAD_\\n[#LEVEL]_NO_SHIM] \
+. if !r pdfbx-top .SHIM
+. el \{\
+. if !\\n[#NO_FLEX] \
+. if !\\n[#HEAD_\\n[#LEVEL]_NO_FLEX] \
+. if !r pdfbx-top .FLEX
+. \}
+. \}
+. \}
+. el .rr #SPACE_ADDED
+. vpt
+. \}
+. el \{\
+. if \\n[#NUM_ARGS]>1 \{\
+. tm1 "[mom]: Error at line \\n[.c], \\$0.
+. tm1 " PARAHEAD may not be given more than 1 line of text.
+. ab [mom]: Aborting '\\n[.F]' at \\$0, line \\n[.c].
+. \}
+. vpt 0
+. if !(\\n[#PRINT_STYLE]=1)&(\\n[#SINGLE_SPACE]=1) .sp -1v
+. if \\n[#QUOTE_4_HD] \{\
+. sp -1v
+. if \\n[#PP_SPACE] \{\
+. sp .5v
+. SHIM
+. \}
+. \}
+. if (\\n[#QUOTE_4_HD]=0)&(\\n[#LB_4_HD]=0)&(\\n[#START]=0) \
+. if !\\n[#LB_4_PARAHEAD] .sp -1v
+. \}
+. ev HEADING
+. evc 0
+.\" Style
+. if \\n[#PRINT_STYLE]=2 \{\
+. fam \\*[$HEAD_\\n[#LEVEL]_FAM]
+. ft \\*[$HEAD_\\n[#LEVEL]_FT]
+. ps \\n[#DOC_PT_SIZE]u\\*[$HEAD_\\n[#LEVEL]_SIZE]
+. if r pdfbx-top \{\
+. SIZESPECS
+. ie \\n[#PP]=0 \{\
+. rt
+. ds pdfbx-cap-adj \\*[$CAP_HEIGHT]
+. sp (\\*[wt\\n[stack]]/2u)+\\*[pdfbx-cap-adj]+\\*[gap\\n[stack]]u
+. \}
+. el \{\
+. nr pdfbx-cap-adj \\*[$CAP_HEIGHT]-\\*[pdfbx-cap-adj]
+. sp \\n[pdfbx-cap-adj]u
+. \}
+. \}
+. nf
+. \}
+.\" Numbering
+. ds $TOC_HD_NUM_PREV \\*[$TOC_HD_NUM]
+. rm $TOC_HD_NUM
+. rm $PDF_HD_NUM
+. ie \\n[#NUMBER_HEAD_\\n[#LEVEL]] \{\
+. if \\n[#PREFIX_CH_NUM] .ds $HD_NUM \\n[#CH_NUM].
+. nr #HEAD_\\n[#LEVEL]_NUM +1 \" incremented manually here; still auto-increments
+.\" Reset numbering registers for headings beneath current level
+. nr @LEVEL \\n[#LEVEL] 1 \" loop step
+. nr #LOOP \\n[#ACTIVE_LEVELS] \" loop count
+. while \\n+[@LEVEL]<=\\n[#LOOP] \
+. if \\n[#HEAD_\\n[@LEVEL]_NUM] \
+. nr #HEAD_\\n[@LEVEL]_NUM 0 1
+.\" Build numbering strings for body and toc
+. nr @LEVEL 0 1 \" loop step
+. nr #LOOP \\n[#LEVEL] \" loop count
+. while \\n+[@LEVEL]<=\\n[#LOOP] \
+. if \\n[#HEAD_\\n[@LEVEL]_NUM] \
+. as $HD_NUM \\n[#HEAD_\\n[@LEVEL]_NUM].
+. ie \\n[#TRUNC_TOC_HD_NUM] \
+. ds $TOC_HD_NUM \\n[#HEAD_\\n[#LEVEL]_NUM].
+. el .ds $TOC_HD_NUM \\*[$HD_NUM]
+. if \\n[#LEVEL]=1 \
+. ds $TOC_HD_NUM_PREV \\*[$TOC_HD_NUM]
+. if \\n[#TOC_NO_HD_NUM] .rm $TOC_HD_NUM
+. if !\\n[#HEAD_\\n[#LEVEL]_NUM]] .rm $TOC_HD_NUM
+. as $HD_NUM \[hd-num-spacer]
+. ds $PDF_HD_NUM \\*[$TOC_HD_NUM]
+. if !'\\*[$TOC_HD_NUM]'' .as $TOC_HD_NUM \[toc-hd-num-spacer]
+. if !'\\*[$PDF_HD_NUM]'' .as $PDF_HD_NUM " "
+. \}
+. el .nr @LEVEL \\n[#LEVEL] 1
+.\" TOC collection and formatting
+. nr #TOC_ENTRY_PN \\n%+\\n[#PAGE_NUM_ADJ]
+. af #TOC_ENTRY_PN \\g[#PAGENUMBER]
+. nr #ARG_NUM 0 1
+. while \\n[#ARG_NUM]<\\n[#NUM_ARGS] \{\
+. as $TOC_HEAD_\\n[#LEVEL]_ITEM "\\$[\\n+[#ARG_NUM]]
+. if \\n[#NUM_ARGS]>\\n[#ARG_NUM] \
+. as $TOC_HEAD_\\n[#LEVEL]_ITEM "\\*[toc-word-space]
+. \}
+. PDF_BOOKMARK \
+ \\*[PDF_NM] \\n[#LEVEL]+1 \
+ \\*[$PDF_HD_NUM] \\*[$TOC_HEAD_\\n[#LEVEL]_ITEM]
+. rm PDF_NM
+. rm $PDF_HD_NUM
+. ev TOC_EV
+. ie \\n[#PRINT_STYLE]=1 \{\
+. fam \\*[$TYPEWRITER_FAM]
+. ft R
+. ps \\*[$TYPEWRITER_PS]
+. \}
+. el \{\
+. FAMILY \\*[$TOC_HEAD_\\n[#LEVEL]_FAM]
+. FT \\*[$TOC_HEAD_\\n[#LEVEL]_FT]
+. ps \\n[#TOC_PS]u\\*[$TOC_HEAD_\\n[#LEVEL]_SIZE]
+. \}
+.\" Indents for TOC heading levels.
+.\" First, numbered heads. @LEVEL here is #LEVEL+1
+. ie \\n[#NUMBER_HEAD_\\n[#LEVEL]] \{\
+. ie !\\n[#TOC_NO_HD_NUM] \{\
+. ie \\n[#TRUNC_TOC_HD_NUM] \{\
+. if !\\n[#TOC_HEAD_\\n[@LEVEL]_INDENT_SET] \{\
+. ie !\\n[#FROM_STYLE_\\n[@LEVEL]] \{\
+. ie !\\n[#NUMBER_HEAD_\\n[@LEVEL]] \
+. nr #TOC_HEAD_\\n[@LEVEL]_INDENT \
+\\n[#TOC_HEAD_\\n-[@LEVEL]_INDENT]+\
+\w'\\*[$TOC_HD_NUM]'+\
+1.5m
+. el \
+. nr #TOC_HEAD_\\n[@LEVEL]_INDENT \
+\\n[#TOC_HEAD_\\n-[@LEVEL]_INDENT]+\
+\w'\\*[$TOC_HD_NUM]'
+. \}
+. el \
+. nr #TOC_HEAD_\\n[@LEVEL]_INDENT \
+ \\n[#TOC_HEAD_\\n-[@LEVEL]_INDENT]
+. \}
+. \}
+. el \{\
+. if !\\n[#TOC_HEAD_\\n[@LEVEL]_INDENT_SET] \{\
+. ie !\\n[#FROM_STYLE_\\n[@LEVEL]] \{\
+. ie \\n[#NUMBER_HEAD_\\n-[@LEVEL]] \{\
+. ie !\\n[#NUMBER_HEAD_\\n+[@LEVEL]] \
+. nr #TOC_HEAD_\\n[@LEVEL]_INDENT \
+\\n[#TOC_HEAD_\\n-[@LEVEL]_INDENT]+\
+\w'\\*[$TOC_HD_NUM_PREV]'+\
+1.5m
+. el \{\
+.\" Get the number of digits in the chapter number
+. ds ch-num-width \\n[#CH_NUM]
+. length ch-num-width \\*[ch-num-width]
+. nr ch-num-width -1
+. nr num-ch-digits \w'\0'*\\n[ch-num-width]
+. nr #TOC_HEAD_\\n[@LEVEL]_INDENT \
+\\n[#TOC_HEAD_\\n-[@LEVEL]_INDENT]+\
+\\n[num-ch-digits]+\
+\w'.\[toc-hd-num-spacer]'
+. \}
+. \}
+. el \
+. nr #TOC_HEAD_\\n[@LEVEL]_INDENT \
+\\n[#TOC_HEAD_\\n-[@LEVEL]_INDENT]+\
+\w'\\n[#TOC_HD_NUM].'
+. ie \\n[#LEVEL]=1 \
+. nr #TOC_HEAD_\\n+[@LEVEL]_INDENT +\w'\0'
+. el \{\
+. if !\\n[#NUMBER_HEAD_\\n[@LEVEL]] \{\
+. nr @LEVEL \\n+[@LEVEL] 1
+. nr #TOC_HEAD_\\n+[@LEVEL]_INDENT +\w'\0'
+. \}
+. \}
+. \}
+. el \
+. nr #TOC_HEAD_\\n[@LEVEL]_INDENT \
+\\n[#TOC_HEAD_\\n-[@LEVEL]_INDENT]+\
+\\n[#TOC_HEAD_\\n+[@LEVEL]_INDENT]
+. \}
+. if \\n[#LEVEL]=1 \{\
+. if \\n[#NUMBER_HEAD_\\n[@LEVEL]] \{\
+. if \\n[#PREFIX_CH_NUM] \
+. nr #TOC_HEAD_\\n[@LEVEL]_INDENT \
+\w'\\*[$TOC_HD_NUM]'
+. \}
+. \}
+. \}
+. \}
+. el \{\
+. ie !\\n[#FROM_STYLE_\\n[@LEVEL]] \{\
+. if !\\n[#TOC_HEAD_\\n[@LEVEL]_INDENT_SET] \
+. nr #TOC_HEAD_\\n[@LEVEL]_INDENT \
+ \\n[#TOC_HEAD_\\n-[@LEVEL]_INDENT]+1.5m
+. \}
+. el \{\
+. if !\\n[#TOC_HEAD_\\n[@LEVEL]_INDENT_SET] \
+. nr #TOC_HEAD_\\n[@LEVEL]_INDENT \
+\\n[#TOC_HEAD_\\n-[@LEVEL]_INDENT]+\
+\\n[#TOC_HEAD_\\n+[@LEVEL]_INDENT]
+. \}
+. \}
+. \}
+.\" Non-numbered heads
+. el \{\
+. nr @LEVEL \\n[#LEVEL] 1
+.\" increments @LEVEL even if false
+. ie \\n[#FROM_STYLE_\\n+[@LEVEL]] \{\
+. if !\\n[#TOC_HEAD_\\n[@LEVEL]_INDENT_SET] \{\
+. nr #TOC_HEAD_\\n[@LEVEL]_INDENT \
+\\n[#TOC_HEAD_\\n[#LEVEL]_INDENT]+\
+\\n[#TOC_HEAD_\\n[@LEVEL]_INDENT]
+. if !\\n[#LEVEL]=\\n[#LAST_LEVEL] \{\
+. if \\n[#NUMBER_HEAD_\\n[@LEVEL]] \
+. nr #TOC_HEAD_\\n[#LEVEL]_INDENT \
+\\n[#TOC_HEAD_\\n[@LEVEL]_INDENT]+\
+\w'\\*[$TOC_HD_NUM_PREV]'
+. \}
+. \}
+. \}
+. el \{\
+. nr #TOC_HEAD_\\n[@LEVEL]_INDENT \
+ \\n[#TOC_HEAD_\\n-[@LEVEL]_INDENT]+1.5m
+. if \\n[#LEVEL]=1 \{\
+. if !\\n[#FROM_STYLE_1] \
+. nr #TOC_HEAD_1_INDENT 0
+. \}
+. \}
+. \}
+. nr #TOC_HEAD_\\n[@LEVEL]_INDENT_SET 1
+. HD_TO_TOC
+. rm $TOC_HEAD_\\n[#LEVEL]_ITEM
+.\" Print heading
+. if !\\n[#PARAHEAD] .\\*[$HEAD_\\n[#LEVEL]_QUAD]
+. if \\n[#CAPS_ON] \{\
+. CAPS OFF
+. nr #CAPS_RESTORE 1
+. \}
+. if \\n[#HEAD_\\n[#LEVEL]_CAPS] \{\
+. CAPS
+. nr #CAPS_OFF 1
+. \}
+. if \\n[#SMALLCAPS_ON] \{\
+. SMALLCAPS OFF
+. nr #SMALLCAPS_RESTORE 1
+. \}
+. if \\n[#HEAD_\\n[#LEVEL]_SMALLCAPS] \{\
+. SMALLCAPS
+. nr #SMALLCAPS_OFF 1
+. \}
+. if !'\\*[$HEAD_\\n[#LEVEL]_COLOR]'' \
+. COLOR \\*[$HEAD_\\n[#LEVEL]_COLOR]
+. nop \X'ps: exec decornone'\c
+. if r pdfbx-top \{\
+. ds $RESTORE_ADJ \\*[$HEAD_\\n[#LEVEL]_BASELINE_ADJ]
+. ds $HEAD_\\n[#LEVEL]_BASELINE_ADJ 0
+. \}
+. nr #ARG_NUM 0 1
+. while \\n+[#ARG_NUM]<=\\n[#NUM_ARGS] \{\
+. if \\n[#PARAHEAD] \
+. nr #PP_TEXT_OFFSET \
+ \w'\\*[$HD_NUM]\\$[\\n[#ARG_NUM]]'+\w'\[parahead-spacer]'
+. if (\\n[#HEAD_\\n[#LEVEL]_UNDERSCORE]=0)&(\\n[#HEAD_\\n[#LEVEL]_UNDERSCORE2]=0) \{\
+. ie \\n[#HD_NUM_INDENT] \{\
+. if !'\\*[$HEAD_\\n[#LEVEL]_QUAD]'CENTER' \
+. ti \\n[#HD_NUM_INDENT]u
+. PRINT \
+"\v'-\\*[$HEAD_\\n[#LEVEL]_BASELINE_ADJ]'\\$[\\n[#ARG_NUM]]
+. br
+. \}
+. el \{\
+. ie !\\n[#PARAHEAD] \{\
+. PRINT \
+"\v'-\\*[$HEAD_\\n[#LEVEL]_BASELINE_ADJ]'\\*[$HD_NUM]\\$[\\n[#ARG_NUM]]
+. br
+. \}
+. el \{\
+. if (\\n[#PP]>0):(\\n[#INDENT_FIRST_PARAS]) \{\
+. if !\\n[#LB_4_PARAHEAD] \{\
+. if !\\n[#START] \{\
+. if \\n[#PP_ACTIVE] \{\
+. ie \\n[#PP]=1 .br
+. el \{\
+. nr #PP_TEXT_OFFSET +\\n[#PP_INDENT]
+. ie !\\n[pdfbx-running] .ti \\n[#PP_INDENT]u
+. el .ti \\n[#PP_INDENT]u+\\*[wt\\n[stack]]+\\*[gap\\n[stack]]u
+. \}
+. \}
+. \}
+. \}
+. \}
+. ie \\n[#PRINT_STYLE]=1 \
+. PRINT "\\*[UL]\\*[$HD_NUM]\\$[\\n[#ARG_NUM]]\\*[ULX]
+. el .PRINT "\\*[$HD_NUM]\\$[\\n[#ARG_NUM]]
+. rr #LB_4_PARAHEAD
+. sp -1v
+. \}
+. \}
+. \}
+. if \\n[#HEAD_\\n[#LEVEL]_UNDERSCORE] \{\
+. nr #SAVED_UL_WEIGHT \\n[#UNDERSCORE_WEIGHT]
+. UNDERSCORE_WEIGHT \\*[$HEAD_\\n[#LEVEL]_UL_WEIGHT]
+. ie \\n[#HD_NUM_INDENT] \{\
+. if !'\\*[$HEAD_\\n[#LEVEL]_QUAD]'CENTER' \
+. ti \\n[#HD_NUM_INDENT]u
+. UNDERSCORE \\*[$HEAD_\\n[#LEVEL]_UL_GAP] \
+ "\v'-\\*[$HEAD_\\n[#LEVEL]_BASELINE_ADJ]'\\$[\\n[#ARG_NUM]]
+. br
+. \}
+. el \{\
+. ie !\\n[#PARAHEAD] \{\
+. UNDERSCORE \\*[$HEAD_\\n[#LEVEL]_UL_GAP] \
+"\v'-\\*[$HEAD_\\n[#LEVEL]_BASELINE_ADJ]'\\*[$HD_NUM]\\$[\\n[#ARG_NUM]]
+. br
+. \}
+. el \{\
+. if (\\n[#PP]>0):(\\n[#INDENT_FIRST_PARAS]) \{\
+. if !\\n[#LB_4_HD] \{\
+. if !\\n[#START] \{\
+. if \\n[#PP_ACTIVE] \{\
+. nr #PP_TEXT_OFFSET +\\n[#PP_INDENT]
+. if (\\n[#PRINT_STYLE]=1)&(\\n[#SINGLE_SPACE]=1) .sp -1v
+. ti \\n[#PP_INDENT]u
+. \}
+. \}
+. \}
+. \}
+. UNDERSCORE \\*[$HEAD_\\n[#LEVEL]_UL_GAP] \
+ "\\*[$HD_NUM]\\$[\\n[#ARG_NUM]]
+. sp -1v
+. \}
+. \}
+. nr #UNDERSCORE_WEIGHT \\n[#SAVED_UL_WEIGHT]
+. \}
+. if \\n[#HEAD_\\n[#LEVEL]_UNDERSCORE2] \{\
+. nr #SAVED_UL2_WEIGHT \\n[#UNDERSCORE_WEIGHT]
+. UNDERSCORE_WEIGHT \\*[$HEAD_\\n[#LEVEL]_UL2_WEIGHT]
+. ie \\n[#HD_NUM_INDENT] \{\
+. if !'\\*[$HEAD_\\n[#LEVEL]_QUAD]'CENTER' \
+. ti \\n[#HD_NUM_INDENT]u
+. UNDERSCORE2 \\*[$HEAD_\\n[#LEVEL]_UL2_GAP_1] \
+ \\*[$HEAD_\\n[#LEVEL]_UL2_GAP_2] \
+ "\v'-\\*[$HEAD_\\n[#LEVEL]_BASELINE_ADJ]'\\$[\\n[#ARG_NUM]]
+. br
+. \}
+. el \{\
+. ie !\\n[#PARAHEAD] \{\
+. UNDERSCORE2 \\*[$HEAD_\\n[#LEVEL]_UL2_GAP_1] \
+ \\*[$HEAD_\\n[#LEVEL]_UL2_GAP_2] \
+"\v'-\\*[$HEAD_\\n[#LEVEL]_BASELINE_ADJ]'\\*[$HD_NUM]\\$[\\n[#ARG_NUM]]
+. br
+. \}
+. el \{\
+. if (\\n[#PP]>0):(\\n[#INDENT_FIRST_PARAS]) \{\
+. if !\\n[#LB_4_HD] \{\
+. if !\\n[#START] \{\
+. if \\n[#PP_ACTIVE] \{\
+. nr #PP_TEXT_OFFSET +\\n[#PP_INDENT]
+. if (\\n[#PRINT_STYLE]=1)&(\\n[#SINGLE_SPACE]=1) \
+. sp -1v
+. ti \\n[#PP_INDENT]u
+. \}
+. \}
+. \}
+. \}
+. UNDERSCORE2 \\*[$HEAD_\\n[#LEVEL]_UL2_GAP_1] \
+\\*[$HEAD_\\n[#LEVEL]_UL2_GAP_2] "\\*[$HD_NUM]\\$[\\n[#ARG_NUM]]
+. sp -1v
+. \}
+. \}
+. nr #UNDERSCORE_WEIGHT \\n[#SAVED_UL2_WEIGHT]
+. \}
+. if !\\n[#HD_NUM_INDENT] .nr #HD_NUM_INDENT \w'\\*[$HD_NUM]'
+. \}
+. if r pdfbx-top \{\
+. ds $HEAD_\\n[#LEVEL]_BASELINE_ADJ \\*[$RESTORE_ADJ]
+. if !\\n[#PARAHEAD] .sp \\*[$HEAD_\\n[#LEVEL]_BASELINE_ADJ]
+. \}
+. if !\\n[#PARAHEAD] \
+. if \\n[#HEAD_\\n[#LEVEL]_SPACE_AFTER] .sp
+. if \\n[#CAPS_OFF] \{\
+. CAPS OFF
+. rr #CAPS_OFF
+. \}
+. if \\n[#CAPS_RESTORE] \{\
+. CAPS
+. rr #CAPS_RESTORE
+. \}
+. if \\n[#SMALLCAPS_OFF] \{\
+. SMALLCAPS OFF
+. rr #SMALLCAPS_OFF
+. \}
+. if \\n[#SMALLCAPS_RESTORE] \{\
+. SMALLCAPS
+. rr #SMALLCAPS_RESTORE
+. \}
+. ev
+. rm $HD_NUM
+. rr #HD_NUM_INDENT
+. if \\n[@TOP] \{\
+. ch RR_@TOP
+. rr @TOP
+. rs
+. nop \&
+. sp -1
+. \}
+. if \\n[#PARAHEAD] \{\
+. ie !\\n[pdfbx-running] .ti \\n[#PP_TEXT_OFFSET]u
+. el .ti \\n[#PP_TEXT_OFFSET]u+\\*[wt\\n[stack]]+\\*[gap\\n[stack]]u
+. \}
+. if !\\n[#PARAHEAD] .nr #PP 0
+. rr #PARAHEAD
+. if \\n[#LB_4_HD] .rr #LB_4_HD
+. if \\n[#QUOTE_4_HD] .rr #QUOTE_4_HD
+. vpt
+. rr nl-from-heading
+. if r pdfbx-top \{\
+. rr pdfbx-top
+. nr pdfbx-top\\n[stack] 1
+. \}
+.END
+\#
+\# HEADING_STYLE
+\# -------------
+\# *Arguments:
+\# <level>
+\# FAMILY <family>
+\# FONT <font>
+\# SIZE <+|-n>
+\# COLOR <color>
+\# CAPS | NO_CAPS
+\#---when called as HEADING_STYLE, these are also available---
+\# QUAD <direction>
+\# NUMBER | NO_NUMBER
+\# SPACE_AFTER | NO_SPACE_AFTER
+\# UNDERSCORE <weight> <gap> | UNDERSCORE2 <weight> <gap1> <gap2>
+\# NO_UNDERSCORE | NO_UNDERSCORE2
+\# BASELINE_ADJUST
+\#---when called as TOC_ENTRY_STYLE this is also available---
+\# INDENT
+\# *Function:
+\# Sets up complete style parameters for HEADING <level>. If
+\# invoked as TOC_ENTRY_STYLE, sets up parameters for the
+\# corresponding TOC entry at <level>.
+\# *Notes:
+\# Arguments may be given in any order. Any not given retain
+\# their current values. Defaults for an initial 9 levels of
+\# heading are set up in PRINTSTYLE.
+\#
+\# NUMBER indicates that hierarchic numbering of <level> should be
+\# prepended to heading text. If invoked as TOC_ENTRY_STYLE,
+\# prepend numbering to TOC entries at <level> (only works if
+\# NUMBER is given to the corresponding HEADING <level>).
+\#
+\# INDENT refers to the indent for <level> in the TOC. It is
+\# measured from the left offset of the entry level above it
+\# (including numbering, if present). TOC entry levels beneath
+\# <level> will have their indents adjusted accordingly.
+\#
+.MAC HEADING_STYLE END
+. if !'\\$0'TOC_HEADING_STYLE' \{\
+. if !\B'\\$1' \{\
+. tm1 "[mom]: The first argument to \\$0 must be a numeric heading level.
+. ab [mom]: Aborting '\\n[.F]' at \\$0, line \\n[.c].
+. \}
+. nr #LEVEL \\$1
+. if \\n[#FROM_OLDSTYLE] .nr #LEVEL_\\n[#LEVEL]_SET 1
+. shift
+.\" Prepend TOC_ to style strings if called as TOC_ENTRY_STYLE
+. \}
+. if '\\$0'TOC_ENTRY_STYLE' .ds $TOC TOC_
+. nr #ARG_NUM 0 1
+. nr #ATTRIB \\n[#NUM_ARGS]
+. while \\n+[#ARG_NUM]<=\\n[#ATTRIB] \{\
+. if '\\$1'UNDERSCORE' \{\
+. nr #HEAD_\\n[#LEVEL]_UNDERSCORE 1
+. shift
+. if '\\$1'' \{\
+. tm1 "[mom]: The UNDERSCORE argument to \\$0 requires a rule weight.
+. ab [mom]: Aborting '\\n[.F]' at \\$0, line \\n[.c].
+. \}
+. ds $HEAD_\\n[#LEVEL]_UL_WEIGHT \\$1
+. shift
+. if '\\$1'' \{\
+. tm1 "[mom]: The UNDERSCORE argument to \\$0 requires a rule gap.
+. ab [mom]: Aborting '\\n[.F]' at \\$0, line \\n[.c].
+. \}
+. ds $HEAD_\\n[#LEVEL]_UL_GAP \\$1
+. shift
+. \}
+. if '\\$1'NO_UNDERSCORE' \{\
+. rr #HEAD_\\n[#LEVEL]_UNDERSCORE
+. shift
+. \}
+. if '\\$1'UNDERSCORE2' \{\
+. nr #HEAD_\\n[#LEVEL]_UNDERSCORE2 1
+. shift
+. if '\\$1'' \{\
+. tm1 "[mom]: The UNDERSCORE2 argument to \\$0 requires a rule weight.
+. ab [mom]: Aborting '\\n[.F]' at \\$0, line \\n[.c].
+. \}
+. ds $HEAD_\\n[#LEVEL]_UL2_WEIGHT \\$1
+. shift
+. if '\\$1'' \{\
+. tm1 "[mom]: The UNDERSCORE2 argument to \\$0 requires a rule gap.
+. ab [mom]: Aborting '\\n[.F]' at \\$0, line \\n[.c].
+. \}
+. ds $HEAD_\\n[#LEVEL]_UL2_GAP_1 \\$1
+. shift
+. if '\\$1'' \{\
+. tm1 "[mom]: The UNDERSCORE2 argument to \\$0 requires an inter-rule gap.
+. ab [mom]: Aborting '\\n[.F]' at \\$0, line \\n[.c].
+. \}
+. ds $HEAD_\\n[#LEVEL]_UL2_GAP_2 \\$1
+. shift
+. \}
+. if '\\$1'NO_UNDERSCORE2' \{\
+. rr #HEAD_\\n[#LEVEL]_UNDERSCORE2
+. shift
+. \}
+. if '\\$1'SPACE_ABOVE' \{\
+. shift
+. ds $SPACE_ABOVE \\$1
+. shift
+. \}
+. if '\\$1'SPACE_BENEATH' \{\
+. shift
+. ds $SPACE_BENEATH \\$1
+. shift
+. \}
+. if '\\$1'SPACE_AFTER' \{\
+. nr #HEAD_\\n[#LEVEL]_SPACE_AFTER 1
+. shift
+. \}
+. if '\\$1'NO_SPACE_AFTER' \{\
+. rr #HEAD_\\n[#LEVEL]_SPACE_AFTER
+. shift
+. \}
+. if '\\$1'FAMILY' \{\
+. shift
+. ds $\\*[$TOC]HEAD_\\n[#LEVEL]_FAM \\$1
+. if '\\$0'TOC_HEADING_STYLE' .ds $TOC_HEADING_FAM \\$1
+. shift
+. \}
+. if '\\$1'FONT' \{\
+. shift
+. ds $\\*[$TOC]HEAD_\\n[#LEVEL]_FT \\$1
+. if '\\$0'TOC_HEADING_STYLE' .ds $TOC_HEADING_FT \\$1
+. shift
+. \}
+. if '\\$1'SIZE' \{\
+. shift
+. ds $\\*[$TOC]HEAD_\\n[#LEVEL]_SIZE \\$1
+. if '\\$0'TOC_HEADING_STYLE' .ds $TOC_HEADING_SIZE \\$1
+. shift
+. \}
+. if '\\$1'QUAD' \{\
+. shift
+. ds $QUAD_TYPE \\$1
+. substring $QUAD_TYPE 0 0
+. ie !'\\$0'TOC_HEADING_STYLE' \{\
+. if '\\*[$QUAD_TYPE]'L' .ds $HEAD_\\n[#LEVEL]_QUAD LEFT
+. if '\\*[$QUAD_TYPE]'C' .ds $HEAD_\\n[#LEVEL]_QUAD CENTER
+. if '\\*[$QUAD_TYPE]'R' .ds $HEAD_\\n[#LEVEL]_QUAD RIGHT
+. \}
+. el \{\
+. if '\\*[$QUAD_TYPE]'L' .ds $TOC_HEADING_QUAD LEFT
+. if '\\*[$QUAD_TYPE]'C' .ds $TOC_HEADING_QUAD CENTER
+. if '\\*[$QUAD_TYPE]'R' .ds $TOC_HEADING_QUAD RIGHT
+. \}
+. shift
+. \}
+. if '\\$1'COLOR' \{\
+. shift
+. ds $\\*[$TOC]HEAD_\\n[#LEVEL]_COLOR \\$1
+. if '\\$0'TOC_HEADING_STYLE' .ds $TOC_HEADING_COLOR \\$1
+. shift
+. \}
+. if '\\$1'BASELINE_ADJUST' \{\
+. shift
+. ds $HEAD_\\n[#LEVEL]_BASELINE_ADJ \\$1
+. shift
+. \}
+. if '\\$1'CAPS' \{\
+. nr #\\*[$TOC]HEAD_\\n[#LEVEL]_CAPS 1
+. shift
+. \}
+. if '\\$1'NO_CAPS' \{\
+. rr #HEAD_\\n[#LEVEL]_CAPS
+. shift
+. \}
+. if '\\$1'SMALLCAPS' \{\
+. nr #\\*[$TOC]HEAD_\\n[#LEVEL]_SMALLCAPS 1
+. shift
+. \}
+. if '\\$1'NO_SMALLCAPS' \{\
+. rr #HEAD_\\n[#LEVEL]_SMALLCAPS
+. shift
+. \}
+. if '\\$1'NUMBER' \{\
+. nr #NUMBER_HEAD_\\n[#LEVEL] 1
+. nr #HEAD_\\n[#LEVEL]_NUM 0 1
+. shift
+. \}
+. if '\\$1'NO_NUMBER' \{\
+. rr #NUMBER_HEAD_\\n[#LEVEL]
+. shift
+. \}
+. if '\\$1'PREFIX_CHAPTER' \{\
+. shift
+. ie \B'\\$1' \{\
+. PREFIX_CHAPTER_NUMBER \\$1
+. \}
+. el .PREFIX_CHAPTER_NUMBER
+. \}
+. if '\\$1'INDENT' \{\
+. shift
+. nr #TOC_HEAD_\\n[#LEVEL]_INDENT \\$1
+. nr #FROM_STYLE_\\n[#LEVEL] 1
+. shift
+. \}
+. if '\\$1'NEEDS' \{\
+. shift
+. ds $HEAD_\\n[#LEVEL]_NEEDS \\$1
+. shift
+. \}
+. if '\\$1'SHIM' \{\
+. rr #HEAD_\\n[#LEVEL]_NO_SHIM
+. shift
+. \}
+. if '\\$1'NO_SHIM' \{\
+. nr #HEAD_\\n[#LEVEL]_NO_SHIM 1
+. shift
+. \}
+. if '\\$1'FLEX' \{\
+. rr #HEAD_\\n[#LEVEL]_NO_FLEX
+. shift
+. \}
+. if '\\$1'NO_FLEX' \{\
+. nr #HEAD_\\n[#LEVEL]_NO_FLEX 1
+. shift
+. \}
+. \}
+. rr #LEVEL
+. if d$TOC .rm $TOC
+.END
+.
+.ALIAS TOC_ENTRY_STYLE HEADING_STYLE
+.ALIAS TOC_HEADING_STYLE HEADING_STYLE
+\#
+\# OLDSTYLE HEADINGS
+\# -----------------
+\# *Arguments:
+\# None.
+\# *Function:
+\# Called from HEAD, SUBHEAD, and SUBSUBHEAD, sets style
+\# parameters for HEADINGs 1-3 to former mom defaults for those macros.
+\# Any styles already assigned to those levels are retained.
+\#
+\# Called by user with no argument, allows use of old style HEAD,
+\# SUBHEAD, and SUBSUBHEAD without generating the deprecated msg.
+\# *Notes:
+\# For backward compatibility, and to ease the transition to
+\# the HEADING scheme for heads.
+\#
+\# Paraheads must be set with .HEADING <level> PARAHEAD; attempts
+\# to call PARAHEAD abort with an instructive message.
+\#
+.MAC OLDSTYLE_HEADINGS END
+. if '\\$1'' .nr #SKIP_MSG 1
+. nr #FROM_OLDSTYLE 1 \" Used in HEADING
+. if \\n[#PRINT_STYLE]=1 \{\
+. if !\\n[#LEVEL_1_SET] \{\
+. HEADING_STYLE 1 \
+ FONT R \
+ SIZE +0 \
+ QUAD C \
+ CAPS \
+ UNDERSCORE .5 2p \
+ BASELINE_ADJUST 0 \
+ SPACE_AFTER
+. nr #OLDSTYLE_HD 1
+. return
+. \}
+. if !\\n[#LEVEL_2_SET] \{\
+. HEADING_STYLE 2 \
+ FONT R \
+ SIZE +0 \
+ UNDERSCORE .5 2p \
+ BASELINE_ADJUST \\n[.v]/8
+. nr #OLDSTYLE_SH 1
+. return
+. \}
+. if !\\n[#LEVEL_3_SET] \{\
+. HEADING_STYLE 3 \
+ FONT R \
+ SIZE +0 \
+ BASELINE_ADJUST \\n[.v]/8
+. nr #OLDSTYLE_SSH 1
+. return
+. \}
+. \}
+. if \\n[#PRINT_STYLE]=2 \{\
+. if !\\n[#LEVEL_1_SET] \{\
+. HEADING_STYLE 1 \
+ FAMILY \E*[$DOC_FAM] \
+ FONT B \
+ SIZE +1 \
+ QUAD C \
+ CAPS \
+ UNDERSCORE .5 2p \
+ BASELINE_ADJUST 0 \
+ SPACE_AFTER
+. nr #OLDSTYLE_HD 1
+. return
+. \}
+. if !\\n[#LEVEL_2_SET] \{\
+. HEADING_STYLE 2 \
+ FAMILY \E*[$DOC_FAM] \
+ FONT B \
+ SIZE +.5 \
+ BASELINE_ADJUST \\n[.v]/8
+. nr #OLDSTYLE_SH 1
+. return
+. \}
+. if !\\n[#LEVEL_3_SET] \{\
+. HEADING_STYLE 3 \
+ FAMILY \E*[$DOC_FAM] \
+ FONT I \
+ SIZE +.5 \
+ BASELINE_ADJUST \\n[.v]/8
+. nr #OLDSTYLE_SSH 1
+. return
+. \}
+. \}
+. rr #FROM_OLDSTYLE
+.END
+\#
+\# "Deprecated" message
+\#
+.MAC DEPRECATED END
+. if !\\n[#SKIP_MSG] \{\
+. tm1 "[mom]: Macro '\\$1' at line \\n[.c] is deprecated.
+. tm1 " Invoking HEADING \\$2 instead and assigning style defaults
+. tm1 " from former \\$1 as described in the documentation.
+. tm1 " If another style is desired, use HEADING_STYLE \\$2 to
+. tm1 " create it (see docs).
+. tm1 " Further warnings will not be emitted for \\$1.
+. tm1 " To avoid this message when using the deprecated HEAD,
+. tm1 " SUBHEAD, and SUBSUBHEAD macros, add '.OLDSTYLE_HEADINGS'
+. tm1 " after PRINTSTYLE before START.
+. rm $MACRO
+. \}
+.END
+\#
+\# Wrappers around old-style headings.
+\#
+.MAC HEAD END
+. if !\\n[#OLDSTYLE_HD] \{\
+. DEPRECATED HEAD 1
+. OLDSTYLE_HEADINGS HEAD
+. \}
+. HEADING 1 \\$@
+.END
+\#
+.MAC SUBHEAD END
+. if !\\n[#OLDSTYLE_SH] \{\
+. DEPRECATED SUBHEAD 2
+. OLDSTYLE_HEADINGS SUBHEAD
+. \}
+. HEADING 2 \\$@
+.END
+\#
+.MAC SUBSUBHEAD END
+. if !\\n[#OLDSTYLE_SSH] \{\
+. DEPRECATED SUBSUBHEAD 3
+. OLDSTYLE_HEADINGS SUBSUBHEAD
+. \}
+. HEADING 3 \\$@
+.END
+\#
+.MAC PARAHEAD END
+. tm1 "[mom]: \\$0 is no longer a valid macro.
+. tm1 " Use 'HEADING <level> PARAHEAD <text>' instead.
+. tm1 " You will probably want to invoke HEADING_STYLE to set
+. tm1 " the type parameters for the parahead. See docs.
+. ab [mom]: Aborting '\\n[.F]' at \\$0, line \\n[.c].
+.END
+\#
+\# Wrapper macro for oldstyle NUMBER_HEADS, NUMBER_SUBHEADS...
+\#
+.MAC HEADING_NUMBERS END
+. if '\\$0'NUMBER_PARAHEADS' \{\
+. tm1 "[mom]: \\$0 is no longer a valid macro.
+. tm1 " Use 'HEADING_STYLE <level> NUMBER' instead. See docs.
+. ab [mom]: Aborting '\\n[.F]' at \\$0, line \\n[.c].
+. return
+. \}
+. if '\\$0'NUMBER_HEADS' .nr level 1
+. if '\\$0'NUMBER_SUBHEADS' .nr level 2
+. if '\\$0'NUMBER_SUBSUBHEADS' .nr level 3
+. ds mom "[mom]:\"
+. ie '\\$1'' .ds $PARAM NUMBER
+. el \{\
+. ds $PARAM NO_NUMBER
+. ds $SWITCH " \\$1
+. \}
+. HEADING_STYLE \\n[level] \\*[$PARAM]
+. if (\\n[#OLDSTYLE_HD]=1):(\\n[#OLDSTYLE_SH]=1):(\\n[#OLDSTYLE_SSH]=1) \{\
+. tm1 "\\*[mom] OLDSTYLE_HEADINGS detected.
+. ds mom " \"
+. \}
+. tm1 "\\*[mom] Setting HEADING_STYLE \\n[level] to '\\*[$PARAM]' at '\\$0\\*[$SWITCH]', line \\n[.c].
+. rm $PARAM
+. rm $SWITCH
+.END
+.
+.ALIAS NUMBER_HEADS HEADING_NUMBERS
+.ALIAS NUMBER_SUBHEADS HEADING_NUMBERS
+.ALIAS NUMBER_SUBSUBHEADS HEADING_NUMBERS
+.ALIAS NUMBER_PARAHEADS HEADING_NUMBERS
+\#
+\# PREFIX CHAPTER NUMBERS TO HEADINGS/TOC ENTRIES
+\# ----------------------------------------------
+\# *Arguments:
+\# <none> | <chapter number> | <anything>
+\# *Function:
+\# Toggles register #PREFIX_CH_NUM. Uses $CHAPTER to set #CH_NUM
+\# if $CHAPTER is a digit; if <chapter number> given, sets #CH_NUM
+\# to arg.
+\# *Notes:
+\# Default is OFF.
+\#
+.MAC PREFIX_CHAPTER_NUMBER END
+. if \\n[#NUM_ARGS]=0 \{\
+. if !'\\*[$CHAPTER]'' \{\
+. if !\B'\\*[$CHAPTER]' \{\
+. tm1 "[mom]: \\$0 at line \\n[.c] cannot determine a chapter number.
+. tm1 " Enter the current chapter number as a digit after PREFIX_CHAPTER.
+. ab [mom]: Aborting '\\n[.F]', line \\n[.c].
+. \}
+. \}
+. \}
+. ie '\\$1'' .nr #PREFIX_CH_NUM 1
+. el \{\
+. ie \B'\\$1' \{\
+. nr #PREFIX_CH_NUM 1
+. nr #CH_NUM \\$1
+. \}
+. el .rr #PREFIX_CH_NUM
+. \}
+.END
+\#
+\# ====================================================================
+\#
+\# +++LINE BREAKS+++
+\#
+\# LINEBREAK CHARACTER
+\# -------------------
+\# *Arguments:
+\# [character] [iterations] [vertical adjustment]
+\# *Function:
+\# Allows user to specify a line break character and the number
+\# of times to repeat it horizontally.
+\# *Notes:
+\# Without an argument, LINEBREAK_CHAR will deposit a blank line.
+\#
+\# Vertical adjustment requires a unit of measure (most likely
+\# "p"), and has to be preceded by +|-
+\#
+.MAC LINEBREAK_CHAR END
+. nr #REPEAT 1
+. ds $LINEBREAK_CHAR \\$1
+. if !'\\$2'' .nr #LB_CHAR_ITERATIONS \\$2
+. if !'\\$3'' .ds $LINEBREAK_CHAR_V_ADJ \\$3
+. if '\\*[$LINEBREAK_CHAR_V_ADJ]'' .ds $LINEBREAK_CHAR_V_ADJ +0
+. if \\n[#LB_CHAR_ITERATIONS] \{\
+. while (\\n[#LB_CHAR_ITERATIONS]>\\n[#REPEAT]) \{\
+. as $LINEBREAK_CHAR "\\ \\$1
+. nr #REPEAT \\n[#REPEAT]+1
+. \}
+. \}
+. rr #REPEAT
+. rr #LB_CHAR_ITERATIONS
+.END
+\#
+\# LINE BREAK
+\# ----------
+\# *Arguments:
+\# <none>
+\# *Function:
+\# Deposits line break character.
+\# *Notes:
+\# If $LINEBREAK_CHAR is blank, simply advances 2 line spaces.
+\#
+.MAC LINEBREAK END
+. if r #Q_AT_TOP .rr #Q_AT_TOP
+. if \\n[@TOP] .RESTORE_SPACE
+. ie '\\*[$LINEBREAK_CHAR]'' \{\
+. br
+. nop \&
+. sp
+. \}
+. el \{\
+. ie \\n[#END_QUOTE] .
+. el .sp
+. ev LINEBREAK
+. evc 0
+. CENTER
+. PRINT \
+\m[\\*[$LINEBREAK_COLOR]]\v'\\*[$LINEBREAK_CHAR_V_ADJ]'\
+\\*[$LINEBREAK_CHAR]\m[]
+. sp
+. ev
+. QUAD \\*[$DOC_QUAD]
+. \}
+. nr #LINEBREAK 1
+. if r #QUOTE .rr #QUOTE
+. if r #END_QUOTE .rr #END_QUOTE
+. nr #PP 0
+. nr #LB_4_HD 1
+. nr #LB_4_PARAHEAD 1
+.END
+\#
+\# ====================================================================
+\#
+\# +++PARAGRAPHS+++
+\#
+\# PARAGRAPH FONT
+\# --------------
+\# *Argument:
+\# <font of running text>
+\# *Function:
+\# Creates or modifies string $PP_FT.
+\# *Notes:
+\# Affects all paragraphs.
+\#
+.MAC PP_FONT END
+. if \\n[#PRINT_STYLE]=1 \{\
+. ie \\n[#ITALIC_MEANS_ITALIC] .nop
+. el .return
+. \}
+. if \\n[#COLLATE]=1 \
+. if !'\\*[$SAVED_PP_FT]'' .rm $SAVED_PP_FT
+. ds $PP_FT \\$1
+. FT \\*[$PP_FT]
+.END
+\#
+\# PARAGRAPH INDENT
+\# ----------------
+\# *Argument:
+\# <amount to indent paragraphs in running text (ipPcm)>
+\# *Function:
+\# Allows user to change the default para indent. The change will
+\# affect the indent of QUOTEs and BLOCKQUOTEs as well.
+\# *Notes:
+\# Default for printstyle TYPEWRITE is 1/2-inch. Default for
+\# printstyle TYPESET is 2 ems. The defaults are set in
+\# PRINTSTYLE, not DEFAULTS.
+\#
+.MAC PARA_INDENT END
+. ie \B'\\$1' \{\
+. nr #PP_INDENT (\\$1)
+. nr #SAVED_PP_INDENT \\n[#PP_INDENT]
+. \}
+. el \{\
+. ie '\\$1'' \{\
+. nr #PP_INDENT \\n[#SAVED_PP_INDENT]
+. rr #SAVED_PP_INDENT
+. \}
+. el \{\
+. nr #SAVED_PP_INDENT \\n[#PP_INDENT]
+. rr #PP_INDENT
+. \}
+. \}
+.END
+\#
+\# INDENT FIRST PARAGRAPHS
+\# -----------------------
+\# *Arguments:
+\# <none> | <anything>
+\# *Function:
+\# By default, the first para of a document, as well as the first
+\# paras of blockquotes and block-style epigraphs are not indented.
+\# When invoked, this macro will indent all paras.
+\# *Notes:
+\# Default is OFF.
+\#
+.MAC INDENT_FIRST_PARAS END
+. ie '\\$1'' .nr #INDENT_FIRST_PARAS 1
+. el .rr #INDENT_FIRST_PARAS
+.END
+\#
+\# INTER-PARAGRAPH SPACING
+\# -----------------------
+\# *Arguments:
+\# <none> | <anything>
+\# *Function:
+\# Adds a line space between paragraphs in body text. Block quotes
+\# are unaffected.
+\# *Notes:
+\# Default is OFF. PARA_SPACE is not recommended for use with
+\# PRINTSTYLE TYPEWRITE without SINGLESPACE.
+\#
+.MAC PARA_SPACE END
+. ie '\\$1'' \
+. nr #PP_SPACE 1
+. el \{\
+. ie \B'\\$1' \{\
+. nr #PP_SPACE 1
+. ds $PP_SPACE_AMOUNT \\$1
+. \}
+. el .rr #PP_SPACE
+. \}
+.END
+\#
+\# PARAGRAPH
+\# ---------
+\# *Arguments:
+\# <none>
+\# *Function:
+\# Figures out what to do with paragraphs under differing conditions.
+\# *Notes:
+\# Note the use of transparent line break (\!.br) to get
+\# PP to work within blockquotes and epigraphs.
+\#
+\# PP_STYLE 1 = regular paras; 2 = blockquotes, epigraphs
+\#
+.MAC PP END
+. if \\n[#COVERTEXT_PP] \{\
+. ie \\n[#INDENT_ACTIVE] .ti \\n[#INDENT]u+\\n[#PP_INDENT]u
+. el .ti \\n[#PP_INDENT]u
+. return
+. \}
+. if \\n[#PP]>0 .br
+. if \\n[#DOC_TYPE]=4 \{\
+. if !'\\n[.z]'' .di
+. nr #TOTAL_FIELDS \\n[#FIELD]
+. nr #FIELD 0 1
+. nr #NUM_FIELDS 0 1
+. if \\n[#TOTAL_FIELDS]>0 \{\
+. while \\n+[#NUM_FIELDS]<=\\n[#TOTAL_FIELDS] \{\
+. nf
+. LETTERHEAD\\n+[#FIELD]
+. QUAD \\*[$DOC_QUAD]
+. ALD \\n[#DOC_LEAD]u
+. if \\n[#DATE_FIRST]=1 .ALD \\n[#DOC_LEAD]u
+. rr #DATE_FIRST
+. rm LETTERHEAD\\n[#FIELD]
+. \}
+. rr #FIELD
+. rr #NUM_FIELDS
+. rr #TOTAL_FIELDS
+. \}
+. \}
+. rr #PP_ACTIVE
+. if r #Q_AT_TOP .rr #Q_AT_TOP
+. if \\n[#PP_STYLE]=1 \{\
+. if \\n[#ENDNOTE] \{\
+. nr #RESET_PARA_SPACE \\n[#PP_SPACE]
+. ie \\n[#EN_PP_SPACE] .PARA_SPACE
+. el .PARA_SPACE OFF
+. \}
+. if !\\n[#ENDNOTE] .po \\n[#L_MARGIN]u
+. if \\n[#COLUMNS] \{\
+. if !\\n[#ENDNOTE] \{\
+. po \\n[#COL_\\n[#COL_NUM]_L_MARGIN]u
+. nr #L_MARGIN \\n[.o]
+. \}
+. \}
+. if \\n[#TAB_ACTIVE] .TAB \\n[#CURRENT_TAB]
+. ie \\n[#PRINT_STYLE]=1 \{\
+. TYPEWRITER
+. ie \\n[#ENDNOTE] .vs \\n[#EN_LEAD]u
+. el .vs \\n[#DOC_LEAD]u
+. QUAD \\*[$DOC_QUAD]
+. if \\n[#SLANT_ON] \
+. if \\n[#UNDERLINE_SLANT] .UNDERLINE
+. if '\\*[$PP_FT]'I' \
+. if \\n[#ITALIC_MEANS_ITALIC] .FT I
+. \}
+. el \{\
+. ie \\n[#ENDNOTE] \{\
+. FAMILY \\*[$EN_FAM]
+. FT \\*[$EN_FT]
+. ps \\n[#EN_PS]u
+. vs \\n[#EN_LEAD]u
+. QUAD \\*[$EN_QUAD]
+. \}
+. el \{\
+. FAMILY \\*[$DOC_FAM]
+. if !'\\*[$SAVED_PP_FT]'' \{\
+. ds $PP_FT \\*[$SAVED_PP_FT]
+. rm $SAVED_PP_FT
+. \}
+. FT \\*[$PP_FT]
+. ps \\n[#DOC_PT_SIZE]u
+. vs \\n[#DOC_LEAD]u
+. QUAD \\*[$DOC_QUAD]
+. \}
+. \}
+. ie \\n[#PP]=0 \{\
+. if \\n[#INDENT_FIRST_PARAS] \{\
+. ie \\n[#INDENT_ACTIVE] .ti \\n[#INDENT]u+\\n[#PP_INDENT]u
+. el .ti \\n[#PP_INDENT]u
+. if '\\n[.z]'END_NOTES' \
+. ti \\n[#EN_PP_INDENT]u+\\n[#EN_TEXT_INDENT]u
+. \}
+. if r #END_QUOTE \{\
+. if \\n[#END_QUOTE] \{\
+. if !\\n[#LINEBREAK] \{\
+. ie \\n[#INDENT_ACTIVE] .ti \\n[#INDENT]u+\\n[#PP_INDENT]u
+. el .ti \\n[#PP_INDENT]u
+. if '\\n[.z]'END_NOTES' \
+. ti \\n[#EN_PP_INDENT]u+\\n[#EN_TEXT_INDENT]u
+. \}
+. \}
+. \}
+. \}
+. el \{\
+. if \\n[#PP_SPACE] \{\
+. ie \\n[#END_QUOTE] \{\
+. ie !'\\*[$PP_SPACE_AMOUNT]'' .sp \\*[$PP_SPACE_AMOUNT]
+. el .sp
+. rr #END_QUOTE
+. nr #NO_SPACE 1
+. nr #BASELINE_MARK \\n[nl]
+. \}
+. el \{\
+. if \\n[#NO_SPACE]=1 .rr #NO_SPACE
+. if \\n[post-float] \{\
+. if (\\n[.t]-1)<\\*[$PP_SPACE_AMOUNT] \{\
+. ie \\n[#COLS] .COL_NEXT
+. el .NEWPAGE
+. \}
+. rr post-float
+. \}
+. if !\\n[nl]=\\n[#BASELINE_MARK] \{\
+. ie !'\\*[$PP_SPACE_AMOUNT]'' .sp \\*[$PP_SPACE_AMOUNT]
+. el .sp
+. rr #BASELINE_MARK
+. \}
+. \}
+. \}
+. if \\n[restore-pp-space] \{\
+. rr restore-pp-space
+. PARA_SPACE
+. \}
+. ie \\n[#INDENT_ACTIVE] .ti \\n[#INDENT]u+\\n[#PP_INDENT]u
+. el .ti \\n[#PP_INDENT]u
+. if '\\n[.z]'END_NOTES' \
+. ti \\n[#EN_PP_INDENT]u+\\n[#EN_TEXT_INDENT]u
+. \}
+. if r #START .rr #START
+. if r #QUOTE .rr #QUOTE
+. if r #END_QUOTE .rr #END_QUOTE
+. if r #HEAD .rr #HEAD
+. if r #SUBHEAD .rr #SUBHEAD
+. if r #EPIGRAPH .rr #EPIGRAPH
+. if r #Q_FITS .rr #Q_FITS
+. if r #LINEBREAK .rr #LINEBREAK
+. if \\n[#ENDNOTE] \{\
+. ie \\n[#RESET_PARA_SPACE] .PARA_SPACE
+. el .PARA_SPACE OFF
+. \}
+. if \\n[#CONDENSE] \{\
+\E*[COND]\c
+. \}
+. if \\n[#EXTEND]=1 \{\
+\E*[EXT]\c
+. \}
+. nr #PP +1
+. \}
+. if \\n[#PP_STYLE]=2 \{\
+\!. br
+. ie \\n[#Q_PP]=0 \{\
+. if \\n[#INDENT_FIRST_PARAS] \
+. ti \\n[#PP_INDENT]u/2u
+. if \\n[#ENDNOTE] \{\
+. ie \\n[#INDENT_FIRSTS] .ti \\n[#PP_INDENT]u/2u
+. el .ti 0
+. \}
+. \}
+. el \{\
+. ti \\n[#PP_INDENT]u/2u
+. if \\n[#PP_SPACE]=1 \{\
+. ie !'\\*[$PP_SPACE_AMOUNT]'' .ALD \\*[$PP_SPACE_AMOUNT]
+. el .sp
+. \}
+. \}
+. if \\n[#CONDENSE] \{\
+\E*[COND]\c
+. \}
+. if \\n[#EXTEND]=1 \{\
+\E*[EXT]\c
+. \}
+. nr #Q_PP +1
+. \}
+.\" This takes care of multi-paragraph dialogue, where each para
+.\" is introduced by an open quote whereas the previous para has
+.\" no close quote.
+. if \\n[#OPEN_CLOSE]=1 .nr #OPEN_CLOSE 0
+. nr #PP_ACTIVE 1
+. UNDERLINE OFF
+. if r #QUOTE_4_HD .rr #QUOTE_4_HD
+. if r #LB_4_HD .rr #LB_4_HD
+.END
+\#
+\# ====================================================================
+\#
+\# +++QUOTES+++
+\#
+\# ---Line for line quotes, e.g. poetry or code snippets---
+\#
+\# UNDERLINE QUOTES
+\# ----------------
+\# *Arguments:
+\# <none> | <anything>
+\# *Function:
+\# Creates or modifies register #UNDERLINE_QUOTES (toggle).
+\# If on, line for line quotes are underlined when printstyle
+\# is TYPEWRITE.
+\# *Notes:
+\# Default is ON for printstyle TYPEWRITE.
+\#
+.MAC UNDERLINE_QUOTES END
+. ie '\\$1'' .nr #UNDERLINE_QUOTES 1
+. el .rr #UNDERLINE_QUOTES
+.END
+\#
+\# QUOTE INDENT
+\# ------------
+\# *Argument:
+\# <integer> | <integer with unit of measure appended>
+\# *Function:
+\# Creates or modifies register #Q_OFFSET_VALUE or string
+\# $Q_OFFSET_VALUE.
+\# *Notes:
+\# If just an integer given, value by which to multiply PARA_INDENT
+\# to get quote indent. If integer with a unit of measure appended,
+\# absolute value of quote indent.
+\#
+\# Default is 3 for typeset; 2 for typewrite.
+\#
+.MAC QUOTE_INDENT END
+. if '\\$0'BLOCKQUOTE_INDENT' .ds BQ BQ
+. if '\\$0'QUOTE_INDENT' .ds BQ Q
+. rr #\\*[BQ]_OFFSET_VALUE
+. rm $\\*[BQ]_OFFSET_VALUE
+. ds $EVAL_QI_ARG \\$1
+. substring $EVAL_QI_ARG -1
+. ie \B'\\*[$EVAL_QI_ARG]' .nr #\\*[BQ]_OFFSET_VALUE \\$1
+. el .ds $\\*[BQ]_OFFSET_VALUE \\$1
+. rm BQ
+.END
+.
+.ALIAS BLOCKQUOTE_INDENT QUOTE_INDENT
+\#
+\# QUOTE_AUTOLEAD
+\# --------------
+\# *Arguments:
+\# <autolead value>
+\# *Function:
+\# Sets autolead for quotes and/or blockquotes.
+\#
+.MAC QUOTE_AUTOLEAD END
+. rr #\\$0_DEFAULT
+. if '\\$0'QUOTE_AUTOLEAD' .nr #Q_AUTOLEAD (p;\\$1)
+. if '\\$0'BLOCKQUOTE_AUTOLEAD' .nr #BQ_AUTOLEAD (p;\\$1)
+. if '\\$0'ENDNOTE_QUOTE_AUTOLEAD' .nr #EN_Q_AUTOLEAD (p;\\$1)
+. if '\\$0'ENDNOTE_BLOCKQUOTE_AUTOLEAD' .nr #EN_BQ_AUTOLEAD (p;\\$1)
+.END
+.
+.ALIAS BLOCKQUOTE_AUTOLEAD QUOTE_AUTOLEAD
+.ALIAS ENDNOTE_QUOTE_AUTOLEAD QUOTE_AUTOLEAD
+.ALIAS ENDNOTE_BLOCKQUOTE_AUTOLEAD QUOTE_AUTOLEAD
+\#
+\# ALWAYS FULLSPACE QUOTES
+\# -----------------------
+\# *Arguments:
+\# <none> | <anything>
+\# *Function:
+\# Toggles register #FULLSPACE_QUOTES.
+\# *Notes:
+\# If user doesn't like the default 1/2 line space above and below
+\# quotes, s/he can turn it off here. Has no effect in TYPEWRITE.
+\#
+.MAC ALWAYS_FULLSPACE_QUOTES END
+. if '\\$1'' .nr #FULLSPACE_QUOTES 1
+. el .rr #FULLSPACE_QUOTES
+.END
+\#
+\# QUOTE
+\# -----
+\# *Arguments:
+\# <none> | <anything>
+\# *Function:
+\# Indents quoted text on a line for line basis, or turns QUOTE off.
+\# *Notes:
+\# Owing to the need to bottom align TYPESET pages, quoted text gets
+\# diverted so its depth can be measured (in DO_QUOTE) for determining
+\# how much space to put before and after.
+\#
+.MAC QUOTE END
+. ie \\n[@TOP] \
+. br
+. el 'br
+. if \\n[#PP]>0 .rr #START
+. if '\\n[.z]'FLOAT*DIV' .nr Q-float 1
+. if \\n[#LINENUMBERS]=1 \{\
+. nr #LINENUMBERS 2
+. nr #NEXT_LN \\n[ln]
+. nm
+. \}
+. if '\\$1'ADJUST' \{\
+. ds $Q_SPACE_ADJUST \\$2
+. shift 2
+. \}
+. ie '\\$1'' \{\
+. ev QUOTE
+. evc 0
+. if \\n[.i] .in 0
+. if \\n[#LINENUMBERS]=2 \
+. if \\n[#SILENT_QUOTE_LN]=1 .nm \\n[#NEXT_LN] 1000 -4
+. nr #IN_DIVER 1
+. nr #QUOTE 1
+. di P_QUOTE
+. if '\\*[$Q_QUAD]'RIGHT' \{\
+. ie !'\\*[$Q_OFFSET_VALUE]'' .ll \\n[#L_LENGTH]u-\\*[$Q_OFFSET_VALUE]
+. el .ll \\n[#L_LENGTH]u-(\\n[#PP_INDENT]u*\\n[#Q_OFFSET_VALUE]u)
+. \}
+. ta \\n[.l]u
+. if \\n[#COLUMNS] \{\
+. ie \\n[#Q_OFFSET_VALUE] \
+. ll \\n[#COL_L_LENGTH]u-(\\n[#PP_INDENT]u*\\n[#Q_OFFSET_VALUE]u)
+. el .ll \\n[#COL_L_LENGTH]u-\\*[$Q_OFFSET_VALUE]
+. ta \\n[.l]u
+. \}
+. if \\n[#PRINT_STYLE]=1 \{\
+. TYPEWRITER
+. vs \\n[#DOC_LEAD]u
+. LEFT
+. \}
+. if \\n[#PRINT_STYLE]=2 \{\
+. FAMILY \\*[$QUOTE_FAM]
+. FT \\*[$QUOTE_FT]
+. ps \\n[#DOC_PT_SIZE]u\\*[$QUOTE_SIZE_CHANGE]
+. ie !r #Q_AUTOLEAD .vs \\n[#DOC_LEAD]u
+. el \{\
+. vs \\n[.ps]u+\\n[#Q_AUTOLEAD]u
+. nr #Q_LEAD \\n[.v]
+. \}
+. if \\n[#ENDNOTE] \{\
+. ps \\n[#EN_PS]u\\*[$QUOTE_SIZE_CHANGE]
+. ie !r #EN_Q_AUTOLEAD .vs \\n[#EN_Q_LEAD]u
+. el \{\
+. vs \\n[.ps]u+\\n[#EN_Q_AUTOLEAD]u
+. nr #EN_Q_LEAD \\n[.v]
+. \}
+. \}
+. nr #Q_LEAD_REAL \\n[.v]
+. if \\n[#QUOTE_COLOR]=1 \{\
+. nf
+. COLOR \\*[$QUOTE_COLOR]
+. \}
+. \\*[$Q_QUAD]
+. \}
+. if \\n[#LINENUMBERS]=2 \{\
+. ie \\n[#QUOTE_LN]=1 \{\
+. if '\\n[#Q_LN_GUTTER]'' .nr #Q_LN_GUTTER \\n[#LN_GUTTER]
+. LN_PARAMS
+. nm \\n[ln] "" \\n[#Q_LN_GUTTER] -3-\\n[#Q_LN_GUTTER]
+. RESTORE_PARAMS
+. \}
+. el \
+. if !\\n[#SILENT_QUOTE_LN] .NUMBER_LINES OFF
+. \}
+. nr #Q_TOP \\n[nl]
+. if \\n[#PRINT_STYLE]=1 \
+. if \\n[#UNDERLINE_QUOTES] .FT I
+. \}
+. el .DO_QUOTE
+.END
+\#
+\# CODE
+\# ----
+\# *Arguments:
+\# <none> [ BR | BREAK | SPREAD ]
+\# or
+\# <anything> [ BR | BREAK | SPREAD ]
+\# *Function:
+\# Takes care of administrivia associated with setting code snippets.
+\#
+.MAC CODE END
+\c
+. if '\\$1'BR' \{\
+. ie '\\n[.z]'FLOAT*DIV' 'br
+. el .br
+. shift
+. \}
+. if '\\$1'BREAK' \{\
+. ie '\\n[.z]'FLOAT*DIV' 'br
+. el .br
+. shift
+. \}
+. if '\\$1'SPREAD' \{\
+. ie '\\n[.z]'FLOAT*DIV' 'brp
+. el .brp
+. shift
+. \}
+. ie '\\$1'' \{\
+. ds $RESTORE_FAM \\n[.fam]
+. ds $RESTORE_FT \\n[.sty]
+. ie \\n[#PRINT_STYLE]=1 \{\
+. CODE_FAMILY C
+. ie \\n[#CODE_FT]=1 .ft \\*[$CODE_FT]
+. el \{\
+. CODE_FONT R
+. ft R
+. char ' \[aq]
+. \}
+. if \\n[#UNDERLINE_QUOTES]=1 \{\
+. nr #RESTORE_UNDERLINE 1
+. UNDERLINE_QUOTES OFF
+. FT \\*[$CODE_FT]
+. char ' \[aq]
+. \}
+. \}
+. el \{\
+. ie \\n[#CODE_FAM]=1 .fam \\*[$CODE_FAM]
+. el \{\
+. CODE_FAMILY C
+. fam \\*[$CODE_FAM]
+. \}
+. ie \\n[#CODE_FT]=1 .ft \\*[$CODE_FT]
+. el \{\
+. CODE_FONT R
+. ft \\*[$CODE_FT]
+. \}
+. if \\n[#CODE_COLOR]=1 .COLOR \\*[$CODE_COLOR]
+. char ' \[aq]
+. if !\\n[#CODE_SIZE_ADJ]=0 \{\
+. ds $RESTORE_SIZE \\n[.s]
+. ps \\n[#PT_SIZE]u*\\n[#CODE_SIZE_ADJ]u/100u
+. \}
+. if \\n[#SQ_ON] \{\
+. nr #SQ_WAS_ON 1
+. SMARTQUOTES OFF
+. \}
+. \}
+. \}
+. el \{\
+. fam \\*[$RESTORE_FAM]
+. ft \\*[$RESTORE_FT]
+. if !\\n[#CODE_SIZE_ADJ]=0 .ps \\*[$RESTORE_SIZE]
+. rm $RESTORE_FAM
+. rm $RESTORE_FT
+. rm $RESTORE_SIZE
+. if \\n[#PRINT_STYLE]=2 .char ' \[cq]
+. if !'\\n[.z]'' \
+. if \\n[#LINENUMBERS] .nn
+. if \\n[#CODE_COLOR]=1 .gcolor
+. if \\n[#RESTORE_UNDERLINE]=1 \{\
+. rr #RESTORE_UNDERLINE
+. UNDERLINE_QUOTES
+. \}
+. if \\n[#SQ_WAS_ON]=1 \{\
+. rr #SQ_WAS_ON
+. SMARTQUOTES
+. \}
+. if \\n[#QUOTE] .sp -1
+. if \\n[pdfbx-end] .if !\\n[#QUOTE] .sp -1
+. \}
+.END
+\#
+\# ---Blockquotes---
+\#
+\# BLOCKQUOTE
+\# ----------
+\# *Arguments:
+\# <none> | <anything>
+\# *Function:
+\# Indents quoted text in fill mode and shortens line length
+\# equivalently, or turns BLOCKQUOTE off.
+\# *Notes:
+\# Owing to the need to bottom align TYPESET pages, quoted text gets
+\# diverted so its depth can be measured (in DO_QUOTE) for determining
+\# how much space to put before and after.
+\#
+\# .PP after blockquote is optional if there's only one para,
+\# but required if there's more than one.
+\#
+.MAC BLOCKQUOTE END
+. ie \\n[@TOP] \
+. br
+. el 'br
+. if \\n[#PP]>0 .rr #START
+. if '\\n[.z]'FLOAT*DIV' .nr Q-float 1
+. if \\n[#LINENUMBERS]=1 \{\
+. nr #LINENUMBERS 2
+. nr #NEXT_LN \\n[ln]
+. nm
+. \}
+. if '\\$1'ADJUST' \{\
+. ds $BQ_SPACE_ADJUST \\$2
+. shift 2
+. \}
+. ie '\\$1'' \{\
+. ev BLOCKQUOTE
+. evc 0
+. if \\n[.i] .in 0
+. if \\n[#LINENUMBERS]=2 \
+. if \\n[#SILENT_BQUOTE_LN]=1 .nm \\n[#NEXT_LN] 1000 -4
+. nr #IN_DIVER 1
+. nr #QUOTE 2
+. nr #PP_STYLE 2
+. nr #Q_PP 0
+. di B_QUOTE
+. ie !'\\*[$BQ_OFFSET_VALUE]'' .ll \\n[#L_LENGTH]u-(\\*[$BQ_OFFSET_VALUE]*2u)
+. el .ll \\n[#L_LENGTH]u-(\\n[#PP_INDENT]u*(\\n[#BQ_OFFSET_VALUE]u*2u))
+. if \\n[#ENDNOTE] \{\
+. if \\n[#EN_NUMBERS_ALIGN_RIGHT] \{\
+. ie r#BQ_OFFSET_VALUE \
+. ll \
+\\n[#RESET_L_LENGTH]u-\\n[#EN_TEXT_INDENT]u-(\\n[#EN_PP_INDENT]u*(\\n[#BQ_OFFSET_VALUE]u*2u))
+. el \
+. ll \
+\\n[#RESET_L_LENGTH]u-\\n[#EN_TEXT_INDENT]u-(\\*[$BQ_OFFSET_VALUE]*2u)
+. \}
+. if \\n[#EN_NUMBERS_ALIGN_LEFT] \{\
+. ie r#BQ_OFFSET_VALUE \
+. ll \\n[#L_LENGTH]u-(\\n[#EN_PP_INDENT]u*(\\n[#BQ_OFFSET_VALUE]u*2u))
+. el \
+. ll \\n[#L_LENGTH]u-(\\*[$BQ_OFFSET_VALUE]u*2u)
+. \}
+. \}
+. ta \\n[.l]u
+. CHECK_INDENT
+. if \\n[#COLUMNS] \{\
+. ie r#BQ_OFFSET_VALUE \
+. ll \
+\\n[#COL_L_LENGTH]u-(\\n[#PP_INDENT]u*(\\n[#BQ_OFFSET_VALUE]u*2u))
+. el \
+. ll \\n[#COL_L_LENGTH]u-(\\*[$BQ_OFFSET_VALUE]*2u)
+. if \\n[#ENDNOTE] \{\
+. if \\n[#EN_NUMBERS_ALIGN_RIGHT] \{\
+. ie r#BQ_OFFSET_VALUE \
+. ll \
+\\n[#RESET_L_LENGTH]u-\\n[#EN_TEXT_INDENT]u-(\\n[#EN_PP_INDENT]u*(\\n[#BQ_OFFSET_VALUE]u*2u))
+. el \
+. ll \
+\\n[#RESET_L_LENGTH]u-\\n[#EN_TEXT_INDENT]u-(\\*[$BQ_OFFSET_VALUE]*2u)
+. \}
+. if \\n[#EN_NUMBERS_ALIGN_LEFT] \{\
+. ie r#BQ_OFFSET_VALUE \
+. ll \
+\\n[#COL_L_LENGTH]u-(\\n[#EN_PP_INDENT]u*(\\n[#BQ_OFFSET_VALUE]u*2u))
+. el \
+. ll \\n[#COL_L_LENGTH]u-(\\*[$BQ_OFFSET_VALUE]*2u)
+. \}
+. \}
+. ta \\n[.l]u
+. \}
+. if \\n[#PRINT_STYLE]=1 \{\
+. TYPEWRITER
+. vs \\n[#DOC_LEAD]u
+. QUAD LEFT
+. HY OFF
+. \}
+. if \\n[#PRINT_STYLE]=2 \{\
+. FAMILY \\*[$BQUOTE_FAM]
+. FT \\*[$BQUOTE_FT]
+. ps \\n[#DOC_PT_SIZE]u\\*[$BQUOTE_SIZE_CHANGE]
+. ie !r #BQ_AUTOLEAD .vs \\n[#DOC_LEAD]u
+. el \{\
+. vs \\n[.ps]u+\\n[#BQ_AUTOLEAD]u
+. nr #BQ_LEAD \\n[.v]
+. \}
+. if \\n[#ENDNOTE] \{\
+. ps \\n[#EN_PS]u\\*[$BQUOTE_SIZE_CHANGE]
+. ie !r#EN_BQ_AUTOLEAD .vs \\n[#EN_BQ_LEAD]u
+. el \{\
+. vs \\n[.ps]u+\\n[#EN_BQ_AUTOLEAD]u
+. nr #EN_BQ_LEAD \\n[.v]
+. \}
+. \}
+. nr #BQ_LEAD_REAL \\n[.v]
+. if \\n[#BQUOTE_COLOR]=1 \{\
+. nf
+. COLOR \\*[$BQUOTE_COLOR]
+. \}
+. QUAD \\*[$BQUOTE_QUAD]
+. nr #DIVERSIONS_HY_MARGIN (p;\\n[.ps]u*2.75)/1000
+. HY_SET 1 \\n[#DIVERSIONS_HY_MARGIN]u (\\n[#PT_SIZE]u/1000u/8u)p
+. hy 14
+. \}
+. if \\n[#LINENUMBERS]=2 \{\
+. ie \\n[#BQUOTE_LN]=1 \{\
+. if '\\n[#BQ_LN_GUTTER]'' .nr #BQ_LN_GUTTER \\n[#LN_GUTTER]
+. LN_PARAMS
+. nm \\n[ln] "" \\n[#BQ_LN_GUTTER] -3-\\n[#BQ_LN_GUTTER]
+. RESTORE_PARAMS
+. \}
+. el \
+. if !\\n[#SILENT_BQUOTE_LN] .NUMBER_LINES OFF
+. \}
+. nr #Q_TOP \\n[nl]
+. if \\n[#INDENT_FIRST_PARAS] \{\
+. ie !\\n[#ENDNOTE] \{\
+. if \\n[#PRINT_STYLE]=1 .ti \\n[#PP_INDENT]u/2u
+. if \\n[#PRINT_STYLE]=2 .ti \\n[#PP_INDENT]u/2u
+. \}
+. el \{\
+. if \\n[#INDENT_FIRSTS]=1 \{\
+. if \\n[#PRINT_STYLE]=1 .ti \\n[#EN_PP_INDENT]u/2u
+. if \\n[#PRINT_STYLE]=2 .ti \\n[#EN_PP_INDENT]u/2u
+. \}
+. \}
+. \}
+. \}
+. el .DO_BLOCKQUOTE
+.END
+\#
+\# DO QUOTE
+\# --------
+\# *Arguments:
+\# <none>
+\# *Function:
+\# Ends the diversion P_QUOTE or B_QUOTE. Spaces them according to
+\# PRINTSTYLE, whether there's inter-paragraph spacing, and page
+\# position. TYPEWRITE treats spacing the same way in all circumstance
+\# (viz. an extra line space). TYPESET puts in only half
+\# line spaces if the entire quote plus 1 line of body under the quote
+\# fits on the page; otherwise it puts in a full extra blank
+\# line. (This is to ensure the page remains bottom aligned).
+\#
+.MAC DO_QUOTE END
+. br
+. if \\n[#DIVER_LN_OFF] \{\
+\!. NUMBER_LINES OFF
+. rr #DIVER_LN_OFF
+. \}
+. nr #Q_DEPTH \\n[.d]
+. di
+. if '\\$0'DO_BLOCKQUOTE' .ds BQ BQ
+. if '\\$0'DO_QUOTE' .ds BQ Q
+. rr #IN_DIVER
+. if \\n[#RESET_FN_COUNTERS]=2 \{\
+. if !\\n[#FN_COUNT]=1 \{\
+. if ((\\n[#PAGE_LENGTH]+\\n[#VARIABLE_FOOTER_POS])+\\n[#DIVER_DEPTH])>(\\n[#PAGE_LENGTH]+\\n[#VARIABLE_FOOTER_POS]) \{\
+. DIVER_FN_2_POST
+. rr #RESET_FN_COUNTERS
+. \}
+. \}
+. \}
+. nr #SAVED_FN_NUMBER \\n[#FN_NUMBER]
+. nr #DONE_ONCE 0 1
+. REMOVE_INDENT
+. ev
+. nr #Q_LEAD_DIFF \\n[#LEAD]-\\n[#\\*[BQ]_LEAD_REAL]
+. nr q-lead-diff \\n[#Q_LEAD_DIFF]
+. if !\\n[pdfbx-running] \{\
+. if !'\\n[.z]'FLOAT*DIV' \{\
+. br
+. nr #CALCULATE_ONLY 1
+. nr #CURRENT_V_POS \\n[nl]+\\n[#Q_DEPTH]
+. SHIM
+. rr #CALCULATE_ONLY
+. nr #Q_SPACE_EQ (\\n[#SHIM]/2)
+. nr #TRAP \\n[.t]-1
+. \}
+. \}
+. if \\n[#ENDNOTE] \{\
+. nr #RESET_QUOTE_SPACING \\n[#FULLSPACE_QUOTES]
+. ALWAYS_FULLSPACE_QUOTES
+. \}
+. if \\n[#PRINT_STYLE]=1 \{\
+. if \\n[#START]=1 .
+. if \\n[#START]=0 \
+. if !\\n[#LINEBREAK] .ALD \\n[#DOC_LEAD]u
+. if \\n[#HEAD] \
+. if \\n[#HEAD]=1 .RLD \\n[#DOC_LEAD]u
+. \}
+. if \\n[#PRINT_STYLE]=2 \{\
+. ie \\n[#PP_SPACE] \{\
+. ie \\n[#HEAD] .
+. el \{\
+. ie \\n[#START] .
+. el \{\
+. ie \\n[#FULLSPACE_QUOTES] .ALD \\n[#DOC_LEAD]u
+. el .ALD \\n[#DOC_LEAD]u/2u
+. \}
+. \}
+. \}
+. el \{\
+. if !\\n[nl]=\\n[#PAGE_TOP] \{\
+. ie \\n[#Q_DEPTH]<(\\n[#TRAP_DISTANCE]-1) \{\
+. ie ((\\n[#TRAP_DISTANCE]-1)-\\n[#Q_DEPTH])<\\n[#DOC_LEAD] \
+. Q_NOFIT
+. el \{\
+. ie (\\n[#TRAP_DISTANCE]-\\n[#DOC_LEAD])<\\n[#DOC_LEAD] \
+. Q_NOFIT
+. el \{\
+. ie (\\n[#Q_DEPTH]+\\n[.v])=(\\n[#TRAP_DISTANCE]-1) \
+. Q_NOFIT
+. el .Q_FITS
+. \}
+. \}
+. \}
+. el .Q_NOFIT
+. \}
+. \}
+. if \\n[#LINEBREAK] \{\
+. vpt 0
+. ie !\\n[@TOP] .sp -\\n[#DOC_LEAD]u
+. el \{\
+. nop
+. sp |\\n[#T_MARGIN]u-\\n[#BQ_LEAD]u
+. \}
+. vpt
+. \}
+. \}
+. ie !'\\*[$\\*[BQ]_OFFSET_VALUE]'' \
+. nr #\\*[BQ]_OFFSET \\n[#L_MARGIN]+(\\*[$\\*[BQ]_OFFSET_VALUE])
+. el \
+. nr #\\*[BQ]_OFFSET \
+\\n[#L_MARGIN]+(\\n[#PP_INDENT]*\\n[#\\*[BQ]_OFFSET_VALUE])
+. if \\n[#COLUMNS] \{\
+. ie r#\\*[BQ]_OFFSET_VALUE \
+. nr #\\*[BQ]_OFFSET \
+\\n[#COL_\\n[#COL_NUM]_L_MARGIN]+(\\n[#PP_INDENT]*\\n[#\\*[BQ]_OFFSET_VALUE])
+. el .nr #\\*[BQ]_OFFSET \
+\\n[#COL_\\n[#COL_NUM]_L_MARGIN]+\\*[$\\*[BQ]_OFFSET_VALUE]
+. \}
+. if !\\n[#ENDNOTE] \{\
+. ie '\\*[BQ]'Q' \{\
+. if '\\*[$Q_QUAD]'LEFT' \{\
+. po \\n[#Q_OFFSET]u
+. if '\\n[.z]'FLOAT*DIV' \!.po \\n[#Q_OFFSET]u
+. \}
+. \}
+. el \{\
+. po \\n[#\\*[BQ]_OFFSET]u
+. if '\\n[.z]'FLOAT*DIV' \!.po \\n[#\\*[BQ]_OFFSET]u
+. \}
+. \}
+. if \\n[#ENDNOTE] \{\
+. ie \\n[#\\*[BQ]_OFFSET_VALUE] \
+. in +\\n[#EN_PP_INDENT]u*\\n[#\\*[BQ]_OFFSET_VALUE]u
+. el .in +\\*[$\\*[BQ]_OFFSET_VALUE]
+. \}
+. ie \\n[#START]=1 \
+. RLD 0-\\n[#Q_LEAD_DIFF]u
+. el \{\
+. if \\n[#PRINT_STYLE]=2 \{\
+. ie !\\n[pdfbx-post-q] \{\
+. ie !\\n[#NO_SHIM] \
+. sp \\n[#Q_SPACE_EQ]u+(\\n[#Q_LEAD_DIFF]u/2u)
+. el .if !\\n[#NO_FLEX] .FLEX
+. \}
+. el .sp -.5
+. \}
+. \}
+. if \\n[#QUOTE]=1 \{\
+. if !'\\*[$Q_SPACE_ADJUST]'' .sp +\\*[$Q_SPACE_ADJUST]
+. nf
+. P_QUOTE
+. if !'\\*[$Q_SPACE_ADJUST]'' \{\
+. sp -\\*[$Q_SPACE_ADJUST]
+. rm $Q_SPACE_ADJUST
+. \}
+. \}
+. if \\n[#QUOTE]=2 \{\
+. if !'\\*[$BQ_SPACE_ADJUST]'' .sp +\\*[$BQ_SPACE_ADJUST]
+. nf
+. B_QUOTE
+. if !'\\*[$BQ_SPACE_ADJUST]'' \{\
+. sp -\\*[$BQ_SPACE_ADJUST]
+. rm $BQ_SPACE_ADJUST
+. \}
+. \}
+. if !\\n[#START] .rr #QUOTE
+. rr delay-ev-pop
+. if !'\\n[.z]'FLOAT*DIV' \{\
+. if \\n[#PRINT_STYLE]=1 \{\
+. if !\\n[.v]=\\n[#DOC_LEAD] \{\
+. if !r pdfbx-post-q \{\
+. ie !\\n[#NO_SHIM] .SHIM
+. el \
+. if !\\n[#NO_FLEX] .FLEX
+. \}
+. \}
+. \}
+. if \\n[#PRINT_STYLE]=2 \{\
+. ie \\n[#START] \{\
+. ie \\n[#PP_SPACE] .
+. el \{\
+. sp \\n[#DOC_LEAD]u/2u
+. if !r pdfbx-post-q \{\
+. ie !\\n[#NO_SHIM] .SHIM
+. el \
+. if !\\n[#NO_FLEX] .FLEX
+. \}
+. \}
+. \}
+. el \{\
+. ie \\n[#HEAD]=1 \{\
+. sp \\n[#DOC_LEAD]u
+. if !r pdfbx-post-q \{\
+. ie !\\n[#NO_SHIM] .SHIM
+. el \
+. if !\\n[#NO_FLEX] .FLEX
+. \}
+. \}
+. el \{\
+. ie \\n[#FULLSPACE_QUOTES] \{\
+. ie \\n[#ENDNOTE] .ALD \\n[#EN_LEAD]u
+. el .if !'\\n[.z]'FLOAT*DIV' .ALD \\n[#DOC_LEAD]u
+. \}
+. el \
+. if !'\\n[.z]'FLOAT*DIV' .ALD \\n[#DOC_LEAD]u/2u
+. ie \\n[#Q_FITS] \{\
+. ie (\\n[#Q_TOP]=\\n[#PAGE_TOP]):(\\n[@TOP]=1) \{\
+. if \\n[has-label] .sp \\n[#DOC_LEAD]u/2u
+. if !'\\n[.z]'FLOAT*DIV' \{\
+. nr #Q_AT_TOP 1
+. nr #DELAY_SHIM 1
+. \}
+. \}
+. el \{\
+. ie !\\n[#NO_SHIM] .SHIM
+. el .if !\\n[#NO_FLEX] .FLEX
+. \}
+. \}
+. el \{\
+. ie r pdfbx-post-q \{\
+. if \\n[.t]>1v \{\
+. ie !\\n[#NO_SHIM] .SHIM
+. el \
+. if !\\n[#NO_FLEX] .FLEX
+. \}
+. \}
+. el \{\
+. ie !\\n[#NO_SHIM] .SHIM
+. el \
+. if !\\n[#NO_FLEX] .FLEX
+. \}
+.\" Make sure that Q_LEAD_DIFF is not added to the first line of
+.\" normal text at the top of any page following output of a quote
+.\" whose last line falls on B_MARGIN of the previous page.
+. if \\n[#Q_LEAD_DIFF] \{\
+. if \\n[nl]=(\\n[#T_MARGIN]-\\n[#DOC_LEAD]+\\n[#Q_LEAD_DIFF]) \{\
+. PRINT \&
+. br
+. sp -1v-\\n[#Q_LEAD_DIFF]u
+. nr #Q_LEAD_DIFF_CHECK 1
+. \}
+. \}
+. \}
+. \}
+. \}
+. \}
+. \}
+. if \\n[#RESTORE_NO_SHIM] .nr #NO_SHIM 1
+. rr #Q_SPACE_EQ
+. if \\n[#LINENUMBERS]=2 \{\
+. nr #LINENUMBERS 1
+. if !\\n[#ENDNOTE] \{\
+. ie \\n[#RESTORE_LN_NUM]=1 \{\
+. LN_PARAMS
+. nm \\n[#NEXT_LN]
+. RESTORE_PARAMS
+. \}
+. el \{\
+. LN_PARAMS
+. nm +0
+. RESTORE_PARAMS
+. \}
+. \}
+. \}
+. if \\n[#ENDNOTE] \
+. nr #FULLSPACE_QUOTES \\n[#RESET_QUOTE_SPACING]
+. if r #HEAD .rr #HEAD
+. if r #EPIGRAPH .rr #EPIGRAPH
+. rr #Q_PP
+. rr #LINEBREAK
+. nr #PP_STYLE 1
+. nr #END_QUOTE 1
+. if !\\n[#ENDNOTE] \
+. po \\n[#L_MARGIN]u
+. if \\n[#ENDNOTE] .in \\n[#EN_TEXT_INDENT]u
+. if \\n[#COLUMNS] \{\
+. if !\\n[#ENDNOTE] \{\
+. po \\n[#COL_\\n[#COL_NUM]_L_MARGIN]u
+. nr #L_MARGIN \\n[.o]
+. \}
+. if \\n[#ENDNOTE] .in \\n[#EN_TEXT_INDENT]u
+. \}
+. ie !\\n[#ENDNOTE] .QUAD \\*[$DOC_QUAD]
+. el .QUAD \\*[EN_QUAD]
+. if r #DELAY_SHIM \{\
+. ie !\\n[#NO_SHIM] .SHIM
+. el \
+. if !\\n[#NO_FLEX] .FLEX
+. rr #DELAY_SHIM
+. \}
+. if \\n[#PRINT_STYLE]=1 \
+. if \\n[#UNDERLINE_QUOTES] .FT R
+. nr #QUOTE_4_HD 1
+. rr #\\*[BQ]_LEAD_REAL
+. rm BQ
+. if \\n[#DOC_TYPE]=5 .NO_SHIM
+. if '\\n[.z]'FLOAT*DIV' \!.po \\n[#L_MARGIN]u
+.END
+.
+.ALIAS DO_BLOCKQUOTE DO_QUOTE
+\#
+\# Utility macros for DO_QUOTE
+\# ---------------------------
+\#
+.MAC Q_FITS END
+. nr #Q_FITS 1
+. ie \\n[#HEAD]=1 .ALD \\n[#Q_LEAD_DIFF]u
+. el \{\
+. ie \\n[#START] .
+. el \{\
+. ie \\n[#FULLSPACE_QUOTES] \{\
+. ie \\n[#ENDNOTE] .ALD \\n[#EN_LEAD]u+\\n[#Q_LEAD_DIFF]u
+. el .ALD \\n[#DOC_LEAD]u+\\n[#Q_LEAD_DIFF]u
+. \}
+. el \{\
+.\" This seems to be the only way to get the baseline of quotes that
+.\" start at the top of the page to fall on the first line of the
+.\" grid (ie. on the first valid baseline of the page).
+. ie \\n[#Q_TOP]=\\n[#PAGE_TOP] \{\
+. if \\n[#QUOTE]=1 .ds $QUOTE_TYPE Q
+. if \\n[#QUOTE]=2 .ds $QUOTE_TYPE B
+. rn \\*[$QUOTE_TYPE]_QUOTE Q_TEMP
+. di \\*[$QUOTE_TYPE]_QUOTE
+. nf
+. if \\n[#QUOTE]=1 .vs \\n[#Q_LEAD]u
+. if \\n[#QUOTE]=2 .vs \\n[#BQ_LEAD]u
+. PRINT \&
+. sp -1v+\\n[#Q_LEAD_DIFF]u
+. Q_TEMP
+. di
+. rm Q_TEMP
+. sp \\n[#DOC_LEAD]u/2u
+. \}
+. el \
+. sp \\n[#DOC_LEAD]u/2u
+. \}
+. \}
+. if \\n[#DIVER_FN]=2 .rr #DIVER_FN
+. if !\\n[#NO_FLEX] .FLEX
+. \}
+. rm $QUOTE_TYPE
+.END
+\#
+.MAC Q_NOFIT END
+. rr #Q_FITS
+. if \\n[#QUOTE]=1 \{\
+. ds $QUOTE_TYPE Q
+. ds quote-type quote
+. \}
+. if \\n[#QUOTE]=2 \{\
+. ds $QUOTE_TYPE B
+. ds quote-type blockquote
+. \}
+. if \\n[has-caption] \{\
+. if !\\n[@TOP] \
+. if !\\n[nl]=\\n[#PAGE_TOP] \
+. if (\\n[.t]-1)<\
+\\n[#DOC_LEAD]+(\\n[#DOC_LEAD]/4)\
++\\n[#\\*[QUOTE_TYPE]_LEAD] \{\
+. tm1 "[mom]: Insufficient room for caption and at least one line of \\*[quote-type]
+. tm1 " on page \\n[%] (line \\n[.c]). Moving quote to next page or column.
+. ie \\n[#COLUMNS] .COL_NEXT
+. el .NEWPAGE
+. \}
+. \}
+. ie r#HEAD \
+. if \\n[#HEAD]=1 .
+. el \{\
+. if \\n[#Q_DEPTH]=0 \
+. if \\n[.ns] .rs
+. ie \\n[#FULLSPACE_QUOTES] \{\
+. ie \\n[#ENDNOTE] .sp \\n[#EN_LEAD]u+\\n[#Q_LEAD_DIFF]u
+. el .sp \\n[#DOC_LEAD]u+\\n[#Q_LEAD_DIFF]u
+. \}
+. el \{\
+. sp .5
+. if \\n[@TOP] .rs
+. \}
+. ie \\n[#Q_LEAD_REAL] \
+. nr #Q_PARTIAL_DEPTH 0 \\n[#Q_LEAD_REAL]
+. el .nr #Q_PARTIAL_DEPTH 0 \\n[#BQ_LEAD_REAL]
+. while \\n+[#Q_PARTIAL_DEPTH]<(\\n[#TRAP_DISTANCE]-1) \{\
+.
+. \}
+. if !\\n[#Q_LEAD_REAL]=\\n[#DOC_LEAD] \{\
+. ie \\n[#Q_LEAD_REAL] \
+. nr #Q_PARTIAL_DEPTH -\\n[#Q_LEAD_REAL]
+. el .nr #Q_PARTIAL_DEPTH -\\n[#BQ_LEAD_REAL]
+. \}
+. nr #Q_SPACE_EQ \
+(\\n[#TRAP_DISTANCE]-1)-\\n[#Q_PARTIAL_DEPTH]+(\\n[#Q_LEAD_DIFF]u/2u)
+. if \\n[#FN_COUNT]>0 .nr #Q_SPACE_EQ (\\n[#Q_SPACE_EQ] / 2u)
+.\" Hack to deal with the fact that even though the above routine
+.\" makes the bottom line of the quote fall exactly on the bottom
+.\" margin when traps are disabled, it refuses to do so when traps
+.\" are on. The difference by which it's off is #Q_LEAD_DIFF
+.\" (the +\\n[#Q_LEAD_DIFF] at the end of the line, above). Hack
+.\" solution: temporarily lower the FOOTER trap position.
+. if !\\n[pdfbx-running] \{\
+. if !\\n[#Q_DEPTH]=0 \{\
+. nr #SAVED_FOOTER_POS \\n[#VARIABLE_FOOTER_POS]
+. ch FOOTER \\n[#VARIABLE_FOOTER_POS]u+.25v
+. \}
+. \}
+.\}
+.END
+\#
+\# ====================================================================
+\#
+\# +++PAGINATION+++
+\#
+\# PAGINATE
+\# --------
+\# *Arguments:
+\# <none> | <anything>
+\# *Function:
+\# Turns page numbering off or on during document processing.
+\# *Notes:
+\# Default is on.
+\#
+.MAC PAGINATE END
+. ie '\\$1'' \{\
+. nr #PAGINATE 1
+. if \\n[#SAVED_V_POS] \{\
+. nr #PAGE_NUM_V_POS \\n[#SAVED_V_POS]
+. rr #SAVED_V_POS
+. \}
+. \}
+. el \{\
+. nr #PAGINATE 0
+. nr #SAVED_V_POS \\n[#PAGE_NUM_V_POS]
+. rr #PAGE_NUM_V_POS
+. \}
+. if \\n[#HF_OFF]=1 \{\
+. rr #PAGINATION_STATE
+. rr #HF_OFF
+. \}
+.END
+\#
+\# SUSPEND PAGINATION (before ENDNOTES)
+\# ------------------
+\# *Argument:
+\# <none>
+\# *Function:
+\# Creates register #SUSPEND_PAGINATION
+\# *Notes:
+\# Useful only to suspend pagination before outputting endnotes.
+\#
+.MAC SUSPEND_PAGINATION END
+. nr #SUSPEND_PAGINATION 1
+.END
+\#
+\# RESTORE PAGINATION (after ENDNOTES)
+\# ------------------
+\# *Argument:
+\# <none>
+\# *Function:
+\# Removes register #SUSPEND_PAGINATION. Creates register
+\# #DEFER_PAGINATION
+\# *Notes:
+\# Useful only to restore pagination after outputting endnotes.
+\#
+.MAC RESTORE_PAGINATION END
+. rr #SUSPEND_PAGINATION
+. if \\n[#PAGE_NUM_V_POS]=1 .PAGINATE
+. if \\n[#PAGE_NUM_V_POS]=2 .nr #DEFER_PAGINATION 1
+.END
+\#
+\# PAGE NUMBER FORMAT
+\# ------------------
+\# *Arguments:
+\# DIGIT | ROMAN | roman | ALPHA | alpha
+\# *Function:
+\# Assigns user entered format to #PAGENUMBER.
+\#
+.MAC PAGENUM_STYLE END
+. nr #PAGENUM_STYLE_SET 1
+. if '\\$1'DIGIT' \{\
+. ds $PAGENUM_STYLE \\$1
+. af #PAGENUMBER 1
+. \}
+. if '\\$1'ROMAN' \{\
+. ds $PAGENUM_STYLE \\$1
+. af #PAGENUMBER I
+. \}
+. if '\\$1'roman' \{\
+. ds $PAGENUM_STYLE \\$1
+. af #PAGENUMBER i
+. \}
+. if '\\$1'ALPHA' \{\
+. ds $PAGENUM_STYLE \\$1
+. af #PAGENUMBER A
+. \}
+. if '\\$1'alpha' \{\
+. ds $PAGENUM_STYLE \\$1
+. af #PAGENUMBER a
+. \}
+.END
+\#
+\# HYPHENS AROUND PAGE NUMBERS
+\# ---------------------------
+\# *Arguments:
+\# <none> | <anything>
+\# *Function:
+\# Creates or modifies register #PAGE_NUM_HYPHENS.
+\# Used to dis/enable hyphens on either side of page numbers.
+\# *Notes:
+\# Default is on.
+\#
+.MAC PAGENUM_HYPHENS END
+. nr #PAGE_NUM_HYPHENS_SET 1
+. ie '\\$1'' .nr #PAGE_NUM_HYPHENS 1
+. el .rr #PAGE_NUM_HYPHENS
+.END
+\#
+\# PAGENUMBER POSITION
+\# -------------------
+\# *Arguments:
+\# TOP | BOTTOM LEFT | CENTER | RIGHT
+\# *Function:
+\# Creates or modifies various PAGE_NUM_H | V_POS registers.
+\# Used to position page numbers.
+\# *Notes:
+\# Default is center/bottom.
+\#
+.MAC PAGENUM_POS END
+. nr #PAGE_NUM_POS_SET 1
+. if '\\$1'TOP' .nr #PAGE_NUM_V_POS 1
+. if '\\$1'BOTTOM' .nr #PAGE_NUM_V_POS 2
+. if '\\$2'LEFT' .nr #PAGE_NUM_H_POS 1
+. if '\\$2'CENTER' .nr #PAGE_NUM_H_POS 2
+. if '\\$2'CENTRE' .nr #PAGE_NUM_H_POS 2
+. if '\\$2'RIGHT' .nr #PAGE_NUM_H_POS 3
+.END
+\#
+.MAC PN_WITH_HYPHENS END
+. nr #HYPHEN_ADJ \\n[#CAP_HEIGHT]/12
+. ds $HYPHEN \v'-\En[#HYPHEN_ADJ]u'-\v'\En[#HYPHEN_ADJ]u'
+. ds $PN_FOR_KN \\n[#PAGENUMBER]
+.\" Check for initial or terminal 1's or 7's, and apply a little kerning
+. substring $PN_FOR_KN 0 0 \" 1st digit
+. if '\\*[$PN_FOR_KN]'1' .ds $PRE_HY_KN \*[BU3]
+. if '\\*[$PN_FOR_KN]'7' .ds $PRE_HY_KN \*[BU3]
+. ds $PN_FOR_KN \\n[#PAGENUMBER]
+. substring $PN_FOR_KN -1 -1 \" last digit
+. if '\\*[$PN_FOR_KN]'1' .ds $POST_HY_KN \*[BU3]
+. if '\\*[$PN_FOR_KN]'7' .ds $POST_HY_KN \*[BU3]
+. PRINT \
+\m[\\*[$PAGE_NUM_COLOR]]\
+\\*[$HYPHEN]\|\\*[$PRE_HY_KN]\\n[#PAGENUMBER]\\*[$POST_HY_KN]\|\\*[$HYPHEN]
+. br
+. rm $PRE_HY_KERN
+. rm $POST_HY_KERN
+.END
+\#
+\# PRINT PAGE NUMBER
+\# -----------------
+\# *Arguments:
+\# <none>
+\# *Function:
+\# Prints page number if PAGINATE=1.
+\#
+.MAC PRINT_PAGE_NUMBER END
+. ev PAGENUMBER
+. nf
+. po \\n[#DOC_L_MARGIN]u
+. ll \\n[#DOC_L_LENGTH]u
+. ta \\n[.l]u
+. fam \\*[$PAGE_NUM_FAM]
+. ft \\*[$PAGE_NUM_FT]
+. ps \\n[#DOC_PT_SIZE]u\\*[$PAGE_NUM_SIZE_CHANGE]
+. if \\n[#PRINT_STYLE]=1 .TYPEWRITER
+. if \\n[#PAGE_NUM_V_POS]=1 .vs 0
+. if o \{\
+. ie \\n[#PAGE_NUM_H_POS]=1 .LEFT
+. el .RIGHT
+. \}
+. if e \{\
+. ie \\n[#PAGE_NUM_H_POS]=1 .RIGHT
+. el .LEFT
+. \}
+. if \\n[#PAGE_NUM_H_POS]=2 .CENTER
+. if \\n[#RECTO_VERSO]=0 \{\
+. if \\n[#PAGE_NUM_H_POS]=1 .LEFT
+. if \\n[#PAGE_NUM_H_POS]=2 .CENTER
+. if \\n[#PAGE_NUM_H_POS]=3 .RIGHT
+. \}
+. nr #PAGENUMBER \\n%+\\n[#PAGE_NUM_ADJ]
+. if \\n[#EN_FIRST_PAGE] \{\
+. if \\n[#EN_FIRST_PN] .PAGENUMBER \\n[#EN_FIRST_PN]
+. rr #EN_FIRST_PAGE
+. \}
+. if \\n[#BIB_FIRST_PAGE] \{\
+. if \\n[#BIB_FIRST_PN] .PAGENUMBER \\n[#BIB_FIRST_PN]
+. rr #BIB_FIRST_PAGE
+. \}
+. ie \\n[#DRAFT_WITH_PAGENUM] \{\
+. ie '\\*[$REVISION]'' \
+. PRINT "\\*[$DRAFT_STRING]\\*[$DRAFT] / \\n[#PAGENUMBER]"
+. el \{\
+. ie '\\*[$DRAFT]'' \
+. PRINT "\\*[$REVISION_STRING] \\*[$REVISION] / \\n[#PAGENUMBER]"
+. el \
+. PRINT \
+"\\*[$DRAFT_STRING]\\*[$DRAFT], \\*[$REVISION_STRING] \\*[$REVISION] / \
+\\n[#PAGENUMBER]"
+. \}
+. \}
+. el \{\
+. ie \\n[#PAGE_NUM_HYPHENS] \{\
+. if '\\*[$PAGENUM_STYLE]'DIGIT' \{\
+. di NULL
+1\\R'#CAP_HEIGHT \\n[.cht]'
+. di
+. PN_WITH_HYPHENS
+. \}
+. if '\\*[$PAGENUM_STYLE]'ROMAN' \{\
+. di NULL
+I\\R'#CAP_HEIGHT \\n[.cht]'
+. di
+. PN_WITH_HYPHENS
+. \}
+. if '\\*[$PAGENUM_STYLE]'ALPHA' \{\
+. di NULL
+E\\R'#CAP_HEIGHT \\n[.cht]'
+. di
+. PN_WITH_HYPHENS
+. \}
+. if '\\*[$PAGENUM_STYLE]'roman' \
+. PRINT \m[\\*[$PAGE_NUM_COLOR]]-\|\\n[#PAGENUMBER]\|-
+. if '\\*[$PAGENUM_STYLE]'alpha' \
+. PRINT \m[\\*[$PAGE_NUM_COLOR]]-\|\\n[#PAGENUMBER]\|-
+. \}
+. el \{\
+. ie !d$PAGENUM_STRING .PRINT \m[\\*[$PAGE_NUM_COLOR]]\\n[#PAGENUMBER]
+. el .PRINT \m[\\*[$PAGE_NUM_COLOR]]\\*[$PAGENUM_STRING]
+. \}
+. \}
+. ev
+. nr #DIVER_DEPTH 0
+.END
+\#
+\# ====================================================================
+\#
+\# +++FOOTNOTES+++
+\#
+\# Mom's footnote handling is baroque, to say the least. There are
+\# redundancies in a number of the macros involved, as well as some
+\# registers that probably don't get used anymore. The baggage is left
+\# in in case some new footnote oddity/challenge gets thrown at her.
+\#
+\# The macros are heavily commented.
+\#
+\# FOOTNOTE AUTOLEAD
+\# -----------------
+\# *Arguments:
+\# <autolead value for footnotes>
+\# *Function:
+\# Creates or modifies register #FN_AUTOLEAD.
+\# *Notes:
+\# Default is #DOC_LEAD/2 for TYPEWRITE; 2 for TYPESET
+\#
+.MAC FOOTNOTE_AUTOLEAD END
+. nr #FN_AUTOLEAD (p;\\$1)
+.END
+\#
+\# FOOTNOTE MARKERS
+\# ----------------
+\# *Arguments:
+\# <none> | <anything>
+\# *Function:
+\# Turns generation of footnote markers on or off.
+\# *Notes:
+\# Default is on.
+\#
+.MAC FOOTNOTE_MARKERS END
+. ie '\\$1'' .nr #FN_MARKERS 1
+. el .nr #FN_MARKERS 0
+.END
+\#
+\# FOOTNOTE MARKER STYLE
+\# ---------------------
+\# *Arguments:
+\# STAR | NUMBER | LINE
+\# *Function:
+\# Sets register #FN_MARKER_STYLE, used in FOOTNOTE to determine
+\# the style of footnote markers.
+\# *Notes:
+\# 1=STAR; 2=NUMBER; 3=LINE. LINE means "use output line numbers".
+\# Default is STAR.
+\#
+.MAC FOOTNOTE_MARKER_STYLE END
+. if '\\$1'STAR' \{\
+. if \\n[#FN_MARKER_STYLE]=3 \{\
+. if !\\n[#NEWPAGE]=1 \{\
+. tm1 "[mom]: Your current FOOTNOTE_MARKER STYLE is LINE.
+. tm1 " You cannot change footnote marker style without
+. tm1 " first breaking to a new page with NEWPAGE.
+. tm1 " Ignoring request FOOTNOTE_MARKER_STYLE STAR at line \\n[.c].
+. return
+. \}
+. \}
+. if \\n[#RUN_ON]=1 \{\
+. tm1 "[mom]: FOOTNOTE_MARKER_STYLE STAR at line \\n[.c] is incompatible
+. tm1 " with RUN_ON footnotes. Ignoring request.
+. return
+. \}
+. nr #FN_MARKER_STYLE 1
+. if \\n[#NEWPAGE]=1 .rr #NEWPAGE
+. FOOTNOTE_MARKERS
+. \}
+. if '\\$1'NUMBER' \{\
+. if \\n[#FN_MARKER_STYLE]=3 \{\
+. if !\\n[#NEWPAGE]=1 \{\
+. tm1 "[mom]: Your current FOOTNOTE_MARKER STYLE is NUMBER.
+. tm1 " You cannot change footnote marker style without
+. tm1 " first breaking to a new page with NEWPAGE.
+. tm1 " Ignoring request FOOTNOTE_MARKER_STYLE NUMBER at line \\n[.c].
+. return
+. \}
+. \}
+. if \\n[#RUN_ON]=1 \{\
+. tm1 "[mom]: FOOTNOTE_MARKER_STYLE NUMBER at line \\n[.c] is incompatible
+. tm1 " with RUN_ON footnotes. Ignoring request.
+. return
+. \}
+. nr #FN_MARKER_STYLE 2
+. shift
+. if '\\$1'NO_SUPERSCRIPT' .nr #NO_SUPERSCRIPT 1
+. if \\n[#NEWPAGE]=1 .rr #NEWPAGE
+. FOOTNOTE_MARKERS
+. \}
+. if '\\$1'LINE' \{\
+. nr #FN_MARKER_STYLE 3
+. FOOTNOTE_MARKERS OFF
+. if !\\n[#FN_LN_SEP] \
+. if !\\n[#FN_LN_BRACKETS] .FOOTNOTE_LINENUMBER_BRACKETS SQUARE
+. \}
+.END
+\#
+\# FOOTNOTE NUMBER PLACEHOLDERS
+\# ----------------------------
+\# *Argument:
+\# <number of placeholders>
+\# *Function:
+\# Sets register #FN_NUMBER_PLACEHOLDERS, used to establish whether to
+\# right pad a footnote number (in the footnote itself, not body copy).
+\# *Notes:
+\# No default is set for this; user must determine if, and where, it's
+\# required
+\#
+.MAC FOOTNOTE_NUMBER_PLACEHOLDERS END
+. nr #FN_NUMBER_PLACEHOLDERS \\$1
+.END
+\#
+\# FOOTNOTE LINENUMBER MARK
+\# ------------------------
+\# *Function:
+\# This string, when called inline, stores the current output line
+\# number in register #FN_MARK for use with FOOTNOTE.
+\#
+.ds FN_MARK \R'#FN_MARK \En[ln]'
+\#
+\# FOOTNOTE LINENUMBER SEPARATOR
+\# -----------------------------
+\# *Argument:
+\# <user-defined separator>
+\# *Function:
+\# Stores user-defined separator (for use then
+\# FOOTNOTE_MARKER_STYLE is LINE) in string $FN_LN_SEP. The
+\# separator is intended to be used when the user wishes a
+\# separator, rather than the choice of brackets offered by
+\# FOOTNOTE_LINENUMBER_BRACKETS.
+\#
+.MAC FOOTNOTE_LINENUMBER_SEPARATOR END
+. rr #FN_LN_BRACKETS
+. nr #FN_LN_SEP 1
+. ds $FN_LN_SEP "\\$1
+.END
+\#
+\# FOOTNOTE LINENUMBER BRACKETS
+\# ----------------------------
+\# *Argument:
+\# PARENS | SQUARE | BRACES or ( | [ | {
+\# *Function:
+\# Sets register #FN_LN_BRACKETS to 1, and creates strings
+\# $FN_OPEN_BRACKET and $FN_CLOSE_BRACKET according to the given
+\# argument.
+\#
+.MAC FOOTNOTE_LINENUMBER_BRACKETS END
+. rr #FN_LN_SEP
+. nr #FN_LN_BRACKETS 1
+. if '\\$1'PARENS' \{\
+. ds $FN_OPEN_BRACKET (
+. ds $FN_CLOSE_BRACKET )
+. \}
+. if '\\$1'(' \{\
+. ds $FN_OPEN_BRACKET (
+. ds $FN_CLOSE_BRACKET )
+. \}
+. if '\\$1'SQUARE' \{\
+. ds $FN_OPEN_BRACKET [
+. ds $FN_CLOSE_BRACKET ]
+. \}
+. if '\\$1'[' \{\
+. ds $FN_OPEN_BRACKET [
+. ds $FN_CLOSE_BRACKET ]
+. \}
+. if '\\$1'BRACES' \{\
+. ds $FN_OPEN_BRACKET {
+. ds $FN_CLOSE_BRACKET }
+. \}
+. if '\\$1'{' \{\
+. ds $FN_OPEN_BRACKET {
+. ds $FN_CLOSE_BRACKET }
+. \}
+.END
+\#
+\# RESET FOOTNOTE NUMBER
+\# ---------------------
+\# *Arguments:
+\# <none> | PAGE
+\# *Function:
+\# Resets register #FN_NUMBER to 1. If argument is PAGE, creates
+\# toggle #RESET_FN_NUMBER which is checked in HEADER. If 1,
+\# numbered footnotes on every page start at 1.
+\#
+.MAC RESET_FOOTNOTE_NUMBER END
+. ie '\\$1'' .nr #FN_NUMBER 0 1
+. el .nr #RESET_FN_NUMBER 1
+.END
+\#
+\# FOOTNOTE RULE LENGTH
+\# --------------------
+\# *Arguments:
+\# <length of rule used to separate footnotes from running text>
+\# *Function:
+\# Creates or modifies registers #FN_RULE_LENGTH.
+\# *Notes:
+\# Requires unit of measure (iPpcm).
+\# Default is 4P for both PRINTSTYLEs.
+\#
+.MAC FOOTNOTE_RULE_LENGTH END
+. nr #FN_RULE_LENGTH (\\$1)
+.END
+\#
+\# FOOTNOTE_RULE_ADJ
+\# -----------------
+\# *Arguments:
+\# <number of points to raise footnote rule from it's baseline position>
+\# *Function:
+\# Creates or modifies register #FN_RULE_ADJ.
+\# *Notes:
+\# Default is 3p for both TYPESTYLES.
+\#
+\# Requires unit of measure.
+\#
+.MAC FOOTNOTE_RULE_ADJ END
+. nr #FN_RULE_ADJ (\\$1)
+.END
+\#
+\# FOOTNOTE RULE
+\# -------------
+\# *Arguments:
+\# <none> | <anything>
+\# *Function:
+\# Turns printing of footnote separator rule on or off. If invoked as
+\# PRINT_FOOTNOTE_RULE, prints footnote separator rule.
+\# *Notes:
+\# Default is on.
+\#
+\# Invoked in FOOTNOTE (as PRINT_FOOTNOTE_RULE) as 1st line of a footnote
+\# if the footnote number (#FN_COUNT) is 1.
+\#
+.MAC FOOTNOTE_RULE END
+. ie '\\$0'PRINT_FOOTNOTE_RULE' \{\
+. if \\n[#FN_RULE]=0 .RLD 1v
+. RLD 1v
+. LEFT
+\v'-\\n[#FN_RULE_ADJ]u-\\n[#FN_RULE_WEIGHT_ADJ]u'\
+\D't \\n[#FN_RULE_WEIGHT]'\
+\h'-\\n[#FN_RULE_WEIGHT]u'\
+\D'l \\n[#FN_RULE_LENGTH]u 0'\
+\v'+\\n[#FN_RULE_ADJ]u+\\n[#FN_RULE_WEIGHT_ADJ]u'
+\!. ps \\n[#DOC_PT_SIZE]u\\*$[FN_SIZE_CHANGE]
+. QUAD \\*[$FN_QUAD]
+. \}
+. el \{\
+. ie '\\$1'' .nr #FN_RULE 1
+. el .nr #FN_RULE 0
+. \}
+.END
+\#
+\# FOOTNOTE SPACING
+\# ----------------
+\# *Arguments:
+\# <per item post footnote spacing> | <anything>
+\# *Function:
+\# Enables printing of post footnote spacing.
+\# *Notes:
+\# Default is no space.
+\#
+.MAC FOOTNOTE_SPACING END
+. ie \B'\\$1' .ds $FN_SPACE \\$1
+. el .rm $FN_SPACE
+.END
+\#
+\# FOOTNOTE FIRST LINE INDENT
+\# --------------------------
+\# *Arguments:
+\# <indent>
+\# *Function:
+\# Indents first line of footnotes.
+\# *Notes:
+\# Default is no indent.
+\#
+.MAC FOOTNOTE_INDENT END
+. nr #FN_INDENT \\$1
+.END
+\#
+\# RUN ON FOOTNOTES
+\# ----------------
+\# *Arguments:
+\# <none> | <anything>
+\# *Function:
+\# Toggles run-on footnotes on or off.
+\#
+.MAC FOOTNOTES_RUN_ON END
+. ie '\\$1'' \{\
+. if \\n[#FN_COUNT]>0 \{\
+. tm1 "[mom]: Switching to run-on footnotes at line \\n[.c] will cause
+. tm1 " you to loose footnotes already formatted for this page.
+. tm1 " Ignoring request FOOTNOTES_RUN_ON.
+. rr #RUN_ON
+. return
+. \}
+. nr #RUN_ON 1
+. if \\n[#FN_MARKER_STYLE]=1 .RUNON_WARNING
+. if \\n[#FN_MARKER_STYLE]=2 .RUNON_WARNING
+. \}
+. el \{\
+. if \\n[#FN_COUNT]>0 \{\
+. if \\n[#RUN_ON]=1 \{\
+. tm1 "[mom]: Switching off run-on footnotes at line \\n[.c] will cause
+. tm1 " you to loose footnotes already formatted for this page.
+. tm1 " Ignoring request FOOTNOTES_RUN_ON \\$1.
+. return
+. \}
+. \}
+. rr #RUN_ON
+. \}
+.END
+\#
+.MAC RUNON_WARNING END
+. if \\n[#FN_MARKER_STYLE]=1 \{\
+. tm1 "[mom]: The footnote marker style active at line \\n[.c] is STAR,
+. tm1 " which is incompatible with run-on footnotes. Please change
+. tm1 " the footnote marker style to LINE. Continuing to process,
+. tm1 " but ignoring request FOOTNOTES_RUN_ON.
+. rr #RUN_ON
+. \}
+. if \\n[#FN_MARKER_STYLE]=2 \{\
+. tm1 "[mom]: The footnote marker style active at line \\n[.c] is NUMBER,
+. tm1 " which is incompatible with run-on footnotes. Please change
+. tm1 " the footnote marker style to LINE. Continuing to process,
+. tm1 " but ignoring request FOOTNOTES_RUN_ON.
+. rr #RUN_ON
+. \}
+.END
+\#
+\# FOOTNOTE
+\# --------
+\# *Arguments:
+\# <none> | INDENT L|LEFT|R|RIGHT|B|BOTH <indent value> | <anything>
+\# *Function:
+\# Begins collecting and diverting footnote text if no argument
+\# given. Otherwise, ends diversion FOOTNOTES, measures footnote
+\# depth, and sets footnote trap.
+\# *Notes:
+\# The input line preceding a footnote call MUST terminate with \c
+\# or the footnote marker will be spaced away from the word it
+\# should be joined to.
+\#
+\# If FOOTNOTE is invoked with INDENT, the footnote will
+\# be indented. An indent style and an indent value must be given.
+\# Subsequent footnotes will NOT be indented; INDENT must be given
+\# for each footnote the user wants indented.
+\#
+.MAC FOOTNOTE END
+. ie '\\$1'' \{\
+. if \\n[#UNDERLINE_ON] \{\
+. UNDERLINE OFF
+. nr #UNDERLINE_WAS_ON_FN 1
+. \}
+. if \\n[#FN_MARKER_STYLE]=3 \{\
+. if !\\n[#LINENUMBERS] \{\
+. tm1 "[mom]: Line numbering must be enabled with NUMBER_LINES when
+. tm1 " FOOTNOTE_MARKER_STYLE is LINE.
+. ab [mom]: Aborting '\\n[.F]' at \\$0, line \\n[.c].
+. \}
+. if \\n[#FN_MARK]=0 .nr #FN_MARK \\n[ln]
+. nr #FN_MARK_2 \\n[ln]
+. if '\\n[.z]'P_QUOTE' \{\
+. nr #FN_MARK -1
+. nr #FN_MARK_2 -1
+. \}
+. if \\n[#IN_DIVER]=1 \{\
+. if '\\n[.z]'P_QUOTE' \{\
+. if !\\n[#QUOTE_LN]=1 \{\
+. if !\\n[#SILENT_QUOTE_LN]=1 \{\
+. tm1 "[mom]: You have requested a line-numbered footnote inside a
+. tm1 " QUOTE at line \\n[.c], but line-numbering has not been enabled
+. tm1 " for QUOTES. Printing footnote with label "0".
+. rr #FN_MARK
+. rr #FN_MARK_2
+. \}
+. \}
+. \}
+. if '\\n[.z]'B_QUOTE' \{\
+. if !\\n[#BQUOTE_LN]=1 \{\
+. if !\\n[#SILENT_BQUOTE_LN]=1 \{\
+. tm1 "[mom]: You have requested a line-numbered footnote inside a
+. tm1 " BLOCKQUOTE at line \\n[.c], but line-numbering has not been enabled
+. tm1 " for BLOCKQUOTES. Printing footnote with label "0".
+. rr #FN_MARK
+. rr #FN_MARK_2
+. \}
+. \}
+. \}
+. \}
+. \}
+.\" Begin processing footnotes that occur inside QUOTE, BLOCKQUOTE
+.\" or EPIGRAPH.
+. if \\n[#IN_DIVER]=1 \{\
+. nr #PAGE_POS \\n[nl]+\\n[.d]+\\n[#DOC_LEAD]
+. nr #FOOTER_POS \\n[#PAGE_LENGTH]+(\\n[#VARIABLE_FOOTER_POS]-1)
+. nr #SPACE_TO_FOOTER \\n[#FOOTER_POS]-\\n[#PAGE_POS]
+.\" Are we on a "defer" line? If so, defer the text of the footnote.
+. ie \\n[#SPACE_TO_FOOTER]<=\\n[#DOC_LEAD] \
+. nr #DIVER_FN 2 \" treat like a normal deferred footnote
+. el \
+. nr #DIVER_FN 2 \" treat like a normal footnote
+. if \\n[#PAGE_POS]>\\n[#FOOTER_POS] \
+. nr #DIVER_FN 1 \" move this footnote
+.\" Test for situation where, because a final line of QUOTE, BLOCKQUOTE
+.\" or EPIGRAPH isn't yet adjusted at this point, the last word on the
+.\" line may *seem* to belong to the final line of the page, but will,
+.\" in fact, become the first word of the subsequent page. In such
+.\" circumstances, we want the footnote to be treated as a "moved"
+.\" diversion footnote.
+. if \\n[.k]>\\n[.l] .nr #DIVER_FN 1
+. if r #DIVER_FN \{\
+. if !\\n[#DIVER_FN]=2 .\\n+[#DONE_ONCE]
+.\" A footnote inside a diversion will become the 1st footnote on the
+.\" following page/column.
+. if \\n[#DIVER_FN]=1 .DIVER_FN_1_PRE
+.\" A footnote inside a diversion that should be treated like a
+.\" normal footnote (including defers.)
+. if \\n[#DIVER_FN]=2 .DIVER_FN_2_PRE
+. \}
+. nr #SAVED_FN_COUNT \\n[#FN_COUNT]+1
+. nr #SAVED_FN_COUNT_FOR_COLS \\n[#FN_COUNT_FOR_COLS]+1
+. \}
+.\" End processing footnotes that occur inside QUOTE, BLOCKQUOTE or
+.\" EPIGRAPH.
+.\"
+.\" Test for situation where, because a final line of running text
+.\" isn't yet adjusted at this point, the last word on the line may
+.\" *seem* to belong to the final line of the page, but will, in
+.\" fact, become the first word of the subsequent page. In such
+.\" circumstances, we want the footnote marker in running text to
+.\" be the correct one for the 1st footnote on the page.
+. if \\n[.k]>\\n[.l] \{\
+. if (\\n[nl]+\\n[#DOC_LEAD])>(\\n[#PAGE_LENGTH]+\\n[#VARIABLE_FOOTER_POS]) \{\
+. ie \\n[#COLUMNS]=1 \{\
+. if \\n[#COL_NUM]=\\n[#NUM_COLS] \{\
+. if \\n[#FN_MARKER_STYLE]=1 .nr #FN_COUNT_FOR_COLS 0 1
+. if \\n[#FN_MARKER_STYLE]=2 \{\
+. if \\n[#RESET_FN_NUMBER] \{\
+. nr #FN_NUMBER 0 1
+. nr #NOT_YET_ADJUSTED 1
+. \}
+. \}
+. \}
+. \}
+. el \{\
+. if \\n[#FN_MARKER_STYLE]=1 .nr #FN_COUNT 0 1
+. if \\n[#FN_MARKER_STYLE]=2 \{\
+. if \\n[#RESET_FN_NUMBER] \{\
+. nr #FN_NUMBER 0 1
+. nr #NOT_YET_ADJUSTED 1
+. \}
+. \}
+. \}
+. \}
+. \}
+. if \\n[#FN_MARKERS] \{\
+.\" Housekeeping
+. if \\n[#CONDENSE] \*[CONDX]\c
+. if \\n[#EXTEND] \*[EXTX]\c
+.\" Add footnote markers to running text...
+. if !\\n[#NO_FN_MARKER] \{\
+.\" ...but not if TERMINATE has not been called
+. if !r#TERMINATE \{\
+.\" Marker style star/dagger/double-dagger
+. if \\n[#FN_MARKER_STYLE]=1 \{\
+.\" Columnar docs either move col to col, or last col to next page.
+.\" They require their own special FN_COUNT because regular FN_COUNT
+.\" is used to figure out things like whether or not to put a rule
+.\" above footnotes (in addition to keeping track of the footnote
+.\" count in non-columnar docs).
+. ie \\n[#COLUMNS]=1 \{\
+. if \\n[#FN_COUNT_FOR_COLS]=0 .PRINT \*[BU2]*\c
+. if \\n[#FN_COUNT_FOR_COLS]=1 .PRINT \*[BU1]\[dg]\c
+. if \\n[#FN_COUNT_FOR_COLS]=2 .PRINT \[dd]\c
+. if \\n[#FN_COUNT_FOR_COLS]=3 .PRINT \*[BU2]**\c
+. if \\n[#FN_COUNT_FOR_COLS]=4 .PRINT \*[BU1]\[dg]\[dg]\c
+. if \\n[#FN_COUNT_FOR_COLS]=5 .PRINT \[dd]\[dd]\c
+. if \\n[#FN_COUNT_FOR_COLS]=6 .PRINT \*[BU2]***\c
+. if \\n[#FN_COUNT_FOR_COLS]=7 .PRINT \*[BU1]\[dg]\[dg]\[dg]\c
+. if \\n[#FN_COUNT_FOR_COLS]=8 .PRINT \[dd]\[dd]\[dd]\c
+. if \\n[#FN_COUNT_FOR_COLS]=9 .PRINT \*[BU2]****\c
+. \}
+. el \{\
+. if \\n[#FN_COUNT]=0 .PRINT \*[BU2]*\c
+. if \\n[#FN_COUNT]=1 .PRINT \*[BU1]\[dg]\c
+. if \\n[#FN_COUNT]=2 .PRINT \[dd]\c
+. if \\n[#FN_COUNT]=3 .PRINT \*[BU2]**\c
+. if \\n[#FN_COUNT]=4 .PRINT \*[BU1]\[dg]\[dg]\c
+. if \\n[#FN_COUNT]=5 .PRINT \[dd]\[dd]\c
+. if \\n[#FN_COUNT]=6 .PRINT \*[BU2]***\c
+. if \\n[#FN_COUNT]=7 .PRINT \*[BU1]\[dg]\[dg]\[dg]\c
+. if \\n[#FN_COUNT]=8 .PRINT \[dd]\[dd]\[dd]\c
+. if \\n[#FN_COUNT]=9 .PRINT \*[BU2]****\c
+. \}
+. \}
+.\" Marker style superscript numbers
+. if \\n[#FN_MARKER_STYLE]=2 \{\
+. if \\n[#PRINT_STYLE]=1 \
+. PRINT \
+"\s-2\v'-\\n[#DOC_LEAD]u/5u'\\n+[#FN_NUMBER]\v'+\\n[#DOC_LEAD]u/5u'\s+2\c"
+. if \\n[#PRINT_STYLE]=2 \
+. PRINT \
+"\*[SUP]\\n+[#FN_NUMBER]\*[SUPX]\c"
+. \}
+. \}
+. \}
+. \}
+.\" More housekeeping
+.\"
+.\" #SPACE_REMAINING is the space left between where we are
+.\" on the page and the bottom margin. It's used to determine whether
+.\" or not the footnote will overflow, and how many lines of
+.\" footnotes will fit on the page if some have to overflow.
+. ie \\n[#DIVER_FN]=2 \
+. nr #SPACE_REMAINING (\\n[#PAGE_LENGTH]-\\n[#B_MARGIN])-(\\n[#PAGE_POS])
+. el \
+. nr #SPACE_REMAINING (\\n[#PAGE_LENGTH]-\\n[#B_MARGIN])-\\n[nl]
+. if \\n[#FROM_DIVERT_FN]=1 \{\
+. nr #SPACE_REMAINING \\n[#PAGE_LENGTH]-\\n[#B_MARGIN]
+. rr #FROM_DIVERT_FN
+. \}
+. nr #PP_STYLE_PREV \\n[#PP_STYLE]
+. nr #PP_STYLE 2
+. if \\n[#INDENT_FIRST_PARAS] .nr #INDENT_FIRSTS 1
+. INDENT_FIRST_PARAS
+.\" Prepare FOOTNOTE to receive footnote text.
+. if \\n[.hy] .nr #RESTORE_HY_PARAMS \\n[.hy]
+. ev FOOTNOTES
+. ll \\n[#DOC_L_LENGTH]u
+. ta \\n[.l]u
+. if \\n[#COLUMNS]=1 \{\
+. ll \\n[#COL_L_LENGTH]u
+. ta \\n[.l]u
+. \}
+. if \\n[#FN_R_INDENT] \{\
+. ll -\\n[#FN_R_INDENT]u
+. ta \\n[.l]u
+. \}
+. if \\n[#FN_BR_INDENT] \{\
+. ll -\\n[#FN_BR_INDENT]u
+. ta \\n[.l]u
+. \}
+. FAMILY \\*[$FN_FAM]
+. FT \\*[$FN_FT]
+. ps \\n[#DOC_PT_SIZE]u\\*[$FN_SIZE_CHANGE]
+. vs \\n[.ps]u+\\n[#FN_AUTOLEAD]u
+. QUAD \\*[$FN_QUAD]
+. if \\n[#PRINT_STYLE]=1 \{\
+. TYPEWRITER
+. ie \\n[#SINGLE_SPACE] .vs \\n[#ORIGINAL_DOC_LEAD]u
+. el .vs \\n[#ORIGINAL_DOC_LEAD]u/2u
+. QUAD LEFT
+. HY OFF
+. \}
+. nr #FN_LEAD \\n[#LEAD]
+.\" Begin diversion FOOTNOTES or FN_IN_DIVER
+. ie r#COUNTERS_RESET \{\
+. ie \\n[#DONE_ONCE]=1 \{\
+. ie \\n[#RUN_ON] \{\
+. di RUNON_FN_IN_DIVER
+. nr #RUNON_FN_IN_DIVER 1
+. \}
+. el .di FN_IN_DIVER
+. \}
+. el \{\
+. ie \\n[#RUN_ON] \{\
+. da RUNON_FN_IN_DIVER
+. nr #RUNON_FN_IN_DIVER 1
+. \}
+. el .da FN_IN_DIVER
+. \}
+. \\n+[#DONE_ONCE]
+. \}
+. el \{\
+. ie \\n[#RUN_ON] \{\
+. nh
+. da RUNON_FOOTNOTES
+. nr #RUNON_FOOTNOTES 1
+. \}
+. el .da FOOTNOTES
+. \}
+. if \\n[#FOOTNOTE_COLOR]=1 \{\
+. TRAP OFF
+. nf
+\m[\\*[$FOOTNOTE_COLOR]]
+. EOL
+. fi
+. TRAP
+. \}
+. if \\n[#EPIGRAPH] .nr #FN_FOR_EPI 1
+.\" When a deferred footnote is also the 1st footnote on the page,
+.\" and when the page it's output on also has footnotes, some
+.\" whitespace is needed between the deferred footnote and the
+.\" first footnote belonging to the output page so that there's
+.\" no confusion when two stars (or two number 1s) appear in
+.\" footnotes...
+. if \\n[#FN_DEFER_SPACE] \{\
+.\" ...but only add the extra space if TERMINATE has not been called
+. if !r#TERMINATE \{\
+.\" ...and not if defer space has already been added
+. if !\\n[#DEFER_SPACE_ADDED] \{\
+.\" ...and not if the footnote count the last time we checked for
+.\" a defer situation inside a diversion is greater than 1.
+. if !\\n[#SAVED_DIVER_FN_COUNT]>1 \{\
+. if \\n[#FN_MARKER_STYLE]=1 .ALD 1v
+. if \\n[#RESET_FN_NUMBER] .ALD 1v
+. nr #DEFER_SPACE_ADDED 1
+. \}
+. \}
+. \}
+. rr #FN_DEFER_SPACE
+. rr #SAVED_DIVER_FN_COUNT
+. \}
+. if \\n[#DIVERTED]=3 \{\
+. if \\n[#FN_COUNT]>0 \{\
+\!. RLD 1v
+. \}
+. \}
+.\" Add footnote rule (or, if no rule, some whitespace).
+.\" N.B.- this line increments #FN_COUNT each and every time FOOTNOTE
+.\" is run.
+. if \\n+[#FN_COUNT]=1 \{\
+.\" If a footnote is called in a diversion, and the footnote has to
+.\" be moved, don't put in the rule now (it's taken care of when
+.\" FN_IN_DIVER is output into FOOTNOTE in PROCESS_FN_IN_DIVER).
+. if !\\n[#DONT_RULE_ME]=1 \{\
+. if !\\n[#FN_DEPTH] \{\
+. if \\n[#PRINT_STYLE]=1 \
+. if !\\n[#RUN_ON] .sp \\n[#DOC_LEAD]u
+. ie \\n[#FN_RULE]=1 \{\
+. if !\\n[#RUN_ON] \{\
+. if \\n[#SINGLE_SPACE] .sp \\n[#DOC_LEAD]u
+. PRINT_FOOTNOTE_RULE
+. if !'\\*[$FN_SPACE]'' .sp -\\*[$FN_SPACE]
+. \}
+. \}
+. el .sp
+. nr #RULED 1
+. \}
+. \}
+. \}
+. rr #DONT_RULE_ME
+. ds $RESTORE_SS_VAR \\*[$SS_VAR]
+. SS 0
+.\" Add footnote markers to footnote text...
+. ie \\n[#FN_MARKERS] \{\
+. if !'\\*[$FN_SPACE]'' \
+. if \\n[#FN_COUNT]>0 .ALD \\*[$FN_SPACE]
+. if !\\n[#NO_FN_MARKER] \{\
+.\" ...but not if TERMINATE has been called.
+. if !r#TERMINATE \{\
+. if \\n[#REF]=1 \{\
+. nr #REF_FN_INDENT (u;\\*[$REF_FN_INDENT])
+. ti \\n[#REF_FN_INDENT]u
+. \}
+. if \\n[#FN_MARKER_STYLE]=1 \{\
+. ie \\n[#COLUMNS]=1 \{\
+. \\n+[#FN_COUNT_FOR_COLS]
+. if \\n[#FN_COUNT_FOR_COLS]=1 .PRINT \h'0+\\n[#FN_INDENT]u'*\c
+. if \\n[#FN_COUNT_FOR_COLS]=2 .PRINT \h'0+\\n[#FN_INDENT]u'\[dg]\c
+. if \\n[#FN_COUNT_FOR_COLS]=3 .PRINT \h'0+\\n[#FN_INDENT]u'\[dd]\c
+. if \\n[#FN_COUNT_FOR_COLS]=4 .PRINT \h'0+\\n[#FN_INDENT]u'**\c
+. if \\n[#FN_COUNT_FOR_COLS]=5 .PRINT \h'0+\\n[#FN_INDENT]u'\[dg]\[dg]\c
+. if \\n[#FN_COUNT_FOR_COLS]=6 .PRINT \h'0+\\n[#FN_INDENT]u'\[dd]\[dd]\c
+. if \\n[#FN_COUNT_FOR_COLS]=7 .PRINT \h'0+\\n[#FN_INDENT]u'***\c
+. if \\n[#FN_COUNT_FOR_COLS]=8 .PRINT \h'0+\\n[#FN_INDENT]u'\[dg]\[dg]\[dg]\c
+. if \\n[#FN_COUNT_FOR_COLS]=9 .PRINT \h'0+\\n[#FN_INDENT]u'\[dd]\[dd]\[dd]\c
+. if \\n[#FN_COUNT_FOR_COLS]=10 .PRINT \h'0+\\n[#FN_INDENT]u'****\c
+. \}
+. el \{\
+. if \\n[#FN_COUNT]=1 .PRINT \h'0+\\n[#FN_INDENT]u'*\c
+. if \\n[#FN_COUNT]=2 .PRINT \h'0+\\n[#FN_INDENT]u'\[dg]\c
+. if \\n[#FN_COUNT]=3 .PRINT \h'0+\\n[#FN_INDENT]u'\[dd]\c
+. if \\n[#FN_COUNT]=4 .PRINT \h'0+\\n[#FN_INDENT]u'**\c
+. if \\n[#FN_COUNT]=5 .PRINT \h'0+\\n[#FN_INDENT]u'\[dg]\[dg]\c
+. if \\n[#FN_COUNT]=6 .PRINT \h'0+\\n[#FN_INDENT]u'\[dd]\[dd]\c
+. if \\n[#FN_COUNT]=7 .PRINT \h'0+\\n[#FN_INDENT]u'***\c
+. if \\n[#FN_COUNT]=8 .PRINT \h'0+\\n[#FN_INDENT]u'\[dg]\[dg]\[dg]\c
+. if \\n[#FN_COUNT]=9 .PRINT \h'0+\\n[#FN_INDENT]u'\[dd]\[dd]\[dd]\c
+. if \\n[#FN_COUNT]=10 .PRINT \h'0+\\n[#FN_INDENT]u'****\c
+. \}
+. \}
+. if \\n[#FN_MARKER_STYLE]=2 \{\
+. ds $FN_NUMBER \\n[#FN_NUMBER]
+. length #FN_NUMBER_LENGTH \\*[$FN_NUMBER]
+. if \\n[#COLUMNS]=1 \
+. \\n+[#FN_COUNT_FOR_COLS]
+. if \\n[#NOT_YET_ADJUSTED]=1 \{\
+. nr #FN_NUMBER 1 1
+. rr #NOT_YET_ADJUSTED
+. \}
+. if \\n[#PRINT_STYLE]=1 \{\
+. ie \\n[#NO_SUPERSCRIPT] \{\
+. ie \\n[#FN_NUMBER_LENGTH]<\\n[#FN_NUMBER_PLACEHOLDERS] \
+. PRINT "\h'0+\\n[#FN_INDENT]u'\0(\\n[#FN_NUMBER])\|\c"
+. el \
+. PRINT "\h'0+\\n[#FN_INDENT]u'(\\n[#FN_NUMBER])\|\c"
+. \}
+. el \{\
+. ie \\n[#FN_NUMBER_LENGTH]<\\n[#FN_NUMBER_PLACEHOLDERS] \
+. PRINT \
+"\h'0+\\n[#FN_INDENT]u'\s-2\v'-\\n[.v]u/5u'\0\\n[#FN_NUMBER]\|\v'+\\n[.v]u/5u'\s+2\|\c"
+. el \
+. PRINT \
+"\h'0+\\n[#FN_INDENT]u'\s-2\v'-\\n[.v]u/5u'\\n[#FN_NUMBER]\|\v'+\\n[.v]u/5u'\s+2\|\c"
+. \}
+. \}
+. if \\n[#PRINT_STYLE]=2 \{\
+. ie \\n[#FN_NUMBER_LENGTH]<\\n[#FN_NUMBER_PLACEHOLDERS] \
+. PRINT "\h'0+\\n[#FN_INDENT]u'\*[SUP]\0\\n[#FN_NUMBER]\*[SUPX]\*[FU 3]\c"
+. el \
+. PRINT "\h'0+\\n[#FN_INDENT]u'\*[SUP]\\n[#FN_NUMBER]\*[SUPX]\*[FU 3]\c"
+. \}
+. \}
+. \}
+. \}
+. \}
+. el \{\
+.\" Line-numbered footnotes handling
+. if \\n[#FN_MARKER_STYLE]=3 \{\
+. if \\n[#FN_SPACE]>0 \{\
+. if !\\n[#RUN_ON]=1 \
+. if \\n[#FN_COUNT]>0 .ALD \\n[#FN_SPACE]u
+. \}
+. if \\n[#REF]=1 \{\
+. if !\\n[#RUN_ON]=1 \{\
+\!. ti +\\n[#REF_FN_INDENT]uu
+. \}
+. \}
+. ie \\n[#FN_LN_BRACKETS]=1 \{\
+. ds $FN_LINENUMBER \h'0+\\n[#FN_INDENT]u'\v'-.085m'\\*[$FN_OPEN_BRACKET]\v'.085m'
+. ie \\n[#FN_MARK_2]=\\n[#FN_MARK] \
+. as $FN_LINENUMBER \
+\\n[#FN_MARK]\v'-.085m'\\*[$FN_CLOSE_BRACKET]\v'.085m'\h'.25m'
+. el \
+. as $FN_LINENUMBER \
+\\n[#FN_MARK]\v'-.1m'-\v'.1m'\\n[#FN_MARK_2]\v'-.085m'\
+\\*[$FN_CLOSE_BRACKET]\v'.085m'\h'.25m'
+. \}
+. el \{\
+. ie \\n[#FN_MARK_2]=\\n[#FN_MARK] \
+. ds $FN_LINENUMBER \\n[#FN_MARK]\\*[$FN_LN_SEP]
+. el \
+. ds $FN_LINENUMBER \
+\h'0+\\n[#FN_INDENT]u'\\n[#FN_MARK]\v'-.1m'-\v'.1m'\\n[#FN_MARK_2]\\*[$FN_LN_SEP]
+. \}
+. \}
+. if !\\n[#NO_FN_MARKER] \
+. PRINT \\*[$FN_LINENUMBER]\c
+. rm $FN_LINENUMBER
+. nr #FN_MARK 0
+. \}
+. \}
+. el \{\
+.\" If INDENT arg is passed to FOOTNOTE, calculate the indent...
+. ie '\\$1'INDENT' \{\
+. ev FOOTNOTES
+. if '\\$2'L' .in (\\$3)
+. if '\\$2'LEFT' .in (\\$3)
+. if '\\$2'R' .nr #FN_R_INDENT (\\$3)
+. if '\\$2'RIGHT' .nr #FN_R_INDENT (\\$3)
+. if '\\$2'B' \{\
+. nr #FN_BL_INDENT (\\$3)
+. ie '\\$4'' .nr #FN_BR_INDENT \\n[#FN_BL_INDENT]
+. el .nr #FN_BR_INDENT (\\$4)
+. in \\n[#FN_BL_INDENT]u
+. \}
+. if '\\$2'BOTH' \{\
+. nr #FN_BL_INDENT (\\$3)
+. ie '\\$4'' .nr #FN_BR_INDENT \\n[#FN_BL_INDENT]
+. el .nr #FN_BR_INDENT (\\$4)
+. in \\n[#FN_BL_INDENT]u
+. \}
+. ev
+.\" ...then re-run FOOTNOTE without an argument.
+. FOOTNOTE
+. \}
+. el \{\
+. br
+.\" Add "defer space" if the previously diverted footnote was the
+.\" 1st footnote proper to its page (i.e. it looks like a deferred
+.\" footnote but it's really an overflow).
+. if \\n[#DIVERTED] \{\
+. if \\n[#PREV_FN_DEFERRED]=1 \{\
+. if \\n[#FN_MARKER_STYLE]=1 .ALD \\n[#FN_LEAD]u
+. if \\n[#RESET_FN_NUMBER] .ALD \\n[#FN_LEAD]u
+. nr #PREV_FN_DEFERRED 2
+. \}
+. \}
+. if \\n[#REF]=1 \{\
+\!. in
+. \}
+.\" Terminate FOOTNOTES or FN_IN_DIVER diversion
+. di
+. HY_SET 1 \\n[#DIVERSIONS_HY_MARGIN]u (\\n[#PT_SIZE]u/1000u/8u)p
+. if \\n[#RESTORE_HY_PARAMS] .hy \\n[#RESTORE_HY_PARAMS]
+.\" More housekeeping
+.\" Turn off indent possibly set by FOOTNOTE INDENT
+. in 0
+. ev
+. if \\n[#UNDERLINE_WAS_ON_FN] \{\
+. UNDERLINE
+. rr #UNDERLINE_WAS_ON_FN
+. \}
+.\" Restore sentence spacing
+. if \\n[#PRINT_STYLE]=2 \{\
+. if d $RESTORE_SS_VAR .SS \\*[$RESTORE_SS_VAR]
+. rm $RESTORE_SS_VAR
+. \}
+. rr #FN_R_INDENT
+. rr #FN_BR_INDENT
+. nr #PP_STYLE \\n[#PP_STYLE_PREV]
+. if !\\n[#INDENT_FIRSTS] .INDENT_FIRST_PARAS OFF
+. rr #INDENT_FIRSTS
+.\" Calculate footnote depth, but not if #COUNTERS_RESET (created in
+.\" DIVER_FN_1_PRE) to instruct FOOTNOTES to skip this step for now
+.\" (it's taken care of when FN_IN_DIVER is output into FOOTNOTES in
+.\" PROCESS_FN_IN_DIVER).
+. ie r#COUNTERS_RESET .rr #COUNTERS_RESET
+. el \{\
+. nr #GET_DEPTH 1
+.\" If the footnote is the 1st on the page and it falls too close
+.\" to the bottom margin, defer the footnote text to the next page...
+. if (\\n[#SPACE_REMAINING]-1)<=(\\n[.v]) \{\
+.\" ...but not if PROCESS_FN_LEFTOVER has set #PREV_FN_DEFERRED to 1
+. if !\\n[#PREV_FN_DEFERRED]=1 \{\
+. nr #FN_DEFER 1
+. nr #FN_DEPTH +\\n[#DIVER_DEPTH]
+. rr #GET_DEPTH
+.\" This is required so that the defer space clause can distinguish
+.\" a real #FN_COUNT=1 from one generated if FOOTNOTE is run inside
+.\" QUOTE, BLOCKQUOTE or EPIGRAPH
+. if \\n[#DIVER_FN]=2 \{\
+. nr #SAVED_DIVER_FN_COUNT \\n[#FN_COUNT]
+. rr #DIVER_FN
+. \}
+. \}
+. \}
+.\" Calculate the footnote depth.
+. if \\n[#GET_DEPTH]=1 \{\
+.\" Save the previous footnote depth (for use when there will be
+.\" some overflowed footnote text).
+. nr #SAVED_FN_DEPTH_1 \\n[#FN_DEPTH]
+.\" Add the depth of the current footnote to any already existent
+.\" footnotes.
+. nr #FN_DEPTH +\\n[#DIVER_DEPTH]
+.\" Special handling for run-on footnotes
+. if \\n[#RUN_ON]=1 \{\
+. if \\n[#RUNON_FOOTNOTES] .unformat RUNON_FOOTNOTES
+. if \\n[#RUNON_FN_IN_DIVER] .unformat RUNON_FN_IN_DIVER
+. ev FOOTNOTES
+.\" Recreate FOOTNOTES with rule followed by text of unformatted
+.\" run-on footnotes.
+. di FOOTNOTES
+. ie \\n[#FN_RULE]=0 .RLD 1v
+. el \{\
+\v'-\\n[#FN_RULE_ADJ]u-\\n[#FN_RULE_WEIGHT_ADJ]u'\
+\D't \\n[#FN_RULE_WEIGHT]'\
+\h'-\\n[#FN_RULE_WEIGHT]u'\
+\D'l \\n[#FN_RULE_LENGTH]u 0'\
+\v'+\\n[#FN_RULE_ADJ]u+\\n[#FN_RULE_WEIGHT_ADJ]u'
+. \}
+. br
+. if \\n[#RUNON_FOOTNOTES] \{\
+. RUNON_FOOTNOTES
+. rr #RUNON_FOOTNOTES
+. \}
+. if \\n[#RUNON_FN_IN_DIVER] \{\
+. RUNON_FN_IN_DIVER
+. rr #RUNON_FN_IN_DIVER
+. \}
+. br
+. di
+. ev
+. nr #FN_DEPTH \\n[#DIVER_DEPTH]
+. nr #SAVED_VFP 0+\\n[#VARIABLE_FOOTER_POS]
+. nr #VARIABLE_FOOTER_POS 0-\\n[#B_MARGIN]u
+. \}
+.\" Save the new depth
+. nr #SAVED_FN_DEPTH_2 \\n[#FN_DEPTH]
+.\" Signal that defer space should be added when PROCESS_FN_LEFTOVER
+.\" processes deferred footnotes.
+. if \\n[#FN_DEFER] \{\
+. if \\n[#FN_COUNT]=2 \{\
+. ie \\n[#COLUMNS] \{\
+. if !\\n[#FROM_FOOTER] \{\
+. if \\n[#FN_DEFER]=1 .nr #FN_DEFER_SPACE 1
+. if \\n[#FN_COUNT_FOR_COLS]>=1 .rr #FN_DEFER_SPACE
+. if \\n[#FROM_HEADER] .nr #FN_DEFER_SPACE 1
+. \}
+. \}
+. el .nr #FN_DEFER_SPACE 1
+. \}
+. rr #FN_DEFER
+. \}
+.\" If the depth of the whole footnote won't fit in the space
+.\" between where we are on the page and the bottom margin, calculate
+.\" how much of it will fit.
+. if \\n[#FN_DEPTH]>\\n[#SPACE_REMAINING] \{\
+. nr #FN_LINES 0 1
+. while (\\n+[#FN_LINES]*\\n[#FN_LEAD])<\\n[#SPACE_REMAINING] \{\
+. nr #FN_DEPTH (\\n[#FN_LINES]*\\n[#FN_LEAD])
+. \}
+. nr #VFP_DIFF \\n[#FN_DEPTH]-\\n[#SAVED_FN_DEPTH_1]
+. nr #OVERFLOW 1
+.\" Very occasionally, #VFP_DIFF, on a 1st footnote that isn't to
+.\" be deferred, comes up with a depth equal to exactly 1 line
+.\" of footnotes, i.e. enough room to print the rule and nothing
+.\" else. The following tests for such a condition, and rather than
+.\" attempting to treat the footnote as an overflow, it tells mom to
+.\" treat it as a special kind of deferred footnote (#FN_DEFER 2).
+. if \\n[#SAVED_FN_DEPTH_1]=0 \{\
+. if \\n[#FN_DEPTH]=\\n[#FN_LEAD] \{\
+. nr #FN_DEFER 2
+. nr #FN_DEPTH \\n[#SAVED_FN_DEPTH_2]
+. rr #OVERFLOW
+. \}
+. \}
+. \}
+.\" Calculate VFP based on whether the footnote overflows, or is to
+.\" be treated normally.
+. ie \\n[#OVERFLOW]=1 \{\
+. if \\n[#RUN_ON] \{\
+. rr #VARIABLE_FOOTER_POS
+. nr #VARIABLE_FOOTER_POS \\n[#SAVED_VFP]
+. \}
+. ie \\n[#FN_COUNT]=1 \{\
+. ie \\n[#RULED]=1 \{\
+. ie \\n[#COLUMNS]=1 \{\
+. ie \\n[#COL_NUM]=\\n[#NUM_COLS] \{\
+. ie \\n[#FROM_FOOTER] \{\
+. ie \\n[#FN_COUNT_FOR_COLS]>1 \{\
+. nr #FN_DEPTH -\\n[#FN_DEPTH]
+. if \\n[#DIVERTED]=1 .nr #DIVERTED 3
+. if !\\n[#PREV_FN_DEFERRED]=1 \
+. nr #FN_DEPTH -\\n[#VFP_DIFF]
+. \}
+. el \{\
+. nr #VARIABLE_FOOTER_POS -\\n[#FN_DEPTH]
+. if \\n[#DIVERTED]=1 .nr #DIVERTED 3
+. \}
+. \}
+. el .nr #VARIABLE_FOOTER_POS -(\\n[#FN_DEPTH])
+. \}
+. el .nr #VARIABLE_FOOTER_POS -(\\n[#FN_DEPTH])
+. \}
+. el .nr #VARIABLE_FOOTER_POS -(\\n[#FN_DEPTH])
+. \}
+. el \{\
+. nr #VARIABLE_FOOTER_POS -\\n[#VFP_DIFF]
+. if \\n[#DIVERTED]=1 .nr #DIVERTED 3
+. if !\\n[#PREV_FN_DEFERRED]=1 \{\
+. ie \\n[#COLUMNS]=1 \
+. if !\\n[#FROM_FOOTER] .
+. el .nr #FN_DEPTH -\\n[#VFP_DIFF]
+. \}
+. if \\n[#DIVERTED]=3 \{\
+. if !\\n[#PREV_FN_DEFERRED] \{\
+. if !\\n[#FROM_FOOTER] \{\
+. if \\n[#FN_COUNT]=1 \{\
+. if !\\n[#VFP_DIFF] \{\
+. if \\n[#FN_MARKER_STYLE]=1 \{\
+. da FOOTNOTES
+\!. ALD \\n[#FN_LEAD]u
+. di
+. \}
+. if \\n[#RESET_FN_NUMBER] \{\
+. da FOOTNOTES
+\!. ALD \\n[#FN_LEAD]u
+. di
+. \}
+. \}
+. \}
+. \}
+. \}
+. \}
+. \}
+. nr #FN_DEPTH \\n[#SAVED_FN_DEPTH_1]+\\n[#VFP_DIFF]
+. \}
+. el \{\
+. nr #VARIABLE_FOOTER_POS -\\n[#VFP_DIFF]
+. nr #FN_DEPTH \\n[#SAVED_FN_DEPTH_1]+\\n[#VFP_DIFF]
+. \}
+. rr #OVERFLOW
+. rr #RULED
+. \}
+. el \{\
+. nr #VARIABLE_FOOTER_POS -\\n[#DIVER_DEPTH]
+. if \\n[#PREV_FN_DEFERRED]=1 \{\
+. if \\n[#DIVERTED] \{\
+. if !\\n[#FN_DEPTH]=\\n[#SAVED_FN_DEPTH_1] \{\
+. nr #FN_DEPTH +\\n[#FN_LEAD]
+. nr #VARIABLE_FOOTER_POS -\\n[#FN_LEAD]
+. rr #PREV_FN_DEFERRED
+. \}
+. \}
+. \}
+. if \\n[#FN_COUNT]>1 \{\
+. nr #NO_BACK_UP 1
+. rr #DIVERTED
+. rr #RULED
+. \}
+. \}
+. \}
+. \}
+. ch FOOTER \\n[#VARIABLE_FOOTER_POS]u
+.\" If we have a footnote whose text has to be deferred to the next
+.\" page, reset the FOOTER trap to its original location.
+. if \\n[#FN_DEFER] \{\
+. nr #VARIABLE_FOOTER_POS 0-\\n[#B_MARGIN]u
+. ch FOOTER \\n[#VARIABLE_FOOTER_POS]u
+. \}
+. \}
+. nr #NO_FN_MARKER 0
+. \}
+. if \\n[#NUM_ARGS]=2 \{\
+. if '\\$2'BREAK' .BR
+. if '\\$2'BR' .BR
+. \}
+.END
+\#
+\# Utility macros to manage footnotes that occur inside diversions
+\# ---------------------------------------------------------------
+\#
+\# There are some redundancies here; they're left in in case unforeseen
+\# footnote situations crop up in the future that might require
+\# manipulation of them.
+\#
+\# 1. Pre-footnote processing for footnotes in diversions
+\#
+\# a) A footnote inside a diversion will be moved entirely (marker
+\# in running text and text of footnote) to the next page/column.
+\#
+.MAC DIVER_FN_1_PRE END
+. nr #RESET_FN_COUNTERS 1
+. nr #COUNTERS_RESET 1
+. if \\n[#DONE_ONCE]=1 \{\
+. if \\n[#FN_DEFER] \{\
+. if \\n[#SAVED_DIVER_FN_COUNT]=1 \{\
+. ie \\n[#COLUMNS]=1 \
+. if \\n[#COL_NUM]=\\n[#NUM_COLS] .nr #FN_DEFER_SPACE 1
+. el .nr #FN_DEFER_SPACE 1
+. \}
+. \}
+. if \\n[#FN_MARKER_STYLE]=1 \{\
+. if \\n[#FN_COUNT]>0 .nr #FN_COUNT 0 1
+. if \\n[#COLUMNS]=1 \
+. if \\n[#COL_NUM]=\\n[#NUM_COLS] .nr #FN_COUNT_FOR_COLS 0 1
+. \}
+. if \\n[#FN_MARKER_STYLE]=2 \{\
+. if \\n[#RESET_FN_NUMBER]=1 \{\
+. ie \\n[#COLUMNS]=1 \
+. if \\n[#COL_NUM]=\\n[#NUM_COLS] .nr #FN_NUMBER 0 1
+. el .nr #FN_NUMBER 0 1
+. \}
+. \}
+. \}
+.END
+\#
+\# b) Treat as a normal footnote, including defers.
+\#
+.MAC DIVER_FN_2_PRE END
+. nr #RESET_FN_COUNTERS 2
+.END
+\#
+\# 2. Post-footnote processing for footnotes in diversions
+\#
+\# Even when a footnote inside a diversion is treated as
+\# "normal," some manipulation of registers is required. The
+\# macro is called in DO_QUOTE (i.e. at the termination of
+\# quotes and blockquotes) and in DO_EPIGRAPH.
+\#
+.MAC DIVER_FN_2_POST END
+. if \\n[#DONE_ONCE]=1 \{\
+. if \\n[#FN_MARKER_STYLE]=1 \{\
+. if \\n[#FN_COUNT]=0 .nr #DONT_RULE_ME 1
+. if \\n[#FN_COUNT]>0 .nr #FN_COUNT 0 1
+. if \\n[#COLUMNS]=1 \{\
+. if \\n[#COL_NUM]=\\n[#NUM_COLS] .nr #FN_COUNT_FOR_COLS 0 1
+. if !\\n[#COL_NUM]=\\n[#NUM_COLS] .
+. \}
+. \}
+. if \\n[#FN_MARKER_STYLE]=2 \{\
+. if \\n[#FN_COUNT]=0 .nr #DONT_RULE_ME 1
+. if \\n[#FN_COUNT]>0 .nr #FN_COUNT 0 1
+. if \\n[#RESET_FN_NUMBER]=1 \{\
+. ie \\n[#COLUMNS]=1 \
+. if \\n[#COL_NUM]=\\n[#NUM_COLS] .nr #FN_NUMBER 0 1
+. el .nr #FN_NUMBER 0 1
+. \}
+. \}
+. \}
+.END
+\#
+\# The main macros that handle footnote processing.
+\# -----------------------------------------------
+\#
+\# FN_OVERFLOW_TRAP starts off "underneath" FOOTER, but is revealed
+\# as #VARIABLE_FOOTER_POSITION changes the position of FOOTER.
+\# FN_OVERFLOW_TRAP simply starts diversion FN_OVERFLOW to "catch"
+\# the overflow. The diversion is ended in FOOTER, immediately after
+\# FOOTER outputs the diversion, FOOTNOTES, before PROCESS_FN_LEFTOVER
+\# is run (either in HEADER, or in FOOTER if moving col to col).
+\#
+.MAC FN_OVERFLOW_TRAP END
+. if \\n[#FN_COUNT] \{\
+. di FN_OVERFLOW
+. ie !\\n[#NO_BACK_UP]=1 \{\
+. if \\n[#PREV_FN_DEFERRED] \{\
+. ie \\n[#COLUMNS]=1 \{\
+. if \\n[#FROM_FOOTER] \{\
+. if \\n[#PREV_FN_DEFERRED] \{\
+. if !\\n[#COL_NUM]=\\n[#NUM_COLS] \
+. rr #PREV_FN_DEFERRED
+. \}
+. \}
+. if !\\n[#FROM_FOOTER] \{\
+. if !\\n[#COL_NUM]=\\n[#NUM_COLS] \{\
+. if !\\n[#LAST_FN_COUNT_FOR_COLS]>1 \{\
+\!. RLD \\n[#FN_LEAD]u
+. \}
+. \}
+. \}
+. \}
+. el \{\
+\!. RLD \\n[#FN_LEAD]u
+. \}
+. \}
+. \}
+. el \{\
+. rr #NO_BACK_UP
+. rr #PREV_FN_DEFERRED
+. \}
+. \}
+.\" When #FROM_DIVERT_FN is 1, it signals to FOOTNOTE, when run from
+.\" within DIVERT_FN_LEFTOVER, to set #SPACE_REMAINING to the total
+.\" area allowable for running text.
+. nr #FROM_DIVERT_FN 1
+.END
+\#
+\# PROCESS_FN_LEFTOVER is called at the top of HEADER, and in
+\# FOOTER if we're moving from one column to the next (i.e. after
+\# outputting FOOTNOTES). It checks for whether we have a "deferred
+\# footnote" situation, and resets counters and number registers
+\# accordingly. Lastly, if we have some footnote overflow, it calls
+\# DIVERT_FN_LEFTOVER.
+\#
+.MAC PROCESS_FN_LEFTOVER END
+. if \\n[#PREV_FN_DEFERRED]=2 \
+. if \\n[#FN_COUNT_AT_FOOTER]>1 .rr #PREV_FN_DEFERRED
+. ie !\\n[#FN_DEFER] \{\
+. nr #FN_COUNT 0 1
+. nr #FN_DEPTH 0
+. nr #VARIABLE_FOOTER_POS 0-\\n[#B_MARGIN]
+. \}
+. el \{\
+. if \\n[#FN_DEFER]=1 .nr #VARIABLE_FOOTER_POS 0-\\n[#B_MARGIN]
+. if \\n[#FN_DEFER]=2 \{\
+. nr #FN_DEPTH 0
+. nr #VARIABLE_FOOTER_POS 0-\\n[#B_MARGIN]
+. \}
+. \}
+. nr #SPACE_REMAINING 0
+. ch FOOTER -\\n[#B_MARGIN]u
+. if \\n[#FN_DEFER] \{\
+. nr #NO_FN_MARKER 1
+. rn FOOTNOTES DEFERRED-FOOTNOTE
+. nr #FN_DEPTH 0
+. FOOTNOTE
+. nf
+. DEFERRED-FOOTNOTE
+. FOOTNOTE OFF
+. ie \\n[#COLUMNS]=1 \{\
+. if \\n[#COL_NUM]=\\n[#NUM_COLS] \{\
+. if !\\n[#FROM_FOOTER] \
+. if \\n[#FN_COUNT_FOR_COLS]=1 .nr #PREV_FN_DEFERRED 1
+. \}
+. \}
+. el .nr #PREV_FN_DEFERRED 1
+. \}
+. if !\\n[#FN_DEFER] \
+. if \\n[#FN_OVERFLOW_DEPTH] .DIVERT_FN_LEFTOVER
+. ie \\n[#COLUMNS]=1 \{\
+. if \\n[#COL_NUM]>1 \
+. if \\n[#COL_NUM]=\\n[#NUM_COLS] .nr #FN_COUNT 0 1
+. \}
+. el .nr #FN_COUNT 0 1
+. if \\n[#DIVER_FN]=2 .rr #DIVER_FN
+. rr #FROM_DIVERT_FN
+.END
+\#
+\# DIVERT_FN_LEFTOVER is called in PROCESS_FN_LEFTOVER (at
+\# the top of HEADER, and in FOOTER if we're moving from one column
+\# to the next).
+\#
+.MAC DIVERT_FN_LEFTOVER END
+. nr #NO_FN_MARKER 1
+. nr #DIVERTED 1
+. FOOTNOTE
+. nf
+. FN_OVERFLOW
+. FOOTNOTE OFF
+. if \\n[#PREV_FN_DEFERRED] \{\
+. nr #FN_DEPTH -\\n[#FN_LEAD]
+. nr #VARIABLE_FOOTER_POS +\\n[#FN_LEAD]
+. ch FOOTER \\n[#VARIABLE_FOOTER_POS]u
+. if \\n[#PREV_FN_DEFERRED]=2 \{\
+. nr #PREV_FN_DEFERRED 1
+. rr #DIVERTED
+. \}
+. \}
+. rr #FN_OVERFLOW_DEPTH
+.END
+\#
+\# This is a special macro to deal with footnotes that are set inside
+\# diversions (QUOTE, BLOCKQUOTE and EPIGRAPH). It's called in HEADER
+\# (and in FOOTER, if we're moving from column to column), and comes
+\# after PROCESS_FOOTNOTE_LEFTOVER in those two macros.
+\#
+.MAC PROCESS_FN_IN_DIVER END
+. nr #SPACE_REMAINING 0
+. ch FOOTER -\\n[#B_MARGIN]u
+. nr #NO_FN_MARKER 1
+. if !\\n[#RESET_FN_COUNTERS]=2 .rr #RESET_FN_COUNTERS
+. FOOTNOTE
+. if \\n[#FN_OVERFLOW_DEPTH] .nf
+. ie dRUNON_FN_IN_DIVER \{\
+. RUNON_FN_IN_DIVER
+. rm RUNON_FN_IN_DIVER
+. \}
+. el \{\
+. nf
+. FN_IN_DIVER
+. \}
+. FOOTNOTE OFF
+. rr #DIVER_FN
+.END
+\#
+\# ====================================================================
+\#
+\# +++ENDNOTES+++
+\#
+\# When endnotes are output, the spacing between the notes is always
+\# 1 extra linespace. This can have bottom margin consequences. If
+\# this doesn't bother you, don't worry about it. If it does bother
+\# you, and you want to adjust the spacing between any two endnotes (as
+\# they're output), make the spacing adjustments (.ALD/.RLD) at the
+\# *end* of endnotes (i.e. just before .ENDNOTE OFF), not at the top.
+\#
+\# Endnotes must be output manually with .ENDNOTES. This allows user
+\# the flexibility to output endnotes at the end of each collated
+\# document, or to output them at the end of the entire document.
+\#
+\# Control macros
+\# --------------
+\#
+\# ENDNOTE POINT SIZE
+\# ------------------
+\# *Argument:
+\# <base point size for endnotes>
+\# *Function:
+\# Creates or modifies register #EN_PS.
+\# *Notes:
+\# Default is same as running text in body of document.
+\#
+\# This size control macro differs from other size control macros
+\# in that it sets an absolute point size, not a relative one. This
+\# is because a) endnotes always appear separate from the body of
+\# a document and therefore don't need to be relative to the body
+\# of the document, and b) there are quite a few elements of the
+\# endnotes page(s) that need to be relative to the base point size
+\# of that page. If the base endnote point size were relative to
+\# the body of the document (i.e. a _SIZE macro taking a +|- value)
+\# getting the rest of the endnote elements sized properly could
+\# become very confusing.
+\#
+.MAC ENDNOTE_PT_SIZE END
+. nr #EN_PS (p;\\$1)
+.END
+\#
+\# ENDNOTE SPACING
+\# ----------------
+\# *Arguments:
+\# <per item endnote spacing> | <anything>
+\# *Function:
+\# Enables space between endnotes items.
+\# *Notes:
+\# Default is no space.
+\#
+.MAC ENDNOTE_SPACING END
+. ie \B'\\$1' .ds $EN_SPACE \\$1
+. el .rm $EN_SPACE
+.END
+\#
+\# ENDNOTES_HDRFTR_CENTER
+\# ----------------------
+\# *Argument:
+\# toggle
+\# *Function:
+\# Creates or removes toggle register #EN_HDRFTR_CENTER, used to
+\# determine whether mom should print a/the hdrftr center string
+\# on the endnotes page. Primarily to enable/disable printing of the
+\# chapter name in hdrftrs when DOCTYPE CHAPTER.
+\# *Notes:
+\# Default is OFF
+\#
+.MAC ENDNOTES_HDRFTR_CENTER END
+. ie '\\$1'' .nr #EN_HDRFTR_CENTER 1
+. el .rr #EN_HDRFTR_CENTER
+.END
+\#
+\# ENDNOTE STRING
+\# --------------
+\# *Argument:
+\# <title for endnotes page>
+\# *Function:
+\# Creates or modifies string $EN_STRING.
+\# *Notes:
+\# Default is "Endnotes"
+\#
+.MAC ENDNOTES_HEADER_STRING END
+. ds $EN_STRING \\$1
+.END
+.
+.ALIAS ENDNOTE_STRING ENDNOTES_HEADER_STRING
+\#
+\# ENDNOTE STRING START POSITION
+\# ----------------------------
+\# *Argument:
+\# <distance from page top>
+\# *Function:
+\# Creates or modifies register #EN_STRING_V_POS
+\#
+.MAC ENDNOTES_HEADER_V_POS END
+. nr #EN_STRING_V_POS (\\$1)
+.END
+.
+.ALIAS ENDNOTE_STRING_ADVANCE ENDNOTES_HEADER_V_POS
+.ALIAS ENDNOTE_STRING_V_POS ENDNOTES_HEADER_V_POS
+.ALIAS ENDNOTES_HEADER_V_POS ENDNOTES_HEADER_V_POS
+\#
+\# ENDNOTE HEADER CAPS and SMALLCAPS
+\# ---------------------------------
+\# *Arguments:
+\# <none> | <anything>
+\# *Function:
+\# Turns capitalization or smallcaps style of the endnotes pages
+\# title string "Endnotes" on or off.
+\# *Notes:
+\# Users may want the endnotes pages title string to be in
+\# caps, but the toc entry for endnotes in lower case. If the
+\# argument to ENDNOTES_HEADER_STRING is in lower case and
+\# ENDNOTES_HEADER_CAPS is turned on, this is exactly what will
+\# happen. Ditto for smallcaps.
+\#
+\# Default for CAPS is on.
+\#
+.MAC ENDNOTES_HEADER_CAPS END
+. ie '\\$1'' .nr #EN_STRING_CAPS 1
+. el .nr #EN_STRING_CAPS 0
+.END
+.
+.ALIAS ENDNOTE_STRING_CAPS ENDNOTES_HEADER_CAPS
+.
+.MAC ENDNOTES_HEADER_SMALLCAPS END
+. ie '\\$1'' .nr #EN_STRING_SMALLCAPS 1
+. el .nr #EN_STRING_SMALLCAPS 0
+.END
+.
+.ALIAS ENDNOTE_STRING_SMALLCAPS ENDNOTES_HEADER_SMALLCAPS
+\#
+\# ENDNOTE TITLE
+\# -------------
+\# *Argument:
+\# <string that appears before the first endnote pertaining to any document>
+\# *Function:
+\# Creates string $EN_TITLE.
+\# *Notes:
+\# Default is the document title, or, if doc is a chapter, "Chapter #"
+\#
+.MAC ENDNOTE_TITLE END
+. ds $EN_TITLE \\$1
+.END
+\#
+\# ENDNOTE MARKER STYLE
+\# --------------------
+\# *Arguments:
+\# NUMBER | LINE | SUPERSCRIPT
+\# *Function:
+\# Sets register #EN_MARKER_STYLE, used in ENDNOTE to determine
+\# the style of endnote markers (labels).
+\# *Notes:
+\# 1=NUMBER; 2=LINE. LINE means "use output line numbers".
+\# Default is NUMBER.
+\#
+.MAC ENDNOTE_MARKER_STYLE END
+. if '\\$1'NUMBER' .nr #EN_MARKER_STYLE 1
+. if '\\$1'LINE' \{\
+. nr #EN_MARKER_STYLE 2
+. if !\\n[#EN_LN_SEP] \
+. if !\\n[#EN_LN_BRACKETS] .ENDNOTE_LINENUMBER_BRACKETS SQUARE
+. \}
+. if '\\$1'SUPERSCRIPT' .nr #EN_MARKER_STYLE 3
+.END
+\#
+\# ENDNOTE LINENUMBER MARK
+\# -----------------------
+\# *Function:
+\# This string, when called inline, stores the current output line
+\# number in register #EN_MARK for use with ENDNOTE.
+\#
+.ds EN_MARK \R'#EN_MARK \En[ln]'
+\#
+\# ENDNOTE LINENUMBER SEPARATOR
+\# ----------------------------
+\# *Argument:
+\# <user-defined separator>
+\# *Function:
+\# Stores user-defined separator (for use then
+\# ENDNOTE_MARKER_STYLE is LINE) in string $EN_LN_SEP. The
+\# separator is intended to be used when the user wishes a
+\# separator, rather than the choice of brackets offered by
+\# ENDNOTE_LINENUMBER_BRACKETS.
+\#
+.MAC ENDNOTE_LINENUMBER_SEPARATOR END
+. rr #EN_LN_BRACKETS
+. nr #EN_LN_SEP 1
+. ds $EN_LN_SEP "\\$1
+.END
+\#
+\# ENDNOTE LINENUMBER BRACKETS
+\# ---------------------------
+\# *Argument:
+\# PARENS | SQUARE | BRACES or ( | [ | {
+\# *Function:
+\# Sets register #EN_LN_BRACKETS to 1, and creates strings
+\# $EN_OPEN_BRACKET and $EN_CLOSE_BRACKET according to the given argument.
+\#
+.MAC ENDNOTE_LINENUMBER_BRACKETS END
+. rr #EN_LN_SEP
+. nr #EN_LN_BRACKETS 1
+. if '\\$1'PARENS' \{\
+. ds $EN_OPEN_BRACKET (
+. ds $EN_CLOSE_BRACKET )
+. \}
+. if '\\$1'(' \{\
+. ds $EN_OPEN_BRACKET (
+. ds $EN_CLOSE_BRACKET )
+. \}
+. if '\\$1'SQUARE' \{\
+. ds $EN_OPEN_BRACKET [
+. ds $EN_CLOSE_BRACKET ]
+. \}
+. if '\\$1'[' \{\
+. ds $EN_OPEN_BRACKET [
+. ds $EN_CLOSE_BRACKET ]
+. \}
+. if '\\$1'BRACES' \{\
+. ds $EN_OPEN_BRACKET {
+. ds $EN_CLOSE_BRACKET }
+. \}
+. if '\\$1'{' \{\
+. ds $EN_OPEN_BRACKET {
+. ds $EN_CLOSE_BRACKET }
+. \}
+.END
+\#
+\# ENDNOTE LINENUMBER GAP
+\# ----------------------
+\# *Argument:
+\# <space between line-number labels and endnotes text>
+\# *Function:
+\# Defines string $EN_LN_GAP, used during printing of line-number
+\# labels in ENDNOTE.
+\#
+.MAC ENDNOTE_LINENUMBER_GAP END
+. nr #EN_LN_GAP (u;\\$1)
+.END
+\#
+\# ENDNOTE NUMBERS ALIGNMENT
+\# -------------------------
+\# *Argument:
+\# LEFT | RIGHT <max. number of digit placeholders that will appear in endnotes>
+\# *Function:
+\# Creates registers for _LEFT or _RIGHT; creates register
+\# #EN_NUMBER_PLACEHOLDERS.
+\# *Notes:
+\# Default is for endnote numbers to be right aligned to 2 placeholders.
+\#
+.MAC ENDNOTE_NUMBERS_ALIGN END
+. if '\\$1'LEFT' \{\
+. rr #EN_NUMBERS_ALIGN_RIGHT
+. nr #EN_NUMBERS_ALIGN_LEFT 1
+. \}
+. if '\\$1'RIGHT' \{\
+. rr #EN_NUMBERS_ALIGN_LEFT
+. nr #EN_NUMBERS_ALIGN_RIGHT 1
+. \}
+. nr #EN_NUMBER_PLACEHOLDERS \\$2
+.END
+\#
+\# ENDNOTE PARAGRAPH INDENT
+\# ------------------------
+\# *Argument:
+\# <first line indent of paras subsequent to 1st in endnotes>
+\# *Function:
+\# Creates register #EN_PP_INDENT for use in .PP.
+\# *Notes:
+\# Requires a unit of measure.
+\#
+\# Default is 1.5m for TYPESET; same indent as PARA_INDENT for TYPEWRITE.
+\#
+.MAC ENDNOTE_PARA_INDENT END
+. nr #EN_PP_INDENT (\\$1)
+.END
+\#
+\# TURN OFF COLUMN MODE FOR ENDNOTES
+\# ---------------------------------
+\# *Argument:
+\# <none> | <anything>
+\# *Function:
+\# Creates or removes register #EN_NO_COLS
+\# *Notes:
+\# Allows user to tell mom not to set endnotes in columnar
+\# documents in columns. Default is to set endnotes in columns.
+\#
+.MAC ENDNOTES_NO_COLUMNS END
+. ie '\\$1'' .nr #EN_NO_COLS 1
+. el .rr #EN_NO_COLS
+.END
+\#
+\# NO FIRST PAGE NUMBER ON ENDNOTES FIRST PAGE
+\# -------------------------------------------
+\# *Argument:
+\# <none> | <anything>
+\# *Function:
+\# Creates or removes register #EN_NO_FIRST_PN
+\# *Notes:
+\# For use if FOOTERS are on. Tells ENDNOTES not to put a page
+\# number on the first endnotes page. Some users may want this.
+\# Default is to print a page number at the top of the first
+\# endnotes page when footers are on.
+\#
+.MAC ENDNOTES_NO_FIRST_PAGENUM END
+. ie '\\$1'' .nr #EN_NO_FIRST_PN 1
+. el .rr #EN_NO_FIRST_PN
+.END
+\#
+\# PAGE HEADERS ON ENDNOTES PAGES
+\# ------------------------------
+\# *Argument:
+\# <none> | ALL
+\# *Function:
+\# Creates or removes register #EN_ALLOWS_HEADERS or
+\# #EN_ALLOWS_HEADERS_ALL
+\# *Notes:
+\# Whether ENDNOTES puts a page header at the top of endnotes
+\# pages if page headers are used throughout the document.
+\# Default is to insert the page headers, but not on the first
+\# page. If the optional argument ALL is given, ENDNOTES puts a
+\# page header on the first page as well.
+\#
+.MAC ENDNOTES_ALLOWS_HEADERS END
+. ie '\\$1'' .nr #EN_ALLOWS_HEADERS 1
+. el \{\
+. ie '\\$1'ALL' \{\
+. nr #EN_ALLOWS_HEADERS 1
+. nr #EN_ALLOWS_HEADERS_ALL 1
+. \}
+. el \{\
+. nr #EN_ALLOWS_HEADERS 0
+. nr #EN_ALLOWS_HEADERS_ALL 0
+. \}
+. \}
+.END
+\#
+\# ENDNOTES PAGES PAGE NUMBERING STYLE
+\# -----------------------------------
+\# *Argument:
+\# DIGIT | ROMAN | roman | ALPHA | alpha
+\# *Function:
+\# Creates or modifies $EN_PN_STYLE.
+\# *Notes:
+\# Allows user to define what style should be used for endnotes
+\# pages page numbering. Arguments are the same as for
+\# PAGENUM_STYLE.
+\#
+\# Default is DIGIT.
+\#
+.MAC ENDNOTES_PAGENUM_STYLE END
+. ds $EN_PN_STYLE \\$1
+.END
+\#
+\# FIRST PAGE NUMBER FOR ENDNOTES
+\# ------------------------------
+\# *Argument:
+\# <page number that appears on page 1 of endnotes pages>
+\# *Function:
+\# Creates or modifies string $EN_FIRST_PN
+\# *Notes:
+\# To be used with caution, only if all endnotes
+\# are to be output at once, i.e. not at the end of the separate
+\# docs of a collated doc
+\#
+.MAC ENDNOTES_FIRST_PAGENUMBER END
+. nr #EN_FIRST_PN \\$1
+.END
+\#
+\# SINGLESPACE ENDNOTES
+\# --------------------
+\# *Argument:
+\# <none> | <anything>
+\# *Function:
+\# Sets lead of endnotes pages in TYPEWRITE to 12 points,
+\# adjusted.
+\# *Notes:
+\# Default is to double-space endnotes pages.
+\#
+.MAC SINGLESPACE_ENDNOTES END
+. if \\n[#PRINT_STYLE]=1 \{\
+. ie \\n[#SINGLE_SPACE] \{\
+. nr #EN_SINGLESPACE 1
+. rr #IGNORE
+. if \\n[#OK_PROCESS_LEAD] \{\
+. ENDNOTE_LEAD 12 ADJUST
+. nr #IGNORE 1
+. \}
+. \}
+. el \{\
+. ie '\\$1'' \{\
+. nr #EN_SINGLESPACE 1
+. rr #IGNORE
+. if \\n[#OK_PROCESS_LEAD] \{\
+. ENDNOTE_LEAD 12 ADJUST
+. nr #IGNORE 1
+. \}
+. \}
+. el \{\
+. rr #EN_SINGLESPACE
+. rr #IGNORE
+. if \\n[#OK_PROCESS_LEAD] \{\
+. ENDNOTE_LEAD 24 ADJUST
+. nr #IGNORE 1
+. \}
+. \}
+. \}
+. \}
+.END
+\#
+\# ENDNOTE PARAGRAPH SPACE
+\# -----------------------
+\# *Argument:
+\# toggle
+\# *Function:
+\# Creates toggle register #EN_PP_SPACE for use in .PP.
+\# *Notes:
+\# Like PARA_SPACE. Default is not to space endnote paras.
+\#
+.MAC ENDNOTE_PARA_SPACE END
+. ie '\\$1'' .nr #EN_PP_SPACE 1
+. el .rr #EN_PP_SPACE
+.END
+\#
+\# ENDNOTE
+\# -------
+\# *Argument:
+\# toggle
+\# *Function:
+\# Places superscript endnote number in text, then collects and
+\# processes endnote in diversion END_NOTES.
+\# *Notes:
+\# \c must be appended to the word immediately preceding .ENDNOTE
+\# when ENDNOTE_MARKER_STYLE is NUMBER.
+\#
+.MAC ENDNOTE END
+. ie '\\$1'' \{\
+. nr #ENDNOTE 1
+. ie !\\n[#EN_MARKER_STYLE]=2 \{\
+. if \\n[#CONDENSE] .nop \*[CONDX]\c
+. if \\n[#EXTEND] .nop \*[EXTX]\c
+. if \\n[#UNDERLINE_ON] \{\
+. nr #UNDERLINE_WAS_ON 1
+. UNDERLINE OFF
+. \}
+. if \\n[#PRINT_STYLE]=1 \{\
+. if \\n[#SLANT_ON] \{\
+. nr #SLANT_WAS_ON 1
+. nop \*[SLANTX]\c
+. \}
+.\" Vertical raise amount here is more than when the same string is printed in
+.\" the endnotes so bottom of number aligns with top of bowl.
+. PRINT \
+"\s-2\v'-\\n[#DOC_LEAD]u/5u'\\n+[#EN_NUMBER]\v'+\\n[#DOC_LEAD]u/5u'\s+2\c"
+. \}
+. if \\n[#PRINT_STYLE]=2 .PRINT \*[SUP]\\n+[#EN_NUMBER]\*[SUPX]\c
+. \}
+. el \{\
+. ie r#EN_NUMBER .nr #EN_NUMBER \\n[#EN_NUMBER]+1
+. el .nr #EN_NUMBER 1 1
+. if !\\n[#LINENUMBERS] \{\
+. tm1 "[mom]: Line numbering must be enabled with NUMBER_LINES when
+. tm1 " ENDNOTE_MARKER_STYLE is LINE.
+. ab [mom]: Aborting '\\n[.F]' at \\$0, line \\n[.c].
+. \}
+. if \\n[#EN_MARK]=0 .nr #EN_MARK \\n[ln]
+. nr #EN_MARK_2 \\n[ln]
+. if '\\n[.z]'P_QUOTE' \{\
+. nr #EN_MARK -1
+. nr #EN_MARK_2 -1
+. \}
+. \}
+. nr #PP_STYLE_PREV \\n[#PP_STYLE]
+. nr #PP_STYLE 1
+. if \\n[#INDENT_FIRST_PARAS] .nr #INDENT_FIRSTS 1
+. INDENT_FIRST_PARAS
+. ev EN
+. da END_NOTES
+. LL \\n[#DOC_L_LENGTH]u
+. ta \\n[.l]u
+. if \\n[#COLUMNS] \{\
+. ie \\n[#EN_NO_COLS] .LL \\n[#DOC_L_LENGTH]u
+. el .LL \\n[#COL_L_LENGTH]u
+. ta \\n[.l]u
+. \}
+\!. if \\\\n[.vpt]=0 .vpt
+\!. ne 3
+. vs \\n[#EN_LEAD]u
+.\" Print identifying doc title (e.g., Chapter n)
+. if \\n[#EN_NUMBER]=1 \{\
+. if \\n[#PRINT_STYLE]=1 .TYPEWRITER
+. if \\n[#PRINT_STYLE]=2 \{\
+. FAMILY \\*[$EN_TITLE_FAM]
+. FT \\*[$EN_TITLE_FT]
+. ps \\n[#EN_PS]u\\*[$EN_TITLE_SIZE_CHANGE]
+. if \\n[#EN_TITLE_COLOR] .COLOR \\*[$EN_TITLE_COLOR]
+. if \\n[#ENDNOTE_TITLE_SMALLCAPS] .SMALLCAPS
+. if \\n[#ENDNOTE_TITLE_CAPS] .CAPS
+. \}
+. ie \\n[#SINGLE_SPACE]=1 .sp 2
+. el .sp
+. if !'\\*[$EN_TITLE]'' \{\
+. substring $EN_TITLE_QUAD 0 0
+. if '\\*[$EN_TITLE_QUAD]'L' .LEFT
+. if '\\*[$EN_TITLE_QUAD]'C' .CENTER
+. if '\\*[$EN_TITLE_QUAD]'R' .RIGHT
+\!. vpt 0
+. sp -.25v
+. ie \\n[#EN_TITLE_UNDERLINE] \
+. UNDERSCORE "\\*[$EN_TITLE]"
+. el \{\
+. ie \\n[#PRINT_STYLE]=1 \
+. UNDERSCORE "\\*[$EN_TITLE]"
+. el .PRINT "\\*[$EN_TITLE]"
+. \}
+. sp .25v
+\!. vpt
+. \}
+. if \\n[#EN_TITLE_COLOR] .gcolor
+. if \\n[#ENDNOTE_TITLE_SMALLCAPS] .SMALLCAPS OFF
+. if \\n[#ENDNOTE_TITLE_CAPS] .CAPS OFF
+. \}
+.\" Get indent from endnotes point size; convert string to reg in
+.\" case indent string is, e.g., m or n
+. ps \\n[#EN_PS]u
+. nr #REF_EN_INDENT (u;\\*[$REF_EN_INDENT])
+. if \\n[#PRINT_STYLE]=1 \{\
+. TYPEWRITER
+. if \\n[#EN_NUMBER]=1 \{\
+. ie \\n[#SINGLE_SPACE]=1 .sp
+. el .sp .25
+. \}
+. if \\n[#EN_MARKER_STYLE]=3 .ps -2
+. \}
+. if \\n[#PRINT_STYLE]=2 \{\
+. if \\n[#EN_MARKER_STYLE]=1 \{\
+. FAMILY \\*[$EN_NUMBER_FAM]
+. FT \\*[$EN_NUMBER_FT]
+. ps \\n[#EN_PS]u\\*[$EN_NUMBER_SIZE_CHANGE]
+. \}
+. if \\n[#EN_MARKER_STYLE]=2 \{\
+. FAMILY \\*[$EN_LN_FAM]
+. FT \\*[$EN_LN_FT]
+. ps \\n[#EN_PS]u\\*[$EN_LN_SIZE_CHANGE]
+. \}
+. if \\n[#EN_MARKER_STYLE]=3 \{\
+. FAMILY \\*[$EN_NUMBER_FAM]
+. FT \\*[$EN_NUMBER_FT]
+. ps \\n[#PT_SIZE_IN_UNITS]u*6u/10u
+. \}
+. \}
+.\" Build string for line-numbered endnotes
+. if \\n[#EN_MARKER_STYLE]=2 \{\
+. ie \\n[#EN_LN_BRACKETS]=1 \{\
+. ds $EN_LINENUMBER \v'-.085m'\\*[$EN_OPEN_BRACKET]\v'.085m'
+. ie \\n[#EN_MARK_2]=\\n[#EN_MARK] .as $EN_LINENUMBER \
+\\n[#EN_MARK]\v'-.085m'\\*[$EN_CLOSE_BRACKET]\v'.085m'\"
+. el .as $EN_LINENUMBER \
+\\n[#EN_MARK]\v'-.1m'-\v'.1m'\\n[#EN_MARK_2]\v'-.085m'\
+\\*[$EN_CLOSE_BRACKET]\v'.085m'\"
+. \}
+. el \{\
+. ie \\n[#EN_MARK_2]=\\n[#EN_MARK] \
+. ds $EN_LINENUMBER \
+\\n[#EN_MARK]\\*[$EN_LN_SEP]
+. el \
+. ds $EN_LINENUMBER \
+\\n[#EN_MARK]\v'-.1m'-\v'.1m'\\n[#EN_MARK_2]\\*[$EN_LN_SEP]
+. \}
+. nr #EN_MARK 0
+. \}
+. vpt 0
+. ie \\n[#EN_NUMBERS_ALIGN_RIGHT] .RIGHT
+. el .LEFT
+. if \\n[#EN_MARKER_STYLE]=1 \
+. nr #EN_NUMBER_L_LENGTH \w'\0'*\\n[#EN_NUMBER_PLACEHOLDERS]+\w'.'
+. if \\n[#EN_MARKER_STYLE]=2 \{\
+. ie \\n[#EN_LN_BRACKETS]=1 .nr #EN_NUMBER_L_LENGTH \
+(\w'\0'*(\\n[#EN_NUMBER_PLACEHOLDERS]*2))+\w'-[]'
+. el .nr #EN_NUMBER_L_LENGTH \
+(\w'\0'*(\\n[#EN_NUMBER_PLACEHOLDERS]*2))+\w'-\\*[$EN_LN_SEP]'
+. RIGHT
+. \}
+. if \\n[#EN_MARKER_STYLE]=3 \{\
+. nr #EN_NUMBER_L_LENGTH \
+\w'\0'*\\n[#EN_NUMBER_PLACEHOLDERS]+.15m
+. RIGHT
+. \}
+. ie \\n[#REF]=1 \
+. ll \\n[#EN_NUMBER_L_LENGTH]u+\\n[#REF_EN_INDENT]u
+. el .ll \\n[#EN_NUMBER_L_LENGTH]u
+. if \\n[#EN_MARKER_STYLE]=1 \{\
+. if \\n[#REF]=1 .ti \\n[#REF_EN_INDENT]u
+. nop \En[#EN_NUMBER].
+. \}
+. if \\n[#EN_MARKER_STYLE]=2 \{\
+. nop \\*[$EN_LINENUMBER]
+. rm $EN_LINENUMBER
+. \}
+. if \\n[#EN_MARKER_STYLE]=3 \{\
+\!. vpt 0
+. ps \" Reset ps changed to get width of s-script numbers
+. ie \\n[#PRINT_STYLE]=1 \{\
+.\" Vertical raise amount here is less than when the same string is printed in
+.\" the body of the text because number precedes a cap.
+. nop \
+\s-2\v'-\\n[#DOC_LEAD]u/7u'\\n[#EN_NUMBER]\|\v'+\\n[#DOC_LEAD]u/7u'\s+2
+. \}
+. el .nop \E*[SUP]\\n[#EN_NUMBER]\E*[SUPX]\h'.15m'
+. \}
+. EOL
+. ll
+\!. vpt
+. nr #EN_FIGURE_SPACE \w'\0'
+. if \\n[#EN_MARKER_STYLE]=1 \{\
+. ie \\n[#REF]=1 .ti \
+\\n[#EN_NUMBER_L_LENGTH]u+\\n[#REF_EN_INDENT]u+\\n[#EN_FIGURE_SPACE]u
+. el .in \
+\\n[#EN_NUMBER_L_LENGTH]u+\\n[#EN_FIGURE_SPACE]u
+. \}
+. if \\n[#EN_MARKER_STYLE]=2 \{\
+. ie \\n[#REF]=1 .ti \
+\\n[#EN_NUMBER_L_LENGTH]u+\\n[#REF_EN_INDENT]u+\\n[#EN_LN_GAP]u
+. el .ti \
+\\n[#EN_NUMBER_L_LENGTH]u+\\n[#EN_LN_GAP]u
+. \}
+. if \\n[#EN_MARKER_STYLE]=3 \{\
+. ie \\n[#REF]=1 .ti \
+\\n[#EN_NUMBER_L_LENGTH]u+\\n[#REF_EN_INDENT]u+\w'\|'u
+. el .in \
+\\n[#EN_NUMBER_L_LENGTH]u
+. \}
+. nr #EN_TEXT_INDENT \\n[.i]
+. QUAD \\*[$EN_QUAD]
+. vpt
+. if \\n[#PRINT_STYLE]=1 .TYPEWRITER
+. if \\n[#PRINT_STYLE]=2 \{\
+. FAMILY \\*[$EN_FAM]
+. FT \\*[$EN_FT]
+. ps \\n[#EN_PS]u
+. \}
+. \}
+. el \{\
+\!. ie \\n[#EN_NUMBER]=\\\\n[#LAST_EN] .vpt 0
+\!. el .br
+. if \\n[#PRINT_STYLE]=2 .sp \\*[$EN_SPACE]
+. in 0
+. if \\n[#EN_MARKER_STYLE]=2 \{\
+\!. in 0
+. \}
+. da
+.\" Restore sentence spacing
+. if \\n[#PRINT_STYLE]=2 \{\
+. if d$RESTORE_SS_VAR .SS \\*[$RESTORE_SS_VAR]
+. rm $RESTORE_SS_VAR
+. \}
+. ev
+.\" Restore lead -- need
+. nr #PP_STYLE \\n[#PP_STYLE_PREV]
+. if !\\n[#INDENT_FIRSTS] .INDENT_FIRST_PARAS OFF
+. rr #INDENT_FIRSTS
+. rr #ENDNOTE
+. if \\n[#UNDERLINE_WAS_ON] \{\
+. rr #UNDERLINE_WAS_ON
+. UNDERLINE
+. \}
+. if \\n[#SLANT_WAS_ON] \{\
+. rr #SLANT_WAS_ON
+\*[SLANT]\c
+. \}
+. \}
+. if \\n[#NUM_ARGS]=2 \{\
+. if '\\$2'BREAK' .BR
+. if '\\$2'BR' .BR
+. \}
+.END
+\#
+\# Endnotes (user space macro)
+\# ---------------------------
+\#
+\# ENDNOTES
+\# --------
+\# *Arguments:
+\# none
+\# *Function:
+\# Sets new document leading from #EN_LEAD, breaks to a new page,
+\# sets up an endnotes page based on registers and strings associated
+\# with endnotes, then outputs diversion END_NOTES.
+\#
+.MAC ENDNOTES END
+. if \\n[defer] .NEWPAGE
+. nr #LAST_EN \\n[#EN_NUMBER]
+. nr #ENDNOTES 1
+. nr #EN_FIRST_PAGE 1
+. SETUP_ENDNOTES
+. if !\\n[#PRINT_STYLE]=1 .chop END_NOTES
+. nf
+. END_NOTES
+. rm END_NOTES
+. ps \\n[#DOC_PT_SIZE]u
+. if \\n[#PRINT_STYLE]=1 .vs \\n[#DOC_LEAD]u
+. if \\n[#PRINT_STYLE]=2 \{\
+. ie \\n[#ADJ_EN_LEAD] \
+. nr #DOC_LEAD \\n[#RESTORE_DOC_LEAD]
+. el .DOC_LEAD \\n[#RESTORE_DOC_LEAD]u
+. rr #RESTORE_DOC_LEAD
+. \}
+. if \\n[#COLUMNS_WERE_ON] .nr #COLUMNS 1
+. if \\n[#HEADER_STATE]=1 .HEADERS
+. if \\n[#LINENUMBERS]=2 \{\
+. NUMBER_LINES RESUME
+. nr #LINENUMBERS 1
+. \}
+. rr #ENDNOTES
+.END
+\#
+\# Macros common to endnotes, bibliography, and toc
+\# ------------------------------------------------
+\#
+.MAC SETUP_BIB_EN END
+. if '\\$0'SETUP_BIBLIOGRAPHY' .ds EN-OR-BIB BIB
+. if '\\$0'SETUP_ENDNOTES' .ds EN-OR-BIB EN
+. nr #HEADER_STATE \\n[#HEADERS_ON]
+. ds $RESTORE_PAGENUM_STYLE \\*[$PAGENUM_STYLE]
+. if \\n[#LINENUMBERS]=1 \{\
+. NUMBER_LINES OFF
+. nr #LINENUMBERS 2
+. \}
+. if \\n[#HEADERS_ON]=1 \
+. if !\\n[#\\*[EN-OR-BIB]_ALLOWS_HEADERS_ALL] .HEADERS OFF
+. if \\n[#HEADER_STATE]=1 \{\
+. ie \\n[#\\*[EN-OR-BIB]_HDRFTR_CENTER]=1 .
+. el .rm $HDRFTR_CENTER
+. \}
+. ie !\\n[#SUSPEND_PAGINATION] \{\
+. if \\n[#PAGINATE]=1 \{\
+. if \\n[#PAGE_NUM_V_POS]=1 \{\
+. PAGENUM_STYLE \\*[$\\*[EN-OR-BIB]_PN_STYLE]
+. if \\n[#\\*[EN-OR-BIB]_FIRST_PN] .PAGENUMBER \\n[#\\*[EN-OR-BIB]_FIRST_PN]-1
+. if r #\\*[EN-OR-BIB]_NO_FIRST_PN .nr #PAGINATE 0
+. \}
+. \}
+. \}
+. el \{\
+. ie \\n[#PAGE_NUM_V_POS]=2 .nr #PAGINATE 1
+. el .nr #PAGINATE 0
+. \}
+. if \\n[#FOOTERS_ON]=1 \{\
+. if !'\\*[$HDRFTR_CENTER_OLD]'' \
+. ds $HDRFTR_CENTER \\*[$HDRFTR_CENTER_OLD]
+. \}
+. NEWPAGE
+. if \\n[#FOOTERS_ON]=1 \{\
+. ds $HDRFTR_CENTER \\*[$HDRFTR_CENTER_NEW]
+. rm $HDRFTR_CENTER_OLD
+. rm $HDRFTR_CENTER_NEW
+. \}
+. ie !\\n[#SUSPEND_PAGINATION] \{\
+. if \\n[#PAGE_NUM_V_POS]=1 \{\
+. if r #\\*[EN-OR-BIB]_NO_FIRST_PN \
+. if \\n[#PAGINATION_STATE]=1 .nr #PAGINATE 1
+. \}
+. \}
+. el \
+. if \\n[#PAGE_NUM_V_POS]=2 .nr #PAGINATE 0
+. rr #PAGINATION_STATE
+. PAGENUM_STYLE \\*[$\\*[EN-OR-BIB]_PN_STYLE]
+. if \\n[#\\*[EN-OR-BIB]_FIRST_PN] .PAGENUMBER \\n[#\\*[EN-OR-BIB]_FIRST_PN]
+. if \\n[#HEADER_STATE]=1 \
+. if \\n[#\\*[EN-OR-BIB]_ALLOWS_HEADERS] .HEADERS
+.\" Collect endnotes title string for TOC
+. nr #TOC_ENTRY_PN \\n%+\\n[#PAGE_NUM_ADJ]
+. af #TOC_ENTRY_PN \\g[#PAGENUMBER]
+. ds $TOC_TITLE_ITEM \\*[$\\*[EN-OR-BIB]_STRING]\|
+. PDF_BOOKMARK 1 \\*[$\\*[EN-OR-BIB]_STRING]
+. TITLE_TO_TOC
+.\" End collection of endnotes title string for TOC
+.\" Process endnotes
+. if \\n[#PRINT_STYLE]=1 .vs \\n[#\\*[EN-OR-BIB]_LEAD]u
+. if \\n[#PRINT_STYLE]=2 \{\
+. if \\n[#\\*[EN-OR-BIB]_NO_COLS] \{\
+. if \\n[#COLUMNS] .nr #COLUMNS_WERE_ON 1
+. nr #COLUMNS 0
+. \}
+. nr #RESTORE_DOC_LEAD \\n[#DOC_LEAD]
+. ie \\n[#ADJ_\\*[EN-OR-BIB]_LEAD] .nr #DOC_LEAD \\n[#\\*[EN-OR-BIB]_LEAD]
+. el .DOC_LEAD \\n[#\\*[EN-OR-BIB]_LEAD]u
+. \}
+. vpt 0
+. RESTORE_SPACE
+. ie r#\\*[EN-OR-BIB]_STRING_V_POS .sp |\\n[#\\*[EN-OR-BIB]_STRING_V_POS]u-1v
+. el .sp |\\n[#T_MARGIN]u-\\n[#\\*[EN-OR-BIB]_LEAD]u
+. vpt
+. mk ec
+. if \\n[#SLANT_ON] \{\
+\*[SLANTX]\c
+. \}
+. sp
+. if !'\\*[$\\*[EN-OR-BIB]_STRING]'' \{\
+. if \\n[#PRINT_STYLE]=1 \{\
+. TYPEWRITER
+. vs \\n[#\\*[EN-OR-BIB]_LEAD]u
+. \}
+. if \\n[#PRINT_STYLE]=2 \{\
+. LL \\n[#DOC_L_LENGTH]u
+. ta \\n[.l]u
+. if \\n[#COLUMNS] \{\
+. ie \\n[#\\*[EN-OR-BIB]_NO_COLS] .LL \\n[#DOC_L_LENGTH]u
+. el .LL \\n[#COL_L_LENGTH]u
+. ta \\n[.l]u
+. \}
+. FAMILY \\*[$\\*[EN-OR-BIB]_STRING_FAM]
+. FT \\*[$\\*[EN-OR-BIB]_STRING_FT]
+. ps \\n[#\\*[EN-OR-BIB]_PS]u\\*[$\\*[EN-OR-BIB]_STRING_SIZE_CHANGE]
+. vs \\n[#\\*[EN-OR-BIB]_LEAD]u
+. \}
+. substring $\\*[EN-OR-BIB]_STRING_QUAD 0 0
+. if '\\*[$\\*[EN-OR-BIB]_STRING_QUAD]'L' .LEFT
+. if '\\*[$\\*[EN-OR-BIB]_STRING_QUAD]'C' .CENTER
+. if '\\*[$\\*[EN-OR-BIB]_STRING_QUAD]'R' .RIGHT
+. EOL
+. if \\n[#\\*[EN-OR-BIB]_STRING_COLOR]=1 .COLOR \\*[$\\*[EN-OR-BIB]_STRING_COLOR]
+. if \\n[#\\*[EN-OR-BIB]_STRING_CAPS] .CAPS
+. if \\n[#\\*[EN-OR-BIB]_STRING_SMALLCAPS] .SMALLCAPS
+. ie \\n[#\\*[EN-OR-BIB]_STRING_UNDERLINE] \{\
+. if \\n[#PRINT_STYLE]=2 .ds $TITLE_TYPE \\*[EN-OR-BIB]_STRING
+. ie \\n[#PRINT_STYLE]=1 \
+. UNDERSCORE2 3p 2p "\\*[$\\*[EN-OR-BIB]_STRING]"
+. el \{\
+. ie \\n[#\\*[EN-OR-BIB]_STRING_UNDERLINE]=2 \
+. UNDERSCORE2 \\*[$\\*[EN-OR-BIB]_UNDERLINE_GAP] \\*[$\\*[EN-OR-BIB]_RULE_GAP] "\\*[$\\*[EN-OR-BIB]_STRING]"
+. el .UNDERSCORE "\\*[$\\*[EN-OR-BIB]_STRING]"
+. \}
+. \}
+. el .PRINT "\\*[$\\*[EN-OR-BIB]_STRING]
+. \}
+. SMALLCAPS OFF
+. if \\n[#\\*[EN-OR-BIB]_STRING_COLOR]=1 .gcolor
+. CAPS OFF
+. FAMILY \\*[$\\*[EN-OR-BIB]_FAMILY]
+. FT \\*[$\\*[EN-OR-BIB]_FT]
+. ps -\\*[$\\*[EN-OR-BIB]_STRING_SIZE_CHANGE]
+. ie \\n[#PRINT_STYLE]=1 \{\
+. ie \\n[#SINGLE_SPACE]=1 .sp
+. el \{\
+. ie \\n[#\\*[EN-OR-BIB]_SINGLESPACE]=1 .sp
+. el .
+. \}
+. \}
+. el \{\
+. ie '\\*[EN-OR-BIB]'BIB' .sp 2
+. el .sp
+. \}
+. SHIM
+. QUAD \\*[$\\*[EN-OR-BIB]_QUAD]
+.END
+.
+.ALIAS SETUP_BIBLIOGRAPHY SETUP_BIB_EN
+.ALIAS SETUP_ENDNOTES SETUP_BIB_EN
+\#
+\# ENDNOTES, BIBLIOGRAPHY and TOC LEADING
+\# --------------------------------------
+\# *Argument:
+\# <leading> [ ADJUST ]
+\# *Function:
+\# Depending on the name by which it's called, creates or modifies
+\# register #<type>_LEAD, where <type> is BIB, EN, or TOC. Creates or removes
+\# register #ADJ_<type>_LEAD. Stores arguments in strings if BIB,
+\# EN, or TOC leading are set before START.
+\# *Notes:
+\# Default is same as doc lead for TYPESET, adjusted; 24 for TYPEWRITE.
+\#
+.MAC _LEAD END
+. if '\\$0'BIBLIOGRAPHY_LEAD' .ds $SECTION BIB
+. if '\\$0'ENDNOTE_LEAD' .ds $SECTION EN
+. if '\\$0'TOC_LEAD' .ds $SECTION TOC
+. rr #ADJ_\\*[$SECTION]_LEAD
+. ds $\\*[$SECTION]_LEAD \\$1
+. rm $ADJUST_\\*[$SECTION]_LEAD
+. if '\\$2'ADJUST' \{\
+. nr #ADJ_\\*[$SECTION]_LEAD 1
+. ds $ADJUST_\\*[$SECTION]_LEAD ADJUST
+. \}
+. if !\\n[#OK_PROCESS_LEAD] .return
+. nr #\\*[$SECTION]_LEAD (p;\\$1)
+.END
+.
+.ALIAS BIBLIOGRAPHY_LEAD _LEAD
+.ALIAS ENDNOTE_LEAD _LEAD
+.ALIAS TOC_LEAD _LEAD
+\#
+\# ====================================================================
+\#
+\# +++BIBLIOGRAPHY+++
+\#
+\# Mom treats bibliographies and endnotes very similarly. The chief
+\# difference is that endnotes are collected and formatted inside a
+\# diversion, while bibliographies are built "by hand." ENDNOTES sets
+\# up the endnotes page and outputs the formatted diversion.
+\# BIBLIOGRAPHY sets up the bibliography page, then awaits refer
+\# commands.
+\#
+\# All of the bibliography control macros have their exact
+\# counterparts in the endnotes control macros. See, therefore,
+\# Arguments, Functions, and Notes in the Endnotes section.
+\#
+\# Bibliography control macros
+\#
+.MAC BIBLIOGRAPHY_PT_SIZE END
+. nr #BIB_PS (p;\\$1)
+.END
+\#
+.MAC BIBLIOGRAPHY_HDRFTR_CENTER END
+. ie '\\$1'' .nr #BIB_HDRFTR_CENTER 1
+. el .rr #BIB_HDRFTR_CENTER
+.END
+\#
+.MAC BIBLIOGRAPHY_STRING END
+. ds $BIB_STRING \\$1
+.END
+\#
+.MAC BIBLIOGRAPHY_STRING_ADVANCE END
+. nr #BIB_STRING_V_POS (u;\\$1)
+.END
+\#
+.MAC BIBLIOGRAPHY_STRING_V_POS END
+. nr #BIB_STRING_V_POS (u;\\$1)
+.END
+.
+.ALIAS BIBLIOGRAPHY_HEADER_V_POS BIBLIOGRAPHY_STRING_V_POS
+\#
+.MAC BIBLIOGRAPHY_NO_COLUMNS END
+. ie '\\$1'' .nr #BIB_NO_COLS 1
+. el .rr #BIB_NO_COLS
+.END
+\#
+.MAC BIBLIOGRAPHY_NO_FIRST_PAGENUM END
+. ie '\\$1'' .nr #BIB_NO_FIRST_PN 1
+. el .rr #BIB_NO_FIRST_PN
+.END
+\#
+.MAC BIBLIOGRAPHY_ALLOWS_HEADERS END
+. ie '\\$1'' .nr #BIB_ALLOWS_HEADERS 1
+. el \{\
+. ie '\\$1'ALL' \{\
+. nr #BIB_ALLOWS_HEADERS 1
+. nr #BIB_ALLOWS_HEADERS_ALL 1
+. \}
+. el \{\
+. rr #BIB_ALLOWS_HEADERS
+. rr #BIB_ALLOWS_HEADERS_ALL
+. \}
+. \}
+.END
+\#
+.MAC BIBLIOGRAPHY_PAGENUM_STYLE END
+. ds $BIB_PN_STYLE \\$1
+.END
+\#
+.MAC BIBLIOGRAPHY_FIRST_PAGENUMBER END
+. nr #BIB_FIRST_PN \\$1
+.END
+\#
+.MAC SINGLESPACE_BIBLIOGRAPHY END
+. if \\n[#PRINT_STYLE]=1 \{\
+. ie \\n[#SINGLE_SPACE] \{\
+. nr #BIB_SINGLESPACE 1
+. rr #IGNORE
+. if \\n[#OK_PROCESS_LEAD] \{\
+. BIBLIOGRAPHY_LEAD 12 ADJUST
+. nr #IGNORE 1
+. \}
+. \}
+. el \{\
+. ie '\\$1'' \{\
+. nr #BIB_SINGLESPACE 1
+. rr #IGNORE
+. if \\n[#OK_PROCESS_LEAD] \{\
+. BIBLIOGRAPHY_LEAD 12 ADJUST
+. nr #IGNORE 1
+. \}
+. \}
+. el \{\
+. rr #BIB_SINGLESPACE
+. rr #IGNORE
+. if \\n[#OK_PROCESS_LEAD] \{\
+. BIBLIOGRAPHY_LEAD 24 ADJUST
+. nr #IGNORE 1
+. \}
+. \}
+. \}
+. \}
+.END
+\#
+\# Style for outputting collected bibliographic references
+\# -------------------------------------------------------
+\# *Argument:
+\# LIST | PLAIN [ <list separator> ] [ <list prefix> ]
+\# *Function:
+\# Sets #BIB_LIST to 1 for numbered list style, 0 for plain output
+\# *Notes:
+\# Technically, user is supposed to enter PLAIN if s/he wants an
+\# unnumbered bibliography, but the el clause says "any arg but
+\# LIST means unnumbered." Effectively, any arg but LIST produces
+\# a "plain" bibliographic list.
+\#
+\# The 2nd and 3rd args have the same options as the 2nd and 3rd
+\# args to LIST.
+\#
+.MAC BIBLIOGRAPHY_TYPE END
+. ie '\\$1'LIST' \{\
+. nr #BIB_LIST 1
+. ie '\\$2'' \
+. if '\\*[$BIB_LIST_SEPARATOR]'' .ds $BIB_LIST_SEPARATOR .
+. el .ds $BIB_LIST_SEPARATOR \\$2
+. ie '\\$3'' .ds $BIB_LIST_PREFIX
+. el .ds $BIB_LIST_PREFIX \\$3
+. \}
+. el .nr #BIB_LIST 0
+.END
+\#
+\# Spacing between items in bibliographies
+\# ---------------------------------------
+\# *Argument:
+\# <amount of space>
+\# *Function:
+\# Gets value for $BIB_SPACE.
+\# *Notes:
+\# Requires a unit of measure.
+\#
+.MAC BIBLIOGRAPHY_SPACING END
+. ds $BIB_SPACE \\$1
+.END
+\#
+\# Bibliography (user space macro)
+\# -------------------------------
+\# *Function:
+\# Sets up a new page, with title, ready to accept the output
+\# of refer's $LIST$ or .R1 bibliography .R2
+\# *Notes:
+\# Bibliography pages are set up almost identically to endnotes pages.
+\#
+.MAC BIBLIOGRAPHY END
+. if \\n[defer] .NEWPAGE
+. ie '\\$1'' \{\
+. rr #FN_REF
+. rr #EN_REF
+. nr #BIBLIOGRAPHY 1
+. nr #BIB_FIRST_PAGE 1
+\#. nr #SKIP_FOOTER +1
+. SETUP_BIBLIOGRAPHY
+\#. nr #SKIP_FOOTER -1
+. if \\n[#PRINT_STYLE]=1 \{\
+. ie \\n[#SINGLE_SPACE]=1 .vs \\n[#BIB_LEAD]u
+. el \{\
+. ie \\n[#BIB_SINGLESPACE]=1 .vs \\n[#BIB_LEAD]u
+. el .vs \\n[#BIB_LEAD]u
+. \}
+. \}
+. if \\n[#PRINT_STYLE]=2 \{\
+. ie \\n[#ADJ_BIB_LEAD] \
+. nr #DOC_LEAD \\n[#RESTORE_DOC_LEAD]
+. el .DOC_LEAD \\n[#RESTORE_DOC_LEAD]u
+. rr #RESTORE_DOC_LEAD
+. \}
+. if \\n[#COLUMNS_WERE_ON] .nr #COLUMNS 1
+. if \\n[#HEADER_STATE]=1 .HEADERS
+. if \\n[#LINENUMBERS]=2 \{\
+. NUMBER_LINES RESUME
+. nr #LINENUMBERS 1
+. \}
+. di BIB
+. \}
+. el \{\
+. br
+. di
+.\" Part of workaround for refer spitting out a blank page if the
+.\" last ref falls on the bottom line.
+. nr num*refs \\n[ref*num*first-pass]
+. nf
+. chop BIB
+. BIB
+. \}
+. rr #BIBLIOGRAPHY
+.END
+\#
+\# ====================================================================
+\#
+\# +++TABLE OF CONTENTS+++
+\#
+\# Strings to allocate space for leaders and entry page numbers
+\#
+.ds $TOC_PN \\*[ST102]\F[\\*[$TOC_PN_FAM]]\f[\\*[$TOC_PN_FT]]\
+\s[\\n[#TOC_PS]u]^\\*[ST102X]\\*[ST103]\s[\\*[$TOC_PN_SIZE_CHANGE]]\
+\h'.2n'\h'\w'0'u*\\n[#TOC_PN_PADDING]u'\\*[ST103X]
+\#
+.ds $TOC_PN_TYPEWRITE \\*[ST102]^\\*[ST102X]\\*[ST103]\
+\h'\w'0'u*\\n[#TOC_PN_PADDING]u'\\*[ST103X]
+\#
+\# Macro to remove titles from the TOC.
+\# Primarily to remove the copyright page from the TOC.
+\#
+.MAC NO_TOC_ENTRY END
+. nr #NO_TOC_ENTRY 1
+.END
+\#
+\# USER-INSERTED HEADING IN TOC
+\# ----------------------------
+\# *Arguments:
+\# <text>
+\# *Function:
+\# Inserts a single line of non-pagenumbered text into the TOC.
+\#
+.MAC TOC_HEADING END
+. ds $TOC_HEADING \\$1
+.END
+\#
+\# TOC collector
+\#
+.MAC TO_TOC END
+. if !'\\n[.ev]'TOC_EV' .ev TOC_EV
+. nr #TOC_CH_NUM_INDENT \w'\\*[$TOC_CH_NUM]'
+. da TOC_ENTRIES
+\!. ie \\\\n[#SKIP_ENTRY]=1 \{\
+. rr #SKIP_ENTRY
+\!. \}
+\!. el \{\
+. TQ
+. ie \\n[#PRINT_STYLE]=1 \{\
+\!. fam \\*[$TYPEWRITER_FAM]
+\!. ft R
+\!. ps \\*[$TYPEWRITER_PS]
+. ds _TYPEWRITE _TYPEWRITE
+. \}
+. el \{\
+. ie '\\$0'HD_TO_TOC' \{\
+\!. ps \\n[#TOC_PS]u\\*[$TOC_HEAD_\\n[#LEVEL]_SIZE]
+. \}
+. el \{\
+\!. FAMILY \\*[$TOC_TITLE_FAM]
+\!. FT \\*[$TOC_TITLE_FT]
+\!. ps \\n[#TOC_PS]u\\*[$TOC_TITLE_SIZE]
+. \}
+. \}
+. if \\n[#PRINT_STYLE]=2 \{\
+. rm _TYPEWRITE
+. if \\n[#SPACE_TOC_ITEMS] \{\
+. if \\n[#POST_TOP]=1 \{\
+. ie !\\n[#LEVEL]=\\n[#LAST_LEVEL] \{\
+. ie \\n[#LEVEL]>\\n[#LAST_LEVEL] \!.sp .2v
+. el \!.sp .4v
+. \}
+. el \{\
+. if \\n[#COLLATED_DOC] \
+. if '\\$0'TITLE_TO_TOC' \!.sp .4v
+. \}
+. \}
+. \}
+. \}
+\!. vpt 0
+\!. PAD_MARKER ^
+. if !'\\$0'HD_TO_TOC' \{\
+\!. if \\n[#TOC_TITLE_CAPS]=1 .CAPS
+. \}
+. if '\\$0'HD_TO_TOC' \{\
+. nr #POST_TOP 1
+\!. if \\n[#TOC_HEAD_\\n[#LEVEL]_CAPS]=1 .CAPS
+. \}
+. ie '\\$0'HD_TO_TOC' \{\
+. if \\n[#PRINT_STYLE]=1 \{\
+. ds $TOC_HEAD_\\n[#LEVEL]_FAM] \\*[$TYPEWRITER_FAM]
+. ds $TOC_HEAD_\\n[#LEVEL]_FT] R
+. \}
+\!. PAD \
+"\f[\\*[$TOC_HEAD_\\n[#LEVEL]_FAM]\
+\\*[$TOC_HEAD_\\n[#LEVEL]_FT]]\
+\h'\\\\n[#TOC_INDENT_ADJ]u'\h'\\n[#TOC_HEAD_\\n[#LEVEL]_INDENT]u'\
+\\*[$TOC_HD_NUM]\\*[$TOC_HEAD_\\n[#LEVEL]_ITEM]\\*[$TOC_PN\\*[_TYPEWRITE]]" \
+"\\*[PDFBOOKMARK.NAME]"
+. \}
+. el \{\
+. ie '\\$0'HEADING_TO_TOC' \{\
+. if \\n[#PRINT_STYLE]=1 \{\
+. ds $TOC_TITLE_FAM \\*[$TYPEWRITER_FAM]
+. ds $TOC_TITLE_FT R
+. \}
+. if !'\\*[$TOC_HEADING_QUAD]'' \{\
+. substring $TOC_HEADING_QUAD 0 0
+. if '\\*[$TOC_HEADING_QUAD]'L' \!.LEFT
+. if '\\*[$TOC_HEADING_QUAD]'C' \!.CENTER
+. if '\\*[$TOC_HEADING_QUAD]'R' \!.RIGHT
+. \}
+\!. vpt
+\!. ne \\*[$SPACE_ABOVE]+\\*[$SPACE_BENEATH]+2v
+\!. vpt 0
+. if \\n[#PRINT_STYLE]=2 \
+. if \\n[#POST_TOP] \!.sp \\*[$SPACE_ABOVE]
+. ie \\n[#PRINT_STYLE]=1 \!.nop \\*[$TOC_HEADING]
+. el \{\
+\!. nop \
+\f[\\*[$TOC_HEADING_FAM]\\*[$TOC_HEADING_FT]]\
+\s[\\*[$TOC_HEADING_SIZE]]\
+\m[\\*[$TOC_HEADING_COLOR]]\
+\\*[$TOC_HEADING]\
+\m[]\s[0]\f[P]
+. \}
+. if \\n[#PRINT_STYLE]=2 \{\
+. ie \\n[#SPACE_TOC_ITEMS] \
+. if \\n[#POST_TOP]=0 \!.sp \\*[$SPACE_BENEATH]
+. el \!.sp \\*[$SPACE_BENEATH]
+. \}
+\!. vpt
+. da
+. ev
+. return
+. \}
+. el \{\
+\!. PAD \
+"\f[\\*[$TOC_TITLE_FAM]\\*[$TOC_TITLE_FT]]\
+\h'\\n[#TOC_TITLE_INDENT]u'\\*[$TOC_TITLE_ITEM]\\*[$TOC_PN\\*[_TYPEWRITE]]" \
+"\\*[PDFBOOKMARK.NAME]"
+. \}
+. \}
+. ie '\\$0'HD_TO_TOC' \
+\!. if \\n[#TOC_HEAD_\\n[#LEVEL]_CAPS]=1 .CAPS OFF
+. el \
+\!. if \\n[#TOC_TITLE_CAPS]=1 .CAPS OFF
+\!. PAD_MARKER #
+\!. EOL
+\!. ST 102 L
+\!. ST 103 R QUAD
+. if \\n[#PRINT_STYLE]=2 \{\
+\!. FAMILY \\*[$TOC_PN_FAM]
+\!. FT \\*[$TOC_PN_FT]
+\!. ps \\n[#TOC_PS]u
+. \}
+\!. TAB 102
+\!. PRINT \fR\\*[LEADER]\f[]
+\!. TN
+. if \\n[#PRINT_STYLE]=2 \{\
+\!. ps \\*[$TOC_PN_SIZE_CHANGE]
+. \}
+\!. PRINT \\n[#TOC_ENTRY_PN]
+\!. \}
+. da
+. ev
+.END
+.
+.ALIAS HD_TO_TOC TO_TOC
+.ALIAS TITLE_TO_TOC TO_TOC
+.ALIAS HEADING_TO_TOC TO_TOC
+\#
+\# Control macros for toc
+\# ----------------------
+\#
+\# TOC TITLE STYLE
+\# ---------------
+\# *Arguments:
+\# FAMILY <family>
+\# FONT <font>
+\# SIZE <+|-n>
+\# COLOR <color>
+\# CAPS
+\# INDENT
+\# *Function:
+\# Assigns complete style parameters to TITLEs (doc titles,
+\# chapter titles, etc) in the TOC.
+\# *Notes:
+\# TITLEs are not headings, therefore they require their own style
+\# macro. Otherwise, the same as TOC_ENTRY_STYLE.
+\#
+.MAC TOC_TITLE_STYLE END
+. nr #ARG_NUM 0 1
+. nr #ATTRIB \\n[#NUM_ARGS]
+. while \\n+[#ARG_NUM]<=\\n[#ATTRIB] \{\
+. if '\\$1'FAMILY' \{\
+. shift
+. ds $TOC_TITLE_FAM \\$1
+. shift
+. \}
+. if '\\$1'FONT' \{\
+. shift
+. ds $TOC_TITLE_FT \\$1
+. shift
+. \}
+. if '\\$1'SIZE' \{\
+. shift
+. ds $TOC_TITLE_SIZE \\$1
+. shift
+. \}
+. if '\\$1'CAPS' \{\
+. nr #TOC_TITLE_CAPS 1
+. shift
+. \}
+. if '\\$1'NO_CAPS' \{\
+. rr #TOC_TITLE_CAPS
+. shift
+. \}
+. if '\\$1'SMALLCAPS' \{\
+. nr #TOC_TITLE_SMALLCAPS 1
+. shift
+. \}
+. if '\\$1'NO_SMALLCAPS' \{\
+. rr #TOC_TITLE_SMALLCAPS
+. shift
+. \}
+. if '\\$1'INDENT' \{\
+. shift
+. nr #TOC_TITLE_INDENT \\$1
+. shift
+. \}
+. \}
+.END
+\#
+\# TOC HEADER STRING
+\# -----------------
+\# *Argument:
+\# <string for "doc header" of first toc page>
+\# *Function:
+\# Creates or modifies string $TOC_HEADER_STRING
+\# *Notes:
+\# Default is "Contents".
+\#
+.MAC TOC_HEADER_STRING END
+. ds $TOC_HEADER_STRING \\$1
+.END
+\#
+\# TOC HEADER CAPS and SMALLCAPS
+\# -----------------------------
+\# *Arguments:
+\# <none> | <anything>
+\# *Function:
+\# Turns capitalization or smallcaps style of the toc title string
+\# on or off.
+\# *Notes:
+\# Users may want the toc title string to be in
+\# caps, but the page header to be in lower case. If the
+\# argument to TOC_HEADER_STRING is in lower case and
+\# TOC_HEADER_CAPS is turned on, this is exactly what will
+\# happen. Ditto for SMALLCAPS.
+\#
+.MAC TOC_HEADER_CAPS END
+. ie '\\$1'' .nr #TOC_STRING_CAPS 1
+. el .nr #TOC_STRING_CAPS 0
+.END
+.
+.MAC TOC_HEADER_SMALLCAPS END
+. ie '\\$1'' .nr #TOC_STRING_SMALLCAPS 1
+. el .nr #TOC_STRING_SMALLCAPS 0
+.END
+.
+\#
+\# TOC VERTICAL PLACEMENT
+\# ----------------------
+\# *Argument:
+\# <distance from page top>
+\# *Function:
+\# Creates register #TOC_HEADER_V_POS.
+\# *Notes:
+\# Default is same as normal docheader position.
+\#
+.MAC TOC_HEADER_V_POS END
+. nr #TOC_HEADER_V_POS (u;\\$1)
+.END
+\#
+\#
+\# TOC POINT SIZE
+\# --------------
+\# *Argument:
+\# <base point size for toc pages>
+\# *Function:
+\# Creates or modifies register #TOC_PS.
+\# *Notes:
+\# This size control macro differs from other size control macros
+\# in that it sets an absolute point size, not a relative one.
+\# See notes for ENDNOTE_PT_SIZE for explanation.
+\#
+\# No unit of measure required (points assumed). Default is 12.5
+\# for TYPESET.
+\#
+.MAC TOC_PT_SIZE END
+. nr #TOC_PS (p;\\$1)
+.END
+\#
+\# TOC ENTRIES PAGE NUMBERS PADDING
+\# --------------------------------
+\# *Argument:
+\# <number of placeholders for toc entries page numbers>
+\# *Function:
+\# Creates or modifies register #TOC_PN_PADDING.
+\# *Notes:
+\# "Placeholders" is the maximum number of digits in a page
+\# number numeral.
+\#
+\# Default is 3.
+\#
+.MAC TOC_PADDING END
+. nr #TOC_PN_PADDING \\$1
+.END
+\#
+\# PAGINATE TOC
+\# ------------
+\# *Argument:
+\# <none> | <anything>
+\# *Function:
+\# Creates or removes register #PAGINATE_TOC.
+\# *Notes:
+\# Default is to paginate toc.
+\#
+.MAC PAGINATE_TOC END
+. ie '\\$1'' .nr #PAGINATE_TOC 1
+. el .nr #PAGINATE_TOC 0
+.END
+\#
+.MAC TOC_FIRST_PAGENUM END
+. nr #TOC_START_PAGENUM \\$1
+.END
+\#
+\# TOC PAGES PAGE-NUMBERING STYLE
+\# ------------------------------
+\# *Argument:
+\# DIGIT | ROMAN | roman | ALPHA | alpha
+\# *Function:
+\# Creates or modifies string $TOC_PN_STYLE
+\# *Notes:
+\# Page numbering style for page numbers that appear in the
+\# headers/footers of toc pages. See notes for PAGENUM_STYLE.
+\#
+\# Default is roman.
+\#
+.MAC TOC_PAGENUM_STYLE END
+. ds $TOC_PN_STYLE \\$1
+.END
+\#
+\# TOC RECTO_VERSO SWITCH
+\# ----------------------
+\# *Argument:
+\# <none> | <anything>
+\# *Function:
+\# Creates or removes register #TOC_RV_SWITCH
+\# *Notes:
+\# Allows switching of L/R margins if a doc is recto/verso and
+\# the first toc page happens to fall the wrong way
+\#
+.MAC TOC_RV_SWITCH END
+. ie '\\$1'' .nr #TOC_RV_SWITCH 1
+. el .rr #TOC_RV_SWITCH
+.END
+\#
+\# TOC ENTRY SPACING
+\# -----------------
+\# *Arguments:
+\# <none> | <anything>
+\# *Function:
+\# Toggles whether a small amount of space is inserted between TOC
+\# entries for greater legibility.
+\#
+.MAC SPACE_TOC_ITEMS END
+. ie !'\\$1'' .rr #SPACE_TOC_ITEMS
+. el .nr #SPACE_TOC_ITEMS 1
+.END
+\#
+\# NUMBERING OF TOC CHAPTER/SECTION ENTRIES
+\# ----------------------------------------
+\# *Arguments:
+\# <none> | <anything>
+\# *Function:
+\# Determines whether chapter numbers are prefixed to title
+\# entries in the TOC (title here means chapter/chapter-title
+\# or, if the doctype is DEFAULT or NAMED, the section title.
+\# *Notes:
+\# Aliased as TOC_PREFIX_SECTION_NUMBER.
+\#
+.MAC TOC_PREFIX_CHAPTER_NUMBER END
+. ie '\\$1'' .nr #TOC_PREFIX_CH_NUM 1
+. el .rr #TOC_PREFIX_CH_NUM
+.END
+.
+.ALIAS TOC_PREFIX_SECTION_NUMBER TOC_PREFIX_CHAPTER_NUMBER
+\#
+\# PADDING OF TOC CHAPTER/SECTION NUMBERS
+\# --------------------------------------
+\# *Arguments:
+\# <amount of padding> | <anything>
+\# *Function:
+\# Insert figure spaces before toc chapter numbers so they
+\# right align.
+\# *Notes:
+\# Aliased as PAD_TOC_SECTION_NUMBERS.
+\#
+.MAC PAD_TOC_CHAPTER_NUMBERS END
+. ie !'\\$1'' .nr #PAD_TOC_CH_NUM \\$1
+. el .rr #PAD_TOC_CH_NUM
+.END
+.
+.ALIAS PAD_TOC_SECTION_NUMBERS PAD_TOC_CHAPTER_NUMBERS
+\#
+\# NUMBERING OF TOC HEAD ENTRIES
+\# -----------------------------
+\# *Arguments:
+\# FULL | TRUNCATE | NONE
+\# *Function:
+\# Determines how, or whether, to prepend heading numbers to TOC
+\# entries.
+\# *Notes:
+\# FULL means the complete numbering string (default).
+\#
+\# TRUNCATE means prepend a single digit sufficient to identify
+\# an entry's place in the numbering scheme with reference to the
+\# level above it. Thus, if a HEADING 1 is the second HEADING 1
+\# and therefore numbered "2.", a HEADING 2 beneath it (in the TOC)
+\# will have only "1." prepended to the entry; TOC indenting makes it
+\# evident under which level the HEADING 2 belongs.
+\#
+\# Note that TRUNCATE also removes chapter numbers, if
+\# PREFIX_CHAPTER_NUMBER is on.
+\#
+.MAC TOC_ENTRY_NUMBERS END
+. if '\\$1'TRUNCATE' .nr #TRUNC_TOC_HD_NUM 1
+. if '\\$1'FULL' .nr #TRUNC_TOC_HD_NUM 0
+. if '\\$1'NONE' .nr #TOC_NO_HD_NUM 1
+.END
+\#
+\# User defined TITLE entry string
+\#
+.MAC TOC_TITLE_ENTRY END
+. nr #USER_SET_TITLE_ITEM 1
+. ds $USER_SET_TITLE_ITEM \\$1
+.END
+\#
+\# APPEND AUTHOR(S) TO TOC DOC TITLE ENTRIES
+\# -----------------------------------------
+\# *Argument:
+\# <none> | <name(s) of author(s) as they should appear in toc doc title entries>
+\# *Function:
+\# Creates register #TOC_AUTHORS (to tell TOC to append authors
+\# to toc doc title entries). Optionally creates string
+\# $TOC_AUTHORS.
+\# *Notes:
+\# Normally, TOC does not append the author(s) to a toc doc title
+\# entry. This special macro instructs TOC to do so.
+\#
+\# If user has multiple authors for each doc when collating,
+\# TOC_APPENDS_AUTHOR "<string>" must be inserted somewhere between
+\# COLLATE and START in each doc. Otherwise, mom prints only the
+\# first author given to AUTHOR.
+\#
+.MAC TOC_APPENDS_AUTHOR END
+. nr #TOC_AUTHORS 1
+. if !'\\$1'' .ds $TOC_AUTHORS \\$1
+.END
+\#
+\# TABLE OF CONTENTS PAGE SETUP
+\# ----------------------------
+\# *Arguments:
+\# <none> | <anything>
+\# *Function:
+\# Some changes to the TOC layout (e.g. margins and page headers)
+\# are not covered by the TOC and endnotes control macros. This
+\# macro permits access to any and all page setup macros not so
+\# covered.
+\# *Notes
+\# Wraps a diversion that ends when the macro is invoked with an
+\# argument. The contained formatting macros must be preceded by
+\# '\!'. The diversion is output before START in TOC.
+\#
+.MAC TOC_PAGE_SETTINGS END
+. nr #TOC_PAGE_PARAMS 1
+. ie '\\$1'' \
+. di TOC_PAGE_PARAMS
+. el .di
+.END
+\#
+\# TABLE OF CONTENTS
+\# -----------------
+\# *Arguments:
+\# none
+\# *Function:
+\# Takes care of the administrivia of setting up the TOC as if
+\# it's a collated doc, then outputs the formatted TOC_ENTRIES
+\# diversion.
+\#
+.MAC TOC END
+. ie (\\n[@TOP]=0)&(\\n[.t]<=\\n[.v]) \
+' br \" When last line of text is on or near b-margin.
+. el .br \" All other cases
+. if dPDF.EXPORT \
+. if \\n[#FLEX_ACTIVE] \
+. if !\\n[#NO_FLEX] \
+. tm .ds pre-toc-\\n%@\\n[#COL_NUM] 1
+. if \\n[#TOC_RV_SWITCH]=1 .nr #TOC_RV_SWITCH 2
+. char \[leader] " .
+. LEADER_CHARACTER \[leader]
+. if !\\n[#TOC_HEAD_1_INDENT] \
+. nr #TOC_INDENT_ADJ 1.5m
+. if \\n[#TOC_PREFIX_CH_NUM] \
+. nr #TOC_INDENT_ADJ \\n[#TOC_CH_NUM_INDENT]
+. if !\\n[#DOC_TYPE]=2 \{\
+. if !'\\$1'INCLUDE_TITLE' \{\
+. if r #LEVEL .nr #SKIP_ENTRY 1
+. nr #TOC_INDENT_ADJ 0
+. \}
+. \}
+. nr #TOC 1
+. nr TOC.RELOCATE 0
+. if \\n[#LINENUMBERS]=1 \{\
+. NUMBER_LINES OFF
+. nr #LINENUMBERS 2
+. \}
+. if !r #PAGINATE_TOC .PAGINATE_TOC
+. nr #TOC_FIRST_PAGE 1
+. if \\n[#FINIS] \{\
+. if \\n[#FOOTERS_WERE_ON] \
+. FOOTERS \" Have to turn FOOTERS on for next bit to work, so we can't skip this step
+. \}
+. if \\n[#FOOTERS_ON]=1 \{\
+. if !'\\*[$HDRFTR_CENTER_OLD]'' \
+. ds $HDRFTR_CENTER \\*[$HDRFTR_CENTER_OLD]
+. ie \\n[#PAGINATE_TOC]=1 .PAGINATE
+. el .PAGINATION OFF
+. \}
+. if \\n[#FOOTERS_WERE_ON] .FOOTERS OFF \" But have to turn FOOTERS off again so they don't print when FINIS was called
+. rr #COLUMNS
+. COLLATE
+. if \\n[#PRINT_STYLE]=1 \{\
+. rr #IGNORE
+. if \\n[#SINGLE_SPACE] .DOC_LEAD 24
+. DOC_LEAD_ADJUST
+. TRAPS
+. nr #IGNORE 1
+. \}
+. if \\n[#FINIS] \{\
+. if \\n[#FOOTERS_WERE_ON] .FOOTERS \" Finally, turn footers on if they were on
+. rr #FOOTERS_WERE_ON
+. if \\n[#PAGINATION_WAS_ON] \{\
+. nr #PAGINATE 1
+. rr #PAGINATION_WAS_ON
+. \}
+. rr #FINIS
+. \}
+. ie \\n[#PAGINATE_TOC]=1 .PAGINATE
+. el .PAGINATION OFF
+. ds $HDRFTR_CENTER \\*[$HDRFTR_CENTER_NEW]
+. rm $HDRFTR_CENTER_OLD
+. rm $HDRFTR_CENTER_NEW
+. rr #COLLATED_DOC
+. if !r #TOC_START_PAGENUM .nr #TOC_START_PAGENUM 1
+. PAGENUMBER \\n[#TOC_START_PAGENUM]
+. if \\n[#LINENUMBERS]=2 .nr #LINENUMBERS 3
+. L_MARGIN \\n[#DOC_L_MARGIN]u
+. LL \\n[#DOC_L_LENGTH]u
+. HEADER_CENTER "\\*[$TOC_HEADER_STRING]
+. if \\n[#SLANT_ON] .nop \\*[SLANTX]
+. PAGENUM_STYLE \\*[$TOC_PN_STYLE]
+. PAGENUM_FAMILY \\*[$TOC_PN_FAM]
+. if r #TOC_PAGE_PARAMS .TOC_PAGE_PARAMS
+. ie \\n[#ADJ_TOC_LEAD] \{\
+. DOC_LEAD \\*[$TOC_LEAD] ADJUST
+. TRAPS
+. \}
+. el .DOC_LEAD \\*[$TOC_LEAD]
+. ie \\n[#TOC_HEADER_V_POS] \
+. DOCHEADER OFF \\n[#TOC_HEADER_V_POS]u-\\n[#DOC_LEAD]u
+. el .DOCHEADER OFF \\n[#T_MARGIN]u-\\n[#DOC_LEAD]u
+. if (\\n[#PRINT_STYLE]=1)&(\\n[#SINGLE_SPACE]=1) \
+. DOCHEADER OFF \\n[#T_MARGIN]u-(\\n[#DOC_LEAD]u*2u)
+. START
+. PDF_BOOKMARK 1 \\*[$TOC_HEADER_STRING]
+. if \\n[#PRINT_STYLE]=1 .TYPEWRITER
+. if \\n[#PRINT_STYLE]=2 \{\
+. FAMILY \\*[$TOC_HEADER_FAM]
+. FT \\*[$TOC_HEADER_FT]
+. ps \\n[#TOC_PS]u\\*[$TOC_HEADER_SIZE_CHANGE]
+. if \\n[#TOC_HEADER_COLOR]=1 \
+. COLOR \\*[$TOC_HEADER_COLOR]
+. \}
+. QUAD \\*[$TOC_HEADER_QUAD]
+. if \\n[#TOC_STRING_CAPS] .CAPS
+. if \\n[#TOC_STRING_SMALLCAPS] .SMALLCAPS
+. if \\n[#PRINT_STYLE]=1 \
+. UNDERSCORE 3p "\\*[$TOC_HEADER_STRING]"
+. if \\n[#PRINT_STYLE]=2 \{\
+. ie \\n[#TOC_HEADER_UNDERLINE] \{\
+. ds $TITLE_TYPE TOC_HEADER
+. ie \\n[#TOC_HEADER_UNDERLINE]=2 \
+. UNDERSCORE2 \\*[$TOC_UNDERLINE_GAP] \\*[$TOC_RULE_GAP] "\\*[$TOC_HEADER_STRING]"
+. el .UNDERSCORE "\\*[$TOC_HEADER_STRING]"
+. \}
+. el .PRINT \\*[$TOC_HEADER_STRING]
+. \}
+. SMALLCAPS OFF
+. CAPS OFF
+. if \\n[#TOC_HEADER_COLOR]=1 .gcolor
+. br
+. sp
+. SHIM_1
+. nf
+. TOC_ENTRIES
+. if \\n[#LINENUMBERS]=3 \{\
+. NUMBER_LINES RESUME
+. nr #LINENUMBERS 1
+. nn 1
+. \}
+. rr #TOC
+. rr #TOC_RV_SWITCH
+. pdfsync
+.END
+\#
+\# ====================================================================
+\#
+\# +++COLUMNS+++
+\#
+\# COLUMNS
+\# -------
+\# *Arguments:
+\# <number of columns> <width of gutters>
+\# *Function:
+\# Creates registers associated with setting docs in columns.
+\# Calculates column line lengths and offsets
+\# *Notes:
+\# COLUMNS, if used, s/b the last macro invoked before START.
+\#
+.MAC COLUMNS END
+. if \\n[#IGNORE_COLUMNS]=1 .return
+. nr #COLUMNS 1
+. nr #NUM_COLS \\$1
+. nr #GUTTER (\\$2)
+. nr #COL_L_LENGTH \\n[#L_LENGTH]-(\\n[#GUTTER]*(\\n[#NUM_COLS]-1))/\\n[#NUM_COLS]
+. nr #COL_TOTAL 0 \\n[#COL_L_LENGTH]+\\n[#GUTTER]
+. nr #COL_NUM 0 1
+. while !\\n[#COL_NUM]=\\n[#NUM_COLS] \{\
+. nr #COL_\\n+[#COL_NUM]_L_MARGIN \\n[#L_MARGIN]+\\n[#COL_TOTAL]
+. nr #COL_TOTAL \\n+[#COL_TOTAL]
+. \}
+. if \\n[#NUM_COLS]=1 \
+. if !\\n[#COLLATE]=1 .MN_INIT
+. rr #COL_TOTAL
+. rr #COL_NUM
+.END
+\#
+\# MARK COL V-POSITION AFTER DOCHEADER
+\# -----------------------------------
+\# *Arguments:
+\# none
+\# *Function:
+\# Sets 1st page dc register.
+\# *Notes:
+\# Only required if manual spacing, positive or negative, precedes
+\# start of columns on first page of doc.
+\#
+.MAC COL_MARK END
+. mk dc
+.END
+\#
+\# NEXT COLUMN
+\# -----------
+\# *Arguments:
+\# <none>
+\# *Function:
+\# Breaks current column and moves to next column.
+\# If current column is the last on the page, breaks
+\# to a new page.
+\#
+.MAC COL_NEXT END
+. if \\n[#COLUMNS] \{\
+. nr #COL_NEXT 1
+. vpt 0
+. if !'\\$1'internal' \
+. if dPDF.EXPORT \
+. if \\n[#FLEX_ACTIVE] \
+. if !\\n[#NO_FLEX] \
+. if \\n[#COL_NUM]>1 \
+. tm .ds page-\\n%@\\n[#COL_NUM] 1
+. ie '\\$0'COL_NEXT' .br
+. el \{\
+. brp
+. RLD 1v
+. \}
+. vpt
+. ie \\n[#COL_NUM]=\\n[#NUM_COLS] .NEWPAGE
+. el .FOOTER
+. \}
+.END
+\#
+\# ====================================================================
+\#
+\# +++LISTS+++
+\#
+\# LIST
+\# ----
+\# *Arguments:
+\# [ BULLET | DASH | DIGIT | alpha | ALPHA | roman | ROMAN | USER ] \
+\# [ <separator> | NONE ] [ <prefix> ] [ <anything> ]
+\# *Function:
+\# Stores indent information in effect prior to invocation and
+\# initializes a list with the supplied enumerator (and separator).
+\# *Notes:
+\# Default enumerator is a bullet.
+\#
+\# Enumerator *must* be supplied for every list that's to the
+\# right of another list, every time, unless the default bullet is
+\# desired.
+\#
+\# <anything> moves back one list level intuitively, or exits lists
+\# completely if the level in which it's invoked is the first.
+\#
+.MAC LIST END
+. br
+. if r pdfbx-top 'sp -1
+. ds $1ST_LETTER \\$1
+. if !'\\*[$1ST_LETTER]'' .substring $1ST_LETTER 0 0
+. if '\\*[$1ST_LETTER]'r' .ds $1ST_LETTER R
+. ie '\\*[$1ST_LETTER]'R' \{\
+. if r #ROMAN_LIST .rr #ROMAN_LIST
+. if '\\$1'ROMAN' .nr #ROMAN_LIST 1
+. if '\\$1'roman' .nr #ROMAN_LIST 1
+. ds $LAST_CHAR \\$1
+. substring $LAST_CHAR -1
+. if !\B'\\*[$LAST_CHAR]' \{\
+. if !r #ROMAN_LIST \{\
+. LIST OFF
+. return
+. \}
+. tm1 "[mom]: You must append a number to the '\\$1' argument to \\$0.
+. tm1 " The number should be the total number of items in this list.
+. tm1 " See the documentation.
+. ab [mom]: Aborting '\\n[.F]' at \\$0, line \\n[.c].
+. \}
+. ds $ROMAN_WIDTH \\$1
+. substring $ROMAN_WIDTH 1
+. while !\B'\\*[$ROMAN_WIDTH]' \{\
+. substring $ROMAN_WIDTH 1
+. \}
+. length #ROMAN_LENGTH \\*[$ROMAN_WIDTH]
+. ds $LIST_ARG_1 \\$1
+. substring $LIST_ARG_1 0 -(\\n[#ROMAN_LENGTH]+1)
+. \}
+. el .ds $LIST_ARG_1 \\$1
+. if !r#DEPTH \{\
+. if \\n[#INDENT_ACTIVE] \{\
+. nr #STORED_HL_INDENT \\n[#HL_INDENT]
+. nr #STORED_T_INDENT \\n[#T_INDENT]
+. if \\n[#INDENT_STYLE_LEFT] \
+. nr #STORED_L_INDENT \\n[#L_INDENT]
+. if \\n[#INDENT_STYLE_RIGHT] \
+. nr #STORED_R_INDENT \\n[#R_INDENT]
+. if \\n[#INDENT_STYLE_BOTH] \{\
+. nr #STORED_BL_INDENT \\n[#BL_INDENT]
+. nr #STORED_BR_INDENT \\n[#BR_INDENT]
+. \}
+. \}
+. nr #CURRENT_L_LENGTH \\n[.l]
+. nr #DEPTH 0 1
+. if \\n[#INDENT_ACTIVE]=1 \{\
+. if \\n[#INDENT_LEFT_ACTIVE]=1 \
+. nr #RESTORE_PREV_INDENT 1
+. if \\n[#INDENT_BOTH_ACTIVE]=1 \{\
+. ie \\n[#DOC_TYPE]=5 .IBX CLEAR
+. el .IBX
+. nr #ORIG_L_LENGTH \\n[.l]
+. IB
+. nr #RESTORE_PREV_INDENT 2
+. \}
+. if \\n[#INDENT_RIGHT_ACTIVE]=1 \{\
+. ie \\n[#DOC_TYPE]=5 .IRX CLEAR
+. el .IRX
+. nr #ORIG_L_LENGTH \\n[.l]
+. IR
+. nr #RESTORE_PREV_INDENT 3
+. if \\n[#INDENT_LEFT_ACTIVE]=1 \
+. nr #RESTORE_PREV_INDENT 4
+. \}
+. \}
+. \}
+. ds pre-list-quad \\*[$QUAD_VALUE]
+. substring pre-list-quad 0 0
+. if '\\*[pre-list-quad]'C' \{\
+. if !'\\n[.z]'LIST*DIV' \{\
+. nr #PRE_LIST_QUAD \\n[.j]
+. nr #LIST_CENTER 1
+. if !'\\n[.z]'LIST*DIV' .di LIST*DIV
+\!. nr #IN_LIST 1
+. ad l
+. \}
+. \}
+. if '\\*[pre-list-quad]'R' \{\
+. if !'\\n[.z]'LIST*DIV' \{\
+. nr #PRE_LIST_QUAD \\n[.j]
+. nr #LIST_RIGHT 1
+. if !'\\n[.z]'LIST*DIV' .di LIST*DIV
+\!. nr #IN_LIST 1
+. ad l
+. \}
+. \}
+. ie \\n[#NUM_ARGS]=0 \{\
+. nr #ARGS_TO_LIST 1 \" So default behaves as if LIST BULLET
+. ds $ENUMERATOR\\n+[#DEPTH] \[bu]
+. ds $ENUMERATOR_TYPE\\n[#DEPTH] other
+. ds $SEPARATOR
+. ds $PREFIX
+. ds $SEPARATOR\\n[#DEPTH]
+. ds $PREFIX\\n[#DEPTH]
+. \}
+. el \{\
+. rr #ARGS_TO_LIST \" Clear this before processing arg 1.
+. if '\\*[$LIST_ARG_1]'DASH' \{\
+. nr #ARGS_TO_LIST 1
+. ds $ENUMERATOR\\n+[#DEPTH] \[en]
+. ds $ENUMERATOR_TYPE\\n[#DEPTH] other
+. ds $SEPARATOR\\n[#DEPTH]
+. ds $PREFIX\\n[#DEPTH]
+. \}
+. if '\\*[$LIST_ARG_1]'BULLET' \{\
+. nr #ARGS_TO_LIST 1
+. ds $ENUMERATOR\\n+[#DEPTH] \[bu]
+. ds $ENUMERATOR_TYPE\\n[#DEPTH] other
+. ds $SEPARATOR\\n[#DEPTH]
+. ds $PREFIX\\n[#DEPTH]
+. \}
+. if '\\*[$LIST_ARG_1]'DIGIT' \{\
+. nr #ARGS_TO_LIST 1
+. nr #ENUMERATOR\\n+[#DEPTH] 0 1
+. ds $ENUMERATOR_TYPE\\n[#DEPTH] register
+. ds $SEPARATOR\\n[#DEPTH] .
+. ds $PREFIX\\n[#DEPTH]
+. if \\n[#NUM_ARGS]>=2 \{\
+. ie '\\$2'NONE' .ds $SEPARATOR\\n[#DEPTH]
+. el .ds $SEPARATOR\\n[#DEPTH] \\$2
+. if \\n[#NUM_ARGS]=3 .ds $PREFIX\\n[#DEPTH] \\$3
+. \}
+. \}
+. if '\\*[$LIST_ARG_1]'alpha' \{\
+. nr #ARGS_TO_LIST 1
+. nr #ENUMERATOR\\n+[#DEPTH] 0 1
+. af #ENUMERATOR\\n[#DEPTH] a
+. ds $ENUMERATOR_TYPE\\n[#DEPTH] register
+. ds $SEPARATOR\\n[#DEPTH] )
+. ds $PREFIX\\n[#DEPTH]
+. if \\n[#NUM_ARGS]>=2 \{\
+. ie '\\$2'NONE' .ds $SEPARATOR\\n[#DEPTH]
+. el .ds $SEPARATOR\\n[#DEPTH] \\$2
+. if \\n[#NUM_ARGS]=3 .ds $PREFIX\\n[#DEPTH] \\$3
+. \}
+. \}
+. if '\\*[$LIST_ARG_1]'ALPHA' \{\
+. nr #ARGS_TO_LIST 1
+. nr #ENUMERATOR\\n+[#DEPTH] 0 1
+. af #ENUMERATOR\\n[#DEPTH] A
+. ds $ENUMERATOR_TYPE\\n[#DEPTH] register
+. ds $SEPARATOR\\n[#DEPTH] )
+. ds $PREFIX\\n[#DEPTH]
+. if \\n[#NUM_ARGS]>=2 \{\
+. ie '\\$2'NONE' .ds $SEPARATOR\\n[#DEPTH]
+. el .ds $SEPARATOR\\n[#DEPTH] \\$2
+. if \\n[#NUM_ARGS]=3 \
+. ds $PREFIX\\n[#DEPTH] \\$3
+. \}
+. \}
+. if '\\*[$1ST_LETTER]'R' \{\
+. nr #ARGS_TO_LIST 1
+. nr #ENUMERATOR\\n+[#DEPTH] 0 1
+. if '\\*[$LIST_ARG_1]'roman' .af #ENUMERATOR\\n[#DEPTH] i
+. if '\\*[$LIST_ARG_1]'ROMAN' .af #ENUMERATOR\\n[#DEPTH] I
+. ds $ENUMERATOR_TYPE\\n[#DEPTH] roman
+. ds $SEPARATOR\\n[#DEPTH] )
+. ds $PREFIX\\n[#DEPTH]
+. if \\n[#NUM_ARGS]>=2 \{\
+. ie '\\$2'NONE' .ds $SEPARATOR\\n[#DEPTH]
+. el .ds $SEPARATOR\\n[#DEPTH] \\$2
+. if \\n[#NUM_ARGS]=3 .ds $PREFIX\\n[#DEPTH] \\$3
+. \}
+. \}
+. if '\\*[$LIST_ARG_1]'USER' \{\
+. nr #ARGS_TO_LIST 1
+. ds $ENUMERATOR\\n+[#DEPTH] \\$2
+. ds $ENUMERATOR_TYPE\\n[#DEPTH] other
+. ds $SEPARATOR\\n[#DEPTH]
+. ds $PREFIX\\n[#DEPTH]
+. \}
+. if '\\*[$LIST_ARG_1]'VARIABLE' \{\
+. if \\n[#NUM_ARGS]<2 \{\
+. tm1 "[mom]: You must follow the \\$1 argument to \\$0 with the widest
+. tm1 " enumerator to be used. See the documentation.
+. ab [mom]: Aborting '\\n[.F]' at \\$0, line \\n[.c].
+. \}
+. nr #ARGS_TO_LIST 1
+. ds $ENUMERATOR\\n+[#DEPTH]
+. ds $ENUMERATOR_TYPE\\n[#DEPTH] variable
+. ds $ENUMERATOR_WIDTH\\n[#DEPTH] \w'\\$2\ '
+. ds $SEPARATOR\\n[#DEPTH]
+. ds $PREFIX\\n[#DEPTH]
+. \}
+. if '\\*[$LIST_ARG_1]'PLAIN' \{\
+. nr #ARGS_TO_LIST 1
+. ds $ENUMERATOR\\n+[#DEPTH]
+. ds $ENUMERATOR_TYPE\\n[#DEPTH] plain
+. ds $SEPARATOR\\n[#DEPTH]
+. ds $PREFIX\\n[#DEPTH]
+. \}
+. if \\n[#NUM_ARGS]=1 \{\
+. if !r#ARGS_TO_LIST \{\
+. ie \\n[#DEPTH]=1 \{\
+. ie \\n[#NEXT_DEPTH_BACK]=0 \{\
+. SET_LIST_INDENT
+. if \\n[#QUIT]=1 \{\
+. QUIT_LISTS
+. return
+. \}
+. return
+. \}
+. el \{\
+. QUIT_LISTS
+. return
+. \}
+. \}
+. el \{\
+. SET_LIST_INDENT
+. return
+. \}
+. \}
+. \}
+. \}
+. nr #TOTAL_LISTS \\n[#DEPTH]
+. if '\\*[$ENUMERATOR_TYPE\\n[#DEPTH]]'register' \{\
+. nr #LIST_INDENT\\n[#DEPTH] \
+\w'\\*[$PREFIX\\n[#DEPTH]]m\\*[$SEPARATOR\\n[#DEPTH]]\ '
+. if '\\*[$LIST_ARG_1]'ALPHA' .nr #LIST_INDENT\\n[#DEPTH] \
+\w'\\*[$PREFIX\\n[#DEPTH]]M\\*[$SEPARATOR\\n[#DEPTH]]\ '
+. \}
+. if '\\*[$ENUMERATOR_TYPE\\n[#DEPTH]]'roman' \
+. GET_ROMAN_INDENT
+. if '\\*[$ENUMERATOR_TYPE\\n[#DEPTH]]'other' \
+. nr #LIST_INDENT\\n[#DEPTH] \w'\\*[$ENUMERATOR\\n[#DEPTH]]\ '
+. if '\\*[$ENUMERATOR_TYPE\\n[#DEPTH]]'variable' \
+. nr #LIST_INDENT\\n[#DEPTH] \\*[$ENUMERATOR_WIDTH\\n[#DEPTH]]
+. ll \\n[#CURRENT_L_LENGTH]u
+. ie \\n[#DEPTH]=1 \{\
+. ie \\n[#INDENT_ACTIVE]=1 \{\
+. if \\n[#INDENT_STYLE_LEFT]=1 \{\
+. if \\n[#L_INDENT_ILX] \{\
+. rr #L_INDENT
+. rr #L_INDENT_ILX
+. \}
+. nr #L_INDENT \\n[#L_INDENT]+\\n[#LIST_INDENT\\n[#DEPTH]]
+. nr #HL_INDENT\\n[#DEPTH] \\n[#LIST_INDENT\\n[#DEPTH]]
+. nr #LIST_INDENT\\n[#DEPTH] \\n[#L_INDENT]
+. \}
+. if \\n[#INDENT_BOTH_ACTIVE]=1 \{\
+. nr #L_INDENT \\n[#BL_INDENT]+\\n[#LIST_INDENT\\n[#DEPTH]]
+. nr #HL_INDENT\\n[#DEPTH] \\n[#LIST_INDENT\\n[#DEPTH]]
+. nr #LIST_INDENT\\n[#DEPTH] \\n[#L_INDENT]
+. \}
+. if \\n[#INDENT_RIGHT_ACTIVE]=1 \{\
+. ie \\n[#INDENT_LEFT_ACTIVE]=1 \{\
+. \" Don't do anything; we already have a left indent
+. \}
+. el \{\
+. nr #L_INDENT +\\n[#LIST_INDENT\\n[#DEPTH]]
+. nr #HL_INDENT\\n[#DEPTH] \\n[#LIST_INDENT\\n[#DEPTH]]
+. \}
+. \}
+. \}
+. el \{\
+. nr #L_INDENT +\\n[#LIST_INDENT\\n[#DEPTH]]
+. nr #HL_INDENT\\n[#DEPTH] \\n[#LIST_INDENT\\n[#DEPTH]]
+. \}
+. \}
+. el \{\
+. nr #L_INDENT +\\n[#LIST_INDENT\\n[#DEPTH]]
+. nr #HL_INDENT\\n[#DEPTH] \\n[#LIST_INDENT\\n[#DEPTH]]
+. \}
+.END
+\#
+\# ITEM
+\# ----
+\# *Arguments:
+\# <none> | <space before item>
+\# *Function:
+\# Prints enumerator for a given list depth and prepares mom to
+\# receive the text of an item.
+\#
+.MAC ITEM END
+. ie \\n[#NUM_ARGS]=2 .sp \\$2
+. el \
+. if \B'\\$1' .sp \\$1
+. if '\\*[$ENUMERATOR_TYPE\\n[#DEPTH]]'plain' .nop
+. if !r#DEPTH .return
+. if \\n[#LINENUMBERS]=1 \{\
+. NUMBER_LINES OFF
+. nr #LINENUMBERS 2
+. \}
+. if \\n[#KERN]=1 \{\
+. nr #KERN_WAS_ON 1
+. KERN OFF
+. \}
+. rr #IN_ITEM
+. IL
+. nr #IN_ITEM 1
+. ll \\n[#CURRENT_L_LENGTH]u \" Set ll again because IL turns IB off.
+. ie !'\\n[.z]'' \!.TRAP OFF
+. el .TRAP OFF
+. HI \\n[#HL_INDENT\\n[#DEPTH]]u
+. if '\\*[$SEPARATOR\\n[#DEPTH]]')' .nr #SEP_TYPE 1
+. if '\\*[$SEPARATOR\\n[#DEPTH]]']' .nr #SEP_TYPE 1
+. if '\\*[$SEPARATOR\\n[#DEPTH]]'}' .nr #SEP_TYPE 1
+. ie \\n[#IN_BIB_LIST]=1 \{\
+. ie \\n[#ENUMERATOR\\n[#DEPTH]]<9 \{\
+. ie \\n[#SEP_TYPE]=1 .PRINT \
+\v'-.085m'\\*[$PREFIX\\n[#DEPTH]]\v'.085m'\
+\\n+[#ENUMERATOR\\n[#DEPTH]]\v'-.085m'\\*[$SEPARATOR\\n[#DEPTH]]\v'.085m'
+. el .PRINT \
+\\*[$PREFIX\\n[#DEPTH]]\\n+[#ENUMERATOR\\n[#DEPTH]]\\*[$SEPARATOR\\n[#DEPTH]]
+. \}
+. el \{\
+. ie \\n[#SEP_TYPE]=1 .PRINT \
+\h'-\w'\0'u'\v'-.085m'\\*[$PREFIX\\n[#DEPTH]]\v'.085m'\
+\\n+[#ENUMERATOR\\n[#DEPTH]]\v'-.085m'\\*[$SEPARATOR\\n[#DEPTH]]\v'.085m'
+. el .PRINT \
+\h'-\w'\0'u'\
+\\*[$PREFIX\\n[#DEPTH]]\\n+[#ENUMERATOR\\n[#DEPTH]]\\*[$SEPARATOR\\n[#DEPTH]]
+. \}
+. \}
+. el \{\
+. ie '\\*[$ENUMERATOR_TYPE\\n[#DEPTH]]'register' \{\
+.\" DIGIT
+. ie '\\g[#ENUMERATOR\\n[#DEPTH]]'0' \{\
+. ie \\n[#PAD_LIST_DIGITS\\n[#DEPTH]]=1 \{\
+. ie \\n[#ENUMERATOR\\n[#DEPTH]]<9 \{\
+. ie \\n[#SEP_TYPE]=1 .PRINT \
+\0\v'-.085m'\\*[$PREFIX\\n[#DEPTH]]\v'.085m'\\n+[#ENUMERATOR\\n[#DEPTH]]\
+\v'-.085m'\\*[$SEPARATOR\\n[#DEPTH]]\v'.085m'
+. el .PRINT \
+\0\\*[$PREFIX\\n[#DEPTH]]\\n+[#ENUMERATOR\\n[#DEPTH]]\\*[$SEPARATOR\\n[#DEPTH]]
+. \}
+. el \{\
+. ie \\n[#SEP_TYPE]=1 .PRINT \
+\v'-.085m'\\*[$PREFIX\\n[#DEPTH]]\v'.085m'\\n+[#ENUMERATOR\\n[#DEPTH]]\
+\v'-.085m'\\*[$SEPARATOR\\n[#DEPTH]]\v'.085m'
+. el .PRINT \
+\\*[$PREFIX\\n[#DEPTH]]\\n+[#ENUMERATOR\\n[#DEPTH]]\\*[$SEPARATOR\\n[#DEPTH]]
+. \}
+. \}
+. el \{\
+. ie \\n[#SEP_TYPE]=1 .PRINT \
+\v'-.085m'\\*[$PREFIX\\n[#DEPTH]]\v'.085m'\\n+[#ENUMERATOR\\n[#DEPTH]]\
+\v'-.085m'\\*[$SEPARATOR\\n[#DEPTH]]\v'.085m'
+. el .PRINT \
+\\*[$PREFIX\\n[#DEPTH]]\\n+[#ENUMERATOR\\n[#DEPTH]]\\*[$SEPARATOR\\n[#DEPTH]]
+. \}
+. \}
+. el \{\
+.\" ALPHA
+. ie '\\g[#ENUMERATOR\\n[#DEPTH]]'A' \{\
+. ie \\n[#SEP_TYPE]=1 .PRINT \
+\v'-.085m'\\*[$PREFIX\\n[#DEPTH]]\v'.085m'\\n+[#ENUMERATOR\\n[#DEPTH]]\
+\v'-.085m'\\*[$SEPARATOR\\n[#DEPTH]]\v'.085m'
+. el .PRINT \
+\\*[$PREFIX\\n[#DEPTH]]\\n+[#ENUMERATOR\\n[#DEPTH]]\\*[$SEPARATOR\\n[#DEPTH]]
+. \}
+.\" alpha
+. el .PRINT \
+\\*[$PREFIX\\n[#DEPTH]]\\n+[#ENUMERATOR\\n[#DEPTH]]\\*[$SEPARATOR\\n[#DEPTH]]
+. \}
+. \}
+. if '\\*[$ENUMERATOR_TYPE\\n[#DEPTH]]'roman' \{\
+. ie \\n[#PAD_LIST_DIGITS\\n[#DEPTH]]=1 \{\
+.\" ROMAN I, padded
+. ie '\\g[#ENUMERATOR\\n[#DEPTH]]'I' \{\
+. ie \\n[#SEP_TYPE]=1 .PRINT \
+\h'\\n[#HL_INDENT\\n[#DEPTH]]u'\h'-\w'\\*[$PREFIX\\n[#DEPTH]]\
+\\n+[#ENUMERATOR\\n[#DEPTH]]\\*[$SEPARATOR\\n[#DEPTH]]\0'u'\
+\v'-.085m'\\*[$PREFIX\\n[#DEPTH]]\v'.085m'\\n[#ENUMERATOR\\n[#DEPTH]]\
+\v'-.085m'\\*[$SEPARATOR\\n[#DEPTH]]\v'.085m'
+. el .PRINT \
+\h'\\n[#HL_INDENT\\n[#DEPTH]]u'\h'-\w'\\*[$PREFIX\\n[#DEPTH]]\
+\\n+[#ENUMERATOR\\n[#DEPTH]]\\*[$SEPARATOR\\n[#DEPTH]]\
+\0'u'\\*[$PREFIX\\n[#DEPTH]]\\n[#ENUMERATOR\\n[#DEPTH]]\
+\\*[$SEPARATOR\\n[#DEPTH]]
+. \}
+.\" roman i, padded
+. el .PRINT \
+\h'\\n[#HL_INDENT\\n[#DEPTH]]u'\h'-\w'\\*[$PREFIX\\n[#DEPTH]]\
+\\n+[#ENUMERATOR\\n[#DEPTH]]\\*[$SEPARATOR\\n[#DEPTH]]\0'u'\
+\\*[$PREFIX\\n[#DEPTH]]\\n[#ENUMERATOR\\n[#DEPTH]]\\*[$SEPARATOR\\n[#DEPTH]]
+. \}
+.\" No pad
+. el \{\
+.\" ROMAN I, no pad
+. ie '\\g[#ENUMERATOR\\n[#DEPTH]]'I' \{\
+. ie \\n[#SEP_TYPE]=1 .PRINT \
+\v'-.085m'\\*[$PREFIX\\n[#DEPTH]]\v'.085m'\\n+[#ENUMERATOR\\n[#DEPTH]]\
+\v'-.085m'\\*[$SEPARATOR\\n[#DEPTH]]\v'.085m'
+. el .PRINT \
+\\*[$PREFIX\\n[#DEPTH]]\\n+[#ENUMERATOR\\n[#DEPTH]]\\*[$SEPARATOR\\n[#DEPTH]]
+. \}
+.\" roman i, no pad
+. el .PRINT \
+\\*[$PREFIX\\n[#DEPTH]]\\n+[#ENUMERATOR\\n[#DEPTH]]\\*[$SEPARATOR\\n[#DEPTH]]
+. \}
+. \}
+. if '\\*[$ENUMERATOR_TYPE\\n[#DEPTH]]'other' \
+. PRINT \\*[$ENUMERATOR\\n[#DEPTH]]\\*[$SEPARATOR\\n[#DEPTH]]
+. if '\\*[$ENUMERATOR_TYPE\\n[#DEPTH]]'variable' \
+. PRINT \\$1
+. \}
+. rr #SEP_TYPE
+. EOL
+. if \\n[#REF]=1 \{\
+. IL +\\n[#REF_BIB_INDENT]u
+. ti \\n[#L_INDENT]u-\\n[#REF_BIB_INDENT]u
+. \}
+. ie !'\\n[.z]'' \!.TRAP
+. el .TRAP
+. if \\n[#KERN_WAS_ON]=1 \{\
+. KERN
+. rr #KERN_WAS_ON
+. \}
+. if \\n[#LINENUMBERS]=2 \{\
+. NUMBER_LINES RESUME
+. nr #LINENUMBERS 1
+. \}
+.END
+\#
+\# A utility macro that determines the space to reserve for
+\# roman numeral enumerated lists. Limit is 20 roman numerals
+\# per list. If this isn't enough, the user can add to the
+\# macro.
+\#
+.MAC GET_ROMAN_INDENT END
+. if '\\*[$LIST_ARG_1]'roman' \{\
+. if '\\*[$ROMAN_WIDTH]'1' \{\
+. ds $ROMAN_WIDTH\\n[#DEPTH] 1
+. nr #LIST_INDENT\\n[#DEPTH] \
+\w'\\*[$PREFIX\\n[#DEPTH]]i\\*[$SEPARATOR\\n[#DEPTH]]\0'
+. \}
+. if '\\*[$ROMAN_WIDTH]'2' \{\
+. ds $ROMAN_WIDTH\\n[#DEPTH] 2
+. nr #LIST_INDENT\\n[#DEPTH] \
+\w'\\*[$PREFIX\\n[#DEPTH]]ii\\*[$SEPARATOR\\n[#DEPTH]]\0'
+. \}
+. if '\\*[$ROMAN_WIDTH]'3' \{\
+. ds $ROMAN_WIDTH\\n[#DEPTH] 3
+. nr #LIST_INDENT\\n[#DEPTH] \
+\w'\\*[$PREFIX\\n[#DEPTH]]iii\\*[$SEPARATOR\\n[#DEPTH]]\0'
+. \}
+. if '\\*[$ROMAN_WIDTH]'4' \{\
+. ds $ROMAN_WIDTH\\n[#DEPTH] 4
+. nr #LIST_INDENT\\n[#DEPTH] \
+\w'\\*[$PREFIX\\n[#DEPTH]]iii\\*[$SEPARATOR\\n[#DEPTH]]\0'
+. \}
+. if '\\*[$ROMAN_WIDTH]'5' \{\
+. ds $ROMAN_WIDTH\\n[#DEPTH] 5
+. nr #LIST_INDENT\\n[#DEPTH] \
+\w'\\*[$PREFIX\\n[#DEPTH]]iii\\*[$SEPARATOR\\n[#DEPTH]]\0'
+. \}
+. if '\\*[$ROMAN_WIDTH]'6' \{\
+. ds $ROMAN_WIDTH\\n[#DEPTH] 6
+. nr #LIST_INDENT\\n[#DEPTH] \
+\w'\\*[$PREFIX\\n[#DEPTH]]iii\\*[$SEPARATOR\\n[#DEPTH]]\0'
+. \}
+. if '\\*[$ROMAN_WIDTH]'7' \{\
+. ds $ROMAN_WIDTH\\n[#DEPTH] 7
+. nr #LIST_INDENT\\n[#DEPTH] \
+\w'\\*[$PREFIX\\n[#DEPTH]]vii\\*[$SEPARATOR\\n[#DEPTH]]\0'
+. \}
+. if '\\*[$ROMAN_WIDTH]'8' \{\
+. ds $ROMAN_WIDTH\\n[#DEPTH] 8
+. nr #LIST_INDENT\\n[#DEPTH] \
+\w'\\*[$PREFIX\\n[#DEPTH]]viii\\*[$SEPARATOR\\n[#DEPTH]]\0'
+. \}
+. if '\\*[$ROMAN_WIDTH]'9' \{\
+. ds $ROMAN_WIDTH\\n[#DEPTH] 9
+. nr #LIST_INDENT\\n[#DEPTH] \
+\w'\\*[$PREFIX\\n[#DEPTH]]viii\\*[$SEPARATOR\\n[#DEPTH]]\0'
+. \}
+. if '\\*[$ROMAN_WIDTH]'10' \{\
+. ds $ROMAN_WIDTH\\n[#DEPTH] 10
+. nr #LIST_INDENT\\n[#DEPTH] \
+\w'\\*[$PREFIX\\n[#DEPTH]]viii\\*[$SEPARATOR\\n[#DEPTH]]\0'
+. \}
+. if '\\*[$ROMAN_WIDTH]'11' \{\
+. ds $ROMAN_WIDTH\\n[#DEPTH] 11
+. nr #LIST_INDENT\\n[#DEPTH] \
+\w'\\*[$PREFIX\\n[#DEPTH]]viii\\*[$SEPARATOR\\n[#DEPTH]]\0'
+. \}
+. if '\\*[$ROMAN_WIDTH]'12' \{\
+. ds $ROMAN_WIDTH\\n[#DEPTH] 12
+. nr #LIST_INDENT\\n[#DEPTH] \
+\w'\\*[$PREFIX\\n[#DEPTH]]viii\\*[$SEPARATOR\\n[#DEPTH]]\0'
+. \}
+. if '\\*[$ROMAN_WIDTH]'13' \{\
+. ds $ROMAN_WIDTH\\n[#DEPTH] 13
+. nr #LIST_INDENT\\n[#DEPTH] \
+\w'\\*[$PREFIX\\n[#DEPTH]]xiii\\*[$SEPARATOR\\n[#DEPTH]]\0'
+. \}
+. if '\\*[$ROMAN_WIDTH]'14' \{\
+. ds $ROMAN_WIDTH\\n[#DEPTH] 14
+. nr #LIST_INDENT\\n[#DEPTH] \
+\w'\\*[$PREFIX\\n[#DEPTH]]xiii\\*[$SEPARATOR\\n[#DEPTH]]\0'
+. \}
+. if '\\*[$ROMAN_WIDTH]'15' \{\
+. ds $ROMAN_WIDTH\\n[#DEPTH] 15
+. nr #LIST_INDENT\\n[#DEPTH] \
+\w'\\*[$PREFIX\\n[#DEPTH]]xiii\\*[$SEPARATOR\\n[#DEPTH]]\0'
+. \}
+. if '\\*[$ROMAN_WIDTH]'16' \{\
+. ds $ROMAN_WIDTH\\n[#DEPTH] 16
+. nr #LIST_INDENT\\n[#DEPTH] \
+\w'\\*[$PREFIX\\n[#DEPTH]]xiii\\*[$SEPARATOR\\n[#DEPTH]]\0'
+. \}
+. if '\\*[$ROMAN_WIDTH]'17' \{\
+. ds $ROMAN_WIDTH\\n[#DEPTH] 17
+. nr #LIST_INDENT\\n[#DEPTH] \
+\w'\\*[$PREFIX\\n[#DEPTH]]xvii\\*[$SEPARATOR\\n[#DEPTH]]\0'
+. \}
+. if '\\*[$ROMAN_WIDTH]'18' \{\
+. ds $ROMAN_WIDTH\\n[#DEPTH] 18
+. nr #LIST_INDENT\\n[#DEPTH] \
+\w'\\*[$PREFIX\\n[#DEPTH]]xviii\\*[$SEPARATOR\\n[#DEPTH]]\0'
+. \}
+. if '\\*[$ROMAN_WIDTH]'19' \{\
+. ds $ROMAN_WIDTH\\n[#DEPTH] 19
+. nr #LIST_INDENT\\n[#DEPTH] \
+\w'\\*[$PREFIX\\n[#DEPTH]]xviii\\*[$SEPARATOR\\n[#DEPTH]]\0'
+. \}
+. if '\\*[$ROMAN_WIDTH]'20' \{\
+. ds $ROMAN_WIDTH\\n[#DEPTH] 20
+. nr #LIST_INDENT\\n[#DEPTH] \
+\w'\\*[$PREFIX\\n[#DEPTH]]xviii\\*[$SEPARATOR\\n[#DEPTH]]\0'
+. \}
+. \}
+. if '\\*[$LIST_ARG_1]'ROMAN' \{\
+. if '\\*[$ROMAN_WIDTH]'1' \{\
+. ds $ROMAN_WIDTH\\n[#DEPTH] 1
+. nr #LIST_INDENT\\n[#DEPTH] \
+\w'\\*[$PREFIX\\n[#DEPTH]]I\\*[$SEPARATOR\\n[#DEPTH]]\0'
+. \}
+. if '\\*[$ROMAN_WIDTH]'2' \{\
+. ds $ROMAN_WIDTH\\n[#DEPTH] 2
+. nr #LIST_INDENT\\n[#DEPTH] \
+\w'\\*[$PREFIX\\n[#DEPTH]]II\\*[$SEPARATOR\\n[#DEPTH]]\0'
+. \}
+. if '\\*[$ROMAN_WIDTH]'3' \{\
+. ds $ROMAN_WIDTH\\n[#DEPTH] 3
+. nr #LIST_INDENT\\n[#DEPTH] \
+\w'\\*[$PREFIX\\n[#DEPTH]]III\\*[$SEPARATOR\\n[#DEPTH]]\0'
+. \}
+. if '\\*[$ROMAN_WIDTH]'4' \{\
+. ds $ROMAN_WIDTH\\n[#DEPTH] 4
+. nr #LIST_INDENT\\n[#DEPTH] \
+\w'\\*[$PREFIX\\n[#DEPTH]]IV\\*[$SEPARATOR\\n[#DEPTH]]\0'
+. \}
+. if '\\*[$ROMAN_WIDTH]'5' \{\
+. ds $ROMAN_WIDTH\\n[#DEPTH] 5
+. nr #LIST_INDENT\\n[#DEPTH] \
+\w'\\*[$PREFIX\\n[#DEPTH]]IV\\*[$SEPARATOR\\n[#DEPTH]]\0'
+. \}
+. if '\\*[$ROMAN_WIDTH]'6' \{\
+. ds $ROMAN_WIDTH\\n[#DEPTH] 6
+. nr #LIST_INDENT\\n[#DEPTH] \
+\w'\\*[$PREFIX\\n[#DEPTH]]IV\\*[$SEPARATOR\\n[#DEPTH]]\0'
+. \}
+. if '\\*[$ROMAN_WIDTH]'7' \{\
+. ds $ROMAN_WIDTH\\n[#DEPTH] 7
+. nr #LIST_INDENT\\n[#DEPTH] \
+\w'\\*[$PREFIX\\n[#DEPTH]]VII\\*[$SEPARATOR\\n[#DEPTH]]\0'
+. \}
+. if '\\*[$ROMAN_WIDTH]'8' \{\
+. ds $ROMAN_WIDTH\\n[#DEPTH] 8
+. nr #LIST_INDENT\\n[#DEPTH] \
+\w'\\*[$PREFIX\\n[#DEPTH]]VIII\\*[$SEPARATOR\\n[#DEPTH]]\0'
+. \}
+. if '\\*[$ROMAN_WIDTH]'9' \{\
+. ds $ROMAN_WIDTH\\n[#DEPTH] 9
+. nr #LIST_INDENT\\n[#DEPTH] \
+\w'\\*[$PREFIX\\n[#DEPTH]]VIII\\*[$SEPARATOR\\n[#DEPTH]]\0'
+. \}
+. if '\\*[$ROMAN_WIDTH]'10' \{\
+. ds $ROMAN_WIDTH\\n[#DEPTH] 10
+. nr #LIST_INDENT\\n[#DEPTH] \
+\w'\\*[$PREFIX\\n[#DEPTH]]VIII\\*[$SEPARATOR\\n[#DEPTH]]\0'
+. \}
+. if '\\*[$ROMAN_WIDTH]'11' \{\
+. ds $ROMAN_WIDTH\\n[#DEPTH] 11
+. nr #LIST_INDENT\\n[#DEPTH] \
+\w'\\*[$PREFIX\\n[#DEPTH]]VIII\\*[$SEPARATOR\\n[#DEPTH]]\0'
+. \}
+. if '\\*[$ROMAN_WIDTH]'12' \{\
+. ds $ROMAN_WIDTH\\n[#DEPTH] 12
+. nr #LIST_INDENT\\n[#DEPTH] \
+\w'\\*[$PREFIX\\n[#DEPTH]]VIII\\*[$SEPARATOR\\n[#DEPTH]]\0'
+. \}
+. if '\\*[$ROMAN_WIDTH]'13' \{\
+. ds $ROMAN_WIDTH\\n[#DEPTH] 13
+. nr #LIST_INDENT\\n[#DEPTH] \
+\w'\\*[$PREFIX\\n[#DEPTH]]XIII\\*[$SEPARATOR\\n[#DEPTH]]\0'
+. \}
+. if '\\*[$ROMAN_WIDTH]'14' \{\
+. ds $ROMAN_WIDTH\\n[#DEPTH] 14
+. nr #LIST_INDENT\\n[#DEPTH] \
+\w'\\*[$PREFIX\\n[#DEPTH]]XIV\\*[$SEPARATOR\\n[#DEPTH]]\0'
+. \}
+. if '\\*[$ROMAN_WIDTH]'15' \{\
+. ds $ROMAN_WIDTH\\n[#DEPTH] 15
+. nr #LIST_INDENT\\n[#DEPTH] \
+\w'\\*[$PREFIX\\n[#DEPTH]]XIV\\*[$SEPARATOR\\n[#DEPTH]]\0'
+. \}
+. if '\\*[$ROMAN_WIDTH]'16' \{\
+. ds $ROMAN_WIDTH\\n[#DEPTH] 16
+. nr #LIST_INDENT\\n[#DEPTH] \
+\w'\\*[$PREFIX\\n[#DEPTH]]XIV\\*[$SEPARATOR\\n[#DEPTH]]\0'
+. \}
+. if '\\*[$ROMAN_WIDTH]'17' \{\
+. ds $ROMAN_WIDTH\\n[#DEPTH] 17
+. nr #LIST_INDENT\\n[#DEPTH] \
+\w'\\*[$PREFIX\\n[#DEPTH]]XVII\\*[$SEPARATOR\\n[#DEPTH]]\0'
+. \}
+. if '\\*[$ROMAN_WIDTH]'18' \{\
+. ds $ROMAN_WIDTH\\n[#DEPTH] 18
+. nr #LIST_INDENT\\n[#DEPTH] \
+\w'\\*[$PREFIX\\n[#DEPTH]]XVIII\\*[$SEPARATOR\\n[#DEPTH]]\0'
+. \}
+. if '\\*[$ROMAN_WIDTH]'19' \{\
+. ds $ROMAN_WIDTH\\n[#DEPTH] 19
+. nr #LIST_INDENT\\n[#DEPTH] \
+\w'\\*[$PREFIX\\n[#DEPTH]]XVIII\\*[$SEPARATOR\\n[#DEPTH]]\0'
+. \}
+. if '\\*[$ROMAN_WIDTH]'20' \{\
+. ds $ROMAN_WIDTH\\n[#DEPTH] 20
+. nr #LIST_INDENT\\n[#DEPTH] \
+\w'\\*[$PREFIX\\n[#DEPTH]]XVIII\\*[$SEPARATOR\\n[#DEPTH]]\0'
+. \}
+. \}
+.END
+\#
+\# SHIFT LIST
+\# ----------
+\# *Arguments:
+\# <amount by which to indent a list to the right>
+\# *Function:
+\# Adds the value of the arg to the current list's indent.
+\# *Notes:
+\# Requires a unit of measure.
+\#
+.MAC SHIFT_LIST END
+. nr #SHIFT_LIST\\n[#DEPTH] (\\$1)
+. nr #L_INDENT +\\n[#SHIFT_LIST\\n[#DEPTH]]
+.END
+\#
+\# PAD LIST DIGITS
+\# ---------------
+\# *Arguments:
+\# [ LEFT ]
+\# *Function:
+\# Adds a figure space to a list's hanging and left indent. If
+\# LEFT is given, sets reg. #PAD_LIST_DIGITS to 1 for use in ITEM.
+\#
+.MAC PAD_LIST_DIGITS END
+. if '\\g[#ENUMERATOR\\n[#DEPTH]]'0' \{\
+. nr #LIST_INDENT\\n[#DEPTH] +\\w'\\0'
+. nr #L_INDENT \\n[#LIST_INDENT\\n[#DEPTH]]+\\n[#LIST_INDENT\\n-[#DEPTH]]
+. nr #HL_INDENT\\n+[#DEPTH] +\\w'\\n[#ENUMERATOR\\n[#DEPTH]]'
+. if '\\$1'LEFT' .nr #PAD_LIST_DIGITS\\n[#DEPTH] 1
+. \}
+. if '\\g[#ENUMERATOR\\n[#DEPTH]]'i' \
+. if '\\$1'LEFT' .nr #PAD_LIST_DIGITS\\n[#DEPTH] 1
+. if '\\g[#ENUMERATOR\\n[#DEPTH]]'I' \
+. if '\\$1'LEFT' .nr #PAD_LIST_DIGITS\\n[#DEPTH] 1
+.END
+\#
+\# RESET LIST
+\# ----------
+\# *Arguments:
+\# none
+\# *Function:
+\# Resets register enumerators to 1, a, i...
+\#
+.MAC RESET_LIST END
+. ie '\\$1'' .nr #ENUMERATOR\\n[#DEPTH] 0 1
+. el .nr #ENUMERATOR\\n[#DEPTH] \\$1-1 1
+.END
+\#
+\# QUIT LISTS
+\# ----------
+\# *Arguments:
+\# none
+\# *Function:
+\# Exits lists cleanly and restores any indents that were in
+\# effect prior to LIST.
+\#
+.MAC QUIT_LISTS END
+. br
+. if '\\n[.z]'LIST*DIV' \{\
+\!. rr #IN_LIST
+. di
+. \}
+. IQ CLEAR
+. nr #HL_INDENT \\n[#STORED_HL_INDENT]
+. nr #T_INDENT \\n[#STORED_T_INDENT]
+. nr #L_INDENT \\n[#STORED_L_INDENT]
+. nr #R_INDENT \\n[#STORED_R_INDENT]
+. nr #BL_INDENT \\n[#STORED_BL_INDENT]
+. nr #BR_INDENT \\n[#STORED_BR_INDENT]
+. rr #STORED_HL_INDENT
+. if \\n[#LIST_CENTER] \
+. nr #LIST_OFFSET_VALUE \\n[.l]-\\n[dl]/2
+. if \\n[#LIST_RIGHT] \{\
+. nr #LIST_OFFSET_VALUE \\n[.l]-\\n[dl]
+. if r pdfbx-running \
+. nr #LIST_OFFSET_VALUE \
+\\n[.l]-\\n[dl]-\\*[gap\\n[stack]]-(\\*[wt\\n[stack]]/2)
+. \}
+. po +\\n[#LIST_OFFSET_VALUE]u
+. if \\n[.u] .nr #FILLED 1
+. nf
+. if dLIST*DIV \{\
+. LIST*DIV
+. rm LIST*DIV
+. \}
+. if \\n[#FILLED] .fi
+. if !\\n[#PRE_LIST_QUAD]=\\n[.j] .ad \\n[#PRE_LIST_QUAD]
+. rr #FILLED
+. po
+. rr #PRE_LIST_QUAD
+. if \\n[#RESTORE_PREV_INDENT]=1 \
+. IL
+. if \\n[#RESTORE_PREV_INDENT]=2 \{\
+. ll \\n[#ORIG_L_LENGTH]u
+. IB
+. \}
+. if \\n[#RESTORE_PREV_INDENT]=3 \{\
+. ll \\n[#ORIG_L_LENGTH]u
+. IR
+. \}
+. if \\n[#RESTORE_PREV_INDENT]=4 \{\
+. nr #R_INDENT \\n[#STORED_R_INDENT]
+. nr #L_INDENT \\n[#STORED_L_INDENT]
+. ll \\n[#ORIG_L_LENGTH]u
+. IR
+. IL
+. \}
+.\" Clean up after exiting last depth of list
+. nr #REMOVE 0 1
+. while \\n+[#REMOVE]<=\\n[#TOTAL_LISTS] \{\
+. rr #LIST_INDENT\\n[#REMOVE]
+. rr #ENUMERATOR\\n[#REMOVE]
+. rm $ENUMERATOR\\n[#REMOVE]
+. rm $SEPARATOR\\n[#REMOVE]
+. rm $ENUMERATOR_TYPE\\n[#REMOVE]
+. rr #PAD_LIST_DIGITS\\n[#REMOVE]
+. rr #SHIFT_LIST\\n[#REMOVE]
+. \}
+. rr #STORED_L_INDENT
+. rr #STORED_BL_INDENT
+. rr #STORED_BR_INDENT
+. rr #STORED_R_INDENT
+. rr #STORED_R_INDENT
+. rr #REMOVE
+. rr #TOTAL_LISTS
+. rr #QUIT
+. rr #DEPTH
+. rr #NEXT_DEPTH_BACK
+. rr #RESTORE_PREV_INDENT
+. rr #ORIG_L_LENGTH
+. rr #CURRENT_L_LENGTH
+. rr #IN_ITEM
+. rr #IN_ITEM_L_INDENT
+.END
+\#
+\# SET LIST INDENT
+\# ---------------
+\# *Arguments:
+\# none
+\# *Function:
+\# Restores indent of prev. list in nested lists. Also sets the
+\# #QUIT register if an invocation of LIST OFF applies to the first
+\# level of list.
+\#
+.MAC SET_LIST_INDENT END
+. nr #NEXT_DEPTH_BACK \\n[#DEPTH]-1
+. if \\n[#NEXT_DEPTH_BACK]=0 \{\
+. nr #QUIT 1
+. if \\n[#INDENT_ACTIVE]=1 \{\
+. if \\n[#INDENT_STYLE_BOTH]=1 \{\
+. ie \\n[#DOCS] \
+. ll \\n[#DOC_L_LENGTH]u-\\n[#STORED_BR_INDENT]u
+. el \
+. ll \\n[#L_LENGTH]u-\\n[#STORED_BR_INDENT]u
+. in \\n[#BL_INDENT]u
+. \}
+. if \\n[#INDENT_STYLE_LEFT] \{\
+. in \\n[#STORED_L_INDENT]u
+. \}
+. if \\n[#INDENT_STYLE_RIGHT] \{\
+. ie \\n[#DOCS] \
+. ll \\n[#DOC_L_LENGTH]u-\\n[#STORED_R_INDENT]u
+. el \
+. ll \\n[#L_LENGTH]u-\\n[#STORED_R_INDENT]u
+. \}
+. \}
+. return
+. \}
+. nr #L_INDENT -\\n[#LIST_INDENT\\n[#DEPTH]]+\\n[#SHIFT_LIST\\n[#DEPTH]]
+. nr #HL_INDENT \\n[#HL_INDENT\\n-[#DEPTH]]
+.END
+\#
+\# ====================================================================
+\#
+\# +++DOCUMENT PROCESSING MISC AND SUPPORT MACROS+++
+\#
+\# COLLATE
+\# -------
+\# *Arguments:
+\# <none>
+\# *Function:
+\# Turns headers off (if on) and saves header state, sets register
+\# #COLLATE to 1 (toggle), and breaks to a new page.
+\# *Notes:
+\# COLLATE exists primarily to allow putting multiple chapters in
+\# a single file, although it can be used for any document type. After
+\# COLLATE, any of the macros that normally precede START may be
+\# used, and should behave as expected.
+\#
+\# N.B.--the START macro must be used after every COLLATE
+\#
+.MAC COLLATE END
+. if dPDF.EXPORT .tm .ds pre-collate-\\n% \\n%@\\n[#COL_NUM]
+. if \\n[defer] \{\
+. nr #BLANKPAGE_AFTER_DEFER 1
+. bp
+. \}
+. nr #HEADER_STATE \\n[#HEADERS_ON]
+. if (\\n[defer]=0)&(\\n[float*defer]=0) .HEADERS OFF
+. if \\n[#LINENUMBERS] \{\
+. NUMBER_LINES off
+. nr #LINENUMBERS 2
+. \}
+. if \\n[#BLANKPAGE] \{\
+. if \\n[nl]=\\n[#PAGE_TOP] \{\
+. nr #NO_NEWPAGE 1
+. RESTORE_SPACE
+. \}
+. rr #BLANKPAGE
+. \}
+. if \\n[defer] \
+. DO_FOOTER
+. EOL
+. ds $SAVED_DOC_FAM \\*[$DOC_FAM]
+. ds $SAVED_PP_FT \\*[$PP_FT]
+. nr #COLLATE 1
+. nr #PRE_COLLATE 1
+. nr #POST_TOP 1
+. nr #HEAD_1_NUM 0 1
+. if !\\n[#LISTS] \{\
+. if \\n[eqn*label-with-chapter]=1 .nr eqn*label-num 0 1
+. if \\n[float*label-with-chapter]=1 .nr fig*label-num 0 1
+. if \\n[pdf-img*label-with-chapter]=1 .nr fig*label-num 0 1
+. if \\n[pic*label-with-chapter]=1 .nr fig*label-num 0 1
+. if \\n[tbl*label-with-chapter]=1 .nr tbl*label-num 0 1
+. \}
+. if \\n[#DOC_HEADER]=2 .nr #DOC_HEADER 1
+. if \\n[#PAGE_NUM_V_POS]=1 \{\
+. nr #PAGINATION_STATE \\n[#PAGINATE]
+. PAGINATION OFF
+. \}
+. IQ CLEAR
+. TQ
+. LL \\n[#DOC_L_LENGTH]u
+. PT_SIZE \\n[#DOC_PT_SIZE]u
+. QUAD \\*[$DOC_QUAD]
+. nr #SAVED_DOC_LEAD \\n[#DOC_LEAD]
+. nr #COLLATED_DOC 1
+. vs \\n[#DOC_LEAD]u
+\*[SLANTX]
+\*[CONDX]
+\*[EXTX]
+. if \\n[#TOC] \{\
+. if \\n[TOC_BH]=1 .pdfswitchtopage before MOM:TOC
+. if \\n[TOC_BH]=2 .pdfswitchtopage after MOM:TOC
+. \}
+. if !\\n[#NO_NEWPAGE] .NEWPAGE
+. if !\\n[#TOC] \{\
+. if \\n[#FORCE_RECTO] \{\
+. ds $PN_FORMAT_CURR \\g[#PAGENUMBER]
+. af #PAGENUMBER 1
+. if \\n[#PAGENUMBER]%2=1 .nr #ODD_PAGENUM 1
+. af #PAGENUMBER \\*[$PN_FORMAT_CURR]
+. if \\n[#ODD_PAGENUM] .BLANKPAGE 1 DIVIDER
+. rr #ODD_PAGENUM
+. rr #BLANKPAGE_AFTER_DEFER
+. \}
+. \}
+. rr #NO_NEWPAGE
+. ch RR_@TOP
+. rr @TOP
+. if \\n[.ns] \{\
+. rs
+. nop \&
+. \}
+. if '\\n[.ev]'PAGE_TRANSITION\\n[pg-trans]' .ev
+. if \\n[#DEFER_PAGINATION] .PAGINATE
+. if !'\\*[$RESTORE_PAGENUM_STYLE]'' \{\
+. PAGENUM_STYLE \\*[$RESTORE_PAGENUM_STYLE]
+. rm $RESTORE_PAGENUM_STYLE
+. \}
+. if \\n[#CH_NUM] \
+. if \\n[#TOC]=0 .nr #CH_NUM +1
+. rm $EN_TITLE
+. COVERTITLE
+. DOC_COVERTITLE
+. TITLE
+. CHAPTER
+. CHAPTER_TITLE
+. SUBTITLE
+. MISC
+. rr #COVER_TITLE
+. rr #DOC_COVER_TITLE
+. rr #FROM_COVERTITLE
+. rr #FROM_DOC_COVERTITLE
+. rr #MISC
+. rr #COVER_MISC
+. rr #DOC_COVER_MISC
+. rr #COPYRIGHT
+. rr #COVER_COPYRIGHT
+. rr #DOC_COVER_COPYRIGHT
+. rr #COVER_AUTHOR
+. rr #DOC_COVER_AUTHOR
+. rm COVER_TEXT
+. rm DOC_COVER_TEXT
+. rm $COPYRIGHT
+. rm $COVER_COPYRIGHT
+. rm $DOC_COVER_COPYRIGHT
+. rr #END_QUOTE
+. rr #PAGENUM_STYLE_SET
+. rr #DOC_COVER
+. rr #COVER
+. rr #LAST_LEVEL
+. rr #LEVEL
+. if \\n[#RESTORE_PN_V_POS] \{\
+. nr #PAGE_NUM_V_POS \\n[#RESTORE_PN_V_POS]
+. rr #RESTORE_PN_V_POS
+. \}
+. nr #LOOP 0 1
+. while \\n+[#LOOP]<=\\n[@LEVEL] \
+. rr #TOC_HEAD_\\n[#LOOP]_INDENT_SET
+. if \\n[#FLEX_ACTIVE] .rr #NO_FLEX
+.END
+\#
+\# NUMBER_LINES
+\# ------------
+\# *Arguments:
+\# <starting line number> [ <increment> [ <gutter> ] ]
+\# or
+\# <anything> | RESUME
+\# *Function:
+\# Begin, suspend/turn off, or resume numbering of output lines.
+\#
+.MAC NUMBER_LINES END
+. if '\\n[.z]'EPI_TEXT' .return
+. if '\\$1'' \{\
+. tm1 "[mom]: NUMBER_LINES at line \\n[.c] has no argument.
+. tm1 " You have forgotten to give a starting line number or 'RESUME'.
+. ab [mom]: Aborting '\\n[.F]' at \\$0, line \\n[.c].
+. \}
+. if !\\n[#LINENUMBERS]=2 .nr #LINENUMBERS 1
+.\" Test whether the first arg is a digit.
+. if \B'\\$1' \{\
+. if \\n[#QUOTE] \{\
+. if \\n[#QUOTE]=1 .ds macro QUOTE
+. if \\n[#QUOTE]=2 .ds macro BLOCKQUOTE
+. tm1 "[mom]: \\$0 at line \\n[.c] may not be used inside \\*[macro].
+. tm1 " Please set NUMBER_LINES before \\*[macro], followed by
+. tm1 " NUMBER_\\*[macro]_LINES.
+. ab [mom]: Aborting '\\n[.F]' at \\$0, line \\n[.c].
+. \}
+. nr #LN \\$1
+. ds $LN_NUM \\$1
+. if !'\\n[.z]'' .nr #RESTORE_LN_NUM 1
+. ie '\\$2'' \
+. if '\\*[$LN_INC]'' .ds $LN_INC 1
+. el .ds $LN_INC \\$2
+. ie '\\$3'' \
+. if !\\n[#LN_GUTTER] .nr #LN_GUTTER 2
+. el .nr #LN_GUTTER \\$3
+. \}
+. ie !\\n[#LN] \{\
+.\" In other words, the first arg was not a digit.
+. rr #LN
+. ie '\\$1'RESUME' \{\
+. LN_PARAMS
+. nm \\*[$LN_NUM]
+. RESTORE_PARAMS
+. \}
+. el \{\
+. nm
+.\" Register ln is still set and may confuse preprocessors like tbl.
+.\" Still, resuming line numbering must be possible, so save ln in
+.\" $LN_NUM
+. ds $LN_NUM \\n[ln]
+. if !\\n[#QUOTE] .nr ln 0
+. if !\\n[#LINENUMBERS]=2 .rr #LINENUMBERS
+. \}
+. \}
+. el \{\
+. LN_PARAMS
+. nm \\*[$LN_NUM] \\*[$LN_INC] \\n[#LN_GUTTER] -3-\\n[#LN_GUTTER]
+. RESTORE_PARAMS
+. if !'\\n[.z]'' .nr #DIVER_LN_OFF 1
+. \}
+. rr #LN
+.END
+\#
+\# LINENUMBER STYLE PARAMETERS
+\# ---------------------------
+\# *Arguments:
+\# none
+\# *Function:
+\# LN_PARAMS sets parameters for line numbers.
+\# RESTORE_PARAMS restores them after internal calls to .nm
+\# *Notes:
+\# It's not documented, but groff's linenumbering is processed
+\# in a unique environment reserved for the numbers, such that
+\# whatever style params were in effect prior to the invocation
+\# of .nm remain in effect for the numbers even if the running
+\# text has different params. Eg, If you set .gcolor to 'purple'
+\# before .nm then set it back to what it was, the numbers will be
+\# purple while the text remains at the default color.
+\#
+.MAC LN_PARAMS END
+. ie d$LN_FAM .fam \\*[$LN_FAM]
+. el .fam \\n[.fam]
+. ie d$LN_FT .ft \\*[$LN_FT]
+. el .ft \\n[.sty]
+. ie d$LN_SIZE_CHANGE .ps \\*[$LN_SIZE_CHANGE]
+. el .ps \\n[.s]
+. ie d$LN_COLOR .COLOR \\*[$LN_COLOR]
+. el .gcolor \\n[.m]
+.END
+\#
+.MAC RESTORE_PARAMS END
+. fam
+. ft
+. ps
+. gcolor
+.END
+\#
+\# Whether, at COLLATE, to reset line number to 1.
+\#
+\# NUMBER LINES PER SECTION
+\# ------------------------
+\# *Argument:
+\# none
+\# *Function:
+\# Sets register that determines whether, at COLLATE, to reset
+\# line number to 1.
+\# *Notes:
+\# The default is to continue the line numbering from where it
+\# left off.
+\#
+.MAC NUMBER_LINES_PER_SECTION END
+. nr #PER_SECTION 1
+.END
+\#
+\# NUMBER QUOTE AND BLOCKQUOTE LINES AS PART OF RUNNING TEXT
+\# ---------------------------------------------------------
+\# *Argument:
+\# <gutter> | <anything>
+\# *Function:
+\# Sets #(B)QUOTE_LN to 1 if no argument, or a single numeric
+\# argument, is given; otherwise, turns (BLOCK)QUOTE linenumbering
+\# off.
+\# *Notes:
+\# #(B)QUOTE is checked for in QUOTE and BLOCKQUOTE.
+\# The single numeric argument allows establishing a different gutter from
+\# the one used for line numbers in running text.
+\#
+.MAC NUMBER_QUOTE_LINES END
+. ie \\n[#NUM_ARGS]=0 .nr #QUOTE_LN 1
+. el \{\
+. ie \B'\\$1' \{\
+. nr #QUOTE_LN 1
+. nr #Q_LN_GUTTER \\$1
+. \}
+. el \{\
+. ie '\\$1'SILENT' .nr #SILENT_QUOTE_LN 1
+. el \{\
+. rr #QUOTE_LN
+. rr #SILENT_QUOTE_LN
+. \}
+. \}
+. \}
+.END
+\#
+.MAC NUMBER_BLOCKQUOTE_LINES END
+. ie \\n[#NUM_ARGS]=0 .nr #BQUOTE_LN 1
+. el \{\
+. ie \B'\\$1' \{\
+. nr #BQUOTE_LN 1
+. nr #BQ_LN_GUTTER \\$1
+. \}
+. el \{\
+. ie '\\$1'SILENT' .nr #SILENT_BQUOTE_LN 1
+. el \{\
+. rr #BQUOTE_LN
+. rr #SILENT_BQUOTE_LN
+. \}
+. \}
+. \}
+.END
+\#
+\# OUTPUT BLANK PAGES
+\# ------------------
+\# *Argument:
+\# <number of blank pages to output> [ DIVIDER [ NULL ] ]
+\# *Function:
+\# Outputs blank pages.
+\# *Notes:
+\# If recto/verso, each page is recto/verso, even if there's
+\# nothing on it.
+\#
+\# The 1st argument to BLANKPAGE is non-optional. DIVIDER is for
+\# blank pages before endnotes, bibliographies, tocs, new chapters.
+\#
+.MAC BLANKPAGE END
+. nr #BLANKPAGE 1
+. nr #HOW_MANY \\$1
+. shift
+. nr #PAGES 0 1
+. if \\n[#LINENUMBERS] \{\
+. nr #LINENUMBERS_WERE_ON 1
+. NUMBER_LINES OFF
+. \}
+. while \\n+[#PAGES]<=\\n[#HOW_MANY] \{\
+. if \\n[#HEADERS_ON]=1 \{\
+. nr #HEADERS_WERE_ON 1
+. HEADERS OFF
+. \}
+. if \\n[#PAGE_NUM_V_POS]=1 \{\
+. if \\n[#PAGINATE]=1 .nr #PAGINATE_WAS_ON 1
+. nr #RESTORE_PN_V_POS \\n[#PAGE_NUM_V_POS]
+. PAGINATION OFF
+. \}
+. if \\n[#COLUMNS]=1 .nr #COLUMNS +1
+. NEWPAGE \" Break to blank page
+. nop \&
+. br
+. if \\n[#FOOTERS_ON]=1 \{\
+. nr #FOOTERS_WERE_ON 1
+. FOOTERS OFF
+. \}
+. if \\n[#PAGE_NUM_V_POS]=2 \{\
+. if \\n[#PAGINATE]=1 .nr #PAGINATE_WAS_ON 1
+. nr #RESTORE_PN_V_POS \\n[#PAGE_NUM_V_POS]
+. PAGINATION OFF
+. \}
+. if !'\\$1'DIVIDER' .if \\n[#HEADERS_WERE_ON] .HEADERS
+. \}
+. if \\n[#COLUMNS]=2 .nr #COLUMNS -1
+. NEWPAGE \" Break to text page
+. ie '\\$1'DIVIDER' \{\
+. if \\n[#BLANKPAGE_AFTER_DEFER] .bp
+. if \\n[#FOOTERS_WERE_ON] .FOOTERS
+. if \\n[#RESTORE_PN_V_POS] \{\
+. if \\n[#PAGINATE_WAS_ON] .PAGINATE
+. nr #PAGE_NUM_V_POS \\n[#RESTORE_PN_V_POS]
+. \}
+. if \\n[#HEADERS_WERE_ON] .HEADERS
+. shift
+. if '\\$1'NULL' .nr #PAGE_NUM_ADJ -\\n[#HOW_MANY]
+. \}
+. el \{\
+. if '\\$1'' \{\
+. if \\n[#FOOTERS_WERE_ON] .FOOTERS
+. if \\n[#RESTORE_PN_V_POS] \{\
+. if \\n[#PAGINATE_WAS_ON] .PAGINATE
+. nr #PAGE_NUM_V_POS \\n[#RESTORE_PN_V_POS]
+. \}
+. \}
+. if '\\$1'NULL' \{\
+. if \\n[#FOOTERS_WERE_ON] .FOOTERS
+. if \\n[#RESTORE_PN_V_POS]=2 \
+. nr #PAGE_NUM_V_POS \\n[#RESTORE_PN_V_POS]
+. if \\n[#PAGE_NUM_V_POS]=2 \
+. if \\n[#PAGINATE_WAS_ON] .PAGINATE
+. nr #PAGE_NUM_ADJ -\\n[#HOW_MANY]
+. \}
+. \}
+. if \\n[#PAGINATE]=1 \
+. if \\n[#RESTORE_PN_V_POS]=1 \{\
+. RESTORE_SPACE
+. sp |\\n[#HEADER_MARGIN]u
+. PRINT_PAGE_NUMBER
+. \}
+. if \\n[#LINENUMBERS_WERE_ON] .NUMBER_LINES RESUME
+. rr #HOW_MANY
+. rr #HEADERS_WERE_ON
+. rr #FOOTERS_WERE_ON
+. rr #PAGINATE_WAS_ON
+. rr #RESTORE_PN_V_POS
+.END
+\#
+\# FLOATS
+\# ------
+\#
+.am PSPIC \" Need to do this for PSPIC inside a float
+. vpt 0
+\h'(\\n[ps-offset]u + \\n[ps-deswid]u)'
+. sp -1
+. vpt
+..
+\#
+.MAC PROCESS_FLOATS END
+. if \\n[#TAB_ACTIVE] \{\
+. nr #RESTORE_TAB 1
+. TQ
+. \}
+. if !\\n[tbl*no-top-hook] .tbl@top-hook
+. rr tbl*no-top-hook
+. sp |\\n[#T_MARGIN]u-\\n[#DOC_LEAD]u
+. if r pdfbx-defer \{\
+. nr lead-diff \\n[#LEAD_AT_FOOTER]-\\n[.v]
+. sp |\\n[t]u-\\n[.v]u+\\n[lead-diff]u
+. rr pdfbx-defer
+. \}
+. nr defer-count \\n[defer]
+. nr #TMP_PAGE_OFFSET \\n[.o]
+. po \\n[#L_MARGIN]u
+. ev protect
+. evc FLOAT
+. nf
+. RESTORE_SPACE
+. if '\\*[float*type:\\n[defer]]'boxed-tbl:\\n[defer]' \{\
+. ch RR_@TOP
+.\" Get depth of the first deferred float when there's more than one.
+. if (\\n[.t] >= 1)&(\\n[float-depth:\\n[defer]] > (\\n[.t]+\\n[#DOC_LEAD])) \
+. tbl*float-warning
+. if \\n[#MLA] .sp \\n[tbl*label-lead-diff]u
+. if (\\n[tbl*have-caption:\\n[defer]]=1)&(\\n[tbl*caption-after-label]=0) \
+. sp \\n[tbl*caption-lead-diff]u
+. if \\n[tbl*caption-after-label] \
+. sp |\\n[#T_MARGIN]u-\\n[#DOC_LEAD]u
+. \}
+. if \\n[float*pic:1] \{\
+. if (\\n[pic*have-caption]=1)&(\\n[pic*caption-after-label]=0) \{\
+. ie \\n[#COLUMNS] \
+. sp |\\n[dc]u+\\n[pic*caption-lead-diff]u
+. el .sp |\\n[#T_MARGIN]u-\\n[#DOC_LEAD]u+\\n[pic*caption-lead-diff]u
+. \}
+. rr pic*caption-lead-diff
+. rr pic*top-lead-diff
+. rr float*pic
+. \}
+. if \\n[float*img:1] \{\
+. ie \\n[#COLUMNS] \
+. sp |\\n[dc]u
+. el \
+. sp |\\n[#T_MARGIN]u-\\n[#DOC_LEAD]u
+. if \\n[pdf-img:frame] \{\
+. sp -(\\*[pdf-img:frame-weight]p*2u)
+. rr pdf-img:frame
+. \}
+. \}
+. if \\n[defers] .rr defers
+. nr loop-count 0 1
+. nr new-defer 0 1
+. while \\n+[loop-count]<=\\n[defer-count] \{\
+. nr tbl*no-top-hook 1
+. rnn defer float*defer \" So '.if \n[defer]' is skipped during float output
+. vpt
+. ch RR_@TOP
+. rr @TOP
+. if \\n[pdf-img*have-caption] \
+. if !\\n[pdf-img*caption-after-label] .sp -.5v
+. rr pdf-img*have-caption
+. rr pic*have-caption
+. if '\\*[float*type:\\n[loop-count]]'table:\\n[loop-count]' \{\
+. ch FOOTER \\n[#VARIABLE_FOOTER_POS]u
+. ch FN_OVERFLOW_TRAP -\\n[#FN_OVERFLOW_TRAP_POS]u
+. \}
+. ie !\\n[float-span:\\n[loop-count]] \{\
+. ie ((\\n[float-depth:\\n[loop-count]]-\\n[.v])>\\n[.t]):(\\n[D-float:\\n[loop-count]]>\\n[.t]):(\\n[defers]=1) \{\
+.\" Insufficient space, defer to next page
+. nr defers 1
+. rn FLOAT*DIV:\\n[loop-count] NEW*FLOAT*DIV:\\n+[new-defer]
+. rnn float-depth:\\n[loop-count] new-float-depth:\\n[new-defer]
+. rnn D-float:\\n[loop-count] new-D-float:\\n[new-defer]
+. \}
+. el \{\
+. output-float
+. ie !r pdfboxed \{\
+. ie (\\n[.t]-2)<(\\n[#DOC_LEAD]u/2) .SHIM_1
+. el .sp .5
+. \}
+. el .rr pdfboxed
+. \}
+. \}
+. el \{\
+. rr tbl*no-top-hook
+. if \\n[float-span:\\n[loop-count]] \
+. rn tbl*header-div:\\n[loop-count] tbl*header-div:span
+. ie !r pdfboxed \{\
+. output-float
+. sp .5
+. \}
+. el .rr pdfboxed
+. \}
+. if !\\n[loop-count]=\\n[defer-count] .rr flexed
+. rr float-span:\\n[loop-count]
+. rr float*tbl:\\n[loop-count]
+. rr tbl*have-caption:\\n[loop-count]
+. rr float*tbl*center:\\n[loop-count]
+. rr tbl*have-header:\\n[loop-count]
+. rm float*div:\\n[loop-count]
+. rr float-depth:\\n[loop-count]
+. rm tbl*header-div:\\n[loop-count]
+. rm float*type:\\n[loop-count]
+. \}
+. if !\\n[float*defer]=1 \{\
+. if !(\\n[loop-count]-1)=1 \{\
+. if !\\n[.t]=1 .sp -.5
+. \}
+. \}
+. if !\\n[@no-shim] \
+. if !\\n[q-float] \
+. if !\\n[#NO_SHIM] .SHIM
+.\" FLOAT arrays are empty now
+.\" Rename new arrays (FLOATs deferred to next page) to proper names
+. rr float*defer
+. rnn new-defer defer
+. nr loop-count 0 1
+. while \\n+[loop-count]<=\\n[defer] \{\
+. rn NEW*FLOAT*DIV:\\n[loop-count] FLOAT*DIV:\\n[loop-count]
+. rnn new-float-depth:\\n[loop-count] float-depth:\\n[loop-count]
+. rnn new-D-float:\\n[loop-count] D-float:\\n[loop-count]
+. \}
+. if !\\n[#TMP_PAGE_OFFSET]=\\n[.o] .po \\n[#TMP_PAGE_OFFSET]u
+. rr #TMP_PAGE_OFFSET
+. ch FOOTER \\n[#VARIABLE_FOOTER_POS]u
+. ch FN_OVERFLOW_TRAP -\\n[#FN_OVERFLOW_TRAP_POS]u
+. if \\n[float-depth:1]>\\n[.t] .bp
+. ie !\\n[#NO_SHIM] .SHIM
+. el \{\
+. if !\\n[#NO_FLEX] \
+. if !\\n[flexed] .FLEX
+. \}
+. if !\\n[#NO_SHIM] \
+. if \\n[#SHIM]>(\\n[#DOC_LEAD]-(\\n[#DOC_LEAD]/4)) \
+' sp -\\n[#DOC_LEAD]u
+. ie !\\n[flex:force] .ns
+. el \{\
+. rr flex:force
+. if !\\n[#NO_FLEX] .FLEX
+. \}
+. nr tbl*have-header 0
+. rr tbl*have-caption
+. rr loop-count
+. rr defer-count
+. rr float*before-shim
+. rr float*after-shim
+. rm float-adj
+. rr check-indent
+. if \\n[#NEWPAGE] \{\
+. vpt
+' bp
+. rr #NEWPAGE
+. \}
+. rr float*img
+. rr float*eqn
+. rr float*tbl
+. rr float*pic
+. if \\n[#RESTORE_TAB] \{\
+. TAB \\n[#CURRENT_TAB]
+. rr #RESTORE_TAB
+. \}
+.END
+\#
+.MAC output-float END
+. if \\n[float*img] \{\
+. if \\n[loop-count]=1 .nr no-top-space:1 1
+. \}
+. vpt 0
+. if \\n[.ns] \{\
+. rs
+. nop \&
+. sp -1
+. \}
+. if \\n[no-top-space:1] \{\
+. ie !\\n[#COLUMNS] \{\
+. sp |\\n[#T_MARGIN]u-\\n[#DOC_LEAD]u
+. ns
+. \}
+. el .sp |\\n[dc]u
+. if \\n[float*tbl:1] \{\
+. if !\\n[no-top-space:1] .RESTORE_SPACE
+. ie \\n[tbl*caption-top-lead-diff] \{\
+. sp \\n[tbl*caption-top-lead-diff]u
+. rr tbl*caption-top-lead-diff
+. \}
+. el \{\
+. if '\\*[float*type:1]'boxed-tbl:1' \{\
+. ie (\\n[tbl*have-caption]=1)&(\\n[tbl*caption-after-label]=0) .sp .3n
+. el .sp (\\n[#DOC_LEAD]u/2u)+.3n
+. \}
+. \}
+. rr float*tbl:1
+. \}
+. if \\n[float*img:1] \{\
+. RESTORE_SPACE
+. if \\n[pdf-img*caption-top-lead-diff] \{\
+. sp \\n[pdf-img*caption-top-lead-diff]u
+. rr pdf-img*caption-top-lead-diff
+. \}
+. \}
+. \}
+. if \\n[float*pic] \{\
+. nr pic*top-space-adj \\n[#DOC_LEAD]-\\n[pic@text-lead]
+. if (\\n[pic*have-caption]=0):(\\n[pic*caption-after-label]=1) \
+. sp \\n[pic*top-space-adj]u
+. if \\n[#COLUMNS] \
+. if !'\\*[pic*space-adj:\\n[loop-count]]'' \
+. sp \\*[pic*space-adj:\\n[loop-count]]
+. \}
+. nf
+. if \\n[q-float] \
+. if !\\n[has-caption] .sp \\n[#Q_LEAD_DIFF]u
+. if \\n[Q-float]=2 .sp |\\n[t]u-.5v
+. ns
+. vpt
+. if \\n[check-indent] \{\
+. if \\n[#INDENT_LEFT_ACTIVE] \{\
+. in \\n[#L_INDENT]u/2u
+. \}
+. \}
+. rr no-top-space:1
+. if \\n[loop-count]>1 \{\
+. if !'\\*[float-adj:\\n[loop-count]]'' \{\
+. rs
+. sp \\*[float-adj:\\n[loop-count]]
+. ns
+. nr restore-v-pos 1
+. \}
+. \}
+. nr check-indent 1
+. FLOAT*DIV:\\n[loop-count]
+. if \\n[no-top-space:1] \
+. RESTORE_SPACE
+. if \\n[restore-v-pos] \{\
+. sp -\\*[float-adj:\\n[loop-count]]
+. rm float-adj:\\n[loop-count]
+. rr restore-v-pos
+. \}
+. if r float*img:1 \{\
+. sp .5
+. rr float*img:1
+. \}
+. if r Q-float:1 \{\
+. if !\\n[#FULLSPACE_QUOTES] .sp -.5
+. rr Q-float:1
+. \}
+. if \\n[#COLUMNS] \
+. if !'\\*[pic*space-adj:\\n[loop-count]]'' \
+. sp -\\*[pic*space-adj:\\n[loop-count]]
+. rm pic*space-adj:\\n[loop-count]
+. if \\n[D-float:1] .rr D-float:1
+. rr D-float
+. rr @no-shim
+. rr q-float
+. rm B_QUOTE
+. rm P_QUOTE
+.END
+\#
+\# FLOAT
+\# -----
+\# *Arguments:
+\# [ ADJUST +|-<amount> ] [ FORCE] [ SPAN] [ NO_SHIM] | [ NO_FLEX ] [ TARGET ] | <anything>
+\# *Function:
+\# Captures input in a diversion, which is output immediately if
+\# there's room on the page; otherwise outputs diversion at top of
+\# next page.
+\# *Notes:
+\# ADJUST allows for raising or lowering the contents of
+\# the diversion within the space allotted. FORCE breaks to
+\# a new page immediately.
+\#
+\#
+.MAC FLOAT END
+. nr ll-pre-float \\n[.l]
+. if \\n[#NUM_ARGS]>0 \{\
+. nr loop-count 0 1
+. nr loop-counter \\n[#NUM_ARGS]
+. while \\n+[loop-count]<=\\n[loop-counter] \{\
+. if '\\$1'FORCE' \{\
+. nr #FORCE 1
+. shift
+. \}
+. if '\\$1'SPAN' \{\
+. nr float-span 1
+. shift
+. \}
+. if '\\$1'ADJUST' \{\
+. shift
+. ds float-adj \\$1
+. shift
+. \}
+. if '\\$1'CENTER' \{\
+. nr center-float 1
+. shift
+. \}
+. if '\\$1'CENTRE' \{\
+. nr center-float 1
+. shift
+. \}
+. if '\\$1'INDENT' \{\
+. shift
+. nr indent-float \\$1
+. shift
+. \}
+. if '\\$1'RIGHT' \{\
+. nr right-float 1
+. shift
+. \}
+. if '\\$1'NO_SHIM' \{\
+. nr @no-shim 1
+. shift
+. \}
+. if '\\$1'NO_FLEX' \{\
+. nr @no-flex 1
+. shift 1
+. \}
+. if '\\$1'TARGET' \{\
+. shift
+. ds float*target "\\$1
+. shift 1
+. \}
+. \}
+. \}
+. ie \\n[float*started] .rr float*started
+. el \{\
+. while !'\\$1'' .shift 1
+. nr float*started 1
+. \}
+. ie '\\$1'' \{\
+.\" Harmonize floats treated as defers and floats proper to the top
+.\" of the next page between passes when flex is enabled.
+.\"
+.\" Without this, floats near the bottom of the page may be deferred
+.\" on the first pass, but when flex-spacing moves the line just
+.\" before the float to the bottom of the page, the upcoming .br
+.\" causes the float to be proper to the next page instead of
+.\" deferred to it.
+. nr floatnum +1
+. ie !\\n[#NO_FLEX] \{\
+.\" Only on 2nd pass
+. if !dPDF.EXPORT \{\
+. ie d float\\n[floatnum]:no-defer .br
+. el \{\
+.\" .v in the following is arbitrary. Groff rounds down decimal
+.\" fractions so flex-spacing may be slightly short. Since there
+.\" are no conditions under which a .t-1 (bottom margin) < .v
+.\" on the 1st pass doesn't cause a float to be deferred, all floats
+.\" on the second pass that meet the condition are also, correctly,
+.\" deferred.
+. if (\\n[.t]-1)<\\n[.v] \
+. if !\\n[@TOP] .nr no-break 1
+. \}
+. \}
+.\" Only on 1st pass
+. ie !\\n[no-break] \{\
+. ds pre-float:page@col \\n%@\\n[#COL_NUM]
+. br
+. ds post-float:page@col \\n%@\\n[#COL_NUM]
+. if dPDF.EXPORT \{\
+. if !'\\*[pre-float:page@col]'\\*[post-float:page@col]' \
+. tm .ds float\\n[floatnum]:no-defer 1
+. \}
+. \}
+. el .rr no-break
+. \}
+. el .br
+. if \\n[nl]=\\n[#PAGE_TOP] \
+. RESTORE_SPACE
+. ds ev-pre-float \\n[.ev]
+. ev FLOAT
+. evc \\*[ev-pre-float]
+. if \\n[.u] .nr fill-pre-float 1 \" Needed for tbl
+. di FLOAT*DIV
+. if !'\\*[float*target]'' .PDF_TARGET "\\*[float*target]
+. rm float*target
+. nf
+. \}
+. el \{\
+. br
+.\" So @no-shim persists if float output with output-float
+. if r @no-shim .nr float*no-shim 1
+. if \\n[float-span] \{\
+. nr span 1
+\!. rr span
+. \}
+\!. rm tbl*header-div:span
+\!. nr tbl*no-print-header 1
+. di
+. if \\n[float-span] \{\
+. nr dn-save \\n[dn]
+. da FLOAT*DIV
+\!. rr float-span
+. da
+. nr dn \\n[dn-save]
+. rr dn-save
+. \}
+. ie \\n[float*tbl] \
+. if !\\n[tbl*have-header] .ev 0
+. el .ev 0
+. if \\n[tbl*boxed] \{\
+. ch FOOTER \\n[#VARIABLE_FOOTER_POS]u+\\n[#DOC_LEAD]u
+. ch FN_OVERFLOW_TRAP -\\n[#FN_OVERFLOW_TRAP_POS]u+\\n[#DOC_LEAD]u
+. ie !\\n[#MLA] \{\
+. ie (\\n[tbl@label]=1):(\\n[tbl@source]=1):(\\n[tbl*autolabel]=1) .nr dn -.65v
+. el .nr dn +.65v
+. rr tbl@label
+. rr tbl@source
+. \}
+. el .if !\\n[tbl@source] .nr dn -1.65v
+. \}
+.\" Defer float
+. if (\\n[dn]>\\n[.t]):(\\n[D-float]>\\n[.t]):(\\n[defer]>0) \{\
+. if !\\n[float-span] \{\
+. if (\\n[dn]+(\\n[.v]*2)>(\\n[.p]-\\n[#TOP_MARGIN]-\\n[#DOC_LEAD]-\\n[#B_MARGIN])) \{\
+. tm1 "[mom]: Floated element exceeds page depth.
+. ab [mom]: Aborting '\\n[.F]' at line \\n[.c].
+. \}
+. \}
+.\" Save depth of diversion here. The .da zeroes it.
+. nr dn-save \\n[dn]
+. if \\n[#FLEX_ACTIVE] \{\
+. if !\\n[@no-flex] \{\
+. da FLOAT*DIV
+\!. FLEX
+\!. nr flexed 1
+. da
+. \}
+. \}
+. nr dn \\n[dn-save]
+. rr dn-save
+. ch FOOTER \\n[#VARIABLE_FOOTER_POS]u
+. ch FN_OVERFLOW_TRAP -\\n[#FN_OVERFLOW_TRAP_POS]u
+. ev 0
+. ie \\n[@TOP] \{\
+. br
+. if \\n[tbl*boxed] .rs
+. rr tbl*boxed
+. \}
+. el \{\
+. if !\\n[defer] .nr defer 0 1
+. rn FLOAT*DIV FLOAT*DIV:\\n+[defer]
+. if !'\\*[float-adj]'' \
+. rn float-adj float-adj:\\n[defer]
+. if \\n[float-span] \
+. if !\\n[tbl*boxed] .rnn float-span float-span:\\n[defer]
+. if \\n[float*tbl] \{\
+. if \\n[defer]>0 \{\
+. nr no-top-space:\\n[defer] 1
+. nr float*tbl:\\n[defer] 1
+. if \\n[tbl*have-caption] \
+. nr tbl*have-caption:\\n[defer] 1
+. \}
+. ie \\n[tbl*boxed] \
+. ds float*type:\\n[defer] boxed-tbl:\\n[defer]
+. el .ds float*type:\\n[defer] table:\\n[defer]
+. if \\n[tbl*center] .nr float*tbl-center:\\n[defer] 1
+. if \\n[tbl*have-header] .rnn tbl*have-header tbl*have-header:\\n[defer]
+. rn tbl*header-div tbl*header-div:\\n[defer]
+. rr tbl*center
+. \}
+. if \\n[float*eqn] \{\
+. if \\n[defer]=1 .nr no-top-space:\\n[defer] 1
+. ds float*type:\\n[defer] eqn
+. \}
+. if \\n[float*pic] \{\
+. ds float*type:\\n[defer] pic
+. nr float*pic:\\n[defer] 1
+. rn pic*space-adj pic*space-adj:\\n[defer]
+. \}
+. if \\n[float*img] \{\
+. ds float*type:\\n[defer] img
+. nr float*img:\\n[defer] 1
+. nr no-top-space:\\n[defer] 1
+. \}
+. if \\n[D-float] .nr D-float:\\n[defer] \\n[D-float]
+. if \\n[Q-float] .nr Q-float:\\n[defer] \\n[#Q-float]
+. nr float-depth:\\n[defer] \\n[dn]
+. if \\n[#FORCE] \{\
+. ie \\n[#COLUMNS] .COL_NEXT
+. el .NEWPAGE
+. rr #FORCE
+. \}
+. if \\n[tbl*boxed] .rr tbl*boxed
+. if \\n[table] .rr table
+. br
+. return \" output div after header
+. \}
+. \}
+. nr dn-save \\n[dn]
+. if \\n[#FLEX_ACTIVE] \{\
+. if !\\n[@no-flex] \{\
+. da FLOAT*DIV
+\!. FLEX
+\!. nr flexed 1
+. da
+. \}
+. \}
+. nr dn \\n[dn-save]
+. ch FOOTER \\n[#VARIABLE_FOOTER_POS]u
+. ch FN_OVERFLOW_TRAP -\\n[#FN_OVERFLOW_TRAP_POS]u
+. vpt 0
+. if !'\\*[float-adj]'' .sp \\*[float-adj]
+. if \\n[.u] .nr fill 1
+. if \\n[@TOP] \{\
+. nr no-adjust 1
+. rr @TOP
+. \}
+. if \\n[float*tbl] \{\
+. if (\\n[#MLA]=1)&(\\n[tbl@source]=0) \
+. chop FLOAT*DIV
+. if \\n[nl]=\\n[#PAGE_TOP] \{\
+. ie (\\n[tbl*have-caption]=1)&(\\n[tbl*caption-after-label]=0) \{\
+. ie !\\n[#MLA] .sp \\n[tbl*caption-lead-diff]u
+. el .ch RR_@TOP
+. \}
+. el \{\
+. ev protect
+. evc FLOAT
+. nf
+. rs
+. ie \\n[tbl*boxed] .sp |\\n[#PAGE_TOP]u+.3n
+. el .sp |\\n[#PAGE_TOP]u-.25v
+. \}
+. \}
+. \}
+. if \\n[float*img] \
+. if \\n[pdf-img:frame] \
+. sp -(\\*[pdf-img:frame-weight]p*2u)
+. if !'\\n[.ev]'protect' \{\
+. ev protect
+. evc FLOAT
+' nf
+. \}
+. if \\n[float*tbl] \{\
+. if \\n[tbl*boxed] \
+. if \\n[tbl*center] \
+. if \\n[#L_INDENT] \
+. in -\\n[#L_INDENT]u/2u
+. \}
+. if \\n[center-float] \
+. in (\\n[.l]u-\\n[dl]u)/2u
+. if \\n[indent-float] \
+. in \\n[indent-float]u
+. if \\n[right-float] \
+. in \\n[.l]u-\\n[dl]u
+. FLOAT*DIV
+. if (\\n[center-float]>0):(\\n[indent-float]>0):(\\n[right-float]>0) \
+. in
+. ev
+. if \\n[float*tbl] \{\
+. rr tbl*no-print-header
+. ie \\n[tbl*boxed] \{\
+. ch FOOTER \\n[#VARIABLE_FOOTER_POS]u
+. ch FN_OVERFLOW_TRAP -\\n[#FN_OVERFLOW_TRAP_POS]u
+. ie \\n[nl]>(\\n[.p]+\\n[#VARIABLE_FOOTER_POS]) \{\
+. ie \\n[#COLUMNS] .COL_NEXT
+. el .NEWPAGE
+. \}
+. el \{\
+. if \\n[dn-save]=\\n[bx-tbl-depth] .sp .35v
+. rr dn-save
+. if !\\n[tbl*plain-boxed] \{\
+. if !\\n[tbl*autolabel] \{\
+. if !\\n[#MLA] \{\
+. if \\n[tbl@label]=1 .sp .5
+. \}
+. \}
+. \}
+. rr tbl*boxed
+. rr bx-tbl-depth
+. \}
+. \}
+. el \{\
+. if !'\\*[tbl*label]'' \
+. if \\n[tbl*autolabel]=0 .sp .5
+. \}
+. rr float*tbl
+. rr tbl*center
+. rm tbl*header-div
+. rr tbl*have-caption
+. rr tbl*have-label
+. rr tbl*have-source
+. rm tbl*caption
+. rm tbl*label
+. rm tbl*source
+. \}
+. if \\n[float*img] \
+. if (\\n[.t]-1)>(\\n[#DOC_LEAD]u/2u) .sp .5
+. if \\n[D-float] \{\
+. ie \\n[dn]=0 .sp \\n[D-float]u+\\n[#DOC_LEAD]u
+. el \
+. if \\n[dn]<\\n[D-float] \
+. sp \\n[D-float]u+\\n[#DOC_LEAD]u-\\n[dn]u
+.\" Flex won't grab .h of D-floats without a dummy text line.
+. vpt 0
+. nop \&
+. sp -1
+. vpt 1
+. \}
+. if \\n[fill] \{\
+. fi
+. rr fill
+. \}
+. rm FLOAT*DIV
+. if !'\\*[float-adj]'' \
+. if !\\n[no-adjust] .sp -\\*[float-adj]
+. vpt
+. if \\n[Q-float] \{\
+. sp .5
+. rr Q-float
+. \}
+. if !\\n[#NO_SHIM] \
+. if !\\n[@no-shim] .SHIM
+. rm float-adj
+. rm no-adjust
+. rr center-float
+. rr indent-float
+. rr right-float
+. rr D-float
+. rr @no-shim
+. rr @no-flex
+. rr #FORCE
+. rm P_QUOTE
+. rm B_QUOTE
+. if \\n[float*img] .rr float*img
+. if \\n[float*pic] .rr float*pic
+. if \\n[float*eqn] .rr float*eqn
+. rr float*target
+. rm float*target
+. if \\n[#NO_SHIM] \
+. if !\\n[#NO_FLEX] .nr post-float 1
+. ev \\*[ev-pre-float]
+. rr fill-pre-float
+. rm ev-pre-float
+. \}
+.END
+\#
+\# SET TRAPS FOR HEADERS/FOOTERS/FOOTNOTES
+\# ---------------------------------------
+\# *Arguments:
+\# <none>
+\# *Function:
+\# Sets header/footer/footnotes/etc... traps.
+\#
+\# TRAPS calculates the number of lines that actually fit on a
+\# page based on #B_MARGIN and resets page bottom trap to coincide
+\# with the depth of that number of lines, or, if #ADJ_DOC_LEAD=1,
+\# adjusts #DOC_LEAD so that the last line of text on a page falls
+\# exactly on #B_MARGIN.
+\#
+.MAC RR_@TOP END \" Trap-invoked after first line of text on a new page
+. rr @TOP
+. if \\n[.ns] \{\
+. vpt 0
+. rs
+. if \\n[.u] .nr fill 1
+. nf
+. nop \&
+. sp -1
+. if \\n[fill] .fi
+. if r #NEWPAGE .rr #NEWPAGE
+. \}
+. if \\n[.vpt]=0 .vpt
+.END
+\#
+.MAC TRAPS END
+. if !\\n[#UNADJUSTED_DOC_LEAD] .nr #UNADJUSTED_DOC_LEAD \\n[#DOC@LEAD]
+.\" Remove all header/footer traps
+. if !\\n[#NO_TRAP_RESET] \{\
+. ch DO_T_MARGIN
+. ch DO_B_MARGIN
+. ch HEADER
+. ch FOOTER
+. ch FN_OVERFLOW_TRAP
+.\" Plant header trap
+. wh 0 HEADER
+. \}
+.\" Adjust lead so last line of text falls on B_MARGIN
+. nr #LINES_PER_PAGE 0 1
+. nr #DOC_LEAD_ADJ 0 1
+. nr #DEPTH_TO_B_MARGIN \\n[#PAGE_LENGTH]-\\n[#ORIGINAL_B_MARGIN]-\\n[#DOC_LEAD]
+.\" Get the number of unadjusted lines that fit on the page; always a
+.\" bit short of the bottom margin
+. while \\n[#T_MARGIN]+(\\n[#DOC_LEAD]*\\n+[#LINES_PER_PAGE])<\\n[#DEPTH_TO_B_MARGIN] \{\
+.
+. \}
+. nr #LINES_PER_PAGE -1
+.\" Add machine units, 1 at a time, increasing the leading until the
+.\" new leading fills the page properly
+. while \\n[#T_MARGIN]+(\\n[#DOC_LEAD]+\\n+[#DOC_LEAD_ADJ]*\\n[#LINES_PER_PAGE])<=\\n[#DEPTH_TO_B_MARGIN] \{\
+.
+. \}
+. DOC_LEAD \\n[#DOC_LEAD]u+\\n[#DOC_LEAD_ADJ]u
+.\" The "visual" bottom margin is what \n[nl] would report on the
+.\" last line before the FOOTER trap is sprung
+. nr #VISUAL_B_MARGIN \\n[#T_MARGIN]+(\\n[#LINES_PER_PAGE]*\\n[#DOC_LEAD])
+.\" Get the difference between #B_MARGIN and #VISUAL_B_MARGIN
+. nr #FOOTER_DIFF (\\n[#PAGE_LENGTH]-\\n[#B_MARGIN])-\\n[#VISUAL_B_MARGIN]
+.\" Set #B_MARGIN to 1 machine unit lower on the page than #VISUAL_B_MARGIN
+. nr #B_MARGIN \\n[#B_MARGIN]+(\\n[#FOOTER_DIFF]-1)
+.\" Set the FN_OVERFLOW_TRAP position
+. nr #FN_OVERFLOW_TRAP_POS \\n[#B_MARGIN]-\\n[#FN_LEAD]
+. if \\n[#PRINT_STYLE]=1 .nr #FN_OVERFLOW_TRAP_POS \\n[#ORIGINAL_B_MARGIN]u
+.\" Set footer and footnote overflow traps
+. if !\\n[#NO_TRAP_RESET] \{\
+. nr #FN_COUNT 0 1
+. nr #SPACE_REMAINING 0
+. nr #FN_DEPTH 0
+. nr #VARIABLE_FOOTER_POS 0-\\n[#B_MARGIN]u
+. wh \\n[.p]u FOOTER
+. wh -(\\n[#FN_OVERFLOW_TRAP_POS]u) FN_OVERFLOW_TRAP
+. ch FOOTER -\\n[#B_MARGIN]u
+. \}
+.END
+\#
+\# CHECK INDENT
+\# ------------
+\# *Arguments:
+\# <none>
+\# *Function:
+\# Adds left, right, or both indent values to document elements
+\# like heads and subheads that are processed in environments.
+\#
+.MAC CHECK_INDENT END
+. if \\n[#INDENT_LEFT_ACTIVE] \{\
+. in \\n[#L_INDENT]u
+. if \\n[#QUOTE] \{\
+. in -\\n[#L_INDENT]u \"Because we added an indent in 2nd line of macro
+. ll -\\n[#L_INDENT]u
+. ta \\n[.l]u
+. \}
+. if \\n[#EPIGRAPH] \{\
+. in -\\n[#L_INDENT]u
+. ll -\\n[#L_INDENT]u
+. ta \\n[.l]u
+. \}
+. \}
+. if \\n[#INDENT_RIGHT_ACTIVE] \{\
+. ll -\\n[#R_INDENT]u
+. ta \\n[.l]u
+. \}
+. if \\n[#INDENT_BOTH_ACTIVE] \{\
+. in \\n[#BL_INDENT]u
+. ll -\\n[#BR_INDENT]u
+. ta \\n[.l]u
+. if \\n[#QUOTE] \{\
+. in -\\n[#BL_INDENT]u
+. ie \\n[#BR_INDENT]=\\n[#BL_INDENT] \{\
+. ll -\\n[#BR_INDENT]u
+. ta \\n[.l]u
+. \}
+. el \{\
+. ll -(\\n[#BR_INDENT]u/2u)
+. ta \\n[.l]u
+. \}
+. \}
+. if \\n[#EPIGRAPH] \{\
+. in -\\n[#BL_INDENT]u
+. ie \\n[#BR_INDENT]=\\n[#BL_INDENT] \{\
+. ll -\\n[#BR_INDENT]u
+. ta \\n[.l]u
+. \}
+. el \{\
+. ll -(\\n[#BR_INDENT]u/2u)
+. ta \\n[.l]u
+. \}
+. \}
+. \}
+.END
+\#
+\# REMOVE INDENT
+\# -------------
+\# *Arguments:
+\# <none>
+\# *Function:
+\# Removes left, right, or both indent values from document elements
+\# like heads and subheads that are processed in environments.
+\#
+.MAC REMOVE_INDENT END
+. in 0
+. ll \\n[#L_LENGTH]u
+. ta \\n[.l]u
+.END
+\#
+\# This .em (for all DOC_TYPEs, except 4 [LETTER]) ensures that
+\# deferred footnotes and floats that happen on the 2nd to last page
+\# get output, and the last page/col isn't flexed.
+\#
+.MAC TERMINATE END
+. if dPDF.EXPORT .tm .ds last-page \\n%@\\n[#COL_NUM]
+. ie \\n[#FN_DEPTH] \{\
+. ie \\n[#FN_DEFER] \{\
+. br
+. nr #TERMINATE 1
+. FOOTNOTE
+. nf
+. FOOTNOTE OFF
+. \}
+. el \{\
+. br
+. ch FN_OVERFLOW_TRAP
+. FOOTER
+. \}
+. \}
+. el \{\
+. br
+. ch FN_OVERFLOW_TRAP
+. FOOTER
+. \}
+. if \\n[defer] \
+' bp
+.END
+\#
+\# END MACRO FOR LETTERS
+\# ---------------------
+\# *Arguments:
+\# none
+\# *Function:
+\# The .em macro executed at the end of letters. Turns footers
+\# and pagination off, terminates and outputs diversion CLOSING
+\# (indented with the author's name underneath).
+\#
+.MAC ALL_DONE END
+. ch FOOTER
+. ch HEADER
+. br
+. if \\n[#DOC_TYPE]=4 \{\
+. if !'\\n[.z]'' \{\
+. br
+. ALD \\*[$SIG_SPACE]
+. di
+. \}
+. IQ CLEAR
+. TQ
+. LEFT
+. ie !'\\*[$CLOSE_INDENT]'' .IL \\*[$CLOSE_INDENT]
+. el .IL \\n[#DOC_L_LENGTH]u/2u
+. sp
+. if \\n[#CLOSING] \{\
+. CLOSING_TEXT
+. br
+. \}
+. PRINT \\*[$AUTHOR_1]
+. \}
+.END
+\#
+\# Set up a default papersize of US letter
+\#
+.PAGEWIDTH 8.5i
+.PAGELENGTH 11i
+\#
+\# ====================================================================
+\#
+\# +++DOCUMENT PROCESSING ALIASES+++
+\#
+\# Create aliases to make life easier for users: synonyms, short forms
+\# and alternate spellings.
+\#
+.ALIAS CITATION BLOCKQUOTE
+.ALIAS CITE BLOCKQUOTE
+.ALIAS DOC_R_MARGIN DOC_RIGHT_MARGIN
+.ALIAS DOC_L_MARGIN DOC_LEFT_MARGIN
+.ALIAS DOC_L_LENGTH DOC_LINE_LENGTH
+.ALIAS DOC_RMARGIN DOC_RIGHT_MARGIN
+.ALIAS DOC_LMARGIN DOC_LEFT_MARGIN
+.ALIAS DOC_LLENGTH DOC_LINE_LENGTH
+.ALIAS DOC_FAM DOC_FAMILY
+.ALIAS DOC_LS DOC_LEAD
+.ALIAS DOC_PS DOC_PT_SIZE
+.ALIAS FILL QUAD
+.ALIAS PAGENUM PAGENUMBER
+.ALIAS PAGINATION PAGINATE
+.ALIAS PP_FT PP_FONT
+.ALIAS TOC_PS TOC_PT_SIZE
+\#
+\# HEADER and FOOTER macros
+\# ------------------------
+\# Because the type-style of headers and footers are managed
+\# identically, and the type-style macros (_<type parameter>) all
+\# require the correct name of the calling macro, it's necessary
+\# to create HEADER_ and FOOTER_ macros here that are basically
+\# aliases with an argument.
+\#
+.MAC FOOTER_CENTER_COLOR END
+. HDRFTR_CENTER_COLOR \\$1
+.END
+\#
+.MAC FOOTER_CENTER_COLOUR END
+. HDRFTR_CENTER_COLOR \\$1
+.END
+\#
+.MAC FOOTER_CENTER_FAM END
+. HDRFTR_CENTER_FAMILY \\$1
+.END
+\#
+.MAC FOOTER_CENTER_FAMILY END
+. HDRFTR_CENTER_FAMILY \\$1
+.END
+\#
+.MAC FOOTER_CENTER_FONT END
+. HDRFTR_CENTER_FONT \\$1
+.END
+\#
+.MAC FOOTER_CENTER_FT END
+. HDRFTR_CENTER_FONT \\$1
+.END
+\#
+.MAC FOOTER_CENTER_PS END
+. HDRFTR_CENTER_SIZE \\$1
+.END
+\#
+.MAC FOOTER_CENTER_SIZE END
+. HDRFTR_CENTER_SIZE \\$1
+.END
+\#
+.MAC FOOTER_CENTRE_CAPS END
+. HDRFTR_CENTER_CAPS \\$1
+.END
+\#
+.MAC FOOTER_CENTRE_COLOR END
+. HDRFTR_CENTER_COLOR \\$1
+.END
+\#
+.MAC FOOTER_CENTRE_COLOUR END
+. HDRFTR_CENTER_COLOR \\$1
+.END
+\#
+.MAC FOOTER_CENTRE_FAM END
+. HDRFTR_CENTER_FAMILY \\$1
+.END
+\#
+.MAC FOOTER_CENTRE_FAMILY END
+. HDRFTR_CENTER_FAMILY \\$1
+.END
+\#
+.MAC FOOTER_CENTRE_FONT END
+. HDRFTR_CENTER_FONT \\$1
+.END
+\#
+.MAC FOOTER_CENTRE_FT END
+. HDRFTR_CENTER_FONT \\$1
+.END
+\#
+.MAC FOOTER_CENTRE_PS END
+. HDRFTR_CENTER_SIZE \\$1
+.END
+\#
+.MAC FOOTER_CENTRE_SIZE END
+. HDRFTR_CENTER_SIZE \\$1
+.END
+\#
+.MAC FOOTER_COLOR END
+. HDRFTR_COLOR \\$1
+.END
+\#
+.MAC FOOTER_COLOUR END
+. HDRFTR_COLOR \\$1
+.END
+\#
+.MAC FOOTER_FAM END
+. HDRFTR_FAMILY \\$1
+.END
+\#
+.MAC FOOTER_FAMILY END
+. HDRFTR_FAMILY \\$1
+.END
+\#
+.MAC FOOTER_LEFT_COLOR END
+. HDRFTR_LEFT_COLOR \\$1
+.END
+\#
+.MAC FOOTER_LEFT_COLOUR END
+. HDRFTR_LEFT_COLOR \\$1
+.END
+\#
+.MAC FOOTER_LEFT_FAM END
+. HDRFTR_LEFT_FAMILY \\$1
+.END
+\#
+.MAC FOOTER_LEFT_FAMILY END
+. HDRFTR_LEFT_FAMILY \\$1
+.END
+\#
+.MAC FOOTER_LEFT_FONT END
+. HDRFTR_LEFT_FONT \\$1
+.END
+\#
+.MAC FOOTER_LEFT_FT END
+. HDRFTR_LEFT_FONT \\$1
+.END
+\#
+.MAC FOOTER_LEFT_PS END
+. HDRFTR_LEFT_SIZE \\$1
+.END
+\#
+.MAC FOOTER_LEFT_SIZE END
+. HDRFTR_LEFT_SIZE \\$1
+.END
+\#
+.MAC FOOTER_RIGHT_COLOR END
+. HDRFTR_RIGHT_COLOR \\$1
+.END
+\#
+.MAC FOOTER_RIGHT_COLOUR END
+. HDRFTR_RIGHT_COLOR \\$1
+.END
+\#
+.MAC FOOTER_RIGHT_FAM END
+. HDRFTR_RIGHT_FAMILY \\$1
+.END
+\#
+.MAC FOOTER_RIGHT_FAMILY END
+. HDRFTR_RIGHT_FAMILY \\$1
+.END
+\#
+.MAC FOOTER_RIGHT_FONT END
+. HDRFTR_RIGHT_FONT \\$1
+.END
+\#
+.MAC FOOTER_RIGHT_FT END
+. HDRFTR_RIGHT_FONT \\$1
+.END
+\#
+.MAC FOOTER_RIGHT_PS END
+. HDRFTR_RIGHT_SIZE \\$1
+.END
+\#
+.MAC FOOTER_RIGHT_SIZE END
+. HDRFTR_RIGHT_SIZE \\$1
+.END
+\#
+.MAC FOOTER_RULE_COLOR END
+. HDRFTR_RULE_COLOR \\$1
+.END
+\#
+.MAC FOOTER_SIZE END
+. HDRFTR_SIZE \\$1
+.END
+\#
+.MAC HEADER_CENTER_COLOR END
+. HDRFTR_CENTER_COLOR \\$1
+.END
+\#
+.MAC HEADER_CENTER_COLOUR END
+. HDRFTR_CENTER_COLOR \\$1
+.END
+\#
+.MAC HEADER_CENTER_FAM END
+. HDRFTR_CENTER_FAMILY \\$1
+.END
+\#
+.MAC HEADER_CENTER_FAMILY END
+. HDRFTR_CENTER_FAMILY \\$1
+.END
+\#
+.MAC HEADER_CENTER_FONT END
+. HDRFTR_CENTER_FONT \\$1
+.END
+\#
+.MAC HEADER_CENTER_FT END
+. HDRFTR_CENTER_FONT \\$1
+.END
+\#
+.MAC HEADER_CENTER_PS END
+. HDRFTR_CENTER_SIZE \\$1
+.END
+\#
+.MAC HEADER_CENTER_SIZE END
+. HDRFTR_CENTER_SIZE \\$1
+.END
+\#
+.MAC HEADER_CENTRE_COLOR END
+. HDRFTR_CENTER_COLOR \\$1
+.END
+\#
+.MAC HEADER_CENTRE_COLOUR END
+. HDRFTR_CENTER_COLOR \\$1
+.END
+\#
+.MAC HEADER_CENTRE_FAM END
+. HDRFTR_CENTER_FAMILY \\$1
+.END
+\#
+.MAC HEADER_CENTRE_FAMILY END
+. HDRFTR_CENTER_FAMILY \\$1
+.END
+\#
+.MAC HEADER_CENTRE_FONT END
+. HDRFTR_CENTER_FONT \\$1
+.END
+\#
+.MAC HEADER_CENTRE_FT END
+. HDRFTR_CENTER_FONT \\$1
+.END
+\#
+.MAC HEADER_CENTRE_PS END
+. HDRFTR_CENTER_SIZE \\$1
+.END
+\#
+.MAC HEADER_CENTRE_SIZE END
+. HDRFTR_CENTER_SIZE \\$1
+.END
+\#
+.MAC HEADER_COLOR END
+. HDRFTR_COLOR \\$1
+.END
+\#
+.MAC HEADER_COLOUR END
+. HDRFTR_COLOR \\$1
+.END
+\#
+.MAC HEADER_FAM END
+. HDRFTR_FAMILY \\$1
+.END
+\#
+.MAC HEADER_FAMILY END
+. HDRFTR_FAMILY \\$1
+.END
+\#
+.MAC HEADER_LEFT_COLOR END
+. HDRFTR_LEFT_COLOR \\$1
+.END
+\#
+.MAC HEADER_LEFT_COLOUR END
+. HDRFTR_LEFT_COLOR \\$1
+.END
+\#
+.MAC HEADER_LEFT_FAM END
+. HDRFTR_LEFT_FAMILY \\$1
+.END
+\#
+.MAC HEADER_LEFT_FAMILY END
+. HDRFTR_LEFT_FAMILY \\$1
+.END
+\#
+.MAC HEADER_LEFT_FONT END
+. HDRFTR_LEFT_FONT \\$1
+.END
+\#
+.MAC HEADER_LEFT_FT END
+. HDRFTR_LEFT_FONT \\$1
+.END
+\#
+.MAC HEADER_LEFT_PS END
+. HDRFTR_LEFT_SIZE \\$1
+.END
+\#
+.MAC HEADER_LEFT_SIZE END
+. HDRFTR_LEFT_SIZE \\$1
+.END
+\#
+.MAC HEADER_RIGHT_COLOR END
+. HDRFTR_RIGHT_COLOR \\$1
+.END
+\#
+.MAC HEADER_RIGHT_COLOUR END
+. HDRFTR_RIGHT_COLOR \\$1
+.END
+\#
+.MAC HEADER_RIGHT_FAM END
+. HDRFTR_RIGHT_FAMILY \\$1
+.END
+\#
+.MAC HEADER_RIGHT_FAMILY END
+. HDRFTR_RIGHT_FAMILY \\$1
+.END
+\#
+.MAC HEADER_RIGHT_FONT END
+. HDRFTR_RIGHT_FONT \\$1
+.END
+\#
+.MAC HEADER_RIGHT_FT END
+. HDRFTR_RIGHT_FONT \\$1
+.END
+\#
+.MAC HEADER_RIGHT_PS END
+. HDRFTR_RIGHT_SIZE \\$1
+.END
+\#
+.MAC HEADER_RIGHT_SIZE END
+. HDRFTR_RIGHT_SIZE \\$1
+.END
+\#
+.MAC HEADER_RULE_COLOR END
+. HDRFTR_RULE_COLOR \\$1
+.END
+\#
+.MAC HEADER_SIZE END
+. HDRFTR_SIZE \\$1
+.END
+\#
+\# Aliases for other HEADER and FOOTER macros.
+\#
+.ALIAS BIBLIOGRAPHY_FOOTER_CENTER BIBLIOGRAPHY_HDRFTR_CENTER
+.ALIAS BIBLIOGRAPHY_FOOTER_CENTRE BIBLIOGRAPHY_HDRFTR_CENTER
+.ALIAS BIBLIOGRAPHY_HEADER_CENTER BIBLIOGRAPHY_HDRFTR_CENTER
+.ALIAS BIBLIOGRAPHY_HEADER_CENTRE BIBLIOGRAPHY_HDRFTR_CENTER
+.
+.ALIAS ENDNOTES_FOOTER_CENTER ENDNOTES_HDRFTR_CENTER
+.ALIAS ENDNOTES_FOOTER_CENTRE ENDNOTES_HDRFTR_CENTER
+.ALIAS ENDNOTES_HEADER_CENTER ENDNOTES_HDRFTR_CENTER
+.ALIAS ENDNOTES_HEADER_CENTRE ENDNOTES_HDRFTR_CENTER
+.
+.ALIAS FOOTER_CENTER HDRFTR_CENTER
+.ALIAS TOC_PAGEFOOTER_CENTER HDRFTR_CENTER
+.ALIAS TOC_PAGEFOOTER_CENTRE HDRFTR_CENTER
+.ALIAS FOOTER_CENTER_CAPS _HDRFTR_CAPS
+.ALIAS FOOTER_CENTER_PAD HDRFTR_CENTER_PAD
+.ALIAS FOOTER_CENTER_SMALLCAPS _HDRFTR_SMALLCAPS
+.ALIAS FOOTER_CENTRE HDRFTR_CENTER
+.ALIAS FOOTER_CENTRE_CAPS _HDRFTR_CAPS
+.ALIAS FOOTER_CENTRE_PAD HDRFTR_CENTER_PAD
+.ALIAS FOOTER_CENTRE_SMALLCAPS _HDRFTR_SMALLCAPS
+.ALIAS FOOTER_LEFT HDRFTR_LEFT
+.ALIAS FOOTER_LEFT_CAPS _HDRFTR_CAPS
+.ALIAS FOOTER_LEFT_SMALLCAPS _HDRFTR_SMALLCAPS
+.ALIAS FOOTER_PLAIN HDRFTR_PLAIN
+.ALIAS FOOTER_RECTO HDRFTR_RECTO
+.ALIAS FOOTER_RIGHT HDRFTR_RIGHT
+.ALIAS FOOTER_RIGHT_CAPS _HDRFTR_CAPS
+.ALIAS FOOTER_RIGHT_SMALLCAPS _HDRFTR_SMALLCAPS
+.ALIAS FOOTER_RULE HDRFTR_RULE
+.ALIAS FOOTER_RULE_GAP HDRFTR_RULE_GAP
+.ALIAS FOOTER_VERSO HDRFTR_VERSO
+.
+.ALIAS HEADER_CENTER HDRFTR_CENTER
+.ALIAS TOC_PAGEHEADER_CENTER HDRFTR_CENTER
+.ALIAS TOC_PAGEHEADER_CENTRE HDRFTR_CENTER
+.ALIAS HEADER_CENTER_CAPS _HDRFTR_CAPS
+.ALIAS HEADER_CENTER_PAD HDRFTR_CENTER_PAD
+.ALIAS HEADER_CENTER_SMALLCAPS _HDRFTR_SMALLCAPS
+.ALIAS HEADER_CENTRE HDRFTR_CENTER
+.ALIAS HEADER_CENTRE_CAPS _HDRFTR_CAPS
+.ALIAS HEADER_CENTRE_PAD HDRFTR_CENTER_PAD
+.ALIAS HEADER_CENTRE_SMALLCAPS _HDRFTR_SMALLCAPS
+.ALIAS HEADER_LEFT HDRFTR_LEFT
+.ALIAS HEADER_LEFT_CAPS _HDRFTR_CAPS
+.ALIAS HEADER_LEFT_SMALLCAPS _HDRFTR_SMALLCAPS
+.ALIAS HEADER_PLAIN HDRFTR_PLAIN
+.ALIAS HEADER_RECTO HDRFTR_RECTO
+.ALIAS HEADER_RIGHT HDRFTR_RIGHT
+.ALIAS HEADER_RIGHT_CAPS _HDRFTR_CAPS
+.ALIAS HEADER_RIGHT_SMALLCAPS _HDRFTR_SMALLCAPS
+.ALIAS HEADER_RULE HDRFTR_RULE
+.ALIAS HEADER_RULE_GAP HDRFTR_RULE_GAP
+.ALIAS HEADER_VERSO HDRFTR_VERSO
+.
+.ALIAS SWITCH_FOOTERS SWITCH_HDRFTR
+.ALIAS SWITCH_HEADERS SWITCH_HDRFTR
+\#
+\# Create type-style aliases for tags, titles, and page elements
+\#
+\# These are used for creating aliases with while loops
+\#
+.ds ELEMENT_TYPE_1 BIBLIOGRAPHY_STRING
+.ds ELEMENT_TYPE_2 BIBLIOGRAPHY_HEADER
+.ds ELEMENT_TYPE_3 BLOCKQUOTE
+.ds ELEMENT_TYPE_4 CITATION
+.ds ELEMENT_TYPE_5 CITE
+.ds ELEMENT_TYPE_6 ENDNOTES_HEADER
+.ds ELEMENT_TYPE_7 ENDNOTE_STRING
+.ds ELEMENT_TYPE_8 EPIGRAPH
+.ds ELEMENT_TYPE_9 HDRFTR_CENTER
+.ds ELEMENT_TYPE_10 HDRFTR_LEFT
+.ds ELEMENT_TYPE_11 HDRFTR_RIGHT
+.ds ELEMENT_TYPE_12 LINENUMBER
+.ds ELEMENT_TYPE_13 PAGENUM
+.ds ELEMENT_TYPE_14 QUOTE
+.ds ELEMENT_TYPE_15 TOC_HEADER
+.ds ELEMENT_TYPE_16 CODE
+.ds ELEMENT_TYPE_17 FINIS
+.ds ELEMENT_TYPE_18 COPYRIGHT
+\#
+\# Create aliases for _FAMILY
+.ALIAS BIBLIOGRAPHY_FAMILY _FAMILY
+.ALIAS COVER_FAMILY _FAMILY
+.ALIAS DOCHEADER_FAMILY _FAMILY
+.ALIAS DOC_COVER_FAMILY _FAMILY
+.ALIAS ENDNOTE_FAMILY _FAMILY
+.ALIAS ENDNOTE_LINENUMBER_FAMILY _FAMILY
+.ALIAS ENDNOTE_NUMBER_FAMILY _FAMILY
+.ALIAS ENDNOTE_STRING_FAMILY _FAMILY
+.ALIAS ENDNOTE_TITLE_FAMILY _FAMILY
+.ALIAS FOOTNOTE_FAMILY _FAMILY
+.ALIAS HDRFTR_FAMILY _FAMILY
+.ALIAS PAGENUMBER_FAMILY _FAMILY
+.ALIAS TOC_FAMILY _FAMILY
+.ALIAS TOC_PAGENUMBER_FAMILY _FAMILY
+.ALIAS TOC_PN_FAMILY _FAMILY
+.ALIAS TOC_TITLE_FAMILY _FAMILY
+\#
+.nr #LOOP 0 1
+.while \n+[#LOOP]<=18 \{\
+. ALIAS \*[ELEMENT_TYPE_\n[#LOOP]]_FAMILY _FAMILY
+.\}
+\# Covers, docheader
+.nr #LOOP 0 1
+.while \n+[#LOOP]<=12 \{\
+. ALIAS \*[TITLE_TYPE_\n[#LOOP]]_FAMILY _FAMILY
+. ALIAS COVER_\*[TITLE_TYPE_\n[#LOOP]]_FAMILY _FAMILY
+. ALIAS DOC_COVER_\*[TITLE_TYPE_\n[#LOOP]]_FAMILY _FAMILY
+.\}
+\#
+\# Create aliases for _FONT
+.ALIAS BIBLIOGRAPHY_FONT _FONT
+.ALIAS ENDNOTE_FONT _FONT
+.ALIAS ENDNOTE_LINENUMBER_FONT _FONT
+.ALIAS ENDNOTE_NUMBER_FONT _FONT
+.ALIAS ENDNOTE_TITLE_FONT _FONT
+.ALIAS FOOTNOTE_FONT _FONT
+.ALIAS TOC_PN_FONT _FONT
+\#
+.nr #LOOP 0 1
+.while \n+[#LOOP]<=18 \{\
+. ALIAS \*[ELEMENT_TYPE_\n[#LOOP]]_FONT _FONT
+.\}
+\# Covers, docheader
+.nr #LOOP 0 1
+.while \n+[#LOOP]<=12 \{\
+. ALIAS \*[TITLE_TYPE_\n[#LOOP]]_FONT _FONT
+. ALIAS COVER_\*[TITLE_TYPE_\n[#LOOP]]_FONT _FONT
+. ALIAS DOC_COVER_\*[TITLE_TYPE_\n[#LOOP]]_FONT _FONT
+.\}
+\#
+\# Create aliases for _SIZE
+.ALIAS ENDNOTE_LINENUMBER_SIZE _SIZE
+.ALIAS ENDNOTE_NUMBER_SIZE _SIZE
+.ALIAS ENDNOTE_TITLE_SIZE _SIZE
+.ALIAS FOOTNOTE_SIZE _SIZE
+.ALIAS HDRFTR_SIZE _SIZE
+.ALIAS TOC_PN_SIZE _SIZE
+\#
+.nr #LOOP 0 1
+.while \n+[#LOOP]<=18 \{\
+. ALIAS \*[ELEMENT_TYPE_\n[#LOOP]]_SIZE _SIZE
+.\}
+\# Covers, docheader
+.nr #LOOP 0 1
+.while \n+[#LOOP]<=12 \{\
+. ALIAS \*[TITLE_TYPE_\n[#LOOP]]_SIZE _SIZE
+. ALIAS COVER_\*[TITLE_TYPE_\n[#LOOP]]_SIZE _SIZE
+. ALIAS DOC_COVER_\*[TITLE_TYPE_\n[#LOOP]]_SIZE _SIZE
+.\}
+\#
+\# Create aliases for TITLE_LEAD
+.nr #LOOP 0 1
+.while \n+[#LOOP]<=12 \{\
+. ALIAS \*[TITLE_TYPE_\n[#LOOP]]_LEAD TITLE_LEAD
+. ALIAS COVER_\*[TITLE_TYPE_\n[#LOOP]]_LEAD TITLE_LEAD
+. ALIAS DOC_COVER_\*[TITLE_TYPE_\n[#LOOP]]_LEAD TITLE_LEAD
+.\}
+\#
+\# Create aliases for _UNDERLINE
+.ALIAS BIBLIOGRAPHY_HEADER_UNDERLINE _UNDERLINE
+.ALIAS BIBLIOGRAPHY_HEADER_UNDERSCORE _UNDERLINE
+.ALIAS BIBLIOGRAPHY_STRING_UNDERLINE _UNDERLINE
+.ALIAS BIBLIOGRAPHY_STRING_UNDERSCORE _UNDERLINE
+.ALIAS BIB_STRING_UNDERLINE _UNDERLINE
+.ALIAS ENDNOTES_HEADER_UNDERLINE _UNDERLINE
+.ALIAS ENDNOTES_HEADER_UNDERSCORE _UNDERLINE
+.ALIAS ENDNOTES_STRING_UNDERLINE _UNDERLINE
+.ALIAS ENDNOTES_STRING_UNDERSCORE _UNDERLINE
+.ALIAS ENDNOTE_TITLE_UNDERLINE _UNDERLINE
+.ALIAS ENDNOTE_TITLE_UNDERSCORE _UNDERLINE
+.ALIAS EN_STRING_UNDERLINE _UNDERLINE
+.ALIAS EN_STRING_UNDERSCORE _UNDERLINE
+.ALIAS TOC_HEADER_UNDERLINE _UNDERLINE
+.ALIAS TOC_HEADER_UNDERSCORE _UNDERLINE
+\#
+.nr #LOOP 0 1
+.while \n+[#LOOP]<=12 \{\
+. ALIAS \*[TITLE_TYPE_\n[#LOOP]]_UNDERLINE _UNDERLINE
+. ALIAS \*[TITLE_TYPE_\n[#LOOP]]_UNDERSCORE _UNDERLINE
+. ALIAS COVER_\*[TITLE_TYPE_\n[#LOOP]]_UNDERLINE _UNDERLINE
+. ALIAS COVER_\*[TITLE_TYPE_\n[#LOOP]]_UNDERSCORE _UNDERLINE
+. ALIAS DOC_COVER_\*[TITLE_TYPE_\n[#LOOP]]_UNDERLINE _UNDERLINE
+. ALIAS DOC_COVER_\*[TITLE_TYPE_\n[#LOOP]]_UNDERSCORE _UNDERLINE
+.\}
+\#
+\# Create aliases for _COLOR
+.ALIAS BIBLIOGRAPHY_HEADER_COLOR _COLOR
+.ALIAS COVER_COLOR _COLOR
+.ALIAS DOCHEADER_COLOR _COLOR
+.ALIAS ENDNOTE_TITLE_COLOR _COLOR
+.ALIAS FINIS_COLOR _COLOR
+.ALIAS FOOTNOTE_COLOR _COLOR
+.ALIAS HDRFTR_COLOR _COLOR
+.ALIAS HDRFTR_RULE_COLOR _COLOR
+.ALIAS LINEBREAK_COLOR _COLOR
+.ALIAS SECTION_COLOR _COLOR
+\#
+.nr #LOOP 0 1
+.while \n+[#LOOP]<=18 \{\
+. ALIAS \*[ELEMENT_TYPE_\n[#LOOP]]_COLOR _COLOR
+.\}
+\# Covers, docheader
+.nr #LOOP 0 1
+.while \n+[#LOOP]<=12 \{\
+. ALIAS \*[TITLE_TYPE_\n[#LOOP]]_COLOR _COLOR
+. ALIAS COVER_\*[TITLE_TYPE_\n[#LOOP]]_COLOR _COLOR
+. ALIAS DOC_COVER_\*[TITLE_TYPE_\n[#LOOP]]_COLOR _COLOR
+.\}
+\#
+\# Create aliases for _CAPS
+.ALIAS BIBLIOGRAPHY_HEADER_CAPS _CAPS
+.ALIAS BIBLIOGRAPHY_STRING_CAPS _CAPS
+.ALIAS ENDNOTE_TITLE_CAPS _CAPS
+\#
+.nr #LOOP 0 1
+.while \n+[#LOOP]<=12 \{\
+. ALIAS \*[TITLE_TYPE_\n[#LOOP]]_CAPS _CAPS
+. ALIAS COVER_\*[TITLE_TYPE_\n[#LOOP]]_CAPS _CAPS
+. ALIAS DOC_COVER_\*[TITLE_TYPE_\n[#LOOP]]_CAPS _CAPS
+.\}
+\#
+\# Create aliases for _SMALLCAPS
+.ALIAS BIBLIOGRAPHY_HEADER_SMALLCAPS _SMALLCAPS
+.ALIAS BIBLIOGRAPHY_STRING_SMALLCAPS _SMALLCAPS
+.ALIAS ENDNOTE_TITLE_SMALLCAPS _SMALLCAPS
+.ALIAS HDRFTR_CENTER_SMALLCAPS _SMALLCAPS
+.ALIAS HDRFTR_LEFT_SMALLCAPS _SMALLCAPS
+.ALIAS HDRFTR_RIGHT_SMALLCAPS _SMALLCAPS
+\#
+.nr #LOOP 0 1
+.while \n+[#LOOP]<=12 \{\
+. ALIAS \*[TITLE_TYPE_\n[#LOOP]]_SMALLCAPS _SMALLCAPS
+. ALIAS COVER_\*[TITLE_TYPE_\n[#LOOP]]_SMALLCAPS _SMALLCAPS
+. ALIAS DOC_COVER_\*[TITLE_TYPE_\n[#LOOP]]_SMALLCAPS _SMALLCAPS
+.\}
+\#
+\# Create aliases for _QUAD
+.ALIAS BIBLIOGRAPHY_HEADER_QUAD _QUAD
+.ALIAS BIBLIOGRAPHY_QUAD _QUAD
+.ALIAS BIBLIOGRAPHY_STRING_QUAD _QUAD
+.ALIAS BLOCKQUOTE_QUAD _QUAD
+.ALIAS COPYRIGHT_QUAD _QUAD
+.ALIAS COVER_COPYRIGHT_QUAD _QUAD
+.ALIAS COVER_MISC_QUAD _QUAD
+.ALIAS COVER_QUAD _QUAD
+.ALIAS DOCHEADER_QUAD _QUAD
+.ALIAS DOC_COVER_COPYRIGHT_QUAD _QUAD
+.ALIAS DOC_COVER_MISC_QUAD _QUAD
+.ALIAS DOC_COVER_QUAD _QUAD
+.ALIAS DOC_QUAD _QUAD
+.ALIAS ENDNOTES_HEADER_QUAD _QUAD
+.ALIAS ENDNOTE_QUAD _QUAD
+.ALIAS ENDNOTE_STRING_QUAD _QUAD
+.ALIAS ENDNOTE_TITLE_QUAD _QUAD
+.ALIAS EPIGRAPH_QUAD _QUAD
+.ALIAS FOOTNOTE_QUAD _QUAD
+.ALIAS MISC_QUAD _QUAD
+.ALIAS TOC_HEADER_QUAD _QUAD
+\#
+\# Support aliases
+\#
+.ALIAS COL_BREAK COL_NEXT
+.ALIAS DOC_COVER COVER
+.ALIAS DOC_COVERS COVERS
+.ALIAS DOC_COVERTITLE COVERTITLE
+.ALIAS DOC_COVER_COUNTS_PAGES COVER_COUNTS_PAGES
+.ALIAS DOC_COVER_LEAD COVER_LEAD
+.ALIAS DOC_DOC_COVERTITLE COVERTITLE
+.ALIAS DO_DOC_COVER DO_COVER
+.ALIAS PRINT_FOOTNOTE_RULE FOOTNOTE_RULE
+\#
+\# Miscellaneous aliases
+.ALIAS SECTION LINEBREAK
+.ALIAS SECTION_CHAR LINEBREAK_CHAR
+\#
+\# Miscellaneous macros to take care of backward compatibility
+\# -----------------------------------------------------------
+\#
+\# As of 1.1.9, EL and TN got changed to make TRAP...TRAP OFF
+\# unnecessary for users. However, I used both macros extensively
+\# throughout this file (in conjunction with TRAP...TRAP OFF).
+\# EOL is the old EL; used only in om.tmac.
+\#
+.MAC EOL END
+. if \\n[.vpt] \{\
+. vpt 0
+. nr #RESTORE_TRAP 1
+. \}
+. br
+. sp -1v
+. if \\n[#RESTORE_TRAP] \{\
+. vpt
+. rr #RESTORE_TRAP
+. \}
+.END
+\#
+\# PREPROCESSOR SUPPORT
+\# ====================
+\#
+\# Utility macros--label and caption styles, lists collector, lists
+\# generator.
+\#
+.nr lists*target 0 1
+.
+.MAC get-label-type END
+. if \\n[all]=1 .ds label-type eqn
+. if \\n[all]=2 .ds label-type pdf-img
+. if \\n[all]=3 .ds label-type pic
+. if \\n[all]=4 .ds label-type tbl
+. if \\n[all]=5 .ds label-type floating
+.END
+\#
+.MAC set-defaults END
+. if '\\*[\\*[label-type]*\\*[spec-type]-family]'' \
+. ds \\*[label-type]*\\*[spec-type]-family \\*[$DOC_FAM]\"
+. if '\\*[\\*[label-type]*\\*[spec-type]-font]'' \
+. ds \\*[label-type]*\\*[spec-type]-font R\"
+. if '\\*[\\*[label-type]*\\*[spec-type]-size-change]'' \
+. ds \\*[label-type]*\\*[spec-type]-size-change +0\"
+. if !r \\*[label-type]*\\*[spec-type]-autolead \
+. nr \\*[label-type]*\\*[spec-type]-autolead 2
+. if '\\*[\\*[label-type]*\\*[spec-type]-space]'' \
+. ds \\*[label-type]*\\*[spec-type]-space +0\"
+. if '\\*[\\*[label-type]*\\*[spec-type]-color]'' \
+. ds \\*[label-type]*\\*[spec-type]-color black\"
+. if '\\*[\\*[label-type]*\\*[spec-type]-quad]'' \{\
+. ie '\\*[label-type]'eqn' \{\
+. if '\\*[spec-type]'caption' \
+. ds \\*[label-type]*\\*[spec-type]-quad C\"
+. \}
+. el .ds \\*[label-type]*\\*[spec-type]-quad L\"
+. \}
+. if '\\n[\\*[label-type]*\\*[spec-type]-quad-on-ll]'' \
+. nr \\*[label-type]*\\*[spec-type]-quad-on-ll 1
+. if '\\*[spec-type]'caption' \
+. nr default-left 1
+.END
+\#
+.MAC set-inline-specs END
+. ds \\*[label-type]*\\*[spec-type]-specs \
+\f[\\*[\\*[label-type]*\\*[spec-type]-family]\\*[\\*[label-type]*\\*[spec-type]-font]]\
+\s[\\*[\\*[label-type]*\\*[spec-type]-size-change]]\
+\m[\\*[\\*[label-type]*\\*[spec-type]-color]]
+.END
+\#
+\# Line lengths, indents, and quads for captions and labels.
+\# Aliased for eqn, pic, pdf-image, and tbl.
+\#
+.MAC SET_QUAD END
+. ds label-type \\$0
+. substring label-type 0 2
+. if '\\*[label-type]'PDF' .ds label-type pdf-img
+. if '\\*[label-type]'TBL' .ds label-type tbl
+. if '\\*[label-type]'PIC' .ds label-type pic
+. if '\\*[label-type]'EQN' .ds label-type eqn
+. ds spec-type \\$0
+. substring spec-type -6 -10
+. if '\\*[spec-type]'PTION' .ds spec-type caption
+. if '\\*[spec-type]'LABEL' .ds spec-type label
+. if '\\*[spec-type]'OURCE' .ds spec-type source
+. QUAD \\$1
+. ds \\*[label-type]*\\*[spec-type]-quad \\$1
+. substring \\*[label-type]*\\*[spec-type]-quad 0 0
+. if '\\*[label-type]'pdf-img' \{\
+. if '\\*[\\*[label-type]*\\*[spec-type]-quad]'L' \{\
+. if !\\n[pdf-img*\\*[spec-type]-quad-on-ll] \{\
+. ie !'\\*[pdf-img:pos]'-R' \
+. ll \\n[pdf-img:ind]u+\\n[pdf-img:width]u+\\n[pdf-img:frame-inset]u
+. el .ll -\\n[ind-pre-img]u
+. if '\\*[pdf-img:pos]'-C' \
+. in \\n[pdf-img:ind]u-\\n[pdf-img:frame-inset]u
+. if '\\*[pdf-img:pos]'-R' \
+. in \\n[.l]u-(\\n[pdf-img:width]u+(\\n[pdf-img:frame-inset]u*2u))
+. if '\\*[pdf-img:pos]'-I' \
+. in \\n[pdf-img:ind]u
+. \}
+. \}
+. if '\\*[\\*[label-type]*\\*[spec-type]-quad]'C' \{\
+. if !\\n[pdf-img*\\*[spec-type]-quad-on-ll] \{\
+. if '\\*[pdf-img:pos]'-L' \
+. ll \\n[pdf-img:width]u+(\\n[pdf-img:frame-inset]u*2u)
+. if '\\*[pdf-img:pos]'-C' \{\
+. ll (\\n[ll-pre-img]u-\\n[pdf-img:width]u/2u+(\\n[pdf-img:frame-inset]u))+\\n[pdf-img:width]u
+. in \\n[.l]u-(\\n[pdf-img:width]u+(\\n[pdf-img:frame-inset]u*2u))
+. \}
+. if '\\*[pdf-img:pos]'-R' \{\
+. ll -\\n[ind-pre-img]u
+. in \\n[.l]u-(\\n[pdf-img:width]u+(\\n[pdf-img:frame-inset]u*2u))
+. \}
+. if '\\*[pdf-img:pos]'-I' \{\
+. ll \\n[pdf-img:ind]u+\\n[pdf-img:width]u+(\\n[pdf-img:frame-inset]u*2u)
+. in \\n[pdf-img:ind]u
+. \}
+. \}
+. \}
+. if '\\*[\\*[label-type]*\\*[spec-type]-quad]'R' \{\
+. if !\\n[pdf-img*\\*[spec-type]-quad-on-ll] \{\
+. if '\\*[pdf-img:pos]'-L' \
+. ll \\n[pdf-img:width]u+(\\n[pdf-img:frame-inset]u*2u]
+. if '\\*[pdf-img:pos]'-C' \{\
+. ll (\\n[.l]u-\\n[ind-pre-img]u-\\n[pdf-img:width]u/2u)+\\n[pdf-img:width]u+\\n[pdf-img:frame-inset]u
+. in \\n[pdf-img:ind]u
+. \}
+. if '\\*[pdf-img:pos]'-R' \{\
+. ll -\\n[ind-pre-img]u
+. in \\n[.l]u-\\n[pdf-img:width]u
+. \}
+. if '\\*[pdf-img:pos]'-I' \{\
+. ll \\n[pdf-img:ind]u+\\n[pdf-img:width]u+(\\n[pdf-img:frame-inset]u*2u)
+. in \\n[pdf-img:ind]u
+. \}
+. \}
+. \}
+. \}
+. if '\\*[label-type]'pic' \{\
+. if !\\n[pic*\\*[spec-type]-quad-on-ll] \{\
+. ie \\n[pic*left] .ll \\n[pic*div-width]u
+. el \{\
+. ll \\n[pic*div-width]u
+. in (\\n[ll-pre-float]u-\\n[pic*div-width]u)/2u
+. \}
+. \}
+. \}
+. if '\\*[label-type]'tbl' \{\
+. if !\\n[tbl*\\*[spec-type]-quad-on-ll] \{\
+. ie \\n[tbl*center] \{\
+. ie '\\*[spec-type]'label' \{\
+.\" Differentiate between a tbl label and a float label
+. ie !'\\*[ev-current]'FLOAT' \{\
+. ll \\n[ll-pre-tbl]u-\\n[TW]u/2u+\\n[TW]u
+. if \\n[tbl*have-header] \
+. in (\\n[ll-pre-tbl]u-\\n[.i]u)-\\n[TW]u/2u+\\n[.i]u
+. \}
+. el \{\
+. in \\n[ll-pre-tbl]u+\\n[.i]u-\\n[TW]u/2u
+. ll \\n[.l]u-\\n[.i]u
+. \}
+. \}
+. el \{\
+. if '\\*[spec-type]'source' \{\
+. ie \\n[float*tbl] \{\
+. ll \\n[TW]u
+\!. in \\n[ll-pre-tbl]u-\\n[TW]u/2u+\\n[tmp-ind]u
+. \}
+. el \{\
+. ll \\n[TW]u+\\n[ind-pre-tbl]u
+. ie \\n[ind-pre-tbl] \
+\!. in \\n[ll-pre-tbl]u-\\n[TW]u/2u
+. el \
+\!. in \\n[ll-pre-tbl]u-\\n[TW]u/2u+\\n[tmp-ind]u
+. \}
+\!. ti -\\n[tmp-ind]u
+. \}
+. if '\\*[spec-type]'caption' \{\
+. ll \\n[ll-pre-tbl]u+\\n[.i]u-\\n[TW]u/2u+\\n[TW]u
+. in \\n[ll-pre-tbl]u+\\n[.i]u-\\n[TW]u/2u
+. \}
+. \}
+. \}
+. el \{\
+. ll \\n[TW]u+\\n[.i]u
+.\" Check the effect of setting a source in non-MLA mode.
+. if '\\*[spec-type]'source' \{\
+. if \\n[#MLA] \{\
+. ie \\n[float*tbl] \{\
+\!. ll \\n[TW]u+\\n[ind-pre-tbl]u
+\!. in \\n[tmp-ind]u+\\n[ind-pre-tbl]u
+\!. ti -\\n[tmp-ind]u
+. \}
+. el \{\
+. ll \\n[TW]u+\\n[ind-pre-tbl]u
+\!. in \\n[tmp-ind]u
+\!. ti -\\n[tmp-ind]u
+. \}
+. \}
+. \}
+. \}
+. \}
+. \}
+.END
+\#
+.ALIAS TBL*SET_CAPTION_QUAD SET_QUAD
+.ALIAS TBL*SET_LABEL_QUAD SET_QUAD
+.ALIAS TBL*SET_SOURCE_QUAD SET_QUAD
+.ALIAS PDF_IMG*SET_CAPTION_QUAD SET_QUAD
+.ALIAS PDF_IMG*SET_LABEL_QUAD SET_QUAD
+.ALIAS PIC*SET_CAPTION_QUAD SET_QUAD
+.ALIAS PIC*SET_LABEL_QUAD SET_QUAD
+\#
+.MAC style END
+. ds label-type \\$0
+. substring label-type 0 2
+. if '\\*[label-type]'img' .ds label-type pdf-img
+. if '\\*[label-type]'tbl' .ds label-type tbl
+. if '\\*[label-type]'pic' .ds label-type pic
+. ds spec-type \\$0
+. substring spec-type 4 6
+. if '\\*[spec-type]'cap' .ds spec-type caption
+. if '\\*[spec-type]'lab' .ds spec-type label
+. if '\\*[spec-type]'sou' .ds spec-type source
+. ie \\n[#PRINT_STYLE]=1 .TYPEWRITER
+. el \{\
+' fam \\*[\\*[label-type]*\\*[spec-type]-family]
+' ft \\*[\\*[label-type]*\\*[spec-type]-font]
+' ps \\n[#DOC_PT_SIZE]u\\*[\\*[label-type]*\\*[spec-type]-size-change]
+. \m[\\*[\\*[label-type]*\\*[spec-type]-color]]
+. \}
+.END
+\#
+.ALIAS tbl*caption-style style
+.ALIAS tbl*label-style style
+.ALIAS tbl*source-style style
+.ALIAS img*caption-style style
+.ALIAS img*label-style style
+.ALIAS img*source-style style
+.ALIAS pic*caption-style style
+.ALIAS pic*label-style style
+.ALIAS pic*source-style style
+\#
+\# User style macros
+\#
+\# TYPE SPECS FOR LABELS, CAPTIONS, AND SOURCES
+\# --------------------------------------------
+\# Aliased as CAPTIONS and LABELS for eqn, pic, tbl, and pdf images.
+\# *Arguments:
+\# EQN | IMG | PIC | TBL | FLOATING \
+\# Remaining arguments are optional
+\# FAMILY fam \
+\# FONT sty \
+\# SIZE +|-size \
+\# QUAD LEFT | CENTRE | RIGHT [ ON_LL ] \
+\# COLOR color \
+\# AUTOLEAD n \
+\# ADJUST +|-n
+\# *Function:
+\# Sets type specs for captions, labels, and sources according to
+\# calling alias name
+\# *Notes:
+\# SIZE is relative to running text.
+\# QUAD optional arg says quad on full line length rather than
+\# pdf-img or pre-processor output.
+\#
+.MAC CAPTION_LABEL_SPECS END
+. if '\\$0'CAPTIONS' .ds spec-type caption
+. if '\\$0'LABELS' .ds spec-type label
+. if '\\$0'SOURCES' .ds spec-type source
+. ds $LABEL-TYPE \\$1
+. if '\\$1'EQN' .ds label-type eqn
+. if '\\$1'FLOATING' .ds label-type floating
+. if '\\$1'IMG' .ds label-type pdf-img
+. if '\\$1'PIC' .ds label-type pic
+. if '\\$1'TBL' .ds label-type tbl
+. if '\\$1'ALL' .nr all 1
+. shift
+. nr loop-counter \\n[#NUM_ARGS]
+. nr loop-count 0 1
+. while \\n+[loop-count]<=\\n[loop-counter] \{\
+. if '\\$1'FAMILY' \{\
+. shift
+. ie r all \{\
+. nr all 0 1
+. while \\n+[all]<=5 \{\
+. get-label-type
+. ds \\*[label-type]*\\*[spec-type]-family \\$1
+. \}
+. \}
+. el .ds \\*[label-type]*\\*[spec-type]-family \\$1
+. if \\n[#PRINT_STYLE]=1 \
+. ds \\*[label-type]*\\*[spec-type]-family \\*[$TYPEWRITER_FAM]
+. shift
+. \}
+. if '\\$1'FONT' \{\
+. shift
+. ie r all \{\
+. nr all 0 1
+. while \\n+[all]<=5 \{\
+. get-label-type
+. ds \\*[label-type]*\\*[spec-type]-font \\$1
+. \}
+. \}
+. el .ds \\*[label-type]*\\*[spec-type]-font \\$1
+. if \\n[#PRINT_STYLE]=1 \
+. ds \\*[label-type]*\\*[spec-type]-font R
+. shift
+. \}
+. if '\\$1'SIZE' \{\
+. shift
+. ie r all \{\
+. nr all 0 1
+. while \\n+[all]<=5 \{\
+. get-label-type
+. ds \\*[label-type]*\\*[spec-type]-size-change \\$1
+. \}
+. \}
+. el .ds \\*[label-type]*\\*[spec-type]-size-change \\$1
+. if \\n[#PRINT_STYLE]=1 \
+. ds \\*[label-type]*\\*[spec-type]-size-change +0
+. shift
+. \}
+. if '\\$1'AUTOLEAD' \{\
+. shift
+. ie r all \{\
+. nr all 0 1
+. while \\n+[all]<=5 \{\
+. get-label-type
+. nr \\*[label-type]*\\*[spec-type]-autolead (p;\\$1)
+. \}
+. \}
+. el .nr \\*[label-type]*\\*[spec-type]-autolead (p;\\$1)
+. shift
+. \}
+. if '\\$1'QUAD' \{\
+. shift
+. ie r all \{\
+. nr all 0 1
+. while \\n+[all]<=5 \{\
+. get-label-type
+. ds \\*[label-type]*\\*[spec-type]-quad \\$1
+. substring \\*[label-type]*\\*[spec-type]-quad 0 0
+. if '\\$2'ON_LL' \
+. nr \\*[label-type]*\\*[spec-type]-quad-on-ll 1
+. \}
+. \}
+. el \{\
+. ds \\*[label-type]*\\*[spec-type]-quad \\$1
+. substring \\*[label-type]*\\*[spec-type]-quad 0 0
+. if \\n[\\*[label-type]*\\*[spec-type]-quad-on-ll] \
+. rr \\*[label-type]*\\*[spec-type]-quad-on-ll
+. if '\\$2'ON_LL' \
+. nr \\*[label-type]*\\*[spec-type]-quad-on-ll 1
+. \}
+. ie '\\$2'ON_LL' .shift 2
+. el .shift
+. \}
+. if '\\$1'COLOR' \{\
+. shift
+. ie r all \{\
+. nr all 0 1
+. while \\n+[all]<=5 \{\
+. get-label-type
+. ds \\*[label-type]*\\*[spec-type]-color \\$1
+. \}
+. \}
+. el .ds \\*[label-type]*\\*[spec-type]-color \\$1
+. if \\n[#PRINT_STYLE]=1 \
+. ds \\*[label-type]*\\*[spec-type]-color black
+. shift
+. \}
+. if '\\$1'ADJUST' \{\
+. shift
+. ie r all \{\
+. nr all 0 1
+. while \\n+[all]<=5 \{\
+. get-label-type
+. ds \\*[label-type]*\\*[spec-type]-space \\$1
+. \}
+. \}
+. el .ds \\*[label-type]*\\*[spec-type]-space \\$1
+. if \\n[#PRINT_STYLE]=1 \
+. ds \\*[label-type]*\\*[spec-type]-space +0
+. shift
+. \}
+. if '\\$1'INDENT' \{\
+. shift
+. ie '\\*[label-type]'floating' \{\
+. ie \B'\\$1' \{\
+. nr \\*[label-type]*\\*[spec-type]-indent-l \\$1
+. shift
+. \}
+. el \{\
+. ie '\\$1'RIGHT' \{\
+. shift
+. nr \\*[label-type]*\\*[spec-type]-indent-r \\$1
+. shift
+. \}
+. el \{\
+. tm1 \
+"[mom]: Missing value for INDENT in macro '\\$0' at line \\n[.c].
+. ab \
+[mom]: Aborting '\\n[.F]' at \\$0, line \\n[.c].
+. \}
+. \}
+. \}
+. el \{\
+. shift
+. if !\\n[#SKIP_INDENT_WARNING] \{\
+. tm1 \
+"[mom]: '\\$0 \\*[$LABEL-TYPE]' at line \\n[.c] does not take an indent.
+. tm1 \
+" No indent(s) will be applied.
+. nr #SKIP_INDENT_WARNING 1
+. \}
+. if '\\$1'INDENT' .shift
+. if '\\$1'RIGHT' .shift
+. if \B'\\$1' .shift
+. \}
+. \}
+. \}
+. ie r all \{\
+. nr all 0 1
+. while \\n+[all]<=5 \{\
+. get-label-type
+. set-defaults
+. set-inline-specs
+. \}
+. \}
+. el \{\
+. set-defaults
+. set-inline-specs
+. \}
+. ds revert-specs \f[]\s[0]\m[]
+. rr #SKIP_INDENT_WARNING
+. rr all
+.END
+.
+.ALIAS CAPTIONS CAPTION_LABEL_SPECS
+.ALIAS LABELS CAPTION_LABEL_SPECS
+.ALIAS SOURCES CAPTION_LABEL_SPECS
+\#
+\# LABELS and CAPTIONS (floats and [block]quotes)
+\# ----------------------------------------------
+\# *Arguments:
+\# <text of label or caption> [ CAPTION <text of caption> ] \
+\# [ TO_LIST FIGURES | EQUATIONS | TABLES ]
+\# *Function:
+\# Add label/caption to float, quotes, and blockquotes
+\# *Notes:
+\# Aliased as CAPTION. If called as CAPTION, prints all
+\# double-quoted text strings including ".br" or ".sp";
+\# may come at top or bottom of labelled object, or both.
+\# If called as LABEL, optional arg CAPTION attaches caption
+\# text to the label; may only come at bottom of object and
+\# can only take one double-quoted text string.
+\#
+\# These strings allow users to create labels of the form
+\# 'Fig. \*[chapter].\*[fig-label]', e.g. 'Fig. 1.1'
+\#
+.ds chapter \\n[#CH_NUM]
+.ds fig-label \\n+[fig*label-num]
+.ds tbl-label \\n+[tbl*label-num]
+.ds eqn-label \\n+[eqn*label-num]
+\#
+\#
+.MAC LABEL END
+. br
+. if \\n[.ns] \{\
+. vpt 0
+. rs
+. nop \&
+. sp -1
+. vpt
+. \}
+. if r chop-space .sp -1
+. rr chop-space
+. if \\n[#QUOTE] .nr q-float 1
+. if '\\$0'CAPTION' \{\
+. ds labelcap caption
+. ds $FLOATING_CAPTION \\$*
+. \}
+. if '\\$0'LABEL' \{\
+. ds labelcap label
+. ds $FLOATING_LABEL \\$1
+. shift
+. nr loop-counter 0 1
+. nr loop-count \\n[#NUM_ARGS]
+. while \\n+[loop-counter]<=\\n[loop-count] \{\
+. if '\\$1'CAPTION' \{\
+. nr with-caption 1
+. ds $FLOATING_CAPTION \\$2
+. shift 2
+. \}
+. if '\\$1'SHORT_CAPTION' \{\
+. ds $LIST_CAPTION \\$2
+. shift 2
+. \}
+. if '\\$1'TO_LIST' \{\
+. nr to-list 1
+. if '\\$2'FIGURES' .ds $LIST_OF FIGURES
+. if '\\$2'EQUATIONS' .ds $LIST_OF EQUATIONS
+. if '\\$2'TABLES' .ds $LIST_OF TABLES
+. shift 2
+. \}
+. \}
+. \}
+. if \\n[D-float] \
+. if \\n[.d]>\\n[D-float] \
+. sp \\n[.d]u-\\n[D-float]u
+. rr has-\\*[labelcap]
+. nr has-\\*[labelcap] 1
+. rr @bottom
+. if !\\n[.d]=0 .nr @bottom 1
+. ds ev-current \\n[.ev]
+. ev floating*labelcap
+. evc \\*[ev-current]
+. ps \\n[#DOC_PT_SIZE]u
+. if \\n[floating*\\*[labelcap]-indent-l] \
+. in \\n[floating*\\*[labelcap]-indent-l]u
+. if \\n[floating*\\*[labelcap]-indent-r] \
+. ll -\\n[floating*\\*[labelcap]-indent-r]u
+. ds $QUAD_PREV \\*[$QUAD_VALUE]
+. QUAD \\*[floating*\\*[labelcap]-quad]
+.\" 1/4 space before both captions and labels
+\!. if \\\\n[nl]=\\\\n[#PAGE_TOP] .nr deferred-float 1
+. if !\\n[deferred-float] \{\
+. ie !\\n[@bottom] \{\
+. ie '\\n[.z]'' \
+. sp \\n[#DOC_LEAD]u/4u
+. el \
+. if '\\n[.z]'FLOAT*DIV' .sp \\n[#DOC_LEAD]u/4u
+. \}
+. el \{\
+. sp \\n[#DOC_LEAD]u/4u
+. rr @bottom
+. \}
+. \}
+\!. if \\\\n[deferred-float] \{\
+. if !\\n[#QUOTE] .sp -(\\n[#DOC_LEAD]u/4u)
+\!. \}
+. nr floating*\\*[labelcap]-lead-diff \\n[.v]
+. vs \\n[.ps]u+\\n[floating*\\*[labelcap]-autolead]u
+. nr floating*\\*[labelcap]-lead-diff \
+ \\n[floating*\\*[labelcap]-lead-diff]-\\n[.v]
+. if !\\n[deferred-float] \
+. RESTORE_SPACE
+. ie '\\*[labelcap]'label' \{\
+. if \\n[to-list] \{\
+.\" Strip prefix from label if list-type is being autolabelled
+.\" Becomes $LIST_LABEL
+. if '\\*[$LIST_OF]'FIGURES' \
+. if r fig*label-num .STRIP_PRFX_SFFX "\\*[$FLOATING_LABEL]"
+. if '\\*[$LIST_OF]'TABLES' \
+. if r tbl*label-num .STRIP_PRFX_SFFX "\\*[$FLOATING_LABEL]"
+. if '\\*[$LIST_OF]'EQUATIONS' \
+. if r eqn*label-num .STRIP_PRFX_SFFX "\\*[$FLOATING_LABEL]"
+. \}
+. ds $FLOATING_LABEL \
+\F[\\\\*[floating*label-family]]\
+\f[\\\\*[floating*label-font]]\
+\s[\\\\*[floating*label-size-change]]\
+\m[\\\\*[floating*label-color]]\
+\\*[$FLOATING_LABEL]
+. \}
+. el \{\
+. if !\\n[deferred-float] \
+. sp \\n[floating*caption-lead-diff]u
+. if !'\\*[floating*caption-space]'' \
+. sp \\*[floating*caption-space]
+. while !'\\$1'' \{\
+. nop \
+\F[\\*[floating*caption-family]]\
+\f[\\*[floating*caption-font]]\
+\s[\\*[floating*caption-size-change]]\
+\m[\\*[floating*caption-color]]\
+\\$1
+. if \\n[.u]=1 .br
+. shift
+. \}
+. if !'\\*[floating*caption-space]'' \
+. sp -\\*[floating*caption-space]
+. \}
+. if \\n[with-caption] \{\
+. nr width-label \w'\\*[$FLOATING_LABEL]'
+. if !\\n[width-label]=0 \
+. as $FLOATING_LABEL \0
+. as $FLOATING_LABEL \
+\F[\\\\*[floating*caption-family]]\
+\f[\\\\*[floating*caption-font]]\
+\s[\\\\*[floating*caption-size-change]]\
+\m[\\\\*[floating*caption-color]]\
+\\*[$FLOATING_CAPTION]
+. if '\\*[$LIST_CAPTION]'' \
+. ds $LIST_CAPTION \\*[$FLOATING_CAPTION]
+. \}
+. if !'\\*[$FLOATING_LABEL]'' \{\
+. sp \\n[floating*label-lead-diff]u
+. if !'\\*[floating*label-space]'' \
+. sp \\*[floating*label-space]
+. nop \\*[$FLOATING_LABEL]
+. if \\n[.u]=1 .br
+. if !'\\*[floating*label-space]'' \
+. sp -\\*[floating*label-space]
+. \}
+.\" 1/4 space after captions and labels
+. ie !\\n[@bottom] \
+. sp \\n[#DOC_LEAD]u/4u
+. el \{\
+. if '\\n[.z]'FLOAT*DIV' \{\
+. sp \\n[#DOC_LEAD]u/4u
+\!. if \\\\n[deferred-float] \
+. sp -(\\n[#DOC_LEAD]u/4u)
+. \}
+. \}
+\!. rr deferred-float
+. ll
+. vs
+. QUAD \\*[$QUAD_PREV]
+. in
+. ev
+. if \\n[to-list] \{\
+. nr loop-counter 0 1
+. nr loop-count 2
+. ds labelcap label
+. while \\n+[loop-counter]<=\\n[loop-count] \{\
+. ds \\*[labelcap]-family \\*[floating*\\*[labelcap]-family]
+. ds \\*[labelcap]-font \\*[floating*\\*[labelcap]-font]
+. ds \\*[labelcap]-size-change \\*[floating*\\*[labelcap]-size-change]
+. ds \\*[labelcap]-color \\*[floating*\\*[labelcap]-color]
+. ie '\\*[$LISTS_FAM]'' \
+. ds floating*\\*[labelcap]-family \\*[$DOC_FAM]
+. el \
+. ds floating*\\*[labelcap]-family \\*[$LISTS_FAM]
+. if '\\*[$LISTS_FT]'' \
+. ds floating*\\*[labelcap]-font R
+. ds floating*\\*[labelcap]-size-change +0
+. ds floating*\\*[labelcap]-color pdf:href.colour
+. ds labelcap caption
+. \}
+. ie '\\*[$LIST_LABEL]'' .TO_\\*[$LIST_OF] "\\*[$FLOATING_LABEL]
+. el .TO_\\*[$LIST_OF] "\\*[$LIST_LABEL]" "\\*[$LIST_CAPTION]
+. rr to-list
+. nr loop-counter 0 1
+. nr loop-count 2
+. ds labelcap label
+. while \\n+[loop-counter]<=\\n[loop-count] \{\
+. ds floating*\\*[labelcap]-family \\*[\\*[labelcap]-family]
+. ds floating*\\*[labelcap]-font \\*[\\*[labelcap]-font]
+. ds floating*\\*[labelcap]-size-change \\*[\\*[labelcap]-size-change]
+. ds floating*\\*[labelcap]-color \\*[\\*[labelcap]-color]
+. ds labelcap caption
+. \}
+. \}
+. rr with-caption
+. rm $FLOATING_CAPTION
+. rm $FLOATING_LABEL
+. rm $LIST_LABEL
+. rm $LIST_CAPTION
+.END
+.
+.ALIAS CAPTION LABEL
+.
+.MAC STRIP_PRFX_SFFX END
+.\" Strip suffix from label string
+. ds suffix \\$1
+. substring suffix -1
+.\" If suffix is '.' ',' ':' or ')', remove it.
+. if '\\*[suffix]'.' .nr strip-suffix 1
+. if '\\*[suffix]',' .nr strip-suffix 1
+. if '\\*[suffix]':' .nr strip-suffix 1
+. if '\\*[suffix]')' .nr strip-suffix 1
+. if \\n[strip-suffix] \{\
+. ds $LIST_LABEL \\$1
+. substring $LIST_LABEL 0 -2
+. \}
+. rr strip-suffix
+. if '\\*[$LIST_LABEL]'' .ds $LIST_LABEL \\$1
+.\" Remove prefix (e.g. "Fig. ") by looping through $LIST_LABEL
+.\" until a digit is encountered
+. nr loop-counter 100 \" arbitrary
+. nr loop-count 0 1
+. while \\n+[loop-count]<=\\n[loop-counter] \{\
+. substring $LIST_LABEL 1
+. if \B'\\*[$LIST_LABEL]' .break
+. \}
+. substring $LIST_LABEL 1
+.END
+\#
+\# CAPTION_AFTER_LABEL
+\# -------------------
+\# *Arguments:
+\# <none> | <anything>
+\# *Function:
+\# Sets register indicating non-MLA captions should come after labels.
+\#
+.MAC CAPTION_AFTER_LABEL END
+. if '\\$1'IMG' .ds type pdf-img
+. if '\\$1'PIC' .ds type pic
+. if '\\$1'TBL' .ds type tbl
+. if !\\n[#MLA] \{\
+. nr \\*[type]*caption-after-label 1
+. if '\\$1'ALL' \{\
+. nr pdf-img*caption-after-label 1
+. nr tbl*caption-after-label 1
+. nr pic*caption-after-label 1
+. \}
+. if !'\\$2'' \{\
+. ie !'\\$1'ALL' .rr \\*[type]*caption-after-label
+. el \{\
+. rr pdf-img*caption-after-label
+. rr tbl*caption-after-label
+. rr pic*caption-after-label
+. \}
+. \}
+. \}
+.END
+\#
+\# AUTOLABELLING
+\# -------------
+\# *Argument:
+\# [ PREFIX <prefix> SUFFIX <suffix> ] | <anything>
+\# *Function:
+\# Turns label autonumbering on of off; optionally lets user set
+\# prefix and suffix for labels.
+\# *Notes:
+\# Aliased for images (pdf), tbl, pic, and eqn.
+\#
+.MAC AUTOLABEL END
+. if '\\$0'AUTOLABEL_EQUATIONS' .ds label-type eqn
+. if '\\$0'AUTOLABEL_TABLES' .ds label-type tbl
+. if '\\$0'AUTOLABEL_PIC' \{\
+. ds label-type pic
+. nr fig*autolabel 1
+. \}
+. if '\\$0'AUTOLABEL_IMAGES' \{\
+. ds label-type pdf-img
+. nr fig*autolabel 1
+. \}
+. if !'\\$1'' \{\
+. ds \\*[label-type]-label-args \\$1
+. substring \\*[label-type]-label-args -1 -3
+. \}
+. if '\\*[\\*[label-type]-label-args]'FIX' .nr \\*[label-type]-label-args 1
+. if '\\*[\\*[label-type]-label-args]'TER' .nr \\*[label-type]-label-args 1
+. if !\\n[\\*[label-type]*label-num] \
+. nr \\*[label-type]*label-num 0 1
+. if '\\*[label-type]'pdf-img' \
+. if !\\n[fig*label-num] .nr fig*label-num 0 1
+. if '\\*[label-type]'pic' \
+. if !\\n[pic*label-num] .nr fig*label-num 0 1
+. nr \\*[label-type]*autolabel 1
+. nr loop-counter 0 1
+. nr loop-count \\n[#NUM_ARGS]
+. while \\n+[loop-counter]<=\\n[loop-count] \{\
+. if '\\$1'PREFIX' \{\
+. ds \\*[label-type]*label-prfx \\$2
+. nr \\*[label-type]*label-prfx-set 1
+. shift 2
+. \}
+. if '\\$1'SUFFIX' \{\
+. ds \\*[label-type]*label-sffx \\$2
+. nr \\*[label-type]*label-sffx-set 1
+. shift 2
+. \}
+. if '\\$1'PREFIX_CHAPTER' \{\
+. if \\n[fig*autolabel] .nr fig*label-with-chapter 1
+. nr \\*[label-type]*label-with-chapter 1
+. shift 1
+. if \B'\\$1' \{\
+. nr #CH_NUM \\$1
+. shift
+. \}
+. \}
+. \}
+. if '\\*[\\*[label-type]*label-prfx]'' \{\
+. if '\\*[label-type]'eqn' \
+. if !\\n[\\*[label-type]*label-prfx-set] \
+. ds \\*[label-type]*label-prfx (\"
+. if '\\*[label-type]'pic' \
+. if !\\n[\\*[label-type]*label-prfx-set] \
+. ds \\*[label-type]*label-prfx Fig. \"
+. if '\\*[label-type]'pdf-img' \
+. if !\\n[\\*[label-type]*label-prfx-set] \
+. ds \\*[label-type]*label-prfx Fig. \"
+. if '\\*[label-type]'tbl' \
+. if !\\n[\\*[label-type]*label-prfx-set] \
+. ds \\*[label-type]*label-prfx Table \"
+. \}
+. if '\\*[\\*[label-type]*label-sffx]'' \{\
+. if '\\*[label-type]'eqn' \
+. if !\\n[\\*[label-type]*label-sffx-set] \
+. ds \\*[label-type]*label-sffx )\"
+. if '\\*[label-type]'pic' \
+. if !\\n[\\*[label-type]*label-sffx-set] \
+. ds \\*[label-type]*label-sffx .\"
+. if '\\*[label-type]'pdf-img' \
+. if !\\n[\\*[label-type]*label-sffx-set] \
+. ds \\*[label-type]*label-sffx .\"
+. if '\\*[label-type]'tbl' \
+. if !\\n[\\*[label-type]*label-sffx-set] \
+. ds \\*[label-type]*label-sffx .\"
+. \}
+. if \\n[\\*[label-type]-label-args]>0 \{\
+. if \\n[\\*[label-type]*label-prfx-set]+\\n[\\*[label-type]*label-sffx-set]=1 \{\
+. ie (\\n[\\*[label-type]*label-prfx-set]=1)&(\\n[\\*[label-type]*label-sffx-set]=0) \
+. ds missing-arg SUFFIX
+. el .ds missing-arg PREFIX
+. tm1 "[mom]: You must supply a \\*[missing-arg] argument to \\$0.
+. tm1 " If you wish the \\*[missing-arg] to be blank, use \\*[missing-arg] "".
+. ab [mom]: Aborting '\\n[.F]' at \\$0, line \\n[.c].
+. \}
+. \}
+. if \\n[#NUM_ARGS]=1 \{\
+. rr fig*autolabel
+. rr \\*[label-type]*autolabel
+. rr \\*[label-type]*label-prfx-set
+. rr \\*[label-type]*label-sffx-set
+. \}
+. rr \\*[label-type]-label-args
+.END
+\#
+.ALIAS AUTOLABEL_EQUATIONS AUTOLABEL
+.ALIAS AUTOLABEL_IMAGES AUTOLABEL
+.ALIAS AUTOLABEL_PIC AUTOLABEL
+.ALIAS AUTOLABEL_TABLES AUTOLABEL
+\#
+\# SET AUTOLABEL NUMBER
+\# --------------------
+\# *Argument:
+\# FIG | TBL | PIC | EQN <n>
+\# *Function:
+\# Sets the autolabel number for the corresponding label type.
+\# *Notes:
+\# Used to set autolabel number when manual labelling of floats
+\# (in conjunction with TO_LIST) disrupts auto-incrementing.
+\#
+.MAC SET_AUTOLABEL END
+. rm labelnum-type
+. if '\\$1'FIG' .ds labelnum-type fig
+. if '\\$1'TBL' .ds labelnum-type tbl
+. if '\\$1'PIC' .ds labelnum-type pic
+. if '\\$1'EQN' .ds labelnum-type eqn
+. nr labelnum \\$2-1
+. nr \\*[labelnum-type]*label-num \\n[labelnum] 1
+.END
+\#
+\# MLA STYLE
+\# ---------
+\# *Argument:
+\# <none> | <anything>
+\# *Function:
+\# Sets or removes register #MLA.
+\# *Notes:
+\# MLA formatting differs from other styles wrt caption and
+\# label placement.
+\#
+.MAC MLA END
+. ie '\\$1'' \{\
+. nr #MLA 1
+. nr pdf-img*caption-after-label 1
+. nr pic*caption-after-label 1
+. rr tbl*caption-after-label
+. \}
+. el \
+. rr #MLA
+.END
+\#
+.MAC mla@error END
+. tm1 "[mom]: MLA style enabled, but \\$1 has no corresponding \\$2.
+. ab [mom]: Aborting '\\$3' at \\$4, line \\$5.
+.END
+\#
+\# LISTS_OF
+\# --------
+\# *Aliases:
+\# LIST_OF_EQUATIONS
+\# LIST_OF_FIGURES
+\# LIST_OF_TABLES
+\# *Arguments:
+\# [ TITLE_STRING <string> ] [ START_PAGENUM <pagenumber> ]
+\# *Function:
+\# Generates lists-of based on calling alias.
+\# *Notes:
+\# Called at end of file.
+\# If after TOC, and TOC is being auto-relocated, lists are also
+\# relocated. If called before, lists are output at end of file.
+\#
+.MAC LISTS_OF END
+. EOL
+. ds $LIST_TYPE \\$0
+. nr #LISTS 1
+. substring $LIST_TYPE -1 -4
+. if '\\*[$LIST_TYPE]'URES' \{\
+. ds $LIST_TYPE FIGURES
+. ds list-type fig
+. ds label-type fig
+. ds \\*[$LIST_TYPE]_TITLE_STRING "List of Figures
+. \}
+. if '\\*[$LIST_TYPE]'BLES' \{\
+. ds $LIST_TYPE TABLES
+. ds list-type tbl
+. ds label-type tbl
+. ds \\*[$LIST_TYPE]_TITLE_STRING "List of Tables
+. \}
+. if '\\*[$LIST_TYPE]'IONS' \{\
+. ds $LIST_TYPE EQUATIONS
+. ds list-type eqn
+. ds label-type eqn
+. ds \\*[$LIST_TYPE]_TITLE_STRING "List of Equations
+. \}
+. nr #LIST_OF_\\*[$LIST_TYPE] 1
+. nr loop-count 0 1
+. nr loop-counter \\n[#NUM_ARGS]
+. while \\n+[loop-count]<=\\n[loop-counter] \{\
+. if '\\$1'TITLE_STRING' \{\
+. ds \\*[$LIST_TYPE]_TITLE_STRING \\$2
+. shift 2
+. \}
+. if '\\$1'START_PAGENUM' \{\
+. nr #\\*[$LIST_TYPE]_START_PAGENUM \\$2
+. shift 2
+. \}
+. \}
+. if dPDF.EXPORT \
+. if \\n[#FLEX_ACTIVE] \
+. if !\\n[#NO_FLEX] \
+. tm .ds pre-list-\\n%@\\n[#COL_NUM] 1
+. char \[leader] " .
+. LEADER_CHARACTER \[leader]
+. if \\n[#LINENUMBERS]=1 \{\
+. NUMBER_LINES OFF
+. nr #LINENUMBERS 2
+. \}
+. if \\n[#FINIS] \{\
+. if \\n[#FOOTERS_WERE_ON] \
+. FOOTERS
+. \}
+. if \\n[#FOOTERS_ON]=1 \{\
+. if !'\\*[$HDRFTR_CENTER_OLD]'' .ds $HDRFTR_CENTER \\*[$HDRFTR_CENTER_OLD]
+. ie \\n[#LISTS_NO_PAGENUM]=1 .PAGINATION OFF
+. el .PAGINATE
+. \}
+. if \\n[#FOOTERS_WERE_ON] \
+. if !\\n[#FINIS] .FOOTERS OFF
+. rr #COLUMNS
+. COLLATE
+. if \\n[#PRINT_STYLE]=1 \{\
+. if \\n[#SINGLE_SPACE] .LS 24
+. DOC_LEAD_ADJUST
+. \}
+. if \\n[#FINIS] \{\
+. if \\n[#FOOTERS_WERE_ON] .FOOTERS
+. rr #FOOTERS_WERE_ON
+. if \\n[#PAGINATION_WAS_ON] \{\
+. nr #PAGINATE 1
+. rr #PAGINATION_WAS_ON
+. \}
+. rr #FINIS
+. \}
+. ds $HDRFTR_CENTER \\*[$HDRFTR_CENTER_NEW]
+. rm $HDRFTR_CENTER_OLD
+. rm $HDRFTR_CENTER_NEW
+. rr #COLLATED_DOC
+. DOCTYPE DEFAULT
+. DOCHEADER
+. rr #DOCHEADER_ADVANCE
+. TITLE "\\*[\\*[$LIST_TYPE]_TITLE_STRING]
+. AUTHOR ""
+. L_MARGIN \\n[#DOC_L_MARGIN]u
+. LL \\n[#DOC_L_LENGTH]u
+. if '\\*[$LISTS_FAM]'' \
+. ds $LISTS_FAM \\*[$TOC_FAM]
+. if '\\*[$LISTS_FT]'' \
+. ds $LISTS_FT \\*[$TOC_TITLE_FT]
+. if !\\n[#LISTS_PS] \
+. nr #LISTS_PS \\n[#TOC_PS]
+. ps \\n[#LISTS_PS]u
+. if !\\n[#LISTS_LEAD] \
+. nr #LISTS_LEAD \\n[#TOC_LEAD]
+. if \\n[#PRINT_STYLE]=2 \{\
+. ie \\n[#LISTS_LEAD_ADJUST]=1 \{\
+. nr #DOC_LEAD \\n[#LISTS_LEAD]
+. DOC_LEAD_ADJUST
+. TRAPS
+. \}
+. el \{\
+. nr #DOC_LEAD \\n[#LISTS_LEAD]
+. DOC_LEAD_ADJUST OFF
+. \}
+. \}
+. ie !'\\*[$LISTS_TITLE_QUAD]'' \
+. DOCHEADER_QUAD \\*[$LISTS_TITLE_QUAD]
+. el .DOCHEADER_QUAD \\*[$TOC_HEADER_QUAD]
+. if !'\\*[$LISTS_TITLE_FAM]'' \
+. TITLE_FAMILY \\*[$LISTS_TITLE_FAM]
+. if !'\\*[$LISTS_TITLE_FT]'' \
+. TITLE_FONT \\*[$LISTS_TITLE_FT]
+. if !'\\*[$LISTS_TITLE_SIZE]'' \
+. TITLE_SIZE \\*[$LISTS_TITLE_SIZE]
+. if !'\\*[$LISTS_TITLE_COLOR]'' \
+. TITLE_COLOR \\*[$LISTS_TITLE_COLOR]
+. if \\n[#LISTS_TITLE_CAPS] \
+. TITLE_CAPS
+. if \\n[#LISTS_TITLE_SMALLCAPS] \
+. TITLE_SMALLCAPS
+. if \\n[#LISTS_TITLE_UNDERSCORE] \{\
+. TITLE_UNDERSCORE \
+\\*[DOUBLE] \
+\\*[$LISTS_OF_UL_WT] \
+\\*[$LISTS_OF_UL_GAP] \
+\\*[$LISTS_OF_RULE_GAP]
+. \}
+. if '\\*[$LISTS_PN_FAM]'' \
+. ds $LISTS_PN_FAM \\*[$TOC_PN_FAM]
+. if '\\*[$LISTS_PN_FT]'' \
+. ds $LISTS_PN_FT \\*[$TOC_PN_FT]
+. if '\\*[$LISTS_PN_SIZE_CHANGE]'' \
+. ds $LISTS_PN_SIZE_CHANGE \\*[$TOC_PN_SIZE_CHANGE]
+. if !\\n[#EQN_PN_PADDING] \
+. nr #EQN_PN_PADDING \\n[#TOC_PN_PADDING]
+. if !\\n[#FIG_PN_PADDING] \
+. nr #FIG_PN_PADDING \\n[#TOC_PN_PADDING]
+. if !\\n[#TBL_PN_PADDING] \
+. nr #TBL_PN_PADDING \\n[#TOC_PN_PADDING]
+. ie '\\*[$LISTS_PAGENUM_STYLE]'' \
+. PAGENUM_STYLE \\*[$TOC_PAGENUM_STYLE]
+. el \
+. PAGENUM_STYLE \\*[$LISTS_PAGENUM_STYLE]
+. if r #\\*[$LIST_TYPE]_START_PAGENUM \
+. PAGENUMBER \\n[#\\*[$LIST_TYPE]_START_PAGENUM]
+. if r #LISTS_NO_PAGENUM .PAGINATION off
+. HEADER_LEFT "\\*[$HDRFTR_LEFT]
+. HEADER_RIGHT "\\*[$HDRFTR_RIGHT]
+. HEADER_CENTER "\\*[\\*[$LIST_TYPE]_TITLE_STRING]
+. if \\n[#LINENUMBERS]=2 .nr #LINENUMBERS 3
+.\" Get num placeholders for ch. num and label num.
+. if \\n[\\*[list-type]*autolabel] \{\
+. if \\n[\\*[label-type]*label-with-chapter] \{\
+. if \\n[#CH_NUM]<1000 .nr chapno-width 3
+. if \\n[#CH_NUM]<100 .nr chapno-width 2
+. if \\n[#CH_NUM]<10 .nr chapno-width 1
+. \}
+. if \\n[\\*[list-type]*label-num]<1000 .nr label-width 3
+. if \\n[\\*[list-type]*label-num]<100 .nr label-width 2
+. if \\n[\\*[list-type]*label-num]<10 .nr label-width 1
+.\" Calculate width of label-num tab
+. nr label-width \\n[\\*[list-type]*label-width]
+. \}
+. if \\n[#SLANT_ON] .nop \\*[SLANTX]
+. if \\n[#COLUMNS]=1 .nr #COLUMNS 0
+. START
+. if \\n[#PRINT_STYLE]=2 .sp -1
+. if '\\*[$LIST_TYPE]'FIGURES' .LIST_OF_FIG
+. if '\\*[$LIST_TYPE]'TABLES' .LIST_OF_TBL
+. if '\\*[$LIST_TYPE]'EQUATIONS' .LIST_OF_EQN
+. if \\n[#LINENUMBERS]=3 \{\
+. NUMBER_LINES RESUME
+. nr #LINENUMBERS 1
+. nn 1
+. \}
+. rr #LISTS
+. pdfsync
+.END
+.\"
+.ALIAS LIST_OF_EQUATIONS LISTS_OF
+.ALIAS LIST_OF_FIGURES LISTS_OF
+.ALIAS LIST_OF_TABLES LISTS_OF
+\#
+\# LISTS-OF STYLE
+\# --------------
+\# *Arguments:
+\# FAMILY fam \
+\# FONT sty \
+\# PT_SIZE size \
+\# LEAD leading [ADJUST] \
+\# TITLE_FAMILY fam \
+\# TITLE_FONT sty \
+\# TITLE_SIZE +|-size \
+\# TITLE_QUAD LEFT | CENTER | RIGHT \
+\# TITLE_COLOR color \
+\# TITLE_CAPS \
+\# TITLE_NO_CAPS \
+\# TITLE_SMALLCAPS \
+\# TITLE_NO_SMALLCAPS \
+\# TITLE_UNDERSCORE [ DOUBLE] <wt> <gap> (dbl-rule-gap) \
+\# NO_PAGINATION \
+\# PAGENUM_STYLE format \
+\# PN_FAMILY fam \
+\# PN_FONT sty \
+\# PN_SIZE +|-size \
+\# PN_PADDING n
+\# *Function:
+\# Allows setting of all style parameters for lists-of.
+\# *Notes:
+\# Assumption is that lists-of will all have the same style.
+\# TOC style is used if LISTS_STYLE is omitted.
+\#
+.MAC LISTS_STYLE END
+. nr loop-count 0 1
+. nr loop-counter \\n[#NUM_ARGS]
+. while \\n+[loop-count]<=\\n[loop-counter] \{\
+. if '\\$1'FAMILY' \{\
+. ds $LISTS_FAM \\$2
+. shift 2
+. \}
+. if '\\$1'FONT' \{\
+. ds $LISTS_FT \\$2
+. shift 2
+. \}
+. if '\\$1'TITLE_FAMILY' \{\
+. ds $LISTS_TITLE_FAM \\$2
+. shift 2
+. \}
+. if '\\$1'TITLE_FONT' \{\
+. ds $LISTS_TITLE_FT \\$2
+. shift 2
+. \}
+. if '\\$1'TITLE_SIZE' \{\
+. ds $LISTS_TITLE_SIZE \\$2
+. shift 2
+. \}
+. if '\\$1'TITLE_QUAD' \{\
+. ds $LISTS_TITLE_QUAD \\$2
+. shift 2
+. \}
+. if '\\$1'TITLE_COLOR' \{\
+. ds $LISTS_TITLE_COLOR \\$2
+. shift 2
+. \}
+. if '\\$1'TITLE_CAPS' \{\
+. nr #LISTS_TITLE_CAPS 1
+. shift 1
+. \}
+. if '\\$1'TITLE_NO_CAPS' \{\
+. rr #LISTS_TITLE_CAPS
+. shift 1
+. \}
+. if '\\$1'TITLE_SMALLCAPS' \{\
+. nr #LISTS_TITLE_SMALLCAPS 1
+. shift 1
+. \}
+. if '\\$1'TITLE_NO_SMALLCAPS' \{\
+. rr #LISTS_TITLE_NO_SMALLCAPS
+. shift 1
+. \}
+.\" UNDERSCORE and UNDERLINE are identical, but we can't evaluate
+.\" the results of two string comparisons.
+. if '\\$1'TITLE_UNDERSCORE' \{\
+. nr #LISTS_TITLE_UNDERSCORE 1
+. shift
+. ie '\\$1'DOUBLE' \{\
+. ds DOUBLE DOUBLE
+. shift
+. if \B'\\$1' \{\
+. ds $LISTS_OF_UL_WT \\$1
+. shift
+. \}
+. if \B'\\$1' \{\
+. ds $LISTS_OF_UL_GAP \\$1
+. shift
+. \}
+. if \B'\\$1' \{\
+. ds $LISTS_OF_RULE_GAP \\$1
+. shift
+. \}
+. \}
+. el \{\
+. if \B'\\$1' \{\
+. ds $LISTS_OF_UL_WT \\$1
+. shift
+. \}
+. if \B'\\$1' \{\
+. ds $LISTS_OF_UL_GAP \\$1
+. shift
+. \}
+. \}
+. \}
+. if '\\$1'TITLE_UNDERLINE' \{\
+. nr #LISTS_TITLE_UNDERSCORE 1
+. shift
+. ie '\\$1'DOUBLE' \{\
+. ds DOUBLE DOUBLE
+. shift
+. if \B'\\$1' \{\
+. ds $LISTS_OF_UL_WT \\$1
+. shift
+. \}
+. if \B'\\$1' \{\
+. ds $LISTS_OF_UL_GAP \\$1
+. shift
+. \}
+. if \B'\\$1' \{\
+. ds $LISTS_OF_RULE_GAP \\$1
+. shift
+. \}
+. \}
+. el \{\
+. if \B'\\$1' \{\
+. ds $LISTS_OF_UL_WT \\$1
+. shift
+. \}
+. if \B'\\$1' \{\
+. ds $LISTS_OF_UL_GAP \\$1
+. shift
+. \}
+. \}
+. \}
+. if '\\$1'TITLE_NO_UNDERSCORE' \{\
+. rr #LISTS_TITLE_UNDERSCORE 1
+. rm DOUBLE
+. rm $LISTS_OF_UL_WT
+. rm $LISTS_OF_UL_GAP
+. rm $LISTS_OF_RULE_GAP
+. shift
+. \}
+. if '\\$1'TITLE_NO_UNDERLINE' \{\
+. rr #LISTS_TITLE_UNDERSCORE 1
+. rm DOUBLE
+. rm $LISTS_OF_UL_WT
+. rm $LISTS_OF_UL_GAP
+. rm $LISTS_OF_RULE_GAP
+. shift
+. \}
+. if '\\$1'PT_SIZE' \{\
+. nr #LISTS_PS (p;\\$2)
+. shift 2
+. \}
+. if '\\$1'LEAD' \{\
+. nr #LISTS_LEAD (p;\\$2)
+. ie !'\\$3'ADJUST' \{\
+. nr #LISTS_LEAD_ADJUST 0
+. shift 2
+. \}
+. el \{\
+. nr #LISTS_LEAD_ADJUST 1
+. shift 3
+. \}
+. \}
+. if '\\$1'NO_PAGINATION' \{\
+. nr #LISTS_NO_PAGENUM 1
+. shift 1
+. \}
+. if '\\$1'PAGENUM_STYLE' \{\
+. ds $LISTS_PAGENUM_STYLE \\$2
+. shift 2
+. \}
+. if '\\$1'PN_FAMILY' \{\
+. ds $LISTS_PN_FAM \\$2
+. shift 2
+. \}
+. if '\\$1'PN_FONT' \{\
+. ds $LISTS_PN_FT \\$2
+. shift 2
+. \}
+. if '\\$1'PN_SIZE' \{\
+. ds $LISTS_PN_SIZE_CHANGE \\$2
+. shift 2
+. \}
+. if '\\$1'EQN_PN_PADDING' \{\
+. nr #EQN_PN_PADDING \\$2
+. shift 2
+. \}
+. if '\\$1'FIG_PN_PADDING' \{\
+. nr #FIG_PN_PADDING \\$2
+. shift 2
+. \}
+. if '\\$1'TBL_PN_PADDING' \{\
+. nr #TBL_PN_PADDING \\$2
+. shift 2
+. \}
+. \}
+.END
+\#
+\# Lists-of collector
+\# Strings to allocate space for leaders and entry page numbers
+\#
+.ds $LISTS_PN \\*[ST102]\F[\\*[$LISTS_PN_FAM]]\f[\\*[$LISTS_PN_FT]]\
+\s[\\n[#LISTS_PS]u]^\\*[ST102X]\\*[ST103]\s[\\\\*[$LISTS_PN_SIZE_CHANGE]]\
+\h'.5m'\h'\w'0'u*\\\\n[#LISTS_PN_PADDING]u'\\*[ST103X]
+\#
+.ds $LISTS_PN_TYPEWRITE \\*[ST102]^\\*[ST102X]\\*[ST103]\|\
+\h'\w'\0'u*\\\\n[#LISTS_PN_PADDING]u'\\*[ST103X]
+\#
+.MAC LISTS_COLLECTOR END
+. nr #LISTS_ENTRY_PN \\n%+\\n[#PAGE_NUM_ADJ]
+. if \\n[#KERN] .nr #RESTORE_KERN 1
+. KERN OFF
+. if '\\$0'TO_EQUATIONS' \{\
+. ds list-type eqn
+. ds label-type eqn
+. da LIST_OF_EQN
+\!. nr #LISTS_PN_PADDING \\\\n[#EQN_PN_PADDING]
+. \}
+. if '\\$0'TO_FIGURES' \{\
+. ds list-type fig
+. ds label-type fig
+. if (\\n[pdf-img*have-label]=1):(\\n[pdf-img*autolabel]=1):\
+(\\n[pic*autolabel]=1):(\\n[pic*have-label]=1) \{\
+. nr \\*[label-type]*have-label 1
+. if !'\\*[pdf-img*label]'' .rn pdf-img*label \\*[label-type]*label
+. if !'\\*[pic*label]'' .rn pic*label \\*[label-type]*label
+. \}
+. da LIST_OF_FIG
+\!. nr #LISTS_PN_PADDING \\\\n[#FIG_PN_PADDING]
+. \}
+. if '\\$0'TO_TABLES' \{\
+. ds list-type tbl
+. ds label-type tbl
+. da LIST_OF_TBL
+\!. nr #LISTS_PN_PADDING \\\\n[#TBL_PN_PADDING]
+. \}
+. br
+. ie \\n[#PRINT_STYLE]=1 \{\
+\!. fam \\*[$TYPEWRITER_FAM]
+\!. ft R
+\!. ps \\*[$TYPEWRITER_PS]
+. ds _TYPEWRITE _TYPEWRITE
+. \}
+. el \{\
+\!. FAMILY \\\\*[$LISTS_FAM]
+\!. FONT \\\\*[$LISTS_FT]
+\!. ps \\\\n[#LISTS_PS]u
+. \}
+. if \\n[#PRINT_STYLE]=2 .rm _TYPEWRITE
+\!. PAD_MARKER ^
+\!. vpt 0
+. ie !\\n[\\*[label-type]*autolabel] \{\
+.\" If there is a label...
+. if !'\\*[\\*[label-type]*label]'' \
+\!. PAD \
+"\\*[ST100]\h'\w'\\*[\\*[label-type]*label]'u'\\*[ST100X]\0\\*[ST101]\h'\w'\\$2'u'\\*[ST101X]\\\\*[$LISTS_PN\\*[_TYPEWRITE]]" \
+"\*[PDFBOOKMARK.NAME]"
+.\" If there is no label...
+. if '\\*[\\*[label-type]*label]'' \
+\!. PAD \
+"\\*[ST100]\\*[ST100X]\\*[ST101]\h'\w'\\$1'u'\0\\*[ST101X]\\\\*[$LISTS_PN\\*[_TYPEWRITE]]" \
+"\*[PDFBOOKMARK.NAME]"
+. \}
+.\" If autolabelling...
+. el \
+\!. PAD \
+"\\*[ST100]\h'\\\\n[label-width]u'\\*[ST100X]\ \ \ \\*[ST101]\h'\w'\\$2'u'\\*[ST101X]\\\\*[$LISTS_PN\\*[_TYPEWRITE]]" \
+"\*[PDFBOOKMARK.NAME]"
+\!. PAD_MARKER #
+\!. EOL
+. ie !\\n[\\*[label-type]*autolabel] \
+\!. ST 100 L
+. el \
+\!. ST 100 R
+\!. ST 101 L
+\!. ST 102 L
+\!. ST 103 R
+. if \\n[#PRINT_STYLE]=2 \{\
+\!. FAMILY \\\\*[$LISTS_FAM]
+\!. FT \\\\*[$LISTS_FT]
+\!. ps \\\\n[#LISTS_PS]u
+. \}
+\!. TAB 100
+\!. PDF_LINK \\*[list-type]:\\n[lists*target] "\\$1"
+\!. TN
+\!. vpt 0
+\!. PDF_LINK \\*[list-type]:\\n[lists*target] "\\$2"
+\!. TN
+\!. vpt 0
+\!. PRINT \fR\\*[LEADER]\f[]
+\!. TN
+. if \\n[#PRINT_STYLE]=2 \{\
+\!. FAMILY \\\\*[$LISTS_PN_FAM]
+\!. FT \\\\*[$LISTS_PN_FT]
+\!. ps \\\\*[$LISTS_PN_SIZE_CHANGE]
+. \}
+\!. PRINT \\n[#LISTS_ENTRY_PN]
+\!. TQ
+\!. vpt
+. da
+. if \\n[#RESTORE_KERN] .KERN
+.END
+.
+.ALIAS TO_EQUATIONS LISTS_COLLECTOR
+.ALIAS TO_FIGURES LISTS_COLLECTOR
+.ALIAS TO_TABLES LISTS_COLLECTOR
+\#
+\# ***tbl***
+\#
+\# Support for multipage tables with headers borrowed from ms and
+\# mommified by Robin Haberkorn <robin.haberkorn@googlemail.com>
+\# with extensions by Peter Schaffter.
+\#
+.nr tbl*have-header 0
+.ds T&
+\#
+.MAC TS END
+. if \\n[.t]<\\n[#DOC_LEAD] .nr begin-tbl 1
+. br
+. rr tbl*pdfbx
+. if r pdfbx-top \{\
+. rt
+. sp (\\*[wt\\n[stack]]/2u)+\\*[gap\\n[stack]]u
+. \}
+. rr begin-tbl
+. rm tbl*caption
+. rm tbl*label
+. rr tbl*have-caption
+. rr tbl*have-label
+. rr tbl*have-header
+. rr float*tbl
+. rr tbl*boxed
+. nr ind-pre-tbl \\n[.i]
+. nr ll-pre-tbl \\n[.l]
+. nr lead-pre-tbl \\n[.v]
+. nr tbl*needs 1
+. nr doing-tbl 1
+. nf
+. if '\\n[.z]'FLOAT*DIV' .nr float*tbl 1
+. if !'\\n[.z]'FLOAT*DIV' \{\
+. if \\n[.t]=1 \{\
+. if (\\n[@TOP]=0)&(\\n[#START]=0) \{\
+. ie \\n[#COLUMNS] .COL_NEXT internal
+. el .NEWPAGE
+. \}
+. \}
+. \}
+. nr loop-count 0 1
+. nr loop-counter \\n[#NUM_ARGS]
+. ie \\n[#NUM_ARGS]=1 \{\
+. if '\\$1'H' \{\
+. nr tbl*have-header 1
+. nr tbl*plain 1
+. \}
+. \}
+. el \{\
+. while \\n+[loop-count]<=\\n[loop-counter] \{\
+. if '\\$1'H' \{\
+. nr tbl*have-header 1
+. shift
+. \}
+. if '\\$1'BOXED' \{\
+. nr tbl*boxed 1
+. shift
+. \}
+. if '\\$1'CENTER' \{\
+. if \\n[#INDENT_BOTH_ACTIVE] \{\
+. IBX
+. nr #RESTORE_INDENT_BOTH 1
+. \}
+. nr tbl*center 1
+. shift
+. \}
+. if '\\$1'CENTRE' \{\
+. if \\n[#INDENT_BOTH_ACTIVE] \{\
+. IBX
+. nr #RESTORE_INDENT_BOTH 1
+. \}
+. nr tbl*center 1
+. shift
+. \}
+. if '\\$1'NEEDS' \{\
+. nr tbl*needs \\$2
+. shift 2
+. \}
+. if '\\$1'NO_SHIM' \{\
+. nr tbl*no-shim 1
+. shift
+. \}
+. if '\\$1'NO_FLEX' \{\
+. nr tbl*no-flex 1
+. shift
+. \}
+. if '\\$1'ADJUST' \{\
+. ds tbl*space-adj \\$2
+. shift 2
+. \}
+. if '\\$1'CAPTION' \{\
+. nr tbl*have-caption 1
+. ds tbl*caption \\$2
+. shift 2
+. \}
+. if '\\$1'SHORT_CAPTION' \{\
+. ds tbl*caption-short \\$2
+. shift 2
+. \}
+. if '\\$1'LABEL' \{\
+. nr tbl*have-label 1
+. ds tbl*label \\$2
+. shift 2
+. \}
+. if '\\$1'TARGET' \{\
+. ds target "\\$2
+. PDF_TARGET "\\*[target]
+. shift 2
+. \}
+. \}
+. \}
+. if (\\n[tbl*have-caption]=0):(\\n[tbl*caption-after-label]=1) \{\
+. rr pdfbx-top
+. if \\n[tbl*boxed] .sp -1p
+. \}
+. if \\n[tbl*have-header] .nr tbl*needs +1
+. if (\\n[tbl*have-label]=1):(\\n[tbl*autolabel]=1) \
+. ds label-type tbl
+. if (\\n[tbl*have-caption]=1)&(\\n[tbl*have-header]=0) \
+. tbl*caption-warning
+. if \\n[tbl*boxed] \{\
+. if (\\n[tbl*have-label]=0)&(\\n[tbl*have-caption]=0)&\
+(\\n[tbl*autolabel]=0)&(\\n[tbl*have-source]=0) \
+. nr tbl*plain-boxed 1
+. \}
+. if !\\n[tbl*have-header] .nr tbl*no-header 1
+. ds tbl*label-sffx-tmp \\*[tbl*label-sffx]
+. if !'\\*[tbl*label-sffx-tmp]'' .substring tbl*label-sffx-tmp -1
+. if '\\*[tbl*label-sffx-tmp]'.' \
+. if (\\n[tbl*caption-after-label]=0):(\\n[#MLA]=1) .chop tbl*label-sffx
+. if \\n[tbl*caption-after-label] \{\
+. if !'\\*[tbl*label-sffx]'' \
+. if '\\*[tbl*caption]'' .chop tbl*label-sffx
+. \}
+. if !'\\*[tbl*caption-short]'' .ds short -short
+. if \\n[tbl*autolabel] \{\
+. if \\n[tbl*label-with-chapter] \
+. ds chapno \\n[#CH_NUM].
+. ds tbl*label \
+\\*[tbl*label-prfx]\\*[chapno]\\n+[tbl*label-num]\\*[tbl*label-sffx]\"
+. nr tbl*label-width \w'\\*[tbl*label]'
+. \}
+. ie \\n[@TOP] \{\
+. if !'\\n[.z]'FLOAT*DIV' \{\
+. RESTORE_SPACE
+. nr @TOP 1
+. if \\n[#COLUMNS] \
+. if !'\\*[tbl*space-adj]'' \
+. sp \\*[tbl*space-adj]-1v
+. if \\n[tbl*boxed] .nr tbl*boxed 2
+. vpt
+. \}
+. \}
+. el \
+. if !'\\*[tbl*space-adj]'' .sp \\*[tbl*space-adj]u
+. if !\\n[#MLA] \{\
+. if (\\n[tbl*have-caption]=0):(\\n[tbl*caption-after-label]=1) \{\
+. ie !'\\n[.z]'FLOAT*DIV' \{\
+. ie !\\n[tbl*boxed]=2 \{\
+. if \\n[tbl*have-header] .nr tbl*restore-header 1
+. if !\\n[@TOP] .sp .5v
+. if \\n[tbl*boxed] .sp .25v
+. if \\n[tbl*restore-header]=1 .nr tbl*have-header 1
+. \}
+. el \{\
+. if !\\n[tbl*boxed] .ns
+. sp .25v
+. \}
+. \}
+. el .sp .5v
+. \}
+. \}
+. if \\n[nl]=\\n[#PAGE_TOP] .ns
+. if '\\n[.z]'FLOAT*DIV' \{\
+. ie \\n[defer]>0 .sp .5v
+. el .sp .25v
+. \}
+. if \\n[@TOP] .rr @TOP
+. ds ev-current \\n[.ev]
+. if (\\n[nl]=\\n[#PAGE_TOP]):(\\n[nl]=\\n[dc]) \
+. nr tbl*caption-lead-diff-adj 1
+. if \\n[#MLA] \
+. if \\n[tbl*have-label]+\\n[tbl*have-caption]=0 \
+. sp .5v
+. if \\n[tbl*boxed]=2 \{\
+. if \\n[#MLA]=0 \
+. if (\\n[tbl*caption-after-label]=1):(\\n[tbl*have-caption]=0) \
+. sp 1n
+. \}
+. fi
+. if \\n[tbl*have-header] \{\
+. di tbl*header-div
+. ev table-header
+. evc \\*[ev-current]
+. if !\\n[float-span] \{\
+. ie '\\*[ev-current]'FLOAT' \{\
+. ie !\\n[tbl*center] \
+. in 0
+. el \{\
+. in 0
+\!. in 0
+. \}
+. \}
+. el \!.in 0
+. \}
+. \}
+.END
+\#
+.MAC TH END
+. ie '\\n[.z]'tbl*header-div' \{\
+. nr T. 0
+. T#
+. di
+. ev
+. if \\n[#PDF_BOOKMARKS] \{\
+. ie !'\\n[.z]'' \{\
+. if (\\n[float*img]=0)&(\\n[float*pic]=0)&(\\n[float*eqn]=0) \{\
+\!. PDF_TARGET tbl:\\\\n+[lists*target]
+. ie !'\\*[tbl*label]'' \
+\!. TO_TABLES "\\*[tbl*label]" "\\*[tbl*caption\\*[short]]"
+. el \
+\!. TO_TABLES "\\*[tbl*caption\\*[short]]"
+. \}
+. \}
+. el \{\
+. if '\\n[.z]'' .PDF_TARGET tbl:\\n+[lists*target]
+. ie !'\\*[tbl*label]'' \
+. TO_TABLES "\\*[tbl*label]" "\\*[tbl*caption\\*[short]]"
+. el \
+. TO_TABLES "\\*[tbl*caption\\*[short]]"
+. \}
+. \}
+. if \\n[#MLA] .if !\\n[tbl*have-caption] \
+. mla@error label caption \\n[.F] \\$0 \\n[.c]
+. if !'\\n[.z]'FLOAT*DIV' \{\
+. ie !\\n[tbl*boxed] \{\
+. nr th*needs (u;\\n[dn]+\\n[tbl*needs]v)
+. if \\n[th*needs]>\\n[.t] \{\
+. if dPDF.EXPORT \
+. if \\n[#FLEX_ACTIVE] \
+. if !\\n[#NO_FLEX] \
+. tm .ds pre-newpage-\\n% \\n%@\\n[#COL_NUM]
+. ne \\n[dn]u+\\n[tbl*needs]v
+. nr tbl@needs 1
+. \}
+. \}
+. el \{\
+. nr th*needs (u;\\n[dn]+.3n+\\n[tbl*needs]v)
+. if \\n[th*needs]>\\n[.t] \{\
+. if \\n[#COLUMNS] \
+. if !\\n[#COL_NUM]=\\n[#NUM_COLS] \
+. nr tbl*no-top-hook 1
+. nr tbl*no-print-header 1
+. if dPDF.EXPORT \
+. if \\n[#FLEX_ACTIVE] \
+. if !\\n[#NO_FLEX] \
+. tm .ds pre-newpage-\\n% \\n%@\\n[#COL_NUM]
+. ne \\n[dn]u+\\n[tbl*needs]v
+. nr tbl@needs 1
+. \}
+. \}
+. \}
+. ie (\\n[dn]-\\n[.v])>\\n[.t] \{\
+. if !\\n[@TOP] .@error ridiculously long table header
+. if \\n[tbl@needs] \{\
+. if \\n[tbl*boxed] \{\
+. RESTORE_SPACE
+. sp -1n
+. \}
+. rr tbl@needs
+. \}
+. if \\n[tbl*have-caption] .TBL*CAPTION
+. \}
+. el \{\
+. nr tbl*header-ht \\n[dn]
+. if \\n[tbl@needs] \{\
+. if \\n[tbl*boxed] \{\
+. RESTORE_SPACE
+. if !\\n[#MLA] \{\
+. if (\\n[tbl*have-caption]=0):(\\n[tbl*caption-after-label]=1) \
+. nop \&
+. sp -1n
+. \}
+. \}
+. rr tbl@needs
+. \}
+. if (\\n[tbl*have-caption]=1)&(\\n[tbl*caption-after-label]=0) \{\
+. TBL*CAPTION
+. vs
+. \}
+. tbl*print-header
+. \}
+. \}
+. el \{\
+. if \\n[tbl*have-caption] \{\
+. TBL*CAPTION
+. nr skip-th-warning 1
+. \}
+. if !\\n[skip-th-warning] .@error .TH without .TS H
+. rr skip-th-warning
+. \}
+.\" When centering a boxed table inside a float, .T# won't place
+.\" vertical rules in the correct horizontal position unless .ll is
+.\" given a nominal value (can be anything) and an indent is set
+.\" manually.
+. if '\\n[.z]'FLOAT*DIV' \{\
+. if \\n[tbl*center] \{\
+. nr float*ll \\n[.l]
+. ll 0
+. in \\n[float*ll]u-\\n[TW]u/2u
+. \}
+. \}
+.END
+\#
+.MAC TE END
+. if !r TW \{\
+. tm1 "[mom]: '\\n[.F]' contains tbl(1) data but '-t' flag is missing from
+. tm1 " the command line.
+. ab Aborting.
+. \}
+. ev tbl*end \" Needed because of .ad changes
+. evc \\*[ev-current]
+. nh
+. nf
+. rr tbl*no-header
+. if !'\\$1'' \{\
+. if '\\$1'SOURCE' \{\
+. ie !\\n[#MLA] \{\
+. tm1 "[mom]: \\$1 argument to \\$0 at line \\n[.c], but MLA style not enabled.
+. tm1 " Ignoring \\$1, but continuing to process.
+. \}
+. el \{\
+. nr tbl*have-source 1
+. shift
+. \}
+. \}
+. \}
+. if (\\n[#MLA]=1)&(\\n[tbl*have-source]=0) .tbl*source-warning
+. if !'\\n[.z]'FLOAT*DIV' \{\
+. if \\n[.t]<(\\n[.v]/2u) \{\
+. ie (\\n[tbl*have-label]=1):\
+(\\n[tbl*caption-after-label]=1):\
+(\\n[tbl*have-source]=1):\
+(\\n[tbl*autolabel]=1) \{\
+. rm tbl*header-div
+. nr tbl*no-top-hook 1
+. ie \\n[tbl*autolabel] \
+. if \\n[#MLA] \
+. if !\\n[tbl*have-source] .
+. el \{\
+. nr pgnum \\n%+\\n[#PAGE_NUM_ADJ]
+. if \\n[#COLUMNS]=1 .ds col-num ", column \\n[#COL_NUM]
+. tm1 "[mom]: '\\n[.F]', macro \\$0, line \\n[.c]:
+. tm1 " Insufficient room for label, caption, and/or source after
+. tm1 " table on page \\n[pgnum]\\*[col-num]. Omitting, but continuing to process table.
+. \}
+. nr tbl*skip-source 1
+. nr tbl*skip-label 1
+. rr tbl*have-caption
+. ie \\n[#COLUMNS] \
+. COL_NEXT internal
+. el .NEWPAGE
+. \}
+. el \{\
+.\" Don't print tbl-header at top of next page or column if tbl
+.\" finishes without room for further input at bottom of page
+. rm tbl*header-div
+. nr tbl*no-print-header 1
+. nr tbl*no-top-hook 1
+. ie \\n[#COLUMNS] \
+. COL_NEXT internal
+. el .NEWPAGE
+. \}
+. \}
+. \}
+. if !\\n[#MLA] \{\
+. if (\\n[tbl*have-label]=1):(\\n[tbl*autolabel]=1):(\\n[tbl*caption-after-label]=1) \{\
+. ev label
+. if '\\*[ev-current]'FLOAT' .evc 0
+. ie \\n[#PRINT_STYLE]=1 .TYPEWRITER
+. el \{\
+. tbl*label-style
+. vs \\n[.ps]u+\\n[tbl*label-autolead]u
+. \}
+. SIZESPECS
+. if \\n[tbl*label-with-chapter] \
+. ds chapno \\n[#CH_NUM].
+. TBL*SET_LABEL_QUAD \\*[tbl*label-quad]
+. di tbl*label-div
+. ie \\n[tbl*boxed] .sp \\n[#CAP_HEIGHT]u
+. el .sp \\n[#DOC_LEAD]u/4u
+. if (\\n[tbl*have-label]=1):(\\n[tbl*autolabel]=1) \{\
+. if !'\\*[tbl*label-space]'' .sp \\*[tbl*label-space]
+. ie \\n[tbl*autolabel] \{\
+. ie !\\n[tbl*caption-after-label] .nop \
+\\*[tbl*label]
+. el \{\
+. nop \
+\\*[tbl*label]\|
+. tbl*caption-style
+. vs \\n[.ps]u+\\n[tbl*caption-autolead]u
+. ds tbl*caption-old \\*[tbl*caption]
+. ds tbl*caption " \\*[tbl*caption]
+. nop \\*[tbl*caption]
+. ds tbl*caption \\*[tbl*caption-old]
+. \}
+. \}
+. el \{\
+. ie !\\n[tbl*caption-after-label] .nop \\*[tbl*label]
+. el \{\
+. nop \\*[tbl*label]\ \|\c
+. tbl*caption-style
+. vs \\n[.ps]u+\\n[tbl*caption-autolead]u
+. ds tbl*caption " \\*[tbl*caption]
+. nop \\*[tbl*caption]
+. \}
+. \}
+. \}
+. br
+. di
+. in 0
+. ev
+. nr pgnum \\n%+\\n[#PAGE_NUM_ADJ]
+. ie !'\\n[.z]'FLOAT*DIV' \{\
+. rr tbl*have-header
+. rr tbl*have-caption
+. ie (\\n[dn]-\\n[.v])>\\n[.t] \{\
+. if \\n[#COLUMNS]=1 .ds col-num ", column \\n[#COL_NUM]
+. tm1 "[mom]: '\\n[.F]', macro \\$0, line \\n[.c]:
+. tm1 " Insufficient room for label, caption, and/or source after
+. tm1 " table on page \\n[pgnum]\\*[col-num]. Omitting, but continuing to process.
+. ie \\n[#COLUMNS] \
+. COL_NEXT internal
+. el .NEWPAGE
+. if d tbl*header-div .rm tbl*header-div
+. rr tbl*caption-top-lead-diff
+. nr tbl*skip-source 1
+. nr tbl*skip-label 1
+. \}
+. el .print-label
+. \}
+. el .print-label
+. \}
+. \}
+. if \\n[tbl*autolabel] \{\
+. ds tbl*label \\*[chapno]\\n[tbl*label-num]
+. if dLABEL.REFS \
+. tm .ds \\*[target] \\*[chapno]\\n[tbl*label-num]
+. rm target
+. \}
+. if !\\n[tbl*skip-source] \{\
+. if \\n[tbl*have-source] \{\
+. ds tbl*source \\$1
+. SIZESPECS
+. ev source
+. evc \\*[ev-current]
+. nf
+. nh
+. ie \\n[#PRINT_STYLE]=1 \{\
+. TYPEWRITER
+. sp
+. \}
+. el \{\
+. tbl*source-style
+. vs \\n[.ps]u+\\n[tbl*source-autolead]u
+. \}
+. di tbl*source-div
+. TBL*SET_SOURCE_QUAD \\*[tbl*source-quad]
+. if (\\n[tbl*have-label]=0)&(\\n[#MLA]=0) \
+. if !\\n[tbl*autolabel] .sp \\n[#CAP_HEIGHT]u
+. if \\n[#MLA] \
+. sp \\n[#CAP_HEIGHT]u
+. if !'\\*[tbl*source-space]'' .sp \\*[tbl*source-space]
+. nop \\*[tbl*source]
+. br
+. di
+. nf
+. tbl*source-div
+. ev
+. \}
+. \}
+. if '\\n[.z]'FLOAT*DIV' .nr bx-tbl-depth \\n[.d]-1v
+. if '\\n[.z]'tbl*header-div' \{\
+. @error .TS with 'H' flag but no corresponding .TH
+. ab Aborting.
+. \}
+. ev
+. if !\\n[tbl*plain] \{\
+. ie \\n[tbl*plain-boxed] \{\
+. ie \\n[#MLA] .if !\\n[tbl*have-source] .sp .6v
+. el .sp
+. \}
+. el \{\
+. if !\\n[tbl*have-source] \{\
+. if (\\n[tbl*have-label]=0)&\
+(\\n[tbl*caption-after-label]=0)&(\\n[tbl*autolabel]=0) \
+. sp 1v
+. if (\\n[tbl*have-label]=1):(\\n[tbl*autolabel]=1) \
+. sp .5v
+. \}
+. if '\\n[.z]'FLOAT*DIV' .nr chop-space 1
+. \}
+. \}
+. ll \\n[ll-pre-tbl]u
+. if (\\n[nl]=\\n[dc]):(\\n[nl]=\\n[#PAGE_TOP]) .ns
+. if !'\\*[tbl*space-adj]'' .sp -\\*[tbl*space-adj]u
+. if \\n[#MLA] \
+. sp .5v
+. if !r pdfbx-running \{\
+. ie !\\n[tbl*no-shim] \{\
+. ie !\\n[#NO_SHIM] \
+. if !'\\n[.z]'FLOAT*DIV' .SHIM
+. el \
+. if !\\n[tbl*no-flex] \
+. if !\\n[#NO_FLEX] \
+. if !'\\n[.z]'FLOAT*DIV' .FLEX
+. \}
+. el \
+. if !\\n[tbl*no-flex] \
+. if !\\n[#NO_FLEX] \
+. if !'\\n[.z]'FLOAT*DIV' .FLEX
+. \}
+. ie \\n[tbl*boxed] \{\
+. nr tbl*pdfbx 2
+. if \\n[tbl*have-label] .nr tbl*pdfbx 3
+. \}
+. el .nr tbl*pdfbx 1
+. TBL*CLEANUP
+. it 2 rr-tbl*pdfbx
+.END
+\#
+\# Utility macros for tbl
+\#
+.MAC TBL*CAPTION END
+. ev caption
+. evc \\*[ev-current]
+. vs \\n[.ps]u+\\n[tbl*caption-autolead]u
+. nr caption-lead \\n[.v]
+. nr tbl*caption-lead-diff \\n[lead-pre-tbl]-\\n[.v]
+. nr tbl*caption-top-lead-diff \\n[tbl*caption-lead-diff]
+. ie !\\n[#MLA] \{\
+. if \\n[tbl*have-caption] \{\
+.\" Get rid of these guys when you're sure you don't need them.
+\#. if !'\\n[.z]'FLOAT*DIV' \{\
+. if !\\n[tbl*caption-after-label] \{\
+. ie (\\n[nl]=\\n[#PAGE_TOP]):(\\n[nl]=\\n[dc]) \{\
+. RESTORE_SPACE
+. ie \\n[#COLUMNS] .sp |\\n[dc]u
+. el .sp |\\n[#T_MARGIN]u-\\n[#DOC_LEAD]u
+. sp \\n[tbl*caption-lead-diff]u
+. \}
+. el \{\
+. if \\n[.ns] .if !(\\n[nl]=\\n[#PAGE_TOP]) .rs
+. if !\\n[pdfbx-top] .sp \\n[#DOC_LEAD]u/2u
+. \}
+. if \\n[pdfbx-top] \{\
+. ps \\*[tbl*caption-size-change]
+. SIZESPECS
+. ps
+. nr pdfbx-top 1 \" SIZESPECS trips rr-pdfbx-top
+. rt
+. sp \\*[gap\\n[stack]]u+\\*[wt\\n[stack]]\
++\\n[tbl*caption-top-lead-diff]u+\\*[$CAP_HEIGHT]+.5p
+. \}
+. \}
+\#. \}
+. nh
+. \}
+. \}
+. el \{\
+. if !\\n[tbl*autolabel] \{\
+. ie !\\n[tbl*have-label] \
+. mla@error caption label \\n[.F] \\$0 \\n[.c]
+. el .ev label
+. \}
+. \}
+. ie \\n[#PRINT_STYLE]=1 .nr tmp-ind 2m
+. el .nr tmp-ind 1.25m
+. ie \\n[#PRINT_STYLE]=1 .TYPEWRITER
+. el \{\
+. if !\\n[#MLA] \{\
+. tbl*caption-style
+. nr lead-current \\n[.v]
+. \}
+. \}
+. ie !\\n[#MLA] \{\
+. ie !\\n[tbl*caption-after-label] \{\
+. di tbl*caption-div
+. ie \\n[tbl*center] \!.in -\\n[ind-pre-tbl]u
+. el \!.in 0
+. TBL*SET_CAPTION_QUAD \\*[tbl*caption-quad]
+. nop \\*[tbl*caption]
+. br
+. di
+. evc 0
+. if !'\\n[.z]'FLOAT*DIV' \{\
+. ch FOOTER \\n[#VARIABLE_FOOTER_POS]u+\\n[#DOC_LEAD]u
+. ch FN_OVERFLOW_TRAP -\\n[#FN_OVERFLOW_TRAP_POS]u+\\n[#DOC_LEAD]u
+. nr caption-needs 2
+. ie \\n[tbl*boxed] .nr tbl*lead \\n[.v]+3n
+. el .nr tbl*lead \\n[.v]
+. if \
+(\\n[dn]+(\\n[tbl*lead]*(\\n[tbl*needs]+1)))>=\\n[.t] \{\
+. nr pgnum \\n%+\\n[#PAGE_NUM_ADJ]
+. if \\n[#COLUMNS]=1 .ds col-num ", column \\n[#COL_NUM]
+. tm1 \
+"[mom]: Table with caption at line \\n[.c] \
+does not fit on page \\n[pgnum]\\*[col-num].
+. tm1 \
+" Shifting table to next page or column.
+. ie (\\n[#COLUMNS]=1)&(\\n[#COL_NUM]=\\n[#NUM_COLS]) \{\
+. rr tbl*no-header
+. NEWPAGE
+. \}
+. el \{\
+. nr tbl*no-top-hook -1
+. sp \\n[.t]u
+. ie \\n[#COLUMNS] \
+. sp |\\n[dc]u+\\n[tbl*caption-lead-diff]u
+. el .sp |\\n[#PAGE_TOP]u+\\n[tbl*caption-lead-diff]u
+. \}
+. \}
+. ch FOOTER \\n[#VARIABLE_FOOTER_POS]u
+. ch FN_OVERFLOW_TRAP -\\n[#FN_OVERFLOW_TRAP_POS]u
+. \}
+. if \\n[.u] .nr fill 1
+. nf
+. if \\n[.ns] .RESTORE_SPACE
+. tbl*caption-div
+. if \\n[#PRINT_STYLE]=1 .sp .5v
+. if !'\\*[tbl*caption-space]'' \
+. sp \\*[tbl*caption-space]
+. if \\n[tbl*caption-lead-diff-adj] \{\
+. sp -\\n[tbl*caption-lead-diff]u
+. rr tbl*caption-lead-diff-adj
+. \}
+. if \\n[fill-pre-float] .fi
+. \}
+. el \{\
+. if (\\n[tbl*have-label]=0) \{\
+. if !\\n[tbl*autolabel] \{\
+. tm1 "[mom]: CAPTION_AFTER_LABEL enabled, but no label given
+. tm1 " for table at line \\n[.c].
+. tm1 " Skipping caption but continuing to process.
+. \}
+. \}
+. \}
+. \}
+. el \{\
+. if (\\n[tbl*have-label]=1):(\\n[tbl*autolabel]=1) \{\
+. ie !\\n[tbl*have-caption] \
+. mla@error label caption \\n[.F] \\$0 \\n[.c]
+. el \{\
+. ie !'\\n[.z]'FLOAT*DIV' \{\
+. ie (\\n[nl]=\\n[#PAGE_TOP]):(\\n[nl]=\\n[dc]) \{\
+. ie !\\n[#COLUMNS] \
+. sp |\\n[#PAGE_TOP]u+\\n[tbl*caption-lead-diff]u
+. el .sp |\\n[dc]u+\\n[tbl*caption-lead-diff]u
+. \}
+. el .sp .5v
+. \}
+. el .sp .5v
+. \}
+. ev label
+. evc \\*[ev-current]
+. nh
+. ie \\n[#PRINT_STYLE]=1 .TYPEWRITER
+. el \{\
+. tbl*label-style
+. vs \\n[.ps]u+\\n[tbl*label-autolead]u
+. nr tbl*label-lead-diff \\n[lead-pre-tbl]-\\n[.v]
+. \}
+. if \\n[tbl*label-with-chapter] \
+. ds chapno \\n[#CH_NUM].
+. if r pdfbx-top \
+. if \\n[#MLA] .nr pdfbx-mla-tbl-top 1
+. TBL*SET_LABEL_QUAD \\*[tbl*label-quad]
+. if \\n[pdfbx-mla-tbl-top] \{\
+. sp
+. sp \\n[tbl*label-lead-diff]u
+. rr pdfbx-mla-tbl-top
+. \}
+. di tbl*mla-label-caption
+\!. in 0
+. ie \\n[tbl*autolabel] \{\
+. ds label \
+\\*[tbl*label-prfx]\\*[chapno]\\n[tbl*label-num]\\*[tbl*label-sffx]\"
+. nop \\*[label]
+. nr tbl*label-width \w'\\*[label]'
+. rr label
+. \}
+. el \{\
+. if !'\\*[tbl*label]'' \{\
+. nop \\*[tbl*label]
+. nr tbl*label-width \w'\\*[tbl*label]'
+. \}
+. \}
+. if \\n[tbl*autolabel] \
+. ds tbl*label \\*[chapno]\\n[tbl*label-num]
+. br
+. di
+. \}
+. da tbl*mla-label-caption
+. ie \\n[#PRINT_STYLE]=1 .TYPEWRITER
+. el .tbl*caption-style
+. if '\\*[tbl*caption-quad]'L' \{\
+. EOL
+. ie \\n[float*tbl] \{\
+. ie \\n[tbl*center] \
+. ll \\n[ll-pre-tbl]u-\\n[TW]u/2u+\\n[TW]u-\\n[tmp-ind]u
+. el \
+. ll \\n[TW]u+\\n[.i]u-\\n[tmp-ind]u
+\!. in \\n[tmp-ind]u
+. ti -\\n[tmp-ind]u
+. \}
+. el \{\
+. ie \\n[tbl*center] \{\
+. if '\\*[tbl*label-quad]'L' \{\
+. ll \\n[ll-pre-tbl]u-\\n[TW]u/2u+\\n[TW]u
+\!. in \\n[tmp-ind]u
+. \}
+. \}
+. el \
+. in \\n[tmp-ind]u+\\n[ind-pre-tbl]u
+. \}
+. ti -\\n[tmp-ind]u
+. \}
+. nop \\*[tbl*caption]
+. br
+\!. in
+. da
+. if !'\\n[.z]'FLOAT*DIV' \{\
+. ch FOOTER \\n[#VARIABLE_FOOTER_POS]u+\\n[#DOC_LEAD]u
+. ch FN_OVERFLOW_TRAP -\\n[#FN_OVERFLOW_TRAP_POS]u+\\n[#DOC_LEAD]u
+. ie \\n[#MLA] .nr caption-needs 3
+. el .nr caption-needs 2
+. if \
+(\\n[dn]+(\\n[#DOC_LEAD]*\\n[tbl*needs])+(\\n[caption-needs]*\\n[caption-lead]))>\\n[.t] \{\
+. nr pgnum \\n%+\\n[#PAGE_NUM_ADJ]
+. if \\n[#COLUMNS] .ds col-num ", column \\n[#COL_NUM]
+. tm1 \
+"[mom]: Table with caption at line \\n[.c] \
+does not fit on page \\n[pgnum]\\*[col-num].
+. tm1 \
+" Shifting table to next column or page.
+. ie (\\n[#COLUMNS]=1)&(\\n[#COL_NUM]=\\n[#NUM_COLS]) \{\
+. rr tbl*no-header
+. if \\n[defer] .nr skip-th-warning 1
+. NEWPAGE
+. \}
+. el \{\
+. nr tbl*no-top-hook 1
+. sp \\n[.t]u
+. if (\\n[tbl*caption-after-label]=1):(\\n[tbl*plain]=1) \
+. sp 1n-.3n
+. \}
+. \}
+. ch FOOTER \\n[#VARIABLE_FOOTER_POS]u
+. ch FN_OVERFLOW_TRAP -\\n[#FN_OVERFLOW_TRAP_POS]u
+. \}
+. nf
+. if (\\n[nl]=\\n[#PAGE_TOP]):(\\n[nl]=\\n[dc]) \
+. nr tbl*label-lead-diff-adj 1
+. ie (\\n[.t]>1)&(\\n[@TOP]=0) \{\
+. if !\\n[#NO_FLEX] \{\
+. NO_FLEX
+. nr #RESTORE_FLEX 1
+. \}
+. if \\n[.ns] .rs
+. sp \\n[tbl*label-lead-diff]u
+. \}
+. el \{\
+. if \\n[.t]=1 .sp \\n[.t]u
+. ie \\n[#COL_NUM]>1 \
+. ie (\\n[nl]=\\n[#PAGE_TOP]):(\\n[nl]=\\n[dc]) \
+. sp |\\n[dc]u+\\n[tbl*label-lead-diff]u
+. el .sp .5v
+. \}
+. tbl*mla-label-caption
+. \}
+. ie \\n[#PRINT_STYLE]=1 .sp .5v
+. el .sp .5n
+. if \\n[tbl*label-lead-diff-adj] \{\
+. sp -\\n[tbl*label-lead-diff]u
+. rr tbl*label-lead-diff-adj
+. \}
+. br
+. if !'\\*[tbl*caption-space]'' .sp \\*[tbl*caption-space]
+. ie \\n[float*tbl] .ev FLOAT
+. el .ev \\*[ev-current]
+.END
+\#
+.MAC TBL*CLEANUP END
+. if !'\\n[.z]'FLOAT*DIV' \{\
+. rm tbl*header-div
+. rm short
+. rm tbl*caption
+. rm tbl*caption-short
+. rm tbl*label
+. rr tbl*center
+. rr tbl*caption-top-lead-diff
+. rr tbl*have-header
+. rr tbl*no-print-header
+. rr tbl*have-caption
+. rr tbl*have-label
+. rr tbl*plain-boxed
+. rr tbl*boxed
+. \}
+. rr doing-tbl
+. rm tbl*space-adj
+. rr tbl*skip-label
+. rr tbl*skip-source
+. rr tbl*label-warning
+. rr tbl*no-shim
+. rr tbl*no-flex
+. rr tbl*plain
+. rr tbl*caption-top-lead-diff
+. rnn tbl*have-label tbl@label
+. rnn tbl*have-source tbl@source
+. if '\\*[tbl*label-sffx-tmp]'.' .ds tbl*label-sffx .
+. if \\n[#RESTORE_INDENT_BOTH] \{\
+. IB
+. rr #RESTORE_INDENT_BOTH
+. \}
+. if \\n[#RESTORE_INDENT_LEFT] \{\
+. IL
+. rr #RESTORE_INDENT_LEFT
+. \}
+. if \\n[#RESTORE_FLEX] \{\
+. NO_FLEX off
+. rr #RESTORE_FLEX
+. \}
+.END
+\#
+.MAC print-label END
+. if \\n[.u] .nr fill 1
+. nf
+. if \\n[tbl*center] \{\
+. if '\\n[.z]'' \{\
+. ll \\n[.l]u-\\n[TW]u/2u+\\n[TW]u
+. if \\n[ind-pre-tbl] \
+. in \\n[ind-pre-tbl]u-(\\n[ind-pre-tbl]u/2u)
+. \}
+. \}
+. if !\\n[tbl*skip-label] \
+. tbl*label-div
+. if \\n[tbl*center] \{\
+. if '\\n[.z]'' \{\
+. ll
+. in 0
+. \}
+. \}
+. if \\n[fill] .fi
+. rr fill
+.END
+\#
+.MAC tbl@top-hook END
+. if (\\n[tbl*have-header:1]=1):(\\n[tbl*have-header]=1) \{\
+. if !r tbl*no-print-header \{\
+. nf
+. rr @TOP
+. ch RR_@TOP
+. ev top-hook
+. evc 0
+. rs
+. nop \&
+. ie !\\n[tbl*boxed] .sp -1
+. el .sp -1n
+. tbl*print-header
+. ev
+. \}
+. \}
+.END
+\#
+.MAC tbl*print-header END
+. if \\n[.u]=1 \{\
+. nf
+. nr fill 1
+. \}
+. if \\n[#COL_NUM]>1 \
+. if !\\n[tbl*have-caption] \
+. if (\\n[@TOP]=1):(\\n[nl]=\\n[dc]) \
+. sp .3n
+. if \\n[tbl*center] \!.in \\n[ind-pre-tbl]u/2u
+. ie d tbl*header-div:span .tbl*header-div:span
+. el .tbl*header-div
+. if '\\n[.z]'FLOAT*DIV' \
+. if \\n[tbl*center] .ce 1000
+. mk #T
+.END
+\#
+.MAC tbl@bottom-hook END
+. rr #DIVERTED
+. rr @TOP
+. ch RR_@TOP
+.END
+\#
+.MAC tbl*float-warning END
+. tm1 "[mom]: Table in FLOAT, output page \\n[#PAGENUMBER], exceeds page vertical limits.
+. tm1 " Multipage boxed tables cannot be contained within floats.
+. ab [mom]: Aborting '\\n[.F]', approx. line \\n[.c].
+.END
+\#
+.MAC tbl*caption-warning END
+. tm1 "[mom]: TS at line \\n[.c] has CAPTION but no H argument.
+. tm1 " CAPTION requires H with a corresponding .TH.
+. ab [mom]: Aborting '\\n[.F]'.
+.END
+\#
+.MAC tbl*source-warning END
+. tm1 "[mom]: MLA enabled, but TE at line \\n[.c] has no SOURCE.
+. tm1 " MLA style for tables requires that a source be cited.
+. ab [mom]: Aborting '\\n[.F]'.
+.END
+\#
+.MAC ds@need END \" Move vertically until there is enough space for \$1
+. if '\\n(.z'' \{\
+. while \\n[.t]<=(\\$1)&(\\n[nl]>\\n[#PAGE_TOP]) \{\
+. rs
+' sp \\n[.t]u
+. \}
+. \}
+.END
+\#
+\# ***eqn***
+\#
+\# EQ/EN macros borrowed from ms, mommified by Robin Haberkorn
+\# <robin.haberkorn@googlemail.com>, expanded by Peter Schaffter.
+\#
+\# EQ [ -L | -C | -I <indent> ] [label]
+\# EN [ CONT | CONTINUED | ... ]
+\#
+\# Equations are centered by default, but can be left-justified
+\# (EQ -L), explicitly centered, or indented (EQ -I).
+\#
+\# Each eqn block for multi-line equations aligned with 'mark' and
+\# 'lineup' should be terminated by passing 'CONT' or 'CONTINUED'
+\# or '...' to EN.
+\#
+\# Note that geqn mark and lineup work correctly in centered equations.
+\#
+.MAC EQ END
+. if \\n[eqn*copy-in]=1 \{\
+. if !\\n[eqn-linenum] .nr eqn-linenum \\n[.c]
+. if !\\n[pgnum] .nr pgnum \\n%+\\n[#PAGE_NUM_ADJ]
+. br
+. if \\n[.u] .nr fill 1
+. rr float*eqn
+. if '\\n[.z]'FLOAT*DIV' .nr float*eqn 1
+. nr eqn*restore-adj \\n[.j]
+. na
+. if !\\n[continued] \{\
+. PDF_TARGET eqn:\\n+[lists*target]
+. rr eqn*type
+. nr loop-counter \\n[#NUM_ARGS]
+. nr loop-count 0 1
+. while \\n+[loop-count]<=\\n[loop-counter] \{\
+. if '\\$1'-L' \{\
+. nr eqn*left 1
+. nr eqn*type 1
+. shift
+. \}
+. if '\\$1'-I' \{\
+. nr eqn*ind 1
+. nr eqn*type 2
+. shift
+. ds DI \\$1
+. ds DI@cont \\*[DI]
+. shift
+. \}
+. if '\\$1'-C' \{\
+. nr eqn*center 1
+. nr eqn*type 3
+. shift
+. \}
+. if '\\$1'ADJUST' \{\
+. ds eqn*space-adj \\$2
+. shift 2
+. \}
+. if '\\$1'LABEL' \{\
+. ds eqn*label \\$2
+. shift 2
+. \}
+. if '\\$1'SHIFT_LABEL' \{\
+. ds eqn*shift-label \\$2
+. shift 2
+. \}
+. if '\\$1'CAPTION' \{\
+. ds eqn*caption \\$2
+. shift 2
+. \}
+. if '\\$1'SHORT_CAPTION' \{\
+. ds eqn*caption-short \\$2
+. shift 2
+. \}
+. if '\\$1'TARGET' \{\
+. ds target "\\$2
+. PDF_TARGET "\\*[target]
+. shift 2
+. \}
+. if '\\$1'NO_SHIM' \{\
+. nr @no-shim 1
+. shift 1
+. \}
+. if '\\$1'NO_FLEX' \{\
+. nr eqn*no-flex
+. shift
+. \}
+. \}
+. \}
+. if (\\n[eqn*have-label]=1):(\\n[eqn*autolabel]=1) \
+. ds label-type eqn
+. if '\\*[eqn*shift-label]'' .ds eqn*shift-label 0
+. if !\\n[eqn*type] \{\
+. nr eqn*center 1
+. nr eqn*type 3
+. shift
+. \}
+. if !'\\*[eqn*caption]'' \{\
+. if '\\*[caption-quad]'L' \{\
+. if \\n[default-left] .ds caption-quad R
+. rr default-left
+. \}
+. \}
+. if !\\n[continued] \{\
+. if !'\\*[eqn*caption-short]'' .ds short -short
+. if \\n[eqn*autolabel] \{\
+. if \\n[eqn*label-with-chapter] \
+. ds chapno \\n[#CH_NUM].
+. ds eqn*label \\*[chapno]\\n+[eqn*label-num]
+. nr eqn*label-width \w'\\*[eqn*label]'
+. if dLABEL.REFS \
+. tm .ds \\*[target] \\*[chapno]\\n[eqn*label-num]
+. rm target
+. nr eqn*label-num -1
+. \}
+. ie !'\\n[.z]'' \{\
+. if (\\n[float*img]=0)&(\\n[float*pic]=0)&(\\n[float*tbl]=0) \{\
+\!. PDF_TARGET eqn:\\\\n+[lists*target]
+. ie !'\\*[eqn*label]'' \
+\!. TO_EQUATIONS "\\*[eqn*label]" "\\*[eqn*caption\\*[short]]"
+. el \
+\!. TO_EQUATIONS "\\*[eqn*caption\\*[short]]"
+. \}
+. \}
+. el \{\
+. PDF_TARGET eqn:\\n+[lists*target]
+. ie !'\\*[eqn*label]'' \
+. TO_EQUATIONS "\\*[eqn*label]" "\\*[eqn*caption\\*[short]]"
+. el \
+. TO_EQUATIONS "\\*[eqn*caption\\*[short]]"
+. \}
+. \}
+. if \\n[continued] \{\
+. rm continued
+. rr continued
+. \}
+. if \\n[eqn@left*cont] .nr eqn*type 1
+. if \\n[eqn@ind*cont] \{\
+. nr eqn*type 2
+. ds DI \\*[DI@cont]
+. \}
+. \}
+. if \\n[eqn@center*cont] .nr eqn*type 3
+. ev EQN
+. evc 0
+. di eqn*div
+. in 0
+. nf
+.END
+\#
+.MAC EN END
+. if !'\\n[.z]'eqn*div' \{\
+. @error mismatched EN
+. return
+. \}
+. br
+. di
+. ev
+. if !'\\*[eqn*label]'' .nr eqn*have-label 1
+. if !'\\*[eqn*caption]'' .nr eqn*have-caption 1
+. if !'\\$1'' \{\
+. ie '\\$1'...' .ds continued CONT
+. el .ds continued \\$1
+. substring continued 0 3
+. ie '\\*[continued]'CONT' \{\
+. nr continued 1
+. rm continued
+. if \\n[eqn*ind] .nr eqn@ind*cont 1
+. if \\n[eqn*left] .nr eqn@left*cont 1
+. if \\n[eqn*center] .nr eqn@center*cont 1
+. \}
+. el \{\
+. tm1 "[mom]: Invalid argument \\$1 to \\$0.
+. tm1 " Must be 'CONTINUED', 'CONT', or '...'
+. ab [mom]: Aborting '\\n[.F]' at line \\n[.c].
+. \}
+. \}
+. if \\n[dl]:\\n[eqn*have-label] \{\
+. ds eqn*tabs \\n[.tabs]
+. ie \\n[dl] \{\
+. if !'\\n[.z]'FLOAT*DIV' \{\
+. ie \\n[eqn*have-caption] .ne \\n[dn]u-\\n[.V]
+. el .ne \\n[dn]u-1v-\\n[.V]
+. \}
+. chop eqn*div
+. if '\\*[DD]'' \{\
+. ds DD .5v
+. if !\\n[@TOP] \{\
+. ie r pdfbx-top \{\
+. SIZESPECS
+. rt
+. sp (\\*[wt\\n[stack]]/2u)+\\*[gap\\n[stack]]u+\\*[$CAP_HEIGHT]
+. \}
+. el .sp \\*[DD]
+. if !'\\*[eqn*space-adj]'' .sp \\*[eqn*space-adj]u
+. \}
+. \}
+. ie \\n[eqn*type]=1 \{\
+. ta (u;\\n[.l]-\\n[.i])R
+. ie \\n[continued] .nop \\*[eqn*div]
+. el \{\
+. ie \\n[eqn*autolabel] \
+.nop \
+\\*[eqn*div]\
+\\*[eqn*label-specs]\
+\t\v'+\\*[eqn*shift-label]'\
+\\*[eqn*label-prfx]\\*[chapno]\\n+[eqn*label-num]\\*[eqn*label-sffx]\
+\v'-\\*[eqn*shift-label]'\
+\\*[revert-specs]
+. el \
+.nop \
+\\*[eqn*div]\
+\\*[eqn*label-specs]\
+\t\v'+\\*[eqn*shift-label]'\
+\\*[eqn*label]\
+\v'-\\*[eqn*shift-label]'\
+\\*[revert-specs]
+. \}
+. if !\\n[continued] \{\
+. if \\n[eqn*have-caption] \
+. ADD_CAPTION
+. \}
+. \}
+. el \{\
+. ie \\n[eqn*type]=2 \{\
+. ie '\\*[eqn*label-quad]'L' \{\
+. ta \\*[DI]
+. ie \\n[continued] .nop \t\\*[eqn*div]
+. el \{\
+. ie \\n[eqn*autolabel] \
+.nop \
+\\*[eqn*label-specs]\
+\v'+\\*[eqn*shift-label]'\
+\\*[eqn*label-prfx]\\*[chapno]\\n+[eqn*label-num]\\*[eqn*label-sffx]\
+\v'-\\*[eqn*shift-label]'\
+\t\\*[eqn*div]\
+\\*[revert-specs]
+. el \
+.nop \
+\\*[eqn*label-specs]\
+\v'+\\*[eqn*shift-label]'\
+\\*[eqn*label]\
+\v'-\\*[eqn*shift-label]'\
+\\*[revert-specs]\
+\t\\*[eqn*div]
+. \}
+. \}
+. el \{\
+. ta \\*[DI] (u;\\n[.l]-\\n[.i])R
+. ie \\n[continued] .nop \t\\*[eqn*div]
+. el \{\
+. ie \\n[eqn*autolabel] \
+.nop \
+\t\\*[eqn*div]\
+\\*[eqn*label-specs]\
+\t\v'+\\*[eqn*shift-label]'\
+\\*[eqn*label-prfx]\\*[chapno]\\n+[eqn*label-num]\\*[eqn*label-sffx]\
+\v'-\\*[eqn*shift-label]'\
+\\*[revert-specs]
+. el \
+.nop \
+\t\\*[eqn*div]\
+\\*[eqn*label-specs]\
+\t\v'+\\*[eqn*shift-label]'\
+\\*[eqn*label]\
+\v'-\\*[eqn*shift-label]'\
+\\*[revert-specs]
+. \}
+. \}
+. if !\\n[continued] \{\
+. if \\n[eqn*have-caption] \
+. ADD_CAPTION
+. \}
+. \}
+. el \{\
+. ie '\\*[eqn*label-quad]'L' \{\
+. ta (u;\\n[.l]-\\n[.i]/2)C
+. ie \\n[continued] .nop \t\\*[eqn*div]
+. el \{\
+. ie \\n[eqn*autolabel] \
+.nop \
+\\*[eqn*label-specs]\
+\v'+\\*[eqn*shift-label]'\
+\\*[eqn*label-prfx]\\*[chapno]\\n+[eqn*label-num]\\*[eqn*label-sffx]\
+\v'-\\*[eqn*shift-label]'\
+\t\\*[eqn*div]\
+\\*[revert-specs]
+. el \
+.nop \
+\\*[eqn*label-specs]\
+\v'+\\*[eqn*shift-label]'\
+\\*[eqn*label]\
+\v'-\\*[eqn*shift-label]'\
+\\*[revert-specs]\
+\t\\*[eqn*div]
+. \}
+. \}
+. el \{\
+. ta (u;\\n[.l]-\\n[.i]/2)C (u;\\n[.l]-\\n[.i])R
+. ie \\n[continued] .nop \t\\*[eqn*div]
+. el \{\
+. ie \\n[eqn*autolabel] \
+.nop \
+\t\\*[eqn*div]\
+\\*[eqn*label-specs]\
+\t\v'+\\*[eqn*shift-label]'\
+\\*[eqn*label-prfx]\\*[chapno]\\n+[eqn*label-num]\\*[eqn*label-sffx]\
+\v'-\\*[eqn*shift-label]'\
+\\*[revert-specs]
+. el \
+.nop \
+\t\\*[eqn*div]\
+\\*[eqn*label-specs]\
+\t\v'+\\*[eqn*shift-label]'\
+\\*[eqn*label]\
+\v'-\\*[eqn*shift-label]'\
+\\*[revert-specs]
+. \}
+. \}
+. if !\\n[continued] \{\
+. if \\n[eqn*have-caption] \
+. ADD_CAPTION
+. \}
+. \}
+. \}
+. \}
+. el \{\
+. ta (u;\\n[.l]-\\n[.i])R
+.nop \
+\\*[eqn*label-specs]\
+\t\v'+\\*[eqn*shift-label]'\
+\t\\*[eqn*label]\
+\v'-\\*[eqn*shift-label]'\
+\\*[revert-specs]
+. \}
+. ta \\*[eqn*tabs]
+.\" if continuing (ie is a multi-line equation), don't space and SHIM
+. if !\\n[continued] \{\
+. br
+. if !\\n[@TOP] \{\
+. if !\\n[.t]<(\\*[DD]+1) \{\
+. sp \\*[DD]
+. ie !\\n[eqn*have-caption] \{\
+. sp .25v
+. if \\n[pdfbx-running] .nr eqn*pdfbx 1
+. \}
+. el .if \\n[pdfbx-running] .nr eqn*pdfbx 2
+. \}
+. \}
+. if !'\\*[eqn*space-adj]'' .sp -\\*[eqn*space-adj]u
+. ie !\\n[eqn*no-shim] \{\
+. ie !\\n[#NO_SHIM] \
+. if !'\\n[.z]'FLOAT*DIV' .SHIM
+. el \
+. if !\\n[eqn*no-flex] \
+. if !\\n[#NO_FLEX] \
+. if !'\\n[.z]'FLOAT*DIV' .FLEX
+. \}
+. el \
+. if !\\n[eqn*no-flex] \
+. if !\\n[#NO_FLEX] \
+. if !'\\n[.z]'FLOAT*DIV' .FLEX
+. rm DD
+. rm eqn*caption
+. rm eqn*caption-short
+. rm eqn*label
+. rm short
+. rr eqn*copy-in
+. \}
+. rm DI@cont
+. rr eqn*center
+. rr eqn@center*cont
+. rr eqn*have-label
+. rr eqn*have-caption
+. rr eqn*ind
+. rr eqn@ind*cont
+. rr eqn*left
+. rr eqn@left*cont
+. \}
+. nr eqn*copy-in 1
+. ad \\n[eqn*restore-adj]
+. if \\n[fill] .fi
+. rr fill
+.END
+\#
+.MAC ADD_CAPTION END
+. ie \\n[.t]<\\n[.v] \{\
+. if !'\\n[.z]'FLOAT*DIV' \{\
+. if \\n[#COLUMNS]=1 .ds col-num ", column \\n[#COL_NUM]
+. tm1 "[mom]: '\\n[.F]', macro EQ, line \\n[eqn-linenum]:
+. tm1 " Insufficient room for equation caption on page \\n[pgnum]\\*[col-num].
+. tm1 " Skipping caption but continuing to process.
+. if !\\n[@TOP] \{\
+. ie \\n[#COLUMNS] \
+. COL_NEXT internal
+. el .NEWPAGE
+. \}
+. rr eqn-linenum
+. rr pgnum
+. \}
+. \}
+. el \{\
+. if \\n[#PRINT_STYLE]=2 \{\
+. ps \\*[eqn*caption-size-change]
+. nr lead-curr \\n[.v]
+. sp .5v
+. vs \\n[.ps]u+\\n[eqn*caption-autolead]u
+. nr eqn*caption-lead-diff \\n[lead-curr]-\\n[.v]
+. sp \\n[eqn*caption-lead-diff]u
+. ps
+. if !'\\*[eqn*caption-space]'' \
+. sp \\*[eqn*caption-space]
+. \}
+. if '\\*[eqn*caption-quad]'L' \{\
+. fi
+. ad l
+. nop \
+\\*[eqn*caption-specs]\
+\\*[eqn*caption]\
+\\*[revert-specs]
+. nf
+. \}
+. if '\\*[eqn*caption-quad]'C' \{\
+. fi
+. ad c
+. nop \
+\\*[eqn*caption-specs]\
+\\*[eqn*caption]\
+\\*[revert-specs]
+. nf
+. \}
+. if '\\*[eqn*caption-quad]'R' \{\
+. fi
+. ad r
+. nop \
+\\*[eqn*caption-specs]\
+\\*[eqn*caption]\
+\\*[revert-specs]
+. nf
+. \}
+. if !'\\*[eqn*caption-space]'' \
+. sp -\\*[eqn*caption-space]
+. vs
+. \}
+.END
+\#
+\# ***pic***
+\#
+.MAC have-adjust END
+. nr #ARGS 0 1
+. nr #COUNT \\n[#NUM_ARGS]
+. while \\n+[#ARGS]<=\\n[#COUNT] \{\
+. if '\\$1'ADJUST' \{\
+. ds pic*space-adj \\$2
+. break
+. \}
+. shift
+. \}
+.END
+\#
+\# User settable text style for pic
+\#
+\# PIC_TEXT_STYLE
+\# --------------
+\# *Argument:
+\# <offset from page left>
+\# *Function:
+\# Stores user supplied page offset in register #L_MARGIN.
+\# Sets .po to user supplied offset.
+\# *Notes:
+\# Requires unit of measure.
+\#
+.MAC PIC_TEXT_STYLE END
+. nr #ARGS 0 1
+. nr #COUNT \\n[#NUM_ARGS]
+. while \\n+[#ARGS]<=\\n[#COUNT] \{\
+. if '\\$1'FAMILY' \{\
+. shift
+. ds pic*text-family \\$1
+. shift
+. \}
+. if '\\$1'FONT' \{\
+. shift
+. ds pic*text-font \\$1
+. shift
+. \}
+. if '\\$1'SIZE' \{\
+. shift
+. ds pic*text-size-change \\$1
+. shift
+. \}
+. if '\\$1'AUTOLEAD' \{\
+. shift
+. nr pic*text-autolead \\$1
+. shift
+. \}
+. \}
+.END
+\#
+\# Main macros
+\#
+.MAC PS END
+. if \\n[pdfbx-running] \{\
+. ie !r pdfbx-top .nr pic*pdfbx 2
+. el .nr pic*pdfbx 1
+. \}
+. if !\\n[#PP] .nop
+. br
+. have-adjust \\$@ \" Adjusting is handled by FLOAT
+. if !'\\n[.z]'FLOAT*DIV' \
+. FLOAT ADJUST \\*[pic*space-adj]
+. PDF_TARGET fig:\\n+[lists*target]
+. ds ev-current \\n[.ev]
+. rr float*pic
+. rr pic*have-label
+. rr grap
+. nr float*pic 1
+. nr ind-pre-pic \\n[.i]
+. nr lead-pre-pic \\n[.v]
+. if \\n[#MLA] \
+. if !\\n[pdfbx-running] .sp .5v
+. in 0
+. ev PIC
+. evc \\n[ev-current]
+. nf
+. ie \\n[#NUM_ARGS]<2 .@error bad arguments to PS (not preprocessed with pic?)
+. el \{\
+. if \B'\\$1' \{\
+. ie !\B'\\$2' .ds pic*scale-width \\$1
+. el .ds pic*scale-width \\$2
+. \}
+. \}
+.\" This is a bit confusing. pic is decorated with 2 args (width
+.\" and height), which are read during pre-processing but have to be
+.\" ignored when parsing args during main processing. We shift pic's
+.\" args out of the way, then pop them off the arg stack because
+.\" they're not needed during macro processing.
+. while \B'\\$1' .shift
+. nr loop-counter \\n[#NUM_ARGS]
+. nr loop-count 0 1
+. while \\n+[loop-count]<=\\n[loop-counter] \{\
+. if '\\$1'LEFT' \{\
+. nr pic*left 1
+. shift 1
+. \}
+. if '\\$1'CAPTION' \{\
+. nr pic*have-caption 1
+. ds pic*caption \\$2
+. shift 2
+. \}
+. if '\\$1'SHORT_CAPTION' \{\
+. ds pic*caption-short \\$2
+. shift 2
+. \}
+. if '\\$1'LABEL' \{\
+. nr pic*have-label 1
+. ds pic*label \\$2
+. shift 2
+. \}
+. if '\\$1'TARGET' \{\
+. ds target "\\$2
+. PDF_TARGET "\\*[target]
+. shift 2
+. \}
+. if '\\$1'NO_SHIM' \{\
+. nr @no-shim 1
+. shift 1
+. \}
+. if '\\$1'NO_FLEX' \{\
+. nr @no-flex 1
+. shift 1
+. \}
+. if '\\$1'GRAP' \{\
+. nr grap 1
+. shift 1
+. \}
+. \}
+. if (\\n[pic*have-label]=1):(\\n[pic*autolabel]=1) \
+. ds label-type pic
+. ds pic*label-sffx-tmp \\*[pic*label-sffx]
+. if !'\\*[pic*label-sffx-tmp]'' \
+. substring pic*label-sffx-tmp -1
+. if '\\*[pic*label-sffx-tmp]'.' \
+. if \\n[pic*caption-after-label]=0 .chop pic*label-sffx
+. if \\n[#MLA] \{\
+. if (\\n[pic*have-label]=1):(\\n[pic*autolabel]=1) \{\
+. if !\\n[pic*have-caption] \
+. mla@error label caption \\n[.F] \\$0 \\n[.c]
+. \}
+. if \\n[pic*have-caption] \{\
+. if !\\n[pic*have-label] \{\
+. if !\\n[pic*autolabel] \
+. mla@error caption label \\n[.F] \\$0 \\n[.c]
+. \}
+. \}
+. \}
+. if !'\\*[pic*text-family]'' \
+. fam \\*[pic*text-family]
+. if !'\\*[pic*text-font]'' \
+. ft \\*[pic*text-font]
+. if !'\\*[pic*text-size-change]'' \
+. ps \\n[#DOC_PT_SIZE]u\\*[pic*text-size-change]
+. nr lead-current \\n[.v]
+. ie \\n[pic*text-autolead] \
+. vs \\n[.ps]u+(\\n[pic*text-autolead]u*1000u)
+. el .vs \\n[.ps]u
+. nr pic@text-lead \\n[.v]
+. nr pic@text-size \\n[.ps]
+. if !'\\*[pic*text-color]'' .COLOR \\*[pic*text-color]
+. if \\n[@TOP] \{\
+. RESTORE_SPACE
+. nr pic*top-lead-adj 1
+. \}
+. nr pic*top-lead-diff \\n[lead-pre-pic]u-\\n[.v]u
+. if (\\n[pic*have-caption]=0):(\\n[pic*caption-after-label]=1) \{\
+. ie \\n[pic*top-lead-adj] \{\
+. sp \\n[pic*top-lead-diff]u
+. rr pic*top-lead-adj
+. \}
+. el .if (\\n[pic*caption-after-label]=0):(\\n[#MLA]=0) \
+. sp \\n[lead-pre-pic]u/2u
+. \}
+. if \\n[pic*label-with-chapter] \
+. ds chapno \\n[#CH_NUM].
+. if \\n[pic*autolabel] \
+. ds pic*label \\*[pic*label-prfx]\\*[chapno]\\n+[fig*label-num]\\*[pic*label-sffx]
+. nr fig*label-width \w'\\*[pic*label]'
+. if !'\\*[pic*caption-short]'' .ds short -short
+. if \\n[#PDF_BOOKMARKS] \{\
+. ie !'\\*[pic*label]'' \
+\!. TO_FIGURES "\\*[pic*label]" "\\*[pic*caption\\*[short]]"
+. el \
+\!. TO_FIGURES "\\*[pic*caption\\*[short]]"
+. \}
+. di pic*div
+.END
+\#
+.MAC PE END
+. di
+. nr pic*div-width \\n[dl]
+. if \\n[@TOP] \
+. RESTORE_SPACE
+. if !\\n[nl]=\\n[#PAGE_TOP] .sp \\n[lead-pre-pic]u/2u
+. if (\\n[pic*have-caption]=1)&(\\n[pic*caption-after-label]=0) \{\
+. ev caption
+. evc \\*[ev-current]
+. nh
+. ie \\n[#PRINT_STYLE]=1 .TYPEWRITER
+. el \{\
+. if \\n[.u] \{\
+. nr fill 1
+. nf
+. \}
+. pic*caption-style
+. if \\n[fill] .fi
+. rr fill
+. nr lead-current \\n[.v]
+. vs \\n[.ps]u+\\n[pic*caption-autolead]u
+. nr pic*caption-lead-diff \\n[lead-current]-\\n[.v]
+. in \\n[ind-pre-pic]u
+. \}
+. PIC*SET_CAPTION_QUAD \\*[pic*caption-quad]
+. if \\n[@TOP] .RESTORE_SPACE
+\!. in -\\n[ind-pre-pic]u
+. sp \\n[pic*caption-lead-diff]u
+\!. if \\\\n[.ns] .rs
+. if \\n[pic*pdfbx]=1 \{\
+. SIZESPECS
+. if \\n[PIC]=1 \!.rt
+. if \\n[PIC]=2 .rt
+. sp \\n[pic*caption-lead-diff]u
+. sp \\*[wt\\n[stack]]+\\*[gap\\n[stack]]u+\\*[$CAP_HEIGHT]
+. nr pic*pdfbx 2
+. \}
+. nop \\*[pic*caption]
+. if \\n[#PRINT_STYLE]=1 .sp .5
+. if !'\\*[pic*caption-space]'' \
+. sp \\*[pic*caption-space]-\\n[pic*text-autolead]p
+. br
+. ev
+. \}
+. if \\n[pic*pdfbx]=1 \{\
+. if (\\n[pic*have-caption]=0):(\\n[pic*caption-after-label]=1) \{\
+. if \\n[PIC]=1 \!.rt
+. if \\n[PIC]=2 .rt
+. sp \\n[#DOC_LEAD]u/2u
+. sp \\*[wt\\n[stack]]+\\*[gap\\n[stack]]u
+.\" Correct for wandering top of pic
+. sp -\\n[pic*text-autolead]p
+. \}
+. \}
+. if !\\n[pic*left] \
+. in (\\n[ll-pre-float]u-\\n[pic*div-width]u)/2u
+. if \\n[grap] \
+\!. sp -2
+. if (\\n[grap]=1)&(\\n[pic*caption-after-label]=1) \
+\!. sp -2
+. if \\n[pdfbx-running] \{\
+. if \\n[pdfbx-top] \{\
+. ie !\\n[pic*left] \!.in -\\*[gap\\n[stack]]u*2u
+. el .in -\\*[wt\\n[stack]]
+. \}
+. \}
+. if (\\n[pic*pdfbx]=0):(\\n[pic*pdfbx]=2) \
+. if (\\n[pic*have-caption]=0)&(\\n[pic*caption-after-label]=0) \
+\!. sp -.5-\\n[pic*text-autolead]p
+. pic*div
+. br
+. if (\\n[pic*have-label]=1):(\\n[pic*autolabel]=1):(\\n[pic*caption-after-label]=1) \{\
+. nr lead-pre-label \\n[.v]
+. ev label
+. evc \\*[ev-current]
+. ie \\n[#PRINT_STYLE]=1 .TYPEWRITER
+. el \{\
+. pic*label-style
+. nr lead-current \\n[.v]
+. vs \\n[.ps]u+\\n[pic*label-autolead]u
+. in \\n[ind-pre-pic]u
+. sp \\n[lead-current]u-\\n[.v]u
+. \}
+. PIC*SET_LABEL_QUAD \\*[pic*label-quad]
+\!. in -\\n[ind-pre-pic]u
+. if !'\\*[pic*label-space]'' .sp \\*[pic*label-space]
+. if \\n[#PRINT_STYLE]=1 .sp .5v
+. if \\n[#PRINT_STYLE]=2 \{\
+. SIZESPECS
+. if !\\n[pic*pdfbx] \{\
+. ie !\\n[grap] .sp -1
+. el .sp -1.5
+. \}
+. sp \\*[$CAP_HEIGHT]+.5
+. if \\n[grap] .if !\\n[pic*have-label] .sp -.5
+. \}
+. ie \\n[pic*autolabel] \
+. nop \
+\\*[pic*label-prfx]\\*[chapno]\\n[fig*label-num]\\*[pic*label-sffx]\|
+. el \
+. if !'\\*[pic*label]'' .nop \\*[pic*label]
+. if dLABEL.REFS \{\
+. if \\n[pic*autolabel] \
+. tm .ds \\*[target] \\*[chapno]\\n[fig*label-num]
+. if \\n[pic*have-label] \
+. tm .ds \\*[target] \\*[pic*label]
+. \}
+. rm target
+. fam
+. ft
+. ps
+. gcolor
+. ie !\\n[pic*caption-after-label] .br
+. el \{\
+. if !'\\*[pic*caption]'' .nop \
+\\*[pic*caption-specs]\\*[pic*caption]\\*[revert-specs]
+. br
+. \}
+. ev
+. in 0
+. \}
+. if \\n[pic*pdfbx] .nr pic*pdfbx 2
+. ev
+. if !\\n[pdfbx-running] \
+. sp .5
+. if \\n[pic*pdfbx]=2 .if !\\n[grap] .sp .5
+. ie \\n[pdfbx-running] \
+. if \\n[PIC]=1 .FLOAT off
+. el .FLOAT off
+. it 1 rr-pic*pdfbx
+. in \\n[ind-pre-pic]u
+. if !\\n[defer] .rr pic*have-caption
+. rm pic*left
+. rm short
+. rr float*pic
+. if '\\*[pic*label-sffx-tmp]'.' .ds pic*label-sffx .
+. if \\n[pdfbx-running]=0 .rr pdfbx-running
+. if r pdfbx-top .rr pdfbx-top
+. if '\\*[pic*label-sffx-tmp]'.' .ds pic*label-sffx .
+.END
+\#
+\# ***refer***
+\#
+\# Footnote references
+\# -------------------
+\# *Function:
+\# Instruct REF to put references in footnotes.
+\#
+.MAC FOOTNOTE_REFS END
+. ie !'\\$1'' .rr #FN_REF
+. el \{\
+. if r #EN_REF .rr #EN_REF
+. nr #FN_REF 1
+. \}
+.END
+\#
+\# Endnote references
+\# ------------------
+\# *Function:
+\# Instruct REF to collect references for endnotes output.
+\#
+.MAC ENDNOTE_REFS END
+. ie !'\\$1'' .rr #EN_REF
+. el \{\
+. if r #FN_REF .rr #FN_REF
+. nr #EN_REF 1
+. if !r#EN_MARKER_STYLE .ENDNOTE_MARKER_STYLE SUPERSCRIPT
+. \}
+.END
+\#
+\# Prepare mom for a reference
+\# ---------------------------
+\# *Argument:
+\# <none> | INDENT L|LEFT|R|RIGHT|B|BOTH <indent value>
+\# *Function:
+\# Calls FOOTNOTE or ENDNOTE, depending on whether #REF_FN or
+\# #REF_EN is set to 1.
+\# *Notes:
+\# For convenience, REF is a toggle.
+\#
+\# REF optionally takes the same arguments as FOOTNOTE, allowing
+\# users to indent references that go in footnotes when footnote
+\# indenting is required. FOOTNOTE_REFS must be on for this.
+\#
+.MAC REF END
+. ie \\n[#FN_REF]+\\n[#EN_REF]=0 \{\
+. if !\\n[#REF_WARNING]=1 \{\
+. tm1 "[mom]: Before REF at line \\n[.c], neither FOOTNOTE_REFS nor ENDNOTE_REFS
+. tm1 " has been selected. If "sort" and "accumulate" are in your refer
+. tm1 " commands, references will be collected for later output with $LIST$.
+. tm1 " Otherwise, they will disappear.
+. nr #REF_WARNING 1
+. \}
+. \}
+. el \{\
+. ie \\n[#REF]=1 \{\
+. if \\n[#FN_REF]=1 .FOOTNOTE OFF
+. if \\n[#EN_REF]=1 .ENDNOTE OFF
+. rr #REF
+. \}
+. el \{\
+. rr #REF_WARNING
+. nr #REF 1
+. if \\n[#FN_REF]=1 .FOOTNOTE \\$1 \\$2 \\$3
+. if \\n[#EN_REF]=1 .ENDNOTE
+. \}
+. \}
+.END
+\#
+\# Embedded references in text (with brackets)
+\# -------------------------------------------
+\#
+.MAC REF_BRACKETS_NOTICE END
+. tm1 "[mom]: \\$1 has been removed from mom. See the mom documentation 'refer.html'
+. tm1 " for instructions on parenthetical insertions of references into text.
+. ie '\\$1'REF_STYLE' .tm1 " Continuing to process '\\n[.F]' from line \\n[.c].
+. el .ab [mom]: Aborting '\\n[.F]' at \\$1, line \\n[.c].
+.END
+\#
+.MAC REF_BRACKETS_START END
+. REF_BRACKETS_NOTICE \\$0
+.END
+\#
+.MAC REF_BRACKETS_END END
+. REF_BRACKETS_NOTICE \\$0
+.END
+\#
+\# These four pairs of aliases used to allow users to embed
+\# references in text and have them surrounded by (), [], {} or <>.
+\# bracket-label should be used in the refer block instead.
+\#
+.ALIAS REF( REF_BRACKETS_START
+.ALIAS REF) REF_BRACKETS_END
+\#
+.ALIAS REF[ REF_BRACKETS_START
+.ALIAS REF] REF_BRACKETS_END
+\#
+.ALIAS REF{ REF_BRACKETS_START
+.ALIAS REF} REF_BRACKETS_END
+\#
+.ALIAS REF< REF_BRACKETS_START
+.ALIAS REF> REF_BRACKETS_END
+\#
+\# Refer indenting
+\# ---------------
+\# *Argument:
+\# FOOTNOTE | ENDNOTE | BIBLIO <indent for 2nd and subsequent lines of discrete reference entries>
+\# *Function:
+\# Sets registers #REF_FN_INDENT, #REF_EN_INDENT or #REF_BIB_INDENT.
+\# *Notes:
+\# Indent value requires a unit of measure. If refs are going
+\# into footnotes or endnotes, first lines get indented; if going
+\# into a bibliography, second lines get indented
+\#
+.MAC INDENT_REFS END
+. if '\\$1'FOOTNOTE' .ds $REF_FN_INDENT \\$2
+. if '\\$1'ENDNOTE' .ds $REF_EN_INDENT \\$2
+. if '\\$1'BIBLIO' .ds $REF_BIB_INDENT \\$2
+.END
+\#
+.ALIAS REF_INDENT INDENT_REFS
+\#
+\# Hyphenation of references
+\# -------------------------
+\# *Argument:
+\# <none> | <anything>
+\# *Function:
+\# Sets register #REF_HY
+\#
+.MAC HYPHENATE_REFS END
+. ie '\\$1'' .nr #REF_HY 1
+. el \
+. if r #REF_HY .rr #REF_HY
+.END
+\#
+\# The remainder of the definitions in this section are modified
+\# versions of the definitions found in the refer module of s.tmac.
+\#
+.de @error
+.tm [mom]: '\\n[.F]', line \\n[.c]: \\$*
+..
+\#
+\# Underlining unavoidably turns off sentence spacing.
+\#
+.de ref*restore-ss
+\c
+.SS \\*[$SAVED_SS_VAR]
+.if '\\n[.z]'END_NOTES' \{\
+\c
+\E*[PREV]\c
+.\}
+..
+\# The following strings define the order of entries for different
+\# types of references. Each letter in the string refers to a database
+\# field (A for author, T1/T2 for article and book titles, etc).
+\#
+.de ref*specs
+.if \\n[#PRINT_STYLE]=1 \{\
+. char ' \[aq]
+. char \[oq] \[aq]
+.\}
+.\" Internet site - type 0
+.ds ref*spec!0 i Q A m p T2 s o D c a u n
+.\" Journal article - type 1
+.ds ref*spec!1 i Q A m p T2 q O J V S N D P n
+.\" Book - type 2
+.ds ref*spec!2 i Q A m p T1 q b d l r E S e V O C I D P t n
+.\" Article within book - type 3
+.ds ref*spec!3 i Q A m p T2 B b d l r E S e V O C I D P t n
+.\" Tech report - type 4
+.ds ref*spec!4 i Q A m p T1 R G O C I D P n
+.\" Magazine or newspaper article - type 5
+.ds ref*spec!5 i Q A m p T2 O M V S N D P n
+..
+\#
+\# Refer's "1st" macro. Since it is possible to define database
+\# fields using any single letter, we remove all possible string
+\# definitions of the form [X and [x. Also, reset ref*spec!<n>
+\# strings to their defaults.
+\#
+.de ]-
+.ref*specs
+.rm [A [B [C [D [E [F [G [H [I [J [K [L [M \
+ [N [O [P [Q [R [S [T [U [V [W [X [Y [Z \
+ [a [b [c [d [e [f [g [h [i [j [k [l [m \
+ [n [o [p [q [r [s [t [u [v [w [x [y [z
+.if r [e .rr [e \" [e persists if %e field is last
+.rr ref*type
+.rm ref*string
+..
+\#
+\# Refer's "2nd" macro; builds up a reference with ref*build, and
+\# prints it with ref*print.
+\#
+.de ][
+.nr ref*type \\$1
+.if \\n[ref*type]=0 \{\
+. ie d [C \{\
+. if !d [I \{\
+. nr pre-1900 1 \" If pre-1900, MLA allows excluding publisher
+. nr ref*type 2
+. \}
+. \}
+. el .nr ref*type 2
+. if d [q .nr ref*type 2
+.\}
+.if d [u .nr ref*type 0 \" If %u exists, always treat as Internet ref
+.if \\n[ref*type]=3 \{\
+. if !'\\*([R'' \{\
+. nr ref*type 4
+. ds ref*spec!4 i Q A m p T2 B R O C I D P n
+. \}
+. if !'\\*([G'' \{\
+. nr ref*type 4
+. ds ref*spec!4 i A m p T2 B G O C I D P O n
+. \}
+.\}
+.if r [T \{\
+. als [T1 [T
+. als [T2 [T
+.\}
+.ie d ref*spec!\\n[ref*type] .ref*build \\*[ref*spec!\\n[ref*type]]
+.el \{\
+. @error unknown reference type '\\n[ref*type]'
+. ref*build \\*[ref*spec!0]
+.\}
+.if !\\n[.hy]=0 \{\
+.nr #RESTORE_HY \\n[.hy]
+.if !r#REF_HY .nh
+.\}
+.ref*print
+.if !\\n[#RESTORE_HY]=0 .hy \\n[#RESTORE_HY]
+.rr #RESTORE_HY
+.rm ref*string
+.rm [F [T1 [T2
+..
+\#
+\# Refer's "3rd" macros, which set up and terminate the output
+\# of collected references
+\#
+.de ]<
+.rm author \" If not, persists over multiple 'bibliography' commands
+.als ref*print ref*end-print
+.nr #REF 1
+.if \\n[#BIB_LIST]=1 \{\
+. nr #IN_BIB_LIST 1
+. LIST DIGIT \\*[$BIB_LIST_SEPARATOR] \\*[$BIB_LIST_PREFIX]
+.\}
+..
+\#
+.de ]>
+.LIST OFF
+.rr #REF
+.rr #IN_BIB_LIST
+.als ref*print ref*normal-print
+..
+\#
+\# Output
+\# ------
+\#
+\# Output normal, non-collected refs
+\#
+.de ref*normal-print
+.nr #CURRENT_HY \\n[.hy]
+\\*[ref*string]
+..
+\#
+\# Output collected refs
+\#
+.de ref*end-print
+.\" 10 is arbitrary
+.nn 10
+.nr #REF_BIB_INDENT (u;\\*[$REF_BIB_INDENT])
+.ie \\n[#BIB_LIST]=0 \{\
+. in +\\n[#REF_BIB_INDENT]u
+. ti -\\n[#REF_BIB_INDENT]u
+.\}
+.el .ITEM
+.\" Part of workaround for refer spitting out a blank page if the
+.\" last ref falls on the bottom line.
+\\*[ref*string]\R'ref*num*first-pass +1'\?\R'ref*num +1'\?
+.sp \\*[$BIB_SPACE]
+.ie \\n[#BIB_LIST]=0 .in
+.el .IL -\\n[#REF_BIB_INDENT]u
+.nn 0
+..
+\#
+.als ref*print ref*normal-print
+\#
+\# Build up the ref*string
+\#
+\# Correct MLA "typewritten" style (printstyle TYPEWRITE) demands
+\# two spaces after each period. The spaces are hardwired into the
+\# string definitions (ref*add-<x>), so we have to make sure that there
+\# aren't two spaces when the printstyle is TYPESET. Since I find that
+\# references look a bit crowded with 0 sentence space, I've bumped it
+\# up to +8. User's sentence spacing is reset in FOOTNOTES and ENDNOTES.
+\#
+.de ref*build
+.if \\n[#PRINT_STYLE]=2 \
+. if (\\n[#FN_REF]+\\n[#EN_REF])>0 .SS +8
+.rm ref*string
+.while \\n[.$] \{\
+. if d [\\$1 \{\
+. ie d ref*add-\\$1 .ref*add-\\$1
+. el .ref*add-dflt \\$1
+. \}
+. shift
+.\}
+.\" now add a final period
+.ie d ref*string \{\
+. if !\\n[ref*suppress-period] .as ref*string .
+. if d ref*post-punct \{\
+. as ref*string "\\*[ref*post-punct]
+. rm ref*post-punct
+. \}
+.\}
+.el .ds ref*string
+..
+\#
+\# The following macros determine how entries are formatted WRT
+\# punctuation, type style, additional strings, etc.
+\#
+\# o First argument is the database field letter.
+\# o Second argument is the punctuation character to use to separate this
+\# field from the previous field.
+\# o Third argument is a string with which to prefix this field.
+\# o Fourth argument is a string with which to postfix this field.
+\# o Fifth argument is a string to add after the punctuation character
+\# supplied by the next field.
+\#
+\# %A Author(s)
+.de ref*add-A
+.ds eval*[A \\*([A
+.substring eval*[A -1
+.if !\\n[skip-[A] \{\
+. if '\\*[eval*[A]'.' \
+. if !\\n[#FN_REF]+\\n[#EN_REF] .chop [A
+.\" Per MLA, footnotes and endnotes should not use idem, therefore
+.\" if %i contains other than idem (e.g., ed., trans.), transpose it
+.\" to after author's name
+. ie \\n[#FN_REF]+\\n[#EN_REF]=1 \{\
+. ie !'\\*[idem]'' .ref*field A "" "" "? \\*[idem]"
+. el .ref*field A
+. rm idem
+. el .ref*field A
+. \}
+.\}
+.if \\n([A .nr ref*suppress-period 1
+.rr skip-[A
+..
+\# %i Idem.
+\#
+\# In bibliographies, per MLA, replace %A with long dash after
+\# first entry with author's name; if %i field contains other than
+\# the word 'idem', appends it to the dash.
+\# In foot/endnotes, idem is ignored; MLA requires full name for
+\# each foot/endnote entry.
+\#
+.de ref*add-i
+.\" Is a foot/endnote.
+.ie \\n[#FN_REF]+\\n[#EN_REF]=1 \{\
+. ie '\\*([i'idem' .rm [i
+. el .ds idem \\*([i
+.\}
+.el \{\
+. rr skip-[A
+.\" %i is idem
+. ie '\\*([i'idem' \{\
+.\" If [A (%A) is the same as the last [A, captured in 'author'.
+. if '\\*([A'\\*[author]' \{\
+. rm [i
+. ref*field i "" \[idem] "" " "
+. nr skip-[A 1
+. \}
+. ds author \\*([A
+. \}
+.\" %i is not 'idem'; attach to long dash
+. el \{\
+. ds eval*[i \\*([i
+. substring eval*[i -1
+. if '\\*[eval*[i]'.' \{\
+. chop [i
+. ds idem \\*([i
+. \}
+. rm [i
+. rm [A
+. ref*field i "" \[idem] ", \\*[idem]" " "
+. \}
+.\}
+..
+\# %m Multiple authors (et al.)
+.de ref*add-m
+.if !\\n[#FN_REF]+\\n[#EN_REF] \{\
+. ds eval*[m \\*([m
+. substring eval*[m -1
+. if '\\*[eval*[m]'.' .chop [m
+.\}
+.ref*field m ,
+..
+\# %p Post-author string (e.g., Preface, Foreword, etc)
+.de ref*add-p
+.\" Convert first letter to uppercase, per MLA, if BIBLIO
+.if !\\n[#FN_REF]+\\n[#EN_REF] \{\
+. ds initial*cap \\*([p
+. substring initial*cap 0 0
+. ds [p*string \\*([p
+. substring [p*string 1
+. ds [p \E*[UC]\\*[initial*cap]\E*[LC]\\*[[p*string]
+.\}
+.ie \\n[#FN_REF]+\\n[#EN_REF] .ref*field p ,
+.el .ref*field p . " "
+..
+\# %Q Author(s) when author is not a person
+.de ref*add-Q
+.ie \\n[#FN_REF]+\\n[#EN_REF] .ref*field Q
+.el .ref*field Q
+..
+\# %T Title (generic)
+.de ref*add-T1
+.ie \\n[#FN_REF]+\\n[#EN_REF] .ref*field T , \E*[IT] \E*[ref*restore-ss]
+.el \{\
+. ie !'\\*([A'' .ref*field T . " \E*[IT]" \E*[ref*restore-ss]
+. el \{\
+. ie !'\\*([Q'' .ref*field T . " \E*[IT]" \E*[ref*restore-ss]
+. el .ref*field T . \E*[IT] \E*[ref*restore-ss]
+. \}
+.\}
+.if \\n([T .nr ref*suppress-period \\n([T
+..
+\# %T Title of a chapter or article
+.de ref*add-T2
+.ie \\n[#FN_REF]+\\n[#EN_REF] \
+. ref*field T , \[lq] "" \[rq]
+.el \{\
+. ie '\\*([A'' \{\
+. ref*field T . \[lq] "" \[rq]
+. if !'\\*([Q''.ref*field T . " \[lq]" "" \[rq]
+. \}
+. el .ref*field T . " \[lq]" "" \[rq]
+.\}
+.if \\n([T .nr ref*suppress-period \\n([T
+..
+\# %B Book title (when citing an article from a book)
+.de ref*add-B
+.ie \\n[#FN_REF]+\\n[#EN_REF] \{\
+. ie \\n([T .ref*field B "" \E*[IT] \E*[ref*restore-ss]
+. el .ref*field B , \E*[IT] \E*[ref*restore-ss]
+.\}
+.el \{\
+. ie \\n([T .ref*field B "" ".\E*[IT]" \E*[ref*restore-ss]
+. el .ref*field B . " \E*[IT]" \E*[ref*restore-ss]
+.\}
+\# refer doesn't set reg [T to 1 for these book titles, so we do it here
+.ds eval*[B \\*([B
+.substring eval*[B -1
+.rr [T
+.if '\\*[eval*[B]'!' .nr [T 1
+.if '\\*[eval*[B]'?' .nr [T 1
+.rm eval*[B
+..
+\# %q Titles that must go in quotes (e.g. an unpublished dissertation)
+.de ref*add-q
+.ie \\n[#FN_REF]+\\n[#EN_REF] .ref*field q , \[lq] "" \[rq]
+.el \{\
+. ie !'\\*([A'' .ref*field q . " \[lq]" "" \[rq]
+. el \{\
+. ie !'\\*([Q'' .ref*field q . " \[lq]" "" \[rq]
+. el .ref*field q . \[lq] "" \[rq]
+. \}
+.\}
+..
+\# %R Report number for technical reports
+.de ref*add-R
+.ref*field R . " "
+..
+\# %J Journal name
+.de ref*add-J
+.ie \\n[#FN_REF]+\\n[#EN_REF] \{\
+. ie \\n([T .ref*field J "" "\E*[IT]" \E*[ref*restore-ss]
+. el .ref*field J , "\E*[IT]" \E*[ref*restore-ss]
+.\}
+.el \{\
+. ie \\n([T .ref*field J "" " \E*[IT]" \E*[ref*restore-ss]
+. el .ref*field J . " \E*[IT]" \E*[ref*restore-ss]
+.\}
+..
+\# %M Magazine or newspaper name
+.de ref*add-M
+.ie \\n[#FN_REF]+\\n[#EN_REF] \{\
+. ie \\n([T .ref*field M "" "\E*[IT]" \E*[ref*restore-ss]
+. el .ref*field M , "\E*[IT]" \E*[ref*restore-ss]
+.\}
+.el \{\
+. ie \\n([T .ref*field M "" " \E*[IT]" \E*[ref*restore-ss]
+. el .ref*field M . " \E*[IT]" \E*[ref*restore-ss]
+.\}
+..
+\# %E Editor(s)
+.de ref*add-E
+.ds eval*[E \\*([E
+.substring eval*[E -1
+.if '\\*[eval*[E]'.' \{\
+. if !\\n[#FN_REF]+\\n[#EN_REF] .chop [E
+. rm eval*[E
+.\}
+.\" Workaround for join-authors also joining editors. MLA style
+.\" requires a comma after first editor only if there are more than
+.\" two, whereas join-authors always puts a comma after the first if
+.\" there's more than one.
+.rm eval*[E
+.nr position 1 1
+.nr counter 1 1
+.while !'\\*[eval*[E]',' \{\
+. ds eval*[E \\*([E
+. substring eval*[E \\n+[position] \\n[position]
+. if \\n+[counter]>30 .break \" 30 is arbitrary
+.\}
+.\" Check for " and"
+.if '\\*[eval*[E]',' \{\
+. ds eval*[E \\*([E
+. nr and-check \\n[position]+4
+. substring eval*[E \\n+[position] \\n[and-check]
+.\}
+.if '\\*[eval*[E]' and' \{\
+. nr counter 1 1
+. nr start-range -1 1
+. nr end-range 3 1
+. while !'\\*[eval*[E]', and' \{\
+. ds eval*[E \\*([E
+. substring eval*[E \\n+[start-range] \\n+[end-range]
+. if \\n+[counter]>50 .break \" just in case; 50 is arbitrary
+. \}
+. if '\\*[eval*[E]', and' \{\
+. length len*[E \\*([E
+. nr rhs \\n[len*[E]-\\n[start-range]
+. ds lhs \\*([E
+. ds rhs \\*([E
+. substring lhs 0 \\n[start-range]-1
+. substring rhs -(\\n[rhs]-1)
+. ds [E \\*[lhs]\\*[rhs]
+. \}
+. rm lhs
+. rm rhs
+. rr and-check
+. rr counter
+. rr start-range
+. rr end-range
+. rr len*[E
+.\}
+.\" End workaround
+.ie !\\n[ref*type]=0 \{\
+. ie \\n([E>0 \{\
+. ie \\n[#FN_REF]+\\n[#EN_REF] \{\
+. ie \\n([T .ref*field E "" "ed. "
+. el .ref*field E , "ed. "
+. \}
+. el \{\
+. ie \\n([T .ref*field E "" " Eds. "
+. el .ref*field E . " Eds. "
+. \}
+. \}
+. el \{\
+. ie \\n[#FN_REF]+\\n[#EN_REF] \{\
+. ie \\n([T .ref*field E "" "ed. "
+. el .ref*field E , "ed. "
+. \}
+. el \{\
+. ie \\n([T .ref*field E "" " Ed. "
+. el .ref*field E . " Ed. "
+. \}
+. \}
+.\}
+.el \{\
+. ie \\n([T .ref*field E "" " "
+. el .ref*field E . " "
+.\}
+.rr [T
+.rr [E
+..
+\# %e Edition
+.de ref*add-e
+.ie \\n([T .ref*field e "" "" " ed."
+.el \{\
+. ie \\n[#FN_REF]+\\n[#EN_REF] .ref*field e , "" " ed."
+. el .ref*field e . " " " ed."
+.\}
+.nr ref*suppress-period 1
+.nr [e 1
+.rr [T
+..
+\# %V Volume (of a journal, or series of books); for journals, %N may be preferable
+.de ref*add-V
+.if \\n[ref*type]=1 \
+. ref*field V
+.if \\n[ref*type]=2 \{\
+. ie \\n[#FN_REF]+\\n[#EN_REF] .ref*field V , "vol. "
+. el \{\
+. ie \\n([T .ref*field V "" " Vol. "
+. el .ref*field V . " Vol. "
+. \}
+.\}
+.if \\n[ref*type]=3 \{\
+. ie \\n([T .ref*field V "" " "
+. el .ref*field V . " "
+.\}
+.rr [T
+..
+\# %N Journal number
+.de ref*add-N
+.ref*field N
+..
+\# %S Series (books or journals)
+.de ref*add-S
+.if \\n[ref*type]=1 \
+. ref*field S
+.if \\n[ref*type]=2 \{\
+. ie \\n[#FN_REF]+\\n[#EN_REF] \{\
+. ie \\n([T .ref*field S
+. el .ref*field S ,
+. \}
+. el \{\
+. ie \\n([T .ref*field S "" " "
+. el .ref*field S . " "
+. \}
+.\}
+.if \\n[ref*type]=3 \{\
+. ie \\n([T .ref*field S "" " "
+. el .ref*field S . " "
+.\}
+.rr [T
+\# refer doesn't set reg [T to 1 for series titles, so we do it here
+.ds eval*[S \\*([S
+.substring eval*[S -1
+.if '\\*[eval*[S]'!' .nr [T 1
+.if '\\*[eval*[S]'?' .nr [T 1
+.rm eval*[S
+..
+\# %C City
+.de ref*add-C
+.ie \\n[#FN_REF]+\\n[#EN_REF] \{\
+. ie r [d \{\
+. ref*field C
+. rr [d
+. \}
+. el \
+. ref*field C "" \*[FU 2](
+. if \\n([T .nr ref*suppress-period \\n([T
+.\}
+.el \{\
+. ie \\n([T .ref*field C "" " "
+. el \{\
+. ie r [e .ref*field C "" " "
+. el .ref*field C . " "
+. \}
+.\}
+.rr [T
+.rr [e
+..
+\# %I Publisher (I stands for Issuer)
+.de ref*add-I
+.ie \\n[#FN_REF]+\\n[#EN_REF] \{\
+. ie !'\\*([C'' .ref*field I :
+. el .ref*field I "" (
+.\}
+.el \{\
+. ie !'\\*([C'' .ref*field I :
+. el \{\
+. ie \\n([T .ref*field I "" " "
+. el .ref*field I . " "
+. \}
+.\}
+.rr [T
+..
+\# %D Date of publication
+.de ref*add-D
+.if \\n[ref*type]=0 \{\
+. ie \\n[#FN_REF]+\\n[#EN_REF] .ref*field D ,
+. el .ref*field D . " "
+.\}
+.if \\n[ref*type]=1 \
+. ref*field D "" "(" ")"
+.if \\n[ref*type]=2 \{\
+. ie \\n[#FN_REF]+\\n[#EN_REF] .ref*field D , "" )
+. el .ref*field D ,
+.\}
+.if \\n[ref*type]=3 \{\
+. ie !'\\*([C'' \{\
+. ie \\n[#FN_REF]+\\n[#EN_REF] .ref*field D , "" )
+. el .ref*field D ,
+. \}
+. el \{\
+. if '\\*([I'' \{\
+. ds eval*[D \\*([D
+. substring eval*[D 0 -4
+. ie '\\*[eval*[D]'1' .ds kern \*[BU3]
+. el .ds kern \*[BU2]
+. ie \\n[#PRINT_STYLE]=2 \
+. if \\n[#FN_REF]+\\n[#EN_REF] .ref*field D "" (\\*[kern] )
+. el .ref*field D
+. \}
+. rm eval*[D
+. rm kern
+. \}
+.\}
+.if \\n[ref*type]=4 .ref*field D ,
+.if \\n[ref*type]=5 .ref*field D
+.ds eval*[D \\*([D
+.substring eval*[D -1
+.if '\\*[eval*[D]'.' .nr ref*suppress-period 1
+..
+\# %P Page number(s)
+.de ref*add-P
+.if \\n[ref*type]=5 .nr ref*type 1
+.ie \\n[#FN_REF]+\\n[#EN_REF] \{\
+. ie \\n[ref*type]=1 .ref*field P : "" .
+. el .ref*field P "" "\|"
+. if \\n[ref*type]=1 .nr ref*suppress-period 1
+.\}
+.el \{\
+. ie \\n[ref*type]=1 .ref*field P \|:
+. el \{\
+. ie d [n .ref*field P . \| .
+. el .ref*field P . " "
+. \}
+.\}
+..
+\# %G Gov't. ordering number
+.de ref*add-G
+.ie \\n[#FN_REF]+\\n[#EN_REF] ref*field G ,
+.el .ref*field G . " "
+..
+\# %O Other (info that goes after %T [or %B] but is hard to categorize; e.g., a dissertation)
+.de ref*add-O
+.ds eval*[O \\*([O
+.substring eval*[O -1
+.if '\\*[eval*[O]'.' .nr [O 1
+.ds initial*cap \\*([O
+.substring initial*cap 0 0
+.ds [O*string \\*([O
+.substring [O*string 1
+.if !\\n[#FN_REF]+\\n[#EN_REF] \
+. ds [O \E*[UC]\\*[initial*cap]\E*[LC]\\*[[O*string]
+.ie \\n[#FN_REF]+\\n[#EN_REF] .ref*field O ,
+.el \{\
+. if \\n([O=1 .chop [O
+. ie r [e .ref*field O "" " "
+. el \{\
+. ie !d [A .ref*field O
+. el .ref*field O . " "
+. \}
+.\}
+.rr [O
+.rr [e
+..
+\# %n Annotations (after ref)
+.de ref*add-n
+.ds eval*[n \\*([n
+.substring eval*[n -1
+.if '\\*[eval*[n]'.' .chop [n
+.if '\\*[eval*[n]'?' .nr [n 1
+.if '\\*[eval*[n]'!' .nr [n 1
+.ie \\n[#FN_REF]+\\n[#EN_REF] .ref*field n ,
+.el \{\
+. ie !'\\*([P'' .ref*field n "" " "
+. el .ref*field n . " "
+.\}
+.if r [n .nr ref*suppress-period 1
+.rr [n
+..
+\#
+.de ref*add-dflt
+.ref*field \\$1 ,
+..
+\#
+\# Book reprints
+\# -------------
+\# %d date of publication (the original date of publication)
+.de ref*add-d
+.ie \\n[#FN_REF]+\\n[#EN_REF] \{\
+. ref*field d "" ( ;
+. nr [d 1
+.\}
+.el \{\
+. ie \\n([T .ref*field d "" " "
+. el .ref*field d . " "
+.\}
+.rr [T
+..
+\# %b main author when citing from a preface, introduction, foreword
+\# or afterword
+.de ref*add-b
+.ie \\n[#FN_REF]+\\n[#EN_REF] \{\
+. ie \\n([T .ref*field b "" "by"
+. el .ref*field b , "by "
+.\}
+.el \{\
+. ie \\n([T .ref*field b "" " By "
+. el .ref*field b . " By "
+.\}
+.rr [T
+..
+\# %t title, if different from original title (the T field, which s/b
+\# the original title)
+.de ref*add-t
+.ie \\n[#FN_REF]+\\n[#EN_REF] .ref*field t , "rpt. of \E*[IT] " \E*[ref*restore-ss]
+.el \{\
+. ie \\n([T .ref*field t "" " Rpt. of \E*[IT] " \E*[ref*restore-ss]
+. el .ref*field t . " Rpt. of \E*[IT] " \E*[ref*restore-ss]
+.\}
+.rr [T
+..
+\#
+\# Translated works
+\# ----------------
+\# %l Trans(l)ator
+.de ref*add-l
+.ie \\n[#FN_REF]+\\n[#EN_REF] \{\
+. ie \\n([T .ref*field l "" "trans. "
+. el .ref*field l , "trans. "
+.\}
+.el \{\
+. ie \\n([T .ref*field l "" " Trans. "
+. el .ref*field l . " Trans. "
+.\}
+.rr [T
+..
+\# %r Translato(r) and edito(r)
+.de ref*add-r
+.ie \\n[#FN_REF]+\\n[#EN_REF] .ref*field r , "trans. and ed. "
+.el \{\
+. ie \\n([T .ref*field r "" " Trans. and ed. "
+. el .ref*field r . " Trans. and ed. "
+.\}
+.rr [T
+..
+\#
+\# Internet
+\# --------
+\# %s Site name
+.de ref*add-s
+.ie \\n[#FN_REF]+\\n[#EN_REF] .ref*field s , \E*[IT] \E*[ref*restore-ss]
+.el \{\
+.ie \\n([s .ref*field s "" ".\E*[IT]" \E*[ref*restore-ss]
+.el .ref*field s . " \E*[IT]" \E*[ref*restore-ss]
+.\}
+.\" refer doesn't set reg [T to 1 for these titles, so we do it here
+.if !\\n[#FN_REF]+\\n[#EN_REF] \{\
+. ds eval*[s \\*([s
+. substring eval*[s -1
+. rr [T
+. if '\\*[eval*[s]'.' .nr [T 1
+. if '\\*[eval*[s]'!' .nr [T 1
+. if '\\*[eval*[s]'?' .nr [T 1
+. rm eval*[s
+.\}
+..
+\# %c content of site (ie. Web, Online posting, etc)
+.de ref*add-c
+.ie \\n[#FN_REF]+\\n[#EN_REF] .ref*field c ,
+.el \{\
+. ie \\n([T .ref*field c "" " "
+. el .ref*field c . " "
+.\}
+.rr [T
+..
+\# %o organization, group or sponsor of site
+.de ref*add-o
+.ie \\n[#FN_REF]+\\n[#EN_REF] .ref*field o ,
+.el \{\
+. ie \\n([T .ref*field o "" " "
+. el .ref*field o . " "
+.\}
+.rr [T
+..
+\# %a access date, i.e. the date you read it
+.de ref*add-a
+.ie \\n[#FN_REF]+\\n[#EN_REF] .ref*field a ,
+.el \{\
+. ie \\n([T .ref*field a "" " "
+. el .ref*field a . " "
+.\}
+.rr [T
+..
+\# %u URL
+.de ref*add-u
+.ref*field u "" < >
+.rr [T
+..
+.de ref*add-z
+.ref*field z
+..
+\#
+\# Build up reference string from ref*add-<x> macros.
+\#
+\# First, a string to ensure next field's font is reset to roman
+\# (TYPESET) or non-underlined (TYPEWRITE)
+\#
+.ie !n .ds ref*roman \f[R]\X'ps: exec decornone'\?\R'#UNDERLINE_ON 0'\?
+.el .ds ref*roman \f[R]\?\R'#UNDERLINE_ON 0'\?
+\#
+.de ref*field
+.if d ref*string \{\
+. ie d ref*post-punct \{\
+. as ref*string "\\$2\\*[ref*post-punct] \"
+. rm ref*post-punct
+. \}
+. el .as ref*string "\\$2 \"
+.\}
+.as ref*string "\\$3\\*([\\$1\\$4\E*[ref*roman]
+.if \\n[.$]>4 .ds ref*post-punct "\\$5\E*[ref*roman]
+.nr ref*suppress-period 0
+..
+\#
+\# MARGIN NOTES
+\# ------------
+\#
+\# Wrapper for MNinit.
+\#
+.MAC MN_INIT END
+. if \B'\\$2' \{\
+. tm1 "[mom]: 1.x-style \\$0 detected, but you are using v2.x.
+. tm1 " v2.x requires flags before arguments to \\$0.
+. tm1 " Please read docelement.html#mn-init and update your file.
+. ab [mom]: Aborting '\\n[.F]' at \\$0, line \\n[.c].
+. \}
+. nr #ARGS 0 1
+. nr #COUNT 9
+. while \\n+[#ARGS]<=\\n[#COUNT] \
+. ds $MN-arg\\n[#ARGS] @
+. nr #FLAG 0 1
+. nr #COUNT \\n[#NUM_ARGS]
+. while \\n+[#FLAG]<=\\n[#COUNT] \{\
+. if '\\$1'RAGGED' \{\
+. ds $MN-arg1 \\$1
+. shift
+. \}
+. if '\\$1'SYMMETRIC' \{\
+. ds $MN-arg1 \\$1
+. shift
+. \}
+. if '\\$1'L_WIDTH' \{\
+. shift
+. ds $MN-arg2 \\$1
+. shift
+. \}
+. if '\\$1'R_WIDTH' \{\
+. shift
+. ds $MN-arg3 \\$1
+. shift
+. \}
+. if '\\$1'GUTTER' \{\
+. shift
+. ds $MN-arg4 \\$1
+. shift
+. \}
+. if '\\$1'FONTSTYLE' \{\
+. shift
+. ds $MN-arg5 \\$1
+. shift
+. \}
+. if '\\$1'SIZE' \{\
+. shift
+. ds $MN-arg6 \\$1
+. shift
+. \}
+. if '\\$1'LEAD' \{\
+. shift
+. ds $MN-arg7 \\$1
+. shift
+. \}
+. if '\\$1'COLOR' \{\
+. shift
+. ds $MN-arg8 \\$1
+. shift
+. \}
+. if '\\$1'HY' \{\
+. shift
+. ds $MN-arg9 \\$1
+. shift
+. \}
+. \}
+. if '\\*[$MN-arg5]'@' .ds $MN-arg5 \E*[$DOC_FAM]R
+. MNinit \
+\\*[$MN-arg1] \\*[$MN-arg2] \
+\\*[$MN-arg3] \\*[$MN-arg4] \
+\\*[$MN-arg5] \\*[$MN-arg6] \
+\\*[$MN-arg7] \\*[$MN-arg8] \
+\\*[$MN-arg9]
+.END
+\#
+.MAC MN_OVERFLOW_TRAP END
+. if \\n[#OVERFLOW_LEFT]=1 \{\
+. nr #no-repeat-MN-left 1
+. di MN_OVERFLOW_LEFT
+. \}
+. if \\n[#OVERFLOW_RIGHT]=1 \{\
+. nr #no-repeat-MN-right 1
+. di MN_OVERFLOW_RIGHT
+. \}
+. rr #OVERFLOW_LEFT
+. rr #OVERFLOW_RIGHT
+.END
+\#
+\# The remainder of the margin notes macros and routines are adapted
+\# from Werner Lemberg's MN.tmac.
+\#
+\# MNinit
+\# ------
+\# Usage:
+\# MNinit [ragged|symmetric] \
+\# left-width right-width separation \
+\# font fontsize vertical-spacing \
+\# color hyphenation-flags
+\#
+\# Initialize margin notes. Empty arguments (denoted with "") set
+\# default values. If the first argument is the string 'ragged',
+\# left and right margin notes are printed ragged-right. If it is
+\# 'symmetric', left margin notes are printed ragged-left and right
+\# margin notes ragged-right. If omitted, margin notes are left
+\# and right adjusted.
+\#
+.de MNinit
+. nr #MNinit 1
+. ds MN-left-ad b\"
+. ds MN-right-ad b\"
+. if '\\$1'@' .shift
+. if '\\$1'RAGGED' \{\
+. ds MN-left-ad l\"
+. ds MN-right-ad l\"
+. shift
+. \}
+. if '\\$1'SYMMETRIC' \{\
+. ds MN-left-ad r\"
+. ds MN-right-ad l\"
+. shift
+. \}
+. ie \B'\\$3' .nr MN-sep (n;\\$3)
+. el .nr MN-sep 1m
+. if ((\\n[.o] - \\n[MN-sep]) < 1n) \
+. ab MN: Left margin too small (<1n) for requested margin notes separation.
+. ie \B'\\$1' \{\
+. nr MN-left-width (n;\\$1)
+. nr MN-left-start (\\n[.o] - \\n[MN-sep] - \\n[MN-left-width])
+. \}
+. el \{\
+. nr MN-left-width (\\n[.o] - \\n[MN-sep])
+. nr MN-left-start 0
+. \}
+. if (\\n[MN-left-start] < 0) \
+. ab MN: Left margin too small for requested margin notes settings.
+. if (\\n[MN-left-width] < 1n) \
+. ab MN: Left margin notes width too small (<1n).
+. ie \B'\\$2' \{\
+. nr MN-right-width (n;\\$2)
+. nr MN-right-start (\\n[.o] + \\n[.l] + \\n[MN-sep])
+. if \\n[#COLUMNS]=1 \{\
+. if !\\n[#NUM_COLS]=1 \
+. nr MN-right-start (\\n[#COL_2_L_MARGIN] + \\n[#COL_L_LENGTH] + \\n[MN-sep])
+. \}
+. \}
+. el \{\
+. nr MN-right-width \\n[MN-left-width]
+. nr MN-right-start (\\n[.o] + \\n[.l] + \\n[MN-sep])
+. if \\n[#COLUMNS]=1 \{\
+. if !\\n[#NUM_COLS]=1 \
+. nr MN-right-start (\\n[#COL_2_L_MARGIN] + \\n[#COL_L_LENGTH] + \\n[MN-sep])
+. \}
+. \}
+. ie \A'\\$4' \{\
+. ds MN-font \\$4\"
+. if \\n[#PRINT_STYLE]=1 .ds MN-font CR
+. \}
+. el \{\
+. ds MN-font \\*[$PP_FT]
+. if \\n[#PRINT_STYLE]=1 .ds MN-font CR
+. \}
+. ie \B'\\$5' \{\
+. ps \\$5
+. nr MN-size \\n[.ps]
+. ps
+. if \\n[#PRINT_STYLE]=1 \{\
+. ps \\*[$TYPEWRITER_PS]
+. nr MN-size \\n[.ps]
+. ps
+. \}
+. \}
+. el \
+. nr MN-size \\n[#DOC_PT_SIZE]
+. ie \B'\\$6' \{\
+' vs \\$6
+. nr MN-spacing \\n[.v]
+' vs
+. if \\n[#PRINT_STYLE]=1 \
+. nr MN-spacing \\n[#DOC_LEAD]
+. \}
+. el .nr MN-spacing \\n[#DOC_LEAD]
+. ie \A'\\$7' \
+. if !\\n[#PRINT_STYLE]=1 .ds MN-color \\$7\"
+. el \
+. if !\\n[#PRINT_STYLE]=1 .ds MN-color
+. ie \B'\\$8' .nr MN-hy \\$8
+. el .nr MN-hy \\n[.hy]
+. ev MNbottom-left-env
+. if \A'\\*[MN-font]' .ft \\*[MN-font]
+. if \\n[MN-size] .ps \\n[MN-size]u
+. if \\n[MN-spacing] .vs \\n[MN-spacing]u
+. ll \\n[MN-left-width]u
+. ad \\*[MN-left-ad]
+. hy \\n[MN-hy]
+' in 0
+. nop \m[\\*[MN-color]]\c
+. ev
+. ev MNbottom-right-env
+. if \A'\\*[MN-font]' .ft \\*[MN-font]
+. if \\n[MN-size] .ps \\n[MN-size]u
+. if \\n[MN-spacing] .vs \\n[MN-spacing]u
+. ll \\n[MN-right-width]u
+. ad \\*[MN-right-ad]
+. hy \\n[MN-hy]
+' in 0
+. nop \m[\\*[MN-color]]\c
+. ev
+. nr MN-active 0
+..
+\# MN
+\# --
+\# Usage:
+\#
+\# MN LEFT|RIGHT
+\# margin note text
+\# MN
+\#
+\# With a parameter, start a margin note, otherwise end a margin note.
+\# If the parameter is the string 'left', define a left margin note,
+\# otherwise define a right margin note.
+\#
+.de MN
+. ds MN-dir \\$1
+. if !'\\$1'LEFT' \{\
+. if !'\\$1'RIGHT' \{\
+. MN_QUIT
+. return
+. \}
+. \}
+. if \\n[#COLUMNS]=1 \{\
+. if \\n[#NUM_COLS]>2 \{\
+. tm [mom]: Macro MN: More than two columns. Ignoring margin notes.
+. return
+. \}
+. if !\\n[#NUM_COLS]=1 \{\
+. ie \\n[#COL_NUM]=1 .ds MN-dir LEFT
+. el .ds MN-dir RIGHT
+. \}
+. \}
+. if !\\n[#MNinit]=1 \{\
+. tm1 "[mom]: Macro MN: You must set parameters with MN_INIT before using MN.
+. ab [mom]: Aborting '\\n[.F]' at MN, line \\n[.c].
+. \}
+. ie !'\\$1'' \{\
+. if \\n[MN-active] \{\
+. tm [mom]: Macro MN: Can't handle nested margin notes, line \\n[.c].
+. return
+. \}
+. nr MN-active 1
+. ev MN-env
+. ie '\\*[MN-dir]'LEFT' \{\
+. nr MN-left +1
+. ds MN-curr l-\\n[MN-left]\"
+. evc MNbottom-left-env
+. \}
+. el \{\
+. nr MN-right +1
+. ds MN-curr r-\\n[MN-right]\"
+. evc MNbottom-right-env
+. \}
+. mk MN-mk-\\*[MN-curr]
+. di MN-div-\\*[MN-curr]
+. \}
+. el .MN_QUIT
+..
+\#
+\# MN_QUIT
+\# -------
+\# Utility macro to handle .MN OFF | QUIT | X etc
+\#
+.de MN_QUIT
+. if \\n[MN-active] \{\
+. br
+. di
+. nr MN-div-\\*[MN-curr]-depth \\n[dn]
+. ev
+. \}
+. nr MN-active 0
+..
+\#
+\# MNtop
+\# -----
+\# Resets these registers (called in HEADER)
+.de MNtop
+. nr MN-left 0
+. nr MN-right 0
+. nr MN-active 0
+. rr MN-shifted
+. ch FOOTER \\n[#VARIABLE_FOOTER_POS]u
+..
+\#
+\# MNbottom
+\# --------
+\# Executed in FOOTER.
+\#
+.de MNbottom
+. if '\\$0'MNbottom-left' \{\
+. ds MN-pos left
+. ds l-r l
+. ds Left-Right Left
+. \}
+. if '\\$0'MNbottom-right' \{\
+. ds MN-pos right
+. ds l-r r
+. ds Left-Right Right
+. \}
+. nr MN-curr 0
+. nr MN-last-pos 0
+. nr MN-lead-adj \\n[#DOC_LEAD]-\\n[MN-spacing]
+. vpt 0
+. if \\n[MN-active] \{\
+. di
+. tm [mom]: Macro MN: Margin note finished by new page. Ignored.
+. \}
+. if \\n[#RECTO_VERSO] \{\
+. if e \{\
+. if '\\*[MN-pos]'right' \
+. nr MN-\\*[MN-pos]-start (\\n[.o]+\\n[.l]+\\n[MN-sep])
+. if '\\*[MN-pos]'left' \
+. nr MN-\\*[MN-pos]-start (\\n[.o]-\\n[MN-sep]-\\n[MN-left-width])
+. \}
+. \}
+. po \\n[MN-\\*[MN-pos]-start]u
+. ev MNbottom-\\*[MN-pos]-env
+. nr #P \\n%+\\n[#PAGE_NUM_ADJ]
+. while (\\n[MN-curr] < \\n[MN-\\*[MN-pos]]) \{\
+. nr MN-curr +1
+. ie (\\n[MN-last-pos] < \\n[MN-mk-\\*[l-r]-\\n[MN-curr]]) \
+. sp |\\n[MN-mk-\\*[l-r]-\\n[MN-curr]]u+\\n[MN-lead-adj]u
+. el \{\
+. nr MN-shifted 1
+. sp 1v
+. SHIM
+. if \\n[#SHIM]>\\n[MN-spacing] .sp -(1v+\\n[MN-lead-adj]u)
+. tm [mom]: Macro MN: Warning: \\*[Left-Right] margin note #\\n[MN-curr] on page \\n[#P] shifted down.
+. \}
+.\" If last margin note doesn't fit
+. if ( (\\n[nl]+\\n[MN-div-\\*[l-r]-\\n[MN-curr]-depth]) > (\\n[.p]+\\n[#VARIABLE_FOOTER_POS]-1) ) \{\
+. if \\n[MN-shifted]=1 \{\
+. sp -(1v+\\n[#SHIM]u)
+. rm MN-div-\\*[l-r]-\\n[MN-curr]
+. tm1 "[mom]: \
+No room to start \\*[MN-pos] margin note #\\n[MN-curr] on page \\n[#P].
+. tm1 " Ignoring margin note.
+. rr MN-shifted
+. \}
+. nr #no-repeat-MN-\\*[MN-pos] 1
+. if '\\*[MN-pos]'left' .nr #OVERFLOW_LEFT 1
+. if '\\*[MN-pos]'right' .nr #OVERFLOW_RIGHT 1
+. ie \\n[#FN_COUNT]=0 \{\
+. ch FOOTER \\n[.p]u
+. wh \\n[#VARIABLE_FOOTER_POS]u+\\n[MN-lead-adj]u+1u MN_OVERFLOW_TRAP
+. \}
+. el \
+. wh \\n[.p]u+\\n[#VARIABLE_FOOTER_POS]u-1u MN_OVERFLOW_TRAP
+. vpt
+. \}
+. nf
+. MN-div-\\*[l-r]-\\n[MN-curr]
+. fi
+. br
+. nr MN-last-pos \\n[nl]
+. \}
+. ev
+. po
+. if !\\n[#no-repeat-MN-\\*[MN-pos]]=1 .vpt
+..
+.
+.ALIAS MNbottom-right MNbottom
+.ALIAS MNbottom-left MNbottom
+\#
+\# PDF SUPPORT
+\# ===========
+\#
+\# Initial setup
+\#
+.nr CURRENT_LEVEL 0
+.nr VIRTUAL_LEVEL 0
+.nr #PDF_BOOKMARKS 1
+.nr #PDF_BOOKMARKS_OPEN 1
+.pdfview /PageMode /UseOutlines
+\#
+\# TOC_BEFORE_HERE
+\# ---------------
+\#
+\# Call this and the TOC will be placed preceding this page
+\#
+.MAC TOC_BEFORE_HERE END
+. nr TOC_BH 1
+. pdfpagename MOM:TOC
+.END
+\#
+\# TOC_AFTER_HERE
+\# ---------------
+\#
+\# Call this and the TOC will be placed after this page
+\#
+.MAC TOC_AFTER_HERE END
+. nr TOC_BH 2
+. pdfpagename MOM:TOC
+.END
+\#
+\# PDF_LINK_COLOR
+\# -----------------
+\#
+\# Arguments:-
+\# <name defined by previous call to XCOLOR or NEWCOLOR> or
+\# <red> <green> <blue> all 0.0 -> 1.0
+\# Notes
+\# Should be called before START but can also be called at any time to change colour
+\# The colour assigned at the end of the document is used for all links in the TOC
+\#
+.MAC PDF_LINK_COLOR END
+. ie \\n[.$]==3 \{\
+. ds PDFHREF.COLOUR \\$*
+. if !(\B'\\$1' & \B'\\$2' & \B'\\$3') \{\
+. tm1 "[mom]: All three arguments to \\$0 at line \\n[.c] must be decimal.
+. tm1 " Continuing to process using default link color.
+. ds PDFHREF.COLOUR 0.0 0.3 0.9
+. \}
+. defcolor pdf:href.colour rgb \\*[PDFHREF.COLOUR]
+. ds PDFHREF.TEXT.COLOUR pdf:href.colour
+. \}
+. el \{\
+. ie \\n[.$]==0 \{\
+. if dPDFHREF.TEXTCOL.DEFAULT \
+. PDF_LINK_COLOR \\*[PDFHREF.TEXTCOL.DEFAULT]
+. \}
+. el \{\
+. ds ARG_1 \\$1
+. substring ARG_1 0 0
+. ie '\\*[ARG_1]'#' \{\
+. defcolor pdf:href.colour rgb \\$1
+. ds PDFHREF.TEXT.COLOUR pdf:href.colour
+. \}
+. el \{\
+. ie dCOLAL_\\$1 .ds PDFHREF.TEXT.COLOUR \\*[COLAL_\\$1]
+. el .ds PDFHREF.TEXT.COLOUR \\$1
+. \}
+. \}
+. \}
+. if !\\n[PDFHREF_COLOR_SET]=1 \
+. nr PDFHREF_COLOR_SET 1
+.END
+\#
+.ALIAS PDF_LINK_COLOUR PDF_LINK_COLOR
+\#
+\# AUTO_RELOCATE_TOC
+\# -----------------
+\#
+\# Call before START to have TOC automatically relocated to after the
+\# DOC COVER (if there is one) or the COVER if there isn't
+\#
+.MAC AUTO_RELOCATE_TOC END
+. if '\\$1'' .nr TOC.RELOCATE 1
+. if '\\$1'TOP' .nr TOC.RELOCATE 2
+. if '\\$1'BEFORE_DOCCOVER' .nr TOC.RELOCATE 3 \" Same as TOP unless no DOCCOVER
+. if '\\$1'AFTER_DOCCOVER' .nr TOC.RELOCATE 4
+. if '\\$1'BEFORE_COVER' .nr TOC.RELOCATE 5
+. if '\\$1'AFTER_COVER' .nr TOC.RELOCATE 6
+.END
+\#
+.ALIAS AUTO_TOC_RELOCATE AUTO_RELOCATE_TOC
+\#
+\# PDF_BOOKMARK
+\# ------------
+\# *Argument:
+\# Hierarchy Level
+\# Bookmark Text
+\# *Function:
+\# Creates a bookmark using the given text
+\# The level controls the hierarchy of the bookmarks
+\# *Notes
+\# Bookmarks can be turned off (will not be added to document outline) by calling
+\# "PDF_BOOKMARKS NO" and turned on with "PDF_BOOKMARKS".
+\#
+\# Bookmarks can be open or closed by calling PDF_BOOKMARKS_OPEN
+\#
+.MAC PDF_BOOKMARK END
+. if \\n[#PDF_BOOKMARKS] \{\
+. ie '\\$1'NAMED' \{\
+. ds PDF_NM -T \\$2
+. ds PDF_NM2 \\$2
+. shift 2
+. \}
+. el .ds PDF_NM
+. nr LEVEL_REQ \\$1
+. shift
+. ie \\n[LEVEL_REQ]>\\n[VIRTUAL_LEVEL] \{\
+. nr VIRTUAL_LEVEL \\n[LEVEL_REQ]
+. nr LEVEL_REQ \\n[CURRENT_LEVEL]+1
+. \}
+. el \{\
+. ie \\n[LEVEL_REQ]<\\n[VIRTUAL_LEVEL] \{\
+. nr VIRTUAL_DIFF \\n[VIRTUAL_LEVEL]-\\n[LEVEL_REQ]
+. nr VIRTUAL_LEVEL \\n[LEVEL_REQ]
+. nr LEVEL_REQ (\\n[CURRENT_LEVEL]-\\n[VIRTUAL_DIFF])>?1
+. \}
+. el .nr LEVEL_REQ \\n[CURRENT_LEVEL]
+. \}
+. ds PDF_TX \\$*
+. pdfmomclean PDF_TX
+. nr PDF_LEV (\\n[LEVEL_REQ]*\\n[#PDF_BOOKMARKS_OPEN])
+. ie '\\*[.T]'ps' \{\
+. if !'\\*[PDF_NM]'' \{\
+. pdfhref M -N \\*[PDF_NM2] -- \\*[PDF_TX]
+. if !dpdf:href.map .tm gropdf-info:href \\*[PDF_NM2] \\*[PDF_TX]
+. \}
+. pdfbookmark \\n[PDF_LEV] \\*[PDF_TX]
+. \}
+. el .pdfbookmark \\*[PDF_NM] \\n[PDF_LEV] \\$*
+. nr CURRENT_LEVEL \\n[LEVEL_REQ]
+. rr LEVEL_REQ
+. rr PDF_LEV
+. rr VIRTUAL_DIFF
+. rm PDF_NM
+. \}
+.END
+\#
+\# PDF_TITLE
+\# ---------
+\# *Argument:
+\# Title Text
+\# *Function
+\# Set the PDF title (this is often used by PDF readers to title the main window)
+\#
+.MAC PDF_TITLE END
+. ds pdftitle \\$*
+. pdfmomclean pdftitle
+. nop \!x X ps:exec [/Title (\\*[pdftitle]) /DOCINFO pdfmark
+.END
+\#
+\# PDF_BOOKMARKS
+\# -------------
+\# *Argument:
+\# <nothing> | <anything>
+\# *Function:
+\# With no parameter turns on outline bookmarks
+\# With any parameter turns off outline bookmarks
+\#
+.MAC PDF_BOOKMARKS END
+. ie '\\$1'' .nr #PDF_BOOKMARKS 1
+. el .nr #PDF_BOOKMARKS 0
+.END
+\#
+\# PDF_BOOKMARKS_OPEN
+\# ------------------
+\# *Argument:
+\# <number> | <nothing> | <text>
+\# *Function:
+\# If arg is numeric all Bookmark levels > arg are closed
+\# If arg is empty all bookmarks are open
+\# If arg is any text then any following bookmarks are closed
+\#
+.MAC PDF_BOOKMARKS_OPEN END
+. ie \B'\\$1' \{\
+. nr PDFOUTLINE.FOLDLEVEL \\$1
+. nr #PDF_BOOKMARKS_OPEN 1
+. \}
+. el .if '\\*[.T]'pdf' \{\
+. nr PDFOUTLINE.FOLDLEVEL 10000
+. ie '\\$1'' .nr #PDF_BOOKMARKS_OPEN 1
+. el .nr #PDF_BOOKMARKS_OPEN 0-1
+. \}
+.END
+\#
+\# PDF_LINK
+\# --------
+\# *Arguments:
+\# $1 = named link
+\# [PREFIX text] : text to prefix link
+\# [SUFFIX text] : text after link
+\# text
+\# *Notes
+\# Text is output as a hotspot link to named destination.
+\# If text has final '*' it is replaced with the text associated with the link
+\#
+.MAC PDF_LINK END
+. ds PDF_NM \\$1
+. shift
+. ie '\\$1'PREFIX' \{\
+. ds PDF_PRE -P "\&\\$2"
+. shift 2
+. \}
+. el .ds PDF_PRE
+. ie '\\$1'SUFFIX' \{\
+. ds PDF_POST -A "\\$2"
+. shift 2
+. \}
+. el .ds PDF_POST
+. ds PDF_AST_Q
+. ds PDF_TXT \&\\$1
+. ds PDF_AST \\*[PDF_TXT]
+. substring PDF_AST -1 -1
+. if '\\*[PDF_AST]'+' \{\
+. ds PDF_AST *
+. ds PDF_AST_Q ""
+. \}
+. if '\\*[PDF_AST]'*' \{\
+. chop PDF_TXT
+. ie '\\*[.T]'pdf' \{\
+. ie d pdf:look(\\*[PDF_NM]) \
+. as PDF_TXT \&\\*[PDF_AST_Q]\\*[pdf:look(\\*[PDF_NM])]\\*[PDF_AST_Q]
+. el \{\
+. as PDF_TXT Unknown
+. if !rPDF_UNKNOWN .tm \
+\\n[.F]:\\n[.c]: forward reference detected (please run using 'pdfmom')
+. nr PDF_UNKNOWN 1
+. \}
+. \}
+. el \{\
+. ie d pdf:href(\\*[PDF_NM]).info \
+. as PDF_TXT \&\\*[PDF_AST_Q]\\*[pdf:href(\\*[PDF_NM]).info]\\*[PDF_AST_Q]
+. el .as PDF_TXT Unknown
+. \}
+. \}
+. pdfhref L \\*[PDF_PRE] \\*[PDF_POST] -D \\*[PDF_NM] -- \\*[PDF_TXT]
+. rm PDF_NM
+. rm PDF_PRE
+. rm PDF_POST
+. rm PDF_TXT
+. rm PDF_AST
+. rm PDF_AST_Q
+.END
+\#
+.MAC PDF_WWW_LINK END
+. ds PDF_NM \\$1
+. shift
+. ie '\\$1'PREFIX' \{\
+. ds PDF_PRE -P "\\$2"
+. shift 2
+. \}
+. el .ds PDF_PRE
+. ie '\\$1'SUFFIX' \{\
+. ds PDF_POST -A "\\$2"
+. shift 2
+. \}
+. el .ds PDF_POST
+. ds PDF_AST_Q
+. ds PDF_TXT \\$1
+. ie !'\\*[PDF_TXT]'' \{\
+. ds PDF_AST \\*[PDF_TXT]
+. substring PDF_AST -1 -1
+. if '\\*[PDF_AST]'+' \{\
+. ds PDF_AST *
+. ds PDF_AST_Q ""
+. \}
+. if '\\*[PDF_AST]'*' \{\
+. chop PDF_TXT
+. as PDF_TXT \&\\*[PDF_AST_Q]\\*[PDF_NM]\\*[PDF_AST_Q]
+. \}
+. \}
+. el .ds PDF_TXT \\*[PDF_NM]
+. pdfhref W -D "\\*[PDF_NM]" \\*[PDF_PRE] \\*[PDF_POST] -- \\*[PDF_TXT]
+. rm PDF_NM
+. rm PDF_PRE
+. rm PDF_POST
+. rm PDF_TXT
+. rm PDF_AST PDF_AST_Q
+.END
+\#
+.MAC PDF_TARGET END
+. ds ARG_1 \\$1
+. shift
+. ie '\\$*'' .pdfhref M -N \\*[ARG_1] -- \\$*
+. el .pdfhref M -N \\*[ARG_1] -E -- \\$*
+. if '\\*[.T]'ps' .if !dpdf:href.map .tm gropdf-info:href \\*[ARG_1] \\$*
+.END
+\#
+\# PDF_IMAGE
+\# ---------
+\# *Arguments:
+\# [ -L -| -R | -C | -I <indent> ] \
+\# <image file> <width> <height> \
+\# [ SCALE <factor> ] [ ADJUST +|-<vertical shift> ] [ TARGET <pdf target> ] \
+\# [ NO_SHIM ] [ NO_FLEX ]
+\# *Function:
+\# Allows embedding of PDF images with the same arguments as PSPIC
+\# plus SCALE and ADJUST options.
+\# *Notes:
+\# <image file> <width> <height> are required.
+\#
+.MAC PDF_IMAGE END
+. br
+. if !'\\n[.z]'FLOAT*DIV' \{\
+. nr pdf-img:float 1
+. FLOAT
+. \}
+. PDF_TARGET fig:\\n+[lists*target]
+. nr float*img 1
+. ds ev-current \\n[.ev]
+. ev IMG
+. evc \\*[ev-current]
+. if \\n[#HYPHENATE] .nh
+. nr ind-pre-img \\n[.i]
+. nr ll-pre-img \\n[.l]
+. in 0
+. ds pos:tmp \\$1
+. substring pos:tmp 0 0
+. ie !'\\*[pos:tmp]'-' .ds pdf-img:pos -C
+. el \{\
+. ds pdf-img:pos \\$1
+. shift
+. \}
+. if '\\*[pdf-img:pos]'-I' \{\
+. nr pdf-img:ind \\$1
+. shift
+. \}
+. ds pdf-img:file \\$1
+. ds pdf-img@file \\$1
+. substring pdf-img@file -1 -3
+. if !'\\*[pdf-img@file]'pdf' \{\
+. tm1 "[mom]: Image file '\\*[pdf-img:file]' at line \\n[.c] not found, or not a PDF image.
+. ab [mom]: Aborting '\\n[.F]' at \\$0, line \\n[.c].
+. \}
+. nr pdf-img:width \\$2
+. nr pdf-img:depth \\$3
+. shift 3
+. nr loop-counter \\n[#NUM_ARGS]
+. nr loop-count 0 1
+. while \\n+[loop-count]<=\\n[loop-counter] \{\
+. if '\\$1'SCALE' \{\
+. shift
+. nr pdf-img:scale \\$1
+. shift
+. nr pdf-img:width \\n[pdf-img:width]*\\n[pdf-img:scale]/100
+. nr pdf-img:depth \\n[pdf-img:depth]*\\n[pdf-img:scale]/100
+. \}
+. if '\\$1'ADJUST' \{\
+. shift
+. ds pdf-img:adj \\$1
+. shift
+. \}
+. if '\\$1'FRAME' \{\
+. nr pdf-img:frame 1
+. if !r pdf-img:frame-inset .nr pdf-img:frame-inset 6p
+. shift
+. \}
+. if '\\$1'CAPTION' \{\
+. nr pdf-img*have-caption 1
+. ds pdf-img*caption \\$2
+. shift 2
+. \}
+. if '\\$1'SHORT_CAPTION' \{\
+. ds pdf-img*caption-short \\$2
+. shift 2
+. \}
+. if '\\$1'LABEL' \{\
+. nr pdf-img*have-label 1
+. ds pdf-img*label \\$2
+. ds label-type pdf-img
+. shift 2
+. \}
+. if '\\$1'TARGET' \{\
+. ds target "\\$2
+. PDF_TARGET "\\*[target]
+. shift 2
+. \}
+. if '\\$1'NO_SHIM' \{\
+. if !'\\n[.z]'FLOAT*DIV' .nr pdf-img*no-shim 1
+. nr @no-shim 1
+. shift 1
+. \}
+. if '\\$1'NO_FLEX' \{\
+. nr pdf-img*no-flex 1
+. nr @no-flex 1
+. shift 1
+. \}
+. \}
+. if (\\n[pdf-img*have-label]=1):(\\n[pdf-img*autolabel]=1) \
+. ds label-type pdf-img
+. if !'\\*[pdf-img*label-sffx]'' \{\
+. ds pdf-img*label-sffx-tmp \\*[pdf-img*label-sffx]
+. substring pdf-img*label-sffx-tmp -1
+. if '\\*[pdf-img*label-sffx-tmp]'.' \
+. if \\n[pdf-img*caption-after-label]=0 .chop pdf-img*label-sffx
+. \}
+. if '\\*[pdf-img:pos]'-C' \
+. nr pdf-img:ind (\\n[.ll]-\\n[ind-pre-img]-\\n[pdf-img:width])/2
+. if '\\*[pdf-img:pos]'-R' \
+. nr pdf-img:ind \\n[.ll]-\\n[pdf-img:width]-\\n[ind-pre-img]
+. if \\n[pdf-img*label-with-chapter] \
+. ds chapno \\n[#CH_NUM].
+. if \\n[pdf-img*autolabel] \{\
+. ds pdf-img*label \\*[pdf-img*label-prfx]\\*[chapno]\\n+[fig*label-num]\\*[pdf-img*label-sffx]
+. nr fig*label-width \w'\\*[pdf-img*label]'
+. nr fig*label-num -1
+. \}
+. if !'\\*[pdf-img*caption-short]'' .ds short -short
+. if \\n[#PDF_BOOKMARKS] \{\
+. ie (\\n[pdf-img*have-label]=1):(\\n[pdf-img*autolabel]=1) \{\
+\!. TO_FIGURES "\\*[pdf-img*label]" "\\*[pdf-img*caption\\*[short]]"
+. \}
+. el \{\
+\!. if !'\\*[pdf-img*caption\\*[short]]'' \
+\!. TO_FIGURES "\\*[pdf-img*caption\\*[short]]"
+. \}
+. \}
+. if r IMG \{\
+. if \\n[pdfbx-top] \
+. rt
+. sp (\\*[wt\\n[stack]]/2u)+\\*[gap\\n[stack]]u
+. nr img*pdfbx 1
+. \}
+. di PDF*IMAGE
+. if \\n[@TOP] \{\
+. ch RR_@TOP
+. rs
+. nop \&
+. sp -1v
+. \}
+. if \\n[pdf-img*have-caption] \{\
+. if !\\n[pdf-img*autolabel] \{\
+. if !\\n[pdf-img*have-label] \{\
+. if \\n[#MLA] \
+. mla@error caption label \\n[.F] \\$0 \\n[.c]
+. \}
+. \}
+. if !\\n[pdf-img*caption-after-label] \{\
+. if !r pdfbx-top \
+. if !\\n[@TOP] \!.sp .5v
+. nr lead-pre-caption \\n[.v]
+. ev caption
+. evc IMG
+. ie \\n[#PRINT_STYLE]=1 .TYPEWRITER
+. el \{\
+. img*caption-style
+. vs \\n[.ps]u+\\n[pdf-img*caption-autolead]u
+. \}
+. if r pdfbx-top .nr restore-pdfbx-top 1
+. PDF_IMG*SET_CAPTION_QUAD \\*[pdf-img*caption-quad]
+. if r restore-pdfbx-top \{\
+. nr pdfbx-top 1
+. rr restore-pdfbx-top
+. \}
+. nr pdf-img*caption-top-lead-diff \\n[lead-pre-caption]-\\n[.v]
+. if r pdfbx-top \{\
+. SIZESPECS
+. rt
+. sp \\n[pdf-img*caption-top-lead-diff]u
+. sp (\\*[wt\\n[stack]])+\\*[gap\\n[stack]]u+\\*[$CAP_HEIGHT]
+. rr pdfbx-top
+. \}
+. if \\n[pdfbx-running] \{\
+. in -(\\*[wt\\n[stack]])+\\*[gap\\n[stack]]u
+. ll -(\\*[wt\\n[stack]])+\\*[gap\\n[stack]]u
+. \}
+. nop \\*[pdf-img*caption]
+. if r pdfbx-running \{\
+. in
+. ll
+. \}
+. br
+. if !'\\*[pdf-img*caption-space]'' .sp \\*[pdf-img*caption-space]
+. ev
+. in 0
+. sp -.5v
+. \}
+. \}
+. nf
+. if \\n[pdf-img:frame] \{\
+. nr frame-width \\n[pdf-img:width]+(\\n[pdf-img:frame-inset]*2)
+. nr frame-depth \\n[pdf-img:depth]+(\\n[pdf-img:frame-inset]*2)
+. if '\\*[pdf-img:pos]'-L' \{\
+. nr pdf-img:ind \\n[pdf-img:frame-inset]
+. nr pdf-img:dbx-ind 0
+. \}
+. if '\\*[pdf-img:pos]'-C' \{\
+. nr pdf-img:dbx-ind \
+\\n[.ll]-\\n[ind-pre-img]-\\n[pdf-img:width]/2-\\n[pdf-img:frame-inset]
+. \}
+. if '\\*[pdf-img:pos]'-R' \{\
+. nr pdf-img:ind -\\n[pdf-img:frame-inset]
+. nr pdf-img:dbx-ind \
+\\n[.l]u-(\\n[pdf-img:width]u+(\\n[pdf-img:frame-inset]u*2u)+\\n[ind-pre-img]u)
+. \}
+. if '\\*[pdf-img:pos]'-I' \{\
+. nr pdf-img:ind +\\n[pdf-img:frame-inset]
+. nr pdf-img:dbx-ind \\n[pdf-img:ind]-\\n[pdf-img:frame-inset]
+. \}
+. DBX \\*[pdf-img:frame-weight] \
+ \\n[pdf-img:dbx-ind]u \
+ \\n[frame-width]u \
+ \\n[frame-depth]u \
+ \\*[pdf-img:frame-color]
+. sp \\n[pdf-img:frame-inset]u
+. nr pdf-img:ind -\\n[pdf-img:frame-inset]
+. \}
+. ti \\n[pdf-img:ind]u+\\n[pdf-img:frame-inset]u
+. nop \X'pdf: pdfpic \\*[pdf-img:file] -L \\n[pdf-img:width]z \\n[pdf-img:depth]z'
+. if r pdfbx-top .rr pdfbx-top
+. if '\\*[pdf-img:pos]'-C' .nr pdf-img:ind +\\n[pdf-img:frame-inset]
+. sp \\n[pdf-img:depth]u
+. if \\n[pdf-img:frame] .sp \\n[pdf-img:frame-inset]u
+. if (\\n[pdf-img*have-label]=1):(\\n[pdf-img*autolabel]=1):(\\n[pdf-img*caption-after-label]=1) \{\
+. if \\n[#MLA] \{\
+. if (\\n[pdf-img*have-label]=1):(\\n[pdf-img*autolabel]=1) \{\
+. if !\\n[pdf-img*have-caption] \
+. mla@error label caption \\n[.F] \\$0 \\n[.c]
+. \}
+. \}
+. nr lead-pre-label \\n[.v]
+. ev label
+. evc IMG
+. ie \\n[#PRINT_STYLE]=1 .TYPEWRITER
+. el \{\
+. img*label-style
+. vs \\n[.ps]u+\\n[pdf-img*label-autolead]u
+. \}
+. if \\n[pdf-img*label-with-chapter] \
+. ds chapno \\n[#CH_NUM].
+. PDF_IMG*SET_LABEL_QUAD \\*[pdf-img*label-quad]
+. SIZESPECS
+. nr pdf-img*label-lead-diff \\n[lead-pre-label]-\\n[.v]
+. sp -.5+\\*[$CAP_HEIGHT]+\\n[pdf-img*label-lead-diff]u
+. if !'\\*[pdf-img*label-space]'' .sp \\*[pdf-img*label-space]
+. if \\n[pdfbx-running] \{\
+. in -(\\*[wt\\n[stack]])+\\*[gap\\n[stack]]u
+. ll -(\\*[wt\\n[stack]])+\\*[gap\\n[stack]]u
+. \}
+. ie \\n[pdf-img*autolabel] \{\
+. nop \
+\\*[pdf-img*label-prfx]\\*[chapno]\\n+[fig*label-num]\\*[pdf-img*label-sffx]\|
+. ds pdf-img*label \\*[chapno]\\n[fig*label-num]
+. if dLABEL.REFS \
+. tm .ds \\*[target] \\*[chapno]\\n[fig*label-num]
+. rm target
+. \}
+. el .if !'\\*[pdf-img*label]'' .nop \\*[pdf-img*label]
+. fam
+. ft
+. ps
+. if r pdfbx-running \{\
+. in
+. ll
+. \}
+. gcolor
+. if !'\\*[pdf-img*caption]'' \{\
+. if \\n[pdf-img*caption-after-label] \{\
+. ds pdf-img*caption-old \\*[pdf-img*caption]
+. ds pdf-img*caption " \\*[pdf-img*caption]
+. nop \\*[pdf-img*caption-specs]\\*[pdf-img*caption]\\*[revert-specs]
+. ds pdf-img*caption \\*[pdf-img*caption-old]
+. \}
+. \}
+. br
+. ev
+. in 0
+. \}
+\!. in
+. di
+. nf
+. vpt 0
+. if !'\\*[pdf-img:adj]'' \{\
+. if \\n[@TOP] \
+. if \\n[#COLUMNS]>1 \
+\!. rs
+\!. sp \\*[pdf-img:adj]
+. \}
+. PDF*IMAGE
+. if !'\\*[pdf-img:adj]'' \
+. if !\\n[@TOP] \!.sp -\\*[pdf-img:adj]
+. vpt
+. ev
+. if \\n[pdf-img:float] \{\
+. FLOAT off
+. nr dl \\n[pdf-img:width]
+. \}
+. if \\n[img*pdfbx] \{\
+. sp .5
+. nr img*pdfbx 2
+. \}
+. if !\\n[pdf-img:float] \{\
+. ie !\\n[#NO_SHIM] \
+. if !\\n[pdf-img*no-shim] .SHIM
+. el \
+. if !\\n[#NO_FLEX] \
+. if !\\n[pdf-img*no-flex] .FLEX
+. \}
+. PDF_IMAGE_CLEAN
+.END
+\#
+\# PDF_IMAGE_FRAME
+\# ---------------
+\# *Arguments:
+\# [ <inset> ] [ <rule weight> ] [ <color> ]
+\# *Function:
+\# Sets parameters for pdf image frames.
+\# *Notes:
+\# Defaults are '6p' '.5' 'black'. Arguments to be left at default
+\# must be entered as "".
+\#
+.MAC PDF_IMAGE_FRAME END
+. ie !'\\$1''\{\
+. ds frame-arg \\$1
+. substring frame-arg -1
+. ie \B'\\*[frame-arg]' \{\
+. tm1 "[mom]: \\$0 inset argument at line \\n[.c]
+. tm1 " of '\\n[.F]' requires a unit of measure.
+. tm1 " Default 6 point inset will be used instead.
+. \}
+. el \{\
+. nr pdf-img:frame-inset \\$1
+. shift
+. \}
+. \}
+. el .shift
+. ie !'\\$1'' \{\
+. ds frame-arg \\$1
+. substring frame-arg -1
+. ie \B'\\*[frame-arg]' \{\
+. ds pdf-img:frame-weight \\$1
+. shift
+. \}
+. el \{\
+. ds frame-arg \\$1
+. substring frame-arg -1
+. length arg-len \\*[frame-arg]
+. if \\n[arg-len]=1 \{\
+. tm1 "[mom]: \\$0 rule weight argument at line \\n[.c]
+. tm1 " of '\\n[.F]' must not have a unit of measure appended.
+. tm1 " Default .5 rule weight will be used instead.
+. shift
+. \}
+. \}
+. \}
+. el .shift
+. if !'\\$1'' \{\
+. ie m \\$1 .ds pdf-img:frame-color \\$1
+. el \{\
+. tm1 "[mom]: \\$0 color argument '\\$1' at line \\n[.c]
+. tm1 " of '\\n[.F]' is not a valid color.
+. tm1 " Default black will be used instead.
+. \}
+. \}
+.END
+\#
+.MAC PDF_IMAGE_CLEAN END
+. rm PDF*IMAGE
+. rm pdf-img:adj
+. rm pdf-img*caption
+. rm pdf-img*caption-short
+. rm pdf-img:file
+. rm pdf-img*label
+. rm pdf-img:pos
+. rm short
+. rr ind-pre-img
+. rr pdf-img:depth
+. rr pdf-img:float
+. if !\\n[pdf-img:frame] \
+. rr pdf-img:frame
+. rr pdf-img:ind
+. rr pdf-img:no-shim
+. rr pdf-img:no-flex
+. rr pdf-img:scale
+. if !\\n[defer] \
+. rr pdf-img*have-caption
+. rr pdf-img:frame-inset
+. rr pdf-img:width
+. if '\\*[pdf-img*label-sffx-tmp]'.' .ds pdf-img*label-sffx .
+. it 1 rr-img*pdfbx
+.END
+\#
+.de pdfmomclean
+. ie '\\n[.z]'' \{\
+. ds pdfcleaned \\$*
+. ev pdfcln
+. tr \[em]-
+. nf
+. box pdf:clean
+. nop \\*[\\*[pdfcleaned]]
+. fl
+. box
+. chop pdf:clean
+. asciify pdf:clean
+. ev
+. ds \\*[pdfcleaned] "\\*[pdf:clean]
+. rm pdf:clean
+. tr \[em]\[em]
+. \}
+. el .nop \!.pdfmomclean \\$@
+..
+\#
+.MAC PAUSE END
+. nr pdfbx-inhibit-space 1
+. if \\n[pdfbx-running] \{\
+. nr pdfbx-pause 1
+. rr pdfbx-inhibit-space
+. BoxStop
+. \}
+. vpt 0
+. br
+. vpt
+. ie !'\\n[.z]'' \{\
+\!. pdfpause
+\!. pdftransition BLOCK \\$1
+. \}
+. el \{\
+. pdfpause
+. pdftransition BLOCK \\$1
+. \}
+. if \\n[pdfbx-pause] \{\
+. BoxStart \\*[pdfbx-args]
+. rr pdfbx-pause
+. rr pdfbx-inhibit-space
+. \}
+.END
+\#
+.MAC TRANSITION END
+. ie !'\\n[.z]'' \
+\!. pdftransition PAGE \\$1
+. el .pdftransition PAGE \\$1
+.END
+\#
+\# Shaded backgrounds and frames (pdf boxes), page colour
+\#
+\# BOX
+\# ---
+\# *Arguments:
+\# SHADED <color> | OUTLINED <color> \
+\# [ WEIGHT <wt> ] [ INSET <dist> ] \
+\# [ ADJUST +|-<amount> ] \
+\# [ EQN | PIC | GRAP | IMG ]
+\# *Function:
+\# Calls BoxStart with the supplied arguments or stops a running
+\# box.
+\# *Notes:
+\# If OUTLINED given but no WEIGHT, the default weight is .5p.
+\# Otherwise, args have no defaults.
+\#
+.MAC BOX END
+. nr #FROM_BOX 1
+. ie \\n[#NUM_ARGS]=0 \
+. BoxStart SHADED grey85 INSET 1P
+. el \{\
+. ie \\n[#NUM_ARGS]=1 .BoxStop
+. el .BoxStart \\$*
+. \}
+. rr #FROM_BOX
+.END
+\#
+\# PAGE COLOUR
+\# -----------
+\# *Arguments:
+\# <color> | OFF | off
+\# *Function:
+\# Sets pagefill to <color> or stops pagefill.
+\# *Notes:
+\# OFF|off is required instead of the usual <anything>.
+\#
+.MAC PAGE_COLOR END
+. ie !'\\$1'OFF' \{\
+. ie !'\\$1'off' \{\
+. fcolor \\$1
+. device pdf: background pagefill
+. \}
+. el .device pdf: background off
+. \}
+. el .device pdf: background off
+.END
+\#
+.ALIAS PAGE_COLOUR PAGE_COLOR
+.ALIAS SLIDE_COLOR PAGE_COLOR
+.ALIAS SLIDE_COLOUR PAGE_COLOR
+\#
+\# Begin or end a box; called from BoxStart
+\#
+.de pdfbackground
+. device pdf: background \\$*
+. if '\\$1'off' \{\
+. ie (\\n[stack]-1)=0 \{\
+. if \\n[.t]>(1.6v+(\\*[wt\\n[stack]]/2u)) \
+. sp \\*[wt\\n[stack]]/2u
+. \}
+. el \{\
+. nr pdfbx-container \\n[stack]-1
+. if \\n[.t]>=((\\*[wt\\n[stack]]/2u)+(\\*[gap\\n[pdfbx-container]])+(\\*[wt\\n[pdfbx-container]])) \
+. sp \\*[wt\\n[stack]]/2u
+. \}
+. \}
+..
+\#
+\# Input trap macros
+\#
+.de rr-pdfbx-top
+. rr pdfbx-top
+..
+\#
+.de rr-pdfbx-end
+. rr pdfbx-end
+..
+\#
+.de rr-pdfbxstop
+. rr pdfbxstop
+..
+\#
+.de rr-pic*pdfbx
+. rr pic*pdfbx
+..
+\#
+.de rr-tbl*pdfbx
+. rr tbl*pdfbx
+..
+\#
+.de rr-img*pdfbx
+. rr img*pdfbx
+..
+\#
+.de rr-pdfbx-post-q
+. rr pdfbx-post-q
+..
+\#
+.de rr-pdfbx-div-start
+. rr pdfbx-div-start
+..
+\#
+\# Heavy lifting macros called from BOX.
+\#
+.de BoxStart
+. ds pdfbx-args \\$*
+. if \\n[pdfbx-inhibit-space] .sp -1
+. rr pdfbx-inhibit-space
+. if \\n[#PP_SPACE] \{\
+. nr restore-pp-space 1
+. PARA_SPACE off
+. \}
+. if \\n[#PRINT_STYLE]=1 \{\
+. tm1 "[mom]: PRINTSTYLE TYPEWRITE does not permit shaded backgrounds and frames.
+. tm1 " Continuing to process without backgrounds or frames.
+. return
+. \}
+. if \\n[#COLUMNS] \{\
+. tm1 "[mom]: Shaded backgrounds and frames are not available when COLUMNS are enabled.
+. tm1 " Continuing to process without backgrounds or frames.
+. return
+. \}
+. if \\n[Q-float]=1 .nr Q-float 2
+. if !'\\n[.z]'' \{\
+. nr pdfbx-div-start 1
+\!. it 1 rr-pdfbx-div-start
+. \}
+. if !\\n[#NO_SHIM] \{\
+. NO_SHIM
+. nr pdfbx-restore-shim 1
+. \}
+. if !\\n[#NO_FLEX] \{\
+. NO_FLEX
+. nr pdfbx-restore-flex 1
+. \}
+. if (\\n[#NO_SHIM]=0)&(\\n[#NO_FLEX]=1) .nr pdfbx-restore-shim 1
+. if (\\n[#NO_SHIM]=1)&(\\n[#NO_FLEX]=0) .nr pdfbx-restore-flex 1
+. rr shad
+. rr outl
+. rm wt
+. rm pdfbx-adj
+. nr pdfbx-running 1
+. nr pdfbx-top 1
+. nr stack +1
+. nr pdfbx-prev \\n[stack]-1
+. ds type " "
+. ie r #FROM_BOX .ds calling-macro BOX
+. el .ds calling-macro \\$0
+. while \\n[.$] \{\
+. if !'\\$1'SHADED' \
+. if !'\\$1'OUTLINED' \
+. if !'\\$1'WEIGHT' \
+. if !'\\$1'INSET' \
+. if !'\\$1'PIC' \
+. if !'\\$1'GRAP' \
+. if !'\\$1'EQN' \
+. if !'\\$1'IMG' \
+. if !'\\$1'ADJUST' \{\
+. tm [mom]: Invalid argument '\\$1' to \\*[calling-macro], line \\n[.c].
+. shift 1
+. \}
+. if '\\$1'SHADED' \{\
+. nop \\M[\\$2]\c
+. nr shad 1
+. chop type
+. as type "fill"
+. shift 2
+. \}
+. if '\\$1'OUTLINED' \{\
+. nop \\m[\\$2]\c
+. nr outl 1
+. chop type
+. as type "box"
+. shift 2
+. \}
+. if '\\$1'WEIGHT' \{\
+. ds wt \\$2
+. shift 2
+. \}
+. if '\\$1'INSET' \{\
+. nr gap \\$2
+. shift 2
+. \}
+. if '\\$1'ADJUST' \{\
+. ds pdfbx-adj \\$2
+. shift 2
+. \}
+. if '\\$1'PIC' \{\
+. ie '\\n[.z]'FLOAT*DIV' .nr PIC 2
+. el .nr PIC 1
+. shift 1
+. \}
+. if '\\$1'GRAP' \{\
+. ie '\\n[.z]'FLOAT*DIV' .nr PIC 2
+. el .nr PIC 1
+. shift 1
+. \}
+. if '\\$1'EQN' \{\
+. nr EQN 1
+. shift 1
+. \}
+. if '\\$1'IMG' \{\
+. nr IMG 1
+. shift 1
+. \}
+. \}
+. if '\\*[type]' ' .ds type "fill "
+. chop type
+. if !r gap .nr gap 1P
+. ie \\n[outl] \
+. if '\\*[wt]'' .ds wt .5p
+. el .ds wt 0
+. if d pdfbx-adj .sp \\*[pdfbx-adj]
+. if \\n[@TOP] \{\
+. RESTORE_SPACE
+. sp -1
+. nr @TOP 1
+. \}
+. nr pdfbxstop 1 \" Stop box in footer if .br causes a page break
+. br
+. if \\n[Q-float]=2 .sp -.5
+. rr pdfbxstop
+. fl
+. SIZESPECS
+. ds pdfbx-cap-adj \\*[$CAP_HEIGHT]
+.\" Top spacing
+. if \\n[#EPIGRAPH]+\\n[#QUOTE]=0 \
+. if \\n[#START] .sp -2
+. if \\n[#EPIGRAPH] \{\
+. ie \\n[#START] \!.sp -2
+. el \!.sp -1.5
+. \}
+. if \\n[#QUOTE] \{\
+. if !\\n[@TOP] \!.sp -.5-\\*[pdfbx-cap-adj]
+. if \\n[#START] \!.sp .5+\\*[wt]
+. rr @TOP
+. \}
+. if '\\n[.z]'FLOAT*DIV' \{\
+. if !\\n[#START] \!.sp -1
+. nr no-top-space:1 1
+. nr pdfboxed 1
+. \}
+. if \\n[stack]=1 \{\
+. if \\n[#INDENT_LEFT_ACTIVE] .nr #IL_ACTIVE \\n[#L_INDENT]
+. if \\n[#INDENT_RIGHT_ACTIVE] .nr #IR_ACTIVE \\n[#R_INDENT]
+. if \\n[#INDENT_BOTH_ACTIVE] \{\
+. nr #IBL_ACTIVE \\n[#BL_INDENT]
+. nr #IBR_ACTIVE \\n[#BR_INDENT]
+. \}
+. if \\n[#IN_ITEM] \
+. if \\n[#BR_INDENT] .nr #IBR_ACTIVE \\n[#BR_INDENT]
+. \}
+.\" Set l
+. nr pdfbx-l \\n[#L_MARGIN]
+. if \\n[#EPIGRAPH]=2 \{\
+. GET_EPI_OFFSET
+. nr pdfbx-l \\n[#EPI_OFFSET]
+. \}
+. if \\n[#QUOTE]=2 \{\
+. ie \\n[#BQ_OFFSET_VALUE] \
+. nr pdfbx-l \\n[#L_MARGIN]+(\\n[#PP_INDENT]*\\n[#BQ_OFFSET_VALUE])
+. el \
+. nr pdfbx-l \\n[#L_MARGIN]+(\\*[$BQ_OFFSET_VALUE])
+. \}
+. ie \\n[stack]=1 \
+. nr l \\n[pdfbx-l]+(\\*[wt]/2)+\\n[#IL_ACTIVE]+\\n[#IBL_ACTIVE]
+. el .nr l +(\\*[wt\\n[pdfbx-prev]]/2)+\\*[gap\\n[pdfbx-prev]]+(\\*[wt]/2)
+.\" Set r
+. nr r \\n[pdfbx-l]+\\n[.l]-(\\*[wt]/2u)
+. if \\n[#QUOTE]=1 .nr r \\n[pdfbx-l]+\\n[#L_LENGTH]-(\\*[wt]/2)
+. if \\n[#IR_ACTIVE] .nr r \\n[pdfbx-l]+\\n[#L_LENGTH]-\\n[#IR_ACTIVE]-(\\*[wt]/2)
+. if \\n[#IBR_ACTIVE] .nr r \\n[pdfbx-l]+\\n[#L_LENGTH]-\\n[#IBR_ACTIVE]-(\\*[wt]/2)
+.\" Set t
+. ie \\n[stack]=1 .nr t \\n[#T_MARGIN]+(\\*[wt]/2)
+. el .nr t +(\\*[wt\\n[pdfbx-prev]]/2)+\\*[gap\\n[pdfbx-prev]]+(\\*[wt]/2)
+.\" Set b
+. nr b \\n[.p]+\\n[#VARIABLE_FOOTER_POS]-(\\*[wt]/2)+\\n[#DOC_LEAD]u
+.\" Clear indents
+. if \\n[stack]=1 \{\
+. nr pdfbx-clear 1
+. ILX CLEAR
+. IRX CLEAR
+. if !\\n[#QUOTE]=2 \
+. if !\\n[#EPIGRAPH]=2 \
+. IBX CLEAR
+. if \\n[#IR_ACTIVE] .nr pdfbx-pre-ll \\n[#L_LENGTH]
+. rr pdfbx-clear
+. \}
+.\" See if box fits
+.\" PIC and IMG are in floats, which take care of fit/defer.
+. if (\\n[PIC]=0)&(\\n[IMG]=0) \{\
+. if '\\n[.z]'' \{\
+. nr pdfbx-min \
+ (\\*[wt]*2)+\\*[pdfbx-cap-adj]+(\\n[gap]*2)
+. if r EQN .nr pdfbx-min +1v
+. if \\n[.t]<\\n[pdfbx-min] \{\
+. rr pdfbx-running
+. bp
+. nr pdfbx-running 1
+. RESTORE_SPACE
+. \}
+. \}
+. \}
+.\" FOOTER trap
+. if !r #VFP0 .nr #VFP0 \\n[#VARIABLE_FOOTER_POS]
+. nr #VFP\\n[stack] 0\\n[#VFP\\n[pdfbx-prev]]-\\*[wt]-\\n[gap]
+. nr #VARIABLE_FOOTER_POS 0\\n[#VFP\\n[stack]]
+. ch FOOTER \\n[#VARIABLE_FOOTER_POS]u
+. mk
+. sp \\*[wt]/2u
+.
+. pdfbackground \\*[type] \\n[l]z \\n[t]z \\n[r]z \\n[b]z \\*[wt]
+.
+.\" Always start at wt+gap
+. ie \\n[#IL_ACTIVE]:\\n[#IBL_ACTIVE] \
+. IL \\n[gap]u+\\*[wt]+\\n[#IL_ACTIVE]u+\\n[#IBL_ACTIVE]u
+. el .IL \\n[gap]u+\\*[wt]
+. ie \\n[#IR_ACTIVE]:\\n[#IBR_ACTIVE] \
+. IR \\n[gap]u+\\*[wt]+\\n[#IR_ACTIVE]u+\\n[#IBR_ACTIVE]u
+. el .IR \\n[gap]u+\\*[wt]
+. nr pdfbx-ll \\n[.l]
+. rt
+. sp \\*[wt]+\\*[pdfbx-cap-adj]+\\n[gap]u
+. if (\\n[shad]=1) .nop \\M[]\c
+. if (\\n[outl]=1) .nop \\m[]\c
+. ds gap\\n[stack] \\n[gap]
+. ds wt\\n[stack] \\*[wt]
+. rm wt type
+. it 2 rr-pdfbx-top
+..
+\#
+.de BoxStop
+. if \\n[#PRINT_STYLE]=1 .return
+. if \\n[#COLUMNS]=1 .return
+. if \\n[#QUOTE]=1 .nr pdfboxed 1
+. if \\n[pdfbx-end]=\\n[nl] \{\
+. ie !'\\n[.z]'FLOAT*DIV' .nr pdfbxstop-consec 1
+. el \
+\!. if '\\n[.z]'FLOAT*DIV' .nr pdfbxstop-consec 1
+. rr pdfbx-end
+. \}
+. nr pdfbxstop 1 \" Stop box in footer if EOL causes a page break
+. if !'\\n[.z]'' \!.nr pdfbxstop 1
+. EOL
+. rr pdfbxstop
+. if (\\n[.ns]+\\n[@TOP])>0 .RESTORE_SPACE
+. nr pdfbx-prev \\n[stack]-1
+. nr #VARIABLE_FOOTER_POS 0\\n[#VFP\\n[pdfbx-prev]]
+. if \\n[stack]=1 \{\
+. if !\\n[#FN_COUNT] .nr #VARIABLE_FOOTER_POS 0-\\n[#B_MARGIN]
+. \}
+. ch FOOTER \\n[#VARIABLE_FOOTER_POS]u
+. if !'\\n[.z]'' \!.ch FOOTER \\n[#VARIABLE_FOOTER_POS]u
+. ie !r pdfbxstop-consec \{\
+. sp \\*[gap\\n[stack]]u+(\\*[wt\\n[stack]]/2u)
+. if r tbl*pdfbx \{\
+. if \\n[tbl*pdfbx]=1 .sp -.6
+. if \\n[tbl*pdfbx]=2 .sp -.6-1p
+. if \\n[tbl*pdfbx]=3 .sp -.6+1.5p
+. \}
+. if r eqn*pdfbx \{\
+. if \\n[eqn*pdfbx]=1 .sp -.75
+. if \\n[eqn*pdfbx]=2 .sp -.5
+. rr eqn*pdfbx
+. \}
+. \}
+. el \{\
+. sp
+. if r pdfbx-post-space .sp -\\n[pdfbx-post-space]u
+. rr pdfbx-post-space
+. sp (\\*[wt\\n[stack]]/2u)+\\*[gap\\n[stack]]u
+. if \\n[.t]<(\\*[wt\\n[stack]]+\\*[gap\\n[stack]]) \{\
+. nr pdfbx-container \\n[stack]+1
+. sp \\*[wt\\n[pdfbx-container]]/2u
+. \}
+. \}
+. if \\n[pic*pdfbx]=2 \
+. sp -.5
+. if \\n[grap] \
+. if \\n[pic*have-label] \
+. sp .5
+. if \\n[img*pdfbx]=2 \
+. sp -.5
+.
+. pdfbackground off
+.
+. EOL
+. if \\n[.t]<1v \{\
+. nr pdfbxstop 1 \" Stop box in footer if .br causes a page break
+. br
+. \}
+. if \\n[pdfbx-pause] .sp -2
+. if \\n[pic*pdfbx] \
+. if \\n[pic*have-label] .sp .5
+. IL -(\\*[gap\\n[stack]]u+\\*[wt\\n[stack]])
+. IR -(\\*[gap\\n[stack]]u+\\*[wt\\n[stack]])
+.\" Bottom spacing
+.\" If the .sp or .br in the ie/el clause causes a break, tell
+.\" HEADER to skip the PDF boxes stanza.
+. nr pdfbxstop 1
+. if !'\\n[.z]'' \!.nr pdfbxstop 1
+. if '\\n[.z]'FLOAT*DIV' .if \\n[float*tbl] .sp -.5
+. ie \\n[.t]>1v \{\
+. nr pdfbx-post-space 1.6v
+. if \\n[#EPIGRAPH] \
+. nr pdfbx-post-space .6v
+. \}
+. el .br
+. rr pdfbxstop
+. if '\\n[.z]'FLOAT*DIV' \!.rr pdfbxstop
+. sp \\n[pdfbx-post-space]u
+. if \\n[pic*pdfbx] \
+. sp -.5
+. if \\n[img*pdfbx] \
+. sp -.5
+. if \\n[#QUOTE] .sp -.5+(\\*[wt\\n[stack]]/2u)
+. nr pdfbx-end \\n[nl]
+. it 2 rr-pdfbx-end
+. rr pdfbxstop-consec
+. ie '\\n[.z]'' .rr pdfbx-running
+. el \{\
+\!. rr pdfbx-running
+\!. nr pdfbx-defer 1
+. \}
+. ie '\\n[.z]'' .nr stack \\n[stack]-1
+. el \{\
+\!.nr stack-for-float \\n[stack]
+\!.nr stack \\n[stack]-1
+. \}
+. if \\n[pic*pdfbx] .rr pic*pdfbx
+. if \\n[tbl*pdfbx] .rr tbl*pdfbx
+. if \\n[img*pdfbx] .rr img*pdfbx
+. if \\n[stack]=0 \{\
+. ILX CLEAR
+. IRX CLEAR
+. IBX CLEAR
+. if \\n[#IL_ACTIVE] \{\
+. nr #L_INDENT \\n[#IL_ACTIVE]
+. IL
+. rr #IL_ACTIVE
+. \}
+. if \\n[#IR_ACTIVE] \{\
+. nr #R_INDENT \\n[#IR_ACTIVE]
+. ll \\n[pdfbx-pre-ll]u
+. IR
+. rr pdfbx-pre-ll
+. rr #IR_ACTIVE
+. \}
+. if \\n[#IBR_ACTIVE] \{\
+. ll \\n[pdfbx-pre-ll]u
+. IB \\n[#IBL_ACTIVE]u \\n[#IBR_ACTIVE]u
+. rr pdfbx-pre-ll
+. rr #IBR_ACTIVE
+. rr #IBL_ACTIVE
+. \}
+. if r PIC \{\
+. rr pic*pdfbx
+. rr PIC
+. \}
+. if r EQN \{\
+. rr eqn*pdfbx
+. rr EQN
+. \}
+. if r IMG \{\
+. rr img*pdfbx
+. rr IMG
+. \}
+. \}
+. if '\\n[.z]'P_QUOTE' \{\
+. nr pdfbx-post-q 1
+. it 2 rr-pdfbx-post-q
+. \}
+. if d pdfbx-adj .rm pdfbx-adj
+. if \\n[restore-pp-space] \{\
+. rr restore-pp-space
+. PARA_SPACE
+. \}
+. if \\n[pdfbx-restore-shim] \{\
+. NO_SHIM off
+. rr pdfbx-restore-shim
+. \}
+. if \\n[pdfbx-restore-flex] \{\
+. NO_FLEX off
+. rr pdfbx-restore-flex
+. \}
+. ie '\\n[.z]'' \{\
+. if \\n[stack]=0 \{\
+. rr #VFP0
+. if !\\n[#NO_SHIM] .SHIM
+. if !\\n[#NO_FLEX] .FLEX
+. \}
+. \}
+. el \{\
+\!. if (\\\\n[stack]=0) \{\
+. rr #VFP0
+. if !r #EPIGRAPH \!.SHIM
+. \}
+. \}
+..
+\#
+\# Local Variables:
+\# mode: nroff
+\# End:
+\# vim: filetype=groff:
diff --git a/contrib/pdfmark/ChangeLog b/contrib/pdfmark/ChangeLog
new file mode 100644
index 0000000..1c5a18f
--- /dev/null
+++ b/contrib/pdfmark/ChangeLog
@@ -0,0 +1,683 @@
+2023-02-18 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * pdfmark.am (uninstall-pdfmark-hook): Simplify uninstallation.
+ Try to remove the configured `pdfdocdir` in the event it is
+ empty, but do not fail if it isn't. (It can be a directory
+ shared with other groff components; we don't know in what order
+ the uninstall targets will serialize, but the last one run
+ should succeed.)
+
+2022-09-20 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * sanitize.tmac: Move comment to where escape sequences are
+ recognized. Problem arose in commit 058b63ce3d, 2021-09-04.
+
+ troff:.../contrib/pdfmark/sanitize.tmac:162: warning: macro '\"'
+ not defined
+
+2022-05-20 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * pdfmark.am: Rename `BUILD_PDFDOC` to `USE_GROPDF`.
+
+2022-03-30 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * pdfmark.am: Eliminate `PDFMARK_TFLAG` and `PDFMARK_PFLAG` Make
+ macros; they were expanded in only one place.
+ (PDFROFF): Track rename of Make macro `TFLAG` to `MFLAG`.
+
+2022-03-30 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * cover.ms: Die horribly if `PSPIC` call fails.
+
+2022-03-26 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * pdfmark.am (PDFDOCFILES): Replace hard-coded "gnu.eps"
+ file name with expansion of `DOC_GNU_EPS`.
+ (contrib/pdfmark/pdfmark.pdf): Pass `-I` option to pdfroff(1) to
+ enable location of "gnu.eps" file.
+
+2021-10-24 Keith Marshall <keith.d.marshall@ntlworld.com>
+
+ Adapt to accommodate global XH and XN implementations.
+
+ cf. <https://savannah.gnu.org/bugs/?58946#comment13>
+
+ * spdf.tmac (XH-INIT, XN-INIT, XH-UPDATE-TOC): Delete definitions;
+ the defaults, provided by s.tmac, are now sufficient.
+ (XH-REPLACEMENT, XN-REPLACEMENT): Define these, rather than...
+ (XH, XN): ...these, respectively.
+
+2021-10-02 Keith Marshall <keith.d.marshall@ntlworld.com>
+
+ Make a minor layout adjustment.
+
+ * pdfmark.ms (Section 2.4.3): Add a vertical space reservation, to
+ avoid a widow line at the end of the paragraph explaining use of...
+ (PDFHREF.Y): ...this computed register, in the definition of...
+ (PDFBOOKMARK.VIEW): ...this.
+
+2021-10-02 Keith Marshall <keith.d.marshall@ntlworld.com>
+
+ Clarify references to use of the -Tpdf option.
+
+ * pdfmark.ms (Section 2, Section 3.1): Add footnotes, indicating that
+ only "-Tps" and "-Tpdf" output formats are supported, and that "-Tpdf"
+ may avoid a separate step, to convert from PostScript to PDF.
+
+2021-10-02 Keith Marshall <keith.d.marshall@ntlworld.com>
+
+ Work around misplacement of link "hot-spots" in footnotes.
+
+ * pdfmark.ms (pdfhref-nobreak): New document-local macro; used instead
+ of "pdfhref", this forces paragraph adjustment before placement of any
+ unbreakable link text, for which line-wrap may be required. Currently
+ observed only within footnotes, without adjustment, the "hot-spot" for
+ the link may be placed 1v above its associated text.
+
+2021-10-02 Keith Marshall <keith.d.marshall@ntlworld.com>
+
+ Link footnote reference marks to footnote text.
+
+ * pdfmark.ms (FP): Redefine locally; replace s.tmac default.
+ (FF): Do not redefine; our FP replacement macro does not use it.
+ [d FS-MARK] (FS-MARK): Redefine locally; map it to...
+ (pdf:fn.mark): ...this locally defined macro.
+ [!d FS-MARK] (@FS): Rename s.tmac implementation as...
+ (pdf:fn.record): ...this, then redefine @FS itself, to call...
+ (pdf:fn.mark, pdf:fn.record): ...these, in respective order.
+ (groff-1.19.1, GhostScript-8.14): Update footnote reference syntax.
+ (Ghostscript-8.14, MSYS): Emulate sentence space after footnote mark.
+ (*): Replace s.tmac string definition; make it equivalent to "\c",
+ after renaming its original implementation as...
+ (pdf:fn.index): ...this; synchronize references with changes to...
+ (pdf:fn.index.count): ...this new locally defined register; it is
+ auto-incremented by one, as each footnote is placed.
+
+2021-10-01 Keith Marshall <keith.d.marshall@ntlworld.com>
+
+ Incorporate user-defined TOC leader style.
+
+ * pdfmark.ms: Make some comment tidy-up adjustments.
+ (TC-LEADER, TC-MARGIN): Define them, to take advantage of new
+ s.tmac features; cf. <https://savannah.gnu.org/bugs/?61157>.
+
+2021-09-18 Keith Marshall <keith.d.marshall@ntlworld.com>
+
+ Factor a further unnecessary macro out of spdf.tmac
+
+ * spdf.tmac (XR): Remove it; relocate it to...
+ * pdfmark.ms (XR): ...here.
+
+2021-09-13 Keith Marshall <keith.d.marshall@ntlworld.com>
+
+ Add comments to annotate locally-defined font change macros.
+
+ * pdfmark.ms (EM): Annotate this locally-defined emphasis macro...
+ (CWB, CWI, CWBI): ...these constant width font interpolation macros...
+ (=): ...and this locally-defined IP tag variant string.
+
+2021-09-13 Keith Marshall <keith.d.marshall@ntlworld.com>
+
+ Update defunct internet URL references.
+
+ * pdfmark.ms (pdfmark-manual): Adobe moved the document (again);
+ update the document reference macro, to follow the URL relocation.
+ (www.mingw.org): The MinGW Project has relinquished this domain;
+ update the URL reference, to follow web-site relocation to...
+ (mingw.osdn.io): ...here.
+
+2021-09-13 Keith Marshall <keith.d.marshall@ntlworld.com>
+
+ Factor document-specific bloat out of spdf.tmac
+
+ * spdf.tmac: Reorganize; add many comments.
+ (XN): Retained, but reimplemented, to serve as...
+ (XH, XN): ...both of these; add callback hooks for...
+ (XH-INIT, XN-INIT, XH-UPDATE-TOC): ...these; provide no-op stubs;
+ factor out TOC collection code, delegating to XH-UPDATE-TOC.
+ (opt*XN-N, opt*XN-S, opt*XN-X): Rename internal macros to...
+ (de spdf:XH-N, de spdf:XH-S, de spdf:XH-X): ...these, respectively.
+ (AN, @AN, IE, IS, LU, NN, PXREF, SAME-PAGE, XM): Delete; we do not
+ require these; if users do, they should define their own.
+ (pdf@toc): Delete internal macro; fold body into...
+ (TC): ...this.
+
+ * pdfmark.ms (XH-UPDATE-TOC): Implement callback; it is based on...
+ (XN): ...original implementation of this, factored out of spdf.tmac,
+ but with significant simplification, to remove unnecessary code.
+ (XNVS1, XNVS2, XNVS3): Tighten vertical spacing.
+
+2021-09-04 Keith Marshall <keith.d.marshall@ntlworld.com>
+
+ Reduce potential for user-space exposure of "ms" internals.
+
+ * spdf.tmac (@NH): Append to s.tmac macro; assign...
+ (spdf:nh*hl): ...this new internal register; alias it to...
+ (.NH): ...this new public name, hence making it track...
+ (nh*hl): ...this s.tmac internal numeric register.
+ (XN): Use \n[.NH] instead of \n[nh*hl].
+
+2021-09-03 Keith Marshall <keith.d.marshall@ntlworld.com>
+
+ Sanitize text for use in PDF document outlines.
+
+ * sanitize.tmac: New file; it implements...
+ (sanitize): ...this new macro; interprets its first argument as a
+ string name, and copies its remaining arguments to the named string,
+ discarding specific embedded troff escape sequences; currently...
+ (\F): ...only this is identified as "specifically discardable".
+
+ * pdfmark.am (TMACFILES): Add sanitize.tmac
+
+ * spdf.tmac (mso): Include sanitize.tmac
+ (xn*ref, xn*argc): Rename all occurrences...
+ (spdf:refname, spdf:argc): ...to these, respectively.
+ (XN): Stop inserting $* directly into PDF outlines; instead, use...
+ (spdf:bm.text): ...this new string; this is locally defined by...
+ (spdf:bm.define): ...this new macro; passed the original $* from
+ XN, this itself, is locally defined as a redirectable alias for...
+ (spdf:bm.basic): ...this new local macro; it simply copies $*,
+ passed from XN, to the string named by its first argument, (which is
+ always spdf:bm.text), so reproducing previous behaviour.
+ (opt*XN-S): New macro; defined for internal use only, it adds a "-S"
+ option to XN, such that, when specified, it temporarily redirects...
+ (spdf:bm.define): ...this macro mapping alias to...
+ (sanitize): ...this.
+
+ * pdfmark.ms (XN): Add "-S" option for all headings which include...
+ (\F[C]...\F[]): ...this escape sequence.
+
+2021-08-21 Keith Marshall <keith.d.marshall@ntlworld.com>
+
+ Define, and use registered trade mark strings.
+
+ * pdfmark.ms (Adobe, Acrobat, Distiller, PostScript, Microsoft):
+ Define as strings. Each expands to its own name, followed by the
+ registered trademark symbol, as a superscript, and optional trailing
+ punctuation, below the superscript. Use each as required.
+
+2021-08-21 Keith Marshall <keith.d.marshall@ntlworld.com>
+
+ Prefer "-ize" to "-ise" where etymology permits.
+
+ * pdfmark.ms: For all verbs, and their derivative nouns, for which
+ British English allows either "-ise" or "-ize" as ending, prefer the
+ "-ize" form of verb, and "-ization" form of noun, throughout.
+
+2021-08-20 Keith Marshall <keith.d.marshall@ntlworld.com>
+
+ Correct a spelling error.
+
+ * pdfmark.ms (Section 2.5.3.1): Fix typo: s/exanple/example/.
+
+2021-08-20 Keith Marshall <keith.d.marshall@ntlworld.com>
+
+ Space out section headings in pdfmark.ms source.
+
+ * pdfmark.ms (.NH): Precede each instance by one null request, to
+ improve readability.
+
+2021-08-18 Keith Marshall <keith.d.marshall@ntlworld.com>
+
+ Refine pdfroff "missing ghostscript" diagnostic.
+
+ * pdfroff.sh [$GS = ":"]: Fix typo: s/connot/cannot/; refine text.
+
+2020-12-25 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * pdfmark.am (PDFROFF): Call pdfroff without
+ `--keep-temporary-files` option. Temporary directories are
+ created with mktemp(1) and files with an embedded process
+ identifier, which frustrates reproducible builds.
+
+ See <https://savannah.gnu.org/bugs/?57218>.
+
+2018-02-28 Werner LEMBERG <wl@gnu.org>
+
+ * pdfmark.am (pdfmark.pdf): Use $(GROFF_V).
+
+2018-02-28 Werner LEMBERG <wl@gnu.org>
+
+ * pdfmark.am (pdfroff): Use $(AM_V_GEN) to silence file generation.
+
+2015-08-22 Bernd Warken <groff-bernd.warken-72@web.de>
+
+ * pdfroff.1.man: Rename `pdfroff.man'.
+
+ * pdfmark.am: Add `Last update'. Setup Emacs mode.
+
+2015-08-05 Bernd Warken <groff-bernd.warken-72@web.de>
+
+ * pdfmark.am: Add `Last update'. Setup Emacs mode.
+
+2015-04-03 Werner LEMBERG <wl@gnu.org>
+
+ * pdfroff.man: Make it work in compatibility mode.
+
+2014-10-14 Keith Marshall <keith.d.marshall@ntlworld.com>
+
+ Deduce "--no-toc-relocation" from input stream (revisited).
+
+ * pdfroff.sh (WRKFILE): Correct malformed sed expression.
+
+ * spdf.tmac (TC): Prefer value of pdfroff's PHASE register to defined
+ state of pdf:href.map, when choosing to emit control record to...
+ (toc_relocation): ...enable this.
+
+2014-10-13 Keith Marshall <keith.d.marshall@ntlworld.com>
+
+ Deduce "--no-toc-relocation" from input stream.
+
+ * pdfroff.sh (WRKFILE): Scan it for "pdfroff-option:set" records;
+ apply settings; check for equivalent of "--no-toc-relocation" option.
+
+ * spdf.tmac (TC): Emit "pdfroff-option:set toc-relocation=enabled".
+
+2014-10-12 Keith Marshall <keith.d.marshall@ntlworld.com>
+
+ Avoid spurious user visible control messages on stderr.
+
+ * pdfroff.sh (REFCOPY): Ensure that at least one pdfhref mark of type
+ 'Z' will remain in the reference map, after all references have been
+ resolved; this is required, to suppress writing of reference control
+ records to stderr during the final PDF output processing phase.
+
+2014-09-04 Bernd Warken <groff-bernd.warken-72@web.de>
+
+ * all pdfmark source files: Copying (remove last updates and
+ replace years with package years) and Emacs setup.
+
+2014-03-30 Steffen Nurpmeso <sdaoden@yandex.com>
+
+ * Makefile.sub: Put straight error-prevention prefixes for `rm'.
+
+2014-03-29 Steffen Nurpmeso <sdaoden@yandex.com>
+
+ * Makefile.sub: Handle examples separately, controlled by
+ $(make{_,_install_,_uninstall_}examples).
+
+2013-01-28 Deri James <deri@chuzzlewit.myzen.co.uk>
+
+ * pdfmark.tmac (pdfmark, pdf:composed): Use `\!' instead of `\X'.
+
+ With the old pdfmark there are gaps between two of the lines, but
+ with the new version they disappear. The use of `.br' and `.in 0'
+ is arbitrary any request which causes an implicit break could be
+ used. Two breaks together only produce one line break, but if there
+ is an intervening `\X' then the second break finds the line buffer
+ not empty and generates another line break.
+
+ Using `\!' does alter the position of the pdfmark lines in the
+ intermediate file sent to grops (the pdfmark lines are output
+ immediately rather than being serialised through the output line
+ processing), but this has no effect since the contents of the
+ pdfmark line stay the same. It is the contents which determine
+ where bookmarks jump to not the position of the record in the input
+ stream to grops.
+
+ I initially used `.output', but hit a snag if a pdfbookmark occurs
+ before the document starts to output (message saying to insert an
+ explicit `.br'), this is quite likely for things like `.pdfinfo
+ /Author' which occur at the top of the document. So I'm using the
+ `\!' escape.
+
+2012-09-20 Werner LEMBERG <wl@gnu.org>
+
+ Simplify enviroment handling.
+
+ Suggested by Ivan Shmakov <oneingray@gmail.com>.
+
+ * Makefile.sub (PDFROFF): Don't use export.
+
+2011-12-26 Mike Frysinger <vapier@gentoo.org>
+
+ Fix parallel build race failure.
+
+ Sometimes building in parallel will fail in the pdfmark directory:
+
+ make[2]: Entering directory '.../contrib/pdfmark'
+ rm -f pdfroff
+ rm -f pdfmark.pdf
+ sed -f ... ./pdfroff.sh >pdfroff
+ ...; ./pdfroff ... pdfmark.ms >pdfmark.pdf
+ /bin/sh: ./pdfroff: Permission denied
+ chmod +x pdfroff
+ make[2]: *** [pdfmark.pdf] Error 126
+
+ This is because the generated pdf files use the local generated
+ pdfroff helper script, but they don't depend directly upon it, so
+ make tries to create the two in parallel and randomly falls over.
+
+ * Makefile.sub: Have all the .pdf files explicitly depend on the
+ `pdfroff' helper script.
+
+2010-12-23 Keith Marshall <keith.d.marshall@ntlworld.com>
+
+ Update copyright notices; pdfmark.tmac bug-fix.
+
+ * pdfmark.tmac: Update copyright notices.
+ (pdf*href.mark.resolve): Avoid premature removal, by aliasing to...
+ (pdf*href.mark.begin): ...this, rather than renaming.
+
+ * pdfroff.sh, pdfroff.man: Update copyright notices.
+
+2010-12-14 Keith Marshall <keith.d.marshall@ntlworld.com>
+
+ Clean up handling of temporary files directory.
+
+ * .cvsignore (pdfroff-*): Ignore sub-directories matching this.
+ * Makefile.sub (MOSTLCLEANDIRADD): Schedule them for removal.
+
+2010-12-02 Keith Marshall <keith.d.marshall@ntlworld.com>
+
+ Address potential temporary file security vulnerabilities.
+
+ * pdfroff.sh (GROFF_TMPDIR): Use mktemp(1) to assign it, if possible;
+ fall back to ${TMPDIR}, ${TMP} or ${TEMP} if unsuccessful.
+ * pdfroff.man: Document it.
+
+2009-08-16 Colin Watson <cjwatson@debian.org>
+
+ Make pdfroff's GhostScript invocation safer.
+
+ * pdfroff.sh (PDFROFF_POSTPROCESSOR_COMMAND): Add `-dSAFER' option.
+ * pdfroff.man: Document it.
+
+2008-12-28 Keith Marshall <keith.d.marshall@ntlworld.com>
+
+ Avoid phantom line wrapping in pdfhref hot-spots.
+
+ * pdfmark.tmac (pdf*href.mark.end): Emit hot-spot end markers within
+ scope of `\Z', to prevent possible output line length overflow which
+ may occur only in the layout computation passes, but not in the final
+ output pass. Problem observed and identified by Nick Stoughton; it
+ causes some hot-spots to be displaced from their proper locations.
+
+2007-04-11 Keith Marshall <keith.d.marshall@ntlworld.com>
+
+ Avoid stray newlines in folded pdfmark literal content.
+
+ * pdfmark.tmac (pdf*pdfmark.dispatch.wrapped): New string; define it
+ when accumulating long literal content; make it undefined otherwise.
+ (PDFMARK.FOLDWIDTH, PDFMARK.FOLDWIDTH.MAX): Reserve space for two
+ extra characters, to accommodate a space and an escaped newline,
+ while accumulating literal content, in case folding is required.
+ (pdf*pdfmark.dispatch) [pdf*pdfmark.dispatch.wrapped]: Add them.
+
+2007-04-11 Keith Marshall <keith.d.marshall@ntlworld.com>
+
+ * pdfmark.tmac (pdfbookmark): Don't evaluate within diversions; defer
+ placement until diversion is copied out at top level.
+
+2007-02-06 Eric S. Raymond <esr@snark.thyrsus.com>
+
+ * pdfroff.man: Update .UR/.UE and .MT/.ME to latest changes in
+ an-ext.tmac.
+
+2007-01-30 Werner LEMBERG <wl@gnu.org>
+
+ * pdfroff.man: Updated.
+
+2007-01-21 Werner LEMBERG <wl@gnu.org>
+
+ * pdfroff.man: Revised, based on a patch from Eric Raymond. It now
+ uses the new macros from an-ext.tmac. This is the first of a series
+ of man patches which Eric has contributed.
+
+2006-07-30 Keith Marshall <keith.d.marshall@ntlworld.com>
+
+ * pdfroff.sh (PDFROFF_KILL_NULL_PAGES): Require `%%BeginPageSetup' on
+ PostScript output line immediately following `%%Page:'.
+
+2006-07-29 Keith Marshall <keith.d.marshall@ntlworld.com>
+
+ * pdfroff.sh (PDFROFF_KILL_NULL_PAGES): Require `sed' to match a more
+ explicit regular expression, for detection of redundant pages.
+
+2006-07-14 Keith Marshall <keith.d.marshall@ntlworld.com>
+
+ * pdfroff.sh (PDFWRITE): Local shell variable replaced...
+ (PDFROFF_POSTPROCESSOR_COMMAND): by this new environment variable...
+ (GROFF_GHOSTSCRIPT_INTERPRETER): with this bound to it.
+ (PDFROFF_COLLATE, PDFROFF_KILL_NULL_PAGES): New environment variables.
+ (--no-kill-null-pages): New command line option; implement it, and...
+ (--help): Add description for it.
+
+ * pdfroff.man (PDFROFF_POSTPROCESSOR_COMMAND): Document it.
+ (PDFROFF_COLLATE, PDFROFF_KILL_NULL_PAGES): Document them.
+ (--no-kill-null-pages): Document it.
+
+2006-07-14 Zvezdan Petkovic <zpetkovic@acm.org>
+
+ * pdfroff.sh (--emit-ps): New command line option; implement it.
+ (--help): Add description for it.
+
+ * pdfroff.man (--emit-ps): Document it.
+
+2006-06-11 Werner LEMBERG <wl@gnu.org>
+
+ * pdfroff.man: Add `.ig' block after NAME section to make mandb
+ happy.
+
+2006-03-31 Keith Marshall <keith.d.marshall@ntlworld.com>
+
+ Split `pdfmark' output as required, to avoid excessively long
+ `ps:exec' intermediate output records.
+
+ * pdfmark.tmac (pdfmark): Macro extended to deploy ...
+ (pdf*pdfmark.limit): New macro; use it to define ...
+ (PDFMARK.FOLDWIDTH, PDFMARK.FOLDWIDTH.MAX): New registers.
+ (pdf*compose.first, pdf*compose.next, pdf*compose.literal): New
+ macros; each will be aliased as required to ...
+ (pdf*compose): ... this, to dynamically construct ...
+ (pdf:composed.line, pdf:composed.literal): ... these new strings.
+ (pdf:compose.test): New dynamically constructed string; use it to
+ detect parenthesised literals in pdfmark content, so folding can be
+ avoided within them, subject to honouring of `PDFMARK.FOLDWIDTH'.
+ (pdf*length.increment): New macro; it triggers output folding when ...
+ (pdf:length): ... this new register exceeds `PDFMARK.FOLDWIDTH.MAX'.
+ (pdf*pdfmark.post.first, pdf*pdfmark.post.next): New macros; each will
+ be aliased as required to ...
+ (pdf*pdfmark.post): ... this, and invoked by ...
+ (pdf*pdfmark.dispatch): ... this new macro; use it to define ...
+ (pdf:composed): ... this dynamically constructed macro; use ...
+ (pdf*end): ... this new macro to terminate it.
+
+2006-03-09 Keith Marshall <keith.d.marshall@ntlworld.com>
+
+ Incorporate portability recommendations by Ralf Wildenhues
+ <ralf.wildenhues@gmx.de>
+
+ * pdfroff.sh: Avoid unsafe quoting in variable substitutions of
+ the form "${VAR+"set"}"; remove outer quotes everywhere; prefix
+ with `x' on each side of comparisons.
+ ($NULLCMD): Define when `$ZSH_VERSION' is set, i.e. when host
+ has `/bin/sh -> zsh'; also...
+ (emulate sh): Invoke, for this case.
+
+ Enhancement/bug fix requested by Werner LEMBERG <wl@gnu.org>
+
+ * pdfroff.sh (--help): Direct output to `stdout', not `stderr'.
+ (--keep-temporary-files): New option; implement it.
+
+ * pdfroff.man (OPTIONS): Document `--keep-temporary-files' option.
+ (FILES): Note names and purpose of files it affects.
+
+ * Makefile.sub (PDFROFF): Add `--keep-temporary-files' option;
+ retain them in `GROFF_TMPDIR=.'.
+ (CLEANADD): Include temporary files matching `pdf[0-9]*'.
+
+2006-03-08 Werner LEMBERG <wl@gnu.org>
+
+ * pdfmark.ms: Update URL for Adobe Reference Manual.
+
+2006-02-26 Claudio Fontana <claudio@gnu.org>
+
+ * Makefile.sub: Add DESTDIR to install and uninstall targets
+ to support staged installations.
+
+2006-02-25 Werner LEMBERG <wl@gnu.org>
+
+ * pdfmark.ms: Correct typo; reported by Thomas Klausner.
+
+2006-02-24 Werner LEMBERG <wl@gnu.org>
+
+ * pdfmark.ms, pdfroff.sh: Replace legal/illegal with valid/invalid.
+
+2005-06-22 Keith Marshall <keith.d.marshall@ntlworld.com>
+
+ pdfroff.sh portability enhancement.
+
+ * pdfroff.sh (ARGLIST): Variable removed.
+ (GROFF_STYLE): Use it for all groff invocations.
+ (INPUT_FILES): Pass to all groff invocations, instead of ARGLIST.
+ (CS_MACRO, CE_MACRO): Initialize independently.
+ (CS_FILTER): Simplify quoting; it used to confuse some shells.
+ (Source): CVS keyword removed; replaced by...
+ (RCSfile, Revision): these.
+
+2005-06-17 Keith Marshall <keith.d.marshall@ntlworld.com>
+
+ * pdfroff.sh (MATCH): Correct quoting.
+ (Source): Add terminating `$' on CVS keyword.
+
+2005-06-17 Zvezdan Petkovic <zpetkovic@acm.org>
+
+ * Makefile.sub: (RM): Define as `rm -f', for `make' programs
+ which don't predefine it.
+
+2005-06-16 Bernd Warken <groff-bernd.warken-72@web.de>
+
+ * pdfroff.sh (NULLDEV): Correct misspelled instance of NULDEV.
+
+2005-05-28 Werner LEMBERG <wl@gnu.org>
+
+ * Makefile.sub (.ms.pdf): Use `--stylesheet', not `--style'.
+
+2005-05-26 Werner LEMBERG <wl@gnu.org>
+
+ * Makefile.sub, pdfmark.tmac, pdfroff.sh, spdf.tmac: Update postal
+ address for Free Software Foundation.
+
+2005-05-17 Keith Marshall <keith.d.marshall@ntlworld.com>
+
+ Improve portability of `pdfroff' shell script.
+
+ * pdfroff.sh: Add space in shebang, conforming to portability
+ guidelines in `autoconf' docs.
+ (searchpath): New shell function; use it instead of `type' command
+ to locate prerequisite helper programs.
+
+ * pdfroff.man: Document influence of `OSTYPE' and `PATH_SEPARATOR'
+ environment variables.
+
+ * Makefile.sub (pdfroff): Make it depend on SH_DEPS_SED_SCRIPT,
+ from arch/misc/shdeps.sh; use it to customize PATH_SEPARATOR
+ initialization code for `searchpath' function in pdfroff.sh.
+
+2005-05-16 Keith Marshall <keith.d.marshall@ntlworld.com>
+
+ Interim documentation update.
+
+ * pdfmark.ms (GROFF-WEBSITE): New string; use it in references and
+ examples.
+ (Section 2.5): Add definitions of D and Z operators, for use with
+ pdfhref macro.
+ (Section 2.5.4): Complete description of pdfhref macro usage for
+ `Linking to Internet Resources'; provide examples.
+
+2005-05-14 Nick Stoughton <nick@usenix.org>
+
+ * pdfmark.tmac (LB): Renamed to ...
+ (PDFLB): This to avoid conflicts with mm's LB macro.
+
+2005-05-02 Keith Marshall <keith.d.marshall@ntlworld.com>
+
+ Handle parsing anomalies in Cygwin's `ash', and similar, shells.
+
+ * pdfroff.sh ($CAT, $GREP, $SED, $GROFF, $DIFF): Avoid interpreting
+ misdirected error messages, which `type' sends to `stdout' in some
+ shells, as a successful program file match.
+
+ ($AWK, $GS): Likewise; also ensure that multiple choice match
+ prototypes are eval'ed as such, in case token splitting occurs
+ before variable expansion.
+
+2005-04-24 Keith Marshall <keith.d.marshall@ntlworld.com>
+
+ Add support for folded outlines in PDF documents.
+
+ * pdfmark.tmac (PDFOUTLINE.FOLDLEVEL): New register.
+ (pdf:bm.emit): Use it.
+
+ * pdfmark.ms: Document it.
+
+2005-03-25 Werner LEMBERG <wl@gnu.org>
+
+ * Makefile.in: Removed.
+
+2005-03-24 Werner LEMBERG <wl@gnu.org>
+
+ * Makefile: Renamed to...
+ * Makefile.in: This.
+
+2005-03-22 Keith Marshall <keith.d.marshall@ntlworld.com>
+
+ * pdfroff.sh: Eliminate invalid program reference to $AWK, when
+ invoked with `--no-reference-dictionary' option.
+
+2005-03-02 Keith Marshall <keith.d.marshall@ntlworld.com>
+
+ * contrib/pdfmark/Makefile.sub (install_data): Use $(INSTALL_SCRIPT)
+ to install `pdfroff'.
+ * contrib/pdfmark/pdfroff.man (opte): New macro.
+ Use it to remove spurious equal signs from SYNOPSIS.
+
+2005-02-28 Keith Marshall <keith.d.marshall@ntlworld.com>
+
+ Provide `pdfroff' shell script, and manpage to document it;
+ runs multiple groff passes, to format PDF documents.
+
+ * pdfroff.sh: New shell script template;
+ * pdfroff.man: New man page to document it.
+
+ Integrate `pdfmark' into normal groff build system;
+ install macro `pdfmark' packages, build and install `pdfroff',
+ and PDF format documentation.
+
+ * Makefile.sub: Rewritten.
+ * pdfmark.tmac: Modified.
+ (pdfhref): New macro operators, `D' and `Z'.
+ (pdf*href-D, pdf*href-Z): New macros: implement them.
+ (pdf*href.mark.resolve, pdf*href.mark.emit, pdf*href.mark.flush):
+ Modified macro algorithm, to eliminate inconsistencies between
+ `grohtml' representations of `opminy' from differing groff versions.
+ (pdf*href.mark, pdf*href.mark.release, pdf*href.mark.close):
+ deleted (redundant macros).
+ (PDFHREF.LEADING): Default value changed (was 2.5p; now -1.0p).
+ Global comment updates.
+
+ * TODO: Updated.
+
+2004-12-10 Werner LEMBERG <wl@gnu.org>
+
+ * TODO: Updated.
+
+2004-12-08 Keith Marshall <keith.d.marshall@ntlworld.com>
+
+ First import of pdfmark files.
+
+________________________________________________________________________
+
+Copyright (C) 2004-2020 Free Software Foundation, Inc.
+
+Copying and distribution of this file, with or without modification,
+are permitted in any medium without royalty provided the copyright
+notice and this notice are preserved.
+
+Local Variables:
+fill-column: 72
+mode: change-log
+version-control: never
+End:
+vim:set autoindent textwidth=72:
diff --git a/contrib/pdfmark/PROBLEMS b/contrib/pdfmark/PROBLEMS
new file mode 100644
index 0000000..d31be4a
--- /dev/null
+++ b/contrib/pdfmark/PROBLEMS
@@ -0,0 +1,32 @@
+ -*- text -*-
+ Copyright (C) 2004-2020 Free Software Foundation, Inc.
+
+ Copying and distribution of this file, with or without modification,
+ are permitted in any medium without royalty provided the copyright
+ notice and this notice are preserved.
+
+Known PROBLEMS in pdfmark.tmac
+==============================
+
+Bounding boxes for link hot-spots which straddle a page break
+are not computed correctly.
+
+*** Resolved: 06-Dec-2004 (KDM): pdfmark.tmac.patch-20041206 ***
+
+--------
+
+Documents including a large number of cross references may fail,
+with an 'input stack limit exceeded' error.
+
+*** Resolved: 27-Sep-2004 (KDM): pdfmark.tmac.patch-20040927 ***
+
+--------
+
+Links placed in diversions, such as footnotes or floating keeps,
+resolve to the wrong destinations; (mapping order becomes confused
+between links in diversion, and links in running text following
+the diversion).
+
+--------
+
+Annotations placed by .pdfnote cannot exceed about 200 chars.
diff --git a/contrib/pdfmark/README b/contrib/pdfmark/README
new file mode 100644
index 0000000..7440ffd
--- /dev/null
+++ b/contrib/pdfmark/README
@@ -0,0 +1,57 @@
+ -*- text -*-
+ Copyright (C) 2004-2020 Free Software Foundation, Inc.
+
+ Copying and distribution of this file, with or without modification,
+ are permitted in any medium without royalty provided the copyright
+ notice and this notice are preserved.
+
+README for pdfmark.tmac
+=======================
+
+Copyright (C) 2004, 2009 Free Software Foundation Inc.
+Contributed by Keith Marshall (keith.d.marshall@ntlworld.com)
+
+This is free software. See file COPYING, for copying permissions,
+and warranty disclaimer.
+
+This is a preview release of a proposed pdfmark.tmac macro package,
+for use with GNU troff (groff). It is not yet complete, and should
+be considered as an alpha release; there are a few problems to be
+resolved (see file PROBLEMS).
+
+Partial documentation is provided, in groff-ms format. To convert
+this to PDF format, you will require a working groff installation,
+a working ghostscript installation, with the gs command in your PATH,
+and a GNU-compatible make. The tarball should be unpacked in the
+top directory of your groff source tree, then:
+
+ cd <groff-current>/contrib/pdfmark
+ make pdfmark
+
+where <groff-current> is the top directory of your current groff
+source tree.
+
+Included in this package, are:
+
+ pdfmark.tmac -- the core pdfmark macro set
+ spdf.tmac -- a rudimentary set of bindings for ms macros
+ pdfmark.ms -- preliminary documentation
+ cover.ms -- a template for the documentation cover sheet
+ gnu.eps -- the groff logo, copied from the groff distribution
+ Makefile -- makefile, for formatting the documentation
+ README -- this file
+ PROBLEMS -- a list of known problems
+ TODO -- a list of planned features, not yet implemented
+
+To make the pdfmark macros generally usable, copy pdfmark.tmac to the
+'site-tmac' directory appropriate to your groff installation; (ms users
+may also wish to copy spdf.tmac). The macros may then be accessed, by
+including the '-mpdfmark' option on the groff command line; (for ms
+users, '-mspdf' is equivalent to '-ms -mpdfmark', with some extra
+macros 'thrown in').
+
+Comments, and bug reports are welcomed. Please post to the groff
+mailing list, groff@gnu.org; (you must be subscribed to this list to
+post mails). To subscribe, visit
+
+ http://lists.gnu.org/mailman/listinfo/groff
diff --git a/contrib/pdfmark/TODO b/contrib/pdfmark/TODO
new file mode 100644
index 0000000..219b60e
--- /dev/null
+++ b/contrib/pdfmark/TODO
@@ -0,0 +1,60 @@
+ -*- text -*-
+ Copyright 2004-2020 Free Software Foundation, Inc.
+
+ Copying and distribution of this file, with or without modification,
+ are permitted in any medium without royalty provided the copyright
+ notice and this notice are preserved.
+
+TODO items for pdfmark.tmac
+===========================
+
+Add copyright information to PDF documentation.
+
+--------
+
+Add acknowledgements and trade mark ownership notifications
+to PDF documentation.
+
+--------
+
+Provide documentation in man page and texinfo formats.
+
+--------
+
+Add comments in spdf.tmac, to clarify its operation.
+Also add commentary in pdfmark.tmac, to clarify operation of
+recent changes.
+
+--------
+
+Make Makefile generic, so 'configure' can resolve target
+system dependencies.
+
+* Comment added 2005-02-26 by Keith Marshall <keith.d.marshall@ntlworld.com>
+
+If this refers to contrib/pdfmark/Makefile, then it is addressed by the new
+'pdfroff' script; the original Makefile may be considered redundant. Local
+system dependencies are resolved by 'configure', and applied to 'pdfroff',
+when it is generated from 'pdfroff.sh'.
+
+--------
+
+Improve Makefile.sub, to integrate pdfmark.tmac installation
+into a regular groff build. Add it to groff's Makefile.in.
+
+* Comment added 2005-02-26 by Keith Marshall <keith.d.marshall@ntlworld.com>
+
+Completed.
+
+--------
+
+Provide a 'pdfmark' script (or call it 'groff2pdf'?) which
+actually converts a groff input file to pdf, and which
+takes care of the necessary intermediate steps to handle
+PDF marks.
+
+* Comment added 2005-02-26 by Keith Marshall <keith.d.marshall@ntlworld.com>
+
+This facility now provided by 'pdfroff' script; documented in 'pdfroff.man'.
+Man page still requires an additional section, to describe use of 'stylesheet'
+feature. Script also requires documentation in PDF and texinfo formats.
diff --git a/contrib/pdfmark/cover.ms b/contrib/pdfmark/cover.ms
new file mode 100644
index 0000000..b647a29
--- /dev/null
+++ b/contrib/pdfmark/cover.ms
@@ -0,0 +1,70 @@
+.\" Copyright (C) 2004-2020 Free Software Foundation, Inc.
+.\"
+.\" Copying and distribution of this file, with or without modification,
+.\" are permitted in any medium without royalty provided the copyright
+.\" notice and this notice are preserved.
+.\"
+.am pspic*error-hook
+. ab \\n[.F]:\\n[.c]: fatal error: PSPIC failed to include '\\$1'
+..
+.de CS
+.if !rCO .nr CO 0
+.if !rTL .nr TL 0
+.\".nr PO*SAVED \\n[PO]
+.nr LL*SAVED \\n[LL]
+.nr HM*SAVED \\n[HM]
+.nr HM 0
+.nr PO (2.1c+\\n[CO]u)
+.nr LL 17.1c
+\&
+.nr PS*SAVED \\n[PS]
+.nr VS*SAVED \\n[VS]
+.nr PS 24
+.nr VS 30
+.CD
+.fam T
+.sp |(5.9c+\\n[TL]u)
+.als AU au@first
+..
+.de au@first
+.sp 1.5v
+.als AU au@next
+.AU \\$@
+..
+.de au@next
+.DE
+.nr PS 18
+.nr VS 18
+.CD
+.sp 0.5v
+\\$*
+..
+.de AI
+\H'-4z'\\$*\H'0'
+..
+.de CE
+.DE
+.sp |17.5c
+.PSPIC gnu.eps
+.nr PS 19
+.CD
+.fam H
+.tkf HR 10z 2p 20z 4p
+\H'-4z'A GNU MANUAL\H'0'
+.DE
+.\".nr PO \\n[PO*SAVED]
+.nr LL \\n[LL*SAVED]
+.nr PS \\n[PS*SAVED]
+.nr VS \\n[VS*SAVED]
+.nr HM \\n[HM*SAVED]
+.\".rr PO*SAVED
+.rr LL*SAVED
+.rr PS*SAVED
+.rr VS*SAVED
+.rr HM*SAVED
+.fam
+..
+.\" Local Variables:
+.\" mode: nroff
+.\" End:
+.\" vim: filetype=groff:
diff --git a/contrib/pdfmark/pdfmark.am b/contrib/pdfmark/pdfmark.am
new file mode 100644
index 0000000..15eec8c
--- /dev/null
+++ b/contrib/pdfmark/pdfmark.am
@@ -0,0 +1,99 @@
+# Copyright (C) 2005-2021 Free Software Foundation, Inc.
+# Written by Keith Marshall (keith.d.marshall@ntlworld.com)
+# Automake migration by Bertrand Garrigues
+#
+# This file is part of groff.
+#
+# groff is free software; 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.
+#
+# groff is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+pdfmark_srcdir = $(top_srcdir)/contrib/pdfmark
+pdfmark_builddir = $(top_builddir)/contrib/pdfmark
+
+man1_MANS += contrib/pdfmark/pdfroff.1
+
+bin_SCRIPTS += pdfroff
+
+# Files installed in $(tmacdir)
+TMACFILES = \
+ contrib/pdfmark/pdfmark.tmac \
+ contrib/pdfmark/sanitize.tmac \
+ contrib/pdfmark/spdf.tmac
+pdfmarktmacdir = $(tmacdir)
+dist_pdfmarktmac_DATA = $(TMACFILES)
+
+# Files installed in $(pdfdocdir)
+PDFDOCFILES = \
+ contrib/pdfmark/pdfmark.pdf
+if USE_PDFROFF
+pdfmarkpdfdocdir = $(pdfdocdir)
+nodist_pdfmarkpdfdoc_DATA = $(PDFDOCFILES)
+MOSTLYCLEANFILES += $(PDFDOCFILES)
+else
+EXTRA_DIST += $(PDFDOCFILES)
+endif
+
+EXTRA_DIST += \
+ contrib/pdfmark/cover.ms \
+ contrib/pdfmark/pdfmark.ms \
+ contrib/pdfmark/ChangeLog \
+ contrib/pdfmark/README \
+ contrib/pdfmark/PROBLEMS \
+ contrib/pdfmark/TODO \
+ contrib/pdfmark/pdfroff.1.man \
+ contrib/pdfmark/pdfroff.sh
+
+PDFROFF=\
+ GROFF_TMPDIR=. \
+ GROFF_COMMAND_PREFIX= \
+ GROFF_BIN_DIR="$(GROFF_BIN_DIR)" \
+ GROFF_BIN_PATH="$(GROFF_BIN_PATH)" \
+ ./pdfroff \
+ $(FFLAG) $(MFLAG) -dpaper=$(PAGE) -P-p$(PAGE) -M$(pdfmark_srcdir)
+
+contrib/pdfmark/pdfmark.pdf: contrib/pdfmark/pdfmark.ms
+ $(GROFF_V)$(MKDIR_P) `dirname $@` \
+ && $(PDFROFF) -I $(doc_builddir) -I $(doc_srcdir) -mspdf \
+ --stylesheet=$(pdfmark_srcdir)/cover.ms \
+ $(top_srcdir)/contrib/pdfmark/pdfmark.ms >$@
+
+# The pdf files use the local script to generate.
+$(PDFDOCFILES): pdfroff groff troff gropdf
+$(PDFDOCFILES): $(dist_devpsfont_DATA) $(nodist_devpsfont_DATA) \
+ $(DOC_GNU_EPS)
+
+pdfroff: contrib/pdfmark/pdfroff.sh $(SH_DEPS_SED_SCRIPT)
+ $(AM_V_GEN)sed -f $(SH_DEPS_SED_SCRIPT) \
+ -e "s|[@]VERSION[@]|$(VERSION)|" \
+ -e "s|[@]GROFF_AWK_INTERPRETERS[@]|$(ALT_AWK_PROGS)|" \
+ -e "s|[@]GROFF_GHOSTSCRIPT_INTERPRETERS[@]|$(ALT_GHOSTSCRIPT_PROGS)|" \
+ -e "s|[@]GROFF_BIN_DIR[@]|$(bindir)|" $(pdfmark_srcdir)/pdfroff.sh \
+ >$@ \
+ && chmod +x $@
+
+mostlyclean-local: mostlyclean_pdfmark
+mostlyclean_pdfmark:
+ rm -rf $(top_builddir)/pdfroff-*
+
+uninstall_groffdirs: uninstall-pdfmark-hook
+uninstall-pdfmark-hook:
+if USE_PDFROFF
+ -rmdir $(DESTDIR)$(pdfmarkpdfdocdir)
+endif
+
+
+# Local Variables:
+# mode: makefile-automake
+# fill-column: 72
+# End:
+# vim: set autoindent filetype=automake textwidth=72:
diff --git a/contrib/pdfmark/pdfmark.ms b/contrib/pdfmark/pdfmark.ms
new file mode 100644
index 0000000..0d7d28c
--- /dev/null
+++ b/contrib/pdfmark/pdfmark.ms
@@ -0,0 +1,2831 @@
+.ig
+pdfmark.ms
+
+This file is part of groff, the GNU roff type-setting system.
+
+Copyright (C) 2004-2021 Free Software Foundation, Inc.
+written by Keith Marshall <keith.d.marshall@ntlworld.com>
+
+Permission is granted to copy, distribute and/or modify this document
+under the terms of the GNU Free Documentation License, Version 1.3 or
+any later version published by the Free Software Foundation; with no
+Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
+Texts.
+
+A copy of the Free Documentation License is included as a file called
+FDL in the main directory of the groff source package.
+..
+.
+.CS
+Portable Document Format
+Publishing with GNU Troff
+.AU Keith Marshall
+.AI <keith.d.marshall@ntlworld.com>
+.CE
+.
+.\" Specify the Internet address for the groff web site.
+.\"
+.ds GROFF-WEBSITE http://www.gnu.org/software/groff
+.
+.\" Set the PDF default document view attribute, to ensure that the document
+.\" outline is visible, each time the document is opened in Acrobat Reader.
+.\"
+.pdfview /PageMode /UseOutlines
+.\"
+.\" Initialize the outline view to show only three heading levels,
+.\" with additional subordinate level headings folded.
+.\"
+.nr PDFOUTLINE.FOLDLEVEL 3
+.
+.\" Add document identification meta-data
+.\"
+.pdfinfo /Title Portable Document Format Publishing with GNU Troff
+.pdfinfo /Author Keith Marshall
+.pdfinfo /Subject Tips and Techniques for Exploiting PDF Features with GNU Troff
+.pdfinfo /Keywords groff troff PDF pdfmark
+.
+.\" Set the default cross reference format to indicate section numbers,
+.\" rather than page numbers, when we insert a reference pointer.
+.\"
+.ds PDFHREF.INFO section \\*[SN-NO-DOT] \\$*
+.
+.\" Define a macro, to print reference links WITHOUT the usual "see" prefix.
+.\"
+.de XR-NO-PREFIX
+.rn PDFHREF.PREFIX xx
+.ds PDFHREF.PREFIX
+.XR \\$@
+.rn xx PDFHREF.PREFIX
+..
+.
+.\" Define a string, to insert a Registered Trade Mark symbol as
+.\" a superscript...
+.\"
+.ds rg \*{\(rg\*}
+.\"
+.\" ...and use it to define strings, representing frequently used
+.\" registered trade marks.
+.\"
+.ds Adobe "Adobe\Z'\\$1'\*(rg\"
+.ds Acrobat "Acrobat\Z'\\$1'\*(rg\"
+.ds Distiller "Distiller\Z'\\$1'\*(rg\"
+.ds PostScript "PostScript\Z'\\$1'\*(rg\"
+.\"
+.ds Microsoft "Microsoft\Z'\\$1'\*(rg\"
+.
+.\" Establish the page layout.
+.\"
+.nr PO 2.5c
+.nr LL 17.0c
+.nr LT 17.0c
+.nr DI 5n
+.nr HY 0
+.
+.\" Within the table of contents, the width of the right-hand margin,
+.\" in which space is reserved for the display of page numbers, and the
+.\" appearance of the leaders which precede it, are controlled by:-
+.\"
+.char \[TC-LEADER] \h'0.8n'.
+.nr TC-MARGIN \w'00000'
+.
+.\" Generate headers in larger point sizes, for NH levels < 4,
+.\" with point size increasing by 1.5p, for each lesser NH level.
+.\"
+.nr GROWPS 4
+.nr PSINCR 1.5p
+.
+.
+.\" Implement an interface with the FS macro (from s.tmac) to facilitate
+.\" placement of footnote reference marks, with each serving as an active
+.\" pdfhref link to the associated footnote itself.
+.\"
+.de pdf:fn.mark nr
+.\" Macro to replace original duty performed by "\**"; must be invoked
+.\" at point of footnote mark placement, e.g. by FS, BEFORE recording of
+.\" the associated text within the footnote diversion is commenced.
+.\"
+.ie \\n[.$] \{\
+. pdfhref L -D pdf:fn\\$1 -- \\$2
+. pdfhref M -N pdf:fn\\$1r
+. \}
+.\"
+.\" s.tmac does not publicly expose its auto-incrementing footnote index;
+.\" to avoid a dependency on an undocumented internal feature, we create
+.\" our own counter, while keeping the internal index synchronized, by
+.\" interpolating a renamed "\**", each time we increment our counter.
+.\"
+.el .\\$0 \\n+[pdf:fn.index.count] \\*[pdf:fn.index]
+.nr pdf:fn.index.count 0 1
+.rn * pdf:fn.index
+.ds * \c
+.
+.\" For versions of s.tmac which support the FS-MARK callback hook, it
+.\" is sufficient for us to answer the callback request.
+.\"
+.\" FIXME: in time, we may be able to unconditionally assume that this
+.\" callback hook will be supported...
+.\"
+.ie d FS-MARK .als FS-MARK pdf:fn.mark
+.el \{\
+.\" ...but in the interim, we may need to redefine s.tmac's FS macro,
+.\" (actually the @FS internal macro, rather than FS itself), to gain
+.\" an effect equivalent to taking control of FS-MARK, to achieve the
+.\" placement of a footnote mark as an active pdfhref link.
+.\"
+.rn @FS pdf:fn.record
+.de @FS
+.pdf:fn.mark
+.pdf:fn.record
+..
+.\}
+.\" Override s.tmac's (undocumented) footnote output hook; this emulates
+.\" the default output style for \n[FF] == 3 footnotes, with the footnote
+.\" number formatted as a pdfhref link back to the position at which the
+.\" footnote marker appears, within the document text.
+.\"
+.de FP
+.LP
+.nr pdf:fn.tag.width (u;2*\\n[FI])
+.ds pdf:fn.tag \s'-1.5p'\\$1.\s'+1.5p'
+.pdfhref M -N pdf:fn\\$1
+.in +\\n[pdf:fn.tag.width]u
+.ti -\\n[pdf:fn.tag.width]u
+.nr pdf:fn.tag.width -\\w'\\*[pdf:fn.tag]'u
+.pdfhref L -D pdf:fn\\$1r -A \\h'\\n[pdf:fn.tag.width]u'\c -- \\*[pdf:fn.tag]
+..
+.de pdfhref-nobreak
+.\" FIXME: I've only noticed this anomaly when planting pdfhref links
+.\" within footnotes; if the start of the link text is placed near the
+.\" line length limit, and all of it is moved to the start of the next
+.\" line, the "hot-spot" region is computed to be one line higher than
+.\" it should be; ending the preceding input line with "\c", and then
+.\" invoking pdfhref via this wrapper, works around this issue.
+.\"
+.ie \\n[.l]-\\n[.i]-\\n[.k]-\\w'\\$\\n[.$]' \&
+.el \p
+.pdfhref \\$*
+..
+.
+.\" Define a local macro to facilitate choice of style for emphasis;
+.\" by default, make it equivalent to the ms standard "I" macro.
+.\"
+.de EM
+.\".I "\s'+0.3'\\$1\s0" "\\$2" "\\$3"
+.I \\$@
+..
+.\" Also, define variations on the ms standard "CW" macro, to add
+.\" bold, italic, and both styles to constant width text; note that
+.\" each of these accept two additional arguments, in comparison to
+.\" standard "CW", such that \$1 specifies the text which is to be
+.\" styled, \$2 and \$3 specify inner after/before bracketting, to
+.\" set as regular "CW" text, while \$4 and \$5 become equivalent
+.\" to \$2 and \$3 of standard "CW", acting as outer bracketting.
+.\"
+.de CWB
+\\$5\fC\\$3\fP\f(CB\\$1\fP\fC\\$2\fP\\$4
+..
+.de CWI
+\\$5\fC\\$3\fP\f(CI\\$1\fP\fC\\$2\fP\\$4
+..
+.de CWBI
+\\$5\fC\\$3\fP\f[CBI]\\$1\fP\fC\\$2\fP\\$4
+..
+.\" Finally, augment this group with a variant string, which may be
+.\" used to set constant width tags on "IP" paragraphs, with \$1 set
+.\" as if by "CWB", followed by an optional suffix set as if by "CWBI",
+.\" and with the suffix bracketted by \$3 after and \$4 before, each
+.\" set in the regular "CW" style.
+.\"
+.ds = \f(CB\\$1\f(CR\\$4\f[CBI]\\$2\f(CR\\$3
+.
+.\" Additionally, add a cross-reference convenience macro, emulating
+.\" the style of the "ms" font change macros...
+.\"
+.\" .XR <dest-name> [<affixed> [<prefix>]]
+.\"
+.\" ...such that, when invoked with one, two, or three arguments, this
+.\" expands to the equivalent of:
+.\"
+.\" .pdfhref L -D <dest-name> [-A <affixed> [-P <prefix>]]
+.\"
+.\" to place a pdfhref reference link, to a named destination, within
+.\" the same document, using the reference text which is predefined in
+.\" the reference dictionary entry associated with the destination.
+.\"
+.de XR
+.if \\n(.$ \{\
+. if \\n[OPMODE] \{\
+. ds xr!argv -D "\\$1"
+. if \\n(.$>1 .as xr!argv " -A "\\$2"
+. if \\n(.$>2 .as xr!argv " -P "\\$3"
+. pdfhref L \\*[xr!argv]
+. rm xr!argv
+. \}
+. \}
+..
+.
+.NH 1
+.\" Conventionally, in "ms", NH precedes text which is to be set as a
+.\" numbered section heading, but it makes no provision for automatic
+.\" reference to that heading in a table of contents, or (in the case
+.\" of PDF document production) in a document outline. Both of these
+.\" limitations may be mitigated, by using the XN macro, (provided by
+.\" spdf.tmac), which sets its arguments, both as text to be included
+.\" in the section heading, as printed, and as an assocated document
+.\" outline reference; it will also make this same text available to
+.\" the user-specified callback macro, XH-UPDATE-TOC, whereby it may
+.\" be used, e.g. to construct a table of contents entry.
+.\"
+.\" Within the table of contents, structural layout will be achieved,
+.\" under the direction of the following spacing control constants:
+.\"
+.ds XNVS1 0.50v \" leading for top level
+.ds XNVS2 0.15v \" leading at nesting level increment
+.ds XNVS3 0.30v \" leading following nested group
+.\"
+.\" Note that one TOC related callback hook is shared by both XH and
+.\" XN; its is called XH-UPDATE-TOC, regardless of whether called by
+.\" XH or by XN; when called by XN, it is invoked with arguments:
+.\"
+.\" .XH-UPDATE-TOC <outline-level> <section-number> <text> ...
+.\"
+.de XH-UPDATE-TOC
+.\" This implementation of XH-UPDATE-TOC utilizes the rudimentary ms
+.\" mechanism for formatting a table of contents, using XS and XE to
+.\" bracket individual entries.
+. XS
+. \" A local register, tc*hl, is used to track the outline level
+. \" of each TOC entry, as it is added; it is not defined, until
+. \" the first entry is recorded...
+. \"
+. if r tc*hl \{\
+. \" ...after which, we use it to establish indentation,
+. \" to reflect changes in outline level.
+. \"
+. ie \\$1>1 \{\
+. \" When at any outline level greater than one,
+. \" any level increment will be offset by XNVS2
+. \" units of vertical space...
+. \"
+. ie \\$1>\\n[tc*hl] .sp \\*[XNVS2]
+.
+. \" ...whereas any decrement will be offset by
+. \" XNVS3 units.
+. \"
+. el .if \\n[tc*hl]>\\$1 .sp \\*[XNVS3]
+. \}
+.
+. \" ...but every top-level entry, after the first, is
+. \" offset by XNVS1 units.
+. \"
+. el .sp \\*[XNVS1]
+. \}
+.
+. \" \$1 becomes the effective outline level for the current table
+. \" of contents entry, but we must ensure that it is one or more.
+. \"
+. ie \\$1 .nr tc*hl \\$1
+. el .nr tc*hl 1
+.
+. \" The current outline level determines the indentation at which
+. \" we place the section number reference...
+. \"
+. nop \h'\\n[tc*hl]-1m'\\$2\c
+.
+. \" ...after which we discard \$1 and \$2, allowing us to append
+. \" all remaining arguments, ensuring that there is at least 0.5n
+. \" of following space, before the first leader dot.
+. \"
+. shift 2
+. nop \h'1.5n'\\$*\h'0.5n'
+. XE
+..
+.XN Introduction
+.\"
+.\" If using an old s.tmac, without the SN-NO-DOT extension, ensure
+.\" that we get SOMETHING in section number references.
+.\"
+.if !d SN-NO-DOT .als SN-NO-DOT SN
+.LP
+It might appear that it is a fairly simple matter to
+produce documents in \*[Adobe]\~\(lqPortable\~Document\~Format\(rq,
+commonly known as PDF, using
+.CW groff ) GNU\~Troff\~(
+as the document formatter.
+Indeed,
+.CW groff 's
+default output format is the native \*[Adobe]\~\*[PostScript] format,
+which PDF producers such as \*[Adobe] \*[Acrobat] \*[Distiller ,]
+or GhostScript, expect as their input format.
+Thus, the PDF production process would seem to entail simply
+formatting the document source with
+.CW groff ,
+to produce a \*[PostScript] version of the document,
+which can subsequently be processed by \*[Acrobat] \*[Distiller]
+or GhostScript, to generate the final PDF document.
+.LP
+For many PDF production requirements,
+the production cycle described above may be sufficient.
+However, this is a limited PDF production method,
+in which the resultant PDF document represents no more than
+an on screen image of the printed form of the document, if
+.CW groff 's
+\*[PostScript] output were printed directly.
+.LP
+The Portable Document Format provides a number of features,
+which significantly enhance the experience of reading a document on screen,
+but which are of little or no value to a document which is merely printed.
+It
+.EM is
+possible to exploit these PDF features, which are described in the \*[Adobe]
+.de pdfmark-manual pdfmark-manual
+.\" This is an example of a resource reference specified by URI ...
+.\" We may need to refer often to the Adobe pdfmark Reference Manual,
+.\" so we create the internet link definition using a macro, to make
+.\" it reusable.
+.\"
+.\" Note also, that we protect the description of the reference by
+.\" preceding it with "--", to avoid "invalid character in name" type
+.\" error messages from groff (caused by the use of "\~").
+.\"
+.pdfhref W -D https://www.adobe.com/go/acrobatsdk_pdfmark \
+ -P \(lq -A \(rq\\$1 -- pdfmark\~Reference\~Manual
+.pdfmark-manual ,
+with some refinement of the simple PDF production method, provided
+appropriate \(lqfeature implementing\(rq instructions can be embedded into
+.CW groff 's
+\*[PostScript] rendering of the document.
+This, of course, implies that the original document source, which
+.CW groff
+will process to generate the \*[PostScript] description of the document,
+must include appropriate markup to exploit the desired PDF features.
+It is this preparation of the
+.CW groff
+document source to exploit a number of these features,
+which provides the principal focus of this document.
+.LP
+The markup techniques to be described have been utilized in the production of
+the PDF version of this document itself.
+This has been formatted using
+.CW groff 's
+.CW ms
+macro package;
+thus, usage examples may be found in the document source file,
+.CW \n(.F ,
+to which comments have been added,
+to help identify appropriate markup examples for implementing PDF features,
+such as:\(en
+.QS
+.IP \(bu
+Selecting a default document view, which defines how the document will appear
+when opened in the reader application; for example, when this document is
+opened in \*[Acrobat]\~Reader, it should display the top of the cover sheet,
+in the document view pane, while a document outline should appear to the left,
+in the \(lqBookmarks\(rq pane.
+.IP \(bu
+Adding document identification \(lqmeta\(hydata\(rq,
+which can be accessed, in \*[Acrobat]\~Reader,
+by inspecting the \(lqFile\^/\^Document\~Properties\^/\^Summary\(rq.
+.IP \(bu
+Creating a document outline, which will be displayed in the \(lqBookmarks\(rq
+pane of \*[Acrobat]\~Reader, such that readers may quickly navigate to any
+section of the document, simply by clicking on the associated heading
+in the outline view.
+.IP \(bu
+Embedding active links in the body of the document, such that readers may
+quickly navigate to related material at another location within the same
+document, or in another PDF document, or even to a related Internet resource,
+specified by its URI.
+.IP \(bu
+Adding annotations, in the form of \(lqsticky notes\(rq, at strategic
+points within the PDF document.
+.QE
+.LP
+All of the techniques described have been tested on
+.EM both
+GNU/Linux, and on \*[Microsoft] Windows\(tm2000 operating platforms, using
+.CW groff
+.CW 1.19.1 ,\**
+.FS
+Later versions should, and some earlier versions may, be equally suitable.
+See\c
+.pdfhref-nobreak W \*[GROFF-WEBSITE]
+for information and availability of the latest version.
+.FE
+in association with
+.CW AFPL
+.CW GhostScript
+.CW 8.14 .\**
+.FS
+Again, other versions may be suitable.
+See\c
+.pdfhref-nobreak W http://ghostscript.com
+for information and availability.
+.FE
+\&
+Other tools employed, which should be readily available on
+.EM any
+Unix\(tm
+or GNU/Linux system, are
+.CW sed ,
+.CW awk
+and
+.CW make ,
+together with an appropriate text editor, for creating and marking up the
+.CW groff
+input files.
+These additional utilities are not provided, as standard,
+on the \*[Microsoft] Windows\(tm platform,
+but several third party implementations are available.
+Some worth considering include the MKS\*(rg\~Toolkit,\**
+.FS
+A commercial offering; see\c
+.pdfhref-nobreak W http://mkssoftware.com/products/tk/default.asp
+for information.
+.FE
+Cygwin,\**
+.FS
+A
+.EM free
+but comprehensive
+.SM
+POSIX
+.LG
+emulation environment and
+Unix\(tm
+toolkit for \%32\(hybit \*[Microsoft] Windows\(tm platforms; see\c
+.pdfhref-nobreak W http://cygwin.com
+for information and download.
+.FE
+or MSYS.\**
+.FS
+Another free, but minimal suite of common
+Unix\(tm
+tools for \%32\(hybit \*[Microsoft] Windows\(tm, available for download from\c
+.pdfhref-nobreak W -A ; https://mingw.osdn.io
+it
+.EM does
+include those tools listed above,
+and is the package which was actually used when performing the Windows\(tm2000
+platform tests referred to in the text.
+.FE
+\&
+This list is by no means exhaustive, and should in no way be construed as an
+endorsement of any of these packages, nor to imply that other similar packages,
+which may be available, are in any way inferior to them.
+.bp
+.
+.NH 1
+.\" We may wish a section heading to represent a named destination,
+.\" so that we can create a linked reference to it, from some other
+.\" part of the PDF document, (or even from another PDF document).
+.\"
+.\" Here we use the "-N" option of the "XN" macro, to create a named
+.\" PDF link destination, at the location of the heading. Notice that
+.\" we also use the "--" marker to separate the heading text from the
+.\" preceding option specification; it is not strictly necessary in
+.\" this case, but it does help to set off the heading text from the
+.\" option specification.
+.\"
+.XN -N pdf-features -- Exploiting PDF Document Features
+.LP
+To establish a consistent framework for adding PDF features, a
+.CW groff
+macro package, named
+.CW pdfmark.tmac ,
+has been provided.
+Thus, to incorporate PDF features in a document,
+the appropriate macro calls, as described below, may be placed in the
+.CW groff
+document source, which should then be processed with a
+.CW groff
+command of the form\**
+.FS
+.pdfhref M pdf-features-fn
+.nr pdf-features-fn \n[fn*text-num]
+Note that,
+if any
+.CW -T \^\c
+.CWI dev
+option is specified,
+it should be either
+.CW -T \^\c
+.CW ps ,
+or
+.CW -T \^\c
+.CW pdf ;
+any other explicit choice is unlikely to be compatible with
+.CW -m \|\|\c
+.CW pdfmark ,
+and will have an unpredictable
+(possibly erroneous)
+effect on the output.
+If no
+.CW -T \^\c
+.CWI dev
+option is specified,
+(in which case
+.CW -T \^\c
+.CW ps
+is implicitly assumed),
+or if
+.CW -T \^\c
+.CW ps
+is explicitly specified,
+then the output will be produced in \*[PostScript] format,
+and will require conversion to PDF,
+(e.g. by using GhostScript tools);
+explicit specification of
+.CW -T \^\c
+.CW pdf
+will result in direct output in PDF format,
+thus obviating the need for conversion.
+.FE
+.QP
+.fam C
+groff [-Tps\h'0.2p'|\h'0.2p'-Tpdf] [-m\F[]\|\|\FC\c
+.I name ]
+-m\F[]\|\|\FC\c
+.B pdfmark
+.I options \F[]\|\|\FC\c [-
+.I file \F[]\|\|\FC\c "...] "
+\&...
+.LP
+It may be noted that the
+.CW pdfmark
+macros have no dependencies on, and no known conflicts with,
+any other
+.CW groff
+macro package; thus, users are free to use any other macro package,
+of their choice, to format their documents, while also using the
+.CW pdfmark
+macros to add PDF features.
+.
+.NH 2
+.XN -S -N pdfmark-operator -- The \F[C]pdfmark\F[] Operator
+.LP
+All PDF features are implemented by embedding instances of the
+.B \F[C]pdfmark\F[]
+operator, as described in the \*[Adobe]
+.pdfmark-manual ,
+into
+.CW groff 's
+\*[PostScript] output stream.
+To facilitate the use of this operator, the
+.CW pdfmark
+macro package defines the primitive
+.CW pdfmark
+macro; it simply emits its argument list,
+as arguments to a
+.CW pdfmark
+operator, in the \*[PostScript] output stream.
+.LP
+.pdfhref M -N pdfmark-example
+To illustrate the use of the
+.CW pdfmark
+macro, the following is a much simplified example of how a bookmark
+may be added to a PDF document outline
+.QP
+.CW ".pdfmark \e"
+.RS 4
+.nf
+.fam C
+/Count 2 \e
+/Title (An Example of a Bookmark with Two Children) \e
+/View [/FitH \en[PDFPAGE.Y]] \e
+/OUT
+.RE
+.LP
+In general, users should rarely need to use the
+.CW pdfmark
+macro directly.
+In particular, the above example is too simple for general use; it
+.EM will
+create a bookmark, but it does
+.EM not
+address the issues of setting the proper value for the
+.CW /Count
+key, nor of computing the
+.CW PDFPAGE.Y
+value used in the
+.CW /View
+key. The
+.CW pdfmark
+macro package includes a more robust mechanism for creating bookmarks,
+.\"
+.\" Here is an example of how a local reference may be planted,
+.\" using the automatic formatting feature of the "pdfhref" macro.
+.\"
+.\" This is a forward reference to the named destination "add-outline",
+.\" which is defined below, using the "XN" wrapper macro, from the
+.\" "spdf.tmac" macro package. The automatically formatted reference
+.\" will be enclosed in parentheses, as specified by the use of
+.\" "-P" and "-A" options.
+.\"
+.pdfhref L -P ( -A ), -D add-outline
+.\"
+which addresses these issues automatically.
+Nevertheless, the
+.CW pdfmark
+macro may be useful to users wishing to implement more advanced PDF features,
+than those currently supported directly by the
+.CW pdfmark
+macro package.
+.
+.NH 2
+.XN -N docview -- Selecting an Initial Document View
+.LP
+By default,
+when a PDF document is opened,
+the first page will be displayed,
+at the default magnification set for the reader,
+and outline and thumbnail views will be hidden.
+When using a PDF reader,
+such as \*[Acrobat]\~Reader,
+which supports the
+.CW /DOCVIEW
+class of the
+.CW pdfmark
+operator,
+these default initial view settings may be overridden,
+using the
+.CW pdfview
+macro.
+For example
+.QP
+.CW ".pdfview /PageMode /UseOutlines"
+.LP
+will cause \*[Acrobat]\~Reader to open the document outline view,
+to the left of the normal page view,
+while
+.QP
+.CW ".pdfview /PageMode /UseThumbs"
+.LP
+will open the thumbnail view instead.
+.LP
+Note that the two
+.CW /PageMode
+examples, above, are mutually exclusive \(em it is not possible to have
+.EM both
+outline and thumbnail views open simultaneously.
+However, it
+.EM is
+permitted to add
+.CW /Page
+and
+.CW /View
+keys, to force the document to open at a page other than the first,
+or to change the magnification at which the document is initially displayed;
+see the
+.pdfmark-manual
+for more information.
+.LP
+It should be noted that the view controlling meta\(hydata, defined by the
+.CW pdfview
+macro, is not written immediately to the \*[PostScript] output stream,
+but is stored in an internal meta\(hydata \(lqcache\(rq,
+(simply implemented as a
+.CW groff
+diversion).
+This \(lqcached\(lq meta\(hydata must be written out later, by invoking the
+.CW pdfsync
+macro,
+.\"
+.\" Here is another example of how we may introduce a forward reference.
+.\" This time we are using the shorter notation afforded by the "XR" macro
+.\" provided by "spdf.tmac"; this example is equivalent to the native
+.\" "pdfmark.tmac" form
+.\" .pdfhref L -D pdfsync -P ( -A ).
+.\"
+.XR pdfsync ). (
+.
+.NH 2
+.XN -N docinfo -- Adding Document Identification Meta-Data
+.LP
+In addition to the
+.CW /DOCVIEW
+class of meta\(hydata described above,
+.XR docview ), (
+we may also wish to include document identification meta\(hydata,
+which belongs to the PDF
+.CW /DOCINFO
+class.
+.LP
+To do this, we use the
+.CW pdfinfo
+macro.
+As an example of how it is used,
+the identification meta\(hydata attached to this document
+was specified using a macro sequence similar to:\(en
+.DS I
+.CW
+\&.pdfinfo /Title PDF Document Publishing with GNU Troff
+\&.pdfinfo /Author Keith Marshall
+\&.pdfinfo /Subject How to Exploit PDF Features with GNU Troff
+\&.pdfinfo /Keywords groff troff PDF pdfmark
+.DE
+Notice that the
+.CW pdfinfo
+macro is repeated, once for each
+.CW /DOCINFO
+record to be placed in the document.
+In each case, the first argument is the name of the applicable
+.CW /DOCINFO
+key, which
+.EM must
+be named with an initial solidus character;
+all additional arguments are collected together,
+to define the value to be associated with the specified key.
+.LP
+As is the case with the
+.CW pdfview
+macro,
+.XR docview ), (
+the
+.CW /DOCINFO
+records specified with the
+.CW pdfinfo
+macro are not immediately written to the \*[PostScript] output stream;
+they are stored in the same meta\(hydata cache as
+.CW /DOCVIEW
+specifications, until this cache is explicitly flushed,
+by invoking the
+.CW pdfsync
+macro,
+.XR pdfsync ). (
+.
+.NH 2
+.XN -N add-outline -- Creating a Document Outline
+.LP
+A PDF document outline comprises a table of references,
+to \(lqbookmarked\(rq locations within the document.
+When the document is viewed in an \(lqoutline\~aware\(rq PDF document reader,
+such as \*[Adobe] \*[Acrobat] Reader,
+this table of \(lqbookmarks\(rq may be displayed in a document outline pane,
+or \(lqBookmarks\(rq pane, to the left of the main document view.
+Individual references in the outline view may then be selected,
+by clicking with the mouse,
+to jump directly to the associated marked location in the document view.
+.LP
+The document outline may be considered as a collection of \(lqhypertext\(rq
+references to \(lqbookmarked\(rq locations within the document.
+The
+.CW pdfmark
+macro package provides a single generalized macro,
+.CW pdfhref ,
+for creating and linking to \(lqhypertext\(rq reference marks.
+This macro will be described more comprehensively in a later section,
+.XR pdfhref ); (
+the description here is restricted to its use for defining document outline entries.
+.
+.NH 3
+.XN -N basic-outline -- A Basic Document Outline
+.LP
+In its most basic form, the document outline comprises a structured list of headings,
+each associated with a marked location, or \(lqbookmark\(rq, in the document text,
+and a specification for how that marked location should be displayed,
+when this bookmark is selected.
+.LP
+To create a PDF bookmark, the
+.CW pdfhref
+macro is used,
+at the point in the document where the bookmark is to be placed,
+in the form
+.QP
+.fam C
+.B ".pdfhref O"
+.I level > <
+.I "descriptive text ..."
+.LP
+in which the reference class
+.CWB O \& \& \(rq \(lq
+stipulates that this is an outline reference.
+.LP
+Alternatively, for those users who may prefer to think of a document outline
+simply as a collection of bookmarks, the
+.CW pdfbookmark
+macro is also provided \(em indeed,
+.CW pdfhref
+invokes it, when processing the
+.CWB O \& \& \(rq \(lq
+reference class operator.
+It may be invoked directly, in the form
+.QP
+.fam C
+.B .pdfbookmark
+.I level > <
+.I "descriptive text ..."
+.LP
+Irrespective of which of the above macro forms is employed, the
+.CWI level > <
+argument is required.
+It is a numeric argument, defining the nesting level of the \(lqbookmark\(rq
+in the outline hierarchy, with one being the topmost level.
+Its function may be considered analagous to the
+.EM "heading level"
+of the document's section headings,
+for example, as specified with the
+.CW NH
+macro, if using the
+.CW ms
+macros to format the document.
+.LP
+All further arguments, following the
+.CWI level > <
+argument, are collected together, to specify the heading text which will appear
+in the document's outline view.
+Thus, the outline entry for this section of this document,
+which has a level three heading,
+might be specified as
+.QP
+.CW
+\&.pdfhref O 3 \*(SN A Basic Document Outline
+.LP
+or, in the alternative form using the
+.CW pdfbookmark
+macro, as
+.QP
+.CW
+\&.pdfbookmark 3 \*(SN A Basic Document Outline
+.
+.NH 3
+.XN Hierarchical Structure in a Document Outline
+.LP
+When a document outline is created, using the
+.CW pdfhref
+macro as described in
+.\"
+.\" Here is an example of how we can temporarily modify the format of
+.\" a reference link, in this case to indicate only the section number
+.\" of the link target, in the form "section #", (or, if we define
+.\" "SECREF.BEGIN" before the call, its content followed by the
+.\" section number).
+.\"
+.\" We first define a macro, which will get the reference data from
+.\" pdfhref, as arguments, and will return the formatted output, as we
+.\" require it, the string "PDFHREF.TEXT".
+.\"
+.de SECREF
+.while \\n(.$ \{\
+. ie '\\$1'section' \{\
+. if !dSECREF.BEGIN .ds SECREF.BEGIN \\$1
+. ds PDFHREF.TEXT \\*[SECREF.BEGIN]\~\\$2
+. rm SECREF.BEGIN
+. shift \\n(.$
+. \}
+. el .shift
+. \}
+..
+.\" We now tell "pdfhref" to use our formatting macro, in place of
+.\" its builtin default formatter, before we specify the reference.
+.\"
+.pdfhref F SECREF
+.pdfhref L -A , -D basic-outline
+.\"
+.\" At this point, we would normally revert the "pdfhref" formatter
+.\" to use its default, built in macro. However, in this particular
+.\" case, we want to use our custom format one more time, before we
+.\" revert it, so we will omit the reversion step this time.
+.\"
+and any entry is added at a nesting level greater than one,
+then a hierarchical structure is automatically defined for the outline.
+However, as was noted in the simplified
+.pdfhref L -D pdfmark-example -- example
+in
+.pdfhref L -A , -D pdfmark-operator
+.\"
+.\" And now, we revert to default "pdfhref" formatting behaviour,
+.\" by completing the call we delayed above.
+.\"
+.pdfhref F
+.\"
+the data required by the
+.CW pdfmark
+operator to create the outline entry may not be fully defined,
+when the outline reference is defined in the
+.CW groff
+document source.
+Specifically, when the outline entry is created, its
+.CW /Count
+key must be assigned a value equal to the number of its subordinate entries,
+at the next inner level of the outline hierarchy;
+typically however,
+these subordinate entries will be defined
+.EM later
+in the document source, and the appropriate
+.CW /Count
+value will be unknown, when defining the parent entry.
+.LP
+To resolve this paradox, the
+.CW pdfhref
+macro creates the outline entry in two distinct phases \(em
+a destination marker is placed in the \*[PostScript] output stream immediately,
+when the outline reference is defined,
+but the actual outline entry is stored in an internal \(lqoutline cache\(rq,
+until its subordinate hierarchy has been fully defined;
+it can then be inserted in the output stream, with its
+.CW /Count
+value correctly assigned.
+Effectively, to ensure integrity of the document outline structure,
+this means that each top level outline entry, and
+.EM all
+of its subordinates, are retained in the cache, until the
+.EM next
+top level entry is defined.
+.LP
+One potential problem, which arises from the use of the \(lqoutline cache\(rq,
+is that, at the end of any document formatting run, the last top level outline entry,
+and any subordinates defined after it, will remain in the cache, and will
+.EM not
+be automatically written to the output stream.
+To avoid this problem, the user should follow the guidelines given in
+.\"
+.\" Here is a more conventional example of how to temporarily change
+.\" to the format used to display reference links. We will again use
+.\" the "SECREF" format, which we defined above, but on this occasion
+.\" we will immediately revert to the default format, after the link
+.\" has been placed.
+.\"
+.pdfhref F SECREF
+.pdfhref L -D pdfsync -A ,
+.pdfhref F
+.\"
+to synchronize the output state with the cache state,
+.XR pdfsync ), (
+at the end of the
+.CW groff
+formatting run.
+.
+.NH 3
+.XN -N outline-view -- Associating a Document View with an Outline Reference
+.LP
+Each \(lqbookmark\(rq entry, in a PDF document outline,
+is associated with a specific document view.
+When the reader selects any outline entry,
+the document view changes to display the document context
+associated with that entry.
+.LP
+The document view specification,
+to be associated with any document outline entry,
+is established at the time when the outline entry is created.
+However, rather than requiring that each individual use of the
+.CW pdhref
+macro, to create an outline entry,
+should include its own view specification,
+the actual specification assigned to each entry is derived from
+a generalized specification defined in the string
+.CW PDFBOOKMARK.VIEW ,
+together with the setting of the numeric register
+.CW PDFHREF.VIEW.LEADING ,
+which determine the effective view specification as follows:\(en
+.QS
+.IP \*[= PDFBOOKMARK.VIEW]
+Establishes the magnification at which the document will be viewed,
+at the location of the \(lqbookmark\(rq; by default, it is defined by
+.RS
+.QP
+.CW ".ds PDFBOOKMARK.VIEW /FitH \e\en[PDFPAGE.Y] u"
+.RE
+.IP
+which displays the associated document view,
+with the \(lqbookmark\(rq location positioned at the top of the display window,
+and with the magnification set to fit the page width to the width of the window.
+.IP \*[= PDFHREF.VIEW.LEADING]
+Specifies additional spacing,
+to be placed between the top of the display window
+and the actual location of the \(lqbookmark\(rq on the displayed page view.
+By default, it is set as
+.RS
+.QP
+.CW ".nr PDFHREF.VIEW.LEADING 5.0p"
+.RE
+.IP
+Note that
+.CW PDFHREF.VIEW.LEADING
+does not represent true \(lqleading\(rq, in the typographical sense,
+since any preceding text, set in the specified display space,
+will be visible at the top of the document viewing window,
+when the reference is selected.
+.IP
+Also note that the specification of
+.CW PDFHREF.VIEW.LEADING
+is shared by
+.EM all
+reference views defined by the
+.CW pdfhref
+macro; whereas
+.CW PDFBOOKMARK.VIEW
+is applied exclusively to outline references,
+there is no independent
+.CW PDFBOOKMARK.VIEW.LEADING
+specification.
+.QE
+.LP
+If desired, the view specification may be changed, by redefining the string
+.CW PDFBOOKMARK.VIEW ,
+and possibly also the numeric register
+.CW PDFHREF.VIEW.LEADING .
+Any alternative definition for
+.CW PDFBOOKMARK.VIEW
+.EM must
+be specified in terms of valid view specification parameters,
+as described in the \*[Adobe]
+.pdfmark-manual .
+.LP
+Note the use of the register
+.CW PDFPAGE.Y ,
+in the default definition of
+.CW PDFBOOKMARK.VIEW
+above.
+This register is computed by
+.CW pdfhref ,
+when creating an outline entry;
+it specifies the vertical position of the \(lqbookmark\(rq,
+in basic
+.CW groff
+units, relative to the
+.EM bottom
+edge of the document page on which it is defined,
+and is followed, in the
+.CW PDFBOOKMARK.VIEW
+definition, by the
+.CW grops
+.CW u \(rq \(lq
+operator, to convert it to \*[PostScript] units on output.
+It may be used in any redefined specification for
+.CW PDFBOOKMARK.VIEW ,
+(or in the analogous definition of
+.CW PDFHREF.VIEW ,
+described in
+'ne 2v
+.XR-NO-PREFIX pdfhref-view ),
+but
+.EM not
+in any other context,
+since its value is undefined outside the scope of the
+.CW pdfhref
+macro.
+.LP
+Since
+.CW PDFPAGE.Y
+is computed relative to the
+.EM bottom
+of the PDF output page,
+it is important to ensure that the page length specified to
+.CW troff
+correctly matches the size of the logical PDF page.
+This is most effectively ensured,
+by providing
+.EM identical
+page size specifications to
+.CW groff ,
+.CW grops
+and to the \*[PostScript] to PDF converter employed,
+and avoiding any page length changes within the document source.
+.LP
+Also note that
+.CW PDFPAGE.Y
+is the only automatically computed \(lqbookmark\(rq location parameter;
+if the user redefines
+.CW PDFBOOKMARK.VIEW ,
+and the modified view specification requires any other positional parameters,
+then the user
+.EM must
+ensure that these are computed
+.EM before
+invoking the
+.CW pdfhref
+macro.
+.
+.NH 3
+.XN -N outline-folding -- Folding the Outline to Conceal Less Significant Headings
+.LP
+When a document incorporates many subheadings,
+at deeply nested levels,
+it may be desirable to \(lqfold\(rq the outline
+such that only the major heading levels are initially visible,
+yet making the inferior subheadings accessible,
+by allowing the reader to expand the view of any heading branch on demand.
+.LP
+The
+.CW pdfmark
+macros support this capability,
+through the setting of the
+.CW PDFOUTLINE.FOLDLEVEL
+register.
+This register should be set to the number of heading levels
+which it is desired to show in expanded form, in the
+.EM initial
+document outline display;
+all subheadings at deeper levels will still be added to the outline,
+but will not become visible until the outline branch containing them is expanded.
+'ne 5
+For example, the setting used in this document:
+.QS
+.LD
+.fam C
+\&.\e" Initialize the outline view to show only three heading levels,
+\&.\e" with additional subordinate level headings folded.
+\&.\e"
+\&.nr PDFOUTLINE.FOLDLEVEL 3
+.DE
+.QE
+.LP
+results in only the first three levels of headings being displayed
+in the document outline,
+.EM until
+the reader chooses to expand the view,
+and so reveal the lower level headings in any outline branch.
+.LP
+The initial default setting of
+.CW PDFOUTLINE.FOLDLEVEL ,
+if the document author does not choose to change it,
+is 10,000.
+This is orders of magnitude greater than the maximum heading level
+which is likely to be used in any document;
+thus the default behaviour will be to show document outlines fully expanded,
+to display all headings defined,
+at all levels within each document.
+.LP
+The setting of
+.CW PDFOUTLINE.FOLDLEVEL
+may be changed at any time;
+however, the effect of each such change may be difficult to predict,
+since it is applied not only to outline entries which are defined
+.EM after
+the setting is changed,
+but also to any entries which remain in the outline cache,
+.EM at
+this time.
+Therefore, it is recommended that
+.CW PDFOUTLINE.FOLDLEVEL
+should be set
+.EM once ,
+at the start of each document;
+if it
+.EM is
+deemed necessary to change it at any other time,
+the outline cache should be flushed,
+.XR pdfsync ), (
+.EM immediately
+before the change,
+which should immediately preceed a level one heading.
+.
+.NH 3
+.XN -N multipart-outline -- Outlines for Multipart Documents
+.LP
+When a document outline is created, using the
+.CW pdfhref
+macro, each reference mark is automatically assigned a name,
+composed of a fixed stem followed by a serially generated numeric qualifier.
+This ensures that, for each single part document, every outline reference
+has a uniquely named destination.
+.LP
+As the overall size of the PDF document increases,
+it may become convenient to divide it into smaller,
+individually formatted \*[PostScript] components,
+which are then assembled, in the appropriate order,
+to create a composite PDF document.
+While this strategy may simplify the overall process of creating and
+editing larger documents, it does introduce a problem in creating
+an overall document outline,
+since each individual \*[PostScript] component will be assigned
+duplicated sequences of \(lqbookmark\(rq names,
+with each name ultimately referring to multiple locations in the composite document.
+To avoid such reference naming conflicts, the
+.CW pdfhref
+macro allows the user to specify a \(lqtag\(rq,
+which is appended to the automatically generated \(lqbookmark\(rq name;
+this may be used as a discriminating mark, to distinguish otherwise
+similarly named destinations, in different sections of the composite document.
+.LP
+To create a \(lqtagged\(rq document outline,
+the syntax for invocation of the
+.CW pdfhref
+macro is modified, by the inclusion of an optional \(lqtag\(rq specification,
+.EM before
+the nesting level argument, i.e.
+.QP
+.fam C
+.B ".pdfhref O"
+.B -T \& [
+.I tag >] <
+.I level > <
+.I "descriptive text ..."
+.LP
+The optional
+.CWI tag > <
+argument may be composed of any characters of the user's choice;
+however, its initial character
+.EM "must not"
+be any decimal digit, and ideally it should be kept short
+\(em one or two characters at most.
+.LP
+By employing a different tag in each section,
+the user can ensure that \(lqbookmark\(rq names remain unique,
+throughout all the sections of a composite document.
+For example, when using the
+.CW spdf.tmac
+macro package, which adds
+.CW pdfmark
+capabilities to the standard
+.CW ms
+package,
+.XR using-spdf ), (
+the table of contents is collected into a separate \*[PostScript] section
+from the main body of the document.
+In the \(lqbody\(rq section, the document outline is \(lquntagged\(rq,
+but in the \(lqTable\~of\~Contents\(rq section, a modified version of the
+.CW TC
+macro adds an outline entry for the start of the \(lqTable\~of\~Contents\(rq,
+invoking the
+.CW pdfhref
+macro as
+.QP
+.CW ".pdfhref O -T T 1 \e\e*[TOC]"
+.LP
+to tag the associated outline destination name with the single character suffix,
+.CW T \(rq. \(lq
+Alternatively, as in the case of the basic outline,
+.XR basic-outline ), (
+this may equally well be specified as
+.QP
+.CW ".pdfbookmark -T T 1 \e\e*[TOC]"
+.
+.NH 3
+.XN Delegation of the Outline Definition
+.LP
+Since the most common use of a document outline
+is to provide a quick method of navigating through a document,
+using active \(lqhypertext\(rq links to chapter and section headings,
+it may be convenient to delegate the responsibility of creating the outline
+to a higher level macro, which is itself used to
+define and format the section headings.
+This approach has been adopted in the
+.CW spdf.tmac
+package, to be described later,
+.XR using-spdf ). (
+.LP
+When such an approach is adopted,
+the user will rarely, if ever, invoke the
+.CW pdfhref
+macro directly, to create a document outline.
+For example, the structure and content of the outline for this document
+has been exclusively defined, using a combination of the
+.CW NH
+macro, from the
+.CW ms
+package, to establish the structure, and the
+.CW XN
+macro from
+.CW spdf.tmac ,
+to define the content.
+In this case,
+the responsibility for invoking the
+.CW pdfhref
+macro, to create the document outline,
+is delegated to the
+.CW XN
+macro.
+.
+.NH 2
+.XN -N pdfhref -- Adding Reference Marks and Links
+.LP
+.pdfhref F SECREF
+.ds SECREF.BEGIN Section
+.pdfhref L -D add-outline
+.pdfhref F
+has shown how the
+.CW pdfhref
+macro may be used to create a PDF document outline.
+While this is undoubtedly a powerful capability,
+it is by no means the only trick in the repertoire of this versatile macro.
+.LP
+The macro name,
+.CW pdfhref ,
+which is a contraction of \(lqPDF HyperText Reference\(rq,
+indicates that the general purpose of this macro is to define
+.EM any
+type of dynamic reference mark, within a PDF document.
+Its generalized usage syntax takes the form
+.QP
+.fam C
+.B .pdfhref
+.BI class > <
+.I "-options ...\&" ] [
+[--]
+.I "descriptive text ...\&" ] [
+.LP
+where
+.CW <\f(CIclass\fP>
+represents a required single character argument,
+which defines the specific reference operation to be performed,
+and may be selected from:\(en
+.QS
+.IP \*[= O]
+Add an entry to the document outline.
+This operation has been described earlier,
+.XR add-outline ). (
+.IP \*[= M]
+Place a \(lqnamed destination\(rq reference mark at the current output position,
+in the current PDF document,
+.XR mark-dest ). (
+.IP \*[= D]
+Specify the content of a PDF document reference dictionary entry;
+typically, such entries are generated automatically,
+by transformation of the intermediate output resulting from the use of
+.CW pdfhref
+.CWB M \& \& \(rq, \(lq
+with the
+.CWB -X \& \& \(rq \(lq
+modifier,
+.XR create-map ); (
+however, it is also possible to specify such entries manually,
+.XR user-format ). (
+.IP \*[= L]
+Insert an active link to a named destination,
+.XR link-named ), (
+at the current output position in the current PDF document,
+such that when the reader clicks on the link text,
+the document view changes to show the location of the named destination.
+.IP \*[= W]
+Insert an active link to a \(lqweb\(rq resource,
+.XR add-weblink ), (
+at the current output position in the current PDF document.
+This is effectively the same as using the
+.CWB L \& \& \(rq \(lq
+operator to establish a link to a named destination in another PDF document,
+.XR link-extern ), (
+except that in this case, the destination is specified by a
+\(lquniform resource identifier\(rq, or
+.CW URI ;
+this may represent any Internet or local resource
+which can be specified in this manner.
+.IP \*[= F]
+Specify a user defined macro, to be called by
+.CW pdfhref ,
+when formatting the text in the active region of a link,
+.XR set-format ). (
+.IP \*[= Z]
+Define the absolute position on the physical PDF output page,
+where the \(lqhot\(hyspot\(rq associated with an active link is to be placed.
+Invoked in pairs, marking the starting and ending PDF page co\(hyordinates
+for each link \(lqhot\(hyspot\(rq, this operator is rarely, if ever,
+specified directly by the user;
+rather, appropriate
+.CW pdfhref
+.CWB Z \& \& \(rq \(lq
+specifications are inserted automatically into the document reference map
+during the PDF document formatting process,
+.XR create-map ). (
+.IP \*[= I]
+Initialize support for
+.CW pdfhref
+features.
+The current
+.CW pdfhref
+implementation provides only one such feature which requires initialization
+\(em a helper macro which must be attached to a user supplied page trap handler,
+in order to support mapping of reference \(lqhot\(hyspots\(rq
+which extend through a page transition;
+.XR page-trap ). (
+.QE
+.
+.NH 3
+.XN -S -- Optional Features of the \F[C]pdfhref\F[] Macro
+.LP
+The behaviour of a number of the
+.CW pdfhref
+macro operations can be modified,
+by including
+.EM "option specifiers" \(rq \(lq
+after the operation specifying argument,
+but
+.EM before
+any other arguments normally associated with the operation.
+In
+.EM all
+cases, an option is specified by an
+.EM "option flag" \(rq, \(lq
+comprising an initial hyphen,
+followed by one or two option identifying characters.
+Additionally,
+.EM some
+options require
+.EM "exactly one"
+option argument;
+for these options, the argument
+.EM must
+be specified, and it
+.EM must
+be separated from the preceding option flag by one or more
+.EM spaces ,
+(tabs
+.EM "must not"
+be used).
+It may be noted that this paradigm for specifying options
+is reminiscent of most
+Unix\(tm
+shells; however, in the case of the
+.CW pdfhref
+macro, omission of the space separating an option flag from its argument is
+.EM never
+permitted.
+.LP
+A list of
+.EM all
+general purpose options supported by the
+.CW pdfhref
+macro is given below.
+Note that not all options are supported for all
+.CW pdfhref
+operations; the operations affected by each option are noted in the list.
+For
+.EM most
+operations, if an unsupported option is specified,
+it will be silently ignored; however, this behaviour should
+not be relied upon.
+.LP
+The general purpose options, supported by the
+.CW pdfhref
+macro, are:\(en
+.QS
+.IP \*[= -N\0 name > <]
+Allows the
+.CWI name > <
+associated with a PDF reference destination
+to be defined independently from the following text,
+which describes the reference.
+This option affects only the
+.CWB M \& \& \(rq \(lq
+operation of the
+.CW pdfhref
+macro,
+.XR mark-dest ). (
+.IP \*[= -E]
+Also used exclusively with the
+.CWB M \& \& \(rq \(lq
+operator, the
+.CWB -E
+option causes any specified
+.CWI descriptive \& \& \~\c
+.CWI text
+arguments,
+.XR mark-dest ), (
+to be copied, or
+.EM echoed ,
+in the body text of the document,
+at the point where the reference mark is defined;
+(without the
+.CWB -E
+option, such
+.CWI descriptive \& \& \~\c
+.CWI text
+will appear
+.EM only
+at points where links to the reference mark are placed,
+and where the standard reference display format,
+.XR set-format ), (
+is used).
+.IP \*[= -D\0 dest > <]
+Specifies the
+.CW URI ,
+or the destination name associated with a PDF active link,
+independently of the following text,
+which describes the link and demarcates the link \(lqhot\(hyspot\(rq.
+This option affects the behaviour of the
+.CW pdfhref
+macro's
+.CWB L \& \& \(rq \(lq
+and
+.CWB W \& \& \(rq \(lq
+operations.
+.IP
+When used with the
+.CWB L \& \& \(rq \(lq
+operator, the
+.CWI dest > <
+argument must specify a PDF \(lqnamed destination\(rq,
+as defined using
+.CW pdfhref
+with the
+.CWB M \& \& \(rq \(lq
+operator.
+.IP
+When used with the
+.CWB W \& \& \(rq \(lq
+operator,
+.CWI dest > <
+must specify a link destination in the form of a
+\(lquniform resource identifier\(rq, or
+.CW URI ,
+.XR add-weblink ). (
+.IP \*[= -F\0 file > <]
+When used with the
+.CWB L \& \& \(rq \(lq
+.CW pdfhref
+operator,
+.CWI file > <
+specifies an external PDF file in which the named destination
+for the link reference is defined.
+This option
+.EM must
+be specified with the
+.CWB L \& \& \(rq \(lq
+operator,
+to create a link to a destination in a different PDF document;
+when the
+.CWB L \& \& \(rq \(lq
+operator is used
+.EM without
+this option, the link destination is assumed to be defined
+within the same document.
+.IP \*[= -P\0 \(dqprefix\(hytext\(dq > <]
+Specifies
+.CWI \(dqprefix\(hytext\(dq > <
+to be attached to the
+.EM start
+of the text describing an active PDF document link,
+with no intervening space, but without itself being included in the
+active area of the link \(lqhot\(hyspot\(rq;
+it is effective with the
+.CWB L \& \& \(rq \(lq
+and
+.CWB W \& \& \(rq \(lq
+.CW pdfhref
+operators.
+.IP
+Typically, this option would be used to insert punctuation before
+the link \(lqhot\(hyspot\(rq.
+Thus, there is little reason for the inclusion of spaces in
+.CWI \(dqprefix\(hytext\(dq > < ;
+however, if such space is required, then the enclosing double quotes
+.EM must
+be specified, as indicated.
+.IP \*[= -A\0 \(dqaffixed\(hytext\(dq > <]
+Specifies
+.CWI \(dqaffixed\(hytext\(dq > <
+to be attached to the
+.EM end
+of the text describing an active PDF document link,
+with no intervening space, but without itself being included in the
+active area of the link \(lqhot\(hyspot\(rq;
+it is effective with the
+.CWB L \& \& \(rq \(lq
+and
+.CWB W \& \& \(rq \(lq
+.CW pdfhref
+operators.
+.IP
+Typically, this option would be used to insert punctuation after
+the link \(lqhot\(hyspot\(rq.
+Thus, there is little reason for the inclusion of spaces in
+.CWI \(dqaffixed\(hytext\(dq > < ;
+however, if such space is required, then the enclosing double quotes
+.EM must
+be specified, as indicated.
+.IP \*[= -T\0 tag > <]
+When specified with the
+.CWB O \& \& \(rq \(lq
+operator,
+.CWI tag > <
+is appended to the \(lqbookmark\(rq name assigned to the generated outline entry.
+This option is
+.EM required ,
+to distinguish between the series of \(lqbookmark\(rq names generated in
+individual passes of the
+.CW groff
+formatter, when the final PDF document is to be assembled
+from a number of separately formatted components;
+.XR multipart-outline ). (
+.IP \*[= -X]
+This
+.CW pdfhref
+option is used with either the
+.CWB M \& \& \(rq \(lq
+operator, or with the
+.CWB L \& \& \(rq \(lq
+operator.
+.IP
+When used with the
+.CWB M \& \& \(rq \(lq
+operator,
+.XR mark-dest ), (
+it ensures that a cross reference record for the marked destination
+will be included in the document reference map,
+.XR export-map ). (
+.IP
+When used with the
+.CWB L \& \& \(rq \(lq
+operator,
+.XR link-named ), (
+it causes the reference to be displayed in the standard cross reference format,
+.XR set-format ), (
+but substituting the
+.CWI descriptive \& \& \~\c
+.CWI text
+specified in the
+.CW pdfhref \& \(lq
+.CW L \(rq
+argument list,
+for the description specified in the document reference map.
+.IP \*[= --]
+Marks the end of the option specifiers.
+This may be used with all
+.CW pdfhref
+operations which accept options, to prevent
+.CW pdfhref
+from interpreting any following arguments as option specifiers,
+even if they would otherwise be interpreted as such.
+It is also useful when the argument list to
+.CW pdfhref
+contains special characters \(em any special character,
+which is not valid in a
+.CW groff
+macro name, will cause a parsing error, if
+.CW pdfhref
+attempts to match it as a possible option flag;
+using the
+.CW -- \(rq \(lq
+flag prevents this, so suppressing the
+.CW groff
+warning message, which would otherwise ensue.
+.IP
+Using this flag after
+.EM all
+sequences of macro options is recommended,
+even when it is not strictly necessary,
+if only for the entirely cosmetic benefit of visually separating
+the main argument list from the sequence of preceding options.
+.QE
+.LP
+In addition to the
+.CW pdfhref
+options listed above, a supplementary set of two character options are defined.
+These supplementary options, listed below, are intended for use with the
+.CWB L \& \& \(rq \(lq
+operator, in conjunction with the
+.CWB -F \& \& \~\c
+.CWBI file > <
+option, to specify alternate file names,
+in formats compatible with the file naming conventions
+of alternate operating systems;
+they will be silently ignored, if used in any other context.
+.LP
+The supported alternate file name options,
+which are ignored if the
+.CWB -F \& \& \~\c
+.CWBI file > <
+option is not specified, are:\(en
+.QS
+.IP \*[= -DF\0 dos\(hyfile > <]
+Specifies the name of the file in which a link destination is defined,
+using the file naming semantics of the
+.CW MS\(hyDOS \*(rg
+operating system.
+When the PDF document is read on a machine
+where the operating system uses the
+.CW MS\(hyDOS \*(rg
+file system, then
+.CWI dos\(hyfile > <
+is used as the name of the file containing the reference destination,
+overriding the
+.CWI file > <
+argument specified with the
+.CWB -F
+option.
+.IP \*[= -MF\0 mac\(hyfile > <]
+Specifies the name of the file in which a link destination is defined,
+using the file naming semantics of the
+.CW Apple \*(rg
+.CW Macintosh \*(rg
+operating system.
+When the PDF document is read on a machine
+where the operating system uses the
+.CW Macintosh \*(rg
+file system, then
+.CWI mac\(hyfile > <
+is used as the name of the file containing the reference destination,
+overriding the
+.CWI file > <
+argument specified with the
+.CWB -F
+option.
+.IP \*[= -UF\0 unix\(hyfile > <]
+Specifies the name of the file in which a link destination is defined,
+using the file naming semantics of the
+.CW Unix \(tm
+operating system.
+When the PDF document is read on a machine
+where the operating system uses
+.CW POSIX
+file naming semantics, then
+.CWI unix\(hyfile > <
+is used as the name of the file containing the reference destination,
+overriding the
+.CWI file > <
+argument specified with the
+.CWB -F
+option.
+.IP \*[= -WF\0 win\(hyfile > <]
+Specifies the name of the file in which a link destination is defined,
+using the file naming semantics of the
+.CW MS\(hyWindows \*(rg
+32\(hybit operating system.
+When the PDF document is read on a machine
+where the operating system uses any of the
+.CW MS\(hyWindows \*(rg
+file systems, with long file name support, then
+.CWI win\(hyfile > <
+is used as the name of the file containing the reference destination,
+overriding the
+.CWI file > <
+argument specified with the
+.CWB -F
+option.
+.QE
+.
+.NH 3
+.XN -N mark-dest -- Marking a Reference Destination
+.LP
+The
+.CW pdfhref
+macro may be used to create active links to any Internet resource,
+specified by its
+.CW URI ,
+or to any \(lqnamed destination\(rq,
+either within the same document, or in another PDF document.
+Although the PDF specification allows link destinations to be defined
+in terms of a page number, and an associated view specification,
+this style of reference is not currently supported by the
+.CW pdfhref
+macro, because it is not possible to adequately bind the specification
+for the destination with the intended reference context.
+.LP
+References to Internet resources are interpreted in accordance with the
+.CW W3C
+standard for defining a
+.CW URI ;
+hence the only prerequisite, for creating a link to any Internet resource,
+is that the
+.CW URI
+be properly specified, when declaring the reference;
+.XR add-weblink ). (
+In the case of references to \(lqnamed destinations\(rq in PDF documents,
+however, it is necessary to provide a mechanism for creating such
+\(lqnamed destinations\(rq.
+This may be accomplished, by invoking the
+.CW pdfhref
+macro in the form
+.QP
+.fam C
+.B ".pdfhref M"
+.B -N \& [
+.I name >] <
+.B -X ] [
+.B -E ] [
+.I "descriptive text ...\&" ] [
+.LP
+This creates a \(lqnamed destination\(rq reference mark, with its name specified by
+.CWI name > < ,
+or, if the
+.CWB -N
+option is not specified, by the first word of
+.CWI descriptive \& \& \~\c
+.CWI text \& \& ;
+(note that this imposes the restriction that,
+if the
+.CWB -N
+option is omitted, then
+.EM "at least"
+one word of
+.CWI descriptive \& \& \~\c
+.CWI text
+.EM must
+be specified).
+Additionally, a reference view will be automatically defined,
+and associated with the reference mark,
+.XR pdfhref-view ), (
+.\" and, if any
+.\" .CWI descriptive
+.\" .CWI text
+.\" is specified, or the
+and, if the
+.CWB -X
+option is specified, and no document cross reference map has been imported,
+.XR import-map ), (
+then a cross reference mapping record,
+.XR export-map ), (
+will be written to the
+.CW stdout
+stream;
+this may be captured, and subsequently used to generate a cross reference map
+for the document,
+.XR create-map ). (
+.LP
+When a \(lqnamed destination\(rq reference mark is created, using the
+.CW pdfhref
+macro's
+.CWB M \& \& \(rq \(lq
+operator, there is normally no visible effect in the formatted document; any
+.CWI descriptive \& \& \~\c
+.CWI text
+which is specified will simply be stored in the cross reference map,
+for use when a link to the reference mark is created.
+This default behaviour may be changed, by specifying the
+.CWB -E
+option, which causes any specified
+.CWI descriptive \& \& \~\c
+.CWI text
+to be \(lqechoed\(rq in the document text,
+at the point where the reference mark is placed,
+in addition to its inclusion in the cross reference map.
+.
+.NH 4
+.XN -N export-map -- Mapping a Destination for Cross Referencing
+.LP
+Effective cross referencing of
+.EM any
+document formatted by
+.CW groff
+requires multiple pass formatting.
+Details of how this multiple pass formatting may be accomplished,
+when working with the
+.CW pdfmark
+macros, will be discussed later,
+.XR do-xref ); (
+at this stage, the discussion will be restricted to the initial preparation,
+which is required at the time when the cross reference destinations are defined.
+.LP
+The first stage, in the process of cross referencing a document,
+is the generation of a cross reference map.
+Again, the details of
+.EM how
+the cross reference map is generated will be discussed in
+.pdfhref F SECREF L -D do-xref -A ;
+.pdfhref F
+however, it is important to recognize that
+.EM what
+content is included in the cross reference map is established
+when the reference destination is defined \(em it is derived
+from the reference data exported on the
+.CW stderr
+stream by the
+.CW pdfhref
+macro, when it is invoked with the
+.CWB M \& \& \(rq \(lq
+operator, and is controlled by whatever definition of the string
+.CW PDFHREF.INFO
+is in effect, when the
+.CW pdfhref
+macro is invoked.
+.LP
+The initial default setting of
+.CW PDFHREF.INFO
+is
+.QP
+.CW ".ds PDFHREF.INFO page \e\en% \e\e$*"
+.LP
+which ensures that the cross reference map will contain
+at least a page number reference, supplemented by any
+.CWI descriptive \& \& \~\c
+.CWI text
+which is specified for the reference mark, as defined by the
+.CW pdfhref
+macro, with its
+.CWB M \& \& \(rq \(lq
+operator; this may be redefined by the user,
+to export additional cross reference information,
+or to modify the default format for cross reference links,
+.XR set-format ). (
+.
+.NH 4
+.XN -N pdfhref-view -- Associating a Document View with a Reference Mark
+.LP
+In the same manner as each document outline reference, defined by the
+.CW pdfhref
+macro with the
+.CWB O \& \& \(rq \(lq
+operator,
+.XR add-outline ), (
+has a specific document view associated with it,
+each reference destination marked by
+.CW pdfhref
+with the
+.CWB M \& \& \(rq \(lq
+operator, requires an associated document view specification.
+.LP
+The mechanism whereby a document view is associated with a reference mark
+is entirely analogous to that employed for outline references,
+.XR outline-view ), (
+except that the
+.CW PDFHREF.VIEW
+string specification is used, in place of the
+.CW PDFBOOKMARK.VIEW
+specification.
+Thus, the reference view is defined in terms of:\(en
+.QS
+.IP \*[= PDFHREF.VIEW]
+A string,
+establishing the position of the reference mark within the viewing window,
+and the magnification at which the document will be viewed,
+at the location of the marked reference destination;
+by default, it is defined by
+.RS
+.QP
+.CW ".ds PDFHREF.VIEW /FitH \e\en[PDFPAGE.Y] u"
+.RE
+.IP
+which displays the reference destination at the top of the viewing window,
+with the magnification set to fit the page width to the width of the window.
+.IP \*[= PDFHREF.VIEW.LEADING]
+A numeric register,
+specifying additional spacing, to be placed between the top of the display
+window and the actual position at which the location of the reference
+destination appears within the window.
+This register is shared with the view specification for outline references,
+and thus has the same default initial setting,
+.RS
+.QP
+.CW ".nr PDFHREF.VIEW.LEADING 5.0p"
+.RE
+.IP
+as in the case of outline reference views.
+.IP
+Again, notice that
+.CW PDFHREF.VIEW.LEADING
+does not represent true typographic \(lqleading\(rq,
+since any preceding text, set in the specified display space,
+will be visible at the top of the viewing window,
+when the reference is selected.
+.QE
+.LP
+Just as the view associated with outline references may be changed,
+by redefining
+.CW PDFBOOKMARK.VIEW ,
+so the view associated with marked reference destinations may be changed,
+by redefining
+.CW PDFHREF.VIEW ,
+and, if desired,
+.CW PDFHREF.VIEW.LEADING ;
+such changes will become effective for all reference destinations marked
+.EM after
+these definitions are changed.
+(Notice that, since the specification of
+.CW PDFHREF.VIEW.LEADING
+is shared by both outline reference views and marked reference views,
+if it is changed, then the views for
+.EM both
+reference types are changed accordingly).
+.LP
+It may again be noted, that the
+.CW PDFPAGE.Y
+register is used in the definition of
+.CW PDFHREF.VIEW ,
+just as it is in the definition of
+.CW PDFBOOKMARK.VIEW ;
+all comments in
+.pdfhref F SECREF L -D outline-view
+.pdfhref F
+relating to its use, and indeed to page position computations in general,
+apply equally to marked reference views and to outline reference views.
+.
+.NH 3
+.XN -N link-named -- Linking to a Marked Reference Destination
+.LP
+Any named destination, such as those marked by the
+.CW pdfhref
+macro, using it's
+.CWB M \& \& \(rq \(lq
+operator, may be referred to from any point in
+.EM any
+PDF document, using an
+.EM "active link" ;
+such active links are created by again using the
+.CW pdfhref
+macro, but in this case, with the
+.CWB L \& \& \(rq \(lq
+operator.
+This operator provides support for two distinct cases,
+depending on whether the reference destination is defined in
+the same document as the link,
+.XR link-intern ), (
+or is defined as a named destination in a different PDF document,
+.XR link-extern ). (
+.
+.NH 4
+.XN -N link-intern -- References within a Single PDF Document
+.LP
+The general syntactic form for invoking the
+.CW pdfhref
+macro,
+when creating a link to a named destination within the same PDF document is
+.QP
+.fam C
+.B .pdfhref
+.B L
+.B -D \& [
+.BI dest-name >] <
+.B -P \& [
+.BI prefix-text >] <
+.B -A \& [
+.BI affixed-text >] <
+\e
+.br
+\0\0\0
+.B -X ] [
+.B -- ] [
+.I "descriptive text ...\&" ] [
+.LP
+where
+.CWI dest-name > <
+specifies the name of the link destination,
+as specified using the
+.CW pdfhref
+.CWB M \& \& \(rq \(lq
+operation; (it may be defined either earlier in the document,
+to create a backward reference, or later, to create a forward reference).
+.\"
+.\" Here's a example of how to add an iconic annotation.
+.\"
+.\".pdfnote -T "Internal Cross References" \
+.\" This description is rather terse, and could benefit from \
+.\" the inclusion of an example.
+.LP
+If any
+.CWI descriptive \& \& \~\c
+.CWI text
+arguments are specified, then they will be inserted into the
+.CW groff
+output stream, to define the text appearing in the \(lqhot\(hyspot\(rq
+region of the link;
+this will be printed in the link colour specified by the string,
+.CW PDFHREF.TEXT.COLOUR ,
+which is described in
+.XR-NO-PREFIX set-colour .
+If the
+.CWB -X
+option is also specified, then the
+.CWI descriptive \& \& \~\c
+.CWI text
+will be augmented, by prefacing it with page and section number indicators,
+in accordance with the reference formatting rules which are in effect,
+.XR set-format ); (
+such indicators will be included within the active link region,
+and will also be printed in the link colour.
+.LP
+Note that
+.EM either
+the
+.CWB -D \& \& \~\c
+.CWBI dest\(hyname > <
+option,
+.EM or
+the
+.CWI descriptive \& \& \~\c
+.CWI text
+arguments,
+.EM "but not both" ,
+may be omitted.
+If the
+.CWB -D \& \& \~\c
+.CWBI dest\(hyname > <
+option is omitted, then the first word of
+.CWI descriptive \& \& \~\c
+.CWI text \& \& ,
+i.e.\~all text up to but not including the first space,
+will be interpreted as the
+.CWBI dest\(hyname > <
+for the link; this text will also appear in the running text of the document,
+within the active region of the link.
+Alternatively, if the
+.CWB -D \& \& \~\c
+.CWBI dest\(hyname > <
+option
+.EM is
+specified, and
+.CWI descriptive \& \& \~\c
+.CWI text
+is not,
+then the running text which defines the reference,
+and its active region,
+will be derived from the reference description which is specified
+when the named destination is marked,
+.XR mark-dest ), (
+and will be formatted according to the reference formatting rules
+which are in effect, when the reference is placed,
+.XR set-format ); (
+in this case, it is not necessary to specify the
+.CWB -X
+option to activate automatic formatting of the reference \(em it is implied,
+by the omission of all
+.CWI descriptive \& \& \~\c
+.CWI text
+arguments.
+.LP
+The
+.CWB -P \& \& \~\c
+.CWBI prefix\(hytext > <
+and
+.CWB -A \& \& \~\c
+.CWBI affixed\(hytext > <
+options may be used to specify additional text
+which will be placed before and after the linked text respectively,
+with no intervening space.
+Such prefixed and affixed text will be printed in the normal text colour,
+and will not be included within the active region of the link.
+This feature is mostly useful for creating parenthetical references,
+or for placing punctuation adjacent to,
+but not included within,
+the text which defines the active region of the link.
+.LP
+The operation of the
+.CW pdfhref
+macro, when used with its
+.CWB L \& \& \(rq \(lq
+operator to place a link to a named PDF destination,
+may best be illustrated by an example.
+However, since the appearance of the link will be influenced by
+factors established when the named destination is marked,
+.XR mark-dest ), (
+and also by the formatting rules in effect when the link is placed,
+the presentation of a suitable example will be deferred,
+until the formatting mechanism has been explained,
+.XR set-format ). (
+.
+.NH 4
+.XN -N link-extern -- References to Destinations in Other PDF Documents
+.LP
+The
+.CW pdfhref
+macro's
+.CWB L \& \& \(rq \(lq
+operator is not restricted to creating reference links
+within a single PDF document.
+When the link destination is defined in a different document,
+then the syntactic form for invoking
+.CW pdfhref
+is modified, by the addition of options to specify the
+name and location of the PDF file in which the destination is defined.
+Thus, the extended
+.CW pdfhref
+syntactic form becomes
+.QP
+.fam C
+.B .pdfhref
+.B L
+.B -F
+.BI file > <
+.B -D \& [
+.BI dest-name >] <
+\e
+.br
+\0\0\0
+.B -DF \& [
+.BI dos-file >] <
+.B -MF \& [
+.BI mac-file >] <
+.B -UF \& [
+.BI unix-file >] <
+\e
+.br
+\0\0\0
+.B -WF \& [
+.BI win-file >] <
+.B -P \& [
+.BI prefix-text >] <
+.B -A \& [
+.BI affixed-text >] <
+\e
+.br
+\0\0\0
+.B -X ] [
+.B -- ] [
+.I "descriptive text ...\&" ] [
+.LP
+where the
+.CWB -F \& \& \~\c
+.CWBI file > <
+option serves
+.EM two
+purposes: it both indicates to the
+.CW pdfhref
+macro that the specified reference destination
+is defined in an external PDF file,
+and it also specifies the normal path name,
+which is to be used to locate this file,
+when a user selects the reference.
+.LP
+In addition to the
+.CWB -F \& \& \~\c
+.CWBI file > <
+option, which
+.EM must
+be specified when referring to a destination in an external PDF file,
+the
+.CWB -DF \& \& \~\c
+.CWBI dos\(hyfile > < ,
+.CWB -MF \& \& \~\c
+.CWBI mac\(hyfile > < ,
+.CWB -UF \& \& \~\c
+.CWBI unix\(hyfile > <
+and
+.CWB -WF \& \& \~\c
+.CWBI win\(hyfile > <
+options may be used to specify the location of the file
+containing the reference destination,
+in a variety of operating system dependent formats.
+These options assign their arguments to the
+.CW /DosFile ,
+.CW /MacFile ,
+.CW /UnixFile
+and
+.CW /WinFile
+keys of the generated
+.CW pdfmark
+respectively; thus when any of these options are specified,
+.EM "in addition to"
+the
+.CWB -F \& \& \~\c
+.CWBI file > <
+option, and the document is read on the appropriate operating systems,
+then the path names specified by
+.CWBI dos\(hyfile > < ,
+.CWBI mac\(hyfile > < ,
+.CWBI unix\(hyfile > <
+and
+.CWBI win\(hyfile > <
+will be searched,
+.EM instead
+of the path name specified by
+.CWBI file > < ,
+for each of the
+.CW MS\(hyDOS \*(rg,
+.CW Apple \*(rg
+.CW Macintosh \*(rg,
+.CW Unix \(tm
+and
+.CW MS\(hyWindows \*(rg
+operating systems, respectively; see the
+.pdfmark-manual ,
+for further details.
+.LP
+Other than the use of these additional options,
+which specify that the reference destination is in an external PDF file,
+the behaviour of the
+.CW pdfhref
+.CWB L \& \& \(rq \(lq
+operator, with the
+.CWB -F \& \& \~\c
+.CWBI file > <
+option, remains identical to its behaviour
+.EM without
+this option,
+.XR link-intern ), (
+with respect to the interpretation of other options,
+the handling of the
+.CWI descriptive \& \& \~\c
+.CWI text
+arguments, and the formatting of the displayed reference.
+.LP
+Once again, since the appearance of the reference is determined by
+factors specified in the document reference map,
+and also by the formatting rules in effect when the reference is placed,
+the presentation of an example of the placing of
+a reference to an external destination will be deferred,
+until the formatting mechanism has been explained,
+.XR set-format ). (
+.
+.NH 3
+.XN -N add-weblink -- Linking to Internet Resources
+.LP
+In addition to supporting the creation of cross references
+to named destinations in PDF documents, the
+.CW pdfhref
+macro also has the capability to create active links to Internet resources,
+or indeed to
+.EM any
+resource which may be specified by a Uniform Resource Identifier,
+(which is usually abbreviated to the acronym \(lqURI\(rq,
+and sometimes also referred to as a Uniform Resource Locator,
+or \(lqURL\(rq).
+.LP
+Since the mechanism for creating a link to a URI differs somewhat
+from that for creating PDF references, the
+.CW pdfhref
+macro is invoked with the
+.CWB W \& \& \(rq \(lq
+(for \(lqweb\(hylink\(rq) operator, rather than the
+.CWB L \& \& \(rq \(lq
+operator; nevertheless, the invocation syntax is similar, having the form
+.QP
+.fam C
+.B .pdfhref
+.B W
+.B -D \& [
+.BI URI >] <
+.B -P \& [
+.BI prefix-text >] <
+.B -A \& [
+.BI affixed-text >] <
+\e
+.br
+\0\0\0
+.B -- ] [
+.I "descriptive text ...\&"
+.LP
+where the optional
+.CWB -D
+.CWBI URI > <
+modifier specifies the address for the target Internet resource,
+in any appropriate
+.EM "Uniform Resource Identifier"
+format, while the
+.CWI descriptive
+.CWI text
+argument specifies the text which is to appear in the \(lqhot\(hyspot\(rq
+region, and the
+.CWB -P
+.CWBI prefix\(hytext > <
+and
+.CWB -A
+.CWBI affixed\(hytext > <
+options have the same effect as in the case of local document links,
+.XR link-intern ). (
+.LP
+Notice that it is not mandatory to include the
+.CWB -D
+.CWBI URI > <
+in the link specification; if it
+.EM is
+specified, then it is not necessary for the URI to appear,
+in the running text of the document \(em the
+.CWI descriptive
+.CWI text
+argument exactly defines the text
+which will appear within the \(lqhot\(hyspot\(rq region,
+and this need not include the URI.
+However, if the
+.CWB -D \& \& \~\c
+.CWBI URI > <
+specification is omitted, then the
+.CWI descriptive
+.CWI text
+argument
+.EM must
+be an
+.EM exact
+representation of the URI, which
+.EM will ,
+therefore, appear as the entire content of the \(lqhot\(hyspot\(rq.
+For example, we could introduce a reference to
+.pdfhref W -D \*[GROFF-WEBSITE] -A , the groff web site
+in which the actual URI is concealed, by using mark up such as:\(en
+.DS I
+.CW
+For example, we could introduce a reference to
+\&.pdfhref W -D \*[GROFF-WEBSITE] -A , the groff web site
+in which the actual URI is concealed,
+.DE
+Alternatively,
+to refer the reader to the groff web site,
+making it obvious that the appropriate URI is
+.pdfhref W -A , \*[GROFF-WEBSITE]
+the requisite mark up might be:\(en
+.DS I
+.CW
+to refer the reader to the groff web site,
+making it obvious that the appropriate URI is
+\&.pdfhref W -A , \*[GROFF-WEBSITE]
+the requisite mark up might be:\e(en
+.DE
+.
+.NH 3
+.XN -N set-format -- Establishing a Format for References
+.LP
+There are two principal aspects to be addressed,
+when defining the format to be used when displaying references.
+Firstly, it is desirable to provide a visual cue,
+to indicate that the text describing the reference is imbued
+with special properties \(em it is dynamically linked to the reference
+destination \(em and secondly, the textual content should
+describe where the link leads, and ideally,
+it should also describe the content of the reference destination.
+.LP
+The visual cue,
+that a text region defines a dynamically linked reference,
+is most commonly provided by printing the text within the active
+region in a distinctive colour.
+This technique will be employed automatically by the
+.CW pdfhref
+macro \(em
+.XR set-colour
+\(em unless the user specifically chooses to adopt, and implement,
+some alternative strategy.
+.
+.NH 4
+.XN -N set-colour -- Using Colour to Demarcate Link Regions
+.LP
+Typically, when a PDF document contains
+.EM active
+references to other locations, either within the same document,
+or even in other documents, or on the World Wide Web,
+it is usually desirable to make the regions
+where these active links are placed stand out from the surrounding text.
+.
+.NH 4
+.XN -N user-format -- Specifying Reference Text Explicitly
+.
+.NH 4
+.XN -N auto-format -- Using Automatically Formatted Reference Text
+.
+.NH 4
+.XN -N custom-format -- Customizing Automatically Formatted Reference Text
+.LP
+It is incumbent on the user,
+if employing automatic formatting of the displayed reference,
+.XR set-format ), (
+to ensure that an appropriate reference definition
+is created for the reference destination,
+and is included in the reference map for the document
+in which the reference will appear;
+thus, it may be easiest to
+.EM always
+use manual formatting for external references.
+.
+.NH 3
+.XN Problematic Links
+.LP
+Irrespective of whether a
+.CW pdfhref
+reference is placed using the
+.CWB L \& \& \(rq \(lq
+operator, or the
+.CWB W \& \& \(rq \(lq
+operator, there may be occasions when the resulting link
+does function as expected.
+A number of scenarios, which are known to be troublesome,
+are described below.
+.
+.NH 4
+.XN -N page-trap -- Links with a Page Transition in the Active Region
+.LP
+When a link is placed near the bottom of a page,
+it is possible that its active region, or \(lqhot\(hyspot\(rq,
+may extend on to the next page.
+In this situation, a page trap macro is required
+to intercept the page transition, and to restart the mapping of
+the \(lqhot\(hyspot\(rq boundary on the new page.
+.LP
+The
+.CW pdfmark
+macro package includes a suitable page trap macro, to satisfy this requirement.
+However, to avoid pre\(hyempting any other requirement the user may have for
+a page transition trap, this is
+.EM not
+installed as an active page trap,
+unless explicitly requested by the user.
+.LP
+To enable proper handling of page transitions,
+which occur within the active regions of reference links,
+the user should:\(en
+.QS
+.nr ITEM 0 1
+.IP \n+[ITEM].
+Define a page transition macro, to provide whatever features may be required,
+when a page transition occurs \(em e.g.\& printing footnotes,
+adding page footers and headers, etc.
+This macro should end by setting the output position at the correct
+vertical page offset, where the printing of running text is to restart,
+following the page transition.
+.IP \n+[ITEM].
+Plant a trap to invoke this macro, at the appropriate vertical position
+marking the end of normal running text on each page.
+.KS
+.IP \n+[ITEM].
+Initialize the
+.CW pdfhref
+hook into this page transition trap, by invoking
+.RS
+.IP
+.fam C
+.B "pdfhref I -PT"
+.BI macro-name > <
+.LP
+where
+.CWBI macro-name > <
+is the name of the user supplied page trap macro,
+to ensure that
+.CW pdfhref
+will correctly restart mapping of active link regions,
+at the start of each new page.
+.KE
+.RE
+.QE
+.LP
+It may be observed that this initialization of the
+.CW pdfhref
+page transition hook is, typically, required only once
+.EM before
+document formatting begins.
+Users of document formatting macro packages may reasonably expect that
+this initialization should be performed by the macro package itself.
+Thus, writers of such macro packages which include
+.CW pdfmark
+bindings, should provide appropriate initialization,
+so relieving the end user of this responsibility.
+The following example, abstracted from the sample
+.CW ms
+binding package,
+.CW spdf.tmac ,
+illustrates how this may be accomplished:\(en
+.DS I
+.CW
+\&.\e" groff "ms" provides the "pg@bottom" macro, which has already
+\&.\e" been installed as a page transition trap. To ensure proper
+\&.\e" mapping of "pdfhref" links which overflow the bottom of any
+\&.\e" page, we need to install the "pdfhref" page transition hook,
+\&.\e" as an addendum to this macro.
+\&.
+\&.pdfhref I -PT pg@bottom
+.DE
+.
+.NH 2
+.XN -N add-note -- Annotating a PDF Document using Pop-Up Notes
+.
+.NH 2
+.XN -S -N pdfsync -- Synchronizing Output and \F[C]pdfmark\F[] Contexts
+.LP
+It has been noted previously, that the
+.CW pdfview
+macro,
+.XR docview ), (
+the
+.CW pdfinfo
+macro,
+.XR docinfo ), (
+and the
+.CW pdfhref
+macro, when used to create a document outline,
+.XR add-outline ), (
+do not immediately write their
+.CW pdfmark
+output to the \*[PostScript] data stream;
+instead, they cache their output, in a
+.CW groff
+diversion, in the case of the
+.CW pdfview
+and
+.CW pdfinfo
+macros, or in an ordered collection of strings and numeric registers,
+in the case of the document outline,
+until a more appropriate time for copying it out.
+In the case of
+.CW pdfview
+and
+.CW pdfinfo
+\(lqmeta\(hydata\(rq,
+this \(lqmore appropriate time\(rq is explicitly chosen by the user;
+in the case of document outline data,
+.EM some
+cached data may be implicitly written out as the document outline is compiled,
+but there will
+.EM always
+be some remaining data, which must be explicitly flushed out, before the
+.CW groff
+formatting process is allowed to complete.
+.LP
+To allow the user to choose when cached
+.CW pdfmark
+data is to be flushed to the output stream, the
+.CW pdfmark
+macro package provides the
+.CW pdfsync
+macro, (to synchronize the cache and output states).
+In its simplest form, it is invoked without arguments, i.e.
+.QP
+.fam C
+.B .pdfsync
+.LP
+This form of invocation ensures that
+.EM both
+the \(lqmeta\(hydata cache\(rq, containing
+.CW pdfview
+and
+.CW pdfinfo
+data,
+.EM and
+the \(lqoutline cache\(rq,
+containing any previously uncommitted document outline data,
+are flushed; ideally, this should be included in a
+.CW groff
+\(lqend macro\(rq, to ensure that
+.EM both
+caches are flushed, before
+.CW groff
+terminates.
+.LP
+Occasionally,
+it may be desirable to flush either the \(lqmeta\(hydata cache\(rq,
+without affecting the \(lqoutline cache\(rq, or vice\(hyversa,
+at a user specified time, prior to reaching the end of the document.
+This may be accomplished, by invoking the
+.CW pdfsync
+macro with an argument, i.e.
+.QP
+.fam C
+.B ".pdfsync M"
+.LP
+to flush only the \(lqmeta\(hydata cache\(rq, or
+.QP
+.fam C
+.B ".pdfsync O"
+.LP
+to flush only the \(lqoutline cache\(rq.
+.LP
+The \(lqmeta\(hydata cache\(rq can normally be safely flushed
+in this manner, at any time
+.EM after
+output of the first page has started;
+(it may cause formatting problems,
+most notably the appearance of unwanted white space, if flushed earlier,
+or indeed, if flushed immediately after a page transition,
+but before the output of the content on the new page has commenced).
+Caution is required, however, when explicitly flushing the
+\(lqoutline cache\(rq, since if the outline is to be
+subsequently extended, then the first outline entry after flushing
+.EM must
+be specified at level 1.
+Nevertheless, such explicit flushing may occasionally be necessary;
+for example, the
+.CW TC
+macro in the
+.CW spdf.tmac
+package,
+.XR using-spdf ), (
+invokes
+.CW ".pdfsync\ O" \(rq \(lq
+to ensure that the outline for the \(lqbody\(rq section of the document
+is terminated,
+.EM before
+it commences the formatting of the table of contents section.
+.bp
+.
+.NH 1
+.XN -N pdf-layout -- PDF Document Layout
+.LP
+The
+.CW pdfmark
+macros described in the preceding section,
+.XR pdf-features ), (
+provide no inherent document formatting capability of their own.
+However,
+they may be used in conjunction with any other
+.CW groff
+macro package of the user's choice,
+to add such capability.
+.LP
+In preparing this document, the standard
+.CW ms
+macro package, supplied as a component of the GNU Troff distribution,
+has been employed.
+To facilitate the use of the
+.CW pdfmark
+macros with the
+.CW ms
+macros,
+a binding macro package,
+.CW spdf.tmac ,
+has been created.
+The use of this binding macro package is described in the following section,
+.XR using-spdf ); (
+it may also serve as an example to users of other standard
+.CW groff
+macro packages,
+as to how the
+.CW pdfmark
+macros may be employed with their chosen primary macro package.
+.
+.NH 2
+.XN -S -N using-spdf -- Using \F[C]pdfmark\F[] Macros with the \F[C]ms\F[] Macro Package
+.LP
+The use of the binding macro package,
+.CW spdf.tmac ,
+allows for the use of the
+.CW pdfmark
+macros in conjunction with the
+.CW ms
+macros,
+simply by issuing a
+.CW groff
+command of the form\**
+.FS
+Once again,
+.pdfhref L -D pdf-features-fn -- as noted in footnote\*{\n[pdf-features-fn]\*}
+to
+.XR-NO-PREFIX pdf-features ,
+do not specify any
+.CW -T \^\c
+.CWI dev
+option,
+other than
+.CW -T \^\c
+.CW ps ,
+or
+.CW -T \^\c
+.CW pdf ;
+specify
+.CW -T \^\c
+.CW pdf ,
+if you wish to avoid the conversion of \*[PostScript] output to PDF,
+which will be required if you specify
+.CW -T \^\c
+.CW ps ,
+or if you omit the
+.CW -T \^\c
+.CWI dev
+option entirely.
+.FE
+.QP
+.fam C
+groff [-Tps\h'0.2p'|\h'0.2p'-Tpdf] [-m\F[]\|\|\FC\c
+.B spdf
+.I options \F[]\|\|\FC\c [-
+.I file \F[]\|\|\FC\c "...] "
+\&...
+.LP
+When using the
+.CW spdf.tmac
+package, the
+.CW groff
+input files may be marked up using any of the standard
+.CW ms
+macros to specify document formatting,
+while PDF features may be added,
+using any of the
+.CW pdfmark
+macros described previously,
+.XR pdf-features ). (
+Additionally,
+.CW spdf.tmac
+defines a number of convenient extensions to the
+.CW ms
+macro set, to better accomodate the use of PDF features within the
+.CW ms
+formatting framework,
+and to address a number of
+.CW ms
+document layout issues,
+which require special handling when producing PDF documents.
+These additional macros,
+and the issues they are intended to address,
+are described below.
+.
+.NH 3
+.XN -S -- \F[C]ms\F[] Section Headings in PDF Documents
+.LP
+Traditionally,
+.CW ms
+provides the
+.CW NH
+and
+.CW SH
+macros, to specify section headings.
+However,
+there is no standard mechanism for generating a
+table of contents entry based on the text of the section heading;
+neither is there any recognized standard method for establishing a
+cross reference link to the section.
+.LP
+To address this
+.CW ms
+limitation,
+.CW spdf.tmac
+defines the
+.CW XN
+macro,
+.XR xn-macro ), (
+to be used in conjunction with the
+.CW NH
+macro.
+.
+.NH 4
+.XN -S -N xn-macro -- The \F[C]XN\F[] Macro
+.bp
+.
+.NH 1
+.XN The PDF Publishing Process
+.
+.NH 2
+.XN -N do-xref -- Resolving Cross References
+.
+.NH 3
+.XN -N create-map -- Creating a Document Reference Map
+.
+.NH 3
+.XN -N import-map -- Deploying a Document Reference Map
+.TC
+.\" Local Variables:
+.\" mode: nroff
+.\" End:
+.\" vim: filetype=groff:
diff --git a/contrib/pdfmark/pdfmark.tmac b/contrib/pdfmark/pdfmark.tmac
new file mode 100644
index 0000000..5f664f2
--- /dev/null
+++ b/contrib/pdfmark/pdfmark.tmac
@@ -0,0 +1,1953 @@
+.ig
+
+pdfmark.tmac
+
+Copyright (C) 2004-2020 Free Software Foundation, Inc.
+ Written by Keith Marshall (keith.d.marshall@ntlworld.com)
+
+This file is part of groff.
+
+groff is free software; 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.
+
+groff is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+Author's Note
+=============
+
+While I have written this macro package from scratch, much of my
+inspiration has come from discussion on the groff mailing list
+(mailto:groff@gnu.org). I am particularly indebted to:
+
+ Kees Zeelenberg, for an earlier macro package he posted,
+ a study of which helped me to get started.
+
+ Carlos J. G. Duarte and Werner Lemberg, whose discussion
+ on computation of the bounding boxes for link "hot-spots"
+ forms the basis of such computations in this package.
+..
+.if !\n(.g .ab These pdfmark macros require groff.
+.\"
+.\" Check if we have already been loaded -- do not reload
+.if d pdfmark .nx
+.\"
+.\" ======================================================================
+.\" Module PDFMARK: Insert Arbitrary PDFMARK Code in the Postscript Stream
+.\" ======================================================================
+.\"
+.\" PDFMARK output may be disabled, by zeroing the PDFOPMODE register,
+.\" ( which mimics a more generic OPMODE, if it is defined ).
+.\"
+.if rOPMODE .aln PDFOPMODE OPMODE
+.\"
+.\" but if OPMODE wasn't defined,
+.\" then make the default PDFMARK mode ENABLED.
+.\"
+.if !rPDFOPMODE .nr PDFOPMODE 1
+.\"
+.\" PDFMARK output must be constrained to a maximum line length limit,
+.\" for strict compliance with the Postscript DSC. This limit is defined
+.\" in register "PDFMARK.FOLDWIDTH.MAX". This is user definable, up to a
+.\" ceiling value of 255, which is also its default value; this limit
+.\" is enforced for each PDFMARK, by macro "pdf*pdfmark.limit".
+.\"
+.de pdf*pdfmark.limit
+.\" ----------------------------------------------------------------
+.\" Usage:
+.\" .pdf*pdfmark.limit REGISTER-NAME DEFAULT-MAXIMUM-VALUE
+.\" ----------------------------------------------------------------
+.\"
+.\" If a register named REGISTER-NAME has not been defined, then
+.\" define it now, with default value = DEFAULT-MAXIMUM-VALUE.
+.\"
+.if !r\\$1 .nr \\$1 \\$2
+.\"
+.\" But when it has already been defined, ensure that its value does
+.\" not exceed DEFAULT-MAXIMUM-VALUE; if value does exceed this ceiling,
+.\" then redefine it, to enforce the limit.
+.\"
+.if (\\n[\\$1] > \\$2) .nr \\$1 \\$2
+..
+.\" The "pdfmark" macro is responsible for emitting the appropriate
+.\" Postscript code.
+.\"
+.de pdfmark
+.\" ----------------------------------------------------------------
+.\" Usage:
+.\" .pdfmark text of pdfmark instruction
+.\" Macro supplies the required opening "[" and closing "pdfmark"
+.\" operator; DO NOT include them in the instruction text!
+.\" ----------------------------------------------------------------
+.\"
+.if \\n[PDFOPMODE] \{\
+.\"
+.\" Strict DSC compliance forbids emission of ps:exec lines which
+.\" exceed 255 characters in length. We will allow the user to specify
+.\" an alternative lesser limit ...
+.\"
+. pdf*pdfmark.limit PDFMARK.FOLDWIDTH.MAX 255
+.\"
+.\" ... and we will also support a second lesser limit, which will be
+.\" applied to literal text parenthetically embedded within the PDFMARK.
+.\"
+. pdf*pdfmark.limit PDFMARK.FOLDWIDTH \\n[PDFMARK.FOLDWIDTH.MAX]
+.\"
+.\" We will push out the entire PDFMARK in one chunk, provided it fits
+.\" within this limit.
+.\"
+. length pdf:length "[\\$* pdfmark\"
+. ie !(\\n[pdf:length] > \\n[PDFMARK.FOLDWIDTH]) \{\
+. \"
+. \" This PDFMARK is suitable for single chunk output ...
+. \"
+. nop \!x X ps:exec [\\$* pdfmark
+. \}
+. el \{\
+. \" ... but, when the limit would be violated, then we must
+. \" recompose the specified PDFMARK, spreading it over as many
+. \" continuation lines as are necessary.
+. \"
+. als pdf*compose pdf*compose.first
+. while \\n(.$ \{\
+. pdf*compose \\$1
+. shift
+. \}
+. \"
+. \" Complete the PDFMARK recomposition, by appending a
+. \" "pdfmark" operator, and push it out to the intermediate
+. \" output stream, (excluding its final line break).
+. \"
+. pdf*compose pdfmark
+. pdf*pdfmark.dispatch
+. \"
+. \" And clean up when done.
+. \"
+. rm pdf*compose pdf*pdfmark.post
+. rm pdf:compose.test pdf:composed.literal
+. \}
+. rr pdf:length
+. \}
+..
+.\" When a PDFMARK exceeds the specified output record length limit,
+.\" then we decompose it, subsequently using the dynamically overloaded
+.\" macro, "pdf*compose", to reassemble it into as many continuation
+.\" records as it may require.
+.\"
+.\" Each call to "pdf*compose" uses macro "pdf*length.increment" to
+.\" keep track of the current output record length, so ensuring that
+.\" the active maximum length limit is not violated.
+.\"
+.de pdf*length.increment
+.\" ----------------------------------------------------------------
+.\" Usage:
+.\" .pdf*length.increment NEXT-ADDITION
+.\" ----------------------------------------------------------------
+.\"
+.ie d pdf:composed.line \
+. length pdf:length "\\*[pdf:composed.line] \\$*\"
+.el .length pdf:length "\\$*\"
+..
+.\" The first call to "pdf*compose" for each PDFMARK is directed
+.\" to "pdf*compose.first"; this initialises the local strings
+.\" and macros used to compose the eventual PDFMARK output.
+.\"
+.de pdf*compose.first
+.\" ----------------------------------------------------------------
+.\" Usage:
+.\" .als pdf*compose pdf*compose.first
+.\" . pdf*compose TOKEN
+.\" ----------------------------------------------------------------
+.\"
+.\" Ensure that the output record accumulator will be initialised
+.\" on posting of the first composed PDFMARK record.
+.\"
+.als pdf*pdfmark.post pdf*pdfmark.post.first
+.\"
+.\" The first token passed to "pdf*compose" should not be a
+.\" literal, but be prepared to handle one, just in case.
+.\"
+.ds pdf:compose.test \\$1
+.substring pdf:compose.test 0 0
+.ie '('\\*[pdf:compose.test]' \{\
+.\"
+.\" We found a literal, even though we didn't expect it;
+.\" if it's a single element literal, we can just handle it
+.\" as if it is a regular token anyway.
+.\"
+. ds pdf:compose.test "\\$\\n(.$\"
+. substring pdf:compose.test -1
+. if !')'\\*[pdf:compose.test]' \{\
+. \"
+. \" But when it is the first of a literal sequence,
+. \" then we need to set up "pdf*compose" to handle it.
+. \"
+. ds pdf:composed.literal "[\\$*\"
+. als pdf*compose pdf*compose.literal
+. \}
+. \}
+.el .ds pdf:compose.test )
+.if ')'\\*[pdf:compose.test]' \{\
+.\"
+.\" In the normal case, we start each new PDFMARK with a
+.\" regular token; save it as the first in the composed output
+.\" line sequence, and set up "pdf*compose" to collect
+.\" the rest of the sequence.
+.\"
+. ds pdf:composed.line "[\\$*\"
+. als pdf*compose pdf*compose.next
+. \}
+..
+.\" Subsequent calls to "pdf*compose", while collecting
+.\" regular tokens, are then directed to "pdf*compose.next".
+.\"
+.de pdf*compose.next
+.\" ----------------------------------------------------------------
+.\" Usage:
+.\" .als pdf*compose pdf*compose.next
+.\" . pdf*compose TOKEN
+.\" ----------------------------------------------------------------
+.\"
+.\" This first checks to ensure that the supplied token really is
+.\" a regular token, and not the first element in a literal.
+.\"
+.ds pdf:compose.test \\$1
+.substring pdf:compose.test 0 0
+.ie '('\\*[pdf:compose.test]' \{\
+.\"
+.\" The supplied token represents the first element of a literal,
+.\" but it may be a single element literal, which we simply handle
+.\" as a regular token anyway.
+.\"
+. ds pdf:compose.test "\\$\\n(.$\"
+. substring pdf:compose.test -1
+. if !')'\\*[pdf:compose.test]' \{\
+. \"
+. \" The supplied token is the first of a sequence of elements
+. \" which collectively define a literal, so start collecting a
+. \" composite literal token, and change the "pdf*compose"
+. \" state, to collect and append the remaining elements.
+. \"
+. ds pdf:composed.literal "\\$*\"
+. als pdf*compose pdf*compose.literal
+. \}
+. \}
+.el .ds pdf:compose.test )
+.if ')'\\*[pdf:compose.test]' \{\
+.\"
+.\" The supplied token IS a regular token; add it, but ensure that
+.\" the active maximum record length limit is honoured.
+.\"
+. pdf*length.increment "\\$*\"
+. ie (\\n[pdf:length] > \\n[PDFMARK.FOLDWIDTH.MAX]) \{\
+. \"
+. \" Adding this token would cause the current PDFMARK record, in
+. \" groff's intermediate output file, to overflow the active record
+. \" length limit, so post the current record and start another.
+. \"
+. pdf*pdfmark.dispatch
+. ds pdf:composed.line "\\$*\"
+. \}
+. el \{\
+. \"
+. \" This token will fit in the current PDFMARK record, without
+. \" violating the active length limit, so simply add it.
+. \"
+. ie d pdf:composed.line .as pdf:composed.line " \\$*\"
+. el .ds pdf:composed.line "\\$*\"
+. \}
+. \}
+..
+.\" While assembling a multiple token literal sequence into a single
+.\" literal token, successive calls to "pdf*compose" are directed
+.\" to "pdf*compose.literal".
+.\"
+.de pdf*compose.literal
+.\" ----------------------------------------------------------------
+.\" Usage:
+.\" .als pdf*compose pdf*compose.literal
+.\" . pdf*compose TOKEN
+.\" ----------------------------------------------------------------
+.\"
+.\" First, check to ensure that the current token can be appended to
+.\" the accumulated literal, without extending it beyond the maximum
+.\" allowed literal token length.
+.\"
+.length pdf:length "\\*[pdf:composed.literal] \\$*\"
+.ie (\\n[pdf:length] > (\\n[PDFMARK.FOLDWIDTH] - 2)) \{\
+.\"
+.\" If it has grown too long, then it must be folded across two
+.\" physical PDFMARK output records, so check if we can accommodate
+.\" the portion collected so far within the current output record.
+.\"
+. pdf*length.increment "\\*[pdf:composed.literal]\"
+. if (\\n[pdf:length] > (\\n[PDFMARK.FOLDWIDTH.MAX] - 2)) \{\
+. \"
+. \" The current output record CAN'T accommodate the currently
+. \" composed portion of the literal, so flush out the current
+. \" record, to make way for the accumulated literal, and mark
+. \" the dispatch mode as "wrapped", for the fragments of the
+. \" folded literal string, which are to follow.
+. \"
+. pdf*pdfmark.dispatch
+. ds pdf*pdfmark.dispatch.wrapped
+. \}
+. ie d pdf:composed.line \{\
+. \"
+. \" If we DIDN'T need to flush the current output record,
+. \" then we can simply append the accumulated literal to it...
+. \"
+. as pdf:composed.line " \\*[pdf:composed.literal]\"
+. \}
+. el \{\
+. \"
+. \" otherwise, when the current record has been flushed, or is
+. \" empty, then we promote the accumulated literal, to make it
+. \" the next output record...
+. \"
+. rn pdf:composed.literal pdf:composed.line
+. \}
+.\"
+.\" Now, to complete the fold, flush out any accumulated partial
+.\" output record, and continue accumulating the literal, starting
+.\" with the current token.
+.\"
+. pdf*pdfmark.dispatch
+. ds pdf:composed.literal "\\$*\"
+. \}
+.el \{\
+.\"
+.\" Alternatively, when we HAVEN'T identified a need to fold the
+.\" current output record, then we simply append the current token
+.\" to the accumulated literal token buffer string.
+.\"
+. as pdf:composed.literal " \\$*\"
+. \}
+.\"
+.\" Having ensured that we have sufficient space, in which to
+.\" append the current token to the currently accumulated literal,
+.\" we check its rightmost character, to see if is the closing
+.\" parenthesis, which completes the literal.
+.\"
+.ds pdf:compose.test \\$\\n(.$
+.substring pdf:compose.test -1
+.if ')'\\*[pdf:compose.test]' \{\
+.\"
+.\" The literal has been completely collected, so we may now append
+.\" it to the current output record, as a single literal token, but
+.\" subject to the constraint that it must not extend the output
+.\" record beyond the maximum permitted length.
+.\"
+. pdf*length.increment "\\*[pdf:composed.literal]\"
+. ie (\\n[pdf:length] > \\n[PDFMARK.FOLDWIDTH.MAX]) \{\
+. \"
+. \" So, when the literal cannot be accommodated within the maximum
+. \" length constraint, then we flush the current record, and start
+. \" a new one, with the literal token as its first entry.
+. \"
+. pdf*pdfmark.dispatch
+. rn pdf:composed.literal pdf:composed.line
+. \}
+. el \{\
+. \"
+. \" When the literal CAN be accommodated within the maximum length
+. \" constraint, then ...
+. \"
+. ie d pdf:composed.line \{\
+. \"
+. \" When an output record has already been instantiated, we
+. \" append the literal token to it, and discard the accumulator
+. \" string, which is no longer required.
+. \"
+. as pdf:composed.line " \\*[pdf:composed.literal]\"
+. rm pdf:composed.literal
+. \}
+. el \{\
+. \"
+. \" But when no output record yet exists, then we simply
+. \" reassign the accumulated literal token, to instantiate a
+. \" new output record.
+. \"
+. rn pdf:composed.literal pdf:composed.line
+. \}
+. \}
+.\"
+.\" Finally, since we have completed the accumulation of the literal, we
+.\" revert to the "unwrapped" mode of operation for "pdf*pdfmark.dispatch",
+.\" and restore the normal "pdf*compose" action, for collection of the next
+.\" token (if any).
+.\"
+. rm pdf*pdfmark.dispatch.wrapped
+. als pdf*compose pdf*compose.next
+. \}
+..
+.\" While composing a multiple record PDFMARK, each composed record
+.\" must be added to the collection, whenever the partially composed
+.\" output record has been filled; this is handled when necessary,
+.\" by calling the "pdf*pdfmark.dispatch" macro.
+.\"
+.de pdf*pdfmark.dispatch
+.\" ----------------------------------------------------------------
+.\" Usage:
+.\" .pdf*pdfmark.dispatch
+.\" ----------------------------------------------------------------
+.\"
+.if d pdf:composed.line \{\
+.\"
+.\" This is simply a wrapper around the overloaded "pdf*pdfmark.post"
+.\" macro, ensuring that an output record has actually been collected
+.\" before attempting to post it; it then cleans up after posting, to
+.\" ensure that each collected record is posted only once.
+.\"
+. if d pdf*pdfmark.dispatch.wrapped \{\
+. \"
+. \" When dispatching an excessively long literal string, which
+. \" must be wrapped over multiple records, this mode is active
+. \" for all but the closing record; we must escape the newline
+. \" at the end of each such unclosed literal record.
+. \"
+. as pdf:composed.line " \\\\\\\\\"
+. \}
+. pdf*pdfmark.post
+. rm pdf:composed.line
+. \}
+..
+.\" For each PDFMARK, the first call of "pdf*pdfmark.post" is directed
+.\" to the "pdf*pdfmark.post.first" macro; this initialises the state
+.\" of the "pdf:composed" macro, for assembly of a new PDFMARK.
+.\"
+.de pdf*pdfmark.post.first
+. nop \!x X ps:exec \\*[pdf:composed.line]
+.\"
+.\" Subsequent calls to "pdf*pdfmark.post" are redirected to the
+.\" alternative "pdf*pdfmark.post.next" macro, which simply appends
+.\" additional PDFMARK records to the "pdf:composed" macro.
+.\"
+.als pdf*pdfmark.post pdf*pdfmark.post.next
+..
+.de pdf*pdfmark.post.next
+. nop \!+\\*[pdf:composed.line]
+..
+.\" "pdf*end" is a dummy macro. It is required to mark the end
+.\" of each individual fragment which is added to "pdf:composed";
+.\" other than this, it does nothing.
+.\"
+.de pdf*end
+..
+.\"
+.\" Some supporting macros defer actual pdfmark output until an
+.\" appropriate time for it to be written; the "pdfsync" macro
+.\" provides a mechanism for flushing such deferred output;
+.\" it should be called from an end macro, and at any other time
+.\" when it may be deemed necessary to flush pdfmark context.
+.\"
+.de pdfsync
+.\" ----------------------------------------------------------------
+.\" Usage:
+.\" .pdfsync buffer ...
+.\" Arguments indicate which "buffer(s)" to flush:
+.\" O -> bookmark (outline) cache
+.\" M -> document metadata diversion
+.\" If no argument, flush ALL buffers
+.\" ----------------------------------------------------------------
+.\"
+.ie \\n(.$ \{\
+. while \\n(.$ \{\
+. if '\\$1'O' .pdf:bm.sync 1
+. if '\\$1'M' \{\
+. if dpdf:metadata .pdf:metadata
+. rm pdf:metadata
+. \}
+. shift
+. \}
+. \}
+.el .pdfsync O M
+..
+.\"
+.\" some helper functions ...
+.\"
+.\" "pdf:warn" and "pdf:error" write diagnostic messages to stderr
+.\"
+.de pdf:warn
+.\" ----------------------------------------------------------
+.\" Usage:
+.\" .pdf:warn text of message
+.\" ----------------------------------------------------------
+.\"
+.tm \\n(.F:\\n(.c: macro warning: \\$*
+..
+.de pdf:error
+.\" ----------------------------------------------------------
+.\" Usage:
+.\" .pdf:error text of message
+.\" ----------------------------------------------------------
+.\"
+.tm \\n(.F:\\n(.c: macro error: \\$*
+..
+.\" "pdf:pop", assisted by "pdf*pop", allows us to retrieve register,
+.\" or string values, from a string masquerading as a data queue,
+.\" or as a stack.
+.\"
+.de pdf:pop
+.\" ----------------------------------------------------------------
+.\" Usage:
+.\" .pdf:pop <type> <to-name> <from-name>
+.\" $1 = nr for numeric register, ds for string
+.\" $2 = name of register or string to be assigned
+.\" $3 = name of string, from which data is to be retrieved
+.\" ----------------------------------------------------------------
+.\"
+.pdf*pop \\$* \\*[\\$3]
+..
+.de pdf*pop
+.ds pdf:stack \\$3
+.\\$1 \\$2 \\$4
+.shift 4
+.ie \\n(.$ .ds \\*[pdf:stack] \\$*
+.el .rm \\*[pdf:stack]
+.rm pdf:stack
+..
+.\"
+.\"
+.\" ===========================================================
+.\" Module PDFINFO: Insert MetaData Entries into a PDF Document
+.\" ===========================================================
+.\"
+.\" N.B.
+.\" Output from the macros in this module is deferred, until
+.\" subsequent invocation of .pdfsync, or .pdfexit
+.\"
+.\" ."pdfinfo" provides a general purpose form of metadata entry ...
+.\" it allows arbitrary text to be associated with any specified
+.\" metadata field name.
+.\"
+.de pdfinfo
+.\" -------------------------------------------------------------------
+.\" Usage:
+.\" .pdfinfo /FieldName field content ...
+.\" Examples:
+.\" .pdfinfo /Title A PDF Document
+.\" .pdfinfo /Author Keith Marshall
+.\" -------------------------------------------------------------------
+.\"
+.ds pdf:meta.field \\$1
+.shift
+.da pdf:metadata
+\!.pdfmark \\*[pdf:meta.field] (\\$*) /DOCINFO
+.di
+.rm pdf:meta.field
+..
+.\"
+.\" Macro "pdfview" defines a special form of metadata entry ...
+.\" it uses the /DOCVIEW pdfmark, to specify the initial (default) view,
+.\" when the document is opened.
+.\"
+.de pdfview
+.\" -------------------------------------------------------------------
+.\" Usage:
+.\" .pdfview view parameters ...
+.\" Examples:
+.\" .pdfview /PageMode /UseOutlines
+.\" .pdfview /Page 2 /View [/FitH \n(.p u]
+.\" -------------------------------------------------------------------
+.\"
+.da pdf:metadata
+\!.pdfmark \\$* /DOCVIEW
+.di
+..
+.\"
+.\"
+.\" =====================================================================
+.\" Module PDFNOTE: Insert "Sticky Note" Style Comments in a PDF Document
+.\" =====================================================================
+.\"
+.\" "PDFNOTE.WIDTH" and "PDFNOTE.HEIGHT" set the preferred size for
+.\" display of the "sticky note" pane, when opened. Acrobat Reader
+.\" seems not to honour these -- perhaps GhostScript doesn't encode
+.\" them correctly! Anyway, let's set some suitable default values,
+.\" in case the user has a set up which does work as advertised.
+.\"
+.nr PDFNOTE.WIDTH 3.5i
+.nr PDFNOTE.HEIGHT 2.0i
+.\"
+.\" "pdf:bbox" defines the expression used to set the size and location
+.\" of the bounding rectangle for display of notes and link "hot-spots".
+.\" This is defined, such that a note is placed at troff's current text
+.\" position on the current page, with its displayed image size defined
+.\" by the "PDFNOTE.WIDTH" and "PDFNOTE.HEIGHT" registers, while the
+.\" bounds for a link "hot-spot" are matched to the text region which
+.\" defines the "hot-spot".
+.\"
+.ds pdf:bbox \\n[pdf:llx] u \\n[pdf:lly] u \\n[pdf:urx] u \\n[pdf:ury] u
+.\"
+.\" Getting line breaks into the text of a PDFNOTE is tricky -- we need
+.\" to get a "\n" into the Postscript stream, but three levels of "\" are
+.\" swallowed, when we invoke "pdfnote". The following definition of "PDFLB",
+.\" (for LineBreak), is rather ugly, but does allow us to use
+.\"
+.\" .pdfnote Some text.\*[PDFLB]Some more text, on a new line.
+.\"
+.ds PDFLB \\\\\\\\\\\\\\\\n
+.\"
+.de pdfnote
+.\" ----------------------------------------------------------------------
+.\" Usage:
+.\" .pdfnote [-T "Text for Title"] Text of note ...
+.\" ----------------------------------------------------------------------
+.\"
+.if \\n[PDFOPMODE] \{\
+.\"
+.\" First, compute the bounding rectangle,
+.\" for this PDFNOTE instance
+.\"
+. mk pdf:ury
+. nr pdf:llx \\n(.k+\\n(.o+\\n[.in]
+. nr pdf:lly \\n[pdf:ury]-\\n[PDFNOTE.HEIGHT]
+. nr pdf:urx \\n[pdf:llx]+\\n[PDFNOTE.WIDTH]
+. ds pdf:note.instance /Rect [\\*[pdf:bbox]]
+.\"
+.\" Parse any specified (recognisable) PDFNOTE options
+.\"
+. while dpdf:note\\$1 \{\
+. pdf:note\\$1 \\$@
+. shift \\n[pdf:note.argc]
+. \}
+.\"
+.\" Emit the note, and clean up
+.\"
+. pdfmark \\*[pdf:note.instance] /Contents (\\$*) /ANN
+. rm pdf:note.instance
+. rr pdf:note.argc
+. \}
+..
+.de pdf:note-T
+.nr pdf:note.argc 2
+.as pdf:note.instance " /Title (\\$2)
+..
+.\"
+.\"
+.\" =====================================================================
+.\" Module PDFBOOKMARK: Add an Outline Reference in the PDF Bookmark Pane
+.\" =====================================================================
+.\"
+.\" "PDFBOOKMARK.VIEW" controls how the document will be displayed,
+.\" when the user selects a bookmark. This default setting will fit
+.\" the page width to the viewing window, with the bookmarked entry
+.\" located at the top of the viewable area.
+.\"
+.ds PDFBOOKMARK.VIEW /FitH \\n[PDFPAGE.Y] u
+.\"
+.\" "PDFOUTLINE.FOLDLEVEL" controls how the document outline will be
+.\" displayed. It is a number, defining the maximum heading level
+.\" which will be visible, without outline expansion by the user, in
+.\" the initial view of the document outline. Assuming that no sane
+.\" document will ever extend to 10,000 levels of nested headings,
+.\" this initial default value causes outlines to be fully expanded.
+.\"
+.nr PDFOUTLINE.FOLDLEVEL 10000
+.\"
+.\" The actual job of creating an outline reference
+.\" is performed by the "pdfbookmark" macro.
+.\"
+.de pdfbookmark
+.\" ------------------------------------------------------------------
+.\" Usage:
+.\" .pdfbookmark [-T tag] level "Text of Outline Entry"
+.\"
+.\" $1 = nesting level for bookmark (1 is top level)
+.\" $2 = text for bookmark, (in PDF viewer bookmarks list)
+.\" $3 = suffix for PDF internal bookmark name (optional)
+.\" ------------------------------------------------------------------
+.\"
+.ie '\\n(.z'' \{\
+.\"
+.\" When we are at the top diversion level, i.e. actually emitting text
+.\" to the output device stream, then we compute the location of, and
+.\" plant this bookmark immediately.
+.\"
+. if \\n[PDFOPMODE] \{\
+. \"
+. \" Make the bookmark name "untagged" by default,
+. \" then parse any specified options, to set a "tag", if required
+. \"
+. ds pdf:href-T
+. while dpdf:href.opt\\$1 \{\
+. pdf:href.opt\\$1 \\$@
+. shift \\n[pdf:href.argc]
+. \}
+. rr pdf:href.argc
+. \"
+. \" If we found "--" to mark the end of the options, discard it
+. \"
+. if '\\$1'--' .shift
+. \"
+. \" Synchronise the bookmark cache
+. \" to the requested bookmark nesting level
+. \"
+. pdf:bm.sync \\$1
+. shift
+. \"
+. \" Increment the bookmark serialisation index
+. \" in order to generate a uniquely serialised bookmark name,
+. \" ( which we return in the string "PDFBOOKMARK.NAME" ),
+. \" and insert this bookmark into the cache
+. \"
+. pdf:href.sety
+. nr pdf:bm.nr +1
+. ds PDFBOOKMARK.NAME pdf:bm\\n[pdf:bm.nr]\\*[pdf:href-T]
+. ds pdf:bm\\n[pdf:bm.nr] /Dest /\\*[PDFBOOKMARK.NAME]
+. pdfmark \\*[pdf:bm\\n[pdf:bm.nr]] /View [\\*[PDFBOOKMARK.VIEW]] /DEST
+. as pdf:bm\\n[pdf:bm.nr] " /Title (\\$*)
+. pdf:href.options.clear
+. rr PDFPAGE.Y
+. \}
+. \}
+.el \{\
+.\"
+.\" But when we are collecting a diversion which will be written out later,
+.\" then we must defer bookmark placement, until we emit the diversion.
+.\" (don't rely on $0 == pdfbookmark here; it may be a volatile alias).
+.\"
+. nop \!.pdfbookmark \\$@
+. \}
+..
+.\"
+.\" Macro "pdf:bm.sync" is called for each bookmark created,
+.\" to establish a cache entry at the appropriate nesting level.
+.\" It will flush ALL previous cache content, when called to
+.\" add a new bookmark at level 1, or if simply called at
+.\" level 1, without adding any bookmark.
+.\"
+.de pdf:bm.sync
+.\" ------------------------------------------------------------------
+.\" Usage:
+.\" .pdf:bm.sync level
+.\" $1 = nesting level of current bookmark, or 1 to flush cache
+.\" ------------------------------------------------------------------
+.\"
+.\" First validate the bookmark nesting level
+.\" adjusting it if required
+.\"
+.if \\$1>\\n[pdf:bm.nl] .nr pdf:bm.nl +1
+.ie \\$1>\\n[pdf:bm.nl] \{\
+. pdf:warn adjusted level \\$1 bookmark; should be <= \\n[pdf:bm.nl]
+. \}
+.el .nr pdf:bm.nl \\$1
+.if \\n[pdf:bm.nl]<1 \{\
+. pdf:warn bad arg (\\$1) in \\$0 \\$1; \\$0 1 forced
+. nr pdf:bm.nl 1
+. \}
+.\"
+.\" If reverting from a higher to a lower nesting level,
+.\" cyclicly adjust cache counts for each pending higher level
+.\"
+.if \\n[pdf:bm.lc]>=\\n[pdf:bm.nl] \{\
+. nr pdf:bm.lc +1
+. if !rpdf:bm.c\\n[pdf:bm.lc].c .nr pdf:bm.c\\n[pdf:bm.lc].c 0
+. while \\n[pdf:bm.lc]>\\n[pdf:bm.nl] \{\
+. as pdf:bm.c\\n[pdf:bm.lc] " \\n[pdf:bm.c\\n[pdf:bm.lc].c]
+. rr pdf:bm.c\\n[pdf:bm.lc].c
+. nr pdf:bm.lc -1
+. \}
+. \}
+.\"
+.\" Update the cache level,
+.\" flushing when we are at level 1
+.\"
+.nr pdf:bm.lc \\n[pdf:bm.nl]
+.ie \\n[pdf:bm.nl]=1 \{\
+. while \\n[pdf:bm.ic]<\\n[pdf:bm.nr] .pdf:bm.emit 0
+. rr pdf:bm.rc
+. \}
+.el .nr pdf:bm.c\\n[pdf:bm.nl].c +1
+..
+.\" Macro "pdf:bm.emit" is called, when the cache is at level 1.
+.\" This flushes ALL pending bookmarks from the cache, i.e. the
+.\" preceding level 1 bookmark, and any nested dependents,
+.\" which it may have.
+.\"
+.de pdf:bm.emit
+.\" ------------------------------------------------------------------
+.\" Usage:
+.\" .pdf:bm.emit flag
+.\" $1 = reference counting flag, used to control recursion
+.\" ------------------------------------------------------------------
+.\"
+.\" First check for nested dependents,
+.\" and append the "dependent count" to the bookmark, as required.
+.\"
+.nr pdf:bm.ic +1
+.nr pdf:bm.lc +1
+.pdf:pop nr pdf:bm.rc pdf:bm.c\\n[pdf:bm.lc]
+.if \\n[pdf:bm.rc] \{\
+. ds pdf:bm.fold
+. if \\n[pdf:bm.lc]>\\n[PDFOUTLINE.FOLDLEVEL] .ds pdf:bm.fold -
+. as pdf:bm\\n[pdf:bm.ic] " /Count \\*[pdf:bm.fold]\\n[pdf:bm.rc]
+. rm pdf:bm.fold
+. \}
+.pdfmark \\*[pdf:bm\\n[pdf:bm.ic]] /OUT
+.rm pdf:bm\\n[pdf:bm.ic]
+.\"
+.\" For ALL dependents, if any,
+.\" recursively flush out any higher level dependents,
+.\" which they themselves may have
+.\"
+.while \\n[pdf:bm.rc] \{\
+. nr pdf:bm.rc -1
+. pdf:bm.emit \\n[pdf:bm.rc]
+. \}
+.\"
+.\" Finally,
+.\" unwind the recursive call stack, until we return to the top level.
+.\"
+.nr pdf:bm.rc \\$1
+.nr pdf:bm.lc -1
+..
+.nr pdf:bm.nr 0
+.nr pdf:bm.nl 1
+.nr pdf:bm.lc 0
+.nr pdf:bm.ic 0
+.\"
+.\"
+.\" =============================================================
+.\" Module PDFHREF: Create Hypertext References in a PDF Document
+.\" =============================================================
+.\"
+.\" "PDFHREF.VIEW" controls how the document will be displayed,
+.\" when the user follows a link to a named reference.
+.\"
+.ds PDFHREF.VIEW /FitH \\n[PDFPAGE.Y] u
+.\"
+.\" This default setting will fit the page width to the viewing
+.\" window, with the bookmarked entry located close to the top
+.\" of the viewable area. "PDFHREF.VIEW.LEADING" controls the
+.\" actual distance below the top of the viewing window, where
+.\" the reference will be positioned; 5 points is a reasonable
+.\" default offset.
+.\"
+.nr PDFHREF.VIEW.LEADING 5.0p
+.\"
+.\" Yuk!!!
+.\" PDF view co-ordinates are mapped from the bottom left corner,
+.\" of the page, whereas page printing co-ordinates are mapped
+.\" conventionally, from top left.
+.\"
+.\" Macro "pdf:href.sety" transforms the vertical position of the
+.\" last printed baseline, from the printing co-ordinate domain to
+.\" the PDF view domain.
+.\"
+.de pdf:href.sety
+.\" ----------------------------------------------------------------
+.\" Usage:
+.\" .pdf:href.sety
+.\" ----------------------------------------------------------------
+.\"
+.\" This computation yields the vertical view co-ordinate
+.\" in groff's basic units; don't forget to append grops' "u"
+.\" conversion operator, when writing the pdfmark!
+.\"
+.nr PDFPAGE.Y \\n(.p-\\n(nl+\\n[PDFHREF.VIEW.LEADING]
+..
+.\" When we create a link "hot-spot" ...
+.\" "PDFHREF.LEADING" sets the distance above the top of the glyph
+.\" bounding boxes, in each line of link text, over which the link
+.\" hot-spot will extend, while "PDFHREF.HEIGHT" sets the hot-spot
+.\" height, PER LINE of text occupied by the reference.
+.\"
+.\" Since most fonts specify some leading space within the bounding
+.\" boxes of their glyphs, a better appearance may be achieved when
+.\" NEGATIVE leading is specified for link hot-spots; indeed, when
+.\" the default 10pt Times font is used, -1.0 point seems to be a
+.\" reasonable default value for "PDFHREF.LEADING" -- it may be
+.\" changed, if desired.
+.\"
+.\" "PDFHREF.HEIGHT" is initially set as one vertical spacing unit;
+.\" note that it is defined as a string, so it will adapt to changes
+.\" in the vertical spacing. Changing it is NOT RECOMMENDED.
+.\"
+.nr PDFHREF.LEADING -1.0p
+.ds PDFHREF.HEIGHT 1.0v
+.\"
+.\" PDF readers generally place a rectangular border around link
+.\" "hot-spots". Within text, this looks rather ugly, so we set
+.\" "PDFHREF.BORDER" to suppress it -- the three zeroes represent
+.\" the border parameters in the "/Border [0 0 0]" PDFMARK string,
+.\" and may be changed to any valid form, as defined in Adobe's
+.\" PDFMARK Reference Manual.
+.\"
+.ds PDFHREF.BORDER 0 0 0
+.\"
+.\" "PDFHREF.COLOUR" (note British spelling) defines the colour to
+.\" be used for display of link "hot-spots". This will apply both
+.\" to borders, if used, and, by default to text; however, actual
+.\" text colour is set by "PDFHREF.TEXT.COLOUR", which may be reset
+.\" independently of "PDFHREF.COLOUR", to achieve contrasting text
+.\" and border colours.
+.\"
+.\" "PDFHREF.COLOUR" must be set to a sequence of three values,
+.\" each in the range 0.0 .. 1.0, representing the red, green, and
+.\" blue components of the colour specification in the RGB colour
+.\" domain, which is shared by "groff" and the PDF readers.
+.\"
+.ds PDFHREF.COLOUR 0.35 0.00 0.60
+.defcolor pdf:href.colour rgb \*[PDFHREF.COLOUR]
+.\"
+.\" "PDFHREF.TEXT.COLOUR", on the other hand, is simply defined
+.\" using any "groff" colour name -- this default maps it to the
+.\" same colour value as "PDFHREF.COLOUR".
+.\"
+.ds PDFHREF.TEXT.COLOUR pdf:href.colour
+.\"
+.\" Accommodate users who prefer the American spelling, COLOR, to
+.\" the British spelling, COLOUR.
+.\"
+.als PDFHREF.COLOR PDFHREF.COLOUR
+.als PDFHREF.TEXT.COLOR PDFHREF.TEXT.COLOUR
+.\"
+.\" All PDF "Hypertext" reference capabilities are accessed
+.\" through the "pdfhref" macro
+.\"
+.de pdfhref
+.\" -----------------------------------------------------------------
+.\" Usage:
+.\" .pdfhref <subcommand [options ...] [parameters ...]> ...
+.\" -----------------------------------------------------------------
+.\"
+.if \\n[PDFOPMODE] \{\
+.\"
+.\" Loop over all subcommands specified in the argument list
+.\"
+. while \\n(.$ \{\
+. \"
+. \" Initially, assume each subcommand will complete successfully
+. \"
+. nr pdf:href.ok 1
+. \"
+. \" Initialise -E and -X flags in the OFF state
+. \"
+. nr pdf:href-E 0
+. nr pdf:href-X 0
+. \"
+. \" Handle the case where subcommand is specified as "-class",
+. \" setting up appropriate macro aliases for subcommand handlers.
+. \"
+. if dpdf*href\\$1 .als pdf*href pdf*href\\$1
+. if dpdf*href\\$1.link .als pdf*href.link pdf*href\\$1.link
+. if dpdf*href\\$1.file .als pdf*href.file pdf*href\\$1.file
+. \"
+. \" Repeat macro alias setup
+. \" for the case where the subcommand is specified as "class",
+. \" (without a leading hyphen)
+. \"
+. if dpdf*href-\\$1 .als pdf*href pdf*href-\\$1
+. if dpdf*href-\\$1.link .als pdf*href.link pdf*href-\\$1.link
+. if dpdf*href-\\$1.file .als pdf*href.file pdf*href-\\$1.file
+. \"
+. \" Process one subcommand ...
+. \"
+. ie dpdf*href \{\
+. \"
+. \" Subcommand "class" is recognised ...
+. \" discard the "class" code from the argument list,
+. \" set the initial argument count to swallow all arguments,
+. \" and invoke the selected subcommand handler.
+. \"
+. shift
+. nr pdf:argc \\n(.$
+. pdf*href \\$@
+. \"
+. \" When done,
+. \" discard all arguments actually consumed by the handler,
+. \" before proceeding to the next subcommand (if any).
+. \"
+. shift \\n[pdf:argc]
+. \}
+. el \{\
+. \"
+. \" Subcommand "class" is not recognised ...
+. \" issue a warning, and discard the entire argument list,
+. \" so aborting this "pdfhref" invocation
+. \"
+. pdf:warn \\$0: undefined reference class '\\$1' ignored
+. shift \\n(.$
+. \}
+. \"
+. \" Clean up temporary reference data,
+. \" to ensure it doesn't propagate to any future reference
+. \"
+. rm pdf*href pdf:href.link pdf:href.files
+. rr pdf:href-E pdf:href-X
+. pdf:href.options.clear
+. \}
+. rr pdf:href.ok
+. \}
+..
+.\"
+.\" Macros "pdf:href.flag" and "pdf:href.option"
+.\" provide a generic mechanism for switching on flag type options,
+.\" and for decoding options with arguments, respectively
+.\"
+.de pdf:href.flag
+.\" ----------------------------------------------------------------------
+.\" ----------------------------------------------------------------------
+.nr pdf:href\\$1 1
+.nr pdf:href.argc 1
+..
+.de pdf:href.option
+.\" ----------------------------------------------------------------------
+.\" ----------------------------------------------------------------------
+.ds pdf:href\\$1 \\$2
+.nr pdf:href.argc 2
+..
+.\"
+.\" Valid PDFHREF options are simply declared
+.\" by aliasing option handlers to "pdf:href.option",
+.\" or to "pdf:href.flag", as appropriate
+.\"
+.als pdf:href.opt-A pdf:href.option \" affixed text
+.als pdf:href.opt-D pdf:href.option \" destination name
+.als pdf:href.opt-E pdf:href.flag \" echo link descriptor
+.als pdf:href.opt-F pdf:href.option \" remote file specifier
+.als pdf:href.opt-N pdf:href.option \" reference name
+.als pdf:href.opt-P pdf:href.option \" prefixed text
+.als pdf:href.opt-T pdf:href.option \" bookmark "tag"
+.als pdf:href.opt-X pdf:href.flag \" cross reference
+.\"
+.\" For references to another document file
+.\" we also need to support OS dependent file name specifiers
+.\"
+.als pdf:href.opt-DF pdf:href.option \" /DOSFile specifier
+.als pdf:href.opt-MF pdf:href.option \" /MacFile specifier
+.als pdf:href.opt-UF pdf:href.option \" /UnixFile specifier
+.als pdf:href.opt-WF pdf:href.option \" /WinFile specifier
+.\"
+.\" Macro "pdf:href.options.clear" ensures that ALL option
+.\" argument strings are deleted, after "pdfhref" has completed
+.\" all processing which depends on them
+.\"
+.de pdf:href.options.clear
+.\" -----------------------------------------------------------------
+.\" Usage:
+.\" .pdf:href.options.clear [option ...]
+.\" -----------------------------------------------------------------
+.\"
+.\" When an option list is specified ...
+.\"
+.ie \\n(.$ \{\
+. \"
+. \" then loop through the list,
+. \" deleting each specified option argument string in turn
+. \"
+. while \\n(.$ \{\
+. if dpdf:href-\\$1 .rm pdf:href-\\$1
+. shift
+. \}
+. \}
+.\"
+.\" ... but when no list is specified,
+.\" then recurse, to clear all known option argument strings
+.\"
+.el .pdf:href.options.clear A D F N P T DF MF UF WF
+..
+.\"
+.\" "PDFHREF.INFO" establishes the content of the cross reference
+.\" data record, which is exported via the "stderr" stream, when a
+.\" cross reference anchor is created using a "pdfhref" macro request
+.\" of the form
+.\"
+.\" .pdfhref M -N name -X text ...
+.\"
+.\" .ds PDFHREF.INFO \\*[PDFHREF.NAME] reference data ...
+.\"
+.ds PDFHREF.INFO page \\n% \\$*
+.\"
+.\" Macro "pdf*href-M" is the handler invoked by "pdfhref", when
+.\" called with the "M" reference class specifier, to create a
+.\" named cross reference mark, and to emit a cross reference
+.\" data record, as specified by "PDFHREF.INFO".
+.\"
+.de pdf*href-M
+.\" -----------------------------------------------------------------
+.\" Usage:
+.\" .pdfhref M [-X] [-N name | -D name] [-E] descriptive text ...
+.\" -----------------------------------------------------------------
+.\"
+.\" Initially, declare the -D and -N string options as empty,
+.\" so we avoid warning messages when we try to use them, and find
+.\" that they are undefined.
+.\"
+.ds pdf:href-D
+.ds pdf:href-N
+.\"
+.\" Parse, interpret, and strip any specified options from the
+.\" argument list. (Note that only options with a declared handler
+.\" will be processed; there is no provision for detecting invalid
+.\" options -- anything which is not recognised is assumed to start
+.\" the "descriptive text" component of the argument list).
+.\"
+.while dpdf:href.opt\\$1 \{\
+. pdf:href.opt\\$1 \\$@
+. shift \\n[pdf:href.argc]
+. \}
+.\"
+.\" If we found "--", to mark the end of the options,
+.\" then we should discard it.
+.\"
+.if '\\$1'--' .shift
+.\"
+.\" All PDF reference markers MUST be named. The name may have been
+.\" supplied using the "-N Name" option, (or the "-D Name" option);
+.\" if not, deduce it from the first "word" in the "descriptive text",
+.\" if any, and set the marker -- if we still can't identify the name
+.\" for the destination, then this marker will not be created.
+.\"
+.pdf*href.set \\*[pdf:href-N] \\*[pdf:href-D] \\$1
+.\"
+.\" If we specified a cross reference, with the "-X" option, and the
+.\" reference mark has been successfully created, then we now need to
+.\" write the cross reference info to the STDERR stream
+.\"
+.if \\n[pdf:href-X] .pdf*href.export \\*[PDFHREF.INFO]
+.\"
+.\" Irrespective of whether this marker is created, or not,
+.\" the descriptive text will be copied to the groff output stream,
+.\" provided the "-E" option was specified
+.\"
+.if \\n[pdf:href-E] \&\\$*
+..
+.\"
+.de pdf*href.set
+.\" ----------------------------------------------------------------------
+.\" ----------------------------------------------------------------------
+.pdf*href.map.init
+.ie \\n(.$ \{\
+. \"
+. \" a marker name has been supplied ...
+. \" if we are formatting for immediate output,
+. \" emit PDFMARK code to establish the associated view
+. \"
+. ie '\\n(.z'' \{\
+. pdf:href.sety
+. pdfmark /Dest /\\$1 /View [\\*[PDFHREF.VIEW]] /DEST
+. ds PDFHREF.NAME \\$1
+. rr PDFPAGE.Y
+. \}
+. \"
+. \" but, when formatting a diversion ...
+. \" delay output of the PDFMARK code, until the diversion
+. \" is eventually written out
+. \"
+. el \!.\\$0 \\$@
+. \"
+. \" check if we also need to emit cross reference data
+. \" (caller will do this if "pdf:href-X" is set, but it is
+. \" not necessary, when "pdf:href.map" already exists)
+. \"
+. if dpdf:href.map .nr pdf:href-X 0
+. \}
+.el \{\
+. \" marker is unnamed ...
+. \" issue error message; do not emit reference data
+. \"
+. pdf:warn pdfhref destination marker must be named
+. nr pdf:href-X 0
+. \}
+..
+.de pdf*href.export
+.\"
+.\" Called ONLY by "pdf*href-M",
+.\" this macro ensures that the emission of exported reference data
+.\" is synchronised with the placement of the reference mark,
+.\" especially when the mark is defined within a diversion.
+.\"
+.ie '\\n(.z'' .tm gropdf-info:href \\*[PDFHREF.NAME] \\$*
+.el \!.\\$0 \\$@
+..
+.\"
+.\" Macro "pdf*href-D" is invoked when "pdfhref" is called
+.\" with the "D" reference class specifier; it provides a
+.\" standardised mechanism for interpreting reference data
+.\" exported by the "M" reference class, and may be used
+.\" to directly define external reference data, without the
+.\" use of "M" reference class designators in the source
+.\" document.
+.\"
+.de pdf*href-D
+.ds pdf:href-N
+.\"
+.\" Parse, interpret, and strip any specified options from the
+.\" argument list. (Note that only options with a declared handler
+.\" will be processed; there is no provision for detecting invalid
+.\" options -- anything which is not recognised is assumed to start
+.\" the "descriptive text" component of the argument list).
+.\"
+.while dpdf:href.opt\\$1 \{\
+. pdf:href.opt\\$1 \\$@
+. shift \\n[pdf:href.argc]
+. \}
+.\"
+.\" If we found "--", to mark the end of the options,
+.\" then we should discard it.
+.\"
+.if '\\$1'--' .shift
+.\"
+.ie '\\*[pdf:href-N]'' \{\
+. pdf:warn pdfhref defined reference requires a name
+. \}
+.el \{\
+. ds pdf:href(\\*[pdf:href-N]).info \\$*
+. \}
+..
+.\"
+.\" Macro "pdf*href-F" is invoked when "pdfhref" is called
+.\" with the "F" reference class specifier; it allows the user
+.\" to provide an alternative interpreter macro, which will be
+.\" called when a "PDFHREF.INFO" record is retrieved to define
+.\" the text of a cross reference link "hot spot".
+.\"
+.de pdf*href-F
+.\" ----------------------------------------------------------------
+.\" Usage:
+.\" .pdfhref F [macro-name]
+.\" ----------------------------------------------------------------
+.\"
+.\" Set macro specified by "macro-name" as the format interpreter
+.\" for parsing "PDFHREF.INFO" records; if "macro-name" is omitted,
+.\" or is specified as the reserved name "default", then use the
+.\" default format parser, "pdf*href.format", defined below.
+.\"
+.if '\\$1'default' .shift \\n(.$
+.ie \\n(.$ .als pdf*href.format \\$1
+.el .als pdf*href.format pdf*href.default
+.nr pdf:argc 1
+..
+.\" The default reference formatting macro is defined below.
+.\" It parses the "PDFHREF.INFO" record specific to each reference,
+.\" recognising the keywords "file", "page" and "section", when they
+.\" appear in initial key/value pairs, replacing the key/value pair
+.\" with "PDFHREF.FILEREF", "PDFHREF.PAGEREF" or "PDFHREF.SECTREF"
+.\" respectively; any additional data in the "PDFHREF.INFO" record
+.\" is enclosed in typographic double quotes, and the parsed record
+.\" is appended to "PDFHREF.PREFIX", to be returned as the formatted
+.\" reference text.
+.\"
+.\" Default definitions for the reference strings "PDFHREF.PREFIX",
+.\" "PDFHREF.FILEREF", "PDFHREF.PAGEREF" and "PDFHREF.SECTREF" are
+.\" provided, in the English language. Users may substitute any
+.\" desired alternative definitions, for example, when formatting
+.\" documents in other languages. In each case, "\\$1" may be used
+.\" in the substitution, to represent the "value" component of the
+.\" respective key/value pair specified in the "PDFHREF.INFO" record.
+.\"
+.ds PDFHREF.PREFIX see
+.ds PDFHREF.PAGEREF page \\$1,
+.ds PDFHREF.SECTREF section \\$1,
+.ds PDFHREF.FILEREF \\$1
+.\"
+.de pdf*href.format
+.\" -----------------------------------------------------------------
+.\" Usage: (to be called ONLY by "pdfhref")
+.\" .pdf*href.format cross reference data ...
+.\" -----------------------------------------------------------------
+.\"
+.\" This macro is responsible for defining the strings "PDFHREF.TEXT"
+.\" and "PDFHREF.DESC", which are used by the "pdfhref" macro, as the
+.\" basis for generating the text content of a link "hot spot"; (any
+.\" user specified alternate formatter MUST do likewise).
+.\"
+.\" Note that "PDFHREF.TEXT" defines the overall format for the "link
+.\" text", while "PDFHREF.DESC" is the descriptive component thereof.
+.\"
+.\" This default implementation, subject to user customisation of the
+.\" "internationalisation" strings defined above, formats "hot spots"
+.\" of the style
+.\"
+.\" see page N, section S, "descriptive text ..."
+.\"
+.ds PDFHREF.TEXT \\*[PDFHREF.PREFIX]
+.while d\\$0.\\$1 \{\
+. \\$0.\\$1 "\\$2"
+. shift 2
+. \}
+.\"
+.\" Retrieve the descriptive text from the cross reference data,
+.\" ONLY IF no overriding description has been set by the calling
+.\" "pdfhref" macro invocation.
+.\"
+.if \\n(.$ .if !dPDFHREF.DESC .ds PDFHREF.DESC \\$*
+.\"
+.\" Augment "PDFHREF.TEXT" so the descriptive text will be included
+.\" in the text of the formatted reference
+.\"
+.if dPDFHREF.DESC .as PDFHREF.TEXT " \(lq\\\\*[PDFHREF.DESC]\(rq
+.\"
+.\" Finally, suppress any leading spaces,
+.\" which may have been included in the PDFHREF.TEXT definition.
+.\"
+.ds PDFHREF.TEXT \\*[PDFHREF.TEXT]
+..
+.de pdf*href.format.file
+.\" ----------------------------------------------------------------------
+.\" Include a file identifier in a formatted reference.
+.\" This is invoked ONLY by "pdf*href.format", and ONLY IF the
+.\" reference data includes an initial file identifier tuple.
+.\" ----------------------------------------------------------------------
+.\"
+.as PDFHREF.TEXT " \\*[PDFHREF.FILEREF]
+..
+.de pdf*href.format.page
+.\" ----------------------------------------------------------------------
+.\" Include a page number in a formatted reference.
+.\" This is invoked ONLY by "pdf*href.format", and ONLY IF the
+.\" reference data includes an initial page number tuple.
+.\" ----------------------------------------------------------------------
+.\"
+.as PDFHREF.TEXT " \\*[PDFHREF.PAGEREF]
+..
+.de pdf*href.format.section
+.\" ----------------------------------------------------------------------
+.\" Include a section number in a formatted reference.
+.\" This is invoked ONLY by "pdf*href.format", and ONLY IF the
+.\" reference data includes an initial section number tuple.
+.\" ----------------------------------------------------------------------
+.\"
+.as PDFHREF.TEXT " \\*[PDFHREF.SECTREF]
+..
+.\"
+.\" Make "pdf*href.format" the default cross reference formatter
+.\"
+.als pdf*href.default pdf*href.format
+.\"
+.\"
+.\" Macro "pdf*href" provides a generic mechanism for placing link
+.\" "hot-spots" in a PDF document. ALL "pdfhref" class macros which
+.\" create "hot-spots" are aliased to this macro; each must also have
+.\" an appropriately aliased definition for "pdf*href.template".
+.\"
+.de pdf*href
+.\" ------------------------------------------------------------------
+.\" Usage:
+.\" .pdf*href class [options ...] [link text ...]
+.\" ------------------------------------------------------------------
+.\"
+.\" First, we initialise an empty string, which will be affixed to
+.\" the end of the "link text". (This is needed to cancel the effect
+.\" of a "\c" escape, which is placed at the end of the "link text"
+.\" to support the "-A" option -- any text supplied by the user, when
+.\" the "-A" option is specified, will replace this empty string).
+.\"
+.ds pdf:href-A
+.\"
+.\" Now we interpret, and remove any specified options from the
+.\" argument list. (Note that only options with a declared handler
+.\" will be processed; there is no provision for detecting invalid
+.\" options -- anything which is not recognised is assumed to start
+.\" the "link text" component of the argument list).
+.\"
+.while dpdf:href.opt\\$1 \{\
+. pdf:href.opt\\$1 \\$@
+. shift \\n[pdf:href.argc]
+. \}
+.\"
+.\" If we found "--", to mark the end of the options, then we should
+.\" discard it.
+.\"
+.if '\\$1'--' .shift
+.\"
+.\" All PDF link classes REQUIRE a named destination. This may have
+.\" been supplied using the "-D Name" option, but, if not, deduce it
+.\" from the first "word" in the "link text", if any -- if we still
+.\" can't identify the destination, then set "pdf:href.ok" to zero,
+.\" so this link will not be created.
+.\"
+.if !dpdf:href-D .pdf:href.option -D \\$1
+.if '\\*[pdf:href-D]'' \{\
+. pdf:error pdfhref has no destination
+. nr pdf:href.ok 0
+. \}
+.\"
+.\" Some PDF link classes support a "/File (FilePathName)" argument.
+.\"
+.if dpdf*href.file \{\
+. \"
+. \" When this is supported, it may be specified by supplying
+. \" the "-F FileName" option, which is captured in "pdf:href-F".
+. \"
+. if dpdf:href-F \{\
+. \"
+. \" the /File key is present, so set up the link specification
+. \" to establish the reference to the specified file
+. \"
+. als pdf*href.link pdf*href.file
+. ds pdf:href.files /File (\\*[pdf:href-F])
+. \"
+. \" in addition to the /File key,
+. \" there may also be platform dependent alternate file names
+. \"
+. if dpdf:href-DF .as pdf:href.files " /DOSFile (\\*[pdf:href-DF])
+. if dpdf:href-MF .as pdf:href.files " /MacFile (\\*[pdf:href-MF])
+. if dpdf:href-UF .as pdf:href.files " /UnixFile (\\*[pdf:href-UF])
+. if dpdf:href-WF .as pdf:href.files " /WinFile (\\*[pdf:href-WF])
+. \}
+. \" In some cases, the "/File" key is REQUIRED.
+. \" We will know it is missing, if "pdf*href.link" is not defined.
+. \"
+. if !dpdf*href.link \{\
+. \"
+. \" When a REQUIRED "/File" key specification is not supplied,
+. \" then complain, and set "pdf:href.ok" to abort the creation
+. \" of the current reference.
+. \"
+. pdf:error pdfhref: required -F specification omitted
+. nr pdf:href.ok 0
+. \}
+. \" Now, we have no further use for "pdf*href.file".
+. \"
+. rm pdf*href.file
+. \}
+.\"
+.\" Now, initialise a string, defining the PDFMARK code sequence
+.\" to create the reference, using the appropriate type indicators.
+.\"
+.ds pdf:href.link /Subtype /Link \\*[pdf*href.link]
+.\"
+.\" And now, we have no further use for "pdf*href.link".
+.\"
+.rm pdf*href.link
+.\"
+.\" If the user specified any "link prefix" text, (using the "-P text"
+.\" option), then emit it BEFORE processing the "link text" itself.
+.\"
+.if dpdf:href-P \&\\*[pdf:href-P]\c
+.ie \\n[pdf:href.ok] \{\
+. \"
+. \" This link is VALID (so far as we can determine) ...
+. \" Modify the "link text" argument specification, as required,
+. \" to include any pre-formatted cross reference information
+. \"
+. ie \\n(.$ \{\
+. \"
+. \" One or more "link text" argument(s) are present,
+. \" so, set the link description from the argument(s) ...
+. \"
+. ds PDFHREF.DESC \\\\$*
+. ie \\n[pdf:href-X] \{\
+. \"
+. \" ... and, when the "-X" flag is set,
+. \" also include formatted location information,
+. \" derived from the cross reference record.
+. \"
+. pdf*href.format \\*[pdf:href(\\*[pdf:href-D]).info]
+. \}
+. el \{\
+. \" ... but, when the "-X" flag is NOT set,
+. \" use only the argument(s) as the entire content
+. \" of the "link text"
+. \"
+. rn PDFHREF.DESC PDFHREF.TEXT
+. \}
+. \}
+. el \{\
+. \" No "link text" arguments are present,
+. \" so, format the cross reference record to define
+. \" the content of the "link text".
+. \"
+. pdf*href.format \\*[pdf:href(\\*[pdf:href-D]).info]
+. \}
+. \" Apply border and colour specifications to the PDFMARK string
+. \" definition, as required.
+. \"
+. if dPDFHREF.BORDER .as pdf:href.link " /Border [\\*[PDFHREF.BORDER]]
+. if dPDFHREF.COLOUR .as pdf:href.link " /Color [\\*[PDFHREF.COLOUR]]
+. \"
+. \" Emit the "link text", in its appropriate colour, marking the
+. \" limits of its bounding box(es), as the before and after output
+. \" text positions.
+. \"
+. pdf*href.mark.begin "\\*[pdf:href.link]"
+. if dPDFHREF.COLOUR .defcolor pdf:href.colour rgb \\*[PDFHREF.COLOUR]
+. nop \&\m[\\*[PDFHREF.TEXT.COLOUR]]\\*[PDFHREF.TEXT]\m[]\c
+. pdf*href.mark.end
+. \"
+. \" Clean up the temporary registers and strings, used to
+. \" compute the "hot-spot" bounds, and format the reference,
+. \"
+. rm PDFHREF.DESC PDFHREF.TEXT
+. \}
+.\"
+.\" But when we identify an INVALID link ...
+.\" We simply emit the "link text", with no colour change, no border,
+.\" and no associated "hot-spot".
+.\"
+.el \&\\$*\c
+.\"
+.\" And then, if the user specified any affixed text, (using the
+.\" "-A text" option), we tack it on at the end.
+.\"
+.nop \&\\*[pdf:href-A]
+..
+.de pdf*href.map.init
+.\" ----------------------------------------------------------------------
+.\" ----------------------------------------------------------------------
+.\"
+.if dpdf:href.map-1 \{\
+. \"
+. \" We have a reference map, but we haven't started to parse it yet.
+. \" This must be the first map reference in pass 2, so we need to
+. \" "kick-start" the parsing process, by loading the first indexed
+. \" sub-map into the global map.
+. \"
+. rn pdf:href.map-1 pdf:href.map
+. als pdf:href.map.internal pdf:href.map
+. nr pdf:href.map.index 1 1
+. \}
+.als pdf*href.map.init pdf*href.mark.idle
+..
+.\"
+.\" "pdf*href-Z" is used to add link co-ordinate entries to the
+.\" "pdf:href.map". Primarily, it is used by the "pdfroff" formatter,
+.\" to pass link co-ordinate data from one "groff" formatting pass to
+.\" the next, and is not generally useful to the end user.
+.\"
+.de pdf*href-Z
+.\" ----------------------------------------------------------------------
+.\" Usage:
+.\" .pdfhref Z page-index x-displacement y-displacement
+.\" Where:
+.\" page-index is the reference mark's page number
+.\" x-displacement is its offset from the left edge of the page
+.\" y-displacement is its offset from the top edge of the page
+.\" ( both displacement values are expressed in basic groff units, )
+.\" ( and measured perpendicular to their respective page edges. )
+.\" ----------------------------------------------------------------------
+.\"
+.ie \\n(.$=3 .ds pdf:href.map-\\n+[pdf*href-Z.index] \\$*
+.el .pdf:error pdfhref Z operator expects exactly three arguments
+..
+.\" Initialise the auto-incrementing "pdf*href-Z.index" register,
+.\" to ensure that sub-map numbering starts at 1.
+.\"
+.nr pdf*href-Z.index 0 1
+.\"
+.de pdf*href.map.read
+.\" ----------------------------------------------------------------------
+.\" Usage: (internal use only):
+.\" .pdf*href.map.read co-ordinate name list ...
+.\" ----------------------------------------------------------------------
+.\"
+.\" Reads values from "pdf:href.map" to each named register, in turn
+.\" Reading to "null" discards the corresponding value in "pdf:href.map"
+.\"
+.while \\n(.$ \{\
+. \"
+. \" Loop over all registers named in the argument list,
+. \" assigning values from "pdf:href.map" to each in turn.
+. \"
+. pdf:pop nr pdf:\\$1 pdf:href.map.internal
+. if !dpdf:href.map.internal \{\
+. \"
+. \" We ran out of map references in the current sub-map,
+. \" so move on to the next indexed sub-map, if any.
+. \"
+. if dpdf:href.map-\\n+[pdf:href.map.index] \{\
+. rn pdf:href.map-\\n[pdf:href.map.index] pdf:href.map
+. als pdf:href.map.internal pdf:href.map
+. \}
+. \}
+. \"
+. \" Proceed to the next named co-ordinate, (if any), specified
+. \" in the argument list.
+. \"
+. shift
+. \}
+.\"
+.\" Discard any assignments to a register named "null"
+.\"
+.rr pdf:null
+..
+.de pdf*href.mark.begin
+.\" ----------------------------------------------------------------------
+.\" ----------------------------------------------------------------------
+.pdf*href.map.init
+.ie dpdf:href.map \{\
+. \"
+. \" Once we have established a document reference map,
+. \" then this, and all subsequent calls to "pdf*href.mark.begin",
+. \" may be redirected to the reference mark resolver, and the
+. \" "pdf*href.mark.end" macro has nothing further to do.
+. \"
+. pdf*href.mark.resolve \\$@
+. als pdf*href.mark.begin pdf*href.mark.resolve
+. als pdf*href.mark.end pdf*href.mark.idle
+. \}
+.el \{\
+. \" Since we don't yet have a document reference map, the
+. \" reference mark resolver will not work, in this pass of the
+. \" formatter; this, and all subsequent calls to "pdf*href.mark.begin",
+. \" may be redirected to "pdf*href.mark.end", which is responsible
+. \" for emitting the reference mark data to be incorporated into
+. \" the reference map in a subsequent formatting pass.
+. \"
+. pdf*href.mark.end
+. als pdf*href.mark.begin pdf*href.mark.end
+. \}
+..
+.de pdf*href.mark.resolve
+.\" ----------------------------------------------------------------------
+.\" ----------------------------------------------------------------------
+.ie '\\n(.z'' \{\
+. ds pdf:href.link \\$1
+. nr pdf:urx \\n(.o+\\n(.l
+. pdf*href.map.read spg llx ury epg urx.end lly.end
+. ie \\n[pdf:spg]=\\n[pdf:epg] \{\
+. \"
+. \" This link is entirely contained on a single page ...
+. \" emit the text, which defines the content of the link region,
+. \" then make it active.
+. \"
+. pdf*href.mark.emit 1 \\n[pdf:urx.end]
+. if \\n[pdf:lly]<\\n[pdf:lly.end] \{\
+. \"
+. \" This link spans multiple output lines; we must save its
+. \" original end co-ordinates, then define a new intermediate
+. \" end point, to create a PDFMARK "hot-spot" extending from
+. \" the start of the link to the end if its first line.
+. \"
+. nr pdf:ury +1v
+. nr pdf:llx \\n(.o+\\n[.in]
+. nr pdf:lly \\n[pdf:lly.end]-\\*[PDFHREF.HEIGHT]
+. if \\n[pdf:ury]<\\n[pdf:lly] \{\
+. nr pdf:lly +\\*[PDFHREF.HEIGHT]-1v
+. pdf*href.mark.emit 2
+. nr pdf:ury \\n[pdf:lly.end]-\\*[PDFHREF.HEIGHT]
+. \}
+. pdf*href.mark.emit 0 \\n[pdf:urx.end]
+. \}
+. pdf*href.mark.flush
+. \}
+. el \{\
+. \" This link is split across a page break, so ...
+. \" We must mark the "hot-spot" region on the current page,
+. \" BEFORE we emit the link text, as we will have moved off
+. \" this page, by the time the text has been output.
+. \"
+. \" First step: define the region from the start of the link,
+. \" to the end of its first line.
+. \"
+. pdf*href.mark.emit 1 \\n[pdf:urx]
+. \"
+. \" All additional regions MUST align with the left margin.
+. \"
+. nr pdf:llx \\n(.o+\\n[.in]
+. \"
+. \" If the current page can accommodate more than the current line,
+. \" then it will include a second active region for this link; this
+. \" will extend from just below the current line to the end of page
+. \" trap, if any, or the bottom of the page otherwise, and occupy
+. \" the full width of the page, between the margins.
+. \"
+. nr pdf:ury +1v
+. pdf*href.mark.emit 3
+. \"
+. \" We now need a page transition trap, to map the active link
+. \" region(s), which overflow on to the following page(s); (the
+. \" handler for this trap MUST have been previously installed).
+. \"
+. ie dpdf*href.mark.hook \{\
+. \"
+. \" The page transition trap handler has been installed,
+. \" so we may activate both it, and also the appropriate
+. \" termination handler, to deactivate it when done.
+. \"
+. als pdf*href.mark.hook pdf*href.mark.trap
+. \"
+. \" Now we set up "pdf:epg" to count the number of page breaks
+. \" which this link will span, and emit the link text, leaving
+. \" the page trap macro to map active regions on intervening
+. \" pages, which are included in the link.
+. \"
+. nr pdf:epg -\\n[pdf:spg] 1
+. \}
+. el \{\
+. \" There was no handler initialised for the page trap,
+. \" so we are unable to map the active regions for this link;
+. \" we may discard the remaining map data for this link,
+. \" and issue a diagnostic.
+. \"
+. pdf:error pdfhref: link dissociated at page break (trap not initialised)
+. if dPDFHREF.BROKEN.COLOR \{\
+. \"
+. \" The user may opt to have such broken links highlighted.
+. \" We use "PDFHREF.BROKEN.COLOUR" to specify this requirement,
+. \" but the user may prefer the American spelling, so we will
+. \" handle both as equivalent.
+. \"
+. als PDFHREF.BROKEN.COLOUR PDFHREF.BROKEN.COLOR
+. \}
+. if dPDFHREF.BROKEN.COLOUR \{\
+. if dPDFHREF.COLOUR .als PDFHREF.COLOUR PDFHREF.BROKEN.COLOUR
+. \}
+. \}
+. \}
+. \}
+.el \!.\\$0 \\$@
+..
+.\"
+.\" Macro "pdf*href.mark.emit" is called only by "pdf*href". It is
+.\" responsible for emitting the PDFMARK code, to establish the
+.\" "hot-spot" region associated with a document or resource link.
+.\"
+.de pdf*href.mark.emit
+.\" ----------------------------------------------------------------------
+.\" Usage:
+.\" .pdf*href.mark.emit <action> [<end-urx>]
+.\" <action> == 0 --> normal operation -- link height = 1 line
+.\" <action> == 1 --> start of link -- add leading above text
+.\" <action> == 2 --> overtall link -- set intermediate baseline
+.\" <action> == 3 --> split link -- break at bottom of page
+.\" ----------------------------------------------------------------------
+.\"
+.if \\$1=1 \{\
+. \"
+. \" Initialising a new link region ...
+. \" Some different versions of "groff" disagree about the vertical
+. \" displacement of "opminy", as emitted by "\O1|\h'-\w"|"u'\O2\c",
+. \" relative to the current text baseline. Therefore, recompute
+. \" the link displacement, independently of "opminy".
+. \"
+. mk pdf:ury.base
+. while \\n[pdf:ury.base]<\\n[pdf:ury] .nr pdf:ury.base +1v
+. nr pdf:ury.base -1m+\\n[PDFHREF.LEADING]
+. \"
+. \" adjust the end-point vertical displacement by the same offset,
+. \" and then relocate the link starting point to its new displacement,
+. \" as established by this base line relative computation.
+. \"
+. nr pdf:lly.end +\\n[pdf:ury.base]-\\n[pdf:ury]+\\*[PDFHREF.HEIGHT]
+. rnn pdf:ury.base pdf:ury
+. \}
+.if \\$1<2 \{\
+. \"
+. \" Link segment fits on a single line ...
+. \" Set its height and end-point horizontal displacement accordingly.
+. \"
+. nr pdf:lly \\n[pdf:ury]+\\*[PDFHREF.HEIGHT]
+. if \\n[pdf:lly]>=\\n[pdf:lly.end] .nr pdf:urx \\$2
+. \}
+.ie \\$1=3 \{\
+. \"
+. \" Link segment extends beyond the next page break ...
+. \" Recompute truncated height, to just fit portion on current page,
+. \" recursing to emit it, and leaving page trap mechanism to place
+. \" continuation region(s) on following page(s).
+. \"
+. nr pdf:lly (\\n[.t]u-\\n[.V]u)/1v
+. if \\n[pdf:lly]>0 \{\
+. nr pdf:lly \\n[pdf:ury]+\\n[pdf:lly]v-1v+\\*[PDFHREF.HEIGHT]
+. pdf*href.mark.emit 2
+. \}
+. \}
+.el \{\
+. \" Link region size and placement has been fully specified ...
+. \" Emit it.
+. \"
+. pdfmark \\*[pdf:href.link] /Rect [\\*[pdf:bbox]] /ANN
+. \}
+..
+.\"
+.\" When "pdf*href" emits a link for which the "hot-spot" spans a
+.\" page break, then we need to provide a "hook" in to the page break
+.\" trap, so we can map the "hot-spot" regions which are to be placed
+.\" on either side of the page break.
+.\"
+.\" Macro "pdf*href.mark.idle" is a dummy macro, which provide this
+.\" "hook" for normal page breaks, where there is no link "hot-spot"
+.\" crossing the break.
+.\"
+.de pdf*href.mark.idle
+.\" ----------------------------------------------------------------------
+.\" Usage:
+.\" Called only as an internal hook, by a page trap macro.
+.\" Expects no arguments, and does nothing.
+.\" ----------------------------------------------------------------------
+..
+.\"
+.\" Macro "pdf*href.mark.trap" is the active "hook", which is substituted
+.\" for "pdf*href,mark.idle" at those page breaks which are crossed by
+.\" a link "hot-spot".
+.\"
+.de pdf*href.mark.trap
+.\" ----------------------------------------------------------------------
+.\" Usage:
+.\" Called only as an internal hook, by a page trap macro.
+.\" Expects no arguments. Maps residual link "hot-spot" regions,
+.\" which spill beyond any page break. Not to be invoked directly
+.\" by the user, nor by any user supplied macro.
+.\" ----------------------------------------------------------------------
+.\"
+.mk pdf:ury
+.nr pdf:ury +1v-1m-\\n[PDFHREF.LEADING]
+.ie \\n-[pdf:epg] \{\
+. \"
+. \" The link "hot-spot" extends across more than one page break,
+. \" so, for each page which is completely contained within the
+. \" extent of the link, simply mark the entire text area on the
+. \" page as a "hot-spot".
+. \"
+. pdf*href.mark.emit 3
+. \}
+.el \{\
+. \" The link "hot-spot" ends on the page which immediately follows
+. \" the current page transition, so we may now finalise this link.
+. \"
+. nr pdf:lly \\n[pdf:ury]+\\*[PDFHREF.HEIGHT]
+. if \\n[pdf:lly.end]>\\n[pdf:lly] \{\
+. \"
+. \" The "hot-spot" extends beyond the first line of text,
+. \" on its final page; compute and emit "hot-spot" region to cover
+. \" the full with of the text area, including all but the last
+. \" line of the link text.
+. \"
+. while \\n[pdf:lly.end]>\\n[pdf:lly] .nr pdf:lly +1v
+. nr pdf:lly -1v
+. pdf*href.mark.emit 2
+. \"
+. \" Now, adjust the vertical "hot-spot" mapping reference,
+. \" to identify the correct position for the last line of
+. \" text, over which the "hot-spot" extends.
+. \"
+. nr pdf:ury \\n[pdf:lly.end]-\\*[PDFHREF.HEIGHT]
+. \}
+. \"
+. \" We now have exactly one final line of text, over which we must
+. \" emit a "hot-spot" region; map it, terminate page trap processing
+. \" for this "hot-spot", and clean up the "hot-spot" mapping context.
+. \"
+. pdf*href.mark.emit 0 \\n[pdf:urx.end]
+. als pdf*href.mark.hook pdf*href.mark.idle
+. pdf*href.mark.flush
+. \}
+..
+.de pdf*href.mark.flush
+.\" ----------------------------------------------------------------------
+.\" ----------------------------------------------------------------------
+.rr pdf:spg pdf:epg
+.rr pdf:llx pdf:lly pdf:urx pdf:ury
+.if dPDFHREF.COLOR .als PDFHREF.COLOUR PDFHREF.COLOR
+.rr pdf:urx.end pdf:lly.end
+..
+.de pdf*href.mark.end
+.\" ----------------------------------------------------------------------
+.\" ----------------------------------------------------------------------
+\O1\Z'|'\O2\c
+..
+.\" Macro "pdf*href-I" is used for one time initialisation of special
+.\" "pdfhref" features; (currently, only the above page trap hook is
+.\" supported, but it is implemented with one level of indirection, to
+.\" accommodate possible future expansion).
+.
+.de pdf*href-I
+.\" ----------------------------------------------------------------------
+.\" Usage:
+.\" .pdfhref I -<option> <optarg> [-<option> <optarg>] ...
+.\" ----------------------------------------------------------------------
+.\"
+.\" Loop over all arguments, in pairs ...
+.
+.while \\n(.$ \{\
+. \"
+. \" handing them off to their respective initialisers,
+. \" when suitable initialisers exist, or complaining otherwise.
+. \"
+. ie dpdf*href\\$1.init .pdf*href\\$1.init \\$2
+. el .pdf*error pdfhref:init: unknown feature '\\$1'
+. shift 2
+. \}
+..
+.\" Before we can use the page break "hook", we need to initialise it
+.\" as an addendum to a regular page break trap. To ensure that we don't
+.\" compromise the user's page trap setup, we leave the onus for this
+.\" initialisation with the user, but we provide the "pdf*href-PT.init"
+.\" macro, (invoked by ".pdfhref I -PT <macro-name>"), to implement a
+.\" suitable initialisation action.
+.
+.de pdf*href-PT.init
+.\" ----------------------------------------------------------------------
+.\" Usage:
+.\" .pdfhref I -PT <macro-name>
+.\" <macro-name> == name of user's page break trap macro
+.\" ----------------------------------------------------------------------
+.\"
+.\" Initially, map the page break hook to its default, do nothing helper.
+.
+.als pdf*href.mark.hook pdf*href.mark.idle
+.ie !\\n(.$ \{\
+. \"
+. \" Don't have enough arguments to specify a page trap macro name,
+. \" so simply plant "pdf*href.mark.hook" as a top of page trap.
+. \"
+. wh 0 pdf*href.mark.hook
+. \}
+.el \{\
+. \" Page trap macro name is specified in "\\$1" ...
+. \"
+. ie d\\$1 \{\
+. \"
+. \" When this page trap macro already exists, then we simply
+. \" append a call to "pdf*href.mark.hook" to it.
+. \"
+. am \\$1 pdf*href.mark.idle
+. pdf*href.mark.hook
+. pdf*href.mark.idle
+. \}
+. el \{\
+. \" However, when the specified page trap macro does not yet
+. \" exist, then we create it, and plant it as a top of page
+. \" trap.
+. \"
+. de \\$1 pdf*href.mark.idle
+. pdf*href.mark.hook
+. pdf*href.mark.idle
+. wh 0 \\$1
+. \}
+. \}
+..
+.
+.\" "pdf*href-L" is the generic handler for creating references to
+.\" named destinations in PDF documents. It supports both local
+.\" references, to locations within the same document, through its
+.\" "pdf*href-L.link" attribute, and also references to locations
+.\" in any other PDF document, through "pdf*href-L.file".
+.\"
+.als pdf*href-L pdf*href
+.ds pdf*href-L.link /Dest /\\\\*[pdf:href-D]
+.ds pdf*href-L.file /Action /GoToR \\\\*[pdf:href.files] \\*[pdf*href-L.link]
+.\"
+.\" "pdf*href-O" is the "official" handler for creating PDF
+.\" document outlines. It is simply an alias to "pdfbookmark",
+.\" which may also be invoked directly, if preferred. Neither
+.\" a "pdf*href-O.link" nor a "pdf*href-O.file" attribute is
+.\" required.
+.\"
+.als pdf*href-O pdfbookmark
+.\"
+.\" "pdf*href-W" is the generic handler for creating references to
+.\" web resources, (or any resource specified by a uniform resource
+.\" identifier). Such resource links are fully specified by the
+.\" "pdf*href-W.link" attribute.
+.\"
+.als pdf*href-W pdf*href
+.ds pdf*href-W.link /Action << /Subtype /URI /URI (\\\\*[pdf:href-D]) >>
+.\"
+.\" Local Variables:
+.\" mode: nroff
+.\" End:
+.\" vim: filetype=groff:
+.\" pdfmark.tmac: end of file
diff --git a/contrib/pdfmark/pdfroff.1.man b/contrib/pdfmark/pdfroff.1.man
new file mode 100644
index 0000000..029a1f4
--- /dev/null
+++ b/contrib/pdfmark/pdfroff.1.man
@@ -0,0 +1,981 @@
+.TH pdfroff @MAN1EXT@ "@MDATE@" "groff @VERSION@"
+.SH Name
+pdfroff \- construct files in Portable Document Format using
+.I groff
+.
+.
+.\" ====================================================================
+.\" Legal Terms
+.\" ====================================================================
+.\"
+.\" Copyright (C) 2005-2020 Free Software Foundation, Inc.
+.\"
+.\" This file is part of groff, the GNU roff type-setting system.
+.\"
+.\" Permission is granted to copy, distribute and/or modify this
+.\" document under the terms of the GNU Free Documentation License,
+.\" Version 1.3 or any later version published by the Free Software
+.\" Foundation; with no Invariant Sections, with no Front-Cover Texts,
+.\" and with no Back-Cover Texts.
+.\"
+.\" A copy of the Free Documentation License is included as a file
+.\" called FDL in the main directory of the groff source package.
+.
+.
+.\" Save and disable compatibility mode (for, e.g., Solaris 10/11).
+.do nr *groff_pdfroff_1_man_C \n[.cp]
+.cp 0
+.
+.\" Define fallback for groff 1.23's MR macro if the system lacks it.
+.nr do-fallback 0
+.if !\n(.f .nr do-fallback 1 \" mandoc
+.if \n(.g .if !d MR .nr do-fallback 1 \" older groff
+.if !\n(.g .nr do-fallback 1 \" non-groff *roff
+.if \n[do-fallback] \{\
+. de MR
+. ie \\n(.$=1 \
+. I \%\\$1
+. el \
+. IR \%\\$1 (\\$2)\\$3
+. .
+.\}
+.rr do-fallback
+.
+.
+.\" ====================================================================
+.SH Synopsis
+.\" ====================================================================
+.
+.SY pdfroff
+.RI [ groff-option ]
+.RB [ \-\-emit\-ps ]
+.RB [ \-\-no\-toc\-relocation ]
+.RB [ \-\-no\-kill\-null\-pages ]
+.RB [ \-\-stylesheet=\c
+.IR name ]
+.RB [ \-\-no\-pdf\-output ]
+.RB [ \-\-pdf\-output=\c
+.IR name ]
+.RB [ \-\-no\-reference\-dictionary ]
+.RB [ \-\-reference\-dictionary=\c
+.IR name ]
+.RB [ \-\-report\-progress ]
+.RB [ \-\-keep\-temporary\-files ]
+.RI [ file\~ .\|.\|.]
+.YS
+.
+.
+.SY pdfroff
+.B \-h
+.
+.SY pdfroff
+.B \-\-help
+.YS
+.
+.
+.SY pdfroff
+.B \-v
+.RI [ groff-option
+\&.\|.\|.\&]
+.
+.SY pdfroff
+.B \-\-version
+.RI [ groff-option
+\&.\|.\|.\&]
+.YS
+.
+.
+.P
+.I groff-option
+is any short option supported by
+.MR groff @MAN1EXT@
+except for
+.BR \-h ,
+.BR \-T ,
+and
+.BR \-v ;
+see section \[lq]Usage\[rq] below.
+.
+.
+.\" ====================================================================
+.SH Description
+.\" ====================================================================
+.
+.I pdfroff
+is a wrapper program for the GNU text processing system,
+.IR groff .
+.
+It transparently handles the mechanics of multiple pass
+.I groff
+processing,
+when applied to suitably marked up
+.I groff
+source files,
+such that tables of contents and body text are formatted separately,
+and are subsequently combined in the correct order,
+for final publication as a single PDF document.
+.
+A further optional \[lq]style sheet\[rq] capability is provided;
+this allows for the definition of content which is required to precede
+the table of contents,
+in the published document.
+.
+.
+.P
+For each invocation of
+.IR pdfroff ,
+the ultimate
+.I groff
+output stream is post-processed by the Ghostscript
+.MR gs 1
+interpreter to produce a finished PDF document.
+.
+.
+.P
+.I pdfroff
+makes no assumptions about,
+and imposes no restrictions on,
+the use of any
+.I groff
+macro packages which the user may choose to employ,
+in order to achieve a desired document format;
+however,
+it
+.I does
+include specific built in support for the
+.I \%pdfmark
+macro package,
+should the user choose to employ it.
+.
+Specifically,
+if the
+.I pdfhref
+macro,
+defined in the
+.I \%pdfmark.tmac
+package,
+is used to define public reference marks,
+or dynamic links to such reference marks,
+then
+.I pdfroff
+performs as many preformatting
+.I groff
+passes as required,
+up to a maximum limit of
+.IR four ,
+in order to compile a document reference dictionary,
+to resolve
+references,
+and to expand the dynamically defined content of links.
+.
+.
+.\" ====================================================================
+.SH Usage
+.\" ====================================================================
+.
+The command line is parsed in accordance with normal GNU conventions,
+but with one exception\(emwhen specifying any short form option
+(i.e.,
+a single character option introduced by a single hyphen),
+and if that option expects an argument,
+then it
+.I must
+be specified independently
+(i.e.,
+it may
+.I not
+be appended to any group of other single character short form options).
+.
+.
+.P
+Long form option names
+(i.e.,
+those introduced by a double hyphen)
+may
+be abbreviated to their minimum length unambiguous initial substring.
+.
+.
+.P
+Otherwise,
+.I pdfroff
+usage closely mirrors that of
+.I groff
+itself.
+.
+Indeed,
+with the exception of the
+.BR \-h ,
+.BR \-v ,
+and
+.BI \-T \ dev
+short form options,
+and all long form options,
+which are parsed
+internally by
+.IR pdfroff ,
+all options and file name arguments specified on the command line are
+passed on to
+.IR groff ,
+to control the formatting of the PDF document.
+.
+Consequently,
+.I pdfroff
+accepts all options and arguments,
+as specified in
+.MR groff @MAN1EXT@ ,
+which may also be considered as the definitive reference for all
+standard
+.I pdfroff
+options and argument usage.
+.
+.
+.\" ====================================================================
+.SH Options
+.\" ====================================================================
+.
+.I pdfroff
+accepts all of the short form options
+(i.e.,
+those introduced by a
+single hyphen),
+which are available with
+.I groff
+itself.
+.
+In most cases,
+these are simply passed transparently to
+.IR groff ;
+the following,
+however,
+are handled specially by
+.IR pdfroff .
+.
+.
+.TP
+.B \-h
+Same as
+.BR \-\-help ;
+see below.
+.
+.
+.TP
+.B \-i
+Process standard input,
+after all other specified input files.
+.
+This is passed transparently to
+.IR groff ,
+but,
+if grouped with other options,
+it
+.I must
+be the first in the group.
+.
+Hiding it within a group breaks standard input processing,
+in the multiple-pass
+.I groff
+processing context of
+.IR pdfroff .
+.
+.
+.TP
+.BI \-T \ dev
+Only
+.B \-T\ ps
+is supported by
+.IR pdfroff .
+.
+Attempting to specify any other device causes
+.I pdfroff
+to abort.
+.
+.
+.TP
+.B \-v
+Same as
+.BR \-\-version ;
+see below.
+.
+.
+.P
+See
+.MR groff @MAN1EXT@
+for a description of all other short form options,
+which are
+transparently passed through
+.I pdfroff
+to
+.IR groff .
+.
+.
+.P
+All long form options
+(i.e.,
+those introduced by a double hyphen)
+are interpreted locally by
+.IR pdfroff ;
+they are
+.I not
+passed on to
+.IR groff ,
+unless otherwise stated below.
+.
+.
+.TP
+.B \-\-help
+Causes
+.I pdfroff
+to display a summary of the its usage syntax,
+and supported options,
+and then exit.
+.
+.
+.TP
+.B \-\-emit\-ps
+Suppresses the final output conversion step,
+causing
+.I pdfroff
+to emit PostScript output instead of PDF.
+.
+This may be useful to capture intermediate PostScript output when using
+a specialised postprocessor,
+such as
+.I gpresent
+for example,
+in place of the default Ghostscript PDF writer.
+.
+.
+.TP
+.B \-\-keep\-temporary\-files
+Suppresses the deletion of temporary files,
+which normally occurs
+after
+.I pdfroff
+has completed PDF document formatting;
+this may be useful when debugging formatting problems.
+.
+.
+.IP
+See section \[lq]Files\[rq] below for a description of the temporary
+files used by
+.IR pdfroff .
+.
+.
+.TP
+.B \-\-no\-pdf\-output
+May be used with the
+.BI \%\-\-reference\-dictionary= name
+option
+(described below)
+to eliminate the overhead of PDF formatting when running
+.I pdfroff
+to create a reference dictionary for use in a different document.
+.
+.
+.TP
+.B \-\-no\-reference\-dictionary
+May be used to eliminate the overhead of creating a reference
+dictionary,
+when it is known that the target PDF document contains no public
+references,
+created by the
+.B pdfhref
+macro.
+.
+.
+.TP
+.B \-\-no\-toc\-relocation
+May be used to eliminate the extra
+.I groff
+processing pass,
+which is required to generate a table of contents,
+and relocate it to the start of the PDF document,
+when processing any document which lacks an automatically
+generated table of contents.
+.
+.
+.TP
+.B \-\-no\-kill\-null\-pages
+While preparing for simulation of the manual collation step,
+which is traditionally required to relocate a
+.I "table of contents"
+to the start of a document,
+.I pdfroff
+accumulates a number of empty page descriptions
+into the intermediate PostScript output stream.
+.
+During the final collation step,
+these empty pages are normally discarded from the finished document;
+this option forces
+.I pdfroff
+to leave them in place.
+.
+.
+.TP
+.BI \-\-pdf\-output= name
+Specifies the name to be used for the resultant PDF document;
+if unspecified,
+the PDF output is written to standard output.
+.
+A future version of
+.I pdfroff
+may use this option,
+to encode the document name in a generated reference dictionary.
+.
+.
+.TP
+.BI \-\-reference\-dictionary= name
+Specifies the name to be used for the generated reference dictionary
+file;
+if unspecified,
+the reference dictionary is created in a temporary file,
+which is deleted when
+.I pdfroff
+completes processing of the current document.
+.
+This option
+.I must
+be specified,
+if it is desired to save the reference dictionary,
+for use in references placed in other PDF documents.
+.
+.
+.TP
+.B \-\-report\-progress
+Causes
+.I pdfroff
+to display an informational message on standard error,
+at the start of each
+.I groff
+processing pass.
+.
+.
+.TP
+.BI \-\-stylesheet= name
+Specifies the name of an
+.IR "input file" ,
+to be used as a style sheet for formatting of content,
+which is to be placed
+.I before
+the table of contents,
+in the formatted PDF document.
+.
+.
+.TP
+.B \-\-version
+Causes
+.I pdfroff
+to display a version identification message.
+.
+The entire command line is then passed transparently to
+.IR groff ,
+in a
+.I one
+pass operation
+.IR only ,
+in order to display the associated
+.I groff
+version information,
+before exiting.
+.
+.
+.\" ====================================================================
+.SH Environment
+.\" ====================================================================
+.
+The following environment variables may be set,
+and exported,
+to modify the behaviour of
+.IR pdfroff .
+.
+.
+.TP
+.I PDFROFF_COLLATE
+Specifies the program to be used
+for collation of the finished PDF document.
+.
+.
+.IP
+This collation step may be required to move
+.I tables of contents
+to the start of the finished PDF document,
+when formatting with traditional macro packages,
+which print them at the end.
+.
+However,
+users should not normally need to specify
+.IR \%PDFROFF_COLLATE ,
+(and indeed,
+are not encouraged to do so).
+.
+If unspecified,
+.I pdfroff
+uses
+.MR sed @MAN1EXT@
+by default,
+which normally suffices.
+.
+.
+.IP
+If
+.I \%PDFROFF_COLLATE
+.I is
+specified,
+then it must act as a filter,
+accepting a list of file name arguments,
+and write its output to the standard output stream,
+whence it is piped to the
+.IR \%PDFROFF_POSTPROCESSOR_COMMAND ,
+to produce the finished PDF output.
+.
+.
+.IP
+When specifying
+.IR \%PDFROFF_COLLATE ,
+it is normally necessary to also specify
+.IR \%PDFROFF_KILL_NULL_PAGES .
+.
+.
+.IP
+.I \%PDFROFF_COLLATE
+is ignored,
+if
+.I pdfroff
+is invoked with the
+.B \%\-\-no\-kill\-null\-pages
+option.
+.
+.
+.TP
+.I PDFROFF_KILL_NULL_PAGES
+Specifies options to be passed to the
+.I \%PDFROFF_COLLATE
+program.
+.
+.
+.IP
+It should not normally be necessary to specify
+.IR \%PDFROFF_KILL_NULL_PAGES .
+.
+The internal default is a
+.MR sed @MAN1EXT@
+script,
+which is intended to remove completely blank pages
+from the collated output stream,
+and which should be appropriate in most applications of
+.IR pdfroff .
+.
+However,
+if any alternative to
+.MR sed @MAN1EXT@
+is specified for
+.IR \%PDFROFF_COLLATE ,
+then it is likely that a corresponding alternative specification for
+.I \%PDFROFF_KILL_NULL_PAGES
+is required.
+.
+.
+.IP
+As in the case of
+.IR \%PDFROFF_COLLATE ,
+.I \%PDFROFF_KILL_NULL_PAGES
+is ignored,
+if
+.I pdfroff
+is invoked with the
+.B \%\-\-no\-kill\-null\-pages
+option.
+.
+.
+.TP
+.I PDFROFF_POSTPROCESSOR_COMMAND
+Specifies the command to be used for the final document conversion
+from PostScript intermediate output to PDF.
+.
+It must behave as a filter,
+writing its output to the standard output stream,
+and must accept an arbitrary number of
+.I files .\|.\|.\&
+arguments,
+with the special case of
+.RB \[lq] \- \[rq]
+representing the standard input stream.
+.
+.
+.IP
+If unspecified,
+.I \%PDFROFF_POSTPROCESSOR_COMMAND
+defaults to
+.
+.RS 12n
+.EX
+gs \-dBATCH \-dQUIET \-dNOPAUSE \-dSAFER \-sDEVICE=pdfwrite \e
+ \-sOutputFile=\-
+.EE
+.RE
+.
+.
+.TP
+.I GROFF_TMPDIR
+Identifies the directory in which
+.I pdfroff
+should create temporary files.
+.
+If
+.I \%GROFF_TMPDIR
+is
+.I not
+specified,
+then the variables
+.IR TMPDIR ,
+.I TMP
+and
+.I TEMP
+are considered in turn as possible temporary file repositories.
+.
+If none of these are set,
+then temporary files are created
+in the current directory.
+.
+.
+.TP
+.I GROFF_GHOSTSCRIPT_INTERPRETER
+Specifies the program to be invoked when
+.I pdfroff
+converts
+.I groff
+PostScript output to PDF.
+.
+If
+.I \%PDFROFF_POSTPROCESSOR_COMMAND
+is specified,
+then the command name it specifies is
+.I implicitly
+assigned to
+.IR \%GROFF_GHOSTSCRIPT_INTERPRETER ,
+overriding any explicit setting specified in the environment.
+.
+If
+.I \%GROFF_GHOSTSCRIPT_INTERPRETER
+is not specified,
+then
+.I pdfroff
+searches the process
+.IR PATH ,
+looking for a program with any of the well known names
+for the Ghostscript interpreter;
+if no Ghostscript interpreter can be found,
+.I pdfroff
+aborts.
+.
+.
+.TP
+.I GROFF_AWK_INTERPRETER
+Specifies the program to be invoked when
+.I pdfroff
+is extracting reference dictionary entries from a
+.I groff
+intermediate message stream.
+.
+If
+.I \%GROFF_AWK_INTERPRETER
+is not specified,
+then
+.I pdfroff
+searches the process
+.IR PATH ,
+looking for any of the preferred programs,
+.IR gawk ,
+.IR mawk ,
+.IR nawk ,
+and
+.IR awk ,
+in that order;
+if none of these are found,
+.I pdfroff
+issues a warning message,
+and continue processing;
+however,
+in this case,
+no reference dictionary is created.
+.
+.
+.TP
+.I OSTYPE
+Typically defined automatically by the operating system,
+.I \%OSTYPE
+is used on Microsoft Win32/MS-DOS platforms
+.IR only ,
+to infer the default
+.I \%PATH_SEPARATOR
+character,
+which is used when parsing the process
+.I PATH
+to search for external helper programs.
+.
+.
+.TP
+.I PATH_SEPARATOR
+If set,
+.I \%PATH_SEPARATOR
+overrides the default separator character,
+(\[oq]:\[cq] on POSIX/Unix systems,
+inferred from
+.I \%OSTYPE
+on Microsoft Win32/MS-DOS),
+which is used when parsing the process
+.I PATH
+to search for external helper programs.
+.
+.
+.TP
+.I SHOW_PROGRESS
+If this is set to a non-empty value,
+then
+.I pdfroff
+always behaves as if the
+.B \%\-\-report\-progress
+option is specified on the command line.
+.
+.
+.\" ====================================================================
+.SH Files
+.\" ====================================================================
+.
+Input and output files for
+.I pdfroff
+may be named according to any convention of the user's choice.
+.
+Typically,
+input files may be named according to the choice of the principal
+normatting macro package,
+e.g.,
+.RI file .ms
+might be an input file for formatting using the
+.I ms
+macros
+.RI ( s.tmac );
+normally,
+the final output file should be named
+.RI file .pdf .
+.
+.
+.P
+Temporary files created by
+.I pdfroff
+are placed in the file system hierarchy,
+in or below the directory specified by environment variables
+(see section \[lq]Environment\[rq] above).
+.
+If
+.MR mktemp @MAN1EXT@
+is available,
+it is invoked to create a private subdirectory of
+the nominated temporary files directory,
+(with subdirectory name derived from the template
+.IR pdfroff\-XXXXXXXXXX );
+if this subdirectory is successfully created,
+the temporary files will be placed within it,
+otherwise they will be placed directly in the directory
+nominated in the environment.
+.
+.
+.P
+All temporary files themselves
+are named according to the convention
+.IR pdf $$ . *,
+where
+.I $$
+is the standard shell variable representing the process identifier of
+the
+.I pdfroff
+process itself,
+and
+.I *
+represents any of the extensions used by
+.I pdfroff
+to identify the following temporary and intermediate files.
+.
+.
+.TP
+.IR pdf $$ .tmp
+A scratch pad file,
+used to capture reference data emitted by
+.IR groff ,
+during the
+.I reference dictionary
+compilation phase.
+.
+.
+.TP
+.IR pdf $$ .ref
+The
+.IR "reference dictionary" ,
+as compiled in the last but one pass of the
+.I reference dictionary
+compilation phase;
+(at the start of the first pass,
+this file is created empty;
+in successive passes,
+it contains the
+.I reference dictionary
+entries,
+as collected in the preceding pass).
+.
+.
+.IP
+If the
+.BR \%\-\-reference\-dictionary =\c
+.I name
+option is specified,
+this intermediate file becomes permanent,
+and is named
+.IR name ,
+rather than
+.IR pdf $$ .ref .
+.
+.
+.TP
+.IR pdf $$ .cmp
+Used to collect
+.I reference dictionary
+entries during the active pass of the
+.I reference dictionary
+compilation phase.
+.
+At the end of any pass,
+when the content of
+.IR pdf $$ .cmp
+compares as identical to
+.IR pdf $$ .ref ,
+(or the corresponding file named by the
+.BR \%\-\-reference\-dictionary =\c
+.I name
+option),
+then
+.I reference dictionary
+compilation is terminated,
+and the
+.I document reference map
+is appended to this intermediate file,
+for inclusion in the final formatting passes.
+.
+.
+.TP
+.IR pdf $$ .tc
+An intermediate
+.I PostScript
+file,
+in which \[lq]Table of Contents\[rq] entries are collected,
+to facilitate relocation before the body text,
+on ultimate output to the
+.I Ghostscript
+postprocessor.
+.
+.
+.TP
+.IR pdf $$ .ps
+An intermediate
+.I PostScript
+file,
+in which the body text is collected prior to ultimate output to the
+.I Ghostscript
+postprocessor,
+in the proper sequence,
+.I after
+.IR pdf $$ .tc .
+.
+.
+.\" ====================================================================
+.SH Authors
+.\" ====================================================================
+.
+.I pdfroff
+was written by
+.MT keith\:.d\:.marshall@\:ntlworld\:.com
+Keith Marshall
+.ME ,
+who maintains it at
+.UR https://\:osdn\:.net/\:users/\:keith/\:pf/\:\%groff-pdfmark/\
+\:wiki/\:\%FrontPage
+his
+.I groff-pdfmark
+OSDN site
+.UE .
+.
+.IR groff 's
+version may be withdrawn in a future release.
+.
+.
+.\" ====================================================================
+.SH "See also"
+.\" ====================================================================
+.
+.IR "Groff: The GNU Implementation of troff" ,
+by Trent A.\& Fisher and Werner Lemberg,
+is the primary
+.I groff
+manual.
+.
+You can browse it interactively with \[lq]info groff\[rq].
+.
+.
+.P
+Since
+.I pdfroff
+provides a superset of all
+.I groff
+capabilities,
+the above manual,
+or its terser reference page,
+.MR groff @MAN7EXT@
+may also be considered definitive references to all
+.I standard
+capabilities of
+.IR pdfroff ,
+with this document providing the reference to
+.IR pdfroff 's
+extended features.
+.
+.
+.P
+While
+.I pdfroff
+imposes neither any restriction on,
+nor any requirement for,
+the use of any specific
+.I groff
+macro package,
+a number of supplied macro packages,
+and in particular those associated with the package
+.IR \%pdfmark.tmac ,
+are best suited for use with
+.I pdfroff
+as the preferred formatter.
+.
+.
+.TP
+.I @PDFDOCDIR@/\:\%pdfmark.pdf
+\[lq]Portable Document Format Publishing with GNU
+.IR Troff \[rq],
+by Keith Marshall,
+offers detailed documentation on the use of these packages.
+.
+This file,
+together with its source,
+.IR \%pdfmark.ms ,
+is part of the
+.I groff
+distribution.
+.
+.
+.\" Restore compatibility mode (for, e.g., Solaris 10/11).
+.cp \n[*groff_pdfroff_1_man_C]
+.do rr *groff_pdfroff_1_man_C
+.
+.
+.\" Local Variables:
+.\" fill-column: 72
+.\" mode: nroff
+.\" End:
+.\" vim: set filetype=groff textwidth=72:
diff --git a/contrib/pdfmark/pdfroff.sh b/contrib/pdfmark/pdfroff.sh
new file mode 100644
index 0000000..f34c841
--- /dev/null
+++ b/contrib/pdfmark/pdfroff.sh
@@ -0,0 +1,682 @@
+#! /bin/sh
+# ------------------------------------------------------------------------------
+#
+# Function: Format PDF Output from groff Markup
+#
+# Copyright (C) 2005-2021 Free Software Foundation, Inc.
+# Written by Keith Marshall (keith.d.marshall@ntlworld.com)
+#
+# This file is part of groff.
+#
+# groff is free software; 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.
+#
+# groff is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+# ------------------------------------------------------------------------------
+#
+# Set up an identifier for the NULL device.
+# In most cases "/dev/null" will be correct, but some shells on
+# MS-DOS/MS-Windows systems may require us to use "NUL".
+#
+ NULLDEV="/dev/null"
+ test -c $NULLDEV || NULLDEV="NUL"
+#
+# Set up the command name to use in diagnostic messages.
+# (We can't assume we have 'basename', so use the full path if required.
+# Also use the 'exec 2>...' workaround for a bug in Cygwin's 'ash').
+#
+ CMD=`exec 2>$NULLDEV; basename $0` || CMD=$0
+#
+# To ensure that prerequisite helper programs are available, and are
+# executable, a [fairly] portable method of detecting such programs is
+# provided by function 'searchpath'.
+#
+ searchpath(){
+ #
+ # Usage: searchpath progname path
+ #
+ IFS=${PATH_SEPARATOR-":"} prog=':'
+ for dir in $2
+ do
+ for ext in '' '.exe'
+ #
+ # try 'progname' with all well known extensions
+ # (e.g. Win32 may require 'progname.exe')
+ #
+ do
+ try="$dir/$1$ext"
+ test -f "$try" && test -x "$try" && prog="$try" && break
+ done
+ test "$prog" = ":" || break
+ done
+ echo "$prog"
+ }
+# @PATH_SEARCH_SETUP@
+#
+# If the system maps '/bin/sh' to some 'zsh' implementation,
+# then we may need this hack, adapted from autoconf code.
+#
+ test x${ZSH_VERSION+"set"} = x"set" && NULLCMD=":" \
+ && (emulate sh) >$NULLDEV 2>&1 && emulate sh
+#
+# We need both 'grep' and 'sed' programs, to parse script options,
+# and we also need 'cat', to display help and some error messages,
+# so ensure they are all installed, before we continue.
+#
+ CAT=`searchpath cat "$PATH"`
+ GREP=`searchpath grep "$PATH"`
+ SED=`searchpath sed "$PATH"`
+#
+# Another fundamental requirement is the 'groff' program itself;
+# we MUST use a 'groff' program located in 'GROFF_BIN_DIR', if this
+# is specified; if not, we will search 'GROFF_BIN_PATH', only falling
+# back to a 'PATH' search, if neither of these is specified.
+#
+ if test -n "$GROFF_BIN_DIR"
+ then
+ GPATH=GROFF_BIN_DIR
+ GROFF=`searchpath groff "$GROFF_BIN_DIR"`
+#
+ elif test -n "$GROFF_BIN_PATH"
+ then
+ GPATH=GROFF_BIN_PATH
+ GROFF=`searchpath groff "$GROFF_BIN_PATH"`
+#
+ else
+ GPATH=PATH
+ GROFF=`searchpath groff "$PATH"`
+ fi
+#
+# If one or more of these is missing, diagnose and bail out.
+#
+ NO='' NOPROG="$CMD: installation problem: cannot find program"
+ test "$CAT" = ":" && echo >&2 "$NOPROG 'cat' in PATH" && NO="$NO 'cat'"
+ test "$GREP" = ":" && echo >&2 "$NOPROG 'grep' in PATH" && NO="$NO 'grep'"
+ test "$GROFF" = ":" && echo >&2 "$NOPROG 'groff' in $GPATH" && NO="$NO 'groff'"
+ test "$SED" = ":" && echo >&2 "$NOPROG 'sed' in PATH" && NO="$NO 'sed'"
+ if test -n "$NO"
+ then
+ set $NO
+ test $# -gt 1 && NO="s" IS="are" || NO='' IS="is"
+ while test $# -gt 0
+ do
+ test $# -gt 2 && NO="$NO $1,"
+ test $# -eq 2 && NO="$NO $1 and" && shift
+ test $# -lt 2 && NO="$NO $1"
+ shift
+ done
+ $CAT >&2 <<-ETX
+
+ *** FATAL INSTALLATION ERROR ***
+
+ The program$NO $IS required by '$CMD',
+ but cannot be found; '$CMD' is unable to continue.
+
+ ETX
+ exit 1
+ fi
+#
+# Identify the postprocessor command, for writing PDF output.
+# (May be forced, by defining PDFROFF_POSTPROCESSOR_COMMAND in the environment;
+# if this is not set, leave blank to use the built in default).
+#
+ if test -n "${PDFROFF_POSTPROCESSOR_COMMAND}"
+ then
+ GROFF_GHOSTSCRIPT_INTERPRETER=`set command ${PDFROFF_POSTPROCESSOR_COMMAND};
+ echo $2`
+ fi
+#
+# Set up temporary/intermediate file locations, with traps to
+# clean them up on exit. Note that, for greater portability, we
+# prefer to refer to events by number, rather than by symbolic
+# names; thus, the EXIT event is trapped as event zero.
+#
+ export TMPDIR GROFF_TMPDIR
+ TMPDIR=${GROFF_TMPDIR=${TMPDIR-${TMP-${TEMP-"."}}}}
+ if GROFF_TMPDIR=`exec 2>${NULLDEV}; mktemp -dt pdfroff-XXXXXXXXXX`
+ then
+ #
+ # We successfully created a private temporary directory,
+ # so to clean up, we may simply purge it.
+ #
+ trap "rm -rf ${GROFF_TMPDIR}" 0
+ #
+ else
+ #
+ # Creation of a private temporary directory was unsuccessful;
+ # fall back to user nominated directory, (using current directory
+ # as default), and schedule removal of only the temporary files.
+ #
+ GROFF_TMPDIR=${TMPDIR}
+ trap "rm -f ${GROFF_TMPDIR}/pdf$$.*" 0
+ fi
+ #
+ # In the case of abnormal termination events, we force an exit
+ # (with status code '1'), leaving the normal exit trap to clean
+ # up the temporary files, as above. Note that we again prefer
+ # to refer to events by number, rather than by symbolic names;
+ # here we trap SIGHUP, SIGINT, SIGQUIT, SIGPIPE and SIGTERM.
+ #
+ trap "exit 1" 1 2 3 13 15
+#
+ WRKFILE=${GROFF_TMPDIR}/pdf$$.tmp
+#
+ REFCOPY=${GROFF_TMPDIR}/pdf$$.cmp
+ REFFILE=${GROFF_TMPDIR}/pdf$$.ref
+#
+ CS_DATA=""
+ TC_DATA=${GROFF_TMPDIR}/pdf$$.tc
+ BD_DATA=${GROFF_TMPDIR}/pdf$$.ps
+#
+# Initialise 'groff' format control settings,
+# to discriminate table of contents and document body formatting passes.
+#
+ TOC_FORMAT="-rPHASE=1"
+ BODY_FORMAT="-rPHASE=2"
+#
+ LONGOPTS="
+ help reference-dictionary no-reference-dictionary
+ stylesheet pdf-output no-pdf-output
+ version report-progress no-toc-relocation
+ emit-ps keep-temporary-files no-kill-null-pages
+ "
+# Parse the command line, to identify 'pdfroff' specific options.
+# Collect all other parameters into new argument and file lists,
+# to be passed on to 'groff', enforcing the '-Tps' option.
+#
+ DIFF="" STREAM="" INPUT_FILES=""
+ SHOW_VERSION="" GROFF_STYLE="$GROFF -Tps"
+ while test $# -gt 0
+ do
+ case "$1" in
+#
+# Long options must be processed locally ...
+#
+ --*)
+#
+# First identify, matching any abbreviation to its full form.
+#
+ MATCH="" OPTNAME=`IFS==; set dummy $1; echo $2`
+ for OPT in $LONGOPTS
+ do
+ MATCH="$MATCH"`echo --$OPT | $GREP "^$OPTNAME"`
+ done
+#
+# For options in the form --option=value
+# capture any specified value into $OPTARG.
+#
+ OPTARG=`echo $1 | $SED -n s?"^${OPTNAME}="??p`
+#
+# Perform case specific processing for matched option ...
+#
+ case "$MATCH" in
+
+ --help)
+ $CAT <<-ETX
+ Usage: $CMD [-option ...] [--long-option ...] [file ...]
+
+ Options:
+ -h
+ --help
+ Display this usage summary, and exit.
+
+ -v
+ --version
+ Display a version identification message and exit.
+
+ --report-progress
+ Enable console messages, indicating the progress of the
+ PDF document formatting process.
+
+ --emit-ps
+ Emit PostScript output instead of PDF; this may be useful
+ when the ultimate PDF output is to be generated by a more
+ specialised postprocessor, (e.g. gpresent), rather than
+ the default GhostScript PDF writer.
+
+ --pdf-output=name
+ Write the PDF, (or PostScript), output stream to file
+ 'name'; if this option is unspecified, standard output
+ is used for PDF, (or PostScript), output.
+
+ --no-pdf-output
+ Suppress the generation of PDF, (or PostScript), output
+ entirely; use this with the --reference-dictionary option,
+ if processing a document stream to produce only a
+ reference dictionary.
+
+ --no-reference-dictionary
+ Suppress the generation of a '$CMD' reference dictionary
+ for the PDF document. Normally '$CMD' will create a
+ reference dictionary, at the start of document processing;
+ this option can accelerate processing, if it is known in
+ advance, that no reference dictionary is required.
+
+ --reference-dictionary=name
+ Save the document reference dictionary in file 'name'.
+ If 'name' already exists, when processing commences, it
+ will be used as the base case, from which the updated
+ dictionary will be derived. If this option is not used,
+ then the reference dictionary, created during the normal
+ execution of '$CMD', will be deleted on completion of
+ document processing.
+
+ --stylesheet=name
+ Use the file 'name' as a 'groff' style sheet, to control
+ the appearance of the document's front cover section. If
+ this option is not specified, then no special formatting
+ is applied, to create a front cover section.
+
+ --no-toc-relocation
+ Suppress the multiple pass 'groff' processing, which is
+ normally required to position the table of contents at the
+ start of a PDF document.
+
+ --no-kill-null-pages
+ Suppress the 'null page' elimination filter, which is used
+ to remove the excess blank pages produced by the collation
+ algorithm used for 'toc-relocation'.
+
+ --keep-temporary-files
+ Suppress the normal clean up of temporary files, which is
+ scheduled when 'pdfroff' completes.
+
+ ETX
+ exit 0
+ ;;
+
+ --version)
+ GROFF_STYLE="$GROFF_STYLE \"$1\""
+ SHOW_VERSION="GNU pdfroff (groff) version @VERSION@"
+ ;;
+
+ --report-progress)
+ SHOW_PROGRESS=echo
+ ;;
+
+ --keep-temporary-files)
+ trap "" 0
+ ;;
+
+ --emit-ps)
+ PDFROFF_POSTPROCESSOR_COMMAND="$CAT"
+ ;;
+
+ --pdf-output)
+ PDF_OUTPUT="$OPTARG"
+ ;;
+
+ --no-pdf-output)
+ PDF_OUTPUT="$NULLDEV"
+ ;;
+
+ --reference-dictionary)
+ REFFILE="$OPTARG"
+ ;;
+
+ --no-reference-dictionary)
+ AWK=":" DIFF=":" REFFILE="$NULLDEV" REFCOPY="$NULLDEV"
+ ;;
+
+ --stylesheet)
+ STYLESHEET="$OPTARG" CS_DATA=${GROFF_TMPDIR}/pdf$$.cs
+ ;;
+
+ --no-toc-relocation)
+ TC_DATA="" TOC_FORMAT="" BODY_FORMAT=""
+ ;;
+
+ --no-kill-null-pages)
+ PDFROFF_COLLATE="$CAT" PDFROFF_KILL_NULL_PAGES=""
+ ;;
+#
+# any other non-null match must have matched more than one defined case,
+# so report the ambiguity, and bail out.
+#
+ --*)
+ echo >&2 "$CMD: ambiguous abbreviation in option '$1'"
+ exit 1
+ ;;
+#
+# while no match at all simply represents an undefined case.
+#
+ *)
+ echo >&2 "$CMD: unknown option '$1'"
+ exit 1
+ ;;
+ esac
+ ;;
+#
+# A solitary hyphen, as an argument, means "stream STDIN through groff",
+# while the "-i" option means "append STDIN stream to specified input files",
+# so set up a mechanism to achieve this, for ALL 'groff' passes.
+#
+ - | -i*)
+ STREAM="$CAT ${GROFF_TMPDIR}/pdf$$.in |"
+ test "$1" = "-" && INPUT_FILES="$INPUT_FILES $1" \
+ || GROFF_STYLE="$GROFF_STYLE $1"
+ ;;
+#
+# Those standard options which expect an argument, but are specified with
+# an intervening space, between flag and argument, must be reparsed, so we
+# can trap invalid use of '-T dev', or missing input files.
+#
+ -[dfFILmMnoPrTwW])
+ OPTNAME="$1"
+ shift; set reparse "$OPTNAME$@"
+ ;;
+#
+# Among standard options, '-Tdev' is treated as a special case.
+# '-Tps' is automatically enforced, so if specified, is silently ignored.
+#
+ -Tps) ;;
+#
+# No other '-Tdev' option is permitted.
+#
+ -T*) echo >&2 "$CMD: option '$1' is incompatible with PDF output"
+ exit 1
+ ;;
+#
+# '-h' and '-v' options redirect to their equivalent long forms ...
+#
+ -h*) set redirect --help
+ ;;
+#
+ -v*) shift; set redirect --version "$@"
+ ;;
+#
+# All other standard options are simply passed through to 'groff',
+# with no validation beforehand.
+#
+ -*) GROFF_STYLE="$GROFF_STYLE \"$1\""
+ ;;
+#
+# All non-option arguments are considered as possible input file names,
+# and are passed on to 'groff', unaltered.
+#
+ *) INPUT_FILES="$INPUT_FILES \"$1\""
+ ;;
+ esac
+ shift
+ done
+#
+# If the '-v' or '--version' option was specified,
+# then we simply emulate the behaviour of 'groff', with this option,
+# and quit.
+#
+ if test -n "$SHOW_VERSION"
+ then
+ echo >&2 "$SHOW_VERSION"
+ echo >&2; eval $GROFF_STYLE $INPUT_FILES
+ exit $?
+ fi
+#
+# Establish how to invoke 'echo', suppressing the terminating newline.
+# (Adapted from 'autoconf' code, as found in 'configure' scripts).
+#
+ case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+ *c*,*-n*) n='' c='' ;;
+ *c*) n='-n' c='' ;;
+ *) n='' c='\c' ;;
+ esac
+#
+# If STDIN is specified among the input files,
+# or if no input files are specified, then we need to capture STDIN,
+# so we can replay it into each 'groff' processing pass.
+#
+ test -z "$INPUT_FILES" && STREAM="$CAT ${GROFF_TMPDIR}/pdf$$.in |"
+ test -n "$STREAM" && $CAT > ${GROFF_TMPDIR}/pdf$$.in
+#
+# Unless reference resolution is explicitly suppressed,
+# we initiate it by touching the cross reference dictionary file,
+# and initialise the comparator, to kickstart the reference resolver loop.
+#
+ SAY=":"
+ if test -z "$DIFF"
+ then
+ >> $REFFILE
+ echo kickstart > $REFCOPY
+ test x${SHOW_PROGRESS+"set"} = x"set" && SAY=echo
+#
+# In order to correctly resolve 'pdfmark' references,
+# we need to have both the 'awk' and 'diff' programs available.
+#
+ NO=''
+ if test -n "$GROFF_AWK_INTERPRETER"
+ then
+ AWK="$GROFF_AWK_INTERPRETER"
+ test -f "$AWK" && test -x "$AWK" || AWK=":"
+ else
+ for prog in @GROFF_AWK_INTERPRETERS@
+ do
+ AWK=`searchpath $prog "$PATH"`
+ test "$AWK" = ":" || break
+ done
+ fi
+ DIFF=`searchpath diff "$PATH"`
+ test "$AWK" = ":" && echo >&2 "$NOPROG 'awk' in PATH" && NO="$NO 'awk'"
+ test "$DIFF" = ":" && echo >&2 "$NOPROG 'diff' in PATH" && NO="$NO 'diff'"
+ if test -n "$NO"
+ then
+ set $NO
+ SAY=":" AWK=":" DIFF=":"
+ test $# -gt 1 && NO="s $1 and $2 are" || NO=" $1 is"
+ $CAT >&2 <<-ETX
+
+ *** WARNING ***
+
+ The program$NO required, but cannot be found;
+ consequently, '$CMD' is unable to resolve 'pdfmark' references.
+
+ Document processing will continue, but no 'pdfmark' reference dictionary
+ will be compiled; if any 'pdfmark' reference appears in the resulting PDF
+ document, the formatting may not be correct.
+
+ ETX
+ fi
+ fi
+#
+# Run the multi-pass 'pdfmark' reference resolver loop ...
+#
+ $SAY >&2 $n Resolving references ..$c
+ until $DIFF $REFCOPY $REFFILE 1>$NULLDEV 2>&1
+ do
+#
+# until all references are resolved, to yield consistent values
+# in each of two consecutive passes, or until it seems that no consistent
+# resolution is achievable.
+#
+ $SAY >&2 $n .$c
+ PASS_INDICATOR="${PASS_INDICATOR}."
+ if test "$PASS_INDICATOR" = "...."
+ then
+#
+# More than three passes required indicates a probable inconsistency
+# in the source document; diagnose, and bail out.
+#
+ $SAY >&2 " failed"
+ $CAT >&2 <<-ETX
+ $CMD: unable to resolve references consistently after three passes
+ $CMD: the source document may exhibit instability about the reference(s) ...
+ ETX
+#
+# Report the unresolved references, as a diff between the two pass files,
+# preferring 'unified' or 'context' diffs, when available
+#
+ DIFFOPT=''
+ $DIFF -c0 $NULLDEV $NULLDEV 1>$NULLDEV 2>&1 && DIFFOPT='-c0'
+ $DIFF -u0 $NULLDEV $NULLDEV 1>$NULLDEV 2>&1 && DIFFOPT='-u0'
+ $DIFF >&2 $DIFFOPT $REFCOPY $REFFILE
+ exit 1
+ fi
+#
+# Replace the comparison file copy from any previous pass,
+# with the most recently updated copy of the reference dictionary.
+# (Some versions of 'mv' may not support overwriting of an existing file,
+# so remove the old comparison file first).
+#
+ rm -f $REFCOPY
+ mv $REFFILE $REFCOPY
+#
+# Run 'groff' and 'awk', to identify reference marks in the document source,
+# filtering them into the reference dictionary; discard incomplete 'groff' output
+# at this stage.
+#
+ eval $STREAM $GROFF_STYLE -Z 1>$NULLDEV 2>$WRKFILE $REFCOPY $INPUT_FILES
+ $AWK '/^gropdf-info:href/ {$1 = ".pdfhref D -N"; print}' $WRKFILE > $REFFILE
+ done
+ $SAY >&2 " done"
+#
+# To get to here ...
+# We MUST have resolved all 'pdfmark' references, such that the content of the
+# updated reference dictionary file EXACTLY matches the last saved copy.
+#
+# If PDF output has been suppressed, then there is nothing more to do.
+#
+ test "$PDF_OUTPUT" = "$NULLDEV" && exit 0
+#
+# We are now ready to start preparing the intermediate PostScript files,
+# from which the PDF output will be compiled -- but before proceeding further ...
+# let's make sure we have a GhostScript interpreter to convert them!
+#
+ if test -n "$GROFF_GHOSTSCRIPT_INTERPRETER"
+ then
+ GS="$GROFF_GHOSTSCRIPT_INTERPRETER"
+ test -f "$GS" && test -x "$GS" || GS=":"
+ else
+ for prog in @GROFF_GHOSTSCRIPT_INTERPRETERS@
+ do
+ GS=`searchpath $prog "$PATH"`
+ test "$GS" = ":" || break
+ done
+ fi
+#
+# If we could not find a GhostScript interpreter, then we can do no more.
+#
+ if test "$GS" = ":"
+ then
+ echo >&2 "$CMD: installation problem: cannot find GhostScript interpreter"
+ $CAT >&2 <<-ETX
+
+ *** FATAL INSTALLATION ERROR ***
+
+ '$CMD' requires a GhostScript interpreter to convert PostScript to PDF.
+ You do not appear to have one installed; thus, '$CMD' cannot continue.
+
+ ETX
+ exit 1
+ fi
+#
+# We now extend the local copy of the reference dictionary file,
+# to create a full 'pdfmark' reference map for the document ...
+#
+ $AWK '/^grohtml-info/ {print ".pdfhref Z", $2, $3, $4}' $WRKFILE >> $REFCOPY
+#
+# ... appending a dummy map reference, to ensure that at least
+# one such is always present; (this is required, to suppress any
+# further intermediate output to stderr during the "press-ready"
+# runs of groff, for PDF output file production).
+#
+ echo ".pdfhref Z 0 0 0" >> $REFCOPY
+#
+# Evaluate any processing options which may have been specified
+# as a result of parsing the document source ...
+#
+ eval `$SED -n '/^ *pdfroff-option:set */s///p' $WRKFILE`
+#
+# ... (which is currently supported to enable "toc-relocation",
+# only when the document actually relies on it, and if it is not
+# explicitly disabled from the command line) ...
+#
+ if test x${toc_relocation-"auto"} != xenabled
+ then
+#
+# ... thus we reproduce the effect of the "--no-toc-relocation"
+# option, when no enabling request is detected in the document
+# control stream.
+#
+ TC_DATA="" TOC_FORMAT="" BODY_FORMAT=""
+ fi
+#
+# Re-enable progress reporting, if necessary ...
+# (Missing 'awk' or 'diff' may have disabled it, to avoid display
+# of spurious messages associated with reference resolution).
+#
+ test x${SHOW_PROGRESS+"set"} = x"set" && SAY=echo
+#
+# If a document cover style sheet is specified ...
+# then we run a special formatting pass, to create a cover section file.
+#
+ if test -n "$STYLESHEET"
+ then
+ DOT='^\.[ ]*'
+ CS_MACRO=${CS_MACRO-"CS"} CE_MACRO=${CE_MACRO-"CE"}
+ $SAY >&2 $n "Formatting document ... front cover section ..$c"
+ CS_FILTER="$STREAM $SED -n '/${DOT}${CS_MACRO}/,/${DOT}${CE_MACRO}/p'"
+ eval $CS_FILTER $INPUT_FILES | eval $GROFF_STYLE $STYLESHEET - > $CS_DATA
+ $SAY >&2 ". done"
+ fi
+#
+# If table of contents relocation is to be performed (it is, by default),
+# then we run an extra 'groff' pass, to format a TOC intermediate file.
+#
+ if test -n "$TC_DATA"
+ then
+ $SAY >&2 $n "Formatting document ... table of contents ..$c"
+ eval $STREAM $GROFF_STYLE $TOC_FORMAT $REFCOPY $INPUT_FILES > $TC_DATA
+ $SAY >&2 ". done"
+ fi
+#
+# In all cases, a final 'groff' pass is required, to format the document body.
+#
+ $SAY >&2 $n "Formatting document ... body section ..$c"
+ eval $STREAM $GROFF_STYLE $BODY_FORMAT $REFCOPY $INPUT_FILES > $BD_DATA
+ $SAY >&2 ". done"
+#
+# Finally ...
+# Invoke GhostScript as a PDF writer, to bind all of the generated
+# PostScript intermediate files into a single PDF output file.
+#
+ $SAY >&2 $n "Writing PDF output ..$c"
+ if test -z "$PDFROFF_POSTPROCESSOR_COMMAND"
+ then
+ PDFROFF_POSTPROCESSOR_COMMAND="$GS -dQUIET -dBATCH -dNOPAUSE -dSAFER
+ -sDEVICE=pdfwrite -sOutputFile="${PDF_OUTPUT-"-"}
+
+ elif test -n "$PDF_OUTPUT"
+ then
+ exec > $PDF_OUTPUT
+ fi
+#
+# (This 'sed' script is a hack, to eliminate redundant blank pages).
+#
+ ${PDFROFF_COLLATE-"$SED"} ${PDFROFF_KILL_NULL_PAGES-'
+ /%%Page:/{
+ N
+ /%%BeginPageSetup/b again
+ }
+ b
+ :again
+ /%%EndPageSetup/b finish
+ /%%Page:/{
+ N
+ b again
+ }
+ b
+ :finish
+ N
+ /^%%Page:.*\n0 Cg EP$/d
+ '} $TC_DATA $BD_DATA | $PDFROFF_POSTPROCESSOR_COMMAND $CS_DATA -
+ $SAY >&2 ". done"
+#
+# ------------------------------------------------------------------------------
+# $RCSfile$ $Revision$: end of file
diff --git a/contrib/pdfmark/sanitize.tmac b/contrib/pdfmark/sanitize.tmac
new file mode 100644
index 0000000..49feaa9
--- /dev/null
+++ b/contrib/pdfmark/sanitize.tmac
@@ -0,0 +1,170 @@
+.ig
+
+sanitize.tmac
+
+Copyright (C) 2021 Free Software Foundation, Inc.
+ Written by Keith Marshall (keith.d.marshall@ntlworld.com)
+
+This file is part of groff.
+
+groff is free software; 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.
+
+groff is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+..
+.eo
+.de sanitize
+.\" Usage: .sanitize name text ...
+.\"
+.\" Remove designated formatting escape sequences from "text ..."; return
+.\" the sanitized text in a string register, identified by "name".
+.\"
+.\" Begin by initializing the named result as an empty string, bind it to
+.\" an internal reference name, and discard the "name" argument, to leave
+.\" only the text which is to be sanitized, as residual arguments.
+.\"
+. ds \$1
+. als sanitize:result \$1
+. shift
+.
+.\" Initialize a working string register, which we will cyclically reduce
+.\" until it becomes empty, after starting with all of the text passed as
+.\" the residual arguments, and establish its initial length.
+.\"
+. ds sanitize:residual "\$*\"
+. length sanitize:residual.length "\$*\"
+.
+.\" Begin the cyclic reduction loop...
+.\"
+. while \n[sanitize:residual.length] \{\
+. \"
+. \" ...assuming, at the start of each cycle, that the next character
+. \" will not be skipped, and that it will be moved from the residual,
+. \" to the result, as the character-by-character scan proceeds.
+. \"
+. nr sanitize:skip.count 0
+. sanitize:scan.execute
+.
+. \" For each character scanned, we need to check if it matches the
+. \" normal escape character; the check is most readily performed, if
+. \" an alternative escape character is introduced, and when a match
+. \" is found, we prepare to skip an escape sequence.
+. \"
+. ec !
+. if '!*[sanitize:scan.char]'\' .nr sanitize:skip.count 1
+. ec
+. ie \n[sanitize:skip.count] \{\
+. \"
+. \" When a possible escape sequence has been detected, we back it
+. \" up, (in case it isn't recognized, and we need to reinstate its
+. \" content into the result string), then scan ahead to check for
+. \" an identifiable escape sequence...
+. \"
+. rn sanitize:scan.char sanitize:hold
+. sanitize:scan.execute
+. ie d sanitize:esc-\*[sanitize:scan.char] \
+. \"
+. \" ...which we delegate to its appropriate handler, to skip...
+. \"
+. sanitize:esc-\*[sanitize:scan.char]
+.
+. \" ...but, in the case of an unrecognized escape sequence, we copy
+. \" its backed-up content, followed by the character retrieved from
+. \" the current scan cycle, to the result string.
+. \"
+. el .as sanitize:result "\*[sanitize:hold]\*[sanitize:scan.char]\"
+. \}
+.
+. \" When the current scan cycle has retrieved a character, which isn't
+. \" part of any possible escape sequence, we simply copy that character
+. \" to the result string.
+. \"
+. el .as sanitize:result "\*[sanitize:scan.char]\"
+. \}
+.
+.\" Clean up the register space, by deleting all of the string registers,
+.\" and numeric registers, which are designated as temporary, for private
+.\" use within this macro only.
+.\"
+. rm sanitize:hold sanitize:scan.char sanitize:residual sanitize:result
+. rr sanitize:residual.length sanitize:skip.count
+..
+.de sanitize:scan.execute
+.\" Usage (internal): .sanitize:scan.execute
+.\"
+.\" Perform a single-character reduction of sanitize:residual, by copying
+.\" its initial character to sanitize:scan.char, and then deleting it from
+.\" sanitize:residual itself. (Note that we use arithmetic decrementation
+.\" of sanitize:residual.length, rather than repeating the length request
+.\" on sanitize:residual, because reduction WILL fail when there is only
+.\" one character remaining).
+.\"
+. nr sanitize:residual.length -1
+. ds sanitize:scan.char "\*[sanitize:residual]\"
+. substring sanitize:scan.char 0 0
+. substring sanitize:residual 1
+..
+.de sanitize:skip-(
+.\" Usage (internal): .sanitize:skip-(
+.\"
+.\" For any identified escape sequence, with a two-character property name,
+.\" simply skip over the next two characters in the residual string.
+.\"
+. nr sanitize:residual.length -2
+. substring sanitize:residual 2
+..
+.de sanitize:skip-[
+.\" Usage (internal): .sanitize:skip-[
+.\"
+.\" For any identified escape sequence, with an arbitrary-length property
+.\" name, skip following characters in the residual string, until we find
+.\" a terminal "]" character, or we exhaust the residual.
+.\"
+. while \n[sanitize:skip.count] \{\
+. sanitize:scan.execute
+. ie \n[sanitize:residual.length] \{\
+. \" We haven't yet exhausted the residual; if we find a nested "["
+. \" character, increment the nesting level, otherwise decrement it
+. \" for each "]"; it will become zero at the terminal "]".
+. \"
+. ie '\*[sanitize:scan.char]'[' .nr sanitize:skip.count +1
+. el .if '\*[sanitize:scan.char]']' .nr sanitize:skip.count -1
+. \}
+. \" Stop unconditionally, if we do exhaust the residual.
+. \"
+. el .nr sanitize:skip.count 0
+. \}
+..
+.de sanitize:esc-generic
+.\" Usage: .sanitize:esc-X
+.\"
+.\" (X represents any legitimate single-character escape sequence id).
+.\"
+.\" Handler for skipping "\X" sequences, in text which is to be sanitized;
+.\" this will automatically detect sequences conforming to any of the forms
+.\" "\Xc", "\X(cc", or "\X[...]", and will handle each appropriately. The
+.\" implementation is generic, and may be aliased to handle any specific
+.\" escape sequences, which exhibit similar semantics.
+.\"
+. sanitize:scan.execute
+. if d sanitize:skip-\*[sanitize:scan.char] \
+. sanitize:skip-\*[sanitize:scan.char]
+..
+.ec
+.\" Map the generic handler to specific escape sequences, as required.
+.\"
+.als sanitize:esc-F sanitize:esc-generic
+.\" Local Variables:
+.\" mode: nroff
+.\" End:
+.\" vim: filetype=groff:
+.\" sanitize.tmac: end of file
diff --git a/contrib/pdfmark/spdf.tmac b/contrib/pdfmark/spdf.tmac
new file mode 100644
index 0000000..130d8bd
--- /dev/null
+++ b/contrib/pdfmark/spdf.tmac
@@ -0,0 +1,328 @@
+.ig
+
+spdf.tmac
+
+Binding macros for use of "-m pdfmark" in conjunction with "-ms".
+
+
+Copyright (C) 2004-2021 Free Software Foundation, Inc.
+ Written by Keith Marshall (keith.d.marshall@ntlworld.com)
+
+This file is part of groff.
+
+groff is free software; 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.
+
+groff is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+..
+.\" Bindings
+.\" ========
+.\"
+.\" Generic output mode control flag; pdfmark.tmac will bind this to
+.\" its own internal PDFOPMODE flag.
+.\"
+.if !r OPMODE .nr OPMODE 1
+.\"
+.mso s.tmac
+.mso sanitize.tmac
+.mso pdfmark.tmac
+.
+.\" Establish a handler to clean up output context, at end of document.
+.\"
+.de pdf@exit em
+. if \\n[OPMODE] .pdfsync
+. pg@end-text
+.em pdf@exit
+.
+.
+.\" Omitted Sections
+.\" ================
+.\"
+.\" Define section markers, for special document sections,
+.\" which are to be omitted from regular document processing.
+.\"
+.\" .OMIT <name1> <name2>
+.\"
+.\" Defines a pair of macros, <name1> and <name2>, such that execution
+.\" of .<name1> marks the start of a block of troff input which should
+.\" be ignored; this block ends, on execution of .<name2>
+.\"
+.de OMIT OMIT
+. de \\$1
+. omit@begin \\$1 \\$2
+. .
+. de \\$2
+. omit@end \\$1 \\$2
+. .
+.\" Definition of the OMIT macro itself, ends when it is first used,
+.\" to identify an omitted section marker macro pair.
+.\"
+.OMIT CS CE \" front cover text, processed independently
+.OMIT MS ME \" menu definitions, for info documents only
+.
+.\" Actual omission is initiated by recording the name of the block
+.\" start macro, followed by injection of an "ig" request...
+.\"
+.de omit@begin
+. ds omit@section \\$1
+\. ig \\$2
+..
+.\" ...and terminates with verification that the end macro matches
+.\" the start macro, and removal of the start macro record; (error
+.\" reporting uses the "@error" macro, from s.tmac).
+.\"
+.de omit@end
+. if !'\\*[omit@section]'\\$1' .@error \\$2 without \\$1
+. rm omit@section
+..
+.
+.\" Document Outlines, and Section Headings
+.\" =======================================
+.\"
+.\" .XH [-N <name>] [-S] [-X] <outline-level> <heading-text> ...
+.\" .XN [-N <name>] [-S] [-X] <heading-text> ...
+.\"
+.\" Use after SH, and XN <n> respectively, to define text to be set
+.\" within the section heading, as a PDF document ouline entry, and
+.\" optionally, as a table of contents entry.
+.\"
+.\" Options:
+.\" -N <name> Assigns <name> as a pdfhref destination,
+.\" and associates it with the heading.
+.\"
+.\" -S Strip troff font-change escapes from the
+.\" text copied to the document outline.
+.\"
+.\" -X Force pdfhref destination assignment; if
+.\" -N <name> is unspecified, use first word
+.\" of <heading-text> as <name>.
+.\"
+.\" Arguments:
+.\" <outline-level> The nesting level of the heading, within
+.\" the document outline, and TOC. Required
+.\" for XH; inferred from NH <n>, for XN.
+.\"
+.\" <heading-text> Text (required) to appear within each of
+.\" the section heading, document outline,
+.\" and (optionally) TOC.
+.\"
+.\" Hooks:
+.\" XH-INIT User-defined macro, called on entry to XH;
+.\" used to specify initialization state which
+.\" may be needed after using SH; e.g. specify
+.\" a PDFHREF.INFO state without incorporation
+.\" of any "section" references.
+.\"
+.\" XN-INIT User-defined macro, called on entry to XN;
+.\" used to specify initialization state which
+.\" may be needed after using NH; e.g. specify
+.\" a PDFHREF.INFO state which may incorporate
+.\" "section" references.
+.\"
+.\" XH-UPDATE-TOC User-defined macro, called by both XH, and
+.\" XN; (there is no XN-UPDATE-TOC). Must be
+.\" defined, if a TOC entry is to be generated
+.\" by either XH, or XN; the format of such a
+.\" TOC entry is determined by the definition
+.\" of this macro.
+.\"
+.\" Our replacements for both XH, and XN macros share a common entry
+.\" point; we map both to their respective replacement hooks, so that
+.\" we may continue to take advantage of setup logic in s.tmac. When
+.\" these are eventually invoked, they will have been renamed so that
+.\" they replace XH, and XH respectively.
+.\"
+.de XH-REPLACEMENT als
+.als XN-REPLACEMENT XH-REPLACEMENT
+.\" FIXME: within s.tmac, the heading level established by the most
+.\" recent prior invocation of the NH macro is tracked by the "nh*hl"
+.\" private register; perhaps s.tmac could expose this more publicly,
+.\" as by this ostensibly read-only alias, since we need it to keep
+.\" PDF document outlines in synchronization with NH level...
+.\"
+.\" .aln .NH nh*hl
+.\"
+.\" ...but maybe a local "belt and braces" approach is better anyway,
+.\" to insulate "nh*hl" from possible abuse of our ".NH" register, by
+.\" any users who may be determined to shoot themselves in the foot!
+.\"
+.ie r nh*hl .nr spdf:nh*hl \n[nh*hl]
+.el .nr spdf:nh*hl 0
+.am @NH
+. nr spdf:nh*hl \\n[nh*hl]
+..
+.aln .NH spdf:nh*hl
+.
+.\" The common entry point for both XH, and XN, handles initialization,
+.\" and interpretation of any specified options, before handing over to
+.\" one of two distinct formatting helper macros, which are specific to
+.\" the XH, and XN implementations respectively.
+.\"
+.am XH-REPLACEMENT \" thus serving as implementation for both XH and XN
+.\"
+.\" The user is expected to furnish the XH-INIT, XH-UPDATE-TOC, and
+.\" XN-INIT handlers. (Note that the XH-UPDATE-TOC hook serves both
+.\" XH and XN; there is no separate XN-UPDATE-TOC). A suitable stub
+.\" for each is provided by s.tmac; we have no need to replace them.
+.\"
+. \\$0-INIT
+. rm spdf:refname
+. als spdf:bm.define spdf:bm.basic
+. while d spdf:XH\\$1 \{\
+. spdf:XH\\$1 \\$*
+. shift \\n[spdf:argc]
+. \}
+. rr spdf:argc
+. if '\\$1'--' .shift
+. spdf:\\$0.format \\$@
+..
+.\" Interpret the "-N <name>" option...
+.\"
+.de spdf:XH-N
+. ds spdf:refname \\$2
+. nr spdf:argc 2
+..
+.\" ...the "-X" option, and...
+.\"
+.de spdf:XH-X
+. if !d spdf:refname .ds spdf:refname \\\\$1
+. nr spdf:argc 1
+..
+.\" ...the "-S" option.
+.\"
+.de spdf:XH-S
+. als spdf:bm.define sanitize
+. nr spdf:argc 1
+..
+.\" By default, when the "-S" option is not specified, the text
+.\" incorporated into the PDF document outline will be a simple
+.\" verbatim copy of the arguments.
+.\"
+.de spdf:bm.basic
+. shift \" ignore \$1; it should always be "spdf:bm.text"
+. ds spdf:bm.text "\\$*\"
+..
+.\" After initialization, and interpretation of options, the XH
+.\" and XN implementations diverge, into this helper macro, which
+.\" is specific to the XH implementation...
+.\"
+.de spdf:XH.format
+. XH-UPDATE-TOC \\$@
+. ds spdf:bm.argv \\$1
+. shift \" finalization doesn't want the outline level in \$1
+. spdf:XH.finalize \\$@
+..
+.\" ...and this, which is specific to XN...
+.\"
+.de spdf:XN.format
+. ds spdf:bm.argv \\n[.NH] \\*[SN]
+. XH-UPDATE-TOC \\n[.NH] \\*[SN] \\$@
+. spdf:XH.finalize \\$@
+..
+.\" ...before ultimately converging back into this finalization
+.\" macro, which is once again common to both XH and XN.
+.\"
+.de spdf:XH.finalize
+. spdf:bm.define spdf:bm.text "\\$*"
+. if d spdf:refname .pdfhref M -X -N \\*[spdf:refname] -- \\$@
+. pdfhref O \\*[spdf:bm.argv] \\*[spdf:bm.text]
+. rm spdf:refname spdf:bm.argv spdf:bm.text
+. nop \\$*
+..
+.
+.\" Cross-Reference Marshalling
+.\" ===========================
+.\"
+.\" s.tmac provides the "pg@bottom" macro, which has already
+.\" been installed as a page transition trap. To ensure proper
+.\" mapping of "pdfhref" links which overflow the bottom of any
+.\" page, we need to install the "pdfhref" page transition hook,
+.\" as an addendum to this macro.
+.
+.pdfhref I -PT pg@bottom
+.
+.
+.\" Phased Output Control
+.\" =====================
+.\"
+.\" Segregate output of table of contents, and document body text,
+.\" into two distinct output phases, to facilitate assembly of the
+.\" aggregate document in the correct order, particularly when the
+.\" TOC is generated at the end, by the default "ms" mechanism.
+.\"
+.nr PDF-TOC-ONLY 1
+.nr PDF-BODY-TEXT 2
+.\"
+.\" .OP [<output-phase>]
+.\"
+.\" If the user-specified PHASE numeric register has been defined,
+.\" and its value matches the <output-phase> argument value, (or if
+.\" no <output-phase> argument is specified), then set the OPMODE
+.\" control flag to one, and activate groff's "pen-down" mode.
+.\"
+.\" Otherwise, if <output-phase> is specified, but does NOT match
+.\" PHASE, set OPMODE to zero, and select "pen-up" mode.
+.\"
+.\" Alternatively, if PHASE has not been defined, unconditionally
+.\" set OPMODE to one, and leave groff's pen state unchanged.
+.\"
+.de OP
+.ie r PHASE \{\
+. ie \\n(.$ \{\
+. nr op:request 0
+. while \\n(.$ \{\
+. if \\$1=\\n[PHASE] .nr op:request 1
+. shift
+. \}
+. \}
+. el .nr op:request 1
+. if !\\n[op:request]=\\n[OPMODE] \{\
+. nr OPMODE \\n[op:request]
+. nop \O[\\n[OPMODE]]\c
+. \}
+. \}
+.el .nr OPMODE 1
+..
+.
+.\" Table of Contents Generation
+.\" ============================
+.\"
+.\" .TC [no]
+.\"
+.\" Replaces (and emulates) the TC macro, from s.tmac, to ensure
+.\" that the pdfmark document outline cache is flushed, before TOC
+.\" generation commences, that an outline reference is added for the
+.\" TOC itself, and that pdfroff TOC relocation mode is enabled, for
+.\" the TOC output phase of document production.
+.\"
+.de TC
+. pdfsync O
+. P1
+. OP \n[PDF-TOC-ONLY]
+. pg@begin 1 i
+. if !\\n[PHASE] .tm pdfroff-option:set toc_relocation=enabled
+. if \\n[OPMODE] \{\
+. pdfhref O -T T 1 "\\*[TOC]"
+. pdfsync O
+. \}
+. PX \\$1
+..
+.
+.\" Initialize the default output state, for production of "body-text".
+.\"
+.OP \n[PDF-BODY-TEXT]
+.
+.\" Local Variables:
+.\" mode: nroff
+.\" End:
+.\" vim: filetype=groff:
+.\" spdf.tmac: end of file
diff --git a/contrib/pic2graph/pic2graph.1.man b/contrib/pic2graph/pic2graph.1.man
new file mode 100644
index 0000000..f3c1c1e
--- /dev/null
+++ b/contrib/pic2graph/pic2graph.1.man
@@ -0,0 +1,234 @@
+.TH pic2graph @MAN1EXT@ "@MDATE@" "groff @VERSION@"
+.SH Name
+pic2graph \- convert a
+.I pic
+diagram into a cropped image
+.
+.
+.\" ====================================================================
+.\" Legal Terms
+.\" ====================================================================
+.\"
+.\" This documentation is released to the public domain.
+.
+.
+.\" Save and disable compatibility mode (for, e.g., Solaris 10/11).
+.do nr *groff_pic2graph_1_man_C \n[.cp]
+.cp 0
+.
+.\" Define fallback for groff 1.23's MR macro if the system lacks it.
+.nr do-fallback 0
+.if !\n(.f .nr do-fallback 1 \" mandoc
+.if \n(.g .if !d MR .nr do-fallback 1 \" older groff
+.if !\n(.g .nr do-fallback 1 \" non-groff *roff
+.if \n[do-fallback] \{\
+. de MR
+. ie \\n(.$=1 \
+. I \%\\$1
+. el \
+. IR \%\\$1 (\\$2)\\$3
+. .
+.\}
+.rr do-fallback
+.
+.
+.\" ====================================================================
+.SH Synopsis
+.\" ====================================================================
+.
+.SY pic2graph
+.RB [ \-unsafe ]
+.RB [ \-format\~\c
+.IR output-format ]
+.RB [ \-eqn\~\c
+.IR delimiters ]
+.RI [ convert-argument \~.\|.\|.]
+.YS
+.
+.
+.SY pic2graph
+.B \-\-help
+.YS
+.
+.
+.SY pic2graph
+.B \-v
+.
+.SY pic2graph
+.B \-\-version
+.YS
+.
+.
+.\" ====================================================================
+.SH Description
+.\" ====================================================================
+.
+.I pic2graph
+reads a
+.MR @g@pic @MAN1EXT@
+program from the standard input and writes an image file,
+by default in Portable Network Graphics (PNG) format,
+to the standard output.
+.
+It furthermore translates
+.MR @g@eqn @MAN1EXT@
+constructs, so it can be used for generating images of mathematical
+formulae.
+.
+.
+.PP
+The input PIC code should
+.I not
+be wrapped with the
+.B .PS
+and
+.BR .PE / .PF
+macros that normally guard it within
+.MR groff @MAN1EXT@
+documents.
+.
+.
+.\" FIXME: How old? This text hasn't been touched since 2008 at latest.
+.\" Older versions of
+.\" .I \%convert
+.\" will produce a black-on-white graphic; newer ones may produce a
+.\" black-on-transparent graphic.
+.
+.PP
+Arguments not recognized by
+.I pic2graph
+are passed to the ImageMagick or GraphicsMagick program
+.MR convert 1 .
+.
+.
+By specifying these, you can give your image a border,
+.\" Transparent backgrounds are the default in 2018.
+.\" force the background transparent,
+set the image's pixel density,
+or perform other useful transformations.
+.
+.
+.PP
+The output image is clipped using
+.IR \%convert 's
+.B \-trim
+option to the smallest possible bounding box that contains all the black
+pixels.
+.
+.
+.\" ====================================================================
+.SH Options
+.\" ====================================================================
+.
+.B \-\-help
+displays a usage message,
+while
+.B \-v
+and
+.B \-\-version
+show version information;
+all exit afterward.
+.
+.TP
+.BI \-eqn\~ delimiters
+Use
+.I delimiters
+as the opening and closing
+characters that delimit
+.I @g@eqn
+directives;
+the default is \(lq$$\(rq.
+.
+The option argument
+.I delimiters
+should be a two-character string,
+but an empty string (\(dq\(dq) is accepted as a directive to disable
+.I @g@eqn
+processing.
+.
+.
+.TP
+.BI \-format\~ output-format
+Write the image in
+.IR output-format ,
+which must be understood by
+.IR \%convert ;
+the default is PNG.
+.
+.
+.TP
+.B \-unsafe
+Run
+.I groff
+in
+.I unsafe
+mode, enabling the PIC command
+.B sh
+to execute arbitrary Unix shell commands.
+.
+The
+.I groff
+default is to forbid this.
+.
+.
+.\" ====================================================================
+.SH Environment
+.\" ====================================================================
+.
+.TP
+.I \%GROFF_TMPDIR
+.TQ
+.I \%TMPDIR
+.TQ
+.I TMP
+.TQ
+.I TEMP
+These environment variables are searched in the given order to determine
+the directory where temporary files will be created.
+.
+If none are set,
+.I /tmp
+is used.
+.
+.
+.\" ====================================================================
+.SH Authors
+.\" ====================================================================
+.
+.I pic2graph
+was written by
+.MT esr@\:thyrsus\:.com
+Eric S.\& Raymond
+.ME ,
+based on a recipe by W.\& Richard Stevens.
+.
+.
+.\" ====================================================================
+.SH "See also"
+.\" ====================================================================
+.
+W.\& Richard Stevens,
+.UR http://\:www\:.kohala\:.com/\:start/\:troff/\:pic2html\:.html
+.I Turning PIC into HTML
+.UE
+.
+.
+.PP
+.MR eqn2graph @MAN1EXT@ ,
+.MR grap2graph @MAN1EXT@ ,
+.MR @g@pic @MAN1EXT@ ,
+.MR @g@eqn @MAN1EXT@ ,
+.MR groff @MAN1EXT@ ,
+.MR convert 1
+.
+.
+.\" Restore compatibility mode (for, e.g., Solaris 10/11).
+.cp \n[*groff_pic2graph_1_man_C]
+.do rr *groff_pic2graph_1_man_C
+.
+.
+.\" Local Variables:
+.\" fill-column: 72
+.\" mode: nroff
+.\" End:
+.\" vim: set filetype=groff textwidth=72:
diff --git a/contrib/pic2graph/pic2graph.am b/contrib/pic2graph/pic2graph.am
new file mode 100644
index 0000000..9788270
--- /dev/null
+++ b/contrib/pic2graph/pic2graph.am
@@ -0,0 +1,40 @@
+# Copyright (C) 2001-2020 Free Software Foundation, Inc.
+#
+# This file is part of groff.
+#
+# groff is free software; 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.
+#
+# groff is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+# pic2graph.am
+#
+
+pic2graph_srcdir = $(top_srcdir)/contrib/pic2graph
+man1_MANS += contrib/pic2graph/pic2graph.1
+bin_SCRIPTS += pic2graph
+EXTRA_DIST += \
+ contrib/pic2graph/pic2graph.sh \
+ contrib/pic2graph/pic2graph.1.man
+
+pic2graph: $(pic2graph_srcdir)/pic2graph.sh
+ $(AM_V_GEN)sed -e "s|[@]g[@]|$(g)|g" \
+ -e "s|[@]VERSION[@]|$(VERSION)|" \
+ -e $(SH_SCRIPT_SED_CMD) $(pic2graph_srcdir)/pic2graph.sh \
+ >$@ \
+ && chmod +x $@
+
+
+# Local Variables:
+# fill-column: 72
+# mode: makefile-automake
+# End:
+# vim: set autoindent filetype=automake textwidth=72:
diff --git a/contrib/pic2graph/pic2graph.sh b/contrib/pic2graph/pic2graph.sh
new file mode 100644
index 0000000..b229914
--- /dev/null
+++ b/contrib/pic2graph/pic2graph.sh
@@ -0,0 +1,122 @@
+#! /bin/sh
+#
+# pic2graph -- compile PIC image descriptions to bitmap images
+#
+# by Eric S. Raymond <esr@thyrsus.com>, July 2002
+
+# In Unixland, the magic is in knowing what to string together...
+#
+# Take a pic/eqn diagram on stdin, emit cropped bitmap on stdout.
+# The pic markup should *not* be wrapped in .PS/.PE, this script will do that.
+# An -unsafe option on the command line enables gpic/groff "unsafe" mode.
+# A -format FOO option changes the image output format to any format
+# supported by convert(1). An -eqn option changes the eqn delimiters.
+# All other options are passed to convert(1). The default format in PNG.
+#
+# Requires the groff suite and the ImageMagick tools. Both are open source.
+# This code is released to the public domain.
+#
+# Here are the assumptions behind the option processing:
+#
+# 1. Only the -U option of gpic(1) is relevant. -C doesn't matter because
+# we're generating our own .PS/.PE, -[ntcz] are irrelevant because we're
+# generating Postscript.
+#
+# 2. Ditto for groff(1), though it's a longer and more tedious demonstration.
+#
+# 3. Many options of convert(1) are potentially relevant (especially
+# -density, -interlace, -transparency, -border, and -comment).
+#
+# Thus, we pass -U to gpic and groff, and everything else to convert(1).
+#
+# We don't have complete option coverage on eqn because this is primarily
+# intended as a pic translator; we can live with eqn defaults.
+#
+groffpic_opts=""
+convert_opts=""
+convert_trim_arg="-trim"
+format="png"
+eqndelim='$$'
+
+while [ "$1" ]
+do
+ case $1 in
+ -unsafe)
+ groffpic_opts="-U";;
+ -format)
+ format=$2
+ shift;;
+ -eqn)
+ eqndelim=$2
+ shift;;
+ -v | --version)
+ echo "GNU pic2graph (groff) version @VERSION@"
+ exit 0;;
+ --help)
+ echo "usage: pic2graph [ option ...] < in > out"
+ exit 0;;
+ *)
+ convert_opts="$convert_opts $1";;
+ esac
+ shift
+done
+
+if [ "$eqndelim" ]
+then
+ eqndelim="delim $eqndelim"
+fi
+
+# create temporary directory
+tmp=
+for d in "$GROFF_TMPDIR" "$TMPDIR" "$TMP" "$TEMP" /tmp
+do
+ test -n "$d" && break
+done
+
+if ! test -d "$d"
+then
+ echo "$0: error: temporary directory \"$d\" does not exist or is" \
+ "not a directory" >&2
+ exit 1
+fi
+
+if ! tmp=`(umask 077 && mktemp -d -q "$d/pic2graph-XXXXXX") 2> /dev/null`
+then
+ # mktemp failed--not installed or is a version that doesn't support those
+ # flags? Fall back to older method which uses more predictable naming.
+ #
+ # $RANDOM is a Bashism. The fallback of $PPID is not good pseudorandomness,
+ # but is supported by the stripped-down dash shell, for instance.
+ tmp="$d/pic2graph$$-${RANDOM:-$PPID}"
+ (umask 077 && mkdir "$tmp") 2> /dev/null
+fi
+
+if ! test -d "$tmp"
+then
+ echo "$0: error: cannot create temporary directory \"$tmp\"" >&2
+ exit 1
+fi
+
+# See if the installed version of convert(1) is new enough to support the -trim
+# option. Versions that didn't were described as "old" as early as 2008.
+is_convert_recent=`convert -help | grep -e -trim`
+if test -z "$is_convert_recent"
+then
+ echo "$0: warning: falling back to old '-crop 0x0' trim method" >&2
+ convert_trim_arg="-crop 0x0"
+fi
+
+trap 'exit_status=$?; rm -rf "$tmp" && exit $exit_status' EXIT INT TERM
+
+# Here goes:
+# 1. Wrap the input in dummy .PS/PE macros (and add possibly null .EQ/.EN)
+# 2. Process through eqn and pic to emit troff markup.
+# 3. Process through groff to emit Postscript.
+# 4. Use convert(1) to crop the PostScript and turn it into a bitmap.
+(echo ".EQ"; echo $eqndelim; echo ".EN"; echo ".PS"; cat; echo ".PE") | \
+ groff -e -p $groffpic_opts -Tps -P-pletter > "$tmp"/pic2graph.ps \
+ && convert $convert_trim_arg $convert_opts "$tmp"/pic2graph.ps \
+ "$tmp"/pic2graph.$format \
+ && cat "$tmp"/pic2graph.$format
+
+# End
diff --git a/contrib/rfc1345/COPYRIGHT b/contrib/rfc1345/COPYRIGHT
new file mode 100644
index 0000000..9f3b859
--- /dev/null
+++ b/contrib/rfc1345/COPYRIGHT
@@ -0,0 +1,23 @@
+Copyright (c) 2021 Dorai Sitaram
+
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the "Software"), to deal in the Software without
+restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice (including
+the next paragraph) shall be included in all copies or
+substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
diff --git a/contrib/rfc1345/groff_rfc1345.7.man b/contrib/rfc1345/groff_rfc1345.7.man
new file mode 100644
index 0000000..c04cad9
--- /dev/null
+++ b/contrib/rfc1345/groff_rfc1345.7.man
@@ -0,0 +1,265 @@
+.TH groff_rfc1345 @MAN7EXT@ "@MDATE@" "groff @VERSION@"
+.SH Name
+groff_rfc1345 \- special character names from RFC 1345 and Vim digraphs
+.
+.
+.\" ====================================================================
+.\" Legal Terms
+.\" ====================================================================
+.\"
+.\" Copyright (c) 2021 Dorai Sitaram
+.\"
+.\" Permission is hereby granted, free of charge, to any person
+.\" obtaining a copy of this software and associated documentation files
+.\" (the "Software"), to deal in the Software without restriction,
+.\" including without limitation the rights to use, copy, modify, merge,
+.\" publish, distribute, sublicense, and/or sell copies of the Software,
+.\" and to permit persons to whom the Software is furnished to do so,
+.\" subject to the following conditions:
+.\"
+.\" The above copyright notice and this permission notice (including the
+.\" next paragraph) shall be included in all copies or substantial
+.\" portions of the Software.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+.\" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+.\" NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+.\" BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+.\" ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+.\" CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+.\" SOFTWARE.
+.
+.
+.\" Save and disable compatibility mode (for, e.g., Solaris 10/11).
+.do nr *groff_groff_rfc1345_7_man_C \n[.cp]
+.cp 0
+.
+.\" Define fallback for groff 1.23's MR macro if the system lacks it.
+.nr do-fallback 0
+.if !\n(.f .nr do-fallback 1 \" mandoc
+.if \n(.g .if !d MR .nr do-fallback 1 \" older groff
+.if !\n(.g .nr do-fallback 1 \" non-groff *roff
+.if \n[do-fallback] \{\
+. de MR
+. ie \\n(.$=1 \
+. I \%\\$1
+. el \
+. IR \%\\$1 (\\$2)\\$3
+. .
+.\}
+.rr do-fallback
+.
+.
+.\" ====================================================================
+.SH Description
+.\" ====================================================================
+.
+The file
+.I rfc1345.tmac
+defines special character escape sequences for
+.MR groff @MAN7EXT@
+based on the glyph mnemonics specified in RFC 1345 and the digraph table
+of the text editor Vim.
+.
+Each escape sequence translates to a Unicode code point,
+and will render correctly if the underlying font is a Unicode font that
+covers the code point.
+.
+.
+.PP
+For example,
+.RB \[lq] \[rs][Rx] \[rq]
+is the \[lq]recipe\[rq] or \[lq]prescription take\[rq] symbol,
+and maps to the code point U+211E.
+.
+.I groff
+lets you write it as
+.RB \[lq] \[rs][u211E] \[rq],
+but
+.RB \[lq] \[rs][Rx] \[rq]
+is more mnemonic.
+.
+.
+.PP
+For a list of the glyph names provided,
+please see the file
+.IR rfc1345.tmac ,
+which contains definitions of the form
+.
+.RS
+.EX
+\&.char \[rs][Rx] \[rs][u211E] \[rs]" PRESCRIPTION TAKE
+.EE
+.RE
+.
+where
+.BR .char 's
+first argument defines a
+.I groff
+special character escape sequence with a mnemonic glyph name,
+its second argument is a special character escape sequence based on the
+code point,
+and the comment describes the glyph defined.
+.
+.
+.PP
+The RFC 1345 glyph names cover a wide range of Unicode code points,
+including
+supplemental Latin,
+Greek,
+Cyrillic,
+Hebrew,
+Arabic,
+Hiragana,
+Katakana,
+and Bopomofo letters,
+punctuation,
+math notation,
+currency
+symbols,
+industrial and entertainment icons,
+and box-drawing symbols.
+.
+.
+.PP
+The Vim digraph table is practically a subset of RFC 1345
+(being limited to two-character mnemonics),
+but,
+as a newer implementation,
+adds four mnemonics not specified in the RFC
+(the horizontal ellipsis,
+the Euro sign,
+and two mappings for the rouble sign).
+.
+These have also been added to
+.IR rfc1345.tmac .
+.
+.
+.PP
+.I rfc1345.tmac
+contains a total of 1,696 glyph names.
+.
+It is not an
+error to load
+.I rfc1345.tmac
+if your font does not have all the glyphs,
+as long as it contains the glyphs that you actually use in your
+document.
+.
+.
+.PP
+The RFC 1345 mnemonics are not identical in every case to the mappings
+for special character glyph names that are built in to
+.IR groff ;
+for example,
+.RB \[lq] \[rs][<<] \[rq]
+means the \[lq]much less than\[rq] sign (U+226A) when
+.I rfc1345.tmac
+is not loaded and this special character is not otherwise defined by a
+document or macro package.
+.
+.I rfc1345.tmac
+redefines
+.RB \[lq] \[rs][<<] \[rq]
+to the \[lq]left-pointing double angle quotation mark\[rq] (U+00AB).
+.
+See
+.MR groff_char @MAN7EXT@
+for the full list of predefined special character escape sequences.
+.
+.
+.\" ====================================================================
+.SS Usage
+.\" ====================================================================
+.
+Load the
+.I rfc1345.tmac
+file.
+.
+This can be done by either adding
+.RB \[lq] ".mso rfc1345.tmac" \[rq]
+to your document before the first use of any of the glyph names the
+macro file defines,
+or by using the
+.MR @g@troff @MAN1EXT@
+option
+.RB \[lq] "\-m rfc1345" \[rq]
+from the shell.
+.
+.
+.\" ====================================================================
+.SS Bugs
+.\" ====================================================================
+.
+As the
+.I groff
+Texinfo manual notes,
+\[lq][o]nly the current font is checked for ligatures and kerns;
+neither special fonts nor entities defined with the
+.B char
+request
+(and its siblings)
+are taken into account.\[rq]
+.
+Many of the characters defined in
+.I rfc1345.tmac
+are accented Latin letters,
+and will be affected by this deficiency,
+.UR https://\:savannah\:.gnu\:.org/\:bugs/\:?59932
+producing subpar typography
+.UE .
+.
+.
+.\" ====================================================================
+.SH Files
+.\" ====================================================================
+.
+.TP
+.I @MACRODIR@/\:rfc1345\:.tmac
+implements the character mappings.
+.
+.
+.\" ====================================================================
+.SH Authors
+.\" ====================================================================
+.
+.I rfc1345\:.tmac
+was contributed by
+.MT ds26gte@\:yahoo\:.com
+Dorai Sitaram
+.ME .
+.
+.
+.\" ====================================================================
+.SH "See also"
+.\" ====================================================================
+.
+.UR https://\:tools\:.ietf\:.org/\:html/\:rfc1345
+RFC 1345
+.UE ,
+by Keld Simonsen,
+June 1992.
+.
+.
+.PP
+The Vim digraph table can be listed using the
+.MR vim 1
+command
+.RB \[lq] ":help \%digraph\-table" \[rq].
+.
+.
+.PP
+.MR groff_char @MAN7EXT@
+.
+.
+.\" Restore compatibility mode (for, e.g., Solaris 10/11).
+.cp \n[*groff_groff_rfc1345_7_man_C]
+.do rr *groff_groff_rfc1345_7_man_C
+.
+.
+.\" Local Variables:
+.\" fill-column: 72
+.\" mode: nroff
+.\" End:
+.\" vim: set filetype=groff textwidth=72:
diff --git a/contrib/rfc1345/rfc1345.am b/contrib/rfc1345/rfc1345.am
new file mode 100644
index 0000000..7a23424
--- /dev/null
+++ b/contrib/rfc1345/rfc1345.am
@@ -0,0 +1,41 @@
+# Copyright 2021 Free Software Foundation, Inc.
+#
+# This file is part of groff.
+#
+# groff is free software; 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.
+#
+# groff is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+rfc1345_srcdir = $(top_srcdir)/contrib/rfc1345
+rfc1345_builddir = $(top_builddir)/contrib/rfc1345
+
+man7_MANS += contrib/rfc1345/groff_rfc1345.7
+
+# files installed in $(tmacdir)
+rfc1345tmacdir = $(tmacdir)
+dist_rfc1345tmac_DATA = contrib/rfc1345/rfc1345.tmac
+
+rfc1345_TESTS= \
+ contrib/rfc1345/tests/rfc1345-smoke-test.sh
+TESTS += $(rfc1345_TESTS)
+EXTRA_DIST += $(rfc1345_TESTS)
+
+EXTRA_DIST += \
+ contrib/rfc1345/groff_rfc1345.7.man \
+ contrib/rfc1345/COPYRIGHT
+
+
+# Local Variables:
+# fill-column: 72
+# mode: makefile-automake
+# End:
+# vim: set autoindent filetype=automake textwidth=72:
diff --git a/contrib/rfc1345/rfc1345.tmac b/contrib/rfc1345/rfc1345.tmac
new file mode 100644
index 0000000..5041e78
--- /dev/null
+++ b/contrib/rfc1345/rfc1345.tmac
@@ -0,0 +1,1705 @@
+.ig
+rfc1345.tmac
+
+Adds glyph names formed from
+- the mnemonics specified in
+ RFC 1345, https://www.rfc-editor.org/rfc/rfc1345.txt,
+ Keld Simonsen, June 1992; and
+- the digraphs ,. Eu =R =P from Vim's digraph table.
+..
+.char \[!I] \[u00A1] \" INVERTED EXCLAMATION MARK
+.char \[Ct] \[u00A2] \" CENT SIGN
+.char \[Pd] \[u00A3] \" POUND SIGN
+.char \[Cu] \[u00A4] \" CURRENCY SIGN
+.char \[Ye] \[u00A5] \" YEN SIGN
+.char \[BB] \[u00A6] \" BROKEN BAR
+.char \[SE] \[u00A7] \" SECTION SIGN
+.char \[':] \[u00A8] \" DIAERESIS
+.char \[Co] \[u00A9] \" COPYRIGHT SIGN
+.char \[-a] \[u00AA] \" FEMININE ORDINAL INDICATOR
+.char \[<<] \[u00AB] \" LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
+.char \[NO] \[u00AC] \" NOT SIGN
+.char \[--] \[u00AD] \" SOFT HYPHEN
+.char \[Rg] \[u00AE] \" REGISTERED SIGN
+.char \['m] \[u00AF] \" MACRON
+.char \[DG] \[u00B0] \" DEGREE SIGN
+.char \[+-] \[u00B1] \" PLUS-MINUS SIGN
+.char \[2S] \[u00B2] \" SUPERSCRIPT TWO
+.char \[3S] \[u00B3] \" SUPERSCRIPT THREE
+.char \[''] \[u00B4] \" ACUTE ACCENT
+.char \[My] \[u00B5] \" MICRO SIGN
+.char \[PI] \[u00B6] \" PILCROW SIGN
+.char \[.M] \[u00B7] \" MIDDLE DOT
+.char \[',] \[u00B8] \" CEDILLA
+.char \[1S] \[u00B9] \" SUPERSCRIPT ONE
+.char \[-o] \[u00BA] \" MASCULINE ORDINAL INDICATOR
+.char \[>>] \[u00BB] \" RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
+.char \[14] \[u00BC] \" VULGAR FRACTION ONE QUARTER
+.char \[12] \[u00BD] \" VULGAR FRACTION ONE HALF
+.char \[34] \[u00BE] \" VULGAR FRACTION THREE QUARTERS
+.char \[?I] \[u00BF] \" INVERTED QUESTION MARK
+.char \[A!] \[u00C0] \" LATIN CAPITAL LETTER A WITH GRAVE
+.char \[A'] \[u00C1] \" LATIN CAPITAL LETTER A WITH ACUTE
+.char \[A>] \[u00C2] \" LATIN CAPITAL LETTER A WITH CIRCUMFLEX
+.char \[A?] \[u00C3] \" LATIN CAPITAL LETTER A WITH TILDE
+.char \[A:] \[u00C4] \" LATIN CAPITAL LETTER A WITH DIAERESIS
+.char \[AA] \[u00C5] \" LATIN CAPITAL LETTER A WITH RING ABOVE
+.char \[AE] \[u00C6] \" LATIN CAPITAL LETTER AE
+.char \[C,] \[u00C7] \" LATIN CAPITAL LETTER C WITH CEDILLA
+.char \[E!] \[u00C8] \" LATIN CAPITAL LETTER E WITH GRAVE
+.char \[E'] \[u00C9] \" LATIN CAPITAL LETTER E WITH ACUTE
+.char \[E>] \[u00CA] \" LATIN CAPITAL LETTER E WITH CIRCUMFLEX
+.char \[E:] \[u00CB] \" LATIN CAPITAL LETTER E WITH DIAERESIS
+.char \[I!] \[u00CC] \" LATIN CAPITAL LETTER I WITH GRAVE
+.char \[I'] \[u00CD] \" LATIN CAPITAL LETTER I WITH ACUTE
+.char \[I>] \[u00CE] \" LATIN CAPITAL LETTER I WITH CIRCUMFLEX
+.char \[I:] \[u00CF] \" LATIN CAPITAL LETTER I WITH DIAERESIS
+.char \[D-] \[u00D0] \" LATIN CAPITAL LETTER ETH (Icelandic)
+.char \[N?] \[u00D1] \" LATIN CAPITAL LETTER N WITH TILDE
+.char \[O!] \[u00D2] \" LATIN CAPITAL LETTER O WITH GRAVE
+.char \[O'] \[u00D3] \" LATIN CAPITAL LETTER O WITH ACUTE
+.char \[O>] \[u00D4] \" LATIN CAPITAL LETTER O WITH CIRCUMFLEX
+.char \[O?] \[u00D5] \" LATIN CAPITAL LETTER O WITH TILDE
+.char \[O:] \[u00D6] \" LATIN CAPITAL LETTER O WITH DIAERESIS
+.char \[*X] \[u00D7] \" MULTIPLICATION SIGN
+.char \[O/] \[u00D8] \" LATIN CAPITAL LETTER O WITH STROKE
+.char \[U!] \[u00D9] \" LATIN CAPITAL LETTER U WITH GRAVE
+.char \[U'] \[u00DA] \" LATIN CAPITAL LETTER U WITH ACUTE
+.char \[U>] \[u00DB] \" LATIN CAPITAL LETTER U WITH CIRCUMFLEX
+.char \[U:] \[u00DC] \" LATIN CAPITAL LETTER U WITH DIAERESIS
+.char \[Y'] \[u00DD] \" LATIN CAPITAL LETTER Y WITH ACUTE
+.char \[TH] \[u00DE] \" LATIN CAPITAL LETTER THORN (Icelandic)
+.char \[ss] \[u00DF] \" LATIN SMALL LETTER SHARP S (German)
+.char \[a!] \[u00E0] \" LATIN SMALL LETTER A WITH GRAVE
+.char \[a'] \[u00E1] \" LATIN SMALL LETTER A WITH ACUTE
+.char \[a>] \[u00E2] \" LATIN SMALL LETTER A WITH CIRCUMFLEX
+.char \[a?] \[u00E3] \" LATIN SMALL LETTER A WITH TILDE
+.char \[a:] \[u00E4] \" LATIN SMALL LETTER A WITH DIAERESIS
+.char \[aa] \[u00E5] \" LATIN SMALL LETTER A WITH RING ABOVE
+.char \[ae] \[u00E6] \" LATIN SMALL LETTER AE
+.char \[c,] \[u00E7] \" LATIN SMALL LETTER C WITH CEDILLA
+.char \[e!] \[u00E8] \" LATIN SMALL LETTER E WITH GRAVE
+.char \[e'] \[u00E9] \" LATIN SMALL LETTER E WITH ACUTE
+.char \[e>] \[u00EA] \" LATIN SMALL LETTER E WITH CIRCUMFLEX
+.char \[e:] \[u00EB] \" LATIN SMALL LETTER E WITH DIAERESIS
+.char \[i!] \[u00EC] \" LATIN SMALL LETTER I WITH GRAVE
+.char \[i'] \[u00ED] \" LATIN SMALL LETTER I WITH ACUTE
+.char \[i>] \[u00EE] \" LATIN SMALL LETTER I WITH CIRCUMFLEX
+.char \[i:] \[u00EF] \" LATIN SMALL LETTER I WITH DIAERESIS
+.char \[d-] \[u00F0] \" LATIN SMALL LETTER ETH (Icelandic)
+.char \[n?] \[u00F1] \" LATIN SMALL LETTER N WITH TILDE
+.char \[o!] \[u00F2] \" LATIN SMALL LETTER O WITH GRAVE
+.char \[o'] \[u00F3] \" LATIN SMALL LETTER O WITH ACUTE
+.char \[o>] \[u00F4] \" LATIN SMALL LETTER O WITH CIRCUMFLEX
+.char \[o?] \[u00F5] \" LATIN SMALL LETTER O WITH TILDE
+.char \[o:] \[u00F6] \" LATIN SMALL LETTER O WITH DIAERESIS
+.char \[-:] \[u00F7] \" DIVISION SIGN
+.char \[o/] \[u00F8] \" LATIN SMALL LETTER O WITH STROKE
+.char \[u!] \[u00F9] \" LATIN SMALL LETTER U WITH GRAVE
+.char \[u'] \[u00FA] \" LATIN SMALL LETTER U WITH ACUTE
+.char \[u>] \[u00FB] \" LATIN SMALL LETTER U WITH CIRCUMFLEX
+.char \[u:] \[u00FC] \" LATIN SMALL LETTER U WITH DIAERESIS
+.char \[y'] \[u00FD] \" LATIN SMALL LETTER Y WITH ACUTE
+.char \[th] \[u00FE] \" LATIN SMALL LETTER THORN (Icelandic)
+.char \[y:] \[u00FF] \" LATIN SMALL LETTER Y WITH DIAERESIS
+.char \[A-] \[u0100] \" LATIN CAPITAL LETTER A WITH MACRON
+.char \[a-] \[u0101] \" LATIN SMALL LETTER A WITH MACRON
+.char \[A(] \[u0102] \" LATIN CAPITAL LETTER A WITH BREVE
+.char \[a(] \[u0103] \" LATIN SMALL LETTER A WITH BREVE
+.char \[A;] \[u0104] \" LATIN CAPITAL LETTER A WITH OGONEK
+.char \[a;] \[u0105] \" LATIN SMALL LETTER A WITH OGONEK
+.char \[C'] \[u0106] \" LATIN CAPITAL LETTER C WITH ACUTE
+.char \[c'] \[u0107] \" LATIN SMALL LETTER C WITH ACUTE
+.char \[C>] \[u0108] \" LATIN CAPITAL LETTER C WITH CIRCUMFLEX
+.char \[c>] \[u0109] \" LATIN SMALL LETTER C WITH CIRCUMFLEX
+.char \[C.] \[u010A] \" LATIN CAPITAL LETTER C WITH DOT ABOVE
+.char \[c.] \[u010B] \" LATIN SMALL LETTER C WITH DOT ABOVE
+.char \[C<] \[u010C] \" LATIN CAPITAL LETTER C WITH CARON
+.char \[c<] \[u010D] \" LATIN SMALL LETTER C WITH CARON
+.char \[D<] \[u010E] \" LATIN CAPITAL LETTER D WITH CARON
+.char \[d<] \[u010F] \" LATIN SMALL LETTER D WITH CARON
+.char \[D/] \[u0110] \" LATIN CAPITAL LETTER D WITH STROKE
+.char \[d/] \[u0111] \" LATIN SMALL LETTER D WITH STROKE
+.char \[E-] \[u0112] \" LATIN CAPITAL LETTER E WITH MACRON
+.char \[e-] \[u0113] \" LATIN SMALL LETTER E WITH MACRON
+.char \[E(] \[u0114] \" LATIN CAPITAL LETTER E WITH BREVE
+.char \[e(] \[u0115] \" LATIN SMALL LETTER E WITH BREVE
+.char \[E.] \[u0116] \" LATIN CAPITAL LETTER E WITH DOT ABOVE
+.char \[e.] \[u0117] \" LATIN SMALL LETTER E WITH DOT ABOVE
+.char \[E;] \[u0118] \" LATIN CAPITAL LETTER E WITH OGONEK
+.char \[e;] \[u0119] \" LATIN SMALL LETTER E WITH OGONEK
+.char \[E<] \[u011A] \" LATIN CAPITAL LETTER E WITH CARON
+.char \[e<] \[u011B] \" LATIN SMALL LETTER E WITH CARON
+.char \[G>] \[u011C] \" LATIN CAPITAL LETTER G WITH CIRCUMFLEX
+.char \[g>] \[u011D] \" LATIN SMALL LETTER G WITH CIRCUMFLEX
+.char \[G(] \[u011E] \" LATIN CAPITAL LETTER G WITH BREVE
+.char \[g(] \[u011F] \" LATIN SMALL LETTER G WITH BREVE
+.char \[G.] \[u0120] \" LATIN CAPITAL LETTER G WITH DOT ABOVE
+.char \[g.] \[u0121] \" LATIN SMALL LETTER G WITH DOT ABOVE
+.char \[G,] \[u0122] \" LATIN CAPITAL LETTER G WITH CEDILLA
+.char \[g,] \[u0123] \" LATIN SMALL LETTER G WITH CEDILLA
+.char \[H>] \[u0124] \" LATIN CAPITAL LETTER H WITH CIRCUMFLEX
+.char \[h>] \[u0125] \" LATIN SMALL LETTER H WITH CIRCUMFLEX
+.char \[H/] \[u0126] \" LATIN CAPITAL LETTER H WITH STROKE
+.char \[h/] \[u0127] \" LATIN SMALL LETTER H WITH STROKE
+.char \[I?] \[u0128] \" LATIN CAPITAL LETTER I WITH TILDE
+.char \[i?] \[u0129] \" LATIN SMALL LETTER I WITH TILDE
+.char \[I-] \[u012A] \" LATIN CAPITAL LETTER I WITH MACRON
+.char \[i-] \[u012B] \" LATIN SMALL LETTER I WITH MACRON
+.char \[I(] \[u012C] \" LATIN CAPITAL LETTER I WITH BREVE
+.char \[i(] \[u012D] \" LATIN SMALL LETTER I WITH BREVE
+.char \[I;] \[u012E] \" LATIN CAPITAL LETTER I WITH OGONEK
+.char \[i;] \[u012F] \" LATIN SMALL LETTER I WITH OGONEK
+.char \[I.] \[u0130] \" LATIN CAPITAL LETTER I WITH DOT ABOVE
+.char \[i.] \[u0131] \" LATIN SMALL LETTER I DOTLESS
+.char \[IJ] \[u0132] \" LATIN CAPITAL LIGATURE IJ
+.char \[ij] \[u0133] \" LATIN SMALL LIGATURE IJ
+.char \[J>] \[u0134] \" LATIN CAPITAL LETTER J WITH CIRCUMFLEX
+.char \[j>] \[u0135] \" LATIN SMALL LETTER J WITH CIRCUMFLEX
+.char \[K,] \[u0136] \" LATIN CAPITAL LETTER K WITH CEDILLA
+.char \[k,] \[u0137] \" LATIN SMALL LETTER K WITH CEDILLA
+.char \[kk] \[u0138] \" LATIN SMALL LETTER KRA (Greenlandic)
+.char \[L'] \[u0139] \" LATIN CAPITAL LETTER L WITH ACUTE
+.char \[l'] \[u013A] \" LATIN SMALL LETTER L WITH ACUTE
+.char \[L,] \[u013B] \" LATIN CAPITAL LETTER L WITH CEDILLA
+.char \[l,] \[u013C] \" LATIN SMALL LETTER L WITH CEDILLA
+.char \[L<] \[u013D] \" LATIN CAPITAL LETTER L WITH CARON
+.char \[l<] \[u013E] \" LATIN SMALL LETTER L WITH CARON
+.char \[L.] \[u013F] \" LATIN CAPITAL LETTER L WITH MIDDLE DOT
+.char \[l.] \[u0140] \" LATIN SMALL LETTER L WITH MIDDLE DOT
+.char \[L/] \[u0141] \" LATIN CAPITAL LETTER L WITH STROKE
+.char \[l/] \[u0142] \" LATIN SMALL LETTER L WITH STROKE
+.char \[N'] \[u0143] \" LATIN CAPITAL LETTER N WITH ACUTE
+.char \[n'] \[u0144] \" LATIN SMALL LETTER N WITH ACUTE
+.char \[N,] \[u0145] \" LATIN CAPITAL LETTER N WITH CEDILLA
+.char \[n,] \[u0146] \" LATIN SMALL LETTER N WITH CEDILLA
+.char \[N<] \[u0147] \" LATIN CAPITAL LETTER N WITH CARON
+.char \[n<] \[u0148] \" LATIN SMALL LETTER N WITH CARON
+.char \['n] \[u0149] \" LATIN SMALL LETTER N PRECEDED BY APOSTROPHE
+.char \[NG] \[u014A] \" LATIN CAPITAL LETTER ENG (Lappish)
+.char \[ng] \[u014B] \" LATIN SMALL LETTER ENG (Lappish)
+.char \[O-] \[u014C] \" LATIN CAPITAL LETTER O WITH MACRON
+.char \[o-] \[u014D] \" LATIN SMALL LETTER O WITH MACRON
+.char \[O(] \[u014E] \" LATIN CAPITAL LETTER O WITH BREVE
+.char \[o(] \[u014F] \" LATIN SMALL LETTER O WITH BREVE
+.char \[O"] \[u0150] \" LATIN CAPITAL LETTER O WITH DOUBLE ACUTE
+.char \[o"] \[u0151] \" LATIN SMALL LETTER O WITH DOUBLE ACUTE
+.char \[OE] \[u0152] \" LATIN CAPITAL LIGATURE OE
+.char \[oe] \[u0153] \" LATIN SMALL LIGATURE OE
+.char \[R'] \[u0154] \" LATIN CAPITAL LETTER R WITH ACUTE
+.char \[r'] \[u0155] \" LATIN SMALL LETTER R WITH ACUTE
+.char \[R,] \[u0156] \" LATIN CAPITAL LETTER R WITH CEDILLA
+.char \[r,] \[u0157] \" LATIN SMALL LETTER R WITH CEDILLA
+.char \[R<] \[u0158] \" LATIN CAPITAL LETTER R WITH CARON
+.char \[r<] \[u0159] \" LATIN SMALL LETTER R WITH CARON
+.char \[S'] \[u015A] \" LATIN CAPITAL LETTER S WITH ACUTE
+.char \[s'] \[u015B] \" LATIN SMALL LETTER S WITH ACUTE
+.char \[S>] \[u015C] \" LATIN CAPITAL LETTER S WITH CIRCUMFLEX
+.char \[s>] \[u015D] \" LATIN SMALL LETTER S WITH CIRCUMFLEX
+.char \[S,] \[u015E] \" LATIN CAPITAL LETTER S WITH CEDILLA
+.char \[s,] \[u015F] \" LATIN SMALL LETTER S WITH CEDILLA
+.char \[S<] \[u0160] \" LATIN CAPITAL LETTER S WITH CARON
+.char \[s<] \[u0161] \" LATIN SMALL LETTER S WITH CARON
+.char \[T,] \[u0162] \" LATIN CAPITAL LETTER T WITH CEDILLA
+.char \[t,] \[u0163] \" LATIN SMALL LETTER T WITH CEDILLA
+.char \[T<] \[u0164] \" LATIN CAPITAL LETTER T WITH CARON
+.char \[t<] \[u0165] \" LATIN SMALL LETTER T WITH CARON
+.char \[T/] \[u0166] \" LATIN CAPITAL LETTER T WITH STROKE
+.char \[t/] \[u0167] \" LATIN SMALL LETTER T WITH STROKE
+.char \[U?] \[u0168] \" LATIN CAPITAL LETTER U WITH TILDE
+.char \[u?] \[u0169] \" LATIN SMALL LETTER U WITH TILDE
+.char \[U-] \[u016A] \" LATIN CAPITAL LETTER U WITH MACRON
+.char \[u-] \[u016B] \" LATIN SMALL LETTER U WITH MACRON
+.char \[U(] \[u016C] \" LATIN CAPITAL LETTER U WITH BREVE
+.char \[u(] \[u016D] \" LATIN SMALL LETTER U WITH BREVE
+.char \[U0] \[u016E] \" LATIN CAPITAL LETTER U WITH RING ABOVE
+.char \[u0] \[u016F] \" LATIN SMALL LETTER U WITH RING ABOVE
+.char \[U"] \[u0170] \" LATIN CAPITAL LETTER U WITH DOUBLE ACUTE
+.char \[u"] \[u0171] \" LATIN SMALL LETTER U WITH DOUBLE ACUTE
+.char \[U;] \[u0172] \" LATIN CAPITAL LETTER U WITH OGONEK
+.char \[u;] \[u0173] \" LATIN SMALL LETTER U WITH OGONEK
+.char \[W>] \[u0174] \" LATIN CAPITAL LETTER W WITH CIRCUMFLEX
+.char \[w>] \[u0175] \" LATIN SMALL LETTER W WITH CIRCUMFLEX
+.char \[Y>] \[u0176] \" LATIN CAPITAL LETTER Y WITH CIRCUMFLEX
+.char \[y>] \[u0177] \" LATIN SMALL LETTER Y WITH CIRCUMFLEX
+.char \[Y:] \[u0178] \" LATIN CAPITAL LETTER Y WITH DIAERESIS
+.char \[Z'] \[u0179] \" LATIN CAPITAL LETTER Z WITH ACUTE
+.char \[z'] \[u017A] \" LATIN SMALL LETTER Z WITH ACUTE
+.char \[Z.] \[u017B] \" LATIN CAPITAL LETTER Z WITH DOT ABOVE
+.char \[z.] \[u017C] \" LATIN SMALL LETTER Z WITH DOT ABOVE
+.char \[Z<] \[u017D] \" LATIN CAPITAL LETTER Z WITH CARON
+.char \[z<] \[u017E] \" LATIN SMALL LETTER Z WITH CARON
+.char \[O9] \[u01A0] \" LATIN CAPITAL LETTER O WITH HORN
+.char \[o9] \[u01A1] \" LATIN SMALL LETTER O WITH HORN
+.char \[OI] \[u01A2] \" LATIN CAPITAL LETTER OI
+.char \[oi] \[u01A3] \" LATIN SMALL LETTER OI
+.char \[yr] \[u01A6] \" LATIN LETTER YR
+.char \[U9] \[u01AF] \" LATIN CAPITAL LETTER U WITH HORN
+.char \[u9] \[u01B0] \" LATIN SMALL LETTER U WITH HORN
+.char \[Z/] \[u01B5] \" LATIN CAPITAL LETTER Z WITH STROKE
+.char \[z/] \[u01B6] \" LATIN SMALL LETTER Z WITH STROKE
+.char \[ED] \[u01B7] \" LATIN CAPITAL LETTER EZH
+.char \[A<] \[u01CD] \" LATIN CAPITAL LETTER A WITH CARON
+.char \[a<] \[u01CE] \" LATIN SMALL LETTER A WITH CARON
+.char \[I<] \[u01CF] \" LATIN CAPITAL LETTER I WITH CARON
+.char \[i<] \[u01D0] \" LATIN SMALL LETTER I WITH CARON
+.char \[O<] \[u01D1] \" LATIN CAPITAL LETTER O WITH CARON
+.char \[o<] \[u01D2] \" LATIN SMALL LETTER O WITH CARON
+.char \[U<] \[u01D3] \" LATIN CAPITAL LETTER U WITH CARON
+.char \[u<] \[u01D4] \" LATIN SMALL LETTER U WITH CARON
+.char \[U:-] \[u01D5] \" LATIN CAPITAL LETTER U WITH DIAERESIS AND MACRON
+.char \[u:-] \[u01D6] \" LATIN SMALL LETTER U WITH DIAERESIS AND MACRON
+.char \[U:'] \[u01D7] \" LATIN CAPITAL LETTER U WITH DIAERESIS AND ACUTE
+.char \[u:'] \[u01D8] \" LATIN SMALL LETTER U WITH DIAERESIS AND ACUTE
+.char \[U:<] \[u01D9] \" LATIN CAPITAL LETTER U WITH DIAERESIS AND CARON
+.char \[u:<] \[u01DA] \" LATIN SMALL LETTER U WITH DIAERESIS AND CARON
+.char \[U:!] \[u01DB] \" LATIN CAPITAL LETTER U WITH DIAERESIS AND GRAVE
+.char \[u:!] \[u01DC] \" LATIN SMALL LETTER U WITH DIAERESIS AND GRAVE
+.char \[A1] \[u01DE] \" LATIN CAPITAL LETTER A WITH DIAERESIS AND MACRON
+.char \[a1] \[u01DF] \" LATIN SMALL LETTER A WITH DIAERESIS AND MACRON
+.char \[A7] \[u01E0] \" LATIN CAPITAL LETTER A WITH DOT ABOVE AND MACRON
+.char \[a7] \[u01E1] \" LATIN SMALL LETTER A WITH DOT ABOVE AND MACRON
+.char \[A3] \[u01E2] \" LATIN CAPITAL LETTER AE WITH MACRON
+.char \[a3] \[u01E3] \" LATIN SMALL LETTER AE WITH MACRON
+.char \[G/] \[u01E4] \" LATIN CAPITAL LETTER G WITH STROKE
+.char \[g/] \[u01E5] \" LATIN SMALL LETTER G WITH STROKE
+.char \[G<] \[u01E6] \" LATIN CAPITAL LETTER G WITH CARON
+.char \[g<] \[u01E7] \" LATIN SMALL LETTER G WITH CARON
+.char \[K<] \[u01E8] \" LATIN CAPITAL LETTER K WITH CARON
+.char \[k<] \[u01E9] \" LATIN SMALL LETTER K WITH CARON
+.char \[O;] \[u01EA] \" LATIN CAPITAL LETTER O WITH OGONEK
+.char \[o;] \[u01EB] \" LATIN SMALL LETTER O WITH OGONEK
+.char \[O1] \[u01EC] \" LATIN CAPITAL LETTER O WITH OGONEK AND MACRON
+.char \[o1] \[u01ED] \" LATIN SMALL LETTER O WITH OGONEK AND MACRON
+.char \[EZ] \[u01EE] \" LATIN CAPITAL LETTER EZH WITH CARON
+.char \[ez] \[u01EF] \" LATIN SMALL LETTER EZH WITH CARON
+.char \[j<] \[u01F0] \" LATIN SMALL LETTER J WITH CARON
+.char \[G'] \[u01F4] \" LATIN CAPITAL LETTER G WITH ACUTE
+.char \[g'] \[u01F5] \" LATIN SMALL LETTER G WITH ACUTE
+.char \[AA'] \[u01FA] \" LATIN CAPITAL LETTER A WITH RING ABOVE AND ACUTE
+.char \[aa'] \[u01FB] \" LATIN SMALL LETTER A WITH RING ABOVE AND ACUTE
+.char \[AE'] \[u01FC] \" LATIN CAPITAL LETTER AE WITH ACUTE
+.char \[ae'] \[u01FD] \" LATIN SMALL LETTER AE WITH ACUTE
+.char \[O/'] \[u01FE] \" LATIN CAPITAL LETTER O WITH STROKE AND ACUTE
+.char \[o/'] \[u01FF] \" LATIN SMALL LETTER O WITH STROKE AND ACUTE
+.char \[;S] \[u02BF] \" MODIFIER LETTER LEFT HALF RING
+.char \['<] \[u02C7] \" CARON
+.char \['(] \[u02D8] \" BREVE
+.char \['.] \[u02D9] \" DOT ABOVE
+.char \['0] \[u02DA] \" RING ABOVE
+.char \[';] \[u02DB] \" OGONEK
+.char \['"] \[u02DD] \" DOUBLE ACUTE ACCENT
+.char \[A%] \[u0386] \" GREEK CAPITAL LETTER ALPHA WITH ACUTE
+.char \[E%] \[u0388] \" GREEK CAPITAL LETTER EPSILON WITH ACUTE
+.char \[Y%] \[u0389] \" GREEK CAPITAL LETTER ETA WITH ACUTE
+.char \[I%] \[u038A] \" GREEK CAPITAL LETTER IOTA WITH ACUTE
+.char \[O%] \[u038C] \" GREEK CAPITAL LETTER OMICRON WITH ACUTE
+.char \[U%] \[u038E] \" GREEK CAPITAL LETTER UPSILON WITH ACUTE
+.char \[W%] \[u038F] \" GREEK CAPITAL LETTER OMEGA WITH ACUTE
+.char \[i3] \[u0390] \" GREEK SMALL LETTER IOTA WITH ACUTE AND DIAERESIS
+.char \[A*] \[u0391] \" GREEK CAPITAL LETTER ALPHA
+.char \[B*] \[u0392] \" GREEK CAPITAL LETTER BETA
+.char \[G*] \[u0393] \" GREEK CAPITAL LETTER GAMMA
+.char \[D*] \[u0394] \" GREEK CAPITAL LETTER DELTA
+.char \[E*] \[u0395] \" GREEK CAPITAL LETTER EPSILON
+.char \[Z*] \[u0396] \" GREEK CAPITAL LETTER ZETA
+.char \[Y*] \[u0397] \" GREEK CAPITAL LETTER ETA
+.char \[H*] \[u0398] \" GREEK CAPITAL LETTER THETA
+.char \[I*] \[u0399] \" GREEK CAPITAL LETTER IOTA
+.char \[K*] \[u039A] \" GREEK CAPITAL LETTER KAPPA
+.char \[L*] \[u039B] \" GREEK CAPITAL LETTER LAMDA
+.char \[M*] \[u039C] \" GREEK CAPITAL LETTER MU
+.char \[N*] \[u039D] \" GREEK CAPITAL LETTER NU
+.char \[C*] \[u039E] \" GREEK CAPITAL LETTER XI
+.char \[O*] \[u039F] \" GREEK CAPITAL LETTER OMICRON
+.char \[P*] \[u03A0] \" GREEK CAPITAL LETTER PI
+.char \[R*] \[u03A1] \" GREEK CAPITAL LETTER RHO
+.char \[S*] \[u03A3] \" GREEK CAPITAL LETTER SIGMA
+.char \[T*] \[u03A4] \" GREEK CAPITAL LETTER TAU
+.char \[U*] \[u03A5] \" GREEK CAPITAL LETTER UPSILON
+.char \[F*] \[u03A6] \" GREEK CAPITAL LETTER PHI
+.char \[X*] \[u03A7] \" GREEK CAPITAL LETTER CHI
+.char \[Q*] \[u03A8] \" GREEK CAPITAL LETTER PSI
+.char \[W*] \[u03A9] \" GREEK CAPITAL LETTER OMEGA
+.char \[J*] \[u03AA] \" GREEK CAPITAL LETTER IOTA WITH DIAERESIS
+.char \[V*] \[u03AB] \" GREEK CAPITAL LETTER UPSILON WITH DIAERESIS
+.char \[a%] \[u03AC] \" GREEK SMALL LETTER ALPHA WITH ACUTE
+.char \[e%] \[u03AD] \" GREEK SMALL LETTER EPSILON WITH ACUTE
+.char \[y%] \[u03AE] \" GREEK SMALL LETTER ETA WITH ACUTE
+.char \[i%] \[u03AF] \" GREEK SMALL LETTER IOTA WITH ACUTE
+.char \[u3] \[u03B0] \" GREEK SMALL LETTER UPSILON WITH ACUTE AND DIAERESIS
+.char \[a*] \[u03B1] \" GREEK SMALL LETTER ALPHA
+.char \[b*] \[u03B2] \" GREEK SMALL LETTER BETA
+.char \[g*] \[u03B3] \" GREEK SMALL LETTER GAMMA
+.char \[d*] \[u03B4] \" GREEK SMALL LETTER DELTA
+.char \[e*] \[u03B5] \" GREEK SMALL LETTER EPSILON
+.char \[z*] \[u03B6] \" GREEK SMALL LETTER ZETA
+.char \[y*] \[u03B7] \" GREEK SMALL LETTER ETA
+.char \[h*] \[u03B8] \" GREEK SMALL LETTER THETA
+.char \[i*] \[u03B9] \" GREEK SMALL LETTER IOTA
+.char \[k*] \[u03BA] \" GREEK SMALL LETTER KAPPA
+.char \[l*] \[u03BB] \" GREEK SMALL LETTER LAMDA
+.char \[m*] \[u03BC] \" GREEK SMALL LETTER MU
+.char \[n*] \[u03BD] \" GREEK SMALL LETTER NU
+.char \[c*] \[u03BE] \" GREEK SMALL LETTER XI
+.char \[o*] \[u03BF] \" GREEK SMALL LETTER OMICRON
+.char \[p*] \[u03C0] \" GREEK SMALL LETTER PI
+.char \[r*] \[u03C1] \" GREEK SMALL LETTER RHO
+.char \[*s] \[u03C2] \" GREEK SMALL LETTER FINAL SIGMA
+.char \[s*] \[u03C3] \" GREEK SMALL LETTER SIGMA
+.char \[t*] \[u03C4] \" GREEK SMALL LETTER TAU
+.char \[u*] \[u03C5] \" GREEK SMALL LETTER UPSILON
+.char \[f*] \[u03C6] \" GREEK SMALL LETTER PHI
+.char \[x*] \[u03C7] \" GREEK SMALL LETTER CHI
+.char \[q*] \[u03C8] \" GREEK SMALL LETTER PSI
+.char \[w*] \[u03C9] \" GREEK SMALL LETTER OMEGA
+.char \[j*] \[u03CA] \" GREEK SMALL LETTER IOTA WITH DIAERESIS
+.char \[v*] \[u03CB] \" GREEK SMALL LETTER UPSILON WITH DIAERESIS
+.char \[o%] \[u03CC] \" GREEK SMALL LETTER OMICRON WITH ACUTE
+.char \[u%] \[u03CD] \" GREEK SMALL LETTER UPSILON WITH ACUTE
+.char \[w%] \[u03CE] \" GREEK SMALL LETTER OMEGA WITH ACUTE
+.char \['G] \[u03D8] \" GREEK NUMERAL SIGN
+.char \[,G] \[u03D9] \" GREEK LOWER NUMERAL SIGN
+.char \[T3] \[u03DA] \" GREEK CAPITAL LETTER STIGMA
+.char \[t3] \[u03DB] \" GREEK SMALL LETTER STIGMA
+.char \[M3] \[u03DC] \" GREEK CAPITAL LETTER DIGAMMA
+.char \[m3] \[u03DD] \" GREEK SMALL LETTER DIGAMMA
+.char \[K3] \[u03DE] \" GREEK CAPITAL LETTER KOPPA
+.char \[k3] \[u03DF] \" GREEK SMALL LETTER KOPPA
+.char \[P3] \[u03E0] \" GREEK CAPITAL LETTER SAMPI
+.char \[p3] \[u03E1] \" GREEK SMALL LETTER SAMPI
+.char \['%] \[u03F4] \" ACUTE ACCENT AND DIAERESIS (Tonos and Dialytika)
+.char \[j3] \[u03F5] \" GREEK IOTA BELOW
+.char \[IO] \[u0401] \" CYRILLIC CAPITAL LETTER IO
+.char \[D%] \[u0402] \" CYRILLIC CAPITAL LETTER DJE (Serbocroatian)
+.char \[G%] \[u0403] \" CYRILLIC CAPITAL LETTER GJE (Macedonian)
+.char \[IE] \[u0404] \" CYRILLIC CAPITAL LETTER UKRAINIAN IE
+.char \[DS] \[u0405] \" CYRILLIC CAPITAL LETTER DZE (Macedonian)
+.char \[II] \[u0406] \" CYRILLIC CAPITAL LETTER BYELORUSSIAN-UKRAINIAN I
+.char \[YI] \[u0407] \" CYRILLIC CAPITAL LETTER YI (Ukrainian)
+.char \[J%] \[u0408] \" CYRILLIC CAPITAL LETTER JE
+.char \[LJ] \[u0409] \" CYRILLIC CAPITAL LETTER LJE
+.char \[NJ] \[u040A] \" CYRILLIC CAPITAL LETTER NJE
+.char \[Ts] \[u040B] \" CYRILLIC CAPITAL LETTER TSHE (Serbocroatian)
+.char \[KJ] \[u040C] \" CYRILLIC CAPITAL LETTER KJE (Macedonian)
+.char \[V%] \[u040E] \" CYRILLIC CAPITAL LETTER SHORT U (Byelorussian)
+.char \[DZ] \[u040F] \" CYRILLIC CAPITAL LETTER DZHE
+.char \[A=] \[u0410] \" CYRILLIC CAPITAL LETTER A
+.char \[B=] \[u0411] \" CYRILLIC CAPITAL LETTER BE
+.char \[V=] \[u0412] \" CYRILLIC CAPITAL LETTER VE
+.char \[G=] \[u0413] \" CYRILLIC CAPITAL LETTER GHE
+.char \[D=] \[u0414] \" CYRILLIC CAPITAL LETTER DE
+.char \[E=] \[u0415] \" CYRILLIC CAPITAL LETTER IE
+.char \[Z%] \[u0416] \" CYRILLIC CAPITAL LETTER ZHE
+.char \[Z=] \[u0417] \" CYRILLIC CAPITAL LETTER ZE
+.char \[I=] \[u0418] \" CYRILLIC CAPITAL LETTER I
+.char \[J=] \[u0419] \" CYRILLIC CAPITAL LETTER SHORT I
+.char \[K=] \[u041A] \" CYRILLIC CAPITAL LETTER KA
+.char \[L=] \[u041B] \" CYRILLIC CAPITAL LETTER EL
+.char \[M=] \[u041C] \" CYRILLIC CAPITAL LETTER EM
+.char \[N=] \[u041D] \" CYRILLIC CAPITAL LETTER EN
+.char \[O=] \[u041E] \" CYRILLIC CAPITAL LETTER O
+.char \[P=] \[u041F] \" CYRILLIC CAPITAL LETTER PE
+.char \[R=] \[u0420] \" CYRILLIC CAPITAL LETTER ER
+.char \[S=] \[u0421] \" CYRILLIC CAPITAL LETTER ES
+.char \[T=] \[u0422] \" CYRILLIC CAPITAL LETTER TE
+.char \[U=] \[u0423] \" CYRILLIC CAPITAL LETTER U
+.char \[F=] \[u0424] \" CYRILLIC CAPITAL LETTER EF
+.char \[H=] \[u0425] \" CYRILLIC CAPITAL LETTER HA
+.char \[C=] \[u0426] \" CYRILLIC CAPITAL LETTER TSE
+.char \[C%] \[u0427] \" CYRILLIC CAPITAL LETTER CHE
+.char \[S%] \[u0428] \" CYRILLIC CAPITAL LETTER SHA
+.char \[Sc] \[u0429] \" CYRILLIC CAPITAL LETTER SHCHA
+.char \[="] \[u042A] \" CYRILLIC CAPITAL LETTER HARD SIGN
+.char \[Y=] \[u042B] \" CYRILLIC CAPITAL LETTER YERU
+.char \[%"] \[u042C] \" CYRILLIC CAPITAL LETTER SOFT SIGN
+.char \[JE] \[u042D] \" CYRILLIC CAPITAL LETTER E
+.char \[JU] \[u042E] \" CYRILLIC CAPITAL LETTER YU
+.char \[JA] \[u042F] \" CYRILLIC CAPITAL LETTER YA
+.char \[a=] \[u0430] \" CYRILLIC SMALL LETTER A
+.char \[b=] \[u0431] \" CYRILLIC SMALL LETTER BE
+.char \[v=] \[u0432] \" CYRILLIC SMALL LETTER VE
+.char \[g=] \[u0433] \" CYRILLIC SMALL LETTER GHE
+.char \[d=] \[u0434] \" CYRILLIC SMALL LETTER DE
+.char \[e=] \[u0435] \" CYRILLIC SMALL LETTER IE
+.char \[z%] \[u0436] \" CYRILLIC SMALL LETTER ZHE
+.char \[z=] \[u0437] \" CYRILLIC SMALL LETTER ZE
+.char \[i=] \[u0438] \" CYRILLIC SMALL LETTER I
+.char \[j=] \[u0439] \" CYRILLIC SMALL LETTER SHORT I
+.char \[k=] \[u043A] \" CYRILLIC SMALL LETTER KA
+.char \[l=] \[u043B] \" CYRILLIC SMALL LETTER EL
+.char \[m=] \[u043C] \" CYRILLIC SMALL LETTER EM
+.char \[n=] \[u043D] \" CYRILLIC SMALL LETTER EN
+.char \[o=] \[u043E] \" CYRILLIC SMALL LETTER O
+.char \[p=] \[u043F] \" CYRILLIC SMALL LETTER PE
+.char \[r=] \[u0440] \" CYRILLIC SMALL LETTER ER
+.char \[s=] \[u0441] \" CYRILLIC SMALL LETTER ES
+.char \[t=] \[u0442] \" CYRILLIC SMALL LETTER TE
+.char \[u=] \[u0443] \" CYRILLIC SMALL LETTER U
+.char \[f=] \[u0444] \" CYRILLIC SMALL LETTER EF
+.char \[h=] \[u0445] \" CYRILLIC SMALL LETTER HA
+.char \[c=] \[u0446] \" CYRILLIC SMALL LETTER TSE
+.char \[c%] \[u0447] \" CYRILLIC SMALL LETTER CHE
+.char \[s%] \[u0448] \" CYRILLIC SMALL LETTER SHA
+.char \[sc] \[u0449] \" CYRILLIC SMALL LETTER SHCHA
+.char \[='] \[u044A] \" CYRILLIC SMALL LETTER HARD SIGN
+.char \[y=] \[u044B] \" CYRILLIC SMALL LETTER YERU
+.char \[%'] \[u044C] \" CYRILLIC SMALL LETTER SOFT SIGN
+.char \[je] \[u044D] \" CYRILLIC SMALL LETTER E
+.char \[ju] \[u044E] \" CYRILLIC SMALL LETTER YU
+.char \[ja] \[u044F] \" CYRILLIC SMALL LETTER YA
+.char \[io] \[u0451] \" CYRILLIC SMALL LETTER IO
+.char \[d%] \[u0452] \" CYRILLIC SMALL LETTER DJE (Serbocroatian)
+.char \[g%] \[u0453] \" CYRILLIC SMALL LETTER GJE (Macedonian)
+.char \[ie] \[u0454] \" CYRILLIC SMALL LETTER UKRAINIAN IE
+.char \[ds] \[u0455] \" CYRILLIC SMALL LETTER DZE (Macedonian)
+.char \[ii] \[u0456] \" CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I
+.char \[yi] \[u0457] \" CYRILLIC SMALL LETTER YI (Ukrainian)
+.char \[j%] \[u0458] \" CYRILLIC SMALL LETTER JE
+.char \[lj] \[u0459] \" CYRILLIC SMALL LETTER LJE
+.char \[nj] \[u045A] \" CYRILLIC SMALL LETTER NJE
+.char \[ts] \[u045B] \" CYRILLIC SMALL LETTER TSHE (Serbocroatian)
+.char \[kj] \[u045C] \" CYRILLIC SMALL LETTER KJE (Macedonian)
+.char \[v%] \[u045E] \" CYRILLIC SMALL LETTER SHORT U (Byelorussian)
+.char \[dz] \[u045F] \" CYRILLIC SMALL LETTER DZHE
+.char \[Y3] \[u0462] \" CYRILLIC CAPITAL LETTER YAT
+.char \[y3] \[u0463] \" CYRILLIC SMALL LETTER YAT
+.char \[O3] \[u046A] \" CYRILLIC CAPITAL LETTER BIG YUS
+.char \[o3] \[u046B] \" CYRILLIC SMALL LETTER BIG YUS
+.char \[F3] \[u0472] \" CYRILLIC CAPITAL LETTER FITA
+.char \[f3] \[u0473] \" CYRILLIC SMALL LETTER FITA
+.char \[V3] \[u0474] \" CYRILLIC CAPITAL LETTER IZHITSA
+.char \[v3] \[u0475] \" CYRILLIC SMALL LETTER IZHITSA
+.char \[C3] \[u0480] \" CYRILLIC CAPITAL LETTER KOPPA
+.char \[c3] \[u0481] \" CYRILLIC SMALL LETTER KOPPA
+.char \[G3] \[u0490] \" CYRILLIC CAPITAL LETTER GHE WITH UPTURN
+.char \[g3] \[u0491] \" CYRILLIC SMALL LETTER GHE WITH UPTURN
+.char \[A+] \[u05D0] \" HEBREW LETTER ALEF
+.char \[B+] \[u05D1] \" HEBREW LETTER BET
+.char \[G+] \[u05D2] \" HEBREW LETTER GIMEL
+.char \[D+] \[u05D3] \" HEBREW LETTER DALET
+.char \[H+] \[u05D4] \" HEBREW LETTER HE
+.char \[W+] \[u05D5] \" HEBREW LETTER VAV
+.char \[Z+] \[u05D6] \" HEBREW LETTER ZAYIN
+.char \[X+] \[u05D7] \" HEBREW LETTER HET
+.char \[Tj] \[u05D8] \" HEBREW LETTER TET
+.char \[J+] \[u05D9] \" HEBREW LETTER YOD
+.char \[K%] \[u05DA] \" HEBREW LETTER FINAL KAF
+.char \[K+] \[u05DB] \" HEBREW LETTER KAF
+.char \[L+] \[u05DC] \" HEBREW LETTER LAMED
+.char \[M%] \[u05DD] \" HEBREW LETTER FINAL MEM
+.char \[M+] \[u05DE] \" HEBREW LETTER MEM
+.char \[N%] \[u05DF] \" HEBREW LETTER FINAL NUN
+.char \[N+] \[u05E0] \" HEBREW LETTER NUN
+.char \[S+] \[u05E1] \" HEBREW LETTER SAMEKH
+.char \[E+] \[u05E2] \" HEBREW LETTER AYIN
+.char \[P%] \[u05E3] \" HEBREW LETTER FINAL PE
+.char \[P+] \[u05E4] \" HEBREW LETTER PE
+.char \[Zj] \[u05E5] \" HEBREW LETTER FINAL TSADI
+.char \[ZJ] \[u05E6] \" HEBREW LETTER TSADI
+.char \[Q+] \[u05E7] \" HEBREW LETTER QOF
+.char \[R+] \[u05E8] \" HEBREW LETTER RESH
+.char \[Sh] \[u05E9] \" HEBREW LETTER SHIN
+.char \[T+] \[u05EA] \" HEBREW LETTER TAV
+.char \[,+] \[u060C] \" ARABIC COMMA
+.char \[;+] \[u061B] \" ARABIC SEMICOLON
+.char \[?+] \[u061F] \" ARABIC QUESTION MARK
+.char \[H'] \[u0621] \" ARABIC LETTER HAMZA
+.char \[aM] \[u0622] \" ARABIC LETTER ALEF WITH MADDA ABOVE
+.char \[aH] \[u0623] \" ARABIC LETTER ALEF WITH HAMZA ABOVE
+.char \[wH] \[u0624] \" ARABIC LETTER WAW WITH HAMZA ABOVE
+.char \[ah] \[u0625] \" ARABIC LETTER ALEF WITH HAMZA BELOW
+.char \[yH] \[u0626] \" ARABIC LETTER YEH WITH HAMZA ABOVE
+.char \[a+] \[u0627] \" ARABIC LETTER ALEF
+.char \[b+] \[u0628] \" ARABIC LETTER BEH
+.char \[tm] \[u0629] \" ARABIC LETTER TEH MARBUTA
+.char \[t+] \[u062A] \" ARABIC LETTER TEH
+.char \[tk] \[u062B] \" ARABIC LETTER THEH
+.char \[g+] \[u062C] \" ARABIC LETTER JEEM
+.char \[hk] \[u062D] \" ARABIC LETTER HAH
+.char \[x+] \[u062E] \" ARABIC LETTER KHAH
+.char \[d+] \[u062F] \" ARABIC LETTER DAL
+.char \[dk] \[u0630] \" ARABIC LETTER THAL
+.char \[r+] \[u0631] \" ARABIC LETTER REH
+.char \[z+] \[u0632] \" ARABIC LETTER ZAIN
+.char \[s+] \[u0633] \" ARABIC LETTER SEEN
+.char \[sn] \[u0634] \" ARABIC LETTER SHEEN
+.char \[c+] \[u0635] \" ARABIC LETTER SAD
+.char \[dd] \[u0636] \" ARABIC LETTER DAD
+.char \[tj] \[u0637] \" ARABIC LETTER TAH
+.char \[zH] \[u0638] \" ARABIC LETTER ZAH
+.char \[e+] \[u0639] \" ARABIC LETTER AIN
+.char \[i+] \[u063A] \" ARABIC LETTER GHAIN
+.char \[++] \[u0640] \" ARABIC TATWEEL
+.char \[f+] \[u0641] \" ARABIC LETTER FEH
+.char \[q+] \[u0642] \" ARABIC LETTER QAF
+.char \[k+] \[u0643] \" ARABIC LETTER KAF
+.char \[l+] \[u0644] \" ARABIC LETTER LAM
+.char \[m+] \[u0645] \" ARABIC LETTER MEEM
+.char \[n+] \[u0646] \" ARABIC LETTER NOON
+.char \[h+] \[u0647] \" ARABIC LETTER HEH
+.char \[w+] \[u0648] \" ARABIC LETTER WAW
+.char \[j+] \[u0649] \" ARABIC LETTER ALEF MAKSURA
+.char \[y+] \[u064A] \" ARABIC LETTER YEH
+.char \[:+] \[u064B] \" ARABIC FATHATAN
+.char \["+] \[u064C] \" ARABIC DAMMATAN
+.char \[=+] \[u064D] \" ARABIC KASRATAN
+.char \[/+] \[u064E] \" ARABIC FATHA
+.char \['+] \[u064F] \" ARABIC DAMMA
+.char \[1+] \[u0650] \" ARABIC KASRA
+.char \[3+] \[u0651] \" ARABIC SHADDA
+.char \[0+] \[u0652] \" ARABIC SUKUN
+.char \[aS] \[u0670] \" SUPERSCRIPT ARABIC LETTER ALEF
+.char \[p+] \[u067E] \" ARABIC LETTER PEH
+.char \[v+] \[u06A4] \" ARABIC LETTER VEH
+.char \[gf] \[u06AF] \" ARABIC LETTER GAF
+.char \[0a] \[u06F0] \" EASTERN ARABIC-INDIC DIGIT ZERO
+.char \[1a] \[u06F1] \" EASTERN ARABIC-INDIC DIGIT ONE
+.char \[2a] \[u06F2] \" EASTERN ARABIC-INDIC DIGIT TWO
+.char \[3a] \[u06F3] \" EASTERN ARABIC-INDIC DIGIT THREE
+.char \[4a] \[u06F4] \" EASTERN ARABIC-INDIC DIGIT FOUR
+.char \[5a] \[u06F5] \" EASTERN ARABIC-INDIC DIGIT FIVE
+.char \[6a] \[u06F6] \" EASTERN ARABIC-INDIC DIGIT SIX
+.char \[7a] \[u06F7] \" EASTERN ARABIC-INDIC DIGIT SEVEN
+.char \[8a] \[u06F8] \" EASTERN ARABIC-INDIC DIGIT EIGHT
+.char \[9a] \[u06F9] \" EASTERN ARABIC-INDIC DIGIT NINE
+.char \[A-0] \[u1E00] \" LATIN CAPITAL LETTER A WITH RING BELOW
+.char \[a-0] \[u1E01] \" LATIN SMALL LETTER A WITH RING BELOW
+.char \[B.] \[u1E02] \" LATIN CAPITAL LETTER B WITH DOT ABOVE
+.char \[b.] \[u1E03] \" LATIN SMALL LETTER B WITH DOT ABOVE
+.char \[B-.] \[u1E04] \" LATIN CAPITAL LETTER B WITH DOT BELOW
+.char \[b-.] \[u1E05] \" LATIN SMALL LETTER B WITH DOT BELOW
+.char \[B_] \[u1E06] \" LATIN CAPITAL LETTER B WITH LINE BELOW
+.char \[b_] \[u1E07] \" LATIN SMALL LETTER B WITH LINE BELOW
+.char \[C,'] \[u1E08] \" LATIN CAPITAL LETTER C WITH CEDILLA AND ACUTE
+.char \[c,'] \[u1E09] \" LATIN SMALL LETTER C WITH CEDILLA AND ACUTE
+.char \[D.] \[u1E0A] \" LATIN CAPITAL LETTER D WITH DOT ABOVE
+.char \[d.] \[u1E0B] \" LATIN SMALL LETTER D WITH DOT ABOVE
+.char \[D-.] \[u1E0C] \" LATIN CAPITAL LETTER D WITH DOT BELOW
+.char \[d-.] \[u1E0D] \" LATIN SMALL LETTER D WITH DOT BELOW
+.char \[D_] \[u1E0E] \" LATIN CAPITAL LETTER D WITH LINE BELOW
+.char \[d_] \[u1E0F] \" LATIN SMALL LETTER D WITH LINE BELOW
+.char \[D,] \[u1E10] \" LATIN CAPITAL LETTER D WITH CEDILLA
+.char \[d,] \[u1E11] \" LATIN SMALL LETTER D WITH CEDILLA
+.char \[D->] \[u1E12] \" LATIN CAPITAL LETTER D WITH CIRCUMFLEX BELOW
+.char \[d->] \[u1E13] \" LATIN SMALL LETTER D WITH CIRCUMFLEX BELOW
+.char \[E-!] \[u1E14] \" LATIN CAPITAL LETTER E WITH MACRON AND GRAVE
+.char \[e-!] \[u1E15] \" LATIN SMALL LETTER E WITH MACRON AND GRAVE
+.char \[E-'] \[u1E16] \" LATIN CAPITAL LETTER E WITH MACRON AND ACUTE
+.char \[e-'] \[u1E17] \" LATIN SMALL LETTER E WITH MACRON AND ACUTE
+.char \[E->] \[u1E18] \" LATIN CAPITAL LETTER E WITH CIRCUMFLEX BELOW
+.char \[e->] \[u1E19] \" LATIN SMALL LETTER E WITH CIRCUMFLEX BELOW
+.char \[E-?] \[u1E1A] \" LATIN CAPITAL LETTER E WITH TILDE BELOW
+.char \[e-?] \[u1E1B] \" LATIN SMALL LETTER E WITH TILDE BELOW
+.char \[E,(] \[u1E1C] \" LATIN CAPITAL LETTER E WITH CEDILLA AND BREVE
+.char \[e,(] \[u1E1D] \" LATIN SMALL LETTER E WITH CEDILLA AND BREVE
+.char \[F.] \[u1E1E] \" LATIN CAPITAL LETTER F WITH DOT ABOVE
+.char \[f.] \[u1E1F] \" LATIN SMALL LETTER F WITH DOT ABOVE
+.char \[G-] \[u1E20] \" LATIN CAPITAL LETTER G WITH MACRON
+.char \[g-] \[u1E21] \" LATIN SMALL LETTER G WITH MACRON
+.char \[H.] \[u1E22] \" LATIN CAPITAL LETTER H WITH DOT ABOVE
+.char \[h.] \[u1E23] \" LATIN SMALL LETTER H WITH DOT ABOVE
+.char \[H-.] \[u1E24] \" LATIN CAPITAL LETTER H WITH DOT BELOW
+.char \[h-.] \[u1E25] \" LATIN SMALL LETTER H WITH DOT BELOW
+.char \[H:] \[u1E26] \" LATIN CAPITAL LETTER H WITH DIAERESIS
+.char \[h:] \[u1E27] \" LATIN SMALL LETTER H WITH DIAERESIS
+.char \[H,] \[u1E28] \" LATIN CAPITAL LETTER H WITH CEDILLA
+.char \[h,] \[u1E29] \" LATIN SMALL LETTER H WITH CEDILLA
+.char \[H-(] \[u1E2A] \" LATIN CAPITAL LETTER H WITH BREVE BELOW
+.char \[h-(] \[u1E2B] \" LATIN SMALL LETTER H WITH BREVE BELOW
+.char \[I-?] \[u1E2C] \" LATIN CAPITAL LETTER I WITH TILDE BELOW
+.char \[i-?] \[u1E2D] \" LATIN SMALL LETTER I WITH TILDE BELOW
+.char \[I:'] \[u1E2E] \" LATIN CAPITAL LETTER I WITH DIAERESIS AND ACUTE
+.char \[i:'] \[u1E2F] \" LATIN SMALL LETTER I WITH DIAERESIS AND ACUTE
+.char \[K'] \[u1E30] \" LATIN CAPITAL LETTER K WITH ACUTE
+.char \[k'] \[u1E31] \" LATIN SMALL LETTER K WITH ACUTE
+.char \[K-.] \[u1E32] \" LATIN CAPITAL LETTER K WITH DOT BELOW
+.char \[k-.] \[u1E33] \" LATIN SMALL LETTER K WITH DOT BELOW
+.char \[K_] \[u1E34] \" LATIN CAPITAL LETTER K WITH LINE BELOW
+.char \[k_] \[u1E35] \" LATIN SMALL LETTER K WITH LINE BELOW
+.char \[L-.] \[u1E36] \" LATIN CAPITAL LETTER L WITH DOT BELOW
+.char \[l-.] \[u1E37] \" LATIN SMALL LETTER L WITH DOT BELOW
+.char \[L--.] \[u1E38] \" LATIN CAPITAL LETTER L WITH DOT BELOW AND MACRON
+.char \[l--.] \[u1E39] \" LATIN SMALL LETTER L WITH DOT BELOW AND MACRON
+.char \[L_] \[u1E3A] \" LATIN CAPITAL LETTER L WITH LINE BELOW
+.char \[l_] \[u1E3B] \" LATIN SMALL LETTER L WITH LINE BELOW
+.char \[L->] \[u1E3C] \" LATIN CAPITAL LETTER L WITH CIRCUMFLEX BELOW
+.char \[l->] \[u1E3D] \" LATIN SMALL LETTER L WITH CIRCUMFLEX BELOW
+.char \[M'] \[u1E3E] \" LATIN CAPITAL LETTER M WITH ACUTE
+.char \[m'] \[u1E3F] \" LATIN SMALL LETTER M WITH ACUTE
+.char \[M.] \[u1E40] \" LATIN CAPITAL LETTER M WITH DOT ABOVE
+.char \[m.] \[u1E41] \" LATIN SMALL LETTER M WITH DOT ABOVE
+.char \[M-.] \[u1E42] \" LATIN CAPITAL LETTER M WITH DOT BELOW
+.char \[m-.] \[u1E43] \" LATIN SMALL LETTER M WITH DOT BELOW
+.char \[N.] \[u1E44] \" LATIN CAPITAL LETTER N WITH DOT ABOVE
+.char \[n.] \[u1E45] \" LATIN SMALL LETTER N WITH DOT ABOVE
+.char \[N-.] \[u1E46] \" LATIN CAPITAL LETTER N WITH DOT BELOW
+.char \[n-.] \[u1E47] \" LATIN SMALL LETTER N WITH DOT BELOW
+.char \[N_] \[u1E48] \" LATIN CAPITAL LETTER N WITH LINE BELOW
+.char \[n_] \[u1E49] \" LATIN SMALL LETTER N WITH LINE BELOW
+.char \[N->] \[u1E4A] \" LATIN CAPITAL LETTER N WITH CIRCUMFLEX BELOW
+.char \[N->] \[u1E4B] \" LATIN SMALL LETTER N WITH CIRCUMFLEX BELOW
+.char \[O?'] \[u1E4C] \" LATIN CAPITAL LETTER O WITH TILDE AND ACUTE
+.char \[o?'] \[u1E4D] \" LATIN SMALL LETTER O WITH TILDE AND ACUTE
+.char \[O?:] \[u1E4E] \" LATIN CAPITAL LETTER O WITH TILDE AND DIAERESIS
+.char \[o?:] \[u1E4F] \" LATIN SMALL LETTER O WITH TILDE AND DIAERESIS
+.char \[O-!] \[u1E50] \" LATIN CAPITAL LETTER O WITH MACRON AND GRAVE
+.char \[o-!] \[u1E51] \" LATIN SMALL LETTER O WITH MACRON AND GRAVE
+.char \[O-'] \[u1E52] \" LATIN CAPITAL LETTER O WITH MACRON AND ACUTE
+.char \[o-'] \[u1E53] \" LATIN SMALL LETTER O WITH MACRON AND ACUTE
+.char \[P'] \[u1E54] \" LATIN CAPITAL LETTER P WITH ACUTE
+.char \[p'] \[u1E55] \" LATIN SMALL LETTER P WITH ACUTE
+.char \[P.] \[u1E56] \" LATIN CAPITAL LETTER P WITH DOT ABOVE
+.char \[p.] \[u1E57] \" LATIN SMALL LETTER P WITH DOT ABOVE
+.char \[R.] \[u1E58] \" LATIN CAPITAL LETTER R WITH DOT ABOVE
+.char \[r.] \[u1E59] \" LATIN SMALL LETTER R WITH DOT ABOVE
+.char \[R-.] \[u1E5A] \" LATIN CAPITAL LETTER R WITH DOT BELOW
+.char \[r-.] \[u1E5B] \" LATIN SMALL LETTER R WITH DOT BELOW
+.char \[R--.] \[u1E5C] \" LATIN CAPITAL LETTER R WITH DOT BELOW AND MACRON
+.char \[r--.] \[u1E5D] \" LATIN SMALL LETTER R WITH DOT BELOW AND MACRON
+.char \[R_] \[u1E5E] \" LATIN CAPITAL LETTER R WITH LINE BELOW
+.char \[r_] \[u1E5F] \" LATIN SMALL LETTER R WITH LINE BELOW
+.char \[S.] \[u1E60] \" LATIN CAPITAL LETTER S WITH DOT ABOVE
+.char \[s.] \[u1E61] \" LATIN SMALL LETTER S WITH DOT ABOVE
+.char \[S-.] \[u1E62] \" LATIN CAPITAL LETTER S WITH DOT BELOW
+.char \[s-.] \[u1E63] \" LATIN SMALL LETTER S WITH DOT BELOW
+.char \[S'.] \[u1E64] \" LATIN CAPITAL LETTER S WITH ACUTE AND DOT ABOVE
+.char \[s'.] \[u1E65] \" LATIN SMALL LETTER S WITH ACUTE AND DOT ABOVE
+.char \[S<.] \[u1E66] \" LATIN CAPITAL LETTER S WITH CARON AND DOT ABOVE
+.char \[s<.] \[u1E67] \" LATIN SMALL LETTER S WITH CARON AND DOT ABOVE
+.char \[S.-.] \[u1E68] \" LATIN CAPITAL LETTER S WITH DOT BELOW AND DOT ABOVE
+.char \[S.-.] \[u1E69] \" LATIN SMALL LETTER S WITH DOT BELOW AND DOT ABOVE
+.char \[T.] \[u1E6A] \" LATIN CAPITAL LETTER T WITH DOT ABOVE
+.char \[t.] \[u1E6B] \" LATIN SMALL LETTER T WITH DOT ABOVE
+.char \[T-.] \[u1E6C] \" LATIN CAPITAL LETTER T WITH DOT BELOW
+.char \[t-.] \[u1E6D] \" LATIN SMALL LETTER T WITH DOT BELOW
+.char \[T_] \[u1E6E] \" LATIN CAPITAL LETTER T WITH LINE BELOW
+.char \[t_] \[u1E6F] \" LATIN SMALL LETTER T WITH LINE BELOW
+.char \[T->] \[u1E70] \" LATIN CAPITAL LETTER T WITH CIRCUMFLEX BELOW
+.char \[t->] \[u1E71] \" LATIN SMALL LETTER T WITH CIRCUMFLEX BELOW
+.char \[U--:] \[u1E72] \" LATIN CAPITAL LETTER U WITH DIAERESIS BELOW
+.char \[u--:] \[u1E73] \" LATIN SMALL LETTER U WITH DIAERESIS BELOW
+.char \[U-?] \[u1E74] \" LATIN CAPITAL LETTER U WITH TILDE BELOW
+.char \[u-?] \[u1E75] \" LATIN SMALL LETTER U WITH TILDE BELOW
+.char \[U->] \[u1E76] \" LATIN CAPITAL LETTER U WITH CIRCUMFLEX BELOW
+.char \[u->] \[u1E77] \" LATIN SMALL LETTER U WITH CIRCUMFLEX BELOW
+.char \[U?'] \[u1E78] \" LATIN CAPITAL LETTER U WITH TILDE AND ACUTE
+.char \[u?'] \[u1E79] \" LATIN SMALL LETTER U WITH TILDE AND ACUTE
+.char \[U-:] \[u1E7A] \" LATIN CAPITAL LETTER U WITH MACRON AND DIAERESIS
+.char \[u-:] \[u1E7B] \" LATIN SMALL LETTER U WITH MACRON AND DIAERESIS
+.char \[V?] \[u1E7C] \" LATIN CAPITAL LETTER V WITH TILDE
+.char \[v?] \[u1E7D] \" LATIN SMALL LETTER V WITH TILDE
+.char \[V-.] \[u1E7E] \" LATIN CAPITAL LETTER V WITH DOT BELOW
+.char \[v-.] \[u1E7F] \" LATIN SMALL LETTER V WITH DOT BELOW
+.char \[W!] \[u1E80] \" LATIN CAPITAL LETTER W WITH GRAVE
+.char \[w!] \[u1E81] \" LATIN SMALL LETTER W WITH GRAVE
+.char \[W'] \[u1E82] \" LATIN CAPITAL LETTER W WITH ACUTE
+.char \[w'] \[u1E83] \" LATIN SMALL LETTER W WITH ACUTE
+.char \[W:] \[u1E84] \" LATIN CAPITAL LETTER W WITH DIAERESIS
+.char \[w:] \[u1E85] \" LATIN SMALL LETTER W WITH DIAERESIS
+.char \[W.] \[u1E86] \" LATIN CAPITAL LETTER W WITH DOT ABOVE
+.char \[w.] \[u1E87] \" LATIN SMALL LETTER W WITH DOT ABOVE
+.char \[W-.] \[u1E88] \" LATIN CAPITAL LETTER W WITH DOT BELOW
+.char \[w-.] \[u1E89] \" LATIN SMALL LETTER W WITH DOT BELOW
+.char \[X.] \[u1E8A] \" LATIN CAPITAL LETTER X WITH DOT ABOVE
+.char \[x.] \[u1E8B] \" LATIN SMALL LETTER X WITH DOT ABOVE
+.char \[X:] \[u1E8C] \" LATIN CAPITAL LETTER X WITH DIAERESIS
+.char \[x:] \[u1E8D] \" LATIN SMALL LETTER X WITH DIAERESIS
+.char \[Y.] \[u1E8E] \" LATIN CAPITAL LETTER Y WITH DOT ABOVE
+.char \[y.] \[u1E8F] \" LATIN SMALL LETTER Y WITH DOT ABOVE
+.char \[Z>] \[u1E90] \" LATIN CAPITAL LETTER Z WITH CIRCUMFLEX
+.char \[z>] \[u1E91] \" LATIN SMALL LETTER Z WITH CIRCUMFLEX
+.char \[Z-.] \[u1E92] \" LATIN CAPITAL LETTER Z WITH DOT BELOW
+.char \[z-.] \[u1E93] \" LATIN SMALL LETTER Z WITH DOT BELOW
+.char \[Z_] \[u1E94] \" LATIN CAPITAL LETTER Z WITH LINE BELOW
+.char \[z_] \[u1E95] \" LATIN SMALL LETTER Z WITH LINE BELOW
+.char \[h_] \[u1E96] \" LATIN SMALL LETTER H WITH LINE BELOW
+.char \[t:] \[u1E97] \" LATIN SMALL LETTER T WITH DIAERESIS
+.char \[w0] \[u1E98] \" LATIN SMALL LETTER W WITH RING ABOVE
+.char \[y0] \[u1E99] \" LATIN SMALL LETTER Y WITH RING ABOVE
+.char \[A-.] \[u1EA0] \" LATIN CAPITAL LETTER A WITH DOT BELOW
+.char \[a-.] \[u1EA1] \" LATIN SMALL LETTER A WITH DOT BELOW
+.char \[A2] \[u1EA2] \" LATIN CAPITAL LETTER A WITH HOOK ABOVE
+.char \[a2] \[u1EA3] \" LATIN SMALL LETTER A WITH HOOK ABOVE
+.char \[A>'] \[u1EA4] \" LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND ACUTE
+.char \[a>'] \[u1EA5] \" LATIN SMALL LETTER A WITH CIRCUMFLEX AND ACUTE
+.char \[A>!] \[u1EA6] \" LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND GRAVE
+.char \[a>!] \[u1EA7] \" LATIN SMALL LETTER A WITH CIRCUMFLEX AND GRAVE
+.char \[A>2] \[u1EA8] \" LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND HOOK ABOVE
+.char \[a>2] \[u1EA9] \" LATIN SMALL LETTER A WITH CIRCUMFLEX AND HOOK ABOVE
+.char \[A>?] \[u1EAA] \" LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND TILDE
+.char \[a>?] \[u1EAB] \" LATIN SMALL LETTER A WITH CIRCUMFLEX AND TILDE
+.char \[A>-.] \[u1EAC] \" LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND DOT BELOW
+.char \[a>-.] \[u1EAD] \" LATIN SMALL LETTER A WITH CIRCUMFLEX AND DOT BELOW
+.char \[A('] \[u1EAE] \" LATIN CAPITAL LETTER A WITH BREVE AND ACUTE
+.char \[a('] \[u1EAF] \" LATIN SMALL LETTER A WITH BREVE AND ACUTE
+.char \[A(!] \[u1EB0] \" LATIN CAPITAL LETTER A WITH BREVE AND GRAVE
+.char \[a(!] \[u1EB1] \" LATIN SMALL LETTER A WITH BREVE AND GRAVE
+.char \[A(2] \[u1EB2] \" LATIN CAPITAL LETTER A WITH BREVE AND HOOK ABOVE
+.char \[a(2] \[u1EB3] \" LATIN SMALL LETTER A WITH BREVE AND HOOK ABOVE
+.char \[A(?] \[u1EB4] \" LATIN CAPITAL LETTER A WITH BREVE AND TILDE
+.char \[a(?] \[u1EB5] \" LATIN SMALL LETTER A WITH BREVE AND TILDE
+.char \[A(-.] \[u1EB6] \" LATIN CAPITAL LETTER A WITH BREVE AND DOT BELOW
+.char \[a(-.] \[u1EB7] \" LATIN SMALL LETTER A WITH BREVE AND DOT BELOW
+.char \[E-.] \[u1EB8] \" LATIN CAPITAL LETTER E WITH DOT BELOW
+.char \[e-.] \[u1EB9] \" LATIN SMALL LETTER E WITH DOT BELOW
+.char \[E2] \[u1EBA] \" LATIN CAPITAL LETTER E WITH HOOK ABOVE
+.char \[e2] \[u1EBB] \" LATIN SMALL LETTER E WITH HOOK ABOVE
+.char \[E?] \[u1EBC] \" LATIN CAPITAL LETTER E WITH TILDE
+.char \[e?] \[u1EBD] \" LATIN SMALL LETTER E WITH TILDE
+.char \[E>'] \[u1EBE] \" LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND ACUTE
+.char \[e>'] \[u1EBF] \" LATIN SMALL LETTER E WITH CIRCUMFLEX AND ACUTE
+.char \[E>!] \[u1EC0] \" LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND GRAVE
+.char \[e>!] \[u1EC1] \" LATIN SMALL LETTER E WITH CIRCUMFLEX AND GRAVE
+.char \[E>2] \[u1EC2] \" LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND HOOK ABOVE
+.char \[e>2] \[u1EC3] \" LATIN SMALL LETTER E WITH CIRCUMFLEX AND HOOK ABOVE
+.char \[E>?] \[u1EC4] \" LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND TILDE
+.char \[e>?] \[u1EC5] \" LATIN SMALL LETTER E WITH CIRCUMFLEX AND TILDE
+.char \[E>-.] \[u1EC6] \" LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND DOT BELOW
+.char \[e>-.] \[u1EC7] \" LATIN SMALL LETTER E WITH CIRCUMFLEX AND DOT BELOW
+.char \[I2] \[u1EC8] \" LATIN CAPITAL LETTER I WITH HOOK ABOVE
+.char \[i2] \[u1EC9] \" LATIN SMALL LETTER I WITH HOOK ABOVE
+.char \[I-.] \[u1ECA] \" LATIN CAPITAL LETTER I WITH DOT BELOW
+.char \[i-.] \[u1ECB] \" LATIN SMALL LETTER I WITH DOT BELOW
+.char \[O-.] \[u1ECC] \" LATIN CAPITAL LETTER O WITH DOT BELOW
+.char \[o-.] \[u1ECD] \" LATIN SMALL LETTER O WITH DOT BELOW
+.char \[O2] \[u1ECE] \" LATIN CAPITAL LETTER O WITH HOOK ABOVE
+.char \[o2] \[u1ECF] \" LATIN SMALL LETTER O WITH HOOK ABOVE
+.char \[O>'] \[u1ED0] \" LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND ACUTE
+.char \[o>'] \[u1ED1] \" LATIN SMALL LETTER O WITH CIRCUMFLEX AND ACUTE
+.char \[O>!] \[u1ED2] \" LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND GRAVE
+.char \[o>!] \[u1ED3] \" LATIN SMALL LETTER O WITH CIRCUMFLEX AND GRAVE
+.char \[O>2] \[u1ED4] \" LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND HOOK ABOVE
+.char \[o>2] \[u1ED5] \" LATIN SMALL LETTER O WITH CIRCUMFLEX AND HOOK ABOVE
+.char \[O>?] \[u1ED6] \" LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND TILDE
+.char \[o>?] \[u1ED7] \" LATIN SMALL LETTER O WITH CIRCUMFLEX AND TILDE
+.char \[O>-.] \[u1ED8] \" LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND DOT BELOW
+.char \[o>-.] \[u1ED9] \" LATIN SMALL LETTER O WITH CIRCUMFLEX AND DOT BELOW
+.char \[O9'] \[u1EDA] \" LATIN CAPITAL LETTER O WITH HORN AND ACUTE
+.char \[o9'] \[u1EDB] \" LATIN SMALL LETTER O WITH HORN AND ACUTE
+.char \[O9!] \[u1EDC] \" LATIN CAPITAL LETTER O WITH HORN AND GRAVE
+.char \[o9!] \[u1EDD] \" LATIN SMALL LETTER O WITH HORN AND GRAVE
+.char \[O92] \[u1EDE] \" LATIN CAPITAL LETTER O WITH HORN AND HOOK ABOVE
+.char \[o92] \[u1EDF] \" LATIN SMALL LETTER O WITH HORN AND HOOK ABOVE
+.char \[O9?] \[u1EE0] \" LATIN CAPITAL LETTER O WITH HORN AND TILDE
+.char \[o9?] \[u1EE1] \" LATIN SMALL LETTER O WITH HORN AND TILDE
+.char \[O9-.] \[u1EE2] \" LATIN CAPITAL LETTER O WITH HORN AND DOT BELOW
+.char \[o9-.] \[u1EE3] \" LATIN SMALL LETTER O WITH HORN AND DOT BELOW
+.char \[U-.] \[u1EE4] \" LATIN CAPITAL LETTER U WITH DOT BELOW
+.char \[u-.] \[u1EE5] \" LATIN SMALL LETTER U WITH DOT BELOW
+.char \[U2] \[u1EE6] \" LATIN CAPITAL LETTER U WITH HOOK ABOVE
+.char \[u2] \[u1EE7] \" LATIN SMALL LETTER U WITH HOOK ABOVE
+.char \[U9'] \[u1EE8] \" LATIN CAPITAL LETTER U WITH HORN AND ACUTE
+.char \[u9'] \[u1EE9] \" LATIN SMALL LETTER U WITH HORN AND ACUTE
+.char \[U9!] \[u1EEA] \" LATIN CAPITAL LETTER U WITH HORN AND GRAVE
+.char \[u9!] \[u1EEB] \" LATIN SMALL LETTER U WITH HORN AND GRAVE
+.char \[U92] \[u1EEC] \" LATIN CAPITAL LETTER U WITH HORN AND HOOK ABOVE
+.char \[u92] \[u1EED] \" LATIN SMALL LETTER U WITH HORN AND HOOK ABOVE
+.char \[U9?] \[u1EEE] \" LATIN CAPITAL LETTER U WITH HORN AND TILDE
+.char \[u9?] \[u1EEF] \" LATIN SMALL LETTER U WITH HORN AND TILDE
+.char \[U9-.] \[u1EF0] \" LATIN CAPITAL LETTER U WITH HORN AND DOT BELOW
+.char \[u9-.] \[u1EF1] \" LATIN SMALL LETTER U WITH HORN AND DOT BELOW
+.char \[Y!] \[u1EF2] \" LATIN CAPITAL LETTER Y WITH GRAVE
+.char \[y!] \[u1EF3] \" LATIN SMALL LETTER Y WITH GRAVE
+.char \[Y-.] \[u1EF4] \" LATIN CAPITAL LETTER Y WITH DOT BELOW
+.char \[y-.] \[u1EF5] \" LATIN SMALL LETTER Y WITH DOT BELOW
+.char \[Y2] \[u1EF6] \" LATIN CAPITAL LETTER Y WITH HOOK ABOVE
+.char \[y2] \[u1EF7] \" LATIN SMALL LETTER Y WITH HOOK ABOVE
+.char \[Y?] \[u1EF8] \" LATIN CAPITAL LETTER Y WITH TILDE
+.char \[y?] \[u1EF9] \" LATIN SMALL LETTER Y WITH TILDE
+.char \[;'] \[u1F00] \" GREEK DASIA AND ACUTE ACCENT
+.char \[,'] \[u1F01] \" GREEK PSILI AND ACUTE ACCENT
+.char \[;!] \[u1F02] \" GREEK DASIA AND VARIA
+.char \[,!] \[u1F03] \" GREEK PSILI AND VARIA
+.char \[?;] \[u1F04] \" GREEK DASIA AND PERISPOMENI
+.char \[?,] \[u1F05] \" GREEK PSILI AND PERISPOMENI
+.char \[!:] \[u1F06] \" GREEK DIAERESIS AND VARIA
+.char \[?:] \[u1F07] \" GREEK DIAERESIS AND PERISPOMENI
+.char \[1N] \[u2002] \" EN SPACE
+.char \[1M] \[u2003] \" EM SPACE
+.char \[3M] \[u2004] \" THREE-PER-EM SPACE
+.char \[4M] \[u2005] \" FOUR-PER-EM SPACE
+.char \[6M] \[u2006] \" SIX-PER-EM SPACE
+.char \[1T] \[u2009] \" THIN SPACE
+.char \[1H] \[u200A] \" HAIR SPACE
+.char \[-1] \[u2010] \" HYPHEN
+.char \[-N] \[u2013] \" EN DASH
+.char \[-M] \[u2014] \" EM DASH
+.char \[-3] \[u2015] \" HORIZONTAL BAR
+.char \[!2] \[u2016] \" DOUBLE VERTICAL LINE
+.char \[=2] \[u2017] \" DOUBLE LOW LINE
+.char \['6] \[u2018] \" LEFT SINGLE QUOTATION MARK
+.char \['9] \[u2019] \" RIGHT SINGLE QUOTATION MARK
+.char \[.9] \[u201A] \" SINGLE LOW-9 QUOTATION MARK
+.char \[9'] \[u201B] \" SINGLE HIGH-REVERSED-9 QUOTATION MARK
+.char \["6] \[u201C] \" LEFT DOUBLE QUOTATION MARK
+.char \["9] \[u201D] \" RIGHT DOUBLE QUOTATION MARK
+.char \[:9] \[u201E] \" DOUBLE LOW-9 QUOTATION MARK
+.char \[9"] \[u201F] \" DOUBLE HIGH-REVERSED-9 QUOTATION MARK
+.char \[/-] \[u2020] \" DAGGER
+.char \[/=] \[u2021] \" DOUBLE DAGGER
+.char \[..] \[u2025] \" TWO DOT LEADER
+.char \[,.] \[u2026] \" HORIZONTAL ELLIPSIS (Vim)
+.char \[%0] \[u2030] \" PER MILLE SIGN
+.char \[1'] \[u2032] \" PRIME
+.char \[2'] \[u2033] \" DOUBLE PRIME
+.char \[3'] \[u2034] \" TRIPLE PRIME
+.char \[1"] \[u2035] \" REVERSED PRIME
+.char \[2"] \[u2036] \" REVERSED DOUBLE PRIME
+.char \[3"] \[u2037] \" REVERSED TRIPLE PRIME
+.char \[Ca] \[u2038] \" CARET
+.char \[<1] \[u2039] \" SINGLE LEFT-POINTING ANGLE QUOTATION MARK
+.char \[>1] \[u203A] \" SINGLE RIGHT-POINTING ANGLE QUOTATION MARK
+.char \[:X] \[u203B] \" REFERENCE MARK
+.char \[!*2] \[u203C] \" DOUBLE EXCLAMATION MARK
+.char \['-] \[u203E] \" OVERLINE
+.char \[/f] \[u2044] \" FRACTION SLASH
+.char \[0S] \[u2070] \" SUPERSCRIPT DIGIT ZERO
+.char \[4S] \[u2074] \" SUPERSCRIPT DIGIT FOUR
+.char \[5S] \[u2075] \" SUPERSCRIPT DIGIT FIVE
+.char \[6S] \[u2076] \" SUPERSCRIPT DIGIT SIX
+.char \[7S] \[u2077] \" SUPERSCRIPT DIGIT SEVEN
+.char \[8S] \[u2078] \" SUPERSCRIPT DIGIT EIGHT
+.char \[9S] \[u2079] \" SUPERSCRIPT DIGIT NINE
+.char \[+S] \[u207A] \" SUPERSCRIPT PLUS SIGN
+.char \[-S] \[u207B] \" SUPERSCRIPT MINUS
+.char \[=S] \[u207C] \" SUPERSCRIPT EQUALS SIGN
+.char \[(S] \[u207D] \" SUPERSCRIPT LEFT PARENTHESIS
+.char \[)S] \[u207E] \" SUPERSCRIPT RIGHT PARENTHESIS
+.char \[nS] \[u207F] \" SUPERSCRIPT LATIN SMALL LETTER N
+.char \[0s] \[u2080] \" SUBSCRIPT DIGIT ZERO
+.char \[1s] \[u2081] \" SUBSCRIPT DIGIT ONE
+.char \[2s] \[u2082] \" SUBSCRIPT DIGIT TWO
+.char \[3s] \[u2083] \" SUBSCRIPT DIGIT THREE
+.char \[4s] \[u2084] \" SUBSCRIPT DIGIT FOUR
+.char \[5s] \[u2085] \" SUBSCRIPT DIGIT FIVE
+.char \[6s] \[u2086] \" SUBSCRIPT DIGIT SIX
+.char \[7s] \[u2087] \" SUBSCRIPT DIGIT SEVEN
+.char \[8s] \[u2088] \" SUBSCRIPT DIGIT EIGHT
+.char \[9s] \[u2089] \" SUBSCRIPT DIGIT NINE
+.char \[+s] \[u208A] \" SUBSCRIPT PLUS SIGN
+.char \[-s] \[u208B] \" SUBSCRIPT MINUS
+.char \[=s] \[u208C] \" SUBSCRIPT EQUALS SIGN
+.char \[(s] \[u208D] \" SUBSCRIPT LEFT PARENTHESIS
+.char \[)s] \[u208E] \" SUBSCRIPT RIGHT PARENTHESIS
+.char \[Li] \[u20A4] \" LIRA SIGN
+.char \[Pt] \[u20A7] \" PESETA SIGN
+.char \[W=] \[u20A9] \" WON SIGN
+.char \[Eu] \[u20AC] \" EURO SIGN (Vim)
+.char \[=R] \[u20BD] \" ROUBLE SIGN (Vim)
+.char \[=P] \[u20BD] \" ROUBLE SIGN (Vim)
+.char \[oC] \[u2103] \" DEGREE CENTIGRADE
+.char \[co] \[u2105] \" CARE OF
+.char \[oF] \[u2109] \" DEGREE FAHRENHEIT
+.char \[N0] \[u2116] \" NUMERO SIGN
+.char \[PO] \[u2117] \" SOUND RECORDING COPYRIGHT
+.char \[Rx] \[u211E] \" PRESCRIPTION TAKE
+.char \[SM] \[u2120] \" SERVICE MARK
+.char \[TM] \[u2122] \" TRADE MARK SIGN
+.char \[Om] \[u2126] \" OHM SIGN
+.char \[AO] \[u212B] \" ANGSTROEM SIGN
+.char \[13] \[u2153] \" VULGAR FRACTION ONE THIRD
+.char \[23] \[u2154] \" VULGAR FRACTION TWO THIRDS
+.char \[15] \[u2155] \" VULGAR FRACTION ONE FIFTH
+.char \[25] \[u2156] \" VULGAR FRACTION TWO FIFTHS
+.char \[35] \[u2157] \" VULGAR FRACTION THREE FIFTHS
+.char \[45] \[u2158] \" VULGAR FRACTION FOUR FIFTHS
+.char \[16] \[u2159] \" VULGAR FRACTION ONE SIXTH
+.char \[56] \[u215A] \" VULGAR FRACTION FIVE SIXTHS
+.char \[18] \[u215B] \" VULGAR FRACTION ONE EIGHTH
+.char \[38] \[u215C] \" VULGAR FRACTION THREE EIGHTHS
+.char \[58] \[u215D] \" VULGAR FRACTION FIVE EIGHTHS
+.char \[78] \[u215E] \" VULGAR FRACTION SEVEN EIGHTHS
+.char \[1R] \[u2160] \" ROMAN NUMERAL ONE
+.char \[2R] \[u2161] \" ROMAN NUMERAL TWO
+.char \[3R] \[u2162] \" ROMAN NUMERAL THREE
+.char \[4R] \[u2163] \" ROMAN NUMERAL FOUR
+.char \[5R] \[u2164] \" ROMAN NUMERAL FIVE
+.char \[6R] \[u2165] \" ROMAN NUMERAL SIX
+.char \[7R] \[u2166] \" ROMAN NUMERAL SEVEN
+.char \[8R] \[u2167] \" ROMAN NUMERAL EIGHT
+.char \[9R] \[u2168] \" ROMAN NUMERAL NINE
+.char \[aR] \[u2169] \" ROMAN NUMERAL TEN
+.char \[bR] \[u216A] \" ROMAN NUMERAL ELEVEN
+.char \[cR] \[u216B] \" ROMAN NUMERAL TWELVE
+.char \[50R] \[u216C] \" ROMAN NUMERAL FIFTY
+.char \[100R] \[u216D] \" ROMAN NUMERAL ONE HUNDRED
+.char \[500R] \[u216E] \" ROMAN NUMERAL FIVE HUNDRED
+.char \[1000R] \[u216F] \" ROMAN NUMERAL ONE THOUSAND
+.char \[1r] \[u2170] \" SMALL ROMAN NUMERAL ONE
+.char \[2r] \[u2171] \" SMALL ROMAN NUMERAL TWO
+.char \[3r] \[u2172] \" SMALL ROMAN NUMERAL THREE
+.char \[4r] \[u2173] \" SMALL ROMAN NUMERAL FOUR
+.char \[5r] \[u2174] \" SMALL ROMAN NUMERAL FIVE
+.char \[6r] \[u2175] \" SMALL ROMAN NUMERAL SIX
+.char \[7r] \[u2176] \" SMALL ROMAN NUMERAL SEVEN
+.char \[8r] \[u2177] \" SMALL ROMAN NUMERAL EIGHT
+.char \[9r] \[u2178] \" SMALL ROMAN NUMERAL NINE
+.char \[ar] \[u2179] \" SMALL ROMAN NUMERAL TEN
+.char \[br] \[u217A] \" SMALL ROMAN NUMERAL ELEVEN
+.char \[cr] \[u217B] \" SMALL ROMAN NUMERAL TWELVE
+.char \[50r] \[u217C] \" SMALL ROMAN NUMERAL FIFTY
+.char \[100r] \[u217D] \" SMALL ROMAN NUMERAL ONE HUNDRED
+.char \[500r] \[u217E] \" SMALL ROMAN NUMERAL FIVE HUNDRED
+.char \[1000r] \[u217F] \" SMALL ROMAN NUMERAL ONE THOUSAND
+.char \[1000RCD] \[u2180] \" ROMAN NUMERAL ONE THOUSAND C D
+.char \[5000R] \[u2181] \" ROMAN NUMERAL FIVE THOUSAND
+.char \[10000R] \[u2182] \" ROMAN NUMERAL TEN THOUSAND
+.char \[<-] \[u2190] \" LEFTWARDS ARROW
+.char \[-!] \[u2191] \" UPWARDS ARROW
+.char \[->] \[u2192] \" RIGHTWARDS ARROW
+.char \[-v] \[u2193] \" DOWNWARDS ARROW
+.char \[<>] \[u2194] \" LEFT RIGHT ARROW
+.char \[UD] \[u2195] \" UP DOWN ARROW
+.char \[<!!] \[u2196] \" NORTH WEST ARROW
+.char \[//>] \[u2197] \" NORTH EAST ARROW
+.char \[!!>] \[u2198] \" SOUTH EAST ARROW
+.char \[<//] \[u2199] \" SOUTH WEST ARROW
+.char \[<=] \[u21D0] \" LEFTWARDS DOUBLE ARROW
+.char \[=>] \[u21D2] \" RIGHTWARDS DOUBLE ARROW
+.char \[==] \[u21D4] \" LEFT RIGHT DOUBLE ARROW
+.char \[FA] \[u2200] \" FOR ALL
+.char \[dP] \[u2202] \" PARTIAL DIFFERENTIAL
+.char \[TE] \[u2203] \" THERE EXISTS
+.char \[/0] \[u2205] \" EMPTY SET
+.char \[DE] \[u2206] \" INCREMENT
+.char \[NB] \[u2207] \" NABLA
+.char \[(-] \[u2208] \" ELEMENT OF
+.char \[-)] \[u220B] \" CONTAINS AS MEMBER
+.char \[*P] \[u220F] \" N-ARY PRODUCT
+.char \[+Z] \[u2211] \" N-ARY SUMMATION
+.char \[-2] \[u2212] \" MINUS SIGN
+.char \[-+] \[u2213] \" MINUS-OR-PLUS SIGN
+.char \[*-] \[u2217] \" ASTERISK OPERATOR
+.char \[Ob] \[u2218] \" RING OPERATOR
+.char \[Sb] \[u2219] \" BULLET OPERATOR
+.char \[RT] \[u221A] \" SQUARE ROOT
+.char \[0(] \[u221D] \" PROPORTIONAL TO
+.char \[00] \[u221E] \" INFINITY
+.char \[-L] \[u221F] \" RIGHT ANGLE
+.char \[-V] \[u2220] \" ANGLE
+.char \[PP] \[u2225] \" PARALLEL TO
+.char \[AN] \[u2227] \" LOGICAL AND
+.char \[OR] \[u2228] \" LOGICAL OR
+.char \[(U] \[u2229] \" INTERSECTION
+.char \[)U] \[u222A] \" UNION
+.char \[In] \[u222B] \" INTEGRAL
+.char \[DI] \[u222C] \" DOUBLE INTEGRAL
+.char \[Io] \[u222E] \" CONTOUR INTEGRAL
+.char \[.:] \[u2234] \" THEREFORE
+.char \[:.] \[u2235] \" BECAUSE
+.char \[:R] \[u2236] \" RATIO
+.char \[::] \[u2237] \" PROPORTION
+.char \[?1] \[u223C] \" TILDE OPERATOR
+.char \[CG] \[u223E] \" INVERTED LAZY S
+.char \[?-] \[u2243] \" ASYMPTOTICALLY EQUAL TO
+.char \[?=] \[u2245] \" APPROXIMATELY EQUAL TO
+.char \[?2] \[u2248] \" ALMOST EQUAL TO
+.char \[=?] \[u224C] \" ALL EQUAL TO
+.char \[HI] \[u2253] \" IMAGE OF OR APPROXIMATELY EQUAL TO
+.char \[!=] \[u2260] \" NOT EQUAL TO
+.char \[=3] \[u2261] \" IDENTICAL TO
+.char \[=<] \[u2264] \" LESS-THAN OR EQUAL TO
+.char \[>=] \[u2265] \" GREATER-THAN OR EQUAL TO
+.char \[<*] \[u226A] \" MUCH LESS-THAN
+.char \[*>] \[u226B] \" MUCH GREATER-THAN
+.char \[!<] \[u226E] \" NOT LESS-THAN
+.char \[!>] \[u226F] \" NOT GREATER-THAN
+.char \[(C] \[u2282] \" SUBSET OF
+.char \[)C] \[u2283] \" SUPERSET OF
+.char \[(_] \[u2286] \" SUBSET OF OR EQUAL TO
+.char \[)_] \[u2287] \" SUPERSET OF OR EQUAL TO
+.char \[0.] \[u2299] \" CIRCLED DOT OPERATOR
+.char \[02] \[u229A] \" CIRCLED RING OPERATOR
+.char \[-T] \[u22A5] \" UP TACK
+.char \[.P] \[u22C5] \" DOT OPERATOR
+.char \[:3] \[u22EE] \" VERTICAL ELLIPSIS
+.char \[.3] \[u22EF] \" MIDLINE HORIZONTAL ELLIPSIS
+.char \[Eh] \[u2302] \" HOUSE
+.char \[<7] \[u2308] \" LEFT CEILING
+.char \[>7] \[u2309] \" RIGHT CEILING
+.char \[7<] \[u230A] \" LEFT FLOOR
+.char \[7>] \[u230B] \" RIGHT FLOOR
+.char \[NI] \[u2310] \" REVERSED NOT SIGN
+.char \[(A] \[u2312] \" ARC
+.char \[TR] \[u2315] \" TELEPHONE RECORDER
+.char \[Iu] \[u2320] \" TOP HALF INTEGRAL
+.char \[Il] \[u2321] \" BOTTOM HALF INTEGRAL
+.char \[</] \[u2329] \" LEFT-POINTING ANGLE BRACKET
+.char \[/>] \[u232A] \" RIGHT-POINTING ANGLE BRACKET
+.char \[Vs] \[u2423] \" OPEN BOX
+.char \[1h] \[u2440] \" OCR HOOK
+.char \[3h] \[u2441] \" OCR CHAIR
+.char \[2h] \[u2442] \" OCR FORK
+.char \[4h] \[u2443] \" OCR INVERTED FORK
+.char \[1j] \[u2446] \" OCR BRANCH BANK IDENTIFICATION
+.char \[2j] \[u2447] \" OCR AMOUNT OF CHECK
+.char \[3j] \[u2448] \" OCR DASH
+.char \[4j] \[u2449] \" OCR CUSTOMER ACCOUNT NUMBER
+.char \[1-o] \[u2460] \" CIRCLED DIGIT ONE
+.char \[2-o] \[u2461] \" CIRCLED DIGIT TWO
+.char \[3-o] \[u2462] \" CIRCLED DIGIT THREE
+.char \[4-o] \[u2463] \" CIRCLED DIGIT FOUR
+.char \[5-o] \[u2464] \" CIRCLED DIGIT FIVE
+.char \[6-o] \[u2465] \" CIRCLED DIGIT SIX
+.char \[7-o] \[u2466] \" CIRCLED DIGIT SEVEN
+.char \[8-o] \[u2467] \" CIRCLED DIGIT EIGHT
+.char \[9-o] \[u2468] \" CIRCLED DIGIT NINE
+.char \[10-o] \[u2469] \" CIRCLED NUMBER TEN
+.char \[11-o] \[u246A] \" CIRCLED NUMBER ELEVEN
+.char \[12-o] \[u246B] \" CIRCLED NUMBER TWELVE
+.char \[13-o] \[u246C] \" CIRCLED NUMBER THIRTEEN
+.char \[14-o] \[u246D] \" CIRCLED NUMBER FOURTEEN
+.char \[15-o] \[u246E] \" CIRCLED NUMBER FIFTEEN
+.char \[16-o] \[u246F] \" CIRCLED NUMBER SIXTEEN
+.char \[17-o] \[u2470] \" CIRCLED NUMBER SEVENTEEN
+.char \[18-o] \[u2471] \" CIRCLED NUMBER EIGHTEEN
+.char \[19-o] \[u2472] \" CIRCLED NUMBER NINETEEN
+.char \[20-o] \[u2473] \" CIRCLED NUMBER TWENTY
+.char \[(1)] \[u2474] \" PARENTHESIZED DIGIT ONE
+.char \[(2)] \[u2475] \" PARENTHESIZED DIGIT TWO
+.char \[(3)] \[u2476] \" PARENTHESIZED DIGIT THREE
+.char \[(4)] \[u2477] \" PARENTHESIZED DIGIT FOUR
+.char \[(5)] \[u2478] \" PARENTHESIZED DIGIT FIVE
+.char \[(6)] \[u2479] \" PARENTHESIZED DIGIT SIX
+.char \[(7)] \[u247A] \" PARENTHESIZED DIGIT SEVEN
+.char \[(8)] \[u247B] \" PARENTHESIZED DIGIT EIGHT
+.char \[(9)] \[u247C] \" PARENTHESIZED DIGIT NINE
+.char \[(10)] \[u247D] \" PARENTHESIZED NUMBER TEN
+.char \[(11)] \[u247E] \" PARENTHESIZED NUMBER ELEVEN
+.char \[(12)] \[u247F] \" PARENTHESIZED NUMBER TWELVE
+.char \[(13)] \[u2480] \" PARENTHESIZED NUMBER THIRTEEN
+.char \[(14)] \[u2481] \" PARENTHESIZED NUMBER FOURTEEN
+.char \[(15)] \[u2482] \" PARENTHESIZED NUMBER FIFTEEN
+.char \[(16)] \[u2483] \" PARENTHESIZED NUMBER SIXTEEN
+.char \[(17)] \[u2484] \" PARENTHESIZED NUMBER SEVENTEEN
+.char \[(18)] \[u2485] \" PARENTHESIZED NUMBER EIGHTEEN
+.char \[(19)] \[u2486] \" PARENTHESIZED NUMBER NINETEEN
+.char \[(20)] \[u2487] \" PARENTHESIZED NUMBER TWENTY
+.char \[1.] \[u2488] \" DIGIT ONE FULL STOP
+.char \[2.] \[u2489] \" DIGIT TWO FULL STOP
+.char \[3.] \[u248A] \" DIGIT THREE FULL STOP
+.char \[4.] \[u248B] \" DIGIT FOUR FULL STOP
+.char \[5.] \[u248C] \" DIGIT FIVE FULL STOP
+.char \[6.] \[u248D] \" DIGIT SIX FULL STOP
+.char \[7.] \[u248E] \" DIGIT SEVEN FULL STOP
+.char \[8.] \[u248F] \" DIGIT EIGHT FULL STOP
+.char \[9.] \[u2490] \" DIGIT NINE FULL STOP
+.char \[10.] \[u2491] \" NUMBER TEN FULL STOP
+.char \[11.] \[u2492] \" NUMBER ELEVEN FULL STOP
+.char \[12.] \[u2493] \" NUMBER TWELVE FULL STOP
+.char \[13.] \[u2494] \" NUMBER THIRTEEN FULL STOP
+.char \[14.] \[u2495] \" NUMBER FOURTEEN FULL STOP
+.char \[15.] \[u2496] \" NUMBER FIFTEEN FULL STOP
+.char \[16.] \[u2497] \" NUMBER SIXTEEN FULL STOP
+.char \[17.] \[u2498] \" NUMBER SEVENTEEN FULL STOP
+.char \[18.] \[u2499] \" NUMBER EIGHTEEN FULL STOP
+.char \[19.] \[u249A] \" NUMBER NINETEEN FULL STOP
+.char \[20.] \[u249B] \" NUMBER TWENTY FULL STOP
+.char \[(a)] \[u249C] \" PARENTHESIZED LATIN SMALL LETTER A
+.char \[(b)] \[u249D] \" PARENTHESIZED LATIN SMALL LETTER B
+.char \[(c)] \[u249E] \" PARENTHESIZED LATIN SMALL LETTER C
+.char \[(d)] \[u249F] \" PARENTHESIZED LATIN SMALL LETTER D
+.char \[(e)] \[u24A0] \" PARENTHESIZED LATIN SMALL LETTER E
+.char \[(f)] \[u24A1] \" PARENTHESIZED LATIN SMALL LETTER F
+.char \[(g)] \[u24A2] \" PARENTHESIZED LATIN SMALL LETTER G
+.char \[(h)] \[u24A3] \" PARENTHESIZED LATIN SMALL LETTER H
+.char \[(i)] \[u24A4] \" PARENTHESIZED LATIN SMALL LETTER I
+.char \[(j)] \[u24A5] \" PARENTHESIZED LATIN SMALL LETTER J
+.char \[(k)] \[u24A6] \" PARENTHESIZED LATIN SMALL LETTER K
+.char \[(l)] \[u24A7] \" PARENTHESIZED LATIN SMALL LETTER L
+.char \[(m)] \[u24A8] \" PARENTHESIZED LATIN SMALL LETTER M
+.char \[(n)] \[u24A9] \" PARENTHESIZED LATIN SMALL LETTER N
+.char \[(o)] \[u24AA] \" PARENTHESIZED LATIN SMALL LETTER O
+.char \[(p)] \[u24AB] \" PARENTHESIZED LATIN SMALL LETTER P
+.char \[(q)] \[u24AC] \" PARENTHESIZED LATIN SMALL LETTER Q
+.char \[(r)] \[u24AD] \" PARENTHESIZED LATIN SMALL LETTER R
+.char \[(s)] \[u24AE] \" PARENTHESIZED LATIN SMALL LETTER S
+.char \[(t)] \[u24AF] \" PARENTHESIZED LATIN SMALL LETTER T
+.char \[(u)] \[u24B0] \" PARENTHESIZED LATIN SMALL LETTER U
+.char \[(v)] \[u24B1] \" PARENTHESIZED LATIN SMALL LETTER V
+.char \[(w)] \[u24B2] \" PARENTHESIZED LATIN SMALL LETTER W
+.char \[(x)] \[u24B3] \" PARENTHESIZED LATIN SMALL LETTER X
+.char \[(y)] \[u24B4] \" PARENTHESIZED LATIN SMALL LETTER Y
+.char \[(z)] \[u24B5] \" PARENTHESIZED LATIN SMALL LETTER Z
+.char \[A-o] \[u24B6] \" CIRCLED LATIN CAPITAL LETTER A
+.char \[B-o] \[u24B7] \" CIRCLED LATIN CAPITAL LETTER B
+.char \[C-o] \[u24B8] \" CIRCLED LATIN CAPITAL LETTER C
+.char \[D-o] \[u24B9] \" CIRCLED LATIN CAPITAL LETTER D
+.char \[E-o] \[u24BA] \" CIRCLED LATIN CAPITAL LETTER E
+.char \[F-o] \[u24BB] \" CIRCLED LATIN CAPITAL LETTER F
+.char \[G-o] \[u24BC] \" CIRCLED LATIN CAPITAL LETTER G
+.char \[H-o] \[u24BD] \" CIRCLED LATIN CAPITAL LETTER H
+.char \[I-o] \[u24BE] \" CIRCLED LATIN CAPITAL LETTER I
+.char \[J-o] \[u24BF] \" CIRCLED LATIN CAPITAL LETTER J
+.char \[K-o] \[u24C0] \" CIRCLED LATIN CAPITAL LETTER K
+.char \[L-o] \[u24C1] \" CIRCLED LATIN CAPITAL LETTER L
+.char \[M-o] \[u24C2] \" CIRCLED LATIN CAPITAL LETTER M
+.char \[N-o] \[u24C3] \" CIRCLED LATIN CAPITAL LETTER N
+.char \[O-o] \[u24C4] \" CIRCLED LATIN CAPITAL LETTER O
+.char \[P-o] \[u24C5] \" CIRCLED LATIN CAPITAL LETTER P
+.char \[Q-o] \[u24C6] \" CIRCLED LATIN CAPITAL LETTER Q
+.char \[R-o] \[u24C7] \" CIRCLED LATIN CAPITAL LETTER R
+.char \[S-o] \[u24C8] \" CIRCLED LATIN CAPITAL LETTER S
+.char \[T-o] \[u24C9] \" CIRCLED LATIN CAPITAL LETTER T
+.char \[U-o] \[u24CA] \" CIRCLED LATIN CAPITAL LETTER U
+.char \[V-o] \[u24CB] \" CIRCLED LATIN CAPITAL LETTER V
+.char \[W-o] \[u24CC] \" CIRCLED LATIN CAPITAL LETTER W
+.char \[X-o] \[u24CD] \" CIRCLED LATIN CAPITAL LETTER X
+.char \[Y-o] \[u24CE] \" CIRCLED LATIN CAPITAL LETTER Y
+.char \[Z-o] \[u24CF] \" CIRCLED LATIN CAPITAL LETTER Z
+.char \[a-o] \[u24D0] \" CIRCLED LATIN SMALL LETTER A
+.char \[b-o] \[u24D1] \" CIRCLED LATIN SMALL LETTER B
+.char \[c-o] \[u24D2] \" CIRCLED LATIN SMALL LETTER C
+.char \[d-o] \[u24D3] \" CIRCLED LATIN SMALL LETTER D
+.char \[e-o] \[u24D4] \" CIRCLED LATIN SMALL LETTER E
+.char \[f-o] \[u24D5] \" CIRCLED LATIN SMALL LETTER F
+.char \[g-o] \[u24D6] \" CIRCLED LATIN SMALL LETTER G
+.char \[h-o] \[u24D7] \" CIRCLED LATIN SMALL LETTER H
+.char \[i-o] \[u24D8] \" CIRCLED LATIN SMALL LETTER I
+.char \[j-o] \[u24D9] \" CIRCLED LATIN SMALL LETTER J
+.char \[k-o] \[u24DA] \" CIRCLED LATIN SMALL LETTER K
+.char \[l-o] \[u24DB] \" CIRCLED LATIN SMALL LETTER L
+.char \[m-o] \[u24DC] \" CIRCLED LATIN SMALL LETTER M
+.char \[n-o] \[u24DD] \" CIRCLED LATIN SMALL LETTER N
+.char \[o-o] \[u24DE] \" CIRCLED LATIN SMALL LETTER O
+.char \[p-o] \[u24DF] \" CIRCLED LATIN SMALL LETTER P
+.char \[q-o] \[u24E0] \" CIRCLED LATIN SMALL LETTER Q
+.char \[r-o] \[u24E1] \" CIRCLED LATIN SMALL LETTER R
+.char \[s-o] \[u24E2] \" CIRCLED LATIN SMALL LETTER S
+.char \[t-o] \[u24E3] \" CIRCLED LATIN SMALL LETTER T
+.char \[u-o] \[u24E4] \" CIRCLED LATIN SMALL LETTER U
+.char \[v-o] \[u24E5] \" CIRCLED LATIN SMALL LETTER V
+.char \[w-o] \[u24E6] \" CIRCLED LATIN SMALL LETTER W
+.char \[x-o] \[u24E7] \" CIRCLED LATIN SMALL LETTER X
+.char \[y-o] \[u24E8] \" CIRCLED LATIN SMALL LETTER Y
+.char \[z-o] \[u24E9] \" CIRCLED LATIN SMALL LETTER Z
+.char \[0-o] \[u24EA] \" CIRCLED DIGIT ZERO
+.char \[hh] \[u2500] \" BOX DRAWINGS LIGHT HORIZONTAL
+.char \[HH] \[u2501] \" BOX DRAWINGS HEAVY HORIZONTAL
+.char \[vv] \[u2502] \" BOX DRAWINGS LIGHT VERTICAL
+.char \[VV] \[u2503] \" BOX DRAWINGS HEAVY VERTICAL
+.char \[3-] \[u2504] \" BOX DRAWINGS LIGHT TRIPLE DASH HORIZONTAL
+.char \[3_] \[u2505] \" BOX DRAWINGS HEAVY TRIPLE DASH HORIZONTAL
+.char \[3!] \[u2506] \" BOX DRAWINGS LIGHT TRIPLE DASH VERTICAL
+.char \[3/] \[u2507] \" BOX DRAWINGS HEAVY TRIPLE DASH VERTICAL
+.char \[4-] \[u2508] \" BOX DRAWINGS LIGHT QUADRUPLE DASH HORIZONTAL
+.char \[4_] \[u2509] \" BOX DRAWINGS HEAVY QUADRUPLE DASH HORIZONTAL
+.char \[4!] \[u250A] \" BOX DRAWINGS LIGHT QUADRUPLE DASH VERTICAL
+.char \[4/] \[u250B] \" BOX DRAWINGS HEAVY QUADRUPLE DASH VERTICAL
+.char \[dr] \[u250C] \" BOX DRAWINGS LIGHT DOWN AND RIGHT
+.char \[dR] \[u250D] \" BOX DRAWINGS DOWN LIGHT AND RIGHT HEAVY
+.char \[Dr] \[u250E] \" BOX DRAWINGS DOWN HEAVY AND RIGHT LIGHT
+.char \[DR] \[u250F] \" BOX DRAWINGS HEAVY DOWN AND RIGHT
+.char \[dl] \[u2510] \" BOX DRAWINGS LIGHT DOWN AND LEFT
+.char \[dL] \[u2511] \" BOX DRAWINGS DOWN LIGHT AND LEFT HEAVY
+.char \[Dl] \[u2512] \" BOX DRAWINGS DOWN HEAVY AND LEFT LIGHT
+.char \[LD] \[u2513] \" BOX DRAWINGS HEAVY DOWN AND LEFT
+.char \[ur] \[u2514] \" BOX DRAWINGS LIGHT UP AND RIGHT
+.char \[uR] \[u2515] \" BOX DRAWINGS UP LIGHT AND RIGHT HEAVY
+.char \[Ur] \[u2516] \" BOX DRAWINGS UP HEAVY AND RIGHT LIGHT
+.char \[UR] \[u2517] \" BOX DRAWINGS HEAVY UP AND RIGHT
+.char \[ul] \[u2518] \" BOX DRAWINGS LIGHT UP AND LEFT
+.char \[uL] \[u2519] \" BOX DRAWINGS UP LIGHT AND LEFT HEAVY
+.char \[Ul] \[u251A] \" BOX DRAWINGS UP HEAVY AND LEFT LIGHT
+.char \[UL] \[u251B] \" BOX DRAWINGS HEAVY UP AND LEFT
+.char \[vr] \[u251C] \" BOX DRAWINGS LIGHT VERTICAL AND RIGHT
+.char \[vR] \[u251D] \" BOX DRAWINGS VERTICAL LIGHT AND RIGHT HEAVY
+.char \[Udr] \[u251E] \" BOX DRAWINGS UP HEAVY AND RIGHT DOWN LIGHT
+.char \[uDr] \[u251F] \" BOX DRAWINGS DOWN HEAVY AND RIGHT UP LIGHT
+.char \[Vr] \[u2520] \" BOX DRAWINGS VERTICAL HEAVY AND RIGHT LIGHT
+.char \[UdR] \[u2521] \" BOX DRAWINGS DOWN LIGHT AND RIGHT UP HEAVY
+.char \[uDR] \[u2522] \" BOX DRAWINGS UP LIGHT AND RIGHT DOWN HEAVY
+.char \[VR] \[u2523] \" BOX DRAWINGS HEAVY VERTICAL AND RIGHT
+.char \[vl] \[u2524] \" BOX DRAWINGS LIGHT VERTICAL AND LEFT
+.char \[vL] \[u2525] \" BOX DRAWINGS VERTICAL LIGHT AND LEFT HEAVY
+.char \[Udl] \[u2526] \" BOX DRAWINGS UP HEAVY AND LEFT DOWN LIGHT
+.char \[uDl] \[u2527] \" BOX DRAWINGS DOWN HEAVY AND LEFT UP LIGHT
+.char \[Vl] \[u2528] \" BOX DRAWINGS VERTICAL HEAVY AND LEFT LIGHT
+.char \[UdL] \[u2529] \" BOX DRAWINGS DOWN LIGHT AND LEFT UP HEAVY
+.char \[uDL] \[u252A] \" BOX DRAWINGS UP LIGHT AND LEFT DOWN HEAVY
+.char \[VL] \[u252B] \" BOX DRAWINGS HEAVY VERTICAL AND LEFT
+.char \[dh] \[u252C] \" BOX DRAWINGS LIGHT DOWN AND HORIZONTAL
+.char \[dLr] \[u252D] \" BOX DRAWINGS LEFT HEAVY AND RIGHT DOWN LIGHT
+.char \[dlR] \[u252E] \" BOX DRAWINGS RIGHT HEAVY AND LEFT DOWN LIGHT
+.char \[dH] \[u252F] \" BOX DRAWINGS DOWN LIGHT AND HORIZONTAL HEAVY
+.char \[Dh] \[u2530] \" BOX DRAWINGS DOWN HEAVY AND HORIZONTAL LIGHT
+.char \[DLr] \[u2531] \" BOX DRAWINGS RIGHT LIGHT AND LEFT DOWN HEAVY
+.char \[DlR] \[u2532] \" BOX DRAWINGS LEFT LIGHT AND RIGHT DOWN HEAVY
+.char \[DH] \[u2533] \" BOX DRAWINGS HEAVY DOWN AND HORIZONTAL
+.char \[uh] \[u2534] \" BOX DRAWINGS LIGHT UP AND HORIZONTAL
+.char \[uLr] \[u2535] \" BOX DRAWINGS LEFT HEAVY AND RIGHT UP LIGHT
+.char \[ulR] \[u2536] \" BOX DRAWINGS RIGHT HEAVY AND LEFT UP LIGHT
+.char \[uH] \[u2537] \" BOX DRAWINGS UP LIGHT AND HORIZONTAL HEAVY
+.char \[Uh] \[u2538] \" BOX DRAWINGS UP HEAVY AND HORIZONTAL LIGHT
+.char \[ULr] \[u2539] \" BOX DRAWINGS RIGHT LIGHT AND LEFT UP HEAVY
+.char \[UlR] \[u253A] \" BOX DRAWINGS LEFT LIGHT AND RIGHT UP HEAVY
+.char \[UH] \[u253B] \" BOX DRAWINGS HEAVY UP AND HORIZONTAL
+.char \[vh] \[u253C] \" BOX DRAWINGS LIGHT VERTICAL AND HORIZONTAL
+.char \[vLr] \[u253D] \" BOX DRAWINGS LEFT HEAVY AND RIGHT VERTICAL LIGHT
+.char \[vlR] \[u253E] \" BOX DRAWINGS RIGHT HEAVY AND LEFT VERTICAL LIGHT
+.char \[vH] \[u253F] \" BOX DRAWINGS VERTICAL LIGHT AND HORIZONTAL HEAVY
+.char \[Udh] \[u2540] \" BOX DRAWINGS UP HEAVY AND DOWN HORIZONTAL LIGHT
+.char \[uDh] \[u2541] \" BOX DRAWINGS DOWN HEAVY AND UP HORIZONTAL LIGHT
+.char \[Vh] \[u2542] \" BOX DRAWINGS VERTICAL HEAVY AND HORIZONTAL LIGHT
+.char \[UdLr] \[u2543] \" BOX DRAWINGS LEFT UP HEAVY AND RIGHT DOWN LIGHT
+.char \[UdlR] \[u2544] \" BOX DRAWINGS RIGHT UP HEAVY AND LEFT DOWN LIGHT
+.char \[uDLr] \[u2545] \" BOX DRAWINGS LEFT DOWN HEAVY AND RIGHT UP LIGHT
+.char \[uDlR] \[u2546] \" BOX DRAWINGS RIGHT DOWN HEAVY AND LEFT UP LIGHT
+.char \[UdH] \[u2547] \" BOX DRAWINGS DOWN LIGHT AND UP HORIZONTAL HEAVY
+.char \[uDH] \[u2548] \" BOX DRAWINGS UP LIGHT AND DOWN HORIZONTAL HEAVY
+.char \[VLr] \[u2549] \" BOX DRAWINGS RIGHT LIGHT AND LEFT VERTICAL HEAVY
+.char \[VlR] \[u254A] \" BOX DRAWINGS LEFT LIGHT AND RIGHT VERTICAL HEAVY
+.char \[VH] \[u254B] \" BOX DRAWINGS HEAVY VERTICAL AND HORIZONTAL
+.char \[FD] \[u2571] \" BOX DRAWINGS LIGHT DIAGONAL UPPER RIGHT TO LOWER LEFT
+.char \[BD] \[u2572] \" BOX DRAWINGS LIGHT DIAGONAL UPPER LEFT TO LOWER RIGHT
+.char \[TB] \[u2580] \" UPPER HALF BLOCK
+.char \[LB] \[u2584] \" LOWER HALF BLOCK
+.char \[FB] \[u2588] \" FULL BLOCK
+.char \[lB] \[u258C] \" LEFT HALF BLOCK
+.char \[RB] \[u2590] \" RIGHT HALF BLOCK
+.char \[.S] \[u2591] \" LIGHT SHADE
+.char \[:S] \[u2592] \" MEDIUM SHADE
+.char \[?S] \[u2593] \" DARK SHADE
+.char \[fS] \[u25A0] \" BLACK SQUARE
+.char \[OS] \[u25A1] \" WHITE SQUARE
+.char \[RO] \[u25A2] \" WHITE SQUARE WITH ROUNDED CORNERS
+.char \[Rr] \[u25A3] \" WHITE SQUARE CONTAINING BLACK SMALL SQUARE
+.char \[RF] \[u25A4] \" SQUARE WITH HORIZONTAL FILL
+.char \[RY] \[u25A5] \" SQUARE WITH VERTICAL FILL
+.char \[RH] \[u25A6] \" SQUARE WITH ORTHOGONAL CROSSHATCH FILL
+.char \[RZ] \[u25A7] \" SQUARE WITH UPPER LEFT TO LOWER RIGHT FILL
+.char \[RK] \[u25A8] \" SQUARE WITH UPPER RIGHT TO LOWER LEFT FILL
+.char \[RX] \[u25A9] \" SQUARE WITH DIAGONAL CROSSHATCH FILL
+.char \[sB] \[u25AA] \" BLACK SMALL SQUARE
+.char \[SR] \[u25AC] \" BLACK RECTANGLE
+.char \[Or] \[u25AD] \" WHITE RECTANGLE
+.char \[UT] \[u25B2] \" BLACK UP-POINTING TRIANGLE
+.char \[uT] \[u25B3] \" WHITE UP-POINTING TRIANGLE
+.char \[PR] \[u25B6] \" BLACK RIGHT-POINTING TRIANGLE
+.char \[Tr] \[u25B7] \" WHITE RIGHT-POINTING TRIANGLE
+.char \[Dt] \[u25BC] \" BLACK DOWN-POINTING TRIANGLE
+.char \[dT] \[u25BD] \" WHITE DOWN-POINTING TRIANGLE
+.char \[PL] \[u25C0] \" BLACK LEFT-POINTING TRIANGLE
+.char \[Tl] \[u25C1] \" WHITE LEFT-POINTING TRIANGLE
+.char \[Db] \[u25C6] \" BLACK DIAMOND
+.char \[Dw] \[u25C7] \" WHITE DIAMOND
+.char \[LZ] \[u25CA] \" LOZENGE
+.char \[0m] \[u25CB] \" WHITE CIRCLE
+.char \[0o] \[u25CE] \" BULLSEYE
+.char \[0M] \[u25CF] \" BLACK CIRCLE
+.char \[0L] \[u25D0] \" CIRCLE WITH LEFT HALF BLACK
+.char \[0R] \[u25D1] \" CIRCLE WITH RIGHT HALF BLACK
+.char \[Sn] \[u25D8] \" INVERSE BULLET
+.char \[Ic] \[u25D9] \" INVERSE WHITE CIRCLE
+.char \[Fd] \[u25E2] \" BLACK LOWER RIGHT TRIANGLE
+.char \[Bd] \[u25E3] \" BLACK LOWER LEFT TRIANGLE
+.char \[*2] \[u2605] \" BLACK STAR
+.char \[*1] \[u2606] \" WHITE STAR
+.char \[TEL] \[u260E] \" BLACK TELEPHONE
+.char \[tel] \[u260F] \" WHITE TELEPHONE
+.char \[<H] \[u261C] \" WHITE LEFT POINTING INDEX
+.char \[>H] \[u261E] \" WHITE RIGHT POINTING INDEX
+.char \[0u] \[u263A] \" WHITE SMILING FACE
+.char \[0U] \[u263B] \" BLACK SMILING FACE
+.char \[SU] \[u263C] \" WHITE SUN WITH RAYS
+.char \[Fm] \[u2640] \" FEMALE SIGN
+.char \[Ml] \[u2642] \" MALE SIGN
+.char \[cS] \[u2660] \" BLACK SPADE SUIT
+.char \[cH] \[u2661] \" WHITE HEART SUIT
+.char \[cD] \[u2662] \" WHITE DIAMOND SUIT
+.char \[cC] \[u2663] \" BLACK CLUB SUIT
+.char \[cS-] \[u2664] \" WHITE SPADE SUIT
+.char \[cH-] \[u2665] \" BLACK HEART SUIT
+.char \[cD-] \[u2666] \" BLACK DIAMOND SUIT
+.char \[cC-] \[u2667] \" WHITE CLUB SUIT
+.char \[Md] \[u2669] \" QUARTER NOTE
+.char \[M8] \[u266A] \" EIGHTH NOTE
+.char \[M2] \[u266B] \" BARRED EIGHTH NOTES
+.char \[M16] \[u266C] \" BARRED SIXTEENTH NOTES
+.char \[Mb] \[u266D] \" MUSIC FLAT SIGN
+.char \[Mx] \[u266E] \" MUSIC NATURAL SIGN
+.char \[MX] \[u266F] \" MUSIC SHARP SIGN
+.char \[OK] \[u2713] \" CHECK MARK
+.char \[XX] \[u2717] \" BALLOT X
+.char \[-X] \[u2720] \" MALTESE CROSS
+.char \[IS] \[u3000] \" IDEOGRAPHIC SPACE
+.char \[,_] \[u3001] \" IDEOGRAPHIC COMMA
+.char \[._] \[u3002] \" IDEOGRAPHIC PERIOD
+.char \[+"] \[u3003] \" DITTO MARK
+.char \[+_] \[u3004] \" IDEOGRAPHIC DITTO MARK
+.char \[*_] \[u3005] \" IDEOGRAPHIC ITERATION MARK
+.char \[;_] \[u3006] \" IDEOGRAPHIC CLOSING MARK
+.char \[0_] \[u3007] \" IDEOGRAPHIC NUMBER ZERO
+.char \[<+] \[u300A] \" LEFT DOUBLE ANGLE BRACKET
+.char \[>+] \[u300B] \" RIGHT DOUBLE ANGLE BRACKET
+.char \[<'] \[u300C] \" LEFT CORNER BRACKET
+.char \[>'] \[u300D] \" RIGHT CORNER BRACKET
+.char \[<"] \[u300E] \" LEFT WHITE CORNER BRACKET
+.char \[>"] \[u300F] \" RIGHT WHITE CORNER BRACKET
+.char \[("] \[u3010] \" LEFT BLACK LENTICULAR BRACKET
+.char \[)"] \[u3011] \" RIGHT BLACK LENTICULAR BRACKET
+.char \[=T] \[u3012] \" POSTAL MARK
+.char \[=_] \[u3013] \" GETA MARK
+.char \[('] \[u3014] \" LEFT TORTOISE SHELL BRACKET
+.char \[)'] \[u3015] \" RIGHT TORTOISE SHELL BRACKET
+.char \[(I] \[u3016] \" LEFT WHITE LENTICULAR BRACKET
+.char \[)I] \[u3017] \" RIGHT WHITE LENTICULAR BRACKET
+.char \[-?] \[u301C] \" WAVE DASH
+.char \[=T:)] \[u3020] \" POSTAL MARK FACE
+.char \[A5] \[u3041] \" HIRAGANA LETTER SMALL A
+.char \[a5] \[u3042] \" HIRAGANA LETTER A
+.char \[I5] \[u3043] \" HIRAGANA LETTER SMALL I
+.char \[i5] \[u3044] \" HIRAGANA LETTER I
+.char \[U5] \[u3045] \" HIRAGANA LETTER SMALL U
+.char \[u5] \[u3046] \" HIRAGANA LETTER U
+.char \[E5] \[u3047] \" HIRAGANA LETTER SMALL E
+.char \[e5] \[u3048] \" HIRAGANA LETTER E
+.char \[O5] \[u3049] \" HIRAGANA LETTER SMALL O
+.char \[o5] \[u304A] \" HIRAGANA LETTER O
+.char \[ka] \[u304B] \" HIRAGANA LETTER KA
+.char \[ga] \[u304C] \" HIRAGANA LETTER GA
+.char \[ki] \[u304D] \" HIRAGANA LETTER KI
+.char \[gi] \[u304E] \" HIRAGANA LETTER GI
+.char \[ku] \[u304F] \" HIRAGANA LETTER KU
+.char \[gu] \[u3050] \" HIRAGANA LETTER GU
+.char \[ke] \[u3051] \" HIRAGANA LETTER KE
+.char \[ge] \[u3052] \" HIRAGANA LETTER GE
+.char \[ko] \[u3053] \" HIRAGANA LETTER KO
+.char \[go] \[u3054] \" HIRAGANA LETTER GO
+.char \[sa] \[u3055] \" HIRAGANA LETTER SA
+.char \[za] \[u3056] \" HIRAGANA LETTER ZA
+.char \[si] \[u3057] \" HIRAGANA LETTER SI
+.char \[zi] \[u3058] \" HIRAGANA LETTER ZI
+.char \[su] \[u3059] \" HIRAGANA LETTER SU
+.char \[zu] \[u305A] \" HIRAGANA LETTER ZU
+.char \[se] \[u305B] \" HIRAGANA LETTER SE
+.char \[ze] \[u305C] \" HIRAGANA LETTER ZE
+.char \[so] \[u305D] \" HIRAGANA LETTER SO
+.char \[zo] \[u305E] \" HIRAGANA LETTER ZO
+.char \[ta] \[u305F] \" HIRAGANA LETTER TA
+.char \[da] \[u3060] \" HIRAGANA LETTER DA
+.char \[ti] \[u3061] \" HIRAGANA LETTER TI
+.char \[di] \[u3062] \" HIRAGANA LETTER DI
+.char \[tU] \[u3063] \" HIRAGANA LETTER SMALL TU
+.char \[tu] \[u3064] \" HIRAGANA LETTER TU
+.char \[du] \[u3065] \" HIRAGANA LETTER DU
+.char \[te] \[u3066] \" HIRAGANA LETTER TE
+.char \[de] \[u3067] \" HIRAGANA LETTER DE
+.char \[to] \[u3068] \" HIRAGANA LETTER TO
+.char \[do] \[u3069] \" HIRAGANA LETTER DO
+.char \[na] \[u306A] \" HIRAGANA LETTER NA
+.char \[ni] \[u306B] \" HIRAGANA LETTER NI
+.char \[nu] \[u306C] \" HIRAGANA LETTER NU
+.char \[ne] \[u306D] \" HIRAGANA LETTER NE
+.char \[no] \[u306E] \" HIRAGANA LETTER NO
+.char \[ha] \[u306F] \" HIRAGANA LETTER HA
+.char \[ba] \[u3070] \" HIRAGANA LETTER BA
+.char \[pa] \[u3071] \" HIRAGANA LETTER PA
+.char \[hi] \[u3072] \" HIRAGANA LETTER HI
+.char \[bi] \[u3073] \" HIRAGANA LETTER BI
+.char \[pi] \[u3074] \" HIRAGANA LETTER PI
+.char \[hu] \[u3075] \" HIRAGANA LETTER HU
+.char \[bu] \[u3076] \" HIRAGANA LETTER BU
+.char \[pu] \[u3077] \" HIRAGANA LETTER PU
+.char \[he] \[u3078] \" HIRAGANA LETTER HE
+.char \[be] \[u3079] \" HIRAGANA LETTER BE
+.char \[pe] \[u307A] \" HIRAGANA LETTER PE
+.char \[ho] \[u307B] \" HIRAGANA LETTER HO
+.char \[bo] \[u307C] \" HIRAGANA LETTER BO
+.char \[po] \[u307D] \" HIRAGANA LETTER PO
+.char \[ma] \[u307E] \" HIRAGANA LETTER MA
+.char \[mi] \[u307F] \" HIRAGANA LETTER MI
+.char \[mu] \[u3080] \" HIRAGANA LETTER MU
+.char \[me] \[u3081] \" HIRAGANA LETTER ME
+.char \[mo] \[u3082] \" HIRAGANA LETTER MO
+.char \[yA] \[u3083] \" HIRAGANA LETTER SMALL YA
+.char \[ya] \[u3084] \" HIRAGANA LETTER YA
+.char \[yU] \[u3085] \" HIRAGANA LETTER SMALL YU
+.char \[yu] \[u3086] \" HIRAGANA LETTER YU
+.char \[yO] \[u3087] \" HIRAGANA LETTER SMALL YO
+.char \[yo] \[u3088] \" HIRAGANA LETTER YO
+.char \[ra] \[u3089] \" HIRAGANA LETTER RA
+.char \[ri] \[u308A] \" HIRAGANA LETTER RI
+.char \[ru] \[u308B] \" HIRAGANA LETTER RU
+.char \[re] \[u308C] \" HIRAGANA LETTER RE
+.char \[ro] \[u308D] \" HIRAGANA LETTER RO
+.char \[wA] \[u308E] \" HIRAGANA LETTER SMALL WA
+.char \[wa] \[u308F] \" HIRAGANA LETTER WA
+.char \[wi] \[u3090] \" HIRAGANA LETTER WI
+.char \[we] \[u3091] \" HIRAGANA LETTER WE
+.char \[wo] \[u3092] \" HIRAGANA LETTER WO
+.char \[n5] \[u3093] \" HIRAGANA LETTER N
+.char \[vu] \[u3094] \" HIRAGANA LETTER VU
+.char \["5] \[u309B] \" KATAKANA-HIRAGANA VOICED SOUND MARK
+.char \[05] \[u309C] \" KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK
+.char \[*5] \[u309D] \" HIRAGANA ITERATION MARK
+.char \[+5] \[u309E] \" HIRAGANA VOICED ITERATION MARK
+.char \[a6] \[u30A1] \" KATAKANA LETTER SMALL A
+.char \[A6] \[u30A2] \" KATAKANA LETTER A
+.char \[i6] \[u30A3] \" KATAKANA LETTER SMALL I
+.char \[I6] \[u30A4] \" KATAKANA LETTER I
+.char \[u6] \[u30A5] \" KATAKANA LETTER SMALL U
+.char \[U6] \[u30A6] \" KATAKANA LETTER U
+.char \[e6] \[u30A7] \" KATAKANA LETTER SMALL E
+.char \[E6] \[u30A8] \" KATAKANA LETTER E
+.char \[o6] \[u30A9] \" KATAKANA LETTER SMALL O
+.char \[O6] \[u30AA] \" KATAKANA LETTER O
+.char \[Ka] \[u30AB] \" KATAKANA LETTER KA
+.char \[Ga] \[u30AC] \" KATAKANA LETTER GA
+.char \[Ki] \[u30AD] \" KATAKANA LETTER KI
+.char \[Gi] \[u30AE] \" KATAKANA LETTER GI
+.char \[Ku] \[u30AF] \" KATAKANA LETTER KU
+.char \[Gu] \[u30B0] \" KATAKANA LETTER GU
+.char \[Ke] \[u30B1] \" KATAKANA LETTER KE
+.char \[Ge] \[u30B2] \" KATAKANA LETTER GE
+.char \[Ko] \[u30B3] \" KATAKANA LETTER KO
+.char \[Go] \[u30B4] \" KATAKANA LETTER GO
+.char \[Sa] \[u30B5] \" KATAKANA LETTER SA
+.char \[Za] \[u30B6] \" KATAKANA LETTER ZA
+.char \[Si] \[u30B7] \" KATAKANA LETTER SI
+.char \[Zi] \[u30B8] \" KATAKANA LETTER ZI
+.char \[Su] \[u30B9] \" KATAKANA LETTER SU
+.char \[Zu] \[u30BA] \" KATAKANA LETTER ZU
+.char \[Se] \[u30BB] \" KATAKANA LETTER SE
+.char \[Ze] \[u30BC] \" KATAKANA LETTER ZE
+.char \[So] \[u30BD] \" KATAKANA LETTER SO
+.char \[Zo] \[u30BE] \" KATAKANA LETTER ZO
+.char \[Ta] \[u30BF] \" KATAKANA LETTER TA
+.char \[Da] \[u30C0] \" KATAKANA LETTER DA
+.char \[Ti] \[u30C1] \" KATAKANA LETTER TI
+.char \[Di] \[u30C2] \" KATAKANA LETTER DI
+.char \[TU] \[u30C3] \" KATAKANA LETTER SMALL TU
+.char \[Tu] \[u30C4] \" KATAKANA LETTER TU
+.char \[Du] \[u30C5] \" KATAKANA LETTER DU
+.char \[Te] \[u30C6] \" KATAKANA LETTER TE
+.char \[De] \[u30C7] \" KATAKANA LETTER DE
+.char \[To] \[u30C8] \" KATAKANA LETTER TO
+.char \[Do] \[u30C9] \" KATAKANA LETTER DO
+.char \[Na] \[u30CA] \" KATAKANA LETTER NA
+.char \[Ni] \[u30CB] \" KATAKANA LETTER NI
+.char \[Nu] \[u30CC] \" KATAKANA LETTER NU
+.char \[Ne] \[u30CD] \" KATAKANA LETTER NE
+.char \[No] \[u30CE] \" KATAKANA LETTER NO
+.char \[Ha] \[u30CF] \" KATAKANA LETTER HA
+.char \[Ba] \[u30D0] \" KATAKANA LETTER BA
+.char \[Pa] \[u30D1] \" KATAKANA LETTER PA
+.char \[Hi] \[u30D2] \" KATAKANA LETTER HI
+.char \[Bi] \[u30D3] \" KATAKANA LETTER BI
+.char \[Pi] \[u30D4] \" KATAKANA LETTER PI
+.char \[Hu] \[u30D5] \" KATAKANA LETTER HU
+.char \[Bu] \[u30D6] \" KATAKANA LETTER BU
+.char \[Pu] \[u30D7] \" KATAKANA LETTER PU
+.char \[He] \[u30D8] \" KATAKANA LETTER HE
+.char \[Be] \[u30D9] \" KATAKANA LETTER BE
+.char \[Pe] \[u30DA] \" KATAKANA LETTER PE
+.char \[Ho] \[u30DB] \" KATAKANA LETTER HO
+.char \[Bo] \[u30DC] \" KATAKANA LETTER BO
+.char \[Po] \[u30DD] \" KATAKANA LETTER PO
+.char \[Ma] \[u30DE] \" KATAKANA LETTER MA
+.char \[Mi] \[u30DF] \" KATAKANA LETTER MI
+.char \[Mu] \[u30E0] \" KATAKANA LETTER MU
+.char \[Me] \[u30E1] \" KATAKANA LETTER ME
+.char \[Mo] \[u30E2] \" KATAKANA LETTER MO
+.char \[YA] \[u30E3] \" KATAKANA LETTER SMALL YA
+.char \[Ya] \[u30E4] \" KATAKANA LETTER YA
+.char \[YU] \[u30E5] \" KATAKANA LETTER SMALL YU
+.char \[Yu] \[u30E6] \" KATAKANA LETTER YU
+.char \[YO] \[u30E7] \" KATAKANA LETTER SMALL YO
+.char \[Yo] \[u30E8] \" KATAKANA LETTER YO
+.char \[Ra] \[u30E9] \" KATAKANA LETTER RA
+.char \[Ri] \[u30EA] \" KATAKANA LETTER RI
+.char \[Ru] \[u30EB] \" KATAKANA LETTER RU
+.char \[Re] \[u30EC] \" KATAKANA LETTER RE
+.char \[Ro] \[u30ED] \" KATAKANA LETTER RO
+.char \[WA] \[u30EE] \" KATAKANA LETTER SMALL WA
+.char \[Wa] \[u30EF] \" KATAKANA LETTER WA
+.char \[Wi] \[u30F0] \" KATAKANA LETTER WI
+.char \[We] \[u30F1] \" KATAKANA LETTER WE
+.char \[Wo] \[u30F2] \" KATAKANA LETTER WO
+.char \[N6] \[u30F3] \" KATAKANA LETTER N
+.char \[Vu] \[u30F4] \" KATAKANA LETTER VU
+.char \[KA] \[u30F5] \" KATAKANA LETTER SMALL KA
+.char \[KE] \[u30F6] \" KATAKANA LETTER SMALL KE
+.char \[Va] \[u30F7] \" KATAKANA LETTER VA
+.char \[Vi] \[u30F8] \" KATAKANA LETTER VI
+.char \[Ve] \[u30F9] \" KATAKANA LETTER VE
+.char \[Vo] \[u30FA] \" KATAKANA LETTER VO
+.char \[.6] \[u30FB] \" KATAKANA MIDDLE DOT
+.char \[-6] \[u30FC] \" KATAKANA-HIRAGANA PROLONGED SOUND MARK
+.char \[*6] \[u30FD] \" KATAKANA ITERATION MARK
+.char \[+6] \[u30FE] \" KATAKANA VOICED ITERATION MARK
+.char \[b4] \[u3105] \" BOPOMOFO LETTER B
+.char \[p4] \[u3106] \" BOPOMOFO LETTER P
+.char \[m4] \[u3107] \" BOPOMOFO LETTER M
+.char \[f4] \[u3108] \" BOPOMOFO LETTER F
+.char \[d4] \[u3109] \" BOPOMOFO LETTER D
+.char \[t4] \[u310A] \" BOPOMOFO LETTER T
+.char \[n4] \[u310B] \" BOPOMOFO LETTER N
+.char \[l4] \[u310C] \" BOPOMOFO LETTER L
+.char \[g4] \[u310D] \" BOPOMOFO LETTER G
+.char \[k4] \[u310E] \" BOPOMOFO LETTER K
+.char \[h4] \[u310F] \" BOPOMOFO LETTER H
+.char \[j4] \[u3110] \" BOPOMOFO LETTER J
+.char \[q4] \[u3111] \" BOPOMOFO LETTER Q
+.char \[x4] \[u3112] \" BOPOMOFO LETTER X
+.char \[zh] \[u3113] \" BOPOMOFO LETTER ZH
+.char \[ch] \[u3114] \" BOPOMOFO LETTER CH
+.char \[sh] \[u3115] \" BOPOMOFO LETTER SH
+.char \[r4] \[u3116] \" BOPOMOFO LETTER R
+.char \[z4] \[u3117] \" BOPOMOFO LETTER Z
+.char \[c4] \[u3118] \" BOPOMOFO LETTER C
+.char \[s4] \[u3119] \" BOPOMOFO LETTER S
+.char \[a4] \[u311A] \" BOPOMOFO LETTER A
+.char \[o4] \[u311B] \" BOPOMOFO LETTER O
+.char \[e4] \[u311C] \" BOPOMOFO LETTER E
+.char \[eh4] \[u311D] \" BOPOMOFO LETTER EH
+.char \[ai] \[u311E] \" BOPOMOFO LETTER AI
+.char \[ei] \[u311F] \" BOPOMOFO LETTER EI
+.char \[au] \[u3120] \" BOPOMOFO LETTER AU
+.char \[ou] \[u3121] \" BOPOMOFO LETTER OU
+.char \[an] \[u3122] \" BOPOMOFO LETTER AN
+.char \[en] \[u3123] \" BOPOMOFO LETTER EN
+.char \[aN] \[u3124] \" BOPOMOFO LETTER ANG
+.char \[eN] \[u3125] \" BOPOMOFO LETTER ENG
+.char \[er] \[u3126] \" BOPOMOFO LETTER ER
+.char \[i4] \[u3127] \" BOPOMOFO LETTER I
+.char \[u4] \[u3128] \" BOPOMOFO LETTER U
+.char \[iu] \[u3129] \" BOPOMOFO LETTER IU
+.char \[v4] \[u312A] \" BOPOMOFO LETTER V
+.char \[nG] \[u312B] \" BOPOMOFO LETTER NG
+.char \[gn] \[u312C] \" BOPOMOFO LETTER GN
+.char \[(JU)] \[u321C] \" PARENTHESIZED HANGUL JU
+.char \[1c] \[u3220] \" PARENTHESIZED IDEOGRAPH ONE
+.char \[2c] \[u3221] \" PARENTHESIZED IDEOGRAPH TWO
+.char \[3c] \[u3222] \" PARENTHESIZED IDEOGRAPH THREE
+.char \[4c] \[u3223] \" PARENTHESIZED IDEOGRAPH FOUR
+.char \[5c] \[u3224] \" PARENTHESIZED IDEOGRAPH FIVE
+.char \[6c] \[u3225] \" PARENTHESIZED IDEOGRAPH SIX
+.char \[7c] \[u3226] \" PARENTHESIZED IDEOGRAPH SEVEN
+.char \[8c] \[u3227] \" PARENTHESIZED IDEOGRAPH EIGHT
+.char \[9c] \[u3228] \" PARENTHESIZED IDEOGRAPH NINE
+.char \[10c] \[u3229] \" PARENTHESIZED IDEOGRAPH TEN
+.char \[KSC] \[u327F] \" KOREAN STANDARD SYMBOL
+.char \[ff] \[uFB00] \" LATIN SMALL LIGATURE FF
+.char \[fi] \[uFB01] \" LATIN SMALL LIGATURE FI
+.char \[fl] \[uFB02] \" LATIN SMALL LIGATURE FL
+.char \[ffi] \[uFB03] \" LATIN SMALL LIGATURE FFI
+.char \[ffl] \[uFB04] \" LATIN SMALL LIGATURE FFL
+.char \[ft] \[uFB05] \" LATIN SMALL LIGATURE FT
+.char \[st] \[uFB06] \" LATIN SMALL LIGATURE ST
+.char \[3+;] \[uFE7D] \" ARABIC SHADDA MEDIAL FORM
+.char \[aM.] \[uFE82] \" ARABIC LETTER ALEF WITH MADDA ABOVE FINAL FORM
+.char \[aH.] \[uFE84] \" ARABIC LETTER ALEF WITH HAMZA ABOVE FINAL FORM
+.char \[a+-] \[uFE8D] \" ARABIC LETTER ALEF ISOLATED FORM
+.char \[a+.] \[uFE8E] \" ARABIC LETTER ALEF FINAL FORM
+.char \[b+-] \[uFE8F] \" ARABIC LETTER BEH ISOLATED FORM
+.char \[b+,] \[uFE90] \" ARABIC LETTER BEH INITIAL FORM
+.char \[b+;] \[uFE91] \" ARABIC LETTER BEH MEDIAL FORM
+.char \[b+.] \[uFE92] \" ARABIC LETTER BEH FINAL FORM
+.char \[tm-] \[uFE93] \" ARABIC LETTER TEH MARBUTA ISOLATED FORM
+.char \[tm.] \[uFE94] \" ARABIC LETTER TEH MARBUTA FINAL FORM
+.char \[t+-] \[uFE95] \" ARABIC LETTER TEH ISOLATED FORM
+.char \[t+,] \[uFE96] \" ARABIC LETTER TEH INITIAL FORM
+.char \[t+;] \[uFE97] \" ARABIC LETTER TEH MEDIAL FORM
+.char \[t+.] \[uFE98] \" ARABIC LETTER TEH FINAL FORM
+.char \[tk-] \[uFE99] \" ARABIC LETTER THEH ISOLATED FORM
+.char \[tk,] \[uFE9A] \" ARABIC LETTER THEH INITIAL FORM
+.char \[tk;] \[uFE9B] \" ARABIC LETTER THEH MEDIAL FORM
+.char \[tk.] \[uFE9C] \" ARABIC LETTER THEH FINAL FORM
+.char \[g+-] \[uFE9D] \" ARABIC LETTER JEEM ISOLATED FORM
+.char \[g+,] \[uFE9E] \" ARABIC LETTER JEEM INITIAL FORM
+.char \[g+;] \[uFE9F] \" ARABIC LETTER JEEM MEDIAL FORM
+.char \[g+.] \[uFEA0] \" ARABIC LETTER JEEM FINAL FORM
+.char \[hk-] \[uFEA1] \" ARABIC LETTER HAH ISOLATED FORM
+.char \[hk,] \[uFEA2] \" ARABIC LETTER HAH INITIAL FORM
+.char \[hk;] \[uFEA3] \" ARABIC LETTER HAH MEDIAL FORM
+.char \[hk.] \[uFEA4] \" ARABIC LETTER HAH FINAL FORM
+.char \[x+-] \[uFEA5] \" ARABIC LETTER KHAH ISOLATED FORM
+.char \[x+,] \[uFEA6] \" ARABIC LETTER KHAH INITIAL FORM
+.char \[x+;] \[uFEA7] \" ARABIC LETTER KHAH MEDIAL FORM
+.char \[x+.] \[uFEA8] \" ARABIC LETTER KHAH FINAL FORM
+.char \[d+-] \[uFEA9] \" ARABIC LETTER DAL ISOLATED FORM
+.char \[d+.] \[uFEAA] \" ARABIC LETTER DAL FINAL FORM
+.char \[dk-] \[uFEAB] \" ARABIC LETTER THAL ISOLATED FORM
+.char \[dk.] \[uFEAC] \" ARABIC LETTER THAL FINAL FORM
+.char \[r+-] \[uFEAD] \" ARABIC LETTER REH ISOLATED FORM
+.char \[r+.] \[uFEAE] \" ARABIC LETTER REH FINAL FORM
+.char \[z+-] \[uFEAF] \" ARABIC LETTER ZAIN ISOLATED FORM
+.char \[z+.] \[uFEB0] \" ARABIC LETTER ZAIN FINAL FORM
+.char \[s+-] \[uFEB1] \" ARABIC LETTER SEEN ISOLATED FORM
+.char \[s+,] \[uFEB2] \" ARABIC LETTER SEEN INITIAL FORM
+.char \[s+;] \[uFEB3] \" ARABIC LETTER SEEN MEDIAL FORM
+.char \[s+.] \[uFEB4] \" ARABIC LETTER SEEN FINAL FORM
+.char \[sn-] \[uFEB5] \" ARABIC LETTER SHEEN ISOLATED FORM
+.char \[sn,] \[uFEB6] \" ARABIC LETTER SHEEN INITIAL FORM
+.char \[sn;] \[uFEB7] \" ARABIC LETTER SHEEN MEDIAL FORM
+.char \[sn.] \[uFEB8] \" ARABIC LETTER SHEEN FINAL FORM
+.char \[c+-] \[uFEB9] \" ARABIC LETTER SAD ISOLATED FORM
+.char \[c+,] \[uFEBA] \" ARABIC LETTER SAD INITIAL FORM
+.char \[c+;] \[uFEBB] \" ARABIC LETTER SAD MEDIAL FORM
+.char \[c+.] \[uFEBC] \" ARABIC LETTER SAD FINAL FORM
+.char \[dd-] \[uFEBD] \" ARABIC LETTER DAD ISOLATED FORM
+.char \[dd,] \[uFEBE] \" ARABIC LETTER DAD INITIAL FORM
+.char \[dd;] \[uFEBF] \" ARABIC LETTER DAD MEDIAL FORM
+.char \[dd.] \[uFEC0] \" ARABIC LETTER DAD FINAL FORM
+.char \[tj-] \[uFEC1] \" ARABIC LETTER TAH ISOLATED FORM
+.char \[tj,] \[uFEC2] \" ARABIC LETTER TAH INITIAL FORM
+.char \[tj;] \[uFEC3] \" ARABIC LETTER TAH MEDIAL FORM
+.char \[tj.] \[uFEC4] \" ARABIC LETTER TAH FINAL FORM
+.char \[zH-] \[uFEC5] \" ARABIC LETTER ZAH ISOLATED FORM
+.char \[zH,] \[uFEC6] \" ARABIC LETTER ZAH INITIAL FORM
+.char \[zH;] \[uFEC7] \" ARABIC LETTER ZAH MEDIAL FORM
+.char \[zH.] \[uFEC8] \" ARABIC LETTER ZAH FINAL FORM
+.char \[e+-] \[uFEC9] \" ARABIC LETTER AIN ISOLATED FORM
+.char \[e+,] \[uFECA] \" ARABIC LETTER AIN INITIAL FORM
+.char \[e+;] \[uFECB] \" ARABIC LETTER AIN MEDIAL FORM
+.char \[e+.] \[uFECC] \" ARABIC LETTER AIN FINAL FORM
+.char \[i+-] \[uFECD] \" ARABIC LETTER GHAIN ISOLATED FORM
+.char \[i+,] \[uFECE] \" ARABIC LETTER GHAIN INITIAL FORM
+.char \[i+;] \[uFECF] \" ARABIC LETTER GHAIN MEDIAL FORM
+.char \[i+.] \[uFED0] \" ARABIC LETTER GHAIN FINAL FORM
+.char \[f+-] \[uFED1] \" ARABIC LETTER FEH ISOLATED FORM
+.char \[f+,] \[uFED2] \" ARABIC LETTER FEH INITIAL FORM
+.char \[f+;] \[uFED3] \" ARABIC LETTER FEH MEDIAL FORM
+.char \[f+.] \[uFED4] \" ARABIC LETTER FEH FINAL FORM
+.char \[q+-] \[uFED5] \" ARABIC LETTER QAF ISOLATED FORM
+.char \[q+,] \[uFED6] \" ARABIC LETTER QAF INITIAL FORM
+.char \[q+;] \[uFED7] \" ARABIC LETTER QAF MEDIAL FORM
+.char \[q+.] \[uFED8] \" ARABIC LETTER QAF FINAL FORM
+.char \[k+-] \[uFED9] \" ARABIC LETTER KAF ISOLATED FORM
+.char \[k+,] \[uFEDA] \" ARABIC LETTER KAF INITIAL FORM
+.char \[k+;] \[uFEDB] \" ARABIC LETTER KAF MEDIAL FORM
+.char \[k+.] \[uFEDC] \" ARABIC LETTER KAF FINAL FORM
+.char \[l+-] \[uFEDD] \" ARABIC LETTER LAM ISOLATED FORM
+.char \[l+,] \[uFEDE] \" ARABIC LETTER LAM INITIAL FORM
+.char \[l+;] \[uFEDF] \" ARABIC LETTER LAM MEDIAL FORM
+.char \[l+.] \[uFEE0] \" ARABIC LETTER LAM FINAL FORM
+.char \[m+-] \[uFEE1] \" ARABIC LETTER MEEM ISOLATED FORM
+.char \[m+,] \[uFEE2] \" ARABIC LETTER MEEM INITIAL FORM
+.char \[m+;] \[uFEE3] \" ARABIC LETTER MEEM MEDIAL FORM
+.char \[m+.] \[uFEE4] \" ARABIC LETTER MEEM FINAL FORM
+.char \[n+-] \[uFEE5] \" ARABIC LETTER NOON ISOLATED FORM
+.char \[n+,] \[uFEE6] \" ARABIC LETTER NOON INITIAL FORM
+.char \[n+;] \[uFEE7] \" ARABIC LETTER NOON MEDIAL FORM
+.char \[n+.] \[uFEE8] \" ARABIC LETTER NOON FINAL FORM
+.char \[h+-] \[uFEE9] \" ARABIC LETTER HEH ISOLATED FORM
+.char \[h+,] \[uFEEA] \" ARABIC LETTER HEH INITIAL FORM
+.char \[h+;] \[uFEEB] \" ARABIC LETTER HEH MEDIAL FORM
+.char \[h+.] \[uFEEC] \" ARABIC LETTER HEH FINAL FORM
+.char \[w+-] \[uFEED] \" ARABIC LETTER WAW ISOLATED FORM
+.char \[w+.] \[uFEEE] \" ARABIC LETTER WAW FINAL FORM
+.char \[j+-] \[uFEEF] \" ARABIC LETTER ALEF MAKSURA ISOLATED FORM
+.char \[j+.] \[uFEF0] \" ARABIC LETTER ALEF MAKSURA FINAL FORM
+.char \[y+-] \[uFEF1] \" ARABIC LETTER YEH ISOLATED FORM
+.char \[y+,] \[uFEF2] \" ARABIC LETTER YEH INITIAL FORM
+.char \[y+;] \[uFEF3] \" ARABIC LETTER YEH MEDIAL FORM
+.char \[y+.] \[uFEF4] \" ARABIC LETTER YEH FINAL FORM
+.char \[lM-] \[uFEF5] \" ARABIC LIGATURE LAM WITH ALEF WITH MADDA ABOVE ISOLATED FORM
+.char \[lM.] \[uFEF6] \" ARABIC LIGATURE LAM WITH ALEF WITH MADDA ABOVE FINAL FORM
+.char \[lH-] \[uFEF7] \" ARABIC LIGATURE LAM WITH ALEF WITH HAMZA ABOVE ISOLATED FORM
+.char \[lH.] \[uFEF8] \" ARABIC LIGATURE LAM WITH ALEF WITH HAMZA ABOVE FINAL FORM
+.char \[lh-] \[uFEF9] \" ARABIC LIGATURE LAM WITH ALEF WITH HAMZA BELOW ISOLATED FORM
+.char \[lh.] \[uFEFA] \" ARABIC LIGATURE LAM WITH ALEF WITH HAMZA BELOW FINAL FORM
+.char \[la-] \[uFEFB] \" ARABIC LIGATURE LAM WITH ALEF ISOLATED FORM
+.char \[la.] \[uFEFC] \" ARABIC LIGATURE LAM WITH ALEF FINAL FORM
diff --git a/contrib/rfc1345/tests/rfc1345-smoke-test.sh b/contrib/rfc1345/tests/rfc1345-smoke-test.sh
new file mode 100755
index 0000000..5fd2fb7
--- /dev/null
+++ b/contrib/rfc1345/tests/rfc1345-smoke-test.sh
@@ -0,0 +1,31 @@
+#!/bin/sh
+#
+# Copyright (C) 2021 Free Software Foundation, Inc.
+#
+# This file is part of groff.
+#
+# groff is free software; 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.
+#
+# groff is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+
+groff="${abs_top_builddir:-.}/test-groff"
+
+# Smoke-test rfc1345.tmac.
+
+DOC='\[,.]'
+
+OUTPUT=$(echo "$DOC" | "$groff" -T utf8 -m rfc1345 -P-cbou -Z)
+
+echo "$OUTPUT" | grep -Fqx 'Cu2026'
+
+# vim:set ai et sw=4 ts=4 tw=72:
diff --git a/contrib/sboxes/ChangeLog b/contrib/sboxes/ChangeLog
new file mode 100644
index 0000000..4d56984
--- /dev/null
+++ b/contrib/sboxes/ChangeLog
@@ -0,0 +1,202 @@
+2023-02-18 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * sboxes.am (uninstall_sboxes): Clean more fastidiously; try to
+ remove the configured `sboxespdfdocdir` in the event it is
+ empty, but do not fail if it isn't. (It can be a directory
+ shared with other groff components; we don't know in what order
+ the uninstall targets will serialize, but the last one run
+ should succeed.)
+
+2022-10-23 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * sboxes.tmac: Escape newline after opening conditional block.
+
+2022-05-20 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * sboxes.am: Rename `BUILD_PDFDOC` to `USE_GROPDF`.
+
+2022-05-01 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * sboxes.am ($(sboxes_builddir)/msboxes.pdf): Depend on new name
+ for devpdf stamp file.
+
+2022-04-03 Ingo Schwarze <schwarze@openbsd.org>
+
+ * sboxes.am: msboxes.ms is documentation, not merely an example.
+ Consequently, install msboxes.ms unconditionally and msboxes.pdf
+ if BUILD_PDFDOC is enabled, both to the documentation directory
+ rather than to the examples directory.
+
+2022-04-02 Ingo Schwarze <schwarze@openbsd.org>
+
+ * sboxes.am: Stop installing msboxes.ms.in;
+ installing msboxes.ms and msboxes.pdf is enough.
+
+2022-03-29 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * sboxes.am: Track rename of `DOC_GROFF_ONLY` to `DOC_GROFF`.
+
+2022-03-29 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * msboxes.ms.in: Tweak sboxes documentation to imply ms
+ dependency.
+
+ Fixes <https://savannah.gnu.org/bugs/?62062>.
+
+2022-03-22 Ingo Schwarze <schwarze@openbsd.org>
+
+ * sboxes.am: fix non-portable syntax in the msboxes.pdf target
+ by using DOC_GROFF_ONLY rather than DOC_GROFF in order to not
+ use $< outside a suffix rule; DOC_GROFF functionality is not
+ needed here in the first place.
+
+2022-03-22 Ingo Schwarze <schwarze@openbsd.org>
+
+ * sboxes.am: make the build of msboxes.{ms,pdf} work with BSD
+ make by using $(sboxes_builddir) consistently to prevent
+ variations in target names.
+
+2022-02-06 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * sboxes.tmac: Prefix early diagnostics with package file name
+ literally. (We don't yet know if we can use \*[] string
+ interpolation.) It is better to violate DRY a little here than
+ to obscure from the user what is emitting the diagnostic.
+
+2022-02-06 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * sboxes.tmac: Skip macro package instead of aborting if there
+ are prerequisite problems. This is an auxiliary package; it is
+ not necessarily fatal to the user's purposes if it doesn't load.
+
+2022-02-06 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * notquine.sed: Convert tilde to special character when inlining
+ document source (\~ is used).
+
+2021-11-01 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * msboxes.ms.in: Retitle document to "Using PDF Boxes with
+ _groff and_ the ms macros" (emphasis added) to make it clearer
+ that this package does not _require_ ms.
+
+2021-10-27 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * notquine.sed: Improve portability and tighten logic. Thanks
+ to Axel Kielhorn for the report and Andreas Kusalananda Kähäri
+ for the suggested improvements.
+
+2021-10-24 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * sboxes.tmac: Rename strings and macro I introduced so that
+ they fit Deri's selection within the name space (prefix "bx").
+ Rename existing macros to use the groff ms(7) naming convention.
+ None of the macros in this "module" seem meant to be visible to
+ other modules, so suffix the module name with '*' instead of
+ '@'. Drop unused 7th argument in a `pdfbackground` call.
+
+2021-10-24 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * sboxes.tmac: Define GSBOX register as 0, then redefine it as 1
+ only if the output device is `pdf`. (This way a document author
+ can easily and separately test the presence of the package and
+ whether the device-specific feature is likely to work.)
+ (pdfbackground): Only define (overriding `pdf.tmac`) if GSBOX is
+ false.
+ * msboxes.ms.in: Document this aspect of the package interface.
+
+2021-10-21 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * sboxes.am (SBOXES_FLAGS): Drop variable since we only expand
+ it in one place.
+ ($(sboxes_builddir)/msboxes.pdf): Be more consistent with the
+ rest of our build, particularly documentation generated in the
+ groff `doc` directory. Use `GROFF_V` instead of `AM_V_GEN` to
+ control output (since it is in fact groff producing the target).
+ Use `DOC_GROFF` to produce the document rather than
+ `test-groff`. Use the former `SBOXES_FLAGS` here.
+
+2021-10-20 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * sboxes.am ($(sboxes_builddir)/msboxes.ms,
+ $(sboxes_builddir)/msboxes.pdf): Be quieter by default; use
+ $(AM_V_at) and $(AM_V_GEN) more consistently with the rest of
+ the build.
+
+2021-10-17 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * sboxes.tmac: Rename macros to get out of user name space. Our
+ ms package documentation says that externally visible names will
+ consist only of uppercase letters and digits.
+ (BoxStart): Rename to BOXSTART.
+ (BoxStop): Rename to BOXSTOP.
+ * msboxes.ms.in: Document and use new names.
+
+2021-10-17 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * sboxes.tmac: Add more prerequisite checking. Check `GS`
+ register for groff ms macros specifically. Check installed
+ version of groff since the gropdf in earlier versions won't
+ implement the underlying feature. Add new string to introduce
+ diagnostic messages now that we have more than one (that we can
+ emit without limp-along AT&T compatibility mode).
+ (sboxes*error): Use new string in diagnostic message.
+
+2021-10-17 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * sboxes.tmac (sboxes*error): Add new macro to produce
+ diagnostic message in a standard format.
+ (BoxStart): Use it.
+
+2021-10-17 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ Make msboxes.ms quote its own source through a
+ self-interpolation process (with help from sed and the build
+ system), avoiding the need to manually keep the source document
+ and its quoted form in sync.
+
+ * msboxes.ms: Rename to...
+ * msboxes.ms.in: ...this.
+ * notquine.sed: New file; this sed script performs quotation of
+ roff syntax characters (and hyphens), inserts the quoted form of
+ the document's source into itself, and reproduces Deri's
+ Schrödinger's footnote trick.
+ * sboxes.am: Introduce new variables `sboxes_builddir` and
+ `sboxesnotquine` for convenience. Update value of
+ $(SBOXES_EXAMPLEFILES) to point to the new .in source file. Add
+ the generated ms document to $(SBOXES_PROCESSEDEXAMPLEFILES) and
+ $(MOSTLYCLEANFILES). Add the `notquine` sed script to the
+ distribution archive via $(EXTRA_DIST).
+ ($(sboxes_builddir)/msboxes.ms): New rule produces the ms
+ document from msboxes.ms.in, constructing it with sed.
+ ($(sboxes_builddir)/msboxes.pdf): Update rule to add dependency
+ on source document, use new `sboxes_builddir` variable, and look
+ for source document in the build tree instead of the source.
+
+2021-10-17 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * sboxes.am: Add this ChangeLog to `EXTRA_DIST`.
+
+2021-10-11 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * sboxes.am (MOSTLYCLEANFILES): Add
+ `$(SBOXES_PROCESSEDEXAMPLEFILES)`; allows `distcheck` target to
+ succeed.
+
+________________________________________________________________________
+
+##### License
+
+Copyright 2021 Free Software Foundation, Inc.
+
+Copying and distribution of this file, with or without modification,
+are permitted in any medium without royalty provided the copyright
+notice and this notice are preserved.
+
+##### Editor settings
+Local Variables:
+fill-column: 72
+mode: change-log
+version-control: never
+End:
+vim:set autoindent textwidth=72:
diff --git a/contrib/sboxes/msboxes.ms.in b/contrib/sboxes/msboxes.ms.in
new file mode 100644
index 0000000..a1700df
--- /dev/null
+++ b/contrib/sboxes/msboxes.ms.in
@@ -0,0 +1,272 @@
+.\" groff -ms -msboxes -Tpdf
+.nr LL 17c
+.nr PO 2c
+.nr PS 11
+.nr VS 13
+.nr PI 3.5n
+.nr HM 2c
+.nr FM 2c
+.nr QI 7n
+.ss 12 0
+.ND March 2021
+.EH '%''March 2021'
+.EF ''''
+.OH 'Using PDF boxes with \f[I]groff\f[] and the \f[I]ms\f[] macros''%'
+.OF ''''
+.\" Define a quotation macro.
+.de Qq
+. nop \[lq]\\$1\[rq]\\$2
+..
+.\" Define a macro for code literals; use bold and disable hyphenation.
+.de Lt
+. ft B
+. nh
+. nop \&\\$1\c
+. hy \\n[HY]
+. ft
+. nop \&\\$2
+..
+.ds FAM H
+.TL
+Using PDF boxes with
+.BI groff
+and the
+.BI ms
+macros
+.AU
+Deri James
+.AI
+deri@chuzzlewit.myzen.co.uk
+.LP
+An extension in version 1.23.0 of
+.I gropdf ,
+the PDF output driver for the
+.I groff
+document formatting system,
+allows coloured rectangles to be placed beneath any output created by
+.I groff .
+The extension can be accessed via a device control escape sequence
+.Lt "\[rs]X\[aq]pdf: background" \~.\|.\|.\|\c
+.Lt \[aq]
+or a convenience macro
+.Lt pdfbackground
+supporting the same parameters.
+.QS
+.BOXSTART SHADED cornsilk OUTLINED brown INDENT 2n WEIGHT 1p
+\M[floralwhite]\c
+.pdfbackground pagefill
+\M[]\c
+.B
+\[rs]X\[aq]pdf: background
+.BI
+cmd left top right bottom weight\[aq]
+.br
+.Lt .pdfbackground
+.BI
+cmd left top right bottom weight
+.LP
+each produce a background rectangle on the page, where
+.IP \f[I]cmd 8n \" indent enough to fit "bottom" tag
+is the command, which can be any of
+.Qq page|fill|box
+in combination.
+Thus,
+.Qq pagefill
+would draw a rectangle which covers the whole current page size (in
+which case the rest of the parameters can be omitted because the box
+dimensions are taken from the current media size).
+.Qq boxfill ,
+on the other hand, requires the given dimensions to place the box.
+Including
+.Qq fill
+in the command will paint the rectangle with the current fill colour (as
+with
+.Lt \[rs]M[] )
+and including
+.Qq box
+will give the rectangle a border in the current stroke colour
+(as with
+.Lt \[rs]m[] ).
+.sp \n[PD]u
+.I cmd
+may also be
+.Qq off
+on its own, which will terminate drawing the current box.
+If you have specified a page colour with
+.Qq pagefill ,
+it is always the first box in the stack, and if you specify it again, it
+will replace the first entry.
+Be aware that the
+.Qq pagefill
+box renders the page opaque, so tools that
+.Qq watermark
+PDF pages are unlikely to be successful.
+To return the background to transparent, issue an
+.Qq off
+command with no other boxes open.
+.sp \n[PD]u
+Finally,
+.I cmd
+may be
+.Qq footnote
+followed by a new value for
+.I bottom ,
+which will be used for all open boxes on the current page.
+This is to allow room for footnote areas that grow while a page is
+processed (to accommodate multiple footnotes,
+for instance).\m[red]\**\m[]\" FOOTNOTE
+.FS
+If the value is negative, it is used as an offset from the bottom of the
+page.
+.FE
+.nr oldPD \n[PD]
+.nr PD 0
+.IP \f[I]left
+.IP \f[I]top
+.IP \f[I]right
+.IP \f[I]bottom
+.nr PD \n[oldPD]
+are the coordinates of the box.
+The
+.I top
+and
+.I bottom
+coordinates are the minimum and maximum for the box, since the actual
+start of the box is
+.I groff 's
+drawing position when you issue the command, and the bottom of the box
+is the point where you turn the box
+.Qq off .
+The top and bottom coordinates are used only if the box drawing extends
+onto the next page; ordinarily, they would be set to the header and
+footer margins.
+.IP \f[I]weight
+provides the line width for the border if
+.Qq box
+is included in the command.
+.BOXSTOP
+.QE
+For an even more convenient interface, include
+.Lt \-msboxes
+on the
+.I groff
+command line; the
+.I sboxes
+package defines the macros
+.Lt BOXSTART
+and
+.Lt BOXSTOP .
+.QS
+.BOXSTART SHADED cornsilk OUTLINED brown INDENT 2n WEIGHT 1p
+.BOXSTART SHADED cornsilk3 INDENT 2p
+.Lt .BOXSTART
+.Lt SHADED
+.I colour
+.Lt OUTLINED
+.I colour
+.Lt INDENT
+.I size
+.Lt WEIGHT
+.I size
+.BOXSTOP
+.LP
+begins a box,
+where the argument after
+.Lt SHADED
+gives the fill colour and that after
+.Lt OUTLINED
+the border colour.
+Omit the former to get a borderless filled box and the latter for a
+border with no fill.
+The specified
+.Lt WEIGHT
+is used if the box is
+.Lt OUTLINED .
+.LP
+.Lt INDENT
+precedes a value which leaves a gap between the border and the contents
+inside the box.
+.LP
+Each
+.I colour
+must be a defined
+.I groff
+colour name,
+and each
+.I size
+a valid
+.I groff
+numeric expression.
+The keyword/value pairs can be specified in any order.
+.BOXSTOP
+.QE
+Boxes can be stacked, so you can start a box within another box; usually
+the later boxes would be smaller than the containing box, but this is
+not enforced.
+When using
+.Lt BOXSTART ,
+the left position is the current indent minus the
+.Lt INDENT
+in the command,
+and the right position is the left position (calculated above) plus the
+current line length and twice the indent.
+The synopsis of
+.Lt BOXSTART
+above itself uses a
+.Lt BOXSTART
+call without borders and with a
+.Lt 2p
+(two point) indent.
+.QS
+.BOXSTART SHADED cornsilk OUTLINED brown INDENT 2n WEIGHT 1p
+.BOXSTART SHADED cornsilk3 INDENT 2p
+.Lt .BOXSTOP
+.BOXSTOP
+.LP
+takes no parameters.
+It closes the most recently started box at the current vertical position
+after adding its
+.Lt INDENT
+spacing.
+.BOXSTOP
+.QE
+Your
+.I groff
+documents can conditionally exercise the
+.I sboxes
+macros.
+The register
+.Lt GSBOX
+is defined if the package is loaded, and interpolates a true value if
+the
+.Lt pdf
+output device is in use.
+.LP
+.I sboxes
+furthermore hooks into the
+.I "groff ms"
+package to receive notifications when footnotes are growing, so that it
+can close boxes on a page before footnotes are printed.
+When that condition obtains,
+.I sboxes
+will close open boxes two points\**
+.FS
+This amount probably will not match the box's
+.Lt INDENT .
+.FE
+above the footnote separator and re-open them on the next page.
+.LP
+This document was produced using the following code.
+.ds FAM C
+.nr PS 11
+.nr VS 13
+.LP
+.BOXSTART SHADED white OUTLINED brown INDENT 2n WEIGHT 1p
+.nf
+\# REPLACEME
+.BOXSTOP
+.\" Local Variables:
+.\" mode: nroff
+.\" fill-column: 72
+.\" End:
+.\" vim: set filetype=groff textwidth=72:
diff --git a/contrib/sboxes/notquine.sed b/contrib/sboxes/notquine.sed
new file mode 100644
index 0000000..1a110ab
--- /dev/null
+++ b/contrib/sboxes/notquine.sed
@@ -0,0 +1,18 @@
+s/.*\\##.*/&\
+&/
+s/\\##//
+t
+s/\\" FOOTNOTE/@FOOTNOTE@/
+s/\\/\\[rs]/g
+s/-/\\&/g
+s/'/\\[aq]/g
+s/~/\\[ti]/g
+s/^\./\\\&&/
+/@FOOTNOTE@/a\
+.FS\
+This is a long footnote occupying multiple output lines.\
+Its only purpose is to verify that the bottom of the box on this page\
+has been adjusted upwards to accommodate it.\
+.FE
+s/@FOOTNOTE@/\\m[red]\\**\\m[]/
+s/REPLACEME/(replaced by source of this document)/
diff --git a/contrib/sboxes/sboxes.am b/contrib/sboxes/sboxes.am
new file mode 100644
index 0000000..7786337
--- /dev/null
+++ b/contrib/sboxes/sboxes.am
@@ -0,0 +1,74 @@
+# Copyright (C) 2021 Free Software Foundation, Inc.
+# Written by Bertrand Garrigues <bertrand.garrigues@laposte.net>
+#
+# This file is part of groff.
+#
+# groff is free software; 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.
+#
+# groff is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+sboxes_srcdir = $(top_srcdir)/contrib/sboxes
+sboxes_builddir = $(top_builddir)/contrib/sboxes
+sboxesnotquine = $(sboxes_srcdir)/notquine.sed
+
+sboxestmacdir = $(tmacdir)
+dist_sboxestmac_DATA = contrib/sboxes/sboxes.tmac
+
+EXTRA_DIST += \
+ contrib/sboxes/ChangeLog \
+ contrib/sboxes/msboxes.ms.in \
+ contrib/sboxes/notquine.sed
+
+SBOXES_EXAMPLEFILES = $(sboxes_srcdir)/msboxes.ms.in
+
+sboxesotherdocdir = $(docdir)
+nodist_sboxesotherdoc_DATA = $(sboxes_builddir)/msboxes.ms
+
+if USE_GROPDF
+sboxespdfdocdir = $(pdfdocdir)
+nodist_sboxespdfdoc_DATA = $(sboxes_builddir)/msboxes.pdf
+endif
+
+MOSTLYCLEANFILES += msboxes.ms \
+ $(nodist_sboxesotherdoc_DATA) \
+ $(nodist_sboxespdfdoc_DATA)
+
+# The ordering of the sed -e expressions is important.
+$(sboxes_builddir)/msboxes.ms: $(SBOXES_EXAMPLEFILES) $(sboxesnotquine)
+ $(AM_V_at)mkdir -p $(sboxes_builddir)
+ $(AM_V_at)$(SED) -n -e '1,/REPLACEME/p' \
+ $(SBOXES_EXAMPLEFILES) > $@.tmp
+ $(AM_V_at)$(SED) -f $(sboxesnotquine) \
+ $(SBOXES_EXAMPLEFILES) >> $@.tmp
+ $(AM_V_at)$(SED) -n -e '/REPLACEME/,$$p' \
+ $(SBOXES_EXAMPLEFILES) >> $@.tmp
+ $(AM_V_GEN)mv $@.tmp $@
+
+$(sboxes_builddir)/msboxes.pdf: $(sboxes_builddir)/msboxes.ms \
+ $(dist_sboxestmac_DATA) groff troff gropdf font/devpdf/stamp
+ $(GROFF_V)$(DOC_GROFF) -M$(sboxes_srcdir) -ms -msboxes -Tpdf \
+ $(sboxes_builddir)/msboxes.ms > $@
+
+uninstall_groffdirs: uninstall_sboxes
+uninstall_sboxes:
+ if test -d $(DESTDIR)$(exampledir)/sboxes; then \
+ rmdir $(DESTDIR)$(exampledir)/sboxes; \
+ fi
+if USE_GROPDF
+ -rmdir $(DESTDIR)$(sboxespdfdocdir)
+endif
+
+# Local Variables:
+# fill-column: 72
+# mode: makefile-automake
+# End:
+# vim: set autoindent filetype=automake textwidth=72:
diff --git a/contrib/sboxes/sboxes.tmac b/contrib/sboxes/sboxes.tmac
new file mode 100644
index 0000000..63c9263
--- /dev/null
+++ b/contrib/sboxes/sboxes.tmac
@@ -0,0 +1,147 @@
+.ig
+
+sboxes.tmac
+
+Copyright (C) 2021 Free Software Foundation, Inc.
+ Written by Deri James (deri@chuzzlewit.myzen.co.uk)
+
+This file is part of groff.
+
+groff is free software; 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.
+
+groff is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+..
+.if !\n(.g \{\
+. tm sboxes.tmac: macros require groff extensions; not loading
+. nx
+.\}
+.
+.if \n(.C \{\
+. tm sboxes.tmac: macros do not work in compatibility mode; not loading
+. nx
+.\}
+.
+.\" Define a string for use in diagnostic messages.
+.ds bx*name sboxes.tmac\"
+.
+.if !r GS \
+. ab \*[bx*name]: ms macros must be loaded first; aborting
+.
+.if (\n[.x]\n[.y] < 123) \{\
+. ds bx*msg \*[bx*name]: groff 1.23 or later is required,\"
+. as bx*msg " but found groff \n[.x].\n[.y]; not loading\"
+. tm \*[bx*msg]
+. nx
+.\}
+.
+.\" See if already loaded.
+.if r GSBOX .nx
+.
+.\" GSBOX is defined if the package is loaded, and true if it will work.
+.nr GSBOX 0
+.if '\*[.T]'pdf' \
+. nr GSBOX 1
+.
+.nr bx*stack 0
+.
+.de bx*error
+. tm \*[bx*name]:\\n[.F]:\\n[.c]: error: \\$*
+..
+.
+.\" Define dummy macro if we're not formatting for the pdf device.
+.if !\n[GSBOX] \{\
+. de pdfbackground
+. .
+.\}
+.
+.\" Link into ms macros to trap footnote growth
+.am fn@print-sep
+. nr bx*pb \\n[nl]u-2p
+. nop \!x X pdf: background footnote \\n[bx*pb]z
+. rr bx*pb
+..
+.\" Has PD been actioned?
+.am par*start
+. nr bx*PD \\n[PD]
+..
+.
+.de BOXSTART
+. fl
+. nr bx*stack \\n[bx*stack]+1u
+. nr bx*shad 0
+. nr bx*outl 0
+. nr bx*ind 1P
+. ds bx*wt 0
+. ds bx*type "\"
+. while \\n[.$] \{\
+. ie 'SHADED'\\$1' \{\
+. nop \\M[\\$2]\c
+. nr bx*shad 1
+. as bx*type "fill\"
+. shift 2
+. \}
+. el \{\
+. ie 'OUTLINED'\\$1' \{\
+. nop \\m[\\$2]\c
+. nr bx*outl 1
+. as bx*type "box\"
+. shift 2
+. \}
+. el \{\
+. ie 'WEIGHT'\\$1' \{\
+. ds bx*wt \\$2
+. shift 2
+. \}
+. el \{\
+. ie 'INDENT'\\$1' \{\
+. nr bx*ind \\$2
+. shift 2
+. \}
+. el \{\
+. bx*error ignoring unrecognized BOXSTART parameter '\\$1'
+. shift
+. \}
+. \}
+. \}
+. \}
+. \}
+.
+. if '\\*[bx*type]'' .ds bx*type "fill"
+. nr bx*l \\n[\\n[.ev]:li]s+\\n[.o]s-\\n[bx*ind]u
+. nr bx*r \\n[bx*l]u+\\n[.l]-\\n[\\n[.ev]:li]+(\\n[bx*ind]u*2u)
+. nr bx*gap \\n[.v]-\\n[.ps]+\\*[bx*wt]
+. nr bx*bot \\n[.p]u-\\n[FM]u+\\n[bx*ind]u+\\n[.ps]u
+. nr bx*top \\n[HM]-\\n[bx*ind]u+\\n[bx*gap]u
+. ne \\n[bx*ind]u+2v+\\*[bx*wt]
+. sp -(2v-(\\n[bx*PD]u*2u))u
+. pdfbackground \\*[bx*type] \\n[bx*l]z \\n[bx*top]z \
+ \\n[bx*r]z \\n[bx*bot]z \
+ \\*[bx*wt]
+. sp (\\n[bx*ind]u-1v)u
+. if (\\n[bx*shad]=1) .nop \\M[]\c
+. if (\\n[bx*outl]=1) .nop \\m[]\c
+. ds bx*ind\\n[bx*stack] \\n[bx*ind]
+. rr bx*shad bx*outl bx*ind bx*bot bx*top bx*l bx*r
+. rm wt type
+. sp -(\\n[bx*gap]u)
+. nr bx*PD 0
+..
+.de BOXSTOP
+. sp \\*[bx*ind\\n[bx*stack]]u-\\n[.psr]u
+. pdfbackground off
+. nr bx*stack \\n[bx*stack]-1u
+..
+.\" Local Variables:
+.\" mode: nroff
+.\" fill-column: 72
+.\" End:
+.\" vim: set expandtab filetype=groff textwidth=72: