diff options
author | wlemb <wlemb> | 2002-05-23 21:58:59 +0000 |
---|---|---|
committer | wlemb <wlemb> | 2002-05-23 21:58:59 +0000 |
commit | 039b61f11221d266f67392e4bce3f5ef27d77bf6 (patch) | |
tree | d00b20d59dbc48b758ae5135b2ba92272f208d6e | |
parent | 10467b2722ecbbf1bb382a9776cd468183282ccd (diff) | |
download | groff-039b61f11221d266f67392e4bce3f5ef27d77bf6.tar.gz |
Initial revision
31 files changed, 23337 insertions, 0 deletions
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 "<string>" to start of + running text was one linespace too deep. Fixed (in START). + +o When 1st arg to PAGENUM_POS was user set to TOP, running text was + printing 1 linespace too high, even when PAGINATION was OFF. Same + problem when HEADERS were OFF (i.e. nothing in the header margin at + all). Fixed by removing -\\n[#DOC_LEAD]u from all .sp |\\n[#T_MARGIN]u + calls of .el portion after .ie \\n[#HEADERS_ON]. + +o Added new macro: PAGENUM_ON_FIRST_PAGE. Normally, when FOOTERS are + being used instead of HEADERS, mom doesn't print the page number at + the top of the first page of a doc, or the first page of collated + docs. New macro allows user to get mom to put the page number on + "first" pages if that's desired. Updated docs to include the macro. + +o More little fixes to docs. + +*Thu Apr 18 2002 + +o Fixed TI (temporary indent) so that it continues to work as expected, + even when called while another type of indent is in effect. + +*Tue Apr 16 2002 + +o String tabs weren't working as advertised when set from within + a tab. Fixed. Two new registers added: #ST_OFFSET and #IN_TAB. + String tabs now behave 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 + | <anything>. 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 <wl@gnu.org> + +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 @@ +<html> +<head> +<meta http-equiv="content-type" content="text/html;charset=iso-8859-1"> +<title>Mom -- Appendices</title> +</head> +<body bgcolor="#dfdfdf"> + +<!====================================================================> + +<a href="typemacdoc.html#TOP">Prev</a> +<a href="toc.html">Back to Table of Contents</a> + +<a name="TOP"></a> +<a name="APPENDICES"> + <h2 align="center"><u>APPENDICES</u></h2> +</a> + +<ul> + <li><a href="#MOREDOC">Further notes on this documentation</a> + <li><a href="#CODENOTES">Some reflections on mom, with an apology</a> + <li><a href="reserved.html">List of reserved words</a> + <li><a href="#CONTACT">Contact the author</a> +</ul> + +<a name="MOREDOC"> + <h2><u>Further notes on this documentation</u></h2> +</a> + +Some <strong>mom</strong> users are sure to ask: "Why is this +documentation in html? If <strong>mom</strong>'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?" +<p> +Valid questions, to be sure, and <strong>mom</strong> has +answers. (Okay -- I have answers, but I speak for +<strong>mom</strong>.) +<p> +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. +<p> +To me, it's essential that people reading <strong>mom</strong>'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. +<p> +Another reason for html is that working with <strong>mom</strong> +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 <strong>mom</strong>, +but I still regularly call on her documentation. Elvis, with its +html capabilities, lets me write and format <strong>mom</strong> +documents AND peruse her documentation, clicking on links as +necessary, without ever leaveing the comfy confines of my +text editor. +<p> +Not everyone, of course, uses an editor with html capabilities. +For them, firing up a browser is obviously necessary for reading +<strong>mom</strong>'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. +<p> +Some <strong>mom</strong> 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 <strong>mom</strong> +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. +<br> +<hr> + +<!=====================================================================> + +<a name="CODENOTES"> + <h2><u>Some reflections on mom</u></h2> +</a> + +<p> +<strong>Mom</strong>, 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. +<p> +If, as Eric Raymond asserts, open source begins with a programmer +scratching a personal itch, then <strong>mom</strong> 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. +<p> +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. +<p> +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. +<p> +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. +<p> +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. +<p> +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. +<p> +<strong>Mom</strong>'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 <strong>mom</strong>'s macros should be +able to do so with a minimum of head scratching. +<p> +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. +<br> +<hr> + +<!=====================================================================> + +<a name="CONTACT"> + <h2><u>Contact the author</u></h2> +</a> + +<p> +If you have any questions or comments about <strong>mom</strong>, +suggestions to make, criticisms to offer, or bugs to report, use the +groff mailing list at +<a href="mailto:groff@ffii.org">groff@ffii.org</a> +(subscription information available +<a href="http://ffii.org/mailman/listinfo/groff/">here</a>) +or contact me, Peter Schaffter, directly at +<p> +<address align="center"> + <a href="mailto:df191@ncf.ca">df191@ncf.ca</a> +</address> + +<p> +<hr> +<a href="typemacdoc.html#TOP">Prev</a> +<a href="#TOP">Top</a> +<a href="toc.html">Back to Table of Contents</a> +</body> +</html> 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 @@ +<html> +<head> +<meta http-equiv="content-type" content="text/html;charset=iso-8859-1"> +<title>Mom -- Document processing, creating a cover page</title> +</head> +<body bgcolor="#dfdfdf"> + +<!====================================================================> + +<a href="letters.html#TOP">Next</a> +<a href="rectoverso.html#TOP">Prev</a> +<a href="toc.html">Back to Table of Contents</a> + +<a name="TOP"></a> +<a name="COVER"> + <h2 align="center"><u>CREATING A COVER PAGE</u></h2> +</a> + +<p> +At present, <strong>mom</strong> 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. +<p> +If you want a document to begin with a cover page, typeset the cover +(using the +<a href="typesetting.html#MACROS_TYPESETTING">typesetting macros</a>). +At the end, invoke +<a href="typesetting.html#NEWPAGE">NEWPAGE</a>, +then set up your document <em>in full</em> (see +<a href="docprocessing.html#DOCPROCESSING_TUT">Tutorial -- Setting up a mom document</a>), +invoking +<a href="docprocessing.html#START">START</a> +as usual once you're done. The cover page (and any typesetting +commands on it) will have no effect on <strong>mom</strong>'s +processing of the document itself, the first page of which, moreover, +will be numbered "1" unless you instruct her otherwise +with +<a href="headfootpage.html#PAGENUMBER">PAGENUMBER</a>. + +<p> +<hr> +<a href="letters.html#TOP">Next</a> +<a href="rectoverso.html#TOP">Prev</a> +<a href="#TOP">Top</a> +<a href="toc.html">Back to Table of Contents</a> +</body> +</html> 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 @@ +<html> +<head> +<meta http-equiv="content-type" content="text/html;charset=iso-8859-1"> +<title>Mom -- Definitions and Terms</title> +</head> +<body bgcolor="#dfdfdf"> + +<!====================================================================> + +<a href="using.html#TOP">Next</a> +<a href="intro.html#TOP">Prev</a> +<a href="toc.html">Back to Table of Contents</a> + +<a name="TOP"></a> +<a name="TERMS"> + <h1 align="center"><u>DEFINITIONS OF TERMS USED IN THIS MANUAL</u></h1> +</a> + +<a href="#TERMS_TYPESETTING">Typesetting Terms</a> +<br> +<a href="#TERMS_GROFF">Groff Terms</a> +<br> +<a href="#TERMS_MOM">Mom Document Processing Terms</a> +<p> +I use a number of typesetting-specific and groff-specific terms +throughout this documentation, as well as a few terms that apply +to <strong>mom</strong> 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. +<br> +<hr> + +<a name="TERMS_TYPESETTING"> + <h2><u>Typesetting terms</u></h2> +</a> + +<ul> + <li><a href="#TERMS_ASCENDER">Ascender</a> + <li><a href="#TERMS_BASELINE">Baseline</a> + <li><a href="#TERMS_BALLOTBOX">Ballot box</a> + <li><a href="#TERMS_BULLET">Bullet</a> + <li><a href="#TERMS_CAPHEIGHT">Cap-height</a> + <li><a href="#TERMS_DESCENDER">Descender</a> + <li><a href="#TERMS_DISCRETIONARYHYPHEN">Discretionary hyphen</a> + <li><a href="#TERMS_DROPCAP">Drop cap</a> + <li><a href="#TERMS_EM">Em/en</a> + <li><a href="#TERMS_FAMILY">Family</a> + <li><a href="#TERMS_FIGURESPACE">Figure space/Digit space</a> + <li><a href="#TERMS_FIXEDWIDTHSPACE">Fixed width space</a> + <li><a href="#TERMS_FONT">Font</a> + <li><a href="#TERMS_FORCE">Force justify</a> + <li><a href="#TERMS_JUST">Justify/justification</a> + <li><a href="#TERMS_GUTTER">Gutter</a> + <li><a href="#TERMS_KERN">Kerning</a> + <li><a href="#TERMS_KERNUNIT">Kern Units</a> + <li><a href="#TERMS_LEADING">Lead/leading</a> + <li><a href="#TERMS_LEADER">Leaders</a> + <li><a href="#TERMS_LIGATURES">Ligature</a> + <li><a href="#TERMS_PICASPOINTS">Picas/Points</a> + <li><a href="#TERMS_PS">Point Size</a> + <li><a href="#TERMS_QUAD">Quad</a> + <li><a href="#TERMS_RAG">Rag</a> + <li><a href="#TERMS_SOLID">Solid/set solid</a> + <li><a href="#TERMS_TRACKKERNING">Track kerning/Line kerning</a> + <li><a href="#TERMS_UNBREAKABLESPACE">Unbreakable space</a> + <li><a href="#TERMS_WORDSPACE">Word space</a> + <li><a href="#TERMS_XHEIGHT">x-height</a> +</ul> +<dl> + +<dt><a name="TERMS_ASCENDER"><em>Ascender</em></a> +<dd>The portion of a letter that extends above the bowl. For example, +the letters a, c, and e have no ascenders. The letters b, d, and h +do. + +<dt><a name="TERMS_BASELINE"><em>Baseline</em></a> +<dd>The imaginary line on which the bottoms of capital letters and the +bowls of lower case letters rest. + +<dt><a name="TERMS_BALLOTBOX"><em>Ballot box</em></a> +<dd>An unfilled square, usually <strong>*cap-height</strong> in size, +typically placed beside items in a checklist. + +<dt><a name="TERMS_BULLET"><em>Bullet</em></a> +<dd>A small, filled circle typically found beside items or points in +a list. + +<dt><a name="TERMS_CAPHEIGHT"><em>Cap-height</em></a> +<dd>The height of the tallest capital letter in a given +<strong>*font</strong> at the current <strong>*point +size</strong>. + +<dt><a name="TERMS_DESCENDER"><em>Descender</em></a> +<dd>The portion of a letter that extends beneath the +<strong>*baseline</strong> (j, q, y are letters with descenders). + +<dt><a name="TERMS_DISCRETIONARYHYPHEN"><em>Discretionary hyphen</em></a> +<dd>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 +<p> +<pre> + \% +</pre> + +(backslash followed by a percent). + +<dt><a name="TERMS_DROPCAP"><em>Drop cap</em></a> +<dd>A large, usually upper-case letter that introduces the first +paragraph of a document or section thereof. The top of the drop +cap usually lines up with the top of the first line of the +paragraph, and typically "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. + +<dt><a name="TERMS_EM"><em>Em/en</em></a> +<dd>A relative measurement equal to the width of the letter M at a +given <strong>*point size</strong> in a given <strong>*font</strong>. +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). + +<dt><a name="TERMS_FAMILY"><em>Family</em></a> +<dd>The collective name by which a collection of +<strong>*fonts</strong> are known, e.g. Helvetica, Times Roman, +Garamond. + +<dt><a name="TERMS_FIGURESPACE"><em>Figure space/Digit space</em></a> +<dd>A <strong>*fixed width space</strong> 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 +<p> +<pre> + \0 +</pre> + +(backslash followed by a zero). + +<dt><a name="TERMS_FIXEDWIDTHSPACE"><em>Fixed width space</em></a> +<dd>Equal to <strong>*word space</strong>, but does not expand or +contract when text is <strong>*justified</strong>. In groff, fixed +width space is entered with +<p> +<pre> + \<space> +</pre> + +where <space> means "hit the spacebar on your keyboard." + +<dt><a name="TERMS_FONT"><em>Font</em></a> +<dd>The specific style of type within a <strong>*family</strong>, +e.g. roman, italic. Groff understands four fonts within any given +family: roman, italic, bold, and bold italic. + +<dt><a name="TERMS_FORCE"><em>Force justify +</em></a> +<dd>Sometimes, in <strong>*justified</strong> 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. + +<dt><a name="TERMS_GUTTER"><em>Gutter</em></a> +<dd>The vertical whitespace separating columns of type. + +<dt><a name="TERMS_JUST"><em>Justify/justification</em></a> +<dd>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 <strong>*quad</strong>. + +<dt><a name="TERMS_KERN"><em>Kerning</em></a> +<dd>Moving pairs of letters closer together to remove excess +whitespace between them. In the days before phototypesetting, +type was set from small, rectangular blocks of wood or metal, each +block having exactly one letter. Because the edge of each block +determined the edge of each letter, certain letter combinations (TA, +for example) didn'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. + +<dt><a name="TERMS_KERNUNIT"><em>Kern Units</em></a> +<dd>A relative distance equal to 1/36 of the current +<strong>*point size</strong>. Used between individual letters +for <strong>*kerning</strong>. Different typesetting systems use +different values (1/54 is popular), and sometimes call kern units by +a different name. +<p> +<strong>Experts: +<br></strong>A kern unit has nothing to do with groff +machine units. + +<dt><a name="TERMS_LEADING"><em>Lead/leading</em></a> +<dd>The distance from the <strong>*baseline</strong> of one line of +type to the line of type immediately beneath it. Pronounced "ledding." +Also called line spacing. Usually measured in <strong>*points</strong>. +<p> +<em>In case you're interested...</em> 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 <strong>*points</strong> 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. + +<dt><a name="TERMS_LEADER"><em>Leaders</em></a> +<dd>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. +<p> +<pre> + Foreword............... 2 + Chapter 1.............. 5 + Chapter 2.............. 38 + Chapter 3.............. 60 +</pre> + +<dt><a name="TERMS_LIGATURES"><em>Ligature</em></a> +<dd>Ligatures are letters joined together to form a single character. +The commonest are fi, fl, ff, ffi and ffl. Others are ae and oe. +Occasionally, one sees an st ligature, but this is archaic and +quite rare. + +<dt><a name="TERMS_PICASPOINTS"><em>Picas/Points</em></a> +<dd>There are twelve points in a pica, and six picas in an inch +(hence 72 points to the inch). In the same way that gem-dealers +have always used their own system of measurement for weight (carats), +typographers have always used their own system of measurement for type. + +<dt><a name="TERMS_PS"><em>Point Size</em></a> +<dd>The nominal size of type, measured in <strong>*points</strong>, +from the bottom of the longest <strong>*descender</strong> to the top +of the highest <strong>*ascender</strong>. In reality, type is always +fractionally smaller than its point size. + +<dt><a name="TERMS_QUAD"><em>Quad</em></a> +<dd>When only one margin of type is flush, lines of type are quadded in +the direction of the flush margin. Therefore, quad left means the +left margin is flush, the right isn'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. + +<dt><a name="TERMS_RAG"><em>Rag</em></a> +<dd>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 <strong>*quadded</strong> left. + +<dt><a name="TERMS_SOLID"><em>Solid/set solid</em></a> +<dd>When no <strong>*lead</strong> is added between lines of type +(i.e. the <strong>*point size</strong> and linespacing are the +same), the lines are said to be "set solid." + +<dt><a name="TERMS_TRACKKERNING"><em>Track kerning/Line kerning</em></a> +<dd>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. + +<dt><a name="TERMS_UNBREAKABLESPACE"><em>Unbreakable space</em></a> +<dd>Equal to <strong>*word space</strong>, 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 +<p> +<pre> + \~ +</pre> + +(backslash followed by a tilde). + +<dt><a name="TERMS_WORDSPACE"><em>Word space</em></a> +<dd>The amount of whitespace between words. When text is +<strong>*justified</strong>, word space expands or contracts to make +the margins flush. + +<dt><a name="TERMS_XHEIGHT"><em>x-height</em></a> +<dd>The height of a lower case letter x in a given font at a given +point size. Generally used to mean the average height of the bowl +of lower case letters. +</dl> +<hr> + +<a name="TERMS_GROFF"> + <h2><u>Groff terms</u></h2> +</a> + +<ul> + <li><a href="#TERMS_ALIAS">Alias</a> + <li><a href="#TERMS_ARGUMENTS">Arguments</a> + <li><a href="#TERMS_COMMENTLINES">Comment lines</a> + <li><a href="#TERMS_CONTROLLINES">Control Lines</a> + <li><a href="#TERMS_FILLED">Filled lines</a> + <li><a href="#TERMS_INLINES">Inline escapes</a> + <li><a href="#TERMS_INPUTLINE">Input line</a> + <li><a href="#TERMS_MACROS">Macros</a> + <li><a href="#TERMS_UNITS">Machine units</a> + <li><a href="#TERMS_NUMERICARGUMENT">Numeric argument</a> + <li><a href="#TERMS_OUTPUTLINE">Output line</a> + <li><a href="#TERMS_PRIMITIVES">Primitives</a> + <li><a href="#TERMS_STRINGARGUMENT">String Argument</a> + <li><a href="#TERMS_UNITOFMEASURE">Unit of measure</a> + <li><a href="#TERMS_ZEROWIDTHCHARACTER">Zero-width character</a> +</ul> +<dl> + +<dt><a name="TERMS_ALIAS"><em>Alias</em></a> +<dd>A <strong>*macro</strong> invoked by a name different from its +"official" name. For example, the official name of the +macro to change <strong>*family</strong> is <strong>FAMILY</strong>. +Its alias is <strong>FAM</strong>. Aliases may be created for any +macro (via the +<a href="goodies.html#ALIAS">ALIAS</a> +macro) provided the alias uses a name not already taken +by the <strong>mom</strong> macros or one of the groff +<strong>*primitives</strong>. For a complete list of alias names +you must not use, see the +<a href="reserved.html#RESERVED">list of reserved words</a>. + +<dt><a name="TERMS_ARGUMENTS"><em>Arguments</em></a> +<dd>Parameters or information needed by a <strong>*macro</strong> +to do its job. For example, in the macro +<p> +<pre> + .PS 12 +</pre> + +"12" is the argument. In the macro +<p> +<pre> + .QUAD LEFT +</pre> + +LEFT is the argument. Arguments are separated from macros by spaces. +Some macros require several arguments; each is separated by a space. + +<dt><a name="TERMS_COMMENTLINES"><em>Comment Lines</em></a> +<dd><strong>*Input lines</strong> introduced with the comment character +<p> +<pre> + \# +</pre> + +When processing output, groff silently ignores everything on the +line after the comment character. + +<dt><a name="TERMS_CONTROLLINES"><em>Control Lines</em></a> +<dd>Instructions to groff that appear on a line by themselves, +which means that "control lines" are either +<strong>*macros</strong> or <strong>*groff primitives</strong>. +Control lines always begin with a period. + +<dt><a name="TERMS_FILLED"><em>Filled lines/fill mode</em></a> +<dd>Automatic <strong>*justification</strong> or +<strong>*quadding</strong>. In fill mode, the ends of lines as they +appear in your text editor are ignored. Instead, words from adjoining +<strong>*input lines</strong> are added one at a time to the output +line until no more words fit. Then, depending whether text is to +be <strong>*justified</strong> or <strong>*quadded</strong> (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). +<p> +<a name="TERMS_NOFILL"></a> +Nofill mode (non-filled text) means that groff respects the ends +of lines as they appear in your text editor. + +<dt><a name="TERMS_INLINES"><em>Inline escapes</em></a> +<dd>Instructions issued to groff that appear as part of an +<strong>*input line</strong> (as opposed to <strong>*macros</strong>, +which must appear on a line by themselves). Inline escapes are always +introduced by the backslash character. For example, +<p> +<pre> + A line of text with the word T\*[BU2]oronto in it +</pre> + +contains the inline escape \*[BU2] (which means "move the letter o 2 +<strong>*kern units</strong> closer to the letter T"). +<p> +<strong>mom</strong>'s inline escapes always take the form +<strong>\*[</strong><i>ESCAPE</i><strong>]</strong>, where +<i>ESCAPE</i> is composed of capital letters, sometimes with digits. +<strong>groff</strong> escapes begin with the backslash +character but typically have no star and are in lower case. For +example, the <strong>mom</strong> escape to move forward 6 +points on a line is +<p> +<pre> + \*[FP6] +</pre> + +while the <strong>groff</strong> escape for the same thing is +<p> +<pre> + \h'6p' +</pre> + +<dt><a name="TERMS_INPUTLINE"><em>Input line</em></a> +<dd>A line of text as it appears in your text editor. + +<dt><a name="TERMS_MACROS"><em>Macros</em></a> +<dd>Instructions embedded in a document that determine how groff processes +the text for output. <strong>mom</strong>'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 <strong>*primitives</strong>. + +<dt><a name="TERMS_UNITS"><em>Machine units</em></a> +<dd>A machine unit is 1/1000 of a <strong>*point</strong> when the +groff device is ps. ("ps" means "PostScript" -- +the default device for which groff prepares output, and the device for +which <strong>mom</strong> was specifically designed.) + +<dt><a name="TERMS_NUMERICARGUMENT"><em>Numeric argument</em></a> +<dd>An <strong>*argument</strong> 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 <strong>*unit of measure</strong>, +a unit of measure must be appended to <em>every</em> digit in the +argument. For example: +<p> +<pre> + .ALD 1i-1v +</pre> + +<strong>NOTE:</strong> 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 <strong>mom</strong>'s macros is slim. + +<dt><a name="TERMS_OUTPUTLINE"><em>Output line</em></a> +<dd>A line of text as it appears in output copy. + +<dt><a name="TERMS_PRIMITIVES"><em>Primitives</em></a> +<dd>The two-letter, lower case instructions groff uses as its +native command language, and out of which macros are built. + +<dt><a name="TERMS_STRINGARGUMENT"><em>String Argument</em></a> +<dd>Technically, any <strong>*argument</strong> that is not numeric. +In this documentation, string argument means an argument that requires +the user to input text. For example, in the <strong>*macro</strong> +<p> +<pre> + .TITLE "My Pulitzer Novel" +</pre> + +"My Pulitzer Novel" is a string argument. +<p> +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 <strong>*inline +escapes</strong> <strong> \(lq</strong> and <strong>\(rq</strong> +(leftquote and rightquote respectively) in place of the double-quote +character ("). + +<dt><a name="TERMS_UNITOFMEASURE"><em>Unit of measure</em></a> +<dd>The single letter after a <strong>*numeric argument</strong> +that tells <strong>mom</strong> what measurement scale the argument +should use. Commonly valid units are: +<p> +<table valign="baseline" summary="unitsofmeasure"> +<tr><td><strong>i</strong><td> = <td>inches +<tr><td><strong>p</strong><td> = <td>points +<tr><td><strong>P</strong><td> = <td>picas +<tr><td><strong>c</strong><td> = <td>centimeters +<tr><td><strong>m</strong><td> = <td>ems +<tr><td><strong>n</strong><td> = <td>ens +<tr><td><strong>v</strong><td> = <td>the current leading (line space)</td></tr> +</table> +<br> +<dd>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: +<p> +<pre> + .ALD 2v + .LL 39P + .IL 1i +</pre> + +The above example advances 2 line spaces and sets the line length to +39 picas with a left indent of 1 inch. +<p> +<strong>IMPORTANT:</strong> Most <strong>mom</strong> macros +that set the size or measure of something MUST be given a unit of +measure. <strong>mom</strong>'s macros do not have default units +of measure. There are a couple of exceptions, the most notable of +which are <strong>PS</strong> and <strong>LS</strong>. Both use +<strong>*points</strong> as the default unit of measure, which means +you don't have to append "p" to their argument. +<p> +You can enter decimal values for any unit of measure. Different units +may be combined by adding them together (e.g. 1.5i+2m, which gives a +measure of 1-1/2 inches plus 2 ems). +<p> +<strong>NOTE:</strong> 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. + +<dt><a name="TERMS_ZEROWIDTHCHARACTER"><em>Zero-width character</em></a> +<dd>The <strong>*inline escape</strong> that allows you to print a +literal period, apostrophe and, if <strong>*output lines</strong> +are <strong>*filled</strong>, a space that falls at the beginning of +an <strong>*input line</strong>. It looks like this: +<p> +<pre> + \& +</pre> + +(backslash followed by an ampersand). +<p> +Normally, groff interprets a period (or an apostrophe) at the beginning +of an input line as meaning that what follows is a <strong>*control +line</strong>. 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. +</dl> +<hr> + +<a name="TERMS_MOM"> + <h2><u>Mom's Document Processing Terms</u></h2> +</a> + +<ul> + <li><a href="#TERMS_BLOCKQUOTE">Blockquote</a> + <li><a href="#TERMS_CONTROLMACRO">Control macro</a> + <li><a href="#TERMS_DOCHEADER">Docheader</a> + <li><a href="#TERMS_EPIGRAPH">Epigraph</a> + <li><a href="#TERMS_FOOTER">Footer</a> + <li><a href="#TERMS_HEAD">Head</a> + <li><a href="#TERMS_HEADER">Header</a> + <li><a href="#TERMS_LINEBREAK">Linebreak</a> + <li><a href="#TERMS_PARAHEAD">Paragraph head</a> + <li><a href="#TERMS_QUOTE">Quote</a> + <li><a href="#TERMS_RUNNING">Running text</a> + <li><a href="#TERMS_SUBHEAD">Subhead</a> + <li><a href="#TERMS_TOGGLE">Toggle</a> +</ul> +<dl> +<dt><a name="TERMS_BLOCKQUOTE"><em>Blockquote</em></a> +<dd>Cited material other than <strong>*quotes</strong>. +Typically set at a smaller point size than paragraph text, indented +from the left and right margins. Blockquotes are +<strong>*filled</strong>. + +<dt><a name="TERMS_CONTROLMACRO"><em>Control macro</em></a> +<dd>Macros used in +<a href="docprocessing.html#DOCPROCESSING">document processing</a> +to control/alter the appearance of document elements (e.g. heads, +quotes, footnotes, <strong>*headers</strong>, etc.). + +<dt><a name="TERMS_DOCHEADER"><em>Document header/docheader</em></a> +<dd>Document information (title, subtitle, author, etc) output +at the top of page one. + +<dt><a name="TERMS_EPIGRAPH"><em>Epigraph</em></a> +<dd>A short, usually cited passage that appears at the +beginning of a chapter, story, or other document. + +<dt><a name="TERMS_FOOTER"><em>Footer/page footer</em></a> +<dd>Document information (frequently author and title) output in +the bottom margin of pages <em>after</em> page one. Not to be +confused with footnotes, which are considered part of +<strong>*running text</strong>. + +<dt><a name="TERMS_HEAD"><em>Head</em></a> +<dd>A title that introduces a major section of a document. + +<dt><a name="TERMS_HEADER"><em>Header/page header</em></a> +<dd>Document information (frequently author and title) output in +the top margin of pages <em>after</em> page one. +<p> +<strong>NOTE:</strong> In terms of content and style, headers and +<strong>*footers</strong> 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. + +<dt><a name="TERMS_LINEBREAK"><em>Linebreak/author linebreak</em></a> +<dd>A horizontal gap in <strong>*running text</strong>, 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). + +<dt><a name="TERMS_PARAHEAD"><em>Paragraph head</em></a> +<dd>A title joined to the body of a paragraph; hierarchically one +level beneath <strong>*subheads</strong>. + +<dt><a name="TERMS_QUOTE"><em>Quote</em></a> +<dd>A quote, to <strong>mom</strong>, 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 +<a href="typesetting.html#BR">BR</a> +with quotes. + +<dt><a name="TERMS_RUNNING"><em>Running text</em></a> +<dd>In a document formatted with <strong>mom</strong>, running +text means text that forms the body of the document, including +elements such as heads and subheads. <strong>*Docheaders, +*headers, *footers</strong> and page numbers are NOT part of +running text. + +<dt><a name="TERMS_SUBHEAD"><em>Subhead</em></a> +<dd>A title used to introduce secondary sections of a document; +hierarchically one level beneath sections introduced by +<strong>*heads</strong>. + +<dt><a name="TERMS_TOGGLE"><em>Toggle</em></a> +<dd>A macro or tag that, when invoked without an argument, +begins something or turns a feature on, and, when invoked with +ANY argument, ends something or turns a feature off. See +<a href="intro.html#TOGGLE_EXAMPLE">Example 3</a> +of the section +<a href="intro.html#MACRO_ARGS">How to read macro arguments</a>. +</dl> + +<p> +<hr> +<a href="using.html#TOP">Next</a> +<a href="intro.html#TOP">Prev</a> +<a href="#TOP">Top</a> +<a href="toc.html">Back to Table of Contents</a> +</body> +</html> 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 @@ +<html> +<head> +<meta http-equiv="content-type" content="text/html;charset=iso-8859-1"> +<title>Mom -- Document Processing, element tags</title> +</head> +<body bgcolor="#dfdfdf"> + +<!====================================================================> + +<a href="headfootpage.html#TOP">Next</a> +<a href="docprocessing.html#TOP">Prev</a> +<a href="toc.html">Back to Table of Contents</a> + +<a name="TOP"></a> +<a name="DOCELEMENT"> + <h2 align="center"><u>THE DOCUMENT ELEMENT TAGS</u></h2> +</a> + +<ul> + <li><a href="#DOCELEMENT_INTRO">Introduction to the document element tags</a> + <ul> + <li><a href="#DOCELEMENT_CONTROL">Control macros -- changing defaults for document element tags</a> + <li><a href="#CONTROL_MACRO_ARGS">Arguments to the control macros</a> + </ul> + <li><a href="#INDEX_DOCELEMENT">Index of document element tags</a> +</ul> + +<a name="DOCELEMENT_INTRO"> + <h2><u>Introduction to the document element tags</u></h2> +</a> + +Once you've completed the setup for a document (see +<a href="docprocessing.html#DOCPROCESSING_TUT">Setting up a mom document</a>), +formatting it is a snap. Simply invoke the appropriate tag for +each document element as you need it. The tags are macros that +tell <strong>mom</strong>, "This is a paragraph, this +is a subhead, this is a footnote," and so on. +<p> +The list of tags is actually quite small -- ideal for the users +<strong>mom</strong> brought herself into being for (see +<a href="intro.html#INTRO_INTRO">Who mom is meant for</a>). +However, the list of macros that control the appearance of the +tags upon output is extensive. Generally, for each tag, +there are +<a href="definitions.html#TERMS_CONTROLMACRO">control macros</a> +for the tag's family, font and point size. Where appropriate, there +are macros to control leading, indents, quad and special features +as well. +<p> +<strong>Mom</strong> has tasteful defaults for all the tags, hence you +only use the control macros when you want to change the way +she does things. This is usually done prior to +<a href="docprocessing.html#START">START</a>, +but can, in fact, be done at any time in the course of a document. +Any change to a tag's style affects all subsequent invocations of +the tag. + +<a name="DOCELEMENT_CONTROL"><h3><u>Control macros -- changing defaults</u></h3></a> + +<p> +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 <strong>mom</strong>'s defaults for family, font +and point size. Where appropriate, there are macros to control +leading, indents and quad as well. +<p> +In addition, many tags have special macros to control features that +are pertinent to those tags alone. Have a look at the section dealing +with any particular tag to find out what macros control the tag, +and what <strong>mom</strong>'s defaults for the tag are. +<p> +The control macros may be used at any time during the course of +a document (i.e. before or after +<a href="docprocessing.html#START">START</a>). The changes you +make alter all subsequent invocations of the affected tag until +you make another change, either by passing new arguments to the +tag's control macro, or toggling a particular feature of the tag on +or off. +<p> +And don't forget: the +<a href="typesetting.html#MACROS_TYPESETTING">typesetting macros</a> +can be used at any time, including inside +<a href="definitions.html#TERMS_TOGGLE">toggle</a> +tags (affected only that particular invocation of the tag). +Equally, +<a href="definitions.html#TERMS_INLINES">inline escapes</a> +can be used in tags that take +<a href="definitions.html#TERMS_STRINGARGUMENT">string arguments.</a> +<p> +<strong>IMPORTANT NOTE:</strong> The family, font, point size and +leading control macros have no effect in +<a href="docprocessing.html#PRINTSTYLE">PRINTSTYLE TYPEWRITE</a>, +which sets EVERYTHING in Courier roman, 12/24 (i.e. 12-point type on +a linespace of 24 points). +<p> +Please also note that the defaults listed +with the control macros apply only to +<a href="docprocessing.html#PRINTSTYLE">PRINTSTYLE TYPESET</a> +unless a default for <strong>TYPEWRITE</strong> is also given. +<p> +<strong>A WORD OF ADVICE:</strong> Get familiar with +<strong>mom</strong> 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 <strong>mom</strong> +is complex and unwieldy, which is not only untrue, but would offend +her mightily. + +<a name="CONTROL_MACRO_ARGS"><h3><u>Arguments to the control macros</u></h3></a> + +<h3>Family and font</h3> +The arguments to the control macros that end in +<strong>_FAMILY</strong> or <strong>_FONT</strong> are the same +as for +<a href="typesetting.html#FAMILY">FAMILY</a> +and +<a href="typesetting.html#FONT">FT</a>. + +<h3>Point size</h3> +Control macros that end in <strong>_SIZE</strong> always take +the form <kbd>+digit</kbd> or <kbd>-digit</kbd> where digit is +the number of +<a href="definitions.html#TERMS_PICASPOINTS">points</a> +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 +<p> +<pre> + .SUBHEAD_SIZE +1.5 +</pre> + +There's no need for a +<a href="definitions.html#TERMS_UNITOFMEASURE">unit of measure</a> +with the <strong>_SIZE</strong> control macros; points is assumed. + +<h3>Lead/linespacing</h3> +Control macros that end in <strong>_AUTOLEAD</strong> take the +same argument as +<a href="typesetting.html#AUTOLEAD">AUTOLEAD</a>, +viz. a digit that represents the number of points to add to the +tag's point size to arrive at its +<a href="definitions.html#TERMS_LEADING">lead</a>. +For example, to set footnotes +<a href="definitions.html#TERMS_SOLID">solid</a>, do +<p> +<pre> + .FOOTNOTE_AUTOLEAD 0 +</pre> + +To set footnotes with a 1-point lead (i.e. with the line spacing +one point greater than the footnote's point size), do +<p> +<pre> + .FOOTNOTE_AUTOLEAD 1 +</pre> + +<a name="CONTROL_INDENTS"><h3>Indents</h3></a> +Except for <strong>PARA_INDENT</strong>, the argument to the control +macros that end +in <strong>_INDENT</strong> is always a single digit (whole numbers +only; no decimal fractions) with no +<a href="definitions.html#TERMS_UNITOFMEASURE">unit of measure</a> +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. + +<h3>Quad/justification style</h3> +Control macros that end in <strong>_QUAD</strong> take the same +arguments as +<a href="typesetting.html#QUAD">QUAD</a>. + + +<a name="INDEX_DOCELEMENT"><h3><u>Document element tags list</u></h3></a> +<ul> + <li><a href="#EPIGRAPH_INTRO">Epigraphs</a> + <ul> + <li><a href="#EPIGRAPH">EPIGRAPH</a> + <li><a href="#EPIGRAPH_CONTROL">Epigrah control</a> + </ul> + <li><a href="#PP_INTRO">Paragraphs</a> + <ul> + <li><a href="#PP">PP</a> + <li><a href="#PP_CONTROL">Paragraph control</a> + </ul> + <li><a href="#HEAD_INTRO">Main heads</a> + <ul> + <li><a href="#HEAD">HEAD</a> + <li><a href="#HEAD_CONTROL">Head control</a> + </ul> + <li><a href="#SUBHEAD_INTRO">Subheads</a> + <ul> + <li><a href="#SUBHEAD">SUBHEAD</a> + <li><a href="#SUBHEAD_CONTROL">Subhead control</a> + </ul> + <li><a href="#PARAHEAD_INTRO">Paragraph heads</a> + <ul> + <li><a href="#PARAHEAD">PARAHEAD</a> + <li><a href="#PARAHEAD_CONTROL">Parahead control</a> + </ul> + <li><a href="#LINEBREAK_INTRO">Linebreaks (author linebreaks)</a> + <ul> + <li><a href="#LINEBREAK">LINEBREAK</a> + <li><a href="#LINEBREAK_CHAR">Linebreak character</a> + </ul> + <li><a href="#QUOTE_INTRO">Quotes (line for line)</a> + <ul> + <li><a href="#QUOTE">QUOTE</a> + <li><a href="#QUOTE_CONTROL">Quote control</a> + </ul> + <li><a href="#BLOCKQUOTE_INTRO">Blockquotes (cited material)</a> + <ul> + <li><a href="#BLOCKQUOTE">BLOCKQUOTE</a> + <li><a href="#BLOCKQUOTE_CONTROL">Blockquote control</a> + </ul> + <li><a href="#FOOTNOTE_INTRO">Footnotes</a> + <ul> + <li><a href="#FOOTNOTE">FOOTNOTE</a> + <li><a href="#FOOTNOTE_CONTROL">Footnote control</a> + </ul> + <li><a href="#FINIS_INTRO">Document termination</a> + <ul> + <li><a href="#FINIS">FINIS</a> + <li><a href="#FINIS_STRING">Finis control</a> -- changing the FINIS string + </ul> +</ul> +<hr> + + +<!====================================================================> + +<a name="EPIGRAPH_INTRO"><h2><u>Epigraphs</u></h2></a> +<ul> + <li><a href="#EPIGRAPH">Tag: EPIGRAPH</a> + <li><a href="#EPIGRAPH_CONTROL">Epigraph control macros</a> +</ul> +<p> +<a href="definitions.html#TERMS_EPIGRAPH">Epigraphs</a> +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. +<p> +By default, <strong>mom</strong> sets epigraphs centered and +<a href="definitions.html#TERMS_NOFILL">unfilled</a>; +this lets you input them on a line for line basis. This behaviour +can be changed to accomodate filled epigraph "blocks." +<br> + +<!---EPIGRAPH---> + +<hr width="66%" align="left"> +<p> +<a name="EPIGRAPH"> + Macro: <strong>EPIGRAPH</strong> <var><toggle> | [ BLOCK ]</var></a> +</a> + +<p> +<strong>EPIGRAPH</strong> is a toggle, used like this: +<p> +<pre> + .EPIGRAPH + <text of epigraph> + .EPIGRAPH OFF +</pre> + +<strong>OFF</strong>, above, could be anything -- say, Q or X -- +since any argument other than <strong>BLOCK</strong> turns it off. +<p> +If given the argument <strong>BLOCK</strong>, <strong>EPIGRAPH</strong> +sets epigraphs +<a href="definitions.html#TERMS_FILLED">filled</a>, +justified or quadded in the same direction as paragraphs, indented +equally from both the left and right margins. +<p> +If a block-style epigraph runs to more than one paragraph (unlikely, +but conceivable), you <strong>MUST</strong> introduce every paragraph +-- <u>INCLUDING THE FIRST!!!</u> -- with the +<a href="#PP">PP</a> +tag. +<p> +<strong>NOTE:</strong> <strong>EPIGRAPH</strong> should only be +used at the top of a document (i.e. just after +<a href="docprocessing.html#START">START</a>) +or after +<a href="#HEAD_INTRO">heads</a>. The latter is not especially +recommended, but it does work. In all other places where you +want quotes or cited text, use +<a href="#QUOTE">QUOTE</a> +or +<a href="#BLOCKQUOTE">BLOCKQUOTE</a>. + +<a name="EPIGRAPH_CONTROL"><h3><u>Epigraph control macros</u></h3></a> +<p> +See +<a href="#CONTROL_MACRO_ARGS">Arguments to the control macros</a>. +<p> +<pre> +.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) +</pre> +<hr> + +<!====================================================================> + +<a name="PP_INTRO"><h2><u>Paragraphs</u></h2></a> +<ul> + <li><a href="#PP">Tag: PP</a> + <li><a href="#PP_CONTROL">Paragraph control macros</a> +</ul> +<p> +The paragraph macro is the one you use most often. Consequently, +it's one of most powerful, yet simplest to use -- just the letters +<strong>PP</strong>. No arguments, nothing. Just <kbd>.PP</kbd> +on a line by itself any time, in any document element, tells +<strong>mom</strong> you want to start a new paragraph. The spacing +and indent appropriate to where you are in your document are taken +care of automatically. +<p> +By default, <strong>mom</strong> does not indent the first paragraph +of a document, nor paragraphs that fall imediately after +<a href="#HEAD_INTRO">heads</a> +or +<a href="#SUBHEAD_INTRO">subheads</a>. +The first paragraphs of blockquotes and block-style epigraphs are +also not indented. This behaviour can be changed with the control +macro +<a href="#PARA_INDENT_FIRST">INDENT_FIRST_PARAS</a>. +<p> +In contrast to some other macro packages, <strong>mom</strong> does not +deposit a blank line between paragraphs. If you want her to do so, use +the control macro <strong>PARA_SPACE</strong>. (I don't recommend +using this macro with +<a href="typesetting.html#PRINTSTYLE">PRINTSTYLE TYPEWRITE</a>.) +<p> +Note that <strong>mom</strong> 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. +<p> +<strong>TIP:</strong> 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 <strong>PP</strong>'s. The visual +interruption in the flow of text is a serious obstacle to creativity +and critiquing. +<p> +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 (<kbd>^I</kbd>) into <code>.PP</code> +(plus a new line), and pipe the output to groff for processing and +printing. +<p> +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 <code>.blm</code> +<a href="definitions.html#TERMS_PRIMITIVES">primitive</a> +(blank line macro) to instruct groff (and <strong>mom</strong>) +that blank lines should be interpreted as <strong>PP</strong>'s. +<p> +<pre> + .blm PP +</pre> +tells groff that all blank lines are really the macro <strong>PP</strong>. +<br> + +<!---PP---> + +<hr width="66%" align="left"> +<p> +<a name="PP"> + Macro: <strong>PP</strong> +</a> + +<p> +<strong>PP</strong> (on a line by itself, of course) tells mom to +start a new paragraph. See +<a href="#PP_INTRO">above</a> +for more details. In addition to regular text paragraphs, you can +use <strong>PP</strong> in +<a href="#EPIGRAPH_INTRO">epigraphs</a>, +<a href="#BLOCKQUOTE_INTRO">blockquotes</a> +and +<a href="#FOOTNOTE_INTRO">footnotes</a>. + +<a name="PP_CONTROL"><h3><u>Paragraph control macros</u></h3></a> +<p> +The <strong>PP</strong> 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. +<p> +<ol> + <li><a href="#PP_FAMILY">Family control</a> + <li><a href="#PP_FONT">Font control</a> + <li><a href="#PP_LEADING">Leading/linespacing control</a> + <li><a href="#PP_JUST_QUAD">Justification/quad control</a> + <li><a href="#PARA_INDENT">First-line indent control</a> + <li><a href="#PARA_INDENT_FIRST">Intitial paragraphs indent control</a> + <li><a href="#PP_SPACE">Paragraph spacing control</a> +</ol> + +<a name="PP_FAMILY"><h3><u>1. Family</u></h3></a> +The paragraph +<a href="definitions.html#TERMS_FAMILY">family</a> +is set with +<a href="typesetting.html#FAMILY">FAMILY</a> +prior to +<a href="docprocessing.html#START">START</a>, +or +<a href="docprocessing.html#DOC_FAMILY">DOC_FAMILY</a> +afterwards. Please note that both globally affect the family of +every element in the document. +<p> +If you wish to change the family for regular +text paragraphs only, invoke <strong>FAMILY</strong> immediately +after <strong>PP</strong> in EVERY paragraph whose family you wish +to differ from the prevailing document family. +<p> +<strong>Mom</strong>'s default paragraph (and document) family +is Times Roman. + +<a name="PP_FONT"><h3><u>2. Font -- PP_FONT</u></h3></a> +To change the +<a href="definitions.html#TERMS_FONT">font</a> +used in regular text paragraphs, use <code>.PP_FONT</code>, +which takes the same argument as +<a href="typesetting.html#FONT">FT</a>. +<strong>PP_FONT</strong> may be used before or after +<a href="docprocessing.html#START">START</a>. +Only regular text paragraphs are affected; paragraphs in +<a href="#EPIGRAPH_INTRO">epigraphs</a>, +<a href="#BLOCKQUOTE_INTRO">blockquotes</a> +and +<a href="#FOOTNOTE_INTRO">footnotes</a> +remain at their default setting (medium roman) unless you change them +with the appropriate control macros. +<p> +<strong>Mom</strong>'s default paragraph font is medium roman. + +<a name="PP_LEADING"><h3><u>3.Leading</u></h3></a> +The paragraph +<a href="definitions.html#TERMS_LEADING">leading</a> +is set with +<a href="typesetting.html#LEADING">LS</a> +prior to +<a href="docprocessing.html#START">START</a>, +or +<a href="docprocessing.html#DOC_LEAD">DOC_LEAD</a> +afterwards. Please note that either method globally affects the +leading and spacing of every document element (except +<a href="definitions.html#TERMS_HEADER">headers</a> +and +<a href="definitions.html#TERMS_FOOTER">footers</a>). +<p> +If you wish to change the leading of regular text paragraphs only, +invoke <strong>LS</strong> immediately after <strong>PP</strong> in +EVERY paragraph whose leading you wish to change. +<p> +<strong>HYPER-IMPORTANT NOTE:</strong> It is extremely unwise to change +paragraph leading with <strong>LS</strong>, as it will, in all cases, +screw up <strong>mom</strong>'s ability to balance the bottom margin +of pages. +<p> +<strong>Mom</strong>'s default paragraph leading (document leading) +is 16 points, adjusted to fill the page. + +<a name="PP_JUST_QUAD"><h3><u>4. Justification/quad</u></h3></a> +The justification/quad-direction of regular text paragraphs (i.e. +<a href="definitions.html#TERMS_JUST">justified</a>, +or +<a href="definitions.html#TERMS_FILLED">filled</a> +and +<a href="definitions.html#TERMS_QUAD">quadded</a> +left/right/center) is set with +<a href="typesetting.html#JUSTIFY">JUSTIFY</a> +or +<a href="typesetting.html#QUAD">QUAD</a> +prior to +<a href="docprocessing.html#START">START</a>, +and with +<a href="docprocessing.html#DOC_QUAD">DOC_QUAD</a> +afterwards. +<p> +Please note that either method of setting the paragraph +justification/quad-direction also affects +<a href="#EPIGRAPH_INTRO">epigraphs</a> +and +<a href="#FOOTNOTE_INTRO">footnotes</a>, +but not +<a href="#BLOCKQUOTE_INTRO">blockquotes</a> +(whose default is QUAD LEFT unless you change it with +<a href="#BLOCKQUOTE">BLOCKQUOTE_QUAD</a>). +The justification/quad-direction of epigraphs and footnotes may +be changed with their own control macros. +<p> +If you wish to change the justification/quad-direction of +individual paragraphs, use <strong>JUSTIFY</strong> or +<strong>QUAD</strong> immediately after <strong>PP</strong>. +Only the paragraph in question gets justified or quadded +differently; subsequent paragraphs remain unaffected. +<p> +<strong>Mom</strong>'s default justification/quad-direction for +paragraphs is justified for +<a href="docprocessing.html#PRINTSTYLE">PRINTSTYLE_TYPESET</a> +and quad left for +<a href="docprocessing.html#PRINTSTYLE">PRINTSTYLE_TYPEWRITE</a>. + +<a name="PARA_INDENT"><h3><u>5. First-line indent -- PARA_INDENT</u></h3></a> +The first-line indent of paragraphs is controlled by +<strong>PARA_INDENT</strong>, which takes one argument: the size +of the indent. <strong>PARA_INDENT</strong> may be used before +or after +<a href="docprocessing.html#START">START</a>. +A +<a href="definitions.html#TERMS_UNITOFMEASURE">unit of measure</a> +is required; fractional sizes are allowed. Thus, to set the paragraph +indent to 4-1/2 +<a href="definitions.html#TERMS_EM">ems</a>, do +<p> +<pre> + .PARA_INDENT 4.5m +</pre> + +In addition to establishing the basic first line-indent of +paragraphs, <strong>PARA_INDENT</strong> also affects +<a href="#EPIGRAPH_INTRO">epigraphs</a>, +<a href="#QUOTE_INTRO">quotes</a> +and +<a href="#BLOCKQUOTE_INTRO">blockquotes</a>, +whose overal indenting from the left and (where applicable) right +margins is relative to <strong>PARA_INDENT</strong>. Furthermore, the +first-line indent of paragraphs within these document elements (as well +as footnotes) is also relative to <strong>PARA_INDENT</strong> (always +1/2 of <strong>PARA_INDENT)</strong>), hence they are also affected. +<p> +<strong>Mom</strong>'s default <strong>PARA_INDENT</strong> is 2 +ems for +<a href="docprocessing.html#PRINTSTYLE">PRINTSTYLE_TYPESET</a> +and 3 picas (1/2 inch) for +<a href="docprocessing.html#PRINTSTYLE">PRINTSTYLE_TYPEWRITE</a>. + +<a name="PARA_INDENT_FIRST"><h3><u>6. Indenting initial paragraphs -- INDENT_FIRST_PARAS</u></h3></a> +By default, <strong>mom</strong> does not indent the first paragraph +of a document, nor the first paragraph after a head or +subhead, nor the first paragraphs of +<a href="#EPIGRAPH_INTRO">epigraphs</a>, +<a href="#BLOCKQUOTE_INTRO">blockquotes</a> +or +<a href="#FOOTNOTE_INTRO">footnotes</a> +that run to more than one paragraph. +<a name="INDENT_FIRST_PARAS"></a> +<p> +If you wish to have first paragraphs indented, invoke the macro +<strong>.INDENT_FIRST_PARAS</strong> with no argument, either +before or after +<a href="docprocessing.html#START">START</a>. +<strong>INDENT_FIRST_PARAS</strong> is a toggle macro, therefore +passing it any argument (<strong>OFF, QUIT, Q, X</strong>...) cancels +its effect, meaning that first paragraphs will once again NOT be +indented. + +<a name="PP_SPACE"><h3><u>7. Spacing paragraphs -- PARA_SPACE</u></h3></a> +By default, <strong>mom</strong> does not insert a blank line +between paragraphs. If you would like her to do so, invoke the +macro <code>.PARA_SPACE</code> with no argument, either +before or after +<a href="docprocessing.html#START">START</a>. +<strong>PARA_SPACE</strong> is a toggle macro, therefore passing +it any argument (<strong>OFF, QUIT, Q, X</strong>...) cancels its +effect, meaning that paragraphs will once again NOT be separated by +a blank line. +<br> +<hr> + +<!====================================================================> + +<a name="HEAD_INTRO"><h2><u>Main heads</u></h2></a> +<ul> + <li><a href="#HEAD">Tag: HEAD</a> + <li><a href="#HEAD_CONTROL">Head control macros</a> +</ul> +<p> +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, <strong>mom</strong> can number +your heads for you. Head numbers can also be included +hierarchically in numbered +<a href="#SUBHEAD_INTRO">subheads</a> +and +<a href="#PARAHEAD_INTRO">paraheads</a>. +<p> +By default, heads are centered on the page, underlined, +all in caps. A double linespace precedes each head. In <a +href="docprocessing.html#PRINTSTYLE">PRINTSTYLE TYPESET</a>, heads +are bold, slightly larger than paragraph text. +<p> +If these defaults don't suit you, you can change them with the +head control macros. +<br> + +<!---HEAD---> + +<hr width="66%" align="left"> +<p> +<a name="HEAD"> + Macro: <strong>HEAD</strong> <var>"<text of head>" [ "<2nd line>" [ "<3rd line>" ... ] ]</var> +</a> + +<p> +The argument to <strong>HEAD</strong> 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. +<p> +<strong>NOTE:</strong> If a head falls near the bottom of an output page +and <strong>mom</strong> is unable to fit the head <em>plus at least +one line of text underneath it</em>, she will set the head at the +top of the next page. + +<a name="HEAD_CONTROL"><h3><u>Head control macros</u></h3></a> +<p> +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 +<strong>mom</strong>'s defaults. +<p> +<ol> + <li><a href="#HEAD_GENERAL">Family/font/size/quad</a> + <li><a href="#HEAD_CAPS">Caps</a> + <li><a href="#HEAD_SPACE">Pre-head space</a> + <li><a href="#HEAD_UNDERLINE">Underlining</a> + <li><a href="#NUMBER_HEADS">Numbering</a> + <li><a href="#RESET_HEAD_NUMBER">Reset head numbering</a> + <li><a href="#HEAD_INLINES">Vertical inline escapes inside heads</a> +</ol> +<p> +<a name="HEAD_GENERAL"><h3><u>1. Family/font/size/quad</u></h3></a> +<p> +See +<a href="#CONTROL_MACRO_ARGS">Arguments to the control macros</a>. +<p> +<pre> +.HEAD_FAMILY default = prevailing document family; default is Times Roman +.HEAD_FONT default = bold +.HEAD_SIZE default = +1 (point) +.HEAD_QUAD default = CENTER +</pre> + +<a name="HEAD_CAPS"><h3><u>2. Capitalizing heads -- HEAD_CAPS</u></h3></a> +By default, <strong>mom</strong> sets heads in caps, regardless +of the +<a href="definitions.html#TERMS_STRINGARGUMENT">string(s)</a> +you give to +<a href="#HEAD">HEAD</a>. +To change this behaviour, do +<p> +<pre> + .HEAD_CAPS OFF +</pre> + +<strong>HEAD_CAPS</strong> is a toggle macro, therefore you can use +any argument you like instead of <strong>OFF</strong> (<strong>END, +QUIT, Q, X</strong>...). To turn <strong>HEAD_CAPS</strong> back on, +simply invoke it without an argument. + +<a name="HEAD_SPACE"><h3><u>3. Space before heads -- HEAD_SPACE</u></h3></a> +By default, <strong>mom</strong> deposits 2 blank lines prior to every +head. If you'd prefer just a single blank line, do +<p> +<pre> + .HEAD_SPACE OFF +</pre> + +<strong>HEAD_SPACE</strong> is a toggle macro, therefore you can use +any argument you like instead of <strong>OFF</strong> (<strong>END, +QUIT, Q, X</strong>...). To restore the space before heads to 2 +blank lines, invoke <strong>HEAD_SPACE</strong> without an argument. + +<a name="HEAD_UNDERLINE"><h3><u>4. Underlining heads -- HEAD_UNDERLINE</u></h3></a> +By default, <strong>mom</strong> underlines heads. To change this +behaviour, do +<p> +<pre> + .HEAD_UNDERLINE OFF +</pre> + +<strong>HEAD_UNDERLINE</strong> is a toggle macro, therefore you can +use any argument you like instead of <strong>OFF</strong> (<strong>END, +QUIT, Q, X</strong>...). To restore underlining of heads, invoke +<strong>HEAD_UNDERLINE</strong> without an argument. + +<a name="NUMBER_HEADS"><h3><u>5. Number heads -- NUMBER_HEADS</u></h3></a> +If you'd like your heads numbered, simply invoke +<strong>NUMBER_HEADS</strong> with no argument. <strong>Mom</strong> +will number all subsequent heads automatically (in ascending order, +naturally). +<p> +If, in addition to numbering heads, you also request that +<a href="#SUBHEAD_INTRO">subheads</a> +and/or +<a href="#PARAHEAD_INTRO">paraheads</a> +be numbered, the head number will be included in their numbers +(each number separated by a period [dot]). +<p> +Should you wish to stop head numbering, invoke +<strong>NUMBER_HEADS</strong> with any argument (<strong>OFF, QUIT, +END, X</strong>...). Head numbering will cease, and the head number +will not be included in the numbering of subheads and/or paraheads. + +<a name="RESET_HEAD_NUMBER"><h3><u>6. Reset head numbering -- RESET_HEAD_NUMBER</u></h3></a> +Should you wish to reset the head number to "1", invoke +<strong>RESET_HEAD_NUMBER</strong> with no argument. If, for some +reason, you want <strong>mom</strong> to use a head number that is not +the next in ascending order (i.e. the last head number + 1), invoke +<strong>RESET_HEAD_NUMBER</strong> with the number you want, e.g. +<p> +<pre> + .RESET_HEAD_NUMBER 6 +</pre> + +Your next head will be numbered "6" and subsequent heads will +be numbered in ascending order from "6". + +<a name="HEAD_INLINES"><h3><u>7. Vertical inline escapes inside heads</u></h3></a> +If you need to adjust the +<a href="definitions.html#TERMS_BASELINE">baseline</a> +position of a head (e.g. the head falls at the top of a column and +you want its +<a href="definitions.html#TERMS_ASCENDER">ascenders</a> +to line up with the ascenders of +<a href="definitions.html#TERMS_RUNNING">running text</a> +in other columns), you can embed a vertical motion +<a href="definitions.html#TERMS_INLINES">inline escape</a> +(either +<a href="typesetting.html#INLINE_VERTICAL_MOM">mom's</a> +or +<a href="typesetting.html#INLINE_VERTICAL_GROFF">groff's</a> +in the string(s) you pass to <strong>HEAD</strong> +<p> +For example, +<p> +<pre> + .HEAD "\[ALD3]Text of head +</pre> + +will lower the baseline of the head by three points. Note that +there's no need to reverse the sense of the inline escape. +<p> +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: +<p> +<pre> + .HEAD "\[ALD3]First line" "\[ALD3]Next line" +</pre> + + + + +<br> +<hr> + +<!====================================================================> + +<a name="SUBHEAD_INTRO"><h2><u>Subheads</u></h2></a> +<ul> + <li><a href="#SUBHEAD">Tag: SUBHEAD</a> + <li><a href="#SUBHEAD_CONTROL">Subhead control macros</a> +</ul> +<p> +Subheads should be used any place you want titles to introduce +sections of a document below heads. If you wish, <strong>mom</strong> +can number subheads for you. Subhead numbers can also be included +hierarchically in numbered +<a href="#PARAHEAD_INTRO">paraheads</a>. +<p> +By default, subheads are flush left. In +<a href="docprocessing.html#PRINTSTYLE">PRINTSTYLE TYPESET</a>, +they are set bold, slightly larger than paragraph text. In +<a href="docprocessing.html#PRINTSTYLE">PRINTSTYLE TYPEWRITE</a>, +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. +<p> +If these defaults don't suit you, you can change them with the +subhead control macros. +<br> + +<!---SUBHEAD---> + +<hr width="66%" align="left"> +<p> +<a name="SUBHEAD"> + Macro: <strong>SUBHEAD</strong> <var>"<text of subhead>" [ "<2nd line>" [ "<3rd line>" ... ] ]</var> +</a> +<p> +The argument to <strong>SUBHEAD</strong> 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. +<p> +<strong>NOTE:</strong> If a subhead falls near the bottom of an output +page and <strong>mom</strong> is unable to fit the head <em>plus at +least one line of text underneath it</em>, she will set the subhead +at the top of the next page. + +<a name="SUBHEAD_CONTROL"><h3><u>Subhead control macros</u></h3></a> +<p> +In addition to the usual family/font/size/quad control +macros, there are macros to manage subhead numbering. +<p> +<ol> + <li><a href="#SUBHEAD_GENERAL">Family/font/size/quad</a> + <li><a href="#NUMBER_SUBHEADS">Numbering</a> + <li><a href="#RESET_SUBHEAD_NUMBER">Reset subhead numbering</a> + <li><a href="#SUBHEAD_INLINES">Vertical inline escapes inside subheads</a> +</ol> +<p> +<a name="SUBHEAD_GENERAL"><h3><u>1. Family/font/size/quad</u></h3></a> +<p> +See +<a href="#CONTROL_MACRO_ARGS">Arguments to the control macros</a>. +<p> +<pre> +.SUBHEAD_FAMILY default = prevailing document family; default is Times Roman +.SUBHEAD_FONT default = bold +.SUBHEAD_SIZE default = +.5 (point) +.SUBHEAD_QUAD default = LEFT +</pre> + +<a name="NUMBER_SUBHEADS"><h3><u>2. Number subheads -- NUMBER_SUBHEADS</u></h3></a> +If you'd like your subheads numbered, simply invoke +<strong>.NUMBER_SUBHEADS</strong> with no argument. +<strong>Mom</strong> will number all subsequent subheads automatically +(in ascending order, naturally). +<p> +If, in addition to numbering subheads, you also request that +<a href="#HEAD_INTRO">heads</a> +be numbered, the head number will be included in the subhead number +(separated by a period [dot]). +<p> +Should you wish to stop subhead numbering, invoke +<strong>NUMBER_SUBHEADS</strong> with any argument (<strong>OFF, QUIT, +END, X</strong>...). Subhead numbering will cease, and the subhead +number will not be included in the numbering of paraheads. + +<a name="RESET_SUBHEAD_NUMBER"><h3><u>3. Reset head numbering -- RESET_SUBHEAD_NUMBER</u></h3></a> +Should you wish to reset the subhead number to "1", invoke +<strong>RESET_SUBHEAD_NUMBER</strong> with no argument. If, for some +reason, you want <strong>mom</strong> to use a subhead number that is not +the next in ascending order (i.e. the last subhead number + 1), invoke +<strong>RESET_SUBHEAD_NUMBER</strong> with the number you want, e.g. +<p> +<pre> + .RESET_SUBHEAD_NUMBER 4 +</pre> + +Your next subhead will be numbered "4" and subsequent +subheads will be numbered in ascending order from "4". + +<a name="#SUBHEAD_INLINES"><h3><u>Vertical inline escapes inside subheads</u></h3></a> +See +<a href="#HEAD_INLINES">Vertical inline escapes inside heads</a>. +The information there applies equally to subheads. + + +<br> +<hr> + +<!====================================================================> + +<a name="PARAHEAD_INTRO"><h2><u>Paragraph heads</u></h2></a> +<ul> + <li><a href="#PARAHEAD">Tag: PARAHEAD</a> + <li><a href="#PARAHEAD_CONTROL">Parahead control macros</a> +</ul> +<p> +Paragraph heads (paraheads) should be used any place you want titles +to introduce paragraphs below heads or subheads. If you wish, +<strong>mom</strong> can number paraheads for you. +<p> +By default, paraheads are joined to the body of a paragraph, +slightly indented (provided the paragraph is not a +"first" paragraph as defined in +<a href="#PARA_INDENT_FIRST">Indenting initial paragraphs</a>). +In +<a href="docprocessing.html#PRINTSTYLE">PRINTSTYLE TYPESET</a>, +they are set bold italic, slightly larger than paragraph text. In +<a href="docprocessing.html#PRINTSTYLE">PRINTSTYLE TYPEWRITE</a>, +they are underlined. +<p> +If these defaults don't suit you, you can change them with the +parahead control macros. +<br> + +<!---PARAHEAD---> + +<hr width="66%" align="left"> +<p> +<a name="PARAHEAD"> + Macro: <strong>PARAHEAD</strong> <var>"<text of parahead>"</var> +</a> +<p> +<strong>PARAHEAD</strong> must come AFTER +<a href="#PP">PP</a> +or it will not work! +<p> +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 +<a href="#HEAD">HEAD</a> +and +<a href="#SUBHEAD">SUBHEAD</a>). + +<a name="PARAHEAD_CONTROL"><h3><u>Parahead control macros</u></h3></a> +<p> +In addition to the family/font/size/indent control macros, there are +macros to manage parahead numbering. +<p> +<ol> + <li><a href="#PARAHEAD_GENERAL">Family/font/size</a> + <li><a href="#PARAHEAD_INDENT">Indent</a> + <li><a href="#NUMBER_PARAHEADS">Numbering</a> + <li><a href="#RESET_PARAHEAD_NUMBER">Reset parahead numbering</a> +</ol> +<p> +<a name="PARAHEAD_GENERAL"><h3><u>1. Family/font/size</u></h3></a> +<p> +See +<a href="#CONTROL_MACRO_ARGS">Arguments to the control macros</a>. +<p> +<pre> +.PARAHEAD_FAMILY default = prevailing document family; default is Times Roman +.PARAHEAD_FONT default = bold italic +.PARAHEAD_SIZE default = +.5 (point) +</pre> + +<a name="PARAHEAD_INDENT"><h3><u>2. Indent</u></h3></a> +Unlike other control macros that end in +<a href="#CONTROL_INDENTS"><strong>_INDENT</strong></a>, +the argument to the macro that controls indenting of paragraph heads +(<strong>PARAHEAD_INDENT</strong>) is NOT relative to the first-line +indent of normal paragraphs. In other words, it takes an absolute +value, and requires a +<a href="definitions.html#TERMS_UNITOFMEASURE">unit of measure</a>. +For example, to set the paragraph head indent to 2-1/2 picas, you +do: +<p> +<pre> + .PARAHEAD_INDENT 2.5P +</pre> +<strong>Mom</strong>'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 <code>\n[#PP_INDENT]u</code> +arithmetically as the argument to <strong>PARAHEAD_INDENT</strong> +for an indent that's relative to <strong>PP_INDENT</strong>.) +<p> +<strong>NOTE:</strong> Paragraph heads in "first +paragraphs", as defined in +<a href="#PARA_INDENT_FIRST">Indenting initial paragraphs</a>, +are not indented unless you turn +<a href="#INDENT_FIRST_PARAS">INDENT_FIRST_PARAS</a> +on. + +<a name="NUMBER_PARAHEADS"><h3><u>3. Number paraheads -- NUMBER_PARAHEADS</u></h3></a> +If you'd like your paraheads numbered, simply invoke +<strong>.NUMBER_PARAHEADS</strong> with no argument. +<strong>Mom</strong> will number all subsequent paraheads automatically +(in ascending order, naturally). +<p> +If, in addition to numbering paraheads, you also request that +<a href="#HEAD_INTRO">heads</a> +and +<a href="#SUBHEAD_INTRO">subheads</a> +be numbered, the head and/or subhead number will be included in the +parahead number (separated by a period [dot]). +<p> +Should you wish to stop parahead numbering, invoke +<strong>NUMBER_PARAHEADS</strong> with any argument (<strong>OFF, +QUIT, END, X</strong>...). Parahead numbering will cease. + +<a name="RESET_PARAHEAD_NUMBER"><h3><u>4. Reset head numbering -- RESET_PARAHEAD_NUMBER</u></h3></a> +Should you wish to reset the parahead number to "1", invoke +<strong>RESET_PARAHEAD_NUMBER</strong> with no argument. If, for some +reason, you want <strong>mom</strong> to use a parahead number that is not +the next in ascending order (i.e. the last parahead number + 1), invoke +<strong>RESET_PARAHEAD_NUMBER</strong> with the number you want, e.g. +<p> +<pre> + .RESET_PARAHEAD_NUMBER 7 +</pre> + +Your next parahead will be numbered "7" and subsequent +paraheads will be numbered in ascending order from "7". +<br> +<hr> + +<!====================================================================> + +<a name="LINEBREAK_INTRO"><h2><u>Author linebreaks</u></h2></a> +<ul> + <li><a href="#LINEBREAK">Tag: LINEBREAK</a> + <li><a href="#LINEBREAK_CHAR">Linebreak character control macro</a> +</ul> +<p> +By default, <strong>mom</strong> marks +<a href="definitions.html#TERMS_LINEBREAK">author linebreaks</a> +with three centered asterisks. You can change this behaviour +with the linebreak character +<a href="definitions.html#TERMS_CONTROLMACRO">control macro</a>. +<br> + +<!---LINEBREAK---> + +<hr width="66%" align="left"> +<p> +<a name="LINEBREAK"> + Macro: <strong>LINEBREAK</strong> +</a> + +<p> +<strong>LINEBREAK</strong> 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 +<a href="#LINEBREAK_CHAR">LINEBREAK_CHAR</a> +macro. + +<h3><u>Linebreak character control macro</u></h3> +<p> +<a name="LINEBREAK_CHAR"> + Macro: <strong>LINEBREAK_CHAR</strong> <var>[ <character> ] [ <iterations> [ <vertical adjustment> ] ]</var> +</a> +<br> +<em>*The third optional argument requires a +<a href="definitions.html#TERMS_UNITOFMEASURE">unit of measure</a></em>. + +<p> +<strong>LINEBREAK_CHAR</strong> determines what <strong>mom</strong> +prints when <strong>LINEBREAK</strong> is invoked. It takes 3 +optional arguments: the character you want deposited at the line +break, the number of times you want the character repeated, and a +vertical adjustment factor. +<p> +The first argument is any legal groff character (e.g. <kbd>*</kbd> +[an asterisk], <kbd>\(dg</kbd> [a dagger], <kbd>\f(ZD\N'141\fP</kbd> +[an arbitrary character from Zapf Dingbats], <kbd>\l'4P'</kbd> +[a 4-pica long rule]). <strong>Mom</strong> sets the character +centered on the current line length. +<p> +The second argument is the number of times to repeat the character. +<p> +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 +<a href="definitions.html#TERMS_BASELINE">baseline</a> +(such as asterisks). The argument must be preceded by a plus or +minus sign, and must include a unit of measure. +<p> +If you enter <strong>LINEBREAK_CHAR</strong> with no arguments, +sections of text will be separated by two blank lines. +<p> +<strong>Mom</strong>'s default for <strong>LINEBREAK_CHAR</strong> is +<p> +<pre> + .LINEBREAK_CHAR * 3 -3p +</pre> + +i.e. three asterisks, lowered 3 points from their normal vertical +position (for +<a href="docprocessing.html#PRINTSTYLE">PRINTSTYLE TYPESET</a>; +the vertical adjustment is -2 points for +<a href="docprocessing.html#PRINTSTYLE">PRINTSTYLE TYPEWRITE</a>). +<br> +<hr> + +<!====================================================================> + +<a name="QUOTE_INTRO"><h2><u>Quotes (line for line)</u></h2></a> +<ul> + <li><a href="#QUOTE">Tag: QUOTE</a> + <li><a href="#QUOTE_CONTROL">Quote control macros</a> +</ul> +<p> +<a href="definitions.html#TERMS_QUOTE">Quotes</a> +are always set in +<a href="definitions.html#TERMS_NOFILL">nofill mode</a>, +flush left. This permits entering quotes on a line for line basis in +your text editor and have them come out the same way on output copy. +(See +<a href="#BLOCKQUOTE_INTRO">Blockquotes</a> +for how quotes, in the present sense, differ from longer +passages of cited text.) +<p> +Since <strong>mom</strong> 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 +<a href="docprocessing.html#PRINTSTYLE">(PRINTSTYLE TYPESET)</a> +or underlined +<a href="docprocessing.html#PRINTSTYLE">(PRINTSTYLE TYPEWRITE)</a>, +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 +<strong>QUOTE</strong> serves other needs, e.g. entering snippets of +programming code, command line instructions, and so on. +<p> +<a name="QUOTE_SPACING"></a> +Besides indenting quotes, <strong>mom</strong> further sets them +off from +<a href="definitions.html#TERMS_RUNNING">running text</a> +with a small amount of vertical whitespace top and bottom. In +<a href="docprocessing.html#PRINTSTYLE">PRINTSTYLE TYPEWRITE</a>, +this is always one full linespace. In +<a href="docprocessing.html#PRINTSTYLE">PRINTSTYLE TYPESET</a>, +it's 1/2 of the prevailing +<a href="definitions.html#TERMS_LEADING">leading</a> +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 +<a href="#ALWAYS_FULLSPACE_QUOTES">ALWAYS_FULLSPACE_QUOTES</a>. +<p> +<strong>NOTE:</strong> <strong>ALWAYS_FULLSPACE_QUOTES</strong> +applies to both +<a href="#QUOTE">QUOTE</a> +and +<a href="#BLOCKQUOTE">BLOCKQUOTE</a>, +as does the control macro +<a href="#QUOTE_INDENT">QUOTE_INDENT</a>. +<br> + +<!---QUOTE---> + +<hr width="66%" align="left"> +<p> +<a name="QUOTE"> + Macro: <strong>QUOTE</strong> <var>toggle</var> +</a> + +<p> +<strong>QUOTE</strong> 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 <strong>QUOTE</strong> with any +argument (e.g. OFF, END, X, Q...) to turn it off. Example: +<p> +<pre> + .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 +</pre> + +<a name="QUOTE_CONTROL"><h3><u>Quote control macros</u></h3></a> +<ol> + <li><a href="#QUOTE_GENERAL">Family/font/size/indent</a> + <li><a href="#ALWAYS_FULLSPACE_QUOTES">Spacing above and below (typeset only)</a> + <li><a href="#UNDERLINE_QUOTES">Underline quotes (typewrite only)</a> + <li><a href="#BREAK_QUOTE">Manually break a footnoted quote that crosses pages/columns</a> +</ol> +<p> +<a name="QUOTE_GENERAL"><h3><u>1. Family/font/size/indent</u></h3></a> +<p> +See +<a href="#CONTROL_MACRO_ARGS">Arguments to the control macros</a>. +<p> +<pre> +.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) +<a name="QUOTE_INDENT">.QUOTE_INDENT default = paragraph indent x 3 (typeset); x 2 (typewrite)</a> + (note that this macro also sets the indents (left and right) + for blockquotes) +</pre> + +<a name="ALWAYS_FULLSPACE_QUOTES"><h3><u>2. Spacing above and below -- ALWAYS_FULLSPACE_QUOTES (typeset only)</u></h3></a> +If you'd like <strong>mom</strong> always to put a full linespace above +and below quotes, invoke <strong>.ALWAYS_FULLSPACE_QUOTES</strong> +with no argument. If you wish to restore <strong>mom</strong>'s +default behaviour regarding the spacing of quotes (see +<a href="#QUOTE_SPACING">above</a>), +invoke the macro with any argument (<strong>OFF, QUIT, END, +X</strong>...) +<p> +<strong>NOTE:</strong> This macro also sets <strong>mom</strong>'s +spacing policy for +<a href="#BLOCKQUOTE_INTRO">blockquotes</a>. + +<a name="UNDERLINE_QUOTES"><h3><u>3. Underlining -- UNDERLINE_QUOTES (typewrite only)</u></h3></a> +By default in +<a href="docprocessing.html#PRINTSTYLE">PRINTSTYLE TYPEWRITE</a>, +<strong>mom</strong> underlines quotes. If you'd rather she didn't, +invoke <strong>.UNDERLINE_QUOTES</strong> with any argument +(<strong>OFF, QUIT, END, X</strong>...) to disable the feature. +Invoke it without an argument to restore <strong>mom</strong>'s +default underlining of quotes. +<p> +If you not only wish that <strong>mom</strong> not underline +quotes, but also that she set them in italic, you must follow each +instance of <strong>QUOTE</strong> with the typesetting macro <a +href="typesetting.html#FONT">FT I</a>. +Furthermore, since <strong>mom</strong> underlines all instances +of italics by default in <strong>PRINTSTYLE TYPEWRITE</strong>, +you must also make sure that <strong>ITALIC_MEANS_ITALIC</strong> +is enabled (see +<a href="docprocessing.html#TYPEWRITE_CONTROL">PRINTSTYLE TYPEWRITE control macros</a>). + +<a name="BREAK_QUOTE"><h3><u>4. Manually break a footnoted quote -- BREAK_QUOTE</u></h3></a> +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 <code>.BREAK_QUOTE</code> 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. +<p> +<strong>BREAK_QUOTE</strong> may be used with both quotes and +blockquotes, and hence is aliased as <strong>BREAK_BLOCKQUOTE, +BREAK_CITATION</strong> and <strong>BREAK_CITE</strong>. +<br> +<hr> + +<!====================================================================> + +<a name="BLOCKQUOTE_INTRO"><h2><u>Blockquotes (cited passages)</u></h2></a> +<ul> + <li><a href="#BLOCKQUOTE">Tag: BLOCKQUOTE (aliases: CITE, CITATION)</a> + <li><a href="#BLOCKQUOTE_CONTROL">BLOCKQUOTE control macros</a> +</ul> +<p> +<strong>BLOCKQUOTES</strong> are used to cite passages from another +author's work. So that they stand out well from +<a href="definitions.html#TERMS_RUNNING">running text</a>, +<strong>mom</strong> indents them from both the left and right margins +and sets them in a different point size +<a href="docprocessing.html#PRINTSTYLE">(PRINTSTYLE TYPESET</a> +only). +<a href="definitions.html#TERMS_OUTPUTLINE">Output lines</a> +are +<a href="definitions.html#TERMS_FILLED">filled</a>, +and, by default, +<a href="definitions.html#TERMS_QUAD">quadded</a> +left. +<p> +Besides indenting blockquotes, <strong>mom</strong> further sets them +off from running text with a small amount of vertical whitespace top +and bottom. (See +<a href="#QUOTE_SPACING">above</a> +for a complete explanation of how this is managed, and how to control it.) +<p> +You may notice that <strong>BLOCKQUOTE</strong> has no macro to +control +<a href="definitions.html#TERMS_LEADING">leading</a>, +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 +<a href="typesetting.html#LS">LS</a>, +but know that there will be Bottom Margin Consequences. +<br> + +<!---BLOCKQUOTE---> + +<hr width="66%" align="left"> +<p> +<a name="BLOCKQUOTE"> + Macro: <strong>BLOCKQUOTE</strong> <var>toggle</var> + <br> + Aliases: <strong>CITE, CITATION</strong> +</a> + +<p> +<strong>BLOCKQUOTE</strong> 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 <strong>BLOCKQUOTE</strong> with any +argument (e.g. OFF, END, X, Q...) to turn it off. Example: +<p> +<pre> + .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 +</pre> + +If the cited passage runs to more than one paragraph, you MUST +introduce each paragraph -- <em>including the first!</em> -- +with +<a href="#PP">PP</a>. +<p> +<strong>NOTE:</strong> The aliases <strong>CITE</strong> +and <strong>CITATION</strong> may be used in place of the +<strong>BLOCKQUOTE</strong> tag, but "CITE" and +"CITATION" must not be used to replace "BLOCKQUOTE" +in any of the tag's control macros. + +<a name="BLOCKQUOTE_CONTROL"><h3><u>Blockquote control macros</u></h3></a> +<ol> + <li><a href="#BLOCKQUOTE_GENERAL">Family/font/size/indent</a> + <li><a href="#ALWAYS_FULLSPACE_QUOTES">Spacing above and below (typeset only)</a> + <li><a href="#BREAK_QUOTE">Manually break a footnoted blockquote that crosses pages/columns</a> +</ol> +<p> +<a name="BLOCKQUOTE_GENERAL"><h3><u>1. Family/font/size/indent</u></h3></a> +<p> +See +<a href="#CONTROL_MACRO_ARGS">Arguments to the control macros</a>. +<p> +<pre> +.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)</a> + (note that this macro also sets the left indent for quotes) +</pre> + +<a name="ALWAYS_FULLSPACE_QUOTES"><h3><u>2. Spacing above and below -- ALWAYS_FULLSPACE_QUOTES (typeset only)</u></h3></a> +If you'd like <strong>mom</strong> always to put a full linespace above +and below blockquotes, invoke <strong>.ALWAYS_FULLSPACE_QUOTES</strong> +with no argument. If you wish to restore <strong>mom</strong>'s +default behaviour regarding the spacing of blockquotes (see +<a href="#QUOTE_SPACING">above</a>), +invoke the macro with any argument (<strong>OFF, QUIT, END, +X</strong>...). +<p> +<strong>NOTE:</strong> This macro also sets <strong>mom</strong>'s +spacing policy for +<a href="#QUOTE_INTRO">quotes</a>. +<br> +<hr> + +<!====================================================================> + +<a name="FOOTNOTE_INTRO"><h2><u>Footnotes</u></h2></a> +<ul> + <li><a href="#FOOTNOTE">Tag: FOOTNOTE</a> + <li><a href="#FOOTNOTE_CONTROL">FOOTNOTE control macros</a> +</ul> + +<p> +For something so complex behind the scenes, footnotes are easy to use. +You just type, for example +<p> +<a name="FOOTNOTE_EXAMPLE"></a> +<pre> + ...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. +</pre> + +and be done with it. (Note the obligatory use of the +<strong>\c</strong> +<a href="definitions.html#TERMS_INLINES">inline escape</a>.) +<strong>Mom</strong> 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 +<a href="columns.html#COLUMNS">COLUMNS</a>, +<strong>mom</strong> knows what to do, and Does The Right Thing. +<p> +Footnotes can be sly little beasts, though. If you're writing a +document that's footnote-heavy, you might want to read the following. + +<a name="FOOTNOTE_BEHAVIOUR"><h3><u>Footnote behaviour</u></h3></a> +<p> +By default, <strong>mom</strong> 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 <strong>mom</strong> is happy to oblige. +<p> +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. <strong>Mom</strong> 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. +<p> +If <strong>mom</strong> 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. +<strong>FOOTNOTE</strong> has been called too close to the bottom), +she defers the footnote to the next page, but sets it with the +appropriate marker from the previous page. +<p> +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, +<strong>mom</strong> 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. +<p> +In the circumstance where a deferred footnote is not the only one on +its page, and is consequently marked by something other than a single +star, there's no confusion and <strong>mom</strong> 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). +<p> +Obviously, deferred footnotes aren't an issue if you request numbered +footnotes that increase incrementally throughout the whole document -- +yet another convenience <strong>mom</strong> has thought of. +<p> +Exceptionally, you may encounter problems with footnotes inside +quotes and blockquotes that cross a page or column. See +<a href="#BREAK_QUOTE">BREAK_QUOTE</a> +for a solution. +<br> + +<!---FOOTNOTE---> + +<hr width="66%" align="left"> +<p> +<a name="FOOTNOTE"> + Macro: <strong>FOOTNOTE</strong> <var><toggle> | INDENT LEFT | RIGHT | BOTH <indent value></var> + <br> + <em>*See <a href="#FOOTNOTE_NOTE">HYPER-IMPORTANT NOTE</a>!!! + <br> + <indent value> requires a + <a href="definitions.html#TERMS_UNITOFMEASURE">unit of measure</a></em> +</a> + +<p> +<strong>FOOTNOTE</strong> 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 <em>other than INDENT</em> +(i.e. <strong>OFF, QUIT, END, X...</strong>) tells <strong>mom</strong> +you're finished. +<p> +Footnotes are the only element of +<a href="definitions.html#TERMS_RUNNING">running text</a> +that are not affected by the typesetting +<a href="typesetting.html#INDENTS">indent macros</a>. +In the unlikely event that you want a page's footnotes to line +up with a running indent, invoke <strong>FOOTNOTE</strong> with +the <strong>INDENT</strong> argument and pass it an indent +direction and indent value. <strong>L, R,</strong> and +<strong>B</strong> may be used in place of <strong>LEFT, +RIGHT,</strong> and <strong>BOTH</strong>. +<strong>FOOTNOTE</strong> must be invoked with <strong>INDENT</strong> +for every footnote you want indented; <strong>Mom</strong> does +not save any footnote indent information from invocation to +invocation. +<p> +<strong>NOTE:</strong> If a footnote runs to more than one +paragraph(!), <strong>DO NOT</strong> begin the footnote with +the +<a href="#PP">PP</a> +tag. Use <strong>PP</strong> only to introduce subsequent paragraphs. +<p> +<a name="FOOTNOTE_NOTE"><strong>HYPER-IMPORTANT NOTE:</strong></a> +The final word on the +<a href="definitions.html#TERMS_INPUTLINE">input line</a> +that comes immediately before <strong>FOOTNOTE</strong> MUST terminate +with a +<a href="typesetting.html#JOIN">\c</a> +inline escape. Otherwise, the footnote marker for the word won't be attached to +it (i.e. <strong>mom</strong> will insert a word space between the word +and the marker). See the +<a href="#FOOTNOTE_EXAMPLE">footnote example</a> +above. + +<p> +<a name="FOOTNOTE_CONTROL"><h3><u>Footnote control macros</u></h3></a> +<ol> + <li><a href="#FOOTNOTE_GENERAL">Family/font/size/lead/quad</a> + <li><a href="#FOOTNOTE_MARKERS">Footnote markers</a> -- on or off + <li><a href="#FOOTNOTE_MARKER_STYLE">Footnote marker style</a> -- star+dagger or numbered + <li><a href="#RESET_FOOTNOTE_NUMBER">Reset footnote number</a> -- set footnote marker number to 1 + <li><a href="#FOOTNOTE_RULE">Footnote rule</a> -- on or off + <li><a href="#FOOTNOTE_RULE_LENGTH">Footnote rule length</a> -- length of footnote separator rule + <li><a href="#FOOTNOTE_RULE_ADJ">Adjust vertical position of footnote separator rule</a> +</ol> +<p> +<a name="FOOTNOTE_GENERAL"><h3><u>1. Family/font/size/quad/lead</u></h3></a> +<p> +See +<a href="#CONTROL_MACRO_ARGS">Arguments to the control macros</a>. +<p> +<pre> +.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 +</pre> + +<a name="FOOTNOTE_MARKERS"><h3><u>2. Footnote markers -- FOOTNOTE_MARKERS</u></h3></a> +If you don't want footnote markers, in either the body of +the document or beside footnote entries themselves, toggle +them off with <strong>.FOOTNOTE_MARKERS OFF</strong> (or +<strong>END, QUIT, X</strong>...). This means, of course, that +you'll have to roll your own. If you want them back on, invoke +<strong>.FOOTNOTE_MARKERS</strong> with no argument. Footnote markers +are on by default. + +<a name="FOOTNOTE_MARKER_STYLE"><h3><u>3. Footnote marker style -- FOOTNOTE_MARKER_STYLE</u></h3></a> +<strong>Mom</strong> gives you two choices of footnote marker style: +star+dagger (see +<a href="#FOOTNOTE_BEHAVIOUR">footnote behaviour</a> +above), or numbered. +<p> +<strong>.FOOTNOTE_MARKER_STYLE STAR</strong> gives you star+dagger +(the default). There is a limit of 10 footnotes per page with +this style. +<p> +<strong>.FOOTNOTE_MARKER_STYLE NUMBER</strong> 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 <strong>mom</strong> to start each page's footnote numbers at 1 +with <strong>.RESET_FOOTNOTE_NUMBER</strong> (see below). + +<a name="RESET_FOOTNOTE_NUMBER"><h3><u>4. Reset footnote number -- RESET FOOTNOTE NUMBER</u></h3></a> +<strong>.RESET_FOOTNOTE_NUMBER</strong>, by itself, resets +footnote numbering so that the next footnote you enter is +numbered 1. +<p> +<strong>.RESET_FOOTNOTE_NUMBER PAGE</strong> tells +<strong>mom</strong> to start every page's footnote numbering at 1. + +<a name="FOOTNOTE_RULE"><h3><u>5. Footnote rule -- FOOTNOTE_RULE</u></h3></a> +If you don't want a footnote separator rule, toggle it off with +<strong>.FOOTNOTE_RULE OFF</strong> (or <strong>END, +QUIT, X</strong>...). Toggle it back on by invoking +<strong>.FOOTNOTE_RULE</strong> with no argument. The default is to +print the rule. + +<a name="FOOTNOTE_RULE_LENGTH"><h3><u>6. Footnote rule length -- FOOTNOTE_RULE_LENGTH</u></h3></a> +If you want to change the length of the footnote separator rule, +invoke <strong>.FOOTNOTE_RULE_LENGTH</strong> with a length, like +this, +<p> +<pre> + .FOOTNOTE_RULE_LENGTH 1i +</pre> + +which sets the length to 1 inch. Note that a +<a href="definitions.html#TERMS_UNITOFMEASURE">unit of measure</a> +is required. The default is 4 +<a href="definitions.html#TERMS_PICASPOINTS">picas</a> +for both +<a href="docprocessing.html#PRINTSTYLE">printstyles</a>. +<a name="FOOTNOTE_RULE_ADJ"><h3><u>7. Adjust vertical position of footnote separator rule -- FOOTNOTE_RULE_ADJ</u></h3></a> +The footnote separator rule is actually a baseline rule that falls +on the +<a href="definitions.html#TERMS_BASELINE">baseline</a> +of the first line of a page's footnotes. By default, +<strong>mom</strong> raises the rule 3 +<a href="definitions.html#TERMS_PICASPOINTS">points</a> +from the baseline so that the separator and the footnotes don't +look jammed together. If you'd prefer a different vertical +adjustment, invoke <strong>.FOOTNOTE_RULE_ADJ</strong> with the +amount you'd like. For example +<p> +<pre> + .FOOTNOTE_RULE_ADJ 4.25p +</pre> + +raises the rule by 4-1/4 points. Note that you can only raise +the rule, not lower it. A +<a href="definitions.html#TERMS_UNITOFMEASURE">unit of measure</a> +is required. +<br> +<hr> + +<!====================================================================> + +<a name="FINIS_INTRO"><h2><u>Terminate document processing</u></h2></a> +<ul> + <li><a href="#FINIS">Tag: FINIS</a> + <li><a href="#FINIS_STRING">Changing the FINIS string</a> +</ul> + +<p> +The use of <strong>FINIS</strong> is optional. If you invoke it +(at the end of a document, of course), <strong>mom</strong> turns off +<a href="definitions.html#TERMS_FOOTER">footers</a> +(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 +<a href="definitions.html#TERMS_EM">em-dashes</a>. +<p> +If you're writing in a language other than English, you can +change what <strong>mom</strong> prints for END with +the control macro <strong>FINIS_STRING</strong>. +<br> + +<!---FINIS---> + +<hr width="66%" align="left"> +<p> +<a name="FINIS"> + Macro: <strong>FINIS</strong> +</a> + +<p> +The use of <strong>FINIS</strong> is optional, but if you use +it, it should be the last macro you invoke in a document. See +<a href="#FINIS_INTRO">above</a> +for a description of how <strong>FINIS</strong> behaves. +<p> +<strong>NOTE:</strong> If you don't use <strong>FINIS</strong>, +and you don't want +<a href="definitions.html#TERMS_FOOTER">footers</a> +(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: +<p> +<pre> + .FOOTERS OFF + .PAGINATE OFF +</pre> + +<a name="FINIS_STRING"><h3><u>Changing the FINIS string</u></h3></a> + +<p> +By default, <strong>FINIS</strong> prints the word +END between +<a href="definitions.html#TERMS_EM">em-dashes</a>. +If you'd like <strong>mom</strong> to print something else +between the dashes, use the <strong>FINIS_STRING</strong> macro +(anywhere in the document prior to <strong>FINIS</strong>). +<p> +For example, if your document's in French, you'd do +<p> +<pre> + .FINIS_STRING "FIN" +</pre> + +Double-quotes must enclose the macro's argument. +<p> +<strong>NOTE:</strong> If you pass <strong>FINIS_STRING</strong> +a blank string, i.e. +<p> +<pre> + .FINIS_STRING "" +</pre> + +<strong>mom</strong> will still print the em-dashes if you +invoke <strong>FINIS</strong>. This, in effect, produces a +short, centered horizontal rule that terminates the document. +(In +<a href="docprocessing.html.#PRINTSTYLE">PRINTSTYLE TYPEWRITE</a>, +it's a short, dashed line composed of four hyphens.) + +<p> +<hr> +<a href="headfootpage.html#TOP">Next</a> +<a href="docprocessing.html#TOP">Prev</a> +<a href="#TOP">Top</a> +<a href="toc.html">Back to Table of Contents</a> +</body> +</html> 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 @@ +<html> +<head> +<meta http-equiv="content-type" content="text/html;charset=iso-8859-1"> +<title>Mom -- Document Processing, Introduction and Setup</title> +</head> +<body bgcolor="#dfdfdf"> + +<!====================================================================> + +<a href="docelement.html#TOP">Next</a> +<a href="inlines.html#TOP">Prev</a> +<a href="toc.html">Back to Table of Contents</a> + +<a name="TOP"></a> +<a name="DOCPROCESSING"> + <h1 align="center"><u>DOCUMENT PROCESSING WITH MOM</u> +</h1> +</a> + +<a href="#INTRO_MACROS_DOCPROCESSING">Introduction to document processing</a> +<br> +<a href="#DEFAULTS">Some document defaults</a> +<p> +<a href="#LEADING_NOTE">* IMPORTANT NOTE on leading/spacing and bottom margins *</a> +<p> +<ul> + <li><strong>DOCUMENT SETUP</strong> + <br> + <a href="#DOCPROCESSING_TUT">Tutorial -- Setting up a mom document</a> + <br> + <ul> + <li><a href="#REFERENCE_MACROS"><strong>The Reference Macros</strong></a> + <ul> + <li><a href="#TITLE">TITLE</a> + <li><a href="#SUBTITLE">SUBTITLE</a> + <li><a href="#AUTHOR">AUTHOR</a> + <li><a href="#CHAPTER">CHAPTER</a> + <li><a href="#DRAFT">DRAFT</a> + <li><a href="#REVISION">REVISION</a> + </ul> + <li><a href="#DOCSTYLE_MACROS"><strong>The Docstyle Macros</strong></a> + <ul> + <li><a href="#DOCTYPE">DOCTYPE</a> + <li><a href="#PRINTSTYLE">PRINTSTYLE</a> + <li><a href="#COPYSTYLE">COPYSTYLE</a> + </ul> + + <li><a href="#STYLE_BEFORE_START"><strong>Changing type/style parameters prior to START</strong></a> + <ul> + <li><a href="#TYPE_BEFORE_START">Using typesetting macros prior to START</a> + <li><a href="#DOC_LEAD_ADJUST">Adjusting document leading to fill pages -- DOC_LEAD_ADJUST</a> + <li><a href="#DOCHEADER">Managing the document header</a> + <ul> + <li><a href="#DOCHEADER">DOCHEADER -- turning docheaders off</a> + <li><a href="#DOCHEADER_CONTROL">Docheader control</a> + </ul> + </ul> + + <li><a href="#COLUMNS_INTRO"><strong>Setting documents in columns</strong></a> + <ul> + <li><a href="#COLUMNS">COLUMNS</a> + <li><a href="#COL_NEXT">COL_NEXT</a> + <li><a href="#COL_BREAK">COL_BREAK</a> + + </ul> + + <li><a href="#START_MACRO"><strong>START</strong> -- the macro to initiate document processing</a> + <ul> + <li><a href="#START">START</a> + </ul> + + <li><a href="#DOC_PARAM_MACROS"><strong>Changing document-wide typesetting parameters after START</strong></a> + <ul> + <li><a href="#DOC_LEFT_MARGIN">DOC_LEFT_MARGIN</a> + <li><a href="#DOC_RIGHT_MARGIN">DOC_RIGHT_MARGIN</a> + <li><a href="#DOC_LINE_LENGTH">DOC_LINE_LENGTH</a> + <li><a href="#DOC_FAMILY">DOC_FAMILY</a> + <li><a href="#DOC_PT_SIZE">DOC_PT_SIZE</a> + <li><a href="#DOC_LEAD">DOC_LEAD</a> + <li><a href="#DOC_LEAD_ADJUST">DOC_LEAD_ADJUST</a> + <li><a href="#DOC_QUAD">DOC_QUAD</a> + </ul> + <br> + <li><strong>THE DOCUMENT ELEMENT MACROS (TAGS)</strong> + <ul> + <li><a href="docelement.html#DOCELEMENT_INTRO">Introduction to the document element tags</a> + <ul> + <li><a href="docelement.html#DOCELEMENT_CONTROL">Document element (tag) control macros</a> + </ul> + <li><a href="docelement.html#EPIGRAPH_INTRO"><strong>Epigraphs</strong></a> + <ul> + <li><a href="docelement.html#EPIGRAPH">EPIGRAPH</a> + <li><a href="docelement.html#EPIGRAPH_CONTROL">Epigrah control</a> + </ul> + <li><a href="docelement.html#PP_INTRO"><strong>Paragraphs</strong></a> + <ul> + <li><a href="docelement.html#PP">PP</a> + <li><a href="docelement.html#PP_CONTROL">Paragraph control</a> + </ul> + <li><a href="docelement.html#HEAD_INTRO"><strong>Main heads</strong></a> + <ul> + <li><a href="docelement.html#HEAD">HEAD</a> + <li><a href="docelement.html#HEAD_CONTROL">Head control</a> + </ul> + <li><a href="docelement.html#SUBHEAD_INTRO"><strong>Subheads</strong></a> + <ul> + <li><a href="docelement.html#SUBHEAD">SUBHEAD</a> + <li><a href="docelement.html#SUBHEAD_CONTROL">Subhead control</a> + </ul> + <li><a href="docelement.html#PARAHEAD_INTRO"><strong>Paragraph heads</strong></a> + <ul> + <li><a href="docelement.html#PARAHEAD">PARAHEAD</a> + <li><a href="docelement.html#PARAHEAD_CONTROL">Parahead control</a> + </ul> + <li><a href="docelement.html#LINEBREAK_INTRO"><strong>Linebreaks (author linebreaks)</strong></a> + <ul> + <li><a href="docelement.html#LINEBREAK">LINEBREAK</a> + <li><a href="docelement.html#LINEBREAK_CONTROL">Linebreak control</a> + </ul> + <li><a href="docelement.html#QUOTE_INTRO"><strong>Quotes (line for line poetic quotes)</strong></a> + <ul> + <li><a href="docelement.html#QUOTE">QUOTE</a> + <li><a href="docelement.html#QUOTE_CONTROL">Quote control</a> + </ul> + <li><a href="docelement.html#BLOCKQUOTE_INTRO"><strong>Blockquotes (cited material)</strong></a> + <ul> + <li><a href="docelement.html#BLOCKQUOTE">BLOCKQUOTE</a> + <li><a href="docelement.html#BLOCKQUOTE_CONTROL">Blockquote control</a> + </ul> + <li><a href="docelement.html#FOOTNOTE_INTRO"><strong>Footnotes</strong></a> + <ul> + <li><a href="docelement.html#FOOTNOTE">FOOTNOTE</a> + <li><a href="docelement.html#FOOTNOTE_CONTROL">Footnote control</a> + </ul> + <li><a href="docelement.html#FINIS_INTRO"><strong>Document termination</strong></a> + <ul> + <li><a href="docelement.html#FINIS">FINIS</a> + <li><a href="docelement.html#FINIS_CONTROL">Finis control</a> + </ul> + </ul> + + <li><a href="headfootpage.html#HEADFOOTPAGE"><strong>HEADERS and FOOTERS</strong></a> + <br> + <ul> + <li><a href="headfootpage.html#HEADFOOTPAGE_INTRO">Introduction to headers/footers</a> + <li><a href="headfootpage.html#HEADFOOT_MANAGEMENT">Managing headers/footers</a> + <ul> + <li><a href="headfootpage.html#HEADERS">HEADERS</a> -- on or off + <li><a href="headfootpage.html#FOOTERS">FOOTERS</a> -- on or off + <li><a href="headfootpage.html#FOOTER_ON_FIRST_PAGE">FOOTER_ON_FIRST_PAGE</a> + </ul> + <li><a href="headfootpage.html#HEADFOOT_CONTROL">Header/footer control</a> + <ul> + <li><a href="headfootpage.html#HDRFTR_STRINGS">Header/footer strings</a> + <li><a href="headfootpage.html#HDRFTR_STYLE">Header/footer style</a> -- global and part-by-part + <li><a href="headfootpage.html#HDRFTR_VERTICAL">Header/footer placement and spacing</a> + <li><a href="headfootpage.html#HDRFTR_SEPARATOR">The header/footer separator rule</a> + </ul> + </ul> + <li><a href="headfootpage.html#PAGINATION"><strong>PAGINATION</strong></a> + <br> + <ul> + <li><a href="headfootpage.html#PAGINATE">PAGINATE -- on or off</a> + <li><a href="headfootpage.html#PAGENUMBER">PAGENUMBER -- user supplied page number</a> + <li><a href="headfootpage.html#PAGENUM_STYLE">PAGENUM_STYLE -- digits, roman numerals, etc.</a> + <li><a href="headfootpage.html#PAGINATION_CONTROL">Pagination control</a> + </ul> + <br> + <li><a href="rectoverso.html#RECTOVERSO"><strong>RECTO_VERSO PRINTING and COLLATING</strong></a> + <br> + <ul> + <li><a href="rectoverso.html#RECTOVERSO_INTRO">Introduction to recto/verso</a> + <ul> + <li><a href="rectoverso.html#RECTO_VERSO">RECTO_VERSO</a> + <li><a href="rectoverso.html#SWITCH_HDRFTR">SWITCH_HEADERS</a> (also FOOTERS) + </ul> + <li><a href="rectoverso.html#COLLATE_INTRO">Introduction to collating</a> + <ul> + <li><a href="rectoverso.html#COLLATE">COLLATE</a> + </ul> + </ul> + + <li><a href="cover.html#COVER"><strong>CREATING A COVER PAGE</strong></a> + <br> + <li><a href="letters.html#LETTERS"><strong>WRITING LETTERS</strong></a> + <ul> + <li><a href="letters.html#LETTERS_INTRO">Introduction to writing letters</a> + <li><a href="letters.html#TUTORIAL">Tutorial on writing letters</a> + <li><a href="letters.html#LETTERS_DEFAULTS">Default style for letters</a> + <li><a href="letters.html#LETTERS_MACROS">The letter macros</a> + + + + </ul> + </ul> +</ul> +<br> +<hr> + +<h2><a name="INTRO_MACROS_DOCPROCESSING"><u>Introduction to document processing</u></a></h2> +<p> +As explained in +<a href="intro.html#INTRO_DOCPROCESSING">Document processing with mom</a>, +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 +<a href="goodies.html#ALIAS">ALIAS</a> +macro.) +<p> +In addition to the tags themselves, <strong>mom</strong> has an +extensive array of macros that control how they look and behave. +<p> +Setting up a <strong>mom</strong> doc is a simple, four-part procedure. +You begin by entering information about the document itself (title, +subtitle, author, etc.). Next, you tell <strong>mom</strong> 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 +<strong>mom</strong>'s default behaviour as you wish. Lastly, you +invoke the +<a href="#START">START</a> +macro. Voilà! You're ready to write. +<br> +<hr> + + +<h2><a name="DEFAULTS"><u>Some document defaults</u></a></h2> + +As is to be expected, <strong>mom</strong> has defaults for everything. +If you want to know a particular default, read about it in the +description of the pertinent tag. +<p> +I fear the following may not be adequately covered in the +documentation. Just in case, here they are. +<p> +<ul> + <li>the paper size is 8.5x11 inches + <li>the left and right margins are 1-inch + <li>the top and bottom margins for document text are plus/minus + visually 1-inch + <li>pages are numbered; the number appears centered, at the + bottom, surrounded by hyphens ( e.g. -6- ) + <li>the first page of a document begins with a + <a href="definitions.html#TERMS_DOCHEADER">document header</a> + <li>subsequent pages have + <a href="definitions.html#TERMS_HEADER">page headers</a> + with a rule underneath +</ul> +<p> +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). +<br> +<hr> + +<a name="LEADING_NOTE"> + <h2><u>IMPORTANT NOTE on leading/spacing and bottom margins</u></h2> +</a> + +<strong>Mom</strong> takes evenly-aligned bottom margins in +<a href="definitions.html#TERMS_RUNNING">running text</a> +very seriously. Only under a very few (exceptional) circumstances +will she allow a bottom margin to "hang" (i.e. to fall +short). +<p> +In order to ensure even bottom margins, <strong>mom</strong> +uses the "base" document +<a href="definitions.html#TERMS_LEADING">leading</a> +in effect <em>at the start of each page</em> (i.e. the leading used +in paragraphs) to calculate the spacing of every document element. +Prior to invoking +<a href="#START">START</a>, +this is done with the +<a href="typesetting.html#MACROS_TYPESETTING">typesetting macro</a> +<a href="typesetting.html#LEADING">LS</a>, +afterwards with the document +<a href="definitions.html#TERMS_CONTROLMACRO">control macro</a> +<a href="#DOC_LEAD">DOC_LEAD</a>. +<p> +Because <strong>mom</strong> 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. +<p> +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. +<p> +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" +<a href="definitions.html#TERMS_UNITOFMEASURE">unit of measure</a> +with whatever spacing macro you choose -- +<a href="typesetting.html#ALD">ALD</a>, +<a href="typesetting.html#RLD">RLD</a>, +<a href="typesetting.html#SPACE">SPACE</a> +-- and <strong>mom</strong> 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, +<em>provided you compensate for the fractional linespace somewhere +else on the page</em>. +<br> +<hr> + +<a name="SETUP"><h2><u>Document setup</u></h2></a> + +<a name="DOCPROCESSING_TUT"> + <h3><u>Tutorial -- Setting up a mom document</u></h3> +</a> +<p> +There are four "parts" to setting up a <strong>mom</strong> +doc (three, actually, with one optional). Before we proceed, though, +be reassured that something as simple as +<p> +<pre> + .TITLE "By the Shores of Lake Attica" + .AUTHOR "Rosemary Winspeare" + .PRINTSTYLE TYPESET + .START +</pre> + +produces a beautifully typeset 8.5x11 document, with a +<a href="definitions.html#TERMS_DOCHEADER">docheader</a> +at the top of page 1, +<a href="definitions.html#TERMS_HEADER">page headers</a> +with the title and author on subsequent +pages, and page numbers at the bottom of each page. In the course +of the document, heads, subheads, citations, quotes, epigraphs, +and so on, all come out looking neat, trim, and professional. +<p> +For the purposes of this tutorial, we're going to set up a short +story -- <em>My Pulitzer Winner</em> by Joe Blow. Thankfully, +we don't have to look at story itself, just the setup. +Joe wants the document +<p> +<ul> + <li>to be draft 7, revision 39; + <li>to use the "default" style of document formatting: + <li>to print as draft-style output (instead of "final" copy output); + <li>to be typeset, in Helvetica, 12 on 14, + <a href="definitions.html#TERMS_RAG">rag-right</a>; + <li>to have <a href="definitions.html#TERMS_FOOTER">footers</a> + instead of + <a href="definitions.html#TERMS_HEADER">headers</a>; + <li>to use a single asterisk for + <a href="definitions.html#TERMS_LINEBREAK">author linebreaks</a>. +</ul> +<p> +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. +<h3><u>Step 1</u></h3> + +The first step in setting up any document is giving <strong>mom</strong> +some reference information. The reference macros are: +<p> +<ul> + <li>TITLE + <li>SUBTITLE + <li>AUTHOR + <li>CHAPTER -- the chapter number + <li>DRAFT -- the draft number + <li>REVISION -- the revision number +</ul> +<p> +You can use as many or as few as you wish, although at a minimum, +you'll probably fill in <strong>TITLE</strong> (unless the document's +a letter) and <strong>AUTHOR</strong>. Order doesn't matter. +You can separate the +<a href="definitions.html#TERMS_ARGUMENTS">arguments</a> +from the macros by any number of spaces. The following are +what you'd need to start Joe Blow's story. +<p> +<pre> + .TITLE "My Pulitzer Winner" + .AUTHOR "Joe Blow" + .DRAFT 7 + .REVISION 39 +</pre> + +<h3><u>Step 2</u></h3> + +Once you've given <strong>mom</strong> 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? +<strong>Mom</strong> calls the macros that answer these questions +"the docstyle macros." They are: +<p> +<ul> + <li>DOCTYPE -- the type of document (default, chapter, user-defined, letter) + <li>PRINTSTYLE -- typeset or typewritten + <li>COPYSTYLE -- draft or final copy +</ul> +<p> +<strong>Mom</strong> has defaults for <strong>DOCTYPE</strong> +and <strong>COPYSTYLE</strong>; if they're what you want, you +don't need to include them here. However, <strong>PRINTSTYLE</strong> +has no default and MUST be present in every formatted document. +If you omit it, <strong>mom</strong> 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> +<p> +Adding to what we already have, the next bit of setup for Joe +Blow's story looks like this: +<p> +<pre> + .TITLE "My Pulitzer Winner" + .AUTHOR "Joe Blow" + .DRAFT 7 + .REVISION 39 + \# + .DOCTYPE DEFAULT \"Superfluous; mom uses DOCTYPE DEFAULT by default + .PRINTSTYLE TYPESET + .COPYSTYLE DRAFT +</pre> + +Notice the use of the +<a href="definitions.html#TERMS_COMMENTLINES">comment line</a> +( \# ), a handy way to keep groups of macros visually separated +for easy reading in a text editor. + +<h3><u>Step 3</u></h3> + +This step -- completely optional -- is where you, the user, take +charge. <strong>Mom</strong> has defaults for <em>everything</em>, +but who's ever satisfied with defaults? Use any of the <a +href="typesetting.html#MACROS_TYPESETTING">typesetting macros</a> +here to change <strong>mom</strong>'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. +<p> +Joe Blow wants his story printed in Helvetica, 12 on 14, rag +right, with +<a href="definitions.html#TERMS_FOOTER">page footers</a> +instead of +<a href="definitions.html#TERMS_HEADER">page headers</a> +and a single asterisk for the +<a href="definitions.html#TERMS_LINEBREAK">linebreak</a> +character. None of these requirements conforms +to <strong>mom</strong>'s defaults for the chosen +<strong>PRINTSTYLE</strong> (TYPESET), so we change them here. +The setup for Joe Blow's story now looks like this: +<p> +<pre> + .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 * +</pre> + +<h3><u>Step 4</u></h3> +The final step in setting up a document is telling <strong>mom</strong> +to start document processing. It's a no-brainer, just the single macro +<strong>START</strong>. Other than <strong>PRINTSTYLE</strong>, it's +the only macro required for document processing (although +I can't guarantee you'll like the results of using just the two). +<p> +Here's the complete setup for <em>My Pulitzer Winner</em>: +<p> +<pre> + .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 +</pre> + +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: +<p> +<pre> + .TITLE "My Pulitzer Winner" + .AUTHOR "Joe Blow" + .DRAFT 7 + .REVISION 39 + \# + .PRINTSTYLE TYPEWRITE + .COPYSTYLE DRAFT + \# + .START +</pre> + +<kbd>.PRINTSTYLE TYPEWRITE</kbd>, 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). +<p> +When J. Blow stops re-writing and decides to print off a final, +typeset copy of his work for the world to see, he need only +make two changes to the (simplified) setup: +<p> +<pre> + .TITLE "My Pulitzer Winner" + .AUTHOR "Joe Blow" + .DRAFT 7 + .REVISION 39 + \# + .PRINTSTYLE TYPESET \"first change + .COPYSTYLE FINAL \"second change + \# + .START +</pre> + +In the above, <kbd>.DRAFT 7, .REVISION 39,</kbd> and <kbd>.COPYSTYLE +FINAL</kbd> are actually superfluous. The draft and revision numbers +aren't used when <strong>COPYSTYLE</strong> is <strong>FINAL</strong>, +and <strong>COPYSTYLE FINAL</strong> is <strong>mom</strong>'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. +<br> +<hr> + +<!========================================================================> + +<a name="REFERENCE_MACROS"> + <h2><u>The Reference Macros</u></h2> +</a> + +The reference macros give <strong>mom</strong> the information +she needs to generate +<a href="definitions.html#TERMS_DOCHEADER">docheaders</a> +and +<a href="definitions.html#TERMS_HEADER">page headers</a>. They +must go at the top of any file that uses <strong>mom</strong>'s +document processing macros. + +<a name="INDEX_REFERENCE"> + <h3><u>Reference macros list</u></h3> +</a> + +<ul> + <li><a href="#TITLE">TITLE</a> + <li><a href="#SUBTITLE">SUBTITLE</a> + <li><a href="#AUTHOR">AUTHOR</a> + <li><a href="#CHAPTER">CHAPTER</a> + <li><a href="#DRAFT">DRAFT</a> + <li><a href="#REVISION">REVISION</a> +</ul> + +<!---TITLE---> + +<hr width="66%" align="left"> +<p> +<a name="TITLE"></a> +Macro: <strong>TITLE</strong> <var>"<title>"</var> +<br> +<em>*Argument must be enclosed in double-quotes</em> + +<p> +The title string can be caps or caps/lower-case; it's up to you. +In +<a href="#PRINTSTYLE">PRINTSTYLE TYPESET</a>, +the title will appear in the +<a href="definitions.html#TERMS_DOCHEADER">docheader</a> +exactly as you typed it. However, <strong>mom</strong> converts +the title to all caps in +<a href="definitions.html#TERMS_HEADER">page headers</a> +unless you turn that feature off (see +<a href="headfootpage.html#_CAPS">HEADER_<POSITION>_CAPS</a>). In +<a href="#PRINTSTYLE">PRINTSTYLE TYPEWRITE</a>, +the title always gets converted to caps. +<p> +<strong>NOTE:</strong> If your +<a href="#DOCTYPE">DOCTYPE</a> +is <strong>CHAPTER</strong>, <strong>TITLE</strong> should be the +title of the opus, not "CHAPTER whatever". +<br> + +<!---SUBTITLE---> + +<hr width="66%" align="left"> +<p> +<a name="SUBTITLE"></a> +Macro: <strong>SUBTITLE</strong> <var>"<subtitle>"</var> +<br> +<em>*Argument must be enclosed in double-quotes</em> + +<p> +The subtitle string can be caps or caps/lower-case. Since a +document's subtitle appears only in the +<a href="definitions.html#TERMS_DOCHEADER">docheader</a>, +and the title is most likely in caps, I recommend caps/lower case. +<br> + +<!---AUTHOR---> + +<hr width="66%" align="left"> +<p> +<a name="AUTHOR"></a> +Macro: <strong>AUTHOR</strong> <var>"<author string>" [ "<author2 string>" "<author3 string>" ... ]</var> +<br> +<em>*Multiple arguments must be enclosed in double-quotes</em> + +<p> +Each author string can hold as many names as you like, e.g. +<p> +<pre> + .AUTHOR "Joe Blow" + or + .AUTHOR "Joe Blow, Jane Doe" "John Hancock" +</pre> + +<strong>Mom</strong> prints each string that's enclosed in +double-quotes on a separate line in the +<a href="definitions.html#TERMS_DOCHEADER">docheader</a>, +however only the first string appears in +<a href="definitions.html#TERMS_HEADER">page headers</a>. +If you want <strong>mom</strong> 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 +<a href="headfootpage.html#HEADER_CONTROL">header/footer control</a>). +<p> +The strings can be caps or caps/lower-case. I recommend caps/lower +case. +<br> + +<!---CHAPTER---> + +<hr width="66%" align="left"> +<p> +<a name="CHAPTER"></a> +Macro: <strong>CHAPTER</strong> <var><chapter number></var> + +<p> +The chapter number can be in any form you like -- a digit, a roman +numeral, a word. If you choose +<a href="#DOCTYPE">DOCTYPE CHAPTER</a>, +<strong>mom</strong> prints whatever argument you pass +<strong>CHAPTER</strong> beside the word "Chapter" as a +single line +<a href="definitions.html#TERMS_DOCHEADER">docheader</a>. +She also puts the same thing in the middle of +<a href="definitions.html#TERMS_HEADER">page headers</a>. +<p> +If you're not using <strong>DOCTYPE CHAPTER</strong>, the macro serves +no purpose and <strong>mom</strong> ignores it. +<a name="CHAPTER_STRING"></a> +<p> +If you're not writing in English, you can ask <strong>mom</strong> +to use the word for chapter in your own language by telling +her what it is with the <strong>CHAPTER_STRING</strong> macro, +like this: +<p> +<pre> + .CHAPTER_STRING "Chapître" +</pre> + +You can also use <strong>CHAPTER_STRING</strong> if you want +"CHAPTER" instead of "Chapter" in the doc- and +page-headers. (See also the +<a href="#CHAPTER_NOTE">Special Note on CHAPTER</a>.) +<br> + +<!---DRAFT---> + +<hr width="66%" align="left"> +<p> +<a name="DRAFT"></a> +Macro: <strong>DRAFT</strong> <var><draft #></var> + +<p> +<strong>DRAFT</strong> only gets used with +<a href="#COPYSTYLE">COPYSTYLE DRAFT</a>. +If the <strong>COPYSTYLE</strong> is <strong>FINAL</strong> (the +default), <strong>mom</strong> ignores <strong>DRAFT</strong>. +<strong>DRAFT</strong> only accepts a +<a href="definitions.html#TERMS_NUMERICARGUMENT">numeric argument</a>. +<p> +<strong>Mom</strong> prints the draft number beside the word +"Draft" in the middle part of +<a href="definitions.html#TERMS_HEADER">page headers</a>. +If you're not writing in English, you can ask <strong>mom</strong> +to use the word for draft in your own language by telling +her what it is with the <strong>DRAFT_STRING</strong> macro, +like this: +<p> +<pre> + .DRAFT_STRING "Ébauche" +</pre> + +<!---REVISION---> + +<hr width="66%" align="left"> +<p> +<a name="REVISION"></a> +Macro: <strong>REVISION</strong> <var><revision #></var> + +<p> +<strong>REVISION</strong> only gets used with +<a href="#COPYSTYLE">COPYSTYLE DRAFT</a>. +If the <strong>COPYSTYLE</strong> is <strong>FINAL</strong> +(the default), <strong>mom</strong> ignores the +<strong>REVISION</strong> macro. <strong>REVISION</strong> only +accepts a +<a href="definitions.html#TERMS_NUMERICARGUMENT">numeric argument</a>. +<p> +<strong>Mom</strong> prints the revision number beside the shortform +"Rev." in the middle part of +<a href="definitions.html#TERMS_HEADER">page headers</a>. +If you're not writing in English, you can ask <strong>mom</strong> +to use the word for revision, or a shortform therof in your own language +by telling her what it is with the <strong>REVISION_STRING</strong> +macro, like this: +<p> +<pre> + .REVISION_STRING "Rév." +</pre> +<hr> + +<!========================================================================> + +<a name="DOCSTYLE_MACROS"> + <h2><u>The Docstyle Macros</u></h2> +</a> + +The docstyle macros tell <strong>mom</strong> 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. + +<a name="INDEX_DOCSTYLE"> + <h3><u>Docstyle macros list</u></h3> +</a> + +<ul> + <li><a href="#DOCTYPE">DOCTYPE</a> + <li><a href="#PRINTSTYLE">PRINTSTYLE</a> + <ul> + <li><a href="#TYPESET_DEFAULTS">Defaults for PRINTSTYLE TYPESET</a> + <li><a href="#TYPEWRITE_DEFAULTS">Defaults for PRINTSTYLE TYPEWRITE</a> + <ul> + <li><a href="#TYPEWRITE_CONTROL">TYPEWRITE control macros</a> + </ul> + </ul> + <li><a href="#COPYSTYLE">COPYSTYLE</a> +</ul> + +<!---DOCTYPE---> + +<hr width="66%" align="left"> +<p> +<a name="DOCTYPE"></a> +Macro: <strong>DOCTYPE</strong> <var>DEFAULT | CHAPTER | NAMED "<name>" | LETTER</var> +<p> +The arguments <strong>DEFAULT, CHAPTER</strong> and +<strong>NAMED</strong> tell <strong>mom</strong> what to put +in the +<a href="definitions.html#TERMS_DOCHEADER">docheader</a> +and +<a href="definitions.html#TERMS_HEADER">page headers</a>. +<strong>LETTER</strong> tells her that you want to write a +lettter. +<p> +<strong>Mom</strong>'s default <strong>DOCTYPE</strong> is +<strong>DEFAULT</strong>. If that's what you want, you don't +have to give a <strong>DOCTYPE</strong> command. +<p> +<strong>DEFAULT</strong> prints a +<a href="definitions.html#TERMS_DOCHEADER">docheader</a> +containing the title, subtitle and author information given to the +<a href="#REFERENCE_MACROS">reference macros</a>, +and page headers with the author and title. +(See +<a href="headfootpage.html#HEADER_STYLE">Default specs for headers</a> +for how <strong>mom</strong>'s outputs each part of the page header.) +<p> +<strong>CHAPTER</strong> prints "Chapter #" in place of a +<a href="definitions.html#TERMS_DOCHEADER">docheader</a> +(# is what you gave to +<a href="#CHAPTER">CHAPTER</a>). +Page headers contain the author, the title of the book (which +you gave with +<a href="#TITLE">TITLE</a>), +and "Chapter #". (See +<a href="headfootpage.html#HEADER_STYLE">Default Specs for Headers</a> +for <strong>mom</strong>'s default type parameters for each part of +the page header.) +<p> +<em>*See the +<a href="#CHAPTER_NOTE">Special Note on CHAPTER</a> +below for how you can make CHAPTER print something +other than "Chapter #" as its docheader.</em> +<p> +<strong>NAMED</strong> takes an additional argument: a name +for this particular kind of document (e.g. outline, synopsis, +abstract, memorandum), enclosed in double-quotes. +<strong>NAMED</strong> is identical to <strong>DEFAULT</strong> +except that <strong>mom</strong> prints the argument to +<strong>NAMED</strong> beneath the +<a href="definitions.html#TERMS_DOCHEADER">docheader</a>, +as well as in page headers. +(See +<a href="headfootpage.html#HEADER_STYLE">Default specs for headers</a> +for how <strong>mom</strong>'s outputs each part of the page header.) +<p> +<strong>LETTER</strong> tells mom you're writing a letter. See +the section +<a href="letters.html#INTRO">Writing Letters</a> +for instructions on using <strong>mom</strong> to format letters. + +<a name="CHAPTER_NOTE"><h3><u>Special Note on CHAPTER</u></h3></a> +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 <strong>DOCTYPE +CHAPTER</strong> in the following way: +<p> +<ol> + <li>Omit the + <a href="#REFERENCE_MACROS">reference macro</a> + <a href="#CHAPTER">CHAPTER</a> + <li>Invoke + <a href="#CHAPTER_STRING"><code>.CHAPTER_STRING</code></a> + with the title you'd like the chapter to have (enclosed + in double-quotes, of course). + <li>Optionally, if you'd like the chapter title to appear + in the the center part of + <a href="definitions.html#TERMS_HEADER">page headers</a> + (its default location), invoke + <a href="headfootpage.html#HDRFTR_CENTER"><code>.HEADER_CENTER</code></a> + with the same title you gave to <strong>CHAPTER_STRING</strong>. + +</ol> +<br> + +<!---PRINTSTYLE---> + +<hr width="66%" align="left"> +<p> +<a name="PRINTSTYLE"></a> +Macro: <strong>PRINTSTYLE</strong> <var>TYPESET | TYPEWRITE [ SINGLESPACE ]</var> +<br> +<em>*Required for document processing.</em> + +<p> +<strong>PRINTSTYLE</strong> tells <strong>mom</strong> whether to typeset +a document, or to print it out "typewritten, doubled-spaced". +<p> +<strong>THIS MACRO MAY NOT BE OMITTED.</strong> In order for +document processing to take place, <strong>mom</strong> requires +a <strong>PRINTSTYLE</strong>. If you don't give one, +<strong>mom</strong> will warn you on stderr and print a single +page with a nasty message. +<p> +<strong>TYPESET</strong>, as the argument implies, typesets documents +(by default in Times Roman; see +<a href="#TYPESET_DEFAULTS">TYPESET defaults</a>). +You have full access to all the +<a href="typesetting.html#MACROS_TYPESETTING">typesetting macros</a> +as well as the +<a href="definitions.html#STYLE_CONTROL">style control macros</a> +of document processing. +<p> +With <strong>TYPEWRITE</strong>, <strong>mom</strong> does her best +to reproduce the look and feel of typewritten, double-spaced copy (see +<a href="#TYPEWRITE_DEFAULTS">TYPEWRITE defaults</a>). +<a href="docelement.html#DOCELEMENT_CONTROL">Control macros</a> +and +<a href="typesetting.html#INTRO_MACROS_TYPESETTING">typesetting macros</a> +that alter family, font, point size, and +<a href="definitions.html#TERMS_LEADING">leading</a> +are (mostly) ignored. An important exception is +<a href="headfootpage.html#HDRFTR_GLOBAL_SIZE">HEADER_SIZE</a> +(and, by extension, <strong>FOOTER_SIZE</strong>), which allows +you to reduce the point size of headers/footers should they become +too crowded. Most of <strong>mom</strong>'s inlines affecting the +appearance of type are also ignored (<strong>\*S</strong> is an +exception; there may be a few others). +<p> +In short, <strong>TYPEWRITE</strong> never produces effects other than +those available on a typewriter. Don't be fooled by how brainless +this sounds; <strong>mom</strong> is remarkably sophisticated when +it comes to conveying the typographic sense of a document within the +confines of <strong>TYPEWRITE</strong>. +<p> +The primary uses of <strong>TYPEWRITE</strong> 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 <strong>TYPEWRITE</strong> +to <strong>TYPESET</strong> and print out a copy. +<p> +If, for some reason, you would prefer the output of +<strong>TYPEWRITE</strong> single-spaced, pass <strong>PRINTSTYLE +TYPEWRITE</strong> the optional argument, <strong>SINGLESPACE</strong>. +<p> +If you absolutely must have a leading other than typewriter double- +or singlespaced, the only way to get it is with the +<a href="#DOC_LEAD">DOC_LEAD</a> +macro, and then ONLY if <strong>DOC_LEAD</strong> is set +<strong>before</strong> you invoke the <strong>START</strong> +macro. + +<a name="TYPESET_DEFAULTS"><h3><u>TYPESET defaults</u></h3></a> +<pre> + 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 +</pre> + +<a name="TYPEWRITE_DEFAULTS"><h3><u>TYPEWRITE defaults</u></h3></a> +<pre> + 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 +</pre> + +<a name="TYPEWRITE_CONTROL"><h3><u>PRINTSTYLE TYPEWRITE control macros</u></h3></a> +<p> +In <strong>PRINTSTYLE TYPEWRITE</strong>, <strong>mom</strong>, +by default, underlines anything that looks like italics. This +includes the +<a href="typesetting.html#SLANT_INLINE">\*[SLANT]</a> +<a href="definitions.html#TERMS_INLINES">inline escape</a> +for pseudo-italics. +<p> +If you'd prefer that <strong>mom</strong> 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 <strong>.ITALIC_MEANS_ITALIC</strong> and +<strong>.SLANT_MEANS_SLANT</strong>. Neither requires an +argument. +<p> +Although it's unlikely, should you wish to reverse the sense of +these macros in the midst of a document, +<strong>.UNDERLINE_ITALIC</strong> and +<strong>.UNDERLINE_SLANT</strong> restore underlining of +italics and pseudo-italics. +<p> +Additionally, by default, <strong>mom</strong> underlines +<a href="definitions.html#TERMS_QUOTES">quotes</a> +(but not +<a href="definitions.html#TERMS_BLOCKQUOTES">blockquotes</a>) +in <strong>PRINTSTYLE TYPEWRITE</strong>. +If you don't like this behaviour, turn it off with +<p> +<pre> + .UNDERLINE_QUOTES OFF +</pre> + +To turn underlining of quotes back on, use +<strong>UNDERLINE_QUOTES</strong> without an argument. +<p> +While most of the +<a href="docelement.html#DOCELEMENT_CONTROL">control macros</a> +have no effect on <strong>PRINTSTYLE TYPEWRITE</strong>, there +is an important exception: +<a href="headfootpage.html#HDRFTR_GLOBAL_SIZE">HEADER_SIZE</a> +(and by extension, <strong>FOOTER_SIZE</strong>). This is +particularly useful for reducing the point size of +headers/footers should they become crowded (quite likely to +happen if the title of your document is long and your +<a href="#COPYSTYLE">COPYSTYLE</a> +is <strong>DRAFT</strong>). +<br> + +<!---COPYSTYLE---> + +<hr width="66%" align="left"> +<p> +<a name="COPYSTYLE"></a> +Macro: <strong>COPYSTYLE</strong> <var>DRAFT | FINAL</var> + +<p> +<strong>Mom</strong>'s default <strong>COPYSTYLE</strong> is +<strong>FINAL</strong>, so you don't have to use this macro unless +you want to. +<p> +<strong>DRAFT</strong> starts your document on page 1, regardless +of whether you've requested a different starting page number +with +<a href="headfootpage.html#PAGENUMBER">PAGENUMBER</a>. +Page numbers are set in lower case roman numerals. +<strong>Mom</strong> puts a draft and revision number (from the +<a href="#DRAFT">DRAFT</a> +and +<a href="#REVISION">REVISION</a> +<a href="#REFERENCE_MACROS">Reference Macros</a>) +in +<a href="definitions.html#TERMS_HEADER">page headers</a> +along with all other information that normally appears there. +<p> +<strong>FINAL</strong> 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. +<br> +<hr> + +<!========================================================================> + +<a name="STYLE_BEFORE_START"><h2><u>Changing type/style parameters prior to START</u></h2></a> + +In the third (optional) part of setting up a document (see +<a href="#DOCPROCESSING_TUT">Tutorial -- setting up a mom document</a>), +you can use the +<a href="typsetting.html">typesetting macros</a> +to change <strong>mom</strong>'s document-wide defaults for margins, +line length, family, base point size, +<a href="definitions.html#TERMS_LEADING">leading</a>, +and justification style. +<p> +Two additional style concerns have to be addressed here (i.e. in +macros before +<a href="#START">START</a>): +changes to the +<a href="definitions.html#TERMS_DOCHEADER">docheader</a>, +and whether you want you want the document's nominal leading +adjusted to fill pages fully to the bottom margin. +<p> +<ul> + <li><a href="#TYPE_BEFORE_START">Using typesetting macros prior to START</a> + <p> + <li><a href="#DOC_LEAD_ADJUST">DOC_LEAD_ADJUST</a> + -- adjusting linespacing for equal, accurate bottom margins + <li><a href="#DOCHEADER">DOCHEADER</a> + -- turning the docheader off + <ul> + <li><a href="#DOCHEADER_CONTROL">Docheader control</a> + </ul> +</ul> + +<hr width="66%" align="left"> +<a name="TYPE_BEFORE_START"><h2><u>Using typesetting macros prior to START</u></h2></a> + +When used before the +<a href="#START">START</a> +macro, the following +<a href="typesetting.html#MACROS_TYPESETTING">typesetting macros</a> +have these meanings: +<p> +<pre> + L_MARGIN Left margin of pages, including headers/footers + R_MARGIN Right margin of pages, including headers/footers + T_MARGIN The point at which running text (i.e. not + headers/footers or page numbers) starts on each page + B_MARGIN The point at which running text (i.e. not + 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 <a href="#DOC_LEAD_ADJUST">DOC_LEAD_ADJUST</a> +</pre> + +Other macros that deal with type style, or refinements thereof +(<strong>KERN, LIGATURES, HY, WS, SS,</strong> etc.), behave normally. +It is not recommended that you set up tabs or indents prior to +<strong>START</strong>. +<p> +If you want to change any of the basic parameters above +<em>after</em> <strong>START</strong> and have them affect a +document globally (as if you'd entered them <em>before</em> +<strong>START</strong>), you must use the macros listed in +<a href="#DOC_PARAM_MACROS">Changing document-wide style parameters after START</a>. +<br> + +<!---DOC_LEAD_ADJUST---> + +<hr width="66%" align="left"> +<a name="DOC_LEAD_ADJUST"><h3><u>Adjusting document leading to fill pages</u></h3></a> +<br> +Macro: <strong>DOC_LEAD_ADJUST</strong> <var>toggle</var> +<br> +<em>*Must come after LS or AUTOLEAD and before START</em> + +<p> +<strong>DOC_LEAD_ADJUST</strong> is a special macro to adjust +document +<a href="definitions.html#TERMS_LEADING">leading</a> +so that bottom margins fall precisely where you expect. +<p> +If you invoke <strong>DOC_LEAD_ADJUST</strong>, <strong>mom</strong> +takes the number of lines that fit on the page at your requested +leading, then incrementally adds +<a href="definitions.html#TERMS_UNITS">machine units</a> +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. +<p> +<strong>Mom</strong> uses <strong>DOC_LEAD_ADJUST</strong> with +her default document settings, but if you invoke +<a href="typesetting.html#LS">LS</a> +or +<a href="typesetting.html#AUTOLEAD">AUTOLEAD</a> +prior to +<a href="#START">START</a>, +you have to do +<p> +<pre> + .DOC_LEAD_ADJUST +</pre> +in order to enable it. +<p> +If you don't like the idea of <strong>mom</strong> playing around +with the leading by default, you can turn adjusting off with +<p> +<pre> + .DOC_LEAD_ADJUST OFF +</pre> + +In this scenario, the maximum number of lines that fit on a page at +the current document leading determine where <strong>mom</strong> ends +a page. The effect will be that last lines usually fall (slightly) +short of your expected bottom margin. +<p> +<strong>NOTE:</strong> <strong>DOC_LEAD_ADJUST</strong>, if +used, must be invoked after +<a href="typesetting.html#LS">LS</a> +or +<a href="typesetting.html#AUTOLEAD">AUTOLEAD</a> +and before +<a href="#START">START</a> +<br> + +<!---DOCHEADER---> + +<hr width="66%" align="left"> +<a name="DOCHEADER"><h3><u>Managing the docheader</u></h3></a> +<br> +Macro: <strong>DOCHEADER</strong> <var><toggle> [ distance to advance from top of page ]</var> +<br> +<em>*Must come before START; distance requires a <a href="#TERMS_UNITOFMEASURE">unit of measure</a></em> + +<p> +By default, <strong>mom</strong> prints a +<a href="definitions.html#TERMS_DOCHEADER">docheader</a> +on the first page of any document (see +<a href="#DOCHEADER_DESC">below</a> +for a description of the docheader). If you don't want a docheader, +turn it off with +<p> +<pre> + .DOCHEADER OFF +</pre> + +<strong>DOCHEADER</strong> is a toggle macro, so the argument doesn't +have to be <strong>OFF</strong>; it can be anything you like. +<p> +If you turn the docheader off, <strong>mom</strong>, 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. +<p> +<pre> + .DOCHEADER OFF 1.5i +</pre> + +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 +<a href="definitions.html#TERMS_BASELINE">baseline</a> +of the first line of type. +<p> +<strong>TIP:</strong> Since no document processing happens until +you invoke +<a href="#START">START</a> +-- including anything to do with docheaders -- you can typeset +your own docheader prior to <strong>START</strong> (if you don't +like the way <strong>mom</strong> does things) and use +<strong>DOCHEADER OFF</strong> 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 <strong>.PSPIC</strong>; +see the <strong>grops</strong> man page for usage). + +<a name="DOCHEADER_CONTROL"><h3><u>How to change the look of docheaders: docheader control macros</u></h3></a> + +<p> +With +<a href="#PRINTSTYLE">PRINTSTYLE TYPEWRITE</a>, +the look of docheaders is carved in stone. +In +<a href="#PRINTSTYLE">PRINTSTYLE TYPESET</a>, +however, you can make a lot of changes. Macros that alter docheaders +MUST come before +<a href="#START">START</a>. +<a name="DOCHEADER_DESC"></a> +<p> +A typeset docheader has the following characteristics. Note that +title, subtitle, author, and document type are what you supply +with the +<a href="#REFERENCE_MACROS">reference macros</a>. +Any you leave out will not appear; <strong>mom</strong> will +compensate: +<p> +<pre> + 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 +</pre> + +The +<a href="definitions.html#TERMS_FAMILY">family</a> +is the prevailing family of the whole document. + +<h3><u>The docheader macros to:</u></h3> +<ol> + <li><a href="#CHANGE_START">Change the starting position</a> + <li><a href="#ADJUST_LEADING">Adjust the leading</a> + <li><a href="#CHANGE_FAMILY">Change the family of docheader elements</a> + <li><a href="#CHANGE_FONT">Change the font of docheader elements</a> + <li><a href="#CHANGE_SIZE">Adjust the size of docheader elements</a> + <li><a href="#CHANGE_ATTRIBUTE">Change the attribution string ("by")</a> +</ol> +<p> +<a name="CHANGE_START"><h3><u>1. Change the starting position</u></h3></a> +By default, a docheader starts on the same +<a href="definitions.html#TERMS_BASELINE">baseline</a> +as +<a href="definitions.html#TERMS_RUNNING">running text</a>. +If you'd like it to start somewhere else, use the macro +<kbd>.DOCHEADER_ADVANCE</kbd> and give it the distance you want +(measured from the top edge of the paper to the first baseline +of the docheader), like this: +<p> +<pre> + .DOCHEADER_ADVANCE 4P +</pre> + +A +<a href="definitions.html#TERMS_UNITOFMEASURE">unit of measure</a> +is required. +<p> +<strong>NOTE:</strong> If +<a href="headfootpage.html#HEADERS">HEADERS</a> +are <strong>OFF</strong>, <strong>mom</strong>'s normal top +margin for +<a href="definitions.html#TERMS_RUNNING">running text</a> +(7.5 +<a href="definitions.html#TERMS_PICASPOINTS">picas</a>) +changes to 6 picas (visually approx. 1 inch). Since the +first baseline of the docheader falls on the same baseline +as the first line of running text (on pages after page 1), +you might find the docheaders a bit high when headers are off. +Use +<a href="#CHANGE_START">DOCHEADER_ADVANCE</a> +to place them where you want. + + +<a name="ADJUST_LEADING"><h3><u>2. Adjust the leading</u></h3></a> +The +<a href="definitions.html#TERMS_LEADING">leading</a> 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: +<p> +<pre> + .DOCHEADER_LEAD +2p +</pre> + +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 +<a href="definitions.html#TERMS_UNITOFMEASURE">unit of measure</a> +is also required. + +<a name="CHANGE_FAMILY"><h3><u>3. Change the family of docheader elements</u></h3></a> +The following macros let you change the +<a href="definitions.html#TERMS_FAMILY">family</a> +of each docheader element separately: +<p> +<ul> +<li><strong>TITLE_FAMILY</strong> <var><family></var> +<li><strong>SUBTITLE_FAMILY</strong> <var><family></var> +<li><strong>AUTHOR_FAMILY</strong> <var><family></var> +<li><strong>DOCTYPE_FAMILY</strong> <var><family></var> (if +<a href="#DOCTYPE">DOCTYPE</a> is NAMED) +</ul> +<p> +Simply pass the appropriate macro the family you want. + +<a name="CHANGE_FONT"><h3><u>4. Change the font of docheader elements</u></h3></a> +The following macros let you change the +<a href="definitions.html#TERMS_FONT">font</a> +of each docheader element separately: +<p> +<ul> +<li><strong>TITLE_FONT</strong> <var>R | B | I | BI</var> +<li><strong>SUBTITLE_FONT</strong> <var>R | B | I | BI</var> +<li><strong>AUTHOR_FONT</strong> <var>R | B | I | BI</var> +<li><strong>DOCTYPE_FONT</strong> <var>R | B | I | BI</var> (if +<a href="#DOCTYPE">DOCTYPE</a> is NAMED) +</ul> +<p> +Simply pass the appropriate macro the font you want. <strong>R, +B, I</strong> and <strong>BI</strong> have the same meaning as +they do for +<a href="typesetting.html#FONT">FT</a>. + + +<a name="CHANGE_SIZE"><h3><u>5. Adjust the size of docheader elements</u></h3></a> +The following macros let you adjust the point size of each docheader +element separately. +<p> +<strong>Mom</strong> 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 +<a href="definitions.html#TERMS_UNITOFMEASURE">unit of measure</a>, +so there's no need to append a unit to the argument. Fractional point +sizes are allowed. +<p> +<ul> +<li><strong>TITLE_SIZE</strong> <var><+/-points></var> +<br> +default = +3.5 (+4 if docheader title is "Chapter #") +<li><strong>SUBTITLE_SIZE</strong> <var><+/-points></var> +<br> +default = +0 +<li><strong>AUTHOR_SIZE</strong> <var><+/-points></var> +<br> +default = +0 +<li><strong>DOCTYPE_SIZE</strong> <var><+/-points></var> (if +<a href="#DOCTYPE">DOCTYPE</a> is NAMED) +<br> +default = +3 +</ul> +<p> +Simply pass the appropriate macro the size adjustment you want. + +<a name="CHANGE_ATTRIBUTE"><h3><u>6. Change the attribution string ("by")</u></h3></a> +If you're not writing in English, you can change what +<strong>mom</strong> prints where "by" appears in +docheaders. For example, +<p> +<pre> + .ATTRIBUTE_STRING "par" +</pre> + +changes "by" to "par". If you +don't want an attribution string at all, simply pass +<strong>ATTRIBUTE_STRING</strong> an empty argument, like this: +<p> +<pre> + .ATTRIBUTE_STRING "" +</pre> + +<strong>Mom</strong> will deposit a blank line where the +attribution string normally appears. +<p> +<strong>NOTE:</strong> 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 +<a href="definitions.html#TERMS_INLINES">inline escapes</a> +in the argument to <strong>ATTRIBUTE_STRING</strong>. For +example, +<p> +<pre> + .ATTRIBUTE_STRING "\f[HBI]\*S[-2p] by \*S[+2p]\*[PREV]" +</pre> + +would set "by" in Helvetica bold italic, 2 points +smaller than normal. +<br> +<hr> + +<!---COLUMNS_INTRO---> + +<a name="COLUMNS_INTRO"><h2><u>Setting documents in columns</u></h2></a> + +<p> +Setting documents in columns is easy with <strong>mom</strong>. (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 +<a href="definitions.html#TERMS_GUTTER">gutters</a>). +That's it. <strong>Mom</strong> takes care of everything else, from +soup to nuts. +<p> +<strong>SOME WORDS OF ADVICE:</strong> +<p> +If you want your type to achieve a pleasing +<a href="definitions.html#TERMS_JUST">justification</a> +or +<a href="definitions.html#TERMS_RAG">rag</a> +in columns, reduce the point size of type (and probably the +<a href="definitions.html#TERMS_LEADING">leading</a> +as well). <strong>Mom</strong>'s default document point +size is 12.5, which works well across her default 39 +<a href="definitions.html#TERMS_PICASPOINTS">pica</a> +full page line length, but with even just two columns on a page, +the default point size is awkward to work with. +<p> +Furthermore, you'll absolutely need to reduce the indents for +<a href="docelement.html#EPIGRAPH_CONTROL">epigraphs</a>, +<a href="docelement.html#QUOTE_GENERAL">quotes</a>, +and +<a href="docelement.html#BLOCKQUOTE_GENERAL">blockquotes</a> +(and probably the +<a href="docelement.html#PARA_INDENT">paragraph first-line indent</a> +as well). +<br> + +<!---COLUMNS---> + +<hr width="66%" align="left"> +<a name="COLUMNS"><h3><u>COLUMNS</u></h3></a> +<br> +Macro: <strong>COLUMNS</strong> <var><number of columns> <width of gutters></var> +<br> +<em>*Should be the last macro before START +<br> +The second argument requires a <a href="#TERMS_UNITOFMEASURE">unit of measure</a></em> + +<p> +<strong>COLUMNS</strong> takes two arguments: the number of +columns you want on document pages, and the width of the +<a href="definitions.html#TERMS_GUTTER">gutter</a> +between them. For example, to set up a page with two columns +separated by an 18 point gutter, you'd do +<p> +<pre> + .COLUMNS 2 18p +</pre> + +Nothing to it, really. However, as noted above, +<strong>COLUMNS</strong> should always be the last document +setup macro prior to +<a href="#START">START</a>. +<p> +<strong>NOTE:</strong> <strong>Mom</strong> ignores columns completely +when the +<a href="#PRINTSTYLE">PRINTSTYLE</a> +is <strong>TYPEWRITE</strong>. The notion of typewriter-style +output in columns is just too ghastly for her to bear. + +<h3><u>Breaking columns manually</u></h3> +<p> +<strong>Mom</strong> 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: <strong>COL_NEXT</strong> and <strong>COL_BREAK</strong>. + +<a name="COL_NEXT"></a> +<p> +<kbd>.COL_NEXT</kbd> breaks the line just before it, +<a href="definitions.html#TERMS_QUAD">quads</a> +it left (assuming the type is justified or quad left), and moves over +to the top of the next column. If the column happens to be the last +(rightmost) one on the page, <strong>mom</strong> 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. + +<a name="COL_BREAK"></a> +<p> +<kbd>.COL_BREAK</kbd> is almost the same, except that +instead of breaking and quadding the line preceding it, +she breaks and spreads it (see +<a href="typesetting.html#SPREAD">SPREAD</a>). +Use this macro whenever you need to start a new column in the middle +of a paragraph. +<p> +If you need <strong>COL_BREAK</strong> in the middle of a blockquote +or (god help us) an epigraph, you must do the following in order for +<strong>COL_BREAK</strong> to work: +<p> +<pre> + .SPREAD + \!.COL_BREAK +</pre> +<hr> + +<!========================================================================> + +<a name="START_MACRO"> +<h2><u>Initiate document processing</u></h2> +</a> + +In order to use <strong>mom</strong>'s document element macros +(tags), you have to tell her you want them. The macro to do this +is <strong>START</strong>. +<p> +<strong>START</strong> collects the information you gave +<strong>mom</strong> in the setup section at the top of your file (see +<a href="#DOCPROCESSING_TUT">Tutorial -- setting up a mom document</a>), +merges it with her defaults, sets up headers and page numbering, +and prepares <strong>mom</strong> to process your document using +the document element tags. No document processing takes place until +you invoke <strong>START</strong>. +<br> + +<!---START---> + +<hr width="66%" align="left"> +<p> +<a name="START"></a> +Macro: <strong>START</strong> +<br> +<em>*Required for document processing.</em> + +<p> +<strong>START</strong> takes no arguments. It simply instructs +<strong>mom</strong> to begin document processing. If you don't +want document processing (i.e. you only want the +<a href="typesetting.html#MACROS_TYPESETTING">typesetting macros</a>), +don't use <strong>START</strong>. +<p> +At a barest minimum before <strong>START</strong>, you must enter a +<a href="#PRINTSTYLE">PRINTSTYLE</a> +command. +<br> +<hr> + +<!========================================================================> + +<a name="DOC_PARAM_MACROS"> +<h2><u>Changing document-wide style parameters after START</u></h2> +</a> + +In the normal course of things, you change the basic type +parameters of a document <em>before</em> +<a href="#START">START</a>, +using +<a href="typesetting.html#MACROS_TYPESETTING">typesetting macros</a> +(<strong>L_MARGIN, FAMILY, PS, LS,</strong> etc). After +<strong>START</strong>, you must use the following macros to make +global changes to the basic type parameters of a document. +<br> + +<a name="INDEX_DOC_PARAM"> + <h3><u>Macro list</u></h3> +</a> +<ul> + <li><a href="#DOC_LEFT_MARGIN">DOC_LEFT_MARGIN</a> + <li><a href="#DOC_RIGHT_MARGIN">DOC_RIGHT_MARGIN</a> + <li><a href="#DOC_LINE_LENGTH">DOC_LINE_LENGTH</a> + <li><a href="#DOC_FAMILY">DOC_FAMILY</a> + <li><a href="#DOC_PT_SIZE">DOC_PT_SIZE</a> + <li><a href="#DOC_LEAD">DOC_LEAD</a> + <li><a href="#DOC_LEAD_ADJUST">DOC_LEAD_ADJUST</a> + <li><a href="#DOC_QUAD">DOC_QUAD</a> +</ul> + +<hr width="66%" align="left"> +<p> +<a name="DOC_LEFT_MARGIN"> + Macro: <strong>DOC_LEFT_MARGIN</strong> <var><left margin></var> +</a> +<br> +<em>*Requires a <a href="definitions.html#TERMS_UNITOFMEASURE">unit of measure</a></em> +<p> +<ul> + <li>the argument is the same as for + <a href="typesetting.html#L_MARGIN">L_MARGIN</a> + <li>changes all left margins to the new value + <li>the line length remains the same (i.e. the right margin + shifts when you change the left margin) +</ul> + +<br> + +<hr width="66%" align="left"> +<p> +<a name="DOC_RIGHT_MARGIN"> + Macro: <strong>DOC_RIGHT_MARGIN</strong> <var><right margin></var> +</a> +<br> +<em>*Requires a <a href="definitions.html#TERMS_UNITOFMEASURE">unit of measure</a></em> +<p> +<ul> + <li>the argument is the same as for + <a href="typesetting.html#R_MARGIN">R_MARGIN</a> + <li>changes all right margins to the new value + <li>all mom commands that include a right indent calculate + the indent from the new value +</ul> +<br> + +<hr width="66%" align="left"> +<p> +<a name="DOC_LINE_LENGTH"> + Macro: <strong>DOC_LINE_LENGTH</strong> <var><length></var> +</a> +<br> +<em>*Requires a <a href="definitions.html#TERMS_UNITOFMEASURE">unit of measure</a></em> +<p> +<ul> + <li>the argument is the same as for + <a href="typesetting.html#LL">LL</a> + <li>equivalent to changing the right margin with DOC_RIGHT_MARGIN +</ul> +<br> + +<hr width="66%" align="left"> +<p> +<a name="DOC_FAMILY"> + Macro: <strong>DOC_FAMILY</strong> <var><family></var> +</a> +<p> +<ul> + <li>the argument is the same as for + <a href="typesetting.html#FAMILY">FAMILY</a> + <li>globally changes the type family + <li>if you wish the + <a href="definitions.html#TERMS_HEADER">header</a> + and/or page number families to remain at their old values, + you must reset them with + <a href="headfootpage.html#HEADER_FAMILY">HEADER_FAMILY</a> + and + <a href="headfootpage.html#PAGENUM_FAMILY">PAGENUM_FAMILY</a> +</ul> +<br> + +<hr width="66%" align="left"> +<p> +<a name="DOC_PT_SIZE"> + Macro: <strong>DOC_PT_SIZE</strong> <var><point size></var> +</a> +<br> +<em>*Does not require a <a href="definitions.html#TERMS_UNITOFMEASURE">unit of measure</a>; points is assumed</em> +<p> +<ul> + <li>the argument is the same as for + <a href="typesetting.html#PS">PS</a>, + and refers to the point size of type in paragraphs + <li>all automatic point size changes (heads, quotes, + footnotes, headers, etc.) are affected by the new size; + anything you do not want affected must be reset to + its former value (see the Control Macros section of + the pertinent document element for instructions on + how to do this) +</ul> +<br> + +<hr width="66%" align="left"> +<p> +<a name="DOC_LEAD"> + Macro: <strong>DOC_LEAD</strong> <var><points> [ ADJUST ]</var> +</a> +<br> +<em>*Does not require a <a href="definitions.html#TERMS_UNITOFMEASURE">unit of measure</a>; points is assumed</em> +<p> +<ul> + <li>the argument is the same as for + <a href="typesetting.html#LS">LS</a>, + and refers to the + <a href="definitions.html#TERMS_LEAD">leading</a> + of paragraphs + <li>because paragraphs will have a new leading, the leading and + spacing of most running text is influenced by the new value + <li>epigraphs and footnotes remain unaffected; + if you wish to change their leading, use + <a href="docelement.html#EPIGRAPH_AUTOLEAD">EPIGRAPH_AUTOLEAD</a> + and + <a href="docelement.html#FOOTNOTE_AUTOLEAD">FOOTNOTE_AUTOLEAD</a>. + <li>the optional argument <strong>ADJUST</strong> performs + leading adjustment as explained in + <a href="#DOC_LEAD_ADJUST">DOC_LEAD_ADJUST</a> +</ul> +<p> +<strong>IMPORTANT:</strong> Do not use <strong>DOC_LEAD</strong> +in the middle of a page! Always precede it with a manual break +to a new page, like this: +<p> +<pre> + .NEWPAGE + .DOC_LEAD <new value> +</pre> + +<hr width="66%" align="left"> +<p> +<a name="DOC_QUAD"> + Macro: <strong>DOC_QUAD</strong> <var>L | R | C | J</var> +</a> +<p> +<ul> + <li>the arguments are the same as for + <a href="typesetting.html#QUAD">QUAD</a> + <li>affects paragraphs, epigraphs and footnotes; does not + affect blockquotes +</ul> + +<p> +<hr> +<a href="docelement.html#TOP">Next</a> +<a href="inlines.html#TOP">Prev</a> +<a href="#TOP">Top</a> +<a href="toc.html">Back to Table of Contents</a> +</body> +</html> 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 @@ +<html> +<head> +<meta http-equiv="content-type" content="text/html;charset=iso-8859-1"> +<title>Mom -- Goodies</title> +</head> +<body bgcolor="#dfdfdf"> + +<!====================================================================> + +<a href="inlines.html#TOP">Next</a> +<a href="typesetting.html#TOP">Prev</a> +<a href="toc.html">Back to Table of Contents</a> + +<a name="TOP"></a> +<a name="GOODIES"> + <h2><u>Goodies</u></h2> +</a> + +<a name="INTRO_GOODIES"></a> +The macros in this section are a collection of useful (and sometimes +nearly indispensible) routines to simplify typesetting. + +<a name="INDEX_GOODIES"> + <h3><u>Goodies list</u></h3> +</a> + +<ul> + <li><a href="#ALIAS">ALIAS</a> (rename macros) + <li><a href="#SILENT">SILENT</a> ("hide" input lines from output) + <li><a href="#TRAP">TRAP</a> (suspend/re-invoke traps) + <li><a href="#SMARTQUOTES">SMARTQUOTES</a> + <li><a href="#CAPS">CAPS</a> (convert to upper case) + <br> + <li><strong>Underscore/underline</strong> + <ul> + <li><a href="#UNDERSCORE">UNDERSCORE</a> (single underscore) + <li><a href="#UNDERSCORE2">UNDERSCORE2</a> (double underscore) + <li><a href="#UNDERLINE">UNDERLINE</a> (underline -- Courier only!) + <li><a href="#UL">\*[UL]</a> (inline escape to underline -- Courier only!) + </ul> + <li><strong>Padding</strong> + <ul> + <li><a href="#PAD">PAD</a> (insert equalized space into lines) + <li><a href="#PAD_MARKER">PAD_MARKER</a> (change/set the marker used with <strong>PAD</strong>) + </ul> + <li><strong>Leaders</strong> + <ul> + <li><a href="#LEADER">\*[LEADER]</a> (inline escape to add leaders to a line) + <li><a href="#LEADER_CHARACTER">LEADER_CHARACTER</a> (change/set the leader character) + </ul> + <li><strong>Drop caps</strong> + <ul> + <li><a href="#DROPCAP">DROPCAP</a> (set a drop cap) + <li><strong>Support macros for DROPCAP</strong> + <ul> + <li><a href="#DROPCAP_FAMILY">DROPCAP_FAMILY</a> (change drop cap family) + <li><a href="#DROPCAP_FONT">DROPCAP_FONT</a> (change drop cap font) + <li><a href="#DROPCAP_ADJUST">DROPCAP_ADJUST</a> (alter size of drop cap) + <li><a href="#DROPCAP_GUTTER">DROPCAP_GUTTER</a> (change space between drop cap and running text) + </ul> + </ul> + <li><strong>Superscript</strong> + <ul> + <li><a href="#SUP">\*[SUP]</a> (set superscript) + <li><a href="#CONDSUP">\*[CONDSUP]</a> (set condensed superscript) + <li><a href="#EXTSUP">\*[EXTSUP}</a> (set extended superscript) + </ul> +</ul> + +<!---ALIAS---> + +<hr width="66%" align="left"> +<a name="ALIAS"><h3><u>Rename macros</u></h3></a> +<br> +Macro: <strong>ALIAS</strong> <var><new name> <old name></var> + +<p> +The <strong>ALIAS</strong> 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 +<strong>mom</strong>; see the +<a href="reserved.html#RESERVED">list of reserved words</a>). +<p> +Groff has always been a bit intimidating for new users because +its standard macro packages use very terse macro names. +<strong>Mom</strong> 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, <strong>mom</strong> 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. +<p> +If you don't like one of <strong>mom</strong>'s macro names, +say, PAGEWIDTH, change it, like this: +<p> +<pre> + .ALIAS PW PAGEWIDTH + | | + new__| |__official + name name +</pre> + +The first argument to <strong>ALIAS</strong> is the new name you want +for a macro. The second is the "official" name by +which the macro is normally invoked. After <strong>ALIAS</strong>, +either can be used. +<p> +Note that in <strong>ALIAS</strong>, you do NOT include the period +(dot) that precedes the macro when it's a +<a href="definitions.html#TERMS_CONTROLLINES">control line</a>. +<p> +<strong>NOTE:</strong> If you use <strong>ALIAS</strong> a lot, +and always for the same things, consider creating an aliases +file of the form +<p> +<pre> + .ALIAS <new name> <old name> + .ALIAS <new name> <old name> + .ALIAS <new name> <old name> + ...etc +</pre> + +Put the file someplace convenient and source it at the +beginning of your documents using the groff +<a href="definitions.html#TERMS_PRIMITIVES">primitive</a> +<strong>.so</strong>. Assuming that you've created an aliases file +called mom_aliases in your home directory under a directory +called <code>Mom</code>, you'd source it by placing +<p> +<pre> + .so /home/<username>/Mom/mom_aliases +</pre> + +at the top of your documents. +<p> +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. +<p> +<strong>EXPERTS:</strong> <strong>ALIAS</strong> is an alias of +<code>.als</code>. You can use either, or mix 'n' match with +impunity. +<br> + +<!---SILENT---> + +<hr width="66%" align="left"> +<a name="SILENT"><h3><u>Hide input lines from output</u></h3></a> +<br> +Macro: <strong>SILENT</strong> <var>toggle</var> +<br> +Alias: <strong>COMMENT</strong> + +<p> +Sometimes, you want to "hide" +<a href="definitions.html#TERMS_INPUTLINE">input lines</a> +from final output. This is most likely to be the case when setting +up string tabs (see the +<a href="STRING_TABS_TUT">quickie tutorial on string tabs</a> +for an example), but there are other places where you might want input +lines to be invisible as well. Any place you don't want input lines +to appear in the output, use the <strong>SILENT</strong> macro. +<p> +<strong>SILENT</strong> is a toggle. Invoking it without an argument +turns it on; any argument turns it off. E.g., +<p> +<pre> + .SILENT + A line of text + .SILENT OFF +</pre> + +The line "A line of text" will not appear in the +output copy. +<p> +<strong>SILENT</strong> is aliased as <strong>COMMENT</strong>. +If you want to insert non-printing comments into your documents, +you may prefer this. +<p> +<strong>NOTE: SILENT</strong> does not automatically break an +<a href="definitions.html#TERMS_INPUTLINE">input line</a> +(see +<a href="typesetting.html#BR">BR</a>) +when you're in one of the +<a href="definitions.html#TERMS_FILLED">fill modes</a> +(<a href="typesetting.html#JUSTIFY">JUSTIFY</a> +or +<a href="typesetting.html#QUAD">QUAD L | R | C | J</a>). +The same applies to tabs +(<a href="typesetting.html#TAB_SET">typesetting</a> +or +<a href="typesetting.html#ST">string</a>) +to which you've passed the <strong>J</strong> or <strong>QUAD</strong> +argument. You must insert <code>.BR</code> yourself, or risk a +portion of your text disappearing into a black hole. +<br> + +<!---TRAP---> + +<hr width="66%" align="left"> +<a name="TRAP"><h3><u>Suspend/re-invoke traps</u></h3></a> +<br> +Macro: <strong>TRAP</strong> <var>toggle</var> + +<p> +Traps are vertical positions on the output page at which you or +<strong>mom</strong> 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. +<p> +Sometimes, traps get sprung when you don't want them, notably +when using the +<a href="#EL">EL</a> +and +<a href="#TN">TN</a> +macros. If this happens, surround just the offending macros and +input lines with +<p> +<pre> + .TRAP OFF + ... + .TRAP +</pre> + +<strong>TRAP</strong> is a toggle, therefore any argument +turns it off (i.e. suspends the trap), and no argument turns it +(back) on. +<p> +Have a look at the <strong>IMPORTANT</strong> sections +of <strong>EL</strong> and <strong>TN</strong> to see +<strong>TRAP</strong> in action. +<br> + +<!---SMARTQUOTES---> + +<hr width="66%" align="left"> +<a name="SMARTQUOTES"><h3><u>Smartquotes</u></h3></a> +<br> +Macro: <strong>SMARTQUOTES</strong> <var>toggle</var> + +<p> +<strong>SMARTQUOTES</strong> converts all instances of the +inch-mark, (<kbd>"</kbd> -- also called a "doublequote"), +into the appropriate instances of true open- and close-doublequotes. +<p> +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? +<p> +When preparing documents for typesetting, by all means, use the +inch-mark. Just make sure to turn <strong>SMARTQUOTES</strong> +on. <strong>SMARTQUOTES</strong> is a toggle, so invoking it with +no argument turns it on, and invoking it with any argument at all +turns it off. +<p> +If you're using the +<a href="docprocessing.html#DOCPROCESSING">document processing macros</a> +with +<a href="#PRINTSTYLE">PRINTSTYLE TYPESET</a>, +<strong>SMARTQUOTES</strong> is on by default; with +<a href="#PRINTSTYLE">PRINTSTYLE TYPEWRITE</a>, +it's off by default (and should probably stay that way). +<p> +<strong>NOTE:</strong> <strong>SMARTQUOTES</strong> 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: +<p> +<pre> + "But she said, `I don't want to!'" +</pre> + +<strong>ADDITIONAL NOTE:</strong> Whether or not you have +<strong>SMARTQUOTES</strong> turned on, get into the habit of entering +the foot- and inch-marks, when you need them, with the +<a href="definitions.html#TERMS_INLINES">inline escapes</a> +<strong>\*[FOOT]</strong> and <strong>\*[INCH]</strong>, instead +of <kbd>'</kbd> and <kbd>"</kbd>. +<br> + +<!---CAPS---> + +<hr width="66%" align="left"> +<a name="CAPS"><h3><u>Convert to upper case</u></h3></a> +<br> +Macro: <strong>CAPS</strong> <var>toggle</var> + +<p> +<strong>CAPS</strong> converts all lower case letters to upper +case. Primarily, it's a support macro used by the +<a href="docprocessing.html#DOCPROCESSING">document processing macros</a>, +but you may find it helpful on occasion. <strong>CAPS</strong> +is a toggle, therefore no argument turns it on, any argument +turns it off. +<p> +<pre> + .CAPS + All work and no play makes Jack a dull boy. + .CAPS OFF +</pre> + +produces, on output +<p> +<pre> + ALL WORK AND NO PLAY MAKES JACK A DULL BOY. +</pre> + +<!---UNDERSCORE---> + +<hr width="66%" align="left"> +<a name="UNDERSCORE"><h3><u>Single underscore</u></h3></a> +<br> +Macro: <strong>UNDERSCORE</strong> <var>[ <distance below baseline> ] "<string>"</var> +<br> +<em>*Optional argument requires a <a href="definitions.html#TERMS_UNITOFMEASURE">unit of measure</a></em> + +<p> +By default, <strong>UNDERSCORE</strong> places an underscore 2 points +beneath the required +<a href="definitions.html#TERMS_STRINGARGUMENT">string argument</a>. +The string must be enclosed in double-quotes, like this: +<p> +<pre> + .UNDERSCORE "Unmonitored monopolies breed high prices and poor products." +</pre> + +If you wish to change the distance of the rule from the +baseline, use the optional argument <i><distance below +baseline></i> (with a unit of measure). +<p> +<pre> + .UNDERSCORE 3p "Unmonitored monopolies breed high prices and poor products." +</pre> + +The above places the underscore 3 points below the baseline. +<p> +<a name="NOTES_UNDERSCORE"></a> +<strong>NOTES:</strong> +<br> +<strong>UNDERSCORE</strong> 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 <strong>UNDERSCORE</strong>. Each +<a href="definitions.html#TERMS_OUTPUTLINE">output line</a> +or portion of an output line you want underscored must be plugged +separately into <strong>UNDERSCORE</strong>. 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). +<p> +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 +<a href="#PRINTSTYLE">PRINTSTYLE TYPEWRITE</a>), +with the +<a href="#UNDERLINE">UNDERLINE</a> +macro. <strong>UNDERLINE</strong> is designed specifically for this +purpose, but works only with the Courier font. +<p> +<strong>Mom</strong> doesn't always get the position and length +of the underscore precisely right in +<a href="definitions.html#TERMS_JUST">justified</a> +copy, although she's fine with all the other +<a href="definitions.html#TERMS_FILLED">fill modes</a>, +as well as with the no-fill modes. As of this writing, I have +no solution to the occasional problems with justified copy. +<p> +<strong>UNDERSCORE</strong> tends to confuse +<strong>gxditview</strong>, even though the output, when +printed, looks fine. Generally, I recommend using <strong>gv</strong> +to preview files anyway. See the section on +<a href="#PREVIEWING">previewing</a>. +<br> + +<!---UNDERSCORE2---> + +<hr width="66%" align="left"> +<a name="UNDERSCORE2"><h3><u>Double underscore</u></h3></a> +<br> +Macro: <strong>UNDERSCORE2</strong> <var>[ <distance below baseline> [ <distance between rules> ] ] "<string>"</var> +<br> +<em>*Optional arguments require a <a href="definitions.html#TERMS_UNITOFMEASURE">unit of measure</a></em> + +<p> +By default, <strong>UNDERSCORE2</strong> places a double underscore +2 points beneath the required +<a href="definitions.html#TERMS_STRINGARGUMENT">string argument</a>. +The string must be enclosed in double-quotes, like this: +<p> +<pre> + .UNDERSCORE2 "Unmonitored monopolies breed high prices and poor products." +</pre> + +The default distance between the two rules is 2 points. +<p> +If you wish to change the distance of the double underscore from +the baseline, use the optional argument <i><distance below +baseline></i> (with a unit of measure), e.g., +<p> +<pre> + .UNDERSCORE2 3p "Unmonitored monopolies breed high prices and poor products." +</pre> + +which places the double underscore 3 points below the baseline. +<p> +If you wish to change the distance between the two rules as +well, use the second optional argument <i><distance between +rules></i> (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. +<p> +<strong>NOTE:</strong> the same restrictions and caveats apply +to <strong>UNDERSCORE2</strong> as to +<strong>UNDERSCORE</strong>. See the +<a href="#NOTES_UNDERSCORE">NOTES</a> +for <strong>UNDERSCORE</strong>. +<br> + +<!---UNDERLINE---> + +<hr width="66%" align="left"> +<a name="UNDERLINE"><h3><u>Underline text -- Courier font only!</u></h3></a> +<br> +Macro: <strong>UNDERLINE</strong> <var>toggle</var> + +<p> +If your font is Courier, or you're using the document processing macro +<a href="#PRINTSTYLE">PRINTSTYLE TYPEWRITE</a>, +<strong>UNDERLINE</strong> allows you to underline words and +passages that, in typeset copy, would be italicised. You invoke +<strong>UNDERLINE</strong> 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. +<p> +When on, <strong>UNDERLINE</strong> underlines letters, words +and numbers, but not punctuation or spaces. This makes for more +readable copy than a solid underline. +<p> +<strong>NOTE:</strong> Underlining may also be turned on and off +<a href="definitions.html#TERMS_INLINES">inline</a> +with the escapes +<a href="#UL">\*[UL]...\*[ULX].</a> +<br> + +<!---UL---> + +<hr width="66%" align="left"> +<a name="UL"><h3><u>Inline escape for underlining -- Courier font only!</u></h3></a> +<br> +Inline: <strong>\*[UL]...\*[ULX]</strong> + +<p> +If your font is Courier, or you're using the document processing macro +<a href="#PRINTSTYLE">PRINTSTYLE TYPEWRITE</a>, +<strong>\*[UL]...\*[ULX]</strong> underlines words and +passages that, in typeset copy, would be italicised. +<p> +<strong>\*[UL]</strong> 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, <strong>\*[ULX]</strong> turns underlining off. +<p> +The macro +<a href="#UNDERLINE">UNDERLINE</a> +and the inline escape <strong>\*[UL]</strong> are functionally +identical, hence +<p> +<pre> + .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 +</pre> + +produces the same result as +<p> +<pre> + .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] +</pre> + +<!---PAD---> + +<hr width="66%" align="left"> +<a name="PAD"><h3><u>Insert space into lines</u></h3></a> +<br> +Macro: <strong>PAD</strong> <var>"<string with pad markers inserted>"</var> + +<p> +With <strong>PAD</strong>, you can insert unspecified amounts of +whitespace into a line. +<p> +<strong>PAD</strong> calculates the difference between the length of +text on the line and the distance remaining to its end, then inserts +the difference (as whitespace) at the place(s) you specify. +<p> +Take, for example, the following relatively common typesetting +situation, found at the bottom of legal agreements: +<p> +<pre> + Date Signature | +</pre> + +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.) +<p> +The +<a href="#PADMARKER">pad marker</a> +(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): +<p> +<pre> + .LL 30P + .PAD "Date#Signature###" +</pre> + +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. +<p> +One rarely wants merely to insert space in a line; one usually +wants to fill it with something, hence <strong>PAD</strong> is +particularly useful in conjunction with +<a href="#STRING_TABS">string tabs</a>. +The following uses the Date/Signature example above, but adds +rules into the whitespace through the use of string tabs and +groff's line drawing function, +<a href="#INLINE_LINEDRAWING_GROFF">\l</a>. +<p> +<pre> + .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 +</pre> + +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 <strong>mom</strong> tries very hard to provide +consistent-looking, comprehensible alternatives to groff's +native +<a href="definitions.html#TERMS_INLINES">inline escapes</a>, +<strong>mom</strong> has not yet found a replacement for +<strong>\l</strong>. +<p> +Basically, what the example does is: +<br> +<ol> + <li>Pads the Date/Signature line (using the pad marker #), + encloses the padded space with two string tabs markers, + and outputs the line + <br> + <li>Sets the two string tabs (notice the use of + <a href="#EL">EL</a> + beforehand; you don't want <strong>mom</strong> + to advance a line at this point) + <br> + <li>Calls the first string tab and draws a rule to its full + length + <br> + <li>Calls the second tab with + <a href="#TN">TN</a> + (which moves to tab 2 and stays on the same baseline) + then draws a rule to the full length of string tab 2 +</ol> +<br> +Often, when setting up string tabs this way, you don't want the +padded line to print immediately. To accomplish this, use +<a href="#SILENT">SILENT</a>. +See the <a href="#STRING_TABS_TUT">quickie tutorial on string tabs</a> +for an example. +<p> +<strong>NOTE:</strong> 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 <a href="#PAD_MARKER">PAD_MARKER</a>. Also, be aware +that # as a pad marker only applies within the <strong>PAD</strong> +macro; at all other times it prints literally, just as you'd expect. +<p> +Another important consideration when using <strong>PAD</strong> 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 +<a href="definitions.html#TERMS_INLINES">inline escapes</a> +<strong>\(lq</strong> and <strong>\(rq</strong> (leftquote and +rightquote respectively) whenever double-quotes are required in the +string passed to <strong>PAD</strong>. +<br> + +<!---PAD_MARKER---> + +<hr width="66%" align="left"> +<a name="PAD_MARKER"><h3><u>Change/set the marker used with PAD</u></h3></a> +<br> +Macro: <strong>PAD_MARKER</strong> <var><character to use as the pad marker></var> + +<p> +If you need to change <strong>mom</strong>'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 +<strong>PAD_MARKER</strong>, whose argument is the new pad marker +character you want. +<p> +<pre> + .PAD_MARKER @ +</pre> + +changes the pad marker to @. +<p> +Once you've changed the pad marker, the new marker remains in +effect for every instance of +<a href="#PAD">PAD</a> +until you change it again (say, back to the pound sign). +<br> + +<!---\*[LEADER]---> + +<hr width="66%" align="left"> +<a name="LEADER"><h3><u>Inline escape to add leaders to a line</u></h3></a> +<br> +Inline: <strong>\*[LEADER]</strong> + +<p> +Whenever you want to fill a line or tab with +<a href="definitions.html#TERMS_LEADER">leaders</a>, +use the +<a href="definitions.html#TERMS_INLINES">inline escape</a> +<strong>\*[LEADER]</strong>. The remainder of the line or tab will be +filled with the leader character. <strong>Mom</strong>'s +default leader character is a period (dot), but you can change +it to any character you like with +<a href="#LEADER_CHARACTER">LEADER_CHARACTER</a>. +<p> +<strong>NOTE:</strong> <strong>\*[LEADER]</strong> fills lines +or tabs right to their end. You cannot insert leaders into a +line or tab and have text following the leader on the same line +or in the same tab. Should you wish to achieve such an effect +typographically, create tabs for each element of the line and +fill them appropriately with the text and leaders you need. +<a href="#STRING_TABS">String tabs</a> are perfect for this. An +example follows. +<p> +<pre> + .LL 30P + .PAD "Date\*[ST1]#\*[ST1X]Signature\*[ST2]###\*[ST2X]" + .EL + .ST 1 J + .ST 2 J + .TAB 1 + \*[LEADER] + .TN + \*[LEADER] + .TQ +</pre> + +The <strong>PAD</strong> 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: +<p> +<pre> + Date.............Signature..................................... +</pre> + +<!---LEADER_CHARACTER---> + +<hr width="66%" align="left"> +<a name="LEADER_CHARACTER"><h3><u>Change/set the leader character</u></h3></a> +<br> +Macro: <strong>LEADER_CHARACTER</strong> <var><character></var> + +<p> +<strong>LEADER_CHARACTER</strong> takes one argument: a single +character you would like to be used for +<a href="definitions.html#TERMS_LEADER">leaders</a>. +(See +<a href="#LEADER">\*[LEADER]</a> for an explanation of how to +fill lines with leaders.) +<p> +For example, to change the leader character from <strong>mom</strong>'s +default (a period) to the underscore character, enter +<p> +<pre> + .LEADER_CHARACTER _ +</pre> + +<!---DROPCAP---> + +<hr width="66%" align="left"> +<a name="DROPCAP"><h3><u>Drop caps</u></h3></a> +<br> +Macro: <strong>DROPCAP</strong> <var><dropcap letter> <number of lines to drop> [ COND <percentage> | EXT <percentage> ]</var> + +<p> +The first two arguments to <strong>DROPCAP</strong> are the letter you +want to be the +<a href="definitions.html#TERMS_DROPCAP">drop cap</a> +and the number of lines you want it to drop. By default, +<strong>mom</strong> uses the current family and font for the drop cap. +<p> +The optional argument (COND or EXT) indicates that you want the +drop cap condensed (narrower) or extended (wider). If you use +<strong>COND</strong> or <strong>EXT</strong>, 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. +<p> +<strong>Mom</strong> will do her very best to get the drop cap to +line up with the first line of text indented beside it, then set +the correct number of indented lines, and restore your left margin +when the number of drop cap lines has been reached. +<p> +Beginning a paragraph with a drop cap "T" looks +like this: +<p> +<pre> + .DROPCAP T 3 COND 90 + he thousand injuries of Fortunato I had borne as best I + could, but when he ventured upon insult, I vowed revenge. + You who so well know the nature of my soul will not suppose, + however, that I gave utterance to a threat... +</pre> + +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. +<p> +<strong>NOTE:</strong> When using the +<a href="docprocessing.html#DOCPROCESSING">document processing macro</a> +<a href="#PP">PP</a>, +<strong>DROPCAP</strong> only works +<br> +<ul> + <li>with initial paragraphs (i.e. at the start of the document, + or after + <a href="#HEAD">HEAD</a>), + <li>when <strong>DROPCAP</strong> comes immediately after <strong>PP</strong>, + <li>and when the + <a href="docprocessing.html#PRINTSTYLE">PRINTSTYLE</a> + is TYPESET. +</ul> +<br> +If these conditions aren't met, <strong>DROPCAP</strong> is silently ignored. +<p> +<strong>WARNING:</strong> <strong>DROPCAP</strong> 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 <strong>mom</strong> does her thing. + +<h3><a name="DROPCAP_SUPPORT"><u>Support macros for DROPCAP</u></a></h3> +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. +<p> +<strong>Mom</strong> solves the last of these problems with the +<strong>COND</strong> and <strong>EXT</strong> arguments. The +rest she solves with macros that change the default behaviour of +<strong>DROPCAP</strong>, namely +<p> +<a href="#DROPCAP_FAMILY">DROPCAP_FAMILY</a>, +<br> +<a href="#DROPCAP_FONT">DROPCAP_FONT</a>, +<br> +<a href="#DROPCAP_ADJUST">DROPCAP_ADJUST</a> +<br> +and +<br> +<a href="#DROPCAP_GUTTER">DROPCAP_GUTTER</a>. +<p> +These macros must, of course, come before you invoke +<strong>DROPCAP</strong>. + +<h3><a name="DROPCAP_FAMILY"><u>DROPCAP_FAMILY</u></a></h3> + +Set the drop cap family by giving +<strong>DROPCAP_FAMILY</strong> the name of the family you want, +e.g. +<p> +<pre> + .DROPCAP_FAMILY H +</pre> + +which will set the family to Helvetica for the drop cap only. + +<h3><a name="DROPCAP_FONT"><u>DROPCAP_FONT</u></a></h3> + +Set the drop cap font by giving +<strong>DROPCAP_FONT</strong> the name of the font you want, +e.g. +<p> +<pre> + .DROPCAP_FONT I +</pre> + +which will set the font to italic for the drop cap only. + +<h3><a name="DROPCAP_ADJUST"><u>DROPCAP_ADJUST</u></a></h3> + +If the size <strong>mom</strong> calculates for the drop cap +isn't precisely what you want, you can increase or decrease it +with <strong>DROPCAP_ADJUST</strong>, like this: +e.g. +<p> +<pre> + .DROPCAP_ADJUST +1 + or + .DROPCAP_ADJUST -.75 +</pre> + +<strong>DROPCAP_ADJUST</strong> only understands +<a href="definitions.html#TERMS_PICASPOINTS">points</a>, +therefore do not append any +<a href="definitions.html#TERMS_UNITOFMEASURE">unit of measure</a> +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. + +<h3><a name="DROPCAP_GUTTER"><u>DROPCAP_GUTTER</u></a></h3> + +By default, <strong>mom</strong> puts three points of space +between the drop cap and the text indented beside it. If you +want another value, use <strong>DROPCAP_GUTTER</strong> (with a +unit of measure), like this: +<p> +<pre> + .DROPCAP_GUTTER 6p +</pre> + +<!---\*[SUP]---> + +<hr width="66%" align="left"> +<a name="SUP"><h3><u>Superscript</u></h3></a> +<br> +Inlines: <strong>\*[SUP]...\*[SUPX]</strong> + +<p> +Superscripts are accomplished +<a href="definitions.html#TERMS_INLINES">inline</a>. +Whenever you need one, typically for numerals, all you need to +do is surround the superscript with the inlines above. +<strong>\*[SUP]</strong> begins superscripting; +<strong>\*[SUPX]</strong> turns it off. +<a name="CONDSUP"></a> +<a name="EXTSUP"></a> +<p> +If your running type is +<a href="#COND_INLINE">pseudo-condensed</a> +or +<a href="#EXT_INLINE">pseudo-extended</a> +and you want your superscripts to be equivalently pseudo-condensed or +-extended, use <strong>\*[CONDSUP]...\*[CONDSUPX]</strong> or +<strong>\*[EXTSUP]...\*[EXTSUPX]</strong>. +<p> +The superscript inlines are primarily used by the +<a href="docprocessing.html#DOCPROCESSING">document processing macros</a> +for automatic generation of numbered footnotes. However, you may +find them useful for other purposes. +<p> +<strong>NOTE:</strong> <strong>Mom</strong> 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 <strong>mom</strong> 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 +<strong>mom</strong> will receive eternal blessings not only in this +lifetime, but in all lifetimes to come. + +<p> +<hr> +<a href="inlines.html#TOP">Next</a> +<a href="typesetting.html#TOP">Prev</a> +<a href="#TOP">Top</a> +<a href="toc.html">Back to Table of Contents</a> +</body> +</html> 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 @@ +<html> +<head> +<meta http-equiv="content-type" content="text/html;charset=iso-8859-1"> +<title>Mom -- Document processing: headers, footers and pagination</title> +</head> +<body bgcolor="#dfdfdf"> + +<!====================================================================> + +<a href="rectoverso.html#TOP">Next</a> +<a href="docelement.html#TOP">Prev</a> +<a href="toc.html">Back to Table of Contents</a> + +<a name="TOP"></a> +<a name="HEADFOOTPAGE"> + <h2 align="center"><u>DOCUMENT HEADERS, FOOTERS, AND PAGINATION</u></h2> +</a> + +<ul> + <li><a href="#HEADFOOTPAGE_INTRO">Introduction -- VERY IMPORTANT; read me!</a> + <ul> + <li><a href="#PAGINATION_NOTE">An important note on pagination</a> + </ul> + <li><a href="#DESCRIPTION_GENERAL">General description of headers/footers</a> + <li><a href="#HEADER_STYLE">Default specs for headers/footers</a> + <li><a href="#VERTICAL_SPACING">Vertical placement and spacing of headers/footers</a> + <li><a href="#HEADFOOT_MANAGEMENT">Managing headers/footers</a> + <ul> + <li><a href="#HEADERS">HEADERS</a> -- on or off + <li><a href="#FOOTERS">FOOTERS</a> -- on or off + <li><a href="#FOOTER_ON_FIRST_PAGE">FOOTER_ON_FIRST_PAGE</a> + </ul> + <li><a href="#HEADFOOT_CONTROL">Control macros for headers/footers</a> + <ul> + <li><a href="#HDRFTR_STRINGS">Header/footer strings</a> + <li><a href="#HDRFTR_STYLE">Header/footer style</a> + <ul> + <li><a href="#HDRFTR_STYLE_GLOBAL">Global style control</a> + <li><a href="#HDRFTR_STYLE_PART">Part-by-part style control</a> + </ul> + <li><a href="#HDRFTR_VERTICAL">Vertical placement and spacing</a> + <ul> + <li><a href="#HDRFTR_MARGIN">HEADER_MARGIN</a> + <li><a href="#HDRFTR_GAP">HEADER_GAP</a> + </ul> + <li><a href="#HDRFTR_SEPARATOR">The header/footer separator rule</a> + <ul> + <li><a href="#HDRFTR_RULE">HEADER_RULE</a> -- on or off + <li><a href="#HDRFTR_RULE_GAP">HEADER_RULE_GAP</a> -- distance of rule from header/footer + </ul> + </ul> + <li><a href="#PAGINATION">Pagination</a> +</ul> + +<a name="HEADFOOTPAGE_INTRO"> + <h2><u>Introduction</u></h2> +</a> + +<p> +<a href="definitions.html#TERMS_HEADER">Headers</a> +and +<a href="definitions.html#TERMS_FOOTER">footers</a>, +as defined in the section +<a href="definitions.html#TERMS_MOM">Mom's Document Processing Terms</a>, +are those parts of a document that contain information about the document +itself which appear in the margins either above or below +<a href="definitions.html#TERMS_RUNNING">running text</a>. +They are, in all respects but two, identical. The differences are: +<p> +<ol> + <li>headers appear in the margin <em>above</em> running text while + footers appear in the margin <em>beneath</em> running text; + <li>the (optional) rule that separates headers from running + text appears <em>below</em> the header while + the (optional) rule that separates footers from running + text appears <em>above</em> the footer. +</ol> +<a name="HEADERFOOTER"></a> +<p> +Because headers and footers are virtually identical, this +documentation addresses itself only to headers. In all cases, +unless otherwise noted, descriptions of headers +describe footers as well. +<p> +Furthermore, any +<a href="definitions.html#TERMS_CONTROLMACRO">control macro</a> +that begins with <strong>HEADER_</strong> may be used to control +footers, simply by replacing <strong>HEADER_</strong> with +<strong>FOOTER_</strong>. +<p> +<strong>Author's note:</strong> Left to their own devices (i.e. if +you're happy with the way <strong>mom</strong> 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. +<a name="PAGINATION_NOTE"></a> +<p> +<strong>NOTE:</strong> While the single page number that +<strong>mom</strong> generates in either the top or bottom margin +above or below running text is technically a kind of header/footer, +<strong>mom</strong> and this documentation treat it as a +separate page element. + +<a name="DESCRIPTION_GENERAL"><h3><u>General description of headers/footers</u></h3></a> +<p> +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. +<p> +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. +<p> +<strong>A note to groff experts:</strong> Although +<strong>mom</strong>'s headers resemble the three-part titles generated +by <code>.tl</code>, they're in no way related to it, nor based +upon it. <code>.tl</code> is not used at all in <strong>mom</strong>. +<p> +Normally, <strong>mom</strong> fills headers with strings appropriate +to the document type selected with +<a href="docprocessing.html#DOCTYPE">DOCTYPE</a>. +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. +<p> +By default, <strong>mom</strong> prints a horizontal rule beneath +headers to separate them visually from running text. In the case of +footers, the rule is <em>above</em> running text. You can increase +or decrease the space between the header and the rule if you like (with +<a href="#HDRFTR_RULE_GAP">HEADER_RULE_GAP</a>), +or remove it completely. + +<a name="HEADER_STYLE"><h3><u>Default specs for headers/footers</u></h3></a> +<p> +<strong>Mom</strong> 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 +<strong>mom</strong> puts by default in each part are explained in +<a href="docprocessing.html#DOCTYPE">DOCTYPE</a>.) +<p> +<strong>NOTE:</strong> Except for capitalization (all caps or +caps/lower-case), these defaults apply only to +<a href="docprocessing.html#PRINTSTYLE">PRINTSTYLE TYPESET</a>. +<p> +<pre> +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 +</pre> + +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, <strong>mom</strong> has a special macro, +<a href="#HDRFTR_PLAIN">HEADER_PLAIN</a>, +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. +<a name="VERTICAL_SPACING"><h3><u>Vertical placement and spacing of headers/footers</u></h3></a> +<p> +As explained in the section on +<a href="typedocmac.html">typesetting macros in document processing</a>, +the top and bottom margins of a <strong>mom</strong> document +are the vertical start and end positions of +<a href="definitions.html#TERMS_RUNNING">running text</a>, +not the vertical positions of headers or footers, which, by definition, +appear in the margin <em>above</em> (or below) running text. +<p> +The vertical placement of headers +is controlled by the macro +<a href="#HDRFTR_MARGIN">HEADER_MARGIN</a>, +which establishes the +<a href="definitions.html">baseline</a> +position of headers relative to the <em>top</em> edge of the page. +The header rule, whose position is relative to the header itself, +is controlled by a separate macro. +<strong>FOOTER_MARGIN</strong> establishes the baseline position of +footers relative to the <em>bottom</em> edge of the page. +<p> +<a href="#HDRFTR_GAP">HEADER_GAP</a> establishes +the distance between headers and the <em>start</em> of running text (effectively +making <strong>HEADER_MARGIN + HEADER_GAP</strong> the top margin of +running text unless you give <strong>mom</strong> a literal top margin +(with +<a href="typesetting.html#T_MARGIN">T_MARGIN</a>), +in which case she ignores <strong>HEADER_GAP</strong> and starts +running text at whatever top margin you gave. +<strong>FOOTER_GAP</strong> and +<a href="typesetting.html#B_MARGIN">B_MARGIN</a> +work similarly, except they determine where running text +<em>ends</em> on the page. +<p> +Confused? <strong>Mom</strong> apologizes. It's really quite +simple. By default, <strong>mom</strong> sets headers 4-1/2 +<a href="definitions.html#TERMS_PICASPOINTS">picas</a> +down from the top of the page and starts running text 3 picas (the +<strong>HEADER_GAP</strong>) beneath that, which means the +effective top margin of running text is 7-1/2 picas (visually approx. 1 +inch). If you give <strong>mom</strong> a literal top margin (with +<a href="typesetting.html#T_MARGIN">T_MARGIN</a>), +she ignores the <strong>HEADER_GAP</strong> and starts running +text at whatever top margin you gave. +<p> +Footers are treated the same way, the only difference being the +default distances. <strong>Mom</strong> sets footers 3 picas up from +the bottom of the page, and interrupts the processing of running text 3 +picas (the <strong>FOOTER_GAP</strong>) above that (again, visually +approx. 1 inch). If you give <strong>mom</strong> a literal bottom +margin (with <a +href="typesetting.html#B_MARGIN">B_MARGIN</a>), she ignores the +<strong>FOOTER_GAP</strong> and interrupts the processing of running +text at whatever bottom margin you gave. +<p> +If <strong>mom</strong> is paginating your document (she +does, by default, at the bottom of each page), the vertical +spacing and placement of page numbers, whether at the top +or the bottom of the page, is managed exactly as if the +page numbers were headers (or footers), and are controlled +by the same macros. See +<a href="#PAGINATION">Pagination control</a>. +<br> +<hr> + +<!========================================================================> + +<a name="HEADFOOT_MANAGEMENT"> + <h2><u>Managing headers/footers</u></h2> +</a> + +<p> +The following are the basic macros for turning +<a href="definitions.html#TERMS_HEADER">headers</a> +or +<a href="definitions.html#TERMS_FOOTER">footers</a> +on or off. They should be invoked prior to +<a href="docprocessing.html#START">START</a>. +<p> +By default, <strong>mom</strong> prints page headers. If you turn +them off, she will begin +<a href="definitions.html#TERMS_RUNNING">running text</a> +on each page with a default top margin of 6 +<a href="definitions.html#TERMS_PICASPOINTS">picas</a> +unless you have requested a different top margin (with +<a href="typesetting.html#T_MARGIN">T_MARGIN</a>) +prior to +<a href="docprocessing.html#START">START</a>. +<p> +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 +<a href="#FOOTERS">FOOTERS</a>; +there's no need to turn headers off first. +<br> + +<!---HEADERS---> + +<hr width="66%" align="left"> +<p> +<a name="HEADERS"></a> +Macro: <strong>HEADERS</strong> <var>toggle</var> + +<p> +<a href="definitions.html#TERMS_HEADER">Page headers</a> +are on by default. If you don't want them, turn them off by +invoking <strong>HEADERS</strong> with any argument +(<strong>OFF, QUIT, END, X...</strong>), e.g. +<p> +<pre> + .HEADERS OFF +</pre> +<p> +<strong>NOTE:</strong> <strong>HEADERS</strong> automatically +disables +<a href="definitions.html#TERMS_FOOTER">footers</a> +(you can't have both), but not the page numbers that normally +appear at the bottom of the page. +<p> +<strong>ADDITIONAL NOTE:</strong> If <strong>HEADERS</strong> +are <strong>OFF</strong>, <strong>mom</strong>'s normal top +margin for +<a href="definitions.html#TERMS_RUNNING">running text</a> +(7.5 +<a href="definitions.html#TERMS_PICASPOINTS">picas</a>) +changes to 6 picas (visually approx. 1 inch). This does NOT apply +to the situation where footers have been explicitly turned on +(with +<a href="#FOOTERS">FOOTERS</a>). +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.) +<br> + +<!---FOOTERS---> + +<hr width="66%" align="left"> +<p> +<a name="FOOTERS"></a> +Macro: <strong>FOOTERS</strong> <var>toggle</var> + +<p> +<a href="definitions.html#TERMS_FOOTER">Page footers</a> +are off by default. If you want them instead of +<a href="definitions.html#TERMS_HEADER">headers</a> +(you can't have both), turn them on by invoking +<strong>FOOTERS</strong> without an argument, e.g. +<p> +<pre> + .FOOTERS +</pre> + +<p> +<strong>FOOTERS</strong> automatically disables headers, and +<strong>mom</strong> shifts the placement of page numbers from their +normal position at page bottom to the top of the page. +<p> +<strong>NOTE:</strong> By default, when footers are on, +<strong>mom</strong> does not print a page number on the first +page of a document, nor on first pages after +<a href="rectoverso.html#COLLATE">COLLATE</a>. +If you don't want this behaviour, you can change it with +<a href="#PAGENUM_ON_FIRST_PAGE">PAGENUM_ON_FIRST_PAGE</a>. +<br> + +<!---FOOTER_ON_FIRST_PAGE---> + +<hr width="66%" align="left"> +<p> +<a name="FOOTER_ON_FIRST_PAGE"></a> +Macro: <strong>FOOTER_ON_FIRST_PAGE</strong> <var>toggle</var> + +<p> +If you invoke +<a href="#FOOTERS">FOOTERS</a>, +<strong>mom</strong>, by default, does not print a footer on the +first page of the document. (The +<a href="definitions.html">docheader</a> +on page makes it redundant.) However, should you wish a footer on +page 1, invoke <strong>FOOTER_ON_FIRST_PAGE</strong> without any argument. +<br> +<hr> + +<a name="HEADFOOT_CONTROL"> + <h2><u>Control macros for headers/footers</u></h2> +</a> +<p> +Virtually every part of headers (see the paragraph on how +<a href="#HEADERFOOTER">"headers" means "footers"</a> +in the +<a href="#HEADFOOTPAGE_INTRO">introduction to headers/footers</a>) +can be designed to your own specifications. + +<a name="INDEX_REFERENCE"> + <h3><u>Header/footer control macros</u></h3> +</a> + +<ul> + <li><a href="#HDRFTR_STRINGS"><strong>STRINGS</strong></a> + <ul> + <li><a href="#HDRFTR_LEFT">HEADER_LEFT</a> + <li><a href="#HDRFTR_CENTER">HEADER_CENTER</a> + <li><a href="#HDRFTR_RIGHT">HEADER_RIGHT</a> + <li><a href="#PAGE_NUMBER_SYMBOL">Replacing header left, center or right with the page number</a> + <li><a href="#PAGE_NUMBER_INCL">Including the page number in header left, center or right</a> + </ul> + <li><a href="#HDRFTR_STYLE"><strong>STYLE</strong></a> + <ul> + <li><a href="#HDRFTR_STYLE_GLOBAL"><strong>Global changes</strong></a> + <li><a href="#HDRFTR_GLOBAL_FAMILY">HEADER_FAMILY</a> -- family for entire header + <li><a href="#HDRFTR_GLOBAL_SIZE">HEADER_SIZE</a> -- size for entire header + <li><a href="HDRFTR_PLAIN">HDRFTR_PLAIN</a> -- disable default adjustments to header parts + </ul> + <ul> + <li><a href="#HDRFTR_STYLE_PART"><strong>Part-by-part changes</strong></a> + <li><a href="#_FAMILY">_FAMILY</a> -- left, center or right family + <li><a href="#_FONT">_FONT</a> -- left, center or right font + <li><a href="#_SIZE">_SIZE</a> -- left, center or right size + <li><a href="#_CAPS">_CAPS</a> -- left, center or right all caps + </ul> + <li><a href="#HDRFTR_VERTICAL"><strong>VERTICAL PLACEMENT AND SPACING</strong></a> + <ul> + <li><a href="#HDRFTR_MARGIN">HEADER_MARGIN</a> + <li><a href="#HDRFTR_GAP">HEADER_GAP</a> + </ul> + <li><a href="#HDRFTR_SEPARATOR"><strong>SEPARATOR RULE</strong></a> + <ul> + <li><a href="#HDRFTR_RULE">HEADER_RULE</a> + <li><a href="#HDRFTR_RULE_GAP">HEADER_RULE_GAP</a> + </ul> +</ul> + +<!---HDRFTR_STRINGS---> + +<hr width="66%" align="left"> +<a name="HDRFTR_STRINGS"><h3><u>Header/footer strings</u></h3></a> +<p> +<a name="HDRFTR_LEFT"> + Macro: <strong>HEADER_LEFT</strong> <var>"<text of header left>" | #</var> +</a> +<br> +<a name="HDRFTR_CENTER"> + Macro: <strong>HEADER_CENTER</strong> <var>"<text of header center>" | #</var> +</a> +<br> +<a name="HDRFTR_RIGHT"> + Macro: <strong>HEADER_RIGHT</strong> <var>"<text of header right>" | #</var> +</a> + +<p> +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, <strong>mom</strong>, 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 <strong>HEADER_LEFT</strong> like this: +<p> +<pre> + .HEADER_LEFT "R. Stallman, E. Raymond" +</pre> + +Because the arguments to <strong>HEADER_LEFT, _CENTER,</strong> +and <strong>_RIGHT</strong> are +<a href="definitions.html#TERMS_STRINGARGUMENT">string arguments</a>, +they must be enclosed in double-quotes. +<p> +<strong>NOTE:</strong> Replace <strong>HEADER_</strong>, above, +with <strong>FOOTER_</strong> to change the strings in footers. +<br> + +<a name="PAGE_NUMBER_SYMBOL"> + <h3><u>Replacing header-left, -center or -right with the page number</u></h3> +</a> +If you would like the current page number to appear +header-left, -center, or -right <em>instead</em> of a text +string, invoke the appropriate macro, above, with the single +argument <code>#</code> (the "number" or +"pound" sign). Do <strong>NOT</strong> use +double-quotes. For example, +<p> +<pre> + .HEADER_CENTER # +</pre> + +will print the current page number in the center part of +headers. + +<a name="PAGE_NUMBER_INCL"> + <h3><u>Including the page number in header-left, -center or -right</u></h3> +</a> +If you would like to <em>include</em> the current page number in +the string you pass to <strong>HEADER_LEFT, _CENTER,</strong> or +<strong>_RIGHT</strong>, use the special +<a href="definitions.html#TERMS_INLINES">inline escape</a> +<code>\*[PAGE#]</code> in the string argument. +<p> +For example, say you have a document that's ten pages long, and +you want header-right to say "page <whichever> of 10", +invoke <strong>HEADER_RIGHT</strong> as follows: +<p> +<pre> + .HEADER_RIGHT "page \*[PAGE#] of 10" +</pre> + +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. +<br> +<hr> + +<!---HDRFTR_STYLE---> + +<a name="HDRFTR_STYLE"><h3><u>Header/footer style</u></h3></a> + +<p> +<a name="HDRFTR_STYLE_GLOBAL"><strong>Global changes</strong></a> +<p> +The following macros allow you to make changes that affect all +parts of the header at once. +<p> +<ul> + <li><a href="#HDRFTR_GLOBAL_FAMILY">HEADER_FAMILY</a> + <li><a href="#HDRFTR_GLOBAL_SIZE">HEADER_SIZE</a> + <li><a href="#HDRFTR_PLAIN">HEADER_PLAIN</a> +</ul> + +<hr width="33%" align="left"> +<p> +<a name="HDRFTR_GLOBAL_FAMILY"> + Macro: <strong>HEADER_FAMILY</strong> <var><family></var> +</a> + +<p> +By default, <strong>mom</strong> uses the default document family +for headers. If you would like her to use another +<a href="definitions.html#TERMS_FAMILY">family</a> +in headers, invoke <strong>HEADER_FAMILY</strong> with the identifier +for the family you want. The argument is the same as for the +typesetting macro +<a href="typesetting.html#FAMILY">FAMILY</a>. +<p> +<strong>NOTE:</strong> Replace <strong>HEADER_</strong>, above, +with <strong>FOOTER_</strong> to change the footer family. +<br> + +<hr width="33%" align="left"> +<p> +<a name="HDRFTR_GLOBAL_SIZE"> + Macro: <strong>HEADER_SIZE</strong> <var><+|-number of points></var> + <br> + <em>*Argument is relative to the point size of type in paragraphs</em> +</a> + +<p> +By default, <strong>mom</strong> 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 <strong>HEADER_SIZE</strong> with + or - the number of +<a href="definitions.html#TERMS_PICASPOINTS">points</a> +(fractions allowed) by which you want her to in/decrease the size +of headers. For example, +<p> +<pre> + .HEADER_SIZE +.75 +</pre> + +increases the size of every part of a header by 3/4 of a point while +respecting <strong>mom</strong>'s own little size changes. +<p> +See +<a href="docelement.html#CONTROL_MACRO_ARGS">Arguments to the control macros</a> +for an explanation of how control macros ending in +<strong>_SIZE</strong> work. +<p> +Normally, macros that control headers have no effect on +<a href="docprocessing.html#PRINTSTYLE">PRINTSTYLE TYPEWRITE</a>. +<strong>HEADER_SIZE</strong> is an exception. While all parts of a +header in <strong>PRINTSTYLE TYPEWRITE</strong> are the same size, you +can use <strong>HEADER_SIZE</strong> to reduce the header's point size. +You'll most likely require this when the +<a href="docprocessing.html#COPYSTYLE">COPYSTYLE</a> +is <strong>DRAFT</strong>, since portions of the header may overprint +if, say, the title of your document is very long. +<p> +<strong>NOTE:</strong> Replace <strong>HEADER_</strong>, above, +with <strong>FOOTER_</strong> to change the footer size. +<br> + +<hr width="33%" align="left"> +<p> +<a name="HDRFTR_PLAIN"> + Macro: <strong>HEADER_PLAIN</strong> +</a> + +<p> +By default, <strong>mom</strong> 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 <strong>mom</strong>'s defaults, +invoke <strong>HEADER_PLAIN</strong> by itself, with no argument. +<strong>Mom</strong> 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. +<p> +<strong>NOTE:</strong> Replace <strong>HEADER_</strong>, above, +with <strong>FOOTER_</strong> to disable <strong>mom</strong>'s +default behaviour for the various elements of footer style. +<br> + +<hr width="66%" align="left"> +<p> +<a name="HDRFTR_STYLE_PART"><strong>Part by part changes</strong></a> +<p> +<strong>NOTE:</strong> When using the following control macros, +replace "<POSITION>" by <strong>LEFT, CENTER,</strong> +or <strong>RIGHT</strong> as appropriate. +<p> +<ul> + <li><a href="_FAMILY">HEADER_<POSITION>_FAMILY</a> + <li><a href="_FONT">HEADER_<POSITION>_FONT</a> + <li><a href="_SIZE">HEADER_<POSITION>_SIZE</a> + <li><a href="_CAPS">HEADER_<POSITION>_CAPS</a> +</ul> + +<hr width="33%" align="left"> +<p> +<a name="_FAMILY"> + Macro: <strong>HEADER_<POSITION>_FAMILY</strong> <var><family></var> +</a> +<p> +Use <strong>HEADER_<POSITION>_FAMILY</strong> to change the +<a href="definitions.html#TERMS_FAMILY">family</a> +of any part of headers. See +<a href="docelement.html#CONTROL_MACRO_ARGS">Arguments to the control macros</a> +for an explanation of how control macros ending in +<strong>_FAMILY</strong> work. +<p> +<strong>NOTE:</strong> Replace <strong>HEADER_</strong>, above, +with <strong>FOOTER_</strong> to change a footer part's family. +<br> + +<hr width="33%" align="left"> +<p> +<a name="_FONT"> + Macro: <strong>HEADER_<POSITION>_FONT</strong> <var><font></var> +</a> +<p> +Use <strong>HEADER_<POSITION>_FONT</strong> to change the +<a href="definitions.html#TERMS_FONT">font</a> +of any part of headers. See +<a href="docelement.html#CONTROL_MACRO_ARGS">Arguments to the control macros</a> +for an explanation of how control macros ending in +<strong>_FONT</strong> work. +<p> +<strong>NOTE:</strong> Replace <strong>HEADER_</strong>, above, +with <strong>FOOTER_</strong> to change a footer part's font. +<br> + +<hr width="33%" align="left"> +<p> +<a name="_SIZE"> + Macro: <strong>HEADER_<POSITION>_SIZE</strong> <var><+|-number of points></var> +</a> +<p> +Use <strong>HEADER_<POSITION>_SIZE</strong> to change the size of any +part of headers (relative to the point size of type in +paragraphs). See +<a href="docelement.html#CONTROL_MACRO_ARGS">Arguments to the control macros</a> +for an explanation of how control macros ending in +<strong>_SIZE</strong> work. +<p> +<strong>NOTE:</strong> Replace <strong>HEADER_</strong>, above, +with <strong>FOOTER_</strong> to change a footer part's size. +<br> + +<hr width="33%" align="left"> +<p> +<a name="_CAPS"> + Macro: <strong>HEADER_<POSITION>_CAPS</strong> <var>toggle</var> +</a> +<p> +<strong>HEADER_<POSITION>_CAPS</strong> is a +<a href="definitions.html#TERMS_TOGGLE">toggle macro</a>. +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 +<a href="docprocessing.html#REFERENCE_MACROS">reference macros</a> +or as defined by you with the +<a href="#HDRFTR_STRINGS">header string control macros</a>, +simply invoke this macro (using the appropriate position) with no +argument. If you wish to turn capitalization off (say, for the +header-right string that <strong>mom</strong> capitalizes by +default), invoke the argument with any argument (e.g. <strong>OFF, +QUIT, END, X...</strong>). +<p> +<strong>NOTE:</strong> Replace <strong>HEADER_</strong>, above, +with <strong>FOOTER_</strong> to change a footer part's +capitalization style. +<br> +<hr> + +<!---HDRFTR_VERTICAL---> + +<a name="HDRFTR_VERTICAL"> + <h2><u>Header/footer vertical placement and spacing</u></h2> +</a> + +<p> +See +<a href="#VERTICAL_SPACING">Vertical placement and spacing of headers/footers</a> +for an explanation of how <strong>mom</strong> deals with +headers, footers, and top/bottom page margins. +<br> + +<!---HDRFTR_MARGIN---> + +<hr width="66%" align="left"> +<p> +<a name="HDRFTR_MARGIN"></a> +Macro: <strong>HEADER_MARGIN</strong> <var><distance to baseline of header></var> +<br> +<em>*Requires a <a href="definitions.html#TERMS_UNITOFMEASURE">unit of measure</a></em> + +<p> +Use <strong>HEADER_MARGIN</strong> to set the distance from the +top edge of the page to the +<a href="definitions.html#TERMS_BASELINE">baseline</a> +of type in headers. A unit of measure is required, and decimal +fractions are allowed. +<p> +<strong>Mom</strong>'s default header margin is 4-1/2 +<a href="definitions.html#TERMS_PICASPOINTS">picas</a>, +but if you want a different margin, say, 1/2-inch, do +<p> +<pre> + .HEADER_MARGIN .5i +</pre> + +If your document uses +<a href="definitions.html#TERMS_FOOTER">footers</a>, +replace <strong>HEADER_</strong>, above, with +<strong>FOOTER_</strong>. The argument to +<strong>FOOTER_MARGIN</strong> is the distance from the bottom +edge of the page to the baseline of type in footers. +<p> +<strong>Mom</strong>'s default footer margin is 3 +<a href="definitions.html#TERMS_PICASPOINTS">picas</a>. +<p> +<strong>NOTE:</strong> <strong>Mom</strong> uses +<strong>HEADER_MARGIN</strong> and +<strong>FOOTER_MARGIN</strong> to establish the baseline +position of page numbers in addition to headers and footers. +<p> +By default, page numbers appear at the bottom of the page, therefore +if you want the default position (bottom), but want to change the +baseline placement, use <strong>FOOTER_MARGIN</strong>. Conversely, +if page numbers are at the top of the page, either because you turned +<a href="#FOOTERS">FOOTERS</a> +on or because you instructed <strong>mom</strong> to put them +there with +<a href="#PAGENUM_POS">PAGENUM_POS</a>, +you'd use <strong>HEADER_MARGIN</strong> to change their +baseline placement. +<br> + +<!---HDRFTR_GAP---> + +<hr width="66%" align="left"> +<p> +<a name="HDRFTR_GAP"></a> +Macro: <strong>HEADER_GAP</strong> <var><distance from header to start of running text></var> +<br> +<em>*Requires a <a href="definitions.html#TERMS_UNITOFMEASURE">unit of measure</a></em> + +<p> +Use <strong>HEADER_GAP</strong> to set the distance from the +<a href="definitions.html#TERMS_BASELINE">baseline</a> +of type in headers to the start of +<a href="definitions.html#TERMS_RUNNING">running text</a>. +A unit of measure is required, and decimal fractions are allowed. +<p> +As explained in +<a href="#VERTICAL_SPACING">Vertical placement and spacing of headers/footers</a>, +<strong>HEADER_MARGIN + HEADER_GAP</strong> determine the +default vertical starting position of running text on the page +UNLESS you have given <strong>mom</strong> your own top margin +(with +<a href="typesetting.html#T_MARGIN">T_MARGIN</a>). If you give +a top margin, <strong>mom</strong> ignores +<strong>HEADER_GAP</strong>; running text starts at your stated +top margin. + +<p> +<strong>Mom</strong>'s default header gap is 3 +<a href="definitions.html#TERMS_PICASPOINTS">picas</a>, +but if you want a different gap, say, 2 centimeters, do +<p> +<pre> + .HEADER_GAP 2c +</pre> + +If your document uses +<a href="definitions.html#TERMS_FOOTER">footers</a>, +replace <strong>HEADER_</strong>, above, with +<strong>FOOTER_</strong>. The argument to +<strong>FOOTER_GAP</strong> is the distance from the +baseline of type in footers to the last baseline of running text +on the page. +<p> +As explained in +<a href="#VERTICAL_SPACING">Vertical placement and spacing of headers/footers</a>, +<strong>FOOTER_MARGIN + FOOTER_GAP</strong> determine the +default vertical end position of running text on the page +UNLESS you have given <strong>mom</strong> a bottom margin +(with +<a href="typesetting.html#B_MARGIN">B_MARGIN</a>). If you give +a bottom margin, <strong>mom</strong> ignores +<strong>FOOTER_GAP</strong>; running text ends at your stated +bottom margin. +<p> +<strong>Mom</strong>'s default footer gap is 3 +<a href="definitions.html#TERMS_PICASPOINTS">picas</a>. +<p> +<strong>NOTE:</strong> <strong>Mom</strong> uses +<strong>HEADER_GAP</strong> and +<strong>FOOTER_GAP</strong> 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 +<strong>FOOTER_GAP</strong>. If page numbers are at the top of the +page, change the gap between the number and the first line of running +text with <strong>HEADER_GAP</strong>. +<br> +<hr> + +<!---HDRFTR_SEPARATOR---> + +<a name="HDRFTR_SEPARATOR"> + <h2><u>Header/footer separator rule</u></h2> +</a> + +<p> +The header/footer separator rule is a modest horizontal rule, +set slightly below the header (or above the footer), that runs +the length of the +<a href="definitions.html#TERMS_HEADER">header</a> +and helps separate it visually from +<a href="definitions.html#TERMS_RUNNING">running text</a>. 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. +<p> +<ul> + <li><a href="#HDRFTR_RULE">HEADER_RULE</a> -- on or off + <li><a href="#HDRFTR_RULE_GAP">HEADER_RULE_GAP</a> -- distance of rule from header +</ul + +<!---HDRFTR_RULE---> + +<hr width="66%" align="left"> +<p> +<a name="HDRFTR_RULE"></a> +Macro: <strong>HEADER_RULE</strong> <var>toggle</var> + +<p> +By default, <strong>mom</strong> prints a header separator rule +underneath headers (or above footers). If you don't want the +rule, turn it off by invoking <strong>HEADER_RULE</strong> with any +argument (<strong>OFF, QUIT, END, X...</strong>), e.g. +<p> +<pre> + .HEADER_RULE OFF +</pre> + +To turn the rule (back) on, invoke <strong>HEADER_RULE</strong> +without any argument. +<p> +<strong>NOTE:</strong> Replace <strong>HEADER_</strong>, above, +with <strong>FOOTER_</strong> to enable/disable the printing of +the footer separator rule. (Most likely, if you're using +<a href="#FOOTERS">FOOTERS</a>, you'll want it off.) +<br> + +<!---HDRFTR_RULE_GAP---> + +<hr width="66%" align="left"> +<p> +<a name="HDRFTR_RULE_GAP"></a> +Macro: <strong>HEADER_RULE_GAP</strong> <var>distance of rule beneath header</var> +<br> +<em>*Requires a <a href="definitions.html#TERMS_UNITOFMEASURE">unit of measure</a></em> + +<p> +<strong>HEADER_RULE_GAP</strong> is the distance from the +<a href="definitions.html#TERMS_BASELINE">baseline</a> +of type in headers to the rule underneath. A unit of measure is +required, and decimal fractions are allowed. Please note that +<strong>HEADER_RULE_GAP</strong> has no effect on +<a href="#HEADER_GAP">HEADER_GAP</a> +(i.e. <strong>HEADER_RULE_GAP</strong> is NOT added to +<strong>HEADER_GAP</strong> when <strong>mom</strong> calculates +the space between headers and the start of +<a href="definitions.html#TERMS_RUNNING">running text</a>. +<p> +By default, the header rule gap is 4 +<a href="definitions.html#TERMS_PICASPOINTS">points</a>. +If you'd like to change it to, say, 1/4 +<a href="definitions.html#TERMS_EM">em</a>, do +<p> +<pre> + .HEADER_RULE_GAP .25m +</pre> + +<strong>NOTE:</strong> Replace <strong>HEADER_</strong>, above, +with <strong>FOOTER_</strong> if you're using +<a href="definitions.html#TERMS_FOOTER">footers</a> +and want to change the separator rule gap. In footers, the gap +is measured from the top of the tallest +<a href="definitions.html#TERMS_ASCENDER">ascender</a> +in the footer. +<br> +<hr> + +<a name="PAGINATION"> + <h2><u>Pagination</u></h2> +</a> + +<p> +By default, <strong>mom</strong> paginates documents. Page numbers +appear in the bottom margin of the page, centered between two hyphens. +As with all elements of <strong>mom</strong>'s document processing, +most aspects of pagination style can be altered to suit your taste +with control macros. +<br> + +<a name="INDEX_PAGINATION"> + <h3><u>Pagination macros list</u></h3> +</a> + +<ul> + <li><a href="#PAGINATE">PAGINATE</a> -- pagination on or off + <li><a href="#PAGENUMBER">PAGENUMBER</a> -- user-defined (starting) page number + <li><a href="#PAGENUM_STYLE">PAGENUM_STYLE</a> -- digits, roman numerals, etc + <li><a href="#PAGENUM_ON_FIRST_PAGE">PAGENUM_ON_FIRST_PAGE</a> -- applies only when footers are enabled + <li><a href="#PAGINATE_CONTROL">Control macros</a> +</ul> +<br> + +<!---PAGINATE---> + +<hr width="66%" align="left"> +<p> +<a name="PAGINATE"></a> +Macro: <strong>PAGINATE</strong> <var>toggle</var> +<br> +Alias: <strong>PAGINATION</strong> + +<p> +By default, <strong>mom</strong> paginates documents (in the bottom +margin). If you'd prefer she not paginate, turn pagination off +by invoking <strong>PAGINATE</strong> with any argument (<strong>OFF, +NO, QUIT, END, X...</strong>), e.g. +<p> +<pre> + .PAGINATE NO +</pre> + +To (re)start pagination, invoke <strong>PAGINATE</strong> +without any argument. +<br> + +<!---PAGENUMBER---> + +<hr width="66%" align="left"> +<p> +<a name="PAGENUMBER"></a> +Macro: <strong>PAGENUMBER</strong> <var><number></var> + +<p> +As is to be expected, pagination of documents begins at page 1. +If you'd prefer that <strong>mom</strong> begin with a different +number on the first page of a document, invoke +<strong>PAGENUMBER</strong> with the number you want. +<p> +<strong>PAGENUMBER</strong> need not be used only to give +<strong>mom</strong> a "first page" number. It can be used at +any time to tell <strong>mom</strong> what number you want a +page to have. Subsequent page numbers will, of course, be +incremented by 1 from that number. +<br> + +<!---PAGENUM_STYLE---> + +<hr width="66%" align="left"> +<p> +<a name="PAGENUM_STYLE"></a> +Macro: <strong>PAGENUM_STYLE</strong> <var>DIGIT | ROMAN | roman | ALPHA | alpha</var> + +<p> +<strong>PAGENUM_STYLE</strong> lets you tell +<strong>mom</strong> what kind of page numbering you want. +<p> +<table valign="baseline" summary="pagenumstyle"> +<tr><td>DIGIT<td align="center" width="15">=<td>arabic digits (1, 2, 3...) +<tr><td>ROMAN<td align="center" width="15">=<td>upper case roman numerals (I, II, III...) +<tr><td>roman<td align="center" width="15">=<td>lower case roman numerals (i, ii, iii...) +<tr><td>ALPHA<td align="center" width="15">=<td>upper case letters (A, B, C...) +<tr><td>alpha<td align="center" width="15">=<td>lower case letters (a, b, c...)</td></tr> +</table> +<br> + +<!---PAGENUM_ON_FIRST_PAGE---> + +<hr width="66%" align="left"> +<p> +<a name="PAGENUM_ON_FIRST_PAGE"></a> +Macro: <strong>PAGENUM_ON_FIRST_PAGE</strong> <var>toggle</var> + +<p> +This macro applies only if you've enabled +<a href="#FOOTERS">FOOTERS</a>. +If <strong>FOOTERS</strong> are on, <strong>mom</strong> automatically +places page numbers at the tops of pages except on +the first page of a document (or on first pages after +<a href="rectoverso.html#COLLATE">COLLATE</a>). If you'd +like the page number to appear on "first" pages when +footers are on, invoke <strong>PAGENUM_ON_FIRST_PAGE</strong> with +no argument. Any other argument turns the feature off (<strong>OFF, +QUIT, END, X...</strong>). +<p> +As with most of the <a +href="definitions.html#TERMS_CONTROLMACRO">control macros</a>, +<strong>PAGENUM_ON_FIRST_PAGE</strong> 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 +<strong>COLLATE</strong>, omit it before the first +<a href="docprocessing.html#START">START</a> +of the document, then invoke it either just before or after your +first <strong>COLLATE</strong>. +<br> +<hr> + +<!---PAGINATE_CONTROL---> + +<a name="PAGINATE_CONTROL"><h3><u>Pagination control macros</u></h3></a> + +<ol> + <li><a href="#PAGINATE_GENERAL">Family/font/size</a> + <li><a href="#PAGENUM_POS">Page number position (vertical and horizontal)</a> + <li><a href="#PAGENUM_HYPHENS">Enclose page numbers with hyphens (on or off)</a> +</ol> +<br> +<a name="PAGINATE_GENERAL"><h3><u>1. Page number family/font/size</u></h3></a> +<p> +See +<a href="#CONTROL_MACRO_ARGS">Arguments to the control macros</a>. +<p> +<pre> +.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) +</pre> + +<a name="PAGENUM_POS"><h3><u>2. Page number position</u></h3></a> +<p> +Macro: <strong>PAGENUM_POS</strong> <var>TOP | BOTTOM LEFT | CENTER | RIGHT</var> + +<p> +Use <strong>PAGENUM_POS</strong> to change the default position of +automatic page numbering. <strong>PAGENUM_POS</strong> requires +<em>two</em> arguments: a vertical position (TOP or BOTTOM) and a +horizontal position (LEFT or CENTER or RIGHT). +<p> +For example, if you turn both +<a href="definitions.html#TERMS_HEADER">headers</a> +and +<a href="definitions.html#TERMS_FOOTER">footers</a> +off (with <code>.HEADERS OFF</code> and <code>.FOOTERS +OFF</code)) and you want <strong>mom</strong> to number your +pages at the top right position, enter +<p> +<pre> + .PAGENUM_POS TOP RIGHT +</pre> + +<a name="#PAGENUM_HYPHENS"><h3><u>3. Enclose page numbers with hyphens (on or off)</u></h3></a> +By default, <strong>mom</strong> encloses page numbers between hyphens. +If you don't want this behaviour, invoke the macro +<strong>PAGENUM_HYPHENS</strong> with any argument (<strong>OFF, QUIT, END, X...</strong>), +like this: +<p> +<pre> + .PAGENUM_HYPHENS OFF +</pre> + +If, for some reason, you want to turn page number hyphens back +on, invoke the macro without an argument. + +<p> +<hr> +<a href="rectoverso.html#TOP">Next</a> +<a href="docelement.html#TOP">Prev</a> +<a href="#TOP">Top</a> +<a href="toc.html">Back to Table of Contents</a> +</body> +</html> 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 @@ +<html> +<head> +<meta http-equiv="content-type" content="text/html;charset=iso-8859-1"> +<title>Mom -- Inline escapes</title> +</head> +<body bgcolor="#dfdfdf"> + +<!====================================================================> + +<a href="docprocessing.html#TOP">Next</a> +<a href="goodies.html#TOP">Prev</a> +<a href="toc.html">Back to Table of Contents</a> + +<a name="TOP"></a> +<h2> + <a name="INLINE_ESCAPES"><u>Inline escapes</u></a> +</h2> + +<a href="#INLINE_ESCAPES_INTRO">Introduction to inline escapes</a> +<br> +<a href="#INDEX_INLINES">Index of inline escapes</a> +<br> + +<a name="INLINE_ESCAPES_INTRO"> + <h2><u>Introduction to inline escapes</u></h2> +</a> + +<a name="INTRO_INLINE_ESCAPES"> +Inline escapes, as described in the +<a href="definitions.html#TERMS_INLINES">groff terms</a> +section of this manual, are typesetting commands that appear in +text +<a href="definitions.html#TERMS_INPUTLINE">input lines</a>, +as opposed to macros and other +<a href="definitions.html#TERMS_CONTROLLINES">control lines</a> +that must appear on lines by themselves. +<p> +Aside from altering type parameters within a line, inlines also +tell groff about special characters -- em-dashes, bullets, +<a href="definitions.html#TERMS_FIGURESPACE">figure/digit-width spaces</a>, +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 +<a href="intro.html#CANONICAL">canonical reference materials</a> +should you need more information than is contained herein. +<p> +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 <strong>\e</strong> to print a literal +backslash.) +<p> +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. +<p> +<strong>Mom</strong> 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 +<a href="#INLINES_MOM">Mom's personal inlines</a>. +<p> +Despite <strong>mom</strong>'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 +<a href="intro.html#CANONICAL">canonical reference materials</a> +pertaining to groff. +<p> +<strong>HELPFUL BIT OF INFORMATION:</strong> Inline escapes can be used +in +<a href="docprocessing.html#DOCPROCESSING">document processing macros</a> +that take +<a href="definitions.html#TERMS_STRINGARGUMENT">string arguments</a>. +<p> +<a name="INDEX_INLINES"><h3><u>Inlines index</u></h3></a> +<ul> + <li><a name="INLINES_MOM"><strong>Mom's personal inlines</strong></a> + <ul> + <li><a href="#INLINE_FONTS_MOM">Changing fonts</a> + <li><a href="#INLINE_SIZE_MOM">Changing point size</a> + <li><a href="#INLINE_KERNING_MOM">Pairwise kerning</a> + <li><a href="#INLINE_HORIZONTAL_MOM">Horizontal movement</a> + <li><a href="#INLINE_VERTICAL_MOM">Vertical movement</a> + </ul> + <li><a name="INLINES_GROFF"><strong>Groff inline escapes</strong></a> + <ul> + <li><a href="#INLINE_FONTS_GROFF">Font control</a> <strong>\f</strong> + <li><a href="#INLINE_HORIZONTAL_GROFF">Inline horizontal motions</a> <strong>\h</strong> + <li><a href="#INLINE_VERTICAL_GROFF">Inline vertical motions</a> <strong>\v</strong> + <li><a href="#INLINE_STRINGWIDTH_GROFF">String width function</a> <strong>\w</strong> + <li><a href="#INLINE_LINEDRAWING_GROFF">Horizontal line drawing function</a> <strong>\l</strong> + <li><a href="#INLINE_CHARACTERS_GROFF">Special characters</a> + </ul> +</ul> +<hr> + +<!---INLINE_FONTS_MOM---> + +<h2><u>Mom's personal inlines</u></h2> + +<a name="INLINE_FONTS_MOM"><h3><u>Changing fonts</u></h3></a> + +<p> +<strong>Mom</strong> provides five inlines to change fonts +inline. +<p> +<table valign="baseline" summary="inlinefonts"> +<tr><td width="15"><td><strong>\*[ROM]</strong><td>Change font to roman +<tr><td><td><strong>\*[IT]</strong><td>Change font to italic +<tr><td><td><strong>\*[BD]</strong><td>Change font to bold +<tr><td><td><strong>\*[BDI]</strong><td>Change font to bold italic +<tr><td><td><strong>\*[PREV]</strong><td>Revert to previous font</td></tr> +</table> +<p> +See also +<a href="#INLINE_FONTS_GROFF">font control with \f</a> +for other ways to change fonts inline. + +<p> +<strong>NOTE:</strong> If you're using the +<a href="docprocessing.html#DOCPROCESSING">document processing macros</a>, +inline font changes remain in effect only for the duration of the +current macro. +<br> + +<!---INLINE_SIZE_MOM---> + +<hr width="66%" align="left"> +<a name="INLINE_SIZE_MOM"><h3><u>Changing point size</u></h3></a> + +<p> +<strong>Mom</strong>'s inline escape for changing point +size, sadly, does not observe her normal inline syntax +<strong>\*[whatever]</strong>. It's the only exception, and there's +no way around it. The escape for changing point size looks like this: +<p> +<pre> + \*S[size] +</pre> + +where "size" is the new size you want. For example, to +change the point size inline to 12 points, you'd enter +<p> +<pre> + \*S[12] +</pre> + +Notice that the new size does not require a +<a href="definitions.html#TERMS_UNITOFMEASURE">unit of measure</a>; +<a href="definitions.html#TERMS_PICASPOINTS">points</a> +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. +<p> +The size given to <strong>\*S</strong> 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. +<p> +<pre> + While she isn't perfect, \*S[+2]mom\*S[-2] isn't half bad. +</pre> + +<strong>NOTE:</strong> If you're accustomed to groff's usual way +of handling inline size requests (<kbd>\sN, \s±N, \s(NN, \s±(NN, +\s[NNN], \s±[NNN]</kbd>), feel free to continue with your old habits. +<strong>Mom</strong> doesn't care. +<br> + +<!---INLINE_KERNING_MOM---> + +<hr width="66%" align="left"> +<a name="INLINE_KERNING_MOM"><h3><u>Pairwise kerning</u></h3></a> + +<p> +Pairwise kerning means moving specific letter pairs closer +together or further apart (see +<a href="definitions.html#TERMS_KERN">Typesetting terms, kerning</a> +for more details). <strong>Mom</strong> permits inline pairwise +kerning through the use of the inline escapes +<p> +<table valign="baseline" summary="inlinekerning"> +<tr><td width="15"><td><strong>\*[BU1]...\*[BU36]</strong><td> +Move back 1...36 +<a href="definitions.html#TERMS_KERNUNITS">kern units</a> +<tr><td><td><strong>\*[FU1]...\*[FU36]</strong><td> +Move forward 1...36 +<a href="definitions.html#TERMS_KERNUNITS">kern units</a></td></tr> +</table> +<p> +For example, +<p> +<pre> + THE HUMAN COST OF COMMODIFYING FRESH W\*[BU4]ATER +</pre> + +moves the letter A in "WATER" four kern units closer +to the letter W. +<p> +<strong>NOTE:</strong> Using <strong>BU</strong> or <strong>FU</strong> +between characters pairs that are already automatically kerned +disables the automatic kerning and uses the value you give to +<strong>BU</strong> or <strong>FU</strong> instead. +<br> + +<!---INLINE_HORIZONTAL_MOM---> + +<hr width="66%" align="left"> +<a name="INLINE_HORIZONTAL_MOM"><h3><u>Horizontal inline movement</u></h3></a> + +<p> +If you need to move backward or forward on a line by a just few +points, use +<p> +<table valign="baseline" summary="inlinehorizontal"> +<tr><td width="15"><td><strong>\*[BP1]...\*[BP12]</strong><td> +Move back 1...12 points +<tr><td><td><strong>\*[FP1]...\*[FP12]</strong><td> +Move forward 1...12 points</td></tr> +</table> +<p> +For example, +<p> +<pre> + 1.\*[FP12]The Free Trade Play-Offs: WalMart 100, Mexico 0 +</pre> + +puts 12 points of space between "1." and +"The". +<p> +Both <strong>\*[FP]</strong> and <strong>\*[BP]</strong> accept +quarter points as well. Hence it's possible to do, for example, +<strong>\*[FP.5]</strong> or <strong>\*[BP1.25]</strong> or +<strong>\*[ALD3.75]</strong>. +<p> +<strong>NOTE:</strong> If you need to move forward or backward by +more than 12.75 points, or wish to use a +<a href="definitions.html#TERMS_UNITOFMEASURE">unit of measure</a> +other than points, use the groff inline +<a href="#INLINE_HORIZONTAL_GROFF">\h</a>. +<br> + +<!---INLINE_VERTICAL_MOM---> + +<hr width="66%" align="left"> +<a name="INLINE_VERTICAL_MOM"><h3><u>Vertical inline movement</u></h3></a> + +<p> +If you need to move up or down in a line by a just few +points, use +<p> +<table valign="baseline" summary="inlinevertical"> +<tr><td width="15"><td><strong>\*[ALD1]...\*[ALD12]</strong><td> +Advance lead 1...12 points (move downward) +<tr><td><td><strong>\*[RLD1]...\*[RLD12]</strong><td> +Reverse lead 1...12 points (move upward)</td></tr> +</table> +<p> +For example, +<p> +<pre> + Tel: 905\*[RLD1]-\*[ALD1]4072 +</pre> + +moves the hyphen in the telephone number up by 1 point, then +moves back down by the same amount. +<p> +Both <strong>\*[ALD]</strong> and <strong>\*[RLD]</strong> accept +quarter points as well. Hence it's possible to do, for example, +<strong>\*[RLD3.25]</strong> or <strong>\*[ALD1.5]</strong> or +<strong>\*[ALD4.75]</strong>. +<p> +<strong>NOTE:</strong> If you need to move up or down by +more than 12.75 points, or wish to use a +<a href="definitions.html#TERMS_UNITOFMEASURE">unit of measure</a> +other than points, use the groff inline +<a href="#INLINE_VERTICAL_GROFF">\v</a>. +<br> +<hr> + +<!---INLINE_FONT_GROFF---> + +<h2><u>Groff inline escapes</u></h2> + +<a name="INLINE_FONTS_GROFF"><h3><u>Font control with \f</u></h3></a> + +<p> +Groff's basic mechanism for inline font control is the escape +<strong>\f</strong>. +<p> +<table valign="baseline" summary="inlinefontsgroff"> +<tr><td width="15"><td><strong>\fR</strong><td>Change font to roman +<tr><td><td><strong>\fI</strong><td>Change font to italic +<tr><td><td><strong>\fB</strong><td>Change font to bold +<tr><td><td><strong>\f(BI</strong><td>Change font to bold italic +<tr><td><td><strong>\fP</strong><td>Revert to previous font</td></tr> +</table> +<p> +A special instance of <strong>\f</strong> is +<strong>\f[font]</strong>, 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: +<p> +<pre> + .FAM T + .FT R + The command \f[CBI]ls -l\fP gives a "long" directory listing. +</pre> + +The Unix command "ls -l" will appear in Courier Bold Italic +in a line that is otherwise in Times Roman. +<br> + +<!---INLINE_HORIZONTAL_GROFF---> + +<hr width="66%" align="left"> +<a name="INLINE_HORIZONTAL_GROFF"><h3><u>Inline horizontal motions with \h</u></h3></a> + +<p> +Whenever you need to move forward or backward on a line, use the inline +<strong>\h'distance'</strong>. In order to avoid unpleasant surprises, +always append a +<a href="definitions.html#TERMS_UNITOFMEASURE">unit of measure</a> +to "distance". +<p> +<pre> + \h'1.25i' +</pre> + +moves you 1.25 inches to the right (forwards) of the horizontal +position on the current +<a href="definitions.html#TERMS_OUTPUTLINE">output line</a>. +<p> +<pre> + \h'-1.25i' +</pre> + +moves you 1.25 inches to the left (backwards). +<br> + +<!---INLINE_VERTICAL_GROFF---> + +<hr width="66%" align="left"> +<a name="INLINE_VERTICAL_GROFF"><h3><u>Inline vertical motions with \v</u></h3></a> + +<p> +If you need to raise or lower type on a line (say, for sub- or +superscripts, or any other special effect), use +<strong>\v'distance'</strong>. In order to avoid unpleasant +surprises, always append a +<a href="definitions.html#TERMS_UNITOFMEASURE">unit of measure</a> +to "distance". +<p> +<pre> + \v'.6m' +</pre> + +moves you (approx.) 2/3 of an +<a href="definitions.html#TERMS_EM">em</a> +downward on the current +<a href="definitions.html#TERMS_OUTPUTLINE">output line</a>. +<p> +<pre> + \v'-.6m' +</pre> + +moves you (approx.) 2/3 of an em upward. +<p> +<strong>IMPORTANT:</strong> The vertical motion of <strong>\v</strong> +affects ONLY type on the current +<a href="definitions.html#TERMS_OUTPUTLINE">output line</a>. +When groff breaks the output line, the effect of +<strong>\v</strong> is cancelled; the baseline of the next output line +is where it would be if you hadn't used <strong>\v</strong>. +<p> +<strong>TIP:</strong> When using <strong>\v</strong> 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 <strong>\v</strong> with the +minus sign) or too low (if you used <strong>\v</strong> without +the minus sign). +<br> + +<!---INLINE_STRINGWIDTHL_GROFF---> + +<hr width="66%" align="left"> +<a name="INLINE_STRINGWIDTH_GROFF"><h3><u>String width function \w</u></h3></a> + +<p> +In the context of <strong>mom</strong>, the string width inline +<strong>\w'string'</strong> 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 <strong>\w</strong> inline escape: +<p> +<pre> + .IL "\w'Examples: '" +</pre> + +<strong>NOTE:</strong> Whenever you pass <strong>\w'string'</strong> +to a macro that normally requires a +<a href="definitions.html#TERMS_UNITOFMEASURE">unit of measure</a>, +<em>do <strong>NOT</strong> add a unit of measure to the \w'string' +argument.</em> +<p> +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. +<br> + +<!---INLINE_LINEDRAWING_GROFF---> + +<hr width="66%" align="left"> +<a name="INLINE_LINEDRAWING_GROFF"><h3><u>Horizontal line drawing function \l</u></h3></a> + +<p> +The <strong>\l'distance'</strong> inline allows you to draw a +horizontal rule of the specified distance. You must supply a +<a href="definitions.html#TERMS_UNITOFMEASURE">unit of measure</a>. +Therefore, to set a 3-pica rule into a line of text, you'd do +<p> +<pre> + A line of text with a superfluous \l'3P' 3-pica rule in it. +</pre> + +<strong>\l'3P'</strong> above not only draws the rule, but +advances 3 picas horizontally as well, just as you'd expect. +<p> +The weight (thickness) of rules varies according to the point size +in effect when you invoke <strong>\l</strong>, 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 +<strong>mom</strong> for all macros and routines that create rules. +<p> +<strong>NOTE:</strong> There are, in addition to <strong>\l</strong>, +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. +<p> +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 <strong>.PSPIC</strong> (consult the <strong>grops</strong> +man page for information on this indispensible and easy-to-use macro). +<br> + +<!---INLINE_CHARACTERS_GROFF---> + +<hr width="66%" align="left"> +<a name="INLINE_CHARACTERS_GROFF"><h3><u>Special characters and symbols</u></h3></a> + +<p> +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 +<a href="definitions.html#TERMS">Definitions of Terms</a>. +For a more complete list, consult the section <em>Special +Character Names</em> at the end of the <em>Tutorial Examples</em> +in <strong>cstr54</strong>, available +<a href="http://www.kohala.com/start/troff/">here</a>. + +<p> +<pre> + 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 +</pre> + +<hr> +<a href="docprocessing.html#TOP">Next</a> +<a href="goodies.html#TOP">Prev</a> +<a href="#TOP">Top</a> +<a href="toc.html">Back to Table of Contents</a> +</body> +</html> 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 @@ +<html> +<head> +<meta http-equiv="content-type" content="text/html;charset=iso-8859-1"> +<title>What is mom?</title> +</head> +<body bgcolor="#dfdfdf"> + +<!====================================================================> + +<a href="definitions.html#TOP">Next</a> +<a href="toc.html">Back to Table of Contents</a> + +<a name="TOP"></a> +<a name="INTRO"> + <h1 align="center"><u>WHAT IS MOM?</u></h1> +</a> + +<a href="#INTRO_INTRO">Who is mom meant for?</a> +<br> +<a href="#INTRO_TYPESETTING">Typesetting with mom</a> +<br> +<a href="#INTRO_DOCPROCESSING">Document processing with mom</a> +<br> +<a href="#INTRO_PHILOSOPHY">Mom's philosophy</a> +<br> +<a href="#INTRO_DOCUMENTATION">A note on mom's documentation</a> +<br> +<a href="#MACRO_ARGS">How to read macro arguments</a> + +<h2><a name="INTRO_INTRO"><u>Who is mom meant for?</u></a></h2> + +<strong>Mom</strong> ("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: +<br> +<ol> + <li>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 + <a href="definitions.html#TERMS_PRIMITIVES">primitives</a>; + <br> + <li>non-scientific writers (novelists, short story writers, + journalists, students) who just want their work to + look good; + <br> + <li>newbies to computer typesetting, document processing, or + groff who need a well-documented macro set to help them get + started. +</ol> +<p> +As might be infered from the above, <strong>mom</strong> 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. +<p> +Because <strong>mom</strong> 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 <strong>mom</strong>'s document markup tags, you don't have +to read up on groff +<a href="definitions.html#TERMS_PRIMITIVES">primitives</a> +in order to accomplish what you want; the typesetting macros take +care of that. + +<a name="INTRO_TYPESETTING"> + <h2><u>Typesetting with mom</u></h2> +</a> + +<strong>Mom</strong>'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. +<p> 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. + +<p> +With <strong>mom</strong>'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 <strong>mom</strong> that you +want document processing (via the +<a href="docprocessing.html#START">START</a> +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. +<p> +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.) +<p> +<strong>Mom</strong> 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 +<a href="definitions.html#TERMS_PRIMITIVES">primtive</a> +level. As a professional typesetter of more than two decades, and a +writer, I have encountered few situations that cannot be handled by +<strong>mom</strong>'s typesetting macros. +<p> +<strong>Author's note:</strong> 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 +<a href="definitions.html#TERMS_JUST">justifying</a> +lines. At present, only word spacing is adjusted, requiring what I +consider an unnecessary amount of user intervention whenever +letter spacing is required. + +<a name="INTRO_DOCPROCESSING"> + <h2><u>Document processing with mom</u></h2> +</a> + +<strong>Mom</strong>'s document processing macros let you format +documents without having to worry about the typographic details. +In this respect, <strong>mom</strong> is similar to other groff macro +packages, as well as to html and LaTeX. Where <strong>mom</strong> +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. +<p> +<strong>Mom</strong> 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 -- +<a href="docprocessing.html#PRINTSTYLE">PRINTSTYLE TYPEWRITE</a> +-- 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. + +<a name="INTRO_PHILOSOPHY"> + <h2><u>Mom's philosophy</u></h2> +</a> + +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. +<p> +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. +<p> +Groff has traditionally solved the problem of formatting vs. tweaking +by requiring users of the common macro packages (mm, ms, me and their +offspring) to resort to groff +<a href="definitions.html#TERMS_PRIMITIVES">primitives</a> +and +<a href="definitions.html#TERMS_INLINES">inline escapes</a> +for their special typesetting needs. Not to put too fine a point on +it, groff primitives tend toward the abstruse, and most inline escapes +are about as readable 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. +<p> +<strong>Mom</strong> 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. +<p> +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. <strong>Mom</strong> 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. +<p> +<strong>Mom</strong> 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 +<a href="#PRINTSTYLE">PRINTSTYLE TYPEWRITE</a> +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.) +<p> +One special feature in <strong>mom</strong>'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, <strong>mom</strong> does +avoid them, by clever adjustments to leading ("line spacing") +and the spacing between different elements on the page. + +<a name="INTRO_DOCUMENTATION"> + <h2><u>A note on mom's documentation</u></h2> +</a> + +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. +<p> +<strong>Mom</strong>'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 <strong>mom</strong>'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. +<a name="CANONICAL"></a> +<p> +The canonical reference materials for groff are <strong>cstr54</strong> +(a downloadable PostScript copy of which is available +<a href="http://www.kohala.com/start/troff/">here</a>) +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 <strong>mom</strong> users up +and running. <em>Mea culpa.</em> +<p> +<strong>Note:</strong> <strong>Mom</strong>'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. + +<a name="MACRO_ARGS"> + <h3><u>How to read macro arguments</u></h3> +</a> + +<p> +The concise descriptions of macros in this documentation typically +look like this: +<blockquote> +Macro: <strong>NAME</strong> <var>arguments</var> +</blockquote> +<var>arguments</var> lists the macro's arguments using conventions that +should be familiar to anyone who has ever read a manpage. Briefly: +<p> +<ol> + <li>Macro arguments are separated from each other by spaces. + <li>If an argument is surrounded by chevrons + ( < > ), it's a description of the argument, + not the argument itself. + <li>If an argument begins with or is surrounded by double-quotes, the + double quotes MUST be included in the argument. + <li>If the user has a choice between several arguments, each of the + choices is separated by the pipe character ( | ), + which means "or." + <li>Arguments that are optional are surrounded by square brackets. + <li><off> in an argument list means that any argument + turns the macro off. +</ol> + +<a name="TOGGLE_MACRO"><h3><u>Toggle macros</u></h3></a> +<p> +Some macros don't require an argument. They simply start something. +When you need to turn them off, the same macro with <em>any</em> +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. +<p> +Since these macros toggle things on and off, the argument list +simply reads +<blockquote> +<var>toggle</var> +</blockquote> +<hr> + +<h3>Example 1: an argument requiring double-quotes</h3> +<blockquote> +Macro: <strong>TITLE</strong> <var>"<title of document>"</var> +</blockquote> +The required argument to <strong>TITLE</strong> is the title of your +document. Since it's surrounded by double-quotes, you must +include them in the argument, like this: +<p> +<pre> + .TITLE "My Pulitzer Novel" +</pre> + +<h3>Example 2: a macro with required and optional arguments</h3> +<blockquote> +Macro: <strong>TAB_SET</strong> <var><tab #> <indent> <length> [ L | R | C | J [ QUAD ] ]</var> +</blockquote> +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: +<p> +<pre> + .TAB_SET 3 6P 3P +</pre> + +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: +<p> +<pre> + .TAB_SET 3 6P 3P L + or + .TAB_SET 3 6P 3P L QUAD +</pre> + +<a name="TOGGLE_EXAMPLE"><h3>Example 3: a sample toggle macro:</h3></a> + +<blockquote> +Macro: <strong>QUOTE</strong> <var>toggle</var> +</blockquote> + +<strong>QUOTE</strong> begins a section of quoted text in a document +and doesn't require an argument. When the quote's finished, +you have to tell <strong>mom</strong> it's done. +<p> +<pre> + .QUOTE + So runs my dream, but what am I? + An infant crying in the night + An infant crying for the light + And with no language but a cry. + .QUOTE OFF +</pre> + +Alternatively, you could have turned the quote off with END, or +X, or something else. + +<p> +<hr> +<a href="definitions.html#TOP">Next</a> +<a href="#TOP">Top</a> +<a href="toc.html">Table of Contents</a> +</body> +</html> 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 @@ +<html> +<head> +<meta http-equiv="content-type" content="text/html;charset=iso-8859-1"> +<title>Mom -- Document Processing, Writing Letters</title> +</head> +<body bgcolor="#dfdfdf"> + +<!====================================================================> + +<a href="toc.html">Back to Table of Contents</a> + +<a name="TOP"></a> +<a name="LETTERS"> + <h1 align="center"><u>WRITING LETTERS WITH MOM</u></h1> +</a> + +<a name="LETTERS_INTRO"> + <h2><u>Introduction</u></h2> +</a> + +<strong>Mom</strong>'s simple but effective letter-writing +macros are a subset of the +<a href="docprocessing.html#DOCPROCESSING">document processing macros</a>, +designed to ease the creation of correspondence. +<p> +Because the letter macros are a subset of the document +processing macros, you can use +<a href="definitions.html#TERMS_CONTROLMACRO">control macros</a> +to design correspondence to your own specifications. However, +<strong>mom</strong> 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. + +<a name="TUTORIAL"><h2><u>Tutorial on writing letters</u></h2></a> + +<strong>Mom</strong> letters begin, like all <strong>mom</strong> +processed documents, with a +<a href="docprocessing.html#REFERENCE_MACROS">reference macro</a> +(in this case, +<a href="docprocessing.html#AUTHOR">AUTHOR</a>), +a +<a href="docprocessing.html#DOCTYPE">DOCTYPE</a> +(<strong>LETTER</strong>, obviously), the essential +<a href="docprocessing.html#PRINTSTYLE">PRINTSTYLE</a> +macro, and +<a href="docprocessing.html#START">START</a>. +<p> +<pre> + .AUTHOR "Yannick P. Guique" + .DOCTYPE LETTER + .PRINTSTYLE TYPESET + .START +</pre> + +<strong>PRINTSTYLE</strong>, above, could also be +<strong>TYPEWRITE</strong>. <strong>Mom</strong> 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. +<p> +After the <strong>START</strong> 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,"). +<p> +The macros for entering the data are simple (they're not even +<a href="definitions.html#TERMS_TOGGLE">toggles</a>) +and entered in an intuitive order. +<br> +<ol> + <li><code>.DATE</code> + <li><code>.TO</code> + <li><code>.FROM</code> + <li><code>.GREETING</code> +</ol> +<p> +<strong>Mom</strong> ignores any you omit and spaces the letter's +opening according to what you do include. +<p> +Once you've filled in what you need to get a letter started, simply +type the letter, introducing each and every paragraph with the +<a href="docelement.html#PP">PP</a> +macro. +<p> +At the end of the letter, should you wish an indented closing +("Yours truly," "Sincerely," "Hugs and +kisses"), invoke the macro <strong>CLOSING</strong> on a +line by itself and follow it with the text of the closing. +<strong>N.B.</strong> Don't put your name here; <strong>mom</strong> +supplies it automatically from <strong>AUTHOR</strong> with +enough space to leave room for your signature. + +<p> +Assuming our tutorial letter is for business correspondence, +here's what the complete letter looks like. +<p> +<pre> + .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, +</pre> +<hr> + +<a name="LETTERS_DEFAULTS"> + <h2><u>Defaults for letters</u></h2> +</a> + +In letters, <strong>mom</strong> sets: +<p> +<ol> + <li>the date flush right, page right, at the top of page one + <li>the addressee in a block flush left, page left + <li>the addressor in a block flush left, page left + <li>the greeting flush left + <li>the body of the letter justified + <li>in multi-page letters + <br> + <ul> + <li>a footer indicating there's a next page (of the form <code>.../#</code>) + <li>the page number at the top of every page after page one + </ul> + <li>the closing/signature line flush left, indented halfway across the page +</ol> +<p> +Other important style defaults are listed below, and may be changed +via the +<a href="typesetting.html#MACROS_TYPESETTING">typesetting macros</a> +or the document processing +<a href="definitions.html#TERMS_CONTROLMACRO">control macros</a> +prior to +<a href="docprocessing.html#START">START</a>. Assume that any +style parameter not listed below is the same as for +<a href="docprocessing.html#TYPESET_DEFAULTS">PRINTSTYLE TYPESET</a> +or +<a href="docprocessing.html#TYPEWRITE_DEFAULTS">PRINTSTYLE TYPEWRITE</a>. +<p> +<pre> +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 .../# +</pre> +<hr> + +<a name="LETTERS_MACROS"> + <h2><u>The letter macros</u></h2> +</a> + +All letter macros must come after +<a href="docprocessing.html#START">START</a>, +except <strong>NO_SUITE</strong>. +<p> +<ul> + <li><a href="#DATE">DATE</a> + <li><a href="#TO">TO</a> + <li><a href="#FROM">FROM</a> + <li><a href="#GREETING">GREETING</a> + <li><a href="#CLOSING">CLOSING</a> + <li><a href="#NO_SUITE">NO_SUITE</a> -- "next page" number off +</ul> + +<!---DATE---> + +<hr width="66%" align="left"> +<p> +<a name="DATE"></a> +Macro: <strong>DATE</strong> + +<p> +Invoke <strong>DATE</strong> on a line by itself, with the date +underneath, like this: +<p> +<pre> + .DATE + October 31, 2002 +</pre> + +<!---TO---> + +<hr width="66%" align="left"> +<p> +<a name="TO"></a> +Macro: <strong>TO</strong> + +<p> +Invoke <strong>TO</strong> on a line by itself, with the name +and address of the addressee underneath, like this: +<p> +<pre> + .TO + JOHN SMITH + 10 Roberts Crescent + Bramladesh, Ont. +</pre> + +<!---FROM---> + +<hr width="66%" align="left"> +<p> +<a name="FROM"></a> +Macro: <strong>FROM</strong> + +<p> +Invoke <strong>FROM</strong> on a line by itself, with the name +and address of the addressor underneath, like this: +<p> +<pre> + .FROM + JOE BLOW + 15 Brunette Road + Ste-Vieille-Andouille, Québec +</pre> + +<!---GREETING---> + +<hr width="66%" align="left"> +<p> +<a name="GREETING"></a> +Macro: <strong>GREETING</strong> + +<p> +Invoke <strong>GREETING</strong> on a line by itself, with the +full salutation you want for the letter, like this: +<p> +<pre> + .GREETING + Dear Mr. Smith, +</pre> + +<!---CLOSING---> + +<hr width="66%" align="left"> +<p> +<a name="CLOSING"></a> +Macro: <strong>CLOSING</strong> + +<p> +Invoke <strong>CLOSING</strong> on a line by itself after the +body of the letter, with the closing you'd like (e.g. "Yours +truly,"), like this: +<p> +<pre> + .CLOSING + Yours truly, +</pre> + +<!---NO_SUITE---> + +<hr width="66%" align="left"> +<p> +<a name="NO_SUITE"></a> +Macro: <strong>NO_SUITE</strong> + +<p> +If you don't want <strong>mom</strong> to print a "next +page" number at the bottom of multi-page letters, invoke +<code>.NO_SUITE</code>, on a line by itself, prior to +<a href="docprocessing.html#START">START</a>. + +<p> +<hr> +<a href="typemacdoc.html#TOP">Next</a> +<a href="cover.html#TOP">Prev</a> +<a href="#TOP">Top</a> +<a href="toc.html">Back to Table of Contents</a> +</body> +</html> 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 @@ +<html> +<head> +<meta http-equiv="content-type" content="text/html;charset=iso-8859-1"> +<title>Mom -- Document Processing, Recto/verso printing</title> +</head> +<body bgcolor="#dfdfdf"> + +<!====================================================================> + +<a href="cover.html#TOP">Next</a> +<a href="headfootpage.html#TOP">Prev</a> +<a href="toc.html">Back to Table of Contents</a> + +<a name="TOP"></a> +<a name="RECTOVERSO"> + <h2 align="center"><u>RECTO/VERSO PRINTING and COLLATING</u></h2> +</a> + +<a name="INDEX_RECTOVERSO"> + <h3><u>Recto/verso and collating</u></h3> +</a> + +<ul> + <li><a href="#RECTOVERSO_INTRO">Introduction to recto/verso</a> + <ul> + <li><a href="#RECTOVERSO_LIST">Macro list</a> + </ul> + <li><a href="#COLLATE_INTRO">Introduction to collating</a> + <ul> + <li><a href="#COLLATE">The COLLATE macro</a> + </ul> +</ul> + +<a name="RECTOVERSO_INTRO"> + <h2><u>Introduction to recto/verso</u></h2> +</a> + +Recto/verso printing allows you to set up a <strong>mom</strong> +document in such a way that it can be printed on both sides of a +printer sheet and subsequently bound. +<p> +With recto/verso, <strong>mom</strong> 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 +<a href="definitions.html#TERMS_HEADER">headers</a> +or +<a href="definitions.html#TERMS_FOOTER">footers</a> +(see the +<a href="headfootpage.html#DESCRIPTION_GENERAL">General description of headers</a>) +and page numbering (if page numbers are not centered). +<p> +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 +<a href="using.html#USING_INVOKING">How to invoke groff with mom</a>) +in <strong>gv</strong> (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 +<strong>gv</strong> print the "even pages". If you prefer to +work from the command line, check out the man pages for +<strong>pstops</strong> and <strong>psbook</strong>. There are other +programs out there as well to help with two-sided printing. +<br> + + +<a name="RECTOVERSO_LIST"> + <h3><u>Recto/verso macros list</u></h3> +</a> + +<ul> + <li><a href="#RECTO_VERSO">RECTO_VERSO</a> + <li><a href="#SWITCH_HDRFTR">SWITCH_HEADERS (also FOOTERS)</a> +</ul> + +<hr> +<!---RECTO_VERSO---> + +<a name="RECTO_VERSO"> + <h3><u>Recto/verso printing</u></h3> +</a> +<br> +Macro: <strong>RECTO_VERSO</strong> + +<p> +If you want <strong>mom</strong> to set up alternating pages for +recto/verso printing, simply invoke <strong>RECTO_VERSO</strong> +with no argument. +<p> +<strong>NOTE:</strong> +<br> +Recto/verso always switches the left and right parts of +<a href="definitions.html#TERMS_HEADER">headers</a> +or +<a href="definitions.html#TERMS_FOOTER">footers</a> +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 +<a href="typesetting.html#L_MARGIN">L_MARGIN</a> +and +<a href="typesetting.html#R_MARGIN">R_MARGIN</a> +(prior to +<a href="docprocessing.html#START">START</a>) +or with +<a href="docprocessing.html#DOC_LEFT_MARGIN">DOC_LEFT_MARGIN</a> +and +<a href="docprocessing.html#DOC_RIGHT_MARGIN">DOC_RIGHT_MARGIN</a> +(before or after <strong>START</strong>). +<p> +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 +<a href="headfootpage.html#PAGENUM_POS">PAGENUM_POS</a> +(before or after <strong>START</strong>). +<br> + +<!---SWITCH_HDRFTR---> + +<hr width="66%" align="left"> +<a name="SWITCH_HDRFTR"> + <h3><u>Switch header left part/right part</u></h3> +</a> +<br> +Macro: <strong>SWITCH_HEADERS</strong> + +<p> +<strong>SWITCH_HEADERS</strong> 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 +<strong>mom</strong>'s default placement of author and title, use +<strong>SWITCH_HEADERS</strong> to reverse it. +<p> +<strong>SWITCH_HEADERS</strong> can also be useful in conjuction +with +<a href="#RECTO_VERSO">RECTO_VERSO</a>. +The assumption of <strong>RECTO_VERSO</strong> 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. +<p> +If <strong>mom</strong>'s behaviour in this matter is not what +you want, simply invoke <strong>SWITCH_HEADERS</strong> on the +first page of your recto/verso document to reverse her default +treatment of header parts. The remainder of your document (with +respect to headers) will come out as you want. +<p> +<strong>NOTE:</strong> Replace <strong>_HEADERS</strong>, above, +with <strong>_FOOTERS</strong> if your document uses footers. +<br> +<hr> + +<!=====================================================================> + +<a name="COLLATE_INTRO"> + <h2><u>Introduction to collating</u></h2> +</a> + +The macro <strong>COLLATE</strong> 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 <strong>LETTER</strong>). +<p> +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 <strong>COLLATE</strong>. +<p> +When collating chapters, you need only put <code>.COLLATE</code> +at the end of a chapter, follow it with any +<a href="docprocessing.html#REFERENCE_MACROS">reference macros</a> +needed for the new chapter, e.g. +<a href="docprocessing.html#CHAPTER">CHAPTER</a> +or +<a href="docprocessing.html#CHAPTER_STRING">CHAPTER_STRING</a> +(have a look at the +<a href="#CHAPTER_NOTE">Special Note on CHAPTER</a>) +make any pertinent style changes to the document (unlikely, but +possible), and re-invoke the +<a href="docprocessing.html#START">START</a> +macro. Your new chapter will begin on a fresh page and behave +as expected. +<p> +<strong>COLLATE</strong> assumes you are collating documents/files +with similar type-style parameters hence there's no need for +<strong>PRINTSTYLE</strong> to appear after <strong>COLLATE</strong>, +although if you're collating documents that were created as separate +files, chances are the <strong>PRINTSTYLE</strong>'s already there. +<p> +<a name="CAUTION"></a> +<strong><u>Two words of caution:</u></strong> +<ol> + <li>do not collate documents of differing + <strong>PRINTSTYLES</strong> (i.e. don't try to + collate a TYPESET document and TYPEWRITE document -- + why would you want to do that anyway?) + <li>use <strong>DOC_FAMILY</strong> instead of + <strong>FAMILY</strong> if, for some reason, you want + to change the family of all the document elements after + <strong>COLLATE</strong>. <strong>FAMILY</strong>, by + itself, will change the family of paragraph text only. +</ol> +<br> + +<!---COLLATE---> + +<hr width="66%" align="left"> +<a name="COLLATE"> + <h3><u>Collate document files</u></h3> +</a> +<br> +Macro: <strong>COLLATE</strong> + +<p> +The most basic (and most likely) collating situation looks like +this: +<p> +<pre> + .COLLATE + .CHAPTER 17 + .START +</pre> + +A slightly more complex version of the same thing, for chapters +that require their own titles, looks like this: +<p> +<pre> + .COLLATE + .CHAPTER_STRING "Geek Fatigue: Symptoms and Causes" + .HEADER_CENTER "Geek Fatigue: Symptoms and Causes" + .START +</pre> + +<strong>NOTE:</strong> See the +<a href="#CAUTION">two words of caution</a>, +above. +<br> + +<hr> +<a href="cover.html#TOP">Next</a> +<a href="headfootpage.html#TOP">Prev</a> +<a href="#TOP">Top</a> +<a href="toc.html">Back to Table of Contents</a> +</body> +</html> 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 @@ +<html> +<head> +<meta http-equiv="content-type" content="text/html;charset=iso-8859-1"> +<title>Mom -- List of reserved words</title> +</head> +<body bgcolor="#dfdfdf"> + +<!====================================================================> + +<a href="appendices.html#TOP">Prev</a> +<a href="toc.html">Back to Table of Contents</a> + +<a name="TOP"></a> +<a name="RESERVED"> + <h2 align="center"><u>LIST OF RESERVED WORDS</u></h2> +</a> + +<p> +The following is a list of "reserved" words used by +<strong>mom</strong>. Before changing the name of any macro or +document element tag with +<a href="goodies.html#ALIAS">ALIAS</a>, +I strongly recommend doing a search of this page for your proposed +new name. If you find it in the left hand column, DON'T USE IT. +Choose something else instead. +<p> +Anyone interested in playing around inside <strong>mom</strong>'s macro +file (om.tmac) will find this list useful as well since it lists all +(I hope) the macros, strings, and number registers <strong>mom</strong> +uses, along with brief descriptions of their functions. +<p> +<pre> +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 +</pre> + +<hr> +<a href="appendices.html#TOP">Prev</a> +<a href="#TOP">Top</a> +<a href="toc.html">Back to Table of Contents</a> +</body> +</html> 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 @@ +<html> +<head> +<meta http-equiv="content-type" content="text/html;charset=iso-8859-1"> +<title>Mom -- Table of Contents</title> +</head> +<body bgcolor="#dfdfdf"> + +<!====================================================================> + +<h1><u>Table of Contents</u></h1> +<ul> + <li><a href="intro.html#INTRO"><strong>1. WHAT IS MOM?</strong></a> + <ul> + <li><a href="intro.html#INTRO_INTRO">1.1 Who is mom meant for?</a> + <li><a href="intro.html#INTRO_TYPESETTING">1.2 Typesetting with mom</a> + <li><a href="intro.html#INTRO_DOCPROCESSING">1.3 Document processing with mom</a> + <li><a href="intro.html#INTRO_PHILOSOPHY">1.4 Mom's philosophy</a> + <li><a href="intro.html#INTRO_DOCUMENTATION">1.5 A note on mom's documentation</a> + <ul> + <li><a href="intro.html#MACRO_ARGS">1.5.1 How to read macro arguments</a> + <li><a href="intro.html#TOGGLE_MACRO">1.5.2 "Toggle" macros</a> + </ul> + </ul> + <li><a href="definitions.html#TERMS"><strong>2. DEFINITIONS OF TERMS USED IN THIS MANUAL</strong></a> + <ul> + <li><a href="definitions.html#TERMS_TYPESETTING">2.1 Typesetting terms</a> + <li><a href="definitions.html#TERMS_GROFF">2.2 Groff terms</a> + <li><a href="definitions.html#TERMS_MOM">2.3 Mom's document processing terms</a> + </ul> + <li><a href="using.html#USING"><strong>3. USING MOM</strong></a> + <ul> + <li><a href="using.html#USING_INTRO">3.1 Introduction</a> + <li><a href="using.html#USING_MACROS">3.2 How to input mom's macros</a> + <li><a href="using.html#USING_INVOKING">3.3 Printing -- invoking groff with mom</a> + <li><a href="using.html#USING_PREVIEWING">3.4 How to preview documents</a> + </ul> + <li><a href="typesetting.html#MACROS_TYPESETTING"><strong>4. THE TYPESETTING MACROS</strong></a> + <ul> + <li><a href="typesetting.html#INTRO_MACROS_TYPESETTING">4.1 Introduction to the typesetting macros</a> + <br> + <li><a href="typesetting.html#PAGE_MARGINS"><strong>4.2 Page Setup</strong></a> -- paper size and page margins + <ul> + <li><a href="typesetting.html#INDEX_SETUP">4.2.1 Macro list</a> + </ul> + <li><a href="typesetting.html#BASIC_PARAMS"><strong>4.3 Basic Parameters</strong></a> -- family, font, point size, line space, line length, autolead + <ul> + <li><a href="typesetting.html#INDEX_BASIC">4.3.1 Macro list</a> + </ul> + <li><a href="typesetting.html#JUST_QUAD_FILL"><strong>4.4 Justifying, Quadding, Filling and Breaking Lines</strong></a> + <ul> + <li><a href="typesetting.html#INDEX_JUST">4.4.1 Macro list</a> + </ul> + <li><a href="typesetting.html#REFINEMENTS"><strong>4.5 Refinements</strong></a> -- word space, sentence space, letter spacing (track kerning), hyphenation, kerning, ligatures + <ul> + <li><a href="typesetting.html#INDEX_REFINEMENTS">4.5.1 Macro list</a> + </ul> + <li><a href="typesetting.html#MODIFICATIONS"><strong>4.6 Modifying Type</strong></a> -- pseudo-italic, -bold, -condensed, and -extended + <ul> + <li><a href="typesetting.html#INDEX_MODIFICATIONS">4.6.1 Macro list</a> + </ul> + <li><a href="typesetting.html#ALDRLD"><strong>4.7 Vertical Movements</strong></a> -- moving up and down on the page + <ul> + <li><a href="typesetting.html#INDEX_ALDRLD">4.7.1 Macro list</a> + </ul> + <li><a href="typesetting.html#TABS"><strong>4.8 Tabs</strong></a> + <ul> + <li><a href="typesetting.html#TYPESETTING_TABS">4.8.1 Typesetting tabs</a> + <ul> + <li><a href="typesetting.html#TYPESETTING_TABS_TUT">4.8.1.1 Quickie tutorial</a> + </ul> + <li><a href="typesetting.html#STRING_TABS">4.8.2 String tabs (autotabs)</a> + <ul> + <li><a href="typesetting.html#STRING_TABS_TUT">4.8.2.1 Quickie tutorial</a> + </ul> + <li><a href="typesetting.html#INDEX_TABS">4.8.3 Macro list</a> + </ul> + <li><a href="typesetting.html#MULTI_COLUMNS"><strong>4.9 Multi-columns</strong></a> + <ul> + <li><a href="typesetting.html#INDEX_MULTI_COLUMNS">4.9.1 Macro list</a> + </ul> + <li><a href="typesetting.html#INDENTS"><strong>4.10 Indents</strong></a> + <ul> + <li><a href="typesetting.html#INDENTS_TUT">4.10.1 A brief explanation of how mom handles indents</a> + <li><a href="typesetting.html#INDEX_INDENTS">4.10.2 Macro list</a> + </ul> + <li><a href="goodies.html#GOODIES"><strong>4.11 Goodies</strong></a> -- aliases, + transparent lines, smartquotes, caps, + underscoring/underlining, padding lines, leaders, drop + caps, superscripts + <ul> + <li><a href="goodies.html#INDEX_GOODIES">4.11.1 Macro list</a> + </ul> + <li><a href="inlines.html#INLINE_ESCAPES"><strong>4.12 Inline Escapes</strong></a> + <ul> + <li><a href="inlines.html#INTRO_INLINE_ESCAPES">4.12.1 Introduction to inline escapes</a> + <li><a href="inlines.html#INLINES_MOM">4.12.2 Mom's personal inlines</a> + <li><a href="inlines.html#INLINES_GROFF">4.12.3 Groff inlines</a> + <li><a href="inlines.html#INLINE_CHARACTERS_GROFF">4.12.3.1 Inlines for special characters and symbols</a> + </ul> + </ul> + <li><a href="docprocessing.html#DOCPROCESSING"><strong>5. DOCUMENT PROCESSING WITH MOM</strong></a> + <ul> + <li><a href="docprocessing.html#INTRO_MACROS_DOCPROCESSING">5.1 Introduction to document processing</a> + <li><a href="docprocessing.html#DEFAULTS">5.2 Some document defaults</a> + <ul> + <li><a href="docprocessing.html#LEADING_NOTE">IMPORTANT NOTE on leading/spacing and bottom margins</a> + </ul> + <li><a href="docprocessing.html#SETUP"><strong>5.3 Preliminary Document Setup</strong></a> + <ul> + <li><a href="docprocessing.html#DOCPROCESSING_TUT">5.3.1 Tutorial</a> -- setting up a mom document + <br> + <li><a href="docprocessing.html#REFERENCE_MACROS"><strong>5.3.2 The Reference Macros</strong></a> + <ul> + <li><a href="docprocessing.html#TITLE">5.3.2.1 TITLE</a> + <li><a href="docprocessing.html#SUBTITLE">5.3.2.2 SUBTITLE</a> + <li><a href="docprocessing.html#AUTHOR">5.3.2.3 AUTHOR</a> + <li><a href="docprocessing.html#CHAPTER">5.3.2.4 CHAPTER</a> + <li><a href="docprocessing.html#DRAFT">5.3.2.5 DRAFT</a> + <li><a href="docprocessing.html#REVISION">5.3.2.6 REVISION</a> + </ul> + <li><a href="docprocessing.html#DOCSTYLE_MACROS"><strong>5.3.3 The Docstyle Macros</strong></a> + <ul> + <li><a href="docprocessing.html#DOCTYPE">5.3.3.1 DOCTYPE</a> -- kind of document + <li><a href="docprocessing.html#PRINTSTYLE">5.3.3.2 PRINTSTYLE</a> -- typeset or typewrite + <li><a href="docprocessing.html#COPYSTYLE">5.3.3.3 COPYSTYLE</a> -- draft or final + </ul> + <li><a href="docprocessing.html#STYLE_BEFORE_START"><strong>5.3.4 Changing Type and Style Parameters <em>before</em> START</strong></a> + <ul> + <li><a href="docprocessing.html#TYPE_BEFORE_START">5.3.4.1 Typesetting macros</a> -- usage + <li><a href="docprocessing.html#DOC_LEAD_ADJUST">5.3.4.2 DOC_LEAD_ADJUST</a> -- adjust document leading to fill pages + <li><a href="docprocessing.html#DOCHEADER">5.3.4.3 DOCHEADER</a> -- managing the docheader + <li><a href="docprocessing.html#COLUMNS_INTRO">5.3.4.4 COLUMNS</a> -- setting documents in columns + </ul> + <li><a href="docprocessing.html#START_MACRO"><strong>5.3.5 ***START***</strong></a> -- the macro to initiate document processing + <br> + <li><a href="docprocessing.html#DOC_PARAM_MACROS"><strong>5.3.6 Changing Document-wide Style Parameters <em>after</em> START</strong></a> + <ul> + <li><a href="docprocessing.html#INDEX_DOC_PARAM">5.3.6.1 Macro list</a> + </ul> + </ul> + <li><a href="docelement.html#DOCELEMENT"><strong>5.4 THE DOCUMENT ELEMENT TAGS</strong></a> + <ul> + <li><a href="docelement.html#DOCELEMENT_INTRO">5.4.1 Introduction to the document element tags</a> + <ul> + <li><a href="docelement.html#DOCELEMENT_CONTROL">Control macros</a> -- changing style defaults for document element tags + <li><a href="docelement.html#CONTROL_MACRO_ARGS">Arguments to the control macros</a> + </ul> + <li><a href="docelement.html#EPIGRAPH_INTRO">5.4.2 Epigraphs</a> + <li><a href="docelement.html#PP_INTRO">5.4.3 Paragraphs</a> + <li><a href="docelement.html#HEAD_INTRO">5.4.4 Main heads</a> + <li><a href="docelement.html#SUBHEAD_INTRO">5.4.5 Subheads</a> + <li><a href="docelement.html#PARAHEAD_INTRO">5.4.6 Paragraph heads</a> + <li><a href="docelement.html#LINEBREAK_INTRO">5.4.7 Linebreaks</a> -- author linebreaks + <li><a href="docelement.html#QUOTE_INTRO">5.4.8 Quotes</a> -- line for line poetic quotes + <li><a href="docelement.html#BLOCKQUOTE_INTRO">5.4.9 Blockquotes</a> -- cited material + <li><a href="docelement.html#FOOTNOTE_INTRO">5.4.10 Footnotes</a> + <li><a href="docelement.html#FINIS_INTRO">5.4.11 Document termination</a> -- FINIS + </ul> + <li><a href="headfootpage.html#HEADFOOTPAGE"><strong>5.5 Document headers and footers</strong></a> + <ul> + <li><a href="headfootpage.html#HEADFOOTPAGE_INTRO">5.5.1 Introduction</a> + <li><a href="headfootpage.html#DESCRIPTION_GENERAL">5.5.2 General description of headers/footers</a> + <li><a href="headfootpage.html#HEADER_STYLE">5.5.3 Default specs for headers/footers</a> + <li><a href="headfootpage.html#VERTICAL_SPACING">5.5.4 Vertical placement and spacing of headers/footers</a> + <li><a href="headfootpage.html#HEADFOOT_CONTROL">5.5.5 Managing headers/footers</a> -- header/footer control macros + </ul> + <li><a href="headfootpage.html#PAGINATION"><strong>5.6 Pagination</strong></a> + <ul> + <li><a href="headfootpage.html#PAGINATION">Introduction</a> + <li><a href="headfootpage.html#INDEX_PAGINATION">Pagination macros list</a> + </ul> + <li><a href="rectoverso.html#RECTOVERSO"><strong>5.7 Recto/verso printing and collating</strong></a> + <ul> + <li><a href="rectoverso.html#RECTOVERSO_INTRO">5.7.1 Introduction to recto/verso</a> + <ul> + <li><a href="rectoverso.html#RECTOVERSO_LIST">5.7.1.1 Macro list</a> + </ul> + <li><a href="rectoverso.html#COLLATE_INTRO">5.7.2 Introduction to collating</a> + <ul> + <li><a href="rectoverso.html#COLLATE">5.7.2.1 The COLLATE macro</a> + </ul> + </ul> + <li><a href="cover.html#RECTOVERSO"><strong>5.8 Creating a cover page</strong></a> + <br> + <li><a href="letters.html#LETTERS"><strong>5.9 Writing letters</strong></a> + <ul> + <li><a href="letters.html#LETTERS_INTRO">5.9.1 Introduction to writing letters</a> + <li><a href="letters.html#TUTORIAL">5.9.2 Tutorial on writing letters</a> + <li><a href="letters.html#LETTERS_DEFAULTS">5.9.3 Default style for letters</a> + <li><a href="letters.html#LETTERS_MACROS">5.9.4 The letter macros</a> + </ul> + <li><a href="typemacdoc.html#TYPESETTING"><strong>5.10 Using typesetting macros during document processing</strong></a> + </ul> + <li><a href="appendices.html#APPENDICES"><strong>6. APPENDICES</strong></a> + <ul> + <li><a href="appendices.html#MOREDOC">6.1 Further notes on this documentation</a> + <li><a href="appendices.html#CODENOTES">6.2 Some reflections on mom</a> + <li><a href="reserved.html#RESERVED">6.3 List of reserved words</a> + <li><a href="appendices.html#CONTACT">6.4 Contact the author</a> + </ul> +</ul> +</body> +</html> 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 @@ +<html> +<head> +<meta http-equiv="content-type" content="text/html;charset=iso-8859-1"> +<title>Mom -- Typesetting macros in document processing</title> +</head> +<body bgcolor="#dfdfdf"> + +<!====================================================================> + +<a href="appendices.html#TOP">Next</a> +<a href="letters.html#TOP">Prev</a> +<a href="toc.html">Back to Table of Contents</a> + +<a name="TOP"></a> +<a name="TYPESETTING"> + <h1 align="center"><u>USING TYPESETTING MACROS DURING DOCUMENT PROCESSING</u></h1> +</a> + +During document processing, most of the +<a href="typesetting.html#MACROS_TYPESETTING">typesetting macros</a> +affect type in the document globally. For example, if you turn kerning +off, pairwise kerning is disabled not only in paragraphs, but +also in headers, footers, quotes, and so on. +<p> +Typesetting macros that temporarily alter margins and line lengths +affect +<a href="definitions.html#TERMS_RUNNING">running text</a> +globally (or at least try to), but leave headers/footers and footnotes +alone. (To indent footnotes, see the full explanation of the +<a href="docelement.html#FOOTNOTE">FOOTNOTE</a> +macro.) +<p> +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, +<a href="definitions.html#TERMS_FAMILY">family</a>, +<a href="definitions.html#TERMS_FONT">font</a>, +point size, +<a href="definitions.html#TERMS_LEADING">leading</a>, +and +<a href="definitions.html#TERMS_QUAD">quad</a>. +<p> +<strong>NOTE:</strong> See the section on +<a href="#TB_MARGINS">Top and bottom margins in document processing</a> +for information on how <strong>mom</strong> interprets +<a href="typesetting.html#T_MARGIN">T_MARGIN</a> +and +<a href="typesetting.html#B_MARGIN">B_MARGIN</a> +in document processing. + +<p> +<strong>Mom</strong> assumes that any changes to these parameters +stem from a temporary need to set type in a style different from that +provided by <strong>mom</strong>'s +<a href="docelement.html#INDEX_DOCELEMENT">document element tags</a>. +In other words, you need to do a bit of creative typesetting in the +middle of a document. +<p> +The following lists those typesetting macros whose behaviour during +document processing requires some explanation. +<p> +<pre> +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. +</pre> +<hr> + +<!=====================================================================> + +<a name="TB_MARGINS"> + <h2><u>Top and bottom margins in document processing</u></h2> +</a> + +Normally, <strong>mom</strong> establishes the top and bottom margins +of +<a href="definitions.html#TERMS_RUNNING">running text</a> +in documents from the values of <strong>HEADER_MARGIN + +HEADER_GAP</strong> and <strong>FOOTER_MARGIN + FOOTER_GAP</strong> +respectively. However, if you invoke +<a href="typesetting.html#T_MARGIN">T_MARGIN</a> +or +<a href="typesetting.html#B_MARGIN">B_MARGIN</a> +either before or after +<a href="docelement.html#START">START</a>, +they set the top and bottom margins of running text irrespective +of <strong>HEADER_GAP</strong> and <strong>FOOTER_GAP</strong>. +<p> +Put another way, in document processing, <strong>T_MARGIN</strong> +and <strong>B_MARGIN</strong> set the top and bottom margins of +running text, but have no effect on the placement of +<a href="definitions.html#TERMS_HEADER">headers</a>, +<a href="definitions.html#TERMS_FOOTER">footers</a>, +or page numbers. + +<p> +<hr> +<a href="appendices.html#TOP">Next</a> +<a href="letters.html#TOP">Prev</a> +<a href="#TOP">Top</a> +<a href="toc.html">Back to Table of Contents</a> +</body> +</html> 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 @@ +<html> +<head> +<meta http-equiv="content-type" content="text/html;charset=iso-8859-1"> +<title>Mom -- Typesetting Macros</title> +</head> +<body bgcolor="#dfdfdf"> + +<!====================================================================> + +<a href="goodies.html#TOP">Next</a> +<a href="definitions.html#TOP">Prev</a> +<a href="toc.html">Back to Table of Contents</a> + +<a name="TOP"></a> +<a name="MACROS_TYPESETTING"> + <h1 align="center"><u>THE TYPESETTING MACROS</u></h1> +</a> + +<a href="#INTRO_MACROS_TYPESETTING">Introduction to the typesetting macros</a> +<br> +<ul> + <li><strong>PAGE SETUP</strong> + <ul> + <li><a href="#INTRO_SETUP">Introduction to Page Setup</a> + <li><a href="#INDEX_SETUP">List of macros</a> + </ul> + <li><strong>BASIC TYPESETTING PARAMETERS</strong> + <ul> + <li><a href="#INTRO_BASIC_PARAMS">Introduction to Basic Parameters</a> + <li><a href="#INDEX_BASIC">List of macros</a> + </ul> + <li><strong>JUSTIFYING, QUADDING, FILLING, BREAKING LINES</strong> + <ul> + <li><a href="#INTRO_JUST_QUAD_FILL">Introduction to justify, quad, fill, break</a> + <li><a href="#INDEX_JUST">List of macros</a> + </ul> + <li><strong>TYPOGRAPHIC REFINEMENTS</strong> + <ul> + <li><a href="#INTRO_REFINEMENTS">Introduction to typographic refinements</a> + <li><a href="#INDEX_REFINEMENTS">List of macros</a> + </ul> + <li><strong>TYPE MODIFICATIONS -- pseudo italic, bold, condense, extend</strong> + <ul> + <li><a href="#INTRO_MODIFICATIONS">Introduction to type modifications</a> + <li><a href="#INDEX_MODIFICATIONS">List of macros</a> + </ul> + <li><strong>VERTICAL MOVEMENTS</strong> + <ul> + <li><a href="#INTRO_ALDRLD">Introduction to vertical movements</a> + <li><a href="#INDEX_ALDRLD">List of macros</a> + </ul> + <li><strong>TABS</strong> + <ul> + <li><a href="#INTRO_TABS">Introduction to tabs</a> + <li><a href="#TYPESETTING_TABS">Typesetting tabs</a> + <li><a href="#STRING_TABS">String tabs</a> + <li><a href="#INDEX_TABS">List of macros</a> + </ul> + <li><strong>MULTI-COLUMNS</strong> + <ul> + <li><a href="#INTRO_MULTI_COLUMNS">Introduction to multi-columns</a> + <li><a href="#INDEX_MULTI_COLUMNS">List of macros</a> + </ul> + <li><strong>INDENTS</strong> + <ul> + <li><a href="#INTRO_INDENTS">Introduction to indents</a> + <li><a href="#INDEX_INDENTS">List of macros</a> + </ul> + <li><strong>GOODIES</strong> + <ul> + <li><a href="goodies.html#INTRO_GOODIES">Introduction to goodies</a> + <li><a href="goodies.html#INDEX_GOODIES">List of macros</a> + </ul> + <li><strong>INLINE ESCAPES</strong> + <ul> + <li><a href="inlines.html#INLINE_ESCAPES_INTRO">Introduction to inline escapes</a> + <li><a href="inlines.html#INDEX_INLINES">List of inline escapes</a> + </ul> +</ul> +<hr> + +<h2><a name="INTRO_MACROS_TYPESETTING"><u>Introduction to the typesetting macros</u></a></h2> + +<strong>Mom</strong>'s typesetting macros provide access to +groff's typesetting capabilities. Aside from controlling basic +type parameters (family, font, line length, point size, leading), +<strong>mom</strong>'s macros fine-tune wordspacing, letterspacing, +kerning, hyphenation, and so on. In addition, <strong>mom</strong> +has true typesetting tabs, string tabs, multiple indent styles, +line padding, and a batch of other goodies. +<p> +In some cases, <strong>mom</strong>'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 <strong>mom</strong>. +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 <strong>mom</strong>, stay away from groff +primitives if <strong>mom</strong> provides a macro that accomplishes +the same thing. +<p> +<strong>Mom</strong>'s typesetting macros can be used as a standalone +package, independent of the +<a href="docprocessing.html#DOCPROCESSING">document processing macros</a>. +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. +<br> +<hr> + +<!====================================================================> + +<a name="INTRO_SETUP"></a> + +<a name="PAGE_MARGINS"> + <h2><u>Page setup: paper size and page margins</u></h2> +</a> + +The page setup macros establish the physical dimensions of your +page and the margins you want it to have. <strong>Groff</strong> +has defaults for these, but I recommend setting them at the top +of your files anyway unless you're using <strong>mom</strong>'s +<a href="docprocessing.html#DOCPROCESSING">document processing macros</a> +and are content with her defaults. +<p> +The +<a href="#PAPER">PAPER</a> +macro provides a shortcut for setting the page to the correct +dimensions for letter, legal, and A4 printer sheets. The +<a href="#PAGE">PAGE</a> +macro provides a convenient way of setting the page dimensions and +some or all of the page margins with a single macro. +<br> + +<a name="INDEX_SETUP"> + <h3><u>Page setup macros list</u></h3> +</a> + +<ul> + <li><a href="#PAGEWIDTH">PAGEWIDTH</a> (page width) + <li><a href="#PAGELENGTH">PAGELENGTH</a> (page length) + <li><a href="#PAPER">PAPER</a> (common paper sizes) + <li><a href="#L_MARGIN">L_MARGIN</a> (left margin) + <li><a href="#R_MARGIN">R_MARGIN</a> (right margin) + <li><a href="#T_MARGIN">T_MARGIN</a> (top margin) + <li><a href="#B_MARGIN">B_MARGIN</a> (bottom margin) + <li><a href="#PAGE">PAGE</a> (page dimensions and margins all in one fell swoop) + <li><a href="#NEWPAGE">NEWPAGE</a> (start a new page) +</ul> + +<!---PAGEWIDTH---> + +<hr width="66%" align="left"> + <a name="PAGEWIDTH"><h3><u>Page width</u></h3></a> +<br> +Macro: <strong>PAGEWIDTH</strong> <var><width of printer sheet></var> +<br> +<em>*Requires a <a href="definitions.html#TERMS_UNITOFMEASURE">unit of measure</a></em> + +<p> +The argument to <strong>PAGEWIDTH</strong> is the width of your +printer sheet. <strong>PAGEWIDTH</strong> requires a unit of measure. +Decimal fractions are allowed. Hence, to tell <strong>mom</strong> +the width of your printer sheet is 8-1/2 inches, you enter +<p> +<pre> + .PAGEWIDTH 8.5i +</pre> + +<!---PAGELENGTH---> + +<hr width="66%" align="left"> + <a name="PAGELENGTH"><h3><u>Page length</u></h3></a> +<br> +Macro: <strong>PAGELENGTH</strong> <var><length of printer sheet></var> +<br> +<em>*Requires a <a href="definitions.html#TERMS_UNITOFMEASURE">unit of measure</a></em> + +<p> +<strong>PAGELENGTH</strong> tells <strong>mom</strong> how long your +printer sheet is. It works just like +<strong>PAGEWIDTH</strong>. Therefore, to tell +<strong>mom</strong> your printer sheet is 11 inches long, you +enter +<p> +<pre> + .PAGELENGTH 11i +</pre> + +<!---PAPER---> + +<hr width="66%" align="left"> + <a name="PAPER"><h3><u>Paper</u></h3></a> +<br> +Macro: <strong>PAPER</strong> <var><paper type></var> + +<p> +<strong>PAPER</strong> provides a convenient way to set the page +dimensions for some common printer sheet sizes. <var><paper +type></var> can be one of: +<p> +<pre> + LETTER + LEGAL + STATEMENT + TABLOID + LEDGER + FOLIO + QUARTO + 10x14 + EXECUTIVE + A3 + A4 + A5 + B4 + B5 +</pre> + +Say, for example, you have A4-sized sheets in your printer. +It's shorter (and easier) to enter +<p> +<pre> + .PAPER A4 +</pre> + +than to remember the correct dimensions and enter +<p> +<pre> + .PAGEWIDTH 595p + .PAGELENGTH 842p +</pre> + +<!---L_MARGIN---> + +<hr width="66%" align="left"> + <a name="L_MARGIN"><h3><u>Left margin</u></h3></a> +<br> +Macro: <strong>L_MARGIN</strong> <var><left margin></var> +<br> +<em>*Requires a <a href="definitions.html#TERMS_UNITOFMEASURE">unit of measure</a></em> + +<p> +<strong>L_MARGIN</strong> establishes the distance from the left edge +of the printer sheet at which you want your type to start. It may +be used any time, and remains in effect until you enter a new value. +<p> +<a href="#IL">Left indents</a> +and +<a href="#TABS">tabs</a> +are calculated from the value you pass to <strong>L_MARGIN</strong>, +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 +<p> +<pre> + .L_MARGIN 3P + or + .L_MARGIN .5i +</pre> + +If you use the macros +<a href="#PAGE">PAGE</a>, +<a href="#PAGEWIDTH">PAGEWIDTH</a> +or +<a href="#PAPER">PAPER</a> +without invoking <strong>L_MARGIN</strong> (either before +or afterwards), <strong>mom</strong> automatically sets +</strong>L_MARGIN</strong> to 1 inch. +<p> +<strong>NOTE:</strong> L_MARGIN behaves in a special way when you're +using the +<a href="docprocessing.html#DOCPROCESSING">document processing macros</a>. +See +<a href="typemacdoc.html#TYPESETTING">Typesetting Macros in Document Processing</a> +for an explanation. +<br> + +<!---R_MARGIN---> + +<hr width="66%" align="left"> + <a name="R_MARGIN"><h3><u>Right margin</u></h3></a> +<br> +Macro: <strong>R_MARGIN</strong> <var><right margin></var> +<br> +<em>*Requires a <a href="definitions.html#TERMS_UNITOFMEASURE">unit of measure</a></em> + +<p> +<strong>R_MARGIN</strong> 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. +<strong>R_MARGIN</strong> requires a unit of measure. Decimal +fractions are allowed. +<p> +The <a href="#LINELENGTH">line length macro</a> (<strong>LL</strong>) can +be used in place of <strong>R_MARGIN</strong>. In either case, the +last one invoked sets the line length. The choice of which to use is +up to you. In some instances, you may find it easier to think of a +section of type as having a right margin. In others, giving a line +length may make more sense. +<p> +For example, if you're setting a page of type you know should have +6-pica margins left and right, it makes sense to enter a left and +right margin, like this: +<p> +<pre> + .L_MARGIN 6P + .R_MARGIN 6P +</pre> + +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 <strong>LL</strong> is much easier than calculating the +right margin. +<p> +<pre> + .LL 17P+3p +</pre> + +If you use the macros +<a href="#PAGE">PAGE</a>, +<a href="#PAGEWIDTH">PAGEWIDTH</a> +or +<a href="#PAPER">PAPER</a> +without invoking <strong>R_MARGIN</strong> afterwards, +<strong>mom</strong> automatically sets <strong>R_MARGIN</strong> +to 1 inch. If you set a line length after these macros (with +<a href="#LINELENGTH">LL</a>), +the line length calculated by <strong>R_MARGIN</strong> is, of course, +overridden. +<p> +<strong>IMPORTANT: R_MARGIN</strong>, if used, MUST come after +<a href="#PAPER">PAPER</a>, +<a href="#PAGEWIDTH">PAGEWIDTH</a>, +<a href="#L_MARGIN">L_MARGIN</a> +and/or +<a href="#PAGE">PAGE</a> +(if a right margin isn't given to <strong>PAGE</strong>). +The reason is that <strong>R_MARGIN</strong> 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. +<p> +<strong>NOTE:</strong> R_MARGIN behaves in a special way +when you're using the +<a href="docprocessing.html#DOCPROCESSING">document processing macros</a>. +See +<a href="typemacdoc.html#TYPESETTING">Typesetting Macros in Document Processing</a> +for an explanation. +<br> + +<!---T_MARGIN---> + +<hr width="66%" align="left"> + <a name="T_MARGIN"><h3><u>Top margin</u></h3></a> +<br> +Macro: <strong>T_MARGIN</strong> <var><top margin></var> +<br> +<em>*Requires a <a href="definitions.html#TERMS_UNITOFMEASURE">unit of measure</a></em> + +<p> +<strong>T_MARGIN</strong> 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 +<p> +<pre> + .T_MARGIN 2.5c +</pre> + +<strong>T_MARGIN</strong> calculates the vertical position of the +first line of type on a page by treating the top edge of the printer +sheet as a <a href="definitions.html#TERMS_BASELINE">baseline</a>. Therefore, +<p> +<pre> + .T_MARGIN 1.5i +</pre> + +puts the baseline of the first line of type 1-1/2 inches beneath +the top of the page. +<p> +<strong>IMPORTANT:</strong> <strong>T_MARGIN</strong> 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, +<strong>T_MARGIN</strong> should only be used at the top of a file +(prior to entering text) or after +<a href="#NEWPAGE">NEWPAGE</a>, +like this: +<p> +<pre> + .NEWPAGE + .T_MARGIN 6P + <text> +</pre> + +<strong>NOTE:</strong> <strong>T_MARGIN</strong> means something +slightly different when you're using the +<a href="docprocessing.html#DOCPROCESSING">document processing macros</a>. +See +<a href="typemacdoc.html#TB_MARGINS">Top and bottom margins in document processing</a> +for an explanation. +<br> + +<!---B_MARGIN---> + +<hr width="66%" align="left"> + <a name="B_MARGIN"><h3><u>Bottom margin</u></h3></a> +<br> +Macro: <strong>B_MARGIN</strong> <var><bottom margin></var> +<br> +<em>*Requires a <a href="definitions.html#TERMS_UNITOFMEASURE">unit of measure</a></em> + +<p> +<strong>B_MARGIN</strong> 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, <strong>mom</strong> starts a new page. +<strong>B_MARGIN</strong> requires a unit of measure. Decimal +fractions are allowed. To set a nominal bottom margin of 3/4 inch, +enter +<p> +<pre> + .B_MARGIN .75i +</pre> + +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 <em>before</em> the bottom margin causes +<strong>mom</strong> to start a new page. +<p> +Occasionally, owing to a peculiarity in <strong>groff</strong>, +an extra line will fall below the nominal bottom margin. If you're +using the +<a href="docprocessing.html#DOCPROCESSING">document processing macros</a>, +this is unlikely to happen; the document processing macros are very +hard-nosed about aligning bottom margins. +<p> +<strong>NOTE:</strong> The meaning of <strong>B_MARGIN</strong> is +slightly different when you're using the document processing macros. +See +<a href="typemacdoc.html#TB_MARGINS">Top and bottom margins in document processing</a> +for an explanation. +<br> + +<!---PAGE---> + +<hr width="66%" align="left"> + <a name="PAGE"><h3><u>Page</u></h3></a> +<br> +Macro: <strong>PAGE</strong> +<var><width> [ <length> [ <lm> [ <rm> [ <tm> [ <bm> ] ] ] ] ]</var> +<br> +<em>*All arguments require a <a href="definitions.html#TERMS_UNITOFMEASURE">unit of measure</a></em> + +<p> +<strong>PAGE</strong> lets you establish paper dimensions and page +margins with a single macro. The only required argument is page width. +The rest are optional, <strong>but they must appear in order and you can't +skip over any.</strong> <var><lm>, <rm>, <tm></var> +and <var><bm></var> refer to the left, right, top and bottom +margins respectively. +<p> +Assuming your page dimensions are 11 inches by 17 inches, and that's +all you want to set, enter +<p> +<pre> + .PAGE 11i 17i +</pre> + +If you want to set the left margin as well, say, at 1 inch, +<strong>PAGE</strong> would look like this: +<p> +<pre> + .PAGE 11i 17i 1i +</pre> + +Now suppose you also want to set the top margin, say, at 1-1/2 +inches. <var><tm></var> comes after <var><rm></var> +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 <strong>PAGE</strong> macro would look like this: +<p> +<pre> + .PAGE 11i 17i 1i 1i 1.5i + | | + required right___| |___top margin + margin +</pre> + +Clearly, <strong>PAGE</strong> is best used when you want a convenient +way to tell <strong>mom</strong> 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 +<p> +<pre> + .PAGE 8.5i 11i 45p 45p 45p 45p +</pre> + +This sets up an 8-1/2 by 11 inch page with margins of 45 points +(5/8-inch) all around. +<p> +<strong>NOTE:</strong> Only use <strong>PAGE</strong> at the +start of a document, before entering any text. And remember, +when you're using the +<a href="docprocessing.html#DOCPROCESSING">document processing macros</a>, +top margin and bottom margin mean something slightly different than +when you're using just the typesetting macros (see +<a href="typemacdoc.html#TB_MARGINS">Top and bottom margins in document processing</a>). +<p> +Additionally, if you invoke <strong>PAGE</strong> with a top margin +argument, any macros you invoke after <strong>PAGE</strong> will +almost certainly move the +<a href="definitions.html#TERMS_BASELINE">baseline</a> +of the first line of text down by one linespace. To compensate, do +<p> +<pre> + .RLD 1v +</pre> + +immediately before entering any text, or, if it's feasible, make +<strong>PAGE</strong> the last macro you invoke prior to entering text. +<br> + +<!---NEWPAGE---> + +<hr width="66%" align="left"> +<a name="NEWPAGE"><h3><u>Start a new page</u></h3></a> +<br> +Macro: <strong>NEWPAGE</strong> + +<p> +Whenever you want to start a new page, use <strong>NEWPAGE</strong>, by +itself with no argument. <strong>Mom</strong> will finish up +processing the current page and move you to the top of a new one +(subject to the top margin set with +<a href="#T_MARGIN">T_MARGIN</a>. +<p> +<strong>Experts:</strong> <strong>NEWPAGE</strong> is an alias of +<strong>.bp</strong>. You can use either, or mix 'n' match with +impunity. +<br> +<hr> + +<!====================================================================> + +<a name="INTRO_BASIC_PARAMS"></a> + +<a name="BASIC_PARAMS"> + <h2><u>Basic Typesetting Parameters</u></h2> +</a> + +Basic parameter macros deal with the fundamental requirements +for setting type: family, font, point size, leading and line length. +<p> +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 +<a href="typemacdoc.html#TYPESETTING">Typesetting Macros in Document Processing</a> +for an explanation. +<br> + +<a name="INDEX_BASIC"><h3><u>Basic parameter macros list</u></h3></a> +<ul> + <li><a href="#FAMILY">FAMILY</a> (type family) + <li><a href="#FONT">FONT</a> (font) + <li><a href="#PS">PS</a> (point size of type) + <li><a href="#LEADING">LS</a> (line spacing/leading) + <li><a href="#AUTOLEAD">AUTOLEAD</a> (automatic line spacing) + <li><a href="#LINELENGTH">LL</a> (line length) +</ul> + +<!---FAMILY---> + +<hr width="66%" align="left"> +<a name="FAMILY"><h3><u>Type family</u></h3></a> +<br> +Macro: <strong>FAMILY</strong> <var><family></var> +<br> +Alias: <strong>FAM</strong> + +<p> +<strong>FAMILY</strong> 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: +<table valign="baseline" summary="family"> +<tr><td width="15"><td><strong>A</strong><td>Avant Garde +<tr><td><td><strong>BM</strong> <td>Bookman +<tr><td><td><strong>H</strong><td>Helvetica +<tr><td><td><strong>N</strong><td>New Century Schoolbook +<tr><td><td><strong>P</strong><td>Palatino +<tr><td><td><strong>T</strong><td>Times Roman</td></tr> +</table> +<p> +The argument you pass to <strong>FAMILY</strong> is the identifier at +left above. For example, if you want Helvetica, enter +<p> +<pre> + .FAMILY H +</pre> + +<strong>NOTE:</strong> The <a href="#FONT">font macro</a> +(<strong>FT</strong>) 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 <strong>FAMILY</strong> for family, +and <strong>FT</strong> for font, except where doing so is genuinely +inconvenient. +<p> +<strong>Experts:</strong> +<br> +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 +<p> +<pre> + GARAMONDR + GARAMONDI + GARAMONDB + GARAMONDBI +</pre> + +GARAMOND then becomes a legal family name you can pass to +<strong>FAMILY</strong>. (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. +<br> + +<!---FT---> + +<hr width="66%" align="left"> +<a name="FONT"><h3><u>Font</u></h3></a> +<br> +Macro: <strong>FT</strong> <var>R | I | B | BI</var> + +<p> +<strong>FT</strong> takes one of four possible arguments specifying the +desired font: +<table valign="baseline" summary="font"> +<tr><td width="15"><td><strong>R</strong><td> = <td>roman +<tr><td><td><strong>I</strong><td> = <td>italic +<tr><td><td><strong>B</strong><td> = <td>bold +<tr><td><td><strong>BI</strong><td> = <td>bold-italic</td></tr> +</table> +<p> +For example, if your family is Helvetica, entering +<p> +<pre> + .FT B +</pre> + +will give you the Helvetica bold font. If your family were +Palatino, you'd get the Palatino bold font. +<p> +You can specify both family and font in the <strong>FT</strong> macro. +As an example, +<p> +<pre> + .FT HB +</pre> + +sets the font to Helvetica bold. I strongly recommend keeping +family and font separate. +<p> +Fonts can also be changed inline. See +<a href="inlines.html#INLINE_FONTS_MOM">Inline Escapes, font control</a>. +<br> + +<!---PS---> + +<hr width="66%" align="left"> +<a name="PS"><h3><u>Point size of type</u></h3></a> +<br> +Macro: <strong>PS</strong> <var><size of type in points></var> +<br> +<em>*Does not require a <a href="definitions.html#TERMS_UNITOFMEASURE">unit of measure</a></em> + +<p> +<strong>PS</strong> (Point Size) takes one argument: the size of type +in points. Unlike most other macros that establish the size or measure +of something, <strong>PS</strong> 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 +<p> +<pre> + .PS 11 +</pre> + +Point sizes may be fractional (e.g. 10.25 or 12.5). +<p> +You can prepend a plus or a minus sign to the argument to +<strong>PS</strong>, 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 +<p> +<pre> + .PS +2 +</pre> + +then later reset it to 12 with +<p> +<pre> + .PS -2 +</pre> + +The size of type can also be changed inline. See +<a href="inlines.html#INLINE_SIZE_MOM">Inline Escapes, changing point size</a>. +<br> + +<!---LS---> + +<hr width="66%" align="left"> +<a name="LEADING"><h3><u>Line spacing/leading</u></h3></a> +<br> +Macro: <strong>LS</strong> <var><distance between lines></var> +<br> +<em>*Does not require a <a href="definitions.html#TERMS_UNITOFMEASURE">unit of measure</a></em> + +<p> +<strong>LS</strong> (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 <strong>PS</strong>, +<strong>LS</strong> does not require a unit of measure, since +<a href="definitions.html#TERMS_LEADING">leading</a> +is most often given in points. Therefore, to set the linespace to +14 points, you would enter +<p> +<pre> + .LS 14 +</pre> + +However, if you wish, you may specify a unit of measure by appending +it directly to the argument passed to <strong>LS</strong>. For example, +if you want a linespace of 1/4 of an inch, enter +<p> +<pre> + .LS .25i +</pre> + +You can prepend a plus or a minus sign to the argument to +<strong>LS</strong>, 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 +<p> +<pre> + .LS +3 +</pre> + +then later reset it to 14 points with +<p> +<pre> + .LS -3 +</pre> + +<strong>Experts:</strong> +<br> +<strong>LS</strong> should not be confused with the groff primitive +<strong>ls</strong>. <strong>LS</strong> acts like <strong>vs</strong>. +<strong>mom</strong> does not provide a macro analogous to +<strong>ls</strong>. +<br> + +<!---AUTOLEAD---> + +<hr width="66%" align="left"> +<a name="AUTOLEAD"><h3><u>Automatic line spacing</u></h3></a> +<br> +Macro: <strong>AUTOLEAD</strong> <var><amount of automatic leading> [FACTOR]</var> +<br> +<em>*Does not require a <a href="definitions.html#TERMS_UNITOFMEASURE">unit of measure</a></em> + +<p> +Without the <strong>FACTOR</strong> argument, <strong>AUTOLEAD</strong> +calculates the linespace for you by adding its argument to the +current point size of type. All subsequent <strong>PS</strong> +requests automatically update the linespacing by the autolead amount. +<p> +Used in this way, <strong>AUTOLEAD</strong> does not require a unit +of measure; points is assumed. However, you may use an alternate +unit of measure by appending it to the argument. The argument may +be a decimal fraction (e.g. .5 or 2.75). +<p> +As an example, if your current point size of type is 12, entering +<p> +<pre> + .AUTOLEAD 2 +</pre> + +changes the linespace to 14 points, regardless any linespacing +already in effect. From here on, every change to the size of type +(with <strong>PS</strong>, not +<a href="definitions.html#TERMS_INLINES">inline</a>) +changes the linespace as well. If you decrease the type size to 9 +points, the leading decreases to 11 points. If you increase the type +size to 16 points, the leading increases to 18 points. +<p> +Automatic updating of the linespacing continues until you enter a +"manual" line space value with <strong>LS</strong>. +<p> +If you give <strong>AUTOLEAD</strong> the optional +<strong>FACTOR</strong> argument, <strong>AUTOLEAD</strong> +calculates the line space as a factor of the +<a href="definitions.html#TERMS_NUMERICARGUMENT">numeric argument</a> +you gave <strong>AUTOLEAD</strong>. For example, if your point +size is 12, +<p> +<pre> + .AUTOLEAD 1.125 FACTOR +</pre> +sets the leading at 13.5 points. If you change the point size +to 14, the leading automatically changes to 15.75 (14 x 1.125). +<p> +<strong>NOTE:</strong> There's no need to prepend a plus sign (+) +to <strong>AUTOLEAD</strong>'s argument, although you may do so if you +wish. +<br> + +<!---LL---> + +<hr width="66%" align="left"> +<a name="LINELENGTH"><h3><u>Line length</u></h3></a> +<br> +Macro: <strong>LL</strong> <var><line length></var> +<br> +<em>*Requires a <a href="definitions.html#TERMS_UNITOFMEASURE">unit of measure</a></em> + +<p> +<strong>LL</strong> (Line Length) takes one argument: the distance from the +left margin of the page to the maximum allowable point on the +right at which groff should place type. The line length, in +other words, as the macro suggests. +<p> +<strong>LL</strong> requires a unit of measure. Therefore, to set the line +length to 39 picas, you would enter +<p> +<pre> + .LL 39P +</pre> + +As with other macros that require a unit of measure, the argument to +<strong>LL</strong> may be fractional. For example, +<p> +<pre> + .LL 4.5i +</pre> + +sets the line length to 4-1/2 inches. + +<p> +<strong>NOTE:</strong> The <a href="#R_MARGIN">right margin +macro</a> (<strong>R_MARGIN</strong>) can also be used to set line +length. +<br> +<hr> + +<!====================================================================> + +<a name="INTRO_JUST_QUAD_FILL"></a> + +<a name="JUST_QUAD_FILL"> + <h2><u>Justifying, quadding, filling and breaking lines</u></h2> +</a> + +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). +<p> +These macros also determine whether or not +<a href="definitions.html#TERMS_INPUTLINE">input lines</a> are joined and +<a href="definitions.html#TERMS_FILLED">filled</a> during output. +<p> +Additionally, macros that deal with how to break +<a href="definitions.html#TERMS_OUTPUTLINE">output lines</a> are covered in this +section, as is the +<a href="definitions.html#TERMS_INLINES">inline escape</a> for joining output lines. +<p> +You may encounter some words here that are unfamiliar. Refer to +<a href="definitions.html#TERMS_TYPESETTING">Typesetting terms</a> and +<a href="definitions.html#TERMS_GROFF">Groff terms</a> for an explanation. + +<a name="INDEX_JUST"><h3><u>Justification, quad, fill, and break macro list</u></h3></a> + +<ul> + <li><strong>Fill modes</strong> + <ul> + <li><a href="#JUSTIFY">JUSTIFY</a> (set lines justified) + <li><a href="#QUAD">QUAD</a> (set filled lines flush left, right or centered) + </ul> + <li><strong>Nofill modes</strong> + <ul> + <li><a href="#LRC">LEFT</a> (set non-filled lines flush left) + <li><a href="#LRC">RIGHT</a> (set non-filled lines flush right) + <li><a href="#LRC">CENTER</a> (set non-filled lines centered) + </ul> + <li><strong>Breaking lines</strong> + <ul> + <li><a href="#BR">BR</a> (manually break an output line) + <li><a href="#EL">EL</a> (break a line without advancing to the next output line) + <li><a href="#SPACE">SPACE</a> (break a line and add space before the next output line) + <li><a href="#SPREAD">SPREAD</a> (break and force-justify an output line) + </ul> + <li><strong>Joining lines</strong> + <ul> + <li><a href="#JOIN">\c</a> inline escape + </ul> +</ul> + +<!---JUSTIFY---> + +<hr width="66%" align="left"> +<a name="JUSTIFY"><h3><u>Justify lines</u></h3></a> +<br> +Macro: <strong>JUSTIFY</strong> +<br> +<a href="definitions.html#TERMS_FILLED"><em>Fill mode</em></a> + +<p> +<strong>JUSTIFY</strong> doesn't take an argument. +<a href="definitions.html#TERMS_INPUTLINE">Input lines</a> +after <strong>JUSTIFY</strong> are +<a href="definitions.html#TERMS_FILLED">filled</a> and +<a href="definitions.html#TERMS_JUST">justified</a> +upon output. +<p> +To break lines and prevent them from being filled and justified, +use the +<a href="#BR">BR</a> macro. +<br> + +<!---QUAD---> + +<hr width="66%" align="left"> +<a name="QUAD"><h3><u>Quad lines left, right, or center</u></h3></a> +<br> +Macro: <strong>QUAD</strong> <var>L | LEFT | R | RIGHT | C | CENTER | J | JUSTIFY</var> +<br> +Alias: <strong>FILL</strong> +<br> +<a href="definitions.html#TERMS_FILLED"><em>Fill mode</em></a> + +<p> +<strong>QUAD</strong> takes one argument: the direction in which lines +should be +<a href="definitions.html#TERMS_QUAD">quadded</a>. +<a href="definitions.html#TERMS_INPUTLINE">Input lines</a> +after <strong>QUAD</strong> are +<a href="definitions.html#TERMS_FILLED">filled</a> +upon output. +<p> +If <strong>L</strong> or <strong>LEFT</strong>, type is set flush +along the left margin. +<p> +If <strong>R</strong> or <strong>RIGHT</strong>, type is +set flush along the right margin. +<p> +If <strong>C</strong> or <strong>CENTER</strong> type is set centered +on the current line length. +<p> +<strong>J</strong> and <strong>JUSTIFY</strong> justify text, +and are included as a convenience only. Obviously, if text is +justified, it isn't quadded. <strong>QUAD J</strong> and +<strong>QUAD JUSTIFY</strong> have exactly the same effect as <a +href="#JUSTIFY">JUSTIFY</a>. +<p> +To break lines and prevent them from being filled, use the +<a href="#BR">BR</a> macro. +<br> + +<!---LEFT, RIGHT, CENTER---> + +<hr width="66%" align="left"> +<a name="LRC"><h3><u>Set non-filled lines flush left, right, or centered</u></h3></a> +<br> +Macro: <strong>LEFT</strong> + Macro: <strong>RIGHT</strong> + Macro: <strong>CENTER</strong> + (alias <strong>CENTRE</strong>) +<br> +<a href="definitions.html#TERMS_NOFILL"><em>Nofill mode</em></a> + +<p> +<strong>LEFT</strong>, <strong>RIGHT</strong> and +<strong>CENTER</strong> let you enter text on a line for line basis +without having to use the +<a href="#BR">BR</a> macro after each line. +Consider the following: +<p> +<pre> + .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 +</pre> + +Because text after <strong>QUAD</strong> is +<a href="definitions.html#TERMS_FILLED">filled</a>, you have to use the +<a href="#BR">BR</a> +macro to prevent the lines from running together. Not only is this +annoying to type, it's awkward to read in a text editor. Much better +to do +<p> +<pre> + .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. +</pre> + +<strong>IMPORTANT:</strong> Because <strong>LEFT</strong>, +<strong>RIGHT</strong> and <strong>CENTER</strong> are nofill +modes, groff does not always respect the current line length. +<a href="definitions.html#TERMS_INPUTLINE">Input lines</a> +that run long may exceed it, or get broken in undesirable ways. +Therefore, when using these three macros, you should preview your +work to ensure that all lines fit as expected. +<br> + +<!---BR---> + +<hr width="66%" align="left"> +<a name="BR"><h3><u>Manually break lines</u></h3></a> +<br> +Macro: <strong>BR</strong> + +<p> +When using <strong>JUSTIFY</strong> or <strong>QUAD</strong>, +<strong>BR</strong> tells <strong>mom</strong> about partial lines +that you want broken (as opposed to +<a href="definitions.html#TERMS_FILLED">filled</a>). +Any partial +<a href="definitions.html#TERMS_OUTPUTLINE">output line</a> +that immediately precedes <strong>BR</strong> will be +<a href="definitions.html#TERMS_QUAD">quadded</a> +in the direction of the current quad, or set flush left if text is +<a href="definitions.html#TERMS_JUST">justified</a>. + +<p> +Most of the time, you won't need the <strong>BR</strong> macro. +In fill modes, <strong>mom</strong> 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, <strong>mom</strong> 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 <strong>BR</strong>'s. +<p> +<strong>NOTE:</strong> Lines of text in +<a href="definitions.html#TERMS_NOFILL">nofill mode</a> +never require a <strong>BR</strong>. Furthermore, in nofill mode, +ALL macros cause a break. If a break is not desired, use the +<a href="#JOIN">\c</a> +<a href="definitions.html#TERMS_INLINES">inline escape</a>. + +<p> +<strong>Experts: BR</strong> is an alias for <strong>br</strong>. +You can use either, or mix 'n' match with impunity. +<br> + +<!---EL---> + +<hr width="66%" align="left"> +<a name="EL"><h3><u>Manually break a line without advancing on the page</u></h3></a> +<br> +Macro: <strong>EL</strong> + +<p> +The mnemonic "EL" is borrowed from old Compugraphic typesetting +systems, where it stood for "End Line." Conceptually, +<strong>EL</strong> is equivalent to the notion of a carriage return +with no linefeed. + +<p> +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 +<strong>EL</strong> and instruct <strong>mom</strong> 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: +<p> +<pre> + .LS 12.5 + A line of text. + .EL + .ALD 24p + The next line of text. +</pre> + +may be more instuitive than +<p> +<pre> + .LS 12.5 + A line of text. + .ALD 11.5p + The next line of text. +</pre> + +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. +<p> +"ALD" in the above examples stands for "<strong>A</strong>dvance +<strong>L</strong>ea<strong>D</strong>" (another mnemonic borrowed +from Compugraphic), which is covered in the section +<a href="#ALDRLD">Vertical movement</a>. +<p> +<strong>IMPORTANT:</strong> +<strong>EL</strong> does not work as advertised on the last +<a name="TERMS_OUTPUTLINE">output line</a> +of pages that contain a footer trap (e.g. one set with +<a href="#B_MARGIN">B_MARGIN</a> +or in documents formatted using the +<a href="docprocessing.html#DOCPROCESSING">document processing macros</a>). +The reason is that the <strong>EL</strong> macro itself deposits +a line break that trips the trap (hey, I like that -- +"trips the trap"), and once the trap has been sprung, +<strong>mom</strong> can't recover. She places the line after +the <strong>EL</strong> on the next page. +<p> +If you need <strong>EL</strong> functionality on the last line of +a page with a footer trap, turn the trap off with +<a href="goodies.html#TRAP">TRAP</a>, +as in this example: +<p> +<pre> + 3. + .TRAP OFF + .EL + .TRAP + \*[FP12]Establish, once and for all, if 42 really is the answer. +</pre> + +The above looks something like this upon output: +<p> +<pre> + 3. Establish, once and for all, if 42 really is the answer. +</pre> + +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. +<p> +If you hadn't turned the trap off for <kbd>.EL</kbd>, +"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. +<br> + +<!---SP---> + +<hr width="66%" align="left"> +<a name="SPACE"><h3><u>Break lines and add space between</u></h3></a> +<br> +Macro: <strong>SPACE</strong> <var><space to add between lines></var> +<br> +Alias: <strong>SP</strong> + +<p> +<strong>SPACE</strong> breaks a line, just like +<strong>BR</strong>, then adds space after the line. With no +argument, it adds an extra line space. If you pass it a numeric +argument without supplying a +<a href="definitions.html#TERMS_UNITOFMEASURE">unit of measure</a>, +it advances that number of extra line spaces. For example: +<p> +<pre> + .SPACE +</pre> + +breaks the line then adds an extra linespace, whereas +<p> +<pre> + .SPACE 2 +</pre> + +breaks the line and adds two extra linespaces. + +<p> +If you supply a unit of measure, <strong>SPACE</strong> breaks the +line then adds the specified amount of extra space to the current +linespace, as in +<p> +<pre> + .SPACE 6p +</pre> + +which breaks the line then adds six points of space to the current +linespace. + +<p> +<strong>SUGGESTION: SPACE</strong> and +<a href="#ALD">ALD</a> +can be used interchangeably (<code>.SPACE 6p</code> and +<code>.ALD 6p</code> are equivalent). However, +<strong>ALD</strong> without an argument does nothing, whereas +<strong>SPACE</strong> without an argument adds an extra line +space. I recommend using <strong>SPACE</strong> when you +want an extra line space (or multiple thereof), and +<strong>ALD</strong> whenever you want some other value of space +after a line. + +<p> +<strong>Experts: SPACE</strong> is an alias of <strong>sp</strong>. +You can use either, or mix 'n' match with impunity. +<br> + +<!---SPREAD---> + +<hr width="66%" align="left"> +<a name="SPREAD"><h3><u>Break and force justify (spread) lines</u></h3></a> +<br> +Macro: <strong>SPREAD</strong> + +<p> +Sometimes, you need to break a line of +<a href="definitions.html#TERMS_JUST">justified</a> +text and have it come out fully justified, not +<a href="definitions.html#TERMS_QUAD">quadded</a> +left the way it would be with the <strong>BR</strong> 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). +<strong>SPREAD</strong> is the macro that lets you break the line +and have it came out fully justified. + +<p> +<strong>Experts: SPREAD</strong> is an alias for <strong>brp</strong>. +You can use either, or mix 'n' match with impunity. +<br> + +<!---JOIN---> + +<hr width="66%" align="left"> +<a name="JOIN"><h3><u>Join input lines</u></h3></a> +<br> +Inline: <strong>\c</strong> + +<p> +Sometimes, especially when in one of the +<a href="definitions.html#TERMS_NOFILL">nofill modes</a>, +a macro will cause a break where you don't want one. In order +to prevent this from happening (in other words, to join +<a href="definitions.html#TERMS_INPUTLINE">input lines</a> +together, forming one +<a href="definitions.html#TERMS_OUTPUTLINE">output line</a>), +use the groff +<a href="definitions.html#TERMS_INLINES">inline escape</a> +<strong>\c</strong> at the end of each input line to +be joined to another, like this: +<p> +<pre> + .LEFT + .FAMILY T + .FT R + Some lines of text to be \c + .FAMILY H + .FT B + joined \c + .FAMILY T + .FT R + together. +</pre> + +Upon output, the lines will be joined together to read +<p> +<pre> + Some lines of text to be joined together. +</pre> + +with the word "joined" in Helvetica bold. Note the +space before <strong>\c</strong>. Without it, the last three +words of the output line would read +<p> +<pre> + bejoinedtogether +</pre> + +Please also note that had the example been in one of the +<a href="definitions.html#TERMS_FILLED">fill modes</a>, +there'd have been no need for the <strong>\c</strong>. +<br> +<hr> + +<!====================================================================> + +<a name="INTRO_REFINEMENTS"></a> + +<a name="REFINEMENTS"> + <h2><u>Typographic refinements</u></h2> +</a> + +The macros in this section help you tweak groff's behaviour, +ensuring that your documents look typographically professional. +<br> + +<a name="INDEX_REFINEMENTS"> + <h3><u>Typographic refinements macro list</u></h3> +</a> + +<ul> + <li><strong>Word and sentence spacing</strong> + <ul> + <li><a href="#WS">WS</a> (word spacing) + <li><a href="#SS">SS</a> (sentence space) + </ul> + <li><strong>Letter spacing (track kerning)</strong> + <ul> + <li><a href="#RW">RW</a> (reduce whitespace) + <li><a href="#EW">EW</a> (expand whitespace) + <li><a href="#BR_AT_LINE_KERN">BR_AT_LINE_KERN</a> + </ul> + <li><strong>Hyphenation</strong> + <ul> + <li><a href="#HY">HY</a> (turn auto hyphenation on/off, or set specific hyphenation parameters) + <li><a href="#HY_SET">HY_SET</a> (set all hyphenation parameters) + </ul> + <li><strong>Automatic kerning and ligatures</strong> + <ul> + <li><a href="#KERN">KERN</a> (turn automatic pairwise kerning on or off) + <li><a href="#LIGATURES">LIGATURES</a> (turn automatic generation of ligatures on or off) + </ul> +</ul> + +<!---WS---> + +<hr width="66%" align="left"> +<a name="WS"><h3><u>Word spacing</u></h3></a> +<br> +Macro: <strong>WS</strong> <var><+|-wordspace> | DEFAULT</var> + +<p> +<strong>WS</strong> (Word Space) increases or decreases the amount +of space between words. In +<a href="definitions.html#TERMS_NOFILL">nofill modes</a>, +or if +<a href="#QUAD">QUAD</a> +is in effect, the space between words is fixed. Therefore, if you +change the word spacing with <strong>WS</strong>, the change applies +uniformly to the space between every word on every line. However, +when text is +<a href="definitions.html#TERMS_JUST">justified</a>, +the space between words varies from line to line (in order to justify +the text). Consequently, the change you make with <strong>WS</strong> +represents the minimum (and ideal) space groff will try to put between +words before deciding whether to hyphenate a final word or to stretch +the word spacing. + +<p> +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 <strong>WS</strong> 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 <strong>WS</strong>. + +<p> +<a name="WS_USAGE"><strong>WS</strong></a> +takes as its argument a whole number preceded by a plus or minus sign. +Therefore, to decrease the word space slightly, you might enter +<p> +<pre> + .WS -4 +</pre> + +To increase it by a noticeable amount, you might enter +<p> +<pre> + .WS +12 +</pre> + +You can reset the word spacing to its previous value by switching +the plus or minus sign, like this: +<p> +<pre> + .WS +4 + A line of text + .WS -4 +</pre> + +The <code>.WS -4</code> undoes the effect of <code>.WS ++4</code>. You can also reset <strong>WS</strong> to +its groff default by entering +<p> +<pre> + .WS DEFAULT +</pre> + +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. +<br> + +<!---SS---> + +<hr width="66%" align="left"> +<a name="SS"><h3><u>Sentence space</u></h3></a> +<br> +Macro: <strong>SS</strong> <var><+sentence space> | 0 | DEFAULT</var> + +<p> +<strong>SS</strong> (Sentence Space) tells groff how to treat double +spaces it encounters between sentences in +<a href="definitions.html#TERMS_INPUTLINE">input lines</a>. +If you use <strong>SS</strong>, 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 +<strong>SS</strong>. Thus, +<p> +<pre> + .SS +2 +</pre> + +means that input sentences with two spaces after them receive a normal +word space PLUS the +2 value passed to <strong>SS</strong>. +<p> +Like +<strong>WS</strong>, 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 <strong>SS</strong>. +<p> +There's an additional argument you can pass <strong>SS</strong>: +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 +<p> +<pre> + .SS 0 +</pre> + +at the top of your files. + +<p> +If you do use <strong>SS</strong> 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 +<p> +<pre> + .SS DEFAULT +</pre> + +If you're using the +<a href="docprocessing.html">document processing macros</a> +and your +<a href="docprocessing.html#PRINTSTYLE">PRINTSTYLE</a> +is <strong>TYPEWRITE</strong>, <code>.SS DEFAULT</code> is the default, +because you <em>do</em> want double spaces between sentences in copy +that imitates the look of a typewritten document. +<p> +<strong>IMPORTANT: SS</strong> 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 <strong>SS</strong> when you habitually +put only one space between sentences, you risk producing output where +the space between sentences is not equal. +<br> + +<!---HY---> + +<hr width="66%" align="left"> +<a name="HY"><h3><u>Automatic hyphenation control</u></h3></a> +<br> +Macro: <strong>HY</strong> <var>toggle</var> +<br> +Macro: <strong>HY</strong> <var>LINES <max. number of consecutive hyphenated lines></var> +<br> +Macro: <strong>HY</strong> <var>MARGIN <size of hyphenation margin></var> +<br> +Macro: <strong>HY</strong> <var>SPACE <extra interword spacing to prevent hyphenation></var> +<br> +Macro: <strong>HY</strong> <var>DEFAULT</var> +<br> +Aliases: <strong>HYPHENATE, HYPHENATION</strong> + +<p> +<strong>HY</strong>, as you can see, can be invoked with a number of +arguments. In all cases, the aliases <strong>HYPHENATE</strong> +or <strong>HYPHENATION</strong> can be used in place of +<strong>HY</strong>. To aid in understanding the various arguments +you can pass to <strong>HY</strong>, I've broken them down into +separate sections. + +<h3><u>1. HY</u></h3> + +<p> +<strong>HY</strong> by itself (i.e. with no argument) simply turns +automatic hyphenation on. Any argument other than <strong>LINES, +MARGIN, SPACE</strong> or <strong>DEFAULT</strong>, <strong>HY</strong> +turns automatic hyphenation off. For example, as explained in +<a href="intro.html#MACRO_ARGS">How to read macro arguments</a>, +you could turn <strong>HY</strong> off by entering +<p> +<pre> + .HY OFF + or + .HY X + or + .HY END +</pre> + +<strong>HY</strong> observes the following default hyphenation rules: +<br> +<ol> + <li>Last lines (i.e. ones that will spring a trap -- typically + the last line on a page) will not be hyphenated. + <li>The first and last two characters of a word are never + split off. +</ol> + +<h3><u>2. HY LINES</u></h3> + +<p> +<strong>HY LINES</strong> 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 +<p> +<pre> + .HY LINES 2 +</pre> + +By default, when you turn automatic hyphenation on, there is no +limit to the number of consecutive hyphenated lines. + +<p> +<strong>NOTE:</strong> +<a href="definitions.html#TERMS_DISCRETIONARYHYPHEN">Discretionary hyphens</a> +count when groff is figuring out how many lines to hyphenate; +explicit hyphens do not. + +<h3><u>3. HY MARGIN</u></h3> + +<p> +<strong>HY MARGIN</strong> 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). <strong>HY MARGIN</strong> only applies if you're +using +<a href="#QUAD">QUAD</a>, and is really only useful if you're +using <strong>QUAD LEFT</strong>. + +<p> +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 +<p> +<pre> + .HY MARGIN 18p +</pre> + +<strong>NOTE:</strong> The numeric argument after <strong>HY +MARGIN</strong> requires a +<a href="definitions.html#TERMS_UNITOFMEASURE">unit of measure</a>. + +<h3><u>4. HY SPACE</u></h3> + +<p> +<strong>HY SPACE</strong> sets an amount of extra interword +space that groff will <em>try</em> to put between words on a +line in order to PREVENT hyphenation. <strong>HY SPACE</strong> +applies only to +<a href="definitions.html#TERMS_JUST">justified lines</a>. 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 +<p> +<pre> + .HY SPACE .5p + or + .HY SPACE 1p +</pre> + +<strong>NOTE:</strong> The numeric argument after <strong>HY +SPACE</strong> requires a +<a href="definitions.html#TERMS_UNITOFMEASURE">unit of measure</a>. + +<h3><u>4. HY DEFAULT</u></h3> + +<p> +<strong>HY DEFAULT</strong> resets automatic hyphenation to its +default behaviour, cancelling any changes made with <strong>LINES, +MARGIN,</strong> and/or <strong>SPACE</strong>. + +<h3><u>A note on hyphenation in general</u></h3> + +<p> +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 <strong>HY</strong>. + +<p> +Furthermore, hyphenation in +<a href="definitions.html#TERMS_RAG">rag</a> +copy requires a great deal of attention. At best, it should be +avoided completely by individually adjusting the number of words +on consecutive lines to achieve a pleasing, natural-looking rag. +Since such adjustments are often too fussy for document +processing, I recommend playing around with <strong>HY MARGIN</strong> +a bit if your copy looks hyphen-heavy. +<br> + +<!---HY_SET---> + +<hr width="66%" align="left"> +<a name="HY_SET"><h3><u>Set hyphenation parameters all at once</u></h3></a> +<br> +Macro: <strong>HY_SET</strong> <var><lines> [ <margin> [ <space> ] ]</var> +<br> +Alias: <strong>HYSET</strong> + +<p> +<strong>HY_SET</strong> lets you set the parameters for hyphenation +with a single macro. <lines>, <margin> and <space> +correspond to the numeric values required by +<strong>LINES</strong>, <strong>MARGIN</strong> and +<strong>SPACE</strong> as described +<a href="#HY">above</a>. + +<p> +To set just the maximum number of consecutive hyphenated lines, +you'd enter +<p> +<pre> + .HY_SET 2 +</pre> + +If you wanted the same number of maximum consecutive hyphenated lines +and a hyphenation margin for use with +<a href="definitions.html#TERMS_RAG">rag</a> +copy, +<p> +<pre> + .HY_SET 2 36p +</pre> + +would set the hyphenation margin to 36 points. + +<p> +If you wanted the same number of maximum consecutive hyphenated +lines and a hyphenation space of 2 points for use with +<a href="definitions.html#TERMS_JUST">justified</a> +copy, +<p> +<pre> + .HYSET 2 0 2p +</pre> + +is how you'd do it. +<br> + +<!---RW---> + +<hr width="66%" align="left"> +<a name="RW"><h3><u>Reduce whitespace</u></h3></a> +<br> +Macro: <strong>RW</strong> <var><amount of whitespace reduction between letters></var> +<br> + +<p> +<strong>RW</strong> (Reduce Whitespace) and its corresponding macro, +<strong>EW</strong> (Expand Whitespace), allow you to tighten +(or loosen) +<a href="definitions.html#TERMS_OUTPUTLINE">output lines</a> +by uniformly reducing or expanding the space between characters. +This is particularly useful when you want to squeeze or stretch +lines on a narrow measure. + +<p> +The value passed to <strong>RW</strong> 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, +<p> +<pre> + .RW .1 + or + .RW .2 +</pre> + +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 +<strong>RW</strong>. + +<p> +<p> +<strong>IMPORTANT:</strong> <strong>RW</strong> affects all +<a href="definitions.html#TERMS_FONT">fonts</a> +in the +<a href="definitions.html#TERMS_FAMILY">family</a> +current at the time it's invoked. It must be reset to zero to +cancel its effect (<code>.RW 0</code>) on those fonts, or reinvoked +(possibly with a different value) if you change family. +<p> +<strong>NOTE:</strong> By default, <strong>RW</strong> does not deposit a +<a href="#BR">break</a> +(<strong>BR</strong>) when it's invoked. If you want +<strong>RW</strong> to break at the ends of the previous +<a href="definitions.html#TERMS_INPUTLINE">input lines</a>, +you can tell <strong>mom</strong> that's what you want by invoking the +<a href="#BR_AT_LINE_KERN">BR_AT_LINE_KERN</a> +toggle macro. +<br> + +<!---EW---> + +<hr width="66%" align="left"> +<a name="EW"><h3><u>Expand whitespace</u></h3></a> +<br> +Macro: <strong>EW</strong> <var><amount of whitespace expansion between letters></var> +<br> + +<p> +<strong>EW</strong> (Expand Whitespace) expands the amount of +whitespace between letters, effectively "loosening" lines +of type. + +<p> +The value passed to <strong>EW</strong> 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, +<p> +<pre> + .EW .1 + or + .EW .2 +</pre> + +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 <strong>EW</strong>. + +<p> +<strong>NOTE:</strong> By default, <strong>EW</strong> does not deposit a +<a href="#BR">break</a> +(<strong>BR</strong>) when it's invoked. If you want +<strong>EW</strong> to break at the ends of the previous +<a href="definitions.html#TERMS_INPUTLINE">input lines</a>, +you can tell <strong>mom</strong> that's what you want by invoking the +<a href="#BR_AT_LINE_KERN">BR_AT_LINE_KERN</a> +toggle macro. +<br> + +<!---BR_AT_LINE_KERN---> + +<hr width="66%" align="left"> +<a name="BR_AT_LINE_KERN"><h3><u>Break before line kerning</u></h3></a> +<br> +Macro: <strong>BR_AT_LINE_KERN</strong> <var>toggle</var> +<br> + +<p> +By default, <strong>mom</strong> does not break +<a href="definitions.html#TERMS_INPUTLINE>input lines</a> +when you invoke <strong>RW</strong> or <strong>EW</strong>. +If you'd like <strong>mom</strong> to break input lines prior +to <strong>RW</strong> or <strong>EW</strong>, invoke +<strong>BR_AT_INPUT_LINE</strong> without any argument. To +disable the breaks, invoke <strong>BR_AT_INPUT_LINE</strong> +with any argument (<strong>OFF, QUIT, Q, X</strong>...), like +this +<p> +<pre> + .BR_AT_LINE_KERN OFF + or + .BR_AT_LINE_KERN X +</pre> +<br> + +<!---KERN---> + +<hr width="66%" align="left"> +<a name="KERN"><h3><u>Automatic kerning</u></h3></a> +<br> +Macro: <strong>KERN</strong> <var>toggle</var> +<br> + +<p> +By itself (i.e. with no argument), <strong>KERN</strong> turns +automatic pairwise +<a href="definitions.html#TERMS_KERN">kerning</a> +on. With any argument (e.g. OFF, Q, X), pairwise kerning is turned +off. +<p> +Kerning of individual character pairs can be controlled with the +<a href="definitions.html#TERMS_INLINES">inline escapes</a> +<strong>\*[BU#]</strong> and <strong>\*[FU#]</strong>. See +<a href="inlines.html#INLINE_KERNING_MOM">Inline Escapes, kerning</a>. +<br> + +<!---LIGATURES---> + +<hr width="66%" align="left"> +<a name="LIGATURES"><h3><u>Automatic ligature generation</u></h3></a> +<br> +Macro: <strong>LIGATURES</strong> <var>toggle</var> +<br> +Alias: <strong>LIG</strong> + +<p> +Provided your current font has +<a href="definitions.html#TERMS_LIGATURES">ligatures</a>, +<strong>LIGATURES</strong>, 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 <strong>mom</strong> has them on by default. +<p> +<strong>LIGATURES</strong> with any argument turns automatic +ligature generation off. +<p> +<strong>NOTE:</strong> Not all fonts support ligatures. +<br> +<hr> + +<!====================================================================> + +<a name="INTRO_MODIFICATIONS"></a> + +<a name="MODIFICATIONS"> + <h2><u>Type modifications: pseudo-italic, -bold, -condensed, -extended</u></h2> +</a> + +It sometimes happens that a PostScript +<a href="definitions.html#TERMS_FAMILY">family</a> +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. +<br> + +<a name="INDEX_MODIFICATIONS"> + <h3><u>Type modifications macro list</u></h3> +</a> + +<ul> + <li><strong>Pseudo italic</strong> + <ul> + <li><a href="#SETSLANT">SETSLANT</a> -- degree of pseudo-italicising + <li><a href="#SLANT_INLINE">\*[SLANT]</a> -- inline escape for pseudo-italicising type + </ul> + <li><strong>Pseudo bold</strong> + <ul> + <li><a href="#SETBOLDER">SETBOLDER</a> -- amount of emboldening + <li><a href="#BOLDER_INLINE">\*[BOLDER]</a> -- inline escape for emboldening type + </ul> + <li><strong>Pseudo condensed</strong> + <ul> + <li><a href="#CONDENSE">CONDENSE</a> -- percentage for pseudo-condensed type + <li><a href="#COND_INLINE">\*[COND]</a> -- inline escape for pseudo-condensed type + </ul> + <li><strong>Pseudo extended</strong> + <ul> + <li><a href="#EXTEND">EXTEND</a> -- percentage for pseudo-extended type + <li><a href="#EXT_INLINE">\*[EXT]</a> -- inline escape for pseudo-extending + </ul> +</ul> + +<!---SETSLANT---> + +<hr width="66%" align="left"> +<a name="SETSLANT"><h3><u>Set degree of slant for pseudo-italicising</u></h3></a> +<br> +Macro: <strong>SETSLANT</strong> <var><degrees to slant type> | RESET</var> + +<p> +Pseudo-italicising of type is accomplished by slanting a roman font +a certain number of degrees to the right. <strong>SETSLANT</strong> +lets you fix the number of degrees. <strong>Mom</strong>'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 +<p> +<pre> + .SETSLANT 13 +</pre> + +If you change the degree of slant and later want to set it back +to the <strong>mom</strong> default, do +<p> +<pre> + .SETSLANT RESET +</pre> + +<strong>NOTE:</strong> By itself, <strong>SETSLANT</strong> +will not start pseudo-italicising type; it merely tells +<strong>mom</strong> what degree of slant you want. To start +pseudo-italicising, use the +<a href="definitions.html#TERMS_INLINES">inline escape</a> +<strong>\*[SLANT]</strong>. +<br> + +<!---\*[SLANT]---> + +<hr width="66%" align="left"> +<a name="SLANT_INLINE"><h3><u>Pseudo italic on/off</u></h3></a> +<br> +Inline: <strong>\*[SLANT] -- turn pseudo-italic on</strong> +<br> +Inline: <strong>\*[SLANTX] -- turn pseudo-italic off</strong> + +<p> +<strong>\*[SLANT]</strong> begins pseudo-italicising type. +<strong>\*[SLANTX]</strong> turns the feature off. Both are +<a href="definitions.html#TERMS_INLINES">inline escapes</a>, +therefore they should not appear as separate lines, but rather +be embedded in text lines, like this: +<p> +<pre> + Not \*[SLANT]everything\*[SLANTX] is as it seems. +</pre> + +Alternatively, if you wanted the whole line pseudo-italicised, +you'd do +<p> +<pre> + \*[SLANT]Not everything is as it seems.\*[SLANTX] +</pre> + +Once <strong>\*[SLANT]</strong> is invoked, it remains in effect +until turned off. + +<p> +<strong>NOTE:</strong> If you're using the +<a href="docprocessing.html#DOCPROCESSING">document processing macros</a> +with +<a href="docprocessing.html#PRINTSTYLE">PRINTSTYLE TYPEWRITE</a>, +<strong>mom</strong> underlines pseudo-italics by default. To +change this behaviour, use the special macro +<a href="docprocessing.html#SLANT_MEANS_SLANT">SLANT_MEANS_SLANT</a>. +<br> + +<!---SETBOLDER---> + +<hr width="66%" align="left"> +<a name="SETBOLDER"><h3><u>Set amount of emboldening</u></h3></a> +<br> +Macro: <strong>SETBOLDER</strong> <var><amount of emboldening, in machine units> | RESET</var> + +<p> +Emboldening of type is accomplished by printing characters +twice; the second printing is slightly offset from the first, +effectively "thickening" the character. +<strong>SETBOLDER</strong> lets you set the number of +<a href="definitions.html#TERMS_UNITS">machine units</a> +for the offset. <strong>Mom</strong>'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 +<p> +<pre> + .SETBOLDER 500 +</pre> + +If you change the emboldening offset and later want to set it back +to the <strong>mom</strong> default, do +<p> +<pre> + .SETBOLDER RESET +</pre> + +<strong>NOTE:</strong> By itself, <strong>SETBOLDER</strong> +will not start emboldening type; it merely tells +<strong>mom</strong> what you want the emboldening offset to be. +To start emboldening, use the +<a href="definitions.html#TERMS_INLINES">inline escape</a> +<strong>\*[BOLDER]</strong>. +<br> + +<!---\*[BOLDER]---> + +<hr width="66%" align="left"> +<a name="BOLDER_INLINE"><h3><u>Emboldening on/off</u></h3></a> +<br> +Inline: <strong>\*[BOLDER] -- turn emboldening on</strong> +<br> +Inline: <strong>\*[BOLDERX] -- turn emboldening off</strong> + +<p> +<strong>\*[BOLDER]</strong> begins emboldening type. +<strong>\*[BOLDERX]</strong> turns the feature off. Both are +<a href="definitions.html#TERMS_INLINES">inline escapes</a>, +therefore they should not appear as separate lines, but rather +be embedded in text lines, like this: +<p> +<pre> + Not \*[BOLDER]everything\*[BOLDERX] is as it seems. +</pre> + +Alternatively, if you wanted the whole line emboldened, +you'd do +<p> +<pre> + \*[BOLDER]Not everything is as it seems.\*[BOLDERX] +</pre> + +Once <strong>\*[BOLDER]</strong> is invoked, it remains in effect +until turned off. + +<p> +<strong>NOTE:</strong> If you're using the +<a href="docprocessing.html#DOCPROCESSING">document processing macros</a> +with +<a href="docprocessing.html#PRINTSTYLE">PRINTSTYLE TYPEWRITE</a>, +<strong>mom</strong> ignores <strong>\*[BOLDER]</strong> +requests. +<br> + +<!---CONDENSE---> + +<hr width="66%" align="left"> +<a name="CONDENSE"><h3><u>Set percentage for pseudo-condensed type</u></h3></a> +<br> +Macro: <strong>CONDENSE</strong> <var><pseudo-condense percentage></var> + +<p> +Pseudo-condensing of type is accomplished by reducing the width of +characters at a given point size without reducing their height, +effectively narrowing them so they look like condensed type. +<strong>CONDENSE</strong> tells <strong>mom</strong> what +percentage of the normal character width you want the characters +to be condensed. +<p> +<strong>Mom</strong> has no default value for +<strong>CONDENSE</strong>, therefore you must set it before using the +<a href="definitions.html#TERMS_INLINES">inline escape</a> +<a href="#COND_INLINE">\*[COND]</a>. +80 percent of the normal character width is a good value, and +you'd set it like this: +<p> +<pre> + .CONDENSE 80 +</pre> + +<strong>NOTE:</strong> By itself, <strong>CONDENSE</strong> +will not start pseudo-condensing type; it merely tells +<strong>mom</strong> what percentage of the normal character +width you want characters to be condensed. +To start pseudo-condensing, use the +<a href="definitions.html#TERMS_INLINES">inline escape</a> +<strong>\*[COND]</strong>. +<p> +<strong>Additional note:</strong> Make sure that pseudo-condensing +is off (with +<a href="#COND_INLINE">\*[CONDX]</a>) +before before making any changes to the pseudo-condense percentage +with <strong>CONDENSE</strong>. +<br> + +<!---\*[COND]---> + +<hr width="66%" align="left"> +<a name="COND_INLINE"><h3><u>Pseudo-condensing on/off</u></h3></a> +<br> +Inline: <strong>\*[COND] -- turn pseudo-condensing on</strong> +<br> +Inline: <strong>\*[CONDX] -- turn pseudo-condensing off</strong> + +<p> +<strong>\*[COND]</strong> begins pseudo-condensing type. +<strong>\*[CONDX]</strong> turns the feature off. Both are +<a href="definitions.html#TERMS_INLINES">inline escapes</a>, +therefore they should not appear as separate lines, but rather +be embedded in text lines, like this: +<p> +<pre> + \*[COND]Not everything is as it seems.\*[CONDX] +</pre> + +<strong>\*[COND]</strong> remains in effect until you turn it +off with <strong>\*[CONDX]</strong>. + +<p> +<strong>IMPORTANT:</strong> You MUST turn <strong>\*[COND]</strong> +off before making any changes to the point size of your type, either +via the +<a href="#PS">PS</a> +macro or with the <strong>\s</strong> inline escape. If you wish +the new point size to be pseudo-condensed, simply reinvoke +<strong>\*[COND]</strong> afterwards. Equally, +<strong>\*[COND]</strong> must be turned off before changing the +condense percentage with <a href="#CONDENSE">CONDENSE</a>. + +<p> +<strong>NOTE:</strong> If you're using the +<a href="docprocessing.html#DOCPROCESSING">document processing macros</a> +with +<a href="docprocessing.html#PRINTSTYLE">PRINTSTYLE TYPEWRITE</a>, +<strong>mom</strong> ignores <strong>\*[COND]</strong> +requests. +<br> + +<!---EXTEND---> + +<hr width="66%" align="left"> +<a name="EXTEND"><h3><u>Set percentage for pseudo-extended type</u></h3></a> +<br> +Macro: <strong>EXTEND</strong> <var><pseudo-extend percentage></var> + +<p> +Pseudo-extending of type is accomplished by increasing the width of +characters at a given point size without increasing their height, +effectively widening them so they look like extended type. +<strong>EXTEND</strong> tells <strong>mom</strong> what +percentage of the normal character width you want the characters +to be extended. +<p> +<strong>Mom</strong> has no default value for +<strong>EXTEND</strong>, therefore you must set it before using the +<a href="definitions.html#TERMS_INLINES">inline escape</a> +<a href="#EXT_INLINE">\*[EXT]</a>. +120 percent of the normal character width is a good value, and +you'd set it like this: +<p> +<pre> + .EXTEND 120 +</pre> + +<strong>NOTE:</strong> By itself, <strong>EXTEND</strong> +will not start pseudo-extending type; it merely tells +<strong>mom</strong> what percentage of the normal character +width you want characters to be extended. +To start pseudo-extending, use the +<a href="definitions.html#TERMS_INLINES">inline escape</a> +<strong>\*[EXT]</strong>. + +<p> +<strong>Additional note:</strong> Make sure that +pseudo-extending is off (with +<a href="#EXT_INLINE">\*[EXTX]</a>) +before before making any changes to the pseudo-extend percentage +with <strong>EXTEND</strong>. +<br> + +<!---\*[EXT]---> + +<hr width="66%" align="left"> +<a name="EXT_INLINE"><h3><u>Pseudo-extending on/off</u></h3></a> +<br> +Inline: <strong>\*[EXT] -- turn pseudo-extending on</strong> +<br> +Inline: <strong>\*[EXTX] -- turn pseudo-extending off</strong> + +<p> +<strong>\*[EXT]</strong> begins pseudo-extending type. +<strong>\*[EXTX]</strong> turns the feature off. Both are +<a href="definitions.html#TERMS_INLINES">inline escapes</a>, +therefore they should not appear as separate lines, but rather +be embedded in text lines, like this: +<p> +<pre> + \*[EXT]Not everything is as it seems.\*[EXTX] +</pre> + +<strong>\*[EXT]</strong> remains in effect until you turn it +off with <strong>\*[EXTX]</strong>. + +<p> +<strong>IMPORTANT:</strong> You MUST turn <strong>\*[EXT]</strong> +off before making any changes to the point size of your type, either +via the +<a href="#PS">PS</a> +macro or with the <strong>\s</strong> inline escape. If you wish +the new point size to be pseudo-extended, simply reinvoke +<strong>\*[EXT]</strong> afterwards. Equally, +<strong>\*[EXT]</strong> must be turned off before changing the +extend percentage with <a href="#EXTEND">EXTEND</a>. + +<p> +<strong>NOTE:</strong> If you're using the +<a href="docprocessing.html#DOCPROCESSING">document processing macros</a> +with +<a href="docprocessing.html#PRINTSTYLE">PRINTSTYLE TYPEWRITE</a>, +<strong>mom</strong> ignores <strong>\*[EXT]</strong> +requests. +<br> +<hr> + +<!====================================================================> + +<a name="INTRO_ALDRLD"></a> + +<a name="ALDRLD"> + <h2><u>Vertical movement</u></h2> +</a> + +The two macros in this section allow you to move down or up on the page +relative to the current +<a href="definitions.html#TERMS_BASELINE">baseline</a>. + +<a name="INDEX_ALDRLD"> + <h3><u>Vertical movement macro list</u></h3> +</a> +<ul> + <li><a href="#ALD">ALD</a> -- Advance Lead + <li><a href="#RLD">RLD</a> -- Reverse Lead +</ul> + +<!---ALD---> + +<hr width="66%" align="left"> + <a name="ALD"><h3><u>Advance Lead (move downward)</u></h3></a> +<br> +Macro: <strong>ALD</strong> <var><distance to move downward></var> +<br> +<em>*Requires a <a href="definitions.html#TERMS_UNITOFMEASURE">unit of measure</a></em> + +<p> +<strong>ALD</strong> takes one argument: the distance to move downward +on the page relative to the current vertical position. +<p> +Used by itself, or preceded by +<a href="#BR">BR</a>, +<strong>ALD</strong> will advance by one line space plus the +distance you specify. Preceded by +<a href="#EL">EL</a>, +it will advance by exactly the distance you specify. +<p> +<strong>ALD</strong> 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 +<p> +<pre> + .ALD .25i + or + .ALD 1P+6p +</pre> + +As the mnemonic (<strong>A</strong>dvance +<strong>L</strong>ea<strong>D</strong>) suggests, you'll most often +use <strong>ALD</strong> with +<a href="definitions.html#TERMS_PICASPOINTS">points</a> +of lead. + +<p> +<strong>NOTE:</strong> if you want to use <strong>ALD</strong> +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: +<p> +<pre> + .ALD 1i-1v +</pre> + +At the top of a page, this will advance one inch from the +top edge of the paper. Without the -1v, the same command would +advance one inch from the top of the page plus the distance of +one line space. +<p> +<strong>Important:</strong> Do NOT use <strong>ALD</strong> in this +way if you have set a top margin with +<a href="#T_MARGIN">T_MARGIN</a> +or +<a href="#PAGE">PAGE</a>. +<br> + +<!---RLD---> + +<hr width="66%" align="left"> + <a name="RLD"><h3><u>Reverse Lead (move upward)</u></h3></a> +<br> +Macro: <strong>RLD</strong> <var><distance to move upward></var> +<br> +<em>*Requires a <a href="definitions.html#TERMS_UNITOFMEASURE">unit of measure</a></em> + +<p> +<strong>RLD</strong> takes one argument: the distance to move +upward on the page relative to the current vertical position. +<p> +Used by itself, or preceded by +<a href="#BR">BR</a>, +<strong>RLD</strong> will advance by one line space, then +reverse by the distance you specify. Preceded by +<a href="#EL">EL</a>, +it will reverse by exactly the distance you specify. +<p> +<strong>RLD</strong> 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 +<p> +<pre> + .RLD .25i + or + .RLD 1P+6p +</pre> + +As the mnemonic (<strong>R</strong>dvance +<strong>L</strong>ea<strong>D</strong>) suggests, you'll most often +use <strong>RLD</strong> with +<a href="definitions.html#TERMS_PICASPOINTS">points</a> +of lead. +<br> +<hr> + +<!====================================================================> + +<a name="INTRO_TABS"></a> + +<a name="TABS"> + <h2><u>Tabs</u></h2> +</a> + +<strong>Mom</strong> 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 +<strong>mom</strong> handles tabs. + +<a name="TYPESETTING_TABS"><h3><u>Typesetting tabs</u></h3></a> +<p> +Typesetting tabs are defined by both an indent from the left margin and +a line length. This is quite different from typewriter-style tab stops +(the groff norm) that only define the left indent. In conjunction +with the multi-column macros, typesetting tabs significantly facilitate +tabular and columnar work. +<p> +Typesetting tabs are created with the <strong>TAB_SET</strong> +macro. <strong>TAB_SET</strong> 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 +<strong>TAB_SET</strong>, they can be called at any time with the +<strong>TAB</strong> macro. +<p> +<strong>NOTE:</strong> see the section +<a href="typemacdoc.html#TYPESETTING">Typesetting Macros in Document Processing</a> +for information and advice on using tabs with the +<a href="docprocessing.html#DOCPROCESSING">document processing macros</a>. + +<a name="TYPESETTING_TABS_TUT"><h3><u>Quickie tutorial on typesetting tabs</u></h3></a> +<p> +Say you want to set up three tabs to produce an employee evaluation +that looks something like this: +<p> +<a name="TYPSETTING_TABS_SAMPLE"></a> +<pre> + 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. +</pre> + +You want the first tab ("CRITERION") +<br> +<ul> + <li>to begin at the left margin of the page (i.e. no indent) + <li>to have a line length of 5 picas + <li>to be set flush left +</ul> +<br> +Tabs must be numbered, and each has to be set up with a separate +<a href="#TAB_SET">TAB_SET</a> +line. Therefore, to set up tab 1, you enter +<p> +<pre> + .TAB_SET 1 0 5P L + | | | | + tab #__| | | |__direction + | | + indent__| |__length +</pre> + +You want the second tab ("EVALUATION") +<br> +<ul> + <li>to begin 8 picas from the left margin + <li>to have a length of 9 picas + <li>to be set centered. +</ul> +<br> +You set it up like this: +<p> +<pre> + .TAB_SET 2 8P 9P C + | | | | + tab #__| | | |__direction + | | + indent__| |__length +</pre> + +You want the third tab ("COMMENTS") +<br> +<ul> + <li>to begin 19 picas from the left margin + <li>to have a length of 17 picas + <li>to be set flush left, <a href="definitions.html#TERMS_FILLED">filled</a> +</ul> +<br> +The setup looks like this: +<p> +<pre> + .TAB_SET 3 19P 17P L QUAD + | | | | | + | | | | |__fill output lines + | | | | + tab #__| | | |__direction + | | + indent__| |__length +</pre> + +Once the tabs are set up, you can call them in one of two ways: +<br> +<ul> + <li><a href="#TAB">TAB</a> (with the tab + number as an argument) breaks the current line, + advances one linespace, and calls the tab. + <li><a href="#TN">TN</a> (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.). +</ul> +<br> +To exit from tabs and restore your original left margin, line length, +quad direction and fill mode, use +<a href="#TQ">TQ</a> +(Tab Quit). +<p> +Here's how the input for our sample employee evaluation looks +(with some introductory parameters): +<p> +<pre> + .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 +</pre> + +Try setting this up and previewing it with +<p> +<pre> + groff -mom -X <filename> +</pre> + +Notice how <kbd>.TN</kbd> simply moves over to the next tab, +while the combination <kbd>.SP/.TAB 1</kbd> breaks the +line, advances by one extra linespace, and calls the first tab. +<p> +Notice, too, how the <kbd>QUAD</kbd> argument passed to +tab 3 means you don't have to worry about the length of +<a href="definitions.html#TERMS_INPUTLINE">input lines</a>; +<strong>mom</strong> +<a href="definitions.html#TERMS_FILLED">fills</a> +the tab and sets the type flush left. + +<a name="STRING_TABS"><h3><u>String tabs (autotabs)</u></h3></a> +<p> +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. +<p> +Setting up string tabs is a two-step procedure. First, you enter an +input line in which you mark off where you want tabs to begin and end. +(This is often best done in conjunction with the +<a href="goodies.html#SILENT">SILENT</a> +macro.) +<p> +Next, you invoke the +<a href="#ST">ST</a> +macro for every string tab you defined, and optionally pass quad and +fill information to it. That done, string tabs are called with +the +<a href="#TAB">TAB</a> +macro, just like typesetting tabs. +<p> +In combination with the +<a href="goodies.html#PAD">PAD</a> +macro and the groff inline escape +<a href="inlines.html#INLINE_HORIZONTAL_GROFF">\h</a> +(move horizontally across the page) or <strong>mom</strong>'s +<a href="inlines.html#INLINE_HORIZONTAL_MOM">\*[FP#]</a> +(Forward Points) inline, string tabs provide +tremendous flexibility in setting up complex tab structures. + +<a name="STRING_TABS_TUT"><h3><u>Quickie tutorial on string tabs</u></h3></a> +<p> +Say you want to set up tabs for the +<a href="#TYPSETTING_TABS_SAMPLE">employee evaluation form</a> +used as an example in the +<a href="#TYPESETTING_TABS_TUT">typesetting tabs tutorial</a>. +This time, though, you want to play around with the point size of +type, so you can't know exactly how long the tabs will be or where +they should start. All you know is +<br> +<ul> + <li>CRITERION is the longest line in tab 1 + <li>EVALUATION is the longest line in tab 2 + <li>tab 3 should extend to the current right margin + <li>you want a 1 pica gutter between each tab +</ul> +<br> +This is an ideal job for string tabs. +<p> +The first thing you need for string tabs is an +<a href="definitions.html#TERMS_INPUTLINE">input line</a> +with tab positions marked on it. Tabs are marked with the +<a href="definitions.html#TERMS_INLINES">inline escapes</a> +<strong>\*[ST#]</strong> and <strong>\*[ST#X]</strong>. (In this +example, we enclose the input line with the +<a href="goodies.html#SILENT">SILENT</a> +macro so the line doesn't print. We also use the +<a href="goodies.html#PAD">PAD</a> +macro to permit defining tab 3 as simply "the amount of +space remaining on the input line.") +<p> +The setup looks like this: +<p> +<pre> + .SILENT + .PAD "\*[ST1]CRITERION\*[ST1X]\*[FP12]\*[ST2]EVALUATION\*[ST2X]\*[FP12]\*[ST3]#\*[ST3X]" + .SILENT OFF +</pre> + +The long line after <kbd>.PAD</kbd> looks scary, but it isn't. +Here's what it means when broken down into its component parts: +<br> +<ul> + <li>The longest line in tab 1 is "CRITERION", so we + enclose CRITERION with begin/end markers for string tab 1: + <p> + <kbd>\*[ST1]CRITERION\*[ST1X]</kbd> + <br> + <li>We want a 1 pica (12 points) gutter between tab 1 and 2, + so we insert 12 points of space with \*[FP12] + (<strong>F</strong>orward <strong>P</strong>oints 12): + <p> + <kbd>\*[FP12]</kbd> + <br> + <li>The longest line in tab 2 is "EVALUATION", so + we enclose EVALUATION with begin/end markers for string + tab 2: + <p> + <kbd>\*[ST2]EVALUATION\*[ST2X]</kbd> + <br> + <li>We want 1 pica (12 points) between tab 2 and 3, so we + insert 12 points of space with another \*[FP12]: + <p> + <kbd>\*[FP12]</kbd> + <br> + <li>We want tab 3 to be as long as whatever space remains on + the current line length, so we enclose the + <a href="goodies.html#PAD_MARKER">pad marker</a> + (#) with begin/end markers for string tab 3: + <p> + <kbd>\*[ST3]#\*[ST3X]</kbd> + <br> +</ul> +<br> +The tabs are now defined, but they require +<a href="definitions.html#TERMS_QUAD">quad direction</a> +and +<a href="definitions.html#TERMS_FILLED">fill</a> +information. For each string tab defined above, enter a +separate +<a href="#ST">ST</a> +line, like this: +<p> +<pre> + .ST 1 L + .ST 2 L + .ST 3 L QUAD + | | | + | | |__fill output lines + | | + tab__| |__direction + number +</pre> + +From here on in, you call the tabs with +<a href="#TAB">TAB</a> +and +<a href="#TN">TN</a> +just like typesetting tabs (see +<a href="#TYPESETTING_TABS_TUT">typesetting tabs tutorial</a>). +<p> +Here's the complete setup and entry for the sample employee +evaluation form utilising string tabs. +<p> +<pre> + .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 +</pre> + +Try setting this up and previewing it with +<p> +<pre> + groff -mom -X <filename> +</pre> + +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. +<p> +Now try increasing the gutters to 2 picas (put an additional +<kbd>\*[FP12]</kbd> after each <kbd>\*[FP12]</kbd>). Preview the +file again, and notice how the tab structure remains the same, but +the gutters are wider. + + +<a name="INDEX_TABS"> + <h3><u>Tabs macro list</u></h3> +</a> + +<ul> + <li><a href="#TAB_SET">TAB_SET</a> (create typesetting tabs) + <li><a href="#INLINE_ST">\*[ST]...\*[STX]</a> (inline escapes for marking String Tabs) + <li><a href="#ST">ST</a> (set String Tabs) + <li><a href="#TAB">TAB</a> (call tabs) + <li><a href="#TN">TN</a> (Tab Next; call next tab in a sequence) + <li><a href="#TQ">TQ</a> (Tab Quit) +</ul> + +<!---TAB_SET---> + +<hr width="66%" align="left"> + <a name="TAB_SET"><h3><u>Set up typsetting tabs</u></h3></a> +<br> +Macro: <strong>TAB_SET</strong> <var><tab number> <indent> <length> L | R | C | J [ QUAD ]</var> +<br> +Alias: <strong>TS</strong> +<br> +<em>*<indent> and <length> require a <a href="definitions.html#TERMS_UNITOFMEASURE">unit of measure</a></em> + +<p> +<strong>TAB_SET</strong> creates typesetting tabs that later can be +called with +<a href="#TAB">TAB</a>. +Typesetting tabs are numbered, and defined by an indent, a length, +and a "direction", hence <strong>TAB_SET</strong> has +four required arguments: +<br> +<ul> + <li>a tab number + <li>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) + <li>a length + <li>a direction +</ul> +<br> +To set up a centered tab 6 picas long and 9 points from the left +margin, you'd enter +<p> +<pre> + .TAB_SET 1 9p 6P C +</pre> + +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. +<p> +By default, tabs are in +<a href="definitions.html#TERMS_NOFILL">nofill</a> +mode, meaning you can enter text in tabs on a line for line basis +without having to use the +<a href="#BR">BR</a> +macro. If you want a tab to be +<a href="definitions.html#TERMS_FILLED">filled</a>, +pass the optional argument <strong>QUAD</strong>, which will +make the tab behave as if you'd entered <kbd>.QUAD L | R | +C</kbd>. +<p> +For +<a href="definitions.html#TERMS_JUST">justified</a> +tabs, simply pass the argument <strong>J</strong> (without the +<strong>QUAD</strong> argument), like this: +<p> +<pre> + .TAB 1 9p 6P J +</pre> + +Once tabs are set, they can be called at any time with the +<a href="#TAB">TAB #</a> +macro, where "#" is the number of the desired tab. +<p> +You can set up any number of typesetting tabs. However, be +aware that +<a href="#STRING_TABS">string tabs</a> +are also called with <strong>TAB #</strong>, 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. +<p> +<strong>NOTE:</strong> If you use <strong>TAB_SET</strong> 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 +<a href="#TQ">TQ</a>) +before creating new tabs (unless, of course, you want to set +up a tab structure within the confines of an existing tab). +<p> +<strong>IMPORTANT:</strong> Turn all indents off (see +<a href="#INDENTS">Indents</a>) +before setting up tabs with <strong>TAB_SET</strong>, or +<strong>mom</strong> may get confused. +<br> + +<!---INLINE_ST---> + +<hr width="66%" align="left"> + <a name="INLINE_ST"><h3><u>Mark positions of string tabs</u></h3></a> +<br> +Inlines: <strong>\*[ST<number>]...\*[ST<number>X]</strong> + +<p> +String tabs need to be marked off with +<a href="definitions.html#TERMS_INLINES">inline escapes</a> +before being set up with the +<a href="#ST">ST</a> +macro. Any input line may contain string tab markers. +<i><number></i>, above, means the numeric identifier of +the tab. The following shows a sample input line with string +tab markers. +<p> +<pre> + \*[ST1]Now is the time\*[ST1X] for all \*[ST2]good men\*ST2X] to come to the aid of the party. +</pre> + +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 +<a href="goodies.html#PAD">padding</a>) +are taken into account when <strong>mom</strong> determines the +position and length of string tabs. +<p> +Up to nineteen string tabs may be marked (not necessarily all on +the same line, of course), and they must be numbered between 1 +and 19. +<p> +Once string tabs have been marked in input lines, they have to +be "set" with +<a href="#ST">ST</a>, +after which they may be called, by number, with +<a href="#TAB">TAB</a>. +<p> +<strong>NOTE:</strong> Lines with string tabs marked off in them +are normal input lines, i.e. they get printed, just like any +input line. If you want to set up string tabs without the line +printing, use the +<a href="#SILENT">SILENT</a> +macro. +<p> +<strong>IMPORTANT:</strong> Do not try to set up string tabs on +a line that is broken with +<a href="#SPREAD">SPREAD</a>. +<strong>Mom</strong> calculates string tab positions and lengths +as she reads the input line, not after the line has undergone +manipulations to the word spacing. +<br> + +<!---ST---> + +<hr width="66%" align="left"> + <a name="ST"><h3><u>Set string tabs</u></h3></a> +<br> +Macro: <strong>ST</strong> <var><tab number> L | R | C | J [ QUAD ]</var> + +<p> +After string tabs have been marked off on an input line (see +<a href="#INLINE_ST">\*[ST]...\*[STX]</a>), +you need to "set" them by giving them a direction +and, optionally, the <strong>QUAD</strong> argument. In this +respect, <strong>ST</strong> is like +<a href="#TAB_SET">TAB_SET</a> +except that you don't have to give <strong>ST</strong> an indent +or a line length (that's already taken care of, inline, by +<kbd>\*[ST]...\*[STX]</kbd>). If you want string tab 1 to be +left, enter +<p> +<pre> + .ST 1 L +</pre> + +If you want it to be left and +<a href="definitions.html#TERMS_FILLED">filled</a>, enter +<p> +<pre> + .ST 1 L QUAD +</pre> + +If you want it to be justified, enter +<p> +<pre> + .ST 1 J +</pre> + +See the +<a href="#STRING_TABS_TUT">Quickie tutorial on string tabs</a> +for a full explanation of setting up string tabs. +<br> + +<!---TAB---> + +<hr width="66%" align="left"> +<a name="TAB"><h3><u>Call tabs</u></h3></a> +<br> +Macro: <strong>TAB</strong> <var><tab number></var> +<br> +Alias: <strong>TB</strong> +<p> +After tabs have been defined (either with +<a href="#TAB_SET">TAB_SET</a> +or +<a href="#ST">ST</a>), +<strong>TAB</strong> moves to whatever tab number you pass it as +an argument. For example, +<p> +<pre> + .TAB 3 +</pre> + +moves you to tab 3. +<p> +<a name="NOTE_TN"></a> +<strong>NOTE:</strong> <strong>TAB</strong> breaks the line preceding +it and advances 1 linespace. Hence, +<p> +<pre> + .TAB 1 + A line of text in tab 1. + .TAB 2 + A line of text in tab 2. +</pre> + +produces, on output +<p> +<pre> + A line of text in tab 1. + A line of text in tab 2. +</pre> + +If you want the tabs to line up, use +<a href="#TN">TN</a> +(Tab Next), like this: +<p> +<pre> + .TAB 1 + A line of text in tab 1. + .TN + A line of text in tab 2. +</pre> + +which produces +<p> +<pre> + A line of text in tab 1. A line of text in tab 2. +</pre> + +If the text in your tabs runs to several lines, and you want the +first lines of each tab to align, you must use the +<a href="#MULTI_COLUMNS">multi-column</a> macros. +<p> +<strong>ADDITIONAL NOTE:</strong> Any indents in effect prior to +calling a tab are automatically turned off by <strong>TAB</strong>. +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. +<br> + +<!---TN---> + +<hr width="66%" align="left"> +<a name="TN"><h3><u>Tab Next</u></h3></a> +<br> +Macro: <strong>TN</strong> +<br> + +<p> +<strong>TN</strong> moves over to the next tab in numeric +sequence (tab n+1) without advancing on the page. See the +<a href="#NOTE_TN">NOTE</a> +in the description of the <strong>TAB</strong> macro for an +example of how <strong>TN</strong> works. +<p> +<strong>NOTE:</strong> <strong>TN</strong> is like +<a href="#EL">EL</a> +in that it doesn't work as advertised on the last line before a +footer trap is sprung. If you need to use <strong>TN</strong> +on the last line of a page with a footer trap, turn the trap off with +<a href="goodies.html#TRAP">TRAP</a>, +as in this example: +<p> +<pre> + .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 +</pre> + +The above, at the bottom of a page, will look something like this: +<p> +<pre> + 1. The first rule of survival is "make and keep good friends." +</pre> + +If you hadn't turned the trap off before <kbd>.TN</kbd>, +"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. +<br> + +<!---TQ---> + +<hr width="66%" align="left"> +<a name="TQ"><h3><u>Tab Quit</u></h3></a> +<br> +Macro: <strong>TQ</strong> +<br> + +<p> +<strong>TQ</strong> takes you out of whatever tab you were in, +advances 1 linespace, and restores the left margin, line length, +quad direction and +<a href="definitions.html#TERMS_FILLED">fill mode</a> +that were in effect prior to invoking any tabs. +<br> +<hr> + +<!====================================================================> + +<a name="INTRO_MULTI_COLUMNS"></a> + +<a name="MULTI_COLUMNS"> + <h2><u>Multi-Columns</u></h2> +</a> + +Tabs are not by nature columnar, which is to say that if the text +inside a tab runs to several lines, calling another tab does not +automatically move to the +<a href="definitions.html#TERMS_BASELINE">baseline</a> +of the first line in the previous tab. To demonstrate: +<p> +<pre> + .TAB 1 + Carrots + Potatoes + Broccoli + .TAB 2 + $1.99/5 lbs + $0.25/lb + $0.99/bunch +</pre> + +produces, on output +<p> +<pre> + Carrots + Potatoes + Broccoli + $1.99/5 lbs + $0.25/lb + $0.99/bunch +</pre> + +The multi-column macros allow you to set tabs in columnar +fashion, rather than line by line. When you invoke multi-column +mode (with +<a href="#MCO">MCO</a>), +<strong>mom</strong> saves the position of the current baseline. +<a href="#MCR">MCR</a> +(Multi-column return) at any point while multi-columns are on +returns you to the saved position. Exiting multi-columns +(<a href="#MCX">MCX</a>) +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.) +<p> +Using our example above, but setting it in multi-column mode, +<p> +<pre> + .MCO + .TAB 1 + Carrots + Potatoes + Broccoli + .MCR + .TAB 2 + $1.99/5 lbs + $0.25/lb + $0.99/bunch + .MCX +</pre> + +produces +<p> +<pre> + Carrots $1.99/5 lbs + Potatoes $0.25/lb + Broccoli $0.99/bunch +</pre> + +<strong>NOTE:</strong> Do not confuse <strong>MCO</strong> with +the +<a href="docprocessing.html#COLUMNS">COLUMNS</a> +macro in the +<a href="docprocessing.html#DOCPROCESSING">document processing macros</a>. + +<a name="INDEX_MULTI_COLUMNS"> + <h3><u>Columns macro list</u></h3> +</a> +<ul> + <li><a href="#MCO">MCO (begin multi-column setting)</a> + <li><a href="#MCR">MCR (return to top of column)</a> + <li><a href="#MCX">MCX (exit multi-columns)</a> +</ul> + +<!---MCO---> + +<hr width="66%" align="left"> +<a name="MCO"><h3><u>Begin multi-column setting</u></h3></a> +<br> +Macro: <strong>MCO</strong> +<br> + +<p> +<strong>MCO</strong> +(<strong>M</strong>ulti-<strong>C</strong>olumn <strong>O</strong>n) +is the macro you use to begin multi-column setting. It marks +the current +<a href="definitions.html#TERMS_BASELINE">baseline</a> +as the top of your columns, for use late with +<a href="#MCR">MCR</a>. See the +<a href="#MULTI_COLUMNS">introduction to columns</a> +for an explanation of multi-columns and some sample +input. +<p> +<strong>NOTE:</strong> Do not confuse <strong>MCO</strong> with +the +<a href="docprocessing.html#COLUMNS">COLUMNS</a> +macro in the +<a href="docprocessing.html#DOCPROCESSING">document processing macros</a>. +<br> + +<!---MCR---> + +<hr width="66%" align="left"> +<a name="MCR"><h3><u>Return to top of column</u></h3></a> +<br> +Macro: <strong>MCR</strong> +<br> + +<p> +Once you've turned multi-columns on (with +<a href="#MCO">MCO</a>), +<strong>MCR</strong>, at any time, returns you to the top of +your columns. +<br> + +<!---MCX---> + +<hr width="66%" align="left"> +<a name="MCX"><h3><u>Exit multi-columns</u></h3></a> +<br> +Macro: <strong>MCX</strong> <var>[ <distance to advance below longest column> ]</var> +<br> +<em>*Optional argument requires a <a href="definitions.html#TERMS_UNITOFMEASURE">unit of measure</a></em> + +<p> +<strong>MCX</strong> takes you out of any tab you were in (by silently +invoking +<a href="#TQ">TQ</a>) and advances to the bottom of the longest +column. +<p> +Without an argument, <strong>MCX</strong> advances 1 linespace +below the longest column. Linespace, in this instance, is the +<a href="definitions.html#TERMS_LEADING">leading</a> +in effect <em>at the moment <strong>MCX</strong> is +invoked.</em> +<p> +If you pass the <var><distance></var> argument to +<strong>MCX</strong>, 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 <strong>MCX</strong> would +normally place you, you'd enter +<p> +<pre> + .MCX 6p +</pre> + +<strong>NOTE:</strong> If you wish to advance a precise distance +below the +<a href="definitions.html#TERMS_BASELINE">baseline</a> +of the longest column, use <strong>MCX</strong> with an +argument of 0 (zero; no unit of measure required) in conjunction +with the +<a href="#ALD">ALD</a> +macro, like this: +<p> +<pre> + .MCX 0 + .ALD 24p +</pre> + +The above advances to precisely 24 points below the baseline +of the longest column. +<br> +<hr> + +<!====================================================================> + +<a name="INTRO_INDENTS"></a> + +<a name="INDENTS"> + <h2><u>Indents</u></h2> +</a> + +With <strong>mom</strong>'s indents, you can indent from the left, +the right, or both margins. In addition, <strong>mom</strong> +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 name="INDENTS_TUT"><h3><u>A brief explanation of how mom handles indents</u></h3></a> +<p> +<strong>Mom</strong> provides five kinds of indents: left, right, +both, temporary, and hanging. Each is invoked by its own name: +<br> +<ul> + <li><strong>IL</strong> = <strong>I</strong>ndent <strong>L</strong>eft + <li><strong>IR</strong> = <strong>I</strong>ndent <strong>R</strong>ight + <li><strong>IB</strong> = <strong>I</strong>ndent <strong>B</strong>oth + <li><strong>HI</strong> = <strong>H</strong>anging <strong>I</strong>ndent + <li><strong>TI</strong> = <strong>T</strong>emporary <strong>I</strong>ndent +</ul> +<br> +In addition, there are four macros to control exiting from +indents: +<br> +<ul> + <li><strong>IX</strong> = exit all active indents + <li><strong>ILX</strong> = exit indent style left + <li><strong>IRX</strong> = exit indent style right + <li><strong>IBX</strong> = exit indent style both +</ul> +<br> +This section deals exclusively with <strong>IL, IR</strong> and +<strong>IB</strong>. For an explanation +of hanging and temporary indents -- how they work and how to use +them -- see +<a href="#HI">Hanging indents</a> +and +<a href="#TI">Temporary indents</a>. +<p> +The first time you invoke any of <strong>mom</strong>'s indents, +you must supply a measure. For example, +<p> +<pre> + .IL 2P +</pre> + +indents text 2 picas from the left margin (or current tab +indent). +<p> +When you want to exit the above indent, use either +<p> +<pre> + .IX + or + .ILX +</pre> + +The next time you want the same indent, invoke it without the +argument, like this: +<p> +<pre> + .IL +</pre> + +As you can see, once you've supplied a measure to an indent macro +<strong>mom</strong> stores the value, obviating the need to repeat +it on subsequent invocations. And <strong>mom</strong> doesn't just +store the measure -- she hangs on to it tenaciously. Arguments passed +to <strong>IL, IR</strong> and <strong>IB</strong> are additive. +Consider the following: +<p> +<pre> + .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... + ... + ... +</pre> + +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 <strong>IX</strong>, 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. +<strong>Mom</strong> adds the value of arguments to <strong>IL, +IR</strong> and <strong>IB</strong> to whatever value is already +in effect. +<p> +If you wanted the third block of text in the example above to +be right indented by just 2 picas (the original measure given to +<strong>IR</strong>), you would enter <kbd>.IR</kbd> without an +argument. +<p> +Because indent arguments are additive, putting a minus sign in front +of the argument can be used to subtract from the current value. +In the following example, the first line is indented 18 points, the +second is indented 36 points (18+18), and the third is again indented +18 points (36-18). +<p> +<pre> + .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. +</pre> + +Sometimes, you may want to clear out the stored indent values -- let +<strong>mom</strong> start indenting with a clean slate, as it were. +Giving the optional argument <kbd>CLEAR</kbd> to any of the +"indent quit" macros resets them to zero. +<br> +<ul> + <li><strong>IX CLEAR</strong> = quit and clear all indents + <li><strong>ILX CLEAR</strong> = quit and clear indent style left + <li><strong>IRX CLEAR</strong> = quit and clear indent style right + <li><strong>IBX CLEAR</strong> = quit and clear indent style both +</ul> +<br> +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. +<p> +<pre> + .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 +</pre> + +If, at <kbd>.IRX</kbd>, you wanted the text afterward to have no +indents (either left or right), you would enter <kbd>.IX</kbd>, +which exits all indent styles at once. +<p> +<strong>A word of advice:</strong> 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. <strong>Mom</strong>'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. +<p> +<strong>NOTE:</strong> see the section +<a href="typemacdoc.html#TYPESETTING">Typesetting Macros in Document Processing</a> +for information and advice on using idents with the +<a href="docprocessing.html#DOCPROCESSING">document processing macros</a>. + +<a name="INDEX_INDENTS"><h3><u>Indents macro list</u></h3> +<ul> + <li><a href="#IL">IL</a> (Indent left) + <li><a href="#IR">IR</a> (Indent right) + <li><a href="#IB">IB</a> (Indent both) + <li><a href="#TI">TI</a> (Temporary indent, left) + <li><a href="#HI">HI</a> (Hanging Indent) + <ul> + <li><a href="#NUM_LISTS">A recipe for numbered lists</a> + </ul> + <li><a href="#IX">IX</a> (Exit indents, all) + <li><a href="#IX">ILX</a> (Exit indent style left) + <li><a href="#IX">IRX</a> (Exit indent style right) + <li><a href="#IX">IBX</a> (Exit indent style both) +</ul> + +<!---IL---> + +<hr width="66%" align="left"> +<a name="IL"><h3><u>Indent left</u></h3></a> +<br> +Macro: <strong>IL</strong> <var>[ <measure> ]</var> +<br> +<em>*The optional argument requires a <a href="definitions.html#TERMS_UNITOFMEASURE">unit of measure</a></em> + +<p> +<strong>IL</strong> indents text from the left margin of the page, +or if you're in a tab, from the left edge of the tab. Once +<strong>IL</strong> is on, the left indent is applied uniformly to +every subsequent line of text, even if you change the line length. +<p> +The first time you invoke <strong>IL</strong>, 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 +<a href="inlines.html#INLINE_STRINGWIDTH_GROFF">\w</a> +<a href="definitions.html#TERMS_INLINES">inline esacpe</a> +may be used to specify a text-dependent measure, in which case +no unit of measure is required. For example, +<p> +<pre> + .IL \w'margarine' +</pre> + +indents text by the width of the word "margarine". +<p> +With no argument, <strong>IL</strong> indents by its last +active value. See the +<a href="#INDENTS_TUT">brief explanation of how mom handles indents</a> +for more details. +<p> +<strong>NOTE:</strong> Calling a tab (with +<a href="#TAB">TAB</a>) +automatically cancels any active indents. +<p> +<strong>ADDITIONAL NOTE:</strong> Invoking <strong>IL</strong> +automtically turns off <strong>IB</strong>. +<br> + +<!---IR---> + +<hr width="66%" align="left"> +<a name="IR"><h3><u>Indent right</u></h3></a> +<br> +Macro: <strong>IR</strong> <var>[ <measure> ]</var> +<br> +<em>*The optional argument requires a <a href="definitions.html#TERMS_UNITOFMEASURE">unit of measure</a></em> + +<p> +<strong>IR</strong> indents text from the right margin of the +page, or if you're in a tab, from the end of the tab. +<p> +The first time you invoke <strong>IR</strong>, 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 +<a href="inlines.html#INLINE_STRINGWIDTH_GROFF">\w</a> +<a href="definitions.html#TERMS_INLINES">inline esacpe</a> +may be used to specify a text-dependent measure, in which case +no unit of measure is required. For example, +<p> +<pre> + .IR \w'jello' +</pre> + +indents text by the width of the word "jello". +<p> +With no argument, <strong>IR</strong> indents by its last +active value. See the +<a href="#INDENTS_TUT">brief explanation of how mom handles indents</a> +for more details. +<p> +<strong>NOTE:</strong> Calling a tab (with +<a href="#TAB">TAB</a>) +automatically cancels any active indents. +<p> +<strong>ADDITIONAL NOTE:</strong> Invoking <strong>IR</strong> +automtically turns off <strong>IB</strong>. +<br> + +<!---IB---> + +<hr width="66%" align="left"> +<a name="IB"><h3><u>Indent both</u></h3></a> +<br> +Macro: <strong>IB</strong> <var>[ <left measure> <right measure> ]</var> +<br> +<em>*The optional arguments require a <a href="definitions.html#TERMS_UNITOFMEASURE">unit of measure</a></em> + +<p> +<strong>IB</strong> allows you to set or invoke a left and a right +indent at the same time. +<p> +At its first invocation, you must supply a measure for both indents; +at subsequent invocations when you wish to supply a measure, both must +be given again. As with <strong>IL</strong> and <strong>IR</strong>, +the measures are added to the values previously passed to the macro. +Hence, if you wish to change just one of the values, you must +give an argument of zero to the other. +<p> +<strong>A word of advice:</strong> If you need to manipulate left and +right indents separately, use a combination of <strong>IL</strong> +and <strong>IR</strong> instead of <strong>IB</strong>. You'll +save yourself a lot of grief. +<p> +A minus sign may be prepended to the arguments to subtract from their +current values. The +<a href="inlines.html#INLINE_STRINGWIDTH_GROFF">\w</a> +<a href="definitions.html#TERMS_INLINES">inline esacpe</a> +may be used to specify text-dependent measures, in which case +no unit of measure is required. For example, +<p> +<pre> + .IB \w'margaraine' \w'jello' +</pre> + +left indents text by the width of the word "margarine" +and right indents by the width of "jello". +<p> +Like <strong>IL</strong> and <strong>IR</strong>, <strong>IB</strong> +with no argument indents by its last active values. See the +<a href="#INDENTS_TUT">brief explanation of how mom handles indents</a> +for more details. +<p> +<strong>NOTE:</strong> Calling a tab (with +<a href="#TAB">TAB</a>) +automatically cancels any active indents. +<p> +<strong>ADDITIONAL NOTE:</strong> Invoking <strong>IB</strong> +automtically turns off <strong>IL</strong> and +<strong>IR</strong>. +<br> + +<!---TI---> + +<hr width="66%" align="left"> +<a name="TI"><h3><u>Temporary (left) indent</u></h3></a> +<br> +Macro: <strong>TI</strong> <var>[ <measure> ]</var> +<br> +<em>*The optional argument requires a <a href="definitions.html#TERMS_UNITOFMEASURE">unit of measure</a></em> + +<p> +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. (<strong>Mom</strong>'s +<a href="docprocessing.html#PP">PP</a> +macro, for example, uses a temporary indent.) +<p> +The first time you invoke <strong>TI</strong>, you must give it +a measure. If you want to indent the first line of a +paragraph by, say, 2 +<a href="definitions.html#TERMS_EM">ems</a>, +do +<p> +<pre> + .TI 2m +</pre> + +Subsequent invocations of <strong>TI</strong> do not require you +to supply a measure; <strong>mom</strong> keeps track of the +last measure you gave it. +<p> +Because temporary indents are temporary, there's no need to turn +them off. +<p> +<strong>IMPORTANT:</strong> Unlike <strong>IL, IR</strong> and +<strong>IB</strong>, measures given to <strong>TI</strong> +are NOT additive. In the following example, the second <kbd>.TI +2P</kbd> is exactly 2 picas. +<p> +<pre> + .TI 1P + The beginning of a paragraph... + .TI 2P + The beginning of another paragraph... +</pre> + +<!---HI---> + +<hr width="66%" align="left"> +<a name="HI"><h3><u>Hanging indent</u></h3></a> +<br> +Macro: <strong>HI</strong> <var>[ <measure> ]</var> +<br> +<em>*The optional argument requires a <a href="definitions.html#TERMS_UNITOFMEASURE">unit of measure</a></em> + +<p> +A hanging indent looks like this: +<p> +<pre> + 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... +</pre> + +The first line of text "hangs" outside the left +margin. +<p> +In order to use hanging indents, you must first have a left indent +active (set with either +<a href="#IL">IL</a> +or +<a href="#IB">IB</a>). +<strong>Mom</strong> will not hang text outside the left margin set with +<a href="#L_MARGIN">L_MARGIN</a> +or outside the left margin of a tab. +<p> +The first time you invoke <strong>HI</strong>, you must give it +a measure. If you want the first line of a paragraph to hang by, +say, 1 pica, do +<p> +<pre> + .IL 1P + .HI 1P +</pre> + +Subsequent invocations of <strong>HI</strong> do not require you +to supply a measure; <strong>mom</strong> keeps track of the +last measure you gave it. +<p> +Generally speaking, you should invoke <strong>HI</strong> immediately +prior to the line you want hung (i.e. without any intervening +<a href="definitions.html#TERMS_CONTROLLINES">control lines</a>). +And because hanging indents affect only one line, there's no need to turn +them off. + +<a name="NUM_LISTS"><h3><u>A recipe for numbered lists</u></h3></a> +<p> +A common use for hanging indents is setting numbered lists. +Consider the following example: +<p> +<pre> + .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? +</pre> + +First, we invoke a left indent with a measure equal to the width +of 2 +<a href="definitions.html#TERMS_FIGURESPACE">figures spaces</a> +plus a period (using the +<a href="inlines.html#INLINE_STRINGWIDTH_GROFF">\w</a> +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. +<p> +Notice that subsequent invocations of <strong>HI</strong> without a +measure produce exactly the same effect. +<p> +Paste the example above into a file and preview it with <kbd>groff -mom -X +<filename></kbd> to see hanging indents in action. +<p> +<strong>IMPORTANT:</strong> Unlike <strong>IL, IR</strong> and +<strong>IB</strong>, measures given to <strong>HI</strong> +are NOT additive. Each time you pass a measure to +<strong>HI</strong>, the measure is treated literally. +<br> + +<!---IX---> + +<hr width="66%" align="left"> +<a name="IX"><h3><u>Quitting indents</u></h3></a> +<br> +Macro: <strong>IX</strong> <var>[ CLEAR ]</var> (quit any/all indents) +<br> +Macro: <strong>ILX</strong> <var>[ CLEAR ]</var> (quit <strong>IL</strong>) +<br> +Macro: <strong>IRX</strong> <var>[ CLEAR ]</var> (quit <strong>IR</strong>) +<br> +Macro: <strong>IBX</strong> <var>[ CLEAR ]</var> (quit <strong>IB</strong>) + +<p> +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. +<p> +If you pass these macros the optional argument <strong>CLEAR</strong>, +they not only restore your original left margin and line length, +but also clear any values associated with a particular indent style. +The next time you need an indent of the same style, you have to supply +a measure again. +<p> +<strong>IX CLEAR</strong>, as you'd suspect, quits and clears +the values for all indent styles at once. + +<p> +<hr> +<a href="goodies.html#TOP">Next</a> +<a href="definitions.html#TOP">Prev</a> +<a href="#TOP">Top</a> +<a href="toc.html">Back to Table of Contents</a> +</body> +</html> 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 @@ +<html> +<head> +<meta http-equiv="content-type" content="text/html;charset=iso-8859-1"> +<title>Using mom</title> +</head> +<body bgcolor="#dfdfdf"> + +<!====================================================================> + +<a href="toc.html">Back to Table of Contents</a> + +<a name="TOP"></a> +<a name="USING"> + <h1 align="center"><u>USING MOM</u></h1> +</a> + +<a href="#USING_INTRO">Introduction</a> +<br> +<a href="#USING_MACROS">Inputting macros</a> +<br> +<a href="#USING_INVOKING">Invoking groff</a> +<br> +<a href="#USING_PREVIEWING">Previewing documents</a> +<br> +<hr> +<h2><a name="USING_INTRO"><u>Introduction</u></a></h2> + +As explained in the section +<a href="intro.html#INTRO">What is mom?</a>, +<strong>mom</strong> 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. <kbd>.PP</kbd> for +paragraphs, <kbd>.HEAD</kbd> for heads, <kbd>.FOOTNOTE</kbd> +for footnotes, etc.) that make a lot of typesetting decisions +automatically. +<p> +You tell <strong>mom</strong> that you want to use the document +processing macros with the +<a href="docprocessing.html#START">START</a> +macro, explained below. After <strong>START</strong>, +<strong>mom</strong> determines the appearance of text following +the markup tags automatically, although you, the user, can easily +change how <strong>mom</strong> 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. + +<a name="USING_MACROS"> + <h2><u>How to input mom's macros</u></h2> +</a> + +Regardless of which way you use <strong>mom</strong>, the +following apply. +<br> +<ol> + <li>You need a good text editor for inputting + <strong>mom</strong> files. + <p> + I cannot recommend highly enough that you use an + editor that lets you write syntax highlighting + rules for <strong>mom</strong>'s macros and + <a href="definitions.html#TERMS_INLINES">inline escapes</a>. + 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. + <li>All <strong>mom</strong>'s macros begin with a period + (dot) and must be entered in upper case (capital) + letters. + <li>Macro + <a href="definitions.html#TERMS_ARGUMENTS">arguments</a> + are separated from the macro itself by spaces. Multiple + arguments to the same macro are separated from each + other by spaces. Any number of spaces may be used. All + arguments to a macro must appear on the same line as the + macro. + <li>Any argument (except a + <a href="definitions.html#TERMS_STRINGARGUMENT">string argument</a>) + that is not a digit must be entered in upper case + (capital) letters. + <li>Any argument that requires a plus or minus sign must + have the plus or minus sign prepended to the argument + with no intervening space (e.g. +2, -4). + <li>Any argument that requires a + <a href="definitions.html#TERMS_UNITOFMEASURE">unit of measure</a> + must have the unit appended directly to the argument, + with no intervening space (e.g. 4P, .5i, 2v). + <li><a href="definitions.html#TERMS_STRINGARGUMENT">String arguments</a>, + 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). + <li>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 (<kbd>\</kbd>) at the ends of lines to break + them up, like this: + <p> + <pre> + .SUBTITLE "An In-Depth Consideration of the \ + Implications of Forty-Two as the Meaning of Life, \ + The Universe, and Everything" + </pre> +</ol> + +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 <kbd>\#</kbd> on a line by itself. +Consider the following, which is a template for starting the +chapter of a book. +<p> +<pre> + .TITLE "My Pulizter Novel" + .AUTHOR "Joe Blow" + .CHAPTER 1 + \# + .DOCTYPE CHAPTER + .PRINTSTYPE TYPESET + \# + .FAM P + .PS 10 + .LS 12 + \# + .START +</pre> + +<a name="USING_INVOKING"> + <h2><u>Printing -- invoking groff with mom</u></h2> +</a> + +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. +<p> +<pre> + groff -mom -l <filename> + groff -mom <filename> | lpr +</pre> + +In the first, the <strong>-l</strong> 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 <strong>lpr</strong> as your print +command, in which case, you can replace <strong>lpr</strong> +with whatever is appropriate to your box. +<p> +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 <strong>mom</strong>. + +<a name="USING_PREVIEWING"> + <h2><u>How to preview documents</u></h2> +</a> + +Other than printing out hard copy, there are two well-established +methods for previewing your work. Both assume you have a working +X server. +<p> +Groff itself comes with a quick and dirty previewer called +gxditview. Invoke it with +<p> +<pre> + groff -X -mom <filename> +</pre> + +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 +<strong>mom</strong>'s macro effects +(<a href="goodies.html#SMARTQUOTES">smartquotes</a> +and +<a href="goodies.html#LEADER">leaders</a> +come to mind). What it does have going for it is that it's fast and +doesn't gobble up system resources. +<p> +A surer way to preview documents is with <strong>gv</strong> +(ghostview). This involves processing documents with groff, +directing the output to a temporary (PostScript) file, then opening +the temporary file in <strong>gv</strong>. 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 <strong>gv</strong> 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 (<kbd>groff +-mom filename > filename.ps</kbd>), then open the file inside +<strong>gv</strong>. 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 <strong>gv</strong> registers that the file has changed, +and automatically loads the new version. Voilà! -- instant previewing. + +<p> +<hr> +<a href="toc.html">Back to Table of Contents</a> +</body> +</html> 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.). +\# +\# "<anything>" 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: +\# <width of printer sheet (ipPc)> +\# *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: +\# <offset from page left (ipPc)> +\# *Function: +\# Stores user supplied page offset in register #L_MARGIN. +\# Sets .po to user supplied offset. +\# *Notes: +\# Requires unit of measure. +\# +.MAC L_MARGIN END +. br +. nr #L_MARGIN (\\$1) +. po \\n[#L_MARGIN]u +.END +\# +\# +\# R_MARGIN +\# -------- +\# *Argument: +\# <width of right margin (ipPc)> +\# *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: +\# <distance to advance from top of page (ipPcv)> +\# *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: +\# <space to leave at the bottom of the page (ipPcv)> +\# *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: +\# <pagewidth> [pagelength [leftmargin [rightmargin [topmargin [bottommargin]]]]] +\# *Function: +\# Page set-up. Collects arguments and passes them to the appropriate +\# macros. +\# *Notes: +\# All arguments after pagewidth are optional, but must appear +\# in the order given above. (User can fill in as much or as +\# little as desired.) +\# +\# All arguments require a unit of measure. +\# +.MAC PAGE END +. br +. PAGEWIDTH \\$1 +. PAGELENGTH \\$2 +. ie '\\$3'' \{ .L_MARGIN \\n(.o \} +. el \{ .L_MARGIN \\$3 \} +. ie '\\$4'' \{ .R_MARGIN 1i \} +. el \{ .R_MARGIN \\$4 \} +. if !'\\$5'' \{ .T_MARGIN \\$5 \} +. if !'\\$6'' \{ .B_MARGIN \\$6 \} +.END +\# +\# ===================================================================== +\# +\# +++PAGE CONTROL+++ +\# +\# Generic macros for breaking pages. +\# +\# DO_HEADER +\# --------- +\# *Argument: +\# <none> +\# *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: +\# <none> +\# *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: +\# <line length (iPpc)> +\# *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: +\# <font family> +\# *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: +\# <point size of type> +\# *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: +\# <leading between lines of text> +\# *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: +\# <leading value to add to #PT_SIZE> [FACTOR] +\# *Function: +\# Stores user supplied auto-lead value in register #AUTOLEAD_VALUE. +\# Adds #AUT0LEAD_VALUE to #PT_SIZE when invoked to set leading. +\# All subsequent 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: +\# <none> | <anything> +\# *Function: +\# Turns automatic pairwise kerning on or off. +\# +.MAC KERN END +. ie '\\$1'' \{\ +. kern +. nr #KERN 1 +. \} +. el \{ +. kern 0 +. nr #KERN 0 +. \} +.END +\# +\# +\# INLINE KERNING +\# -------------- +\# 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: +\# <amount of overall "kerning" (letter spacing) to apply to the line> +\# *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: +\# <none> | <anything> | 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> | <size of margin> | <amount of interword space> +\# *Function: +\# Allows user to specify .HY LINES, MARGIN, and SPACE with a single command. +\# +.MAC HY_SET END +. nr #HY_SET 1 +. hlm \\$1 +. hym \\$2 +. hys \\$3 +.END +\# +\# ===================================================================== +\# +\# +++VERTICAL SPACING+++ +\# +\# ADVANCE LEAD +\# ------------ +\# *Argument: +\# <user supplied lead (ipPc) to advance below current baseline> +\# *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: +\# <user supplied lead (ipPc) to reverse above current baseline> +\# *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'<distance>' 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: +\# <none> | <anything> +\# *Function: +\# Turns automatic ligature generation on or off. +\# *Notes: +\# Ligatures may be supplied manually with \(fi, \(fl, etc. +\# +.MAC LIGATURES END +. ie '\\$1'' \{\ +. lg +. nr #LIGATURES 1 +. \} +. el \{\ +. lg 0 +. nr #LIGATURES 0 +. \} +.END +\# +\# +\# SMARTQUOTES +\# ----------- +\# *Arguments: +\# <none> | <anything> +\# *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: +\# <none> +\# *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: +\# <none> +\# *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: +\# <none> +\# *Function: +\# Turns fill mode off. Allows user to quad lines left without +\# requiring the .BR or .br macro. +\# *Notes: +\# LEFT simply turns fill off. Lines that exceed the current LL will +\# not be broken, 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: +\# <none> +\# *Function: +\# Turns fill on. Allows user to quad lines right without +\# requiring the .BR or .br macro. +\# *Notes: +\# Lines that exceed the current LL will be broken, with the excess +\# text quadded right. +\# +.MAC RIGHT END +. if \\n[#TAB_ACTIVE]=0 \{\ +. rr #QUAD +. ds $RESTORE_QUAD_VALUE RIGHT +. \} +. fi +. rj 100000 +. nr #FILL 1 +.END +\# +\# +\# CENTER +\# ------ +\# *Argument: +\# <none> +\# *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: +\# <stringtab number> L | R | C | J [QUAD] +\# *Function: +\# Creates strings $ST<#>_QUAD_DIR and $ST<#>_FILL, then sets up a +\# tab based on the collected information. +\# *Notes: +\# Like 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'<string>'u--if more than one word in string, surround +\# with double quotes "\w'<three word string>'" +\# LRCJ = quad for tab (left, right, center, justified) +\# If option QUAD afterwards is not given, quad is line for line +\# (no fill mode), meaning that there's no need for .BR or .br +\# between lines. +\# QUAD = fill tab (so it behaves as if .QUAD LRC or .JUSTIFY +\# had been given). +\# +\# N.B. -- indents *must* be turned off before setting tabs +\# +\# 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: +\# <tab number to tab into> +\# *Function: +\# Moves to tab number passed as an argument. +\# +.MAC TAB END +. ds $TAB_NUMBER \\$1 +. TAB\\*[$TAB_NUMBER] +. nr #IN_TAB 1 +. po \\n[#L_MARGIN]u+\\n[#TAB_OFFSET\\*[$TAB_NUMBER]]u +.END +\# +\# +\# TAB NEXT +\# -------- +\# *Argument: +\# <none> +\# *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: +\# <none> +\# *Function: +\# Sets #TAB_ACTIVE to "0" (off). +\# Resets left margin to value in effect prior to tabs. +\# Resets line length to value in effect prior to tabs. +\# Checks #QUAD to see if we were in flush or quad mode +\# prior to tabs (0=off, 1=on). +\# Resets QUAD [ L|R|C ], LEFT, RIGHT, CENTER, or JUSTIFY +\# in effect prior to tabs. +\# *Notes: +\# TQ *must* 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: +\# <none> | <anything> +\# *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: +\# <none> +\# *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: +\# <number of degrees> | RESET +\# *Function: +\# Modifies register #DEGREES for use with \*[SLANT], or resets +\# it to the default. Defines string \*[SLANTX] +\# *Notes: +\# \*[SLANT] permits pseudo-italicizing of a font in cases where +\# no italic font exists in a particular family. +\# +\# Default # of degrees is 15. +\# +\# Do not use unit of measure with arg to SETSLANT. +\# +\# It may be necessary to adjust the spacing on either side of +\# [SLANT] and [SLANTX]. +\# +\# In docs, SLANT carries over from para to para. +\# +.nr #DEGREES 15 +.ds SLANT \ER'#SLANT_ON 1'\ES'\En[#DEGREES]' +.ds SLANTX \ER'#SLANT_ON 0'\ES'0' +\# +.MAC SETSLANT END +. ie '\\$1'RESET' \{\ +. nr #DEGREES 15 +. if \\n[#PRINT_STYLE]=1 \{\ +. if \\n[#UNDERLINE_SLANT] \{ .return \} +. \} +. ds SLANT \ER'#SLANT_ON 1'\ES'\En[#DEGREES]' +. \} +. el \{\ +. nr #DEGREES \\$1 +. if \\n[#PRINT_STYLE]=1 \{\ +. if \\n[#UNDERLINE_SLANT] \{ .return \} +. \} +. ds SLANT \ER'#SLANT_ON 1'\ES'\En[#DEGREES]' +. \} +. ds SLANTX \ER'#SLANT_ON 0'\ES'0' +.END +\# +\# +\# BOLDER +\# ------ +\# +\# SETBOLDER +\# --------- +\# *Arguments: +\# <amount of emboldening> | RESET +\# *Function: +\# Modifies register #BOLDER_UNITS for use with \*[BOLDER], or resets +\# it to the default 700 units. +\# *Notes: +\# \*[BOLDER] allows pseudo-emboldening of a font where no bold +\# font exists in a particular family. +\# +\# Default for SETBOLDER is 700 units. Do not use unit of measure +\# with arg to SETBOLDER. +\# +.nr #BOLDER_UNITS 700 +\# +.MAC SETBOLDER END +. if \\n[#IGNORE]=1 \{ .return \} +. ie '\\$1'RESET' \{ .nr #BOLDER_UNITS 700 \} +. el \{ .nr #BOLDER_UNITS \\$1 \} +.END +\# +\# +.MAC BOLDER END +\c +.bd \\n(.f \\n[#BOLDER_UNITS] +.END +\# +\# +.MAC BOLDERX END +\c +.bd \\n(.f +.END +\# +\# +++CONDENSE/EXTEND+++ +\# +\# CONDENSE/EXTEND +\# --------------- +\# *Arguments: +\# <percentage to condense/expand type size> +\# *Function: +\# Stores current point size in z's in #PT_SIZE_IN_UNITS, figures out +\# new point size (for character width) from arg, and defines string +\# COND or EXT, which set the type size to the new character width, +\# and sets the height of type to the value stored in CURRENT_PT_SIZE +\# *Notes: +\# CONDENSE_OR_EXTEND is invoked from the aliases +\# CONDENSE and EXTEND. CONDENSE implies <100, EXTEND +\# implies >100. Do not use a percent sign in the argument. +\# +\# There is no default setting for CONDENSE or EXTEND. +\# 80 is a good approximation of condensed type, 120 is okay +\# for extended. +\# +\# The value set by CONDENSE or EXTEND applies to all +\# subsequent \*[COND] or \*[EXT] escapes until a new value is set. +\# +\# \*[COND] or \*[EXT] must be turned off before all changes of point +\# size and reinvoked afterwards (if so desired). This refers to +\# changes of point size via control lines AND 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: +\# <character to use for marking pad points> +\# *Function: +\# Defines string $PAD_MARKER, used in PAD +\# *Notes: +\# $PAD_MARKER is normally # (the pound sign). +\# +.MAC PAD_MARKER END +. ds $PAD_MARKER \\$1 +.END +\# +\# +\# PAD +\# --- +\# *Argments: +\# "<string of text with padding markers inserted>" +\# *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 <IS>. +\# *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: +\# <character to use whenever \*[LEADER] is invoked> +\# *Function: +\# Set leader character. +\# +.MAC LEADER_CHARACTER END +. lc \\$1 +.END +\# +.ds LEADER +\# +\# +++DROP CAPS+++ +\# +\# DROP CAP FAMILY +\# --------------- +\# *Argument: +\# <family of drop cap> +\# *Function: +\# Creates or modifies string $DC_FAM. +\# +.MAC DROPCAP_FAMILY END +. ds $DC_FAM \\$1 +.END +\# +\# +\# DROP CAP FONT +\# ------------- +\# *Argument: +\# <font of drop cap> +\# *Function: +\# Creates or modifies string $DC_FT. +\# +.MAC DROPCAP_FONT END +. ds $DC_FT \\$1 +.END +\# +\# +\# DROP CAP GUTTER +\# --------------- +\# *Argument: +\# <width of gutter between drop cap and indented text> +\# *Function: +\# Creates or modifies register #DC_GUT. +\# *Notes: +\# Requires unit of measure. Default is 3p. +\# +.MAC DROPCAP_GUTTER END +. nr #DC_GUT (\\$1) +.END +\# +\# +\# DROP CAP ADJUST +\# --------------- +\# *Argument: +\# <+|- # of points to in/decrease point size of drop cap letter> +\# *Function: +\# Creates or modifies string $DC_ADJUST. +\# *Notes: +\# Despite its best efforts, DROPCAP doesn't always get the point +\# size of the drop cap critically perfect. DROPCAP_ADJUST lets +\# the user add or subtract points (or fractions of points) to +\# get the size right. +\# +\# Requires the + or - sign. +\# +.MAC DROPCAP_ADJUST END +. ds $DC_ADJUST \\$1 +.END +\# +\# +\# DROP CAP +\# -------- +\# *Arguments: +\# <dropcap letter> <# of lines> [COND <% to condense> | EXT <% to extend>] +\# *Function: +\# Calculates point size of dropcap based on # of lines passed as +\# arg 2. Sets indent for text based on dropcap width+gutter. +\# Advances and prints dropcap; reverses and prints indented text +\# to bottom of dropcap, then resets indent to left margin (plus +\# any indent that was in effect prior to invoking DROPCAP). +\# *Notes: +\# Drop caps 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 +\# .I<LRB>X 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 I<LRB>X 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: +\# <none> +\# *Function: +\# Marks the top of a column set +\# +.MAC MCO END +.mk c +.END +\# +\# MULTIPLE COLUMN RETURN +\# ---------------------- +\# *Arguments: +\# <none> +\# *Function: +\# Returns to the top of a column set +\# +.MAC MCR END +. sp |\\ncu +.END +\# +\# MULTIPLE COLUMNS OFF +\# -------------------- +\# *Arguments: +\# <none> | <lead to advance beneath bottom of deepest column> +\# *Function: +\# Advances to the end of a column set +\# *Notes: +\# With no argument, advances to the next baseline (at the current +\# leading value) beneath the longest column. With an argument +\# (which requires a unit of measure), advances arg distance +\# beneath the baseline of the deepest column. If the argument +\# is zero, advances to the baseline of the deepest column. +\# +.MAC MCX END +. 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: +\# <none> | <anything> +\# *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: +\# <anything> +\# *Function: +\# Prints anything. A macro that helps keep my code nicely indented. +\# +.MAC PRINT END +\\$* +.END +\# +\# +\# CAPS +\# ---- +\# *Arguments: +\# <none> | <anything> +\# *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: +\# <none> +\# Function: +\# Gets cap-height, x-height, and descender depth of the +\# current font at the current point size. +\# *Notes: +\# The routine is diverted so it remains invisible to output. +\# +.MAC SIZESPECS END +. 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: +\# <none> +\# *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: +\# <none> +\# *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: +\# <none> | <anything> +\# *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 "<whatever> | 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: +\# <date string> +\# *Function: +\# Stores date string in string $DATE. +\# +.MAC DATE END +. nr #DATE 1 +. di DATE +. RIGHT +.END +\# +\# +\# TO +\# -- +\# *Arguments: +\# <none> +\# *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: +\# <none> +\# *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: +\# <greeting string> +\# *Function: +\# Stores greeting in string $GREETING. +\# +.MAC GREETING END +. if !'\\n(.z'' \{ .di \} +. nr #GREETING 1 +. di GREETING +. LEFT +.END +\# +\# +\# CLOSING +\# ------- +\# *Arguments: +\# <closing string> +\# *Function: +\# Stores greeting in string $CLOSING. +\# +.MAC CLOSING END +. br +. nr #CLOSING 1 +. di CLOSING +.END +\# +\# +\# NO SUITE +\# -------- +\# *Arguments: +\# <none> +\# *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: +\# <none> +\# *Function: +\# Sets up defaults if no values are entered prior to START. +\# *Notes: +\# The defaults for $CHAPTER_STRING, $DRAFT_STRING, and +\# $REVISION_STRING are in the COPYSTYLE macro. +\# +.MAC DEFAULTS END +. if !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: +\# <none> +\# *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: +\# <none> | <anything> [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 <anything> (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: +\# <docheader start position> +\# *Function: +\# Creates register #DOCHEADER_ADVANCE, used in START. +\# *Notes: +\# Unit of measure required. +\# Default is same as T_MARGIN. +\# +.MAC DOCHEADER_ADVANCE END +. nr #DOCHEADER_ADVANCE (\\$1) +.END +\# +\# +\# TITLE FAMILY +\# ------------ +\# *Argument: +\# <family to use for the document header title> +\# *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: +\# <font to use for the document header title> +\# *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: +\# <family to use for the document header title> +\# *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: +\# <font to use for the document header title> +\# *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: +\# <family to use for author in document header> +\# *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: +\# <font to use for author in document header> +\# *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: +\# <family to use for the document type string> +\# *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: +\# <font to use for the document type string> +\# *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: +\# <left margin of document> +\# *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: +\# <right margin of document> +\# *Function: +\# Creates or modifies register #DOC_R_MARGIN. +\# *Notes: +\# Affects EVERYTHING on the page. +\# +.MAC DOC_RIGHT_MARGIN END +. br +. nr #DOC_R_MARGIN (\\$1) +. R_MARGIN \\n[#DOC_R_MARGIN] +. nr #DOC_L_LENGTH \\n[#L_LENGTH] +.END +\# +\# +\# DOCUMENT LINE LENGTH +\# -------------------- +\# *Argument: +\# <line length of document> +\# *Function: +\# Creates or modifies 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: +\# <family of running text> +\# *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: +\# <point size of running text> +\# *Function: +\# Creates or modifies register $DOC_PT_SIZE. +\# *Notes: +\# DOC_PT_SIZE is the basis for calculating all type sizes in +\# a document. +\# +.MAC DOC_PT_SIZE END +. if \\n[#IGNORE] \{ .return \} +. br +. PS \\$1 +. nr #DOC_PT_SIZE \\n[#PT_SIZE] +.END +\# +\# +\# DOCUMENT LEAD +\# ------------- +\# *Argument: +\# <lead (".vs") of running text> [ADJUST] +\# *Function: +\# Creates or modifies register #DOC_LEAD. If the optional +\# ADJUST argument is given, adjusts leading so that the last +\# line of text falls exactly on #B_MARGIN. +\# *Notes: +\# DOC_LEAD is the basis for calculating all leading changes in +\# a document. Default for TYPESET is 16; 24 for TYPEWRITE. +\# +\# Because the visible bottom or footer margin of a page depends +\# on the overall document lead supplied by the register #DOC_LEAD, +\# DOC_LEAD, in the body of a document, should always be associated +\# with the start of a new page (in other words, just before or +\# just after a manual NEWPAGE). +\# +.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: +\# <none> | <anything> +\# *Function: +\# Adjusts document lead so that the last line of text falls exactly +\# on #B_MARGIN. +\# +.MAC DOC_LEAD_ADJUST END +. ie '\\$1'' \{ .nr #ADJ_DOC_LEAD 1 \} +. 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: +\# <what goes in the "by" slot before author in the document header> +\# *Function: +\# Creates or modifies string $ATTRIBUTE_STRING. +\# *Notes: +\# Default is "by". A blank string ("") may be used if no +\# attribution is desired. +\# +.MAC ATTRIBUTE_STRING END +. ds $ATTRIBUTE_STRING \\$1 +.END +\# +\# +\# CHAPTER STRING +\# -------------- +\# *Argument: +\# <what to print any time the word "chapter" is required> +\# *Function: +\# Creates or modifies string $CHAPTER_STRING. +\# *Notes: +\# Default is "chapter". +\# +.MAC CHAPTER_STRING END +. ds $CHAPTER_STRING \\$1 +.END +\# +\# +\# DRAFT STRING +\# ------------ +\# *Argument: +\# <what to print any time the word "draft" is required> +\# *Function: +\# Creates or modifies string $DRAFT_STRING. +\# *Notes: +\# Default is "draft". +\# +.MAC DRAFT_STRING END +. ds $DRAFT_STRING \\$1 +.END +\# +\# +\# REVISION STRING +\# --------------- +\# *Argument: +\# <what to print any time the word "revision" is required> +\# *Function: +\# Creates or modifies string $REVISION_STRING. +\# *Notes: +\# Default is "revision". +\# +.MAC REVISION_STRING END +. ds $REVISION_STRING \\$1 +.END +\# +\# +\# FINIS STRING +\# ------------ +\# *Argument: +\# <what to print with the finis macro> +\# *Function: +\# Creates or modifies string $FINIS_STRING. +\# *Notes: +\# Default is "END". +\# +.MAC FINIS_STRING END +. nr #FINIS 1 +. CAPS +. ds $FINIS_STRING \\$1 +. CAPS OFF +.END +\# +\# ==================================================================== +\# +\# +++RECTO/VERSO+++ +\# +\# RECTO_VERSO +\# ----------- +\# *Arguments: +\# <none> | <anything> +\# *Function: +\# Switches HDRFTR_LEFT and HDRFTR_RIGHT on alternate pages. Also +\# switches page numbers left and right if either is chosen rather +\# than the default centered page numbers. Switches left and right +\# margins if differing values have been entered. +\# *Notes: +\# Default is OFF. +\# +.MAC RECTO_VERSO END +. ie '\\$1'' \{ .nr #RECTO_VERSO 1 \} +. el \{ .nr #RECTO_VERSO 0 \} +.END +\# +\# ==================================================================== +\# +\# +++EPIGRAPHS+++ +\# +\# EPIGRAPH FAMILY +\# --------------- +\# *Argument: +\# <family to use for epigraphs> +\# *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: +\# <font to use for epigraphs> +\# *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: +\# <value by which to multiply PP_INDENT for block epigraphs> +\# *Function: +\# Creates or modifies register #EPI_OFFSET_VALUE. +\# *Notes: +\# Default is 2 for TYPEWRITE, 3 for TYPESET. +\# +.MAC EPIGRAPH_INDENT END +. nr #EPI_OFFSET_VALUE \\$1 +.END +\# +\# +\# EPIGRAPH AUTOLEAD +\# ----------------- +\# *Argument: +\# <amount of lead to add to the epigraph ps for epigraph leading> +\# *Function: +\# Creates or modifies register #EPI_AUTOLEAD. +\# *Notes: +\# Default is 2 (for TYPESET; TYPEWRITE doesn't require this). +\# +.MAC EPIGRAPH_AUTOLEAD END +. nr #EPI_AUTOLEAD \\$1 +.END +\# +\# +\# EPIGRAPH +\# -------- +\# *Arguments: +\# BLOCK | <anything> +\# *Function: +\# Places an epigraph before the document's text, after the +\# document header, or after a HEAD. +\# *Notes: +\# #EPIGRAPH 1 = centered; 2 = block +\# +\# By default, epigraphs are centered, allowing the user +\# to input them on a line per line basis. To change this +\# behaviour, the user can supply the argument BLOCK, which +\# will produce indented, filled text similar to BLOCKQUOTE. +\# +\# If a block epigraph contains more than one para, ALL paras of +\# the epigraph must be preceded by PP. Otherwise, PP is optional. +\# +.MAC EPIGRAPH END +. nr #PP_STYLE 2 +. nr #Q_PP 0 +. if \\n[#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: +\# <none> +\# *Function: +\# Ends diversion started in EPIGRAPH. Makes spacing +\# adjustments to compensate for the difference between epigraph +\# leading and overall document leading, so that the bottom of +\# the pages remain flush. +\# *Notes: +\# In addition to its usual place at the beginning of a +\# document, EPIGRAPH may also be used after HEAD. +\# +.MAC DO_EPIGRAPH END +. br +. di +. 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: +\# <none> +\# *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: +\# <family to use in header/footers> +\# *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: +\# <amount of space between header/footer and header/footer rule> +\# *Function: +\# Creates or modifies register #HDRFTR_RULE_GAP to hold amount +\# of space between header/footer and header/footer rule. +\# *Notes: +\# Default is 4p. +\# +.MAC HDRFTR_RULE_GAP END +. nr #HDRFTR_RULE_GAP (\\$1) +.END +\# +\# +\# HDRFTR LEFT +\# ----------- +\# *Argument: +\# <what to put in the left position of page header/footers> +\# *Function: +\# Creates or modifies string $HDRFTR_LEFT. +\# Creates register #USER_DEF_HDRFTR_LEFT, which, if 1, +\# overrides the $HDRFTR_LEFT string created by default +\# in DEFAULTS. +\# *Notes: +\# Especially useful if doc has more than one author, and a list +\# of authors by last name is desired in header/footers. +\# Default is author. +\# +\# If the argument is the # character, simply prints the current +\# page number. +\# +\# If the user wants to *incorporate* the page number into the string, +\# \*[PAGE#] must be used. For example, if the user wants to put +\# an 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: +\# <family of header/footer left string> +\# *Function: +\# Creates or modifies string $HDRFTR_LEFT_FAM. +\# +.MAC HDRFTR_LEFT_FAMILY END +. ds $HDRFTR_LEFT_FAM \\$1 +.END +\# +\# +\# HDRFTR LEFT FONT +\# ---------------- +\# *Argument: +\# <font of header/footer left string> +\# *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: +\# <none> | <anything> +\# *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: +\# <what to put in the centre position of page header/footers> +\# *Function: +\# Creates or modifies string $HDRFTR_CENTER. +\# Creates register #USER_DEF_HDRFTR_CENTER, which, if 1, +\# overrides the $HDRFTR_CENTER string created by default +\# in COPYSTYLE. +\# *Notes: +\# Default is document type if DOCTYPE NAMED, Chapter # if DOCTYPE +\# CHAPTER, draft and revision number if COPYSTYLE DRAFT. +\# +\# If the argument is the # character, simply prints the current +\# page number. +\# +\# If the user wants to *incorporate* the page number into the string, +\# \*[PAGE#] must be used. For example, if the user wants to put +\# an 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: +\# <family of header/footer center string> +\# *Function: +\# Creates or modifies string $HDRFTR_CENTER_FAM. +\# +.MAC HDRFTR_CENTER_FAMILY END +. ds $HDRFTR_CENTER_FAM \\$1 +.END +\# +\# +\# HDRFTR CENTER FONT +\# ------------------ +\# *Argument: +\# <font of header/footer center string> +\# *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: +\# <none> | <anything> +\# *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: +\# <what to put in the right position of page header/footers> +\# *Function: +\# Creates or modifies string $HDRFTR_RIGHT. +\# Creates register #USER_DEF_HDRFTR_RIGHT, which, if 1, +\# overrides the $HDRFTR_RIGHT string created by default +\# in DEFAULTS. +\# *Notes: +\# Default is document title. +\# +\# If the argument is the # character, simply prints the current +\# page number. +\# +\# If the user wants to *incorporate* the page number into the string, +\# \*[PAGE#] must be used. For example, if the user wants to put +\# an 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: +\# <family of header/footer right string> +\# *Function: +\# Creates or modifies string $HDRFTR_RIGHT_FAM. +\# +.MAC HDRFTR_RIGHT_FAMILY END +. ds $HDRFTR_RIGHT_FAM \\$1 +.END +\# +\# +\# HDRFTR RIGHT FONT +\# ----------------- +\# *Argument: +\# <font of header/footer right string> +\# *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: +\# <none> | <anything> +\# *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: +\# <none> | <anything> +\# *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: +\# <none> +\# *Function: +\# Sets the family, font, and point size of all strings in +\# header/footers to the same family and point size as running +\# text. Font for the header/footer becomes roman throughout. +\# +.MAC HDRFTR_PLAIN END +. 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: +\# <none> | <anything> +\# *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: +\# <none> | <anything> +\# *Function: +\# Toggles register #PRINT_FOOTER_ON_PAGE_1 +\# *Notes: +\# Lets user choose whether to print footer on first +\# page of doc. +\# +.MAC FOOTER_ON_FIRST_PAGE END +. ie '\\$1'' \{ .nr #PRINT_FOOTER_ON_PAGE_1 1 \} +. el \{ .rr #PRINT_FOOTER_ON_PAGE_1 \} +.END +\# +\# +\# PRINT PAGE NUMBER ON FIRST PAGE +\# ------------------------------- +\# *Arguments: +\# <none> | <anything> +\# *Function: +\# Toggles register #PRINT_PAGENUM_ON_PAGE_1 +\# *Notes: +\# Lets user choose whether to print page number on first +\# page of doc and after collate when footers are on or page numbering +\# has been user set at top of page. +\# +.MAC PAGENUM_ON_FIRST_PAGE END +. ie '\\$1'' \{ .nr #PRINT_PAGENUM_ON_PAGE_1 1 \} +. el \{ .rr #PRINT_PAGENUM_ON_PAGE_1 \} +.END +\# +\# +\# PRINT HEADER/FOOTER +\# ------------------- +\# *Arguments: +\# <none> +\# *Function: +\# Based on defaults or values entered by user, prints a +\# three-part title at either the top or the bottom of the page. +\# *Notes: +\# Called from within either HEADER or FOOTER. +\# +.MAC PRINT_HDRFTR END +. if \\n[#DOC_TYPE]=4 \{\ +. nr #SUITE \En[.pn] +. \} +. if \\n[#FOOTERS_ON] \{\ +. if \\n[#START_FOR_FOOTERS] \{\ +. rr #START_FOR_FOOTERS +. if !\\n[#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: +\# <none> | <anything> +\# *Function: +\# Turns headers at the top of the page off or on. +\# *Notes: +\# Default is on. +\# +.MAC HEADERS END +. ie '\\$1'' \{ .nr #HEADERS_ON 1 \} +. el \{ .nr #HEADERS_ON 0 \} +.END +\# +\# +\# HEADER MARGIN +\# ------------- +\# *Argument: +\# <amount of space between top of page and header> +\# *Function: +\# Creates or modifies register #HEADER_MARGIN to hold amount +\# of space between top of page and header. +\# *Notes: +\# Requires unit of measure. Default is 4P+6p, measured top-of-page +\# to baseline. +\# +.MAC HEADER_MARGIN END +. nr #HEADER_MARGIN (\\$1) +.END +\# +\# +\# HEADER GAP +\# ---------- +\# *Argument: +\# <amount of space between header and running text> +\# *Function: +\# Creates or modifies register #HEADER_GAP to hold amount +\# of space between header and running text. +\# *Notes: +\# Default is 1P+6p. +\# +.MAC HEADER_GAP END +. nr #HEADER_GAP (\\$1) +.END +\# +\# +\# HEADER +\# ------ +\# *Arguments: +\# <none> +\# *Function: +\# 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: +\# <none> | <anything> +\# *Function: +\# Turns footers at the bottom of the page off or on. +\# *Notes: +\# Default is off. If on, page numbers automatically go at +\# the top, centered, unless pagination has been turned off, +\# or the pagenumber position has been changed to left or right. +\# +.MAC FOOTERS END +. ie '\\$1'' \{\ +. nr #FOOTERS_ON 1 +. PAGE_NUM_POS TOP CENTER +. \} +. el \{ .nr #FOOTERS_ON 0 \} +.END +\# +\# +\# FOOTER MARGIN +\# ------------- +\# *Argument: +\# <footer margin> +\# *Function: +\# Creates or modifies register #FOOTER_MARGIN which holds the +\# amount of space to leave between the page number and the bottom +\# of the page. +\# *Notes: +\# Unit of measure required. Default is 3P. +\# +.MAC FOOTER_MARGIN END +. ie \\n%>0 \{ .nr #FOOTER_MARGIN (\\$1) \} +. el \{ . \} +.END +\# +\# +\# FOOTER GAP +\# ---------- +\# *Argument: +\# <distance from end of running text to page # or footer> +\# *Function: +\# Creates or modifies register #FOOTER_GAP which holds the +\# amount of space to leave between running text and the page number. +\# *Notes: +\# Requires unit of measure. Default is 3P. Measured baseline to +\# baseline. +\# +.MAC FOOTER_GAP END +. ie \\n%>0 \{ .nr #FOOTER_GAP (\\$1) \} +. el \{ . \} +.END +\# +\# +\# FOOTER +\# ------ +\# *Arguments: +\# <none> +\# *Function: +\# Places footer at bottom of page if #FOOTERS=1, otherwise +\# places page number at bottom of page (if #PAGINATE=1). +\# Page numbers are in arabic or roman according to COPYSTYLE. +\# DRAFT starts the document at page 1 regardless of PAGENUMBER. +\# FINAL respects PAGENUMBER. +\# +.MAC FOOTER END +. ev PAGE_BOTTOM +. nr #L_MARGIN_DIFF \\n[#L_MARGIN]-\\n[#DOC_L_MARGIN] +. nr #RESTORE_OFFSET \\n(.o +. if !\\n[#FN_DEFER] \{\ \"i.e. no defer (do not defer footnote processing to next page or column) +. nr #DIVER_DEPTH 0 +. if \\n[#FN_COUNT] \{\ +. sp |\\n[#PAGE_LENGTH]u-(\\n[#B_MARGIN]u+\\n[#FN_DEPTH]u) +. po \\n[#DOC_L_MARGIN]u +. if \\n[#COLUMNS] \{ .po \\n[#COL_\\n[#COL_NUM]_L_MARGIN]u \} +. nf +. FOOTNOTES +. rm FOOTNOTES +. if '\\n(.z'FN_OVERFLOW' \{\ +. di +. nr #FN_OVERFLOW_DEPTH \\n[#DIVER_DEPTH] +. \} +. nr #FN_COUNT 0 +. if \\n[#COL_NEXT] \{ .nr #COL_NUM \\n-[#COL_NUM] \} +. \} +. \} +. ie \\n[#COLUMNS] \{\ +. ie \\n[#COL_NUM]=\\n[#NUM_COLS] \{ .DO_FOOTER \} +. el \{\ +. sp |\\n(dcu +. po \\n[#COL_\\n+[#COL_NUM]_L_MARGIN]u +. PROCESS_FN_LEFTOVER +. if !\\n[#EPIGRAPH] \{ .rr #COL_NEXT \} +. if !\\n[#QUOTE] \{ .rr #COL_NEXT \} +. if \\n[#QUOTE] \{\ +. nr #Q_OFFSET \\n[#L_MARGIN]+(\\n[#PP_INDENT]*\\n[#Q_OFFSET_VALUE]) +. if \\n[#COLUMNS] \{ .nr #Q_OFFSET \\n[#COL_\\n[#COL_NUM]_L_MARGIN]+(\\n[#PP_INDENT]*\\n[#Q_OFFSET_VALUE]) \} +. po \\n[#Q_OFFSET]u +. \} +. if \\n[#EPIGRAPH] \{\ +. 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 +. \} +. ie \\n[#EPIGRAPH] \{\ +. ie !\\n[#EPI_ACTIVE] \{\ +. ns +. rr #EPI_ACTIVE +. \} +. el \{\ +. sp |\\n(dcu+(\\n[#DOC_LEAD]u-\\n[#EPI_LEAD]u) +. rr #EPI_ACTIVE +. \} +. \} +. el \{ .ns \} +. ev +. \} +. ns +. \} +. el \{ .DO_FOOTER \} +.END +\# +\# +\# PROCESS FOOTER +\# -------------- +\# *Arguments: +\# <none> +\# *Function: +\# Prints footer (page number, or 3-part footer). +\# Resets CAPS and UNDERLINE if they were on. +\# +.MAC DO_FOOTER END +. sp |\\n[#PAGE_LENGTH]u-\\n[#FOOTER_MARGIN]u-1v +. ev FOOTER +. po \\n[#DOC_L_MARGIN]u +. ll \\n[#DOC_L_LENGTH]u +. ta \\n(.lu +. 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 +. \} +. 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[#FOOTERS_ON] \{\ +. PRINT_HDRFTR +. \} +. el \{\ +. if \\n[#PAGINATE] \{\ +. if \\n[#PAGE_NUM_V_POS]=2 \{ .PRINT_PAGE_NUMBER \} +. \} +. \} +. if \\n[#CAPS_WAS_ON] \{\ +. CAPS +. rr #CAPS_WAS_ON +. \} +. if \\n[#UNDERLINE_WAS_ON] \{\ +. UNDERLINE +. rr #UNDERLINE_WAS_ON +. \} +. ev +. bp +. ev +.END +\# +\# ==================================================================== +\# +\# +++HEADS+++ +\# +\# ---Head numbers--- +\# +\# NUMBER HEADS +\# ------------ +\# *Arguments: +\# <none> | <anything> +\# *Function: +\# Toggles register #NUMBER_HEAD; sets incrementing register #HEAD_NUM. +\# *Notes: +\# Default is OFF. +\# +.MAC NUMBER_HEADS END +. ie '\\$1'' \{\ +. nr #NUMBER_HEAD 1 +. if !\\n[#HEAD_NUM] \{ .nr #HEAD_NUM 0 1 \} +. \} +. el \{ .rr #NUMBER_HEAD \} +.END +\# +\# +\# RESET HEAD NUMBER +\# ----------------- +\# *Arguments: +\# <none> | <desired head number> +\# *Function: +\# Resets incrementing register #HEAD_NUM to 1 or, if there's +\# an argument, to user supplied number. +\# *Notes: +\# Also resets subhead and parahead numbers. If this is not +\# desired, subhead and parahead numbers may be reset individually. +\# +.MAC RESET_HEAD_NUMBER END +. ie '\\$1'' \{\ +. nr #HEAD_NUM 0 1 +. nr #SH_NUM 0 1 +. nr #PH_NUM 0 1 +. \} +. el \{\ +. nr #HEAD_NUM \\$1-1 1 +. nr #SH_NUM 0 1 +. nr #PH_NUM 0 1 +. \} +.END +\# +\# +\# NUMBER SUBHEADS +\# --------------- +\# *Arguments: +\# <none> | <anything> +\# *Function: +\# Toggles register #NUMBER_SH; sets incrementing register #SH_NUM. +\# *Notes: +\# Default is OFF. +\# +.MAC NUMBER_SUBHEADS END +. ie '\\$1'' \{\ +. nr #NUMBER_SH 1 +. if !\\n[#SH_NUM] \{ .nr #SH_NUM 0 1 \} +. \} +. el \{ .rr #NUMBER_SH \} +.END +\# +\# +\# RESET SUBHEAD NUMBER +\# -------------------- +\# *Arguments: +\# <none> | <desired subhead number> +\# *Function: +\# Resets incrementing register #SH_NUM to 1 or, if there's +\# an argument, to user supplied number. +\# *Notes: +\# When the subhead number is reset, it resets the parahead number as +\# well. If this behaviour is not what's wanted, RESET_SUBHEAD_NUMBER +\# allows the user to set the parahead number to whatever s/he desires. +\# +.MAC RESET_SUBHEAD_NUMBER END +. ie '\\$1'' \{ .nr #SH_NUM 0 1 \} +. el \{\ +. nr #SH_NUM \\$1-1 1 +. nr #PH_NUM 0 1 +. \} +.END +\# +\# +\# NUMBER PARAHEADS +\# ---------------- +\# *Arguments: +\# <none> | <anything> +\# *Function: +\# Toggles register #NUMBER_PH; sets incrementing register #PH_NUM. +\# *Notes: +\# Default is OFF. +\# +.MAC NUMBER_PARAHEADS END +. ie '\\$1'' \{\ +. nr #NUMBER_PH 1 +. if !\\n[#PH_NUM] \{ .nr #PH_NUM 0 1 \} +. \} +. el \{ .rr #NUMBER_PH \} +.END +\# +\# +\# RESET PARAHEAD NUMBER +\# --------------------- +\# *Arguments: +\# <none> | <desired parahead number> +\# *Function: +\# Resets incrementing register #PH_NUM to 1 or, if there's +\# an argument, to user supplied number. +\# *Notes: +\# Resetting the parahead number resets the parahead number +\# only. +\# +.MAC RESET_PARAHEAD_NUMBER END +. ie '\\$1'' \{ .nr #PH_NUM 0 1 \} +. el \{ nr #SH_NUM \\$1-1 1 \} +.END +\# +\# +\# ---Main heads--- +\# +\# HEAD FAMILY +\# ----------- +\# *Argument: +\# <family to use for section titles (main heads)> +\# *Function: +\# Creates or modifies string $HEAD_FAM. +\# *Notes: +\# Default is same as running text. +\# +.MAC HEAD_FAMILY END +. ds $HEAD_FAM \\$1 +.END +\# +\# +\# HEAD FONT +\# --------- +\# *Argument: +\# <font to use for section titles (main heads)> +\# *Function: +\# Creates or modifies string $HEAD_FT. +\# *Notes: +\# Default is bold. +\# +.MAC HEAD_FONT END +. ds $HEAD_FT \\$1 +.END +\# +\# +\# HEAD SIZE +\# --------- +\# *Argument: +\# <+|- number of points by which to in/decrease point size of +\# section titles (relative to running text)> +\# *Function: +\# Creates or modifies string $HEAD_SIZE_CHANGE. +\# *Notes: +\# Must be preceded by a - or + sign with no space afterwards. +\# Fractional point sizes are allowed. +\# Default +1 for printstyle TYPESET; +0 for TYPEWRITE. +\# +.MAC HEAD_SIZE END +. ds $HEAD_SIZE_CHANGE \\$1 +.END +\# +\# +\# HEAD QUAD +\# --------- +\# *Arguments: +\# L | LEFT | R | RIGHT | C | CENTER | CENTRE +\# *Function: +\# Creates or modifies string $HEAD_QUAD. +\# *Notes: +\# Default is CENTER. +\# +.MAC HEAD_QUAD END +. ds $HEAD_QUAD \\$1 +.END +\# +\# +\# HEAD CAPS +\# --------- +\# *Arguments: +\# <none> | <anything> +\# *Function: +\# Creates or modifies register #HEAD_CAPS. +\# *Notes: +\# Default is on. +\# +.MAC HEAD_CAPS END +. ie '\\$1'' \{ .nr #HEAD_CAPS 1 \} +. el \{ .nr #HEAD_CAPS 0 \} +.END +\# +\# +\# HEAD SPACE +\# ---------- +\# *Arguments: +\# <none> | <anything> +\# *Function: +\# Creates register #HEAD_SPACE, which toggles whether the space +\# before heads is 1 extra line space ("off") or 2 ("on"). Used only +\# in PRINTSTYLE TYPESET. +\# *Notes: +\# Default is on. +\# +.MAC HEAD_SPACE END +. ie '\\$1'' \{ .nr #HEAD_SPACE 1 \} +. el \{ .nr #HEAD_SPACE 0 \} +.END +\# +\# +\# HEAD UNDERLINE +\# -------------- +\# *Arguments: +\# <none> | <anything> +\# *Function: +\# Creates or modifies register #HEAD_UNDERLINE. +\# *Notes: +\# Default is on. +\# +.MAC HEAD_UNDERLINE END +. ie '\\$1'' \{ .nr #HEAD_UNDERLINE 1 \} +. el \{ .nr #HEAD_UNDERLINE 0 \} +.END +\# +\# +\# MAIN HEAD +\# --------- +\# *Arguments: +\# "text of main head" ["text of main head"] ... +\# *Function: +\# In TYPEWRITE, prints main heads centered, all caps, underlined. +\# In TYPESET, prints bold main heads 1 point larger than running +\# text, all caps, underlined. +\# *Notes: +\# The HEAD macro requires that double-quotes (") surround +\# each line of text. +\# +.MAC HEAD END +. br +. nr #ARG_NUM 0 1 +. nr #HEAD 1 +. ev HEAD +. ll \\n[#L_LENGTH]u +. ta \\n(.lu +. if \\n[#COLUMNS] \{\ +. ll \\n[#COL_L_LENGTH]u +. ta \\n(.lu +. \} +. CHECK_INDENT +. QUAD \\*[$HEAD_QUAD] +. if \\n[#PRINT_STYLE]=1 \{\ +. fam C +. ft R +. ps 12 +. vs \\n[#DOC_LEAD]u +. UNDERLINE OFF +. \} +. if \\n[#PRINT_STYLE]=2 \{\ +. FAMILY \\*[$HEAD_FAM] +. FT \\*[$HEAD_FT] +. PS \\n[#DOC_PT_SIZE]u\\*[$HEAD_SIZE_CHANGE] +. LS \\n[#DOC_LEAD]u +. \} +. if r#QUOTE \{ .rr #QUOTE \} +. if r#EPIGRAPH \{ .rr #EPIGRAPH \} +. if \\n[#PRINT_STYLE]=1 \{ .ne 3 \} +. if \\n[#PRINT_STYLE]=2 \{\ +. ie \\n[#HEAD_SPACE] \{ .ne 5 \} +. el \{ .ne 3 \} +. \} +. ie \\n[#START] \{\ +. if \\n[#DOC_HEADER]=0 \{ . \} +. \} +. el \{\ +. if \\n[#PRINT_STYLE]=1 \{\ +. if !\\n[#LINEBREAK] \{\ +. ALD \\n[#DOC_LEAD]u +. if \\n[#SINGLE_SPACE] \{ .ALD \\n[#DOC_LEAD]u \} +. \} +. \} +. if \\n[#PRINT_STYLE]=2 \{\ +. ie \\n[#PP_SPACE] \{\ +. ie \\n[#END_QUOTE] \{ . \} +. el \{\ +. if !\\n[#LINEBREAK] \{ +. if \\n[#HEAD_SPACE] \{ .ALD \\n[#DOC_LEAD]u \} +. \} +. \} +. \} +. el \{\ +. ie \\n[#HEAD_SPACE] \{ .ALD \\n[#DOC_LEAD]u*2u \} +. el \{ .ALD \\n[#DOC_LEAD]u \} +. \} +. if \\n[#END_QUOTE] \{\ +. if !\\n[#Q_FITS] \{\ +. RLD \\n[#DOC_LEAD]u +. if \\n[#PP_ACTIVE] \{ .ALD \\n[#DOC_LEAD]u \} +. \} +. if \\n[#Q_AT_TOP] \{\ +. RLD \\n[#DOC_LEAD]u +. if \\n[#Q_AT_TOP] \{ .ALD \\n[#DOC_LEAD]u \} +. \} +. \} +. if \\n[#LINEBREAK] \{\ +. if \\n[#HEAD_SPACE] \{ .RLD \\n[#DOC_LEAD]u \} +. \} +. \} +. \} +. if \\n[#HEAD_CAPS] \{ .CAPS \} +. while \\n[#ARG_NUM]<\\n[#NUM_ARGS] \{\ +. ie \\n[#NUMBER_HEAD] \{\ +. ie \\n[#ARG_NUM]=0 \{\ +. br +. ie \\n[#HEAD_UNDERLINE]=0 \{ .PRINT "\\n+[#HEAD_NUM].\0\\$[\\n+[#ARG_NUM]]\} +. el \{ .UNDERSCORE "\\n+[#HEAD_NUM].\0\\$[\\n+[#ARG_NUM]]\} +. br +. \} +. el \{\ +. br +. ie \\n[#HEAD_UNDERLINE]=0 \{ .PRINT "\\$[\\n+[#ARG_NUM]]\} +. el \{ .UNDERSCORE "\\$[\\n+[#ARG_NUM]]\} +. br +. \} +. \} +. el \{\ +. br +. ie \\n[#HEAD_UNDERLINE]=0 \{ .PRINT "\\$[\\n+[#ARG_NUM]]\} +. el \{ .UNDERSCORE "\\$[\\n+[#ARG_NUM]]\} +. br +. \} +. \} +. REMOVE_INDENT +. CAPS OFF +. ev +. ALD \\n[#DOC_LEAD]u +. RESET_SUBHEAD_NUMBER +. RESET_PARAHEAD_NUMBER +. if r#START \{ .rr #START \} +. if r#EPIGRAPH \{ .rr #EPIGRAPH \} +. if r#QUOTE \{ .rr #QUOTE \} +. if r#Q_FITS \{ .rr #Q_FITS \} +. if r#END_QUOTE \{ .rr #END_QUOTE \} +. if r#LINEBREAK \{ .rr #LINEBREAK \} +. if r#Q_AT_TOP \{ .rr #Q_AT_TOP \} +. if r#PP_ACTIVE \{ .rr #PP_ACTIVE \} +. rr #ARG_NUM +. nr #PP 0 +.END +\# +\# +\# ---Subheads--- +\# +\# SUBHEAD FAMILY +\# -------------- +\# *Argument: +\# <family to use in subheads> +\# *Function: +\# Creates or modifies string $SH_FAM. +\# *Notes: +\# Default is same as running text. +\# +.MAC SUBHEAD_FAMILY END +. ds $SH_FAM \\$1 +.END +\# +\# +\# SUBHEAD FONT +\# -------------- +\# *Argument: +\# <font to use in subheads> +\# *Function: +\# Creates or modifies string $SH_FT. +\# *Notes: +\# Default is bold. +\# +.MAC SUBHEAD_FONT END +. ds $SH_FT \\$1 +.END +\# +\# +\# SUBHEAD SIZE +\# ------------ +\# *Argument: +\# <+|- number of points by which to in/decrease point size of subheads +\# (relative to running text)> +\# *Function: +\# Creates or modifies string $SH_SIZE_CHANGE. +\# *Notes: +\# Must be preceded by a +|- sign. No space afterwards. +\# Fractional point sizes are allowed. +\# Default is +.5 for printstyle TYPESET; +0 for TYPEWRITE. +\# +.MAC SUBHEAD_SIZE END +. ds $SH_SIZE_CHANGE \\$1 +.END +\# +\# +\# SUBHEAD QUAD +\# ------------ +\# *Argument: +\# L | LEFT | R | RIGHT | C | CENTER | CENTRE +\# *Function: +\# Creates or modifies string $SH_QUAD. +\# *Notes: +\# Default is LEFT for both TYPESET and TYPEWRITE. +\# +.MAC SUBHEAD_QUAD END +. ds $SH_QUAD \\$1 +.END +\# +\# +\# SUBHEAD +\# ------- +\# *Arguments: +\# "text of subhead" ["text of subhead"] ... +\# *Function: +\# In TYPEWRITE, prints subheads underlined. +\# In TYPESET, prints subheads bold, .5 points larger than running +\# text. +\# In both styles, a line space precedes the subhead, and a small +\# amount of lead comes after. +\# *Notes: +\# As with the HEAD macro, double-quotes (") must surround +\# each line of text. +\# +.MAC SUBHEAD END +. br +. nr #ARG_NUM 0 1 +. if r#QUOTE \{ .rr #QUOTE \} +. if r#Q_AT_TOP \{ .rr #Q_AT_TOP \} +. ev SUBHEAD +. ll \\n[#L_LENGTH]u +. ta \\n(.lu +. if \\n[#COLUMNS] \{\ +. ll \\n[#COL_L_LENGTH]u +. ta \\n(.lu +. \} +. CHECK_INDENT +. if \\n[#PRINT_STYLE]=1 \{\ +. fam C +. ft R +. ps 12 +. vs \\n[#DOC_LEAD]u +. QUAD \\*[$SH_QUAD] +. UNDERLINE OFF +. \} +. if \\n[#PRINT_STYLE]=2 \{\ +. FAMILY \\*[$SH_FAM] +. FT \\*[$SH_FT] +. PS \\n[#DOC_PT_SIZE]u\\*[$SH_SIZE_CHANGE] +. LS \\n[#DOC_LEAD]u +. QUAD \\*[$SH_QUAD] +. \} +. if \\n[#PRINT_STYLE]=1 \{ .nr #SH_LEAD_ADJUST \\n[#LEAD]/5 \} +. if \\n[#PRINT_STYLE]=2 \{ .nr #SH_LEAD_ADJUST \\n[#LEAD]/8 \} +. ie \\n[#START] \{ . \} +. el \{\ +. ie ( \\n[#TRAP_DISTANCE] < (\\n[#DOC_LEAD]u*2u) ) \{\ +. ie \\n[#COLUMNS] \{ .COL_NEXT \} +. el \{ .bp \} +. \} +. el \{\ +. ie \\n[#HEAD]=1 \{ . \} +. el \{\ +. if \\n[#PRINT_STYLE]=1 \{\ +. if !\\n[#LINEBREAK] \{ .ALD \\n[#DOC_LEAD]u \} +. \} +. if \\n[#PRINT_STYLE]=2 \{\ +. ie \\n[#PP_SPACE]=1 \{\ +. ie !\\n[#LINEBREAK] \{ .ALD \\n[#DOC_LEAD]u \} +. el \{ .RLD \\n[#DOC_LEAD]u \} +. \} +. el \{\ +. if !\\n[#LINEBREAK] \{ .ALD \\n[#DOC_LEAD]u \} +. \} +. \} +. \} +. \} +. \} +. if \\n[#PRINT_STYLE]=1 \{\ +. while \\n[#ARG_NUM]<\\n[#NUM_ARGS] \{\ +. ie \\n[#NUMBER_SH] \{\ +. ie \\n[#ARG_NUM]=0 \{\ +. ie \\n[#NUMBER_HEAD] \{\ +. br +. UNDERSCORE "\v'-\\n[#SH_LEAD_ADJUST]u'\\n[#HEAD_NUM].\\n+[#SH_NUM]\0\\$[\\n+[#ARG_NUM]] +. br +. \} +. el \{\ +. br +. UNDERSCORE "\v'-\\n[#SH_LEAD_ADJUST]u'\\n+[#SH_NUM].\0\\$[\\n+[#ARG_NUM]] +. br +. \} +. \} +. el \{\ +. br +. ie \\n[#HEAD_UNDERLINE]=0 \{ .PRINT "\v'-\\n[#SH_LEAD_ADJUST]u'\\$[\\n+[#ARG_NUM]]\} +. el \{ .UNDERSCORE "\v'-\\n[#SH_LEAD_ADJUST]u'\\$[\\n+[#ARG_NUM]]\} +. br +. \} +. \} +. el \{\ +. br +. UNDERSCORE "\v'-\\n[#SH_LEAD_ADJUST]u'\\$[\\n+[#ARG_NUM]] +. br +. \} +. \} +. \} +. if \\n[#PRINT_STYLE]=1 \{\ +. if \\n[#SINGLE_SPACE] \{ .ALD \\n[#DOC_LEAD]u \} +. \} +. if \\n[#PRINT_STYLE]=2 \{\ +. ie \\n[#PP_SPACE]=0 \{\ +. while \\n[#ARG_NUM]<\\n[#NUM_ARGS] \{\ +. ie \\n[#NUMBER_SH] \{\ +. ie \\n[#ARG_NUM]=0 \{\ +. ie \\n[#NUMBER_HEAD] \{\ +. br +. PRINT "\v'-\\n[#SH_LEAD_ADJUST]u'\\n[#HEAD_NUM].\\n+[#SH_NUM]\0\\$[\\n+[#ARG_NUM]] +. br +. \} +. el \{\ +. br +. PRINT "\v'-\\n[#SH_LEAD_ADJUST]u'\\n+[#SH_NUM].\0\\$[\\n+[#ARG_NUM]] +. br +. \} +. \} +. el \{\ +. br +. PRINT "\\v'-\\n[#SH_LEAD_ADJUST]u'\\$[\\n+[#ARG_NUM]] +. br +. \} +. \} +. el \{\ +. br +. PRINT "\\v'-\\n[#SH_LEAD_ADJUST]u'\\$[\\n+[#ARG_NUM]] +. br +. \} +. \} +. \} +. el \{\ +. ALD \\n[#DOC_LEAD]u +. if \\n[#HEAD]=1 \{ .RLD \\n[#DOC_LEAD]u \} +. if \\n[#END_QUOTE] \{ .RLD \\n[#DOC_LEAD]u \} +. if \\n[#EPIGRAPH] \{ .RLD \\n[#DOC_LEAD]u \} +. while \\n[#ARG_NUM]<\\n[#NUM_ARGS] \{\ +. PRINT "\\$[\\n+[#ARG_NUM]] +. \} +. ALD \\n[#DOC_LEAD]u +. \} +. \} +. REMOVE_INDENT +. ev +. RESET_PARAHEAD_NUMBER +. if r#START \{ .rr #START \} +. if r#EPIGRAPH \{ .rr #EPIGRAPH \} +. if r#Q_FITS \{ .rr #Q_FITS \} +. if r#END_QUOTE \{ .rr #END_QUOTE \} +. if r#LINEBREAK \{ .rr #LINEBREAK \} +. nr #PP 0 +. nr #HEAD 2 +.END +\# +\# ---Paragraph heads--- +\# +\# PARAHEAD FAMILY +\# --------------- +\# *Argument: +\# <family to use in paraheads> +\# *Function: +\# Creates or modifies string $PH_FAM. +\# *Notes: +\# Default is same as running text. +\# +.MAC PARAHEAD_FAMILY END +. ds $PH_FAM \\$1 +.END +\# +\# +\# PARAHEAD FONT +\# ------------- +\# *Argument: +\# <font to use in paraheads> +\# *Function: +\# Creates or modifies string $PH_FT. +\# *Notes: +\# Default is bold italic for TYPESET; underlined for TYPEWRITE. +\# +.MAC PARAHEAD_FONT END +. ds $PH_FT \\$1 +.END +\# +\# +\# PARAHEAD SIZE +\# ------------- +\# *Argument: +\# <+|- number of points by which to in/decrease point size of subheads +\# (relative to running text)> +\# *Function: +\# Creates or modifies string $PH_SIZE_CHANGE. +\# *Notes: +\# Must be preceded by a +|- sign. No space afterwards. +\# Fractional point sizes are allowed. No unit of measure, please. +\# Default is +.5 for printstyle TYPESET; +0 for TYPEWRITE. +\# +.MAC PARAHEAD_SIZE END +. ds $PH_SIZE_CHANGE \\$1 +.END +\# +\# +\# PARAHEAD INDENT +\# --------------- +\# *Argument: +\# <size of indent> +\# *Function: +\# Creates or modifies register #PH_INDENT. +\# *Notes: +\# Default is 1/2 #PP_INDENT for TYPESET and TYPEWRITE. +\# +.MAC PARAHEAD_INDENT END +. nr #PH_INDENT (\\$1) +.END +\# +\# +\# PARAHEAD +\# -------- +\# *Arguments: +\# "<para head>" +\# *Function: +\# Deposits a paragraph head at the start and into the body of a +\# paragraph. +\# *Notes: +\# PARAHEAD *must* come after PP. +\# +.MAC PARAHEAD END +. if \\n[#SLANT_ON] \{\ +. nr #SLANT_WAS_ON 1 +. \\*[SLANTX]\c +. \} +. ie \\n[#PP]=1 \{\ +. if \\n[#INDENT_FIRST_PARAS] \{\ +. ti \\n[#PH_INDENT]u +. \} +. \} +. el \{ .ti \\n[#PH_INDENT]u \} +. if \\n[#PRINT_STYLE]=1 \{\ +. fam C +. ft R +. ps 12 +. UNDERLINE OFF +. ie \\n[#NUMBER_PH] \{\ +. if \\n[#NUMBER_HEAD] \{\ +. ie \\n[#NUMBER_SH] \{\ +. UNDERSCORE "\R'#NUMBERED 1'\\n[#HEAD_NUM].\\n[#SH_NUM].\\n+[#PH_NUM].\\ \\$1" +\0 +. \} +. el \{\ +. UNDERSCORE "\R'#NUMBERED 1'\\n[#HEAD_NUM].\\n+[#PH_NUM].\\ \\$1 +\0 +. \} +. \} +. ie \\n[#NUMBER_SH] \{\ +. if !\\n[#NUMBERED] \{\ +. UNDERSCORE "\\n[#SH_NUM].\\n+[#PH_NUM].\\ \\$1 +\0 +. \} +. \} +. el \{\ +. if !\\n[#NUMBERED] \{\ +. UNDERSCORE "\\n+[#PH_NUM].\\ \\$1 +\0 +. \} +. \} +. \} +. el \{\ +. UNDERSCORE "\\$1 +\0 +. \} +. if \\n[#SLANT_WAS_ON] \{\ +. if \\n[#UNDERLINE_SLANT] \{ .UNDERLINE \} +. if \\n[#SLANT_MEANS_SLANT] \{\ +. \\*[SLANT]\c +. \} +. rr #SLANT_WAS_ON +. \} +. \} +. if \\n[#PRINT_STYLE]=2 \{\ +. FAM \\*[$PH_FAM] +. FT \\*[$PH_FT] +. PS \\*[$PH_SIZE_CHANGE] +. ie \\n[#NUMBER_PH] \{\ +. if \\n[#NUMBER_HEAD] \{\ +. ie \\n[#NUMBER_SH] \{\ +. PRINT "\R'#NUMBERED 1'\\n[#HEAD_NUM].\\n[#SH_NUM].\\n+[#PH_NUM].\0\\$1\h'.6m'\c" +. \} +. el \{\ +. PRINT "\R'#NUMBERED 1'\\n[#HEAD_NUM].\\n+[#PH_NUM].\0\\$1\h'.6m'\c" +. \} +. \} +. ie \\n[#NUMBER_SH] \{\ +. if !\\n[#NUMBERED] \{\ +. PRINT "\\n[#SH_NUM].\\n+[#PH_NUM].\0\\$1\h'.6m'\c" +. \} +. \} +. el \{\ +. if !\\n[#NUMBERED] \{\ +. PRINT "\\n+[#PH_NUM].\0\\$1\h'.6m'\c" +. \} +. \} +. \} +. el \{\ +. PRINT "\\$1\h'.6m'\c" +. \} +. FAMILY \\*[$DOC_FAM] +. FT \\*[$PP_FT] +. PS \\n[#DOC_PT_SIZE]u +. if \\n[#SLANT_WAS_ON] \{\ +. rr #SLANT_WAS_ON 1 +. \\*[SLANT]\c +. \} +. \} +. rr #NUMBERED +.END +\# +\# +\# ==================================================================== +\# +\# +++LINE BREAKS+++ +\# +\# LINEBREAK CHARACTER +\# ------------------- +\# *Arguments: +\# [character] [iterations] [vertical adjustment] +\# *Function: +\# Allows user to specify a line break character and the number +\# of times to repeat it horiontally. +\# *Notes: +\# Without an argument, LINEBREAK_CHAR will deposit a blank line. +\# +\# Vertical adjustment requires a unit of measure (most likely +\# "p"), and has to be preceded by +|- +\# +.MAC LINEBREAK_CHAR END +. nr #REPEAT 1 +. ds $LINEBREAK_CHAR \\$1 +. ds $LINEBREAK_CHAR_V_ADJ \\$3 +. if '\\*[$LINEBREAK_CHAR_V_ADJ]'' \{\ +. ds $LINEBREAK_CHAR_V_ADJ +0 +. \} +. while \\$2>\\n[#REPEAT] \{\ +. as $LINEBREAK_CHAR "\\ \\$1 +. nr #REPEAT \\n[#REPEAT]+1 +. \} +. rr #REPEAT +.END +\# +\# +\# LINE BREAK +\# ---------- +\# *Arguments: +\# <none> +\# *Function: +\# Deposits line break character. +\# *Notes: +\# If $LINEBREAK_CHAR is blank, simply advances 2 line spaces. +\# +.MAC LINEBREAK END +. if r#Q_AT_TOP \{ .rr #Q_AT_TOP \} +. po \\n[#DOC_L_MARGIN]u +. ie '\\*[$LINEBREAK_CHAR]'' \{ .ALD \\n[#DOC_LEAD]u*2 \} +. el \{\ +. if \\n[#PRINT_STYLE]=1 \{\ +. ie \\n[#END_QUOTE] \{ . \} +. el \{ .ALD \\n[#DOC_LEAD]u \} +. \} +. if \\n[#PRINT_STYLE]=2 \{\ +. ie \\n[#END_QUOTE] \{ . \} +. el \{ .ALD \\n[#DOC_LEAD]u \} +. \} +. CENTER +. PRINT \\v'\\*[$LINEBREAK_CHAR_V_ADJ]'\\*[$LINEBREAK_CHAR]\\v'\\*[$LINEBREAK_CHAR_V_ADJ]' +. if \\n[#PRINT_STYLE]=1 \{ .ALD \\n[#DOC_LEAD]u \} +. if \\n[#PRINT_STYLE]=2 \{ .ALD \\n[#DOC_LEAD]u \} +. QUAD \\*[$DOC_QUAD] +. \} +. nr #LINEBREAK 1 +. if r#QUOTE \{ .rr #QUOTE \} +. if r#END_QUOTE \{ .rr #END_QUOTE \} +. nr #PP 0 +.END +\# +\# ==================================================================== +\# +\# +++PARAGRAPHS+++ +\# +\# PARAGRAPH FONT +\# -------------- +\# *Argument: +\# <font of running text> +\# *Function: +\# Creates or modifies string $PP_FT. +\# *Notes: +\# Affects all paragraphs. +\# +.MAC PP_FONT END +. if \\n[#IGNORE] \{ .return \} +. br +. ds $PP_FT \\$1 +. FT \\*[$PP_FT] +.END +\# +\# +\# PARAGRAPH INDENT +\# ---------------- +\# *Argument: +\# <amount to indent paragraphs in running text (ipPcm)> +\# *Function: +\# Allows user to change the default para indent. The change will +\# affect the indent of QUOTEs and BLOCKQUOTEs as well. +\# *Notes: +\# Default for printstyle TYPEWRITE is 1/2-inch. Default for +\# printstyle TYPESET is 2 ems. The defaults are set in +\# ydocs_printstyle, not in ydocs_defaults. +\# +.MAC PARA_INDENT END +. nr #PP_INDENT (\\$1) +.END +\# +\# +\# INDENT FIRST PARAGRAPHS +\# ----------------------- +\# *Arguments: +\# <none> | <anything> +\# *Function: +\# By default, the first para of a document, as well as the first +\# paras of blockquotes and block-style epigraphs are not indented. +\# When invoked, this macro will indent all paras. +\# *Notes: +\# Default is OFF. +\# +.MAC INDENT_FIRST_PARAS END +. ie '\\$1'' \{ .nr #INDENT_FIRST_PARAS 1 \} +. el \{ .rr #INDENT_FIRST_PARAS \} +.END +\# +\# +\# INTER-PARAGRAPH SPACING +\# ----------------------- +\# *Arguments: +\# <none> | <anything> +\# *Function: +\# Adds a line space between paragraphs in body text. Block quotes +\# are unaffected. +\# *Notes: +\# Default is OFF. PARA_SPACE ON is not recommended for use +\# with PRINTSTYLE TYPEWRITE. +\# +.MAC PARA_SPACE END +. ie '\\$1'' \{ .nr #PP_SPACE 1 \} +. el \{ .rr #PP_SPACE \} +.END +\# +\# +\# PARAGRAPH +\# --------- +\# *Arguments: +\# <none> +\# *Function: +\# Figures out what to do with paragraphs under differing conditions. +\# *Notes: +\# For the time being, there's no automatic widow/orphan control. +\# Controlling them isn't just a matter of establishing an arbitrary +\# number of lines needed for a para, since groff doesn't then +\# handle single line paragraphs gracefully. Usually, the whole +\# page needs to be tweaked. +\# +\# Note the use of transparent line break (\!.br) to get +\# PP to work within blockquotes and epigraphs. +\# +\# PP_STYLE 1 = regular paras; 2 = blockquotes, epigraphs +\# +.MAC PP END +. br +. if \\n[#DOC_TYPE]=4 \{\ +. if !'\\n(.z'' \{ .di \} +. if \\n[#DATE] \{\ +. nf +. DATE +. QUAD \\*[$DOC_QUAD] +. ALD \\n[#DOC_LEAD]u*2u +. rr #DATE +. \} +. if \\n[#TO] \{\ +. nf +. TO_ADDRESS +. ALD \\n[#DOC_LEAD]u +. rr #TO +. \} +. if \\n[#FROM] \{\ +. nf +. FROM_ADDRESS +. ALD \\n[#DOC_LEAD]u +. rr #FROM +. \} +. if \\n[#GREETING] \{\ +. nf +. GREETING +. ALD \\n[#DOC_LEAD]u +. rr #GREETING +. \} +. \} +. rr #PP_ACTIVE +. if r#Q_AT_TOP \{ .rr #Q_AT_TOP \} +. if \\n[#PP_STYLE]=1 \{\ +. br +. po \\n[#L_MARGIN]u +. if \\n[#COLUMNS] \{\ +. po \\n[#COL_\\n[#COL_NUM]_L_MARGIN]u +. \} +. if \\n[#TAB_ACTIVE] \{ .TAB \\n[#CURRENT_TAB] \} +. ie \\n[#PRINT_STYLE]=1 \{\ +. fam C +. ft R +. ps 12 +. vs \\n[#DOC_LEAD]u +. QUAD \\*[$DOC_QUAD] +. UNDERLINE OFF +. if \\n[#SLANT_ON] \{\ +. if \\n[#UNDERLINE_SLANT] \{ .UNDERLINE \} +. \} +. \} +. el \{\ +. FAMILY \\*[$DOC_FAM] +. FT \\*[$PP_FT] +. PS \\n[#DOC_PT_SIZE]u +. LS \\n[#DOC_LEAD]u +. QUAD \\*[$DOC_QUAD] +. \} +. ie \\n[#PP]=0 \{\ +. if \\n[#INDENT_FIRST_PARAS] \{\ +. ie \\n[#INDENT_ACTIVE] \{ .ti \\n[#INDENT]u+\\n[#PP_INDENT]u \} +. el \{ .ti \\n[#PP_INDENT]u \} +. \} +. if r#END_QUOTE \{\ +. if \\n[#END_QUOTE] \{\ +. if !\\n[#LINEBREAK] \{\ +. ie \\n[#INDENT_ACTIVE] \{ .ti \\n[#INDENT]u+\\n[#PP_INDENT]u \} +. el \{ .ti \\n[#PP_INDENT]u \} +. \} +. \} +. \} +. \} +. el \{\ +. br +. if \\n[#PP_SPACE] \{\ +. if \\n[#PRINT_STYLE]=2 \{\ +. ie \\n[#END_QUOTE] \{\ +. rr #END_QUOTE +. \} +. el \{ .ALD \\n[#DOC_LEAD]u \} +. \} +. \} +. ie \\n[#INDENT_ACTIVE] \{ .ti \\n[#INDENT]u+\\n[#PP_INDENT]u \} +. el \{ .ti \\n[#PP_INDENT]u \} +. \} +. if r#START \{ .rr #START \} +. if r#QUOTE \{ .rr #QUOTE \} +. if r#END_QUOTE \{ .rr #END_QUOTE \} +. if r#HEAD \{ .rr #HEAD \} +. if r#EPIGRAPH \{ .rr #EPIGRAPH \} +. if r#Q_FITS \{ .rr #Q_FITS \} +. if r#LINEBREAK \{ .rr #LINEBREAK \} +. if \\n[#CONDENSE] \{\ +\E*[COND]\c +. \} +. if \\n[#EXTEND]=1 \{\ +\E*[EXT]\c +. \} +. nr #PP +1 +. \} +. if \\n[#PP_STYLE]=2 \{\ +\!. br +. if \\n[#BROKEN_QUOTE] \{\ +. ie \\n(nl=\\n[#PAGE_TOP] \{ .nr #Q_PP 1\} +. el \{ .nr #Q_PP 0 \} +. rr #BROKEN_QUOTE +. \} +. ie \\n[#Q_PP]=0 \{\ +. if \\n[#INDENT_FIRST_PARAS] \{\ +. ti \\n[#PP_INDENT]u/2u +. \} +. \} +. el \{\ +. ti \\n[#PP_INDENT]u/2u +. \} +. if \\n[#CONDENSE] \{\ +\E*[COND]\c +. \} +. if \\n[#EXTEND]=1 \{\ +\E*[EXT]\c +. \} +. nr #Q_PP +1 +. \} +. nr #PP_ACTIVE 1 +.END +\# +\# ==================================================================== +\# +\# +++QUOTES+++ +\# +\# ---Line for line (poetic) quotes--- +\# +\# QUOTE FAMILY +\# ------------ +\# *Argument: +\# <family to use in line for line quotes> +\# *Function: +\# Creates or modifies string $QUOTE_FAM. +\# *Notes: +\# Default is same as running text. +\# +.MAC QUOTE_FAMILY END +. ds $QUOTE_FAM \\$1 +.END +\# +\# +\# QUOTE FONT +\# ---------- +\# *Argument: +\# <font to use in line for line quotes> +\# *Function: +\# Creates or modifies string $QUOTE_FT. +\# *Notes: +\# Default is italic for TYPESET. +\# +.MAC QUOTE_FONT END +. ds $QUOTE_FT \\$1 +.END +\# +\# +\# QUOTE SIZE +\# ---------- +\# *Argument: +\# <-|+ number of points by which to de/increase point size of +\# line for line quotes (relative to running text)> +\# *Function: +\# Creates or modifies string $QUOTE_SIZE_CHANGE. +\# *Notes: +\# Must be preceded by a - or + sign with no space afterwards. +\# Fractional point sizes are allowed. +\# Default is +0. +\# +.MAC QUOTE_SIZE END +. ds $QUOTE_SIZE_CHANGE \\$1 +.END +\# +\# +\# UNDERLINE QUOTES +\# ---------------- +\# *Arguments: +\# <none> | <anything> +\# *Function: +\# Creates or modifies register #UNDERLINE_QUOTES (toggle). +\# If on, line for line quotes are underlined when printstyle +\# is TYPEWRITE. +\# *Notes: +\# Default is ON for printstyle TYPEWRITE. +\# +.MAC UNDERLINE_QUOTES END +. ie '\\$1'' \{ .nr #UNDERLINE_QUOTES 1 \} +. el \{ .rr #UNDERLINE_QUOTES \} +.END +\# +\# +\# QUOTE INDENT +\# ------------ +\# *Argument: +\# <value by which to multiply PP_INDENT for indented quoted text> +\# *Function: +\# Creates or modifies register #Q_OFFSET_VALUE. +\# *Notes: +\# Default is 3 for typeset; 2 for typewrite +\# +.MAC QUOTE_INDENT END +. nr #Q_OFFSET_VALUE \\$1 +.END +\# +\# +\# ALWAYS FULLSPACE QUOTES +\# ----------------------- +\# *Arguments: +\# <none> | <anything> +\# *Function: +\# Toggles register #FULLSPACE_QUOTES. +\# *Notes: +\# If user doesn't like the default 1/2 line space above and below +\# quotes, s/he can turn it off here. Has no effect in TYPEWRITE. +\# +.MAC ALWAYS_FULLSPACE_QUOTES END +. if '\\$1'' \{ .nr #FULLSPACE_QUOTES 1 \} +. el \{ .rr #FULLSPACE_QUOTES \} +.END +\# +\# +\# QUOTE +\# ----- +\# *Arguments: +\# <none> | <anything> +\# *Function: +\# Indents quoted text on a line for line basis, or turns QUOTE off. +\# *Notes: +\# Owing to the need to bottom align TYPESET pages, quoted text gets +\# diverted so its depth can be measured (in DO_QUOTE) for determining +\# how much space to put before and after. +\# +.MAC QUOTE END +. br +\# **Uncomment the next line to prevent orphaned quote lines. +\#. ne 1 +. ie '\\$1'' \{\ +. ev QUOTE +. nr #QUOTE 1 +. di P_QUOTE +. ll \\n[#L_LENGTH]u-(\\n[#PP_INDENT]u*\\n[#Q_OFFSET_VALUE]u) +. ta \\n(.lu +. if \\n[#COLUMNS] \{\ +. ll \\n[#COL_L_LENGTH]u-(\\n[#PP_INDENT]u*\\n[#Q_OFFSET_VALUE]u) +. ta \\n(.lu +. \} +. if \\n[#PRINT_STYLE]=1 \{\ +. fam C +. ft R +. ps 12 +. vs \\n[#DOC_LEAD]u +. LEFT +. \} +. if \\n[#PRINT_STYLE]=2 \{\ +. FAMILY \\*[$QUOTE_FAM] +. FT \\*[$QUOTE_FT] +. PS \\n[#DOC_PT_SIZE]u\\*[$QUOTE_SIZE_CHANGE] +. LS \\n[#DOC_LEAD]u +. LEFT +. \} +. nr #Q_TOP \\n(nl +. if \\n[#PRINT_STYLE]=1 \{\ +. if \\n[#UNDERLINE_QUOTES] \{\ +\#. UNDERLINE +. FT I +. \} +. \} +. \} +. el \{ .DO_QUOTE \} +.END +\# +\# +\# ---Blockquotes--- +\# +\# BLOCKQUOTE FAMILY +\# ----------------- +\# *Argument: +\# <family to use in blockquotes> +\# *Function: +\# Creates or modifies string $BQUOTE_FAM. +\# *Notes: +\# Default is same as running text. +\# +.MAC BLOCKQUOTE_FAMILY END +. ds $BQUOTE_FAM \\$1 +.END +\# +\# +\# BLOCKQUOTE FONT +\# --------------- +\# *Argument: +\# <font to use in blockquotes> +\# *Function: +\# Creates or modifies string $BQUOTE_FT. +\# *Notes: +\# Default is same as running text. +\# +.MAC BLOCKQUOTE_FONT END +. ds $BQUOTE_FT \\$1 +.END +\# +\# +\# BLOCKQUOTE SIZE +\# --------------- +\# *Argument: +\# <-|+ number of points by which to de/increase point size of blockquotes +\# (relative to running text)> +\# *Function: +\# Creates or modifies string $BQUOTE_SIZE_CHANGE. +\# *Notes: +\# Must be preceded by a - or + sign with no space afterwards. +\# Fractional point sizes are allowed. +\# Default is -1 for printstyle TYPESET; +0 for TYPEWRITE. +\# +.MAC BLOCKQUOTE_SIZE END +. ds $BQUOTE_SIZE_CHANGE \\$1 +.END +\# +\# +\# BLOCKQUOTE QUAD +\# --------------- +\# *Arguments: +\# <quad to use in blockquotes> +\# *Function: +\# Creates or modifies string $BQUOTE_QUAD. +\# *Notes: +\# Default is LEFT. +\# +.MAC BLOCKQUOTE_QUAD END +. ds $BQUOTE_QUAD \\$1 +.END +\# +\# +\# BLOCKQUOTE +\# ---------- +\# *Arguments: +\# <none> | <anything> +\# *Function: +\# Indents quoted text in fill mode and shortens line length +\# accordingly, or turns BLOCKQUOTE off. +\# *Notes: +\# Owing to the need to bottom align TYPESET pages, quoted text gets +\# diverted so its depth can be measured (in DO_QUOTE) for determining +\# how much space to put before and after. +\# +\# .PP after blockquote is optional if there's only one para, +\# but REQUIRED if there's more than one. +\# +.MAC BLOCKQUOTE END +. br +. ie '\\$1'' \{\ +. ev BLOCKQUOTE +. nr #QUOTE 2 +. nr #PP_STYLE 2 +. nr #Q_PP 0 +. di B_QUOTE +. ll \\n[#L_LENGTH]u-(\\n[#PP_INDENT]u*(\\n[#Q_OFFSET_VALUE]u*2u)) +. ta \\n(.lu +. CHECK_INDENT +. if \\n[#COLUMNS] \{\ +. ll \\n[#COL_L_LENGTH]u-(\\n[#PP_INDENT]u*(\\n[#Q_OFFSET_VALUE]u*2u)) +. ta \\n(.lu +. \} +. if \\n[#PRINT_STYLE]=1 \{\ +. fam C +. ft R +. ps 12 +. vs \\n[#DOC_LEAD]u +. QUAD LEFT +. HY OFF +. \} +. if \\n[#PRINT_STYLE]=2 \{\ +. FAMILY \\*[$BQUOTE_FAM] +. FT \\*[$BQUOTE_FT] +. PS \\n[#DOC_PT_SIZE]u\\*[$BQUOTE_SIZE_CHANGE] +. LS \\n[#DOC_LEAD]u +. QUAD \\*[$BQUOTE_QUAD] +. HY +. \} +. nr #Q_TOP \\n(nl +. if \\n[#INDENT_FIRST_PARAS] \{\ +. if \\n[#PRINT_STYLE]=1 \{ .ti \\n[#PP_INDENT]u/2u \} +. if \\n[#PRINT_STYLE]=2 \{ .ti \\n[#PP_INDENT]u/2u \} +. \} +. \} +. el \{ .DO_QUOTE \} +.END +\# +\# +\# DO QUOTE +\# -------- +\# *Arguments: +\# <none> +\# *Function: +\# Ends the diversion P_QUOTE or B_QUOTE. Spaces them according to +\# PRINT_STYLE, whether there's inter-paragraph spacing, and page +\# position. TYPEWRITE treats spacing the same way in all circumstance +\# (viz. an extra line space). TYPESET puts in only half +\# line spaces if the entire quote plus 1 line of body under the quote +\# fits on the the page; otherwise it puts in a full extra blank +\# line. (This is to ensure the page remains bottom aligned). +\# +.MAC DO_QUOTE END +. di +. REMOVE_INDENT +. ev +\# **Change *1 to *2 in next line to prevent orphans after quotes +. nr #Q_DEPTH \\n[#DIVER_DEPTH]+(\\n[#LEAD]*1) +. if \\n[#PRINT_STYLE]=1 \{\ +. if \\n[#START]=1 \{ . \} +. if \\n[#START]=0 \{\ +. if !\\n[#LINEBREAK] \{ .ALD \\n[#DOC_LEAD]u \} +. \} +. if \\n[#HEAD] \{\ +. if \\n[#HEAD]=1 \{ .RLD \\n[#DOC_LEAD]u \} +. \} +. \} +. if \\n[#PRINT_STYLE]=2 \{\ +. ie \\n[#PP_SPACE] \{\ +. ie \\n[#HEAD]=1 \{ . \} +. el \{\ +. if !\\n[#LINEBREAK] \{ .ALD \\n[#DOC_LEAD]u \} +. \} +. \} +. el \{\ +. ie \\n[#Q_DEPTH]<\\n[#TRAP_DISTANCE] \{\ +. nr #Q_FITS 1 +. ie \\n[#HEAD] \{\ +. if \\n[#HEAD]=1 \{ . \} +. \} +. el \{\ +. ie \\n[#START] \{ . \} +. el \{\ +. ie \\n[#HEAD] \{\ +. if \\n[#HEAD]=1 \{ . \} +. \} +. el \{\ +. ie \\n[#FULLSPACE_QUOTES] \{ .ALD \\n[#LEAD]u \} +. el \{ .ALD \\n[#LEAD]u/2u \} +. \} +. \} +. \} +. \} +. el \{\ +. rr #Q_FITS +. ie r#HEAD \{\ +. if \\n[#HEAD]=1 \{ . \} +. \} +. el \{ .ALD \\n[#DOC_LEAD]u \} +. \} +. \} +. \} +. nr #Q_OFFSET \\n[#L_MARGIN]+(\\n[#PP_INDENT]*\\n[#Q_OFFSET_VALUE]) +. if \\n[#COLUMNS] \{ .nr #Q_OFFSET \\n[#COL_\\n[#COL_NUM]_L_MARGIN]+(\\n[#PP_INDENT]*\\n[#Q_OFFSET_VALUE]) \} +. po \\n[#Q_OFFSET]u +. if \\n[#QUOTE]=1 \{\ +. nf +. P_QUOTE +. if !\\n[#START] \{ .rr #QUOTE \} +. \} +. if \\n[#QUOTE]=2 \{\ +. nf +. B_QUOTE +. \} +. if \\n[#PRINT_STYLE]=1 \{\ +. ALD \\n[#DOC_LEAD]u +. \} +. if \\n[#PRINT_STYLE]=2 \{\ +. ie \\n[#START] \{\ +. ie \\n[#PP_SPACE] \{ .ALD \\n[#DOC_LEAD]u \} +. el \{\ +. ie r#HEAD \{\ +. if \\n[#HEAD]=1 \{ .ALD \\n[#DOC_LEAD]u \} +. \} +. el \{ .ALD \\n[#DOC_LEAD]u \} +. \} +. \} +. el \{\ +. ie \\n[#PP_SPACE] \{ .ALD \\n[#DOC_LEAD]u \} +. el \{\ +. ie \\n[#HEAD]=1 \{ .ALD \\n[#DOC_LEAD]u \} +. el \{\ +. ie \\n[#Q_FITS] \{\ +. ie \\n[#Q_TOP]=\\n[#PAGE_TOP] \{\ +. nr #Q_AT_TOP 1 +. ALD \\n[#DOC_LEAD]u +. \} +. el \{\ +. ie \\n[#FULLSPACE_QUOTES] \{ .ALD \\n[#LEAD]u \} +. el \{ .ALD \\n[#LEAD]u/2u \} +. \} +. \} +. el \{ .ALD \\n[#DOC_LEAD]u \} +. \} +. \} +. \} +. \} +. if r#HEAD \{ .rr #HEAD \} +. if r#EPIGRAPH \{ .rr #EPIGRAPH \} +. rr #Q_PP +. rr #LINEBREAK +. nr #PP_STYLE 1 +. nr #END_QUOTE 1 +\#. if \\n[#PRINT_STYLE]=1 \{\ +\#. if \\n[#UNDERLINE_QUOTES] \{\ +\#. UNDERLINE OFF +\#. \} +\#. \} +. po \\n[#L_MARGIN]u +. if \\n[#COLUMNS] \{ .po \\n[#COL_\\n[#COL_NUM]_L_MARGIN]u \} +. nr #RESET_PP_INDENT \\n[#PP_INDENT] +. PARA_INDENT 0 +. PP +. PARA_INDENT \\n[#RESET_PP_INDENT] +. QUAD \\*[$DOC_QUAD] +.END +\# +\# ==================================================================== +\# +\# BREAK QUOTE +\# ----------- +\# *Arguments: +\# <none> +\# *Function: +\# Ends the diversion P_QUOTE or B_QUOTE, breaks to a new +\# page, and reinvokes BLOCKQUOTE. +\# *Notes: +\# Because quotes go into a diversion before they're output, +\# footnotes in quotes that cross pages behave erratically. The footnote +\# isn't processed until the diversion ends, hence the footnote +\# marker in the quote isn't always correct for the new page (it's +\# picked up from the old one). BREAK_QUOTE is a workaround for +\# this problem. +\# +.MAC BREAK_QUOTE END +. br +. di +. nr #BROKEN_QUOTE 1 +. REMOVE_INDENT +. ev +. nr #Q_DEPTH \\n[#DIVER_DEPTH]+(\\n[#LEAD]*1) +. if \\n[#PRINT_STYLE]=1 \{\ +. if !\\n[#LINEBREAK] \{ .ALD \\n[#DOC_LEAD]u \} +. if \\n[#HEAD] \{\ +. if \\n[#HEAD]=1 \{ .RLD \\n[#DOC_LEAD]u \} +. \} +. \} +. if \\n[#PRINT_STYLE]=2 \{\ +. ie \\n[#PP_SPACE] \{\ +. ie \\n[#HEAD]=1 \{ . \} +. el \{\ +. if !\\n[#LINEBREAK] \{ .ALD \\n[#DOC_LEAD]u \} +. \} +. \} +. el \{\ +. rr #Q_FITS +. ie r#HEAD \{\ +. if \\n[#HEAD]=1 \{ . \} +. \} +. el \{ .ALD \\n[#DOC_LEAD]u \} +. \} +. \} +. nr #Q_OFFSET \\n[#L_MARGIN]+(\\n[#PP_INDENT]*\\n[#Q_OFFSET_VALUE]) +. if \\n[#COLUMNS] \{ .nr #Q_OFFSET \\n[#COL_\\n[#COL_NUM]_L_MARGIN]+(\\n[#PP_INDENT]*\\n[#Q_OFFSET_VALUE]) \} +. po \\n[#Q_OFFSET]u +. if \\n[#QUOTE]=1 \{\ +. nf +. P_QUOTE +. if !\\n[#START] \{ .rr #QUOTE \} +. \} +. if \\n[#QUOTE]=2 \{\ +. nf +. B_QUOTE +. \} +. if r#HEAD \{ .rr #HEAD \} +. if r#EPIGRAPH \{ .rr #EPIGRAPH \} +. rr #Q_PP +. rr #LINEBREAK +. nr #PP_STYLE 1 +. nr #END_QUOTE 1 +. if \\n[#PRINT_STYLE]=1 \{\ +. if \\n[#UNDERLINE_QUOTES] \{\ +. UNDERLINE OFF +. \} +. \} +. po \\n[#L_MARGIN]u +. if \\n[#COLUMNS] \{ .po \\n[#COL_\\n[#COL_NUM]_L_MARGIN]u \} +. QUAD \\*[$DOC_QUAD] +. sp |\\n[#PAGE_LENGTH]u \" To trip footer/header +. BLOCKQUOTE +.END +\# +\# ==================================================================== +\# +\# +++PAGINATION+++ +\# +\# PAGINATE +\# -------- +\# *Arguments: +\# <none> | <anything> +\# *Function: +\# Turns page numbering off or on. +\# *Notes: +\# Page numbering is on by default with .PAPER. +\# Default is on. +\# +.MAC PAGINATE END +. ie '\\$1'' \{ .nr #PAGINATE 1 \} +. el \{ .nr #PAGINATE 0 \} +.END +\# +\# +\# PAGENUMBER FAMILY +\# ----------------- +\# *Argument: +\# <family to use for page numbers> +\# *Function: +\# Creates or modifies string $PAGE_NUM_FAM. +\# *Notes: +\# Default is same as running text. +\# +.MAC PAGENUM_FAMILY END +. ds $PAGE_NUM_FAM \\$1 +.END +\# +\# +\# PAGE NUMBER FONT +\# ---------------- +\# *Arguments: +\# <font to use for page numbers> +\# *Function: +\# Creates or modifies string $PAGE_NUM_FT. +\# *Notes: +\# Default is same as running text. +\# +.MAC PAGENUM_FONT END +. ds $PAGE_NUM_FT \\$1 +.END +\# +\# +\# PAGE NUMBER SIZE +\# ---------------- +\# *Argument: +\# <+|- number of points by which to in/decrease point size of +\# page numbers (relative to running text)> +\# *Function: +\# Creates or modifies string $PAGE_NUM_SIZE_CHANGE. +\# *Notes: +\# Must be preceded by a +|- sign with no space afterward. +\# Fractional point sizes are allowed. +\# Default is +0. +\# +.MAC PAGENUM_SIZE END +. ds $PAGE_NUM_SIZE_CHANGE \\$1 +.END +\# +\# +\# PAGE NUMBER FORMAT +\# ------------------ +\# *Arguments: +\# ARABIC | ROMAN | roman | ALPHA | alpha +\# *Function: +\# Assigns user entered format to #PAGENUMBER. +\# +.MAC PAGENUM_STYLE END +. if '\\$1'DIGIT' \{ .af #PAGENUMBER 1 \} +. if '\\$1'ROMAN' \{ .af #PAGENUMBER I \} +. if '\\$1'roman' \{ .af #PAGENUMBER i \} +. if '\\$1'ALPHA' \{ .af #PAGENUMBER A \} +. if '\\$1'alpha' \{ .af #PAGENUMBER a \} +.END +\# +\# +\# HYPHENS AROUND PAGE NUMBERS +\# --------------------------- +\# *Arguments: +\# <none> | <anything> +\# *Function: +\# Creates or modifies register #PAGE_NUM_HYPHENS. +\# Used to dis/enable hyphens on either side of page numbers. +\# *Notes: +\# Default is on. +\# +.MAC PAGENUM_HYPHENS END +. nr #PAGE_NUM_HYPHENS_SET 1 +. ie '\\$1'' \{ .nr #PAGE_NUM_HYPHENS 1 \} +. el \{ .rr #PAGE_NUM_HYPHENS \} +.END +\# +\# +\# PAGENUMBER POSITION +\# ------------------- +\# *Arguments: +\# TOP | BOTTOM LEFT | CENTER | RIGHT +\# *Function: +\# Creates or modifies various PAGE_NUM_H | V_POS registers. +\# Used to position page numbers. +\# *Notes: +\# Default is center/bottom. +\# +.MAC PAGENUM_POS END +. nr #PAGE_NUM_POS_SET 1 +. if '\\$1'TOP' \{ .nr #PAGE_NUM_V_POS 1 \} +. if '\\$1'BOTTOM' \{ .nr #PAGE_NUM_V_POS 2 \} +. if '\\$2'LEFT' \{ .nr #PAGE_NUM_H_POS 1 \} +. if '\\$2'CENTER' \{ .nr #PAGE_NUM_H_POS 2 \} +. if '\\$2'CENTRE' \{ .nr #PAGE_NUM_H_POS 2 \} +. if '\\$2'RIGHT' \{ .nr #PAGE_NUM_H_POS 3 \} +.END +\# +\# +\# PRINT PAGE NUMBER +\# ----------------- +\# *Arguments: +\# <none> +\# *Function: +\# Prints page number if PAGEINATE=1. +\# +.MAC PRINT_PAGE_NUMBER END +. ev PAGENUMBER +. po \\n[#DOC_L_MARGIN]u +. ll \\n[#DOC_L_LENGTH]u +. ta \\n(.lu +. FAMILY \\*[$PAGE_NUM_FAM] +. FT \\*[$PAGE_NUM_FT] +. PS \\n[#DOC_PT_SIZE]u\\*[$PAGE_NUM_SIZE_CHANGE] +. if \\n[#PRINT_STYLE]=1 \{\ +. fam C +. ft R +. ps 12 +. \} +. if \\n[#PAGE_NUM_V_POS]=1 \{ .vs 0 \} +. if o \{\ +. ie \\n[#PAGE_NUM_H_POS]=1 \{ .LEFT \} +. el \{ .RIGHT \} +. \} +. if e \{\ +. ie \\n[#PAGE_NUM_H_POS]=1 \{ .RIGHT \} +. el \{ .LEFT \} +. \} +. if \\n[#PAGE_NUM_H_POS]=2 \{.CENTER \} +. if \\n[#RECTO_VERSO]=0 \{\ +. if \\n[#PAGE_NUM_H_POS]=1 \{ .LEFT \} +. if \\n[#PAGE_NUM_H_POS]=2 \{ .CENTER \} +. if \\n[#PAGE_NUM_H_POS]=3 \{ .RIGHT \} +. \} +. nr #PAGENUMBER \\n%+\\n[#PAGE_NUM_ADJ] +. ie \\n[#PAGE_NUM_HYPHENS] \{ .PRINT "- \\n[#PAGENUMBER] -" \} +. el \{ .PRINT "\\n[#PAGENUMBER]" \} +. ev +.END +\# +\# ==================================================================== +\# +\# +++FOOTNOTES+++ +\# +\# FOOTNOTE FAMILY +\# -------------- +\# *Argument: +\# <family to use in footnotes> +\# *Function: +\# Creates or modifies string $FN_FAM. +\# *Notes: +\# Default is same as running text. +\# +.MAC FOOTNOTE_FAMILY END +. ds $FN_FAM \\$1 +.END +\# +\# +\# FOOTNOTE FONT +\# -------------- +\# *Argument: +\# <font to use in footnotes> +\# *Function: +\# Creates or modifies string $FN_FT. +\# *Notes: +\# Default is roman. +\# +.MAC FOOTNOTE_FONT END +. ds $FN_FT \\$1 +.END +\# +\# +\# FOOTNOTE SIZE +\# ------------ +\# *Argument: +\# <+|- number of points by which to in/decrease point size of footnotes +\# (relative to running text)> +\# *Function: +\# Creates or modifies string $FN_SIZE_CHANGE. +\# *Notes: +\# Must be preceded by a +|- sign. No space afterwards. +\# Fractional point sizes are allowed. +\# Default is -2 for printstyle TYPESET; +0 for TYPEWRITE. +\# +.MAC FOOTNOTE_SIZE END +. ds $FN_SIZE_CHANGE \\$1 +.END +\# +\# +\# FOOTNOTE AUTOLEAD +\# ----------------- +\# *Arguments: +\# <autolead value for footnotes> +\# *Function: +\# Creates or modifies register #FN_AUTOLEAD. +\# *Notes: +\# Default is #DOC_LEAD/2 for TYPEWRITE; 2 for TYPESET +\# +.MAC FOOTNOTE_AUTOLEAD END +. nr #FN_AUTOLEAD \\$1 +.END +\# +\# +\# FOOTNOTE QUAD +\# ------------- +\# *Arguments: +\# <quad to use in footnotes> +\# *Function: +\# Creates or modifies string $FN_QUAD. +\# *Notes: +\# Default is same as running text. +\# +.MAC FOOTNOTE_QUAD END +. ds $FN_QUAD \\$1 +.END +\# +\# +\# FOOTNOTE MARKERS +\# ---------------- +\# *Arguments: +\# <none> | <anything> +\# *Function: +\# Turns generation of footnote markers on or off. +\# *Notes: +\# Default is on. +\# +.MAC FOOTNOTE_MARKERS END +. ie '\\$1'' \{ .nr #FN_MARKERS 1 \} +. el \{ .nr #FN_MARKERS 0 \} +.END +\# +\# +\# FOOTNOTE MARKER STYLE +\# --------------------- +\# *Arguments: +\# STAR | NUMBER +\# *Function: +\# Sets register #FN_MARKER_STYLE, used in FOOTNOTE to determine +\# the style of footnote markers. +\# *Notes: +\# 1=STAR; 2=NUMBER. Default is STAR. +\# +.MAC FOOTNOTE_MARKER_STYLE END +. if '\\$1'STAR' \{\ +. nr #FN_MARKER_STYLE 1 +. \} +. if '\\$1'NUMBER' \{\ +. nr #FN_MARKER_STYLE 2 +. \} +.END +\# +\# +\# RESET FOOTNOTE NUMBER +\# --------------------- +\# *Arguments: +\# <none> | PAGE +\# *Function: +\# Resets register #FN_NUMBER to 1. If argument is PAGE, creates +\# toggle #RESET_FN_NUMBER which is checked in HEADER. If 1, +\# numbered footnotes on every page start at 1. +\# +.MAC RESET_FOOTNOTE_NUMBER END +. ie '\\$1'' \{ .nr #FN_NUMBER 0 1 \} +. el \{ .nr #RESET_FN_NUMBER 1 \} +.END +\# +\# +\# FOOTNOTE RULE LENGTH +\# -------------------- +\# *Arguments: +\# <length of rule used to separate footnotes from running text> +\# *Function: +\# Creates or modifies registers #FN_RULE_LENGTH. +\# *Notes: +\# Requires unit of measure (iPpcm). +\# Default is 4P for both PRINTSTYLEs. +\# +.MAC FOOTNOTE_RULE_LENGTH END +. nr #FN_RULE_LENGTH (\\$1) +.END +\# +\# +\# FOOTNOTE_RULE_ADJ +\# ----------------- +\# *Arguments: +\# <number of points to raise footnote rule from it's baseline position> +\# *Function: +\# Creates or modifies register #FN_RULE_ADJ. +\# *Notes: +\# Default is 3p for both TYPESTYLES. +\# +\# Requires unit of measure. +\# +.MAC FOOTNOTE_RULE_ADJ END +. nr #FN_RULE_ADJ (\\$1) +.END +\# +\# +\# FOOTNOTE RULE +\# ------------- +\# *Arguments: +\# <none> | <anything> +\# *Function: +\# Turns printing of footnote separator rule on or off. If invoked as +\# PRINT_FOOTNOTE_RULE, prints footnote separator rule. +\# *Notes: +\# Default is on. +\# +\# Invoked in FOOTNOTE (as PRINT_FOOTNOTE_RULE) as 1st line of a footnote +\# if the footnote number (#FN_COUNT) is 1. +\# +.MAC FOOTNOTE_RULE END +. ie '\\$0'PRINT_FOOTNOTE_RULE' \{\ +. if \\n[#FN_RULE]=0 \{ .RLD 1v \} +\!. PS 12 \"Not sure why these have to be transparently embedded, but they do. +. RLD 1v +. LEFT +. PRINT \\v'-\\n[#FN_RULE_ADJ]u'\\l'\\n[#FN_RULE_LENGTH]u'\\v'+\\n[#FN_RULE_ADJ]u' +\!. PS \\n[#DOC_PT_SIZE]u\\*$[FN_SIZE_CHANGE] +. QUAD \\*[$FN_QUAD] +. \} +. el \{\ +. ie '\\$1'' \{ .nr #FN_RULE 1 \} +. el \{ .nr #FN_RULE 0 \} +. \} +.END +\# +\# +\# FOOTNOTE +\# -------- +\# *Arguments: +\# <none> | INDENT L|LEFT|R|RIGHT|B|BOTH <indent value> > | <anything> +\# *Function: +\# Begins collecting and diverting footnote text if no argument +\# given. Otherwise, ends diversion FOOTNOTES, measures footnote +\# depth, and sets footnote trap. +\# *Notes: +\# The input line preceding a footnote call MUST terminate with \c +\# or the footnote marker will be spaced away from the word it +\# should be joined to. +\# +\# If FOOTNOTES is invoked with INDENT, the footnote will +\# be indented. An indent style and an indent value must be given. +\# Subsequent footnotes will NOT be indented; INDENT must be given +\# for each footnote the user wants indented. +\# +.MAC FOOTNOTE END +. ie '\\$1'' \{\ +. if \\n[#FN_MARKERS] \{\ +. if \\n[#CONDENSE] \{ \*[CONDX]\c \} +. if \\n[#EXTEND] \{ \*[EXTX]\c \} +. if !\\n[#NO_FN_MARKER] \{\ +. if \\n[#FN_MARKER_STYLE]=1 \{\ +. ie \\n[#FN_COUNT_FOR_COLS] \{\ +. if \\n[#FN_COUNT_FOR_COLS]=0 \{ .PRINT \*[BU3]* \} +. if \\n[#FN_COUNT_FOR_COLS]=1 \{ .PRINT \*[BU3]\(dg \} +. if \\n[#FN_COUNT_FOR_COLS]=2 \{ .PRINT \*[BU3]** \} +. if \\n[#FN_COUNT_FOR_COLS]=3 \{ .PRINT \*[BU3]\(dg\(dg \} +. if \\n[#FN_COUNT_FOR_COLS]=4 \{ .PRINT \*[BU3]*** \} +. if \\n[#FN_COUNT_FOR_COLS]=5 \{ .PRINT \*[BU3]\(dg\(dg\(dg \} +. if \\n[#FN_COUNT_FOR_COLS]=6 \{ .PRINT \*[BU3]**** \} +. if \\n[#FN_COUNT_FOR_COLS]=7 \{ .PRINT \*[BU3]\(dg\(dg\(dg\(dg \} +. if \\n[#FN_COUNT_FOR_COLS]=8 \{ .PRINT \*[BU3]***** \} +. if \\n[#FN_COUNT_FOR_COLS]=9 \{ .PRINT \*[BU3]\(dg\(dg\(dg\(dg\(dg \} +. \} +. el \{\ +. if \\n[#FN_COUNT]=0 \{ .PRINT \*[BU3]* \} +. if \\n[#FN_COUNT]=1 \{ .PRINT \*[BU3]\(dg \} +. if \\n[#FN_COUNT]=2 \{ .PRINT \*[BU3]** \} +. if \\n[#FN_COUNT]=3 \{ .PRINT \*[BU3]\(dg\(dg \} +. if \\n[#FN_COUNT]=4 \{ .PRINT \*[BU3]*** \} +. if \\n[#FN_COUNT]=5 \{ .PRINT \*[BU3]\(dg\(dg\(dg \} +. if \\n[#FN_COUNT]=6 \{ .PRINT \*[BU3]**** \} +. if \\n[#FN_COUNT]=7 \{ .PRINT \*[BU3]\(dg\(dg\(dg\(dg \} +. if \\n[#FN_COUNT]=8 \{ .PRINT \*[BU3]***** \} +. if \\n[#FN_COUNT]=9 \{ .PRINT \*[BU3]\(dg\(dg\(dg\(dg\(dg\(dg \} +. \} +. \} +. if \\n[#FN_MARKER_STYLE]=2 \{\ +. if \\n[#PRINT_STYLE]=1 \{ .PRINT "\s-2\v'-\\n[#DOC_LEAD]u/5u'\\n+[#FN_NUMBER]\v'+\\n[#DOC_LEAD]u/5u'\s+2" \} +. if \\n[#PRINT_STYLE]=2 \{ .PRINT "\*[SUP]\\n+[#FN_NUMBER]\*[SUPX]" \} +. \} +. \} +. \} +. nr #SPACE_REMAINING \\n[#PAGE_LENGTH]-\\n[#B_MARGIN]-(\\n(nl+1v) +. nr #PP_STYLE_PREV \\n[#PP_STYLE] +. nr #PP_STYLE 2 +. if \\n[#INDENT_FIRST_PARAS] \{ .nr #INDENT_FIRSTS 1 \} +. INDENT_FIRST_PARAS +. ev FOOTNOTES +. ll \\n[#DOC_L_LENGTH]u +. ta \\n(.lu +. if \\n[#COLUMNS] \{\ +. ll \\n[#COL_L_LENGTH]u +. ta \\n(.lu +. \} +. if \\n[#FN_R_INDENT] \{\ +. ll -\\n[#FN_R_INDENT]u +. ta \\n(.lu +. \} +. if \\n[#FN_BR_INDENT] \{\ +. ll -\\n[#FN_BR_INDENT]u +. ta \\n(.lu +. \} +. FAMILY \\*[$FN_FAM] +. FT \\*[$FN_FT] +. PS \\n[#DOC_PT_SIZE]u\\*[$FN_SIZE_CHANGE] +. AUTOLEAD \\n[#FN_AUTOLEAD] +. QUAD \\*[$FN_QUAD] +. 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 \} +. QUAD LEFT +. HY OFF +. \} +. nr #FN_LEAD \\n[#LEAD] +. da FOOTNOTES +. if \\n[#EPIGRAPH] \{ .nr #FN_FOR_EPI 1 \} +. if \\n[#FN_DEFER_SPACE] \{\ +. if \\n[#FN_MARKER_STYLE]=1 \{ .ALD 1v \} +. if \\n[#RESET_FN_NUMBER] \{ .ALD 1v \} +. rr #FN_DEFER_SPACE +. \} +. if \\n+[#FN_COUNT]=1 \{\ +. if !\\n[#FN_DEPTH] \{\ +. if \\n[#PRINT_STYLE]=1 \{ .ALD \\n[#DOC_LEAD]u \} +. ie \\n[#FN_RULE] \{ .PRINT_FOOTNOTE_RULE \} +. el \{ .ALD 1v \} +. \} +. \} +. if \\n[#FN_MARKERS] \{\ +. if !\\n[#NO_FN_MARKER] \{\ +. if \\n[#FN_MARKER_STYLE]=1 \{\ +. ie \\n+[#FN_COUNT_FOR_COLS] \{\ +. if \\n[#FN_COUNT_FOR_COLS]=1 \{ .PRINT *\c \} +. if \\n[#FN_COUNT_FOR_COLS]=2 \{ .PRINT \(dg\c \} +. if \\n[#FN_COUNT_FOR_COLS]=3 \{ .PRINT **\c \} +. if \\n[#FN_COUNT_FOR_COLS]=4 \{ .PRINT \(dg\(dg\c \} +. if \\n[#FN_COUNT_FOR_COLS]=5 \{ .PRINT ***\c \} +. if \\n[#FN_COUNT_FOR_COLS]=6 \{ .PRINT \(dg\(dg\(dg\c \} +. if \\n[#FN_COUNT_FOR_COLS]=7 \{ .PRINT ****\c \} +. if \\n[#FN_COUNT_FOR_COLS]=8 \{ .PRINT \(dg\(dg\(dg\(dg\c \} +. if \\n[#FN_COUNT_FOR_COLS]=9 \{ .PRINT *****\c \} +. if \\n[#FN_COUNT_FOR_COLS]=10 \{ .PRINT \(dg\(dg\(dg\(dg\(dg\c \} +. \} +. el \{\ +. if \\n[#FN_COUNT]=1 \{ .PRINT *\c \} +. if \\n[#FN_COUNT]=2 \{ .PRINT \(dg\c \} +. if \\n[#FN_COUNT]=3 \{ .PRINT **\c \} +. if \\n[#FN_COUNT]=4 \{ .PRINT \(dg\(dg\c \} +. if \\n[#FN_COUNT]=5 \{ .PRINT ***\c \} +. if \\n[#FN_COUNT]=6 \{ .PRINT \(dg\(dg\(dg\c \} +. if \\n[#FN_COUNT]=7 \{ .PRINT ****\c \} +. if \\n[#FN_COUNT]=8 \{ .PRINT \(dg\(dg\(dg\(dg\c \} +. if \\n[#FN_COUNT]=9 \{ .PRINT *****\c \} +. if \\n[#FN_COUNT]=10 \{ .PRINT \(dg\(dg\(dg\(dg\(dg\c \} +. \} +. \} +. if \\n[#FN_MARKER_STYLE]=2 \{\ +. if \\n[#PRINT_STYLE]=1 \{ .PRINT "(\\n[#FN_NUMBER])\c" \} +. if \\n[#PRINT_STYLE]=2 \{ .PRINT "\*[SUP]\\n[#FN_NUMBER]\*[SUPX]\c" \} +. \} +. \} +. \} +. \} +. el \{\ +. ie '\\$1'INDENT' \{\ +. ev FOOTNOTES +. if '\\$2'L' \{ .in (\\$3) \} +. if '\\$2'LEFT' \{ .in (\\$3) \} +. if '\\$2'R' \{ .nr #FN_R_INDENT (\\$3) \} +. if '\\$2'RIGHT' \{ .nr #FN_R_INDENT (\\$3) \} +. if '\\$2'B' \{\ +. nr #FN_BL_INDENT (\\$3) +. ie '\\$4'' \{ .nr #FN_BR_INDENT \\n[#FN_BL_INDENT] \} +. el \{ .nr #FN_BR_INDENT (\\$4) \} +. in \\n[#FN_BL_INDENT]u +. \} +. if '\\$2'BOTH' \{\ +. nr #FN_BL_INDENT (\\$3) +. ie '\\$4'' \{ .nr #FN_BR_INDENT \\n[#FN_BL_INDENT] \} +. el \{ .nr #FN_BR_INDENT (\\$4) \} +. in \\n[#FN_BL_INDENT]u +. \} +. ev +. FOOTNOTE +. \} +. el \{\ +. br +. di +. in 0 \"Turn off indent possibly set by FOOTNOTE INDENT... +. ev +. rr #FN_R_INDENT +. rr #FN_BR_INDENT +. nr #PP_STYLE \\n[#PP_STYLE_PREV] +. if !\\n[#INDENT_FIRSTS] \{ .INDENT_FIRST_PARAS OFF \} +. rr #INDENT_FIRSTS +. nr #FN_DEPTH +\\n[#DIVER_DEPTH] +. if \\n[#FN_DEFER] \{\ +. nr #FN_DEFER_SPACE 1 +. rr #FN_DEFER +. \} +. if \\n[#FN_DEPTH]>\\n[#SPACE_REMAINING] \{\ +. ie \\n[#SPACE_REMAINING]<(\\n[#LEAD]*2) \{ .nr #FN_DEFER 1 \} +. el \{\ +. nr #FN_LINES 0 1 +. while (\\n+[#FN_LINES]*\\n[#FN_LEAD])<\\n[#SPACE_REMAINING] \{\ +. nr #FN_DEPTH (\\n[#FN_LINES]*\\n[#FN_LEAD]) +. \} +. \} +. \} +. nr #VARIABLE_FOOTER_POS -\\n[#DIVER_DEPTH] +. if \\n[#FN_COUNT]=1 \{ .nr #VARIABLE_FOOTER_POS -1v \} +. \} +. ch FOOTER \\n[#VARIABLE_FOOTER_POS]u +. if (\\n(nl+1v)>(\\n[#PAGE_LENGTH]+\\n[#VARIABLE_FOOTER_POS]) \{\ +. ch FOOTER \\n(nlu+1v +. \} +. if \\n[#FN_DEFER] \{\ +. nr #VARIABLE_FOOTER_POS 0-\\n[#B_MARGIN]u +. ch FOOTER \\n[#VARIABLE_FOOTER_POS]u +. \} +. \} +. nr #NO_FN_MARKER 0 +. if \\n[#PRINT_STYLE]=1 \{\ +. if \\n[#SLANT_ON] \{\ +. if \\n[#UNDERLINE_SLANT] \{ .UNDERLINE \} +. \} +. \} +.END +\# +\# +.MAC FN_OVERFLOW_TRAP END +. if \\n[#FN_COUNT] \{\ +. di FN_OVERFLOW +. \} +.END +\# +\# +.MAC DIVERT_FN_LEFTOVER END +. nr #NO_FN_MARKER 1 +. nr #OVERFLOW 1 +. FOOTNOTE +. nf +. FN_OVERFLOW +. FOOTNOTE OFF +. rr #FN_OVERFLOW_DEPTH +.END +\# +\# +.MAC PROCESS_FN_LEFTOVER END +. if !\\n[#FN_DEFER] \{\ +. nr #FN_COUNT 0 1 +. nr #FN_DEPTH 0 +. nr #VARIABLE_FOOTER_POS 0-\\n[#B_MARGIN] +. \} +. if \\n[#FN_DEFER] \{\ +. nr #VARIABLE_FOOTER_POS -(\\n[#FN_DEPTH]+\\n[#DOC_LEAD]) +. \} +. nr #SPACE_REMAINING 0 +. ch FOOTER -\\n[#B_MARGIN]u +. if \\n[#FN_DEFER] \{\ +. nr #NO_FN_MARKER 1 +. da FOOTNOTES +. di +. FOOTNOTE +. nf +. FOOTNOTE OFF +. \} +. if !\\n[#FN_DEFER] \{\ +. if \\n[#FN_OVERFLOW_DEPTH] \{\ +. DIVERT_FN_LEFTOVER +. \} +. \} +. nr #FN_COUNT 0 1 +.END +\# +\# +\# ==================================================================== +\# +\# +++COLUMNS+++ +\# +\# COLUMNS +\# ------- +\# *Arguments: +\# <number of columns> <width of gutters> +\# *Function: +\# Creates registers associated with setting docs in columns. +\# Calculates column line lengths and offsets +\# *Notes: +\# COLUMNS, if used, s/b the last macro invoked before START. +\# +.MAC COLUMNS END +. if \\n[#IGNORE_COLUMNS]=1 \{ .return \} +. nr #COLUMNS 1 +. nr #NUM_COLS \\$1 +. nr #GUTTER (\\$2) +. nr #COL_L_LENGTH \\n[#L_LENGTH]-(\\n[#GUTTER]*(\\n[#NUM_COLS]-1))/\\n[#NUM_COLS] +. nr #COL_TOTAL 0 \\n[#COL_L_LENGTH]+\\n[#GUTTER] +. nr #COL_NUM 0 1 +. while !\\n[#COL_NUM]=\\n[#NUM_COLS] \{\ +. nr #COL_\\n+[#COL_NUM]_L_MARGIN \\n[#L_MARGIN]+\\n[#COL_TOTAL] +. nr #COL_TOTAL \\n+[#COL_TOTAL] +. \} +. rr #COL_TOTAL +. rr #COL_NUM +.END +\# +\# +\# NEXT COLUMN +\# ----------- +\# *Arguments: +\# <none> +\# *Function: +\# Breaks current column and moves to next column. +\# If current column is the last on the page, breaks +\# to a new page. +\# +.MAC COL_NEXT END +. if \\n[#COLUMNS] \{\ +. nr #COL_NEXT 1 +. ie '\\$0'COL_NEXT' \{ .br \} +. el \{\ +. brp +. RLD 1v +. \} +. ie \\n[#COL_NUM]=\\n[#NUM_COLS] \{\ +. bp +. \} +. el \{ .FOOTER \} +. \} +.END +\# +\# ==================================================================== +\# +\# +++DOCUMENT PROCESSING MISC AND SUPPORT MACROS+++ +\# +\# COLLATE +\# ------- +\# *Arguments: +\# <none> +\# *Function: +\# Turns headers off (if on) and saves header state, sets register +\# #COLLATE to 1 (toggle), and breaks to a new page. +\# *Notes: +\# COLLATE exists primarily to allow putting multiple chapters in +\# a single file, although it can be used for any document type. After +\# COLLATE, any of the macros that normally precede START may be +\# used, and should behave as expected. +\# +\# N.B.--the START macro *must* be used after COLLATE (and any other +\# macros that alter mom's behaviour). +\# +.MAC COLLATE END +. nr #COLLATE 1 +. nr #HEADER_STATE \\n[#HEADERS_ON] +. HEADERS OFF +. if \\n[#PAGE_NUM_V_POS]=1 \{\ +. nr #PAGINATION_STATE \\n[#PAGINATE] +. PAGINATION OFF +. \} +. IX CLEAR +. TQ +. LL \\n[#DOC_L_LENGTH]u +. QUAD $DOC_QUAD +. LS \\n[#DOC_LEAD]u +. NEWPAGE +.END +\# +\# +\# SET TRAPS FOR HEADERS/FOOTERS/FOOTNOTES +\# --------------------------------------- +\# *Arguments: +\# <none> +\# *Function: +\# Sets header/footer/footnotes/etc... traps. +\# Calculates the number of lines that actually fit on a +\# page based on #B_MARGIN and resets page bottom trap to coincide +\# with the depth of that number of lines , or, if #ADJ_DOC_LEAD=1, +\# adjusts #DOC_LEAD so that the last line of text on a page falls +\# exactly on #B_MARGIN. +\# +.MAC TRAPS END +\# *Remove all header/footer traps +. ch DO_T_MARGIN +. ch DO_B_MARGIN +. ch HEADER +. ch FOOTER +\# *Plant header trap +. wh 0 HEADER +\# *Adjust lead so last line of text falls on B_MARGIN,... +. ie \\n[#ADJ_DOC_LEAD] \{\ +. nr #LINES_PER_PAGE 0 1 +. nr #DOC_LEAD_ADJ 0 1 +. nr #DEPTH_TO_B_MARGIN \\n[#PAGE_LENGTH]-\\n[#B_MARGIN]-1v +. while \\n[#T_MARGIN]+(\\n[#DOC_LEAD]*\\n+[#LINES_PER_PAGE])<\\n[#DEPTH_TO_B_MARGIN] \{ . \} +. nr #LINES_PER_PAGE -1 +. while \\n[#T_MARGIN]+(\\n[#DOC_LEAD]+\\n+[#DOC_LEAD_ADJ]*\\n[#LINES_PER_PAGE])<\\n[#DEPTH_TO_B_MARGIN] \{ . \} +. DOC_LEAD \\n[#DOC_LEAD]u+\\n[#DOC_LEAD_ADJ]u +. \} +\# *...or calculate new B_MARGIN based on # of lines (at #DOC_LEAD) that fit +\# *on the page. +. el \{\ +. nr #LINES_PER_PAGE 0 1 +. nr #DEPTH_TO_B_MARGIN \\n[#PAGE_LENGTH]-\\n[#B_MARGIN]-1v +. while \\n[#T_MARGIN]+(\\n[#DOC_LEAD]*\\n+[#LINES_PER_PAGE])<\\n[#DEPTH_TO_B_MARGIN] \{ . \} +. nr #B_MARGIN \\n[#PAGE_LENGTH]-(\\n[#T_MARGIN]+(\\n[#DOC_LEAD]*\\n[#LINES_PER_PAGE])) +. \} +\# *Set footer and footnote overflow traps +. nr #FN_COUNT 0 1 +. nr #SPACE_REMAINING 0 +. nr #FN_DEPTH 0 +. nr #VARIABLE_FOOTER_POS 0-\\n[#B_MARGIN]u +. wh 12i FOOTER +. wh -\\n[#B_MARGIN]u FN_OVERFLOW_TRAP +. ch FOOTER -\\n[#B_MARGIN]u +.END +\# +\# +\# CHECK INDENT +\# ------------ +\# *Arguments: +\# <none> +\# *Function: +\# Adds left, right, or both indent values to document elements +\# like heads and subheads that are processed in environments. +\# +.MAC CHECK_INDENT END +. if \\n[#INDENT_LEFT_ACTIVE] \{\ +. in \\n[#L_INDENT]u +. if \\n[#QUOTE] \{\ +. in -\\n[#L_INDENT]u \"Because you added an indent in 2nd line of macro +. ll -\\n[#L_INDENT]u +. ta \\n(.lu +. \} +. if \\n[#EPIGRAPH] \{\ +. in -\\n[#L_INDENT]u +. ll -\\n[#L_INDENT]u +. ta \\n(.lu +. \} +. \} +. if \\n[#INDENT_RIGHT_ACTIVE] \{\ +. ll -\\n[#R_INDENT]u +. ta \\n(.lu +. \} +. if \\n[#INDENT_BOTH_ACTIVE] \{\ +. in \\n[#BL_INDENT]u +. ll -\\n[#BR_INDENT]u +. ta \\n(.lu +. if \\n[#QUOTE] \{\ +. in -\\n[#BL_INDENT]u +. ie \\n[#BR_INDENT]=\\n[#BL_INDENT] \{\ +. ll -\\n[#BR_INDENT]u +. ta \\n(.lu +. \} +. el \{\ +. ll -(\\n[#BR_INDENT]u/2u) +. ta \\n(.lu +. \} +. \} +. if \\n[#EPIGRAPH] \{\ +. in -\\n[#BL_INDENT]u +. ie \\n[#BR_INDENT]=\\n[#BL_INDENT] \{\ +. ll -\\n[#BR_INDENT]u +. ta \\n(.lu +. \} +. el \{\ +. ll -(\\n[#BR_INDENT]u/2u) +. ta \\n(.lu +. \} +. \} +. \} +.END +\# +\# +\# REMOVE INDENT +\# ------------- +\# *Arguments: +\# <none> +\# *Function: +\# Removes left, right, or both indent values from document elements +\# like heads and subheads that are processed in environments. +\# +.MAC REMOVE_INDENT END +. in 0 +. ll \\n[#L_LENGTH]u +. ta \\n(.lu +.END +\# +\# +\# +\# +\# ==================================================================== +\# +\# +++DOCUMENT PROCESSING ALIASES+++ +\# +\# Aliases to make life easier for users: synonyms, short forms +\# and alternate spellings. +\# +\# Macros +\# ------ +.ALIAS BREAK_BLOCKQUOTE BREAK_QUOTE +.ALIAS BREAK_CITATION BREAK_QUOTE +.ALIAS BREAK_CITE BREAK_QUOTE +.ALIAS CITATION BLOCKQUOTE +.ALIAS CITE BLOCKQUOTE +.ALIAS DOC_R_MARGIN DOC_RIGHT_MARGIN +.ALIAS DOC_L_MARGIN DOC_LEFT_MARGIN +.ALIAS DOC_L_LENGTH DOC_LINE_LENGTH +.ALIAS DOC_RMARGIN DOC_RIGHT_MARGIN +.ALIAS DOC_LMARGIN DOC_LEFT_MARGIN +.ALIAS DOC_LLENGTH DOC_LINE_LENGTH +.ALIAS DOC_FAM DOC_FAMILY +.ALIAS FILL QUAD +.ALIAS PP_FT PP_FONT +.ALIAS DOC_PS DOC_PT_SIZE +.ALIAS DOC_LS DOC_LEAD +.ALIAS PAGENUM PAGENUMBER +.ALIAS PAGINATION PAGINATE +\# +\# HEADER and FOOTER aliases for HDRFTR macros. +\# +.ALIAS HEADER_FAMILY HDRFTR_FAMILY +.ALIAS HEADER_FAM HDRFTR_FAMILY +.ALIAS HEADER_SIZE HDRFTR_SIZE +.ALIAS HEADER_PLAIN HDRFTR_PLAIN +.ALIAS HEADER_RULE_GAP HDRFTR_RULE_GAP +.ALIAS HEADER_RULE HDRFTR_RULE +.ALIAS HEADER_LEFT HDRFTR_LEFT +.ALIAS HEADER_LEFT_FAMILY HDRFTR_LEFT_FAMILY +.ALIAS HEADER_LEFT_FAM HDRFTR_LEFT_FAMILY +.ALIAS HEADER_LEFT_FONT HDRFTR_LEFT_FONT +.ALIAS HEADER_LEFT_FT HDRFTR_LEFT_FONT +.ALIAS HEADER_LEFT_SIZE HDRFTR_LEFT_SIZE +.ALIAS HEADER_LEFT_PS HDRFTR_LEFT_SIZE +.ALIAS HEADER_LEFT_CAPS HDRFTR_LEFT_CAPS +.ALIAS HEADER_CENTER HDRFTR_CENTER +.ALIAS HEADER_CENTRE HDRFTR_CENTER +.ALIAS HEADER_CENTER_FAMILY HDRFTR_CENTER_FAMILY +.ALIAS HEADER_CENTRE_FAMILY HDRFTR_CENTER_FAMILY +.ALIAS HEADER_CENTER_FAM HDRFTR_CENTER_FAMILY +.ALIAS HEADER_CENTRE_FAM HDRFTR_CENTER_FAMILY +.ALIAS HEADER_CENTER_FONT HDRFTR_CENTER_FONT +.ALIAS HEADER_CENTRE_FONT HDRFTR_CENTER_FONT +.ALIAS HEADER_CENTER_FT HDRFTR_CENTER_FONT +.ALIAS HEADER_CENTRE_FT HDRFTR_CENTER_FONT +.ALIAS HEADER_CENTER_SIZE HDRFTR_CENTER_SIZE +.ALIAS HEADER_CENTRE_SIZE HDRFTR_CENTER_SIZE +.ALIAS HEADER_CENTER_PS HDRFTR_CENTER_SIZE +.ALIAS HEADER_CENTRE_PS HDRFTR_CENTER_SIZE +.ALIAS HEADER_CENTER_CAPS HDRFTR_CENTER_CAPS +.ALIAS HEADER_CENTRE_CAPS HDRFTR_CENTER_CAPS +.ALIAS HEADER_RIGHT HDRFTR_RIGHT +.ALIAS HEADER_RIGHT_FAMILY HDRFTR_RIGHT_FAMILY +.ALIAS HEADER_RIGHT_FAM HDRFTR_RIGHT_FAMILY +.ALIAS HEADER_RIGHT_FONT HDRFTR_RIGHT_FONT +.ALIAS HEADER_RIGHT_FT HDRFTR_RIGHT_FONT +.ALIAS HEADER_RIGHT_SIZE HDRFTR_RIGHT_SIZE +.ALIAS HEADER_RIGHT_PS HDRFTR_RIGHT_SIZE +.ALIAS HEADER_RIGHT_CAPS HDRFTR_RIGHT_CAPS +.ALIAS FOOTER_FAMILY HDRFTR_FAMILY +.ALIAS FOOTER_FAM HDRFTR_FAMILY +.ALIAS FOOTER_SIZE HDRFTR_SIZE +.ALIAS FOOTER_PLAIN HDRFTR_PLAIN +.ALIAS FOOTER_RULE_GAP HDRFTR_RULE_GAP +.ALIAS FOOTER_RULE HDRFTR_RULE +.ALIAS FOOTER_LEFT HDRFTR_LEFT +.ALIAS FOOTER_LEFT_FAMILY HDRFTR_LEFT_FAMILY +.ALIAS FOOTER_LEFT_FAM HDRFTR_LEFT_FAMILY +.ALIAS FOOTER_LEFT_FONT HDRFTR_LEFT_FONT +.ALIAS FOOTER_LEFT_FT HDRFTR_LEFT_FONT +.ALIAS FOOTER_LEFT_SIZE HDRFTR_LEFT_SIZE +.ALIAS FOOTER_LEFT_PS HDRFTR_LEFT_SIZE +.ALIAS FOOTER_LEFT_CAPS HDRFTR_LEFT_CAPS +.ALIAS FOOTER_CENTER HDRFTR_CENTER +.ALIAS FOOTER_CENTRE HDRFTR_CENTER +.ALIAS FOOTER_CENTER_FAMILY HDRFTR_CENTER_FAMILY +.ALIAS FOOTER_CENTRE_FAMILY HDRFTR_CENTER_FAMILY +.ALIAS FOOTER_CENTER_FAM HDRFTR_CENTER_FAMILY +.ALIAS FOOTER_CENTRE_FAM HDRFTR_CENTER_FAMILY +.ALIAS FOOTER_CENTER_FONT HDRFTR_CENTER_FONT +.ALIAS FOOTER_CENTRE_FONT HDRFTR_CENTER_FONT +.ALIAS FOOTER_CENTER_FT HDRFTR_CENTER_FONT +.ALIAS FOOTER_CENTRE_FT HDRFTR_CENTER_FONT +.ALIAS FOOTER_CENTER_SIZE HDRFTR_CENTER_SIZE +.ALIAS FOOTER_CENTRE_SIZE HDRFTR_CENTER_SIZE +.ALIAS FOOTER_CENTER_PS HDRFTR_CENTER_SIZE +.ALIAS FOOTER_CENTRE_PS HDRFTR_CENTER_SIZE +.ALIAS FOOTER_CENTER_CAPS HDRFTR_CENTER_CAPS +.ALIAS FOOTER_CENTRE_CAPS HDRFTR_CENTER_CAPS +.ALIAS FOOTER_RIGHT HDRFTR_RIGHT +.ALIAS FOOTER_RIGHT_FAMILY HDRFTR_RIGHT_FAMILY +.ALIAS FOOTER_RIGHT_FAM HDRFTR_RIGHT_FAMILY +.ALIAS FOOTER_RIGHT_FONT HDRFTR_RIGHT_FONT +.ALIAS FOOTER_RIGHT_FT HDRFTR_RIGHT_FONT +.ALIAS FOOTER_RIGHT_SIZE HDRFTR_RIGHT_SIZE +.ALIAS FOOTER_RIGHT_PS HDRFTR_RIGHT_SIZE +.ALIAS FOOTER_RIGHT_CAPS HDRFTR_RIGHT_CAPS +.ALIAS SWITCH_HEADERS SWITCH_HDRFTR +.ALIAS SWITCH_FOOTERS SWITCH_HDRFTR +\# +\# SUPPORT ALIASES +\# +.ALIAS COL_BREAK COL_NEXT +.ALIAS PRINT_FOOTNOTE_RULE FOOTNOTE_RULE +\# +\# |