From 039b61f11221d266f67392e4bce3f5ef27d77bf6 Mon Sep 17 00:00:00 2001 From: wlemb Date: Thu, 23 May 2002 21:58:59 +0000 Subject: Initial revision --- contrib/mom/BUGS | 54 + contrib/mom/ChangeLog | 202 + contrib/mom/Makefile.sub | 127 + contrib/mom/NEWS | 64 + contrib/mom/TODO | 36 + contrib/mom/copyright | 24 + contrib/mom/examples/.cvsignore | 1 + contrib/mom/examples/README.mom | 50 + contrib/mom/examples/elvis_syntax | 121 + contrib/mom/examples/macros.mom | 665 +++ contrib/mom/examples/typeset.mom | 534 +++ contrib/mom/examples/typewrite.mom | 233 + contrib/mom/groff_mom.man | 91 + contrib/mom/mom.tmac | 3 + contrib/mom/momdoc/appendices.html | 185 + contrib/mom/momdoc/cover.html | 49 + contrib/mom/momdoc/definitions.html | 652 +++ contrib/mom/momdoc/docelement.html | 1687 +++++++ contrib/mom/momdoc/docprocessing.html | 1750 +++++++ contrib/mom/momdoc/goodies.html | 923 ++++ contrib/mom/momdoc/headfootpage.html | 1081 +++++ contrib/mom/momdoc/inlines.html | 516 +++ contrib/mom/momdoc/intro.html | 383 ++ contrib/mom/momdoc/letters.html | 315 ++ contrib/mom/momdoc/rectoverso.html | 248 + contrib/mom/momdoc/reserved.html | 917 ++++ contrib/mom/momdoc/toc.html | 203 + contrib/mom/momdoc/typemacdoc.html | 170 + contrib/mom/momdoc/typesetting.html | 3726 +++++++++++++++ contrib/mom/momdoc/using.html | 207 + contrib/mom/om.tmac | 8120 +++++++++++++++++++++++++++++++++ 31 files changed, 23337 insertions(+) create mode 100644 contrib/mom/BUGS create mode 100644 contrib/mom/ChangeLog create mode 100644 contrib/mom/Makefile.sub create mode 100644 contrib/mom/NEWS create mode 100644 contrib/mom/TODO create mode 100644 contrib/mom/copyright create mode 100644 contrib/mom/examples/.cvsignore create mode 100644 contrib/mom/examples/README.mom create mode 100644 contrib/mom/examples/elvis_syntax create mode 100644 contrib/mom/examples/macros.mom create mode 100644 contrib/mom/examples/typeset.mom create mode 100644 contrib/mom/examples/typewrite.mom create mode 100644 contrib/mom/groff_mom.man create mode 100644 contrib/mom/mom.tmac create mode 100644 contrib/mom/momdoc/appendices.html create mode 100644 contrib/mom/momdoc/cover.html create mode 100644 contrib/mom/momdoc/definitions.html create mode 100644 contrib/mom/momdoc/docelement.html create mode 100644 contrib/mom/momdoc/docprocessing.html create mode 100644 contrib/mom/momdoc/goodies.html create mode 100644 contrib/mom/momdoc/headfootpage.html create mode 100644 contrib/mom/momdoc/inlines.html create mode 100644 contrib/mom/momdoc/intro.html create mode 100644 contrib/mom/momdoc/letters.html create mode 100644 contrib/mom/momdoc/rectoverso.html create mode 100644 contrib/mom/momdoc/reserved.html create mode 100644 contrib/mom/momdoc/toc.html create mode 100644 contrib/mom/momdoc/typemacdoc.html create mode 100644 contrib/mom/momdoc/typesetting.html create mode 100644 contrib/mom/momdoc/using.html create mode 100644 contrib/mom/om.tmac diff --git a/contrib/mom/BUGS b/contrib/mom/BUGS new file mode 100644 index 00000000..cc1b805e --- /dev/null +++ b/contrib/mom/BUGS @@ -0,0 +1,54 @@ +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 (groff@ffii.org) with bug reports, +questions and suggestions, or contact me directly at: + + df191@ncf.ca + +--Peter Schaffter + +======================================================================== + +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 00000000..2bb583fc --- /dev/null +++ b/contrib/mom/ChangeLog @@ -0,0 +1,202 @@ +*Thu 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. + +o 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. + +*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 "" 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 poperly 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 + | . Updated AUTOLEAD entry in momdoc/typesetting.html + to reflect the changes. + +Release 1.1 +----------- + +*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. diff --git a/contrib/mom/Makefile.sub b/contrib/mom/Makefile.sub new file mode 100644 index 00000000..8606e0b4 --- /dev/null +++ b/contrib/mom/Makefile.sub @@ -0,0 +1,127 @@ +# Copyright (C) 2002 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 2, 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 file COPYING. If not, write to the Free Software +# Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +groff_bin_dirs=\ + $(top_builddir)/roff/groff \ + $(top_builddir)/roff/troff \ + $(top_builddir)/devices/grops +groff_bin_path=`echo $(groff_bin_dirs) | sed -e 's| \+|:|g'` + +FFLAG=-F$(top_builddir)/font +TFLAG=-M$(srcdir) + +GROFF=GROFF_BIN_PATH=$(groff_bin_path); \ + export GROFF_BIN_PATH; \ + $(top_builddir)/src/roff/groff/groff $(FFLAG) $(TFLAG) + +MAN7=\ + groff_mom.n + +NORMALFILES=\ + mom.tmac \ + om.tmac + +momdocdir=$(htmldocdir)/momdoc + +HTMLDOCFILES=\ + appendices.html \ + cover.html \ + definitions.html \ + docelement.html \ + docprocessing.html \ + goodies.html \ + headfootpage.html \ + inlines.html \ + intro.html \ + letters.html \ + rectoverso.html \ + reserved.html \ + toc.html \ + typemacdoc.html \ + typesetting.html \ + using.html + +EXAMPLEFILES=\ + examples/macros.mom \ + examples/typeset.mom \ + examples/typewrite.mom + +EXTRAEXAMPLEFILES=\ + examples/README.mom \ + examples/elvis_syntax \ + examples/penguin.ps + +PROCESSEDEXAMPLEFILES=\ + examples/macros.ps \ + examples/typeset.ps \ + examples/typewrite.ps + +CLEANADD=\ + penguin.ps \ + $(PROCESSEDEXAMPLEFILES) + +all: make_examples + +.PHONY: make_examples +make_examples: prepare_make_examples $(PROCESSEDEXAMPLEFILES) + +prepare_make_examples: $(srcdir)/examples/penguin.ps + test -d examples || $(mkinstalldirs) examples + cp $< . + +examples/macros.ps: $(srcdir)/examples/macros.mom + $(GROFF) -Tps -mom $< >$@ + +examples/typeset.ps: $(srcdir)/examples/typeset.mom + $(GROFF) -Tps -mom $< >$@ + +examples/typewrite.ps: $(srcdir)/examples/typewrite.mom + $(GROFF) -Tps -mom $< >$@ + +install_data: $(NORMALFILES) \ + $(EXAMPLEFILES) $(EXTRAEXAMPLEFILES) $(PROCESSEDEXAMPLEFILES) + -test -d $(tmacdir) || $(mkinstalldirs) $(tmacdir) + for f in $(NORMALFILES); do \ + rm -f $(tmacdir)/$$f; \ + $(INSTALL_DATA) $(srcdir)/$$f $(tmacdir)/$$f; \ + done + -test -d $(momdocdir) || $(mkinstalldirs) $(momdocdir) + for f in $(HTMLDOCFILES); do \ + rm -f $(momdocdir)/$$f; \ + $(INSTALL_DATA) $(srcdir)/momdoc/$$f $(momdocdir)/$$f; \ + done + -test -d $(exampledir) || $(mkinstalldirs) $(exampledir) + for f in $(EXAMPLEFILES) $(EXTRAEXAMPLEFILES) \ + $(PROCESSEDEXAMPLEFILES); do \ + rm -f $(exampledir)/$$f; \ + $(INSTALL_DATA) $(srcdir)/$$f $(docdir)/$$f; + done + +uninstall_sub: + -for f in $(NORMALFILES); do \ + rm -f $(tmacdir)/$$f; \ + done + -for f in $(HTMLDOCFILES); do \ + rm -f $(momdocdir)/$$f; \ + done + -rmdir $(momdocdir) + -for f in $(EXAMPLEFILES) $(EXTRAEXAMPLEFILES) \ + $(PROCESSEDEXAMPLEFILES); do \ + rm -f $(docdir)/$$f; + done diff --git a/contrib/mom/NEWS b/contrib/mom/NEWS new file mode 100644 index 00000000..ab794bd6 --- /dev/null +++ b/contrib/mom/NEWS @@ -0,0 +1,64 @@ +groff 1.18 +---------- + +Mom version 1.1.1b is now part of groff. + +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 00000000..708bda92 --- /dev/null +++ b/contrib/mom/TODO @@ -0,0 +1,36 @@ +HEADERS/FOOTERS +--------------- +Create two new macros -- HEADER/FOOTER_1 and HEADER/FOOTER_2 -- +in case user wants a single (instead of 3-part) user-designed +header/footer. Default will be centered, but since I'll process this +style of header/footer in a diversion, user can change quad direction. +The idea behind _1 and _2 is that the user may want different headers +for recto and verso pages. Therefore, when recto/verso is on, _1 will +go on rectos, _2 on versos. + +CONTROL MACROS -- _INDENT +-------------- +Let user be able to enter decimal fractions as the argument to _INDENT +control macros, or, instead, let user be able to enter absolute +values with a unit of measure in addition to current behaviour, +which is relative. + +ENDNOTES +-------- +Not entirely sure of the most flexible way to set these up. And, to be +honest, not sure how essential they are to mom's target users. + +LISTS +----- +Possbility of indented, nested lists, html-style. Options for numbered, +alpha-ed, bulleted, dashed. Again, not sure how useful these would be +for mom's target users. As things stand now, it's easy enough to +set up lists with string tabs or hanging indents. + +BIBLIOGRAPHY +------------ +Thinking about macros to *assist* in user-written bibliographies (i.e. +not biblios that get generated automatically at the ends of docs). Style +considerations are a nightmare, though. + +------------------------------------------------------------------------ diff --git a/contrib/mom/copyright b/contrib/mom/copyright new file mode 100644 index 00000000..ea18d013 --- /dev/null +++ b/contrib/mom/copyright @@ -0,0 +1,24 @@ +AUTHOR +------ +Peter Schaffter (df191@ncf.ca) +15, chemin Brunette +RR 2, CP 406 +Ste-Cécile-de-Masham (Québec) +CANADA + +======================================================================== + +The groff macro file om.tmac and the html documentation pertaining +to it are copyright (c) 2002 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/.cvsignore b/contrib/mom/examples/.cvsignore new file mode 100644 index 00000000..11eb07ce --- /dev/null +++ b/contrib/mom/examples/.cvsignore @@ -0,0 +1 @@ +*.ps diff --git a/contrib/mom/examples/README.mom b/contrib/mom/examples/README.mom new file mode 100644 index 00000000..062931c4 --- /dev/null +++ b/contrib/mom/examples/README.mom @@ -0,0 +1,50 @@ +The files in this directory show mom in action. I haven't included +PostScript output from the files because I want to keep the mom +archive as lean as possible. In order to see the PostScript output of +these files, process them with groff, sending the output either to a +separate file for previewing with gv (ghostview) or to your printer. +I don't recommend previewing with gxditview because it doesn't render +some of mom's effects properly. + +All the files are set up for 8.5ix11i paper. + +macros.mom +---------- + +This file 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 Tux), the PostScript file has been included in the directory. + +typeset.mom +----------- + +This file contains samples of three of the document styles available +with the document processing macros, as well as demonstrating the +use of COLLATE. The relatively rare BREAK_QUOTE macro is also used. +The PRINTSTYLE of this file is TYPESET, letting you get a look at mom's +default behaviour when she typesets a document. The last sample, +set in 2 columns, shows a few of the ways in which you can modify +mom's behaviour. + +typewrite.mom +------------- + +Using the first two samples from typeset.mom, this file shows what +"typewritten, double-spaced" documents (PRINTSTYLE TYPEWRITE) look +like. + +elvis_syntax +------------ + +For those who use the vi clone, elvis, you can paste this file into +your elvis.syn file. 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. + +I'll be very happy if someone sends me syntax highlighting rules vim +and emacs. :) diff --git a/contrib/mom/examples/elvis_syntax b/contrib/mom/examples/elvis_syntax new file mode 100644 index 00000000..564ca184 --- /dev/null +++ b/contrib/mom/examples/elvis_syntax @@ -0,0 +1,121 @@ +#Mom +language mom +extension .mom +startword .\ +inword _( +keyword .ALD .ALIAS .ALWAYS_FULLSPACE_QUOTES .ATTRIBUTE_STRING +keyword .AUTHOR .AUTHOR_FAMILY .AUTHOR_FONT .AUTHOR_SIZE .AUTOLEAD +keyword .BLOCKQUOTE .BLOCKQUOTE_FAMILY .BLOCKQUOTE_FONT .BLOCKQUOTE_QUAD .BLOCKQUOTE_SIZE +keyword .B_MARGIN .BR .BREAK_QUOTE +keyword .CAPS .CENTER .CENTRE .CHAPTER +keyword .CHAPTER_STRING .CITATION .CITE .CLOSING +keyword .COLLATE .COL_BREAK .COL_BREAK .COL_NEXT .COLUMNS +keyword .COMMENT .CONDENSE .COPYSTYLE +keyword .DATE .DEFAULTS +keyword .DOC_FAM .DOC_FAMILY .DOCHEADER +keyword .DOCHEADER_ADVANCE .DOCHEADER_LEAD +keyword .DOC_LEAD .DOC_LEAD_ADJUST .DOC_LEFT_MARGIN .DOC_LINE_LENGTH +keyword .DOC_LLENGTH .DOC_L_LENGTH .DOC_L_MARGIN .DOC_LMARGIN +keyword .DOC_LS .DOC_PS .DOC_PT_SIZE .DOC_QUAD +keyword .DOC_RIGHT_MARGIN .DOC_R_MARGIN .DOC_RMARGIN +keyword .DOCTYPE .DOCTYPE_FAMILY .DOCTYPE_FONT .DOCTYPE_SIZE +keyword .DRAFT .DRAFT_STRING +keyword .DROPCAP .DROPCAP_ADJUST .DROPCAP_FAMILY .DROPCAP_FONT .DROPCAP_GUTTER .DROPCAP_OFF +keyword .EL +keyword .EPIGRAPH .EPIGRAPH_AUTOLEAD .EPIGRAPH_FAMILY .EPIGRAPH_FONT +keyword .EPIGRAPH_INDENT .EPIGRAPH_QUAD .EPIGRAPH_SIZE +keyword .EW .EXTEND +keyword .FAM .FAMILY +keyword .FINIS .FINIS_STRING +keyword .FOOTER .FOOTER_CENTER .FOOTER_CENTER_CAPS .FOOTER_CENTER_FAM .FOOTER_CENTER_FAMILY +keyword .FOOTER_CENTER_FONT .FOOTER_CENTER_FT .FOOTER_CENTER_PS .FOOTER_CENTER_SIZE +keyword .FOOTER_CENTRE .FOOTER_CENTRE_CAPS .FOOTER_CENTRE_FAM .FOOTER_CENTRE_FAMILY +keyword .FOOTER_CENTRE_FT .FOOTER_CENTRE_PS .FOOTER_CENTRE_SIZE .FOOTER_FAM +keyword .FOOTER_FAMILY .FOOTER_GAP .FOOTER_LEFT .FOOTER_LEFT_CAPS .FOOTER_LEFT_FAM +keyword .FOOTER_LEFT_FAMILY .FOOTER_LEFT_FONT .FOOTER_LEFT_FT .FOOTER_LEFT_PS +keyword .FOOTER_LEFT_SIZE .FOOTER_MARGIN .FOOTER_ON_FIRST_PAGE .FOOTER_PLAIN +keyword .FOOTER_RIGHT .FOOTER_RIGHT_CAPS .FOOTER_RIGHT_FAM .FOOTER_RIGHT_FAMILY +keyword .FOOTER_RIGHT_FONT .FOOTER_RIGHT_FT .FOOTER_RIGHT_PS .FOOTER_RIGHT_SIZE +keyword .FOOTER_RULE .FOOTER_RULE_GAP .FOOTERS .FOOTER_SIZE +keyword .FOOTNOTE .FOOTNOTE_AUTOLEAD .FOOTNOTE_FAMILY .FOOTNOTE_FONT .FOOTNOTE_MARKERS +keyword .FOOTNOTE_MARKER_STYLE .FOOTNOTE_QUAD .FOOTNOTE_RULE .FOOTNOTE_RULE_ADJ +keyword .FOOTNOTE_RULE_LENGTH .FOOTNOTE_SIZE +keyword .FROM .FT +keyword .GREETING +keyword .HDRFTR_CENTER .HDRFTR_CENTER .HDRFTR_CENTER_CAPS .HDRFTR_CENTER_FAMILY +keyword .HDRFTR_CENTER_FONT .HDRFTR_CENTER_SIZE .HDRFTR_FAMILY .HDRFTR_GAP +keyword .HDRFTR_LEFT .HDRFTR_LEFT .HDRFTR_LEFT_CAPS .HDRFTR_LEFT_FAMILY +keyword .HDRFTR_LEFT_FONT .HDRFTR_LEFT_SIZE .HDRFTR_MARGIN .HDRFTR_PLAIN +keyword .HDRFTR_RIGHT .HDRFTR_RIGHT_CAPS .HDRFTR_RIGHT_FAMILY .HDRFTR_RIGHT_FONT +keyword .HDRFTR_RIGHT_SIZE .HDRFTR_RULE .HDRFTR_RULE_GAP .HDRFTR_RULE_INTERNAL +keyword .HDRFTR_RULE_INTERNAL .HDRFTR_SIZE +keyword .HEAD .HEAD_CAPS .HEADER .HEADER_CENTER .HEADER_CENTER_CAPS +keyword .HEADER_CENTER_FAM .HEADER_CENTER_FAMILY .HEADER_CENTER_FONT +keyword .HEADER_CENTER_FT .HEADER_CENTER_PS .HEADER_CENTER_SIZE .HEADER_CENTRE +keyword .HEADER_CENTRE_CAPS .HEADER_CENTRE_FAM .HEADER_CENTRE_FAMILY +keyword .HEADER_CENTRE_FONT .HEADER_CENTRE_FT .HEADER_CENTRE_PS .HEADER_CENTRE_SIZE +keyword .HEADER_FAM .HEADER_FAMILY .HEADER_GAP +keyword .HEADER_LEFT .HEADER_LEFT_CAPS .HEADER_LEFT_FAM .HEADER_LEFT_FAMILY +keyword .HEADER_LEFT_FONT .HEADER_LEFT_FT .HEADER_LEFT_PS .HEADER_LEFT_SIZE +keyword .HEADER_MARGIN .HEADER_PLAIN +keyword .HEADER_RIGHT .HEADER_RIGHT_CAPS .HEADER_RIGHT_FAM .HEADER_RIGHT_FAMILY +keyword .HEADER_RIGHT_FONT .HEADER_RIGHT_FT .HEADER_RIGHT_PS .HEADER_RIGHT_SIZE +keyword .HEADER_RULE .HEADER_RULE_GAP .HEADERS .HEADER_SIZE +keyword .HEAD_FAMILY .HEAD_FONT .HEAD_QUAD .HEAD_SIZE .HEAD_SPACE .HEAD_UNDERLINE +keyword .HI .HY .HYPHENATE .HYPHENATION .HY_SET +keyword .IB .IBX .IH .IL .ILX +keyword .IR .IRX .IT .IX +keyword .INDENT_FIRST_PARAS .ITALIC_MEANS_ITALIC +keyword .JUSTIFY +keyword .KERN +keyword .LEADER_CHARACTER .LEFT .LIG .LIGATURES .LINEBREAK .LL .LL .L_MARGIN .LS +keyword .MCO .MCR .MCX +keyword .NEWPAGE .NEW_PAGE .NUMBER_HEADS .NUMBER_PARAHEADS .NUMBER_SUBHEADS +keyword .PAD .PADMARKER .PAD_STRING .PAGE .PAGE_LENGTH .PAGELENGTH .PAGEWIDTH +keyword .PAGENUM .PAGENUM_FAMILY .PAGENUM_FONT .PAGENUM_HYPHENS +keyword .PAGENUM_ON_FIRST_PAGE .PAGENUM_POS .PAGENUM_SIZE .PAGENUM_STYLE +keyword .PAGINATE .PAGINATION .PAPER +keyword .PARAHEAD .PARAHEAD_FAMILY .PARAHEAD_FONT .PARAHEAD_INDENT .PARAHEAD_SIZE +keyword .PARA_INDENT .PARA_SPACE +keyword .PP .PP_FONT .PP_FT .PS .PSPIC +keyword .PRINTSTYLE +keyword .QUAD +keyword .QUOTE .QUOTE_FAMILY .QUOTE_FONT .QUOTE_INDENT .QUOTE_SIZE +keyword .RECTO_VERSO +keyword .RESET_FOOTNOTE_NUMBER .RESET_HEAD_NUMBER .RESET_PARAHEAD_NUMBER +keyword .RESET_SUBHEAD_NUMBER +keyword .REVISION .REVISION_STRING .RIGHT .RLD .R_MARGIN .RW +keyword .SETBOLDER .SETSLANT .SILENT .SLANT_MEANS_SLANT .SMARTQUOTES .SP .SPACE +keyword .SPREAD .SS .ST .START .STRING .SUBHEAD .SUBHEAD_FAMILY .SUBHEAD_FONT .SUBHEAD_SIZE +keyword .SUBTITLE .SUBTITLE_FAMILY .SUBTITLE_FONT .SUBTITLE_SIZE +keyword .SWITCH_FOOTERS .SWITCH_HDRFTR .SWITCH_HEADERS +keyword .TAB_SET .TAB .TABSET .TB .TI +keyword .TITLE .TITLE_FAMILY .TITLE_FONT .TITLE_SIZE .T_MARGIN +keyword .TN .TO .TQ .TRAP .TS .TYPESIZE +keyword .UNDERLINE .UNDERLINE_ITALIC .UNDERLINE_QUOTES .UNDERLINE_SLANT +keyword .UNDERSCORE .UNDERSCORE_2 .UNDERSCORE2 +keyword .WS +font fixed DEFAULT CHAPTER NAMED LETTER +font fixed TYPESET TYPEWRITE +font fixed FINAL DRAFT +font fixed BLOCK QUAD +font fixed LEFT RIGHT CENTER CENTRE JUSTIFY TOP BOTTOM +font fixed OFF QUIT END EXIT DONE +font fixed PAGE NUMBER STAR +font fixed BI +font fixed COND EXT +font fixed LETTER LEGAL EXECUTIVE LEDGER TABLOID QUARTO FOLIO +font fixed 10x14 A3 A4 A5 B4 B5 +font fixed SINGLESPACE +font fixed FACTOR +font underlined \/ \/. \/? \/! \/, \/; \/: +font underlined \, \,. \,? \,! \,, \,; \,: +font underlined \\ \~ \% \0 \: \( \| \^ \& \% +font underlined \b \c \C \d \D \e \f \f( \h \l \L \p \r \s \s+ \s- \S \u \v \w +font fixed \(bu \(co \(ct \(de \(dg \(di \(em \(en \(mu \(pl \(rg \(sc \(sq +font fixed \(14 \(12 \(34 \(+- +font fixed # ' +character \] +comment \# +comment \" +comment \! diff --git a/contrib/mom/examples/macros.mom b/contrib/mom/examples/macros.mom new file mode 100644 index 00000000..5e78f3e9 --- /dev/null +++ b/contrib/mom/examples/macros.mom @@ -0,0 +1,665 @@ +\# Basic page setup +\# +.PAGE 8.5i 11i \" Printer sheet size +.L_MARGIN 1i \" Left margin 1 inch +.R_MARGIN 1i \" Right margin 1 inch (calculates the line length) +\# +\# Refinements +\# +.KERN \" Automatic pairwise kerning +.SS 0 \" No extra space between sentences +.HY \" Hyphenate +.LIGATURES \" Automatic ligature generation +.SMARTQUOTES \" Enable smartquotes +\# +\# Basic type parameters +\# +.FAM T \" Times Roman family +.FT B \" Bold font +.PS 12 \" Point size +.LS 14 \" Leading (line spacing) +.LEFT \" Set lines flush left, nofill mode +\# +\# +.ALD |1i-1v \" Advance 1 inch from top of paper to first baseline +Example 1\*[BU2]: +.ALD .25v \" Advance an extra 1/4 linespace +.UNDERSCORE 3.75p "T\*[BU4]asting notes using padding, string tabs \ +and multi-columns" +.SP \" Add an extra line space +\# +\# +.FAM H \" Helvetica family +.PS 10 +.LS 11 \" New leading +\# +\# The following uses a combination of padding, string tabs, and the FP escape +\# to set up five tabs with 12-point (1-pica) gutters over the full line length. +\# +.SILENT \" Don't print the next line +.PAD "\*[ST1]VIN#\*[ST1X]\*[FP12]\*[ST2]ROBE#\*[ST2X]\*[FP12]\*[ST3]NEZ#\*[ST3X]\*[FP12]\*[ST4]BOUCHE#\*[ST4X]\*[FP12]\*[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 mode (no need for .BR's between input lines) +.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 +indiens ou \%chinois. +.RW 0 +.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*\*[BU12]. +\# +\# The \*[BU12], above, pulls the period back so that it falls +\# underneath the asterisk. \*[BP<#>] 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 +.PS -.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 to it. +\# +.HI \w'*'+2p +*\*[FP1]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 \" Kern the whole 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. :) +\# +\# +\# +.IX 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 +.PS 12 +.LS 14 +Example 2: +.ALD .25v +\# +.COMMENT \" COMMENT lets you enter comments without using \# or \" +In the next line, because the string to be underscored must be +enclosed by 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 \" Remember to turn COMMENT off! +\# +.UNDERSCORE 3.75p "\(lqMassaging\(rq \*[BP1]a passage of rag right text" +.SP \" Add an extra linespace +\# +\# +.PS 12.5 +.LS 14 +.PS -1 \" Reduce point size by 1 point +Passage using groff defaults +.ALD .5v \" Add an extra 1/2 line space +.PS +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\(embut 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 \*S[...] inline escape. +\# +.RIGHT +\*S[-.5]\(emEdgar Allen Poe, \*[IT]The Cask of Amontillado\*[PREV]\*S[+.5] +.SP \" Extra linespace +.IBX \" 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 decided "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 +.PS -1 +.LEFT +The same passage, \*[BU4]"massaged" +.ALD .5v +.FT R +.PS +1 +.QUAD LEFT +.HY OFF \" Turn automatic hyphenation off +.BR_AT_LINE_KERN \" Automatically insert a line break (.BR) with each invocation of .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\(embut 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 \*[BP1]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 \*[BU2]who has done +the wrong. +.RW 0 +.WS +0 \" Restore normal wordspacing +.ALD 6p +.PS -.5 +.RIGHT +\*[RLD1.5]\(em\*[ALD1.5]\*[BP3]Edgar \*[BP1]Allen Poe, \*[IT]The Cask of Amontillado\*[PREV] +.IX 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 +.PS 12 +.LS 14 +.LEFT +Example 3: +.ALD .25v +.UNDERSCORE 3.75p "A \*[BU2]recipe for enumerated lists using indents" +.SP \" Add an extra line space +.FAM N \" New Century Schoolbook family +.FT R +.PS 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. +\# +\# +.JUSTIFY \" Justify text +.IL \w'\0.\0' \" Establish a left indent equal to the width of 2 figure spaces plus a period. +.HI \w'\0.\0' \" Establish a hanging indent equal to the size of 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 been 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 ). \*[FP3] puts three points of space after +the bullet so that the bullet and the text are visually separated. +.COMMENT OFF +\# +\# +.IL 1P+\w'\(bu\*[FP3]' +\# +\# 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\*[FP3]' +\*[ALD1]\(bu\*[RLD1]\*[FP3]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 +\*[ALD1]\(bu\*[RLD1]\*[FP3]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\*[FP3]', 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\*[FP3]') +.HI \w'\0.\0' \" Reset hanging indent for use with numbered items. +.ALD 6p +3.\0...and here we are. +.HI \" Again, notice that once HI has been set, you don't have to keep passing it an argument. +.ALD 6p +4.\0In order not to make the example too long, we'll stop here. +.IX CLEAR \" Dont' forget to cancel and/or clear indents! +\# +\# +.FAM T +.FT B +.PS 12 +.LS 14 +.LEFT +.SP +\# +\# +Example 4: +.ALD .25v +.UNDERSCORE 3.75p "A \*[BU2]recipe for nested lists using string tabs" +.SP +.FAM N +.FT R +.PS 11 +.LS 13 +.JUSTIFY +Although setting up string tabs is a bit more complex than setting +up indents, it's \*[BU3]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 +.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 +\# +\# +.TB 1 +1. +.TN \" Use .TN here so text stays on the same baseline as the number in tab 1 +This is the first item in the list. N\*[BU2]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. +.TN +This is the second item in the list. N\*[BU2]otice that when setting "lists" +with tabs, there's no need to use the \*[BU8]\\0 escape sequence after +the number/period combination in the input text. +.ALD 6p +\# +.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 foward +another three points, then make the next string tab (ST4) the +length of remainder of the line. +.COMMENT OFF +\# +.SILENT +.PAD "\*[FP12]\*[ST3]\(bu\*[ST3X]\*[FP3]\*[ST4]#\*[ST4X]" +.ST 3 L +.ST 4 J +.SILENT OFF +.ALD 6p +.TB 3 +\*[ALD1]\(bu\*[RLD1] +.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 +\*[ALD1]\(bu\*[RLD1] +.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 a fill mode right now, so you *must* terminate the line with BR +\# +\# +.SILENT +.PAD "\*[FP12]\*[ST5]\(en\*[ST5X]\*[FP4]\*[ST6]#\*[ST6X]" +.ST 5 L +.ST 6 J +.SILENT OFF +.ALD 6p +.TB 5 +\*[RLD.75]\(en\*[ALD.75] +.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 +\*[RLD.75]\(en\*[ALD.75] +.TN +At \*[BU3]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. +.TN +And here we are, back at the top-level numbered list with a minimum +of muss and fuss, +.ALD 6p +.TB 1 +4. +.TN +Generally speaking, once you get the hang of string tabs and the +\*[BD]PAD\*[PREV] macro, you'll find setting up complex nested lists +(or anything similar to them) easier than with hanging indents. +.TQ +\# +.NEWPAGE +.FAM T +.FT B +.PS 12 +.LS 14 +.LEFT +Example 5: +.ALD .25v +.UNDERSCORE 3.75p "Word spacing" +.ALD 8p +.FAM P \" Palatino family +.PS 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[...]. +\# +\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 \*[RLD1]\*[BP3]+\*[ALD1]\*[BP2]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 +0 +.ALD 4p +\f[HB]\*S[-1]Word spacing adjusted by \*[RLD1]\*[BP3]+\*[ALD1]\*[BP2]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 +0 +.ALD 4p +\f[HB]\*S[-1]Word spacing adjusted by \*[RLD1]\*[BP3]+\*[ALD1]\*[BP2]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 +0 +.SP 1.5v +\# +\# +.FAM T +.FT B +.PS 12 +.LS 14 +.LEFT +Example 6: +.ALD .25v +.UNDERSCORE 3.75p "Line kerning" +.ALD 8p +.FAM P \" Palatino family +.FT R +.PS 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 +\# +\# +.FAM T +.FT B +.PS 12 +.LS 14 +.LEFT +Example 7: +.ALD .25v +.UNDERSCORE 3.75p "Cutaround using left\*[FU2]/right indents, multi columns \ +and a dropcap" +.SP +\# +\# +.FT R +.PS 11 +.LS 12 +.BR_AT_LINE_KERN OFF \" In justified text, it's best to have this OFF +\# +\# +.TS 1 0 18.5P J \" TS is an alias for TAB_SET +.TS 2 20.5P 18.5P J +.MCO +.ALD 5P+9p +.PSPIC penguin.ps +.MCR +.TAB 1 +.DROPCAP_FONT B +.DROPCAP L 3 COND 80 +.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 aliquyam 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 +.IRX +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. +.ILX +.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. diff --git a/contrib/mom/examples/typeset.mom b/contrib/mom/examples/typeset.mom new file mode 100644 index 00000000..dbb2c405 --- /dev/null +++ b/contrib/mom/examples/typeset.mom @@ -0,0 +1,534 @@ +\# This file contains three greeked documents collated together: +\# two pages of a novelist's outline, two pages of a chapter in DRAFT +\# style, and three pages of an academic paper set in two columns. +\# Mom's defaults are used throughout, except for the last one, which +\# shows off some of the ways of changing mom's behaviour. +\# +\# Since the text is greeked, and groff doesn't know how to +\# hyphenate all that pseudo-latinate nonsense, I've inserted +\# discretionary hyphens into a number of the the words. +\# +\# =================================================================== +\# +\# First, a sample "named" document, in this case, an outline. +\# A novelist wouldn't normally write an outline with numbered heads, +\# subheads and paraheads. I've turned the feature on merely to +\# demonstrate it. +\# +\# Reference macros +\# +.TITLE "Lake Attica's Shores" +.SUBTITLE "A Romance Novel" +.AUTHOR "Rosemary Winspeare" +.DRAFT 1 \" Ignored because COPYSTYLE is FINAL +.REVISION 2 \" Ignored because COPYSTYLE is FINAL +\# +\# Docstyle macros +\# +.DOCTYPE NAMED "Outline" +.PRINTSTYLE TYPESET +\# +\# Additional style macros +\# +.NUMBER_PARAHEADS +\# +.START +.PP +.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 +.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. +.NUMBER_HEADS +.NUMBER_SUBHEADS +.HEAD "Part One" +.SUBHEAD "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. +.SUBHEAD "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. +.SUBHEAD "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. +.HEAD "Part Two" +.SUBHEAD "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. +.SUBHEAD "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 +.SPREAD +\# +\# This next bit ensures that the line "...end of sample outline" doesn't +\# spring the page trap, which would deposit a header at the top of the +\# next page. COLLATE doesn't print a page header on the first page of +\# a collated document, but if the page trap has already deposited one +\# there, COLLATE can't undo it. Hence, we turn the trap off +\# (TRAP OFF), set the line, and put in an EL afterwards. +\# Normally, all this isn't necessary when collating documents, +\# but if you ever have the problem of a page header printing at the +\# top of a collated document, this is how you get around it. +\# +.TRAP OFF +.RIGHT +\*[BD]\&...end of sample outline +.EL +.TRAP +.COLLATE +\# +\# ===================================================================== +\# +\# Next, two sample 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. +\# +\# Reference macros +\# +.TITLE "Lake Attica's Shores" +.SUBTITLE "A Romance Novel" +.AUTHOR "Rosemary Winspeare" +.CHAPTER 1 +.DRAFT 1 \" Appears in the header because copystyle is DRAFT +.REVISION 2 \" Appears in the header because copystyle is DRAFT +\# +\# Docstyle macros +\# +.DOCTYPE CHAPTER +.COPYSTYLE DRAFT +\# +\# Additional style macros +\# +.EPIGRAPH_FONT I \" Epigraphs are set in roman by default +\# +.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 +\*[ROM]\(emJoseph 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 +.COLLATE +\# +\# ===================================================================== +\# +\# Finally, a sample academic article, set in two columns with a +\# 1.5-pica gutter between them. This example also uses +\# BLOCKQUOTES, FOOTNOTES, and the relatively rare BREAK_QUOTE. 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). +\# +\# In order to accomodate the narrow measure of the columns, there's also +\# a demonstration of things you can change with both the typesetting +\# macros and the document processing "control" macros. +\# +\# Reference macros +\# +.TITLE "CONTROL EQUALS CHAOS" +.SUBTITLE "\*[ALD1]The Psychological and Auditory Impact of Serial vs. Aleatoric Music\*[RLD1]" +.AUTHOR "Joe Chang" "and" "Brad Hegel Connors" +\# +\# Docstyle macros +\# +.DOCTYPE DEFAULT +.COPYSTYLE FINAL +\# +\# Additional style macros -- general type parameters +\# +.L_MARGIN 6P +.R_MARGIN 4P+6p +.PS 10 +.AUTOLEAD 1.5 +\# +\# Additional style macros -- change mom's default behaviour +\# +.RECTO_VERSO +.PAGENUM 1 +.HEADER_LEFT "Chang, Connors" \" Because we have two authors +.COLUMNS 2 1P+6p +.SUBTITLE_SIZE +1.5 +.AUTHOR_SIZE +.5 +.DOCHEADER_LEAD +2p +.HEADER_SIZE +1 +.PARA_INDENT 1P +.SUBHEAD_SIZE +0 +.BLOCKQUOTE_FAMILY H +.BLOCKQUOTE_SIZE -2 +.QUOTE_INDENT 2 +.NUMBER_HEADS OFF \" Because we turned them on in the first example +.NUMBER_SUBHEADS OFF \" Ibid +\# +.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. +Lorem 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 +Sed 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. +\# +.SUBHEAD "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. +.PP +No sea takimata\c +.FOOTNOTE +Consetetur 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. +\# +.SUBHEAD "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 ea rebum stet. +.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 +duo do\%lo\%res et ea rebum amet. Consetetur sadipsc- +.BREAK_QUOTE \" Needed because blockquote crosses page AND contain footnotes +ing 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.\c +.FOOTNOTE +Labore et do\%lo\%re magna ali\%quyam erat sed diam voluptua. +.FOOTNOTE OFF +.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. +\# +.SUBHEAD "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 +Diam 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 +Sanctus est lorem ipsum. Dolor sit amet consete- +.BREAK_QUOTE \" Needed because blockquote crosses column AND contain footnotes +tur 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. +.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 +At 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. +\# +.SUBHEAD "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 +sit amet. Sadipscing\c +.FOOTNOTE +Sed 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. +.RIGHT +\*[BD]\&...end of sample article\*[PREV] +.FINIS diff --git a/contrib/mom/examples/typewrite.mom b/contrib/mom/examples/typewrite.mom new file mode 100644 index 00000000..b293840d --- /dev/null +++ b/contrib/mom/examples/typewrite.mom @@ -0,0 +1,233 @@ +\# A sample of PRINTSTYLE TYPEWRITE. The file contains the sample +\# outline and sample draft chapter found in the docprocessing_tyeset.mom +\# file. Only two changes have been made: the printstyle (here, +\# TYPEWRITE instead of the default TYPESET), and the header size +\# in the sample chapter, reduced by 1 point in order to accomodate +\# all three parts of the header. Other than that, the samples have +\# been left alone so you can assess and get a feel for how PRINTSTYLE +\# TYPEWRITE behaves. +\# +\# ==================================================================== +\# +\# Sample outline using PRINTSTYLE TYPEWRITE +\# +\# Reference macros +\# +.TITLE "Lake Attica's Shores" +.SUBTITLE "A Romance Novel" +.AUTHOR "Rosemary Winspeare" +.DRAFT 1 \" Ignored because COPYSTYLE is FINAL (the default) +.REVISION 2 \" Ignored because COPYSTYLE is FINAL (the default) +\# +\# Docstyle macros +\# +.DOCTYPE NAMED "Outline" +.PRINTSTYLE TYPEWRITE +\# +\# Additional style macros +\# +.NUMBER_PARAHEADS +\# +.START +.PP +.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 +.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. +.NUMBER_HEADS +.NUMBER_SUBHEADS +.HEAD "Part One" +.SUBHEAD "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. +.SUBHEAD "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. +.SUBHEAD "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. +.HEAD "Part Two" +.SUBHEAD "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. +.SUBHEAD "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 +.BR +.RIGHT +\*[BD]\&...end of sample outline \" Notice that TYPEWRITE ignores the \*[BD] +.COLLATE +\# +\# ===================================================================== +\# +\# Sample chapter in COPYSTYLE DRAFT using PRINTSTYLE TYPEWRITE +\# +\# Reference macros +\# +.TITLE "Lake Attica's Shores" +.SUBTITLE "A Romance Novel" +.AUTHOR "Rosemary Winspeare" +.CHAPTER 1 +.DRAFT 1 \" Appears in the header because copystyle is DRAFT +.REVISION 2 \" Appears in the header because copystyle is DRAFT +\# +\# Docstyle macros +\# +.DOCTYPE CHAPTER +.COPYSTYLE DRAFT +\# +\# Additional style macros +\# +.EPIGRAPH_FONT I \" TYPEWRITE underlines italics +.HEADER_SIZE -1 +\# +.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 +\*[ROM]\(emJoseph 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 \" Notice that TYPEWRITE ignores the \*[BD] diff --git a/contrib/mom/groff_mom.man b/contrib/mom/groff_mom.man new file mode 100644 index 00000000..bccfb862 --- /dev/null +++ b/contrib/mom/groff_mom.man @@ -0,0 +1,91 @@ +.ig +This file is part of groff, the GNU roff type-setting system. + +Copyright (C) 2002 Free Software Foundation, Inc. +written by Werner Lemberg + +Permission is granted to copy, distribute and/or modify this document +under the terms of the GNU Free Documentation License, Version 1.1 or +any later version published by the Free Software Foundation; with the +Invariant Sections being this .ig-section and AUTHORS, 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. +.. +. +.mso www.tmac +. +.de TQ +.br +.ns +.TP \\$1 +.. +. +.TH GROFF_MOM @MAN7EXT@ "@MDATE@" "Groff Version @VERSION@" +. +. +.SH NAME +. +groff_mom \- groff `mom' macros +. +. +.SH SYNOPSIS +. +.B groff +.B \-mom +[ +.IR files .\|.\|.\& +] +.br +.B groff +.B \-m\ mom +[ +.IR files .\|.\|.\& +] +. +. +.SH DESCRIPTION +. +.B mom +(\[lq]my own macros\[rq], \[lq]my other macros\[rq], \[lq]maximum +overdriver macros\[rq], .\|.\|.\&) is a macro set for groff, designed to +format documents for PostScript output. +. +. +.SH FILES +.TP +.B mom.tmac +.TQ +.B om.tmac +All macros are in the file +.BR om.tmac ; +.B mom.tmac +is a wrapper file which calls +.B om.tmac +directly. +. +.TP +.URL @HTMLDOCDIR@/momdoc/toc.html @HTMLDOCDIR@/momdoc/toc.html +This is the entry point to the HTML documentation of +.BR mom . +. +.TP +.B @EXAMPLEDIR@/*.mom +Example files using +.BR mom . +. +. +.SH AUTHOR +. +.B mom +has been written by +.MTO df191@ncf.ca "Peter Schaffter" ; +please send bug reports +to the +.MTO bug-groff@gnu.org "groff bug mailing list" +or directly to the author. +. +.\" Local Variables: +.\" mode: nroff +.\" End: diff --git a/contrib/mom/mom.tmac b/contrib/mom/mom.tmac new file mode 100644 index 00000000..b1b0b186 --- /dev/null +++ b/contrib/mom/mom.tmac @@ -0,0 +1,3 @@ +.\" 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 00000000..932995b2 --- /dev/null +++ b/contrib/mom/momdoc/appendices.html @@ -0,0 +1,185 @@ + + + +Mom -- Appendices + + + + + +Prev   +Back to Table of Contents + + + +

APPENDICES

+
+ + + + +

Further notes on this documentation

+
+ +Some mom users are sure to ask: "Why is this +documentation in html? If mom's so great, why not +typeset the whole thing to show her off? And if groff's so great, +why not write a man page?" +

+Valid questions, to be sure, and mom has +answers. (Okay -- I have answers, but I speak for +mom.) +

+The documentation is in html because I still find it the best tool +for navigating lengthy manuals. Html, with its anchors and links, +came into being precisely so people could do something they'd never +been able to with the printed word: instantly track down internal +and external references in a document. +

+To me, it's essential that people reading mom's +documentation never have difficulty finding precisely the macro +they need for a particular task. Equally, when reading up on +a macro, they should never be presented with terms or other +macro names for which they cannot instantly find accurate explanations. +Short of having written the documentation in TeX for the info browser +(and TeX bloat is one of the reasons I prefer to typeset with groff), +I can think of no better way to achieve the kind of truly useful +documentation I wanted than html. +

+Another reason for html is that working with mom +necessarily involves creating files inside a text editor. I use +elvis, a truly fabulous vi clone that does a terrific job of rendering +basic (text only) html. I may have written mom, +but I still regularly call on her documentation. Elvis, with its +html capabilities, lets me write and format mom +documents AND peruse her documentation, clicking on links as +necessary, without ever leaveing the comfy confines of my +text editor. +

+Not everyone, of course, uses an editor with html capabilities. +For them, firing up a browser is obviously necessary for reading +mom's documentation. Browsers being what they are, +and not everyone on the globe having the cash for muscle machines +to run Galeon, or Konqueror, or Mozilla, or Netscape, their browser +needs to be one that's fast and light -- Lynx, in other words. +

+Some mom users may notice the absence of graphics, +frames, and (for the most part) tables in this documentation. +The reason is simple: Lynx. People who, for whatever reason (choice +or necessity), use Lynx to read the documentation must be able to make +sense of it. All of it. Graphical examples of mom +in action might have made some parts of the documenation easier to +write, but would have excluded Lynx-only users. And it goes +without saying that the documentation looks fine if you're +reading it in a graphical browser. +
+


+ + + + +

Some reflections on mom

+
+ +

+Mom, as a complete macro set, had her origins +in a "library" of groff routines I wrote over the +years to handle various aspects of typesetting and document +processing that weren't adequately covered by ms, me, mm, and so +on. Typically, I'd use the library to cobble together macro +sets for new challenges as they came my way. +

+If, as Eric Raymond asserts, open source begins with a programmer +scratching a personal itch, then mom can truly be +called open source, even if, a mere humble set of macros standing on +the shoulders of a giant named troff, she isn't programming at all. +

+As a writer living in a perpeptual state of penury, all the computers +I've ever owned have been hand-me-downs -- several generations +out-of-date and "resource challenged". Disk space has +always been an issue, as has processor speed and available RAM. +One of the reasons I run Linux is that it has helped enormously to +get the most out of my poor little boxes. +

+In Linux-land, the choice of typesetting systems basically comes down +to groff or TeX. Both are wonderful -- monumental achievements if you +ask me -- and both have their own particular strengths. However, for +people in my financial position (and there are millions of us around +the globe, in both developed and developing countries), TeX and groff +have one big difference: size. TeX is huge. Even its most ardent +supporters agree it suffers from bloat, on top of being complex and +unwieldy to manage. Groff is tiny by comparison, occupying minimal +disk space and having only a small memory footprint while at the same +time being flexible and powerful, typographically speaking. I've run +it successfully on a 386 with 8 megs of RAM and a 250 meg hard disk. +

+However, groff has always had a liability: it's incredibly geeky. +Owing to its very long history, it -- and its "power users" +-- have remained stuck in a time warp. Most common macro packages +still look as they did in those decades when memory was exorbitantly +expensive, and every byte mattered. Documentation -- not always +easy to find -- is written as if all readers are computer whizzes, +or at least have a university degree in one of the higher sciences. +

+By no means a stupid man, nor unfamiliar with the precepts of +programming, I've more than once torn my hair out over the terseness +ambiguity of groff's documentation. Making sense of certain primitives +has often involved days of testing, interpreting the documentation +instead of just using the primitive. +

+For some time now, groff users and macro writers have had the +option to use "long" names, yet have mostly chosen not to. +With long names, it's possible to create macro sets that are humanly +readable and easy to interpret, encouraging development and evolution. +What's more, the macros themselves need not be terse, intimidating, +and easily forgotten 1- or 2-letter commands inserted in the body +of a document. They can be sensible and helpful to everyone, groff +newbies and old hands alike. +

+Mom's macro file, om.tmac, uses long names, aliases, +and a host of other groff goodies that have become part of the +whole groff picture under the unflagging guidance of groff's current +maintainer, Werner Lemberg. Nearly every macro, number register and +string is "recognisable" simply by its name. The file is +heavily commented. A consistent, if idiosyncratic, indenting style +is used as well, significantly improving readability. Anyone +wanting to futz around with mom's macros should be +able to do so with a minimum of head scratching. +

+To all you groff-jocks out there who love the aracana of +groff-as-it-used-to-be, I apologise. To everyone else, I simply say: +Welcome, and enjoy. +
+


+ + + + +

Contact the author

+
+ +

+If you have any questions or comments about mom, +suggestions to make, criticisms to offer, or bugs to report, use the +groff mailing list at +groff@ffii.org +(subscription information available +here) +or contact me, Peter Schaffter, directly at +

+

+ df191@ncf.ca +
+ +

+


+Prev   +Top   +Back to Table of Contents + + diff --git a/contrib/mom/momdoc/cover.html b/contrib/mom/momdoc/cover.html new file mode 100644 index 00000000..11b6a854 --- /dev/null +++ b/contrib/mom/momdoc/cover.html @@ -0,0 +1,49 @@ + + + +Mom -- Document processing, creating a cover page + + + + + +Next   +Prev   +Back to Table of Contents + + + +

CREATING A COVER PAGE

+
+ +

+At present, mom provides no mechanism for +automatically generating cover pages. It's a situation not likely +to change, given that what's needed on document covers changes from +document to document, both in terms of style and content. And, +more often than not, what goes on covers is matter of personal taste. +

+If you want a document to begin with a cover page, typeset the cover +(using the +typesetting macros). +At the end, invoke +NEWPAGE, +then set up your document in full (see +Tutorial -- Setting up a mom document), +invoking +START +as usual once you're done. The cover page (and any typesetting +commands on it) will have no effect on mom's +processing of the document itself, the first page of which, moreover, +will be numbered "1" unless you instruct her otherwise +with +PAGENUMBER. + +

+


+Next   +Prev   +Top   +Back to Table of Contents + + diff --git a/contrib/mom/momdoc/definitions.html b/contrib/mom/momdoc/definitions.html new file mode 100644 index 00000000..1272f6cd --- /dev/null +++ b/contrib/mom/momdoc/definitions.html @@ -0,0 +1,652 @@ + + + +Mom -- Definitions and Terms + + + + + +Next   +Prev   +Back to Table of Contents + + + +

DEFINITIONS OF TERMS USED IN THIS MANUAL

+
+ +Typesetting Terms +
+Groff Terms +
+Mom Document Processing Terms +

+I use a number of typesetting-specific and groff-specific terms +throughout this documentation, as well as a few terms that apply +to mom herself. To make life easier, I'll explain +them here. Refer back to this section should you encounter a word +or concept you're not familiar with. Words in these definitions that +are defined elsewhere in this section are marked with asterisks. +
+


+ + +

Typesetting terms

+
+ + +
+ +
Ascender +
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. + +
Baseline +
The imaginary line on which the bottoms of capital letters and the +bowls of lower case letters rest. + +
Ballot box +
An unfilled square, usually *cap-height in size, +typically placed beside items in a checklist. + +
Bullet +
A small, filled circle typically found beside items or points in +a list. + +
Cap-height +
The height of the tallest capital letter in a given +*font at the current *point +size. + +
Descender +
The portion of a letter that extends beneath the +*baseline (j, q, y are letters with descenders). + +
Discretionary hyphen +
A symbol inserted between two syllables of a word that indicates to a +typesetting program the legal hyphenation points in the word. Normally, +if hyphenation is turned on, groff knows where to hyphenate words. +However, hyphenation being what it is (in English, at any rate), +groff doesn't always get it right. Discretionary hyphens make sure +it does. In the event that the word doesn't need to be hyphenated +at all, groff leaves them alone. In groff, the discretionary hyphen is +entered with +

+

+	\%
+
+ +(backslash followed by a percent). + +
Drop cap +
A large, usually upper-case letter that introduces the first +paragraph of a document or section thereof. The top of the drop +cap usually lines up with the top of the first line of the +paragraph, and typically "drops" several lines lower. +Text adjacent to the drop cap is indented to the right of the +letter until the bottom of the drop cap is reached, at which +point text reverts to the left margin. + +
Em/en +
A relative measurement equal to the width of the letter M at a +given *point size in a given *font. +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). + +
Family +
The collective name by which a collection of +*fonts are known, e.g. Helvetica, Times Roman, +Garamond. + +
Figure space/Digit space +
A *fixed width space 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 +

+

+	\0
+
+ +(backslash followed by a zero). + +
Fixed width space +
Equal to *word space, but does not expand or +contract when text is *justified. In groff, fixed +width space is entered with +

+

+	\<space>
+
+ +where <space> means "hit the spacebar on your keyboard." + +
Font +
The specific style of type within a *family, +e.g. roman, italic. Groff understands four fonts within any given +family: roman, italic, bold, and bold italic. + +
Force justify + +
Sometimes, in *justified text, a line needs to be +broken short of the right margin. Force justifying means telling a +typesetting program (like groff) that you want the line broken early +AND that you want the line's word spacing stretched to force the line +flush with the right margin. + +
Gutter +
The vertical whitespace separating columns of type. + +
Justify/justification +
Lines of type are justified when they're flush at both the left and +right margins. Justification is the act of making both margins flush. +Some people use the terms "left justified" and "right justified" +to mean type where only the left (or right) margins align. I don't. +See *quad. + +
Kerning +
Moving pairs of letters closer together to remove excess +whitespace between them. In the days before phototypesetting, +type was set from small, rectangular blocks of wood or metal, each +block having exactly one letter. Because the edge of each block +determined the edge of each letter, certain letter combinations (TA, +for example) didn't fit together well and had to be morticed by hand +to bring them visually closer. Modern typesetting systems usually +take care of kerning automatically, but they're far from perfect. +Professional typesetters still devote a lot of time to fitting letters +and punctuation together properly. + +
Kern Units +
A relative distance equal to 1/36 of the current +*point size. Used between individual letters +for *kerning. Different typesetting systems use +different values (1/54 is popular), and sometimes call kern units by +a different name. +

+Experts: +
A kern unit has nothing to do with groff +machine units. + +

Lead/leading +
The distance from the *baseline of one line of +type to the line of type immediately beneath it. Pronounced "ledding." +Also called line spacing. Usually measured in *points. +

+In case you're interested... In previous centuries, +lines of type were separated by thin strips of -- you guessed it +-- lead. Lines of type that had no lead between them were said to +be "set solid." Once you began separating them with strips +of lead, they were said to be "leaded", and the spacing was +expressed in terms of the number of *points of lead. +For this reason, "leading" and "line spacing" +aren't, historically speaking, synonymous. If type was set 10 on 12, +for example, the leading was 2 points, not 12. Nowadays, however, +the two terms are used interchangeably to mean the distance from +baseline to baseline. + +

Leaders +
Single characters used to fill lines, usually to their end. +So called because they "lead" the eye from one element +of the page to another. For example, in the following (brief) +Table of Contents, the periods (dots) are leaders. +

+

+	Foreword............... 2
+	Chapter 1.............. 5
+	Chapter 2.............. 38
+	Chapter 3.............. 60
+
+ +
Ligature +
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. + +
Picas/Points +
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. + +
Point Size +
The nominal size of type, measured in *points, +from the bottom of the longest *descender to the top +of the highest *ascender. In reality, type is always +fractionally smaller than its point size. + +
Quad +
When only one margin of type is flush, lines of type are quadded in +the direction of the flush margin. Therefore, quad left means the +left margin is flush, the right isn't. Quad right means the right +margin is flush, the left isn't. Quad center means neither the left +nor the right margin is flush; rather, lines of type are quadded on +both sides so that type appears centered on the page. + +
Rag +
Describes a margin that isn't flush. Rag right means the right +margin isn't flush. Rag left means the left margin isn't flush. +The expression "flush left/rag right" is sometimes used to describe +type that is *quadded left. + +
Solid/set solid +
When no *lead is added between lines of type +(i.e. the *point size and linespacing are the +same), the lines are said to be "set solid." + +
Track kerning/Line kerning +
Sometimes, it's advantageous to increase or decrease the amount of +space between every letter in a line by an equal (usually small) +amount, in order to fit more (or fewer) characters on the line. +The correct term is letter spacing, but track kerning and line kerning +(and sometimes, just "kerning") have come to mean the same thing. + +
Unbreakable space +
Equal to *word space, 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 +should never be broken. In groff, unbreakable space is entered with +

+

+	\~
+
+ +(backslash followed by a tilde). + +
Word space +
The amount of whitespace between words. When text is +*justified, word space expands or contracts to make +the margins flush. + +
x-height +
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. +
+
+ + +

Groff terms

+
+ + +
+ +
Alias +
A *macro invoked by a name different from its +"official" name. For example, the official name of the +macro to change *family is FAMILY. +Its alias is FAM. Aliases may be created for any +macro (via the +ALIAS +macro) provided the alias uses a name not already taken +by the mom macros or one of the groff +*primitives. For a complete list of alias names +you must not use, see the +list of reserved words. + +
Arguments +
Parameters or information needed by a *macro +to do its job. For example, in the macro +

+

+	.PS 12
+
+ +"12" is the argument. In the macro +

+

+	.QUAD LEFT
+
+ +LEFT is the argument. Arguments are separated from macros by spaces. +Some macros require several arguments; each is separated by a space. + +
Comment Lines +
*Input lines introduced with the comment character +

+

+	\#
+
+ +When processing output, groff silently ignores everything on the +line after the comment character. + +
Control Lines +
Instructions to groff that appear on a line by themselves, +which means that "control lines" are either +*macros or *groff primitives. +Control lines always begin with a period. + +
Filled lines/fill mode +
Automatic *justification or +*quadding. In fill mode, the ends of lines as they +appear in your text editor are ignored. Instead, words from adjoining +*input lines are added one at a time to the output +line until no more words fit. Then, depending whether text is to +be *justified or *quadded (left, +right, or center), 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). +

+ +Nofill mode (non-filled text) means that groff respects the ends +of lines as they appear in your text editor. + +

Inline escapes +
Instructions issued to groff that appear as part of an +*input line (as opposed to *macros, +which must appear on a line by themselves). Inline escapes are always +introduced by the backslash character. For example, +

+

+	A line of text with the word T\*[BU2]oronto in it
+
+ +contains the inline escape \*[BU2] (which means "move the letter o 2 +*kern units closer to the letter T"). +

+mom's inline escapes always take the form +\*[ESCAPE], where +ESCAPE is composed of capital letters, sometimes with digits. +groff escapes begin with the backslash +character but typically have no star and are in lower case. For +example, the mom escape to move forward 6 +points on a line is +

+

+	\*[FP6]
+
+ +while the groff escape for the same thing is +

+

+	\h'6p'
+
+ +
Input line +
A line of text as it appears in your text editor. + +
Macros +
Instructions embedded in a document that determine how groff processes +the text for output. mom's macros always begin with a +period, on a line by themselves, and must be typed in capital letters. +Typically, macros contain complex commands issued to groff -- behind +the scenes -- via groff *primitives. + +
Machine units +
A machine unit is 1/1000 of a *point when the +groff device is ps. ("ps" means "PostScript" -- +the default device for which groff prepares output, and the device for +which mom was specifically designed.) + +
Numeric argument +
An *argument 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 *unit of measure, +a unit of measure must be appended to every digit in the +argument. For example: +

+

+	.ALD 1i-1v
+
+ +NOTE: groff does not respect the order of operations, +but rather evaluates arithmetic expressions from left to right. +Parentheses must be used to circumvent this peculiarity. Not to +worry, though. The likelihood of more than just the occasional plus +or minus sign when using mom's macros is slim. + +
Output line +
A line of text as it appears in output copy. + +
Primitives +
The two-letter, lower case instructions groff uses as its +native command language, and out of which macros are built. + +
String Argument +
Technically, any *argument that is not numeric. +In this documentation, string argument means an argument that requires +the user to input text. For example, in the *macro +

+

+	.TITLE "My Pulitzer Novel"
+
+ +"My Pulitzer Novel" is a string argument. +

+Because string arguments must be enclosed by double-quotes, you can't +use double-quotes as part of the string argument. If you need +double-quotes to be part of a string argument, use the *inline +escapes \(lq and \(rq +(leftquote and rightquote respectively) in place of the double-quote +character ("). + +

Unit of measure +
The single letter after a *numeric argument +that tells mom what measurement scale the argument +should use. Commonly valid units are: +

+ + +
i = inches +
p = points +
P = picas +
c = centimeters +
m = ems +
n = ens +
v = the current leading (line space)
+
+

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: +

+

+	.ALD 2v
+	.LL  39P
+	.IL  1i
+
+ +The above example advances 2 line spaces and sets the line length to +39 picas with a left indent of 1 inch. +

+IMPORTANT: Most mom macros +that set the size or measure of something MUST be given a unit of +measure. mom's macros do not have default units +of measure. There are a couple of exceptions, the most notable of +which are PS and LS. Both use +*points as the default unit of measure, which means +you don't have to append "p" to their argument. +

+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). +

+NOTE: 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. + +

Zero-width character +
The *inline escape that allows you to print a +literal period, apostrophe and, if *output lines +are *filled, a space that falls at the beginning of +an *input line. It looks like this: +

+

+	\&
+
+ +(backslash followed by an ampersand). +

+Normally, groff interprets a period (or an apostrophe) at the beginning +of an input line as meaning that what follows is a *control +line. In fill modes, groff treats a space at the beginning +of an input line as meaning "start a new line and put a space +at the beginning of it." If you want groff to interpret periods +and apostrophes at the beginning of input lines literally (ie. 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. +

+
+ + +

Mom's Document Processing Terms

+
+ + +
+
Blockquote +
Cited material other than *quotes. +Typically set at a smaller point size than paragraph text, indented +from the left and right margins. Blockquotes are +*filled. + +
Control macro +
Macros used in +document processing +to control/alter the appearance of document elements (e.g. heads, +quotes, footnotes, *headers, etc.). + +
Document header/docheader +
Document information (title, subtitle, author, etc) output +at the top of page one. + +
Epigraph +
A short, usually cited passage that appears at the +beginning of a chapter, story, or other document. + +
Footer/page footer +
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 +*running text. + +
Head +
A title that introduces a major section of a document. + +
Header/page header +
Document information (frequently author and title) output in +the top margin of pages after page one. +

+NOTE: In terms of content and style, headers and +*footers 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. + +

Linebreak/author linebreak +
A horizontal gap in *running text, frequently +set off by typographic symbols such as asterisks or a daggers. +Used to indicate a shift in the content of a document (e.g. a scene +change in a short story). + +
Paragraph head +
A title joined to the body of a paragraph; hierarchically one +level beneath *subheads. + +
Quote +
A quote, to mom, is a line-for-line setting +of quoted material (e.g. poetry, song lyrics, or a snippet of +programming code). You don't have to use +BR +with quotes. + +
Running text +
In a document formatted with mom, running +text means text that forms the body of the document, including +elements such as heads and subheads. *Docheaders, +*headers, *footers and page numbers are NOT part of +running text. + +
Subhead +
A title used to introduce secondary sections of a document; +hierarchically one level beneath sections introduced by +*heads. + +
Toggle +
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 +Example 3 +of the section +How to read macro arguments. +
+ +

+


+Next   +Prev   +Top   +Back to Table of Contents + + diff --git a/contrib/mom/momdoc/docelement.html b/contrib/mom/momdoc/docelement.html new file mode 100644 index 00000000..2ba6eb0e --- /dev/null +++ b/contrib/mom/momdoc/docelement.html @@ -0,0 +1,1687 @@ + + + +Mom -- Document Processing, element tags + + + + + +Next   +Prev   +Back to Table of Contents + + + +

THE DOCUMENT ELEMENT TAGS

+
+ + + + +

Introduction to the document element tags

+
+ +Once you've completed the setup for a document (see +Setting up a mom document), +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, "This is a paragraph, this +is a subhead, this is a footnote," and so on. +

+The list of tags is actually quite small -- ideal for the users +mom brought herself into being for (see +Who mom is meant for). +However, the list of macros that control the appearance of the +tags upon output is extensive. Generally, for each tag, +there are +control macros +for the tag'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 +START, +but can, in fact, be done at any time in the course of a document. +Any change to a tag's style affects all subsequent invocations of +the tag. + +

Control macros -- changing defaults

+ +

+The control macros for document processing tags let you +"design" the look of all the parts of your documents -- +should you wish. At a bare minimum, all tags have macros to +change mom's defaults for family, font +and point size. Where appropriate, there are macros to control +leading, indents and quad as well. +

+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's defaults for the tag are. +

+The control macros may be used at any time during the course of +a document (i.e. before or after +START). 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's control macro, or toggling a particular feature of the tag on +or off. +

+And don't forget: the +typesetting macros +can be used at any time, including inside +toggle +tags (affected only that particular invocation of the tag). +Equally, +inline escapes +can be used in tags that take +string arguments. +

+IMPORTANT NOTE: The family, font, point size and +leading control macros have no effect in +PRINTSTYLE TYPEWRITE, +which sets EVERYTHING in Courier roman, 12/24 (i.e. 12-point type on +a linespace of 24 points). +

+Please also note that the defaults listed +with the control macros apply only to +PRINTSTYLE TYPESET +unless a default for TYPEWRITE is also given. +

+A WORD OF ADVICE: Get familiar with +mom at her default settings before exploring the +control macros. Put her through her paces. She 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'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. + +

Arguments to the control macros

+ +

Family and font

+The arguments to the control macros that end in +_FAMILY or _FONT are the same +as for +FAMILY +and +FT. + +

Point size

+Control macros that end in _SIZE always take +the form +digit or -digit where digit is +the number of +points +larger (+) or smaller (-) than the point size of paragraphs +you want the document element to be. For example, to change +subheads to 1-1/2 points larger than the type in paragraphs, do +

+

+	.SUBHEAD_SIZE +1.5
+
+ +There's no need for a +unit of measure +with the _SIZE control macros; points is assumed. + +

Lead/linespacing

+Control macros that end in _AUTOLEAD take the +same argument as +AUTOLEAD, +viz. a digit that represents the number of points to add to the +tag's point size to arrive at its +lead. +For example, to set footnotes +solid, do +

+

+	.FOOTNOTE_AUTOLEAD 0
+
+ +To set footnotes with a 1-point lead (i.e. with the line spacing +one point greater than the footnote's point size), do +

+

+	.FOOTNOTE_AUTOLEAD 1
+
+ +

Indents

+Except for PARA_INDENT, the argument to the control +macros that end +in _INDENT is always a single digit (whole numbers +only; no decimal fractions) with no +unit of measure +appended to it. The digit represents by how much you want the +size of the paragraph first-line indent multiplied to achieve the +correct indent for a particular tag. + +

Quad/justification style

+Control macros that end in _QUAD take the same +arguments as +QUAD. + + +

Document element tags list

+ +
+ + + + +

Epigraphs

+ +

+Epigraphs +color, flavour, or comment on the text they precede. Typically, +they are centered on the page and set in a smaller point size +than that of paragraph text. +

+By default, mom sets epigraphs centered and +unfilled; +this lets you input them on a line for line basis. This behaviour +can be changed to accomodate filled epigraph "blocks." +
+ + + +


+

+ + Macro: EPIGRAPH <toggle> | [ BLOCK ] + + +

+EPIGRAPH is a toggle, used like this: +

+

+	.EPIGRAPH
+	<text of epigraph>
+	.EPIGRAPH OFF
+
+ +OFF, above, could be anything -- say, Q or X -- +since any argument other than BLOCK turns it off. +

+If given the argument BLOCK, EPIGRAPH +sets epigraphs +filled, +justified or quadded in the same direction as paragraphs, indented +equally from both the left and right margins. +

+If a block-style epigraph runs to more than one paragraph (unlikely, +but conceivable), you MUST introduce every paragraph +-- INCLUDING THE FIRST!!! -- with the +PP +tag. +

+NOTE: EPIGRAPH should only be +used at the top of a document (i.e. just after +START) +or after +heads. The latter is not especially +recommended, but it does work. In all other places where you +want quotes or cited text, use +QUOTE +or +BLOCKQUOTE. + +

Epigraph control macros

+

+See +Arguments to the control macros. +

+

+.EPIGRAPH_FAMILY    default = prevailing document family; default is Times Roman
+.EPIGRAPH_FONT      default = roman
+.EPIGRAPH_SIZE      default = -1.5 (points)
+.EPIGRAPH_AUTOLEAD  default = 2 points
+
+(The next two apply to "block" style epigraphs only)
+
+.EPIGRAPH_QUAD      default = same as paragraphs
+.EPIGRAPH_INDENT    default = para indent x 3 (for typeset), x 2 (for typewrite)
+
+
+ + + +

Paragraphs

+ +

+The paragraph macro is the one you use most often. Consequently, +it's one of most powerful, yet simplest to use -- just the letters +PP. No arguments, nothing. Just .PP +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. +

+By default, mom does not indent the first paragraph +of a document, nor paragraphs that fall imediately after +heads +or +subheads. +The first paragraphs of blockquotes and block-style epigraphs are +also not indented. This behaviour can be changed with the control +macro +INDENT_FIRST_PARAS. +

+In contrast to some other macro packages, mom does not +deposit a blank line between paragraphs. If you want her to do so, use +the control macro PARA_SPACE. (I don't recommend +using this macro with +PRINTSTYLE TYPEWRITE.) +

+Note that mom does not provide "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's simplistic orphan control +will break these one-liners -- if they fall at the bottom of the page +-- to a new page, which is not what you want. +

+TIP: The last thing you want while you're writing +and editing drafts of a document (particulary stories and chapters) +is a text file cluttered up with PP's. The visual +interruption in the flow of text is a serious obstacle to creativity +and critiquing. +

+I use the tab key on my keyboard to indent paragraphs when I'm writing, +producing a text file that looks pretty much like what you see on +a printed page. When it comes time to format and print the file, +I run it through a sed script that (amongst other things) converts +the character generated by the tab key (^I) into .PP +(plus a new line), and pipe the output to groff for processing and +printing. +

+Another solution is to insert a blank line between paragraphs. +The blank lines can then be sedded out at print time as above, or, +more conveniently, you can use the .blm +primitive +(blank line macro) to instruct groff (and mom) +that blank lines should be interpreted as PP's. +

+

+	.blm PP
+
+tells groff that all blank lines are really the macro PP. +
+ + + +
+

+ + Macro: PP + + +

+PP (on a line by itself, of course) tells mom to +start a new paragraph. See +above +for more details. In addition to regular text paragraphs, you can +use PP in +epigraphs, +blockquotes +and +footnotes. + +

Paragraph control macros

+

+The PP 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. +

+

    +
  1. Family control +
  2. Font control +
  3. Leading/linespacing control +
  4. Justification/quad control +
  5. First-line indent control +
  6. Intitial paragraphs indent control +
  7. Paragraph spacing control +
+ +

1. Family

+The paragraph +family +is set with +FAMILY +prior to +START, +or +DOC_FAMILY +afterwards. Please note that both globally affect the family of +every element in the document. +

+If you wish to change the family for regular +text paragraphs only, invoke FAMILY immediately +after PP in EVERY paragraph whose family you wish +to differ from the prevailing document family. +

+Mom's default paragraph (and document) family +is Times Roman. + +

2. Font -- PP_FONT

+To change the +font +used in regular text paragraphs, use .PP_FONT, +which takes the same argument as +FT. +PP_FONT may be used before or after +START. +Only regular text paragraphs are affected; paragraphs in +epigraphs, +blockquotes +and +footnotes +remain at their default setting (medium roman) unless you change them +with the appropriate control macros. +

+Mom's default paragraph font is medium roman. + +

3.Leading

+The paragraph +leading +is set with +LS +prior to +START, +or +DOC_LEAD +afterwards. Please note that either method globally affects the +leading and spacing of every document element (except +headers +and +footers). +

+If you wish to change the leading of regular text paragraphs only, +invoke LS immediately after PP in +EVERY paragraph whose leading you wish to change. +

+HYPER-IMPORTANT NOTE: It is extremely unwise to change +paragraph leading with LS, as it will, in all cases, +screw up mom's ability to balance the bottom margin +of pages. +

+Mom's default paragraph leading (document leading) +is 16 points, adjusted to fill the page. + +

4. Justification/quad

+The justification/quad-direction of regular text paragraphs (i.e. +justified, +or +filled +and +quadded +left/right/center) is set with +JUSTIFY +or +QUAD +prior to +START, +and with +DOC_QUAD +afterwards. +

+Please note that either method of setting the paragraph +justification/quad-direction also affects +epigraphs +and +footnotes, +but not +blockquotes +(whose default is QUAD LEFT unless you change it with +BLOCKQUOTE_QUAD). +The justification/quad-direction of epigraphs and footnotes may +be changed with their own control macros. +

+If you wish to change the justification/quad-direction of +individual paragraphs, use JUSTIFY or +QUAD immediately after PP. +Only the paragraph in question gets justified or quadded +differently; subsequent paragraphs remain unaffected. +

+Mom's default justification/quad-direction for +paragraphs is justified for +PRINTSTYLE_TYPESET +and quad left for +PRINTSTYLE_TYPEWRITE. + +

5. First-line indent -- PARA_INDENT

+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 +START. +A +unit of measure +is required; fractional sizes are allowed. Thus, to set the paragraph +indent to 4-1/2 +ems, do +

+

+	.PARA_INDENT 4.5m
+
+ +In addition to establishing the basic first line-indent of +paragraphs, PARA_INDENT also affects +epigraphs, +quotes +and +blockquotes, +whose overal indenting from the left and (where applicable) right +margins is relative to PARA_INDENT. 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. +

+Mom's default PARA_INDENT is 2 +ems for +PRINTSTYLE_TYPESET +and 3 picas (1/2 inch) for +PRINTSTYLE_TYPEWRITE. + +

6. Indenting initial paragraphs -- INDENT_FIRST_PARAS

+By default, mom does not indent the first paragraph +of a document, nor the first paragraph after a head or +subhead, nor the first paragraphs of +epigraphs, +blockquotes +or +footnotes +that run to more than one paragraph. + +

+If you wish to have first paragraphs indented, invoke the macro +.INDENT_FIRST_PARAS with no argument, either +before or after +START. +INDENT_FIRST_PARAS is a toggle macro, therefore +passing it any argument (OFF, QUIT, Q, X...) cancels +its effect, meaning that first paragraphs will once again NOT be +indented. + +

7. Spacing paragraphs -- PARA_SPACE

+By default, mom does not insert a blank line +between paragraphs. If you would like her to do so, invoke the +macro .PARA_SPACE with no argument, either +before or after +START. +PARA_SPACE is a toggle macro, therefore passing +it any argument (OFF, QUIT, Q, X...) cancels its +effect, meaning that paragraphs will once again NOT be separated by +a blank line. +
+
+ + + +

Main heads

+ +

+Main heads -- or, in this documentation, just "heads" +-- should be used any place you want titles to introduce major +sections of a document. If you wish, mom can number +your heads for you. Head numbers can also be included +hierarchically in numbered +subheads +and +paraheads. +

+By default, heads are centered on the page, underlined, +all in caps. A double linespace precedes each head. In PRINTSTYLE TYPESET, heads +are bold, slightly larger than paragraph text. +

+If these defaults don't suit you, you can change them with the +head control macros. +
+ + + +


+

+ + Macro: HEAD "<text of head>" [ "<2nd line>" [ "<3rd line>" ... ] ] + + +

+The argument to HEAD is the text of the head, +surrounded by double-quotes. If you need additional lines for a +head, simply surround each line with double-quotes. +

+NOTE: If a head falls near the bottom of an output page +and mom is unable to fit the head plus at least +one line of text underneath it, she will set the head at the +top of the next page. + +

Head control macros

+

+There are, in addition to the usual family/font/size/quad control +macros, a number of macros to manage head numbering, spacing, +underlining, and so on. Check them out if you're unhappy with +mom's defaults. +

+

    +
  1. Family/font/size/quad +
  2. Caps +
  3. Pre-head space +
  4. Underlining +
  5. Numbering +
  6. Reset head numbering +
  7. Vertical inline escapes inside heads +
+

+

1. Family/font/size/quad

+

+See +Arguments to the control macros. +

+

+.HEAD_FAMILY default = prevailing document family; default is Times Roman
+.HEAD_FONT   default = bold
+.HEAD_SIZE   default = +1 (point)
+.HEAD_QUAD   default = CENTER
+
+ +

2. Capitalizing heads -- HEAD_CAPS

+By default, mom sets heads in caps, regardless +of the +string(s) +you give to +HEAD. +To change this behaviour, do +

+

+	.HEAD_CAPS OFF
+
+ +HEAD_CAPS is a toggle macro, therefore you can use +any argument you like instead of OFF (END, +QUIT, Q, X...). To turn HEAD_CAPS back on, +simply invoke it without an argument. + +

3. Space before heads -- HEAD_SPACE

+By default, mom deposits 2 blank lines prior to every +head. If you'd prefer just a single blank line, do +

+

+	.HEAD_SPACE OFF
+
+ +HEAD_SPACE is a toggle macro, therefore you can use +any argument you like instead of OFF (END, +QUIT, Q, X...). To restore the space before heads to 2 +blank lines, invoke HEAD_SPACE without an argument. + +

4. Underlining heads -- HEAD_UNDERLINE

+By default, mom underlines heads. To change this +behaviour, do +

+

+	.HEAD_UNDERLINE OFF
+
+ +HEAD_UNDERLINE is a toggle macro, therefore you can +use any argument you like instead of OFF (END, +QUIT, Q, X...). To restore underlining of heads, invoke +HEAD_UNDERLINE without an argument. + +

5. Number heads -- NUMBER_HEADS

+If you'd like your heads numbered, simply invoke +NUMBER_HEADS with no argument. Mom +will number all subsequent heads automatically (in ascending order, +naturally). +

+If, in addition to numbering heads, you also request that +subheads +and/or +paraheads +be numbered, the head number will be included in their numbers +(each number separated by a period [dot]). +

+Should you wish to stop head numbering, invoke +NUMBER_HEADS with any argument (OFF, QUIT, +END, X...). Head numbering will cease, and the head number +will not be included in the numbering of subheads and/or paraheads. + +

6. Reset head numbering -- RESET_HEAD_NUMBER

+Should you wish to reset the head number to "1", invoke +RESET_HEAD_NUMBER with no argument. If, for some +reason, you want mom to use a head number that is not +the next in ascending order (i.e. the last head number + 1), invoke +RESET_HEAD_NUMBER with the number you want, e.g. +

+

+	.RESET_HEAD_NUMBER 6
+
+ +Your next head will be numbered "6" and subsequent heads will +be numbered in ascending order from "6". + +

7. Vertical inline escapes inside heads

+If you need to adjust the +baseline +position of a head (e.g. the head falls at the top of a column and +you want its +ascenders +to line up with the ascenders of +running text +in other columns), you can embed a vertical motion +inline escape +(either +mom's +or +groff's +in the string(s) you pass to HEAD +

+For example, +

+

+	.HEAD "\[ALD3]Text of head
+
+ +will lower the baseline of the head by three points. Note that +there's no need to reverse the sense of the inline escape. +

+In the case of heads that run to more than one line, you must embed +the escape in the string for each line, like this: +

+

+	.HEAD "\[ALD3]First line" "\[ALD3]Next line" 
+
+ + + + +
+
+ + + +

Subheads

+ +

+Subheads should be used any place you want titles to introduce +sections of a document below heads. If you wish, mom +can number subheads for you. Subhead numbers can also be included +hierarchically in numbered +paraheads. +

+By default, subheads are flush left. In +PRINTSTYLE TYPESET, +they are set bold, slightly larger than paragraph text. In +PRINTSTYLE TYPEWRITE, +they are underlined. A single linespace precedes them in both +printstyles, and a tiny space adjustment raises them slightly +above text that comes afterwards for greater clarity in +document structuring. +

+If these defaults don't suit you, you can change them with the +subhead control macros. +
+ + + +


+

+ + Macro: SUBHEAD "<text of subhead>" [ "<2nd line>" [ "<3rd line>" ... ] ] + +

+The argument to SUBHEAD is the text of the subhead, +surrounded by double-quotes. If you need additional lines for a +subhead, simply surround each line with double-quotes. +

+NOTE: If a subhead falls near the bottom of an output +page and mom is unable to fit the head plus at +least one line of text underneath it, she will set the subhead +at the top of the next page. + +

Subhead control macros

+

+In addition to the usual family/font/size/quad control +macros, there are macros to manage subhead numbering. +

+

    +
  1. Family/font/size/quad +
  2. Numbering +
  3. Reset subhead numbering +
  4. Vertical inline escapes inside subheads +
+

+

1. Family/font/size/quad

+

+See +Arguments to the control macros. +

+

+.SUBHEAD_FAMILY default = prevailing document family; default is Times Roman
+.SUBHEAD_FONT   default = bold
+.SUBHEAD_SIZE   default = +.5 (point)
+.SUBHEAD_QUAD   default = LEFT
+
+ +

2. Number subheads -- NUMBER_SUBHEADS

+If you'd like your subheads numbered, simply invoke +.NUMBER_SUBHEADS with no argument. +Mom will number all subsequent subheads automatically +(in ascending order, naturally). +

+If, in addition to numbering subheads, you also request that +heads +be numbered, the head number will be included in the subhead number +(separated by a period [dot]). +

+Should you wish to stop subhead numbering, invoke +NUMBER_SUBHEADS with any argument (OFF, QUIT, +END, X...). Subhead numbering will cease, and the subhead +number will not be included in the numbering of paraheads. + +

3. Reset head numbering -- RESET_SUBHEAD_NUMBER

+Should you wish to reset the subhead number to "1", invoke +RESET_SUBHEAD_NUMBER with no argument. If, for some +reason, you want mom to use a subhead number that is not +the next in ascending order (i.e. the last subhead number + 1), invoke +RESET_SUBHEAD_NUMBER with the number you want, e.g. +

+

+	.RESET_SUBHEAD_NUMBER 4
+
+ +Your next subhead will be numbered "4" and subsequent +subheads will be numbered in ascending order from "4". + +

Vertical inline escapes inside subheads

+See +Vertical inline escapes inside heads. +The information there applies equally to subheads. + + +
+
+ + + +

Paragraph heads

+ +

+Paragraph heads (paraheads) should be used any place you want titles +to introduce paragraphs below heads or subheads. If you wish, +mom can number paraheads for you. +

+By default, paraheads are joined to the body of a paragraph, +slightly indented (provided the paragraph is not a +"first" paragraph as defined in +Indenting initial paragraphs). +In +PRINTSTYLE TYPESET, +they are set bold italic, slightly larger than paragraph text. In +PRINTSTYLE TYPEWRITE, +they are underlined. +

+If these defaults don't suit you, you can change them with the +parahead control macros. +
+ + + +


+

+ + Macro: PARAHEAD "<text of parahead>" + +

+PARAHEAD must come AFTER +PP +or it will not work! +

+The argument is the text of the parahead, surrounded by double-quotes. +Because paraheads are joined to the body of a paragraph, they accept +only one argument (see +HEAD +and +SUBHEAD). + +

Parahead control macros

+

+In addition to the family/font/size/indent control macros, there are +macros to manage parahead numbering. +

+

    +
  1. Family/font/size +
  2. Indent +
  3. Numbering +
  4. Reset parahead numbering +
+

+

1. Family/font/size

+

+See +Arguments to the control macros. +

+

+.PARAHEAD_FAMILY default = prevailing document family; default is Times Roman
+.PARAHEAD_FONT   default = bold italic
+.PARAHEAD_SIZE   default = +.5 (point)
+
+ +

2. Indent

+Unlike other control macros that end in +_INDENT, +the argument to the macro that controls indenting of paragraph heads +(PARAHEAD_INDENT) is NOT relative to the first-line +indent of normal paragraphs. In other words, it takes an absolute +value, and requires a +unit of measure. +For example, to set the paragraph head indent to 2-1/2 picas, you +do: +

+

+	.PARAHEAD_INDENT 2.5P
+
+Mom's default indent for paragraph heads is 1/2 +the first-line indent of normal paragraphs (both printstyles). +However, as stated above, if you choose to change the indent, you +must give an absolute value (unless you're a groff expert and want +to manipulate the number register \n[#PP_INDENT]u +arithmetically as the argument to PARAHEAD_INDENT +for an indent that's relative to PP_INDENT.) +

+NOTE: Paragraph heads in "first +paragraphs", as defined in +Indenting initial paragraphs, +are not indented unless you turn +INDENT_FIRST_PARAS +on. + +

3. Number paraheads -- NUMBER_PARAHEADS

+If you'd like your paraheads numbered, simply invoke +.NUMBER_PARAHEADS with no argument. +Mom will number all subsequent paraheads automatically +(in ascending order, naturally). +

+If, in addition to numbering paraheads, you also request that +heads +and +subheads +be numbered, the head and/or subhead number will be included in the +parahead number (separated by a period [dot]). +

+Should you wish to stop parahead numbering, invoke +NUMBER_PARAHEADS with any argument (OFF, +QUIT, END, X...). Parahead numbering will cease. + +

4. Reset head numbering -- RESET_PARAHEAD_NUMBER

+Should you wish to reset the parahead number to "1", invoke +RESET_PARAHEAD_NUMBER with no argument. If, for some +reason, you want mom to use a parahead number that is not +the next in ascending order (i.e. the last parahead number + 1), invoke +RESET_PARAHEAD_NUMBER with the number you want, e.g. +

+

+	.RESET_PARAHEAD_NUMBER 7
+
+ +Your next parahead will be numbered "7" and subsequent +paraheads will be numbered in ascending order from "7". +
+
+ + + +

Author linebreaks

+ +

+By default, mom marks +author linebreaks +with three centered asterisks. You can change this behaviour +with the linebreak character +control macro. +
+ + + +


+

+ + Macro: LINEBREAK + + +

+LINEBREAK takes no arguments. Simply invoke it +(on a line by itself, of course) whenever you want to insert an +author linebreak. The appearance of the linebreak is controlled +by the +LINEBREAK_CHAR +macro. + +

Linebreak character control macro

+

+ + Macro: LINEBREAK_CHAR [ <character> ] [ <iterations> [ <vertical adjustment> ] ] + +
+*The third optional argument requires a +unit of measure. + +

+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. +

+The first argument is any legal groff character (e.g. * +[an asterisk], \(dg [a dagger], \f(ZD\N'141\fP +[an arbitrary character from Zapf Dingbats], \l'4P' +[a 4-pica long rule]). Mom sets the character +centered on the current line length. +

+The second argument is the number of times to repeat the character. +

+The third argument is a +|- value by which to raise (+) or lower (-) +the character in order to make it appear visually centered between +sections of text. This lets you make vertical adjustments +to characters that don't sit on the +baseline +(such as asterisks). The argument must be preceded by a plus or +minus sign, and must include a unit of measure. +

+If you enter LINEBREAK_CHAR with no arguments, +sections of text will be separated by two blank lines. +

+Mom's default for LINEBREAK_CHAR is +

+

+	.LINEBREAK_CHAR * 3 -3p
+
+ +i.e. three asterisks, lowered 3 points from their normal vertical +position (for +PRINTSTYLE TYPESET; +the vertical adjustment is -2 points for +PRINTSTYLE TYPEWRITE). +
+
+ + + +

Quotes (line for line)

+ +

+Quotes +are always set in +nofill mode, +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 +Blockquotes +for how quotes, in the present sense, differ from longer +passages of cited text.) +

+Since mom originally came into being to serve +the needs of creative writers (i.e. novelists, short story +writers, etc. -- not to cast aspersions on the creativity of +mathematicians and programmers), she sets quotes in italics +(PRINTSTYLE TYPESET) +or underlined +(PRINTSTYLE TYPEWRITE), +indented from the left margin. Obviously, she's thinking +"quotes from poetry or song lyrics", but with the +quote control macros you can change her defaults so +QUOTE serves other needs, e.g. entering snippets of +programming code, command line instructions, and so on. +

+ +Besides indenting quotes, mom further sets them +off from +running text +with a small amount of vertical whitespace top and bottom. In +PRINTSTYLE TYPEWRITE, +this is always one full linespace. In +PRINTSTYLE TYPESET, +it's 1/2 of the prevailing +leading +if the quote fits fully on the page (i.e. with running text above +and below it), otherwise it'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 +ALWAYS_FULLSPACE_QUOTES. +

+NOTE: ALWAYS_FULLSPACE_QUOTES +applies to both +QUOTE +and +BLOCKQUOTE, +as does the control macro +QUOTE_INDENT. +
+ + + +


+

+ + Macro: QUOTE toggle + + +

+QUOTE is a toggle macro. To begin a section of +quoted text, invoke it with no argument, then type in your quote. +When you're finished, invoke QUOTE with any +argument (e.g. OFF, END, X, Q...) to turn it off. Example: +

+

+	.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
+
+ +

Quote control macros

+
    +
  1. Family/font/size/indent +
  2. Spacing above and below (typeset only) +
  3. Underline quotes (typewrite only) +
  4. Manually break a footnoted quote that crosses pages/columns +
+

+

1. Family/font/size/indent

+

+See +Arguments to the control macros. +

+

+.QUOTE_FAMILY default = prevailing document family; default is Times Roman
+.QUOTE_FONT   default = italic
+.QUOTE_SIZE   default = 0 (i.e. same size as paragraph text)
+.QUOTE_INDENT default = paragraph indent x 3 (typeset); x 2 (typewrite)
+             (note that this macro also sets the indents (left and right)
+              for blockquotes)
+
+ +

2. Spacing above and below -- ALWAYS_FULLSPACE_QUOTES (typeset only)

+If you'd like mom always to put a full linespace above +and below quotes, invoke .ALWAYS_FULLSPACE_QUOTES +with no argument. If you wish to restore mom's +default behaviour regarding the spacing of quotes (see +above), +invoke the macro with any argument (OFF, QUIT, END, +X...) +

+NOTE: This macro also sets mom's +spacing policy for +blockquotes. + +

3. Underlining -- UNDERLINE_QUOTES (typewrite only)

+By default in +PRINTSTYLE TYPEWRITE, +mom underlines quotes. If you'd rather she didn't, +invoke .UNDERLINE_QUOTES with any argument +(OFF, QUIT, END, X...) to disable the feature. +Invoke it without an argument to restore mom's +default underlining of quotes. +

+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 FT I. +Furthermore, since mom underlines all instances +of italics by default in PRINTSTYLE TYPEWRITE, +you must also make sure that ITALIC_MEANS_ITALIC +is enabled (see +PRINTSTYLE TYPEWRITE control macros). + +

4. Manually break a footnoted quote -- BREAK_QUOTE

+Exceptionally, a quote or blockquote containing a footnote may crosse +a page or column. When this happens, the footnote marker may not be +correct for its position relative to other footnotes on the page, and +the footnote itself may appear on the wrong page or at the bottom of +the wrong column. When this happens, study your output to determine +the precise point at which the quote breaks (or at which you want +it to break), and add .BREAK_QUOTE on a line by itself +afterwards. No other intervention is required, and the footnote(s) +will be marked correctly and appear on the correct page. +

+BREAK_QUOTE may be used with both quotes and +blockquotes, and hence is aliased as BREAK_BLOCKQUOTE, +BREAK_CITATION and BREAK_CITE. +
+


+ + + +

Blockquotes (cited passages)

+ +

+BLOCKQUOTES are used to cite passages from another +author's work. So that they stand out well from +running text, +mom indents them from both the left and right margins +and sets them in a different point size +(PRINTSTYLE TYPESET +only). +Output lines +are +filled, +and, by default, +quadded +left. +

+Besides indenting blockquotes, mom further sets them +off from running text with a small amount of vertical whitespace top +and bottom. (See +above +for a complete explanation of how this is managed, and how to control it.) +

+You may notice that BLOCKQUOTE has no macro to +control +leading, +although you can change the point size. There are Very Good +Reasons for this. If you can't live with the limitation, change +the leading of blockquotes (after invoking the tag) with +LS, +but know that there will be Bottom Margin Consequences. +
+ + + +


+

+ + Macro: BLOCKQUOTE toggle +
+ Aliases: CITE, CITATION +
+ +

+BLOCKQUOTE is a toggle macro. To begin a +cited passage, invoke the tag with no argument, then type in your quote. +When you're finished, invoke BLOCKQUOTE with any +argument (e.g. OFF, END, X, Q...) to turn it off. Example: +

+

+	.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
+	\(emGeorge W. Bush
+	.BLOCKQUOTE END
+
+ +If the cited passage runs to more than one paragraph, you MUST +introduce each paragraph -- including the first! -- +with +PP. +

+NOTE: The aliases CITE +and CITATION may be used in place of the +BLOCKQUOTE tag, but "CITE" and +"CITATION" must not be used to replace "BLOCKQUOTE" +in any of the tag's control macros. + +

Blockquote control macros

+
    +
  1. Family/font/size/indent +
  2. Spacing above and below (typeset only) +
  3. Manually break a footnoted blockquote that crosses pages/columns +
+

+

1. Family/font/size/indent

+

+See +Arguments to the control macros. +

+

+.BLOCKQUOTE_FAMILY default = prevailing document family; default is Times Roman
+.BLOCKQUOTE_FONT   default = italic
+.BLOCKQUOTE_SIZE   default = -1 (point)
+.QUOTE_INDENT      default = paragraph indent x 3 (typeset); x 2 (typewrite)
+                  (note that this macro also sets the left indent for quotes)
+
+ +

2. Spacing above and below -- ALWAYS_FULLSPACE_QUOTES (typeset only)

+If you'd like mom always to put a full linespace above +and below blockquotes, invoke .ALWAYS_FULLSPACE_QUOTES +with no argument. If you wish to restore mom's +default behaviour regarding the spacing of blockquotes (see +above), +invoke the macro with any argument (OFF, QUIT, END, +X...). +

+NOTE: This macro also sets mom's +spacing policy for +quotes. +
+


+ + + +

Footnotes

+ + +

+For something so complex behind the scenes, footnotes are easy to use. +You just type, for example +

+ +

+	...the doctrines of Identity as urged by Schelling\c
+	.FOOTNOTE
+	<footnote about who the hell is Schelling>
+	.FOOTNOTE OFF
+	were generally the points of discussion presenting the most
+	of beauty to the imaginative Morella.
+
+ +and be done with it. (Note the obligatory use of the +\c +inline escape.) +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 +themeselves appropriately, balancing them properly with the botton +margin, deferring footnotes that don't fit on the page... Even if +you're using +COLUMNS, +mom knows what to do, and Does The Right Thing. +

+Footnotes can be sly little beasts, though. If you're writing a +document that's footnote-heavy, you might want to read the following. + +

Footnote behaviour

+

+By default, mom marks footnotes with +alternating stars (asterisks) and daggers. The first footnote +gets a star, the second a dagger, the third two stars, +the fourth two daggers, etc. If you prefer numbered footnotes, rest +assured mom is happy to oblige. +

+A small amount of vertical whitespace and a short horizontal rule +separate footnotes from the document body. The amount of whitespace +varies 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'll opt for ample over cramped. The last lines of footnotes +are always flush with the document's bottom margin. +

+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't be fitted 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. +

+In the unfortunate happenstance that a deferred footnote is the +only footnote on its page (i.e. it's marked in the document body with +a star) and the page it's deferred has its own footnotes, +mom separates the deferred footnote from the page'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'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. +

+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's no confusion and mom doesn'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 two +stars marking the first footnote entry, they'll know the entry belongs +to the previous page). +

+Obviously, deferred footnotes aren't an issue if you request numbered +footnotes that increase incrementally throughout the whole document -- +yet another convenience mom has thought of. +

+Exceptionally, you may encounter problems with footnotes inside +quotes and blockquotes that cross a page or column. See +BREAK_QUOTE +for a solution. +
+ + + +


+

+ + Macro: FOOTNOTE <toggle> | INDENT LEFT | RIGHT | BOTH <indent value> +
+ *See
HYPER-IMPORTANT NOTE!!! +
+ <indent value> requires a + unit of measure
+ + +

+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 INDENT +(i.e. OFF, QUIT, END, X...) tells mom +you're finished. +

+Footnotes are the only element of +running text +that are not affected by the typesetting +indent macros. +In the unlikely event that you want a page's footnotes to line +up with a running indent, invoke FOOTNOTE with +the INDENT argument and pass it an indent +direction and indent value. L, R, and +B may be used in place of LEFT, +RIGHT, and BOTH. +FOOTNOTE must be invoked with INDENT +for every footnote you want indented; Mom does +not save any footnote indent information from invocation to +invocation. +

+NOTE: If a footnote runs to more than one +paragraph(!), DO NOT begin the footnote with +the +PP +tag. Use PP only to introduce subsequent paragraphs. +

+HYPER-IMPORTANT NOTE: +The final word on the +input line +that comes immediately before FOOTNOTE MUST terminate +with a +\c +inline escape. Otherwise, the footnote marker for the word won't be attached to +it (i.e. mom will insert a word space between the word +and the marker). See the +footnote example +above. + +

+

Footnote control macros

+
    +
  1. Family/font/size/lead/quad +
  2. Footnote markers -- on or off +
  3. Footnote marker style -- star+dagger or numbered +
  4. Reset footnote number -- set footnote marker number to 1 +
  5. Footnote rule -- on or off +
  6. Footnote rule length -- length of footnote separator rule +
  7. Adjust vertical position of footnote separator rule +
+

+

1. Family/font/size/quad/lead

+

+See +Arguments to the control macros. +

+

+.FOOTNOTE_FAMILY    default = prevailing document family; default is Times Roman
+.FOOTNOTE_FONT      default = roman
+.FOOTNOTE_SIZE      default = -2 (points)
+.FOOTNOTE_AUTOLEAD  default = 2 points (typeset); single-spaced (typewrite)
+.FOOTNOTE_QUAD      default = same as paragraphs
+
+ +

2. Footnote markers -- FOOTNOTE_MARKERS

+If you don't want footnote markers, in either the body of +the document or beside footnote entries themselves, toggle +them off with .FOOTNOTE_MARKERS OFF (or +END, QUIT, X...). This means, of course, that +you'll have to roll your own. If you want them back on, invoke +.FOOTNOTE_MARKERS with no argument. Footnote markers +are on by default. + +

3. Footnote marker style -- FOOTNOTE_MARKER_STYLE

+Mom gives you two choices of footnote marker style: +star+dagger (see +footnote behaviour +above), or numbered. +

+.FOOTNOTE_MARKER_STYLE STAR gives you star+dagger +(the default). There is a limit of 10 footnotes per page with +this style. +

+.FOOTNOTE_MARKER_STYLE NUMBER 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's footnote numbers at 1 +with .RESET_FOOTNOTE_NUMBER (see below). + +

4. Reset footnote number -- RESET FOOTNOTE NUMBER

+.RESET_FOOTNOTE_NUMBER, by itself, resets +footnote numbering so that the next footnote you enter is +numbered 1. +

+.RESET_FOOTNOTE_NUMBER PAGE tells +mom to start every page's footnote numbering at 1. + +

5. Footnote rule -- FOOTNOTE_RULE

+If you don't want a footnote separator rule, toggle it off with +.FOOTNOTE_RULE OFF (or END, +QUIT, X...). Toggle it back on by invoking +.FOOTNOTE_RULE with no argument. The default is to +print the rule. + +

6. Footnote rule length -- FOOTNOTE_RULE_LENGTH

+If you want to change the length of the footnote separator rule, +invoke .FOOTNOTE_RULE_LENGTH with a length, like +this, +

+

+	.FOOTNOTE_RULE_LENGTH 1i
+
+ +which sets the length to 1 inch. Note that a +unit of measure +is required. The default is 4 +picas +for both +printstyles. +

7. Adjust vertical position of footnote separator rule -- FOOTNOTE_RULE_ADJ

+The footnote separator rule is actually a baseline rule that falls +on the +baseline +of the first line of a page's footnotes. By default, +mom raises the rule 3 +points +from the baseline so that the separator and the footnotes don't +look jammed together. If you'd prefer a different vertical +adjustment, invoke .FOOTNOTE_RULE_ADJ with the +amount you'd like. For example +

+

+	.FOOTNOTE_RULE_ADJ 4.25p
+
+ +raises the rule by 4-1/4 points. Note that you can only raise +the rule, not lower it. A +unit of measure +is required. +
+
+ + + +

Terminate document processing

+ + +

+The use of FINIS is optional. If you invoke it +(at the end of a document, of course), mom turns off +footers +(if they're on) and page numbering (if page +numbers are at the bottom of the page) and deposits the word +END, centered after a blank line, beneath the last +line of the document. END is enclosed between +em-dashes. +

+If you're writing in a language other than English, you can +change what mom prints for END with +the control macro FINIS_STRING. +
+ + + +


+

+ + Macro: FINIS + + +

+The use of FINIS is optional, but if you use +it, it should be the last macro you invoke in a document. See +above +for a description of how FINIS behaves. +

+NOTE: If you don't use FINIS, +and you don't want +footers +(if they'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: +

+

+	.FOOTERS OFF
+	.PAGINATE OFF
+
+ +

Changing the FINIS string

+ +

+By default, FINIS prints the word +END between +em-dashes. +If you'd like mom to print something else +between the dashes, use the FINIS_STRING macro +(anywhere in the document prior to FINIS). +

+For example, if your document's in French, you'd do +

+

+	.FINIS_STRING "FIN"
+
+ +Double-quotes must enclose the macro's argument. +

+NOTE: If you pass FINIS_STRING +a blank string, i.e. +

+

+	.FINIS_STRING ""
+
+ +mom will still print the em-dashes if you +invoke FINIS. This, in effect, produces a +short, centered horizontal rule that terminates the document. +(In +PRINTSTYLE TYPEWRITE, +it's a short, dashed line composed of four hyphens.) + +

+


+Next   +Prev   +Top   +Back to Table of Contents + + diff --git a/contrib/mom/momdoc/docprocessing.html b/contrib/mom/momdoc/docprocessing.html new file mode 100644 index 00000000..371a7576 --- /dev/null +++ b/contrib/mom/momdoc/docprocessing.html @@ -0,0 +1,1750 @@ + + + +Mom -- Document Processing, Introduction and Setup + + + + + +Next   +Prev   +Back to Table of Contents + + + +

DOCUMENT PROCESSING WITH MOM +

+
+ +Introduction to document processing +
+Some document defaults +

+* IMPORTANT NOTE on leading/spacing and bottom margins * +

+

+
+
+ +

Introduction to document processing

+

+As explained in +Document processing with mom, +document processing uses markup tags to identify document elements +like heads, paragraphs, 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't forget: if you don't like the +"official" name of a tag -- too long, cumbersome +to type in, not "intuitive" enough -- you can change it +with the +ALIAS +macro.) +

+In addition to the tags themselves, mom has an +extensive array of macros that control how they look and behave. +

+Setting up a mom doc is a simple, four-part procedure. +You begin by entering information about the document itself (title, +subtitle, author, etc.). Next, you tell mom what +kind of document you're creating (e.g. chapter, letter, abstract, +etc...) and what kind of output you want (typeset, typewrittten, +draft-style, etc). Thirdly, you make as many or as few changes to +mom's default behaviour as you wish. Lastly, you +invoke the +START +macro. Voilà! You're ready to write. +
+


+ + +

Some document defaults

+ +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. +

+I fear the following may not be adequately covered in the +documentation. Just in case, here they are. +

+

    +
  • the paper size is 8.5x11 inches +
  • the left and right margins are 1-inch +
  • the top and bottom margins for document text are plus/minus + visually 1-inch +
  • pages are numbered; the number appears centered, at the + bottom, surrounded by hyphens ( e.g. -6- ) +
  • the first page of a document begins with a + document header +
  • subsequent pages have + page headers + with a rule underneath +
+

+Another way to check up on document processing defaults is to have +a look at the macro file (om.tmac). Each macro is preceded by a +description that (generally) says what its default is (if it has +one). +
+


+ + +

IMPORTANT NOTE on leading/spacing and bottom margins

+
+ +Mom takes evenly-aligned bottom margins in +running text +very seriously. Only under a very few (exceptional) circumstances +will she allow a bottom margin to "hang" (i.e. to fall +short). +

+In order to ensure even bottom margins, mom +uses the "base" document +leading +in effect at the start of each page (i.e. the leading used +in paragraphs) to calculate the spacing of every document element. +Prior to invoking +START, +this is done with the +typesetting macro +LS, +afterwards with the document +control macro +DOC_LEAD. +

+Because mom relies so heavily on the base document +leading, any change to the leading or spacing on a page will almost +certainly have undesirable consequences on that page's bottom margin +unless the change is fully compensated for elsewhere on the page. +

+In other words, if you add a few points of space somewhere on a page, +you must subtract the same number of points somewhere else on that +same page, and vice versa. +

+If it's a question of adding or subtracting full line spaces between +or within document elements, you can do so by using the "v" +unit of measure +with whatever spacing macro you choose -- +ALD, +RLD, +SPACE +-- and mom won't object. "v" means +"the current leading", so she isn't confused by it. And +since "v" accepts decimal fractions, you can add/subtract +half linespaces and quarter linespaces with "v" as well, +provided you compensate for the fractional linespace somewhere +else on the page. +
+


+ +

Document setup

+ + +

Tutorial -- Setting up a mom document

+
+

+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 +

+

+	.TITLE     "By the Shores of Lake Attica"
+	.AUTHOR    "Rosemary Winspeare"
+	.PRINTSTYLE TYPESET
+	.START
+
+ +produces a beautifully typeset 8.5x11 document, with a +docheader +at the top of page 1, +page headers +with the title and author on subsequent +pages, and page numbers at the bottom of each page. In the course +of the document, heads, subheads, citations, quotes, epigraphs, +and so on, all come out looking neat, trim, and professional. +

+For the purposes of this tutorial, we're going to set up a short +story -- My Pulitzer Winner by Joe Blow. Thankfully, +we don't have to look at story itself, just the setup. +Joe wants the document +

+

    +
  • to be draft 7, revision 39; +
  • to use the "default" style of document formatting: +
  • to print as draft-style output (instead of "final" copy output); +
  • to be typeset, in Helvetica, 12 on 14, + rag-right; +
  • to have footers + instead of + headers; +
  • to use a single asterisk for + author linebreaks. +
+

+Joe Blow has no taste in typography. His draft won't look pretty, +but this is, after all, a tutorial; we're after examples, not beauty. +

Step 1

+ +The first step in setting up any document is giving mom +some reference information. The reference macros are: +

+

    +
  • TITLE +
  • SUBTITLE +
  • AUTHOR +
  • CHAPTER -- the chapter number +
  • DRAFT -- the draft number +
  • REVISION -- the revision number +
+

+You can use as many or as few as you wish, although at a minimum, +you'll probably fill in TITLE (unless the document's +a letter) and AUTHOR. Order doesn't matter. +You can separate the +arguments +from the macros by any number of spaces. The following are +what you'd need to start Joe Blow's story. +

+

+	.TITLE    "My Pulitzer Winner"
+	.AUTHOR   "Joe Blow"
+	.DRAFT     7
+	.REVISION  39
+
+ +

Step 2

+ +Once you'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 +"the docstyle macros." They are: +

+

    +
  • DOCTYPE -- the type of document (default, chapter, user-defined, letter) +
  • PRINTSTYLE -- typeset or typewritten +
  • COPYSTYLE -- draft or final copy +
+

+Mom has defaults for DOCTYPE +and COPYSTYLE; if they're what you want, you +don't need to include them here. However, PRINTSTYLE +has no default and MUST be present in every formatted document. +If you omit it, mom won't process the document AND +she'll complain (both to stderr and as a single printed sheet with +a warning). Moms -- they can be so annoying sometimes. <sigh> +

+Adding to what we already have, the next bit of setup for Joe +Blow's story looks like this: +

+

+	.TITLE    "My Pulitzer Winner"
+	.AUTHOR   "Joe Blow"
+	.DRAFT     7
+	.REVISION  39
+	\#
+	.DOCTYPE     DEFAULT \"Superfluous; mom uses DOCTYPE DEFAULT by default
+	.PRINTSTYLE  TYPESET
+	.COPYSTYLE   DRAFT
+
+ +Notice the use of the +comment line +( \# ), a handy way to keep groups of macros visually separated +for easy reading in a text editor. + +

Step 3

+ +This step -- completely optional -- is where you, the user, take +charge. Mom has defaults for everything, +but who's ever satisfied with defaults? Use any of the typesetting macros +here to change mom's document defaults (paper +size, margins, family, point size, line space, rag, etc), or +any of the document processing macros that set/change/control +the appearance of document elements. Think of this as the +"style-sheet " section of a document. +

+Joe Blow wants his story printed in Helvetica, 12 on 14, rag +right, with +page footers +instead of +page headers +and a single asterisk for the +linebreak +character. None of these requirements conforms +to mom's defaults for the chosen +PRINTSTYLE (TYPESET), so we change them here. +The setup for Joe Blow's story now looks like this: +

+

+	.TITLE    "My Pulitzer Winner"
+	.AUTHOR   "Joe Blow"
+	.DRAFT     7
+	.REVISION  39
+	\#
+	.DOCTYPE     DEFAULT
+	.PRINTSTYLE  TYPESET
+	.COPYSTYLE   DRAFT
+	\#
+	.FAMILY  H
+	.PS      12
+	.LS      14
+	.QUAD    LEFT    \"ie. rag right
+	.FOOTERS
+	.LINEBREAK_CHAR *
+
+ +

Step 4

+The final step in setting up a document is telling mom +to start document processing. It's a no-brainer, just the single macro +START. Other than PRINTSTYLE, it's +the only macro required for document processing (although +I can't guarantee you'll like the results of using just the two). +

+Here's the complete setup for My Pulitzer Winner: +

+

+	.TITLE    "My Pulitzer Winner"
+	.AUTHOR   "Joe Blow"
+	.DRAFT     7
+	.REVISION  39
+	\#
+	.DOCTYPE     DEFAULT
+	.PRINTSTYLE  TYPESET
+	.COPYSTYLE   DRAFT
+	\#
+	.FAMILY   H
+	.PS       12
+	.LS       14
+	.QUAD     LEFT    \"ie. rag right
+	.FOOTERS
+	.LINEBREAK_CHAR *
+	\#
+	.START
+
+ +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: +

+

+	.TITLE    "My Pulitzer Winner"
+	.AUTHOR   "Joe Blow"
+	.DRAFT     7
+	.REVISION  39
+	\#
+	.PRINTSTYLE  TYPEWRITE
+	.COPYSTYLE   DRAFT
+	\#
+	.START
+
+ +.PRINTSTYLE TYPEWRITE, above, means that Joe's work +will come out "typewritten, double-spaced", 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). +

+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: +

+

+	.TITLE    "My Pulitzer Winner"
+	.AUTHOR   "Joe Blow"
+	.DRAFT     7
+	.REVISION  39
+	\#
+	.PRINTSTYLE  TYPESET  \"first change
+	.COPYSTYLE   FINAL    \"second change
+	\#
+	.START
+
+ +In the above, .DRAFT 7, .REVISION 39, and .COPYSTYLE +FINAL are actually superfluous. The draft and revision numbers +aren't used when COPYSTYLE is FINAL, +and COPYSTYLE FINAL is mom's +default unless you tell her otherwise. BUT... to judge from the +number of drafts already, J. Blow may very well decide his +"final" version still isn'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'll be ready to tackle his Pulitzer +winner again. +
+
+ + + + +

The Reference Macros

+
+ +The reference macros give mom the information +she needs to generate +docheaders +and +page headers. They +must go at the top of any file that uses mom's +document processing macros. + + +

Reference macros list

+
+ + + + + +
+

+ +Macro: TITLE "<title>" +
+*Argument must be enclosed in double-quotes + +

+The title string can be caps or caps/lower-case; it's up to you. +In +PRINTSTYLE TYPESET, +the title will appear in the +docheader +exactly as you typed it. However, mom converts +the title to all caps in +page headers +unless you turn that feature off (see +HEADER_<POSITION>_CAPS). In +PRINTSTYLE TYPEWRITE, +the title always gets converted to caps. +

+NOTE: If your +DOCTYPE +is CHAPTER, TITLE should be the +title of the opus, not "CHAPTER whatever". +
+ + + +


+

+ +Macro: SUBTITLE "<subtitle>" +
+*Argument must be enclosed in double-quotes + +

+The subtitle string can be caps or caps/lower-case. Since a +document's subtitle appears only in the +docheader, +and the title is most likely in caps, I recommend caps/lower case. +
+ + + +


+

+ +Macro: AUTHOR "<author string>" [ "<author2 string>" "<author3 string>" ... ] +
+*Multiple arguments must be enclosed in double-quotes + +

+Each author string can hold as many names as you like, e.g. +

+

+	.AUTHOR "Joe Blow"
+	    or
+	.AUTHOR "Joe Blow, Jane Doe" "John Hancock"
+
+ +Mom prints each string that's enclosed in +double-quotes on a separate line in the +docheader, +however only the first string appears in +page headers. +If you want mom to put something else in the author +part of page headers (say, just the last names of a document's two +authors), redefine the appropriate part of the header (see +header/footer control). +

+The strings can be caps or caps/lower-case. I recommend caps/lower +case. +
+ + + +


+

+ +Macro: CHAPTER <chapter number> + +

+The chapter number can be in any form you like -- a digit, a roman +numeral, a word. If you choose +DOCTYPE CHAPTER, +mom prints whatever argument you pass +CHAPTER beside the word "Chapter" as a +single line +docheader. +She also puts the same thing in the middle of +page headers. +

+If you're not using DOCTYPE CHAPTER, the macro serves +no purpose and mom ignores it. + +

+If you're not writing in English, you can ask mom +to use the word for chapter in your own language by telling +her what it is with the CHAPTER_STRING macro, +like this: +

+

+	.CHAPTER_STRING "Chapître"
+
+ +You can also use CHAPTER_STRING if you want +"CHAPTER" instead of "Chapter" in the doc- and +page-headers. (See also the +Special Note on CHAPTER.) +
+ + + +
+

+ +Macro: DRAFT <draft #> + +

+DRAFT only gets used with +COPYSTYLE DRAFT. +If the COPYSTYLE is FINAL (the +default), mom ignores DRAFT. +DRAFT only accepts a +numeric argument. +

+Mom prints the draft number beside the word +"Draft" in the middle part of +page headers. +If you're not writing in English, you can ask mom +to use the word for draft in your own language by telling +her what it is with the DRAFT_STRING macro, +like this: +

+

+	.DRAFT_STRING "Ébauche"
+
+ + + +
+

+ +Macro: REVISION <revision #> + +

+REVISION only gets used with +COPYSTYLE DRAFT. +If the COPYSTYLE is FINAL +(the default), mom ignores the +REVISION macro. REVISION only +accepts a +numeric argument. +

+Mom prints the revision number beside the shortform +"Rev." in the middle part of +page headers. +If you're not writing in English, you can ask mom +to use the word for revision, or a shortform therof in your own language +by telling her what it is with the REVISION_STRING +macro, like this: +

+

+	.REVISION_STRING "Rév."
+
+
+ + + + +

The Docstyle Macros

+
+ +The docstyle macros tell mom what type of document you're +writing, whether you want the output typeset or +"typewritten", and whether you want a draft copy (with +draft and revision information in the headers) or a final copy. + + +

Docstyle macros list

+
+ + + + + +
+

+ +Macro: DOCTYPE DEFAULT | CHAPTER | NAMED "<name>" | LETTER +

+The arguments DEFAULT, CHAPTER and +NAMED tell mom what to put +in the +docheader +and +page headers. +LETTER tells her that you want to write a +lettter. +

+Mom's default DOCTYPE is +DEFAULT. If that's what you want, you don't +have to give a DOCTYPE command. +

+DEFAULT prints a +docheader +containing the title, subtitle and author information given to the +reference macros, +and page headers with the author and title. +(See +Default specs for headers +for how mom's outputs each part of the page header.) +

+CHAPTER prints "Chapter #" in place of a +docheader +(# is what you gave to +CHAPTER). +Page headers contain the author, the title of the book (which +you gave with +TITLE), +and "Chapter #". (See +Default Specs for Headers +for mom's default type parameters for each part of +the page header.) +

+*See the +Special Note on CHAPTER +below for how you can make CHAPTER print something +other than "Chapter #" as its docheader. +

+NAMED takes an additional argument: a name +for this particular kind of document (e.g. outline, synopsis, +abstract, memorandum), enclosed in double-quotes. +NAMED is identical to DEFAULT +except that mom prints the argument to +NAMED beneath the +docheader, +as well as in page headers. +(See +Default specs for headers +for how mom's outputs each part of the page header.) +

+LETTER tells mom you're writing a letter. See +the section +Writing Letters +for instructions on using mom to format letters. + +

Special Note on CHAPTER

+In novels, new chapters are generally (but not always) +introduced by "Chapter #". Other types of documents +(reports and so on) often require specific titles for chapters. +If your document is of this latter type, use DOCTYPE +CHAPTER in the following way: +

+

    +
  1. Omit the + reference macro + CHAPTER +
  2. Invoke + .CHAPTER_STRING + with the title you'd like the chapter to have (enclosed + in double-quotes, of course). +
  3. Optionally, if you'd like the chapter title to appear + in the the center part of + page headers + (its default location), invoke + .HEADER_CENTER + with the same title you gave to CHAPTER_STRING. + +
+
+ + + +
+

+ +Macro: PRINTSTYLE TYPESET | TYPEWRITE [ SINGLESPACE ] +
+*Required for document processing. + +

+PRINTSTYLE tells mom whether to typeset +a document, or to print it out "typewritten, doubled-spaced". +

+THIS MACRO MAY NOT BE OMITTED. In order for +document processing to take place, mom requires +a PRINTSTYLE. If you don't give one, +mom will warn you on stderr and print a single +page with a nasty message. +

+TYPESET, as the argument implies, typesets documents +(by default in Times Roman; see +TYPESET defaults). +You have full access to all the +typesetting macros +as well as the +style control macros +of document processing. +

+With TYPEWRITE, mom does her best +to reproduce the look and feel of typewritten, double-spaced copy (see +TYPEWRITE defaults). +Control macros +and +typesetting macros +that alter family, font, point size, and +leading +are (mostly) ignored. An important exception is +HEADER_SIZE +(and, by extension, FOOTER_SIZE), which allows +you to reduce the point size of headers/footers should they become +too crowded. Most of mom's inlines affecting the +appearance of type are also ignored (\*S is an +exception; there may be a few others). +

+In short, TYPEWRITE never produces effects other than +those available on a typewriter. Don'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 TYPEWRITE. +

+The primary uses of TYPEWRITE 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's in the submission phase of its life (say, to show fellow +writers for critiquing), simply change TYPEWRITE +to TYPESET and print out a copy. +

+If, for some reason, you would prefer the output of +TYPEWRITE single-spaced, pass PRINTSTYLE +TYPEWRITE the optional argument, SINGLESPACE. +

+If you absolutely must have a leading other than typewriter double- +or singlespaced, the only way to get it is with the +DOC_LEAD +macro, and then ONLY if DOC_LEAD is set +before you invoke the START +macro. + +

TYPESET 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
+
+ +

TYPEWRITE 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
+
+ +

PRINTSTYLE TYPEWRITE control macros

+

+In PRINTSTYLE TYPEWRITE, mom, +by default, underlines anything that looks like italics. This +includes the +\*[SLANT] +inline escape +for pseudo-italics. +

+If you'd prefer that mom were +less bloody-minded about pretending to be a typewriter (i.e. +you'd like italics and pseudo-italics to come out as italics), +use the control macros .ITALIC_MEANS_ITALIC and +.SLANT_MEANS_SLANT. Neither requires an +argument. +

+Although it's unlikely, should you wish to reverse the sense of +these macros in the midst of a document, +.UNDERLINE_ITALIC and +.UNDERLINE_SLANT restore underlining of +italics and pseudo-italics. +

+Additionally, by default, mom underlines +quotes +(but not +blockquotes) +in PRINTSTYLE TYPEWRITE. +If you don't like this behaviour, turn it off with +

+

+	.UNDERLINE_QUOTES OFF
+
+ +To turn underlining of quotes back on, use +UNDERLINE_QUOTES without an argument. +

+While most of the +control macros +have no effect on PRINTSTYLE TYPEWRITE, there +is an important exception: +HEADER_SIZE +(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 +COPYSTYLE +is DRAFT). +
+ + + +


+

+ +Macro: COPYSTYLE DRAFT | FINAL + +

+Mom's default COPYSTYLE is +FINAL, so you don't have to use this macro unless +you want to. +

+DRAFT starts your document on page 1, regardless +of whether you've requested a different starting page number +with +PAGENUMBER. +Page numbers are set in lower case roman numerals. +Mom puts a draft and revision number (from the +DRAFT +and +REVISION +Reference Macros) +in +page headers +along with all other information that normally appears there. +

+FINAL respects the starting page number you give +your document. Page numbers are set in normal (arabic) digits, and +no draft or revision number appears in the page headers. +
+


+ + + +

Changing type/style parameters prior to START

+ +In the third (optional) part of setting up a document (see +Tutorial -- setting up a mom document), +you can use the +typesetting macros +to change mom's document-wide defaults for margins, +line length, family, base point size, +leading, +and justification style. +

+Two additional style concerns have to be addressed here (i.e. in +macros before +START): +changes to the +docheader, +and whether you want you want the document's nominal leading +adjusted to fill pages fully to the bottom margin. +

+

+ +
+

Using typesetting macros prior to START

+ +When used before the +START +macro, the following +typesetting macros +have these meanings: +

+

+	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
+	                 headers/footers or page numbers) ends on each page
+
+	(PAGE            If you use PAGE, its first 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
+	PS               The point size of type in paragraphs; mom uses this
+	                 calculate automatic point size changes (eg. for heads,
+	                 footnotes, quotes, headers, etc)
+	*LS or AUTOLEAD  The leading used in paragraphs; all leading and spacing
+	                 of running text is calculated from this
+	QUAD             Affects paragraphs only
+
+------
+*See DOC_LEAD_ADJUST
+
+ +Other macros that deal with type style, or refinements thereof +(KERN, LIGATURES, HY, WS, SS, etc.), behave normally. +It is not recommended that you set up tabs or indents prior to +START. +

+If you want to change any of the basic parameters above +after START and have them affect a +document globally (as if you'd entered them before +START), you must use the macros listed in +Changing document-wide style parameters after START. +
+ + + +


+

Adjusting document leading to fill pages

+
+Macro: DOC_LEAD_ADJUST toggle +
+*Must come after LS or AUTOLEAD and before START + +

+DOC_LEAD_ADJUST is a special macro to adjust +document +leading +so that bottom margins fall precisely where you expect. +

+If you invoke DOC_LEAD_ADJUST, mom +takes the number of lines that fit on the page at your requested +leading, then incrementally adds +machine units +to the leading until the maximum number of lines at the new leading +matches the bottom margin. In most instances, the difference +between the requested lead and the adjusted lead is +unnoticeable. +

+Mom uses DOC_LEAD_ADJUST with +her default document settings, but if you invoke +LS +or +AUTOLEAD +prior to +START, +you have to do +

+

+	.DOC_LEAD_ADJUST
+
+in order to enable it. +

+If you don't like the idea of mom playing around +with the leading by default, you can turn adjusting off with +

+

+	.DOC_LEAD_ADJUST OFF
+
+ +In this scenario, the maximum number of lines that fit on a page at +the current document leading determine where mom ends +a page. The effect will be that last lines usually fall (slightly) +short of your expected bottom margin. +

+NOTE: DOC_LEAD_ADJUST, if +used, must be invoked after +LS +or +AUTOLEAD +and before +START +
+ + + +


+

Managing the docheader

+
+Macro: DOCHEADER <toggle> [ distance to advance from top of page ] +
+*Must come before START; distance requires a unit of measure + +

+By default, mom prints a +docheader +on the first page of any document (see +below +for a description of the docheader). If you don't want a docheader, +turn it off with +

+

+	.DOCHEADER OFF
+
+ +DOCHEADER is a toggle macro, so the argument doesn't +have to be OFF; it can be anything you like. +

+If you turn the docheader off, mom, by default, starts +your document in the same place she would if the docheader were there. +If you'd like her to start at a different vertical position, give +her the distance you'd like as a second argument. +

+

+	.DOCHEADER OFF 1.5i
+
+ +This starts the document 1.5 inches from the top of the page. +The distance you give is measured from the top edge of the paper +to the +baseline +of the first line of type. +

+TIP: Since no document processing happens until +you invoke +START +-- including anything to do with docheaders -- you can typeset +your own docheader prior to START (if you don't +like the way mom does things) and use +DOCHEADER OFF with its optional distance argument +to ensure that the body of your document starts where you want. +You can even insert a PostScript file (with .PSPIC; +see the grops man page for usage). + +

How to change the look of docheaders: docheader control macros

+ +

+With +PRINTSTYLE TYPEWRITE, +the look of docheaders is carved in stone. +In +PRINTSTYLE TYPESET, +however, you can make a lot of changes. Macros that alter docheaders +MUST come before +START. + +

+A typeset docheader has the following characteristics. Note that +title, subtitle, author, and document type are what you supply +with the +reference macros. +Any you leave out will not appear; mom will +compensate: +

+

+	    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, underscored, 3 points larger than running text
+
+ +The +family +is the prevailing family of the whole document. + +

The docheader macros to:

+
    +
  1. Change the starting position +
  2. Adjust the leading +
  3. Change the family of docheader elements +
  4. Change the font of docheader elements +
  5. Adjust the size of docheader elements +
  6. Change the attribution string ("by") +
+

+

1. Change the starting position

+By default, a docheader starts on the same +baseline +as +running text. +If you'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: +

+

+	.DOCHEADER_ADVANCE 4P
+
+ +A +unit of measure +is required. +

+NOTE: If +HEADERS +are OFF, mom's normal top +margin for +running text +(7.5 +picas) +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. + + +

2. Adjust the leading

+The +leading of +docheaders is the same as running text. If you'd like a +different leading, say, 2 points more than the lead of running +text, use: +

+

+	.DOCHEADER_LEAD +2p
+
+ +Since the leading of docheaders is calculated from the lead of running +text, a + or - sign is required before the argument (how much to add +or subtract from the lead of running text). The +unit of measure +is also required. + +

3. Change the family of docheader elements

+The following macros let you change the +family +of each docheader element separately: +

+

    +
  • TITLE_FAMILY <family> +
  • SUBTITLE_FAMILY <family> +
  • AUTHOR_FAMILY <family> +
  • DOCTYPE_FAMILY <family> (if +DOCTYPE is NAMED) +
+

+Simply pass the appropriate macro the family you want. + +

4. Change the font of docheader elements

+The following macros let you change the +font +of each docheader element separately: +

+

    +
  • TITLE_FONT R | B | I | BI +
  • SUBTITLE_FONT R | B | I | BI +
  • AUTHOR_FONT R | B | I | BI +
  • DOCTYPE_FONT R | B | I | BI (if +DOCTYPE is NAMED) +
+

+Simply pass the appropriate macro the font you want. R, +B, I and BI have the same meaning as +they do for +FT. + + +

5. Adjust the size of docheader elements

+The following macros let you adjust the point size of each docheader +element separately. +

+Mom calculates the point size +of docheader elements from the point size of paragraphs, so you +must prepend a + or - sign to the argument. Points is +assumed as the +unit of measure, +so there's no need to append a unit to the argument. Fractional point +sizes are allowed. +

+

    +
  • TITLE_SIZE <+/-points> +
    +default = +3.5 (+4 if docheader title is "Chapter #") +
  • SUBTITLE_SIZE <+/-points> +
    +default = +0 +
  • AUTHOR_SIZE <+/-points> +
    +default = +0 +
  • DOCTYPE_SIZE <+/-points> (if +DOCTYPE is NAMED) +
    +default = +3 +
+

+Simply pass the appropriate macro the size adjustment you want. + +

6. Change the attribution string ("by")

+If you're not writing in English, you can change what +mom prints where "by" appears in +docheaders. For example, +

+

+	.ATTRIBUTE_STRING "par"
+
+ +changes "by" to "par". If you +don't want an attribution string at all, simply pass +ATTRIBUTE_STRING an empty argument, like this: +

+

+	.ATTRIBUTE_STRING ""
+
+ +Mom will deposit a blank line where the +attribution string normally appears. +

+NOTE: The type specs for the attribution line +in docheaders are the same as for the author line. Although +it's highly unlikely you'll want the attribution line in a +different family, font, or point size, you can do so by using +inline escapes +in the argument to ATTRIBUTE_STRING. For +example, +

+

+	.ATTRIBUTE_STRING "\f[HBI]\*S[-2p] by \*S[+2p]\*[PREV]"
+
+ +would set "by" in Helvetica bold italic, 2 points +smaller than normal. +
+
+ + + +

Setting documents in columns

+ +

+Setting documents in columns is easy with mom. (Of +course she'd say that, but it's true!) All you have to do is is +say how many columns you want and how much space you want +between them (the +gutters). +That's it. Mom takes care of everything else, from +soup to nuts. +

+SOME WORDS OF ADVICE: +

+If you want your type to achieve a pleasing +justification +or +rag +in columns, reduce the point size of type (and probably the +leading +as well). Mom's default document point +size is 12.5, which works well across her default 39 +pica +full page line length, but with even just two columns on a page, +the default point size is awkward to work with. +

+Furthermore, you'll absolutely need to reduce the indents for +epigraphs, +quotes, +and +blockquotes +(and probably the +paragraph first-line indent +as well). +
+ + + +


+

COLUMNS

+
+Macro: COLUMNS <number of columns> <width of gutters> +
+*Should be the last macro before START +
+The second argument requires a unit of measure
+ +

+COLUMNS takes two arguments: the number of +columns you want on document pages, and the width of the +gutter +between them. For example, to set up a page with two columns +separated by an 18 point gutter, you'd do +

+

+	.COLUMNS 2 18p
+
+ +Nothing to it, really. However, as noted above, +COLUMNS should always be the last document +setup macro prior to +START. +

+NOTE: Mom ignores columns completely +when the +PRINTSTYLE +is TYPEWRITE. The notion of typewriter-style +output in columns is just too ghastly for her to bear. + +

Breaking columns manually

+

+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. + + +

+.COL_NEXT breaks the line just before it, +quads +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 "column 1" position. This is the macro to use when +you want to start a new column after the end of a paragraph. + + +

+.COL_BREAK is almost the same, except that +instead of breaking and quadding the line preceding it, +she breaks and spreads it (see +SPREAD). +Use this macro whenever you need to start a new column in the middle +of a paragraph. +

+If you need COL_BREAK in the middle of a blockquote +or (god help us) an epigraph, you must do the following in order for +COL_BREAK to work: +

+

+	.SPREAD
+	\!.COL_BREAK
+
+
+ + + + +

Initiate document processing

+
+ +In order to use mom's document element macros +(tags), you have to tell her you want them. The macro to do this +is START. +

+START collects the information you gave +mom in the setup section at the top of your file (see +Tutorial -- setting up a mom document), +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 START. +
+ + + +


+

+ +Macro: START +
+*Required for document processing. + +

+START takes no arguments. It simply instructs +mom to begin document processing. If you don't +want document processing (i.e. you only want the +typesetting macros), +don't use START. +

+At a barest minimum before START, you must enter a +PRINTSTYLE +command. +
+


+ + + + +

Changing document-wide style parameters after START

+
+ +In the normal course of things, you change the basic type +parameters of a document before +START, +using +typesetting macros +(L_MARGIN, FAMILY, PS, LS, etc). After +START, you must use the following macros to make +global changes to the basic type parameters of a document. +
+ + +

Macro list

+
+ + +
+

+ + Macro: DOC_LEFT_MARGIN <left margin> + +
+*Requires a unit of measure +

+

    +
  • the argument is the same as for + L_MARGIN +
  • changes all left margins to the new value +
  • the line length remains the same (i.e. the right margin + shifts when you change the left margin) +
+ +
+ +
+

+ + Macro: DOC_RIGHT_MARGIN <right margin> + +
+*Requires a unit of measure +

+

    +
  • the argument is the same as for + R_MARGIN +
  • changes all right margins to the new value +
  • all mom commands that include a right indent calculate + the indent from the new value +
+
+ +
+

+ + Macro: DOC_LINE_LENGTH <length> + +
+*Requires a unit of measure +

+

    +
  • the argument is the same as for + LL +
  • equivalent to changing the right margin with DOC_RIGHT_MARGIN +
+
+ +
+

+ + Macro: DOC_FAMILY <family> + +

+

    +
  • the argument is the same as for + FAMILY +
  • globally changes the type family +
  • if you wish the + header + and/or page number families to remain at their old values, + you must reset them with + HEADER_FAMILY + and + PAGENUM_FAMILY +
+
+ +
+

+ + Macro: DOC_PT_SIZE <point size> + +
+*Does not require a unit of measure; points is assumed +

+

    +
  • the argument is the same as for + PS, + and refers to the point size of type in paragraphs +
  • 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) +
+
+ +
+

+ + Macro: DOC_LEAD <points> [ ADJUST ] + +
+*Does not require a unit of measure; points is assumed +

+

    +
  • the argument is the same as for + LS, + and refers to the + leading + of paragraphs +
  • because paragraphs will have a new leading, the leading and + spacing of most running text is influenced by the new value +
  • epigraphs and footnotes remain unaffected; + if you wish to change their leading, use + EPIGRAPH_AUTOLEAD + and + FOOTNOTE_AUTOLEAD. +
  • the optional argument ADJUST performs + leading adjustment as explained in + DOC_LEAD_ADJUST +
+

+IMPORTANT: Do not use DOC_LEAD +in the middle of a page! Always precede it with a manual break +to a new page, like this: +

+

+	.NEWPAGE
+	.DOC_LEAD <new value>
+
+ +
+

+ + Macro: DOC_QUAD L | R | C | J + +

+

    +
  • the arguments are the same as for + QUAD +
  • affects paragraphs, epigraphs and footnotes; does not + affect blockquotes +
+ +

+


+Next   +Prev   +Top   +Back to Table of Contents + + diff --git a/contrib/mom/momdoc/goodies.html b/contrib/mom/momdoc/goodies.html new file mode 100644 index 00000000..1e8551cb --- /dev/null +++ b/contrib/mom/momdoc/goodies.html @@ -0,0 +1,923 @@ + + + +Mom -- Goodies + + + + + +Next   +Prev   +Back to Table of Contents + + + +

Goodies

+
+ + +The macros in this section are a collection of useful (and sometimes +nearly indispensible) routines to simplify typesetting. + + +

Goodies list

+
+ + + + + +
+

Rename macros

+
+Macro: ALIAS <new name> <old name> + +

+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; see the +list of reserved words). +

+Groff has always been a bit intimidating for new users because +its standard macro packages use very terse macro names. +Mom doesn'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't what you automatically think of +when you want to do a particular thing, or might conflict with habits +you've developed over the years. +

+If you don't like one of mom's macro names, +say, PAGEWIDTH, change it, like this: +

+

+	.ALIAS PW PAGEWIDTH
+	       |      |
+	  new__|      |__official
+	 name            name
+
+ +The first argument to ALIAS is the new name you want +for a macro. The second is the "official" name by +which the macro is normally invoked. After ALIAS, +either can be used. +

+Note that in ALIAS, you do NOT include the period +(dot) that precedes the macro when it's a +control line. +

+NOTE: If you use ALIAS a lot, +and always for the same things, consider creating an aliases +file of the form +

+

+	.ALIAS <new name> <old name>
+	.ALIAS <new name> <old name>
+	.ALIAS <new name> <old name>
+	...etc
+
+ +Put the file someplace convenient and source it at the +beginning of your documents using the groff +primitive +.so. Assuming that you've created an aliases file +called mom_aliases in your home directory under a directory +called Mom, you'd source it by placing +

+

+	.so /home/<username>/Mom/mom_aliases
+
+ +at the top of your documents. +

+If you share documents that make use of an alias file, remember that +other people don't have the file! Paste the whole thing at the top +of your documents, please. +

+EXPERTS: ALIAS is an alias of +.als. You can use either, or mix 'n' match with +impunity. +
+ + + +


+

Hide input lines from output

+
+Macro: SILENT toggle +
+Alias: COMMENT + +

+Sometimes, you want to "hide" +input lines +from final output. This is most likely to be the case when setting +up string tabs (see the +quickie tutorial on string tabs +for an example), but there are other places where you might want input +lines to be invisible as well. Any place you don't want input lines +to appear in the output, use the SILENT macro. +

+SILENT is a toggle. Invoking it without an argument +turns it on; any argument turns it off. E.g., +

+

+	.SILENT
+	A line of text
+	.SILENT OFF
+
+ +The line "A line of text" will not appear in the +output copy. +

+SILENT is aliased as COMMENT. +If you want to insert non-printing comments into your documents, +you may prefer this. +

+NOTE: SILENT does not automatically break an +input line +(see +BR) +when you're in one of the +fill modes +(JUSTIFY +or +QUAD L | R | C | J). +The same applies to tabs +(typesetting +or +string) +to which you've passed the J or QUAD +argument. You must insert .BR yourself, or risk a +portion of your text disappearing into a black hole. +
+ + + +


+

Suspend/re-invoke traps

+
+Macro: TRAP toggle + +

+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 automatic behind-the-scenes processing is needed +in order for one page to finish and another to start. +

+Sometimes, traps get sprung when you don't want them, notably +when using the +EL +and +TN +macros. If this happens, surround just the offending macros and +input lines with +

+

+	.TRAP OFF
+	...
+	.TRAP
+
+ +TRAP is a toggle, therefore any argument +turns it off (i.e. suspends the trap), and no argument turns it +(back) on. +

+Have a look at the IMPORTANT sections +of EL and TN to see +TRAP in action. +
+ + + +


+

Smartquotes

+
+Macro: SMARTQUOTES toggle + +

+SMARTQUOTES converts all instances of the +inch-mark, (" -- also called a "doublequote"), +into the appropriate instances of true open- and close-doublequotes. +

+Typographically, there is a difference between the inch-mark and +doublequotes -- 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't want to look like an amateur, do you? +

+When preparing documents for typesetting, by all means, use the +inch-mark. Just make sure to turn SMARTQUOTES +on. SMARTQUOTES is a toggle, so invoking it with +no argument turns it on, and invoking it with any argument at all +turns it off. +

+If you're using the +document processing macros +with +PRINTSTYLE TYPESET, +SMARTQUOTES is on by default; with +PRINTSTYLE TYPEWRITE, +it's off by default (and should probably stay that way). +

+NOTE: SMARTQUOTES does not work on +single quotes, which most people input with the apostrophe (found at +the right-hand end of the "home row" 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. (Pour nous autres, "backtick" veut dire +l'accent grave.) +Here's an example of correct input copy with single quotes: +

+

+	"But she said, `I don't want to!'"	
+
+ +ADDITIONAL NOTE: 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 +inline escapes +\*[FOOT] and \*[INCH], instead +of ' and ". +
+ + + +
+

Convert to upper case

+
+Macro: CAPS toggle + +

+CAPS converts all lower case letters to upper +case. Primarily, it's a support macro used by the +document processing macros, +but you may find it helpful on occasion. CAPS +is a toggle, therefore no argument turns it on, any argument +turns it off. +

+

+	.CAPS
+	All work and no play makes Jack a dull boy.
+	.CAPS OFF
+
+ +produces, on output +

+

+	ALL WORK AND NO PLAY MAKES JACK A DULL BOY.
+
+ + + +
+

Single underscore

+
+Macro: UNDERSCORE [ <distance below baseline> ] "<string>" +
+*Optional argument requires a unit of measure + +

+By default, UNDERSCORE places an underscore 2 points +beneath the required +string argument. +The string must be enclosed in double-quotes, like this: +

+

+	.UNDERSCORE "Unmonitored monopolies breed high prices and poor products."
+
+ +If you wish to change the distance of the rule from the +baseline, use the optional argument <distance below +baseline> (with a unit of measure). +

+

+	.UNDERSCORE 3p "Unmonitored monopolies breed high prices and poor products."
+
+ +The above places the underscore 3 points below the baseline. +

+ +NOTES: +
+UNDERSCORE does not work across line breaks in output +copy, which is to say that you can't underscore a multi-line passage +simply by putting the text of the whole thing in the string you pass +to UNDERSCORE. Each +output line +or portion of an output line you want underscored must be plugged +separately into UNDERSCORE. Bear in mind, though, +that underscoring should at best be an occasional effect in typeset +copy. If you want to emphasize an entire passage, it's much, much +better to change fonts (e.g. to italic or bold). +

+You can easily and successfully underline entire passages in simulated +typewriter-style copy (i.e. if your font is Courier, or you're using +the document processing macro +PRINTSTYLE TYPEWRITE), +with the +UNDERLINE +macro. UNDERLINE is designed specifically for this +purpose, but works only with the Courier font. +

+Mom doesn't always get the position and length +of the underscore precisely right in +justified +copy, although she's fine with all the other +fill modes, +as well as with the no-fill modes. As of this writing, I have +no solution to the occasional problems with justified copy. +

+UNDERSCORE tends to confuse +gxditview, even though the output, when +printed, looks fine. Generally, I recommend using gv +to preview files anyway. See the section on +previewing. +
+ + + +


+

Double underscore

+
+Macro: UNDERSCORE2 [ <distance below baseline> [ <distance between rules> ] ] "<string>" +
+*Optional arguments require a unit of measure + +

+By default, UNDERSCORE2 places a double underscore +2 points beneath the required +string argument. +The string must be enclosed in double-quotes, like this: +

+

+	.UNDERSCORE2 "Unmonitored monopolies breed high prices and poor products."
+
+ +The default distance between the two rules is 2 points. +

+If you wish to change the distance of the double underscore from +the baseline, use the optional argument <distance below +baseline> (with a unit of measure), e.g., +

+

+	.UNDERSCORE2 3p "Unmonitored monopolies breed high prices and poor products."
+
+ +which places the double underscore 3 points below the baseline. +

+If you wish to change the distance between the two rules as +well, use the second optional argument <distance between +rules> (with a unit of measure). Be aware that you must +give a value for the first optional argument if you want to use +the second. +

+NOTE: the same restrictions and caveats apply +to UNDERSCORE2 as to +UNDERSCORE. See the +NOTES +for UNDERSCORE. +
+ + + +


+

Underline text -- Courier font only!

+
+Macro: UNDERLINE toggle + +

+If your font is Courier, or you're using the document processing macro +PRINTSTYLE TYPEWRITE, +UNDERLINE allows you to underline words and +passages that, in typeset copy, would be italicised. You invoke +UNDERLINE as you do with all toggle macros -- +by itself (i.e. with no argument) to initiate underlining, and +with any argument to turn underlining off. +

+When on, UNDERLINE underlines letters, words +and numbers, but not punctuation or spaces. This makes for more +readable copy than a solid underline. +

+NOTE: Underlining may also be turned on and off +inline +with the escapes +\*[UL]...\*[ULX]. +
+ + + +


+

Inline escape for underlining -- Courier font only!

+
+Inline: \*[UL]...\*[ULX] + +

+If your font is Courier, or you're using the document processing macro +PRINTSTYLE TYPEWRITE, +\*[UL]...\*[ULX] underlines words and +passages that, in typeset copy, would be italicised. +

+\*[UL] underlines all letters, words and numbers +following it, but not punctuation or spaces. This makes for more +readable copy than a solid underline. When you no longer want +underlining, \*[ULX] turns underlining off. +

+The macro +UNDERLINE +and the inline escape \*[UL] are functionally +identical, hence +

+

+	.FAM C
+	.FT R
+	.PS 12
+	.LS 24
+	.SS 0
+	.QUAD LEFT
+	Which should I heed?
+	.UNDERLINE
+	Just do it
+	.UNDERLINE OFF
+	or
+	.UNDERLINE
+	just say no?
+	.UNDERLINE OFF
+
+ +produces the same result as +

+

+	.FAM C
+	.FT R
+	.PS 12
+	.LS 24
+	.SS 0
+	.QUAD LEFT
+	Which should I heed? \*[UL]Just do it\*[ULX] or \*[UL]just say no?\*[ULX]
+
+ + + +
+

Insert space into lines

+
+Macro: PAD "<string with pad markers inserted>" + +

+With PAD, you can insert unspecified amounts of +whitespace into a line. +

+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. +

+Take, for example, the following relatively common typesetting +situation, found at the bottom of legal agreements: +

+

+	Date             Signature                               |
+
+ +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, | represents +the end of the line at the prevailing line length.) +

+The +pad marker +(see below) is # (the pound or number sign on your keyboard) and +can be used multiple times in a line. With that in mind, here's how +you'd input the Date/Signature line (assuming a length of 30 picas): +

+

+	.LL 30P
+	.PAD "Date#Signature###"
+
+ +When the line is output, the space remaining on the line, after +"Date" and "Signature" 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. +

+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 +string tabs. +The following uses the Date/Signature example above, but adds +rules into the whitespace through the use of string tabs and +groff's line drawing function, +\l. +

+

+	.LL 30P
+	.PAD "Date\*[ST1]#\*[ST1X]Signature\*[ST2]###\*[ST2X]"
+	.EL
+	.ST 1 J
+	.ST 2 J
+	.TAB 1
+	\l'\n(.lu'
+	.TN
+	\l'\n(.lu'
+	.TQ
+
+ +If you're not a typesetter, and if you're new to groff, the +example probably looks like gibberish. My apologies. However, +remember that typesetting is a craft, and without having studied +the craft, it takes a while to grasp its concepts. Also, +although mom tries very hard to provide +consistent-looking, comprehensible alternatives to groff's +native +inline escapes, +mom has not yet found a replacement for +\l. +

+Basically, what the example does is: +
+

    +
  1. Pads the Date/Signature line (using the pad marker #), + encloses the padded space with two string tabs markers, + and outputs the line +
    +
  2. Sets the two string tabs (notice the use of + EL + beforehand; you don't want mom + to advance a line at this point) +
    +
  3. Calls the first string tab and draws a rule to its full + length +
    +
  4. Calls the second tab with + TN + (which moves to tab 2 and stays on the same baseline) + then draws a rule to the full length of string tab 2 +
+
+Often, when setting up string tabs this way, you don't want the +padded line to print immediately. To accomplish this, use +SILENT. +See the quickie tutorial on string tabs +for an example. +

+NOTE: Because the pound sign (#) is used as the pad +marker, you can'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 PAD_MARKER. Also, be aware +that # as a pad marker only applies within the PAD +macro; at all other times it prints literally, just as you'd expect. +

+Another important consideration when using PAD is that +because the string must be enclosed in double-quotes, you can't use the +double-quote (") as part of the string. The way to circumvent +this is to use the groff +inline escapes +\(lq and \(rq (leftquote and +rightquote respectively) whenever double-quotes are required in the +string passed to PAD. +
+ + + +


+

Change/set the marker used with PAD

+
+Macro: PAD_MARKER <character to use as the pad marker> + +

+If you need to change mom's default pad marker +(#), 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. +

+

+	.PAD_MARKER @
+
+ +changes the pad marker to @. +

+Once you've changed the pad marker, the new marker remains in +effect for every instance of +PAD +until you change it again (say, back to the pound sign). +
+ + + +


+

Inline escape to add leaders to a line

+
+Inline: \*[LEADER] + +

+Whenever you want to fill a line or tab with +leaders, +use the +inline escape +\*[LEADER]. The remainder of the line or tab will be +filled with the leader character. Mom's +default leader character is a period (dot), but you can change +it to any character you like with +LEADER_CHARACTER. +

+NOTE: \*[LEADER] 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. +String tabs are perfect for this. An +example follows. +

+

+	.LL 30P
+	.PAD "Date\*[ST1]#\*[ST1X]Signature\*[ST2]###\*[ST2X]"
+	.EL
+	.ST 1 J
+	.ST 2 J
+	.TAB 1
+	\*[LEADER]
+	.TN
+	\*[LEADER]
+	.TQ
+
+ +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 "set", called, and filled +with leaders. The result looks like this: +

+

+	Date.............Signature.....................................
+
+ + + +
+

Change/set the leader character

+
+Macro: LEADER_CHARACTER <character> + +

+LEADER_CHARACTER takes one argument: a single +character you would like to be used for +leaders. +(See +\*[LEADER] for an explanation of how to +fill lines with leaders.) +

+For example, to change the leader character from mom's +default (a period) to the underscore character, enter +

+

+	.LEADER_CHARACTER _
+
+ + + +
+

Drop caps

+
+Macro: DROPCAP <dropcap letter> <number of lines to drop> [ COND <percentage> | EXT <percentage> ] + +

+The first two arguments to DROPCAP are the letter you +want to be the +drop cap +and the number of lines you want it to drop. By default, +mom uses the current family and font for the drop cap. +

+The optional argument (COND or EXT) indicates that you want the +drop cap condensed (narrower) or extended (wider). If you use +COND or EXT, you must follow the +argument with the percentage of the letter's normal width you want +it condensed or extended. No percent sign (%) is required. +

+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. +

+Beginning a paragraph with a drop cap "T" looks +like this: +

+

+	.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...
+
+ +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's text will revert to the left margin. +

+NOTE: When using the +document processing macro +PP, +DROPCAP only works +
+

    +
  • with initial paragraphs (i.e. at the start of the document, + or after + HEAD), +
  • when DROPCAP comes immediately after PP, +
  • and when the + PRINTSTYLE + is TYPESET. +
+
+If these conditions aren't met, DROPCAP is silently ignored. +

+WARNING: 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. + +

Support macros for DROPCAP

+Drop caps are the bane of most typesetters' existence. It'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'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. +

+Mom solves the last of these problems with the +COND and EXT arguments. The +rest she solves with macros that change the default behaviour of +DROPCAP, namely +

+DROPCAP_FAMILY, +
+DROPCAP_FONT, +
+DROPCAP_ADJUST +
+and +
+DROPCAP_GUTTER. +

+These macros must, of course, come before you invoke +DROPCAP. + +

DROPCAP_FAMILY

+ +Set the drop cap family by giving +DROPCAP_FAMILY the name of the family you want, +e.g. +

+

+	.DROPCAP_FAMILY H
+
+ +which will set the family to Helvetica for the drop cap only. + +

DROPCAP_FONT

+ +Set the drop cap font by giving +DROPCAP_FONT the name of the font you want, +e.g. +

+

+	.DROPCAP_FONT I
+
+ +which will set the font to italic for the drop cap only. + +

DROPCAP_ADJUST

+ +If the size mom calculates for the drop cap +isn't precisely what you want, you can increase or decrease it +with DROPCAP_ADJUST, like this: +e.g. +

+

+	.DROPCAP_ADJUST +1
+	    or
+	.DROPCAP_ADJUST -.75
+
+ +DROPCAP_ADJUST only understands +points, +therefore do not append any +unit of measure +to the argument. And always be sure to preprend the plus or +minus sign, depending on whether you want the drop cap larger or +smaller. + +

DROPCAP_GUTTER

+ +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: +

+

+	.DROPCAP_GUTTER 6p
+
+ + + +
+

Superscript

+
+Inlines: \*[SUP]...\*[SUPX] + +

+Superscripts are accomplished +inline. +Whenever you need one, typically for numerals, all you need to +do is surround the superscript with the inlines above. +\*[SUP] begins superscripting; +\*[SUPX] turns it off. + + +

+If your running type is +pseudo-condensed +or +pseudo-extended +and you want your superscripts to be equivalently pseudo-condensed or +-extended, use \*[CONDSUP]...\*[CONDSUPX] or +\*[EXTSUP]...\*[EXTSUPX]. +

+The superscript inlines are primarily used by the +document processing macros +for automatic generation of numbered footnotes. However, you may +find them useful for other purposes. +

+NOTE: Mom does a pretty fine job of +making superscripts look good in any font and at any size. If you're +fussy, though (and I am), about precise vertical placement, kerning, +weight, size, and so on, you may want to roll your own solution. +And sorry, there's no mom equivalent for subscripts. +I'm neither a mathematician nor a chemist, so I don't need them. +Of course, anyone who wishes to contribute a subscript routine to +mom will receive eternal blessings not only in this +lifetime, but in all lifetimes to come. + +

+


+Next   +Prev   +Top   +Back to Table of Contents + + diff --git a/contrib/mom/momdoc/headfootpage.html b/contrib/mom/momdoc/headfootpage.html new file mode 100644 index 00000000..3e0b7b54 --- /dev/null +++ b/contrib/mom/momdoc/headfootpage.html @@ -0,0 +1,1081 @@ + + + +Mom -- Document processing: headers, footers and pagination + + + + + +Next   +Prev   +Back to Table of Contents + + + +

DOCUMENT HEADERS, FOOTERS, AND PAGINATION

+
+ + + + +

Introduction

+
+ +

+Headers +and +footers, +as defined in the section +Mom's Document Processing Terms, +are those parts of a document that contain information about the document +itself which appear in the margins either above or below +running text. +They are, in all respects but two, identical. The differences are: +

+

    +
  1. headers appear in the margin above running text while + footers appear in the margin beneath running text; +
  2. the (optional) rule that separates headers from running + text appears below the header while + the (optional) rule that separates footers from running + text appears above the footer. +
+ +

+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. +

+Furthermore, any +control macro +that begins with HEADER_ may be used to control +footers, simply by replacing HEADER_ with +FOOTER_. +

+Author's note: Left to their own devices (i.e. if +you'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. + +

+NOTE: 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. + +

General description of headers/footers

+

+Headers comprise three distinct parts: a left part, a center part, +and a right part. Each part contains text (a "string") +that identifies some aspect of the document as a whole. +

+The left part ("header left") lines up with the document's +left margin. The center part ("header center") is +centered on the document's line length. The right part ("header +right") lines up with the document's right margin. Not all parts +need contain a string, and if you don't want headers at all, you can +turn them off completely. +

+A note to groff experts: Although +mom's headers resemble the three-part titles generated +by .tl, they're in no way related to it, nor based +upon it. .tl is not used at all in mom. +

+Normally, mom fills headers with strings appropriate +to the document type selected with +DOCTYPE. +You can, however, supply whatever strings you like -- including page +numbers -- to go in any part of headers. What's more, you can set the +family, font, size and capitalisation style (caps or caps/lower-case) +for each header part individually. +

+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 running text. You can increase +or decrease the space between the header and the rule if you like (with +HEADER_RULE_GAP), +or remove it completely. + +

Default specs for headers/footers

+

+Mom makes small type adjustments to each part of +the header (left, center, right) to achieve an aesthetically +pleasing result. The defaults are listed below. (The strings +mom puts by default in each part are explained in +DOCTYPE.) +

+NOTE: Except for capitalization (all caps or +caps/lower-case), these defaults apply only to +PRINTSTYLE TYPESET. +

+

+TYPE SPEC    HEADER LEFT         HEADER CENTER       HEADER RIGHT
+---------    -----------         -------------       ------------
+Family       document default    document default    document default
+Font         roman               italic              roman
+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 type in paragraphs
+
+ +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, +HEADER_PLAIN, +that removes all type adjustments to headers. The straightforward +type specs for paragraphs are used instead, providing a simple +reference point for any alterations you want to make to the family, +font, size and capitalisation style of any header part. +

Vertical placement and spacing of headers/footers

+

+As explained in the section on +typesetting macros in document processing, +the top and bottom margins of a mom document +are the vertical start and end positions of +running text, +not the vertical positions of headers or footers, which, by definition, +appear in the margin above (or below) running text. +

+The vertical placement of headers +is controlled by the macro +HEADER_MARGIN, +which establishes the +baseline +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. +FOOTER_MARGIN establishes the baseline position of +footers relative to the bottom edge of the page. +

+HEADER_GAP establishes +the distance between headers and the start of running text (effectively +making HEADER_MARGIN + HEADER_GAP the top margin of +running text unless you give mom a literal top margin +(with +T_MARGIN), +in which case she ignores HEADER_GAP and starts +running text at whatever top margin you gave. +FOOTER_GAP and +B_MARGIN +work similarly, except they determine where running text +ends on the page. +

+Confused? Mom apologizes. It's really quite +simple. By default, mom sets headers 4-1/2 +picas +down from the top of the page and starts running text 3 picas (the +HEADER_GAP) beneath that, which means the +effective top margin of running text is 7-1/2 picas (visually approx. 1 +inch). If you give mom a literal top margin (with +T_MARGIN), +she ignores the HEADER_GAP and starts running +text at whatever top margin you gave. +

+Footers are treated the same way, the only difference being the +default distances. 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). If you give mom a literal bottom +margin (with B_MARGIN), she ignores the +FOOTER_GAP and interrupts the processing of running +text at whatever bottom margin you gave. +

+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 +Pagination control. +
+


+ + + + +

Managing headers/footers

+
+ +

+The following are the basic macros for turning +headers +or +footers +on or off. They should be invoked prior to +START. +

+By default, mom prints page headers. If you turn +them off, she will begin +running text +on each page with a default top margin of 6 +picas +unless you have requested a different top margin (with +T_MARGIN) +prior to +START. +

+Please note that headers and footers 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'd prefer footers in a document, you need only invoke +FOOTERS; +there's no need to turn headers off first. +
+ + + +


+

+ +Macro: HEADERS toggle + +

+Page headers +are on by default. If you don't want them, turn them off by +invoking HEADERS with any argument +(OFF, QUIT, END, X...), e.g. +

+

+	.HEADERS OFF
+
+

+NOTE: HEADERS automatically +disables +footers +(you can't have both), but not the page numbers that normally +appear at the bottom of the page. +

+ADDITIONAL NOTE: If HEADERS +are OFF, mom's normal top +margin for +running text +(7.5 +picas) +changes to 6 picas (visually approx. 1 inch). This does NOT apply +to the situation where footers have been explicitly turned on +(with +FOOTERS). +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.) +
+ + + +


+

+ +Macro: FOOTERS toggle + +

+Page footers +are off by default. If you want them instead of +headers +(you can't have both), turn them on by invoking +FOOTERS without an argument, e.g. +

+

+	.FOOTERS
+
+ +

+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. +

+NOTE: 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 +COLLATE. +If you don't want this behaviour, you can change it with +PAGENUM_ON_FIRST_PAGE. +
+ + + +


+

+ +Macro: FOOTER_ON_FIRST_PAGE toggle + +

+If you invoke +FOOTERS, +mom, by default, does not print a footer on the +first page of the document. (The +docheader +on page makes it redundant.) However, should you wish a footer on +page 1, invoke FOOTER_ON_FIRST_PAGE without any argument. +
+


+ + +

Control macros for headers/footers

+
+

+Virtually every part of headers (see the paragraph on how +"headers" means "footers" +in the +introduction to headers/footers) +can be designed to your own specifications. + + +

Header/footer control macros

+ + + + + + +
+

Header/footer strings

+

+ + Macro: HEADER_LEFT "<text of header left>" | # + +
+ + Macro: HEADER_CENTER "<text of header center>" | # + +
+ + Macro: HEADER_RIGHT "<text of header right>" | # + + +

+To change the text (the "string") of the left, center, +or right part of headers, invoke the appopriate macro above with +the string you want. For example, mom, by default, +prints the document'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: +

+

+	.HEADER_LEFT "R. Stallman, E. Raymond"
+
+ +Because the arguments to HEADER_LEFT, _CENTER, +and _RIGHT are +string arguments, +they must be enclosed in double-quotes. +

+NOTE: Replace HEADER_, above, +with FOOTER_ to change the strings in footers. +
+ + +

Replacing header-left, -center or -right with the page number

+ +If you would like the current page number to appear +header-left, -center, or -right instead of a text +string, invoke the appropriate macro, above, with the single +argument # (the "number" or +"pound" sign). Do NOT use +double-quotes. For example, +

+

+	.HEADER_CENTER #
+
+ +will print the current page number in the center part of +headers. + + +

Including the page number in header-left, -center or -right

+
+If you would like to include the current page number in +the string you pass to HEADER_LEFT, _CENTER, or +_RIGHT, use the special +inline escape +\*[PAGE#] in the string argument. +

+For example, say you have a document that's ten pages long, and +you want header-right to say "page <whichever> of 10", +invoke HEADER_RIGHT as follows: +

+

+	.HEADER_RIGHT "page \*[PAGE#] of 10"
+
+ +Header-right of page two will read "page 2 of 10", +header-right of page three will read "page 3 of 10", +and so on. +
+
+ + + +

Header/footer style

+ +

+Global changes +

+The following macros allow you to make changes that affect all +parts of the header at once. +

+

+ +
+

+ + Macro: HEADER_FAMILY <family> + + +

+By default, mom uses the default document family +for headers. If you would like her to use another +family +in headers, invoke HEADER_FAMILY with the identifier +for the family you want. The argument is the same as for the +typesetting macro +FAMILY. +

+NOTE: Replace HEADER_, above, +with FOOTER_ to change the footer family. +
+ +


+

+ + Macro: HEADER_SIZE <+|-number of points> +
+ *Argument is relative to the point size of type in paragraphs +
+ +

+By default, mom makes small adjustments to the size +of each part of a header to achieve an aesthetically pleasing result. +If you'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 HEADER_SIZE with + or - the number of +points +(fractions allowed) by which you want her to in/decrease the size +of headers. For example, +

+

+	.HEADER_SIZE +.75
+
+ +increases the size of every part of a header by 3/4 of a point while +respecting mom's own little size changes. +

+See +Arguments to the control macros +for an explanation of how control macros ending in +_SIZE work. +

+Normally, macros that control headers have no effect on +PRINTSTYLE TYPEWRITE. +HEADER_SIZE is an exception. While all parts of a +header in PRINTSTYLE TYPEWRITE are the same size, you +can use HEADER_SIZE to reduce the header's point size. +You'll most likely require this when the +COPYSTYLE +is DRAFT, since portions of the header may overprint +if, say, the title of your document is very long. +

+NOTE: Replace HEADER_, above, +with FOOTER_ to change the footer size. +
+ +


+

+ + Macro: HEADER_PLAIN + + +

+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's defaults, +invoke HEADER_PLAIN 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, +and point size as she uses in text paragraphs. +

+NOTE: Replace HEADER_, above, +with FOOTER_ to disable mom's +default behaviour for the various elements of footer style. +
+ +


+

+Part by part changes +

+NOTE: When using the following control macros, +replace "<POSITION>" by LEFT, CENTER, +or RIGHT as appropriate. +

+

+ +
+

+ + Macro: HEADER_<POSITION>_FAMILY <family> + +

+Use HEADER_<POSITION>_FAMILY to change the +family +of any part of headers. See +Arguments to the control macros +for an explanation of how control macros ending in +_FAMILY work. +

+NOTE: Replace HEADER_, above, +with FOOTER_ to change a footer part's family. +
+ +


+

+ + Macro: HEADER_<POSITION>_FONT <font> + +

+Use HEADER_<POSITION>_FONT to change the +font +of any part of headers. See +Arguments to the control macros +for an explanation of how control macros ending in +_FONT work. +

+NOTE: Replace HEADER_, above, +with FOOTER_ to change a footer part's font. +
+ +


+

+ + Macro: HEADER_<POSITION>_SIZE <+|-number of points> + +

+Use HEADER_<POSITION>_SIZE to change the size of any +part of headers (relative to the point size of type in +paragraphs). See +Arguments to the control macros +for an explanation of how control macros ending in +_SIZE work. +

+NOTE: Replace HEADER_, above, +with FOOTER_ to change a footer part's size. +
+ +


+

+ + Macro: HEADER_<POSITION>_CAPS toggle + +

+HEADER_<POSITION>_CAPS is a +toggle macro. +If you want any part of headers to be set in all caps, +regardless of the capitalization of that part's string as given +to the +reference macros +or as defined by you with the +header string control macros, +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 argument with any argument (e.g. OFF, +QUIT, END, X...). +

+NOTE: Replace HEADER_, above, +with FOOTER_ to change a footer part's +capitalization style. +
+


+ + + + +

Header/footer vertical placement and spacing

+
+ +

+See +Vertical placement and spacing of headers/footers +for an explanation of how mom deals with +headers, footers, and top/bottom page margins. +
+ + + +


+

+ +Macro: HEADER_MARGIN <distance to baseline of header> +
+*Requires a unit of measure + +

+Use HEADER_MARGIN to set the distance from the +top edge of the page to the +baseline +of type in headers. A unit of measure is required, and decimal +fractions are allowed. +

+Mom's default header margin is 4-1/2 +picas, +but if you want a different margin, say, 1/2-inch, do +

+

+	.HEADER_MARGIN .5i
+
+ +If your document uses +footers, +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's default footer margin is 3 +picas. +

+NOTE: Mom uses +HEADER_MARGIN and +FOOTER_MARGIN to establish the baseline +position of page numbers in addition to headers and footers. +

+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 +FOOTERS +on or because you instructed mom to put them +there with +PAGENUM_POS, +you'd use HEADER_MARGIN to change their +baseline placement. +
+ + + +


+

+ +Macro: HEADER_GAP <distance from header to start of running text> +
+*Requires a unit of measure + +

+Use HEADER_GAP to set the distance from the +baseline +of type in headers to the start of +running text. +A unit of measure is required, and decimal fractions are allowed. +

+As explained in +Vertical placement and spacing of headers/footers, +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 +T_MARGIN). If you give +a top margin, mom ignores +HEADER_GAP; running text starts at your stated +top margin. + +

+Mom's default header gap is 3 +picas, +but if you want a different gap, say, 2 centimeters, do +

+

+	.HEADER_GAP 2c
+
+ +If your document uses +footers, +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. +

+As explained in +Vertical placement and spacing of headers/footers, +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 +B_MARGIN). If you give +a bottom margin, mom ignores +FOOTER_GAP; running text ends at your stated +bottom margin. +

+Mom's default footer gap is 3 +picas. +

+NOTE: 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. +
+


+ + + + +

Header/footer separator rule

+
+ +

+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 +header +and helps separate it visually from +running text. If +you don'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. +

+

+ +
+

+ +Macro: HEADER_RULE toggle + +

+By default, mom prints a header separator rule +underneath headers (or above footers). If you don't want the +rule, turn it off by invoking HEADER_RULE with any +argument (OFF, QUIT, END, X...), e.g. +

+

+	.HEADER_RULE OFF
+
+ +To turn the rule (back) on, invoke HEADER_RULE +without any argument. +

+NOTE: Replace HEADER_, above, +with FOOTER_ to enable/disable the printing of +the footer separator rule. (Most likely, if you're using +FOOTERS, you'll want it off.) +
+ + + +


+

+ +Macro: HEADER_RULE_GAP distance of rule beneath header +
+*Requires a unit of measure + +

+HEADER_RULE_GAP is the distance from the +baseline +of type in headers to the rule underneath. A unit of measure is +required, and decimal fractions are allowed. Please note that +HEADER_RULE_GAP has no effect on +HEADER_GAP +(i.e. HEADER_RULE_GAP is NOT added to +HEADER_GAP when mom calculates +the space between headers and the start of +running text. +

+By default, the header rule gap is 4 +points. +If you'd like to change it to, say, 1/4 +em, do +

+

+	.HEADER_RULE_GAP .25m
+
+ +NOTE: Replace HEADER_, above, +with FOOTER_ if you're using +footers +and want to change the separator rule gap. In footers, the gap +is measured from the top of the tallest +ascender +in the footer. +
+
+ + +

Pagination

+
+ +

+By default, mom paginates documents. Page numbers +appear in the bottom margin of the page, centered between two hyphens. +As with all elements of mom's document processing, +most aspects of pagination style can be altered to suit your taste +with control macros. +
+ + +

Pagination macros list

+ + + +
+ + + +
+

+ +Macro: PAGINATE toggle +
+Alias: PAGINATION + +

+By default, mom paginates documents (in the bottom +margin). If you'd prefer she not paginate, turn pagination off +by invoking PAGINATE with any argument (OFF, +NO, QUIT, END, X...), e.g. +

+

+	.PAGINATE NO 
+
+ +To (re)start pagination, invoke PAGINATE +without any argument. +
+ + + +
+

+ +Macro: PAGENUMBER <number> + +

+As is to be expected, pagination of documents begins at page 1. +If you'd prefer that mom begin with a different +number on the first page of a document, invoke +PAGENUMBER with the number you want. +

+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. +
+ + + +


+

+ +Macro: PAGENUM_STYLE DIGIT | ROMAN | roman | ALPHA | alpha + +

+PAGENUM_STYLE lets you tell +mom what kind of page numbering you want. +

+ + +
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...)
+
+ + + +


+

+ +Macro: PAGENUM_ON_FIRST_PAGE toggle + +

+This macro applies only if you've enabled +FOOTERS. +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 +COLLATE). If you'd +like the page number to appear on "first" pages when +footers are on, invoke PAGENUM_ON_FIRST_PAGE with +no argument. Any other argument turns the feature off (OFF, +QUIT, END, X...). +

+As with most of the control macros, +PAGENUM_ON_FIRST_PAGE can be invoked at any time, +meaning that if you don'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 +START +of the document, then invoke it either just before or after your +first COLLATE. +
+


+ + + +

Pagination control macros

+ +
    +
  1. Family/font/size +
  2. Page number position (vertical and horizontal) +
  3. Enclose page numbers with hyphens (on or off) +
+
+

1. Page number family/font/size

+

+See +Arguments to the control macros. +

+

+.PAGENUM_FAMILY default = prevailing document family; default is Times Roman
+.PAGENUM_FONT   default = roman
+.PAGENUM_SIZE   default = 0 (i.e. same size as paragraph text)
+
+ +

2. Page number position

+

+Macro: PAGENUM_POS TOP | BOTTOM  LEFT | CENTER | RIGHT + +

+Use PAGENUM_POS to change the default position of +automatic page numbering. PAGENUM_POS requires +two arguments: a vertical position (TOP or BOTTOM) and a +horizontal position (LEFT or CENTER or RIGHT). +

+For example, if you turn both +headers +and +footers +off (with .HEADERS OFF and .FOOTERS +OFFmom to number your +pages at the top right position, enter +

+

+	.PAGENUM_POS TOP RIGHT
+
+ +

3. Enclose page numbers with hyphens (on or off)

+By default, mom encloses page numbers between hyphens. +If you don't want this behaviour, invoke the macro +PAGENUM_HYPHENS with any argument (OFF, QUIT, END, X...), +like this: +

+

+	.PAGENUM_HYPHENS OFF
+
+ +If, for some reason, you want to turn page number hyphens back +on, invoke the macro without an argument. + +

+


+Next   +Prev   +Top   +Back to Table of Contents + + diff --git a/contrib/mom/momdoc/inlines.html b/contrib/mom/momdoc/inlines.html new file mode 100644 index 00000000..8a19d308 --- /dev/null +++ b/contrib/mom/momdoc/inlines.html @@ -0,0 +1,516 @@ + + + +Mom -- Inline escapes + + + + + +Next   +Prev   +Back to Table of Contents + + +

+ Inline escapes +

+ +Introduction to inline escapes +
+Index of inline escapes +
+ + +

Introduction to inline escapes

+
+ + +Inline escapes, as described in the +groff terms +section of this manual, are typesetting commands that appear in +text +input lines, +as opposed to macros and other +control lines +that must appear on lines by themselves. +

+Aside from altering type parameters within a line, inlines also +tell groff about special characters -- em-dashes, bullets, +figure/digit-width spaces, +and so on. It is beyond the scope of this manual to provide a +complete list of groff's inline functions and special characters. +I recommend having a look at the +canonical reference materials +should you need more information than is contained herein. +

+In groff, the escape character is the backslash ( \ ). 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 +( \\ ). Groff understands that this means "please print a backslash +character." (You can also use \e to print a literal +backslash.) +

+Groff has a number of ways of recognising 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. +

+Mom recognises that certain escapes get used more +often than others. For these, she has a consistent input style that +takes the form \*[...], which makes them stand out well from the text +of your documents. These escapes are the ones listed under +Mom's personal inlines. +

+Despite mom's best intentions, there are still +a number of typesetting functions that can only be accomplished +with groff's native inline escapes. I'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 +canonical reference materials +pertaining to groff. +

+HELPFUL BIT OF INFORMATION: Inline escapes can be used +in +document processing macros +that take +string arguments. +

+

Inlines index

+ +
+ + + +

Mom's personal inlines

+ +

Changing fonts

+ +

+Mom provides five inlines to change fonts +inline. +

+ + +
\*[ROM]Change font to roman +
\*[IT]Change font to italic +
\*[BD]Change font to bold +
\*[BDI]Change font to bold italic +
\*[PREV]Revert to previous font
+

+See also +font control with \f +for other ways to change fonts inline. + +

+NOTE: If you're using the +document processing macros, +inline font changes remain in effect only for the duration of the +current macro. +
+ + + +


+

Changing point size

+ +

+Mom's inline escape for changing point +size, sadly, does not observe her normal inline syntax +\*[whatever]. It's the only exception, and there's +no way around it. The escape for changing point size looks like this: +

+

+	\*S[size]
+
+ +where "size" is the new size you want. For example, to +change the point size inline to 12 points, you'd enter +

+

+	\*S[12]
+
+ +Notice that the new size does not require a +unit of measure; +points +is assumed. However, a unit of measure may be appended to the size, +if that's what you wish. Fractional sizes are, of course, allowed. +

+The size given to \*S may be expressed in plus +or minus terms, which can be very useful. In the following +example, the word "mom" will be output 2 points larger +than the point size of the rest of the line. +

+

+	While she isn't perfect, \*S[+2]mom\*S[-2] isn't half bad.
+
+ +NOTE: If you're accustomed to groff's usual way +of handling inline size requests (\sN, \s±N, \s(NN, \s±(NN, +\s[NNN], \s±[NNN]), feel free to continue with your old habits. +Mom doesn't care. +
+ + + +
+

Pairwise kerning

+ +

+Pairwise kerning means moving specific letter pairs closer +together or further apart (see +Typesetting terms, kerning +for more details). Mom permits inline pairwise +kerning through the use of the inline escapes +

+ + +
\*[BU1]...\*[BU36] +Move back 1...36 +kern units +
\*[FU1]...\*[FU36] +Move forward 1...36 +kern units
+

+For example, +

+

+	THE HUMAN COST OF COMMODIFYING FRESH W\*[BU4]ATER
+
+ +moves the letter A in "WATER" four kern units closer +to the letter W. +

+NOTE: Using BU or FU +between characters pairs that are already automatically kerned +disables the automatic kerning and uses the value you give to +BU or FU instead. +
+ + + +


+

Horizontal inline movement

+ +

+If you need to move backward or forward on a line by a just few +points, use +

+ + +
\*[BP1]...\*[BP12] +Move back 1...12 points +
\*[FP1]...\*[FP12] +Move forward 1...12 points
+

+For example, +

+

+	1.\*[FP12]The Free Trade Play-Offs: WalMart 100, Mexico 0
+
+ +puts 12 points of space between "1." and +"The". +

+Both \*[FP] and \*[BP] accept +quarter points as well. Hence it's possible to do, for example, +\*[FP.5] or \*[BP1.25] or +\*[ALD3.75]. +

+NOTE: If you need to move forward or backward by +more than 12.75 points, or wish to use a +unit of measure +other than points, use the groff inline +\h. +
+ + + +


+

Vertical inline movement

+ +

+If you need to move up or down in a line by a just few +points, use +

+ + +
\*[ALD1]...\*[ALD12] +Advance lead 1...12 points (move downward) +
\*[RLD1]...\*[RLD12] +Reverse lead 1...12 points (move upward)
+

+For example, +

+

+	Tel: 905\*[RLD1]-\*[ALD1]4072
+
+ +moves the hyphen in the telephone number up by 1 point, then +moves back down by the same amount. +

+Both \*[ALD] and \*[RLD] accept +quarter points as well. Hence it's possible to do, for example, +\*[RLD3.25] or \*[ALD1.5] or +\*[ALD4.75]. +

+NOTE: If you need to move up or down by +more than 12.75 points, or wish to use a +unit of measure +other than points, use the groff inline +\v. +
+


+ + + +

Groff inline escapes

+ +

Font control with \f

+ +

+Groff's basic mechanism for inline font control is the escape +\f. +

+ + +
\fRChange font to roman +
\fIChange font to italic +
\fBChange font to bold +
\f(BIChange font to bold italic +
\fPRevert to previous font
+

+A special instance of \f is +\f[font], where "font" can be a +complete legal 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: +

+

+	.FAM T
+	.FT  R
+	The command \f[CBI]ls -l\fP gives a "long" directory listing.
+
+ +The Unix command "ls -l" will appear in Courier Bold Italic +in a line that is otherwise in Times Roman. +
+ + + +
+

Inline horizontal motions with \h

+ +

+Whenever you need to move forward or backward on a line, use the inline +\h'distance'. In order to avoid unpleasant surprises, +always append a +unit of measure +to "distance". +

+

+	\h'1.25i'
+
+ +moves you 1.25 inches to the right (forwards) of the horizontal +position on the current +output line. +

+

+	\h'-1.25i'
+
+ +moves you 1.25 inches to the left (backwards). +
+ + + +
+

Inline vertical motions with \v

+ +

+If you need to raise or lower type on a line (say, for sub- or +superscripts, or any other special effect), use +\v'distance'. In order to avoid unpleasant +surprises, always append a +unit of measure +to "distance". +

+

+	\v'.6m'
+
+ +moves you (approx.) 2/3 of an +em +downward on the current +output line. +

+

+	\v'-.6m'
+
+ +moves you (approx.) 2/3 of an em upward. +

+IMPORTANT: The vertical motion of \v +affects ONLY type on the current +output line. +When groff breaks the output line, the effect of +\v is cancelled; the baseline of the next output line +is where it would be if you hadn't used \v. +

+TIP: When using \v for +occasional effects on a line, don't forget to reverse it when +you've done what you want to do. Otherwise, the remaining type +will be set too high (if you used \v with the +minus sign) or too low (if you used \v without +the minus sign). +
+ + + +


+

String width function \w

+ +

+In the context of mom, the string width inline +\w'string' 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 "Examples:" plus a +space, you can set it with the \w inline escape: +

+

+	.IL "\w'Examples: '"
+
+ +NOTE: Whenever you pass \w'string' +to a macro that normally requires a +unit of measure, +do NOT add a unit of measure to the \w'string' +argument. +

+Furthermore, if the string is composed of several words separated +by spaces, you MUST surround the whole escape with double quotes, +as in the example above. +
+ + + +


+

Horizontal line drawing function \l

+ +

+The \l'distance' inline allows you to draw a +horizontal rule of the specified distance. You must supply a +unit of measure. +Therefore, to set a 3-pica rule into a line of text, you'd do +

+

+	A line of text with a superfluous \l'3P' 3-pica rule in it.
+
+ +\l'3P' above not only draws the rule, but +advances 3 picas horizontally as well, just as you'd expect. +

+The weight (thickness) of rules varies according to the point size +in effect when you invoke \l, but you can'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), and is the point size used by +mom for all macros and routines that create rules. +

+NOTE: There are, in addition to \l, +a number of other line-drawing escapes, but frankly, using them for +typographically precise drawing is a bit like hammering in a nail +with a screwdriver -- doable, but not recommended. +

+Groff comes with a number of "preprocessors" designed to ease +creating rules, boxes, splines, and so on (tbl, pic, and friends), but +I tend not to use them. A firm believer in the "right tool for +the job," I prefer a vector drawing program (in my case, tgif) +when I need to combine type with graphic elements (say, a complex +ruled form). Inserting the results into a document is easy enough +with .PSPIC (consult the grops +man page for information on this indispensible and easy-to-use macro). +
+ + + +


+

Special characters and symbols

+ +

+Here follows a short list of commonly-used special characters available +via inline escapes. If you're not sure of the meaning of some of +these characters, consult the +Definitions of Terms. +For a more complete list, consult the section Special +Character Names at the end of the Tutorial Examples +in cstr54, available +here. + +

+

+    CHARACTER                   ESCAPE SEQUENCE
+    ---------                   ---------------
+
+    Comment line                \#
+    Fixed-width space           \<space>  i.e. backslash followed by a space
+    Unbreakable space           \~
+    Digit-width (figure) space  \0
+    Zero-width character        \&
+    Discretionary hyphen        \%
+    Backslash                   \\ or \e
+    Plus/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
+    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
+
+ +
+Next   +Prev   +Top   +Back to Table of Contents + + diff --git a/contrib/mom/momdoc/intro.html b/contrib/mom/momdoc/intro.html new file mode 100644 index 00000000..ec62285f --- /dev/null +++ b/contrib/mom/momdoc/intro.html @@ -0,0 +1,383 @@ + + + +What is mom? + + + + + +Next   +Back to Table of Contents + + + +

WHAT IS MOM?

+
+ +Who is mom meant for? +
+Typesetting with mom +
+Document processing with mom +
+Mom's philosophy +
+A note on mom's documentation +
+How to read macro arguments + +

Who is mom meant for?

+ +Mom ("my own macros", "my other +macros", "maximum overdrive macros"...) is a macro set for +groff, designed to format documents for PostScript output. +She's aimed at three kinds of users: +
+
    +
  1. typesetters who suspect groff might be "the right + tool for the job" but who are + frustrated/intimidated by groff's terse, geeky, + not-always-typographically-intuitive + primitives; +
    +
  2. non-scientific writers (novelists, short story writers, + journalists, students) who just want their work to + look good; +
    +
  3. newbies to computer typesetting, document processing, or + groff who need a well-documented macro set to help them get + started. +
+

+As might be infered from the above, mom is two macro +packages in one: a set of typesetting macros, and a set of document +processing macros. The typesetting macros govern the physical +aspects of page layout and provide sane, comprehensible control over +typographic refinements. The document processing macros let you focus +on a document's content and logical structure without worrying about +typesetting or page layout at all. +

+Because mom provides both typesetting and document +processing macros, it's safe to say she blurs the distinction +between document processing and document design. While her basic +document design comes with pretty spiffy defaults (okay -- change +"spiffy" to "typographically professional"), +you can easily redesign nearly every element of a document: +title information, page headers and footers, page numbering, heads, +subheads, footnotes... The list goes on. And should you need precise +typographic control over elements in a document that fall outside the +range of mom's document markup tags, you don't have +to read up on groff +primitives +in order to accomplish what you want; the typesetting macros take +care of that. + + +

Typesetting with mom

+ + +Mom's typesetting macros control the basic elements of +type: margins, line length, 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. +

In terms of typographic control, these macros resemble the +commands used on dedicated typesetting computers like Compugraphics and +Linotronics. Most of them simply give access to groff's typesetting +primitives in a way that's consistent and easy to use. A few of +them (tabs and indents, for example) handle fundamental typesetting +requirements in ways radically different from groff primitives. + +

+With mom's typesetting macros, you can, if you wish, +create individual output pages that you design from the ground up. +Provided you have not signalled to mom that you +want document processing (via the +START +macro; see below), every 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, document covers, 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. +

+Years of reading various mailing lists dealing with computer +typesetting (groff, TeX, and friends) have convinced me that no progam +can ever replace the human eye and human input when it comes to high +quality typesetting. As of this writing, a thread on the subject of +"micro typography" in groff has been going on for nearly a +month. The reason for the lengthy thread is obvious; words and +punctuation on the printed page are too variable, too fluid, to be +rendered flawlessly by any algorithm, no matter how clever. (For +whatever it's worth, a similar problem exists with engraving musical +scores by computer.) +

+Mom does not try to solve the problems posed by +things like hanging punctuation, left-margin adjustments for those +annoying "space-y" upper case letters like T and W, and +so on. She merely tries to provide tools that allow knowledgeable +typesetters to come up with solutions to these problems +in ways that are somewhat easier and more intuitive than manipulating +groff at the +primtive +level. As a professional typesetter of more than two decades, and a +writer, I have encountered few situations that cannot be handled by +mom's typesetting macros. +

+Author's note: One area where groff itself needs +serious rethinking is in the matter of an algorithm that takes into +account both word AND letter spacing when +justifying +lines. At present, only word spacing is adjusted, requiring what I +consider an unnecessary amount of user intervention whenever +letter spacing is required. + + +

Document processing with mom

+ + +Mom's document processing macros let you format +documents without having to worry about the typographic details. +In this respect, mom is similar to other groff macro +packages, as well as to html and LaTeX. Where mom +differs is in the degree of control you have over the look and +placement of the various elements of a document. For example, if you +don't want your heads underlined, or you want them bigger/smaller, +or you'd prefer them to be in a different font, or you'd rather they +were flush left instead of centered, you can make the changes easily +and have them apply to the whole document. Temporary and one-off +changes are easy, too. +

+Mom has some nifty features other macro sets +don't provide. For example, you can switch between draft-style and +final-copy output. If you regularly make submissions to publishers +and editors who insist on "typewritten, double-spaced," there's a +special macro -- +PRINTSTYLE TYPEWRITE +-- that changes typeset documents into ones that would make your +high-school typing teacher proud. Footnotes, multiple columns, +recto/verso printing and user designable headers and footers are also +part of the fun. + + +

Mom's philosophy

+ + +Formatting documents should be easy, from soup to nuts. Writers need +to focus on what they're writing, not on how it looks. From the +moment you fire up an editor to the moment you add "FINIS" +to your opus, nothing should interfere with the flow of your words. +The commands needed to format your work should be easy to remember, +comprehensible, and stand out well from the text. There shouldn't +be too much clutter. Your documents should be as readable inside a +text editor as they are on the printed page. +

+Unfortunately, in computerland, "easy," +"comprehensible," and "readable" often mean +"you're stuck with what you're get." No document formatting +system can give you exactly what you want all the time, every time. +Documents, it seems, always need to be tweaked, either to satisfy a +typographic whim or to clarify some aspect of their content. +

+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 +primitives +and +inline escapes +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 in-line as an encrypted password. This does +not make for happy-camper writers, who either find themselves stuck +with document formatting style they don't really like, or are forced to +learn groff from the ground up -- a daunting task, to say the least. +

+Mom aims to make creating documents a simple matter, +but with no corresponding loss of user control. The document +processing macros provide an excellent set of defaults, but if +something is not to your liking, you can change it. And in combination +with the typesetting macros, you have all the tools you need to +massage passages and tweak pages until they look utterly professional. +

+One rarely hears the word "user interface" in conjunction +with document processing. Since the user formatting takes place +inside a text editor, little thought is given to the look and feel +of the formatting commands. Mom attempts to rectify +this by providing users with a consistent, readable "coding" +style. Most of the macros (especially in the document processing set) +have humanly-readable names. Not only does this speed up learning +the macros, it makes the sense of what's going on in a document, +typographically and structurally, easier to decipher. +

+Mom does not try to be all things to all people. +In contrast to the normal groff philosophy, she does not try to +produce output that looks good no matter where it's displayed. +She's designed for printed output, although with +PRINTSTYLE TYPEWRITE +she produces acceptable terminal copy. She makes no attempt to be +compatible with older versions of troff. And she remains largely +untested with the groff preprocessors (tbl, pic, eqn, etc.) +

+One special feature in mom's design is the attention +she pays to aligning the bottom margins of every page. Nothing screams +"shoddy" in typeset documents louder than bottom margins +that wander, or, in typesetter jargon, "hang." There are, +of course, situations where whitespace at the bottom of a page may +be desirable (for example, you wouldn't want a head to appear at the +bottom of the page without some text underneath it), but in all cases +where hanging bottom margins can be avoided, mom does +avoid them, by clever adjustments to leading ("line spacing") +and the spacing between different elements on the page. + + +

A note on mom's documentation

+ + +Writing documentation is tough, no doubt about it. One is never +quite sure of the user's level of expertise. Is s/he new to the +application, new to its underlying protocols and programs, new to +the operating system, new to computers? At some point, one has to +decide who the documentation is for. Making the wrong decision can +mean the difference between a program that gets used and a program +that gets tossed. +

+Mom's documentation assumes users know their way +around GNU/Linux. It further assumes they at least know what groff +is, even if they don't know much about it. Lastly, it assumes that +everyone -- groff newbies and experts alike -- learns faster from +a few well-placed examples than from manpage-style reference docs. +What mom's documentation doesn't assume is that +you know everything -- not about groff, not about typesetting, +not about document processing. Even experts have odd lacunae in +their knowledge base. Therefore, whenever I suspect that a term +or procedure will cause head scratching, I offer an explanation. +And when explanations aren't enough, I offer examples. + +

+The canonical reference materials for groff are cstr54 +(a downloadable PostScript copy of which is available +here) +and the troff manpages. I've tried to avoid reiterating them, however, +in a few places, this has proved impossible. Be forewarned: I have +no qualms about sidestepping excrutiating completeness about groff +usage; I'm more concerned with getting mom users up +and running. Mea culpa. +

+Note: Mom's macro file +(om.tmac) is heavily commented. Each macro is preceded by a +description of its arguments, function, and usage, which may +give you information in addition to what's contained in this +documentation. + + +

How to read macro arguments

+ + +

+The concise descriptions of macros in this documentation typically +look like this: +

+Macro: NAME arguments +
+arguments lists the macro's arguments using conventions that +should be familiar to anyone who has ever read a manpage. Briefly: +

+

    +
  1. Macro arguments are separated from each other by spaces. +
  2. If an argument is surrounded by chevrons + ( < > ), it's a description of the argument, + not the argument itself. +
  3. If an argument begins with or is surrounded by double-quotes, the + double quotes MUST be included in the argument. +
  4. If the user has a choice between several arguments, each of the + choices is separated by the pipe character ( | ), + which means "or." +
  5. Arguments that are optional are surrounded by square brackets. +
  6. <off> in an argument list means that any argument + turns the macro off. +
+ +

Toggle macros

+

+Some macros don't require an argument. They simply start something. +When you need to turn them off, the same macro with any +argument will do the trick. That's right: ANY argument. This permits +choosing whatever works for you: OFF, END, QUIT, DONE, Q, X... Hell, +it could even be I_LOVE_MOM. +

+Since these macros toggle things on and off, the argument list +simply reads +

+toggle +
+
+ +

Example 1: an argument requiring double-quotes

+
+Macro: TITLE "<title of document>" +
+The required argument to TITLE is the title of your +document. Since it's surrounded by double-quotes, you must +include them in the argument, like this: +

+

+	.TITLE "My Pulitzer Novel"
+
+ +

Example 2: a macro with required and optional arguments

+
+Macro: TAB_SET <tab #> <indent> <length> [ L | R | C | J [ QUAD ] ] +
+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: +

+

+	.TAB_SET 3 6P 3P
+
+ +The remaining two arguments are optional. The first is a single +letter, either L, R, C or J. The second, which is itself optional +after L, R, C or J, is the word QUAD. Therefore, depending on +what additional information you wish to pass to the macro, +you could enter: +

+

+	.TAB_SET 3 6P 3P L
+		or
+	.TAB_SET 3 6P 3P L QUAD
+
+ +

Example 3: a sample toggle macro:

+ +
+Macro: QUOTE toggle +
+ +QUOTE begins a section of quoted text in a document +and doesn't require an argument. When the quote's finished, +you have to tell mom it's done. +

+

+	.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
+
+ +Alternatively, you could have turned the quote off with END, or +X, or something else. + +

+


+Next   +Top   +Table of Contents + + diff --git a/contrib/mom/momdoc/letters.html b/contrib/mom/momdoc/letters.html new file mode 100644 index 00000000..0f1c3ad6 --- /dev/null +++ b/contrib/mom/momdoc/letters.html @@ -0,0 +1,315 @@ + + + +Mom -- Document Processing, Writing Letters + + + + + +Back to Table of Contents + + + +

WRITING LETTERS WITH MOM

+
+ + +

Introduction

+
+ +Mom's simple but effective letter-writing +macros are a subset of the +document processing macros, +designed to ease the creation of correspondence. +

+Because the letter macros are a subset of the document +processing macros, you can use +control macros +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. + +

Tutorial on writing letters

+ +Mom letters begin, like all mom +processed documents, with a +reference macro +(in this case, +AUTHOR), +a +DOCTYPE +(LETTER, obviously), the essential +PRINTSTYLE +macro, and +START. +

+

+	.AUTHOR    "Yannick P. Guique"
+	.DOCTYPE    LETTER
+	.PRINTSTYLE TYPESET
+	.START
+
+ +PRINTSTYLE, above, could also be +TYPEWRITE. Mom has no objection +to creating letters that look like they were typed on an Underwood +by a shapely secretary with great gams back in the 1940s. +

+After the START macro, you enter data pertinent to +your letter: the date, the addressee (in business correspondence, +typically both name and address), the addressor (that's you; in +business correspondence, typically both name and address), and a +greeting (in full, e.g. "Dear Mr. Smith,"). +

+The macros for entering the data are simple (they're not even +toggles) +and entered in an intuitive order. +
+

    +
  1. .DATE +
  2. .TO +
  3. .FROM +
  4. .GREETING +
+

+Mom ignores any you omit and spaces the letter's +opening according to what you do include. +

+Once you've filled in what you need to get a letter started, simply +type the letter, introducing each and every paragraph with the +PP +macro. +

+At the end of the letter, should you wish an indented closing +("Yours truly," "Sincerely," "Hugs and +kisses"), invoke the macro CLOSING on a +line by itself and follow it with the text of the closing. +N.B. Don't put your name here; mom +supplies it automatically from AUTHOR with +enough space to leave room for your signature. + +

+Assuming our tutorial letter is for business correspondence, +here's what the complete letter looks like. +

+

+	.AUTHOR    "Yannick P. Guique"
+	.DOCTYPE    LETTER
+	.PRINTSTYLE TYPESET
+	.START
+	.DATE
+	August 25, 2004
+	.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 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,
+
+
+ + +

Defaults for letters

+
+ +In letters, mom sets: +

+

    +
  1. the date flush right, page right, at the top of page one +
  2. the addressee in a block flush left, page left +
  3. the addressor in a block flush left, page left +
  4. the greeting flush left +
  5. the body of the letter justified +
  6. in multi-page letters +
    +
      +
    • a footer indicating there's a next page (of the form .../#) +
    • the page number at the top of every page after page one +
    +
  7. the closing/signature line flush left, indented halfway across the page +
+

+Other important style defaults are listed below, and may be changed +via the +typesetting macros +or the document processing +control macros +prior to +START. Assume that any +style parameter not listed below is the same as for +PRINTSTYLE TYPESET +or +PRINTSTYLE TYPEWRITE. +

+

+PARAMETER             PRINTSTYLE TYPESET   PRINTSTYLE TYPEWRITE
+---------             ------------------   --------------------
+
+Paper size            8.5 x 11 inches      8.5 x 11 inches
+Left/right margins    1.25 inches          1.25 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, centered        top, centered
+
+*Footers contain a "next page" number of the form .../#
+
+
+ + +

The letter macros

+
+ +All letter macros must come after +START, +except NO_SUITE. +

+

+ + + +
+

+ +Macro: DATE + +

+Invoke DATE on a line by itself, with the date +underneath, like this: +

+

+	.DATE
+	October 31, 2002
+
+ + + +
+

+ +Macro: TO + +

+Invoke TO on a line by itself, with the name +and address of the addressee underneath, like this: +

+

+	.TO
+	JOHN SMITH
+	10 Roberts Crescent
+	Bramladesh, Ont.
+
+ + + +
+

+ +Macro: FROM + +

+Invoke FROM on a line by itself, with the name +and address of the addressor underneath, like this: +

+

+	.FROM
+	JOE BLOW
+	15 Brunette Road
+	Ste-Vieille-Andouille, Québec
+
+ + + +
+

+ +Macro: GREETING + +

+Invoke GREETING on a line by itself, with the +full salutation you want for the letter, like this: +

+

+	.GREETING
+	Dear Mr. Smith,
+
+ + + +
+

+ +Macro: CLOSING + +

+Invoke CLOSING on a line by itself after the +body of the letter, with the closing you'd like (e.g. "Yours +truly,"), like this: +

+

+	.CLOSING
+	Yours truly,
+
+ + + +
+

+ +Macro: NO_SUITE + +

+If you don't want mom to print a "next +page" number at the bottom of multi-page letters, invoke +.NO_SUITE, on a line by itself, prior to +START. + +

+


+Next   +Prev   +Top   +Back to Table of Contents + + diff --git a/contrib/mom/momdoc/rectoverso.html b/contrib/mom/momdoc/rectoverso.html new file mode 100644 index 00000000..e45537f8 --- /dev/null +++ b/contrib/mom/momdoc/rectoverso.html @@ -0,0 +1,248 @@ + + + +Mom -- Document Processing, Recto/verso printing + + + + + +Next   +Prev   +Back to Table of Contents + + + +

RECTO/VERSO PRINTING and COLLATING

+
+ + +

Recto/verso and collating

+
+ + + + +

Introduction to recto/verso

+
+ +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. +

+With recto/verso, mom automatically takes control +of two aspects of alternating page layout in a document: the left and right +margins (provided they're not equal), and the switching of the left +and right parts of +headers +or +footers +(see the +General description of headers) +and page numbering (if page numbers are not centered). +

+It is beyond the scope of this documentation to cover the different +ways in which you can make your printer print on both sides of a sheet. +A simple but effective method for those of us with "dumb" +printers is to open the document (after it's been processed into +PostScript by groff -- see +How to invoke groff with mom) +in gv (ghostview), +click the "odd pages" icon, then click "Print +Marked". After printing is complete, rearrange the sheets +appropriately, put them back in your printer, and have +gv print the "even pages". If you prefer to +work from the command line, check out the man pages for +pstops and psbook. There are other +programs out there as well to help with two-sided printing. +
+ + + +

Recto/verso macros list

+ + + + +
+ + + +

Recto/verso printing

+
+
+Macro: RECTO_VERSO + +

+If you want mom to set up alternating pages for +recto/verso printing, simply invoke RECTO_VERSO +with no argument. +

+NOTE: +
+Recto/verso always switches the left and right parts of +headers +or +footers +on odd/even pages. However, it only switches the left and right +margins if the margins aren't equal. Consequently, it is your +responsibility to set the appropriate differing left and right +margins with +L_MARGIN +and +R_MARGIN +(prior to +START) +or with +DOC_LEFT_MARGIN +and +DOC_RIGHT_MARGIN +(before or after START). +

+Equally, recto/verso only switches the page number position if page +numbers aren't centered, which means you have to set the page +number position with +PAGENUM_POS +(before or after START). +
+ + + +


+ +

Switch header left part/right part

+
+
+Macro: SWITCH_HEADERS + +

+SWITCH_HEADERS switches the location of the +header left string (by default, the author) and the header right +string (by default, the document title). If you don't like +mom's default placement of author and title, use +SWITCH_HEADERS to reverse it. +

+SWITCH_HEADERS can also be useful in conjuction +with +RECTO_VERSO. +The assumption of RECTO_VERSO is that the first +page of a document (recto/odd) represents the norm for header-left +and header-right, meaning that the second (and all subsequent even) +page(s) of the document exchange header-left and header-right. +

+If mom's behaviour in this matter is not what +you want, simply invoke SWITCH_HEADERS on the +first page of your recto/verso document to reverse her default +treatment of header parts. The remainder of your document (with +respect to headers) will come out as you want. +

+NOTE: Replace _HEADERS, above, +with _FOOTERS if your document uses footers. +
+


+ + + + +

Introduction to collating

+
+ +The macro COLLATE lets you join documents together. +Primarily, it's a convenience for printing long documents that +comprise several chapters, although it could be used for any +document type (except LETTER). +

+Personally, I prefer to keep chapters in separate files and print +them out as needed. However, that means keeping track of the correct +starting page number for each chapter, a problem circumvented by the +use of COLLATE. +

+When collating chapters, you need only put .COLLATE +at the end of a chapter, follow it with any +reference macros +needed for the new chapter, e.g. +CHAPTER +or +CHAPTER_STRING +(have a look at the +Special Note on CHAPTER) +make any pertinent style changes to the document (unlikely, but +possible), and re-invoke the +START +macro. Your new chapter will begin on a fresh page and behave +as expected. +

+COLLATE assumes you are collating documents/files +with similar type-style parameters hence there's no need for +PRINTSTYLE to appear after COLLATE, +although if you're collating documents that were created as separate +files, chances are the PRINTSTYLE's already there. +

+ +Two words of caution: +

    +
  1. do not collate documents of differing + PRINTSTYLES (i.e. don't try to + collate a TYPESET document and TYPEWRITE document -- + why would you want to do that anyway?) +
  2. use DOC_FAMILY instead of + FAMILY if, for some reason, you want + to change the family of all the document elements after + COLLATE. FAMILY, by + itself, will change the family of paragraph text only. +
+
+ + + +
+ +

Collate document files

+
+
+Macro: COLLATE + +

+The most basic (and most likely) collating situation looks like +this: +

+

+	.COLLATE
+	.CHAPTER 17
+	.START
+
+ +A slightly more complex version of the same thing, for chapters +that require their own titles, looks like this: +

+

+	.COLLATE
+	.CHAPTER_STRING "Geek Fatigue: Symptoms and Causes"
+	.HEADER_CENTER "Geek Fatigue: Symptoms and Causes"
+	.START
+
+ +NOTE: See the +two words of caution, +above. +
+ +
+Next   +Prev   +Top   +Back to Table of Contents + + diff --git a/contrib/mom/momdoc/reserved.html b/contrib/mom/momdoc/reserved.html new file mode 100644 index 00000000..3025d122 --- /dev/null +++ b/contrib/mom/momdoc/reserved.html @@ -0,0 +1,917 @@ + + + +Mom -- List of reserved words + + + + + +Prev   +Back to Table of Contents + + + +

LIST OF RESERVED WORDS

+
+ +

+The following is a list of "reserved" words used by +mom. Before changing the name of any macro or +document element tag with +ALIAS, +I strongly recommend doing a search of this page for your proposed +new name. If you find it in the left hand column, DON'T USE IT. +Choose something else instead. +

+Anyone interested in playing around inside mom's macro +file (om.tmac) will find this list useful as well since it lists all +(I hope) the macros, strings, and number registers mom +uses, along with brief descriptions of their functions. +

+

+TYPESETTING
+===========
+
++++MACROS+++
+
+Page layout
+-----------
+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 - pageoffset - rightmargin
+T_MARGIN  Advance lead from page top
+
+Page control
+------------
+DO_B_MARGIN  Margin at bottom of page
+DO_T_MARGIN  Margin at top of page
+
+Style
+-----
+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
+LL         Line length
+LS         Leading (.vs)
+PS         Point size
+SETBOLDER  Set degree of emboldening (pseudo-bold) in units
+SETSLANT   Set degree of pseudo-italic
+
+Autolead
+--------
+AUTOLEAD  Always lead n points more than .PS
+
+Flush
+-----
+JUSTIFY  Justified text
+QUAD     Filled text, left, right, or center
+
+Quad
+----
+CENTER  Non-filled text, center
+LEFT    Non-filled text, left
+RIGHT   Non-filled text, right
+
+Hyphenation
+-----------
+HY      Turn hyphenation on/off, or set LINES, MARGIN, SPACE
+HY_SET  Set LINES, MARGIN, SPACE in a single command
+
+Advanced style
+--------------
+KERN       Turn automatic kerning on or off
+LIGATURES  Turn ligatures on or off
+SS         Sentence space control
+WS         Word space control
+
+Line breaks
+-----------
+BR      Alias of br
+EL      Breaks line but doesn't advance
+SPACE   Alias of sp
+SPREAD  Alias of brp
+
+Ald/rld
+-------
+ALD  Advance lead
+RLD  Reverse lead
+
+Indents
+-------
+HI   Indent hang
+IB   Indent both
+IBX  Indent both off
+IL   Indent left
+ILX  Indent left off
+IR   Indent right
+IRX  Indent right off
+IX   Indent off
+TI   Indent temporary
+
+Tabs
+----
+ST       String tab
+TAB_SET  Tab Set
+TN       Tab Next
+TQ       Tab Quit
+
+MCO      Turn on multi-column mode
+MCR      Return to top of column
+MCX      Turn off multi-column mode
+
+Underscore
+----------
+UNDERSCORE   Underscores words or phrases
+UNDERSCORE2  Double underscores words or phrases
+
+Underline
+---------
+UNDERLINE  Underlines whole passages (Courier only)
+
+Smart Quotes
+------------
+SMARTQUOTES  Turns smart quotes on or off
+
+Misc + Support
+--------------
+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
+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 overal 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
+TRAP             Turn traps off or on
+
++++DIVERSIONS+++
+
+NO_FLASH    Diverts output of SILENT or COMMENT so they don't print
+NULL        Diverts SIZESPECS in PRINT_HDRFTR so it SIZESPECS 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
+
++++NUMBER REGISTERS+++
+
+#ALD                    ALD value
+#AUTOLEAD_FACTOR        Using FACTOR arg to AUTOLEAD? (toggle)
+#AUTO_LEAD              Using autolead? (toggle)
+#AUTO_LEAD_VALUE        Auto leading value
+#BL_INDENT              Value of left indent when IB
+#B_MARGIN               Bottom margin
+#BOLDER_UNITS           # of units to embolden type
+#BR_INDENT              Value of right indent when IB
+c                       column mark
+#CONDENSE               Are we in pseudo-condense mode? (toggle)
+#COND_WIDTH             Width of pseudo-condensed type (pointsize x $COND_PERCENT)
+#CURRENT_TAB            Current tab number
+#DC_GUT                 Width of dropcap gutter
+#DEGREES                # of degrees slant for pseudo-italic
+#EXTEND                 Are we in pseudo-extend mode? (toggle)
+#EXT_WIDTH              Width of pseudo-extended type (pointsize x $EXT_PERCENT)
+#H_INDENT               Value of left indent when IH
+#HL_INDENT              Value of the hang when IH
+#HYPHENATE              Hyphenation on? (toggle)
+#HY_SET                 Did we manually set hyphenation parameters? (toggle)
+#IN_TAB                 Are we in a tab? (toggle)  Set in macro TAB; used in ST to
+                          determine whether to add #ST_OFFSET to #ST<#>_OFFSETT
+#INDENT_ACTIVE          Indicates whether an indent is active (toggle)
+#INDENT_BOTH_ACTIVE     Toggle
+#INDENT_LEFT_ACTIVE     Toggle
+#INDENT_RIGHT_ACTIVE    Toggle
+#INDENT_STYLE_BOTH      Indicates IB when #INDENT_ACTIVE=1 (toggle)
+#INDENT_STYLE_HANG      Indicates IH when #INDENT_ACTIVE=1 (toggle)
+#INDENT_STYLE_LEFT      Indicates IL when #INDENT_ACTIVE=1 (toggle)
+#INDENT_STYLE_RIGHT     Indicates IR when #INDENT_ACTIVE=1 (toggle)
+#INDENT_STYLE_TEMP      Indicates IT when #INDENT_ACTIVE=1 (toggle)
+#KERN                   Kern on? (toggle)
+#LAST_TAB               Last tab number set in multi-columns
+#LEAD                   Leading (alias)
+#LIGATURES              Ligatures on? (toggle)
+#L_INDENT               Value of left indent
+#L_LENGTH               Line length
+#L_MARGIN               Page offset if set with LMARGIN; if .po used, \n(.o returns
+#LOOP                   #LOOP=1 if a while loop executes; otherwise 0.
+#NEXT_TAB               Current tab number + 1 (used in TN)
+#NEXT_TAB               Next tab in an n+1 sequence
+#OPEN_CLOSE             Manipulates character " to print `` or ''
+p                       Output line horiz position at end of $PAD_STRING
+#PAD_COUNT              Number of times # was included in arg to PAD
+#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? (toggle)
+#PRINT_FOOTER_ON_PAGE_1 toggle
+#PT_SIZE                Point size (fractional) in units (alias)
+#Q_AT_TOP               Does a quote start at the top of a new page? (toggle)
+#QUAD                   In autoquad mode? (toggle)
+#RESTORE_LEAD           Lead value in effect prior to AUTOLEAD
+#RESTORE_PT_SIZE        Stores current point size (in units) prior to underscore
+#R_INDENT               Value of right indent
+#RLD                    RLD value
+#R_MARGIN               Right margin
+#SILENT                 Is silent on? (toggle)
+#SLANT_ON               Is SLANT on? (toggle)
+#SMART_QUOTES           Smartquotes on? (toggle)
+#SPACE_TO_END           Whitespace at end of string passed to PAD
+#ST<#>_LENGTH           Length of ST<#>; calculated during ST <#>
+#ST<#>_MARK             Page offset of autotab <#> at ST<#>X
+#ST_NUM                 Incrementing counter for autotab identification
+#ST_OFFSET              Offset (from current tab) to add to #ST<#>_OFFSET
+                          when calculating string indents set from within tabs
+#ST<#>_OFFSET           Indent of autotab <#> (page offset)
+t                       "mark" register set in T_MARGIN; recalled in LS and AUTOLEAD if #T_MARGIN_SET is 1
+#TAB_ACTIVE             Are we in a tab? (toggle)
+#TAB_NUMBER             Tab number
+#TAB_OFFSET             Tab indent
+#T_INDENT               Value of temporary indent
+#T_MARGIN               Top margin
+#T_MARGIN_SET           Did we set the top margin with T_MARGIN? (toggle)
+u                       Horiz position of start of underscore
+
++++STRINGS+++
+
+$COND_PERCENT        Percentage by which to pseudo-condense type
+$CURRENT_TAB         Current tab number
+$DC_ADJUST           +|- # of points to subtract from dropcap
+$DC_FAM              Drop cap family
+$DC_FT               Drop cap font
+$EXT_PERCENT         Percentage by which to pseudo-extend type
+$FAMILY              Family
+$FONT                Font
+$PAD_MARKER          Character to mark off padding in PAD
+$PAD_STRING          Arg passed to PAD
+$QUAD_VALUE          Quad value (left, right, center, justify)
+$QUOTE0              ``
+$QUOTE1              ''
+$RESTORE_QUAD_VALUE  Quad value for use in restoring L, R, C, J (after tabs)
+$SS_VAR              Holds + or - sentence space value
+$ST<#>_FILL          Always QUAD if QUAD passed to ST <#>
+$ST<#>_QUAD_DIR      Quad direction supplied to ST for <#>
+$TAB_NUMBER          Argument passed to TAB macro to call TAB# macro created in TAB_SET
+$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
+
++++ALIASES+++
+
+ALIAS         als
+ALIASN        aln
+BR            br
+CENTRE        CENTER
+COMMENT       SILENT
+CONDENSE      CONDENSE_OR_EXTEND
+EXTEND        CONDENSE_OR_EXTEND
+FAM           FAMILY
+FT            FONT
+HYPHENATE     HY
+HYPHENATION   HY
+LIG           LIGATURES
+LL            LINE_LENGTH
+MAC           de
+NEW_PAGE      bp
+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
+TS            TAB_SET
+UNDERSCORE_2  UNDERSCORE2
+
++++ALIASES FOR NUMBER REGISTERS+++
+
+#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
+
++++INLINE ESCAPES+++
+
+BOLDER       Pseudo-bold on
+BOLDERX      Pseudo-bold off
+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)
+COND         Pseudo-condense type
+CONDSUP      Condensed superscript (using value set with CONDENSE)
+CONDSUPX     Condensed superscript off
+EXTEXT       Extended superscript
+EXT          Pseudo-extend type
+EXTSUPX      Extended superscript off
+LEADER       Deposit leader to end of current LL or TAB
+SLANT        Slant (pseudo-italic on
+SLANTX       Slant off
+ST<#>        String tab end marker
+ST<#>        String tab start marker
+SUP          Superscript
+SUPX         Superscript off
+
++++SPECIAL CHARACTERS+++
+
+FEET         The foot character \(fm
+INCH         The inch character \(fm\(fm
+
+------------------------------------------------------------------------
+
+DOCUMENT PROCESSING
+===================
+
++++MACROS+++
+
+Document info
+-------------
+AUTHOR    Author
+CHAPTER   Chapter number
+DRAFT     Draft number
+REVISION  Revision number
+SUBTITLE  Doc subtitle
+TITLE     Doc title
+
+Document style
+--------------
+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)
+
+Document tags
+-------------
+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
+EPIGRAPH    Epigraph before 1st para 
+FINIS       Prints --END--
+FOOTNOTE    Collects footnotes in text for printing at bottom of page
+HEAD        Section title (main heads)
+LINEBREAK   Break between narrative sections
+PARAHEAD    Paragraph head
+PP          Paragraph
+QUOTE       Poetic or line for line quotes
+START       Prints info collected with doc info macros
+SUBHEAD     Subheads
+
+Headers/footers
+--------------
+BREAK_QUOTE          Manually break a footnoted quote that crosses a page/column
+DO_FOOTER            Prints footer (after footnote processing, if any)
+FOOTER_ON_FIRST_PAGE Print footer on first page? (toggle)
+FOOTER               Trap-invoked footer macro
+HEADER               Trap-invoked header macro
+PAGINATE             Turns page numbering on or off (doc default=on)
+RECTO_VERSO          Enables switch HEADER_LEFT and HEADER_RIGHT on alternate pages
+
+Alter doc "look" and/or change defaults
+---------------------------------------
+ALWAYS_FULLSPACE_QUOTES  Fullspace quotes instead of default 1/2 spacing them.
+ATTRIBUTE_STRING         What to print before author (default is "by")
+AUTHOR_FAMILY            Family to use for author in doc header
+AUTHOR_FONT              Font to use for author in doc header
+AUTHOR_SIZE              ps to use for author in doc header
+BLOCKQUOTE_FAMILY        Family to use in blockquotes
+BLOCKQUOTE_FONT          Font to use in blockquotes
+BLOCKQUOTE_QUAD          How to quad blockquotes
+BLOCKQUOTE_SIZE          How much to de/increase point size of bquotes
+CHAPTER_STRING           What to print whenever the word "chapter" is required
+COLUMNS                  Print in columns
+DOC_FAMILY               Overall doc family
+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_HEADER               Print 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_QUAD                 Overall quad of document
+DOC_RIGHT_MARGIN         Doc right margin
+DOCTYPE_FAMILY           Family to use for doctype string in doc header
+DOCTYPE_FONT             Font to use for doctype string in doc header
+DOCTYPE_SIZE             ps to use for doctype string in doc header
+DOCTYPE                  Type of doc (DEFAULT, CHAPTER, NAMED, LETTER)
+DO_QUOTE                 Print quote (invoked from QUOTE or BLOCKQUOTE)
+DRAFT_STRING             What to print whenever the word "draft" is required
+EPIGRAPH_AUTOLEAD        Autolead value for epigraphs
+EPIGRAPH_FAMILY          Family to use in epigraphs
+EPIGRAPH_FONT            Font to use in epigraphs
+EPIGRAPH_INDENT          Value by which to multiply PP_INDENT for block epigraphs
+EPIGRAPH_QUAD            Quad value of block style epigraphs
+EPIGRAPH_SIZE            ps de/increase of epigraphs*
+FINIS_STRING             What to print when FINIS is invoked
+FOOTER_GAP               Distance between running text and footer
+FOOTER_MARGIN            Distance from footer to bottom of page
+FOOTERS                  Turns footers on or off
+FOOTNOTE_AUTOLEAD        Autolead to use in footnotes
+FOOTNOTE_FAMILY          Family to use in footnotes
+FOOTNOTE_FONT            Font to use in footnotes
+FOOTNOTE_MARKERS         Turns footnote markers on or off
+FOOTNOTE_MARKER_STYLE    STAR or NUMBER; default=STAR
+FOOTNOTE_QUAD            Quad to use in footnotes
+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_SIZE            ps of footnotes
+HDRFTR_CENTER_CAPS       Center part of header/footer in caps? (toggle)
+HDRFTR_CENTER_FAMILY     Family of center part of header/footer
+HDRFTR_CENTER_FONT       Font of center part of header/footer
+HDRFTR_CENTER_SIZE       ps in/decrease of center part of header/footer**
+HDRFTR_CENTER            String to go in center part of header/footer; default doctype 
+HDRFTR_CENTER            The header/footer center string
+HDRFTR_FAMILY            Family to use in the headers/footers
+HDRFTR_GAP               Distance from header/footer to running text
+HDRFTR_LEFT_CAPS         Left part of header/footer in caps? (toggle)
+HDRFTR_LEFT_FAMILY       Family of left part of header/footer
+HDRFTR_LEFT_FONT         Font of left part of header/footer
+HDRFTR_LEFT_SIZE         ps in/decrease of left part of headers/footers**
+HDRFTR_LEFT              String to go in left part of header/footer; default author
+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_RIGHT_CAPS        Right part of header/footer in caps? (toggle)
+HDRFTR_RIGHT_FAMILY      Family of right part of headers/footers
+HDRFTR_RIGHT_FONT        Font of right part of headers/footers
+HDRFTR_RIGHT_SIZE        Size of right part of headers/footers
+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
+HDRFTR_RULE              Turns header/footer rule on or off.  When invoked internally, prints the rule.
+HDRFTR_SIZE              ps in/decrease of headers/footers*
+HEAD_CAPS                Print section titles in caps? (toggle)
+HEADER_GAP               Space between header and running text
+HEADER_MARGIN            Space from top of page to header
+HEADERS                  Turns headers on or off
+HEAD_FAMILY              Family to use in section titles
+HEAD_FONT                Font to use in section titles
+HEAD_QUAD                Quad value of section titles
+HEAD_SIZE                How much to in/decrease point size of section titles
+HEAD_SPACE               Give HEADs 2 line-spaces before. If OFF, only 1.  Default is on.
+HEAD_UNDERLINE           Underline section titles? (toggle)
+INDENT_FIRST_PARAS       Indent 1st paras? (doc default=not indented) 
+ITALIC_MEANS_ITALIC      For TYPEWRITE; render .FT I in italic.
+NUMBER_HEADS             Print head numbers
+NUMBER_PARAHEADS         Print parahead numbers
+NUMBER_SUBHEADS          Print subhead numbers
+PAGENUM_FAMILY           Family to use in footers
+PAGENUM_FONT             Font to use for page numbers
+PAGENUM_HYPHENS          Turns on/off hyphens surrounding page numbers
+PAGENUM_ON_FIRST_PAGE    Print page number on first page when footers are on (toggle)
+PAGENUM_POS              Controls placement of page numbers default=bottom/centered
+PAGENUM_SIZE             How much to in/decrease point size of page numbers
+PAGENUM_STYLE            Page # in roman, arabic, or alphabetic
+PARAHEAD_FAMILY          Family to use for paraheads
+PARAHEAD_FONT            Font to use for paraheads
+PARAHEAD_INDENT          How mucht to indent paraheads
+PARAHEAD_SIZE            Size of paraheads
+PARA_INDENT              Size of para indent
+PARA_SPACE               Put a line space before paras
+PP_FONT                  Overall doc font
+QUOTE_FAMILY             Family to use in pquotes
+QUOTE_FONT               Font to use in pquotes
+QUOTE_INDENT             Value by which to multiply PP_INDENT for block quotes
+QUOTE_SIZE               How much to de/increase point size of pquotes
+RESET_FOOTNOTE_NUMBER    Reset fn# to 1, or, if arg PAGE, reset automatically to 1 on every page
+RESET_HEAD_NUMBER        Reset head number
+RESET_PARAHEAD_NUMBER    Reset parahead number
+RESET_SUBHEAD_NUMBER     Reset subhead number
+REVISION_STRING          What to print whenever the word "revision" is required
+SLANT_MEANS_SLANT        In TYPEWRITE, render \*[SLANT] as slant
+SUBHEAD_FAMILY           Family to use in subheads
+SUBHEAD_FONT             Font to use in subheads
+SUBHEAD_SIZE             How much to in/decrease point size of subheads
+SUBTITLE_FAMILY          Family to use for subtitle in doc header
+SUBTITLE_FONT            Font to use for subtitle in doc header
+SUBTITLE_SIZE            ps to use for subtitle in doc header
+SWITCH_HDRFTR            Switch HDRFTR_LEFT and HDRFTR_RIGHT
+TITLE_FAMILY             Family to use for title in doc headers
+TITLE_FONT               Font to use for title in doc headers
+TITLE_SIZE               How much to in/decrease title at start of doc
+UNDERLINE_ITALIC         In TYPEWRITE, render .FT I as underlined
+UNDERLINE_QUOTES         In TYPEWRITE, underline quotes? (toggle)
+UNDERLINE_SLANT          In TYPEWRITE, render \*[SLANT] as underlined
+
+ *relative to #DOC_PT_SIZE
+**relative to overall ps of headers as set by HEADER_SIZE
+
++++LETTER MACROS+++
+
+CLOSING      Closing (ie. Yours truly,)
+DATE         Date string for letters
+FROM         Addressor's name and address
+GREETING     Full salutation (eg. Dear John Smith,)
+NO_SUITE     Remove suite page numbers from bottom of letter pages
+TO           Addressee's name and address
+ALL_DONE     .em (the "end macro") for letters
+
++++DIVERSIONS+++
+
+B_QUOTE      Block (indented) quote text
+CLOSING      Closing (ie. Yours truly,)
+DATE         Date string for letters
+EPI_TEXT     Epigraph text
+FN_OVERFLOW  Excess footnotes when B_MARGIN is reached
+FOOTNOTES    Text of footnotes
+FROM_ADDRESS Addressor's name and address
+GREETING     Full salutation (eg. Dear John Smith,)
+P_QUOTE      Line for line (poetic) quote text
+TO_ADDRESS   Addressee's name and address
+
++++SUPPORT+++
+
+CHECK_INDENT         Applies indents to doc elements inside ev's (head, subhead, etc)
+D0_QUOTE             Outputs quotes with space adjustments before and after
+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
+HDRFTR_RULE          Prints rule under header or over footer
+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
+REMOVE_INDENT        Removes indents set with CHECK_INDENT
+TRAPS                Sets hdrftr traps; optionally adjusts #DOC_LEAD to fill page to #B_MARGIN
+
++++NUMBER REGISTERS+++
+
+#ADJ_DOC_LEAD              Adjust DOC_LEAD? (toggle)
+#ARG_NUM                   Keeps track of number of args passed to a macro
+#AUTHOR_LINES              # of lines of authors in doc header; odd=0 even=1
+#AUTHOR_NUM                Keeps track of user-defined string AUTHOR_<#> in AUTHOR
+#AUTHORS                   Equals final value of AUTHOR_NUM; used for authors in doc header
+#BROKEN_QUOTE              Did we invoke BREAK_QUOTE? (toggle)
+#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 (toggle)
+#CENTER_CAP_HEIGHT         Cap height of center string in headers/footers
+#CHAPTER                   The chapter number
+#CLOSING                   Is there a closing (for letters)? 1=yes
+#COL_L_LENGTH              Line length of columns
+#COL_NEXT                  Was COL_NEXT invoked? (toggle; used in FOOTER)
+#COL_NUM                   Incrementing counter of num of columns; for use with #COL_<#>_L_MARGIN
+#COL_TOTAL                 #COL_L_LENGTH + #GUTTER; used to calculate #COL_<#>_L_MARGIN
+#COLUMNS                   Are columns turned on? (toggle)
+#COPY_STYLE                1=draft, 2=final
+#DATE                      Is there a date (for letters)? 1=yes
+dc                         "mark" register for document columns
+#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
+#DOCHEADER_ADVANCE         Distance from top-of-page to baseline of docheader
+#DOCHEADER_LEAD_ADJ        +|- value applied to #DOC_LEAD to in/decrease leading of doc header
+#DOCHEADER_LEAD            Lead of doc header (#DOC_LEAD + #DOCHEADER_LEAD_ADJ)
+#DOCHEADER_SPACE_ADJ       Lead difference between #DEPTH_1 and #DEPTH_2
+#DOC_HEADER                Whether to print a doc header (toggle)
+#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
+#DOCS                      Always 1 after START
+#DOC_TYPE                  1=default, 2=chapter, 3=named, 4=letter
+#DRAFT                     The draft number
+#EM_ADJUST                 Amount to raise \(em at END
+#END_QUOTE                 For PP=0 indenting; did we just end a quote? (toggle)
+#EPI_ACTIVE                Are we in an epigraph? (toggle)
+#EPI_DEPTH                 Depth of epigraph from first baseline to last
+#EPI_FITS                  Does epigraph fit on page/column? (toggle)
+#EPIGRAPH                  Did we have an epigraph? (toggle) 
+#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? (toggle)
+#EPI_WHITESPACE            Space after epigraph to compensate for epigraph leading
+#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_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? (toggle)  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_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_MARKERS                Print footnote markers? (toggle)
+#FN_MARKER_STYLE           1=STAR; 2=NUMBER
+#FN_NUMBER                 Running count of fn #; used to print fn marker numbers
+#FN_R_INDENT               Right indent of INDENT RIGHT in footnotes
+#FN_RULE_ADJ               # of points to raise footnote separator from its baseline
+#FN_RULE_LENGTH            Length of footnote separator rule
+#FN_RULE                   Print fn rule? (toggle)
+#FN_WAS_DEFERED            Tells HEADER about a defered footnote
+#FOOTER_GAP                Amount of space between end of text and page #
+#FOOTER_MARGIN             Amount of space between page # and bottom of page
+#FROM                      Is there an addressor (for letters)? 1=yes
+#FULLSPACE_QUOTES          Should we fullspace quotes? (toggle)
+#GREETING                  Is there a greeting (for letters)? 1=yes
+#GUTTER                    Width of gutter between columns
+#HDRFTR_CENTER_CAPS        Center part of header/footer in caps? (toggle; default=off)
+#HDRFTR_LEFT_CAPS          Left part of header/footer in caps? (toggle; default=off)
+#HDRFTR_RIGHT_CAPS         Right part of header/footer in caps? (toggle; default=on)
+#HDRFTR_RULE_GAP           Space between header/footer and header/footer rule
+#HDRFTR_RULE               Print head/footer rule? (toggle)
+#HDRFTR_TMP_CAPS_SWITC H   Temporarily holds HDRFTR_LEFT_CAPS value if #SWITCH_HDRFTR=1
+#HEAD                      1=main/section head 2=subhead
+#HEAD_CAPS                 Print section titles in caps? (toggle)
+#HEADER_GAP                Distance from header to running text
+#HEADER_MARGIN             Distance from top of page to header
+#HEADERS_ON                Headers on? (toggle)
+#HEADER_STATE              Saves header state in COLLATE for use in START after COLLATE
+#HEAD_NUM                  Head number
+#HEAD_SPACE                2 line spaces before heads? (toggle; 1=yes, 0=no)
+#HEAD_UNDERLINE            Underline section titles? (toggle)
+#IGNORE                    Should we ignore this macro? Set to 1 in TYPEWRITE.
+#INDENT_FIRST_PARAS        Indent first paras? (toggle)
+#INDENT_FIRSTS             Tells foonotes to leave INDENT_FIRST_PARAS alone if it's on for running text.
+#ITALIC_MEANS_ITALIC       For TYPEWRITE.  1=yes; 0=no
+#LEFT_CAP_HEIGHT           Cap height of left string in headers/footers
+#LETTER_STYLE              1=BUSINESS 2=PERSONAL
+#LINEBREAK                 Did we have a linebreak? (toggle)
+#LINES_PER_PAGE            # of lines (at DOC_LEAD) that fit on page after #B_MARGIN is set
+#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
+#n%_AT_PAGENUM_SET         Page # from n% when PAGENUMBER invoked
+#NEXT_AUTHOR               Supplies correct digit to AUTHOR_<#> when printing authors in doc header
+#NUM_AUTHORS               # of authors mod 2 to test if odd or even # of authors
+#NUMBER_HEAD               Are heads numbered? (toggle)
+#NUMBER_PH                 Are paraheads numbered? (toggle)
+#NUMBER_SH                 Are subheads numbered? (toggle)
+#NUM_COLS                  Number of columns per page
+#PAGE_NUM_ADJ              What to add to n% to get #PAGENUMBER
+#PAGENUMBER                The page number
+#PAGE_NUM_H_POS            1=left 2=center 3=right; default=2
+#PAGE_NUM_HYPHENS          Print hyphens surrounding page numbers? (toggle)
+#PAGE_NUM_HYPHENS_SET      Did user set (or unset) hyphens around page numbers? (toggle)
+#PAGE_NUM_POS_SET          Did user set page number position? (toggle)
+#PAGE_NUM_SET              Test if PAGE_1_NUM was used to set 1st page number
+#PAGE_NUMS                 Print page numbers? (toggle)
+#PAGE_NUM_V_POS            1=top 2=bottom; default=2
+#PAGE_TOP                  \n(nl after HEADER completes itself
+#PH_NUM                    Parahead number
+#PAGINATION_STATE          Saves pagination state in COLLATE for use in START after a COLLATE
+#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? (toggle)
+#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
+#PRINT_PAGENUM_ON_PAGE_1   Should we print the page number on first page of doc when footers are on? (toggle)
+#PRINT_STYLE               Typewrite=1, typeset=2
+#PT_SIZE_IN_UNITS          Stored value of \n[.ps] from last time PS was called
+#Q_DEPTH                   Depth of quote
+#Q_FITS                    Does this quote fit on one page/column? (toggle)
+#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_PP                      In PP, stores para # in QUOTE.  Removed in ENDQUOTE.
+#Q_TOP                     Vertical place on page that a quote starts
+#QUOTE                     1=PQUOTE, 2=BQUOTE
+#RECTO_VERSO               Switch HEADER_LEFT and HEADER_RIGHT on alternate pages? (toggle); default=0
+#REPEAT                    Number of times to repeat linebreak character
+#RESET_FN_NUMBER           Should fn# start at 1 on every page? (toggle)
+#RESET_PP_INDENT           Stores value of PP_INDENT when necessary
+#RESTORE_OFFSET            Page offset at moment footer trap is sprung; not currently used
+#REVISION                  The revision number
+#RIGHT_CAP_HEIGHT          Cap height of right string in headers/footers
+#SH_LEAD_ADJUST            #DOC_LEAD/8 (TYPESET) or /2 (TYPEWRITE) (used for subhead spacing)
+#SH_NUM                    Subhead number
+#SINGLE_SPACE              Is TYPEWRITE in single space mode? (toggle)
+#SLANT_MEANS_SLANT         For TYPEWRITE.  1=yes; 0=no
+#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
+#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
+#SUITE                     Current page number (for letters)
+#SUP_PT_SIZE               Point size of superscript
+#SWITCH_HDRFTR             Switch HDRFTR_LEFT and HDRFTR_RIGHT? (toggle)
+#TAB_OFFSET#               "#" at the end is from $CURRENT_TAB
+#TO                        Is there an addressee date (for letters)? 1=yes
+#UNDERLINE_ITALIC          For TYPEWRITE.  1=yes; 0=no
+#UNDERLINE_QUOTE           Underline pquotes? (toggle)
+#UNDERLINE_SLANT           For TYPEWRITE.  1=yes; 0=no
+#UNDERLINE_WAS_ON          In HEADER to re-enable running text UNDERLINE (toggle)
+#USER_DEF_HEADER_CENTER    User defined center title? (1=yes); used in COPYSTYLE
+#USER_DEF_HEADER_LEFT      User defined center title? (1=yes); used in COPYSTYLE
+#USER_DEF_HEADER_RIGHT     User defined center title? (1=yes); used in COPYSTYLE
+#VARIABLE_FOOTER_POS       Wandering trap position for processing footnotes and footers; pos depends on footnotes
+ 
++++STRINGS+++
+
+$ATTRIBUTE_STRING              "by" line in doc header
+$AUTHOR_1...9                   Document author(s)
+$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*
+$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*
+$CENTER_TITLE                   What to put in the middle of header title
+$CHAPTER_STRING                 What to print whenever the word "chapter" is required
+$COPY_STYLE                     DRAFT or FINAL
+$DOC_FAM                        Predominant font family used in the document
+$DOC_QUAD                       Quad used for body text (justified or left) 
+$DOC_TYPE                       Document type (default, chapter, named, letter)
+$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*
+$DRAFT_STRING                   What to print whenever the word "draft" is required
+$EPI_AUTOLEAD                   Autolead value (decimals ok) of epigraphs
+$EPI_FAM                        Family to use in epigraphs
+$EPI_FT                         Font to use in epigraphs
+$EPI_QUAD                       Quad in block-style epigraphs (justified or left)
+$EPI_SIZE_CHANGE                ps in/decrease of epigraphs*
+$FINIS_STRING                   What to print when FINIS macro is invoked
+$FN_FAM                         Family used in footnotes
+$FN_FT                          Font used in footnotes
+$FN_QUAD                        Quad used in footnotes
+$FN_SIZE_CHANGE                 ps in/decrease of footnotes*
+$HDRFTR_CENTER_FAM              Family of center part of headers
+$HDRFTR_CENTER_FT               Font of center part of headers
+$HDRFTR_CENTER_SIZE_CHANGE      ps in/decrease of center title in headers**
+$HDRFTR_CENTER                  What to put in center part of headers; default doctype
+$HDRFTR_FAM                     Family to use in 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_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_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
+$HEAD_FAM                       Family to use for section titles
+$HEAD_FT                        Font to use for section titles
+$HEAD_QUAD                      Quad valude of section titles
+$HEAD_SIZE_CHANGE               ps in/decrease of section titles*
+$LINEBREAK_CHAR                 Character that marks line breaks
+$LINEBREAK_CHAR_V_ADJ           +|- amount by which to raise/lower linebreak character
+PAGE#                           For use in hdrftr strings where page # is needed; \*[PAGE]
+$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
+$PP_FT                          Font used in paragraphs
+$QUOTE_FAM                      Family to use for pquotes
+$QUOTE_FT                       Font to use for pquotes
+$QUOTE_SIZE_CHANGE              ps in/decrease of pquotes*
+$REVISION_STRING                What to print whenever the word "revision" is required
+$SH_FAM                         Family to use in subheads
+$SH_FT                          Font to use in subheads
+$SH_SIZE_CHANGE                 ps in/decrease of subheads*
+$SUBTITLE                       Document subtitle
+$SUBTITLE_FAM                   Family to use for subtitle in doc header
+$SUBTITLE_FT                    Font to use for subtitle in doc header
+$SUBTITLE_SIZE_CHANGE           Font to use for subtitle in doc header
+$SUITE                          The #SUITE number register
+$TITLE                          Document title
+$TITLE_FAM                      Family to use for title in doc header
+$TITLE_FT                       Font to use for title in doc header
+$TITLE_SIZE_CHANGE              ps in/decrease of title in doc header*
+
+ *relative to #DOC_PT_SIZE
+**relative to overall ps of headers as set by HEADER_SIZE
+
++++ALIASES+++
+
+BREAK_BLOCKQUOTE      BREAK_QUOTE
+BREAK_CITATION        BREAK_QUOTE
+BREAK_CITE            BREAK_QUOTE
+CITATION              BLOCKQUOTE
+CITE                  BLOCKQUOTE
+COL_BREAK             COL_NEXT
+DOC_FAM               DOC_FAMILY
+DOC_LLENGTH           DOC_LINE_LENGTH
+DOC_L_LENGTT          DOC_LINE_LENGTH
+DOC_L_MARGIN          DOC_LEFT_MARGIN
+DOC_LMARGIN           DOC_LEFT_MARGIN
+DOC_LS                DOC_LEAD
+DOC_PS                DOC_PT_SIZE
+DOC_R_MARGIN          DOC_RIGHT_MARGIN
+DOC_RMARGIN           DOC_RIGHT_MARGIN
+FOOTER_CENTER_CAPS    HDRFTR_CENTER_CAPS
+FOOTER_CENTER_FAM     HDRFTR_CENTER_FAMILY
+FOOTER_CENTER_FAMILY  HDRFTR_CENTER_FAMILY
+FOOTER_CENTER_FONT    HDRFTR_CENTER_FONT
+FOOTER_CENTER_FT      HDRFTR_CENTER_FONT
+FOOTER_CENTER         HDRFTR_CENTER
+FOOTER_CENTER_PS      HDRFTR_CENTER_SIZE
+FOOTER_CENTER_SIZE    HDRFTR_CENTER_SIZE
+FOOTER_CENTRE_CAPS    HDRFTR_CENTER_CAPS
+FOOTER_CENTRE_FAM     HDRFTR_CENTER_FAMILY
+FOOTER_CENTRE_FAMILY  HDRFTR_CENTER_FAMILY
+FOOTER_CENTRE_FT      HDRFTR_CENTER_FONT
+FOOTER_CENTRE         HDRFTR_CENTER
+FOOTER_CENTRE_PS      HDRFTR_CENTER_SIZE
+FOOTER_CENTRE_SIZE    HDRFTR_CENTER_SIZE
+FOOTER_FAM            HDRFTR_FAMILY
+FOOTER_FAMILY         HDRFTR_FAMILY
+FOOTER_LEFT_CAPS      HDRFTR_LEFT_CAPS
+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_LEFT           HDRFTR_LEFT
+FOOTER_LEFT_PS        HDRFTR_LEFT_SIZE
+FOOTER_LEFT_SIZE      HDRFTR_LEFT_SIZE
+FOOTER_PLAIN          HDRFTR_PLAIN
+FOOTER_RIGHT_CAPS     HDRFTR_RIGHT_CAPS
+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_RIGHT          HDRFTR_RIGHT
+FOOTER_RIGHT_PS       HDRFTR_RIGHT_SIZE
+FOOTER_RIGHT_SIZE     HDRFTR_RIGHT_SIZE
+FOOTER_RULE_GAP       HDRFTR_RULE_GAP
+FOOTER_RULE           HDRFTR_RULE
+FOOTER_SIZE           HDRFTR_SIZE
+HDRFTR_RULE_INTERNAL  HDRFTR_RULE
+HEADER_CENTER_CAPS    HDRFTR_CENTER_CAPS
+HEADER_CENTER_FAM     HDRFTR_CENTER_FAMILY
+HEADER_CENTER_FAMILY  HDRFTR_CENTER_FAMILY
+HEADER_CENTER_FONT    HDRFTR_CENTER_FONT
+HEADER_CENTER_FT      HDRFTR_CENTER_FONT
+HEADER_CENTER         HDRFTR_CENTER
+HEADER_CENTER_PS      HDRFTR_CENTER_SIZE
+HEADER_CENTER_SIZE    HDRFTR_CENTER_SIZE
+HEADER_CENTRE_CAPS    HDRFTR_CENTER_CAPS
+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_CENTRE         HDRFTR_CENTER
+HEADER_CENTRE_PS      HDRFTR_CENTER_SIZE
+HEADER_CENTRE_SIZE    HDRFTR_CENTER_SIZE
+HEADER_FAM            HDRFTR_FAMILY
+HEADER_FAMILY         HDRFTR_FAMILY
+HEADER_LEFT_CAPS      HDRFTR_LEFT_CAPS
+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_LEFT           HDRFTR_LEFT
+HEADER_LEFT_PS        HDRFTR_LEFT_SIZE
+HEADER_LEFT_SIZE      HDRFTR_LEFT_SIZE
+HEADER_PLAIN          HDRFTR_PLAIN
+HEADER_RIGHT_CAPS     HDRFTR_RIGHT_CAPS
+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_RIGHT          HDRFTR_RIGHT
+HEADER_RIGHT_PS       HDRFTR_RIGHT_SIZE
+HEADER_RIGHT_SIZE     HDRFTR_RIGHT_SIZE
+HEADER_RULE_GAP       HDRFTR_RULE_GAP
+HEADER_RULE           HDRFTR_RULE
+HEADER_SIZE           HDRFTR_SIZE
+PAGENUM               PAGENUMBER
+PAGINATION            PAGINATE
+PP_FT                 PP_FONT
+PRINT_FOOTNOTE_RULE   FOOTNOTE_RULE
+SWITCH_FOOTERS        SWITCH_HDRFTR
+SWITCH_HEADERS        SWITCH_HDRFTR
+
+ +
+Prev   +Top   +Back to Table of Contents + + diff --git a/contrib/mom/momdoc/toc.html b/contrib/mom/momdoc/toc.html new file mode 100644 index 00000000..fd130363 --- /dev/null +++ b/contrib/mom/momdoc/toc.html @@ -0,0 +1,203 @@ + + + +Mom -- Table of Contents + + + + + +

Table of Contents

+ + + diff --git a/contrib/mom/momdoc/typemacdoc.html b/contrib/mom/momdoc/typemacdoc.html new file mode 100644 index 00000000..11c87ea9 --- /dev/null +++ b/contrib/mom/momdoc/typemacdoc.html @@ -0,0 +1,170 @@ + + + +Mom -- Typesetting macros in document processing + + + + + +Next   +Prev   +Back to Table of Contents + + + +

USING TYPESETTING MACROS DURING DOCUMENT PROCESSING

+
+ +During document processing, most of the +typesetting macros +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. +

+Typesetting macros that temporarily alter margins and line lengths +affect +running text +globally (or at least try to), but leave headers/footers and footnotes +alone. (To indent footnotes, see the full explanation of the +FOOTNOTE +macro.) +

+There are, however, some typesetting macros that, 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, +family, +font, +point size, +leading, +and +quad. +

+NOTE: See the section on +Top and bottom margins in document processing +for information on how mom interprets +T_MARGIN +and +B_MARGIN +in document processing. + +

+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's +document element tags. +In other words, you need to do a bit of creative typesetting in the +middle of a document. +

+The following lists those typesetting macros whose behaviour during +document processing requires some explanation. +

+

+MACRO           EFFECT DURING DOCUMENT PROCESSING
+-----           ---------------------------------
+
+L_MARGIN        *The left margin of all running text
+                 assumes the new value.
+
+                *The line length remains unaltered.
+
+                *The header and footer left margin
+                 remain at the current document default.
+
+                (You won't use this often by itself.  Most
+                 likely, you'll use it in combination with
+                 R_MARGIN or LL.)
+
+R_MARGIN        *The right margin of all running text
+                 assumes the new value.  In other words,
+                 the line length is altered.
+
+                *The header and footer right margin
+                 remain at the current document default.
+
+LL              *The line length of all running text
+                 is set to the new value.
+
+                *The header and footer line length remain
+                 at the current document default.
+
+FAMILY          *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              *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. -- \*[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.
+
+PS              *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              *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.  Highly NOT recommended, since changes to
+                 a document's leading interfere with mom's
+                 ability to balance bottom margins.
+
+QUAD            *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. -- Line-for-line quadding macros
+                 (LEFT, CENTER, RIGHT) are also temporary,
+                 overridden by the QUAD value of any subsequent
+                 document element tag.
+
+
+ + + + +

Top and bottom margins in document processing

+
+ +Normally, mom establishes the top and bottom margins +of +running text +in documents from the values of HEADER_MARGIN + +HEADER_GAP and FOOTER_MARGIN + FOOTER_GAP +respectively. However, if you invoke +T_MARGIN +or +B_MARGIN +either before or after +START, +they set the top and bottom margins of running text irrespective +of HEADER_GAP and FOOTER_GAP. +

+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 +headers, +footers, +or page numbers. + +

+


+Next   +Prev   +Top   +Back to Table of Contents + + diff --git a/contrib/mom/momdoc/typesetting.html b/contrib/mom/momdoc/typesetting.html new file mode 100644 index 00000000..6bce803a --- /dev/null +++ b/contrib/mom/momdoc/typesetting.html @@ -0,0 +1,3726 @@ + + + +Mom -- Typesetting Macros + + + + + +Next   +Prev   +Back to Table of Contents + + + +

THE TYPESETTING MACROS

+
+ +Introduction to the typesetting macros +
+ +
+ +

Introduction to the typesetting macros

+ +Mom's typesetting macros provide access to +groff's typesetting capabilities. Aside from controlling basic +type parameters (family, font, line length, point size, leading), +mom's macros fine-tune wordspacing, letterspacing, +kerning, hyphenation, and so on. In addition, mom +has true typesetting tabs, string tabs, multiple indent styles, +line padding, and a batch of other goodies. +

+In some cases, mom's typesetting macros merely imitate +groff primitives. In others, they approach typesetting concerns in +conceptually new ways (for groff, at least). This should present no +problem for newcomers to groff who are learning mom. +Old groff hands should be careful. Just because it looks like a +duck and walks like a duck does not, in this instance, mean that it +is a duck. When using mom, stay away from groff +primitives if mom provides a macro that accomplishes +the same thing. +

+Mom's typesetting macros can be used as a standalone +package, independent of the +document processing macros. +With them, you can typeset on-the-fly. Document covers, your best +friend's résumé, a poster for a lost dog -- none of these requires +structured document processing (page headers, paragraphs, heads, +footnotes, etc). What they do demand is precise control over every +element on the page. The typesetting macros give you that control. +
+


+ + + + + + +

Page setup: paper size and page margins

+
+ +The page setup macros establish the physical dimensions of your +page and the margins you want it to have. Groff +has defaults for these, but I recommend setting them at the top +of your files anyway unless you're using mom's +document processing macros +and are content with her defaults. +

+The +PAPER +macro provides a shortcut for setting the page to the correct +dimensions for letter, legal, and A4 printer sheets. The +PAGE +macro provides a convenient way of setting the page dimensions and +some or all of the page margins with a single macro. +
+ + +

Page setup macros list

+ + + + + + +
+

Page width

+
+Macro: PAGEWIDTH <width of printer sheet> +
+*Requires a unit of measure + +

+The argument to PAGEWIDTH is the width of your +printer sheet. PAGEWIDTH requires a unit of measure. +Decimal fractions are allowed. Hence, to tell mom +the width of your printer sheet is 8-1/2 inches, you enter +

+

+	.PAGEWIDTH 8.5i
+
+ + + +
+

Page length

+
+Macro: PAGELENGTH <length of printer sheet> +
+*Requires a unit of measure + +

+PAGELENGTH tells mom how long your +printer sheet is. It works just like +PAGEWIDTH. Therefore, to tell +mom your printer sheet is 11 inches long, you +enter +

+

+	.PAGELENGTH 11i
+
+ + + +
+

Paper

+
+Macro: PAPER <paper type> + +

+PAPER provides a convenient way to set the page +dimensions for some common printer sheet sizes. <paper +type> can be one of: +

+

+	LETTER
+	LEGAL
+	STATEMENT
+	TABLOID
+	LEDGER
+	FOLIO
+	QUARTO
+	10x14
+	EXECUTIVE
+	A3
+	A4
+	A5
+	B4
+	B5 
+
+ +Say, for example, you have A4-sized sheets in your printer. +It's shorter (and easier) to enter +

+

+	.PAPER A4
+
+ +than to remember the correct dimensions and enter +

+

+	.PAGEWIDTH  595p
+	.PAGELENGTH 842p
+
+ + + +
+

Left margin

+
+Macro: L_MARGIN <left margin> +
+*Requires a unit of measure + +

+L_MARGIN establishes the distance from the left edge +of the printer sheet at which you want your type to start. It may +be used any time, and remains in effect until you enter a new value. +

+Left indents +and +tabs +are calculated from the value you pass to L_MARGIN, +hence it's always a good idea to invoke it before starting any serious +typesetting. A unit of measure is required. Decimal fractions are +allowed. Therefore, to set the left margin at 3 picas (1/2 inch), +you'd enter either +

+

+	.L_MARGIN 3P
+	  or
+	.L_MARGIN .5i
+
+ +If you use the macros +PAGE, +PAGEWIDTH +or +PAPER +without invoking L_MARGIN (either before +or afterwards), mom automatically sets +L_MARGIN to 1 inch. +

+NOTE: L_MARGIN behaves in a special way when you're +using the +document processing macros. +See +Typesetting Macros in Document Processing +for an explanation. +
+ + + +


+

Right margin

+
+Macro: R_MARGIN <right margin> +
+*Requires a unit of measure + +

+R_MARGIN establishes the amount of space you +want between the end of typeset lines and the right hand edge +of the printer sheet. In other words, it sets the line length. +R_MARGIN requires a unit of measure. Decimal +fractions are allowed. +

+The line length macro (LL) can +be used in place of R_MARGIN. In either case, the +last one invoked sets the line length. The choice of which to use is +up to you. In some instances, you may find it easier to think of a +section of type as having a right margin. In others, giving a line +length may make more sense. +

+For example, if you're setting a page of type you know should have +6-pica margins left and right, it makes sense to enter a left and +right margin, like this: +

+

+	.L_MARGIN 6P
+	.R_MARGIN 6P
+
+ +That way, you don't have to worry about calculating the line +length. On the other hand, if you know the line length for a +patch of type should be 17 picas and 3 points, entering the line +length with LL is much easier than calculating the +right margin. +

+

+	.LL 17P+3p
+
+ +If you use the macros +PAGE, +PAGEWIDTH +or +PAPER +without invoking R_MARGIN afterwards, +mom automatically sets R_MARGIN +to 1 inch. If you set a line length after these macros (with +LL), +the line length calculated by R_MARGIN is, of course, +overridden. +

+IMPORTANT: R_MARGIN, if used, MUST come after +PAPER, +PAGEWIDTH, +L_MARGIN +and/or +PAGE +(if a right margin isn't given to PAGE). +The reason is that R_MARGIN calculates line +length from the overall page dimensions and the left margin. +Obviously, it can't make the calculation if it doesn't know the page +width and the left margin. +

+NOTE: R_MARGIN behaves in a special way +when you're using the +document processing macros. +See +Typesetting Macros in Document Processing +for an explanation. +
+ + + +


+

Top margin

+
+Macro: T_MARGIN <top margin> +
+*Requires a unit of measure + +

+T_MARGIN establishes the distance from the top of +the printer sheet at which you want your type to start. It requires +a unit of measure, and decimal fractions are allowed. To set a top +margin of 2-1/2 centimeters, you'd enter +

+

+	.T_MARGIN 2.5c
+
+ +T_MARGIN calculates the vertical position of the +first line of type on a page by treating the top edge of the printer +sheet as a baseline. Therefore, +

+

+	.T_MARGIN 1.5i
+
+ +puts the baseline of the first line of type 1-1/2 inches beneath +the top of the page. +

+IMPORTANT: T_MARGIN does two +things: it establishes the top margin for pages that come after +it AND it moves to that position on the current page. Therefore, +T_MARGIN should only be used at the top of a file +(prior to entering text) or after +NEWPAGE, +like this: +

+

+	.NEWPAGE
+	.T_MARGIN 6P
+	<text>
+
+ +NOTE: 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. +
+ + + +
+

Bottom margin

+
+Macro: B_MARGIN <bottom margin> +
+*Requires a unit of measure + +

+B_MARGIN sets a nominal position at the bottom +of the page beyond which you don't want your type to go. When the +bottom margin is reached, mom starts a new page. +B_MARGIN requires a unit of measure. Decimal +fractions are allowed. To set a nominal bottom margin of 3/4 inch, +enter +

+

+	.B_MARGIN .75i
+
+ +Obviously, if you haven't spaced the type on your pages so that +the last lines fall perfectly at the bottom margin, the margin will +vary from page to page. Usually, but not always, the last line of +type that fits on a page before the bottom margin causes +mom to start a new page. +

+Occasionally, owing to a peculiarity in groff, +an extra line will fall below the nominal bottom margin. If you're +using the +document processing macros, +this is unlikely to happen; the document processing macros are very +hard-nosed about aligning bottom margins. +

+NOTE: The meaning of B_MARGIN is +slightly different when you're using the document processing macros. +See +Top and bottom margins in document processing +for an explanation. +
+ + + +


+

Page

+
+Macro: PAGE +<width> [ <length> [ <lm> [ <rm> [ <tm> [ <bm> ] ] ] ] ] +
+*All arguments require a unit of measure + +

+PAGE lets you establish paper dimensions and page +margins with a single macro. The only required argument is page width. +The rest are optional, but they must appear in order and you can't +skip over any. <lm>, <rm>, <tm> +and <bm> refer to the left, right, top and bottom +margins respectively. +

+Assuming your page dimensions are 11 inches by 17 inches, and that's +all you want to set, enter +

+

+	.PAGE 11i 17i
+
+ +If you want to set the left margin as well, say, at 1 inch, +PAGE would look like this: +

+

+	.PAGE 11i 17i 1i
+
+ +Now suppose you also want to set the top margin, say, at 1-1/2 +inches. <tm> comes after <rm> +in the optional arguments, but you can't skip over any arguments, +therefore to set the top margin, you must also give a right margin. +The PAGE macro would look like this: +

+

+        .PAGE 11i 17i 1i 1i 1.5i
+                         |   |
+        required right___|   |___top margin
+                margin
+
+ +Clearly, PAGE is best used when you want a convenient +way to tell mom just the dimensions of your printer +sheet (width and length), or when you want to tell her everything +about the page (dimensions and all the margins), for example +

+

+	.PAGE 8.5i 11i 45p 45p 45p 45p
+
+ +This sets up an 8-1/2 by 11 inch page with margins of 45 points +(5/8-inch) all around. +

+NOTE: Only use PAGE at the +start of a document, before entering any text. And remember, +when you're using the +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). +

+Additionally, if you invoke PAGE with a top margin +argument, any macros you invoke after PAGE will +almost certainly move the +baseline +of the first line of text down by one linespace. To compensate, do +

+

+	.RLD 1v
+
+ +immediately before entering any text, or, if it's feasible, make +PAGE the last macro you invoke prior to entering text. +
+ + + +
+

Start a new page

+
+Macro: NEWPAGE + +

+Whenever you want to start a new page, use NEWPAGE, by +itself with no argument. Mom will finish up +processing the current page and move you to the top of a new one +(subject to the top margin set with +T_MARGIN. +

+Experts: NEWPAGE is an alias of +.bp. You can use either, or mix 'n' match with +impunity. +
+


+ + + + + + +

Basic Typesetting Parameters

+
+ +Basic parameter macros deal with the fundamental requirements +for setting type: family, font, point size, leading and line length. +

+If you're using the typesetting macros only, the arguments passed +to the basic parameter macros remain in effect until you change them. +The document processing macros handle things differently. See +Typesetting Macros in Document Processing +for an explanation. +
+ +

Basic parameter macros list

+
    +
  • FAMILY (type family) +
  • FONT (font) +
  • PS (point size of type) +
  • LS (line spacing/leading) +
  • AUTOLEAD (automatic line spacing) +
  • LL (line length) +
+ + + +
+

Type family

+
+Macro: FAMILY <family> +
+Alias: FAM + +

+FAMILY takes one argument: the name of the type family +you want. Groff comes with a number of PostScript families, each +identified by a 1-, 2- or 3-letter mnemonic. The standard families +are: + + +
AAvant Garde +
BM Bookman +
HHelvetica +
NNew Century Schoolbook +
PPalatino +
TTimes Roman
+

+The argument you pass to FAMILY is the identifier at +left above. For example, if you want Helvetica, enter +

+

+	.FAMILY H
+
+ +NOTE: The font macro +(FT) lets you to specify both the type family +and the desired font with a single macro. While this saves a few +keystrokes, I recommend using FAMILY for family, +and FT for font, except where doing so is genuinely +inconvenient. +

+Experts: +
+If you add other PostScript families to groff's /font/devps directory, +be sure to follow the groff standard for naming families and fonts. +For example, if you add the Garamond family, name the font files +

+

+	GARAMONDR
+	GARAMONDI
+	GARAMONDB
+	GARAMONDBI
+
+ +GARAMOND then becomes a legal family name you can pass to +FAMILY. (You could, of course, shorten GARAMOND to just +G, or GD.) R, I, B, and BI after GARAMOND are the roman, italic, +bold and bold-italic fonts respectively. +
+ + + +
+

Font

+
+Macro: FT R | I | B | BI + +

+FT takes one of four possible arguments specifying the +desired font: + + +
R = roman +
I = italic +
B = bold +
BI = bold-italic
+

+For example, if your family is Helvetica, entering +

+

+	.FT B
+
+ +will give you the Helvetica bold font. If your family were +Palatino, you'd get the Palatino bold font. +

+You can specify both family and font in the FT macro. +As an example, +

+

+	.FT HB
+
+ +sets the font to Helvetica bold. I strongly recommend keeping +family and font separate. +

+Fonts can also be changed inline. See +Inline Escapes, font control. +
+ + + +


+

Point size of type

+
+Macro: PS <size of type in points> +
+*Does not require a unit of measure + +

+PS (Point Size) takes one argument: the size of type +in points. Unlike most other macros that establish the size or measure +of something, PS does not require that you supply a +unit of measure since it's a near universal convention that type size +is measured in points. Therefore, to change the type size to, say, +11 points, enter +

+

+	.PS 11
+
+ +Point sizes may be fractional (e.g. 10.25 or 12.5). +

+You can prepend a plus or a minus sign to the argument to +PS, 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 +

+

+	.PS +2
+
+ +then later reset it to 12 with +

+

+	.PS -2
+
+ +The size of type can also be changed inline. See +Inline Escapes, changing point size. +
+ + + +
+

Line spacing/leading

+
+Macro: LS <distance between lines> +
+*Does not require a unit of measure + +

+LS (Line Space) takes one argument: the distance you want, typically +in points, from baseline to baseline of type. The argument may +be fractional (e.g. 12.25 or 14.5). Like PS, +LS does not require a unit of measure, since +leading +is most often given in points. Therefore, to set the linespace to +14 points, you would enter +

+

+	.LS 14
+
+ +However, if you wish, you may specify a unit of measure by appending +it directly to the argument passed to LS. For example, +if you want a linespace of 1/4 of an inch, enter +

+

+	.LS .25i
+
+ +You can prepend a plus or a minus sign to the argument to +LS, in which case the line spacing will be changed +by + or - the original value. For example, if the line spacing is +14 points, and you want 17 points, you can do +

+

+	.LS +3
+
+ +then later reset it to 14 points with +

+

+	.LS -3
+
+ +Experts: +
+LS should not be confused with the groff primitive +ls. LS acts like vs. +mom does not provide a macro analogous to +ls. +
+ + + +
+

Automatic line spacing

+
+Macro: AUTOLEAD <amount of automatic leading> [FACTOR] +
+*Does not require a unit of measure + +

+Without the FACTOR argument, AUTOLEAD +calculates the linespace for you by adding its argument to the +current point size of type. All subsequent PS +requests automatically update the linespacing by the autolead amount. +

+Used in this way, AUTOLEAD does not require a unit +of measure; points is assumed. However, you may use an alternate +unit of measure by appending it to the argument. The argument may +be a decimal fraction (e.g. .5 or 2.75). +

+As an example, if your current point size of type is 12, entering +

+

+	.AUTOLEAD 2
+
+ +changes the linespace to 14 points, regardless any linespacing +already in effect. From here on, every change to the size of type +(with PS, not +inline) +changes the linespace as well. If you decrease the type size to 9 +points, the leading decreases to 11 points. If you increase the type +size to 16 points, the leading increases to 18 points. +

+Automatic updating of the linespacing continues until you enter a +"manual" line space value with LS. +

+If you give AUTOLEAD the optional +FACTOR argument, AUTOLEAD +calculates the line space as a factor of the +numeric argument +you gave AUTOLEAD. For example, if your point +size is 12, +

+

+	.AUTOLEAD 1.125 FACTOR
+
+sets the leading at 13.5 points. If you change the point size +to 14, the leading automatically changes to 15.75 (14 x 1.125). +

+NOTE: There's no need to prepend a plus sign (+) +to AUTOLEAD's argument, although you may do so if you +wish. +
+ + + +


+

Line length

+
+Macro: LL <line length> +
+*Requires a unit of measure + +

+LL (Line Length) takes one argument: the distance from the +left margin of the page to the maximum allowable point on the +right at which groff should place type. The line length, in +other words, as the macro suggests. +

+LL requires a unit of measure. Therefore, to set the line +length to 39 picas, you would enter +

+

+	.LL 39P
+
+ +As with other macros that require a unit of measure, the argument to +LL may be fractional. For example, +

+

+	.LL 4.5i
+
+ +sets the line length to 4-1/2 inches. + +

+NOTE: The right margin +macro (R_MARGIN) can also be used to set line +length. +
+


+ + + + + + +

Justifying, quadding, filling and breaking lines

+
+ +The justification and quadding macros deal with how type aligns along +the left and right margins. In a nutshell, type either aligns at the +left margin, at the right margin, at both margins, or at neither margin +(centered). +

+These macros also determine whether or not +input lines are joined and +filled during output. +

+Additionally, macros that deal with how to break +output lines are covered in this +section, as is the +inline escape for joining output lines. +

+You may encounter some words here that are unfamiliar. Refer to +Typesetting terms and +Groff terms for an explanation. + +

Justification, quad, fill, and break macro list

+ +
    +
  • Fill modes +
      +
    • JUSTIFY (set lines justified) +
    • QUAD (set filled lines flush left, right or centered) +
    +
  • Nofill modes +
      +
    • LEFT (set non-filled lines flush left) +
    • RIGHT (set non-filled lines flush right) +
    • CENTER (set non-filled lines centered) +
    +
  • Breaking lines +
      +
    • BR (manually break an output line) +
    • EL (break a line without advancing to the next output line) +
    • SPACE (break a line and add space before the next output line) +
    • SPREAD (break and force-justify an output line) +
    +
  • Joining lines +
      +
    • \c inline escape +
    +
+ + + +
+

Justify lines

+
+Macro: JUSTIFY +
+Fill mode + +

+JUSTIFY doesn't take an argument. +Input lines +after JUSTIFY are +filled and +justified +upon output. +

+To break lines and prevent them from being filled and justified, +use the +BR macro. +
+ + + +


+

Quad lines left, right, or center

+
+Macro: QUAD L | LEFT | R | RIGHT | C | CENTER | J | JUSTIFY +
+Alias: FILL +
+Fill mode + +

+QUAD takes one argument: the direction in which lines +should be +quadded. +Input lines +after QUAD are +filled +upon output. +

+If L or LEFT, type is set flush +along the left margin. +

+If R or RIGHT, type is +set flush along the right margin. +

+If C or CENTER type is set centered +on the current line length. +

+J and JUSTIFY justify text, +and are included as a convenience only. Obviously, if text is +justified, it isn't quadded. QUAD J and +QUAD JUSTIFY have exactly the same effect as JUSTIFY. +

+To break lines and prevent them from being filled, use the +BR macro. +
+ + + +


+

Set non-filled lines flush left, right, or centered

+
+Macro: LEFT +  Macro: RIGHT +  Macro: CENTER + (alias CENTRE) +
+Nofill mode + +

+LEFT, RIGHT and +CENTER let you enter text on a line for line basis +without having to use the +BR macro after each line. +Consider the following: +

+

+	.QUAD LEFT
+	So runs my dream, but what am I?
+	.BR
+	An infant crying in the night
+	.BR
+	An infant crying for the light
+	.BR
+	And with no language but a cry.
+	.BR
+
+ +Because text after QUAD is +filled, you have to use the +BR +macro to prevent the lines from running together. Not only is this +annoying to type, it's awkward to read in a text editor. Much better +to do +

+

+	.LEFT
+	So runs my dream, but what am I?
+	An infant crying in the night
+	An infant crying for the light
+	And with no language but a cry.
+
+ +IMPORTANT: Because LEFT, +RIGHT and CENTER are nofill +modes, groff does not always respect the current line length. +Input lines +that run long may exceed it, or get broken in undesirable ways. +Therefore, when using these three macros, you should preview your +work to ensure that all lines fit as expected. +
+ + + +
+

Manually break lines

+
+Macro: BR + +

+When using JUSTIFY or QUAD, +BR tells mom about partial lines +that you want broken (as opposed to +filled). +Any partial +output line +that immediately precedes BR will be +quadded +in the direction of the current quad, or set flush left if text is +justified. + +

+Most of the time, you won't need the BR macro. +In fill modes, mom tries to be sensible about +where breaks are needed. If the nature of a macro is such that under +most circumstances you'd expect a break, mom puts +it in herself. Equally, in macros where a break isn't normally +desirable, no break occurs. This means text files don't get cluttered +with annoying BR's. +

+NOTE: Lines of text in +nofill mode +never require a BR. Furthermore, in nofill mode, +ALL macros cause a break. If a break is not desired, use the +\c +inline escape. + +

+Experts: BR is an alias for br. +You can use either, or mix 'n' match with impunity. +
+ + + +


+

Manually break a line without advancing on the page

+
+Macro: EL + +

+The mnemonic "EL" is borrowed from old Compugraphic typesetting +systems, where it stood for "End Line." Conceptually, +EL is equivalent to the notion of a carriage return +with no linefeed. + +

+Every once in a while, the need arises for breaking a line without +advancing on the page. Imagine, for example, that you're working from +marked-up copy. The markup indicates 24 points of space between +two given lines, but the prevailing line spacing is 12.5 points. +You may find it more convenient to break the first line with +EL and instruct mom to advance 24 +points to the next line, rather than calculating the lead that needs +to be added to 12.5 to get 24. To demonstrate: +

+

+	.LS 12.5
+	A line of text.
+	.EL
+	.ALD 24p
+	The next line of text.
+
+ +may be more instuitive than +

+

+	.LS 12.5
+	A line of text.
+	.ALD 11.5p
+	The next line of text.
+
+ +The first example has the further advantage that should you wish +to change the prevailing line space but keep the 24 points lead, +you don't have to recalculate the extra space. +

+"ALD" in the above examples stands for "Advance +LeaD" (another mnemonic borrowed +from Compugraphic), which is covered in the section +Vertical movement. +

+IMPORTANT: +EL does not work as advertised on the last +output line +of pages that contain a footer trap (e.g. one set with +B_MARGIN +or in documents formatted using the +document processing macros). +The reason is that the EL macro itself deposits +a line break that trips the trap (hey, I like that -- +"trips the trap"), and once the trap has been sprung, +mom can't recover. She places the line after +the EL on the next page. +

+If you need EL functionality on the last line of +a page with a footer trap, turn the trap off with +TRAP, +as in this example: +

+

+	3.
+	.TRAP OFF
+	.EL
+	.TRAP
+	\*[FP12]Establish, once and for all, if 42 really is the answer.
+
+ +The above looks something like this upon output: +

+

+	3.  Establish, once and for all, if 42 really is the answer.
+
+ +with "3." flush at the left margin, and "Establish, +once and for all..." on the same line as "3." but +starting 12 points in from the left margin. +

+If you hadn't turned the trap off for .EL, +"3." would have appeared at the bottom of the page by +itself, with "Establish, once and for all..." +appearing at the top of the next page. +
+ + + +


+

Break lines and add space between

+
+Macro: SPACE <space to add between lines> +
+Alias: SP + +

+SPACE breaks a line, just like +BR, then adds space after the line. With no +argument, it adds an extra line space. If you pass it a numeric +argument without supplying a +unit of measure, +it advances that number of extra line spaces. For example: +

+

+	.SPACE
+
+ +breaks the line then adds an extra linespace, whereas +

+

+	.SPACE 2
+
+ +breaks the line and adds two extra linespaces. + +

+If you supply a unit of measure, SPACE breaks the +line then adds the specified amount of extra space to the current +linespace, as in +

+

+	.SPACE 6p
+
+ +which breaks the line then adds six points of space to the current +linespace. + +

+SUGGESTION: SPACE and +ALD +can be used interchangeably (.SPACE 6p and +.ALD 6p are equivalent). However, +ALD without an argument does nothing, whereas +SPACE without an argument adds an extra line +space. I recommend using SPACE when you +want an extra line space (or multiple thereof), and +ALD whenever you want some other value of space +after a line. + +

+Experts: SPACE is an alias of sp. +You can use either, or mix 'n' match with impunity. +
+ + + +


+

Break and force justify (spread) lines

+
+Macro: SPREAD + +

+Sometimes, you need to break a line of +justified +text and have it come out fully justified, not +quadded +left the way it would be with the BR macro. +An example of where you'd do this would be when you want to prevent a +word at the end of a line from being hyphenated (say, a proper name). +SPREAD is the macro that lets you break the line +and have it came out fully justified. + +

+Experts: SPREAD is an alias for brp. +You can use either, or mix 'n' match with impunity. +
+ + + +


+

Join input lines

+
+Inline: \c + +

+Sometimes, especially when in one of the +nofill modes, +a macro will cause a break where you don't want one. In order +to prevent this from happening (in other words, to join +input lines +together, forming one +output line), +use the groff +inline escape +\c at the end of each input line to +be joined to another, like this: +

+

+	.LEFT
+	.FAMILY T
+	.FT R
+	Some lines of text to be \c
+	.FAMILY H
+	.FT B
+	joined \c
+	.FAMILY T
+	.FT R
+	together.
+
+ +Upon output, the lines will be joined together to read +

+

+	Some lines of text to be joined together.
+
+ +with the word "joined" in Helvetica bold. Note the +space before \c. Without it, the last three +words of the output line would read +

+

+	bejoinedtogether
+
+ +Please also note that had the example been in one of the +fill modes, +there'd have been no need for the \c. +
+
+ + + + + + +

Typographic refinements

+
+ +The macros in this section help you tweak groff's behaviour, +ensuring that your documents look typographically professional. +
+ + +

Typographic refinements macro list

+
+ +
    +
  • Word and sentence spacing +
      +
    • WS (word spacing) +
    • SS (sentence space) +
    +
  • Letter spacing (track kerning) + +
  • Hyphenation +
      +
    • HY (turn auto hyphenation on/off, or set specific hyphenation parameters) +
    • HY_SET (set all hyphenation parameters) +
    +
  • Automatic kerning and ligatures +
      +
    • KERN (turn automatic pairwise kerning on or off) +
    • LIGATURES (turn automatic generation of ligatures on or off) +
    +
+ + + +
+

Word spacing

+
+Macro: WS <+|-wordspace> | DEFAULT + +

+WS (Word Space) increases or decreases the amount +of space between words. In +nofill modes, +or if +QUAD +is in effect, the space between words is fixed. Therefore, if you +change the word spacing with WS, the change applies +uniformly to the space between every word on every line. However, +when text is +justified, +the space between words varies from line to line (in order to justify +the text). Consequently, the change you make with WS +represents the minimum (and ideal) space groff will try to put between +words before deciding whether to hyphenate a final word or to stretch +the word spacing. + +

+Word space is relative to type size. Knowing how it's calculated is +unimportant. What matters is having a sense of how the value passed +to WS affects the look of your type. Generally, +in/decreasing the word space by a value of 1 or 2 produces a difference +that in many cases is scarcely visible; in/decreasing by a value of 5 +or so produces a subtle but noticeable difference; and in/decreasing +by a value greater than 10 is always apparent. You should preview +your work to assess the effect of WS. + +

+WS +takes as its argument a whole number preceded by a plus or minus sign. +Therefore, to decrease the word space slightly, you might enter +

+

+	.WS -4
+
+ +To increase it by a noticeable amount, you might enter +

+

+	.WS +12
+
+ +You can reset the word spacing to its previous value by switching +the plus or minus sign, like this: +

+

+	.WS +4
+	A line of text
+	.WS -4
+
+ +The .WS -4 undoes the effect of .WS ++4. You can also reset WS to +its groff default by entering +

+

+	.WS DEFAULT
+
+ +This can be particularly useful if you've been playing around +with plus and minus values, and can't remember by how much you +have to in/decrease the word space to get it back to normal. +
+ + + +
+

Sentence space

+
+Macro: SS <+sentence space> | 0 | DEFAULT + +

+SS (Sentence Space) tells groff how to treat double +spaces it encounters between sentences in +input lines. +If you use SS, input sentences with two spaces +after them AND input sentences that fall at the end of input lines +all receive a normal word space plus an additional amount of space +whose size is determined by the + value passed as an argument to +SS. Thus, +

+

+	.SS +2
+
+ +means that input sentences with two spaces after them receive a normal +word space PLUS the +2 value passed to SS. +

+Like +WS, increasing the sentence space by a value of +1 or 2 produces a difference that in many cases is scarcely visible; +increasing by a value of 5 or so produces a subtle but noticeable +difference (i.e. the space between double-spaced input sentences will +be slightly but visibly greater than the space between words); and +increasing by a value greater than 10 is always apparent. You should +preview your work to assess the effect of SS. +

+There's an additional argument you can pass SS: +the number zero (without the + sign). It's the argument you'll +use most often. Typeset copy should never have two spaces between +sentences, and the "zero" argument tells groff to give the extra +spaces no space at all (effectively removing them). Therefore, +if you double-space your sentences (as you should when writing in a +text editor), get in the habit of putting +

+

+	.SS 0
+
+ +at the top of your files. + +

+If you do use SS for something other than ensuring +that you don't get unwanted sentence spaces in output copy, you +can set or reset the sentence space to the groff default (the same +width as a word space, i.e. double-spaced input sentences will appear +double-spaced on output as well) with +

+

+	.SS DEFAULT
+
+ +If you're using the +document processing macros +and your +PRINTSTYLE +is TYPEWRITE, .SS DEFAULT is the default, +because you do want double spaces between sentences in copy +that imitates the look of a typewritten document. +

+IMPORTANT: SS with an argument other than +"0" should only be used if you're of the old (and wise) +school of typists that puts two spaces between sentences. If you +ignore this advice and use SS when you habitually +put only one space between sentences, you risk producing output where +the space between sentences is not equal. +
+ + + +


+

Automatic hyphenation control

+
+Macro: HY toggle +
+Macro: HY LINES <max. number of consecutive hyphenated lines> +
+Macro: HY MARGIN <size of hyphenation margin> +
+Macro: HY SPACE <extra interword spacing to prevent hyphenation> +
+Macro: HY DEFAULT +
+Aliases: HYPHENATE, HYPHENATION + +

+HY, as you can see, can be invoked with a number of +arguments. In all cases, the aliases HYPHENATE +or HYPHENATION can be used in place of +HY. To aid in understanding the various arguments +you can pass to HY, I've broken them down into +separate sections. + +

1. HY

+ +

+HY by itself (i.e. with no argument) simply turns +automatic hyphenation on. Any argument other than LINES, +MARGIN, SPACE or DEFAULT, HY +turns automatic hyphenation off. For example, as explained in +How to read macro arguments, +you could turn HY off by entering +

+

+	.HY OFF
+	   or
+	.HY X
+	   or
+	.HY END
+
+ +HY observes the following default hyphenation rules: +
+
    +
  1. Last lines (i.e. ones that will spring a trap -- typically + the last line on a page) will not be hyphenated. +
  2. The first and last two characters of a word are never + split off. +
+ +

2. HY LINES

+ +

+HY LINES sets the maximum number of consecutive +hyphenated lines that will appear in output copy. 2 is a very +good choice, and you'd set it with +

+

+	.HY LINES 2
+
+ +By default, when you turn automatic hyphenation on, there is no +limit to the number of consecutive hyphenated lines. + +

+NOTE: +Discretionary hyphens +count when groff is figuring out how many lines to hyphenate; +explicit hyphens do not. + +

3. HY MARGIN

+ +

+HY MARGIN sets the amount of room allowed at +the end of a line before hyphenation is tripped (e.g. if there's +only 6 points left at the end of a line, groff won't try to hyphenate +the next word). HY MARGIN only applies if you're +using +QUAD, and is really only useful if you're +using QUAD LEFT. + +

+As an example, if you don't want groff to hyphenate words when there's +only 18 points of space left at the end of a left-quadded line, +you'd enter +

+

+	.HY MARGIN 18p
+
+ +NOTE: The numeric argument after HY +MARGIN requires a +unit of measure. + +

4. HY SPACE

+ +

+HY SPACE sets an amount of extra interword +space that groff will try to put between words on a +line in order to PREVENT hyphenation. HY SPACE +applies only to +justified lines. Generally speaking, +you'll want this value to be quite small, since too big a value +will result in lines with gaping holes between the words. A reasonable +value might be half a point, or one point, which you'd set with +

+

+	.HY SPACE .5p
+	    or
+	.HY SPACE 1p
+
+ +NOTE: The numeric argument after HY +SPACE requires a +unit of measure. + +

4. HY DEFAULT

+ +

+HY DEFAULT resets automatic hyphenation to its +default behaviour, cancelling any changes made with LINES, +MARGIN, and/or SPACE. + +

A note on hyphenation in general

+ +

+Hyphenation is a necessary evil. If it can be avoided, it should be. +If it can't be, it should occur infrequently. That's the reason for +number of parameters you can set with HY. + +

+Furthermore, hyphenation in +rag +copy requires a great deal of attention. At best, it should be +avoided completely by individually adjusting the number of words +on consecutive lines to achieve a pleasing, natural-looking rag. +Since such adjustments are often too fussy for document +processing, I recommend playing around with HY MARGIN +a bit if your copy looks hyphen-heavy. +
+ + + +


+

Set hyphenation parameters all at once

+
+Macro: HY_SET <lines> [ <margin> [ <space> ] ] +
+Alias: HYSET + +

+HY_SET lets you set the parameters for hyphenation +with a single macro. <lines>, <margin> and <space> +correspond to the numeric values required by +LINES, MARGIN and +SPACE as described +above. + +

+To set just the maximum number of consecutive hyphenated lines, +you'd enter +

+

+	.HY_SET 2
+
+ +If you wanted the same number of maximum consecutive hyphenated lines +and a hyphenation margin for use with +rag +copy, +

+

+	.HY_SET 2 36p
+
+ +would set the hyphenation margin to 36 points. + +

+If you wanted the same number of maximum consecutive hyphenated +lines and a hyphenation space of 2 points for use with +justified +copy, +

+

+	.HYSET 2 0 2p
+
+ +is how you'd do it. +
+ + + +
+

Reduce whitespace

+
+Macro: RW <amount of whitespace reduction between letters> +
+ +

+RW (Reduce Whitespace) and its corresponding macro, +EW (Expand Whitespace), allow you to tighten +(or loosen) +output lines +by uniformly reducing or expanding the space between characters. +This is particularly useful when you want to squeeze or stretch +lines on a narrow measure. + +

+The value passed to RW may be a whole number or a +decimal fraction. Since a value of 1 produces a noticeable reduction +in the space between letters at text sizes, you'll most likely use +small decimal values when tightening lines. For example, +

+

+	.RW .1
+	  or
+	.RW .2
+
+ +may be just enough to squeeze an extra character or two on a +line without the change in letter spacing being obvious. I +highly recommend previewing your work to assess the effect of +RW. + +

+

+IMPORTANT: RW affects all +fonts +in the +family +current at the time it's invoked. It must be reset to zero to +cancel its effect (.RW 0) on those fonts, or reinvoked +(possibly with a different value) if you change family. +

+NOTE: By default, RW does not deposit a +break +(BR) when it's invoked. If you want +RW to break at the ends of the previous +input lines, +you can tell mom that's what you want by invoking the +BR_AT_LINE_KERN +toggle macro. +
+ + + +


+

Expand whitespace

+
+Macro: EW <amount of whitespace expansion between letters> +
+ +

+EW (Expand Whitespace) expands the amount of +whitespace between letters, effectively "loosening" lines +of type. + +

+The value passed to EW may be a whole number or a +decimal fraction. Since a value of 1 produces a noticeable +expansion in the space between letters at text sizes, you'll most likely use +small decimal values when loosening lines. For example, +

+

+	.EW .1
+	  or
+	.EW .2
+
+ +may be just enough to open up a line without the change in letter +spacing being obvious. I highly recommend previewing your work to +assess the effect of EW. + +

+NOTE: By default, EW does not deposit a +break +(BR) when it's invoked. If you want +EW to break at the ends of the previous +input lines, +you can tell mom that's what you want by invoking the +BR_AT_LINE_KERN +toggle macro. +
+ + + +


+

Break before line kerning

+
+Macro: BR_AT_LINE_KERN toggle +
+ +

+By default, mom does not break + +

Automatic kerning

+
+Macro: KERN toggle +
+ +

+By itself (i.e. with no argument), KERN turns +automatic pairwise +kerning +on. With any argument (e.g. OFF, Q, X), pairwise kerning is turned +off. +

+Kerning of individual character pairs can be controlled with the +inline escapes +\*[BU#] and \*[FU#]. See +Inline Escapes, kerning. +
+ + + +


+

Automatic ligature generation

+
+Macro: LIGATURES toggle +
+Alias: LIG + +

+Provided your current font has +ligatures, +LIGATURES, by itself, turns on automatic +generation of ligatures. When automatic ligature generation is +on, simply typing the letters of a ligature combination will +produce the correct ligature upon output. For example, if you +type the word "finally", the fi combination will be +output as an fi ligature. Generally speaking, ligatures are A +Good Thing, hence mom has them on by default. +

+LIGATURES with any argument turns automatic +ligature generation off. +

+NOTE: Not all fonts support ligatures. +
+


+ + + + + + +

Type modifications: pseudo-italic, -bold, -condensed, -extended

+
+ +It sometimes happens that a PostScript +family +doesn't contain all the fonts you need. You might, for example, +be missing an italic font, or a bold font. Or you might not be able +to get your hands on a condensed family. That's where these macros +and inline escapes come in. With them, you can fake the fonts +you're missing. A word of caution, though: "faked" +fonts are just that -- faked. You should only use them as a +last resort, and then only sparingly. A word or two or a line +or two in a faked font will pass unnoticed; large patches of +type in a faked font look typographically cheap. +
+ + +

Type modifications macro list

+
+ +
    +
  • Pseudo italic +
      +
    • SETSLANT -- degree of pseudo-italicising +
    • \*[SLANT] -- inline escape for pseudo-italicising type +
    +
  • Pseudo bold + +
  • Pseudo condensed +
      +
    • CONDENSE -- percentage for pseudo-condensed type +
    • \*[COND] -- inline escape for pseudo-condensed type +
    +
  • Pseudo extended +
      +
    • EXTEND -- percentage for pseudo-extended type +
    • \*[EXT] -- inline escape for pseudo-extending +
    +
+ + + +
+

Set degree of slant for pseudo-italicising

+
+Macro: SETSLANT <degrees to slant type> | RESET + +

+Pseudo-italicising of type is accomplished by slanting a roman font +a certain number of degrees to the right. SETSLANT +lets you fix the number of degrees. Mom's +default is 15, which produces an acceptable approximation of an +italic font. If you want another value -- say, 13 degrees -- +you'd set it by entering +

+

+	.SETSLANT 13
+
+ +If you change the degree of slant and later want to set it back +to the mom default, do +

+

+	.SETSLANT RESET
+
+ +NOTE: By itself, SETSLANT +will not start pseudo-italicising type; it merely tells +mom what degree of slant you want. To start +pseudo-italicising, use the +inline escape +\*[SLANT]. +
+ + + +
+

Pseudo italic on/off

+
+Inline: \*[SLANT] -- turn pseudo-italic on +
+Inline: \*[SLANTX] -- turn pseudo-italic off + +

+\*[SLANT] begins pseudo-italicising type. +\*[SLANTX] turns the feature off. Both are +inline escapes, +therefore they should not appear as separate lines, but rather +be embedded in text lines, like this: +

+

+	Not \*[SLANT]everything\*[SLANTX] is as it seems.
+
+ +Alternatively, if you wanted the whole line pseudo-italicised, +you'd do +

+

+	\*[SLANT]Not everything is as it seems.\*[SLANTX]
+
+ +Once \*[SLANT] is invoked, it remains in effect +until turned off. + +

+NOTE: If you're using the +document processing macros +with +PRINTSTYLE TYPEWRITE, +mom underlines pseudo-italics by default. To +change this behaviour, use the special macro +SLANT_MEANS_SLANT. +
+ + + +


+

Set amount of emboldening

+
+Macro: SETBOLDER <amount of emboldening, in machine units> | RESET + +

+Emboldening of type is accomplished by printing characters +twice; the second printing is slightly offset from the first, +effectively "thickening" the character. +SETBOLDER lets you set the number of +machine units +for the offset. Mom's default is 700 units, which +produces an acceptable approximation of a bold font. If you want +another value -- say, 500 units -- you'd set it by entering +

+

+	.SETBOLDER 500
+
+ +If you change the emboldening offset and later want to set it back +to the mom default, do +

+

+	.SETBOLDER RESET
+
+ +NOTE: By itself, SETBOLDER +will not start emboldening type; it merely tells +mom what you want the emboldening offset to be. +To start emboldening, use the +inline escape +\*[BOLDER]. +
+ + + +
+

Emboldening on/off

+
+Inline: \*[BOLDER] -- turn emboldening on +
+Inline: \*[BOLDERX] -- turn emboldening off + +

+\*[BOLDER] begins emboldening type. +\*[BOLDERX] turns the feature off. Both are +inline escapes, +therefore they should not appear as separate lines, but rather +be embedded in text lines, like this: +

+

+	Not \*[BOLDER]everything\*[BOLDERX] is as it seems.
+
+ +Alternatively, if you wanted the whole line emboldened, +you'd do +

+

+	\*[BOLDER]Not everything is as it seems.\*[BOLDERX]
+
+ +Once \*[BOLDER] is invoked, it remains in effect +until turned off. + +

+NOTE: If you're using the +document processing macros +with +PRINTSTYLE TYPEWRITE, +mom ignores \*[BOLDER] +requests. +
+ + + +


+

Set percentage for pseudo-condensed type

+
+Macro: CONDENSE <pseudo-condense percentage> + +

+Pseudo-condensing of type is accomplished by reducing the width of +characters at a given point size without reducing their height, +effectively narrowing them so they look like condensed type. +CONDENSE tells mom what +percentage of the normal character width you want the characters +to be condensed. +

+Mom has no default value for +CONDENSE, therefore you must set it before using the +inline escape +\*[COND]. +80 percent of the normal character width is a good value, and +you'd set it like this: +

+

+	.CONDENSE 80
+
+ +NOTE: By itself, CONDENSE +will not start pseudo-condensing type; it merely tells +mom what percentage of the normal character +width you want characters to be condensed. +To start pseudo-condensing, use the +inline escape +\*[COND]. +

+Additional note: Make sure that pseudo-condensing +is off (with +\*[CONDX]) +before before making any changes to the pseudo-condense percentage +with CONDENSE. +
+ + + +


+

Pseudo-condensing on/off

+
+Inline: \*[COND] -- turn pseudo-condensing on +
+Inline: \*[CONDX] -- turn pseudo-condensing off + +

+\*[COND] begins pseudo-condensing type. +\*[CONDX] turns the feature off. Both are +inline escapes, +therefore they should not appear as separate lines, but rather +be embedded in text lines, like this: +

+

+	\*[COND]Not everything is as it seems.\*[CONDX]
+
+ +\*[COND] remains in effect until you turn it +off with \*[CONDX]. + +

+IMPORTANT: You MUST turn \*[COND] +off before making any changes to the point size of your type, either +via the +PS +macro or with the \s inline escape. If you wish +the new point size to be pseudo-condensed, simply reinvoke +\*[COND] afterwards. Equally, +\*[COND] must be turned off before changing the +condense percentage with CONDENSE. + +

+NOTE: If you're using the +document processing macros +with +PRINTSTYLE TYPEWRITE, +mom ignores \*[COND] +requests. +
+ + + +


+

Set percentage for pseudo-extended type

+
+Macro: EXTEND <pseudo-extend percentage> + +

+Pseudo-extending of type is accomplished by increasing the width of +characters at a given point size without increasing their height, +effectively widening them so they look like extended type. +EXTEND tells mom what +percentage of the normal character width you want the characters +to be extended. +

+Mom has no default value for +EXTEND, therefore you must set it before using the +inline escape +\*[EXT]. +120 percent of the normal character width is a good value, and +you'd set it like this: +

+

+	.EXTEND 120
+
+ +NOTE: By itself, EXTEND +will not start pseudo-extending type; it merely tells +mom what percentage of the normal character +width you want characters to be extended. +To start pseudo-extending, use the +inline escape +\*[EXT]. + +

+Additional note: Make sure that +pseudo-extending is off (with +\*[EXTX]) +before before making any changes to the pseudo-extend percentage +with EXTEND. +
+ + + +


+

Pseudo-extending on/off

+
+Inline: \*[EXT] -- turn pseudo-extending on +
+Inline: \*[EXTX] -- turn pseudo-extending off + +

+\*[EXT] begins pseudo-extending type. +\*[EXTX] turns the feature off. Both are +inline escapes, +therefore they should not appear as separate lines, but rather +be embedded in text lines, like this: +

+

+	\*[EXT]Not everything is as it seems.\*[EXTX]
+
+ +\*[EXT] remains in effect until you turn it +off with \*[EXTX]. + +

+IMPORTANT: You MUST turn \*[EXT] +off before making any changes to the point size of your type, either +via the +PS +macro or with the \s inline escape. If you wish +the new point size to be pseudo-extended, simply reinvoke +\*[EXT] afterwards. Equally, +\*[EXT] must be turned off before changing the +extend percentage with EXTEND. + +

+NOTE: If you're using the +document processing macros +with +PRINTSTYLE TYPEWRITE, +mom ignores \*[EXT] +requests. +
+


+ + + + + + +

Vertical movement

+
+ +The two macros in this section allow you to move down or up on the page +relative to the current +baseline. + + +

Vertical movement macro list

+
+
    +
  • ALD -- Advance Lead +
  • RLD -- Reverse Lead +
+ + + +
+

Advance Lead (move downward)

+
+Macro: ALD <distance to move downward> +
+*Requires a unit of measure + +

+ALD takes one argument: the distance to move downward +on the page relative to the current vertical position. +

+Used by itself, or preceded by +BR, +ALD will advance by one line space plus the +distance you specify. Preceded by +EL, +it will advance by exactly the distance you specify. +

+ALD requires a unit of measure. Decimal fractions +are allowed, and values may be combined. Therefore, to move down +on the page by 1/4 of an inch, you could enter either +

+

+	.ALD .25i
+	    or
+	.ALD 1P+6p
+
+ +As the mnemonic (Advance +LeaD) suggests, you'll most often +use ALD with +points +of lead. + +

+NOTE: if you want to use ALD +at the top of a page (i.e. to advance to the starting position +of type on a page), combine the value you want with -1v (minus +one line space), like this: +

+

+	.ALD 1i-1v
+
+ +At the top of a page, this will advance one inch from the +top edge of the paper. Without the -1v, the same command would +advance one inch from the top of the page plus the distance of +one line space. +

+Important: Do NOT use ALD in this +way if you have set a top margin with +T_MARGIN +or +PAGE. +
+ + + +


+

Reverse Lead (move upward)

+
+Macro: RLD <distance to move upward> +
+*Requires a unit of measure + +

+RLD takes one argument: the distance to move +upward on the page relative to the current vertical position. +

+Used by itself, or preceded by +BR, +RLD will advance by one line space, then +reverse by the distance you specify. Preceded by +EL, +it will reverse by exactly the distance you specify. +

+RLD requires a unit of measure. Decimal fractions +are allowed, and values may be combined. Therefore, to move up +on the page by 1/4 of an inch, you could enter either +

+

+	.RLD .25i
+	    or
+	.RLD 1P+6p
+
+ +As the mnemonic (Rdvance +LeaD) suggests, you'll most often +use RLD with +points +of lead. +
+
+ + + + + + +

Tabs

+
+ +Mom provides two different kinds of tab setup: +typesetting tabs and string tabs. Neither one has anything to +do with the tab key on your keyboard, and both are utterly +divorced from groff's notion of tabs. I recommend reading this +section carefully in order to understand how +mom handles tabs. + +

Typesetting tabs

+

+Typesetting tabs are defined by both an indent from the left margin and +a line length. This is quite different from typewriter-style tab stops +(the groff norm) that only define the left indent. In conjunction +with the multi-column macros, typesetting tabs significantly facilitate +tabular and columnar work. +

+Typesetting tabs are created with the TAB_SET +macro. TAB_SET identifies the tab (by number), +establishes its left indent and line length, and optionally sets +a quad direction and fill mode. After tabs have been created with +TAB_SET, they can be called at any time with the +TAB macro. +

+NOTE: see the section +Typesetting Macros in Document Processing +for information and advice on using tabs with the +document processing macros. + +

Quickie tutorial on typesetting tabs

+

+Say you want to set up three tabs to produce an employee evaluation +that looks something like this: +

+ +

+	CRITERION       EVALUATION     COMMENTS
+
+	Service           Good         Many clients specifically request
+	                               support from Joe by name.
+
+	Punctuality    Satisfactory    Tends to arrive after 8:00am, but
+	                               often works through lunch hour.
+
+	Team spirit     Needs work     Persistently gives higher priority
+	                               to helping clients than respecting
+	                               organizational hierarchy.
+
+ +You want the first tab ("CRITERION") +
+
    +
  • to begin at the left margin of the page (i.e. no indent) +
  • to have a line length of 5 picas +
  • to be set flush left +
+
+Tabs must be numbered, and each has to be set up with a separate +TAB_SET +line. Therefore, to set up tab 1, you enter +

+

+   .TAB_SET  1  0  5P  L
+             |  |  |   |
+      tab #__|  |  |   |__direction
+                |  |
+        indent__|  |__length
+
+ +You want the second tab ("EVALUATION") +
+
    +
  • to begin 8 picas from the left margin +
  • to have a length of 9 picas +
  • to be set centered. +
+
+You set it up like this: +

+

+   .TAB_SET  2  8P  9P  C
+             |  |   |   |
+      tab #__|  |   |   |__direction
+                |   |
+        indent__|   |__length
+
+ +You want the third tab ("COMMENTS") +
+
    +
  • to begin 19 picas from the left margin +
  • to have a length of 17 picas +
  • to be set flush left, filled +
+
+The setup looks like this: +

+

+   .TAB_SET  3  19P  17P  L  QUAD
+             |   |    |   |    |
+             |   |    |   |    |__fill output lines
+             |   |    |   |
+      tab #__|   |    |   |__direction
+                 |    |
+         indent__|    |__length
+
+ +Once the tabs are set up, you can call them in one of two ways: +
+
    +
  • TAB (with the tab + number as an argument) breaks the current line, + advances one linespace, and calls the tab. +
  • TN (Tab Next) keeps + you on the current line and moves over to the next + tab in sequence (i.e. from 1 to 2, 2 to 3, etc.). +
+
+To exit from tabs and restore your original left margin, line length, +quad direction and fill mode, use +TQ +(Tab Quit). +

+Here's how the input for our sample employee evaluation looks +(with some introductory parameters): +

+

+	.PAGE 8.5i 11i 1i 1i 1i
+	.FAMILY T
+	.FT R
+	.PS 14
+	.LS 16
+	.QUAD LEFT
+	.KERN
+	.HY OFF
+	.SS 0
+	.TAB_SET 1 0   5P  L
+	.TAB_SET 2 8P  9P  C
+	.TAB_SET 3 19P 17P L QUAD
+	.TAB 1
+	CRITERION
+	.TN
+	EVALUATION
+	.TN
+	COMMENTS
+	.SP
+	.TAB 1
+	Service
+	.TN
+	Good
+	.TN
+	Many clients specifically request support from Joe by name.
+	.SP
+	.TAB 1
+	Punctuality
+	.TN
+	Satisfactory
+	.TN
+	Tends to arrive after 8:00am, but often works through lunch hour.
+	.SP
+	.TAB 1
+	Team spirit
+	.TN
+	Needs work
+	.TN
+	Persistently gives higher priority to helping clients
+	than respecting organizational hierarchy.
+	.TQ
+
+ +Try setting this up and previewing it with +

+

+	groff -mom -X <filename>
+
+ +Notice how .TN simply moves over to the next tab, +while the combination .SP/.TAB 1 breaks the +line, advances by one extra linespace, and calls the first tab. +

+Notice, too, how the QUAD argument passed to +tab 3 means you don't have to worry about the length of +input lines; +mom +fills +the tab and sets the type flush left. + +

String tabs (autotabs)

+

+String tabs let you mark off tab positions inline. Left indents +and line lengths are calculated from the beginning and end positions of +the marks. This is especially useful when tab indents and lengths +need to be determined from the text that goes in each tab. +

+Setting up string tabs is a two-step procedure. First, you enter an +input line in which you mark off where you want tabs to begin and end. +(This is often best done in conjunction with the +SILENT +macro.) +

+Next, you invoke the +ST +macro for every string tab you defined, and optionally pass quad and +fill information to it. That done, string tabs are called with +the +TAB +macro, just like typesetting tabs. +

+In combination with the +PAD +macro and the groff inline escape +\h +(move horizontally across the page) or mom's +\*[FP#] +(Forward Points) inline, string tabs provide +tremendous flexibility in setting up complex tab structures. + +

Quickie tutorial on string tabs

+

+Say you want to set up tabs for the +employee evaluation form +used as an example in the +typesetting tabs tutorial. +This time, though, you want to play around with the point size of +type, so you can't know exactly how long the tabs will be or where +they should start. All you know is +
+

    +
  • CRITERION is the longest line in tab 1 +
  • EVALUATION is the longest line in tab 2 +
  • tab 3 should extend to the current right margin +
  • you want a 1 pica gutter between each tab +
+
+This is an ideal job for string tabs. +

+The first thing you need for string tabs is an +input line +with tab positions marked on it. Tabs are marked with the +inline escapes +\*[ST#] and \*[ST#X]. (In this +example, we enclose the input line with the +SILENT +macro so the line doesn't print. We also use the +PAD +macro to permit defining tab 3 as simply "the amount of +space remaining on the input line.") +

+The setup looks like this: +

+

+	.SILENT
+	.PAD "\*[ST1]CRITERION\*[ST1X]\*[FP12]\*[ST2]EVALUATION\*[ST2X]\*[FP12]\*[ST3]#\*[ST3X]"
+	.SILENT OFF
+
+ +The long line after .PAD looks scary, but it isn't. +Here's what it means when broken down into its component parts: +
+
    +
  • The longest line in tab 1 is "CRITERION", so we + enclose CRITERION with begin/end markers for string tab 1: +

    + \*[ST1]CRITERION\*[ST1X] +
    +

  • We want a 1 pica (12 points) gutter between tab 1 and 2, + so we insert 12 points of space with \*[FP12] + (Forward Points 12): +

    + \*[FP12] +
    +

  • The longest line in tab 2 is "EVALUATION", so + we enclose EVALUATION with begin/end markers for string + tab 2: +

    + \*[ST2]EVALUATION\*[ST2X] +
    +

  • We want 1 pica (12 points) between tab 2 and 3, so we + insert 12 points of space with another \*[FP12]: +

    + \*[FP12] +
    +

  • We want tab 3 to be as long as whatever space remains on + the current line length, so we enclose the + pad marker + (#) with begin/end markers for string tab 3: +

    + \*[ST3]#\*[ST3X] +
    +

+
+The tabs are now defined, but they require +quad direction +and +fill +information. For each string tab defined above, enter a +separate +ST +line, like this: +

+

+	.ST  1  L
+	.ST  2  L
+	.ST  3  L  QUAD
+	     |  |   |
+	     |  |   |__fill output lines
+	     |  |
+	tab__|  |__direction
+	number
+
+ +From here on in, you call the tabs with +TAB +and +TN +just like typesetting tabs (see +typesetting tabs tutorial). +

+Here's the complete setup and entry for the sample employee +evaluation form utilising string tabs. +

+

+	.PAGE 8.5i 11i 1i 1i 1i
+	.FAMILY T
+	.FT R
+	.PS 14
+	.LS 16
+	.QUAD LEFT
+	.KERN
+	.HY OFF
+	.SS 0
+	.SILENT
+	.PAD "\*[ST1]CRITERION\*[ST1X]\*[FP12]\*[ST2]EVALUATION\*[ST2X]\*[FP12]\*[ST3]#\*[ST3X]"
+	.SILENT OFF
+	.ST  1  L
+	.ST  2  L
+	.ST  3  L  QUAD
+	.TAB 1
+	CRITERION
+	.TN
+	EVALUATION
+	.TN
+	COMMENTS
+	.SP
+	.TAB 1
+	Service
+	.TN
+	Good
+	.TN
+	Many clients specifically request support from Joe by name.
+	.SP
+	.TAB 1
+	Punctuality
+	.TN
+	Satisfactory
+	.TN
+	Tends to arrive after 8:00am, but often works through lunch hour.
+	.SP
+	.TAB 1
+	Team spirit
+	.TN
+	Needs work
+	.TN
+	Persistently gives higher priority to helping clients
+	than respecting organizational hierarchy.
+	.TQ
+
+ +Try setting this up and previewing it with +

+

+	groff -mom -X <filename>
+
+ +Now, change the point size of the above sample to 12 and preview +it again. You'll see that the tab structure remains identical (tab +1=CRITERION, tab 2=EVALUATION, tab 3=space remaining, and the gutter +between tabs is still 1 pica), while the position and length +of the tabs have altered because of the new point size. +

+Now try increasing the gutters to 2 picas (put an additional +\*[FP12] after each \*[FP12]). Preview the +file again, and notice how the tab structure remains the same, but +the gutters are wider. + + + +

Tabs macro list

+ + +
    +
  • TAB_SET (create typesetting tabs) +
  • \*[ST]...\*[STX] (inline escapes for marking String Tabs) +
  • ST (set String Tabs) +
  • TAB (call tabs) +
  • TN (Tab Next; call next tab in a sequence) +
  • TQ (Tab Quit) +
+ + + +
+

Set up typsetting tabs

+
+Macro: TAB_SET <tab number> <indent> <length> L | R | C | J [ QUAD ] +
+Alias: TS +
+*<indent> and <length> require a unit of measure + +

+TAB_SET creates typesetting tabs that later can be +called with +TAB. +Typesetting tabs are numbered, and defined by an indent, a length, +and a "direction", hence TAB_SET has +four required arguments: +
+

    +
  • a tab number +
  • an indent (measured from the left margin of the page, + or, if you're already in a tab, from the left margin of the tab) +
  • a length +
  • a direction +
+
+To set up a centered tab 6 picas long and 9 points from the left +margin, you'd enter +

+

+	.TAB_SET 1 9p 6P C
+
+ +The tab number in the above ("1") is simply an +identifier. It could have been 4, or 17, or 296. There's no +need to set up tabs in numerical sequence. +

+By default, tabs are in +nofill +mode, meaning you can enter text in tabs on a line for line basis +without having to use the +BR +macro. If you want a tab to be +filled, +pass the optional argument QUAD, which will +make the tab behave as if you'd entered .QUAD L | R | +C. +

+For +justified +tabs, simply pass the argument J (without the +QUAD argument), like this: +

+

+	.TAB 1 9p 6P J
+
+ +Once tabs are set, they can be called at any time with the +TAB # +macro, where "#" is the number of the desired tab. +

+You can set up any number of typesetting tabs. However, be +aware that +string tabs +are also called with TAB #, so be careful that you +don't set up a typesetting tab numbered, say, 4, when you already +have a string tab numbered 4. Every tab, typesetting or string, +must have a unique numeric identifier. +

+NOTE: If you use TAB_SET while +you're currently inside a tab, the indent argument is the distance from +the tab's left margin, not the left margin of the page. Therefore, +you should exit tabs (with +TQ) +before creating new tabs (unless, of course, you want to set +up a tab structure within the confines of an existing tab). +

+IMPORTANT: Turn all indents off (see +Indents) +before setting up tabs with TAB_SET, or +mom may get confused. +
+ + + +


+

Mark positions of string tabs

+
+Inlines: \*[ST<number>]...\*[ST<number>X] + +

+String tabs need to be marked off with +inline escapes +before being set up with the +ST +macro. Any input line may contain string tab markers. +<number>, above, means the numeric identifier of +the tab. The following shows a sample input line with string +tab markers. +

+

+	\*[ST1]Now is the time\*[ST1X] for all \*[ST2]good men\*ST2X] to come to the aid of the party.
+
+ +String tab 1 begins at the start of the line and ends after the word +"time". String tab 2 starts at "good" and ends +after "men". Inline escapes (e.g. font or point size +changes, or horizontal movements, including +padding) +are taken into account when mom determines the +position and length of string tabs. +

+Up to nineteen string tabs may be marked (not necessarily all on +the same line, of course), and they must be numbered between 1 +and 19. +

+Once string tabs have been marked in input lines, they have to +be "set" with +ST, +after which they may be called, by number, with +TAB. +

+NOTE: Lines with string tabs marked off in them +are normal input lines, i.e. they get printed, just like any +input line. If you want to set up string tabs without the line +printing, use the +SILENT +macro. +

+IMPORTANT: Do not try to set up string tabs on +a line that is broken with +SPREAD. +Mom calculates string tab positions and lengths +as she reads the input line, not after the line has undergone +manipulations to the word spacing. +
+ + + +


+

Set string tabs

+
+Macro: ST <tab number> L | R | C | J [ QUAD ] + +

+After string tabs have been marked off on an input line (see +\*[ST]...\*[STX]), +you need to "set" them by giving them a direction +and, optionally, the QUAD argument. In this +respect, ST is like +TAB_SET +except that you don't have to give ST an indent +or a line length (that's already taken care of, inline, by +\*[ST]...\*[STX]). If you want string tab 1 to be +left, enter +

+

+	.ST 1 L
+
+ +If you want it to be left and +filled, enter +

+

+	.ST 1 L QUAD
+
+ +If you want it to be justified, enter +

+

+	.ST 1 J
+
+ +See the +Quickie tutorial on string tabs +for a full explanation of setting up string tabs. +
+ + + +
+

Call tabs

+
+Macro: TAB <tab number> +
+Alias: TB +

+After tabs have been defined (either with +TAB_SET +or +ST), +TAB moves to whatever tab number you pass it as +an argument. For example, +

+

+	.TAB 3
+
+ +moves you to tab 3. +

+ +NOTE: TAB breaks the line preceding +it and advances 1 linespace. Hence, +

+

+	.TAB 1
+	A line of text in tab 1.
+	.TAB 2
+	A line of text in tab 2.
+
+ +produces, on output +

+

+	A line of text in tab 1.
+	                           A line of text in tab 2.
+
+ +If you want the tabs to line up, use +TN +(Tab Next), like this: +

+

+	.TAB 1
+	A line of text in tab 1.
+	.TN
+	A line of text in tab 2.
+
+ +which produces +

+

+	A line of text in tab 1.   A line of text in tab 2.
+
+ +If the text in your tabs runs to several lines, and you want the +first lines of each tab to align, you must use the +multi-column macros. +

+ADDITIONAL NOTE: Any indents in effect prior to +calling a tab are automatically turned off by TAB. +If you were happily zipping down the page with a left indent of 2 +picas turned on, and you call a tab whose indent from the left margin +is 6 picas, your new distance from the left margin will be 6 picas, +not 6 picas plus the 2 pica indent. +
+ + + +


+

Tab Next

+
+Macro: TN +
+ +

+TN moves over to the next tab in numeric +sequence (tab n+1) without advancing on the page. See the +NOTE +in the description of the TAB macro for an +example of how TN works. +

+NOTE: TN is like +EL +in that it doesn't work as advertised on the last line before a +footer trap is sprung. If you need to use TN +on the last line of a page with a footer trap, turn the trap off with +TRAP, +as in this example: +

+

+	.TAB_SET 1 0  1P  L
+	.TAB_SET 2 1P 20P L
+	.TAB 1
+	.TRAP OFF
+	1.
+	.TN
+	The first rule of survival is "make and keep good friends."
+	.TRAP
+
+ +The above, at the bottom of a page, will look something like this: +

+

+	1.  The first rule of survival is "make and keep good friends."
+
+ +If you hadn't turned the trap off before .TN, +"1." would have appeared as the last line on the page, +with "The first rule of survival..." being the first +line on the next page. +
+ + + +
+

Tab Quit

+
+Macro: TQ +
+ +

+TQ takes you out of whatever tab you were in, +advances 1 linespace, and restores the left margin, line length, +quad direction and +fill mode +that were in effect prior to invoking any tabs. +
+


+ + + + + + +

Multi-Columns

+
+ +Tabs are not by nature columnar, which is to say that if the text +inside a tab runs to several lines, calling another tab does not +automatically move to the +baseline +of the first line in the previous tab. To demonstrate: +

+

+	.TAB 1
+	Carrots
+	Potatoes
+	Broccoli
+	.TAB 2
+	$1.99/5 lbs
+	$0.25/lb
+	$0.99/bunch
+
+ +produces, on output +

+

+	Carrots
+	Potatoes
+	Broccoli
+	           $1.99/5 lbs
+	           $0.25/lb
+	           $0.99/bunch
+
+ +The multi-column macros allow you to set tabs in columnar +fashion, rather than line by line. When you invoke multi-column +mode (with +MCO), +mom saves the position of the current baseline. +MCR +(Multi-column return) at any point while multi-columns are on +returns you to the saved position. Exiting multi-columns +(MCX) +quits the current tab (if you're in one) and moves you to the +bottom of the longest column. (Note that you do not have to use +multi-columns in conjunction with tabs.) +

+Using our example above, but setting it in multi-column mode, +

+

+	.MCO
+	.TAB 1
+	Carrots
+	Potatoes
+	Broccoli
+	.MCR
+	.TAB 2
+	$1.99/5 lbs
+	$0.25/lb
+	$0.99/bunch
+	.MCX
+
+ +produces +

+

+	Carrots   $1.99/5 lbs
+	Potatoes  $0.25/lb
+	Broccoli  $0.99/bunch
+
+ +NOTE: Do not confuse MCO with +the +COLUMNS +macro in the +document processing macros. + + +

Columns macro list

+
+ + + + +
+

Begin multi-column setting

+
+Macro: MCO +
+ +

+MCO +(Multi-Column On) +is the macro you use to begin multi-column setting. It marks +the current +baseline +as the top of your columns, for use late with +MCR. See the +introduction to columns +for an explanation of multi-columns and some sample +input. +

+NOTE: Do not confuse MCO with +the +COLUMNS +macro in the +document processing macros. +
+ + + +


+

Return to top of column

+
+Macro: MCR +
+ +

+Once you've turned multi-columns on (with +MCO), +MCR, at any time, returns you to the top of +your columns. +
+ + + +


+

Exit multi-columns

+
+Macro: MCX [ <distance to advance below longest column> ] +
+*Optional argument requires a unit of measure + +

+MCX takes you out of any tab you were in (by silently +invoking +TQ) and advances to the bottom of the longest +column. +

+Without an argument, MCX advances 1 linespace +below the longest column. Linespace, in this instance, is the +leading +in effect at the moment MCX is +invoked. +

+If you pass the <distance> argument to +MCX, it advances 1 linespace below the longest +column (see above) PLUS the distance specified by the argumemnt. +The argument requires a unit of measure; therefore, to advance +an extra 6 points below where MCX would +normally place you, you'd enter +

+

+	.MCX 6p
+
+ +NOTE: If you wish to advance a precise distance +below the +baseline +of the longest column, use MCX with an +argument of 0 (zero; no unit of measure required) in conjunction +with the +ALD +macro, like this: +

+

+	.MCX 0
+	.ALD 24p
+
+ +The above advances to precisely 24 points below the baseline +of the longest column. +
+
+ + + + + + +

Indents

+
+ +With mom's indents, you can indent from the left, +the right, or both margins. In addition, mom +provides temporary left indents (i.e. only one line is indented, +as at the start of a paragraph) and "hanging" left indents +(the reverse of a temporary indent; the first line isn't indented, +subsequent lines are). + +

A brief explanation of how mom handles indents

+

+Mom provides five kinds of indents: left, right, +both, temporary, and hanging. Each is invoked by its own name: +
+

    +
  • IL = Indent Left +
  • IR = Indent Right +
  • IB = Indent Both +
  • HI = Hanging Indent +
  • TI = Temporary Indent +
+
+In addition, there are four macros to control exiting from +indents: +
+
    +
  • IX  = exit all active indents +
  • ILX = exit indent style left +
  • IRX = exit indent style right +
  • IBX = exit indent style both +
+
+This section deals exclusively with IL, IR and +IB. For an explanation +of hanging and temporary indents -- how they work and how to use +them -- see +Hanging indents +and +Temporary indents. +

+The first time you invoke any of mom's indents, +you must supply a measure. For example, +

+

+	.IL 2P
+
+ +indents text 2 picas from the left margin (or current tab +indent). +

+When you want to exit the above indent, use either +

+

+	.IX
+	 or
+	.ILX
+
+ +The next time you want the same indent, invoke it without the +argument, like this: +

+

+	.IL
+
+ +As you can see, once you've supplied a measure to an indent macro +mom stores the value, obviating the need to repeat +it on subsequent invocations. And mom doesn't just +store the measure -- she hangs on to it tenaciously. Arguments passed +to IL, IR and IB are additive. +Consider the following: +

+

+	.LL 20P
+	.IR 2P    \"Indent right by 2 picas
+	A first block of text...
+	...
+	...
+	.IX       \"Turn indent off
+	A second block of text...
+	...
+	...
+	.IR 2P    \"Indent right by an additional 2 picas (i.e. 4 picas)
+	A third block of text...
+	...
+	...
+
+ +The first block of text is right indented by 2 picas (i.e. the line +length is shortened by 2 picas to 18 picas). The second block of +text, after IX, is, as you'd expect, set to the full +measure. The third block of text -- the one to pay attention to -- +is not right indented by 2 picas, but rather by 4 picas. +Mom adds the value of arguments to IL, +IR and IB to whatever value is already +in effect. +

+If you wanted the third block of text in the example above to +be right indented by just 2 picas (the original measure given to +IR), you would enter .IR without an +argument. +

+Because indent arguments are additive, putting a minus sign in front +of the argument can be used to subtract from the current value. +In the following example, the first line is indented 18 points, the +second is indented 36 points (18+18), and the third is again indented +18 points (36-18). +

+

+	.IL 18p     \"Indent left by 18 points      = 18 points
+	Now is the time
+	.IL 18p     \"Indent left by 18 points more = 36 points
+	for all good men to come
+	.IL -18p    \"Indent left by 18 points less = 18 points
+	to the aid of the party.
+
+ +Sometimes, you may want to clear out the stored indent values -- let +mom start indenting with a clean slate, as it were. +Giving the optional argument CLEAR to any of the +"indent quit" macros resets them to zero. +
+
    +
  • IX CLEAR  = quit and clear all indents +
  • ILX CLEAR = quit and clear indent style left +
  • IRX CLEAR = quit and clear indent style right +
  • IBX CLEAR = quit and clear indent style both +
+
+Indent styles may be combined and manipulated separately. You could, +for example, have a left indent of 4 picas and a right indent of 6 +picas and control each separately, as in the following example. +

+

+	.IL 4P     \"Indent left 4 picas
+	.IR 6P     \"Indent right 6 picas
+	Some text
+	.IRX       \"Turn off the right indent only
+	More text  \"Text is still indented 4 picas left
+
+ +If, at .IRX, you wanted the text afterward to have no +indents (either left or right), you would enter .IX, +which exits all indent styles at once. +

+A word of advice: Indents are best used only when +you have a compelling reason not to change the current left margin or +line length. In many instances where indents might seem expedient, +it's better to use tabs, or actually change the left margin or the +line length. Mom's indenting macros are flexible +and powerful, but easy to get tangled up in. Personally, I don't +use them much, except for cutarounds and multi-level lists à la html, +at which they excel. +

+NOTE: see the section +Typesetting Macros in Document Processing +for information and advice on using idents with the +document processing macros. + +

Indents macro list

+
    +
  • IL  (Indent left) +
  • IR  (Indent right) +
  • IB  (Indent both) +
  • TI  (Temporary indent, left) +
  • HI  (Hanging Indent) + +
  • IX  (Exit indents, all) +
  • ILX (Exit indent style left) +
  • IRX (Exit indent style right) +
  • IBX (Exit indent style both) +
+ + + +
+

Indent left

+
+Macro: IL [ <measure> ] +
+*The optional argument requires a unit of measure + +

+IL indents text from the left margin of the page, +or if you're in a tab, from the left edge of the tab. Once +IL is on, the left indent is applied uniformly to +every subsequent line of text, even if you change the line length. +

+The first time you invoke IL, you must give it a +measure. Subsequent invocations with a measure add to the previous +measure. A minus sign may be prepended to the argument to subtract +from the current measure. The +\w +inline esacpe +may be used to specify a text-dependent measure, in which case +no unit of measure is required. For example, +

+

+	.IL \w'margarine'
+
+ +indents text by the width of the word "margarine". +

+With no argument, IL indents by its last +active value. See the +brief explanation of how mom handles indents +for more details. +

+NOTE: Calling a tab (with +TAB) +automatically cancels any active indents. +

+ADDITIONAL NOTE: Invoking IL +automtically turns off IB. +
+ + + +


+

Indent right

+
+Macro: IR [ <measure> ] +
+*The optional argument requires a unit of measure + +

+IR indents text from the right margin of the +page, or if you're in a tab, from the end of the tab. +

+The first time you invoke IR, you must give it a +measure. Subsequent invocations with a measure add to the previous +indent measure. A minus sign may be prepended to the argument to +subtract from the current indent measure. The +\w +inline esacpe +may be used to specify a text-dependent measure, in which case +no unit of measure is required. For example, +

+

+	.IR \w'jello'
+
+ +indents text by the width of the word "jello". +

+With no argument, IR indents by its last +active value. See the +brief explanation of how mom handles indents +for more details. +

+NOTE: Calling a tab (with +TAB) +automatically cancels any active indents. +

+ADDITIONAL NOTE: Invoking IR +automtically turns off IB. +
+ + + +


+

Indent both

+
+Macro: IB [ <left measure> <right measure> ] +
+*The optional arguments require a unit of measure + +

+IB allows you to set or invoke a left and a right +indent at the same time. +

+At its first invocation, you must supply a measure for both indents; +at subsequent invocations when you wish to supply a measure, both must +be given again. As with IL and IR, +the measures are added to the values previously passed to the macro. +Hence, if you wish to change just one of the values, you must +give an argument of zero to the other. +

+A word of advice: If you need to manipulate left and +right indents separately, use a combination of IL +and IR instead of IB. You'll +save yourself a lot of grief. +

+A minus sign may be prepended to the arguments to subtract from their +current values. The +\w +inline esacpe +may be used to specify text-dependent measures, in which case +no unit of measure is required. For example, +

+

+	.IB \w'margaraine' \w'jello'
+
+ +left indents text by the width of the word "margarine" +and right indents by the width of "jello". +

+Like IL and IR, IB +with no argument indents by its last active values. See the +brief explanation of how mom handles indents +for more details. +

+NOTE: Calling a tab (with +TAB) +automatically cancels any active indents. +

+ADDITIONAL NOTE: Invoking IB +automtically turns off IL and +IR. +
+ + + +


+

Temporary (left) indent

+
+Macro: TI [ <measure> ] +
+*The optional argument requires a unit of measure + +

+A temporary indent is one that applies only to the first line of +text that comes after it. It's chief use is indenting the first +line of paragraphs. (Mom's +PP +macro, for example, uses a temporary indent.) +

+The first time you invoke TI, you must give it +a measure. If you want to indent the first line of a +paragraph by, say, 2 +ems, +do +

+

+	.TI 2m
+
+ +Subsequent invocations of TI do not require you +to supply a measure; mom keeps track of the +last measure you gave it. +

+Because temporary indents are temporary, there's no need to turn +them off. +

+IMPORTANT: Unlike IL, IR and +IB, measures given to TI +are NOT additive. In the following example, the second .TI +2P is exactly 2 picas. +

+

+	.TI 1P
+	The beginning of a paragraph...
+	.TI 2P
+	The beginning of another paragraph...
+
+ + + +
+

Hanging indent

+
+Macro: HI [ <measure> ] +
+*The optional argument requires a unit of measure + +

+A hanging indent looks like this: +

+

+	The thousand injuries of Fortunato I had borne as best I
+	    could, but when he ventured upon insult, I vowed
+	    revenge.  You who so well know the nature of my soul
+	    will not suppose, however, that I gave utterance to a
+	    threat, at length I would be avenged...
+
+ +The first line of text "hangs" outside the left +margin. +

+In order to use hanging indents, you must first have a left indent +active (set with either +IL +or +IB). +Mom will not hang text outside the left margin set with +L_MARGIN +or outside the left margin of a tab. +

+The first time you invoke HI, you must give it +a measure. If you want the first line of a paragraph to hang by, +say, 1 pica, do +

+

+	.IL 1P
+	.HI 1P
+
+ +Subsequent invocations of HI do not require you +to supply a measure; mom keeps track of the +last measure you gave it. +

+Generally speaking, you should invoke HI immediately +prior to the line you want hung (i.e. without any intervening +control lines). +And because hanging indents affect only one line, there's no need to turn +them off. + +

A recipe for numbered lists

+

+A common use for hanging indents is setting numbered lists. +Consider the following example: +

+

+	.PAGE 8.5i 11i 1i 1i 1i 1i
+	.FAMILY T
+	.FT R
+	.PS 12
+	.LS 14
+	.JUSTIFY
+	.KERN
+	.SS 0
+	.IL \w'\0\0.'    \"Indent left by 2 figure spaces and a period
+	.HI \w'\0\0.'    \"Hang first line of text back by 2 figure spaces and a period
+	1.\0The most important point to be considered is whether the
+	answer to the meaning of life, the universe, and everything
+	really is 42.  We have no-one's word on the subject except
+	Mr. Adams'.
+	.HI
+	2.\0If the answer to the meaning of life, the universe,
+	and everything is indeed 42, what impact does this have on
+	the politics of representation?  42 is, after all not a
+	prime number.  Are we to infer that prime numbers don't
+	deserve equal rights and equal access in the universe?
+	.HI
+	3.\0If 42 is deemed non-exclusionary, how do we present it
+	as the answer and, at the same time, forestall debate on its
+	exclusionary implications?
+
+ +First, we invoke a left indent with a measure equal to the width +of 2 +figures spaces +plus a period (using the +\w +inline escape). At this point, the left indent is active; text +afterward would normally be indented. However, we invoke a hanging +indent of exactly the same width, which hangs the first line (and +first line only!) to the left of the indent by the same distance +(in this case, that means "out to the left margin"). +Because we begin the first line with a number, a period, and a +figure space, the actual text ("The most important point...") +starts at exactly the same spot as the indented lines that +follow. +

+Notice that subsequent invocations of HI without a +measure produce exactly the same effect. +

+Paste the example above into a file and preview it with groff -mom -X +<filename> to see hanging indents in action. +

+IMPORTANT: Unlike IL, IR and +IB, measures given to HI +are NOT additive. Each time you pass a measure to +HI, the measure is treated literally. +
+ + + +


+

Quitting indents

+
+Macro: IX  [ CLEAR ] (quit any/all indents) +
+Macro: ILX [ CLEAR ] (quit IL) +
+Macro: IRX [ CLEAR ] (quit IR) +
+Macro: IBX [ CLEAR ] (quit IB) + +

+Without an argument, the macros to quit indents merely restore your +original left margin and line length. The measures stored in the +indent macros themselves are saved so you can call them again without +having to supply a measure. +

+If you pass these macros the optional argument CLEAR, +they not only restore your original left margin and line length, +but also clear any values associated with a particular indent style. +The next time you need an indent of the same style, you have to supply +a measure again. +

+IX CLEAR, as you'd suspect, quits and clears +the values for all indent styles at once. + +

+


+Next   +Prev   +Top   +Back to Table of Contents + + diff --git a/contrib/mom/momdoc/using.html b/contrib/mom/momdoc/using.html new file mode 100644 index 00000000..d8a87ce0 --- /dev/null +++ b/contrib/mom/momdoc/using.html @@ -0,0 +1,207 @@ + + + +Using mom + + + + + +Back to Table of Contents + + + +

USING MOM

+
+ +Introduction +
+Inputting macros +
+Invoking groff +
+Previewing documents +
+
+

Introduction

+ +As explained in the section +What is mom?, +mom can be used in two ways: for straight typesetting +or for document processing. The difference between the two is +that in straight typesetting, every macro is a literal +typesetting instruction that determines precisely how text +following it will look. Document processing, on the other hand, +uses markup "tags" (e.g. .PP for +paragraphs, .HEAD for heads, .FOOTNOTE +for footnotes, etc.) that make a lot of typesetting decisions +automatically. +

+You tell mom that you want to use the document +processing macros with the +START +macro, explained below. After START, +mom determines the appearance of text following +the markup tags automatically, although you, the user, can easily +change how mom interprets the tags. This gives you +nearly complete control over the look and feel of your documents. +In addition, the typesetting macros, in combination with document +processing, let you meet all sorts of typesetting needs that just +can't be covered by "one macro fits all" markup tags. + + +

How to input mom's macros

+ + +Regardless of which way you use mom, the +following apply. +
+
    +
  1. You need a good text editor for inputting + mom files. +

    + I cannot recommend highly enough that you use an + editor that lets you write syntax highlighting + rules for mom's macros and + inline escapes. + I use the vi clone called elvis, and find it a pure + joy in this regard. Simply colorizing macros and + inlines to half-intensity is enough to make text stand + out clearly from formattting commands. +

  2. All mom's macros begin with a period + (dot) and must be entered in upper case (capital) + letters. +
  3. Macro + arguments + 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. All + arguments to a macro must appear on the same line as the + macro. +
  4. Any argument (except a + string argument) + that is not a digit must be entered in upper case + (capital) letters. +
  5. 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. +2, -4). +
  6. Any argument that requires a + unit of measure + must have the unit appended directly to the argument, + with no intervening space (e.g. 4P, .5i, 2v). +
  7. String arguments, + in the sense that the term is used in this manual, must + be surrounded by double-quotes ("text of + string"). Multiple string arguments are separated + from each other by spaces (each argument surrounded by + double-quotes, of course). +
  8. If a string argument, as entered in your text editor, + becomes uncomfortably long (i.e. runs longer than the + visible portion of your screen or window), you may break + it into two or more lines by placing the backslash + character (\) at the ends of lines to break + them up, like this: +

    +

    +	.SUBTITLE "An In-Depth Consideration of the \
    +	Implications of Forty-Two as the Meaning of Life, \
    +	The Universe, and Everything"
    +	
    +
+ +It's important that formatted documents be easy to read/interpret +when you're looking at them 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 blank comment line. +In groff, that's done with \# on a line by itself. +Consider the following, which is a template for starting the +chapter of a book. +

+

+	.TITLE   "My Pulizter Novel"
+	.AUTHOR  "Joe Blow"
+	.CHAPTER  1
+	\#
+	.DOCTYPE    CHAPTER
+	.PRINTSTYPE TYPESET
+	\#
+	.FAM P
+	.PS  10
+	.LS  12
+	\#
+	.START
+
+ + +

Printing -- invoking groff with mom

+
+ +After you've finished your document, naturally you will want to +print it. This involves invoking groff from the command line. +In all likelihood, you already know how to do this, but in case +you don't, here are two common ways to do it. +

+

+	groff -mom -l <filename>
+	groff -mom <filename> | lpr
+
+ +In the first, the -l option to groff tells +groff to send the output to your printer. In the second, you're +doing the same thing, except you're telling groff to pipe the +output to your printer. Basically, they're the same thing. The +only advantage to the second is that your system may be set up +to use something other than lpr as your print +command, in which case, you can replace lpr +with whatever is appropriate to your box. +

+Sadly, it is well beyond the scope of this manual to tell you +how to set up a printing system. See the README file for +minimum requirements to run groff with mom. + + +

How to preview documents

+ + +Other than printing out hard copy, there are two well-established +methods for previewing your work. Both assume you have a working +X server. +

+Groff itself comes with a quick and dirty previewer called +gxditview. Invoke it with +

+

+	groff -X -mom <filename>
+
+ +It's not particularly pretty, doesn't have many navigation +options, requires a lot of work if you want to use other than +the "standard" groff PostScript fonts, and occasionally +has difficulty accurately reproducing some of +mom's macro effects +(smartquotes +and +leaders +come to mind). What it does have going for it is that it's fast and +doesn't gobble up system resources. +

+A surer way to preview documents is with gv +(ghostview). This involves processing documents with groff, +directing the output to a temporary (PostScript) file, then opening +the temporary file in gv. While that may sound +like a lot of work, I've set up my editor (elvis) to do it for me. +Whenever I'm working on a document that needs previewing/checking, +I fire up gv with the "Watch File" +option turned on. To look at the file, I tell elvis to process +it (with groff) and send it to the temporary file (groff +-mom filename > filename.ps), then open the file inside +gv. Ever after, when I want to look at any changes +I make, I simply tell elvis to work his magic again. The Watch File +option in gv registers that the file has changed, +and automatically loads the new version. Voilà! -- instant previewing. + +

+


+Back to Table of Contents + + diff --git a/contrib/mom/om.tmac b/contrib/mom/om.tmac new file mode 100644 index 00000000..e8a85d87 --- /dev/null +++ b/contrib/mom/om.tmac @@ -0,0 +1,8120 @@ +.\" om.tmac +.\" +.\" Copyright (C) 2002 Free Software Foundation, Inc. +.\" Written by Peter Schaffter (df191@ncf.ca) +.\" +.\" 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 2, 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 file COPYING. If not, write to the Free Software +.\" Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +.\" +. +. +\# Inasmuch as possible, macros that turn a feature on or off follow +\# a similar style. Invoking the macro without an argument turns +\# the feature on. Invoking it with any other argument turns it off. +\# Use of the argument OFF is recommended, but not required; users +\# may find other conventions preferable (e.g. NO, X, END, QUIT, etc.). +\# +\# "" in the description of arguments that can be passed +\# to a macro means that any argument turns the feature off. +\# +\# ==================================================================== +\# +\# TYPESETTING MACROS, STRINGS, AND ALIASES +\# ======================================== +\# +\# +++ALIASES+++ +\# +.als ALIAS als \"Alias .als as ALIAS +.als ALIASN aln \"Alias .aln (number registers) as ALIASN +\# +.ALIAS MAC de +.ALIAS BR br +.ALIAS SPACE sp +.ALIAS SP sp +.ALIAS PAGELENGTH pl +.ALIAS NEWPAGE bp +.ALIAS SPREAD brp +.ALIAS STRING ds +\# +\# 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 (.vs, not .ls) +.ALIASN #PAGE_LENGTH .p \"page length +.ALIASN #NUM_ARGS .$ \"number of arguments passed to a macro +.ALIASN #INDENT .i \"value of current indent +\# +\# +\# ==================================================================== +\# +\# END MACRO +\# --------- +\# *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 +. br +. FOOTERS OFF +. PAGINATION OFF +. if \\n[#DOC_TYPE]=4 \{\ +. br +. if !'\\n(.z'' \{ .di \} +. IX CLEAR +. TQ +. TS 1 \\n[#DOC_L_LENGTH]u/2u \\n[#DOC_L_LENGTH]u/2u LEFT +. ALD \\n[#DOC_LEAD]u*2u +. TAB 1 +. if \\n[#CLOSING] \{\ +. nf +. CLOSING +. \} +. ALD \\n[#DOC_LEAD]u*3u +. PRINT \\*[$AUTHOR_1] +. \} +.DO_FOOTER +.END +\# +\# +\# ===================================================================== +\# +\# +++PAGE LAYOUT+++ +\# +\# Macros that control the physical layout of the page: paper size +\# and margins. +\# +\# PAGE WIDTH +\# ---------- +\# *Argument: +\# +\# *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 \} +.END +\# +\# +\# L_MARGIN +\# -------- +\# *Argument: +\# +\# *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: +\# +\# *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(.lu +. nr #L_LENGTH \\n(.l +.END +\# +\# +\# T_MARGIN +\# -------- +\# *Argument: +\# +\# *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 +. br +. nr #T_MARGIN (\\$1) +. nr #T_MARGIN_SET 1 +. if !\\n[#DOCS] \{\ +. PRINT \& +. sp |\\n[#T_MARGIN]u-1v +. \} +. wh 0i DO_T_MARGIN +.END +\# +\# +\# B_MARGIN +\# -------- +\# *Argument: +\# +\# *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) +. wh -\\n[#B_MARGIN]u DO_B_MARGIN +.END +\# +\# +\# PAGE +\# ---- +\# *Arguments: +\# [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 +\# +\# ===================================================================== +\# +\# +++PAGE CONTROL+++ +\# +\# Generic macros for breaking pages. +\# +\# DO_HEADER +\# --------- +\# *Argument: +\# +\# *Function: +\# Plants the top margin (set in .PAGE) at the top of each page. +\# *Notes: +\# The trap is set in .PAGE +\# +.MAC DO_T_MARGIN END +. ev 1 +. sp |\\n[#T_MARGIN]u-1v +. ev +.END +\# +\# +\# DO_FOOTER +\# --------- +\# *Argument: +\# +\# *Function: +\# Plants the bottom margin (set in .PAGE) at the bottom of each page. +\# *Notes: +\# The trap is set in .PAGE. +\# +.MAC DO_B_MARGIN END +.ev 1 +. bp +.ev +.END +\# +\# ===================================================================== +\# +\# +++GENERAL STYLE MACROS+++ +\# +\# Macros that are likely to appear together to define general +\# type style: line length, family, font, point size, and line +\# spacing. +\# +\# LINE LENGTH +\# ----------- +\# *Argument: +\# +\# *Function: +\# Stores user supplied line length in register #L_LENGTH. +\# Sets .ll to #L_LENGTHu +\# *Notes: +\# Requires unit of measure. +\# +.MAC LL END +. nr #L_LENGTH (\\$1) +. nr #USER_SET_L_LENGTH 1 +. ll \\n[#L_LENGTH]u +. ta \\n(.lu +.END +\# +\# +\# FAMILY +\# ------ +\# *Argument: +\# +\# *Function: +\# Stores user supplied font family in string $FAMILY. Sets .fam +\# to $FAMILY. +\# +.MAC FAMILY END +. if \\n[#PRINT_STYLE]=1 \{ .return \} +. if \\n[#IGNORE] \{ .return \} +. ds $FAMILY \\$1 +. fam \\*[$FAMILY] +.END +\# +\# +\# FONT +\# ---- +\# *Argument: +\# R | I | B | BI +\# *Function: +\# Stores user supplied font in $FONT and sets .ft to $FONT. +\# +.MAC FT END +. 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 +. \} +. ds $FONT \\$1 +. ft \\*[$FONT] +.END +\# +\# +\# POINT SIZE +\# ---------- +\# *Arguments: +\# +\# *Function: +\# Sets point size to user supplied value in scaled points. +\# If #AUTO_LEAD is on, sets .vs to #AUTOLEAD_VALUE+#PT_SIZE. +\# *Notes: +\# Must NOT use a unit of measure. +\# +.MAC PS END +. if \\n[#PRINT_STYLE]=1 \{ .return \} +. if \\n[#IGNORE] \{ .return \} +. nr #PT_SIZE_SET 1 +. ps \\$1 +. if \\n[#AUTO_LEAD] \{\ +. ie \\n[#AUTOLEAD_FACTOR] \{ .vs \\n[#PT_SIZE]u*\\n[#AUTOLEAD_VALUE]u/1000u \} +. el \{ .vs \\n[#PT_SIZE]u+\\n[#AUTOLEAD_VALUE]u \} +. \} +. nr #PT_SIZE_IN_UNITS \\n[.ps] +.END +\# +\# +\# LEADING +\# ------- +\# *Argument: +\# +\# *Function: +\# Turns off #AUTO_LEAD if it's on. +\# Sets .vs to user supplied value. +\# *Notes: +\# Does not require unit of measure. LEAD automatically turns off AUTOLEAD. +\# +.MAC LS END +. if \\n[#PRINT_STYLE]=1 \{ .return \} +. if \\n[#IGNORE] \{ .return \} +. nr #LEAD_SET 1 +. if \\n[#AUTO_LEAD] \{\ +. rr #AUTO_LEAD +. rr #AUTOLEAD_FACTOR +. \} +. vs \\$1 +. if \\n[#T_MARGIN_SET]=1 \{\ +. sp |\\n[#T_MARGIN]u-1v +. rr #T_MARGIN_SET +. \} +.END +\# +\# +\# AUTOLEAD +\# -------- +\# *Argument: +\# [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 PS 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 instead of the two being added +\# together. +\# +\# When AUTOLEAD is turned off, the leading reverts to the leading value +\# in effect prior to invoking AUTOLEAD. +\# +.MAC AUTOLEAD END +. if \\n[#PRINT_STYLE]=1 \{ .return \} +. if \\n[#IGNORE] \{ .return \} +. nr #AUTO_LEAD 1 +. nr #AUTOLEAD_VALUE (p;\\$1) +. ie \\n[#NUM_ARGS]=2 \{\ +. if '\\$2'FACTOR' \{ +. nr #AUTOLEAD_FACTOR 1 +. vs \\n[#PT_SIZE]u*\\n[#AUTOLEAD_VALUE]u/1000u +. \} +. \} +. el \{\ +. vs \\n[#PT_SIZE]u+\\n[#AUTOLEAD_VALUE]u +. \} +. if \\n[#T_MARGIN_SET] \{\ +. sp |\\n[#T_MARGIN]u-1v +. rr #T_MARGIN_SET +. \} +.END +\# +\# +\# STRINGS FOR INLINE CONTROL OF GENERAL TYPE STYLE +\# ------------------------------------------------ +.ds ROM \EfR +.ds IT \EfI +.ds BD \EfB +.ds BDI \Ef(BI +.ds PREV \EfP +.ds S \Es +\# +\# ===================================================================== +\# +\# +++KERNING+++ +\# +\# AUTOMATIC PAIRWISE KERNING +\# -------------------------- +\# *Arguments: +\# | +\# *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 +\# -------------- +\# Inline kerning provides a simple method for users to adjust the +\# amount of space between any two letters. It's predicated on a +\# unit of measure "U", which 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. +\# +\# N.B.--the amount of inline kerning supplied by \*[BU#] or +\# \*[FU#] is added to or subtracted from any kerning that already +\# takes place between two characters when automatice kerning is +\# turned on. +\# +\# Owing to some stupidities of groff, it is not possible +\# pass arguments to macros that are executed with inline +\# escapes, nor thence to evaluate conditional expressions. +\# Consequently, each pseudo-escape \[BU#] must be defined +\# separately with ".char". I'd have prefered something like +\# this +\# +\# .de BU +\# \c +\# \\h'-(\\n[#PT_SIZE]u/\\n[#KERN_UNIT]u*\\$1u)'\c +\# .. +\# +\# with the BU escape looking like "\*[BU #]", but that's +\# just not possible. Bottom line? The user can only BU or FU +\# up to 36 Us, and there are too many lines of code for +\# such a simple function. +\# +\# BP and FP do the same thing as BU and FU, except that the +\# unit is points, and it only goes up to FP12/BP12 (1 pica) +\# +\# +.nr #KERN_UNIT 36 +.ds BU1 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*1u)' +.ds BU2 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*2u)' +.ds BU3 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*3u)' +.ds BU4 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*4u)' +.ds BU5 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*5u)' +.ds BU6 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*6u)' +.ds BU7 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*7u)' +.ds BU8 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*8u)' +.ds BU9 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*9u)' +.ds BU10 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*10u)' +.ds BU11 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*11u)' +.ds BU12 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*12u)' +.ds BU13 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*13u)' +.ds BU14 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*14u)' +.ds BU15 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*15u)' +.ds BU16 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*16u)' +.ds BU17 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*17u)' +.ds BU18 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*18u)' +.ds BU19 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*19u)' +.ds BU20 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*20u)' +.ds BU21 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*21u)' +.ds BU22 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*22u)' +.ds BU23 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*23u)' +.ds BU24 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*24u)' +.ds BU25 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*25u)' +.ds BU26 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*26u)' +.ds BU27 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*27u)' +.ds BU28 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*28u)' +.ds BU29 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*29u)' +.ds BU30 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*30u)' +.ds BU31 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*31u)' +.ds BU32 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*32u)' +.ds BU33 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*33u)' +.ds BU34 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*34u)' +.ds BU35 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*35u)' +.ds BU36 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*36u)' +\# +.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 FU1 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*1u)' +.ds FU2 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*2u)' +.ds FU3 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*3u)' +.ds FU4 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*4u)' +.ds FU5 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*5u)' +.ds FU6 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*6u)' +.ds FU7 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*7u)' +.ds FU8 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*8u)' +.ds FU9 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*9u)' +.ds FU10 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*10u)' +.ds FU11 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*11u)' +.ds FU12 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*12u)' +.ds FU13 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*13u)' +.ds FU14 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*14u)' +.ds FU15 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*15u)' +.ds FU16 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*16u)' +.ds FU17 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*17u)' +.ds FU18 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*18u)' +.ds FU19 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*19u)' +.ds FU20 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*20u)' +.ds FU21 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*21u)' +.ds FU22 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*22u)' +.ds FU23 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*23u)' +.ds FU24 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*24u)' +.ds FU25 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*25u)' +.ds FU26 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*26u)' +.ds FU27 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*27u)' +.ds FU28 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*28u)' +.ds FU29 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*29u)' +.ds FU30 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*30u)' +.ds FU31 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*31u)' +.ds FU32 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*32u)' +.ds FU33 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*33u)' +.ds FU34 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*34u)' +.ds FU35 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*35u)' +.ds FU36 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*36u)' +\# +.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 KERNING (RW and EW) +\# ----------------------------- +\# The line kerning macros are special instances of track kerning, +\# used where a complete line needs to be tightened (or relaxed) in +\# order to accomodate or remove one or two more characters +\# than the default justification permits. +\# +\# *Argument: +\# +\# *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. +\# +\# The groff documentation is a tad confusing about what unit of +\# measure is used in track kerning, only that the width of each +\# character is increased or decreased by the amount(s) passed as +\# arguments to .tkf, and something about linear function of point +\# size. In fact, with the way I've put this macro together, it +\# doesn't matter. All the user needs to know is that a value +\# of one 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 (e.g. .25, .5). Given that RW +\# and EW are for massaging type, a certain amount of +\# experimentation and previewing is expected and necessary. +\# +\# \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] \{ .br \} +. tkf 1 1 -\\$1 1 -\\$1 +. tkf 2 1 -\\$1 1 -\\$1 +. tkf 3 1 -\\$1 1 -\\$1 +. tkf 4 1 -\\$1 1 -\\$1 +.END +\# +\# +.MAC EW END +. if \\n[#BR_AT_LINE_KERN] \{ .br \} +. tkf 1 1 \\$1 1 \\$1 +. tkf 2 1 \\$1 1 \\$1 +. tkf 3 1 \\$1 1 \\$1 +. tkf 4 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_BEFORE_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: +\# | | DEFAULT +\# or +\# LINES <#> | MARGIN <#> | SPACE <#> +\# *Function: +\# Turns auto hyphenation on or off, resets the hyphenation style +\# to default, or permits the setting of various hyphenation +\# parameters. +\# *Notes: +\# HY ON 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 <#> sets the number of allowable consecutive hyphenated lines. +\# +\# HY MARGIN <#> 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 +. 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 \} +. if '\\$1'MARGIN' \{ .hym \\$2 \} +. if '\\$1'SPACE' \{ .hys \\$2 \} +. if '\\$1'DEFAULT' \{\ +. hlm -1 +. hym 0 +. hys 0 +. \} +. \} +.END +\# +\# +\# HYPHENATION PARAMETERS +\# ---------------------- +\# *Arguments: +\# <# of lines> | | +\# *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: +\# +\# *Function: +\# Creates or modifies register #ALD. Adds user supplied lead +\# below current baseline. +\# *Notes: +\# Requires unit of measure ipPcmv. +\# +.MAC ALD END +. nr #ALD (\\$1) +. sp \\n[#ALD]u +.END +\# +\# +\# REVERSE LEAD +\# ------------ +\# *Argument: +\# +\# *Function: +\# Creates or modifies register #RLD. Reverses user supplied +\# lead above current baseline. +\# *Notes: +\# Requires unit of measure ipPcm. +\# +.MAC RLD END +. nr #RLD (\\$1) +. sp -\\n[#RLD]u +.END +\# +\# ALD/RLD STRINGS +\# --------------- +\# *Notes: +\# If user needs to ALD/RLD more than 12 points, \v'' must be used +\# instead +\# +.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: +\# | +\# *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: +\# | +\# *Function: +\# Turns smartquotes on or off. +\# *Notes: +\# The " character is read outside the macro when mymacs is +\# processed. The strings for open/close ($QUOTE#) are then +\# defined in the macro. \N'34' is the ASCII code for ". If +\# incompatibilities arise, find the code for " that applies +\# to your system and plug in that code instead. +\# +.char " \\*[$QUOTE\\n[#OPEN_CLOSE]]\R'#OPEN_CLOSE (1-\\n[#OPEN_CLOSE])' +\# +.MAC SMARTQUOTES END +. ie '\\$1'' \{\ +. nr #OPEN_CLOSE 0 +. ds $QUOTE0 `` +. ds $QUOTE1 '' +. nr #SMART_QUOTES 1 +. \} +. el \{\ +. ds $QUOTE0 \\N'34' +. ds $QUOTE1 \\N'34' +. nr #SMART_QUOTES 0 +. \} +.END +\# +.ds FOOT \(fm +.ds INCH \(fm\(fm +\# +\# ===================================================================== +\# +\# +++LINE BREAKS+++ +\# +\# NO-SPACE BREAK +\# -------------- +\# *Argument: +\# +\# *Function: +\# Breaks a line without advancing. +\# *Notes: +\# EL is the mnemonic used on older, dedicated typesetting machines +\# to indicate "process the line, then return to the left margin +\# without advancing the galley medium." It stands for End Line. +\# +\# Sadly, EL is only a fake. It will work in all instances EXCEPT +\# when the line to be EL'd is the last line before a footer trap. +\# +.MAC EL END +. br +. sp -1v +.END +\# +\# ===================================================================== +\# +\# +++FILLING/QUADDING/JUSTIFYING+++ +\# +\# JUSTIFY +\# ------- +\# *Argument: +\# +\# *Function: +\# Turns fill on and sets .ad to b. +\# *Notes: +\# Justifies text left and right. +\# +.MAC JUSTIFY END +. 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 #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 +. ds $QUAD_VALUE \\$1 +. if \\n[#TAB_ACTIVE]=0 \{\ +. nr #QUAD 1 +. ds $RESTORE_QUAD_VALUE \\*[$QUAD_VALUE] +. \} +' ce 0 +' fi +. if '\\*[$QUAD_VALUE]'L' \{ .ad l \} +. if '\\*[$QUAD_VALUE]'LEFT' \{ .ad l \} +. if '\\*[$QUAD_VALUE]'R' \{ .ad r \} +. if '\\*[$QUAD_VALUE]'RIGHT' \{ .ad r \} +. if '\\*[$QUAD_VALUE]'C' \{ .ad c \} +. if '\\*[$QUAD_VALUE]'CENTER' \{ .ad c \} +. if '\\*[$QUAD_VALUE]'CENTRE' \{ .ad c \} +. if '\\*[$QUAD_VALUE]'J' \{ .ad b \} +. if '\\*[$QUAD_VALUE]'JUSTIFY' \{ .ad b \} +. nr #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* the user having to +\# enter .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 groff fill mode. +\# +\# LEFT +\# ---- +\# *Argument: +\# +\# *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, simply continued (indefinitely) until a return is +\# encountered. 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 #FILL 1 +.END +\# +\# +\# RIGHT +\# ----- +\# *Argument: +\# +\# *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 +. \} +. fi +. rj 100000 +. nr #FILL 1 +.END +\# +\# +\# CENTER +\# ------ +\# *Argument: +\# +\# *Function: +\# Turns fill on. 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 \{\ +. ds $RESTORE_QUAD_VALUE CENTER +. \} +. fi +. ce 100000 +. nr #FILL 1 +.END +\# +\# ===================================================================== +\# +\# +++TABS+++ +\# +\# There are two different kinds of tabs available: 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 TS, they are called with .TAB <#>, where <#> +\# 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 <#>, +\# 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 \*[ST<#>], where <#> is +\# the desired number of the tab. The end of the the tab is marked +\# with \*[ST<#>X]. All ST's must have a matching STX. String tabs +\# may be nested. +\# +\# Next, the user invokes .ST <#> for every string tab defined, and +\# optionally passes quad information to it. That done, string tabs +\# can be called just like typesetting tabs. +\# +\# String tabs don't preview properly with gxditview. Use gv instead. +\# +\# Strings for string tab inlines +\# ------------------------------ +\# +.ds ST1 \Ek[#ST1_OFFSET] +.ds ST2 \Ek[#ST2_OFFSET] +.ds ST3 \Ek[#ST3_OFFSET] +.ds ST4 \Ek[#ST4_OFFSET] +.ds ST5 \Ek[#ST5_OFFSET] +.ds ST6 \Ek[#ST6_OFFSET] +.ds ST7 \Ek[#ST7_OFFSET] +.ds ST8 \Ek[#ST8_OFFSET] +.ds ST9 \Ek[#ST9_OFFSET] +.ds ST10 \Ek[#ST10_OFFSET] +.ds ST11 \Ek[#ST11_OFFSET] +.ds ST12 \Ek[#ST12_OFFSET] +.ds ST13 \Ek[#ST13_OFFSET] +.ds ST14 \Ek[#ST14_OFFSET] +.ds ST15 \Ek[#ST15_OFFSET] +.ds ST16 \Ek[#ST16_OFFSET] +.ds ST17 \Ek[#ST17_OFFSET] +.ds ST18 \Ek[#ST18_OFFSET] +.ds ST19 \Ek[#ST19_OFFSET] +.ds ST1X \Ek[#ST1_MARK] +.ds ST2X \Ek[#ST2_MARK] +.ds ST3X \Ek[#ST3_MARK] +.ds ST4X \Ek[#ST4_MARK] +.ds ST5X \Ek[#ST5_MARK] +.ds ST6X \Ek[#ST6_MARK] +.ds ST7X \Ek[#ST7_MARK] +.ds ST8X \Ek[#ST8_MARK] +.ds ST9X \Ek[#ST9_MARK] +.ds ST10X \Ek[#ST10_MARK] +.ds ST11X \Ek[#ST11_MARK] +.ds ST12X \Ek[#ST12_MARK] +.ds ST13X \Ek[#ST13_MARK] +.ds ST14X \Ek[#ST14_MARK] +.ds ST15X \Ek[#ST15_MARK] +.ds ST16X \Ek[#ST16_MARK] +.ds ST17X \Ek[#ST17_MARK] +.ds ST18X \Ek[#ST18_MARK] +.ds ST19X \Ek[#ST19_MARK] +\# +\# +\# QUAD AND SET STRING TABS +\# ------------------------ +\# *Arguments: +\# 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 TS, 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] \{\ +. TS \\$1 \\n[#ST\\$1_OFFSET]u+\\n[#ST_OFFSET]u \\n[#ST\\$1_LENGTH]u \\*[$ST\\$1_QUAD_DIR] \\*[$ST\\$1_FILL] +. \} +. el \{\ +. TS \\$1 \\n[#ST\\$1_OFFSET]u \\n[#ST\\$1_LENGTH]u \\*[$ST\\$1_QUAD_DIR] \\*[$ST\\$1_FILL] +. \} +.END +\# +\# +\# TAB SET +\# ------- +\# *Arguments: +\# <#> ident(ipPcm) length(ipPcm) [L | R | C | J [QUAD]] +\# *Function: +\# Creates macros TAB<#> and TAB <#>, where # is any arbitrary number. +\# TAB# is a typesetting tab (i.e. a tab defined as an indent +\# from the page left offset plus a line length.) +\# *Notes: +\# <#> = 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''u--if more than one word in string, surround +\# with double quotes "\w''" +\# 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 +\# +\# Examples: +\# +\# .TS 1 2P+6p 12P C +\# +\# means "create a tab numbered 1 that starts 2 picas and 6 points from +\# the left margin, is 12 picas long, and centre each input line." +\# +\# .TS 1 2P+6P 12P C QUAD +\# +\# means exactly the same thing, except that input lines are joined and +\# the area delimted by the tab filled with centered text. +\# +\# TAB <#> can be called at any time after being set. +\# +\# Tabs are NOT columnar in behaviour. If the text inside a +\# tab runs to several lines, when you call the next tab a break +\# occurs, meaning that the new tab starts one line below the last +\# line in the previous tab. For columnar behaviour, you must +\# use the multi-column macros in addition to tabs. +\# +\# If you want tabs to line up bottom-line to bottom-line (most likely +\# single line tabs), use .TN (provided the tabs are numbered sequentially). +\# Otherwise, you must use .EL then .TAB # if you want them to align. +\# +\# If you want to reset tabs, you must use .TQ before .TS. +\# +\# Note that indents are turned off automatically whenever a new +\# tab is called with TAB #. +\# +\# Tabs themselves are user-invoked using the TAB macro with a numeric +\# argument, e.g. TAB 1. +\# +\# Generally, in order not to get confused, 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] DONE \"Define TAB macro +. br +. in 0 +. nr #TAB_ACTIVE 1 +. nr #CURRENT_TAB \\n[#TAB_NUMBER] +. po \\n[#L_MARGIN]u+\\n[#TAB_OFFSET]u +. nr #ST_OFFSET \\n[#TAB_OFFSET] +. nr #TAB_OFFSET\\*[$CURRENT_TAB] \\n[#TAB_OFFSET] +. ll \\n[#TAB_LENGTH]u +. ta \En(.lu +. 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 \} +. \} +.DONE +. rr #TAB_ACTIVE +.END +\# +\# +\# TAB +\# --- +\# *Arguments: +\# +\# *Function: +\# Moves to tab number passed as an argument. +\# +.MAC TAB END +. ds $TAB_NUMBER \\$1 +. TAB\\*[$TAB_NUMBER] +. nr #IN_TAB 1 +. po \\n[#L_MARGIN]u+\\n[#TAB_OFFSET\\*[$TAB_NUMBER]]u +.END +\# +\# +\# TAB NEXT +\# -------- +\# *Argument: +\# +\# *Function: +\# Automagically moves to TAB#+1 on the same line as the last +\# line of the previous tab. +\# *Notes: +\# If the tabs being aligned fall too close to the footer +\# trap, the line entered after .TN will appear on the next page. +\# +.MAC TN END +. br +. nr #NEXT_TAB \\n[#CURRENT_TAB]+1 +. TAB\\n[#NEXT_TAB] +. sp -1v +.END +\# +\# +\# TAB QUIT +\# -------- +\# *Argument: +\# +\# *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* come before setting any new tabs if you want the +\# tabs' indents measured from page left. Otherwise, the tabs' +\# indents are measured from the left margin of the tab you're +\# currently in. +\# +.MAC TQ END +. br +. rr #TAB_ACTIVE +. rr #IN_TAB +. po \\n[#L_MARGIN]u +. ll \\n[#L_LENGTH]u +. ta \\n(.lu +. 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 +\# +\# ===================================================================== +\# +\# +++MISCELLANEOUS USEFUL MACROS AND STRINGS+++ +\# +\# UNDERLINE +\# --------- +\# *Arguments: +\# | +\# *Function: +\# When on, underlines all letters, words, and digits in a passage, +\# ignoring punctuation and spaces. +\# *Notes: +\# Only for use when the font family is COURIER, to simulate +\# typewriter-style underlining of italic passages. +\# +.MAC UNDERLINE END +. ie '\\$1'' \{\ +. nr #UNDERLINE_ON 1 +. char A _A +. char B _B +. char C _C +. char D _D +. char E _E +. char F _F +. char G _G +. char H _H +. char I _I +. char J _J +. char K _K +. char L _L +. char M _M +. char N _N +. char O _O +. char P _P +. char Q _Q +. char R _R +. char S _S +. char T _T +. char U _U +. char V _V +. char W _W +. char X _X +. char Y _Y +. char Z _Z +. char À _À +. char  _ +. char Á _Á +. char Ä _Ä +. char Å _Å +. char È _È +. char Ê _Ê +. char É _É +. char Ë _Ë +. char Ì _Ì +. char Î _Î +. char Í _Í +. char Ï _Ï +. char Ñ _Ñ +. char Ò _Ò +. char Ô _Ô +. char Ó _Ó +. char Ö _Ö +. char Ø _Ø +. char Ù _Ù +. char Û _Û +. char Ú _Ú +. char Ü _Ü +. char a _a +. char b _b +. char c _c +. char d _d +. char e _e +. char f _f +. char g _g +. char h _h +. char i _i +. char j _j +. char k _k +. char l _l +. char m _m +. char n _n +. char o _o +. char p _p +. char q _q +. char r _r +. char s _s +. char t _t +. char u _u +. char v _v +. char w _w +. char x _x +. char y _y +. char z _z +. char à _à +. char â _â +. char á _á +. char ä _ä +. char å _å +. char è _è +. char ê _ê +. char é _é +. char ë _ë +. char ì _ì +. char î _î +. char í _í +. char ï _ï +. char ñ _ñ +. char ò _ò +. char ô _ô +. char ó _ó +. char ö _ö +. char ø _ø +. char ß _ß +. char ù _ù +. char û _û +. char ú _ú +. char ü _ü +. char ' _' +. char 1 _1 +. char 2 _2 +. char 3 _3 +. char 4 _4 +. char 5 _5 +. char 6 _6 +. char 7 _7 +. char 8 _8 +. char 9 _9 +. char 0 _0 +. \} +. el \{\ +. nr #UNDERLINE_ON 0 +. rchar 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 \ + à â á ä å è ê é ë ì î í ï ñ ò ô ó ö ø ß ù û ú ü ' \ + 1 2 3 4 5 6 7 8 9 0 +. \} +.END +\# +\# +\# UL/ULX +\# ------ +\# *Arguments: +\# +\# *Function: +\# Underscores all letters, words, and digits in a passage, +\# ignoring punctuation and spaces. +\# *Notes: +\# Intended to be called with inline escapes \*[UL] (underline +\# on) and \*[ULX] (underline off). Only works when the font family +\# is COURIER, to simulate typewriter-style underlining of italic +\# passages. +\# +.MAC UL END +\c\R'#UNDERLINE_ON 1' +. char A _A +. char B _B +. char C _C +. char D _D +. char E _E +. char F _F +. char G _G +. char H _H +. char I _I +. char J _J +. char K _K +. char L _L +. char M _M +. char N _N +. char O _O +. char P _P +. char Q _Q +. char R _R +. char S _S +. char T _T +. char U _U +. char V _V +. char W _W +. char X _X +. char Y _Y +. char Z _Z +. char À _À +. char  _ +. char Á _Á +. char Ä _Ä +. char Å _Å +. char È _È +. char Ê _Ê +. char É _É +. char Ë _Ë +. char Ì _Ì +. char Î _Î +. char Í _Í +. char Ï _Ï +. char Ñ _Ñ +. char Ò _Ò +. char Ô _Ô +. char Ó _Ó +. char Ö _Ö +. char Ø _Ø +. char Ù _Ù +. char Û _Û +. char Ú _Ú +. char Ü _Ü +. char a _a +. char b _b +. char c _c +. char d _d +. char e _e +. char f _f +. char g _g +. char h _h +. char i _i +. char j _j +. char k _k +. char l _l +. char m _m +. char n _n +. char o _o +. char p _p +. char q _q +. char r _r +. char s _s +. char t _t +. char u _u +. char v _v +. char w _w +. char x _x +. char y _y +. char z _z +. char à _à +. char â _â +. char á _á +. char ä _ä +. char å _å +. char è _è +. char ê _ê +. char é _é +. char ë _ë +. char ì _ì +. char î _î +. char í _í +. char ï _ï +. char ñ _ñ +. char ò _ò +. char ô _ô +. char ó _ó +. char ö _ö +. char ø _ø +. char ß _ß +. char ù _ù +. char û _û +. char ú _ú +. char ü _ü +. char ' _' +. char 1 _1 +. char 2 _2 +. char 3 _3 +. char 4 _4 +. char 5 _5 +. char 6 _6 +. char 7 _7 +. char 8 _8 +. char 9 _9 +. char 0 _0 +.END +\# +\# +.MAC ULX END +\c\R'#UNDERLINE_ON 0' +. rchar 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 \ + à â á ä å è ê é ë ì î í ï ñ ò ô ó ö ø ß ù û ú ü ' \ + 1 2 3 4 5 6 7 8 9 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 +\# +\# All text is underscored (including punctuation and spaces). +\# This is the primary difference between UNDERLINE and UNDERSCORE, +\# aside from the fact the UNDERLINE only works with Courier. +\# +\# UNDERSCORE does not work across line breaks. Each line of +\# text must be entered separately with UNDERSCORE. If the +\# UNDERSCORE begins in the middle of a line and crosses over a +\# break, the portion before the break must be entered in its own +\# UNDERSCORE, as must the portion that comes after the break. +\# +.MAC UNDERSCORE END +. nr #RESTORE_PT_SIZE \\n[#PT_SIZE] +. ie \\n[#NUM_ARGS]=1 \{ \\$1\\s(12\\v'+2p'\\l'|0'\\v'-2p'\\s[\\n[#RESTORE_PT_SIZE]u] \} +. el \{ \\$2\\s(12\\v'+(\\$1)'\\l'|0'\\v'-(\\$1)'\\s[\\n[#RESTORE_PT_SIZE]u] \} +. rr #RESTORE_PT_SIZE +.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 #RESTORE_PT_SIZE \\n[#PT_SIZE] +. if \\n[#NUM_ARGS]=1 \{\ +. PRINT \\$1\\s(12\\v'+2p'\\l'|0'\\v'+2p'\\l'|0'\\v'-4p'\\s[\\n[#RESTORE_PT_SIZE]u] +. \} +. if \\n[#NUM_ARGS]=2 \{\ +. PRINT \\$2\\s(12\\v'+\\$1'\\l'|0'\\v'+2p'\\l'|0'\\v'-(2p+\\$1)'\\s[\\n[#RESTORE_PT_SIZE]u] +. \} +. if \\n[#NUM_ARGS]=3 \{\ +. PRINT \\$3\\s(12\\v'+\\$1'\\l'|0'\\v'+\\$2'\\l'|0'\\v'-(\\$2+\\$1)'\\s[\\n[#RESTORE_PT_SIZE]u] +. \} +. rr #RESTORE_PT_SIZE +.END +\# +\# +\# SUPERSCRIPT INLINES +\# ------------------- +\# *Function: +\# Prints everything after 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. +\# +.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]\v'-.3m'\s[\En[#SUP_PT_SIZE]u] +\# +.ds SUPX \s[\En[#PT_SIZE_IN_UNITS]u]\v'.3m' +\# +.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]\v'-.3m'\s[\En[#SUP_PT_SIZE]u]\E*[COND_FOR_SUP] +\# +.ds CONDSUPX \s[\En[#PT_SIZE_IN_UNITS]u]\v'.3m'\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]\v'-.3m'\s[\En[#SUP_PT_SIZE]u]\E*[EXT_FOR_SUP] +\# +.ds EXTSUPX \s[\En[#PT_SIZE_IN_UNITS]u]\v'.3m'\E*[EXT] +\# +\# +\# SLANT +\# ----- +\# +\# SETSLANT +\# -------- +\# *Arguments: +\# | 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: +\# | 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: +\# +\# *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 with 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'\Es0\R'#PT_SIZE_IN_UNITS \En[.ps]'\H'\En[#PT_SIZE_IN_UNITS]u' +.ds EXTX \ER'#EXTEND 0'\Es0\R'#PT_SIZE_IN_UNITS \En[.ps]'\H'\En[#PT_SIZE_IN_UNITS]u' +\# +\# +\# +++PAD LINES+++ (insert space) +\# +\# PAD MARKER +\# ---------- +\# *Arguments: +\# +\# *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 +\# --- +\# *Argments: +\# "" +\# *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. # is equivalent to CompuGraphic's old . +\# *Notes: +\# String tabs may be marked off during PAD. +\# +.MAC PAD END +. if !d$PAD_MARKER \{ .ds $PAD_MARKER # \} +. char \\*[$PAD_MARKER] \R'#PAD_COUNT \En[#PAD_COUNT]+1' +. ds $PAD_STRING \\$1 +. as $PAD_STRING \Ekp +. di PAD_STRING +\\*[$PAD_STRING] +. br +. di +. char \\*[$PAD_MARKER] \R'#SPACE_TO_END \En(.l-\Enp'\R'#PAD_SPACE \En[#SPACE_TO_END]/\En[#PAD_COUNT]' +. di PAD_STRING +\\*[$PAD_STRING] +. br +. di +. char \\*[$PAD_MARKER] \h'\En[#PAD_SPACE]u' +. ie \\n[#SILENT] \{\ +. SILENT +\\*[$PAD_STRING] +. br +. SILENT OFF +. \} +. el \{\ +\\*[$PAD_STRING] +. br +. \} +. rr #PAD_COUNT +. rr #SPACE_TO_END +. rr #PAD_SPACE +. rm $PAD_STRING +. rm PAD_STRING +. rchar # +.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: +\# +\# *Function: +\# Set leader character. +\# +.MAC LEADER_CHARACTER END +. lc \\$1 +.END +\# +.ds LEADER  +\# +\# +++DROP CAPS+++ +\# +\# DROP CAP FAMILY +\# --------------- +\# *Argument: +\# +\# *Function: +\# Creates or modifies string $DC_FAM. +\# +.MAC DROPCAP_FAMILY END +. ds $DC_FAM \\$1 +.END +\# +\# +\# DROP CAP FONT +\# ------------- +\# *Argument: +\# +\# *Function: +\# Creates or modifies string $DC_FT. +\# +.MAC DROPCAP_FONT END +. ds $DC_FT \\$1 +.END +\# +\# +\# DROP CAP GUTTER +\# --------------- +\# *Argument: +\# +\# *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: +\# <# 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 put a strain on on resource-challenged systems. +\# +\# 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 #IGNORE \{ .return \} +. br +. if \\n[#DOCS] \{\ +. if \\n[#PRINT_STYLE]=1 \{ .return \} +. if \\n[#PRINT_STYLE]=2 \{\ +. if \\n[#PP_STYLE]=2 \{ .return \} +. if \\n[#PP]>1 \{ .return \} +. ti 0 +. \} +. \} +. ds $DROPCAP \\$1 +. nr #DC_LINES \\$2-1 +. ds $RESTORE_COND \\*[$COND_PERCENT] +. ds $RESTORE_EXT \\*[$EXT_PERCENT] +. if '\\$3'COND' \{ .CONDENSE \\$4 \} +. if '\\$3'EXT' \{ .EXTEND \\$4 \} +. if !r#DC_GUT \{ .nr #DC_GUT (3p) \} +. ds $RESTORE_FAM \\n[.fam] +. nr #RESTORE_FT \\n(.f +. 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 \\n(.f \} +. 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 \} +. mk x +. sp \\n[#DC_LINES]v +. ie '\\$3'COND' \{ .PRINT \\*[COND]\\*[$DROPCAP]\\*[CONDX] \} +. el \{ .PRINT \\*[$DROPCAP] \} +. if '\\$3'COND' \{ \E*[COND] \} +. if '\\$3'EXT' \{ \E*[EXT] \} +. ie \\n(.i \{ .in +\w'\\*[$DROPCAP]'u+\\n[#DC_GUT]u \} +. el \{ .in \w'\\*[$DROPCAP]'u+\\n[#DC_GUT]u \} +. if '\\$3'COND' \{ \E*[CONDX]\c \} +. if '\\$3'EXT' \{ \E*[EXTX]\c \} +. rt \\nxu +. FAM \\*[$RESTORE_FAM] +. FT \\n[#RESTORE_FT] +. ps \\n[#RESTORE_PT_SIZE]u +. CONDENSE \\*[$RESTORE_COND] +. EXTEND \\*[$RESTORE_EXT] +. ie \\n(.u \{ .wh \\n(.du+\\n[#DC_HEIGHT]u-1v DROPCAP_OFF \} +. el \{ .wh \\n(.du+\\n[#DC_HEIGHT]u DROPCAP_OFF \} +. rm $DROPCAP +. rr #DC_LINES +. rm $RESTORE_COND +. rm $RESTORE_EXT +. rm $RESTORE_FAM +. rr #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 +.END +\# +\# +\# ===================================================================== +\# +\# +++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. +\# +\# Because the user supplied value requires a literal + or - sign, +\# the macro argument is stored in a string. +\# +\# \n[.sss] holds the current sentence space value. +\# +.MAC WS END +. ds $WS_CONSTANT 12 +. ds $WS_VAR \\$1 +. ie '\\$1'DEFAULT' \{ .ds $WS_VAR +0 \} +. el \{ .ds $WS (\\*[$WS_CONSTANT]\\*[$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 +. ie '\\$1'0' \{ .ss \\n[.ss] (\\n[.ss]-\\n[.ss]) \} +. el \{\ +. ie '\\$1'DEFAULT' \{ .ss \\n[.ss] \} +. el \{\ +. ds $SS_VAR \\$1 +. ss \\n[.ss] (0\\*[$SS_VAR]) +. \} +. \} +.END +\# +\# +\# ===================================================================== +\# +\# +++INDENTS+++ +\# +\# There are five styles of indents: left, right, both, temporary, +\# and hanging. Each is set/invoked with a different macro. +\# Indent macros begin with the letter "I", hence .IL means "indent left," +\# .IR means "indent right," and so on. +\# +\# The first time any of the indent macros is used, it requires an +\# argument--the size of the indent in ipPcm. The size may also +\# be entered using the \w'#' function--very useful for numbered +\# lists using HI). The unit of measure is required. Subsequent +\# invocations don't require the argument; the indent measure remains the +\# same until it's changed by invoking the macro with an argument again. +\# +\# If no indents are in effect, the arguments passed to indent macros are +\# measured from the left and right margins of the page. If a left indent +\# or a right indent is already in effect, the arguments passed to +\# the indent macros are calculated from the current values; in other words, +\# the arguments are additive. If you quit an indent and later return +\# to it, its value will be the value last in effect, unless you pass +\# it an argument. If you do pass an argument, it is added to the last +\# value in effect, unless you cleared the indent with one of +\# .IX macros. +\# +\# Example +\# ------- +\# +\# .IL 2P +\# ...some text... +\# .IL 2P +\# ...some text... +\# .IX +\# ...some text... +\# .IL +\# ...some text... +\# +\# The first .IL 2P indents text 2P from the left margin. The second +\# .IL 2P indents text by an additional 2P, i.e. 4P from the left margin. +\# .IX turns the indent off. The last .IL (which has no argument) +\# takes its value from the total of all arguments passed to .IL (in +\# this case, 2P and 2P), therefore it indents 2P+2P from the left +\# margin, i.e. 4P. If you wanted the last .IL to indent just 2P, +\# you'd either have to reset the .IL prior to .IX (.IL -2P), or pass +\# the last .IL the argument 2P. +\# +\# To reverse the sense of an indent added to an indent, you may use +\# negative values. +\# +\# Indents can be turned off individually with ILX, IRX, and IBX. +\# LEFT and RIGHT indents may be combined and manipulated +\# separately, (e.g. you can have an IL of 2P and an IR of 4P +\# operative at the same time, and then change, say, the IL to +\# 4P--thereby left indenting 6P--while the IR remains at 4P. +\# +\# IB automatically turns off IL and IR. They have to be reinvoked +\# again when needed. IL and IR automatically turn IB off; it, too, +\# has to be reinvoked with needed. +\# +\# All indents can be turned off at once with IX. The ILX, IRX, IBX, +\# and IX macros simply turn the indents off; the values stored in +\# the respective indent macros (IL, IR, IB) remain in effect. If +\# the user wishes to clear the values, the IX macros should be +\# invoked with the single argument CLEAR. IX CLEAR clears out +\# the values stored for all indent styles. +\# +\# Indents *must* be turned off before settting string tabs +\# inside PAD. Generally, in order not to get confused, it's a +\# good idea to turn all indents off before setting any tabs. +\# +\# TI and HI are special cases. There's no need to turn them off, +\# since they affect only one line--the first after their +\# invocation. Like the other indent styles, the first time +\# they're invoked, they require a value in iPpcm; each subsequent +\# invocation without an argument will use the same value. To +\# change the value, simply pass a new value. Values for TI and HI +\# are *not* additive. +\# +\# HI presupposes that you already have a left or both indent +\# on. HI will never hang a line outside the left margin of a +\# document. In other words, you must have IL or IB on before you +\# can use HI. +\# +\# 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(.lu-\\n[#L_INDENT]u +. \} +. el \{\ +. br +. nr #L_INDENT +(\\$1) +. in \\n[#L_INDENT]u +. ta \\n(.lu-\\n[#L_INDENT]u +. \} +.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(.lu-\\n[#R_INDENT]u +. ta \\n(.lu-\\n[#L_INDENT]u +. \} +. el \{\ +. ll \\n[#L_LENGTH]u-\\n[#R_INDENT]u +. ta \\n(.lu-\\n[#L_INDENT]u +. \} +. \} +. el \{\ +. br +. nr #R_INDENT +(\\$1) +. ie \\n[#TAB_ACTIVE] \{\ +. ll \\n(.lu-\\n[#R_INDENT]u +. ta \\n(.lu-\\n[#L_INDENT]u +. \} +. el \{\ +. ll \\n[#L_LENGTH]u-\\n[#R_INDENT]u +. ta \\n(.lu-\\n[#L_INDENT]u +. \} +. \} +.END +\# +\# +\# +++INDENT BOTH+++ +\# +.MAC IB END +. 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'' \{\ +. br +. in \\n[#BL_INDENT]u +. ie \\n[#TAB_ACTIVE] \{\ +. ll \\n(.lu-\\n[#BR_INDENT]u +. ta \\n(.lu-\\n[#BR_INDENT]u +. \} +. el \{\ +. ll \\n[#L_LENGTH]u-\\n[#BR_INDENT]u +. ta \\n(.lu-\\n[#BR_INDENT]u +. \} +. \} +. el \{\ +. br +. nr #BL_INDENT (\\n[#INDENT]+\\$1) +. ie \\n[#NUM_ARGS]=2 \{ .nr #BR_INDENT +(\\$2) \} +. el \{ .nr #BR_INDENT \\n[#BL_INDENT] \} +. ie \\n[#TAB_ACTIVE] \{\ +. in \\n[#BL_INDENT]u +. ll \\n(.lu-\\n[#BR_INDENT]u +. ta \\n(.lu-\\n[#BL_INDENT]u +. \} +. el \{\ +. in \\n[#BL_INDENT]u +. ll \\n[#L_LENGTH]u-\\n[#BR_INDENT]u +. ta \\n(.lu-\\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 +. br +. in 0 +. rr #INDENT_LEFT_ACTIVE +. if '\\$1'CLEAR' \{ +. rr #L_INDENT +. rr #INDENT_STYLE_LEFT +. \} +.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(.lu +. \} +. el \{\ +. ll \\n[#L_LENGTH]u +. ta \\n(.lu +. \} +. \} +. if '\\$1'CLEAR' \{\ +. rr #R_INDENT +. rr #INDENT_STYLE_RIGHT +. \} +.END +\# +\# +.MAC IBX END +. br +. in 0 +. rr #INDENT_BOTH_ACTIVE +. ie \\n[#TAB_ACTIVE] \{ .TAB\\n[#CURRENT_TAB] \} +. el \{\ +. ie \\n[#COLUMNS] \{\ +. ll \\n[#COL_L_LENGTH]u +. ta \\n(.lu +. \} +. el \{\ +. ll \\n[#L_LENGTH]u +. ta \\n(.lu +. \} +. \} +. if '\\$1'CLEAR' \{\ +. rr #BL_INDENT +. rr #BR_INDENT +. rr #INDENT_STYLE_BOTH +. \} +.END +\# +\# +.MAC IX END +. br +. in 0 +. rr #INDENT_LEFT_ACTIVE +. rr #INDENT_RIGHT_ACTIVE +. rr #INDENT_BOTH_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(.lu +. \} +. el \{\ +. ll \\n[#L_LENGTH]u +. ta \\n(.lu +. \} +. \} +. \} +. 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(.lu +. \} +. el \{\ +. ll \\n[#L_LENGTH]u +. ta \\n(.lu +. \} +. \} +. \} +. 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(.lu +. \} +. el \{\ +. ll \\n[#L_LENGTH]u +. ta \\n(.lu +. \} +. \} +. \} +. 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(.lu +. \} +. el \{\ +. ll \\n[#L_LENGTH]u +. ta \\n(.lu +. \} +. \} +. \} +. 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 +. \} +. rr #INDENT_ACTIVE +.END +\# +\# ===================================================================== +\# +\# +++MULTIPLE COLUMNS+++ +\# +\# MULTIPLE COLUMNS ON +\# ------------------- +\# *Arguments: +\# +\# *Function: +\# Marks the top of a column set +\# +.MAC MCO END +.mk c +.END +\# +\# MULTIPLE COLUMN RETURN +\# ---------------------- +\# *Arguments: +\# +\# *Function: +\# Returns to the top of a column set +\# +.MAC MCR END +. sp |\\ncu +.END +\# +\# MULTIPLE COLUMNS OFF +\# -------------------- +\# *Arguments: +\# | +\# *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 +. ie '\\$1'' \{\ +. TQ +. sp |\\n(.hu +. \} +. el \{\ +. nr #MCX_ALD (\\$1) +. TQ +. ie \\n[#MCX_ALD]=0 \{ .sp |\\n(.hu-1v \} +. el \{ .sp |\\n(.hu+\\n[#MCX_ALD]u \} +. rr #MCX_ALD (\\$1) +. \} +.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 enloses +\# the offending lines in TRAP OFF/TRAP. +\# +.MAC TRAP END +. ie '\\$1'' \{ .vpt 1 \} +. el \{ .vpt 0 \} +.END +\# +\# +\# SILENT +\# ------ +\# *Arguments: +\# | +\# *Function: +\# Diverts text so that it doesn't print, or turns to 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 +\# ----- +\# *Arguments: +\# +\# *Function: +\# Prints anything. A macro that helps keep my code nicely indented. +\# +.MAC PRINT END +\\$* +.END +\# +\# +\# CAPS +\# ---- +\# *Arguments: +\# | +\# *Function: +\# Converts text to caps, or, if OFF, reverts to normal caps/lc. +\# +.MAC CAPS END +. ie '\\$1'' \{\ +. tr aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ +. tr àÀâÂáÁäÄåÅèÈêÊéÉëËìÌîÎíÍïÏòÒôÔóÓöÖùÙûÛúÚüÜ +. tr çÇñÑ +. nr #CAPS_ON 1 +. \} +. el \{\ +. tr aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz +. tr ààââááääååèèêêééëëììîîííïïòòôôóóööùùûûúúüü +. tr ççññ +. rr #CAPS_ON +. \} +.END +\# +\# SIZESPECS +\# --------- +\# Argument: +\# +\# 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 +. di TYPESIZE +E\\R'#CAP_HEIGHT \\n[.cht]' +e\\R'#X_HEIGHT \\n[.cht]' +y\\R'#DESCENDER \\n[.cdp]' +. br +. di +.END +\# +\# ===================================================================== +\# +\# +++TYPESETTING ALIASES+++ +\# +.ALIAS CENTRE CENTER +.ALIAS COMMENT SILENT +.ALIAS CONDENSE CONDENSE_OR_EXTEND +.ALIAS EXTEND CONDENSE_OR_EXTEND +.ALIAS FAM FAMILY +.ALIAS HYPHENATE HY +.ALIAS HYPHENATION HY +.ALIAS HYSET HY_SET +.ALIAS LIG LIGATURES +.ALIAS PADMARKER PAD_MARKER +.ALIAS TABSET TAB_SET +.ALIAS TB TAB +.ALIAS TS TAB_SET +.ALIAS UNDERSCORE_2 UNDERSCORE2 +\# +\# +\# ==================================================================== +\# +\# DOCUMENT PROCESSING MACROS, STRINGS AND ALIASES +\# =============================================== +\# +\# +++PAGE DIMENSIONS+++ +\# +\# PAPER SIZE +\# ---------- +\# *Arguments: +\# LETTER | LEGAL | STATEMENT | TABLOID | LEDGER | FOLIO | QUARTO | 10x14 | EXECUTIVE | A3 | A4 | A5 | B4 | B5 +\# *Function: +\# Sets up margins for different paper sizes. +\# +.MAC PAPER END +. 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 !r#L_MARGIN \{ .L_MARGIN \\n(.o \} +. if !r#R_MARGIN \{ .R_MARGIN 1i \} +.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 !d$PAPER \{ .PAPER LETTER \} +. if '\\$1'TYPEWRITE' \{\ +. nr #PRINT_STYLE 1 +. if !\\n[#DOC_TYPE]=4 \{ .L_MARGIN 6P \} +. if !\\n[#DOC_TYPE]=4 \{ .R_MARGIN 6P \} +. fam C +. ft R +. ps 12 +. ie '\\$2'SINGLESPACE' \{\ +. nr #SINGLE_SPACE 1 +. vs 12 +. \} +. el \{ .vs 24 \} +. QUAD L +. HY OFF +. SMARTQUOTES OFF +. if !\\n[#PP_INDENT] \{\ +. in 3P \"Set indent +. nr #PP_INDENT \\n(.i \"Read into #PP_INDENT +. in 0 \"Remove indent +. \} +. HDRFTR_RIGHT_CAPS +. nr #BOLDER_UNITS 0 +. nr #CONDENSE 0 +. nr #EXTEND 0 +. rm IT +. rm BD +. rm BDI +. rm PREV +. UNDERLINE_SLANT +. UNDERLINE_ITALIC +. UNDERLINE_QUOTES +. nr #IGNORE_COLUMNS 1 +. \} +. if '\\$1'TYPESET' \{\ +. nr #PRINT_STYLE 2 +. if !\\n[#DOC_TYPE]=4 \{ .L_MARGIN 6P \} +. if !\\n[#DOC_TYPE]=4 \{ .R_MARGIN 6P \} +. FAMILY T +. FT R +. if !\\n[#DOC_TYPE]=4 \{ .PS 12.5 \} +. if !\\n[#DOC_TYPE]=4 \{ .LS 16 \} +. 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 +. \} +.END +\# +\# +\# Macros to control behaviour of PRINTSTYLE TYPEWRITE +\# +\# ITALIC MEANS ITALIC +\# ------------------- +\# *Argument: +\# +\# *Function: +\# Instructs TYPEWRITE to treat italics as italics, whether +\# invoked via control lines or inline. +\# *Notes: +\# ITALIC_MEANS_ITALIC and UNDERLINE_ITALIC are mututally 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 \EfR +. ds IT \EfI +. ds PREV \EfR +. \} +.END +\# +\# +\# UNDERLINE ITALIC +\# ---------------- +\# *Argument: +\# +\# *Function: +\# Instructs TYPEWRITE to underline italics, whether invoked +\# via control lines or inline. +\# *Notes: +\# UNDERLINE_ITALIC and ITALIC_MEANS_ITALIC are mututally 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 \E*[ULX] +. \} +.END +\# +\# +\# UNDERLINE SLANT +\# --------------- +\# *Arguments: +\# | +\# *Function: +\# Instructs TYPEWRITE to underline occurences 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 mututally 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 !r#DRAFT \{ .DRAFT 1 \} +. \} +. if '\\*[$COPY_STYLE]'FINAL' \{ .nr #COPY_STYLE 2 \} +. if !d$CHAPTER_STRING \{ .CHAPTER_STRING "Chapter" \} +. if !d$DRAFT_STRING \{ .DRAFT_STRING "Draft" \} +. if !d$REVISION_STRING \{ .REVISION_STRING "Rev." \} +\# Default +. if \\n[#DOC_TYPE]=1 \{\ +. ie \\n[#COPY_STYLE]=1 \{\ +. if \\n[#USER_DEF_HDRFTR_CENTER]=0 \{\ +. ds $HDRFTR_CENTER \ + \\*[$DRAFT_STRING] \\n[#DRAFT], \ + \\*[$REVISION_STRING] \\n[#REVISION] +. PAGENUM_STYLE roman +. \} +. \} +. el \{\ +. if \\n[#USER_DEF_HDRFTR_CENTER]=0 \{ .ds $HDRFTR_CENTER \} +. PAGENUM_STYLE DIGIT +. \} +. \} +\# Chapter +. if \\n[#DOC_TYPE]=2 \{\ +. ie \\n[#COPY_STYLE]=1 \{\ +. if \\n[#USER_DEF_HDRFTR_CENTER]=0 \{\ +. ds $HDRFTR_CENTER \ + \\*[$CHAPTER_STRING] \\*[$CHAPTER], \ + \\*[$DRAFT_STRING] \\n[#DRAFT], \ + \\*[$REVISION_STRING] \\n[#REVISION] +. PAGENUM_STYLE roman +. \} +. \} +. el \{\ +. if \\n[#USER_DEF_HDRFTR_CENTER]=0 \{\ +. ds $HDRFTR_CENTER \\*[$CHAPTER_STRING] \\*[$CHAPTER] +. PAGENUM_STYLE DIGIT +. \} +. \} +. \} +\# Named +. if \\n[#DOC_TYPE]=3 \{\ +. ie \\n[#COPY_STYLE]=1 \{\ +. if \\n[#USER_DEF_HDRFTR_CENTER]=0 \{\ +. ds $HDRFTR_CENTER \ + \\*[$DOC_TYPE], \ + \\*[$DRAFT_STRING] \\n[#DRAFT], \ + \\*[$REVISION_STRING] \\n[#REVISION] +. PAGENUM_STYLE roman +. \} +. \} +. el \{\ +. if \\n[#USER_DEF_HDRFTR_CENTER]=0 \{ +. ds $HDRFTR_CENTER \\*[$DOC_TYPE] +. PAGENUM_STYLE DIGIT +. \} +. \} +. \} +.END +\# +\# ==================================================================== +\# +\# +++COLLECT DOC INFO -- STRINGS AND NUMBER REGISTERS+++ +\# +\# *Arguments: +\# various string/register arguments +\# *Function: +\# Collect information about documents. +\# +.MAC TITLE END \"Document title +. ds $TITLE \\$1 +.END +\# +\# +.MAC SUBTITLE END \"Document sub-title +. ds $SUBTITLE \\$1 +.END +\# +\# +.MAC CHAPTER END \"If document is a chapter, the chapter number +. ds $CHAPTER \\$1 +.END +\# +\# +.MAC DRAFT END \"Draft number +. nr #DRAFT \\$1 +.END +\# +\# +.MAC REVISION END \"Revision number +. nr #REVISION \\$1 +.END +\# +\# +.MAC AUTHOR END \"Author. Use "..." with this macro. +. nr #AUTHOR_NUM -1 1 +. while \\n[#NUM_ARGS]>\\n[#AUTHOR_NUM] \{\ +. ds $AUTHOR_\\n+[#AUTHOR_NUM] \\$\\n[#AUTHOR_NUM] +. \} +. nr #NUM_AUTHORS \\n[#NUM_ARGS]%2 \"Use mod 2 to test if odd or even # of authors +. ie \\n[#NUM_AUTHORS]=1 \{ .nr #AUTHOR_LINES 0 \} +. el \{ .nr #AUTHOR_LINES 1 \} +.END +\# +\# +.MAC PAGENUMBER END \"Page # that appears on page one. +. nr #n%_AT_PAGENUM_SET \\n% +. 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 +\# +\# ==================================================================== +\# +\# +++TYPE OF DOCUMENT+++ +\# +\# DOCUMENT TYPE +\# ------------- +\# *Argument: +\# DEFAULT | CHAPTER | NAMED " | LETTER +\# *Function: +\# Creates strings and sets registers for document types. +\# *Notes: +\# Number registers: DEFAULT=1, CHAPTER=2, NAMED=3, LETTER=4 +\# +.MAC DOCTYPE END +. if '\\$1'DEFAULT' \{\ +. nr #DOC_TYPE 1 +. \} +. if '\\$1'CHAPTER' \{\ +. nr #DOC_TYPE 2 +. \} +. if '\\$1'NAMED' \{\ +. 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 +. LS 13.5 +. 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 ".../\E*[$SUITE] +. FOOTER_ON_FIRST_PAGE +. em ALL_DONE +. \} +.END +\# +\# +++LETTER MACROS+++ +\# +\# DATE +\# ---- +\# *Arguments: +\# +\# *Function: +\# Stores date string in string $DATE. +\# +.MAC DATE END +. nr #DATE 1 +. di DATE +. RIGHT +.END +\# +\# +\# TO +\# -- +\# *Arguments: +\# +\# *Function: +\# Stores "to" info in diversion TO_ADDRESS. +\# +.MAC TO END +. if !'\\n(.z'' \{ .di \} +. nr #TO 1 +. di TO_ADDRESS +. LEFT +.END +\# +\# +\# FROM +\# ---- +\# *Arguments: +\# +\# *Function: +\# Stores "from" info in diversion FROM_ADDRESS. +\# +.MAC FROM END +. if !'\\n(.z'' \{ .di \} +. nr #FROM 1 +. di FROM_ADDRESS +. LEFT +.END +\# +\# +\# GREETING +\# -------- +\# *Arguments: +\# +\# *Function: +\# Stores greeting in string $GREETING. +\# +.MAC GREETING END +. if !'\\n(.z'' \{ .di \} +. nr #GREETING 1 +. di GREETING +. LEFT +.END +\# +\# +\# CLOSING +\# ------- +\# *Arguments: +\# +\# *Function: +\# Stores greeting in string $CLOSING. +\# +.MAC CLOSING END +. br +. nr #CLOSING 1 +. di CLOSING +.END +\# +\# +\# NO SUITE +\# -------- +\# *Arguments: +\# +\# *Function: +\# Redefines $SUITE to blank so that a suite number doesn't +\# appear at the bottom of letter pages. +\# +.MAC NO_SUITE END +. FOOTER_RIGHT "" +.END +\# +\# ==================================================================== +\# +\# +++DEFAULTS+++ +\# +\# DEFAULTS +\# -------- +\# *Arguments: +\# +\# *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 !d$PAPER \{ .PAPER LETTER \} +. if !\\n[#DOC_TYPE] \{ .DOCTYPE DEFAULT \} +. if !\\n[#COPY_STYLE] \{ .COPYSTYLE FINAL \} +. 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 \\n[#FOOTERS_ON] \{\ +. HEADERS OFF +. if \\n[#PAGE_NUM_POS_SET]=0 \{ .PAGENUM_POS TOP CENTER \} +. \} +. if !r#HEADER_MARGIN \{ .HEADER_MARGIN 4P+6p \} +. if !r#HEADER_GAP \{ .HEADER_GAP 3P \} +. if \\n[#FOOTERS_ON] \{\ +. if \\n[#PAGINATE]=0 \{\ +. if !r#T_MARGIN \{ .T_MARGIN 6P \} +. \} +. \} +. if \\n[#HEADERS_ON]=0 \{\ +. if \\n[#FOOTERS_ON]=0 \{\ +. if !r#T_MARGIN \{ .T_MARGIN 6P \} +. \} +. \} +. if !r#T_MARGIN \{ .T_MARGIN \\n[#HEADER_MARGIN]+\\n[#HEADER_GAP] \} +. if !r#DOCHEADER_ADVANCE \{ .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 !r#HDRFTR_RULE_GAP \{\ +. if \\n[#HEADERS_ON] \{ .HDRFTR_RULE_GAP 4p \} +. if \\n[#FOOTERS_ON] \{ .HDRFTR_RULE_GAP 4p \} +. \} +. if !r#HDRFTR_RULE \{ .HDRFTR_RULE \} +. if !r#PAGE_NUM_SET \{ .PAGENUMBER 1 \} +. ie r#ADJ_DOC_LEAD \{ . \} +. el \{ .DOC_LEAD_ADJUST \} +\# 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]) +. ds $DOC_FAM \\*[$FAMILY] +. nr #DOC_PT_SIZE \\n[#PT_SIZE] +. nr #DOC_LEAD \\n[#LEAD] +. ds $DOC_QUAD \\*[$QUAD_VALUE] +. ds $PP_FT \\*[$FONT] +\# Counters +. nr #PP 0 +. nr #FN_NUMBER 0 1 +. nr #FN_COUNT_FOR_COLS 0 1 +. RESET_HEAD_NUMBER +. RESET_SUBHEAD_NUMBER +. RESET_PARAHEAD_NUMBER +\# General style defaults for both PRINTSTYLEs +. nr #PP_STYLE 1 +. PARA_INDENT \\n[#PP_INDENT]u +. if !d$HDRFTR_FAM \{ .HDRFTR_FAMILY \\*[$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 \{ .PAGENUM_HYPHENS \} +. if !d$HEAD_QUAD \{ .HEAD_QUAD CENTER \} +. if !r#HEAD_CAPS \{ .HEAD_CAPS \} +. if !r#HEAD_UNDERLINE \{ .HEAD_UNDERLINE \} +. if !d$SH_QUAD \{ .SUBHEAD_QUAD LEFT \} +. if !r#HDRFTR_RIGHT_CAPS \{ .HDRFTR_RIGHT_CAPS \} +. if \\n[#HDRFTR_RIGHT_CAPS]=0 \{\ +. if !d$HDRFTR_RIGHT_SIZE_CHANGE \{ .HDRFTR_RIGHT_SIZE +0 \} +. \} +. 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 !r#FN_MARKER_STYLE \{ .FOOTNOTE_MARKER_STYLE STAR \} +\# String defaults for both PRINTSTYLEs +. if !d$ATTRIBUTE_STRING \{ .ATTRIBUTE_STRING "by" \} +. if \\n[#USER_DEF_HDRFTR_LEFT]=0 \{ .ds $HDRFTR_LEFT \\*[$AUTHOR_1] \} +. rr #USER_DEF_HDRFTR_LEFT +. if \\n[#USER_DEF_HDRFTR_RIGHT]=0 \{ .ds $HDRFTR_RIGHT \\*[$TITLE] \} +. rr #USER_DEF_HDRFTR_RIGHT +. if !d$FINIS_STRING \{ .FINIS_STRING "END" \} +\# Defaults for printstyle TYPEWRITE +. if \\n[#PRINT_STYLE]=1 \{\ +. if \\n[#UNDERLINE_QUOTES]=1 \{ .UNDERLINE_QUOTES \} +. if \\n[#UNDERLINE_QUOTES]=0 \{ .UNDERLINE_QUOTES OFF \} +. if !r#Q_OFFSET_VALUE \{ .QUOTE_INDENT 2 \} +. if !r#EPI_OFFSET_VALUE \{ .EPIGRAPH_INDENT 2 \} +. if !d$LINEBREAK_CHAR \{ .LINEBREAK_CHAR * 3 2p \} +. if !d$FN_SIZE_CHANGE \{ .FOOTNOTE_SIZE +0 \} +. if !r#FN_RULE_LENGTH \{ .FOOTNOTE_RULE_LENGTH 2i \} +. if !r#FN_RULE_ADJ \{ .FOOTNOTE_RULE_ADJ 6p \} +. if !r#SLANT_MEANS_SLANT \{\ +. ie \\n[#UNDERLINE_SLANT]=1 \{ .UNDERLINE_SLANT \} +. el \{ .UNDERLINE_SLANT OFF \} +. \} +. if !r#PH_INDENT \{ .PARAHEAD_INDENT \\n[#PP_INDENT]u/2u \} +. \} +\# Defaults for printstyle TYPESET +. if \\n[#PRINT_STYLE]=2 \{\ +. if !#DOCHEADER_LEAD \{ .DOCHEADER_LEAD +0 \} +. if !d$TITLE_FAM \{ .TITLE_FAMILY \\*[$DOC_FAM] \} +. if !d$TITLE_FT \{ .TITLE_FONT B \} +. if !d$TITLE_SIZE_CHANGE \{\ +. ie \\n[#DOC_TYPE]=2 \{ .TITLE_SIZE +4 \} +. el \{ .TITLE_SIZE +3.5 \} +. \} +. if !d$SUBTITLE_FAM \{ .SUBTITLE_FAMILY \\*[$DOC_FAM] \} +. if !d$SUBTITLE_FT \{ .SUBTITLE_FONT R \} +. if !d$SUBTITLE_SIZE_CHANGE \{ .SUBTITLE_SIZE +0 \} +. if !d$AUTHOR_FAM \{ .AUTHOR_FAMILY \\*[$DOC_FAM] \} +. if !d$AUTHOR_FT \{ .AUTHOR_FONT I \} +. if !d$AUTHOR_SIZE_CHANGE \{ .AUTHOR_SIZE +0 \} +. if !d$DOCTYPE_FAM \{ .DOCTYPE_FAMILY \\*[$DOC_FAM] \} +. if !d$DOCTYPE_FT \{ .DOCTYPE_FONT BI \} +. if !d$DOCTYPE_SIZE_CHANGE \{ .DOCTYPE_SIZE +3 \} +. 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 \} +. if \\n[#HDRFTR_RIGHT_CAPS] \{\ +. if !d$HDRFTR_RIGHT_SIZE_CHANGE \{ .HDRFTR_RIGHT_SIZE -2 \} +. \} +. if !d$HDRFTR_RIGHT_SIZE_CHANGE \{ .HDRFTR_RIGHT_SIZE -.5 \} +. if !r#FN_RULE_LENGTH \{ .FOOTNOTE_RULE_LENGTH 4P \} +. if !r#FN_RULE_ADJ \{ .FOOTNOTE_RULE_ADJ 3p \} +. if !d$HEAD_FAM \{ .HEAD_FAMILY \\*[$DOC_FAM] \} +. if !d$HEAD_FT \{ .HEAD_FONT B \} +. if !d$HEAD_SIZE_CHANGE \{ .HEAD_SIZE +1 \} +. if !r#HEAD_SPACE \{ .HEAD_SPACE \} +. if !d$SH_FAM \{ .SUBHEAD_FAMILY \\*[$DOC_FAM] \} +. if !d$SH_FT \{ .SUBHEAD_FONT B \} +. if !d$SH_SIZE_CHANGE \{ .SUBHEAD_SIZE +.5 \} +. if !d$PH_FAM \{ .PARAHEAD_FAMILY \\*[$DOC_FAM] \} +. if !d$PH_FT \{ .PARAHEAD_FONT BI \} +. if !d$PH_SIZE_CHANGE \{ .PARAHEAD_SIZE -.25 \} +. if !r#PH_INDENT \{ .PARAHEAD_INDENT \\n[#PP_INDENT]u/2u \} +. 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 \{ .QUOTE_INDENT 3 \} +. 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 !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 \{ .EPIGRAPH_INDENT 3 \} +. if !d$LINEBREAK_CHAR \{ .LINEBREAK_CHAR * 3 3p \} +. if !d$FN_SIZE_CHANGE \{ .FOOTNOTE_SIZE -2 \} +. if !r#FN_AUTOLEAD \{ .FOOTNOTE_AUTOLEAD 2 \} +. \} +. TRAPS +. if \\n[#PRINT_STYLE]=1 \{ .nr #IGNORE 1 \} +.END +\# +\# ==================================================================== +\# +\# +++START THE DOCUMENT+++ +\# +\# THE START MACRO +\# --------------- +\# *Arguments: +\# +\# *Function: +\# Reads in default document style parameters and any parameter +\# 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 +. if !\\n[#PRINT_STYLE] \{\ +. PRINTSTYLE TYPEWRITE +. PRINT \& +. po 6P +. ll 39P +. ta \\n(.lu +. sp |1i-1v +. CENTER +. PRINT "You neglected to enter a PRINTSTYLE" +. fl +. ab PRINTSTYLE missing +. \} +. nr #DOCS 1 +. DEFAULTS +. if \\n[#COLLATE] \{\ +. COPYSTYLE \\*[$COPY_STYLE] +. nr #HEADERS_ON \\n[#HEADER_STATE] +. if \\n[#PAGE_NUM_V_POS]=1 \{ .nr #PAGINATE \\n[#PAGINATION_STATE] \} +. sp |\\n[#HEADER_MARGIN]u +. PRINT \& +. \} +\# +. if \\n[#PRINT_PAGENUM_ON_PAGE_1] \{\ +. sp |\\n[#HEADER_MARGIN]u +. PRINT_PAGE_NUMBER +. \} +. rr #COLLATE +. rr #PAGINATION_STATE +\# +. ie \\n[#DOC_HEADER]=0 \{\ +. PRINT \& +. if \\n[#DOC_TYPE]=4 \{\ +. if !'\\n(.z'' \{ .di \} +. \} +. ie r#ADVANCE_FROM_TOP \{ .sp |\\n[#ADVANCE_FROM_TOP]u-1v \} +. el \{ .sp |\\n[#T_MARGIN]u-1v \} +. PP +. nr #PP 0 +. rr #DOC_HEADER +. if r#ADVANCE_FROM_TOP \{ .rr #ADVANCE_FROM_TOP \} +. \} +. el \{\ +. nr #DOCHEADER_LINES 0 1 +. if \\n[#PRINT_STYLE]=2 \{ .LS \\n[#DOC_LEAD]u+\\n[#DOCHEADER_LEAD_ADJ]u \} +. nr #DOCHEADER_LEAD \\n[#LEAD] +\# Default +. if \\n[#DOC_TYPE]=1 \{\ +. PRINT \& +. sp |\\n[#DOCHEADER_ADVANCE]u-1v +. ev TITLE +. CENTER +. L_MARGIN \\n[#DOC_L_MARGIN]u +. LL \\n[#DOC_L_LENGTH]u +. ta \\n(.lu +. if \\n[#PRINT_STYLE]=1 \{\ +. fam C +. ft R +. ps 12 +. ie \\n[#SINGLE_SPACE] \{ .vs \\n[#DOC_LEAD]u*2u \} +. el \{ .vs \\n[#DOC_LEAD]u \} +. CAPS +. if !'\\*[$TITLE]'' \{ .UNDERSCORE "\\*[$TITLE]\} +. CAPS OFF +. \} +. if \\n[#PRINT_STYLE]=2 \{\ +. FAMILY \\*[$TITLE_FAM] +. FT \\*[$TITLE_FT] +. PS \\n[#DOC_PT_SIZE]u\\*[$TITLE_SIZE_CHANGE] +. LS \\n[#DOCHEADER_LEAD]u +. PRINT \\*[$TITLE] +. \\n+[#DOCHEADER_LINES] +. CAPS OFF +. \} +. ev +. ev SUBTITLE +. CENTER +. L_MARGIN \\n[#DOC_L_MARGIN]u +. LL \\n[#DOC_L_LENGTH]u +. ta \\n(.lu +. if !'\\*[$SUBTITLE]'' \{\ +. if \\n[#PRINT_STYLE]=1 \{\ +. fam C +. ft R +. ps 12 +. ie \\n[#SINGLE_SPACE] \{ .vs \\n[#DOC_LEAD]u*2u \} +. el \{ .vs \\n[#DOC_LEAD]u \} +. \} +. if \\n[#PRINT_STYLE]=2 \{\ +. FAMILY \\*[$SUBTITLE_FAM] +. FT \\*[$SUBTITLE_FT] +. PS \\n[#DOC_PT_SIZE]u\\*[$SUBTITLE_SIZE_CHANGE] +. LS \\n[#DOCHEADER_LEAD]u +. \} +. PRINT \\*[$SUBTITLE] +. \\n+[#DOCHEADER_LINES] +. \} +. if '\\*[$SUBTITLE]'' \{\ +. if \\n[#PRINT_STYLE]=1 \{\ +. ALD \\n[#DOC_LEAD]u +. \} +. \} +. ev +. ev AUTHOR +. CENTER +. L_MARGIN \\n[#DOC_L_MARGIN]u +. LL \\n[#DOC_L_LENGTH]u +. ta \\n(.lu +. if !'\\*[$AUTHOR_1]'' \{\ +. if \\n[#PRINT_STYLE]=1 \{\ +. fam C +. ft R +. ps 12 +. ie \\n[#SINGLE_SPACE] \{ .vs \\n[#DOC_LEAD]u \} +. el \{ .vs \\n[#DOC_LEAD]u/2u \} +. if !d$SUBTITLE \{\ +. ie \\n[#SINGLE_SPACE] \{ .ALD \\n[#DOC_LEAD]u \} +. el \{ .ALD \\n[#DOC_LEAD]u*2u \} +. \} +. \} +. if \\n[#PRINT_STYLE]=2 \{\ +. FAMILY \\*[$AUTHOR_FAM] +. FT \\*[$AUTHOR_FT] +. PS \\n[#DOC_PT_SIZE]u\\*[$AUTHOR_SIZE_CHANGE] +. LS \\n[#DOCHEADER_LEAD]u +. \} +. PRINT \\*[$ATTRIBUTE_STRING] +. \\n+[#DOCHEADER_LINES] +. nr #AUTHORS \\n[#AUTHOR_NUM] +. nr #NEXT_AUTHOR 0 1 +. while \\n[#AUTHORS]>\\n[#NEXT_AUTHOR] \{\ +. PRINT \\*[$AUTHOR_\\n+[#NEXT_AUTHOR]] +. \\n+[#DOCHEADER_LINES] +. \} +. if \\n[#PRINT_STYLE]=1 \{\ +. if \\n[#AUTHOR_LINES]=1 \{ +. ie \\n[#SINGLE_SPACE] \{ .RLD \\n[#DOC_LEAD]u \} +. el \{ .RLD \\n[#DOC_LEAD]u \} +. \} +. \} +. \} +. ev +. \} +\# Chapter +. if \\n[#DOC_TYPE]=2 \{\ +. PRINT \& +. sp |\\n[#DOCHEADER_ADVANCE]u-1v +. ev TITLE +. L_MARGIN \\n[#DOC_L_MARGIN]u +. LL \\n[#DOC_L_LENGTH]u +. ta \\n(.lu +. CENTER +. if \\n[#PRINT_STYLE]=1 \{\ +. fam C +. ft R +. ps 12 +. ie \\n[#SINGLE_SPACE] \{ .vs \\n[#DOC_LEAD]u*2u \} +. el \{ .vs \\n[#DOC_LEAD]u \} +. \} +. if \\n[#PRINT_STYLE]=2 \{\ +. FAMILY \\*[$TITLE_FAM] +. FT \\*[$TITLE_FT] +. PS \\n[#DOC_PT_SIZE]u\\*[$TITLE_SIZE_CHANGE] +. LS \\n[#DOC_LEAD]u +. \} +. if \\n[#PRINT_STYLE]=1 \{\ +. CAPS +. PRINT \\*[$CHAPTER_STRING] \\*[$CHAPTER] +. CAPS OFF +. \} +. if \\n[#PRINT_STYLE]=2 \{ .PRINT \\*[$CHAPTER_STRING] \\*[$CHAPTER] \} +. ev +. \} +\# Named +. if \\n[#DOC_TYPE]=3 \{\ +. PRINT \& +. sp |\\n[#DOCHEADER_ADVANCE]u-1v +. ev TITLE +. CENTER +. L_MARGIN \\n[#DOC_L_MARGIN]u +. LL \\n[#DOC_L_LENGTH]u +. ta \\n(.lu +. if \\n[#PRINT_STYLE]=1 \{\ +. fam C +. ft R +. ps 12 +. ie \\n[#SINGLE_SPACE] \{ .vs \\n[#DOC_LEAD]u*2u \} +. el \{ .vs \\n[#DOC_LEAD]u \} +. CAPS +. if !'\\*[$TITLE]'' \{ .UNDERSCORE "\\*[$TITLE]\} +. CAPS OFF +. \} +. if \\n[#PRINT_STYLE]=2 \{\ +. FAMILY \\*[$TITLE_FAM] +. FT \\*[$TITLE_FT] +. PS \\n[#DOC_PT_SIZE]u\\*[$TITLE_SIZE_CHANGE] +. LS \\n[#DOCHEADER_LEAD]u +. PRINT \\*[$TITLE] +. \\n+[#DOCHEADER_LINES] +. CAPS OFF +. \} +. ev +. ev SUBTITLE +. CENTER +. L_MARGIN \\n[#DOC_L_MARGIN]u +. LL \\n[#DOC_L_LENGTH]u +. ta \\n(.lu +. if !'\\*[$SUBTITLE]'' \{\ +. if \\n[#PRINT_STYLE]=1 \{\ +. fam C +. ft R +. ps 12 +. ie \\n[#SINGLE_SPACE] \{ .vs \\n[#DOC_LEAD]u*2u \} +. el \{ .vs \\n[#DOC_LEAD]u \} +. \} +. if \\n[#PRINT_STYLE]=2 \{\ +. FAMILY \\*[$SUBTITLE_FAM] +. FT \\*[$SUBTITLE_FT] +. PS \\n[#DOC_PT_SIZE]u\\*[$SUBTITLE_SIZE_CHANGE] +. LS \\n[#DOCHEADER_LEAD]u +. \} +. PRINT \\*[$SUBTITLE] +. \\n+[#DOCHEADER_LINES] +. \} +. if '\\*[$SUBTITLE]'' \{\ +. if \\n[#PRINT_STYLE]=1 \{\ +. ALD \\n[#DOC_LEAD]u +. \} +. \} +. ev +. ev AUTHOR +. CENTER +. L_MARGIN \\n[#DOC_L_MARGIN]u +. LL \\n[#DOC_L_LENGTH]u +. ta \\n(.lu +. if !'\\*[$AUTHOR_1]'' \{\ +. if \\n[#PRINT_STYLE]=1 \{\ +. fam C +. ft R +. ps 12 +. ie \\n[#SINGLE_SPACE] \{ .vs \\n[#DOC_LEAD]u \} +. el \{ .vs \\n[#DOC_LEAD]u/2u \} +. if !d$SUBTITLE \{\ +. ie \\n[#SINGLE_SPACE] \{ .ALD \\n[#DOC_LEAD]u \} +. el \{ .ALD \\n[#DOC_LEAD]u*2u \} +. \} +. \} +. if \\n[#PRINT_STYLE]=2 \{\ +. FAMILY \\*[$AUTHOR_FAM] +. FT \\*[$AUTHOR_FT] +. PS \\n[#DOC_PT_SIZE]u\\*[$AUTHOR_SIZE_CHANGE] +. LS \\n[#DOCHEADER_LEAD]u +. \} +. PRINT \\*[$ATTRIBUTE_STRING] +. \\n+[#DOCHEADER_LINES] +. nr #AUTHORS \\n[#AUTHOR_NUM] +. nr #NEXT_AUTHOR 0 1 +. while \\n[#AUTHORS]>\\n[#NEXT_AUTHOR] \{\ +. PRINT \\*[$AUTHOR_\\n+[#NEXT_AUTHOR]] +. \\n+[#DOCHEADER_LINES] +. \} +. if \\n[#PRINT_STYLE]=1 \{\ +. if \\n[#AUTHOR_LINES]=1 \{ +. ie \\n[#SINGLE_SPACE] \{ .RLD \\n[#DOC_LEAD]u \} +. el \{ .RLD \\n[#DOC_LEAD]u \} +. \} +. \} +. \} +. ev +. ev DOCTYPE +. CENTER +. L_MARGIN \\n[#DOC_L_MARGIN]u +. LL \\n[#DOC_L_LENGTH]u +. ta \\n(.lu +. if \\n[#PRINT_STYLE]=1 \{\ +. fam C +. ft R +. ps 12 +. vs \\n[#DOC_LEAD]u +. if '\\*[$AUTHOR_1]'' \{\ +. ie !d$SUBTITLE \{\ +. ie \\n[#SINGLE_SPACE] \{ .RLD \\n[#DOC_LEAD]u*2u \} +. el \{ .RLD \\n[#DOC_LEAD]u \} +. \} +. el \{ +. ie \\n[#SINGLE_SPACE] \{ .RLD \\n[#DOC_LEAD]u*2u \} +. el \{ .RLD \\n[#DOC_LEAD]u \} +. \} +. \} +. ie \\n[#SINGLE_SPACE] \{ .ALD \\n[#DOC_LEAD]u*2u \} +. el \{ .ALD \\n[#DOC_LEAD]u \} +. UNDERSCORE2 "\\*[$DOC_TYPE] +. if \\n[#SINGLE_SPACE] \{ .ALD \\n[#DOC_LEAD]u \} +. \} +. if \\n[#PRINT_STYLE]=2 \{\ +. FAMILY \\*[$DOCTYPE_FAM] +. FT \\*[$DOCTYPE_FT] +. PS \\n[#DOC_PT_SIZE]u\\*[$DOCTYPE_SIZE_CHANGE] +. LS \\n[#DOCHEADER_LEAD]u +. ALD \\n[#DOCHEADER_LEAD]u +. \\n+[#DOCHEADER_LINES] +. UNDERSCORE "\\*[$DOC_TYPE] +. \\n+[#DOCHEADER_LINES] +. \} +. ev +. \} +. if !\\n[#DOC_TYPE]=4 \{\ +. if \\n[#PRINT_STYLE]=2 \{\ +. nr #DEPTH_1 \\n[#DOCHEADER_LINES]*\\n[#DOCHEADER_LEAD] +. nr #DEPTH_2 \\n[#DOCHEADER_LINES]*\\n[#DOC_LEAD] +. ie \\n[#DEPTH_1]<\\n[#DEPTH_2] \{\ +. nr #DOCHEADER_SPACE_ADJ \\n[#DEPTH_2]-\\n[#DEPTH_1] +. \} +. el \{\ +. nr #DOCHEADER_SPACE_ADJ \\n[#DEPTH_1]-\\n[#DEPTH_2] +. \} +. nr #DOCHEADER_EXTRA_SPACE \\n[#DOCHEADER_SPACE_ADJ] \\n[#DOC_LEAD] +. while \\n[#DOCHEADER_EXTRA_SPACE]>\\n[#DOC_LEAD] \{\ +. \\n-[#DOCHEADER_EXTRA_SPACE] +. \} +. if \\n[#DOCHEADER_EXTRA_SPACE]>0 \{\ +. ie \\n[#DOCHEADER_LEAD_ADJ]<0 \{\ +. ALD \\n[#DOCHEADER_EXTRA_SPACE]u +. \} +. el \{ .ALD \\n[#DOC_LEAD]u-\\n[#DOCHEADER_EXTRA_SPACE]u \} +. \} +. \} +. if \\n[#PRINT_STYLE]=1 \{ .ALD \\n[#DOC_LEAD]u \} +. if \\n[#PRINT_STYLE]=2 \{ .ALD \\n[#DOC_LEAD]u*2u \} +. if \\n[#COLUMNS] \{\ +. nr #COL_NUM 0 1 +. nr #L_LENGTH_FOR_EPI \\n[#L_LENGTH] +. po \\n[#COL_\\n+[#COL_NUM]_L_MARGIN]u +. LL \\n[#COL_L_LENGTH]u +. ta \\n(.lu +. mk dc +. \} +. \} +. \} +. rr #DOCHEADER_LEAD +. rr #DOCHEADER_LEAD_ADJ +. rr #DEPTH_1 +. rr #DEPTH_2 +. rr #DOCHEADER_ADVANCE +. rr #ADVANCE_FROM_TOP +. rr #DOCHEADER_SPACE_ADJ +. rr #DOCHEADER_LINES +. rr #DOCHEADER_EXTRA_SPACE +. rr #AUTHORS +. rr #NEXT_AUTHOR +. rr #AUTHOR_NUM +. rr #NUM_AUTHORS +. nr #START 1 +. nr #START_FOR_FOOTERS 1 +.END +\# +\# ==================================================================== +\# +\# +++MACROS TO CHANGE SOME DEFAULTS+++ +\# +\# DOCUMENT HEADER +\# --------------- +\# *Argument: +\# | [distance to advance from top of page] +\# *Function: +\# Turns printing of document header on or off. If a second argument +\# in 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 (which turns +\# document headers off), the optional 2nd argument may be given +\# (with a unit of measure). +\# +.MAC DOCHEADER END +. ie '\\$1'' \{ .nr #DOC_HEADER 1 \} +. el \{\ +. if \\$2 \{ .nr #ADVANCE_FROM_TOP (\\$2) \} +. nr #DOC_HEADER 0 +. \} +.END +\# +\# +\# DOCUMENT HEADER LEADING +\# ----------------------- +\# *Arguments: +\# <+|- amount by which to in/decrease leading of doc header> +\# *Function: +\# Stores user supplied lead in/decrease in register #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 +. nr #DOCHEADER_LEAD_ADJ (\\$1) +.END +\# +\# +\# DOCHEADER ADVANCE +\# ----------------- +\# *Arguments: +\# +\# *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 +\# +\# +\# TITLE FAMILY +\# ------------ +\# *Argument: +\# +\# *Function: +\# Creates or modifies string $TITLE_FAM. +\# *Notes: +\# Default is same as running text. +\# +.MAC TITLE_FAMILY END +. ds $TITLE_FAM \\$1 +.END +\# +\# +\# TITLE FONT +\# ---------- +\# *Argument: +\# +\# *Function: +\# Creates or modifies string $TITLE_FT. +\# *Notes: +\# Default is bold. +\# +.MAC TITLE_FONT END +. ds $TITLE_FT \\$1 +.END +\# +\# +\# TITLE SIZE +\# ---------- +\# *Argument: +\# <+|- number of points by which to in/decrease title at start +\# of the document (relative to running text)> +\# *Function: +\# Creates string $TITLE_SIZE_CHANGE. +\# *Notes: +\# Must be preceded by a +|- sign, with no space afterwards. +\# Fractional point sizes are allowed. +\# Default is +3.5 for printstyle TYPESET DEFAULT | STORY | NAMED; +\# 4 for TYPESET CHAPTER; +0 for TYPEWRITE. +\# +.MAC TITLE_SIZE END +. ds $TITLE_SIZE_CHANGE \\$1 +.END +\# +\# +\# SUBTITLE FAMILY +\# --------------- +\# *Argument: +\# +\# *Function: +\# Creates or modifies string $SUBTITLE_FAM. +\# *Notes: +\# Default is same as running text. +\# +.MAC SUBTITLE_FAMILY END +. ds $SUBTITLE_FAM \\$1 +.END +\# +\# +\# SUBTITLE FONT +\# ------------- +\# *Argument: +\# +\# *Function: +\# Creates or modifies string $SUBTITLE_FT. +\# *Notes: +\# Default is same as running text. +\# +.MAC SUBTITLE_FONT END +. ds $SUBTITLE_FT \\$1 +.END +\# +\# +\# SUBTITLE SIZE +\# ------------- +\# *Argument: +\# <+|- number of points by which to in/decrease subtitle at start +\# of the document (relative to running text)> +\# *Function: +\# Creates or modifies string $SUBTITLE_SIZE_CHANGE. +\# *Notes: +\# Must be preceded by a +|- sign with no space afterwards. +\# Fractional point sizes are allowed. +\# Default is +0. +\# +.MAC SUBTITLE_SIZE END +. ds $SUBTITLE_SIZE_CHANGE \\$1 +.END +\# +\# +\# AUTHOR FAMILY +\# ------------- +\# *Argument: +\# +\# *Function: +\# Creates or modifies string $AUTHOR_FAM. +\# *Notes: +\# Default is same as running text. +\# +.MAC AUTHOR_FAMILY END +. ds $AUTHOR_FAM \\$1 +.END +\# +\# +\# AUTHOR FONT +\# ----------- +\# *Argument: +\# +\# *Function: +\# Creates or modifies string $AUTHOR_FT. +\# *Notes: +\# Default is italic. +\# +.MAC AUTHOR_FONT END +. ds $AUTHOR_FT \\$1 +.END +\# +\# +\# AUTHOR SIZE +\# ----------- +\# *Argument: +\# <+|- number of points by which to in/decrease author at start +\# of the document> +\# *Function: +\# Creates or modifies string $AUTHOR_SIZE_CHANGE. +\# *Notes: +\# Must be preceded by a +|- sign with no space afterwards. +\# Fractional point sizes are allowed. +\# Default is same as running text. +\# +.MAC AUTHOR_SIZE END +. ds $AUTHOR_SIZE_CHANGE \\$1 +.END +\# +\# +\# DOCTYPE FAMILY +\# -------------- +\# *Argument: +\# +\# *Function: +\# Creates or modifies string $DOCTYPE_FAM. +\# *Notes: +\# Default is same as running text. +\# +.MAC DOCTYPE_FAMILY END +. ds $DOCTYPE_FAM \\$1 +.END +\# +\# +\# DOCTYPE FONT +\# ------------ +\# *Argument: +\# +\# *Function: +\# Creates or modifies string $DOCTYPE_FT. +\# *Notes: +\# Default is bold italic. +\# +.MAC DOCTYPE_FONT END +. ds $DOCTYPE_FT \\$1 +.END +\# +\# +\# DOCTYPE SIZE +\# ------------- +\# *Argument: +\# <+|- number of points by which to in/decrease the document +\# type string (relative to running text)> +\# *Function: +\# Creates or modifies string $DOCTYPE_SIZE_CHANGE. +\# *Notes: +\# Must be preceded by a +|- sign with no space afterwards. +\# Fractional point sizes are allowed. +\# Default is +3 for TYPESET; 0 for TYPEWRITE. +\# +.MAC DOCTYPE_SIZE END +. ds $DOCTYPE_SIZE_CHANGE \\$1 +.END +\# +\# +\# DOCUMENT LEFT MARGIN +\# -------------------- +\# *Argument: +\# +\# *Function: +\# Creates or modifies register #DOC_L_MARGIN. +\# *Notes: +\# Affects EVERYTHING on the page. +\# +.MAC DOC_LEFT_MARGIN END +. br +. nr #DOC_L_MARGIN (\\$1) +. L_MARGIN \\n[#DOC_L_MARGIN]u +.END +\# +\# +\# DOCUMENT RIGHT MARGIN +\# --------------------- +\# *Argument: +\# +\# *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: +\# +\# *Function: +\# Creates or modifies string $DOC_L_LENGTH. +\# *Notes: +\# Affects EVERYTHING on the page. +\# +.MAC DOC_LINE_LENGTH END +. br +. nr #DOC_L_LENGTH (\\$1) +. LL \\n[#DOC_L_LENGTH]u +. ta \\n(.lu +.END +\# +\# +\# DOCUMENT FAMILY +\# --------------- +\# *Argument: +\# +\# *Function: +\# Creates or modifies string $DOC_FAM. +\# *Notes: +\# Affects everything EXCEPT headers and footers. +\# +.MAC DOC_FAMILY END +. br +. ds $DOC_FAM \\$1 +. FAMILY \\*[$DOC_FAM] +. TITLE_FAMILY \\*[$DOC_FAM] +. SUBTITLE_FAMILY \\*[$DOC_FAM] +. AUTHOR_FAMILY \\*[$DOC_FAM] +. DOCTYPE_FAMILY \\*[$DOC_FAM] +. HEAD_FAMILY \\*[$DOC_FAM] +. SUBHEAD_FAMILY \\*[$DOC_FAM] +. QUOTE_FAMILY \\*[$DOC_FAM] +. BLOCKQUOTE_FAMILY \\*[$DOC_FAM] +. EPIGRAPH_FAMILY \\*[$DOC_FAM] +. HDRFTR_FAMILY \\*[$DOC_FAM] +. PAGENUM_FAMILY \\*[$DOC_FAM] +.END +\# +\# +\# DOCUMENT POINT SIZE +\# ------------------- +\# *Argument: +\# +\# *Function: +\# Creates or modifies register $DOC_PT_SIZE. +\# *Notes: +\# DOC_PT_SIZE is the basis for calculating all type sizes in +\# a document. +\# +.MAC DOC_PT_SIZE END +. if \\n[#IGNORE] \{ .return \} +. br +. PS \\$1 +. nr #DOC_PT_SIZE \\n[#PT_SIZE] +.END +\# +\# +\# DOCUMENT LEAD +\# ------------- +\# *Argument: +\# [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). +\# +.MAC DOC_LEAD END +. if \\n[#IGNORE] \{ .return \} +. br +. vs \\$1 +. nr #DOC_LEAD \\n[#LEAD] +. if '\\$2'ADJUST' \{ .TRAPS \} +.END +\# +\# ADJUST DOCUMENT LEAD +\# -------------------- +\# *Arguments: +\# | +\# *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 \} +. el \{ .nr #ADJ_DOC_LEAD 0 \} +.END +\# +\# +\# DOCUMENT QUAD +\# ------------- +\# *Arguments: +\# L | LEFT | R | RIGHT | C | CENTER | CENTRE | J | JUSTIFY +\# *Function: +\# Creates or modifies string $DOC_QUAD. +\# *Notes: +\# While QUAD (from the typesetting macros) can be used before START +\# to change the default document quad, DOC_QUAD *must* be used after +\# the START macro has been invoked. +\# +\# Default is LEFT for printstyle TYPEWRITE, JUSTIFY for printstyle +\# TYPESET. +\# +.MAC DOC_QUAD END +. ds $DOC_QUAD \\$1 +. QUAD \\*[$DOC_QUAD] +.END +\# +\# ==================================================================== +\# +\# +++INTERNATIONALIZATION+++ +\# +\# ATTRIBUTE STRING +\# ---------------- +\# *Argument: +\# +\# *Function: +\# Creates or modifies string $ATTRIBUTE_STRING. +\# *Notes: +\# Default is "by". A blank string ("") may be used if no +\# attribution is desired. +\# +.MAC ATTRIBUTE_STRING END +. ds $ATTRIBUTE_STRING \\$1 +.END +\# +\# +\# CHAPTER STRING +\# -------------- +\# *Argument: +\# +\# *Function: +\# Creates or modifies string $CHAPTER_STRING. +\# *Notes: +\# Default is "chapter". +\# +.MAC CHAPTER_STRING END +. ds $CHAPTER_STRING \\$1 +.END +\# +\# +\# DRAFT STRING +\# ------------ +\# *Argument: +\# +\# *Function: +\# Creates or modifies string $DRAFT_STRING. +\# *Notes: +\# Default is "draft". +\# +.MAC DRAFT_STRING END +. ds $DRAFT_STRING \\$1 +.END +\# +\# +\# REVISION STRING +\# --------------- +\# *Argument: +\# +\# *Function: +\# Creates or modifies string $REVISION_STRING. +\# *Notes: +\# Default is "revision". +\# +.MAC REVISION_STRING END +. ds $REVISION_STRING \\$1 +.END +\# +\# +\# FINIS STRING +\# ------------ +\# *Argument: +\# +\# *Function: +\# Creates or modifies string $FINIS_STRING. +\# *Notes: +\# Default is "END". +\# +.MAC FINIS_STRING END +. nr #FINIS 1 +. CAPS +. ds $FINIS_STRING \\$1 +. CAPS OFF +.END +\# +\# ==================================================================== +\# +\# +++RECTO/VERSO+++ +\# +\# RECTO_VERSO +\# ----------- +\# *Arguments: +\# | +\# *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 +\# +\# ==================================================================== +\# +\# +++EPIGRAPHS+++ +\# +\# EPIGRAPH FAMILY +\# --------------- +\# *Argument: +\# +\# *Function: +\# Creates or modifies string $EPI_FAM. +\# *Notes: +\# Default is same as running text. +\# +.MAC EPIGRAPH_FAMILY END +. ds $EPI_FAM \\$1 +.END +\# +\# +\# EPIGRAPH FONT +\# ------------- +\# *Argument: +\# +\# *Function: +\# Creates or modifies string $EPI_FT. +\# *Notes: +\# Default is same as running text. +\# +.MAC EPIGRAPH_FONT END +. ds $EPI_FT \\$1 +.END +\# +\# +\# EPIGRAPH SIZE +\# ------------- +\# *Argument: +\# <-|+ number of points by which to de/increase point size of epigraphs +\# (relative to running text)> +\# *Function: +\# Creates or modifies string $EPI_SIZE_CHANGE. +\# *Notes: +\# Must be preceded by a - or + sign with no space afterwards. +\# Fractional point sizes are allowed. Default -1.5 for printstyle +\# TYPESET; +0 for TYPEWRITE. +\# +.MAC EPIGRAPH_SIZE END +. ds $EPI_SIZE_CHANGE \\$1 +.END +\# +\# +\# EPIGRAPH QUAD +\# ------------- +\# *Arguments: +\# L | LEFT | J | JUSTIFY +\# *Function: +\# Creates or modifies string $EPI_QUAD. +\# *Notes: +\# Default is $DOC_QUAD when BLOCK argument is passed to EPIGRAPH. +\# +.MAC EPIGRAPH_QUAD END +. ds $EPI_QUAD \\$1 +.END +\# +\# +\# EPIGRAPH INDENT +\# --------------- +\# *Argument: +\# +\# *Function: +\# Creates or modifies register #EPI_OFFSET_VALUE. +\# *Notes: +\# Default is 2 for TYPEWRITE, 3 for TYPESET. +\# +.MAC EPIGRAPH_INDENT END +. nr #EPI_OFFSET_VALUE \\$1 +.END +\# +\# +\# EPIGRAPH AUTOLEAD +\# ----------------- +\# *Argument: +\# +\# *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 \\$1 +.END +\# +\# +\# EPIGRAPH +\# -------- +\# *Arguments: +\# BLOCK | +\# *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[#START] \{\ +. if \\n[#PRINT_STYLE]=1 \{\ +. if \\n[#AUTHOR_LINES]=1 \{ .ALD \\n[#DOC_LEAD]u \} +. \} +. \} +. ie '\\$1'' \{\ +. nr #EPIGRAPH 1 +. ev EPIGRAPH +. ll \\n[#L_LENGTH]u +. ta \\n(.lu +. CHECK_INDENT +. if \\n[#COLUMNS] \{\ +. ie \\n[#START] \{\ +. ll \\n[#DOC_L_LENGTH]u +. ta \\n(.lu +. \} +. el \{\ +. ll \\n[#COL_L_LENGTH]u +. ta \\n(.lu +. \} +. \} +. CENTER +. if \\n[#PRINT_STYLE]=1 \{\ +. fam C +. ft R +. if '\\*[$EPI_FT]'I' \{\ +. FT I +. \} +. ps 12 +. 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] +. AUTOLEAD \\n[#EPI_AUTOLEAD] +. nr #EPI_LEAD \\n[#LEAD] +. nr #EPI_LEAD_DIFF \\n[#DOC_LEAD]-\\n[#EPI_LEAD] +. \} +. di EPI_TEXT +. nr #EPI_ACTIVE 1 +. \} +. el \{\ +. ie '\\$1'BLOCK' \{\ +. nr #EPIGRAPH 2 +. ev EPIGRAPH +. ie \\n[#START] \{\ +. ie \\n[#COLUMNS] \{\ +. ll \\n[#L_LENGTH_FOR_EPI]u-(\\n[#PP_INDENT]u*(\\n[#EPI_OFFSET_VALUE]u*2u)) +. ta \\n(.lu +. \} +. el \{\ +. ll \\n[#L_LENGTH]u-(\\n[#PP_INDENT]u*(\\n[#EPI_OFFSET_VALUE]u*2u)) +. ta \\n(.lu +. \} +. \} +. el \{\ +. ll \\n[#L_LENGTH]u-(\\n[#PP_INDENT]u*(\\n[#EPI_OFFSET_VALUE]u*2u)) +. ta \\n(.lu +. if \\n[#COLUMNS] \{\ +. ll \\n[#COL_L_LENGTH]u-(\\n[#PP_INDENT]u*(\\n[#EPI_OFFSET_VALUE]u*2u)) +. ta \\n(.lu +. \} +. CHECK_INDENT +. \} +. if \\n[#PRINT_STYLE]=1 \{\ +. fam C +. ft R +. if '\\*[$EPI_FT]'I' \{\ +. FT I +. \} +. ps 12 +. 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] +. AUTOLEAD \\n[#EPI_AUTOLEAD] +. QUAD \\*[$EPI_QUAD] +. HY +. 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: +\# +\# *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 +. REMOVE_INDENT +. ev +. nr #EPI_DEPTH \\n[#DIVER_DEPTH]-\\n[#EPI_LEAD] +. nr #EPI_LINES \\n[#EPI_DEPTH]/\\n[#EPI_LEAD] +. ie \\n[#START] \{\ +. 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] \} +. RLD \\n[#DOC_LEAD]u +. ie \\n[#PRINT_STYLE]=1 \{\ +. if \\n[#EPI_WHITESPACE]=\\n[#DOC_LEAD] \{ .ALD \\n[#EPI_WHITESPACE]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 +. \} +. \} +. \} +. 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 \{\ +. if \\n[#EPI_WHITESPACE]=\\n[#DOC_LEAD] \{ .ALD \\n[#EPI_WHITESPACE]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 +. \} +. \} +. \} +. 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 \} +. \} +. \} +. if \\n[#EPIGRAPH]=1 \{\ +. po \\n[#L_MARGIN]u +. if \\n[#COLUMNS] \{ .po \\n[#COL_\\n[#COL_NUM]_L_MARGIN]u \} +. \} +. if \\n[#EPIGRAPH]=2 \{\ +. nr #EPI_OFFSET \\n[#L_MARGIN]+(\\n[#PP_INDENT]*\\n[#EPI_OFFSET_VALUE]) +. if \\n[#COLUMNS] \{\ +. nr #EPI_OFFSET \\n[#COL_\\n[#COL_NUM]_L_MARGIN]+(\\n[#PP_INDENT]*\\n[#EPI_OFFSET_VALUE]) +. \} +. po \\n[#EPI_OFFSET]u +. \} +. nf +. EPI_TEXT +. br +. ie \\n[#START] \{\ +. 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 +. \} +. \} +. 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 \{\ +. if \\n[#EPI_WHITESPACE]=\\n[#DOC_LEAD] \{ .ALD \\n[#EPI_WHITESPACE]u \} +. \} +. 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 +. \} +. \} +. \} +. \} +. 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 \} +. if \\n[#START] \{\ +. if \\n[#COLUMNS] \{\ +. po \\n[#COL_\\n[#COL_NUM]_L_MARGIN]u +. mk dc +. \} +. \} +.END +\# +\# ==================================================================== +\# +\# +++FINIS MACRO+++ +\# +\# FINIS +\# ----- +\# *Arguments: +\# +\# *Function: +\# Deposits --END-- at the end of a document. +\# +.MAC FINIS END +. if \\n[#TAB_ACTIVE] \{ .TQ \} +. if \\n[#INDENT_ACTIVE] \{ .IX CLEAR \} +. FOOTERS OFF +. PAGINATION OFF +. nr #EM_ADJUST (1m/8) +. if \\n[#COLUMNS] \{ .po \\n[#COL_\\n[#COL_NUM]_L_MARGIN]u \} +. ALD \\n[#DOC_LEAD]u +. CENTER +. if \\n[#PRINT_STYLE]=1 \{ .PRINT "--\\*[$FINIS_STRING]--\} +. if \\n[#PRINT_STYLE]=2 \{\ +. PRINT "\v'-\\n[#EM_ADJUST]u'\(em\v'+\\n[#EM_ADJUST]u'\\*[$FINIS_STRING]\v'-\\n[#EM_ADJUST]u'\*[FU1]\(em +. \} +.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] +\# +\# +\# HDRFTR FAMILY +\# ------------- +\# *Argument: +\# +\# *Function: +\# Creates or modifies string $HDRFTR_FAM. +\# *Notes: +\# Default is same as running text. +\# +.MAC HDRFTR_FAMILY END +. ds $HDRFTR_FAM \\$1 +.END +\# +\# +\# HDRFTR SIZE +\# ----------- +\# *Argument: +\# <+|-number of points by which to in/decrease point size of +\# header/footers (relative to running text)> +\# *Function: +\# Creates or modifies string $HDRFTR_SIZE_CHANGE. +\# *Notes: +\# Must be preceded by a +|- sign. No space afterwards. +\# Fractional point sizes are allowed. Default is +0. +\# +\# By default, header/footers print the author .5 points smaller +\# than the base point size of running text, center titles +\# (Chapter, Draft, Revision, etc.) .5 points smaller +\# than running text (in italics), and the document title 2 full +\# points smaller than running text (in caps). The HDRFTR_SIZE +\# macro changes the overall size for all three parts while +\# maintaining the internal size changes. +\# +\# In other words, if the user likes the header/footers but wants +\# them a bit bigger or a bit smaller, s/he should use HDRFTR_SIZE. +\# +.MAC HDRFTR_SIZE END +. ds $HDRFTR_SIZE_CHANGE \\$1 +.END +\# +\# +\# HDRFTR RULE GAP +\# --------------- +\# *Argument: +\# +\# *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) +.END +\# +\# +\# HDRFTR LEFT +\# ----------- +\# *Argument: +\# +\# *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 elipsis 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 LEFT FAMILY +\# ------------------ +\# *Argument: +\# +\# *Function: +\# Creates or modifies string $HDRFTR_LEFT_FAM. +\# +.MAC HDRFTR_LEFT_FAMILY END +. ds $HDRFTR_LEFT_FAM \\$1 +.END +\# +\# +\# HDRFTR LEFT FONT +\# ---------------- +\# *Argument: +\# +\# *Function: +\# Creates or modifies string $HDRFTR_LEFT_FT. +\# +.MAC HDRFTR_LEFT_FONT END +. ds $HDRFTR_LEFT_FT \\$1 +.END +\# +\# +\# HDRFTR LEFT SIZE +\# ---------------- +\# *Argument: +\# <+|- number of points to in/decrease size of left string in +\# header/footers (relative to running text)> +\# *Function: +\# Creates or modifies string HDRFTR_LEFT_SIZE_CHANGE. +\# *Notes: +\# Must be preceded by a +|- sign. No space afterwards. +\# Fractional point sizes are allowed. +\# Default is -.5 for printstyle TYPESET; if all caps, -2 +\# Has no effect in TYPEWRITE. +\# +.MAC HDRFTR_LEFT_SIZE END +. ds $HDRFTR_LEFT_SIZE_CHANGE \\$1 +.END +\# +\# +\# HDRFTR LEFT CAPS +\# ---------------- +\# *Argument: +\# | +\# *Function: +\# Turns capitalisation of $HDRFTR_LEFT (typically, the author of +\# the document) on or off. +\# *Notes: +\# Default is on. +\# +.MAC HDRFTR_LEFT_CAPS END +. ie '\\$1'' \{\ +. nr #HDRFTR_LEFT_CAPS 1 +. \} +. el \{\ +. nr #HDRFTR_LEFT_CAPS 0 +. ds $HDRFTR_RIGHT_SIZE_CHANGE +0 +. \} +.END +\# +\# +\# HDRFTR CENTER +\# ------------- +\# *Argument: +\# +\# *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 elipsis before the page number in the string, s/he should use +\# ...\*[PAGE#], not ...# +\# +.MAC HDRFTR_CENTER END +. nr #USER_DEF_HDRFTR_CENTER 1 +. ds $HDRFTR_CENTER \\$1 +.END +\# +\# +\# HDRFTR CENTER FAMILY +\# -------------------- +\# *Argument: +\# +\# *Function: +\# Creates or modifies string $HDRFTR_CENTER_FAM. +\# +.MAC HDRFTR_CENTER_FAMILY END +. ds $HDRFTR_CENTER_FAM \\$1 +.END +\# +\# +\# HDRFTR CENTER FONT +\# ------------------ +\# *Argument: +\# +\# *Function: +\# Creates or modifies string $HDRFTR_CENTER_FT. +\# +.MAC HDRFTR_CENTER_FONT END +. ds $HDRFTR_CENTER_FT \\$1 +.END +\# +\# +\# HDRFTR CENTER SIZE +\# ------------------ +\# *Argument: +\# <+|- number of points to in/decrease size of centre string in +\# header/footers (relative to header/footer size)> +\# *Function: +\# Creates string HDRFTR_CENTER_SIZE_CHANGE. +\# *Notes: +\# Must be preceded by a +|- sign. No space afterwards. +\# Fractional point sizes are allowed. +\# Default is -.5 for printstyle TYPESET; if all caps, -2 +\# Has no effect in TYPEWRITE. +\# +.MAC HDRFTR_CENTER_SIZE END +. ds $HDRFTR_CENTER_SIZE_CHANGE \\$1 +.END +\# +\# +\# HDRFTR CENTER CAPS +\# ------------------ +\# *Argument: +\# | +\# *Function: +\# Turns capitalisation of $HDRFTR_CENTER (typically, doctype of +\# the document) on or off. +\# *Notes: +\# Default is on. +\# +.MAC HDRFTR_CENTER_CAPS END +. ie '\\$1'' \{\ +. nr #HDRFTR_CENTER_CAPS 1 +. \} +. el \{\ +. nr #HDRFTR_CENTER_CAPS 0 +. ds $HDRFTR_CENTER_SIZE_CHANGE +0 +. \} +.END +\# +\# +\# HDRFTR RIGHT +\# ------------ +\# *Argument: +\# +\# *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 elipsis 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 FAMILY +\# ------------------- +\# *Argument: +\# +\# *Function: +\# Creates or modifies string $HDRFTR_RIGHT_FAM. +\# +.MAC HDRFTR_RIGHT_FAMILY END +. ds $HDRFTR_RIGHT_FAM \\$1 +.END +\# +\# +\# HDRFTR RIGHT FONT +\# ----------------- +\# *Argument: +\# +\# *Function: +\# Creates or modifies string $HDRFTR_RIGHT_FT. +\# +.MAC HDRFTR_RIGHT_FONT END +. ds $HDRFTR_RIGHT_FT \\$1 +.END +\# +\# +\# HDRFTR RIGHT SIZE +\# ----------------- +\# *Argument: +\# <+|- number of points to in/decrease size of right string in +\# header/footers (relative to header/footer size)> +\# *Function: +\# Creates or modifies string HDRFTR_RIGHT_SIZE_CHANGE. +\# *Notes: +\# Must be preceded by a +|- sign. No space afterwards. +\# Fractional point sizes are allowed. +\# Default is -2 for printstyle TYPESET if all caps; otherwise -.5 +\# Has no effect in TYPEWRITE. +\# +.MAC HDRFTR_RIGHT_SIZE END +. ds $HDRFTR_RIGHT_SIZE_CHANGE \\$1 +.END +\# +\# +\# HDRFTR RIGHT CAPS +\# ----------------- +\# *Argument: +\# | +\# *Function: +\# Turns capitalisation of $HDRFTR_RIGHT (typically, the title of +\# the document) on or off. +\# *Notes: +\# Default is on. +\# +.MAC HDRFTR_RIGHT_CAPS END +. ie '\\$1'' \{\ +. nr #HDRFTR_RIGHT_CAPS 1 +. \} +. el \{\ +. nr #HDRFTR_RIGHT_CAPS 0 +. ds $HDRFTR_RIGHT_SIZE_CHANGE +0 +. \} +.END +\# +\# HDRFTR RULE +\# ----------- +\# *Arguments: +\# | +\# *Function: +\# If invoked via the alias HDRFTR_RULE_INTERNAL in HDRFTR, prints a rule +\# under the header/footer. Otherwise, turns HDRFTR_RULE on or off. +\# +.MAC HDRFTR_RULE END \"To print rule under header/over footer. +. ie '\\$0'HDRFTR_RULE_INTERNAL' \{\ +. 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] \} +. \} +. PS 12 +. if \\n[#HEADERS_ON] \{ .ALD \\n[#HDRFTR_RULE_GAP]u \} +. if \\n[#FOOTERS_ON] \{\ +. RLD \\n[#LEAD]u*3u+\\n[#HDRFTR_RULE_GAP]u+\\n[#CAP_HEIGHT_ADJUST]u +. \} +. PRINT \\l'\\n[#DOC_L_LENGTH]u' +. br +. \} +. el \{\ +. ie '\\$1'' \{ .nr #HDRFTR_RULE 1 \} +. el \{ .nr #HDRFTR_RULE 0 \} +. \} +.END +\# +\# +.ALIAS HDRFTR_RULE_INTERNAL HDRFTR_RULE +\# +\# +\# HDRFTR PLAIN +\# ------------ +\# *Arguments: +\# +\# *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 +. HDRFTR_FAMILY \\*[$DOC_FAM] +. HDRFTR_PT_SIZE \\n[#DOC_PT_SIZE] +. HDRFTR_LEFT_FAMILY \\*[$DOC_FAM] +. HDRFTR_LEFT_FONT R +. HDRFTR_LEFT_SIZE +0 +. HDRFTR_LEFT_CAPS OFF +. HDRFTR_CENTER_FAMILY \\*[$DOC_FAM] +. HDRFTR_CENTER_FONT R +. HDRFTR_CENTER_SIZE +0 +. HDRFTR_CENTER_CAPS OFF +. HDRFTR_RIGHT_FAMILY \\*[$DOC_FAM] +. HDRFTR_RIGHT_FONT R +. HDRFTR_RIGHT_SIZE +0 +. HDRFTR_RIGHT_CAPS OFF +.END +\# +\# +\# SWITCH HDRFTR +\# ------------- +\# *Arguments: +\# | +\# *Function: +\# Creates or modifies register #SWITCH_HDRFTR, used to switch +\# default location of HDRFTR_LEFT and HDRFTR_RIGHT. +\# *Notes: +\# 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 conjuction 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. +\# +\# Default is OFF. +\# +.MAC SWITCH_HDRFTR END +. ie '\\$1'' \{ .nr #SWITCH_HDRFTR 1 \} +. el \{ .nr #SWITCH_HDRFTR 0 \} +.END +\# +\# +\# PRINT FOOTER ON FIRST PAGE +\# -------------------------- +\# *Arguments: +\# | +\# *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: +\# | +\# *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: +\# +\# *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[#PRINT_FOOTER_ON_PAGE_1] \{ .return \} +. \} +. \} +. if \\n[#HEADERS_ON] \{ .vs 0 \} +. 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_RIGHT_CAPS \\n[#HDRFTR_TMP_CAPS_SWITCH] +. rr #HDRFTR_TMP_CAPS_SWITCH +. rm $HDRFTR_TMP_SWITCH +. rm $HDRFTR_TMP_SIZE_CHANGE_SWITCH +. nr #SWITCH_HDRFTR 0 +. \} +. nr #PAGENUMBER \\n%+\\n[#PAGE_NUM_ADJ] +. 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 \} +. ie '\\*[$HDRFTR_CENTER]'#' \{\ +. PRINT \\v'-(\\n[#LEAD]u*1u)'\\n[#PAGENUMBER] +. \} +. el \{\ +. ie !'\\*[$HDRFTR_CENTER]'' \{ .PRINT \\v'-(\\n[#LEAD]u*1u)'\\*[$HDRFTR_CENTER] \} +. 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 \} +. ie '\\*[$HDRFTR_RIGHT]'#' \{\ +. PRINT \\v'-(\\n[#LEAD]u*2u)'\\n[#PAGENUMBER] +. \} +. el \{\ +. ie !'\\*[$HDRFTR_RIGHT]'' \{ .PRINT \v'-(\\n[#LEAD]u*2u)'\\*[$HDRFTR_RIGHT] \} +. el \{ .PRINT \& \} +. \} +. if \\n[#HDRFTR_RIGHT_CAPS] \{ .CAPS OFF \} +. \} +. if \\n[#PRINT_STYLE]=2 \{\ +. FAMILY \\*[$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_CAPS] \{ .CAPS \} +. ie '\\*[$HDRFTR_LEFT]'#' \{ .PRINT \\n[#PAGENUMBER] \} +. el \{\ +. ie !'\\*[$HDRFTR_LEFT]'' \{ . PRINT \\*[$HDRFTR_LEFT] \} +. el \{ .PRINT \& \} +. \} +. if \\n[#HDRFTR_LEFT_CAPS] \{ .CAPS OFF \} +. FAMILY \\*[$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_CAPS] \{ .CAPS \} +. ie '\\*[$HDRFTR_CENTER]'#' \{\ +. PRINT \\v'-(\\n[#LEAD]u*1u)'\\n[#PAGENUMBER] +. \} +. el \{\ +. ie !'\\*[$HDRFTR_CENTER]'' \{ .PRINT \\v'-(\\n[#LEAD]u*1u)'\\*[$HDRFTR_CENTER] \} +. el \{ .PRINT \& \} +. \} +. if \\n[#HDRFTR_CENTER_CAPS] \{ .CAPS OFF \} +. FAMILY \\*[$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_CAPS] \{ .CAPS \} +. ie '\\*[$HDRFTR_RIGHT]'#' \{\ +. PRINT \\v'-(\\n[#LEAD]u*2u)'\\n[#PAGENUMBER] +. \} +. el \{\ +. ie !'\\*[$HDRFTR_RIGHT]'' \{ .PRINT \v'-(\\n[#LEAD]u*2u)'\\*[$HDRFTR_RIGHT] \} +. el \{ .PRINT \& \} +. \} +. if \\n[#HDRFTR_RIGHT_CAPS] \{ .CAPS OFF \} +. \} +. if \\n[#HDRFTR_RULE] \{\ +. HDRFTR_RULE_INTERNAL +. \} +.END +\# +\# +\# +++HEADERS+++ +\# +\# HEADERS (off or on) +\# ------------------- +\# *Arguments: +\# | +\# *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: +\# +\# *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: +\# +\# *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: +\# +\# *Function: +\# Prints header appropriate to DOC_TYPE, PRINTSTYLE, and COPYSTYLE. +\# *Notes: +\# In order to convert the title string to caps in the header (in the +\# event that the user enters .TITLE in caps/lc), I've used +\# quad left, quad centre, and quad right to arrange the three bits +\# of the header, rather than .tl. This allows the use of the CAPS macro. +\# The downside is that I have to add \\v'-(\\n[#LEAD]u*#) in order +\# for -Tlatin1 output to align the header/footer strings on the baseline. +\# The console output still isn't brilliant, but at least it's +\# comprehensible. +\# +.MAC HEADER END +. PROCESS_FN_LEFTOVER +. nr #FN_COUNT_FOR_COLS 0 1 +. if \\n[#RESET_FN_NUMBER] \{ .nr #FN_NUMBER 0 1 \} +. po \\n[#DOC_L_MARGIN]u +. if \\n[#RECTO_VERSO] \{\ +. nr #DOC_LR_MARGIN_TMP \\n[#DOC_L_MARGIN] +. DOC_LEFT_MARGIN \\n[#DOC_R_MARGIN]u +. DOC_RIGHT_MARGIN \\n[#DOC_LR_MARGIN_TMP]u +. \} +. ev HEADER +. if \\n[#PRINT_STYLE]=1 \{ .vs 0 \} +. if \\n[#PRINT_STYLE]=2 \{ .LS 0 \} +. sp |\\n[#HEADER_MARGIN]u-1v +. ll \\n[#DOC_L_LENGTH]u +. ta \\n(.lu +. if \\n[#PRINT_STYLE]=2 \{\ +. FAMILY \\*[$HDRFTR_FAM] +. FT R +. PS \\n[#DOC_PT_SIZE]u\\*[$HDRFTR_SIZE_CHANGE] +. \} +. if \\n[#PRINT_STYLE]=1 \{\ +. fam C +. ft R +. ps 12\\*[$HDRFTR_SIZE_CHANGE] +. \} +. nr #HDRFTR_PT_SIZE \\n[#PT_SIZE] +. if \\n[#CAPS_ON] \{\ +. nr #CAPS_WAS_ON 1 +. CAPS OFF +. \} +. if \\n[#UNDERLINE_ON] \{\ +. nr #UNDERLINE_WAS_ON 1 +. UNDERLINE OFF +. \} +. ie \\n[#HEADERS_ON] \{\ +. PRINT_HDRFTR +. sp |\\n[#T_MARGIN]u-\\n[#DOC_LEAD]u +. \} +. el \{\ +. ie \\n[#PAGE_NUM_V_POS]=1 \{\ +. ie \\n[#PAGINATE] \{\ +. PRINT_PAGE_NUMBER +. sp |\\n[#T_MARGIN]u-\\n[#DOC_LEAD]u +. \} +. el \{ .sp |\\n[#T_MARGIN]u-\\n[#DOC_LEAD]u \} +. \} +. el \{ .sp |\\n[#T_MARGIN]u-\\n[#DOC_LEAD]u \} +. \} +. nr #PAGE_TOP \\n(nl +. ev +. po \\n[#L_MARGIN]u +. if \\n[#RECTO_VERSO] \{\ +. nr #L_MARGIN +\\n[#L_MARGIN_DIFF] +. po \\n[#L_MARGIN]u +. \} +. if \\n[#CAPS_WAS_ON] \{\ +. CAPS +. rr #CAPS_WAS_ON +. \} +. if \\n[#UNDERLINE_WAS_ON] \{\ +. UNDERLINE +. rr #UNDERLINE_WAS_ON +. \} +. if \\n[#TAB_ACTIVE] \{ .TAB \\n[#CURRENT_TAB] \} +. if \\n[#QUOTE] \{\ +. ie \\n[#TAB_ACTIVE] \{ .TAB \\n[#CURRENT_TAB] \} +. el \{\ +. nr #Q_OFFSET \\n[#L_MARGIN]+(\\n[#PP_INDENT]*\\n[#Q_OFFSET_VALUE]) +. po \\n[#Q_OFFSET]u +. \} +. \} +. if \\n[#EPIGRAPH] \{\ +. ie \\n[#TAB_ACTIVE] \{ .TAB \\n[#CURRENT_TAB] \} +. el \{\ +. nr #EPI_OFFSET \\n[#L_MARGIN]+(\\n[#PP_INDENT]*\\n[#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 \{ .ALD \\n[#DOC_LEAD]u-\\n[#EPI_LEAD]u \} +. \} +. \} +. el \{ .ns \} +. ns +. if \\n[#COLUMNS] \{\ +. 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 +. ll \\n[#COL_L_LENGTH]u +. ta \\n(.lu +. if \\n[#QUOTE] \{\ +. po +(\\n[#PP_INDENT]u*\\n[#Q_OFFSET_VALUE]u) +. \} +. if \\n[#EPIGRAPH] \{\ +. if \\n[#EPI_ACTIVE] \{\ +. ie \\n[#EPI_FITS] \{ . \} +. el \{ .nr dc -\\n[#EPI_LEAD_DIFF] \} +. \} +. po \\n[#COL_\\n[#COL_NUM]_L_MARGIN]u+(\\n[#PP_INDENT]u*\\n[#EPI_OFFSET_VALUE]u) +. \} +. \} +. if \\n[#PRINT_STYLE]=1 \{\ +. if \\n[#SLANT_ON] \{\ +. if \\n[#UNDERLINE_SLANT] \{ .UNDERLINE \} +. \} +. \} +.END +\# +\# ==================================================================== +\# +\# +++FOOTERS+++ +\# +\# FOOTERS (off or on) +\# ------------------- +\# *Arguments: +\# | +\# *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'' \{\ +. nr #FOOTERS_ON 1 +. PAGE_NUM_POS TOP CENTER +. \} +. el \{ .nr #FOOTERS_ON 0 \} +.END +\# +\# +\# FOOTER MARGIN +\# ------------- +\# *Argument: +\#