diff options
author | wlemb <wlemb> | 2004-01-25 07:22:59 +0000 |
---|---|---|
committer | wlemb <wlemb> | 2004-01-25 07:22:59 +0000 |
commit | 88f4b7d56b55a0650f3bf07be15a11acbbc13376 (patch) | |
tree | b9e59038fd3c05e4b4d56685dbfebeb8cd596de8 /contrib | |
parent | 8d1b7c6cd9b3e2ce229f262751f086ed60cb6554 (diff) | |
download | groff-88f4b7d56b55a0650f3bf07be15a11acbbc13376.tar.gz |
o Added lists and associated macros. Mom now does (nested) lists.
o Added German-style lowered double quotes and two styles of
guillemets to SMARTQUOTES.
o Added macro SIZE, intended to be called inline as \*[SIZE <n>].
This is to bring mom's inline size change syntax into line with
her other inlines.
o Added ESC_CHAR as an alias of .ec
o Added doc entries for lists.
o Updated SMARTQUOTES entry in docs.
o Updated reserved words in docs.
o Fixed a few more typos in docs.
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/mom/BUGS | 12 | ||||
-rw-r--r-- | contrib/mom/ChangeLog | 21 | ||||
-rw-r--r-- | contrib/mom/NEWS | 18 | ||||
-rw-r--r-- | contrib/mom/TODO | 13 | ||||
-rw-r--r-- | contrib/mom/examples/README.mom | 7 | ||||
-rw-r--r-- | contrib/mom/examples/elvis_syntax.new | 1 | ||||
-rw-r--r-- | contrib/mom/examples/macros.mom | 10 | ||||
-rw-r--r-- | contrib/mom/momdoc/docelement.html | 424 | ||||
-rw-r--r-- | contrib/mom/momdoc/docprocessing.html | 4 | ||||
-rw-r--r-- | contrib/mom/momdoc/goodies.html | 92 | ||||
-rw-r--r-- | contrib/mom/momdoc/headfootpage.html | 2 | ||||
-rw-r--r-- | contrib/mom/momdoc/inlines.html | 71 | ||||
-rw-r--r-- | contrib/mom/momdoc/intro.html | 2 | ||||
-rw-r--r-- | contrib/mom/momdoc/reserved.html | 74 | ||||
-rw-r--r-- | contrib/mom/momdoc/toc.html | 26 | ||||
-rw-r--r-- | contrib/mom/momdoc/typemacdoc.html | 2 | ||||
-rw-r--r-- | contrib/mom/momdoc/typesetting.html | 61 | ||||
-rw-r--r-- | contrib/mom/om.tmac | 403 |
18 files changed, 1097 insertions, 146 deletions
diff --git a/contrib/mom/BUGS b/contrib/mom/BUGS index 52f03c5e..9fa7c77a 100644 --- a/contrib/mom/BUGS +++ b/contrib/mom/BUGS @@ -7,10 +7,22 @@ questions and suggestions, or contact me directly at: df191@ncf.ca +If writing me directly, please include the word "groff" or "mom" in +the Subject line or you risk my spam filter nuking your message. +Also, please--no html email. That, too, gets nuked. + --Peter Schaffter ======================================================================== +Version 1.1.6-e +=============== + +The " mark (doublequote), when entered while not in document +processing mode (i.e. just straightforward typesetting), outputs +nothing unless SMARTQUOTES is invoked explicitly. +---Fixed--- + Version 1.1.6-c =============== diff --git a/contrib/mom/ChangeLog b/contrib/mom/ChangeLog index 0d062128..a8c4f4d6 100644 --- a/contrib/mom/ChangeLog +++ b/contrib/mom/ChangeLog @@ -1,3 +1,24 @@ +*Jan 24 2004 + +o Added lists and associated macros. Mom now does (nested) lists. + +o Added German-style lowered double quotes and two styles of + guillemets to SMARTQUOTES. + +o Added macro SIZE, intended to be called inline as \*[SIZE <n>]. + This is to bring mom's inline size change syntax into line with + her other inlines. + +o Added ESC_CHAR as an alias of .ec + +o Added doc entries for lists. + +o Updated SMARTQUOTES entry in docs. + +o Updated reserved words in docs. + +o Fixed a few more typos in docs. + *Tue Oct 21 2003 o Changed \n[#DRAFT] and \n[#REVISION] to strings \*[$DRAFT] and diff --git a/contrib/mom/NEWS b/contrib/mom/NEWS index 5a7436b6..50cb5b10 100644 --- a/contrib/mom/NEWS +++ b/contrib/mom/NEWS @@ -1,3 +1,21 @@ +Release 1.7 +----------- + +Finally got around to writing "list" macros. See the docs. + +Added German-style lowered double quotes and two styles of +guillemets to SMARTQUOTES. + +Added macro SIZE, intended to be called inline as \*[SIZE <n>]. +This brings mom's inline size change syntax into line with her other +inlines. \*S[<n>] can still be used for the same thing. + +The file elvis_syntax (for elvis prior to 2.2h) is no longer being +maintained. It was getting messy and long in the tooth. The +official elvis syntax file is elvis_syntax.new, which works for +2.2h of elvis (and higher, one hopes). elvis users are encouraged +to update to 2.2h or higher. + Release 1.1.6-e --------------- diff --git a/contrib/mom/TODO b/contrib/mom/TODO index 7785cd9d..4cff7e23 100644 --- a/contrib/mom/TODO +++ b/contrib/mom/TODO @@ -14,17 +14,4 @@ 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. -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/examples/README.mom b/contrib/mom/examples/README.mom index fba1e018..2be09dab 100644 --- a/contrib/mom/examples/README.mom +++ b/contrib/mom/examples/README.mom @@ -43,8 +43,8 @@ letter.mom This is just the tutorial example from the momdocs, ready for previewing. -elvis_syntax ------------- +elvis_syntax.new +---------------- 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 @@ -52,5 +52,8 @@ your elvis.syn file. Provided your mom documents have the extension in elvis_syntax aren't exhaustive, but they go a LONG way to making mom files more readable. +The file elvis_syntax (for pre-2.2h versions of elvis) is no longer +being maintained. Users are encouraged to update to elvis 2.2h or +higher, and to use elvis_syntax.new for mom highlighting. I'll be very happy if someone sends me syntax highlighting rules for vim and emacs. :) diff --git a/contrib/mom/examples/elvis_syntax.new b/contrib/mom/examples/elvis_syntax.new index 7da807f1..aaf9d605 100644 --- a/contrib/mom/examples/elvis_syntax.new +++ b/contrib/mom/examples/elvis_syntax.new @@ -45,6 +45,7 @@ font args LETTER LEGAL EXECUTIVE LEDGER TABLOID QUARTO FOLIO font args 10x14 A3 A4 A5 B4 B5 font args SINGLESPACE font args FACTOR +font args DASH BULLET ALPHA DIGIT USER prefix \/ \/. \/? \/! \/, \/; \/: font escapes \/ \/. \/? \/! \/, \/; \/: prefix \, \,. \,? \,! \,, \,; \,: diff --git a/contrib/mom/examples/macros.mom b/contrib/mom/examples/macros.mom index a3976f3f..5db01313 100644 --- a/contrib/mom/examples/macros.mom +++ b/contrib/mom/examples/macros.mom @@ -274,7 +274,7 @@ the wrong. \# \# .NEWPAGE \" Start a new page -.T_MARGIN 1i \" Set top margin to 1i (approx. equivalent to .ALD |1i-1v above +.T_MARGIN 1i \" Set top margin to 1i (approx. equivalent to .ALD |1i-1v above) \# \# .FAM T @@ -285,7 +285,7 @@ the wrong. Example 3: .ALD .25v .UNDERSCORE 3.75p "A \*[BU 2]recipe for enumerated lists using indents" -.SP \" Add an extra line space +.SP .5v \" Add an extra half line space .FAM N \" New Century Schoolbook family .FT R .PT_SIZE 11 @@ -296,6 +296,10 @@ 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. +.TI 1.5m +\*[BD]Please note: mom\*[PREV] has macros that allow you to set +enumerated lists automatically. These examples merely show hanging +indents and string tabs in use. \# \# .JUSTIFY \" Justify text @@ -374,7 +378,7 @@ list... Example 4: .ALD .25v .UNDERSCORE 3.75p "A \*[BU 2]recipe for nested lists using string tabs" -.SP +.SP .5v .FAM N .FT R .PT_SIZE 11 diff --git a/contrib/mom/momdoc/docelement.html b/contrib/mom/momdoc/docelement.html index 6f20ed12..2413ead4 100644 --- a/contrib/mom/momdoc/docelement.html +++ b/contrib/mom/momdoc/docelement.html @@ -216,6 +216,14 @@ arguments as <li><a href="#BLOCKQUOTE">BLOCKQUOTE</a> <li><a href="#BLOCKQUOTE_CONTROL">Blockquote control</a> </ul> + <li><a href="#LIST_INTRO">Nested lists</a> + <ul> + <li><a href="#LIST">LIST</a> + <ul> + <li><a href="#ITEM">ITEM</a> + </ul> + <li><a href="#LIST_CONTROL">List control</a> + </ul> <li><a href="#FOOTNOTE_INTRO">Footnotes</a> <ul> <li><a href="#FOOTNOTE">FOOTNOTE</a> @@ -816,11 +824,6 @@ the escape in the string for each line, like this: or .HEAD "\[DOWN 3p]First line" "\[DOWN 3p]Next line" </pre> - - - - -<br> <hr> <!====================================================================> @@ -1168,9 +1171,13 @@ 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. +<a href="#QUOTE_CONTROL">quote control macros</a> +you can change her defaults so <strong>QUOTE</strong> serves other +needs, e.g. entering verbatim snippets of programming code, command +line instructions, and so on. (See the +<a href="#QUOTE_TIP">tip</a> +below for suggestions about including programming code snippets in +documents.) <p> <a name="QUOTE_SPACING"></a> Besides indenting quotes, <strong>mom</strong> further sets them @@ -1195,7 +1202,49 @@ and <a href="#BLOCKQUOTE">BLOCKQUOTE</a>, as does the control macro <a href="#QUOTE_INDENT">QUOTE_INDENT</a>. -<br> +<p> +<a name="QUOTE_TIP"><strong>TIP:</strong></a> +If you want to include snippets of programming code in +<strong>mom</strong> documents, you may come acropper of the fact +that groff (and <strong>mom</strong>'s) escape character is the +backslash. In order for <strong>mom</strong> not to interpret +backslashes that occur in code snippets as escapes, you have to +tell <strong>mom</strong> that the backslash character is +(temporarily) no longer the escape character. The easiest way +to do this is to set the escape character to something else for +the duration of the code snippet. You accomplish this with +<strong>ESC_CHAR</strong>, like this: +<p> +<pre> + .ESC_CHAR c +</pre> + +where "c", above, is the alternate escape character +(which should be a character that does not appear in the code). To +set the escape character back to the backslash, simply invoke +<strong>.ESC_CHAR</strong> by itself (i.e. with no argument). +<p> +Because <strong>mom</strong>, by default, sets the text after +<strong>.QUOTE</strong> in italic (for <strong>PRINTSTYLE +TYPESET</strong>) or underlined (for <strong>PRINTSTYLE +TYPEWRITE</strong>), you'll want to change that behaviour as +well. Therefore, a recipe for setting verbatim code snippets using +<strong>QUOTE</strong> could be (assuming you want a fixed width +font like Courier): +<p> +<pre> + \# You only need the first two lines before the first invocation + \# of QUOTE. They stay in effect for all subsequent invocations. + \# + .QUOTE_FONT CR \" Set quote font to Courier roman + .UNDERLINE_QUOTES OFF \" Don't underline quotes in TYPEWRITE + .QUOTE + .ESC_CHAR ^ \" Change escape character to ^ + <code snippet> + .ESC_CHAR \" Restore escape character to \ + .QUOTE OFF + +</pre> <!---QUOTE---> @@ -1407,6 +1456,363 @@ spacing policy for <!====================================================================> +<a name="LIST_INTRO"><h2><u>Nested lists</u></h2></a> +<ul> + <li><a href="#LIST">Tag: LIST</a> + <li><a href="#ITEM">Tag: ITEM</a> + <li><a href="#LIST_CONTROL">LIST control macros</a> +</ul> +<p> +Lists are points or items of interest or importance that are +separated from +<a href="definitions.html#TERMS_RUNNING">running text</a> +by enumerators. Some typical enumerators are +<a href="definitions.html#TERMS_EM">en-dashes</a>, +<a href="definitions.html#TERMS_BULLET">bullets</a>, +digits and letters. +<p> +Setting lists with <strong>mom</strong> is easy. First, you +initialize a list with the <strong>LIST</strong> macro. Then, for +every item in the list, you invoke the macro, <strong>ITEM</strong>, +followed by the text of the item. When a list is finished, you +exit the list with <strong>LIST OFF</strong> (or +<strong>QUIT</strong>, <strong>END</strong>, <strong>X</strong>, +etc.) +<p> +By default <strong>mom</strong> starts each list with the enumerator +flush with the left margin of running text that comes before it, +like this: +<p> +<pre> + My daily schedule needs organizing. I can't + seem to get everything done I want. + o an hour's worth of exercise + o time to prepare at least one healthy + meal per day + o reading time + o work on mom + o writing + - changes from publisher + - current novel + o a couple of hours at the piano +</pre> + +In other words, <strong>mom</strong> does not, by default, indent +entire lists. Indenting a list is controlled by the macro, +<a href="#"SHIFT_LIST>SHIFT_LIST</a>. +(This is a design decision; there are too many instances where a +default indent is not desirable.) Equally, <strong>mom</strong> +does not add any extra space above or below lists. +<p> +Lists can be nested (as in the example above). In other words, you +can set lists within lists, each with an enumerator (and possibly, +indent) of your choosing. In nested lists, each invocation of +<strong>LIST OFF</strong> takes you back to the previous depth (or +level) of list, with that list's enumerator and indent intact. The +final <strong>LIST OFF</strong> exits lists completely and returns +you to the left margin of running text. +<p> +Finally, lists can be used in documents created with either the +document processing macros or just the typesetting macros. +<br> + +<!---LIST---> + +<hr width="66%" align="left"> +<p> +<a name="LIST"> + Macro: <strong>LIST</strong> <var>[ BULLET | DASH | DIGIT | ALPHA | USER ] [ <separator> | <user-defined enumerator> ] [ <off> ]</var></a> + +<p> +Invoked by itself (i.e. with no argument), <strong>LIST</strong> +initializes a list (with bullets as the default enumerator). +Afterwards, each block of input text preceded by +<a href="#ITEM">.ITEM</a>, +on a line by itself, is treated as a list item. +<p> +The optional arguments <strong>BULLET</strong>, +<strong>DASH</strong>, <strong>DIGIT</strong> (for arabic +numerals), <strong>ALPHA</strong> (for lowercase letters) and +<strong>USER</strong> allow you to say what kind of enumerator you +want for a given list. +<p> +If you choose <strong>DIGIT</strong> or <strong>ALPHA</strong>, you +may enter the optional argument <strong>separator</strong> to say +what kind of separator you want after the enumerator. The separator +can be anything you like. The default for <strong>DIGIT</strong> is +a period (dot), like this: +<p> +<pre> + 1. A list item +</pre> + +The default separator for <strong>ALPHA</strong> is a right +parenthesis, like this: +<p> +<pre> + a) A list item +</pre> + +If you want digits with a right-parenthesis separator, you'd do +<p> +<pre> + .LIST DIGIT ) + .ITEM + A list item +</pre> + +which would produce +<p> +<pre> + 1) A list item +</pre> + +<strong>BULLET</strong>, <strong>DASH</strong> and +<strong>USER</strong> do not take a separator. +<p> +<strong>USER</strong> lets you make up your own enumerator. For +example, if you want a list enumerated with <strong>=></strong>, +<p> +<pre> + .LIST USER => + .ITEM + A list item +</pre> + +will produce + +<p> +<pre> + => A list item +</pre> + +If the argument to <strong>USER</strong> contains spaces, you must +enclose the argument in double quotes. +<p> +Any single argument other than <strong>BULLET</strong>, +<strong>DASH</strong>, <strong>DIGIT</strong>, +<strong>ALPHA</strong> or <strong>USER</strong> takes you out of the +current list. If you are at the first list-level (or -depth), +<strong>mom</strong> returns you to the left margin of running text. +Any indents that were in effect prior to setting the list are fully +restored. If you are in a nested list, <strong>mom</strong> moves +you back one list-level and restores the enumerator, separator and +indent appropriate to that level. +<p> +Each invocation of <strong>LIST</strong> must be matched by a +corresponding <strong>LIST OFF</strong> in order to fully exit +lists. For example, +<p> +<pre> + Lorem ipsum dolor sit amet, consetetur sadipscing elitr, + sed diam nonumy eirmod tempor invidunt ut labore. + o List item in level 1 + o List item in level 1 + - List item in level 2 + - List item in level 2 + Lorem ipsum dolor sit amet, consetetur sadipscing elitr, + sed diam nonumy eirmod tempor invidunt ut labore. +</pre> + +is created like this: +<p> +<pre> + Lorem ipsum dolor sit amet, consetetur sadipscing elitr, + sed diam nonumy eirmod tempor invidunt ut labore. + .LIST BULLET + .ITEM + List item in level 1 + .ITEM + List item in level 1 + .LIST DASH + .ITEM + List item in level 2 + .ITEM + List item in level 2 + .LIST OFF \" Turn level 2 list off + .LIST OFF \" Turn level 1 list off + Lorem ipsum dolor sit amet, consetetur sadipscing elitr, + sed diam nonumy eirmod tempor invidunt ut labore. +</pre> + +<strong>NOTE:</strong> Every time you invoke <strong>LIST</strong> +to start a list (as opposed to exiting one), you must supply an +enumerator (and optionally, a separator) for the list, unless you +want <strong>mom</strong>'s default enumerator, which is a bullet. +Within nested lists, <strong>mom</strong> stores the enumerator, +separator and indent for any list you return <em>backwards</em> to +(i.e. with <strong>LIST OFF</strong>), but does not store any +information for lists you move <em>forward</em> to. +<br> + +<hr width="33%" align="left"> +<p> +<a name="ITEM"> + Macro: <strong>ITEM</strong> +<p> +After you've initialized a list with +<a href="#LIST">LIST</a>, +precede each item you want in the list with <strong>ITEM</strong>. +<strong>Mom</strong> takes care of everything else with respect to +setting the item appropriate to the list you're in. +<p> +In document processing, it is legal to have list items that contain +multiple paragraphs. Simply issue a +<a href="#PP">PP</a> +request for each paragraph <em>following</em> the first item. +I.e., don't do this: +<p> +<pre> + .ITEM + .PP + Some text... + .PP + A second paragraph of text +</pre> + +but rather +<p> +<pre> + .ITEM + Some text... + .PP + A second paragraph of text +</pre> +<hr width="33%" align="left"> + +<a name="LIST_CONTROL"><h3><u>List control macros</u></h3></a> +<ol> + <li><a href="#SHIFT_LIST">Indenting lists (SHIFT_LIST)</a> + <li><a href="#RESET_LIST">Resetting an initialized list's enumerator (RESET_LIST)</a> + <li><a href="#PAD_LIST_DIGITS">Padding digit enumerators (PAD_LIST_DIGITS)</a> +</ol> + +<a name="SHIFT_LIST"><h3><u>1. Indenting lists -- SHIFT_LIST</u></h3></a> +<p> +If you want a list to be indented to the right of running text, or +indented to the right of a current list, use the macro +<strong>SHIFT_LIST</strong> immediately after +<a href="#LIST">LIST</a>. +<strong>SHIFT_LIST</strong> takes just one argument: the amount by +which you want the list shifted to the right. The argument requires +a +<a href="definitions.html#TERMS_UNITOFMEASURE">unit of measure</a>, +<p> +<strong>SHIFT_LIST</strong> applies <em>only</em> to the list you +just initialized with <strong>LIST</strong>. It does not carry +over from one invocation of <strong>LIST</strong> to the next. +However, the indent remains in effect when you <em>return</em> to a +list level in a nested list. +<p> +For example, if you want a 2-level list, with each list indented to +the right by 18 +<a href="definitions.html#TERMS_PICASPOINTS">points</a>, +<p> +<pre> + Lorem ipsum dolor sit amet, consetetur sadipscing elitr, + sed diam nonumy eirmod tempor invidunt ut labore. + .LIST \" List 1 + .SHIFT_LIST 18p \" Indent 18 points right of running text + .ITEM + List 1 item + .ITEM + List 1 item + .LIST DASH \" List 2 + .SHIFT_LIST 18p \" Indent 18 points right of list 1 + .ITEM + List 2 item + .ITEM + List 2 item + .LIST OFF \" Move back to list 1 + .ITEM + List 1 item + .ITEM + List 1 item + .LIST OFF \" Exit lists + Lorem ipsum dolor sit amet, consetetur sadipscing elitr, + sed diam nonumy eirmod tempor invidunt ut labore. +</pre> + +produces (approximately) +<p> +<pre> + Lorem ipsum dolor sit amet, consetetur sadipscing elitr, + sed diam nonumy eirmod tempor invidunt ut labore. + o List 1 item + o List 1 item + - List 2 item + - List 2 item + o List 1 item + o List 1 item + Lorem ipsum dolor sit amet, consetetur sadipscing elitr, + sed diam nonumy eirmod tempor invidunt ut labore. +</pre> + +<a name="RESET_LIST"><h3><u>2. Resetting an initialized list's enumerator -- RESET_LIST</u></h3></a> +<p> +In nested lists, if your choice of list enumerator for a given level +of list is either <strong>DIGIT</strong> or <strong>ALPHA</strong>, +you may sometimes want to reset the list's enumerator back to +"1" or "a" when you return, within the nest, to +that list. Consider the following: +<p> +<pre> + Things to do religiously each and every day: + 1. Take care of the dog + a) walk every day + b) brush once a week + - trim around the eyes every fourth brushing + - don't forget to check nails + 2. Feed the cat + a) soft food on Mon., Wed. and Fri. + b) dry food on Tues., Thurs. and Sat. + c) canned tuna on Sunday +</pre> + +Normally, within a nested list, when you return to an alpha- or +digit-enumerated list, the enumerator continues incrementing from +where it left off. That means, in the example above, the normal +state of affairs for the alpha'ed list under "2. Feed the +cat" would be c), d) and e). The solution, in such a case, is +simply to reset the enumerator --before <strong>ITEM</strong>! -- +with the macro, <strong>RESET_LIST</strong>. +<p> +<strong>RESET_LIST</strong> does exactly what it says -- resets the +list -- and doesn't take any arguments. +<p> +<a name="PAD_LIST_DIGITS"><h3><u>3. Padding digit enumerators (PAD_LIST_DIGITS)</a></u></h3></a> +<p> +When your choice of enumerators is <strong>DIGIT</strong> AND the +number of items in the list exceeds nine (9), you have to make a +design decision: should <strong>mom</strong> leave room for the +extra numeral in two-numeral digits to the right or the left of +the single-numeral digits? If you want the extra space to the +right, just invoke the macro, <strong>PAD_LIST_DIGITS</strong> by +itself. This will produce something like +<p> +<pre> + 8. List item + 9. List item + 10. List item +</pre> + +If you want the extra space to the left, invoke +<strong>PAD_LIST_DIGITS</strong> with the single argument, +<strong>LEFT</strong>, which will produce +<p> +<pre> + 8. List item + 9. List item + 10. List item +</pre> + +Of course, if the number of items in the list is less than ten +(10), there's no need for <strong>PAD_LIST_DIGITS</strong>. +<br> +<hr> + +<!====================================================================> + <a name="FOOTNOTE_INTRO"><h2><u>Footnotes</u></h2></a> <ul> <li><a href="#FOOTNOTE_BEHAVIOUR">Footnote behaviour</a> diff --git a/contrib/mom/momdoc/docprocessing.html b/contrib/mom/momdoc/docprocessing.html index 887f7e24..0e8505cd 100644 --- a/contrib/mom/momdoc/docprocessing.html +++ b/contrib/mom/momdoc/docprocessing.html @@ -1043,7 +1043,7 @@ containing the title, subtitle and author information given to the 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.) +for how <strong>mom</strong> 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> @@ -1082,7 +1082,7 @@ except that <strong>mom</strong> prints the argument to 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.) +for how <strong>mom</strong> outputs each part of the page header.) <p> <strong>LETTER</strong> tells mom you're writing a letter. See the section diff --git a/contrib/mom/momdoc/goodies.html b/contrib/mom/momdoc/goodies.html index f641aafe..54a33c3a 100644 --- a/contrib/mom/momdoc/goodies.html +++ b/contrib/mom/momdoc/goodies.html @@ -28,7 +28,7 @@ nearly indispensible) routines to simplify typesetting. <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="#SMARTQUOTES">SMARTQUOTES</a> (convert typewriter doublequotes to proper doublequotes) <li><a href="#CAPS">CAPS</a> (convert to upper case) <br> <li><strong>Underscore/underline</strong> @@ -59,12 +59,21 @@ nearly indispensible) routines to simplify typesetting. <li><a href="#DROPCAP_GUTTER">DROPCAP_GUTTER</a> (change space between drop cap and running text) </ul> </ul> - <li><strong>Superscript</strong> + <li><strong>Superscripts</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> + <li><strong>Lists</strong> + <ul> + <li><a href="docelement.html#LIST_INTRO">Introduction to lists</a> + <li><a href="docelement.html#LIST">LIST</a> + <li><a href="docelement.html#ITEM">ITEM</a> + <li><a href="docelement.html#SHIFT_LIST">SHIFT_LIST</a> + <li><a href="docelement.html#RESET_LIST">RESET_LIST</a> + <li><a href="docelement.html#PAD_LIST_DIGITS">PAD_LIST_DIGITS</a> + </ul> </ul> <!---ALIAS---> @@ -213,9 +222,9 @@ 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> +<a href="typesetting.html#EL">EL</a> and -<a href="#TN">TN</a> +<a href="typesetting.html#TN">TN</a> macros. If this happens, surround just the offending macros and input lines with <p> @@ -237,14 +246,18 @@ of <strong>EL</strong> and <strong>TN</strong> to see <!---SMARTQUOTES---> <hr width="66%" align="left"> -<a name="SMARTQUOTES"><h3><u>Smartquotes</u></h3></a> +<a name="SMARTQUOTES"><h3><u>Convert typewriter doublequotes to proper doublequotes</u></h3></a> <br> -Macro: <strong>SMARTQUOTES</strong> <var>toggle</var> +Macro: <strong>SMARTQUOTES</strong> <var>[<off>] [ ,, | >> | << ]</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. +If you <strong>SMARTQUOTES</strong> without an argument, +<strong>mom</strong> converts all instances of the inch-mark, +(<kbd>"</kbd> --also called a "doublequote"), into +the appropriate instances of true Anglo-American open-and +close-doublequotes. (See the paragraphs on the meaning of the +optional arguments for how to get SMARTQUOTES to behave correctly +for non-English quoting styles.) <p> Typographically, there is a difference between the inch-mark and doublequotes -- a BIG difference. Sadly, typewriters and computer @@ -255,20 +268,67 @@ 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. +If you invoke <strong>SMARTQUOTES</strong> with one of the optional +arguments <strong>,,</strong>, <strong>>></strong> or +<strong><<</strong>, you can use <kbd>"</kbd> as "cheap" +open- and close-quotes when inputting text in a language other than +English, and have <strong>mom</strong> convert them, on output, +into the chosen open- and close-quote style. +<p> +<strong>,,</strong> +opens quotes with "lowered doublequotes" and closes them +with "raised doublequotes", as in this ascii +approximation: +<p> +<pre> + ,,Hilfe !`` +</pre> + +<strong>>></strong> +opens quotes with guillemets pointing to the right, and closes +them with guillemets pointing to the left, as in this ascii +approximation: +<p> +<pre> + >>Zurück !<< +</pre> + +<strong><<</strong> +opens quotes with guillemets pointing to the left, and closes +them with guillemets pointing to the right, as in this ascii +approximation: +<p> +<pre> + <<Mais monsieur! Je ne suis pas ce genre de fille!>> +</pre> + +Please note: the arguments to <strong>SMARTQUOTES</strong> are +literal ASCII characters. ,, is two commas, << is two +less-than signs and >> is two greater-than signs. +<p> +Turn <strong>SMARTQUOTES</strong> off by passing it any argument +<em>not</em> in the argument list (e.g. <strong>OFF</strong>, +<strong>QUIT</strong>, <strong>X</strong>, etc.) <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 +<strong>SMARTQUOTES</strong> is on by default (in the Anglo-American +style); with <a href="#PRINTSTYLE">PRINTSTYLE TYPEWRITE</a>, it's off by default (and should probably stay that way). <p> +Finally, if you're fussy about the kerning of quote marks in +relation to the text they surround, or have special quoting needs, +you have to enter quote marks by hand using groff's native +<a href="definitions.html#TERMS_INLINES">inline escapes</a> +for special characters (see man groff_char for a complete list of +special characters). Entering quote marks this way allows you to +use <strong>mom</strong>'s +<a href="inlines.html#INLINE_KERNING_MOM">inline kerning escapes</a> +to fine-tune the look of quotes. +<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). @@ -566,7 +626,7 @@ rules into the whitespace through the use of string tabs and (Instead of <strong>\*[RULE]</strong>, groff's line drawing function, <a href="inlines.html#INLINE_LINEDRAWING_GROFF">\l</a> -could be used instead.) +could be used.) <p> <pre> .LL 30P diff --git a/contrib/mom/momdoc/headfootpage.html b/contrib/mom/momdoc/headfootpage.html index 7b42cef6..c101dad4 100644 --- a/contrib/mom/momdoc/headfootpage.html +++ b/contrib/mom/momdoc/headfootpage.html @@ -1272,7 +1272,7 @@ required, and decimal fractions are allowed. Please note that (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>. +<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>. diff --git a/contrib/mom/momdoc/inlines.html b/contrib/mom/momdoc/inlines.html index b68cdbbb..ef463703 100644 --- a/contrib/mom/momdoc/inlines.html +++ b/contrib/mom/momdoc/inlines.html @@ -137,35 +137,52 @@ current macro. <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: +<strong>Mom</strong> has two inline escapes for changing point +size: <p> <pre> - \*S[size] + \*[SIZE <size>] </pre> -where "size" is the new size you want. For example, to -change the point size inline to 12 points, you'd enter +and +<p> +<pre> + \*[S<size>] +</pre> + +where "size" is the new size you want. You can use +either; they behave exactly the same way. For example, to change +the point size of type inline to 12 points, you could enter either +<p> +<pre> + \*[SIZE 12] +</pre> + +or <p> <pre> \*S[12] </pre> -Notice that the new size does not require a +The advantage of the first form is that it's easy to remember, and +follows <strong>mom</strong>'s usual inline syntax. The advantage +of the second is that it's more concise. +<p> +Notice that in both cases, 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, +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. +The size given to <strong>\*[SIZE <size>]</strong> or +<strong>\*S[<size>]</strong> may be expressed in plus or minus +terms, which can be very useful. In the following examples, 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. + While she isn't perfect, \*[SIZE +2]mom\*[SIZE -2] isn't half bad. </pre> <strong>NOTE:</strong> If you're accustomed to groff's usual way @@ -189,8 +206,8 @@ for more details). kerning through the use of the inline escapes <p> <table valign="baseline" summary="inlinekerning"> -<tr><td width="15"><td><strong>\*[BU #]<td></strong>Closes the space between letters (<strong>B</strong>ack <strong>U</strong>nits). -<tr><td><td><strong>\*[FU #]</strong><td>Opens the space between letters (<strong>F</strong>orward <strong>U</strong>nits). +<tr><td width="15"><td><pre>\*[BU #]</pre><td>Closes the space between letters (<strong>B</strong>ack <strong>U</strong>nits). +<tr><td><td><pre>\*[FU #]</pre><td>Opens the space between letters (<strong>F</strong>orward <strong>U</strong>nits). </table> <br> "<strong>#</strong>" is the number of <a @@ -212,10 +229,10 @@ units closer to the letter A. For backward compatibility, the forms <p> <table valign="baseline" summary="inlinekerningold"> -<tr><td width="15"><td><strong>\*[BU1]...\*[BU36]</strong><td> +<tr><td width="15"><td><pre>\*[BU1]...\*[BU36]</pre><td> Move back 1...36 <a href="definitions.html#TERMS_KERNUNIT">kern units</a> -<tr><td><td><strong>\*[FU1]...\*[FU36]</strong><td> +<tr><td><td><pre>\*[FU1]...\*[FU36]</pre><td> Move forward 1...36 <a href="definitions.html#TERMS_KERNUNIT">kern units</a> </table> @@ -247,12 +264,12 @@ line in order to create special typographic effects. <p> <table align="left" valign="baseline" summary="inlinehorizontal"> <a name="FWD"></a> -<tr><td width="15"><td width="20%"><strong>\*[FWD #<unit>] +<tr><td width="15"><td width="20%"><pre>\*[FWD #<unit>]</pre> <td>Move forward inline the specified number of <a href="definitions.html#TERMS_UNITOFMEASURE">units of measure</a>; decimal fractions are allowed. <a name="BCK"></a> -<tr><td><td><strong>\*[BCK #<unit>] +<tr><td><td><pre>\*[BCK #<unit>]</pre> <td>Move backward inline the specified number of <a href="definitions.html#TERMS_UNITOFMEASURE">units of measure</a>; decimal fractions are allowed. @@ -269,8 +286,8 @@ puts 12 points of space between "1." and <strong>NOTE:</strong> For backward compatibility, the forms <p> <table valign="baseline" summary="inlinehorizontalold"> -<tr><td width="15"><td><strong>\*[BP.25]...\*[BP12.75]</strong><td>Move back .25...12.75 points -<tr><td><td><strong>\*[FP.25]...\*[FP12.75]</strong><td>Move forward .25...12.75 points</td></tr> +<tr><td width="15"><td><pre>\*[BP.25]...\*[BP12.75]</pre><td>Move back .25...12.75 points +<tr><td><td><pre>\*[FP.25]...\*[FP12.75]</pre><td>Move forward .25...12.75 points</td></tr> </table> <br> also exist (i.e. with no space before the digit and points being @@ -291,11 +308,11 @@ If you need to move portions of type up or down on a line, <p> <table valign="baseline" summary="inlinevertical"> <a name="UP"></a> -<tr><td width="15"><td><strong>\*[UP #<unit>]</strong> +<tr><td width="15"><td><pre>\*[UP #<unit>]</pre> <td>Move up inline the specified number of <a href="definitions.html#TERMS_UNITOFMEASURE">units of measure</a> <a name="DOWN"></a> -<tr><td><td><strong>\*[DOWN #<unit>]</strong> +<tr><td><td><pre>\*[DOWN #<unit>]</pre> <td>Move down inline the specified number of <a href="definitions.html#TERMS_UNITOFMEASURE">units of measure</a> </table> @@ -313,9 +330,9 @@ moves back down by the same amount. also available: <p> <table valign="baseline" summary="inlinevertical"> -<tr><td width="15"><td><strong>\*[ALD.25]...\*[ALD12.75]</strong><td> +<tr><td width="15"><td><pre>\*[ALD.25]...\*[ALD12.75]</pre><td> Advance lead .25...12.75 points (move downward) -<tr><td><td><strong>\*[RLD.25]...\*[RLD12.75]</strong><td> +<tr><td><td><pre>\*[RLD.25]...\*[RLD12.75]</pre><td> Reverse lead .5...12.75 points (move upward)</td></tr> </table> <p> @@ -359,7 +376,7 @@ If you wish to accomplish this effect, you have to use macro and <a href="typesetting.html#STRING_TABS">string tabs</a>. (See the example provided with -<a href="goodies.html#PAD_EXAMPLE"><strong>.PAD</strong></a>. +<a href="goodies.html#PAD_EXAMPLE">.PAD</a>. <p> See groff's <a href="#INLINE_LINEDRAWING_GROFF">Horizontal line drawing function</a> @@ -567,7 +584,7 @@ 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>, -or the groff <strong>info</strong> documentation. +the groff <strong>info</strong> documentation, or man groff_char. <p> <pre> CHARACTER ESCAPE SEQUENCE diff --git a/contrib/mom/momdoc/intro.html b/contrib/mom/momdoc/intro.html index b0741b41..91b4c279 100644 --- a/contrib/mom/momdoc/intro.html +++ b/contrib/mom/momdoc/intro.html @@ -310,7 +310,7 @@ should be familiar to anyone who has ever read a manpage. Briefly: 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. + other than those in the argument list turns the macro off. </ol> <a name="TOGGLE_MACRO"><h3><u>Toggle macros</u></h3></a> diff --git a/contrib/mom/momdoc/reserved.html b/contrib/mom/momdoc/reserved.html index accea287..4e88da78 100644 --- a/contrib/mom/momdoc/reserved.html +++ b/contrib/mom/momdoc/reserved.html @@ -139,6 +139,7 @@ DROPCAP_FAMILY Drop cap family DROPCAP_FONT Drop cap font DROPCAP_GUTTER Drop cap gutter DROPCAP_OFF Support only; restores .in if there was one +ESC_CHAR Alias for .ec EW Extra white -- loosen overall line kern (character spacing) LEADER_CHARACTER Sets leader character @@ -164,6 +165,10 @@ TYPESIZE Diverts SIZESPECS routine so it doesn't print +++NUMBER REGISTERS+++ #ALD ALD value +#ARGS_TO_LIST Tells LIST whether LIST was invoked with a legal arg; + controls LIST OFF processing +#ARGS_TO_SQ Tells SMARTQUOTES whether it was invoked with a legal + arg; controls SMARTQUOTES OFF processing #AUTOLEAD_FACTOR Using FACTOR arg to AUTOLEAD? (toggle) #AUTO_LEAD Using autolead? (toggle) #AUTO_LEAD_VALUE Auto leading value @@ -175,9 +180,12 @@ c column mark #CONDENSE Are we in pseudo-condense mode? (toggle) #COND_WIDTH Width of pseudo-condensed type (pointsize x $COND_PERCENT) +#CURRENT_L_LENGTH Current line length at first invocation of LIST; + like #ORIG_L_LENGTH #CURRENT_TAB Current tab number #DC_GUT Width of dropcap gutter #DEGREES # of degrees slant for pseudo-italic +#ENUMERATOR<n> Number register enumerator for depth <n> in lists #EXTEND Are we in pseudo-extend mode? (toggle) #EXT_WIDTH Width of pseudo-extended type (pointsize x $EXT_PERCENT) @@ -207,17 +215,21 @@ c column mark #LAST_TAB Last tab number set in multi-columns #LEAD Leading (alias) #LIGATURES Ligatures on? (toggle) +#LIST_INDENT<n> Left indent of list <n> #L_INDENT Value of left indent #L_LENGTH Line length #L_MARGIN Page offset if set with LMARGIN; if .po used, \n(.o returns page offset #LOOP #LOOP=1 if a while loop executes; otherwise 0. +#NEXT_DEPTH_BACK Next list level back in lists #NEXT_TAB Current tab number + 1 (used in TN) #NEXT_TAB Next tab in an n+1 sequence #OPEN_CLOSE Manipulates character " to print `` or '' +#ORIGINAL_L_LENGTH Used in LIST for IB processing; holds \n(.l p Output line horiz position at end of $PAD_STRING #PAD_COUNT Number of times # was included in arg to PAD +#PAD_LIST_DIGITS Pad list digits to the left? <toggle> #PAD_SPACE Size of padding space #PAGE_LENGTH Page length (alias) #PAGE_WIDTH Page width @@ -227,13 +239,17 @@ p Output line horiz position at end of #Q_AT_TOP Does a quote start at the top of a new page? (toggle) #QUAD In autoquad mode? (toggle) +#QUIT Tells LIST whether to exit lists completely <toggle> +#REMOVE Used in LIST OFF cleanup #RESTORE_LEAD Lead value in effect prior to AUTOLEAD #RESTORE_LINE_LENGTH Restores actual line length in RULE #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 +#RESTORE_PREV_INDENT Tells LIST OFF what kind of indent was active prior to + first invocation of LIST +#RLD RLD value #SILENT Is silent on? (toggle) #SIZE_FOR_PAD Used to ensure that the size in effect prior to PAD is restored at the start of every @@ -247,15 +263,22 @@ p Output line horiz position at end of #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) +#STORED_L_INDENT Current left indent at first invocation of LIST +#STORED_R_INDENT Current right indent at first invocation of LIST +#STORED_BL_INDENT Current "both, left" indent at first invocation of LIST +#STORED_BR_INDENT Current "both, right" indent at first invocation of LIST +#STORED_HL_INDENT Current hanging indent at first invocation of LIST +#STORED_T_INDENT Current temporary indent at first invocation of LIST 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) +#TAB_ACTIVE Are we in a tab? (toggle) +#TAB_NUMBER Tab number +#TAB_OFFSET Tab indent +#TOTAL_LISTS Total number of lists in a nest #USER_SET_L_LENGTH Did user invoke LL? (toggle) #USER_SET_TITLE_ITEM Did user invoke TOC_TITLE_ENTRY? u Horiz position of start of underscore @@ -268,6 +291,7 @@ $CURRENT_TAB Current tab number $DC_ADJUST +|- # of points to subtract from dropcap $DC_FAM Drop cap family $DC_FT Drop cap font +$ENUMERATOR<n> String enumerator for depth <n> in lists $EXT_PERCENT Percentage by which to pseudo-extend type $FAMILY Family $FAMILY_FOR_PAD Used to ensure that the family in effect prior @@ -281,6 +305,7 @@ $QUOTE0 `` $QUOTE1 '' $RESTORE_QUAD_VALUE Quad value for use in restoring L, R, C, J (after tabs) +$SEPARATOR<n> Separator for depth <n> in lists $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 <#> @@ -400,23 +425,28 @@ 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 -ENDNOTE Endnote -ENDNOTES Output endnotes -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 +BLOCKQUOTE Block-indented, quoted text +COL_BREAK Breaks and spreads line before invocation; moves to + next column on page or 1st col of next page. An alias + of COL_NEXT. +COL_NEXT Moves to next column on page or 1st col of next page +ENDNOTE Endnote +ENDNOTES Output endnotes +EPIGRAPH Epigraph before 1st para +FINIS Prints --END-- +FOOTNOTE Collects footnotes in text for printing at bottom of page +HEAD Section title (main heads) +ITEM Begin a list item +LINEBREAK Break between narrative sections +LIST Initialize a list +PAD_LIST_DIGITS Leave space for two-numeral digit enumerators in a list +PARAHEAD Paragraph head +PP Paragraph +QUOTE Poetic or line for line quotes +RESET_LIST Reset digit or alpha list enumerator +SHIFT_LIST Move a list over to the right +START Prints info collected with doc info macros +SUBHEAD Subheads Headers/footers -------------- @@ -731,6 +761,8 @@ PRINT_PAGE_NUMBER Invoked in HEADER or FOOTER PRINT_USERDEF_HDRFTR Prints user defined, single string recto/verso header/footer REMOVE_INDENT Removes indents set with CHECK_INDENT +QUIT_LISTS Exit lists cleanly and completely +SET_LIST_INDENT Restore indent of a prev. level of list TRAPS Sets hdrftr traps; optionally adjusts #DOC_LEAD to fill page to #B_MARGIN diff --git a/contrib/mom/momdoc/toc.html b/contrib/mom/momdoc/toc.html index 26be1c4e..ba3e73b8 100644 --- a/contrib/mom/momdoc/toc.html +++ b/contrib/mom/momdoc/toc.html @@ -8,8 +8,10 @@ <!====================================================================> <h1><u>Table of Contents</u></h1> -<a href="#TOC_PROP">This link takes you to the Table of Contents itself</a> -<h3>Table of Contents Navigation</h3> +<a href="#TOC_PROP">This link takes you to the top of the Table of Contents proper</a> +<p> +<hr> +<h2>Quick Table of Contents Navigation</h2> <a href="#INTRO">INTRODUCTORY STUFF</a> <ul> <li><a href="#WHAT">What is mom?</a> @@ -45,10 +47,9 @@ <li><a href="#APP">Appendices</a> </ul> <br> -<hr width="66%" align="left"> -<br> +<hr> <a name="TOC_PROP"></a> -<h3>The Table of Contents Proper</h3> +<h2>The Table of Contents Proper</h2> <a name="INTRO"></a> <a name="WHAT"></a> <li><a href="intro.html#INTRO"><strong>1. WHAT IS MOM?</strong></a> @@ -142,7 +143,7 @@ <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 + caps, superscripts, (nested) lists <ul> <li><a href="goodies.html#INDEX_GOODIES">4.11.1 Macro list</a> </ul> @@ -215,13 +216,14 @@ <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#QUOTE_INTRO">5.4.8 Quotes</a> -- line for line poetic quotes or unformatted, verbatim text <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#ENDNOTE_INTRO">5.4.11 Endnotes</a> - <li><a href="docelement.html#BLANK_PAGE_TITLE">5.4.12 Blank page</a> - <li><a href="docelement.html#TOC_INTRO">5.4.13 Table of contents</a> - <li><a href="docelement.html#FINIS_INTRO">5.4.14 Document termination</a> -- FINIS + <li><a href="docelement.html#LIST_INTRO">5.4.10 Lists</a> -- (nested) lists + <li><a href="docelement.html#FOOTNOTE_INTRO">5.4.11 Footnotes</a> + <li><a href="docelement.html#ENDNOTE_INTRO">5.4.12 Endnotes</a> + <li><a href="docelement.html#BLANK_PAGE_TITLE">5.4.13 Blank page</a> + <li><a href="docelement.html#TOC_INTRO">5.4.14 Table of contents</a> + <li><a href="docelement.html#FINIS_INTRO">5.4.15 Document termination</a> -- FINIS </ul> <a name="HDRFTR"></a> <li><a href="headfootpage.html#HEADFOOTPAGE"><strong>5.5 DOCUMENT HEADERS AND FOOTERS</strong></a> diff --git a/contrib/mom/momdoc/typemacdoc.html b/contrib/mom/momdoc/typemacdoc.html index ef23d084..e74ce877 100644 --- a/contrib/mom/momdoc/typemacdoc.html +++ b/contrib/mom/momdoc/typemacdoc.html @@ -35,7 +35,7 @@ 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_PS">point size</a>, <a href="definitions.html#TERMS_LEADING">leading</a>, and <a href="definitions.html#TERMS_QUAD">quad</a>. diff --git a/contrib/mom/momdoc/typesetting.html b/contrib/mom/momdoc/typesetting.html index 56b1c144..184825ca 100644 --- a/contrib/mom/momdoc/typesetting.html +++ b/contrib/mom/momdoc/typesetting.html @@ -1140,16 +1140,17 @@ a line break that trips the trap (hey, I like that -- <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: +If you need <strong>EL</strong> functionality on the last line of a +page that has a footer trap, turn the trap off by surrounding the +line to be <strong>EL</strong>'d with +<a href="goodies.html#TRAP">TRAP</a> +requests, as in following example. <p> <pre> - 3. - .TRAP OFF - .EL - .TRAP + .TRAP OFF \" Turn trap off + 3. \" Input the first line + .EL \" Invoke EL... + .TRAP \" ...and turn trap back on *before* inputting next line \*[FP12]Establish, once and for all, if 42 really is the answer. </pre> @@ -2997,23 +2998,51 @@ sequence (tab n+1) without advancing on the page. See the 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 +<strong>NOTE:</strong> You <em>must</em> put text in the +<a href="definitions.html#TERMS_INPUTLINE">input line</a> +immediately after <strong>TN</strong>. "Stacking" of +<strong>TN</strong>'s is not allowed. In other words, you cannot +do +<p> +<pre> + .TAB 1 + Some text + .TN + Some more text + .TN + .TN + Yet more text +</pre> + +The above example, assuming tabs numbered from 1 to 4, should be entered +<p> +<pre> + .TAB 1 + Some text + .TN + Some more text + .TAB 4 + Yet more text +</pre> +<p> +<strong>ADDITIONAL 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 +footer trap is sprung. If you need to use <strong>TN</strong> on +the last line of a page that has a footer trap, turn the trap off by +surrounding the line to be <strong>TN</strong>'d with <a href="goodies.html#TRAP">TRAP</a>, -as in this example: +requests, as in the following example. <p> <pre> .TAB_SET 1 0 1P L .TAB_SET 2 1P 20P L .TAB 1 - .TRAP OFF - 1. - .TN + .TRAP OFF \" Turn trap off + 1. \" Input the first line + .TN \" Invoke TN... + .TRAP \" ...and turn trap back on *before* inputting next line 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: diff --git a/contrib/mom/om.tmac b/contrib/mom/om.tmac index 4f4f2a81..ff0962a0 100644 --- a/contrib/mom/om.tmac +++ b/contrib/mom/om.tmac @@ -23,8 +23,8 @@ .\" .\" .\" -\# Version 1.1.6-e -\# --------------- +\# Version 1.7 +\# ----------- \# .if (\n[.x]\n[.y] < 118) \ . ab You need GNU troff version 1.18 or higher to run this version of mom! @@ -56,6 +56,7 @@ .ALIAS NEWPAGE bp .ALIAS SPREAD brp .ALIAS STRING ds +.ALIAS ESC_CHAR ec \# \# ALIASES FOR NUMBER REGISTERS \# ---------------------------- @@ -370,6 +371,20 @@ .END \# \# +\# *Arguments: +\# <point size of type> +\# *Function: +\# Sets point size to user supplied value in scaled points. +\# Intended to be called inline with \*[SIZE <n><unit>] +\# *Notes: +\# Can be used with a unit of measure or not. +\# +.MAC SIZE END +\c +.ps \\$1 +.END +\# +\# \# LEADING \# ------- \# *Argument: @@ -440,7 +455,6 @@ .ds PREV \EfP .ds S \Es \# -\# \# ===================================================================== \# \# +++KERNING+++ @@ -476,14 +490,14 @@ \# 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 +\# N.B.--the amount of inline kerning supplied by \*[BU<n>] or +\# \*[FU<n>] is added to or subtracted from any kerning that already \# takes place between two characters when automatic kerning is \# turned on. \# \# In groff v. 1.17.2, it was not possible to pass arguments to macros that \# were executed with inline escapes, nor thence to evaluate conditional -\# expressions. Consequently, each pseudo-escape \[BU#] had to be defined +\# expressions. Consequently, each pseudo-escape \[BU<n>] had to be defined \# separately with ".char". \# \# As of v. 1.18, one can pass arguments to inline strings/macros, @@ -1020,27 +1034,46 @@ \# Turns smartquotes on or off. \# *Notes: \# The " character is read outside the macro when mom 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. +\# processed. The strings for open/close ($QUOTE<n>) are then +\# defined in the macro. +\# +\# (Note to myself: ascii code for " is \N'34'.) \# .char " \\*[$QUOTE\\n[#OPEN_CLOSE]]\R'#OPEN_CLOSE (1-\\n[#OPEN_CLOSE])' \# .MAC SMARTQUOTES END +. rr #ARGS_TO_SQ . ie '\\$1'' \{\ . nr #OPEN_CLOSE 0 -. ds $QUOTE0 `` -. ds $QUOTE1 '' -. nr #SMART_QUOTES 1 +. ds $QUOTE0 \\[lq] +. ds $QUOTE1 \\[rq] . \} . el \{\ -. ds $QUOTE0 \\N'34' -. ds $QUOTE1 \\N'34' -. nr #SMART_QUOTES 0 +. if '\\$1',,' \{\ +. nr #ARGS_TO_SQ 1 +. ds $QUOTE0 \\[Bq] +. ds $QUOTE1 \\[lq] +. \} +. if '\\$1'<<' \{\ +. nr #ARGS_TO_SQ 1 +. ds $QUOTE0 \\[Fo]\\ +. ds $QUOTE1 \\ \\[Fc] +. \} +. if '\\$1'>>' \{\ +. nr #ARGS_TO_SQ 1 +. ds $QUOTE0 \\[Fc]\\| +. ds $QUOTE1 \\|\\[Fo] +. \} +. if !r#ARGS_TO_SQ \{\ +. ds $QUOTE0 \\[dq] +. ds $QUOTE1 \\[dq] +. \} . \} .END \# +.ds $QUOTE0 \[dq] +.ds $QUOTE1 \[dq] +\# Strings for foot and inch marks .ds FOOT \(fm .ds INCH \(fm\(fm \# @@ -1424,7 +1457,7 @@ \# *Argument: \# <none> \# *Function: -\# Automagically moves to TAB#+1 on the same line as the last +\# Automagically moves to TAB<n+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 @@ -1432,10 +1465,9 @@ \# unless TRAP...TRAP OFF is used. \# .MAC TN END -. br +. EL . nr #NEXT_TAB \\n[#CURRENT_TAB]+1 . TAB\\n[#NEXT_TAB] -. sp -1v .END \# \# @@ -2458,9 +2490,9 @@ \# 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 +\# 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 +\# or column. In other words, you must have IL or IB on before you \# can use HI. \# \# INDENT LEFT @@ -10534,6 +10566,7 @@ y\\R'#DESCENDER \\n[.cdp]' . br . rr #TOC .END +\# \# ==================================================================== \# \# +++COLUMNS+++ @@ -10591,6 +10624,332 @@ y\\R'#DESCENDER \\n[.cdp]' \# \# ==================================================================== \# +\# +++LISTS+++ +\# +\# LIST +\# ---- +\# *Arguments: +\# [ BULLET | DASH | DIGIT | ALPHA | USER ] [ <separator> ] [ <off> ] +\# *Function: +\# Stores indent information in effect prior to invocation and +\# initializes a list with the supplied enumerator (and separator). +\# *Notes: +\# Default enumerator is a bullet. +\# +\# Enumerator *must* be supplied for every list that's to the +\# right of another list, every time, unless the default bullet is +\# desired. +\# +\# <off> moves back one list level intuitively, or exits lists +\# completely if the level at which it's invoked is the first. +\# +.MAC LIST END +. if !r#DEPTH \{\ +. nr #STORED_HL_INDENT \\n[#HL_INDENT] +. nr #STORED_T_INDENT \\n[#T_INDENT] +. nr #CURRENT_L_LENGTH \\n(.l +. nr #DEPTH 0 1 +. if \\n[#INDENT_ACTIVE]=1 \{\ +. if \\n[#INDENT_LEFT_ACTIVE]=1 \{\ +. nr #STORED_L_INDENT \\n[#L_INDENT] +. nr #RESTORE_PREV_INDENT 1 +. \} +. if \\n[#INDENT_BOTH_ACTIVE]=1 \{\ +. nr #STORED_BL_INDENT \\n[#BL_INDENT] +. nr #STORED_BR_INDENT \\n[#BR_INDENT] +. IBX +. nr #ORIG_L_LENGTH \\n(.l +. IB +. nr #RESTORE_PREV_INDENT 2 +. \} +. if \\n[#INDENT_RIGHT_ACTIVE]=1 \{\ +. nr #STORED_R_INDENT \\n[#R_INDENT] +. IRX +. nr #ORIG_L_LENGTH \\n(.l +. IR +. nr #RESTORE_PREV_INDENT 3 +. if \\n[#INDENT_LEFT_ACTIVE]=1 \{ .nr #RESTORE_PREV_INDENT 4 \} +. \} +. \} +. \} +. if \\n[#NUM_ARGS]=0 \{\ +. nr #ARGS_TO_LIST 1 \" So default behaves as if LIST BULLET +. ds $ENUMERATOR\\n+[#DEPTH] \(bu +. ds $SEPARATOR +. \} +. if \\n[#NUM_ARGS]>0 \{\ +. rr #ARGS_TO_LIST \" Clear this before processing arg 1. +. if '\\$1'DASH' \{\ +. nr #ARGS_TO_LIST 1 +. ds $ENUMERATOR\\n+[#DEPTH] \(en +. ds $SEPARATOR\\n[#DEPTH] +. \} +. if '\\$1'BULLET' \{\ +. nr #ARGS_TO_LIST 1 +. ds $ENUMERATOR\\n+[#DEPTH] \(bu +. ds $SEPARATOR\\n[#DEPTH] +. \} +. if '\\$1'DIGIT' \{\ +. nr #ARGS_TO_LIST 1 +. nr #ENUMERATOR\\n+[#DEPTH] 0 1 +. ds $ENUMERATOR_TYPE\\n[#DEPTH] register +. ds $SEPARATOR\\n[#DEPTH] . +. if \\n[#NUM_ARGS]=2 \{\ +. ie '\\$2'NONE' \{ .ds $SEPARATOR\\n[#DEPTH]\} +. el \{ .ds $SEPARATOR\\n[#DEPTH] \\$2\} +. \} +. \} +. if '\\$1'ALPHA' \{\ +. nr #ARGS_TO_LIST 1 +. nr #ENUMERATOR\\n+[#DEPTH] 0 1 +. af #ENUMERATOR\\n[#DEPTH] a +. ds $ENUMERATOR_TYPE\\n[#DEPTH] register +. ds $SEPARATOR\\n[#DEPTH] ) +. if \\n[#NUM_ARGS]=2 \{\ +. ie '\\$2'NONE' \{ .ds $SEPARATOR\\n[#DEPTH]\} +. el \{ .ds $SEPARATOR\\n[#DEPTH] \\$2\} +. \} +. \} +. if '\\$1'USER' \{\ +. nr #ARGS_TO_LIST 1 +. ds $ENUMERATOR\\n+[#DEPTH] \\$2 +. ds $SEPARATOR\\n[#DEPTH] +. \} +. if \\n[#NUM_ARGS]=1 \{\ +. if !r#ARGS_TO_LIST \{\ +. ie \\n[#DEPTH]=1 \{\ +. ie \\n[#NEXT_DEPTH_BACK]=0 \{\ +. SET_LIST_INDENT +. if \\n[#QUIT]=1 \{\ +. QUIT_LISTS +. return +. \} +. return +. \} +. el \{\ +. QUIT_LISTS +. return +. \} +. \} +. el \{\ +. SET_LIST_INDENT +. return +. \} +. \} +. \} +. \} +. nr #TOTAL_LISTS \\n[#DEPTH] +. ie '\\*[$ENUMERATOR_TYPE\\n[#DEPTH]]'register' \{\ +. nr #LIST_INDENT\\n[#DEPTH] \\w'm\\*[$SEPARATOR\\n[#DEPTH]]\\ ' +. \} +. el \{\ +. nr #LIST_INDENT\\n[#DEPTH] \\w'\\*[$ENUMERATOR\\n[#DEPTH]]\\0' +. \} +. LL \\n[#CURRENT_L_LENGTH]u +. ie \\n[#DEPTH]=1 \{\ +. ie \\n[#INDENT_ACTIVE]=1 \{\ +. if \\n[#INDENT_LEFT_ACTIVE]=1 \{\ +. nr #L_INDENT \\n[#L_INDENT]+\\n[#LIST_INDENT\\n[#DEPTH]] +. nr #HL_INDENT\\n[#DEPTH] \\n[#LIST_INDENT\\n[#DEPTH]] +. nr #LIST_INDENT\\n[#DEPTH] \\n[#L_INDENT] +. \} +. if \\n[#INDENT_BOTH_ACTIVE]=1 \{\ +. nr #L_INDENT \\n[#BL_INDENT]+\\n[#LIST_INDENT\\n[#DEPTH]] +. nr #HL_INDENT\\n[#DEPTH] \\n[#LIST_INDENT\\n[#DEPTH]] +. nr #LIST_INDENT\\n[#DEPTH] \\n[#L_INDENT] +. \} +. if \\n[#INDENT_RIGHT_ACTIVE]=1 \{\ +. ie \\n[#INDENT_LEFT_ACTIVE]=1 \{\ +. \" Don't do anything; we already have a left indent +. \} +. el \{\ +. nr #L_INDENT +\\n[#LIST_INDENT\\n[#DEPTH]] +. nr #HL_INDENT\\n[#DEPTH] \\n[#LIST_INDENT\\n[#DEPTH]] +. \} +. \} +. \} +. el \{\ +. nr #L_INDENT +\\n[#LIST_INDENT\\n[#DEPTH]] +. nr #HL_INDENT\\n[#DEPTH] \\n[#LIST_INDENT\\n[#DEPTH]] +. \} +. \} +. el \{\ +. nr #L_INDENT +\\n[#LIST_INDENT\\n[#DEPTH]] +. nr #HL_INDENT\\n[#DEPTH] \\n[#LIST_INDENT\\n[#DEPTH]] +. \} +.END +\# +\# +\# ITEM +\# ---- +\# *Arguments: +\# none +\# *Function: +\# Prints enumerator for a given list depth and prepares mom to +\# receive the text of an item. +\# +.MAC ITEM END +. KERN OFF +. IL +. ll \\n[#CURRENT_L_LENGTH]u \" Set ll again because IL turns IB off. +. TRAP OFF +. HI \\n[#HL_INDENT\\n[#DEPTH]]u +. ie '\\*[$ENUMERATOR_TYPE\\n[#DEPTH]]'register' \{\ +. ie '\\g[#ENUMERATOR\\n[#DEPTH]]'0' \{\ +. ie \\n[#PAD_LIST_DIGITS\\n[#DEPTH]]=1 \{\ +. ie \\n[#ENUMERATOR\\n[#DEPTH]]<9 \{\ +. PRINT \\0\\n+[#ENUMERATOR\\n[#DEPTH]]\\*[$SEPARATOR\\n[#DEPTH]] +. \} +. el \{\ +. PRINT \\n+[#ENUMERATOR\\n[#DEPTH]]\\*[$SEPARATOR\\n[#DEPTH]] +. \} +. \} +. el \{\ +. PRINT \\n+[#ENUMERATOR\\n[#DEPTH]]\\*[$SEPARATOR\\n[#DEPTH]] +. \} +. \} +. el \{\ +. PRINT \\n+[#ENUMERATOR\\n[#DEPTH]]\\*[$SEPARATOR\\n[#DEPTH]] +. \} +. \} +. el \{\ +. PRINT \\*[$ENUMERATOR\\n[#DEPTH]]\\*[$SEPARATOR\\n[#DEPTH]] +. \} +. EL +. TRAP +. KERN +.END +\# +\# +\# SHIFT LIST +\# --------- +\# *Arguments: +\# <amount by which to indent a list to the right> +\# *Function: +\# Adds the value of the arg to the current list's indent. +\# *Notes: +\# Requires a unit of measure. +\# +.MAC SHIFT_LIST END +. nr #LIST_INDENT\\n[#DEPTH] \\n[#L_INDENT]+(\\$1) +. nr #L_INDENT \\n[#LIST_INDENT\\n[#DEPTH]] +.END +\# +\# +\# PAD LIST DIGITS +\# --------------- +\# *Arguments: +\# [ LEFT ] +\# *Function: +\# Adds a figure space to a list's hanging and left indent. If +\# LEFT is given, sets reg. #PAD_LIST_DIGITS to 1 for use in ITEM. +\# +.MAC PAD_LIST_DIGITS END +. if '\\g[#ENUMERATOR\\n[#DEPTH]]'0' \{\ +. nr #LIST_INDENT\\n[#DEPTH] +\\w'\\0' +. nr #L_INDENT \\n[#LIST_INDENT\\n[#DEPTH]]+\\n[#LIST_INDENT\\n-[#DEPTH]] +. nr #HL_INDENT\\n+[#DEPTH] +\\w'\\n[#ENUMERATOR\\n[#DEPTH]]' +. if '\\$1'LEFT' \{ .nr #PAD_LIST_DIGITS\\n[#DEPTH] 1 \} +. \} +.END +\# +\# +\# RESET LIST +\# ---------- +\# *Arguments: +\# none +\# *Function: +\# Resets register enumerators to 1 or a. +\# +.MAC RESET_LIST END +. nr #ENUMERATOR\\n[#DEPTH] 0 1 +.END +\# +\# +\# QUIT LISTS +\# ---------- +\# *Arguments: +\# none +\# *Function: +\# Exits lists cleanly and restores any indents that were in +\# effect prior to LIST. +\# +.MAC QUIT_LISTS END +. IQ CLEAR +. nr #HL_INDENT \\n[#STORED_HL_INDENT] +. nr #T_INDENT \\n[#STORED_T_INDENT] +. rr #STORED_HL_INDENT +. if \\n[#RESTORE_PREV_INDENT]=1 \{\ +. nr #L_INDENT \\n[#STORED_L_INDENT] +. IL +. rr #STORED_L_INDENT +. \} +. if \\n[#RESTORE_PREV_INDENT]=2 \{\ +. nr #BL_INDENT \\n[#STORED_BL_INDENT] +. nr #BR_INDENT \\n[#STORED_BR_INDENT] +. LL \\n[#ORIG_L_LENGTH]u +. IB +. rr #STORED_BL_INDENT +. rr #STORED_BR_INDENT +. \} +. if \\n[#RESTORE_PREV_INDENT]=3 \{\ +. nr #R_INDENT \\n[#STORED_R_INDENT] +. LL \\n[#ORIG_L_LENGTH]u +. IR +. rr #STORED_R_INDENT +. \} +. if \\n[#RESTORE_PREV_INDENT]=4 \{\ +. nr #R_INDENT \\n[#STORED_R_INDENT] +. nr #L_INDENT \\n[#STORED_L_INDENT] +. LL \\n[#ORIG_L_LENGTH]u +. IR +. IL +. rr #STORED_R_INDENT +. rr #STORED_L_INDENT +. \} +.\" Clean up after exiting last depth of list +. nr #REMOVE 0 1 +. while \\n+[#REMOVE]<=\\n[#TOTAL_LISTS] \{\ +. rr #LIST_INDENT\\n[#REMOVE] +. rr #ENUMERATOR\\n[#REMOVE] +. rm $ENUMERATOR\\n[#REMOVE] +. rr #SEPARATOR\\n[#REMOVE] +. rm $ENUMERATOR_TYPE\\n[#REMOVE] +. rr #PAD_LIST_DIGITS\\n[#REMOVE] +. \} +. rr #REMOVE +. rr #TOTAL_LISTS +. rr #QUIT +. rr #DEPTH +. rr #NEXT_DEPTH_BACK +. rr #RESTORE_PREV_INDENT +. rr #ORIG_L_LENGTH +. rr #CURRENT_L_LENGTH +.END +\# +\# +\# SET LIST INDENT +\# --------------- +\# *Arguments: +\# none +\# *Function: +\# Restores indent of prev. list in nested lists. Also sets the +\# #QUIT register if an invocation of LIST OFF applies to the first +\# level of list. +\# +.MAC SET_LIST_INDENT END +. nr #NEXT_DEPTH_BACK \\n[#DEPTH]-1 +. if \\n[#NEXT_DEPTH_BACK]=0 \{\ +. nr #QUIT 1 +. return +. \} +. ie \\n[#NEXT_DEPTH_BACK]=1 \{ .nr #L_INDENT \\n[#LIST_INDENT1] \} +. el \{ .nr #L_INDENT -\\n[#LIST_INDENT\\n[#DEPTH]] \} +. nr #HL_INDENT \\n[#HL_INDENT\\n-[#DEPTH]] +.END +\# +\# ==================================================================== +\# \# +++DOCUMENT PROCESSING MISC AND SUPPORT MACROS+++ \# \# COLLATE |