3 .\" Mom -- a typesetting/document-processing macro set for groff.
5 .\" Copyright (C) 2002, 2003 Free Software Foundation, Inc.
6 .\" Written by Peter Schaffter (df191@ncf.ca)
8 .\" This file is part of groff.
10 .\" groff is free software; you can redistribute it and/or modify it under
11 .\" the terms of the GNU General Public License as published by the Free
12 .\" Software Foundation; either version 2, or (at your option) any later
15 .\" groff is distributed in the hope that it will be useful, but WITHOUT ANY
16 .\" WARRANTY; without even the implied warranty of MERCHANTABILITY or
17 .\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
20 .\" You should have received a copy of the GNU General Public License along
21 .\" with groff; see the file COPYING. If not, write to the Free Software
22 .\" Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
29 .if (\n[.x]\n[.y] < 118) \
30 . ab You need GNU troff version 1.18 or higher to run this version of mom!
32 \# Inasmuch as possible, macros that turn a feature on or off follow
33 \# a similar style. Invoking the macro without an argument turns
34 \# the feature on. Invoking it with any other argument turns it off.
35 \# Use of the argument OFF is recommended, but not required; users
36 \# may find other conventions preferable (e.g. NO, X, END, QUIT, etc.).
38 \# "<anything>" in the description of arguments that can be passed
39 \# to a macro means that any argument turns the feature off.
41 \# ====================================================================
43 \# TYPESETTING MACROS, STRINGS, AND ALIASES
44 \# ========================================
48 .als ALIAS als \"Alias .als as ALIAS
49 .als ALIASN aln \"Alias .aln (number registers) as ALIASN
60 \# ALIASES FOR NUMBER REGISTERS
61 \# ----------------------------
63 .ALIASN #PT_SIZE .ps \"fractional point size in units
64 .ALIASN #DIVER_DEPTH dn \"diversion depth
65 .ALIASN #DIVER_WIDTH dl \"diversion width
66 .ALIASN #TRAP_DISTANCE .t \"distance to next trap
67 .ALIASN #LEAD .v \"line space (.vs, not .ls)
68 .ALIASN #PAGE_LENGTH .p \"page length
69 .ALIASN #NUM_ARGS .$ \"number of arguments passed to a macro
70 .ALIASN #INDENT .i \"value of current indent
72 \# ====================================================================
76 .cflags 4 /\(en \" So slash and en-dashes get broken
77 .nr #L_MARGIN \n(.o \" Tabs, etc require #L_MARGIN
79 \# ====================================================================
81 \# END MACRO FOR LETTERS
82 \# ---------------------
86 \# The .em macro executed at the end of letters. Turns footers and
87 \# pagination off, terminates and outputs diversion CLOSING, indented with
88 \# the author's name underneath.
94 . if \\n[#DOC_TYPE]=4 \{\
96 . if !'\\n(.z'' \{ .di \}
99 . TAB_SET 1 \\n[#DOC_L_LENGTH]u/2u \\n[#DOC_L_LENGTH]u/2u LEFT
100 . ALD \\n[#DOC_LEAD]u*2u
102 . if \\n[#CLOSING] \{\
106 . ALD \\n[#DOC_LEAD]u*3u
107 . PRINT \\*[$AUTHOR_1]
113 \# =====================================================================
117 \# Macros that control the physical layout of the page: paper size
123 \# <width of printer sheet (ipPc)>
125 \# Stores user supplied page width in register #PAGE_WIDTH.
127 \# #PAGE_WIDTH is used to establish the default LL (and right margin).
128 \# Requires unit of measure.
132 . nr #PAGE_WIDTH \\$1
133 . if !r#L_MARGIN \{ .L_MARGIN \\n(.o \}
134 . if !r#R_MARGIN \{ .R_MARGIN 1i \}
141 \# <offset from page left (ipPc)>
143 \# Stores user supplied page offset in register #L_MARGIN.
144 \# Sets .po to user supplied offset.
146 \# Requires unit of measure.
150 . nr #L_MARGIN (\\$1)
158 \# <width of right margin (ipPc)>
160 \# Stores user supplied right margin in register #R_MARGIN.
162 \# This is a pseudo-margin. Right margin is actually a function of
163 \# line length. The macro calculates line length from the page offset
164 \# and the value plugged into #R_MARGIN.
166 \# N.B. -- PAGEWIDTH and L_MARGIN have to be defined before R_MARGIN.
168 \# Requires unit of measure.
172 . nr #R_MARGIN (\\$1)
173 . ll \\n[#PAGE_WIDTH]u-\\n[#L_MARGIN]u-\\n[#R_MARGIN]u
175 . nr #L_LENGTH \\n(.l
182 \# <distance to advance from top of page (ipPcv)>
184 \# Stores the user supplied top margin in register #T_MARGIN.
185 \# Advances user supplied depth from the top of the page.
187 \# Requires unit of measure.
191 . nr #T_MARGIN (\\$1)
195 . sp |\\n[#T_MARGIN]u-1v
204 \# <space to leave at the bottom of the page (ipPcv)>
206 \# Stores the user supplied bottom margin in register #B_MARGIN.
208 \# Requires unit of measure.
212 . nr #B_MARGIN (\\$1)
213 . wh -\\n[#B_MARGIN]u DO_B_MARGIN
220 \# <pagewidth> [pagelength [leftmargin [rightmargin [topmargin [bottommargin]]]]]
222 \# Page set-up. Collects arguments and passes them to the appropriate
225 \# All arguments after pagewidth are optional, but must appear
226 \# in the order given above. (User can fill in as much or as
227 \# little as desired.)
229 \# All arguments require a unit of measure.
235 . ie '\\$3'' \{ .L_MARGIN \\n(.o \}
236 . el \{ .L_MARGIN \\$3 \}
237 . ie '\\$4'' \{ .R_MARGIN 1i \}
238 . el \{ .R_MARGIN \\$4 \}
239 . if !'\\$5'' \{ .T_MARGIN \\$5 \}
240 . if !'\\$6'' \{ .B_MARGIN \\$6 \}
243 \# =====================================================================
245 \# +++PAGE CONTROL+++
247 \# Generic macros for breaking pages.
254 \# Plants the top margin (set in .PAGE) at the top of each page.
256 \# The trap is set in .PAGE
260 . sp |\\n[#T_MARGIN]u-1v
270 \# Plants the bottom margin (set in .PAGE) at the bottom of each page.
272 \# The trap is set in .PAGE.
280 \# =====================================================================
282 \# +++GENERAL STYLE MACROS+++
284 \# Macros that are likely to appear together to define general
285 \# type style: line length, family, font, point size, and line
291 \# <line length (iPpc)>
293 \# Stores user supplied line length in register #L_LENGTH.
294 \# Sets .ll to #L_LENGTHu
296 \# Requires unit of measure.
299 . nr #L_LENGTH (\\$1)
300 . nr #USER_SET_L_LENGTH 1
311 \# Stores user supplied font family in string $FAMILY. Sets .fam
315 . if \\n[#PRINT_STYLE]=1 \{ .return \}
316 . if \\n[#IGNORE] \{ .return \}
327 \# Stores user supplied font in $FONT and sets .ft to $FONT.
330 . if \\n[#PRINT_STYLE]=1 \{\
332 . if \\n[#UNDERLINE_ITALIC]=1 \{\
336 . if \\n[#ITALIC_MEANS_ITALIC]=1 \{\
342 . el \{ .UNDERLINE OFF \}
353 \# <point size of type>
355 \# Sets point size to user supplied value in scaled points.
356 \# If #AUTO_LEAD is on, sets .vs to #AUTOLEAD_VALUE+#PT_SIZE.
358 \# Must NOT use a unit of measure.
361 . if \\n[#PRINT_STYLE]=1 \{ .return \}
362 . if \\n[#IGNORE] \{ .return \}
365 . if \\n[#AUTO_LEAD] \{\
366 . ie \\n[#AUTOLEAD_FACTOR] \{ .vs \\n[#PT_SIZE]u*\\n[#AUTOLEAD_VALUE]u/1000u \}
367 . el \{ .vs \\n[#PT_SIZE]u+\\n[#AUTOLEAD_VALUE]u \}
369 . nr #PT_SIZE_IN_UNITS \\n[.ps]
376 \# <leading between lines of text>
378 \# Turns off #AUTO_LEAD if it's on.
379 \# Sets .vs to user supplied value.
381 \# Does not require unit of measure. LEAD automatically turns off AUTOLEAD.
384 . if \\n[#PRINT_STYLE]=1 \{ .return \}
385 . if \\n[#IGNORE] \{ .return \}
387 . if \\n[#AUTO_LEAD] \{\
389 . rr #AUTOLEAD_FACTOR
392 . if \\n[#T_MARGIN_SET]=1 \{\
393 . sp |\\n[#T_MARGIN]u-1v
402 \# <leading value to add to #PT_SIZE> [FACTOR]
404 \# Stores user supplied auto-lead value in register #AUTOLEAD_VALUE.
405 \# Adds #AUT0LEAD_VALUE to #PT_SIZE when invoked to set leading.
406 \# All subsequent PT_SIZE requests reset the leading in the same way until
407 \# AUTOLEAD is turned off.
409 \# With the optional FACTOR argument, the current point size is
410 \# multiplied by #AUTOLEAD_VALUE instead of the two being added
414 . if \\n[#PRINT_STYLE]=1 \{ .return \}
415 . if \\n[#IGNORE] \{ .return \}
417 . nr #AUTOLEAD_VALUE (p;\\$1)
418 . ie \\n[#NUM_ARGS]=2 \{\
419 . if '\\$2'FACTOR' \{\
420 . nr #AUTOLEAD_FACTOR 1
421 . vs \\n[#PT_SIZE]u*\\n[#AUTOLEAD_VALUE]u/1000u
425 . vs \\n[#PT_SIZE]u+\\n[#AUTOLEAD_VALUE]u
427 . if \\n[#T_MARGIN_SET] \{\
428 . sp |\\n[#T_MARGIN]u-1v
434 \# STRINGS FOR INLINE CONTROL OF GENERAL TYPE STYLE
435 \# ------------------------------------------------
444 \# =====================================================================
448 \# AUTOMATIC PAIRWISE KERNING
449 \# --------------------------
451 \# <none> | <anything>
453 \# Turns automatic pairwise kerning on or off.
467 \# INLINE KERNING AND HORIZONTAL MOVEMENT
468 \# --------------------------------------
470 \# Inline kerning provides a simple method for users to adjust the
471 \# amount of space between any two letters. It's predicated on a
472 \# unit of measure "U", which is 1/36 of the current point size as
473 \# returned by \n[.ps]. E.g., if the current point size is 18,
474 \# \n[.ps] returns 18000u, therefore U=500u. Since U remains
475 \# proportional relative to the current point size, the amount
476 \# of kerning between two letters as expressed in Us remains
477 \# visually similar regardless of changes in point size.
479 \# N.B.--the amount of inline kerning supplied by \*[BU#] or
480 \# \*[FU#] is added to or subtracted from any kerning that already
481 \# takes place between two characters when automatic kerning is
484 \# In groff v. 1.17.2, it was not possible to pass arguments to macros that
485 \# were executed with inline escapes, nor thence to evaluate conditional
486 \# expressions. Consequently, each pseudo-escape \[BU#] had to be defined
487 \# separately with ".char".
489 \# As of v. 1.18, one can pass arguments to inline strings/macros,
490 \# hence it is now possible to do \*[BU n] where n, inline, is the desired
491 \# number of kern units. The original .char definitions have been left in
492 \# for backward compatibility with documents created prior to mom-1.1.3c.
496 .ds BU \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*\\$1u)'
497 .ds FU \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*\\$1u)'
499 .ds BU1 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*1u)'
500 .ds BU2 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*2u)'
501 .ds BU3 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*3u)'
502 .ds BU4 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*4u)'
503 .ds BU5 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*5u)'
504 .ds BU6 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*6u)'
505 .ds BU7 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*7u)'
506 .ds BU8 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*8u)'
507 .ds BU9 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*9u)'
508 .ds BU10 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*10u)'
509 .ds BU11 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*11u)'
510 .ds BU12 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*12u)'
511 .ds BU13 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*13u)'
512 .ds BU14 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*14u)'
513 .ds BU15 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*15u)'
514 .ds BU16 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*16u)'
515 .ds BU17 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*17u)'
516 .ds BU18 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*18u)'
517 .ds BU19 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*19u)'
518 .ds BU20 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*20u)'
519 .ds BU21 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*21u)'
520 .ds BU22 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*22u)'
521 .ds BU23 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*23u)'
522 .ds BU24 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*24u)'
523 .ds BU25 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*25u)'
524 .ds BU26 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*26u)'
525 .ds BU27 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*27u)'
526 .ds BU28 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*28u)'
527 .ds BU29 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*29u)'
528 .ds BU30 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*30u)'
529 .ds BU31 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*31u)'
530 .ds BU32 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*32u)'
531 .ds BU33 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*33u)'
532 .ds BU34 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*34u)'
533 .ds BU35 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*35u)'
534 .ds BU36 \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*36u)'
537 .ds FU1 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*1u)'
538 .ds FU2 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*2u)'
539 .ds FU3 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*3u)'
540 .ds FU4 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*4u)'
541 .ds FU5 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*5u)'
542 .ds FU6 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*6u)'
543 .ds FU7 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*7u)'
544 .ds FU8 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*8u)'
545 .ds FU9 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*9u)'
546 .ds FU10 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*10u)'
547 .ds FU11 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*11u)'
548 .ds FU12 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*12u)'
549 .ds FU13 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*13u)'
550 .ds FU14 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*14u)'
551 .ds FU15 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*15u)'
552 .ds FU16 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*16u)'
553 .ds FU17 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*17u)'
554 .ds FU18 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*18u)'
555 .ds FU19 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*19u)'
556 .ds FU20 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*20u)'
557 .ds FU21 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*21u)'
558 .ds FU22 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*22u)'
559 .ds FU23 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*23u)'
560 .ds FU24 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*24u)'
561 .ds FU25 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*25u)'
562 .ds FU26 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*26u)'
563 .ds FU27 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*27u)'
564 .ds FU28 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*28u)'
565 .ds FU29 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*29u)'
566 .ds FU30 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*30u)'
567 .ds FU31 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*31u)'
568 .ds FU32 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*32u)'
569 .ds FU33 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*33u)'
570 .ds FU34 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*34u)'
571 .ds FU35 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*35u)'
572 .ds FU36 \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*36u)'
575 \# *Horizontal movements
576 \# BP1...12.75 and FP1...12.75 move backwards or forwards inline by the
577 \# specified number of points.
578 \# Left in for backward compatibility with mom-1.1.3c, the preferred
579 \# methods for inline horizontal movements are now \*[BCK #<unit>] and
582 .ds BCK \h'-\\$1\\$2'
589 .ds BP1.25 \h'-1.25p'
591 .ds BP1.75 \h'-1.75p'
593 .ds BP2.25 \h'-2.25p'
595 .ds BP2.75 \h'-2.75p'
597 .ds BP3.25 \h'-3.25p'
599 .ds BP3.75 \h'-3.75p'
601 .ds BP4.25 \h'-4.25p'
603 .ds BP4.75 \h'-4.75p'
605 .ds BP5.25 \h'-5.25p'
607 .ds BP5.75 \h'-5.75p'
609 .ds BP6.25 \h'-6.25p'
611 .ds BP6.75 \h'-6.75p'
613 .ds BP7.25 \h'-7.25p'
615 .ds BP7.75 \h'-7.75p'
617 .ds BP8.25 \h'-8.25p'
619 .ds BP8.75 \h'-8.75p'
621 .ds BP9.25 \h'-9.25p'
623 .ds BP9.75 \h'-9.75p'
625 .ds BP10.25 \h'-10.25p'
626 .ds BP10.5 \h'-10.5p'
627 .ds BP10.75 \h'-10.75p'
629 .ds BP11.25 \h'-11.25p'
630 .ds BP11.5 \h'-11.5p'
631 .ds BP11.75 \h'-11.75p'
633 .ds BP12.25 \h'-12.25p'
634 .ds BP12.5 \h'-12.5p'
635 .ds BP12.75 \h'-12.75p'
677 .ds FP10.25 \h'10.25p'
679 .ds FP10.75 \h'10.75p'
681 .ds FP11.25 \h'11.25p'
683 .ds FP11.75 \h'11.75p'
685 .ds FP12.25 \h'12.25p'
687 .ds FP12.75 \h'12.75p'
690 \# WHOLE LINE KERNING (RW and EW)
691 \# -----------------------------
692 \# The line kerning macros are special instances of track kerning,
693 \# used where a complete line needs to be tightened (or relaxed) in
694 \# order to accomodate or remove one or two more characters
695 \# than the default justification permits.
698 \# <amount of overall "kerning" (letter spacing) to apply to the line>
700 \# Invokes .tkf (track kerning) for the current font with
701 \# 1 as both the upper and lower point size limits, so that
702 \# the value entered by the user applies regardless of point
703 \# size. RW ("Reduce Whitespace") reduces the amount of space
704 \# between all characters by an equal amount. EW ("Extra
705 \# Whitespace") increases the amount of space.
707 \# Decimal values are acceptable.
709 \# The groff documentation is a tad confusing about what unit of
710 \# measure is used in track kerning, only that the width of each
711 \# character is increased or decreased by the amount(s) passed as
712 \# arguments to .tkf, and something about linear function of point
713 \# size. In fact, with the way I've put this macro together, it
714 \# doesn't matter. All the user needs to know is that a value
715 \# of one will produce an unacceptably tight or loose line at most
716 \# text point sizes; therefore, effective use of RW and EW is in
717 \# the fractional range below 1 (e.g. .25, .5). Given that RW
718 \# and EW are for massaging type, a certain amount of
719 \# experimentation and previewing is expected and necessary.
721 \# \n(.f holds the current font number, which is acceptable to .tkf.
723 \# RW and EW must be reset to 0 to cancel their effect on
724 \# subsequent output lines.
727 . if \\n[#BR_AT_LINE_KERN] \{ .br \}
728 . tkf 1 1 -\\$1 1 -\\$1
729 . tkf 2 1 -\\$1 1 -\\$1
730 . tkf 3 1 -\\$1 1 -\\$1
731 . tkf 4 1 -\\$1 1 -\\$1
736 . if \\n[#BR_AT_LINE_KERN] \{ .br \}
737 . tkf 1 1 \\$1 1 \\$1
738 . tkf 2 1 \\$1 1 \\$1
739 . tkf 3 1 \\$1 1 \\$1
740 . tkf 4 1 \\$1 1 \\$1
744 \# BREAK AT LINE KERN
745 \# ------------------
749 \# Enables/disables .br's before .RW and .EW
751 \# Mostly, users will want .br's before any kind of line kerning, but
752 \# there may be cases where they don't. BR_BEFORE_LINE_KERN is off by
753 \# default and must be invoked explicitly.
755 .MAC BR_AT_LINE_KERN END
756 . ie '\\$1'' \{ .nr #BR_AT_LINE_KERN 1 \}
757 . el \{ .rr #BR_AT_LINE_KERN \}
760 \# =====================================================================
767 \# <none> | <anything> | DEFAULT
769 \# LINES <#> | MARGIN <#> | SPACE <#>
771 \# Turns auto hyphenation on or off, resets the hyphenation style
772 \# to default, or permits the setting of various hyphenation
775 \# HY ON defaults to .hy 14, i.e. no hyphens after the
776 \# first two or before the last two characters of a word, and
777 \# no hyphenation of the last line prior to a trap (e.g.,
778 \# at the bottom of a page).
780 \# HY DEFAULT resets the hyphenation style to .hy 14 (see
781 \# above) if that behaviour is desired after changes have been
782 \# made to LINES, MARGIN, or SPACE.
784 \# HY LINES <#> sets the number of allowable consecutive hyphenated lines.
786 \# HY MARGIN <#> sets the amount of space (ipPcm) allowed at the end
787 \# of a line in QUAD mode before hyphenation is tripped (e.g. if there's
788 \# only 6 points left, groff won't try to hyphenate the next word).
790 \# HY SPACE sets the amount of extra interword space (ipPcm) that can
791 \# be added in JUSTIFY mode to prevent a line from being hyphenated.
799 . if !'\\$1'LINES' \{\
803 . if !'\\$1'MARGIN' \{\
807 . if !'\\$1'SPACE' \{\
811 . if !'\\$1'DEFAULT' \{\
815 . if '\\$1'LINES' \{ .hlm \\$2 \}
816 . if '\\$1'MARGIN' \{ .hym \\$2 \}
817 . if '\\$1'SPACE' \{ .hys \\$2 \}
818 . if '\\$1'DEFAULT' \{\
827 \# HYPHENATION PARAMETERS
828 \# ----------------------
830 \# <# of lines> | <size of margin> | <amount of interword space>
832 \# Allows user to specify .HY LINES, MARGIN, and SPACE with a single command.
841 \# =====================================================================
843 \# +++VERTICAL SPACING+++
848 \# <user supplied lead to advance below current baseline>
850 \# Creates or modifies register #ALD. Adds user supplied lead
851 \# below current baseline.
853 \# Requires unit of measure ipPcmv.
864 \# <user supplied lead to reverse above current baseline>
866 \# Creates or modifies register #RLD. Reverses user supplied
867 \# lead above current baseline.
869 \# Requires unit of measure ipPcmv.
878 \# The strings \*[ALD.25]...\*[ALD12.75] and their corresponding \*[RLD]
879 \# forms have been left in for backward compatibility with documents
880 \# created using mom-1.1.3c or earlier. The prefered methods of advancing
881 \# and reversing on the page inline are \*[UP #<unit>] and \*[DOWN #<unit>].
883 .ds DOWN \v'\\$1\\$2'
890 .ds ALD1.25 \v'1.25p'
892 .ds ALD1.75 \v'1.75p'
894 .ds ALD2.25 \v'2.25p'
896 .ds ALD2.75 \v'2.75p'
898 .ds ALD3.25 \v'3.25p'
900 .ds ALD3.75 \v'3.75p'
902 .ds ALD4.25 \v'4.25p'
904 .ds ALD4.75 \v'4.75p'
906 .ds ALD5.25 \v'5.25p'
908 .ds ALD5.75 \v'5.75p'
910 .ds ALD6.25 \v'6.25p'
912 .ds ALD6.75 \v'6.75p'
914 .ds ALD7.25 \v'7.25p'
916 .ds ALD7.75 \v'7.75p'
918 .ds ALD8.25 \v'8.25p'
920 .ds ALD8.75 \v'8.75p'
922 .ds ALD9.25 \v'9.25p'
924 .ds ALD9.75 \v'9.75p'
926 .ds ALD10.25 \v'10.25p'
927 .ds ALD10.5 \v'10.5p'
928 .ds ALD10.75 \v'10.75p'
930 .ds ALD11.25 \v'11.25p'
931 .ds ALD11.5 \v'11.5p'
932 .ds ALD11.75 \v'11.75p'
934 .ds ALD12.25 \v'12.5p'
935 .ds ALD12.5 \v'12.5p'
936 .ds ALD12.75 \v'12.75p'
942 .ds RLD1.25 \v'-1.25p'
944 .ds RLD1.75 \v'-1.75p'
946 .ds RLD2.25 \v'-2.25p'
948 .ds RLD2.75 \v'-2.75p'
950 .ds RLD3.25 \v'-3.25p'
952 .ds RLD3.75 \v'-3.75p'
954 .ds RLD4.25 \v'-4.25p'
956 .ds RLD4.75 \v'-4.75p'
958 .ds RLD5.25 \v'-5.25p'
960 .ds RLD5.75 \v'-5.75p'
962 .ds RLD6.25 \v'-6.25p'
964 .ds RLD6.75 \v'-6.75p'
966 .ds RLD7.25 \v'-7.25p'
968 .ds RLD7.75 \v'-7.75p'
970 .ds RLD8.25 \v'-8.25p'
972 .ds RLD8.75 \v'-8.75p'
974 .ds RLD9.25 \v'-9.25p'
976 .ds RLD9.75 \v'-9.75p'
978 .ds RLD10.25 \v'-10.25p'
979 .ds RLD10.5 \v'-10.5p'
980 .ds RLD10.75 \v'-10.75p'
982 .ds RLD11.25 \v'-11.25p'
983 .ds RLD11.5 \v'-11.5p'
984 .ds RLD11.75 \v'-11.75p'
986 .ds RLD12.25 \v'-12.5p'
987 .ds RLD12.5 \v'-12.5p'
988 .ds RLD12.75 \v'-12.75p'
990 \# =====================================================================
994 \# AUTOMATIC LIGATURES
995 \# -------------------
997 \# <none> | <anything>
999 \# Turns automatic ligature generation on or off.
1001 \# Ligatures may be supplied manually with \(fi, \(fl, etc.
1018 \# <none> | <anything>
1020 \# Turns smartquotes on or off.
1022 \# The " character is read outside the macro when mom is
1023 \# processed. The strings for open/close ($QUOTE#) are then
1024 \# defined in the macro. \N'34' is the ASCII code for ". If
1025 \# incompatibilities arise, find the code for " that applies
1026 \# to your system and plug in that code instead.
1028 .char " \\*[$QUOTE\\n[#OPEN_CLOSE]]\R'#OPEN_CLOSE (1-\\n[#OPEN_CLOSE])'
1030 .MAC SMARTQUOTES END
1035 . nr #SMART_QUOTES 1
1038 . ds $QUOTE0 \\N'34'
1039 . ds $QUOTE1 \\N'34'
1040 . nr #SMART_QUOTES 0
1047 \# =====================================================================
1049 \# +++LINE BREAKS+++
1056 \# Breaks a line without advancing.
1058 \# EL is the mnemonic used on older, dedicated typesetting machines
1059 \# to indicate "process the line, then return to the left margin
1060 \# without advancing the galley medium." It stands for End Line.
1062 \# Sadly, EL is only a fake. It will work in all instances EXCEPT
1063 \# when the line to be EL'd is the last line before a footer trap.
1064 \# Use TRAP OFF/TRAP to circumvent this.
1071 \# =====================================================================
1073 \# +++FILLING/QUADDING/JUSTIFYING+++
1080 \# Turns fill on and sets .ad to b.
1082 \# Justifies text left and right.
1085 . if \\n[#TAB_ACTIVE]=0 \{\
1087 . ds $RESTORE_QUAD_VALUE \\*[$QUAD_VALUE]
1091 . if \\n[#PRINT_STYLE]=1 \{ .QUAD L \}
1099 \# L | LEFT | R | RIGHT | C | CENTER/CENTRE
1101 \# Turns fill on and sets .ad to l, r, or c.
1103 \# Terminology is a problem here. Some people call quad left
1104 \# left justified, flush left, or flush left/rag right (and the
1105 \# reverse for quad right). Quad center is sometimes called rag
1106 \# both. For our purposes, all "quad" modes mean that groff fill
1110 . ds $QUAD_VALUE \\$1
1111 . if \\n[#TAB_ACTIVE]=0 \{\
1113 . ds $RESTORE_QUAD_VALUE \\*[$QUAD_VALUE]
1117 . if '\\*[$QUAD_VALUE]'L' \{ .ad l \}
1118 . if '\\*[$QUAD_VALUE]'LEFT' \{ .ad l \}
1119 . if '\\*[$QUAD_VALUE]'R' \{ .ad r \}
1120 . if '\\*[$QUAD_VALUE]'RIGHT' \{ .ad r \}
1121 . if '\\*[$QUAD_VALUE]'C' \{ .ad c \}
1122 . if '\\*[$QUAD_VALUE]'CENTER' \{ .ad c \}
1123 . if '\\*[$QUAD_VALUE]'CENTRE' \{ .ad c \}
1124 . if '\\*[$QUAD_VALUE]'J' \{ .ad b \}
1125 . if '\\*[$QUAD_VALUE]'JUSTIFY' \{ .ad b \}
1130 \# LEFT, RIGHT, AND CENTER
1131 \# -----------------------
1132 \# The purpose of these macros is to allow the user to enter lines
1133 \# of text that will be quadded LRC *without* the user having to
1134 \# enter .BR or .br between lines. For the sake of consistency,
1135 \# all three appear to behave similarly (from the point of view of the user),
1136 \# although the underlying primitives don't. For this reason, LEFT,
1137 \# RIGHT, and CENTER must be followed by .QUAD [L R C J] or .JUSTIFY
1138 \# to restore text to groff fill mode.
1145 \# Turns fill mode off. Allows user to quad lines left without
1146 \# requiring the .BR or .br macro.
1148 \# LEFT simply turns fill off. Lines that exceed the current LL will
1149 \# not be broken, simply continued (indefinitely) until a return is
1150 \# encountered. Note that this behaviour differs from the RIGHT and
1154 . if \\n[#TAB_ACTIVE]=0 \{\
1156 . ds $RESTORE_QUAD_VALUE LEFT
1169 \# Turns fill on. Allows user to quad lines right without
1170 \# requiring the .BR or .br macro.
1172 \# Lines that exceed the current LL will be broken, with the excess
1173 \# text quadded right.
1176 . if \\n[#TAB_ACTIVE]=0 \{\
1178 . ds $RESTORE_QUAD_VALUE RIGHT
1191 \# Turns fill on. Allows user to center lines without
1192 \# requiring the .BR or .br macro.
1194 \# Lines that exceed the current LL will be broken, with the excess
1198 . if \\n[#TAB_ACTIVE]=0 \{\
1199 . ds $RESTORE_QUAD_VALUE CENTER
1206 \# =====================================================================
1210 \# There are two different kinds of tabs available: typesetting tabs
1213 \# Typesetting tabs are set with TAB_SET, which requires a tab number,
1214 \# an indent (offset) from the left margin and a length (optionally
1215 \# with a quad direction and an instruction to fill lines). After tabs
1216 \# are set with TS, they are called with .TAB n, where "n"
1217 \# corresponds to the number passed to TAB_SET as a valid tab number.
1219 \# String tabs allow the user to mark off tab positions inline. Tab
1220 \# indents and lengths are calculated from the beginning and end
1221 \# positions of the marks. Up to 19 string tabs may be created,
1222 \# numbered 1-19. Once created, they are called with .TAB n,
1223 \# just like typesetting tabs.
1225 \# Setting up string tabs is a two-step procedure. First, the user
1226 \# enters an input line in which s/he wants to mark off string tabs.
1227 \# The beginning of a tab is marked with \*[STn], where "n" is
1228 \# the desired number of the tab. The end of the the tab is marked
1229 \# with \*[STnX]. All ST's must have a matching STX. String tabs
1232 \# Next, the user invokes .ST n for every string tab defined, and
1233 \# optionally passes quad information to it. That done, string tabs
1234 \# can be called just like typesetting tabs.
1236 \# String tabs don't preview properly with gxditview. Use gv instead.
1238 \# Strings for string tab inlines
1239 \# ------------------------------
1241 .ds ST1 \Ek[#ST1_OFFSET]
1242 .ds ST2 \Ek[#ST2_OFFSET]
1243 .ds ST3 \Ek[#ST3_OFFSET]
1244 .ds ST4 \Ek[#ST4_OFFSET]
1245 .ds ST5 \Ek[#ST5_OFFSET]
1246 .ds ST6 \Ek[#ST6_OFFSET]
1247 .ds ST7 \Ek[#ST7_OFFSET]
1248 .ds ST8 \Ek[#ST8_OFFSET]
1249 .ds ST9 \Ek[#ST9_OFFSET]
1250 .ds ST10 \Ek[#ST10_OFFSET]
1251 .ds ST11 \Ek[#ST11_OFFSET]
1252 .ds ST12 \Ek[#ST12_OFFSET]
1253 .ds ST13 \Ek[#ST13_OFFSET]
1254 .ds ST14 \Ek[#ST14_OFFSET]
1255 .ds ST15 \Ek[#ST15_OFFSET]
1256 .ds ST16 \Ek[#ST16_OFFSET]
1257 .ds ST17 \Ek[#ST17_OFFSET]
1258 .ds ST18 \Ek[#ST18_OFFSET]
1259 .ds ST19 \Ek[#ST19_OFFSET]
1261 .ds ST1X \Ek[#ST1_MARK]
1262 .ds ST2X \Ek[#ST2_MARK]
1263 .ds ST3X \Ek[#ST3_MARK]
1264 .ds ST4X \Ek[#ST4_MARK]
1265 .ds ST5X \Ek[#ST5_MARK]
1266 .ds ST6X \Ek[#ST6_MARK]
1267 .ds ST7X \Ek[#ST7_MARK]
1268 .ds ST8X \Ek[#ST8_MARK]
1269 .ds ST9X \Ek[#ST9_MARK]
1270 .ds ST10X \Ek[#ST10_MARK]
1271 .ds ST11X \Ek[#ST11_MARK]
1272 .ds ST12X \Ek[#ST12_MARK]
1273 .ds ST13X \Ek[#ST13_MARK]
1274 .ds ST14X \Ek[#ST14_MARK]
1275 .ds ST15X \Ek[#ST15_MARK]
1276 .ds ST16X \Ek[#ST16_MARK]
1277 .ds ST17X \Ek[#ST17_MARK]
1278 .ds ST18X \Ek[#ST18_MARK]
1279 .ds ST19X \Ek[#ST19_MARK]
1280 \# Reserved ST numbers for internal use
1281 .ds ST100 \Ek[#ST100_OFFSET]
1282 .ds ST100X \Ek[#ST100_MARK]
1283 .ds ST101 \Ek[#ST101_OFFSET]
1284 .ds ST101X \Ek[#ST101_MARK]
1287 \# QUAD AND SET STRING TABS
1288 \# ------------------------
1290 \# <stringtab number> L | R | C | J [QUAD]
1292 \# Creates strings $ST<#>_QUAD_DIR and $ST<#>_FILL, then sets up a
1293 \# tab based on the collected information.
1295 \# Like TS, ST invoked without a quad direction will default to LEFT.
1296 \# If lines should be filled and quadded, use the optional argument QUAD.
1297 \# N.B. -- indents *must* be turned off before setting string tabs
1301 . ds $ST\\$1_QUAD_DIR \\$2
1302 . if \\n[#NUM_ARGS]=3 \{\
1303 . ds $ST\\$1_FILL QUAD
1305 . nr #ST\\$1_LENGTH \\n[#ST\\$1_MARK]-\\n[#ST\\$1_OFFSET]
1306 . ie \\n[#IN_TAB] \{\
1307 . TAB_SET \\$1 \\n[#ST\\$1_OFFSET]u+\\n[#ST_OFFSET]u \\n[#ST\\$1_LENGTH]u \\*[$ST\\$1_QUAD_DIR] \\*[$ST\\$1_FILL]
1310 . TAB_SET \\$1 \\n[#ST\\$1_OFFSET]u \\n[#ST\\$1_LENGTH]u \\*[$ST\\$1_QUAD_DIR] \\*[$ST\\$1_FILL]
1318 \# <#> ident(ipPcm) length(ipPcm) [L | R | C | J [QUAD]]
1320 \# Creates macros TABn and TAB n, where "n" is any arbitrary number.
1321 \# TABn is a typesetting tab (i.e. a tab defined as an indent
1322 \# from the page left offset plus a line length.)
1324 \# n = arbitrary digit to identify the tab
1325 \# indent = indent from left margin; unit of measure required
1326 \# length = length of tab (unit of measure required; can be
1327 \# \w'<string>'u--if more than one word in string, surround
1328 \# with double quotes "\w'<three word string>'"
1329 \# LRCJ = quad for tab (left, right, center, justified)
1330 \# If option QUAD afterwards is not given, quad is line for line
1331 \# (no fill mode), meaning that there's no need for .BR or .br
1333 \# QUAD = fill tab (so it behaves as if .QUAD LRC or .JUSTIFY
1336 \# N.B. -- indents *must* be turned off before setting tabs
1340 \# .TAB_SET 1 2P+6p 12P C
1342 \# means "create a tab numbered 1 that starts 2 picas and 6 points from
1343 \# the left margin, is 12 picas long, and centre each input line."
1345 \# .TAB_SET 1 2P+6P 12P C QUAD
1347 \# means exactly the same thing, except that input lines are joined and
1348 \# the area delimted by the tab filled with centered text.
1350 \# TAB n can be called at any time after being set.
1352 \# Tabs are NOT columnar in behaviour. If the text inside a
1353 \# tab runs to several lines, when you call the next tab a break
1354 \# occurs, meaning that the new tab starts one line below the last
1355 \# line in the previous tab. For columnar behaviour, you must
1356 \# use the multi-column macros in addition to tabs.
1358 \# If you want tabs to line up bottom-line to bottom-line (most likely
1359 \# single line tabs), use .TN (provided the tabs are numbered sequentially).
1360 \# Otherwise, you must use .EL then .TAB # if you want them to align.
1362 \# If you want to reset tabs, you must use .TQ before .TAB_SET.
1364 \# Note that indents are turned off automatically whenever a new
1365 \# tab is called with TAB n.
1367 \# Tabs themselves are user-invoked using the TAB macro with a numeric
1368 \# argument, e.g. TAB 1.
1370 \# Generally, in order not to get confused, it's a good idea
1371 \# to make sure all indents are off before setting tabs.
1375 . nr #TAB_NUMBER \\$1
1376 . ds $CURRENT_TAB \\n[#TAB_NUMBER]
1377 . nr #TAB_OFFSET (\\$2)
1378 . nr #TAB_LENGTH (\\$3)
1379 . MAC TAB\\n[#TAB_NUMBER] DONE \"Define TAB macro
1383 . nr #CURRENT_TAB \\n[#TAB_NUMBER]
1384 . po \\n[#L_MARGIN]u+\\n[#TAB_OFFSET]u
1385 . nr #ST_OFFSET \\n[#TAB_OFFSET]
1386 . nr #TAB_OFFSET\\*[$CURRENT_TAB] \\n[#TAB_OFFSET]
1387 . ll \\n[#TAB_LENGTH]u
1389 . ie '\\$5'QUAD' \{\
1390 . if '\\$4'L' \{ .QUAD L \}
1391 . if '\\$4'R' \{ .QUAD R \}
1392 . if '\\$4'C' \{ .QUAD C \}
1393 . if '\\$4'J' \{ .JUSTIFY \}
1396 . if '\\$4'' \{ .LEFT \}
1397 . if '\\$4'L' \{ .LEFT \}
1398 . if '\\$4'R' \{ .RIGHT \}
1399 . if '\\$4'C' \{ .CENTER \}
1400 . if '\\$4'J' \{ .JUSTIFY \}
1410 \# <tab number to tab into>
1412 \# Moves to tab number passed as an argument.
1415 . ds $TAB_NUMBER \\$1
1416 . TAB\\*[$TAB_NUMBER]
1418 . po \\n[#L_MARGIN]u+\\n[#TAB_OFFSET\\*[$TAB_NUMBER]]u
1427 \# Automagically moves to TAB#+1 on the same line as the last
1428 \# line of the previous tab.
1430 \# If the tabs being aligned fall too close to the footer
1431 \# trap, the line entered after .TN will appear on the next page,
1432 \# unless TRAP...TRAP OFF is used.
1436 . nr #NEXT_TAB \\n[#CURRENT_TAB]+1
1447 \# Sets #TAB_ACTIVE to "0" (off).
1448 \# Resets left margin to value in effect prior to tabs.
1449 \# Resets line length to value in effect prior to tabs.
1450 \# Checks #QUAD to see if we were in flush or quad mode
1451 \# prior to tabs (0=off, 1=on).
1452 \# Resets QUAD [ L|R|C ], LEFT, RIGHT, CENTER, or JUSTIFY
1453 \# in effect prior to tabs.
1455 \# TQ *must* come before setting any new tabs if you want the
1456 \# tabs' indents measured from page left. Otherwise, the tabs'
1457 \# indents are measured from the left margin of the tab you're
1464 . po \\n[#L_MARGIN]u
1465 . ll \\n[#L_LENGTH]u
1468 . ie '\\*[$RESTORE_QUAD_VALUE]'J' \{ .JUSTIFY \}
1469 . el \{ .QUAD \\*[$RESTORE_QUAD_VALUE] \}
1472 . if '\\*[$RESTORE_QUAD_VALUE]'LEFT' \{ .LEFT \}
1473 . if '\\*[$RESTORE_QUAD_VALUE]'RIGHT' \{ .RIGHT \}
1474 . if '\\*[$RESTORE_QUAD_VALUE]'CENTER' \{ .CENTER \}
1478 \# =====================================================================
1480 \# +++MISCELLANEOUS USEFUL MACROS AND STRINGS+++
1485 \# <none> | <anything>
1487 \# When on, underlines all letters, words, and digits in a passage,
1488 \# ignoring punctuation and spaces.
1490 \# Only for use when the font family is COURIER, to simulate
1491 \# typewriter-style underlining of italic passages.
1495 . nr #UNDERLINE_ON 1
1522 . char \[`A] _
\b\[`A]
1523 . char \[^A] _
\b\[^A]
1524 . char \['A] _
\b\['A]
1525 . char \[:A] _
\b\[:A]
1526 . char \[oA] _
\b\[oA]
1527 . char \[~A] _
\b\[~A]
1528 . char \[AE] _
\b\[AE]
1529 . char \[`E] _
\b\[`E]
1530 . char \[^E] _
\b\[^E]
1531 . char \['E] _
\b\['E]
1532 . char \[:E] _
\b\[:E]
1533 . char \[`I] _
\b\[`I]
1534 . char \[^I] _
\b\[^I]
1535 . char \['I] _
\b\['I]
1536 . char \[:I] _
\b\[:I]
1537 . char \[`O] _
\b\[`O]
1538 . char \[^O] _
\b\[^O]
1539 . char \['O] _
\b\['O]
1540 . char \[:O] _
\b\[:O]
1541 . char \[~O] _
\b\[~O]
1542 . char \[/O] _
\b\[/O]
1543 . char \[`U] _
\b\[`U]
1544 . char \[^U] _
\b\[^U]
1545 . char \['U] _
\b\['U]
1546 . char \[:U] _
\b\[:U]
1547 . char \[,C] _
\b\[,C]
1548 . char \[-D] _
\b\[-D]
1549 . char \[~N] _
\b\[~N]
1550 . char \[TP] _
\b\[TP]
1551 . char \['Y] _
\b\['Y]
1552 . char \[:Y] _
\b\[:Y]
1579 . char \[`a] _
\b\[`a]
1580 . char \[^a] _
\b\[^a]
1581 . char \['a] _
\b\['a]
1582 . char \[:a] _
\b\[:a]
1583 . char \[oa] _
\b\[oa]
1584 . char \[~a] _
\b\[~a]
1585 . char \[ae] _
\b\[ae]
1586 . char \[`e] _
\b\[`e]
1587 . char \[^e] _
\b\[^e]
1588 . char \['e] _
\b\['e]
1589 . char \[:e] _
\b\[:e]
1590 . char \[`i] _
\b\[`i]
1591 . char \[^i] _
\b\[^i]
1592 . char \['i] _
\b\['i]
1593 . char \[:i] _
\b\[:i]
1594 . char \[`o] _
\b\[`o]
1595 . char \[^o] _
\b\[^o]
1596 . char \['o] _
\b\['o]
1597 . char \[:o] _
\b\[:o]
1598 . char \[~o] _
\b\[~o]
1599 . char \[/o] _
\b\[/o]
1600 . char \[`u] _
\b\[`u]
1601 . char \[^u] _
\b\[^u]
1602 . char \['u] _
\b\['u]
1603 . char \[:u] _
\b\[:u]
1604 . char \[,c] _
\b\[,c]
1605 . char \[Sd] _
\b\[Sd]
1606 . char \[~n] _
\b\[~n]
1607 . char \[Tp] _
\b\[Tp]
1608 . char \['y] _
\b\['y]
1609 . char \[:y] _
\b\[:y]
1610 . char \[ss] _
\b\[ss]
1624 . nr #UNDERLINE_ON 0
1625 . 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 \
1626 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 \
1627 \[`A] \[^A] \['A] \[:A] \[oA] \[~A] \[AE] \[`E] \[^E] \['E] \[:E] \
1628 \[`I] \[^I] \['I] \[:I] \[`O] \[^O] \['O] \[:O] \[~O] \[/O] \[`U] \
1629 \[^U] \['U] \[:U] \[,C] \[-D] \[~N] \[TP] \['Y] \[:Y] \
1630 \[`a] \[^a] \['a] \[:a] \[oa] \[~a] \[ae] \[`e] \[^e] \['e] \[:e] \[`i] \
1631 \[^i] \['i] \[:i] \[`o] \[^o] \['o] \[:o] \[~o] \[/o] \[`u] \[^u] \['u] \
1632 \[:u] \[,c] \[Sd] \[~n] \[Tp] \['y] \[:y] \[ss] \
1633 ' 1 2 3 4 5 6 7 8 9 0
1643 \# Underscores all letters, words, and digits in a passage,
1644 \# ignoring punctuation and spaces.
1646 \# Intended to be called with inline escapes \*[UL] (underline
1647 \# on) and \*[ULX] (underline off). Only works when the font family
1648 \# is COURIER, to simulate typewriter-style underlining of italic
1652 \c\R'#UNDERLINE_ON 1'
1679 . char \[`A] _
\b\[`A]
1680 . char \[^A] _
\b\[^A]
1681 . char \['A] _
\b\['A]
1682 . char \[:A] _
\b\[:A]
1683 . char \[oA] _
\b\[oA]
1684 . char \[~A] _
\b\[~A]
1685 . char \[AE] _
\b\[AE]
1686 . char \[`E] _
\b\[`E]
1687 . char \[^E] _
\b\[^E]
1688 . char \['E] _
\b\['E]
1689 . char \[:E] _
\b\[:E]
1690 . char \[`I] _
\b\[`I]
1691 . char \[^I] _
\b\[^I]
1692 . char \['I] _
\b\['I]
1693 . char \[:I] _
\b\[:I]
1694 . char \[`O] _
\b\[`O]
1695 . char \[^O] _
\b\[^O]
1696 . char \['O] _
\b\['O]
1697 . char \[:O] _
\b\[:O]
1698 . char \[~O] _
\b\[~O]
1699 . char \[/O] _
\b\[/O]
1700 . char \[`U] _
\b\[`U]
1701 . char \[^U] _
\b\[^U]
1702 . char \['U] _
\b\['U]
1703 . char \[:U] _
\b\[:U]
1704 . char \[,C] _
\b\[,C]
1705 . char \[-D] _
\b\[-D]
1706 . char \[~N] _
\b\[~N]
1707 . char \[TP] _
\b\[TP]
1708 . char \['Y] _
\b\['Y]
1709 . char \[:Y] _
\b\[:Y]
1736 . char \[`a] _
\b\[`a]
1737 . char \[^a] _
\b\[^a]
1738 . char \['a] _
\b\['a]
1739 . char \[:a] _
\b\[:a]
1740 . char \[oa] _
\b\[oa]
1741 . char \[~a] _
\b\[~a]
1742 . char \[ae] _
\b\[ae]
1743 . char \[`e] _
\b\[`e]
1744 . char \[^e] _
\b\[^e]
1745 . char \['e] _
\b\['e]
1746 . char \[:e] _
\b\[:e]
1747 . char \[`i] _
\b\[`i]
1748 . char \[^i] _
\b\[^i]
1749 . char \['i] _
\b\['i]
1750 . char \[:i] _
\b\[:i]
1751 . char \[`o] _
\b\[`o]
1752 . char \[^o] _
\b\[^o]
1753 . char \['o] _
\b\['o]
1754 . char \[:o] _
\b\[:o]
1755 . char \[~o] _
\b\[~o]
1756 . char \[/o] _
\b\[/o]
1757 . char \[`u] _
\b\[`u]
1758 . char \[^u] _
\b\[^u]
1759 . char \['u] _
\b\['u]
1760 . char \[:u] _
\b\[:u]
1761 . char \[,c] _
\b\[,c]
1762 . char \[Sd] _
\b\[Sd]
1763 . char \[~n] _
\b\[~n]
1764 . char \[Tp] _
\b\[Tp]
1765 . char \['y] _
\b\['y]
1766 . char \[:y] _
\b\[:y]
1767 . char \[ss] _
\b\[ss]
1783 \c\R'#UNDERLINE_ON 0'
1784 . 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 \
1785 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 \
1786 \[`A] \[^A] \['A] \[:A] \[oA] \[~A] \[AE] \[`E] \[^E] \['E] \[:E] \
1787 \[`I] \[^I] \['I] \[:I] \[`O] \[^O] \['O] \[:O] \[~O] \[/O] \[`U] \
1788 \[^U] \['U] \[:U] \[,C] \[-D] \[~N] \[TP] \['Y] \[:Y] \
1789 \[`a] \[^a] \['a] \[:a] \[oa] \[~a] \[ae] \[`e] \[^e] \['e] \[:e] \[`i] \
1790 \[^i] \['i] \[:i] \[`o] \[^o] \['o] \[:o] \[~o] \[/o] \[`u] \[^u] \['u] \
1791 \[:u] \[,c] \[Sd] \[~n] \[Tp] \['y] \[:y] \[ss] \
1792 ' 1 2 3 4 5 6 7 8 9 0
1799 \# [points below baseline] "text"
1801 \# Places an underscore 2 points under the string if no lead given,
1802 \# otherwise places underscore under string by user specified amount.
1804 \# When using this macro, the string to be underscored must begin
1805 \# with double-quotes ("), regardless of whether it's the sole
1806 \# argument or the second.
1808 \# .UNDERSCORE "Text to be underscored
1810 \# .UNDERSCORE 2p "Text to be underscored
1812 \# All text is underscored (including punctuation and spaces).
1813 \# This is the primary difference between UNDERLINE and UNDERSCORE,
1814 \# aside from the fact the UNDERLINE only works with Courier.
1816 \# UNDERSCORE does not work across line breaks. Each line of
1817 \# text must be entered separately with UNDERSCORE. If the
1818 \# UNDERSCORE begins in the middle of a line and crosses over a
1819 \# break, the portion before the break must be entered in its own
1820 \# UNDERSCORE, as must the portion that comes after the break.
1823 . nr #RESTORE_PT_SIZE \\n[#PT_SIZE]
1824 . ie \\n[#NUM_ARGS]=1 \{ \\$1\\s(12\\v'+2p'\\l'|0'\\v'-2p'\\s[\\n[#RESTORE_PT_SIZE]u] \}
1825 . el \{ \\$2\\s(12\\v'+(\\$1)'\\l'|0'\\v'-(\\$1)'\\s[\\n[#RESTORE_PT_SIZE]u] \}
1826 . rr #RESTORE_PT_SIZE
1830 \# DOUBLE UNDERSCORE
1831 \# -----------------
1833 \# [points below baseline] [points distance between rules] "text"
1835 \# Same as UNDERSCORE, except it produces a double underscore. The default
1836 \# distance between the rules is 2 points.
1838 \# The same double-quote requirement as UNDERSCORE.
1840 .MAC UNDERSCORE2 END
1841 . nr #RESTORE_PT_SIZE \\n[#PT_SIZE]
1842 . if \\n[#NUM_ARGS]=1 \{\
1843 . PRINT \\$1\\s(12\\v'+2p'\\l'|0'\\v'+2p'\\l'|0'\\v'-4p'\\s[\\n[#RESTORE_PT_SIZE]u]
1845 . if \\n[#NUM_ARGS]=2 \{\
1846 . PRINT \\$2\\s(12\\v'+\\$1'\\l'|0'\\v'+2p'\\l'|0'\\v'-(2p+\\$1)'\\s[\\n[#RESTORE_PT_SIZE]u]
1848 . if \\n[#NUM_ARGS]=3 \{\
1849 . PRINT \\$3\\s(12\\v'+\\$1'\\l'|0'\\v'+\\$2'\\l'|0'\\v'-(\\$2+\\$1)'\\s[\\n[#RESTORE_PT_SIZE]u]
1851 . rr #RESTORE_PT_SIZE
1855 \# SUPERSCRIPT INLINES
1856 \# -------------------
1858 \# Prints everything after invocation as superscript.
1860 \# \*[SUP] and \*[SUPX] turn superscript on and off respectively.
1861 \# If running type is pseudo-condensed/expanded, invoke the superscript
1862 \# strings as \*[CONDSUP] or \*[EXTSUP] and turn off with \*[CONDSUPX]
1863 \# and \*[EXTSUPX] respectively.
1866 \R'#PT_SIZE_IN_UNITS \En[.ps]'\
1867 \R'#SUP_PT_SIZE \En[#PT_SIZE_IN_UNITS]u*6u/10u'\
1868 \s[\En[#PT_SIZE_IN_UNITS]u]\v'-.3m'\s[\En[#SUP_PT_SIZE]u]
1870 .ds SUPX \s[\En[#PT_SIZE_IN_UNITS]u]\v'.3m'
1873 \R'#PT_SIZE_IN_UNITS \En[.ps]'\
1874 \R'#SUP_PT_SIZE \En[#PT_SIZE_IN_UNITS]u*6u/10u'\
1875 \s[\En[#PT_SIZE_IN_UNITS]u]\v'-.3m'\s[\En[#SUP_PT_SIZE]u]\E*[COND_FOR_SUP]
1877 .ds CONDSUPX \s[\En[#PT_SIZE_IN_UNITS]u]\v'.3m'\E*[COND]
1880 \R'#PT_SIZE_IN_UNITS \En[.ps]'\
1881 \R'#SUP_PT_SIZE \En[#PT_SIZE_IN_UNITS]u*6u/10u'\
1882 \s[\En[#PT_SIZE_IN_UNITS]u]\v'-.3m'\s[\En[#SUP_PT_SIZE]u]\E*[EXT_FOR_SUP]
1884 .ds EXTSUPX \s[\En[#PT_SIZE_IN_UNITS]u]\v'.3m'\E*[EXT]
1893 \# <number of degrees> | RESET
1895 \# Modifies register #DEGREES for use with \*[SLANT], or resets
1896 \# it to the default. Defines string \*[SLANTX]
1898 \# \*[SLANT] permits pseudo-italicizing of a font in cases where
1899 \# no italic font exists in a particular family.
1901 \# Default # of degrees is 15.
1903 \# Do not use unit of measure with arg to SETSLANT.
1905 \# It may be necessary to adjust the spacing on either side of
1906 \# [SLANT] and [SLANTX].
1908 \# In docs, SLANT carries over from para to para.
1911 .ds SLANT \ER'#SLANT_ON 1'\ES'\En[#DEGREES]'
1912 .ds SLANTX \ER'#SLANT_ON 0'\ES'0'
1915 . ie '\\$1'RESET' \{\
1917 . if \\n[#PRINT_STYLE]=1 \{\
1918 . if \\n[#UNDERLINE_SLANT] \{ .return \}
1920 . ds SLANT \ER'#SLANT_ON 1'\ES'\En[#DEGREES]'
1924 . if \\n[#PRINT_STYLE]=1 \{\
1925 . if \\n[#UNDERLINE_SLANT] \{ .return \}
1927 . ds SLANT \ER'#SLANT_ON 1'\ES'\En[#DEGREES]'
1929 . ds SLANTX \ER'#SLANT_ON 0'\ES'0'
1939 \# <amount of emboldening> | RESET
1941 \# Modifies register #BOLDER_UNITS for use with \*[BOLDER], or resets
1942 \# it to the default 700 units.
1944 \# \*[BOLDER] allows pseudo-emboldening of a font where no bold
1945 \# font exists in a particular family.
1947 \# Default for SETBOLDER is 700 units. Do not use unit of measure
1948 \# with arg to SETBOLDER.
1950 .nr #BOLDER_UNITS 700
1953 . if \\n[#IGNORE]=1 \{ .return \}
1954 . ie '\\$1'RESET' \{ .nr #BOLDER_UNITS 700 \}
1955 . el \{ .nr #BOLDER_UNITS \\$1 \}
1961 .bd \\n(.f \\n[#BOLDER_UNITS]
1970 \# +++CONDENSE/EXTEND+++
1975 \# <percentage to condense/expand type size>
1977 \# Stores current point size in z's in #PT_SIZE_IN_UNITS, figures out
1978 \# new point size (for character width) from arg, and defines string
1979 \# COND or EXT, which set the type size to the new character width,
1980 \# and sets the height of type to the value stored in CURRENT_PT_SIZE
1982 \# CONDENSE_OR_EXTEND is invoked from the aliases
1983 \# CONDENSE and EXTEND. CONDENSE implies <100, EXTEND
1984 \# implies >100. Do not use a percent sign in the argument.
1986 \# There is no default setting for CONDENSE or EXTEND.
1987 \# 80 is a good approximation of condensed type, 120 is okay
1990 \# The value set by CONDENSE or EXTEND applies to all
1991 \# subsequent \*[COND] or \*[EXT] escapes until a new value is set.
1993 \# \*[COND] or \*[EXT] must be turned off before all changes of point
1994 \# size and reinvoked afterwards (if so desired). This refers to
1995 \# changes of point size via control lines AND with via inlines.
1997 .MAC CONDENSE_OR_EXTEND END
1998 . if '\\$0'CONDENSE' \{\
1999 . ds $COND_PERCENT \\$1
2000 . if \\n[#PRINT_STYLE]=1 \{\
2002 . ds $COND_PERCENT 100
2005 \R'#PT_SIZE_IN_UNITS \En[.ps]'\
2007 \R'#COND_WIDTH (\En[#PT_SIZE_IN_UNITS]u*\E*[$COND_PERCENT]u)/100'\
2008 \Es[\En[#COND_WIDTH]u]\EH'\En[#PT_SIZE_IN_UNITS]u'
2010 \R'#COND_WIDTH (\En[#SUP_PT_SIZE]u*\E*[$COND_PERCENT]u)/100'\
2011 \Es[\En[#COND_WIDTH]u]\H'\En[#SUP_PT_SIZE]u'
2013 . if '\\$0'EXTEND' \{\
2014 . ds $EXT_PERCENT \\$1
2015 . if \\n[#PRINT_STYLE]=1 \{\
2017 . ds $EXT_PERCENT 100
2020 \R'#PT_SIZE_IN_UNITS \En[.ps]'\
2022 \R'#EXT_WIDTH (\En[#PT_SIZE_IN_UNITS]u*\E*[$EXT_PERCENT]u)/100'\
2023 \Es[\En[#EXT_WIDTH]u]\EH'\En[#PT_SIZE_IN_UNITS]u'
2025 \R'#EXT_WIDTH (\En[#SUP_PT_SIZE]u*\E*[$EXT_PERCENT]u)/100'\
2026 \Es[\En[#EXT_WIDTH]u]\H'\En[#EXT_PT_SIZE]u'
2030 .ds CONDX \ER'#CONDENSE 0'\Es0\R'#PT_SIZE_IN_UNITS \En[.ps]'\H'\En[#PT_SIZE_IN_UNITS]u'
2031 .ds EXTX \ER'#EXTEND 0'\Es0\R'#PT_SIZE_IN_UNITS \En[.ps]'\H'\En[#PT_SIZE_IN_UNITS]u'
2034 \# +++PAD LINES+++ (insert space)
2039 \# <character to use for marking pad points>
2041 \# Defines string $PAD_MARKER, used in PAD
2043 \# $PAD_MARKER is normally # (the pound sign).
2046 . ds $PAD_MARKER \\$1
2053 \# "<string of text with padding markers inserted>"
2055 \# Defines and redefines padding character (default=pound sign
2056 \# unless padding character has been set with PAD_MARKER)
2057 \# several times so that when the string is output at the end
2058 \# of the macro, every # has been converted to an equal-sized
2059 \# amount of padding (blank space) on a line. # is equivalent to
2060 \# CompuGraphic's old <IS>.
2062 \# String tabs may be marked off during PAD.
2065 . if \\n(.u=1 \{ .nr #FILL_MODE 1 \}
2067 . if !d$PAD_MARKER \{ .ds $PAD_MARKER # \}
2068 . char \\*[$PAD_MARKER] \R'#PAD_COUNT \En[#PAD_COUNT]+1'
2069 . ds $FAMILY_FOR_PAD \\n[.fam]
2070 . nr #FONT_FOR_PAD \\n(.f
2071 . nr #SIZE_FOR_PAD \\n[.ps]
2072 . ds $PAD_STRING \\$1
2073 . as $PAD_STRING \Ekp
2075 . fam \\*[$FAMILY_FOR_PAD]
2076 \\f\\n[#FONT_FOR_PAD]\\s[\\n[#SIZE_FOR_PAD]u]\\*[$PAD_STRING]
2079 . char \\*[$PAD_MARKER] \R'#SPACE_TO_END \En(.l-\Enp'\R'#PAD_SPACE \En[#SPACE_TO_END]/\En[#PAD_COUNT]'
2081 . fam \\*[$FAMILY_FOR_PAD]
2082 \\f\\n[#FONT_FOR_PAD]\\s[\\n[#SIZE_FOR_PAD]u]\\*[$PAD_STRING]
2085 . char \\*[$PAD_MARKER] \h'\En[#PAD_SPACE]u'
2086 . ie \\n[#SILENT] \{\
2088 . fam \\*[$FAMILY_FOR_PAD]
2089 \\f\\n[#FONT_FOR_PAD]\\s[\\n[#SIZE_FOR_PAD]u]\\*[$PAD_STRING]
2094 . fam \\*[$FAMILY_FOR_PAD]
2095 \\f\\n[#FONT_FOR_PAD]\\s[\\n[#SIZE_FOR_PAD]u]\\*[$PAD_STRING]
2098 . if \\n[#FILL_MODE]=1 \{\
2113 \# The leader mechanism is primitive, but it works. Basically,
2114 \# every macro in this set that includes a line length also sets
2115 \# a single groff tab stop at the right hand end of the line.
2116 \# That way, whenever Ctrl-A is invoked (always at the end of
2117 \# an input line), leader of the correct length gets deposited.
2118 \# Ctrl-A is accessed by the string LEADER (i.e. inline, as
2119 \# \*[LEADER]). Leaders within tabs get their length from the
2122 \# SET LEADER CHARACTER
2123 \# --------------------
2125 \# <character to use whenever \*[LEADER] is invoked>
2127 \# Set leader character.
2129 .MAC LEADER_CHARACTER END
2140 \# <family of drop cap>
2142 \# Creates or modifies string $DC_FAM.
2144 .MAC DROPCAP_FAMILY END
2152 \# <font of drop cap>
2154 \# Creates or modifies string $DC_FT.
2156 .MAC DROPCAP_FONT END
2164 \# <width of gutter between drop cap and indented text>
2166 \# Creates or modifies register #DC_GUT.
2168 \# Requires unit of measure. Default is 3p.
2170 .MAC DROPCAP_GUTTER END
2178 \# <+|- # of points to in/decrease point size of drop cap letter>
2180 \# Creates or modifies string $DC_ADJUST.
2182 \# Despite its best efforts, DROPCAP doesn't always get the point
2183 \# size of the drop cap critically perfect. DROPCAP_ADJUST lets
2184 \# the user add or subtract points (or fractions of points) to
2185 \# get the size right.
2187 \# Requires the + or - sign.
2189 .MAC DROPCAP_ADJUST END
2190 . ds $DC_ADJUST \\$1
2197 \# <dropcap letter> <# of lines> [COND <% to condense> | EXT <% to extend>]
2199 \# Calculates point size of dropcap based on # of lines passed as
2200 \# arg 2. Sets indent for text based on dropcap width+gutter.
2201 \# Advances and prints dropcap; reverses and prints indented text
2202 \# to bottom of dropcap, then resets indent to left margin (plus
2203 \# any indent that was in effect prior to invoking DROPCAP).
2205 \# Drop caps put a strain on on resource-challenged systems.
2207 \# Drop caps when using the doc processing macro PP only work with
2208 \# initial paragraphs (i.e. at doc start, or after heads), only when
2209 \# DROPCAPS comes immediately after PP, and only when the PRINTSTYLE
2210 \# is TYPESET. If these conditions aren't met, DROPCAPS is silently
2213 \# The COND or EXT argument are processed separately from all
2214 \# other COND or EXT inlines or macros, hence passing COND or
2215 \# EXT has no effect on running type.
2218 . if #IGNORE \{ .return \}
2221 . if \\n[#PRINT_STYLE]=1 \{ .return \}
2222 . if \\n[#PRINT_STYLE]=2 \{\
2223 . if \\n[#PP_STYLE]=2 \{ .return \}
2224 . if \\n[#PP]>1 \{ .return \}
2229 . nr #DC_LINES \\$2-1
2230 . ds $RESTORE_COND \\*[$COND_PERCENT]
2231 . ds $RESTORE_EXT \\*[$EXT_PERCENT]
2232 . if '\\$3'COND' \{ .CONDENSE \\$4 \}
2233 . if '\\$3'EXT' \{ .EXTEND \\$4 \}
2234 . if !r#DC_GUT \{ .nr #DC_GUT (3p) \}
2235 . ds $RESTORE_FAM \\n[.fam]
2236 . nr #RESTORE_FT \\n(.f
2237 . nr #RESTORE_PT_SIZE \\n[#PT_SIZE]
2238 . nr #RESTORE_INDENT \\n(.i
2240 . nr #DC_HEIGHT \\n[#DC_LINES]*\\n[#LEAD]+\\n[#CAP_HEIGHT]
2241 . ie !d$DC_FAM \{ .FAM \\n[.fam] \}
2242 . el \{ .FAM \\*[$DC_FAM] \}
2243 . ie !d$DC_FT \{ .FT \\n(.f \}
2244 . el \{ .FT \\*[$DC_FT] \}
2245 . while \\n[#GET_DC_HEIGHT]<\\n[#DC_HEIGHT] \{\
2246 . ps \\n[#PT_SIZE]u+100u
2248 . nr #GET_DC_HEIGHT \\n[#CAP_HEIGHT]
2250 . if d$DC_ADJUST \{ .ps \\*[$DC_ADJUST]p \}
2252 . sp \\n[#DC_LINES]v
2253 . ie '\\$3'COND' \{ .PRINT \\*[COND]\\*[$DROPCAP]\\*[CONDX] \}
2254 . el \{ .PRINT \\*[$DROPCAP] \}
2255 . if '\\$3'COND' \{ \E*[COND] \}
2256 . if '\\$3'EXT' \{ \E*[EXT] \}
2257 . ie \\n(.i \{ .in +\w'\\*[$DROPCAP]'u+\\n[#DC_GUT]u \}
2258 . el \{ .in \w'\\*[$DROPCAP]'u+\\n[#DC_GUT]u \}
2259 . if '\\$3'COND' \{ \E*[CONDX]\c \}
2260 . if '\\$3'EXT' \{ \E*[EXTX]\c \}
2262 . FAM \\*[$RESTORE_FAM]
2263 . FT \\n[#RESTORE_FT]
2264 . ps \\n[#RESTORE_PT_SIZE]u
2265 . CONDENSE \\*[$RESTORE_COND]
2266 . EXTEND \\*[$RESTORE_EXT]
2267 . ie \\n(.u \{ .wh \\n(.du+\\n[#DC_HEIGHT]u-1v DROPCAP_OFF \}
2268 . el \{ .wh \\n(.du+\\n[#DC_HEIGHT]u DROPCAP_OFF \}
2275 . rr #RESTORE_PT_SIZE
2276 . rr #RESTORE_INDENT
2282 .MAC DROPCAP_OFF END
2283 ' in \\n[#RESTORE_INDENT]u
2292 \# Draws a rule the length of the current measure.
2297 . ds $CURRENT_QUAD \\*[$QUAD_VALUE]
2300 . ie \\n[#INDENT_ACTIVE] \{\
2301 . nr #RESTORE_L_LENGTH \\n(.l
2302 . if \\n[#INDENT_BOTH_ACTIVE] \{ .ll \\n(.lu-\\n[#BL_INDENT]u \}
2303 . if \\n[#INDENT_LEFT_ACTIVE] \{ .ll \\n(.lu-\\n[#L_INDENT]u \}
2304 . PRINT \El'\En(.lu'
2305 . ll \\n[#RESTORE_L_LENGTH]u
2306 . rr #RESTORE_L_LENGTH]u
2309 . PRINT \El'\En(.lu'
2311 . QUAD \\*[$CURRENT_QUAD]
2316 \# =====================================================================
2318 \# +++WORD AND SENTENCE SPACING+++
2320 \# WORD SPACE CONTROL
2321 \# ------------------
2323 \# <+|->wordspace | DEFAULT
2325 \# Increases or decreases interword space by user supplied amount.
2326 \# If DEFAULT, value is set to 12 (groff default).
2328 \# $WS_CONSTANT is the groff default word space.
2329 \# $WS_VAR is the user supplied amount by which to in/decrease word space.
2330 \# $WS is a concatenation of WS_CONSTANT and WS_VAR.
2332 \# Because the user supplied value requires a literal + or - sign,
2333 \# the macro argument is stored in a string.
2335 \# \n[.sss] holds the current sentence space value.
2338 . ds $WS_CONSTANT 12
2340 . ie '\\$1'DEFAULT' \{ .ds $WS_VAR +0 \}
2341 . el \{ .ds $WS (\\*[$WS_CONSTANT]\\*[$WS_VAR]) \}
2342 . ie \\n[.sss]=12 \{ .ss \\*[$WS] 12 \}
2344 . ss \\*[$WS] (\\*[$WS]\\*[$SS_VAR])
2350 \# SENTENCE SPACE CONTROL
2351 \# ----------------------
2353 \# <+-sentencespace> | 0 | DEFAULT
2355 \# Increases or decreases sentence space by user supplied amount.
2356 \# If 0, sentence spaces are ignored. If DEFAULT, value is
2357 \# set to 12 (groff default).
2359 \# Because the user supplied value requires a literal + or - sign,
2360 \# the macro argument is stored in a string.
2362 \# Sentence space applies only to input where sentences are separated
2363 \# by two spaces (and/or, in fill mode [FLUSH L|R|C or JUSTIFY], an EOL).
2364 \# Changing .SS when sentences are separated by only one space has
2365 \# no effect on the space between sentences.
2367 \# \n[.ss] holds the current wordspace value.
2368 \# \n[.sss] holds the current sentence space value.
2371 . ie '\\$1'0' \{ .ss \\n[.ss] (\\n[.ss]-\\n[.ss]) \}
2373 . ie '\\$1'DEFAULT' \{ .ss \\n[.ss] \}
2376 . ss \\n[.ss] (0\\*[$SS_VAR])
2382 \# =====================================================================
2386 \# There are five styles of indents: left, right, both, temporary,
2387 \# and hanging. Each is set/invoked with a different macro.
2388 \# Indent macros begin with the letter "I", hence .IL means "indent left,"
2389 \# .IR means "indent right," and so on.
2391 \# The first time any of the indent macros is used, it requires an
2392 \# argument--the size of the indent in ipPcm. The size may also
2393 \# be entered using the \w'#' function--very useful for numbered
2394 \# lists using HI). The unit of measure is required. Subsequent
2395 \# invocations don't require the argument; the indent measure remains the
2396 \# same until it's changed by invoking the macro with an argument again.
2398 \# If no indents are in effect, the arguments passed to indent macros are
2399 \# measured from the left and right margins of the page. If a left indent
2400 \# or a right indent is already in effect, the arguments passed to
2401 \# the indent macros are calculated from the current values; in other words,
2402 \# the arguments are additive. If you quit an indent and later return
2403 \# to it, its value will be the value last in effect, unless you pass
2404 \# it an argument. If you do pass an argument, it is added to the last
2405 \# value in effect, unless you cleared the indent with one of
2420 \# The first .IL 2P indents text 2P from the left margin. The second
2421 \# .IL 2P indents text by an additional 2P, i.e. 4P from the left margin.
2422 \# .IQ turns the indent off. The last .IL (which has no argument)
2423 \# takes its value from the total of all arguments passed to .IL (in
2424 \# this case, 2P and 2P), therefore it indents 2P+2P from the left
2425 \# margin, i.e. 4P. If you wanted the last .IL to indent just 2P,
2426 \# you'd either have to reset the .IL prior to .IQ (.IL -2P), or pass
2427 \# the last .IL the argument 2P.
2429 \# To reverse the sense of an indent added to an indent, you may use
2432 \# Indents can be turned off individually with ILX, IRX, and IBX.
2433 \# LEFT and RIGHT indents may be combined and manipulated
2434 \# separately, (e.g. you can have an IL of 2P and an IR of 4P
2435 \# operative at the same time, and then change, say, the IL to
2436 \# 4P--thereby left indenting 6P--while the IR remains at 4P.
2438 \# IB automatically turns off IL and IR. They have to be reinvoked
2439 \# again when needed. IL and IR automatically turn IB off; it, too,
2440 \# has to be reinvoked with needed.
2442 \# All indents can be turned off at once with IQ. The ILX, IRX, IBX,
2443 \# and IQ macros simply turn the indents off; the values stored in
2444 \# the respective indent macros (IL, IR, IB) remain in effect. If
2445 \# the user wishes to clear the values, the I<LRB>X macros should be
2446 \# invoked with the single argument CLEAR. IQ CLEAR clears out
2447 \# the values stored for all indent styles.
2449 \# Indents *must* be turned off before settting string tabs
2450 \# inside PAD. Generally, in order not to get confused, it's a
2451 \# good idea to turn all indents off before setting any tabs.
2453 \# TI and HI are special cases. There's no need to turn them off,
2454 \# since they affect only one line--the first after their
2455 \# invocation. Like the other indent styles, the first time
2456 \# they're invoked, they require a value in iPpcm; each subsequent
2457 \# invocation without an argument will use the same value. To
2458 \# change the value, simply pass a new value. Values for TI and HI
2459 \# are *not* additive.
2461 \# HI presupposes that you already have a left or both indent
2462 \# on. HI will never hang a line outside the left margin of a
2463 \# document. In other words, you must have IL or IB on before you
2470 . if \\n[#INDENT_STYLE_BOTH] \{ .IBX \}
2471 . nr #INDENT_STYLE_LEFT 1
2472 . nr #INDENT_ACTIVE 1
2473 . nr #INDENT_LEFT_ACTIVE 1
2476 . in \\n[#L_INDENT]u
2477 . ta \\n(.lu-\\n[#L_INDENT]u
2481 . nr #L_INDENT +(\\$1)
2482 . in \\n[#L_INDENT]u
2483 . ta \\n(.lu-\\n[#L_INDENT]u
2488 \# +++INDENT RIGHT+++
2491 . if \\n[#INDENT_STYLE_BOTH] \{ .IBX \}
2492 . nr #INDENT_STYLE_RIGHT 1
2493 . nr #INDENT_ACTIVE 1
2494 . nr #INDENT_RIGHT_ACTIVE 1
2497 . ie \\n[#TAB_ACTIVE] \{\
2498 . ll \\n(.lu-\\n[#R_INDENT]u
2499 . ta \\n(.lu-\\n[#L_INDENT]u
2502 . ll \\n[#L_LENGTH]u-\\n[#R_INDENT]u
2503 . ta \\n(.lu-\\n[#L_INDENT]u
2508 . nr #R_INDENT +(\\$1)
2509 . ie \\n[#TAB_ACTIVE] \{\
2510 . ll \\n(.lu-\\n[#R_INDENT]u
2511 . ta \\n(.lu-\\n[#L_INDENT]u
2514 . ll \\n[#L_LENGTH]u-\\n[#R_INDENT]u
2515 . ta \\n(.lu-\\n[#L_INDENT]u
2521 \# +++INDENT BOTH+++
2524 . if \\n[#INDENT_STYLE_LEFT] \{ .ILX \}
2525 . if \\n[#INDENT_STYLE_RIGHT] \{ .IRX \}
2526 . nr #INDENT_STYLE_BOTH 1
2527 . nr #INDENT_ACTIVE 1
2528 . nr #INDENT_BOTH_ACTIVE 1
2531 . in \\n[#BL_INDENT]u
2532 . ie \\n[#TAB_ACTIVE] \{\
2533 . ll \\n(.lu-\\n[#BR_INDENT]u
2534 . ta \\n(.lu-\\n[#BR_INDENT]u
2537 . ll \\n[#L_LENGTH]u-\\n[#BR_INDENT]u
2538 . ta \\n(.lu-\\n[#BR_INDENT]u
2543 . nr #BL_INDENT (\\n[#INDENT]+\\$1)
2544 . ie \\n[#NUM_ARGS]=2 \{ .nr #BR_INDENT +(\\$2) \}
2545 . el \{ .nr #BR_INDENT \\n[#BL_INDENT] \}
2546 . ie \\n[#TAB_ACTIVE] \{\
2547 . in \\n[#BL_INDENT]u
2548 . ll \\n(.lu-\\n[#BR_INDENT]u
2549 . ta \\n(.lu-\\n[#BL_INDENT]u
2552 . in \\n[#BL_INDENT]u
2553 . ll \\n[#L_LENGTH]u-\\n[#BR_INDENT]u
2554 . ta \\n(.lu-\\n[#BR_INDENT]u
2560 \# +++TEMPORARY INDENT+++
2565 . ti \\n[#T_INDENT]u
2566 . if \\n[#INDENT_LEFT_ACTIVE] \{\
2567 . ti \\n[#T_INDENT]u+\\n[#L_INDENT]u
2569 . if \\n[#INDENT_BOTH_ACTIVE] \{\
2570 . ti \\n[#T_INDENT]u+\\n[#BL_INDENT]u
2574 . nr #T_INDENT (\\$1)
2575 . ti \\n[#T_INDENT]u
2580 \# +++HANGING INDENT+++
2583 . ie '\\$1'' \{ .ti -\\n[#HL_INDENT]u \}
2585 . nr #HL_INDENT (\\$1)
2586 . ti -\\n[#HL_INDENT]u
2591 \# +++INDENTS OFF+++
2596 . rr #INDENT_LEFT_ACTIVE
2597 . if '\\$1'CLEAR' \{\
2599 . rr #INDENT_STYLE_LEFT
2606 . rr #INDENT_RIGHT_ACTIVE
2607 . ie \\n[#TAB_ACTIVE] \{ .TAB\\n[#CURRENT_TAB] \}
2609 . ie \\n[#COLUMNS] \{\
2610 . ll \\n[#COL_L_LENGTH]u
2614 . ll \\n[#L_LENGTH]u
2618 . if '\\$1'CLEAR' \{\
2620 . rr #INDENT_STYLE_RIGHT
2628 . rr #INDENT_BOTH_ACTIVE
2629 . ie \\n[#TAB_ACTIVE] \{ .TAB\\n[#CURRENT_TAB] \}
2631 . ie \\n[#COLUMNS] \{\
2632 . ll \\n[#COL_L_LENGTH]u
2636 . ll \\n[#L_LENGTH]u
2640 . if '\\$1'CLEAR' \{\
2643 . rr #INDENT_STYLE_BOTH
2650 . if !\\n[#IX_WARN] \{\
2651 . tm1 "[mom]: Use of .IX is now deprecated. Use .IQ instead.
2652 . tm1 " .IX will continue to behave as before, but to
2653 . tm1 " avoid this message, please update your document.
2659 . rr #INDENT_LEFT_ACTIVE
2660 . rr #INDENT_RIGHT_ACTIVE
2661 . rr #INDENT_BOTH_ACTIVE
2662 . if \\n[#INDENT_STYLE_RIGHT] \{\
2663 . ie \\n[#TAB_ACTIVE] \{ .TAB\\n[#CURRENT_TAB] \}
2665 . ie \\n[#COLUMNS] \{\
2666 . ll \\n[#COL_L_LENGTH]u
2670 . ll \\n[#L_LENGTH]u
2675 . if \\n[#INDENT_STYLE_BOTH] \{\
2676 . ie \\n[#TAB_ACTIVE] \{ .TAB\\n[#CURRENT_TAB] \}
2678 . ie \\n[#COLUMNS] \{\
2679 . ll \\n[#COL_L_LENGTH]u
2683 . ll \\n[#L_LENGTH]u
2688 . if '\\$1'CLEAR' \{\
2689 . if \\n[#INDENT_STYLE_RIGHT] \{\
2690 . ie \\n[#TAB_ACTIVE] \{ .TAB\\n[#CURRENT_TAB] \}
2692 . ie \\n[#COLUMNS] \{\
2693 . ll \\n[#COL_L_LENGTH]u
2697 . ll \\n[#L_LENGTH]u
2702 . if \\n[#INDENT_STYLE_BOTH] \{\
2703 . ie \\n[#TAB_ACTIVE] \{ .TAB\\n[#CURRENT_TAB] \}
2705 . ie \\n[#COLUMNS] \{\
2706 . ll \\n[#COL_L_LENGTH]u
2710 . ll \\n[#L_LENGTH]u
2721 . rr #INDENT_STYLE_LEFT
2722 . rr #INDENT_STYLE_RIGHT
2723 . rr #INDENT_STYLE_BOTH
2728 \# =====================================================================
2730 \# +++MULTIPLE COLUMNS+++
2732 \# MULTIPLE COLUMNS ON
2733 \# -------------------
2737 \# Marks the top of a column set
2743 \# MULTIPLE COLUMN RETURN
2744 \# ----------------------
2748 \# Returns to the top of a column set
2754 \# MULTIPLE COLUMNS OFF
2755 \# --------------------
2757 \# <none> | <lead to advance beneath bottom of deepest column>
2759 \# Advances to the end of a column set
2761 \# With no argument, advances to the next baseline (at the current
2762 \# leading value) beneath the longest column. With an argument
2763 \# (which requires a unit of measure), advances arg distance
2764 \# beneath the baseline of the deepest column. If the argument
2765 \# is zero, advances to the baseline of the deepest column.
2773 . nr #MCX_ALD (\\$1)
2775 . ie \\n[#MCX_ALD]=0 \{ .sp |\\n(.hu-1v \}
2776 . el \{ .sp |\\n(.hu+\\n[#MCX_ALD]u \}
2777 . rr #MCX_ALD (\\$1)
2781 \# =====================================================================
2783 \# +++TYPESETTING SUPPORT MACROS+++
2790 \# Enables/disables traps.
2792 \# EL and TN don't function as advertised on the last line before
2793 \# a trap (when they break the preceding line, they spring the
2794 \# trap, and groff won't back up to the line preceding the trap).
2795 \# TRAP is a kludge to get EL and TN work properly on last lines.
2796 \# The user simply enloses the offending lines in TRAP OFF/TRAP.
2799 . ie '\\$1'' \{ .vpt 1 \}
2807 \# <none> | <anything>
2809 \# Diverts text so that it doesn't print, or turns the function off.
2811 \# Useful for setting up autotabs where you don't want the line with
2812 \# the tab marks to print.
2814 \# Also aliased as COMMENT, in case user wants to input a batch of
2815 \# text that doesn't print.
2819 . if \\n[#QUAD] \{ .br \}
2820 . ie '\\$1'' \{ .di NO_FLASH \}
2835 \# Prints anything. A macro that helps keep my code nicely indented.
2845 \# <none> | <anything>
2847 \# Converts text to caps, or, if OFF, reverts to normal caps/lc.
2851 . tr aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ
2886 . tr aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz
2927 \# Gets cap-height, x-height, and descender depth of the
2928 \# current font at the current point size.
2930 \# The routine is diverted so it remains invisible to output.
2934 E\\R'#CAP_HEIGHT \\n[.cht]'
2935 e\\R'#X_HEIGHT \\n[.cht]'
2936 y\\R'#DESCENDER \\n[.cdp]'
2941 \# =====================================================================
2943 \# +++TYPESETTING ALIASES+++
2945 .ALIAS CENTRE CENTER
2946 .ALIAS COMMENT SILENT
2947 .ALIAS CONDENSE CONDENSE_OR_EXTEND
2948 .ALIAS EXTEND CONDENSE_OR_EXTEND
2951 .ALIAS HYPHENATION HY
2953 .ALIAS LIG LIGATURES
2958 .ALIAS PADMARKER PAD_MARKER
2959 .ALIAS TABSET TAB_SET
2961 .ALIAS UNDERSCORE_2 UNDERSCORE2
2964 \# ====================================================================
2966 \# DOCUMENT PROCESSING MACROS, STRINGS AND ALIASES
2967 \# ===============================================
2969 \# +++PAGE DIMENSIONS+++
2974 \# LETTER | LEGAL | STATEMENT | TABLOID | LEDGER | FOLIO | QUARTO | 10x14 | EXECUTIVE | A3 | A4 | A5 | B4 | B5
2976 \# Sets up margins for different paper sizes.
2980 . if '\\*[$PAPER]'LETTER' \{\
2984 . if '\\*[$PAPER]'LEGAL' \{\
2988 . if '\\*[$PAPER]'STATEMENT' \{\
2992 . if '\\*[$PAPER]'TABLOID' \{\
2996 . if '\\*[$PAPER]'LEDGER' \{\
3000 . if '\\*[$PAPER]'FOLIO' \{\
3004 . if '\\*[$PAPER]'QUARTO' \{\
3008 . if '\\*[$PAPER]'10x14' \{\
3012 . if '\\*[$PAPER]'EXECUTIVE' \{\
3016 . if '\\*[$PAPER]'A3' \{\
3020 . if '\\*[$PAPER]'A4' \{\
3024 . if '\\*[$PAPER]'A5' \{\
3028 . if '\\*[$PAPER]'B4' \{\
3032 . if '\\*[$PAPER]'B5' \{\
3036 . if !r#L_MARGIN \{ .L_MARGIN \\n(.o \}
3037 . if !r#R_MARGIN \{ .R_MARGIN 1i \}
3041 \# ====================================================================
3043 \# +++PRINTSTYLE -- TYPEWRITE OR TYPESET+++
3048 \# TYPESET | TYPEWRITE [SINGLESPACE]
3050 \# Sets type specs for typewriter-style or typeset output.
3052 \# Number registers: TYPEWRITE=1, TYPESET=2.
3055 . if !d$PAPER \{ .PAPER LETTER \}
3056 . if '\\$1'TYPEWRITE' \{\
3058 . if !\\n[#DOC_TYPE]=4 \{ .L_MARGIN 6P \}
3059 . if !\\n[#DOC_TYPE]=4 \{ .R_MARGIN 6P \}
3063 . ie '\\$2'SINGLESPACE' \{\
3064 . nr #SINGLE_SPACE 1
3071 . if !\\n[#PP_INDENT] \{\
3072 . in 3P \"Set indent
3073 . nr #PP_INDENT \\n(.i \"Read into #PP_INDENT
3074 . in 0 \"Remove indent
3077 . nr #BOLDER_UNITS 0
3087 . nr #IGNORE_COLUMNS 1
3090 . if '\\$1'TYPESET' \{\
3092 . if !\\n[#DOC_TYPE]=4 \{ .L_MARGIN 6P \}
3093 . if !\\n[#DOC_TYPE]=4 \{ .R_MARGIN 6P \}
3096 . if !\\n[#DOC_TYPE]=4 \{ .PT_SIZE 12.5 \}
3097 . if !\\n[#DOC_TYPE]=4 \{ .LS 16 \}
3105 . if !\\n[#PP_INDENT] \{\
3106 . in 2m \"Set indent
3107 . nr #PP_INDENT \\n(.i \"Read into #PP_INDENT
3108 . in 0 \"Remove indent
3111 . rr #IGNORE_COLUMNS
3116 \# Macros to control behaviour of PRINTSTYLE TYPEWRITE
3118 \# ITALIC MEANS ITALIC
3119 \# -------------------
3123 \# Instructs TYPEWRITE to treat italics as italics, whether
3124 \# invoked via control lines or inline.
3126 \# ITALIC_MEANS_ITALIC and UNDERLINE_ITALIC are mututally exclusive,
3127 \# hence invoking the one automatically turns off the other.
3129 .MAC ITALIC_MEANS_ITALIC END
3130 . if \\n[#PRINT_STYLE]=1 \{\
3131 . nr #ITALIC_MEANS_ITALIC 1
3132 . rr #UNDERLINE_ITALIC
3148 \# Instructs TYPEWRITE to underline italics, whether invoked
3149 \# via control lines or inline.
3151 \# UNDERLINE_ITALIC and ITALIC_MEANS_ITALIC are mututally exclusive,
3152 \# hence invoking the one automatically turns off the other.
3154 \# UNDERLINE_ITALIC is the default for TYPEWRITE.
3156 .MAC UNDERLINE_ITALIC END
3157 . if \\n[#PRINT_STYLE]=1 \{\
3158 . nr #UNDERLINE_ITALIC 1
3159 . rr #ITALIC_MEANS_ITALIC
3173 \# <none> | <anything>
3175 \# Instructs TYPEWRITE to underline occurences of \*[SLANT], or
3176 \# turns feature off.
3178 \# Users may want \*[SLANT] to mean slant in TYPEWRITE, although
3179 \# most of the time, \*[SLANT] most likely means the user wanted
3180 \# italic but didn't have it, ergo the need to tell TYPEWRITE to
3181 \# treat \*[SLANT] as italic (i.e. underlined).
3183 \# UNDERLINE_SLANT and SLANT_MEANS_SLANT are mututally exclusive,
3184 \# hence invoking the one automatically turns off the other.
3186 \# UNDERLINE_SLANT is the default for TYPEWRITE.
3188 .MAC UNDERLINE_SLANT END
3189 . if \\n[#PRINT_STYLE]=1 \{\
3190 . rr #SLANT_MEANS_SLANT
3191 . nr #UNDERLINE_SLANT 1
3194 . ds SLANT \ER'#SLANT_ON 1'\E*[UL]
3195 . ds SLANTX \ER'#SLANT_ON 0'\E*[ULX]
3200 .MAC SLANT_MEANS_SLANT END
3201 . if \\n[#PRINT_STYLE]=1 \{\
3202 . rr #UNDERLINE_SLANT
3203 . nr #SLANT_MEANS_SLANT 1
3206 . ds SLANT \ER'#SLANT_ON 1'\ES'\En[#DEGREES]'
3207 . ds SLANTX \ER'#SLANT_ON 0'\ES'0'
3212 .MAC IGNORE_COLUMNS END
3213 . if \\n[#PRINT_STYLE]=1 \{ .nr #NO_COLUMNS 1 \}
3217 \# ====================================================================
3219 \# +++COPY STYLE -- DRAFT OR FINAL+++
3226 \# Sets registers that are used to determine what to put
3227 \# in the default header, and how to number pages.
3229 \# DOCTYPE must come before COPYSTYLE.
3232 . ds $COPY_STYLE \\$1
3233 . if '\\*[$COPY_STYLE]'DRAFT' \{\
3235 . if !d$DRAFT \{ .DRAFT 1 \}
3237 . if '\\*[$COPY_STYLE]'FINAL' \{ .nr #COPY_STYLE 2 \}
3238 . if !d$CHAPTER_STRING \{ .CHAPTER_STRING "Chapter" \}
3239 . if !d$DRAFT_STRING \{ .DRAFT_STRING "Draft" \}
3240 . if !d$REVISION_STRING \{ .REVISION_STRING "Rev." \}
3242 . if \\n[#DOC_TYPE]=1 \{\
3243 . ie \\n[#COPY_STYLE]=1 \{\
3244 . ie \\n[#PAGENUM_STYLE_SET] \{ .PAGENUM_STYLE \\*[$PAGENUM_STYLE] \}
3245 . el \{ .PAGENUM_STYLE roman \}
3246 . if \\n[#USER_DEF_HDRFTR_CENTER]=0 \{\
3247 . ie \\n[#DRAFT_WITH_PAGENUM] \{\
3251 . ie '\\*[$REVISION]'' \{\
3252 . ds $HDRFTR_CENTER \
3253 \\*[$DRAFT_STRING]\\*[$DRAFT]
3256 . ds $HDRFTR_CENTER \
3257 \\*[$DRAFT_STRING]\\*[$DRAFT], \
3258 \\*[$REVISION_STRING] \\*[$REVISION]
3264 . ie \\n[#PAGENUM_STYLE_SET] \{ .PAGENUM_STYLE \\*[$PAGENUM_STYLE] \}
3265 . el \{ .PAGENUM_STYLE DIGIT \}
3266 . if \\n[#USER_DEF_HDRFTR_CENTER]=0 \{\
3268 . rr #USER_DEF_HDRFTR_CENTER
3273 . if \\n[#DOC_TYPE]=2 \{\
3275 . ie \\n[#COPY_STYLE]=1 \{\
3276 . ie \\n[#PAGENUM_STYLE_SET] \{ .PAGENUM_STYLE \\*[$PAGENUM_STYLE] \}
3277 . el \{ .PAGENUM_STYLE roman \}
3278 . if \\n[#USER_DEF_HDRFTR_CENTER]=0 \{\
3279 . ie \\n[#DRAFT_WITH_PAGENUM] \{\
3280 . ie '\\*[$CHAPTER]'' \{\
3281 . ie !'\\*[$CHAPTER_TITLE]'' \{\
3282 . ds $HDRFTR_CENTER \\*[$CHAPTER_TITLE]
3284 . el \{ .ds $HDRFTR_CENTER \\*[$CHAPTER_STRING] \}
3287 . ie !'\\*[$CHAPTER_TITLE]'' \{\
3288 . ds $HDRFTR_CENTER \\*[$CHAPTER_TITLE]
3290 . el \{ .ds $HDRFTR_CENTER \\*[$CHAPTER_STRING] \\*[$CHAPTER] \}
3294 . ie '\\*[$REVISION]'' \{\
3295 . ie '\\*[$CHAPTER]'' \{\
3296 . ie !'\\*[$CHAPTER_TITLE]'' \{\
3297 . ie '\\*[$DRAFT]'' \{\
3298 . ds $HDRFTR_CENTER \\*[$CHAPTER_TITLE]
3301 . ds $HDRFTR_CENTER \
3302 \\*[$CHAPTER_TITLE], \
3303 \\*[$DRAFT_STRING]\\*[$DRAFT]
3307 . ie '\\*[$DRAFT]'' \{\
3308 . ds $HDRFTR_CENTER \
3309 \\*[$CHAPTER_STRING]
3312 . ds $HDRFTR_CENTER \
3313 \\*[$CHAPTER_STRING], \
3314 \\*[$DRAFT_STRING]\\*[$DRAFT]
3319 . ie !'\\*[$CHAPTER_TITLE]'' \{\
3320 . ie '\\*[$DRAFT]'' \{\
3321 . ds $HDRFTR_CENTER \\*[$CHAPTER_TITLE]
3324 . ds $HDRFTR_CENTER \
3325 \\*[$CHAPTER_TITLE], \
3326 \\*[$DRAFT_STRING]\\*[$DRAFT]
3330 . ie '\\*[$DRAFT]'' \{\
3331 . ds $HDRFTR_CENTER \
3332 \\*[$CHAPTER_STRING] \\*[$CHAPTER]
3335 . ds $HDRFTR_CENTER \
3336 \\*[$CHAPTER_STRING] \\*[$CHAPTER], \
3337 \\*[$DRAFT_STRING]\\*[$DRAFT]
3343 . ie '\\*[$CHAPTER]'' \{\
3344 . ie !'\\*[$CHAPTER_TITLE]'' \{\
3345 . ie '\\*[$DRAFT]'' \{\
3346 . ds $HDRFTR_CENTER \
3347 \\*[$CHAPTER_TITLE], \
3348 \\*[$REVISION_STRING] \\*[$REVISION]
3351 . ds $HDRFTR_CENTER \
3352 \\*[$CHAPTER_TITLE], \
3353 \\*[$DRAFT_STRING]\\*[$DRAFT], \
3354 \\*[$REVISION_STRING] \\*[$REVISION]
3358 . ie '\\*[$DRAFT]'' \{\
3359 . ds $HDRFTR_CENTER \
3360 \\*[$CHAPTER_STRING], \
3361 \\*[$REVISION_STRING] \\*[$REVISION]
3364 . ds $HDRFTR_CENTER \
3365 \\*[$CHAPTER_STRING], \
3366 \\*[$DRAFT_STRING]\\*[$DRAFT], \
3367 \\*[$REVISION_STRING] \\*[$REVISION]
3372 . ie !'\\*[$CHAPTER_TITLE]'' \{\
3373 . ie '\\*[$DRAFT]'' \{\
3374 . ds $HDRFTR_CENTER \
3375 \\*[$CHAPTER_TITLE], \
3376 \\*[$REVISION_STRING] \\*[$REVISION]
3379 . ds $HDRFTR_CENTER \
3380 \\*[$CHAPTER_TITLE], \
3381 \\*[$DRAFT_STRING]\\*[$DRAFT], \
3382 \\*[$REVISION_STRING] \\*[$REVISION]
3386 . ie '\\*[$DRAFT]'' \{\
3387 . ds $HDRFTR_CENTER \
3388 \\*[$CHAPTER_STRING] \\*[$CHAPTER], \
3389 \\*[$REVISION_STRING] \\*[$REVISION]
3392 . ds $HDRFTR_CENTER \
3393 \\*[$CHAPTER_STRING] \\*[$CHAPTER], \
3394 \\*[$DRAFT_STRING]\\*[$DRAFT], \
3395 \\*[$REVISION_STRING] \\*[$REVISION]
3405 . if \\n[#USER_DEF_HDRFTR_CENTER]=0 \{\
3406 . ie \\n[#PAGENUM_STYLE_SET] \{ .PAGENUM_STYLE \\*[$PAGENUM_STYLE] \}
3407 . el \{ .PAGENUM_STYLE DIGIT \}
3408 . ie '\\*[$CHAPTER]'' \{\
3409 . ie !'\\*[$CHAPTER_TITLE]'' \{\
3410 . ds $HDRFTR_CENTER \\*[$CHAPTER_TITLE]
3413 . ds $HDRFTR_CENTER \\*[$CHAPTER_STRING]
3417 . ie !'\\*[$CHAPTER_TITLE]'' \{\
3418 . ds $HDRFTR_CENTER \\*[$CHAPTER_TITLE]
3421 . ds $HDRFTR_CENTER \\*[$CHAPTER_STRING] \\*[$CHAPTER]
3428 . if \\n[#DOC_TYPE]=3 \{\
3429 . ie \\n[#COPY_STYLE]=1 \{\
3430 . ie \\n[#PAGENUM_STYLE_SET] \{ .PAGENUM_STYLE \\*[$PAGENUM_STYLE] \}
3431 . el \{ .PAGENUM_STYLE roman \}
3432 . ie \\n[#DRAFT_WITH_PAGENUM] \{\
3433 . ds $HDRFTR_CENTER \\*[$DOC_TYPE]
3436 . if \\n[#USER_DEF_HDRFTR_CENTER]=0 \{\
3437 . ie '\\*[$REVISION]'' \{\
3438 . ie '\\*[$DRAFT]'' \{\
3439 . ds $HDRFTR_CENTER \\*[$DOC_TYPE]
3442 . ds $HDRFTR_CENTER \
3444 \\*[$DRAFT_STRING]\\*[$DRAFT]
3448 . ie '\\*[$DRAFT]'' \{\
3449 . ds $HDRFTR_CENTER \
3451 \\*[$REVISION_STRING] \\*[$REVISION]
3454 . ds $HDRFTR_CENTER \
3456 \\*[$DRAFT_STRING]\\*[$DRAFT], \
3457 \\*[$REVISION_STRING] \\*[$REVISION]
3464 . if \\n[#USER_DEF_HDRFTR_CENTER]=0 \{\
3465 . ie \\n[#PAGENUM_STYLE_SET] \{ .PAGENUM_STYLE \\*[$PAGENUM_STYLE] \}
3466 . el \{ .PAGENUM_STYLE DIGIT \}
3467 . ds $HDRFTR_CENTER \\*[$DOC_TYPE]
3473 \# ====================================================================
3475 \# +++COLLECT DOC INFO -- STRINGS AND NUMBER REGISTERS+++
3478 \# various string/register arguments
3480 \# Collect information about documents.
3484 . ds $DOC_TITLE \\$1
3487 .MAC TITLE END \"Document title
3492 .MAC SUBTITLE END \"Document sub-title
3497 .MAC CHAPTER END \"If document is a chapter, the chapter number
3502 .MAC CHAPTER_TITLE END \" This defines what comes after Chapter #
3503 . ds $CHAPTER_TITLE \\$1
3507 .MAC DRAFT END \"Draft number
3508 . ie '\\$1'' \{ .ds $DRAFT \}
3509 . el \{ .ds $DRAFT " \\$1\}
3513 .MAC REVISION END \"Revision number
3518 .MAC DRAFT_WITH_PAGENUMBER END \"Attach draft/revision strings to page number
3519 . nr #DRAFT_WITH_PAGENUM 1
3523 .MAC AUTHOR END \"Author. Enclose all args fully in double quotes.
3524 . nr #AUTHOR_NUM -1 1
3525 . while \\n[#NUM_ARGS]>\\n[#AUTHOR_NUM] \{\
3526 . ds $AUTHOR_\\n+[#AUTHOR_NUM] \\$\\n[#AUTHOR_NUM]
3528 . nr #NUM_AUTHORS \\n[#NUM_ARGS]%2 \"Use mod 2 to test if odd or even # of authors
3529 . ie \\n[#NUM_AUTHORS]=1 \{ .nr #AUTHOR_LINES 0 \}
3530 . el \{ .nr #AUTHOR_LINES 1 \}
3534 .MAC PAGENUMBER END \"Page # that appears on page one.
3535 . nr #n%_AT_PAGENUM_SET \\n%
3536 . nr #PAGE_NUM_ADJ \\$1-\\n[#n%_AT_PAGENUM_SET]
3537 . rr #n%_AT_PAGENUM_SET
3538 . nr #PAGE_NUM_SET 1
3541 \# ====================================================================
3543 \# +++TYPE OF DOCUMENT+++
3548 \# DEFAULT | CHAPTER | NAMED "<whatever> | LETTER
3550 \# Creates strings and sets registers for document types.
3552 \# Number registers: DEFAULT=1, CHAPTER=2, NAMED=3, LETTER=4
3555 . if '\\$1'DEFAULT' \{\
3558 . if '\\$1'CHAPTER' \{\
3561 . if '\\$1'NAMED' \{\
3565 . if '\\$1'LETTER' \{\
3573 . INDENT_FIRST_PARAS
3575 . ds $SUITE \En[#SUITE]
3576 . HEADER_MARGIN 3P+6p
3582 . FOOTER_RIGHT_SIZE +0
3583 . FOOTER_RIGHT ".../\E*[$SUITE]
3584 . FOOTER_ON_FIRST_PAGE
3589 \# +++LETTER MACROS+++
3596 \# Stores date string in string $DATE.
3610 \# Stores "to" info in diversion TO_ADDRESS.
3613 . if !'\\n(.z'' \{ .di \}
3625 \# Stores "from" info in diversion FROM_ADDRESS.
3628 . if !'\\n(.z'' \{ .di \}
3638 \# <greeting string>
3640 \# Stores greeting in string $GREETING.
3643 . if !'\\n(.z'' \{ .di \}
3655 \# Stores greeting in string $CLOSING.
3670 \# Redefines $SUITE to blank so that a suite number doesn't
3671 \# appear at the bottom of letter pages.
3677 \# ====================================================================
3686 \# Sets up defaults if no values are entered prior to START.
3688 \# The defaults for $CHAPTER_STRING, $DRAFT_STRING, and
3689 \# $REVISION_STRING are in the COPYSTYLE macro.
3692 . if !d$PAPER \{ .PAPER LETTER \}
3693 . if !\\n[#DOC_TYPE] \{ .DOCTYPE DEFAULT \}
3694 . ie \\n[#PAGENUM_STYLE_SET] \{ .PAGENUM_STYLE \\*[$PAGENUM_STYLE] \}
3696 . if !\\n[#COPY_STYLE]=1 \{ .PAGENUM_STYLE DIGIT \}
3698 . if !\\n[#COPY_STYLE] \{ .COPYSTYLE FINAL \}
3699 . if \\n[#DRAFT_WITH_PAGENUM] \{ .COPYSTYLE \\*[$COPY_STYLE] \}
3700 . if \\n[#DOC_TYPE]=4 \{\
3701 . if !\\n[#USER_SET_L_LENGTH] \{\
3702 . R_MARGIN \\n[#R_MARGIN]u
3703 . rr #USER_SET_L_LENGTH
3705 . if \\n[#PRINT_STYLE]=1 \{ .PRINTSTYLE TYPEWRITE SINGLESPACE \}
3707 . if \\n[#COPY_STYLE]=1 \{\
3711 . if !r#DOC_HEADER \{ .DOCHEADER \}
3712 . if !r#HEADERS_ON \{ .HEADERS \}
3713 . if !r#PAGINATE \{ .PAGINATE \}
3714 . if \\n[#FOOTERS_ON] \{\
3716 . if \\n[#PAGE_NUM_POS_SET]=0 \{ .PAGENUM_POS TOP CENTER \}
3718 . if !r#HEADER_MARGIN \{ .HEADER_MARGIN 4P+6p \}
3719 . if !r#HEADER_GAP \{ .HEADER_GAP 3P \}
3720 . if \\n[#FOOTERS_ON] \{\
3721 . if \\n[#PAGINATE]=0 \{\
3722 . if !r#T_MARGIN \{ .T_MARGIN 6P \}
3725 . if \\n[#HEADERS_ON]=0 \{\
3726 . if \\n[#FOOTERS_ON]=0 \{\
3727 . if !r#T_MARGIN \{ .T_MARGIN 6P \}
3730 . if !r#T_MARGIN \{ .T_MARGIN \\n[#HEADER_MARGIN]+\\n[#HEADER_GAP] \}
3731 . if !r#DOCHEADER_ADVANCE \{ .DOCHEADER_ADVANCE \\n[#T_MARGIN] \}
3732 . if !r#FOOTER_MARGIN \{ .FOOTER_MARGIN 3P \}
3733 . if !r#FOOTER_GAP \{ .FOOTER_GAP 3P \}
3734 . if !r#B_MARGIN \{ .B_MARGIN \\n[#FOOTER_MARGIN]u+\\n[#FOOTER_GAP]u \}
3735 . if (\\n[#FOOTER_MARGIN]+\\n(.v)>\\n[#B_MARGIN] \{\
3736 . tm1 "[mom]: Your chosen bottom margin for running text is too close to the footer margin.
3737 . tm1 " No footers or bottom-of-page page numbers will be printed.
3738 . tm1 " Please reset B_MARGIN or FOOTER_MARGIN to allow enough space.
3739 . tm1 " If no footers or bottom-of-page page numbers are required,
3740 . tm1 " place .FOOTER_MARGIN 0 before .START
3742 . if !r#HDRFTR_RULE_GAP \{\
3743 . if \\n[#HEADERS_ON] \{ .HDRFTR_RULE_GAP 4p \}
3744 . if \\n[#FOOTERS_ON] \{ .HDRFTR_RULE_GAP 4p \}
3746 . if !r#HDRFTR_RULE \{ .HDRFTR_RULE \}
3747 . if !r#PAGE_NUM_SET \{ .PAGENUMBER 1 \}
3748 . ie r#ADJ_DOC_LEAD \{ . \}
3749 . el \{ .DOC_LEAD_ADJUST \}
3750 \# Read in number registers and strings for type parameters
3751 . nr #DOC_L_MARGIN \\n[#L_MARGIN]
3752 . nr #DOC_L_LENGTH \\n[#L_LENGTH]
3753 . nr #DOC_R_MARGIN \\n[#PAGE_WIDTH]-(\\n[#DOC_L_MARGIN]+\\n[#L_LENGTH])
3754 . ds $DOC_FAM \\*[$FAMILY]
3755 . nr #DOC_PT_SIZE \\n[#PT_SIZE]
3756 . nr #DOC_LEAD \\n[#LEAD]
3757 . ds $DOC_QUAD \\*[$QUAD_VALUE]
3758 . ds $PP_FT \\*[$FONT]
3763 . nr #FN_COUNT_FOR_COLS 0 1
3765 . RESET_SUBHEAD_NUMBER
3766 . RESET_PARAHEAD_NUMBER
3767 \# General style defaults for both PRINTSTYLEs
3769 . PARA_INDENT \\n[#PP_INDENT]u
3770 . if !d$HDRFTR_FAM \{ .HDRFTR_FAMILY \\*[$DOC_FAM] \}
3771 . if !d$HDRFTR_SIZE_CHANGE \{ .HDRFTR_SIZE +0 \}
3772 . if !d$PAGE_NUM_FAM \{ .PAGENUM_FAMILY \\*[$DOC_FAM] \}
3773 . if !d$PAGE_NUM_FT \{ .PAGENUM_FONT R \}
3774 . if !d$PAGE_NUM_SIZE_CHANGE \{ .PAGENUM_SIZE +0 \}
3775 . if !r#PAGE_NUM_POS_SET \{ .PAGENUM_POS BOTTOM CENTER \}
3776 . ie \\n[#PAGE_NUM_HYPHENS_SET] \{\
3777 . if \\n[#PAGE_NUM_HYPHENS]=0 \{ .PAGENUM_HYPHENS OFF \}
3778 . if \\n[#PAGE_NUM_HYPHENS]=1 \{ .PAGENUM_HYPHENS \}
3780 . el \{ .PAGENUM_HYPHENS \}
3781 . if !d$HEAD_QUAD \{ .HEAD_QUAD CENTER \}
3782 . if !r#HEAD_CAPS \{ .HEAD_CAPS \}
3783 . if !r#HEAD_UNDERLINE \{ .HEAD_UNDERLINE \}
3784 . if !d$SH_QUAD \{ .SUBHEAD_QUAD LEFT \}
3785 . if !r#HDRFTR_RIGHT_CAPS \{ .HDRFTR_RIGHT_CAPS \}
3786 . if \\n[#HDRFTR_RIGHT_CAPS]=0 \{\
3787 . if !d$HDRFTR_RIGHT_SIZE_CHANGE \{ .HDRFTR_RIGHT_SIZE +0 \}
3789 . if !d$FN_FAM \{ .FOOTNOTE_FAMILY \\*[$DOC_FAM] \}
3790 . if !d$FN_FT \{ .FOOTNOTE_FONT R \}
3791 . if !d$FN_QUAD \{ .FOOTNOTE_QUAD \\*[$DOC_QUAD] \}
3792 . if !r#FN_RULE \{ .FOOTNOTE_RULE \}
3793 . if !r#FN_MARKERS \{ .FOOTNOTE_MARKERS \}
3794 . if !r#FN_MARKER_STYLE \{ .FOOTNOTE_MARKER_STYLE STAR \}
3795 . if !d$EN_PN_STYLE \{ .ENDNOTES_PAGENUM_STYLE digit \}
3796 . if !d$EN_FAM \{ .ENDNOTE_FAMILY \\*[$DOC_FAM] \}
3797 . if !d$EN_FN \{ .ENDNOTE_FONT R \}
3798 . if !d$EN_QUAD \{ .ENDNOTE_QUAD \\*[$DOC_QUAD] \}
3799 . if !d$EN_STRING \{ .ENDNOTE_STRING "Endnotes" \}
3800 . if !d$EN_STRING_FAM \{ .ENDNOTE_STRING_FAMILY \\*[$EN_FAM] \}
3801 . if !d$EN_STRING_QUAD \{ .ENDNOTE_STRING_QUAD CENTER \}
3802 . if !r#EN_STRING_UNDERSCORE \{ .ENDNOTE_STRING_UNDERSCORE 2 \}
3803 . if !r#EN_STRING_CAPS \{ .ENDNOTE_STRING_CAPS \}
3804 . if !d$EN_TITLE \{\
3805 . ie \\n[#DOC_TYPE]=2 \{\
3806 . ie '\\*[$CHAPTER]'' \{ .ENDNOTE_TITLE "\\*[$CHAPTER_STRING]" \}
3807 . el \{ .ENDNOTE_TITLE "\\*[$CHAPTER_STRING] \\*[$CHAPTER]" \}
3809 . el \{ .ENDNOTE_TITLE "\\*[$TITLE]" \}
3811 . if !d$EN_TITLE_FAM \{ .ENDNOTE_TITLE_FAMILY \\*[$EN_FAM] \}
3812 . if !d$EN_TITLE_QUAD \{ .ENDNOTE_TITLE_QUAD LEFT \}
3813 . if !r#EN_TITLE_UNDERSCORE \{ .ENDNOTE_TITLE_UNDERSCORE \}
3814 . if !d$EN_NUMBER_FAM \{ .ENDNOTE_NUMBER_FAMILY \\*[$EN_FAM] \}
3815 . if !r#EN_NUMBERS_ALIGN_LEFT \{\
3816 . if !r#EN_NUMBERS_ALIGN_RIGHT \{ .ENDNOTE_NUMBERS_ALIGN_RIGHT 2 \}
3818 . if !d$TOC_HEADER_STRING \{ .TOC_HEADER_STRING "Contents" \}
3819 . if !d$TOC_HEADER_QUAD \{ .TOC_HEADER_QUAD LEFT \}
3820 . if !d$TOC_PN_STYLE \{ .TOC_PAGENUM_STYLE roman \}
3821 . if !r#TOC_PN_PADDING \{ .TOC_PADDING 3 \}
3822 . if !r#TOC_TITLE_INDENT \{ .TOC_TITLE_INDENT 0 \}
3823 . if !r#TOC_HEAD_INDENT \{ .TOC_HEAD_INDENT 18p \}
3824 . if !r#TOC_SH_INDENT \{ .TOC_SUBHEAD_INDENT 30p \}
3825 . if !r#TOC_PH_INDENT \{ .TOC_PARAHEAD_INDENT 42p \}
3826 \# String defaults for both PRINTSTYLEs
3827 . ie \\n[#DOC_TYPE]=1 \{\
3828 . ie '\\*[$DOC_TITLE]'' \{\
3829 . if \\n[#USER_DEF_HDRFTR_LEFT]=0 \{ .ds $HDRFTR_LEFT \\*[$AUTHOR_1] \}
3830 . rr #USER_DEF_HDRFTR_LEFT
3831 . if \\n[#USER_DEF_HDRFTR_RIGHT]=0 \{ .ds $HDRFTR_RIGHT \\*[$TITLE] \}
3832 . rr #USER_DEF_HDRFTR_RIGHT
3835 . if \\n[#COPY_STYLE]=1 \{ .DRAFT_WITH_PAGENUMBER \}
3836 . if \\n[#USER_DEF_HDRFTR_LEFT]=0 \{ .ds $HDRFTR_LEFT \\*[$AUTHOR_1] \}
3837 . rr #USER_DEF_HDRFTR_LEFT
3838 . if \\n[#USER_DEF_HDRFTR_CENTER]=0 \{ .ds $HDRFTR_CENTER \\*[$TITLE] \}
3839 . rr #USER_DEF_HDRFTR_CENTER
3840 . if \\n[#USER_DEF_HDRFTR_RIGHT]=0 \{ .ds $HDRFTR_RIGHT \\*[$DOC_TITLE] \}
3841 . rr #USER_DEF_HDRFTR_RIGHT
3845 . if \\n[#USER_DEF_HDRFTR_LEFT]=0 \{ .ds $HDRFTR_LEFT \\*[$AUTHOR_1] \}
3846 . rr #USER_DEF_HDRFTR_LEFT
3847 . if \\n[#USER_DEF_HDRFTR_RIGHT]=0 \{ .ds $HDRFTR_RIGHT \\*[$TITLE] \}
3848 . rr #USER_DEF_HDRFTR_RIGHT
3850 . if !d$ATTRIBUTE_STRING \{ .ATTRIBUTE_STRING "by" \}
3851 . if !d$FINIS_STRING \{ .FINIS_STRING "END" \}
3852 \# Defaults for printstyle TYPEWRITE
3853 . if \\n[#PRINT_STYLE]=1 \{\
3854 . if \\n[#UNDERLINE_QUOTES]=1 \{ .UNDERLINE_QUOTES \}
3855 . if \\n[#UNDERLINE_QUOTES]=0 \{ .UNDERLINE_QUOTES OFF \}
3856 . if !r#Q_OFFSET_VALUE \{ .QUOTE_INDENT 2 \}
3857 . if !r#EPI_OFFSET_VALUE \{ .EPIGRAPH_INDENT 2 \}
3858 . if !d$LINEBREAK_CHAR \{ .LINEBREAK_CHAR * 3 2p \}
3859 . if !d$FN_SIZE_CHANGE \{ .FOOTNOTE_SIZE +0 \}
3860 . if !r#FN_RULE_LENGTH \{ .FOOTNOTE_RULE_LENGTH 2i \}
3861 . if !r#FN_RULE_ADJ \{ .FOOTNOTE_RULE_ADJ 6p \}
3862 . if !r#SLANT_MEANS_SLANT \{\
3863 . ie \\n[#UNDERLINE_SLANT]=1 \{ .UNDERLINE_SLANT \}
3864 . el \{ .UNDERLINE_SLANT OFF \}
3866 . if !r#PH_INDENT \{ .PARAHEAD_INDENT \\n[#PP_INDENT]u/2u \}
3867 . if !r#EN_PP_INDENT \{ .ENDNOTE_PARA_INDENT \\n[#PP_INDENT] \}
3869 \# Defaults for printstyle TYPESET
3870 . if \\n[#PRINT_STYLE]=2 \{\
3871 . if !d$DOCHEADER_LEAD_ADJ \{\
3872 . ie !'\\*[$CHAPTER_TITLE]'' \{\
3873 . ie !'\\*[$CHAPTER_STRING]'' \{\
3876 . el \{ .DOCHEADER_LEAD +0 \}
3878 . el \{ .DOCHEADER_LEAD +0 \}
3880 . if !d$TITLE_FAM \{ .TITLE_FAMILY \\*[$DOC_FAM] \}
3881 . if !d$TITLE_FT \{ .TITLE_FONT B \}
3882 . if !d$TITLE_SIZE_CHANGE \{\
3883 . ie \\n[#DOC_TYPE]=2 \{ .TITLE_SIZE +4 \}
3884 . el \{ .TITLE_SIZE +3.5 \}
3886 . if !d$CHAPTER_TITLE_FAM \{ .CHAPTER_TITLE_FAMILY \\*[$DOC_FAM] \}
3887 . if !d$CHAPTER_TITLE_FT \{ .CHAPTER_TITLE_FONT BI \}
3888 . if !d$CHAPTER_TITLE_SIZE_CHANGE \{ .CHAPTER_TITLE_SIZE +4 \}
3889 . if !d$SUBTITLE_FAM \{ .SUBTITLE_FAMILY \\*[$DOC_FAM] \}
3890 . if !d$SUBTITLE_FT \{ .SUBTITLE_FONT R \}
3891 . if !d$SUBTITLE_SIZE_CHANGE \{ .SUBTITLE_SIZE +0 \}
3892 . if !d$AUTHOR_FAM \{ .AUTHOR_FAMILY \\*[$DOC_FAM] \}
3893 . if !d$AUTHOR_FT \{ .AUTHOR_FONT I \}
3894 . if !d$AUTHOR_SIZE_CHANGE \{ .AUTHOR_SIZE +0 \}
3895 . if !d$DOCTYPE_FAM \{ .DOCTYPE_FAMILY \\*[$DOC_FAM] \}
3896 . if !d$DOCTYPE_FT \{ .DOCTYPE_FONT BI \}
3897 . if !d$DOCTYPE_SIZE_CHANGE \{ .DOCTYPE_SIZE +3 \}
3898 . if !d$HDRFTR_LEFT_FAM \{ .HDRFTR_LEFT_FAMILY \\*[$DOC_FAM] \}
3899 . if !d$HDRFTR_LEFT_FT \{ .HDRFTR_LEFT_FONT R \}
3900 . if \\n[#HDRFTR_LEFT_CAPS] \{\
3901 . if !d$HDRFTR_LEFT_SIZE_CHANGE \{ .HDRFTR_LEFT_SIZE -2 \}
3903 . if !d$HDRFTR_LEFT_SIZE_CHANGE \{ .HDRFTR_LEFT_SIZE -.5 \}
3904 . if !d$HDRFTR_CENTER_FAM \{ .HDRFTR_CENTER_FAMILY \\*[$DOC_FAM] \}
3905 . if !d$HDRFTR_CENTER_FT \{ .HDRFTR_CENTER_FONT I \}
3906 . if \\n[#HDRFTR_CENTER_CAPS] \{\
3907 . if !d$HDRFTR_CENTER_SIZE_CHANGE \{ .HDRFTR_CENTER_SIZE -2 \}
3909 . if !d$HDRFTR_CENTER_SIZE_CHANGE \{ .HDRFTR_CENTER_SIZE -.5 \}
3910 . if !d$HDRFTR_RIGHT_FAM \{ .HDRFTR_RIGHT_FAMILY \\*[$DOC_FAM] \}
3911 . if !d$HDRFTR_RIGHT_FT \{ .HDRFTR_RIGHT_FONT R \}
3912 . if \\n[#HDRFTR_RIGHT_CAPS] \{\
3913 . if !d$HDRFTR_RIGHT_SIZE_CHANGE \{ .HDRFTR_RIGHT_SIZE -2 \}
3915 . if !d$HDRFTR_RIGHT_SIZE_CHANGE \{ .HDRFTR_RIGHT_SIZE -.5 \}
3916 . if !d$HEAD_FAM \{ .HEAD_FAMILY \\*[$DOC_FAM] \}
3917 . if !d$HEAD_FT \{ .HEAD_FONT B \}
3918 . if !d$HEAD_SIZE_CHANGE \{ .HEAD_SIZE +1 \}
3919 . if !r#HEAD_SPACE \{ .HEAD_SPACE \}
3920 . if !d$SH_FAM \{ .SUBHEAD_FAMILY \\*[$DOC_FAM] \}
3921 . if !d$SH_FT \{ .SUBHEAD_FONT B \}
3922 . if !d$SH_SIZE_CHANGE \{ .SUBHEAD_SIZE +.5 \}
3923 . if !d$PH_FAM \{ .PARAHEAD_FAMILY \\*[$DOC_FAM] \}
3924 . if !d$PH_FT \{ .PARAHEAD_FONT BI \}
3925 . if !d$PH_SIZE_CHANGE \{ .PARAHEAD_SIZE -.25 \}
3926 . if !r#PH_INDENT \{ .PARAHEAD_INDENT \\n[#PP_INDENT]u/2u \}
3927 . if !d$QUOTE_FAM \{ .QUOTE_FAMILY \\*[$DOC_FAM] \}
3928 . if !d$QUOTE_FT \{ .QUOTE_FONT I \}
3929 . if !d$QUOTE_SIZE_CHANGE \{ .QUOTE_SIZE +0 \}
3930 . if !r#Q_OFFSET_VALUE \{ .QUOTE_INDENT 3 \}
3931 . if !d$BQUOTE_FAM \{ .BLOCKQUOTE_FAMILY \\*[$DOC_FAM] \}
3932 . if !d$BQUOTE_FT \{ .BLOCKQUOTE_FONT R \}
3933 . if !d$BQUOTE_SIZE_CHANGE \{ .BLOCKQUOTE_SIZE -1 \}
3934 . if !d$BQUOTE_QUAD \{ .BLOCKQUOTE_QUAD LEFT \}
3935 . if !d$EPI_FAM \{ .EPIGRAPH_FAMILY \\*[$DOC_FAM] \}
3936 . if !d$EPI_FT \{ .EPIGRAPH_FONT R \}
3937 . if !d$EPI_SIZE_CHANGE \{ .EPIGRAPH_SIZE -1.5 \}
3938 . if !r#EPI_AUTOLEAD \{ .EPIGRAPH_AUTOLEAD 2 \}
3939 . if !d$EPI_QUAD \{ .EPIGRAPH_QUAD \\*[$DOC_QUAD] \}
3940 . if !r#EPI_OFFSET_VALUE \{ .EPIGRAPH_INDENT 3 \}
3941 . if !d$LINEBREAK_CHAR \{ .LINEBREAK_CHAR * 3 3p \}
3942 . if !r#FN_RULE_LENGTH \{ .FOOTNOTE_RULE_LENGTH 4P \}
3943 . if !r#FN_RULE_ADJ \{ .FOOTNOTE_RULE_ADJ 3p \}
3944 . if !d$FN_SIZE_CHANGE \{ .FOOTNOTE_SIZE -2 \}
3945 . if !r#FN_AUTOLEAD \{ .FOOTNOTE_AUTOLEAD 2 \}
3946 . if !r#EN_PS \{ .ENDNOTE_PT_SIZE \\n[#DOC_PT_SIZE]u \}
3947 . if !d$EN_LEAD \{ .ENDNOTE_LEAD 14 ADJUST \}
3948 . if !d$EN_STRING_FT \{ .ENDNOTE_STRING_FONT B \}
3949 . if !d$EN_STRING_SIZE_CHANGE \{ .ENDNOTE_STRING_SIZE +1 \}
3950 . if !d$EN_TITLE_FT \{ .ENDNOTE_TITLE_FONT B \}
3951 . if !d$EN_TITLE_SIZE_CHANGE \{ .ENDNOTE_TITLE_SIZE +0 \}
3952 . if !d$EN_NUMBER_FT \{ .ENDNOTE_NUMBER_FONT B \}
3953 . if !$EN_NUMBER_SIZE_CHANGE \{ .ENDNOTE_NUMBER_SIZE +0 \}
3954 . if !r#EN_PP_INDENT \{ .ENDNOTE_PARA_INDENT 1.5m \}
3955 . if !d$TOC_FAM \{ .TOC_FAMILY \\*[$DOC_FAM] \}
3956 . if !r#TOC_PS \{ .TOC_PT_SIZE \\n[#DOC_PT_SIZE]u \}
3957 . if !r#TOC_LEAD \{ .TOC_LEAD \\n[#DOC_LEAD]u ADJUST \}
3958 . if !d$TOC_HEADER_FAM \{ .TOC_HEADER_FAMILY \\*[$TOC_FAM] \}
3959 . if !d$TOC_HEADER_SIZE_CHANGE \{ .TOC_HEADER_SIZE +4 \}
3960 . if !d$TOC_HEADER_FT \{ .TOC_HEADER_FONT B \}
3961 . if !d$TOC_TITLE_FAM \{ .TOC_TITLE_FAMILY \\*[$TOC_FAM] \}
3962 . if !d$TOC_PN_FAM \{ .TOC_PN_FAMILY \\*[$TOC_FAM] \}
3963 . if !d$TOC_HEAD_FAM \{ .TOC_HEAD_FAMILY \\*[$TOC_FAM] \}
3964 . if !d$TOC_SH_FAM \{ .TOC_SUBHEAD_FAMILY \\*[$TOC_FAM] \}
3965 . if !d$TOC_PH_FAM \{ .TOC_PARAHEAD_FAMILY \\*[$TOC_FAM] \}
3966 . if !d$TOC_TITLE_FT \{ .TOC_TITLE_FONT BI \}
3967 . if !d$TOC_PN_FT \{ .TOC_PN_FONT R \}
3968 . if !d$TOC_HEAD_FT \{ .TOC_HEAD_FONT B \}
3969 . if !d$TOC_SH_FT \{ .TOC_SUBHEAD_FONT R \}
3970 . if !d$TOC_PH_FT \{ .TOC_PARAHEAD_FONT I \}
3971 . if !d$TOC_TITLE_SIZE_CHANGE \{ .TOC_TITLE_SIZE +.5 \}
3972 . if !d$TOC_PN_SIZE_CHANGE \{ .TOC_PN_SIZE +0 \}
3973 . if !d$TOC_HEAD_SIZE_CHANGE \{ .TOC_HEAD_SIZE +.5 \}
3974 . if !d$TOC_SH_SIZE_CHANGE \{ .TOC_SUBHEAD_SIZE +0 \}
3975 . if !d$TOC_PH_SIZE_CHANGE \{ .TOC_PARAHEAD_SIZE +0 \}
3977 . if \\n[#PRINT_STYLE]=2 \{\
3978 . ie \\n[#ADJ_DOC_LEAD]=1 \{ .DOC_LEAD_ADJUST \}
3981 . if !\\n[#COLLATE] \{\
3983 \# Endnote and toc leading
3984 . nr #OK_PROCESS_LEAD 1
3985 . nr #RESTORE_DOC_LEAD \\n(.v
3986 . if \\n[#PRINT_STYLE]=1 \{\
3987 . ie \\n[#SINGLE_SPACE] \{\
3988 . ENDNOTE_LEAD 12 ADJUST
3991 . ie \\n[#EN_SINGLESPACE] \{ .ENDNOTE_LEAD 12 ADJUST \}
3992 . el \{ .ENDNOTE_LEAD 24 ADJUST \}
3995 . if \\n[#PRINT_STYLE]=2 \{\
3996 . ie !d$EN_LEAD \{ .ENDNOTE_LEAD 14 ADJUST \}
3997 . el \{ .ENDNOTE_LEAD \\*[$EN_LEAD] \\*[$ADJUST_EN_LEAD] \}
3998 . ie !d$TOC_LEAD \{ .TOC_LEAD \\n[#RESTORE_DOC_LEAD]u \}
3999 . el \{ .TOC_LEAD \\*[$TOC_LEAD] \\*[$ADJUST_TOC_LEAD] \}
4000 . rm $ADJUST_EN_LEAD
4001 . rm $ADJUST_TOC_LEAD
4003 . DOC_LEAD \\n[#RESTORE_DOC_LEAD]u
4005 . if \\n[#PRINT_STYLE]=1 \{ .nr #IGNORE 1 \}
4008 \# ====================================================================
4010 \# +++START THE DOCUMENT+++
4017 \# Reads in default document style parameters and any parameter
4018 \# the user has changed before issuing START.
4019 \# Using the information gathered in the opening macros,
4020 \# prints appropriate title (or chapter #), subtitle, author
4021 \# and document type (if appropriate).
4023 \# The .PRINT \& (zero-width character) is required to get the
4024 \# subsequent .sp request to work as advertised.
4026 \# The overall document line length, family, and point-size
4027 \# are stored in #DOC_L_LENGTH, $DOC_FAM, and #DOC_PT_SIZE for
4028 \# use in the HEADER and FOOTER macros.
4030 \# First, define some strings for point sizes
4032 .ds $TITLE_PT_SIZE \\n[#DOC_PT_SIZE]u\\*[$TITLE_SIZE_CHANGE]
4033 .ds $CHAPTER_TITLE_PT_SIZE \\n[#DOC_PT_SIZE]u\\*[$CHAPTER_TITLE_SIZE_CHANGE]
4034 .ds $SUBTITLE_PT_SIZE \\n[#DOC_PT_SIZE]u\\*[$SUBTITLE_SIZE_CHANGE]
4035 .ds $AUTHOR_PT_SIZE \\n[#DOC_PT_SIZE]u\\*[$AUTHOR_SIZE_CHANGE]
4036 .ds $DOCTYPE_PT_SIZE \\n[#DOC_PT_SIZE]u\\*[$DOCTYPE_SIZE_CHANGE]
4038 \# Next, some utility macros for various routines to prevent repetition
4040 .MAC PRINT_AUTHORS END
4041 . nr #AUTHORS \\n[#AUTHOR_NUM]
4042 . nr #NEXT_AUTHOR 0 1
4043 . while \\n[#AUTHORS]>\\n[#NEXT_AUTHOR] \{\
4044 . PRINT \\*[$AUTHOR_\\n+[#NEXT_AUTHOR]]
4048 .MAC DEFAULT_DOCHEADER END
4050 . FAMILY \\*[$TITLE_FAM]
4052 . PT_SIZE \\*[$TITLE_PT_SIZE]
4053 . LS \\n[#DOCHEADER_LEAD]u
4055 . if !'\\*[$SUBTITLE]'' \{\
4056 . FAMILY \\*[$SUBTITLE_FAM]
4057 . FT \\*[$SUBTITLE_FT]
4058 . PT_SIZE \\*[$SUBTITLE_PT_SIZE]
4059 . PRINT \\*[$SUBTITLE]
4061 . if !'\\*[$AUTHOR_1]'' \{\
4062 . FAMILY \\*[$AUTHOR_FAM]
4063 . FT \\*[$AUTHOR_FT]
4064 . PT_SIZE \\*[$AUTHOR_PT_SIZE]
4065 . if !'\\*[$ATTRIBUTE_STRING]'' \{ .PRINT \\*[$ATTRIBUTE_STRING] \}
4071 .MAC CHAPTER_DOCHEADER END
4073 . FAMILY \\*[$TITLE_FAM]
4075 . PT_SIZE \\*[$TITLE_PT_SIZE]
4076 . LS \\n[#DOCHEADER_LEAD]u
4077 . ie '\\*[$CHAPTER]'' \{\
4078 . ie !'\\*[$CHAPTER_TITLE]'' \{\
4079 . if \\n[#PRINT_STYLE]=2 \{\
4080 . FAMILY \\*[$CHAPTER_TITLE_FAM]
4081 . FT \\*[$CHAPTER_TITLE_FT]
4082 . PT_SIZE \\*[$CHAPTER_TITLE_PT_SIZE]
4083 . LS \\n[#DOCHEADER_LEAD]u
4085 . PRINT \\*[$CHAPTER_TITLE]
4088 . PRINT \\*[$CHAPTER_STRING]
4092 . PRINT \\*[$CHAPTER_STRING] \\*[$CHAPTER]
4093 . if !'\\*[$CHAPTER_TITLE]'' \{\
4094 . if \\n[#PRINT_STYLE]=1 \{ .PRINT \\*[$CHAPTER_TITLE] \}
4095 . if \\n[#PRINT_STYLE]=2 \{\
4096 . FAMILY \\*[$CHAPTER_TITLE_FAM]
4097 . FT \\*[$CHAPTER_TITLE_FT]
4098 . PT_SIZE \\*[$CHAPTER_TITLE_PT_SIZE]
4099 . LS \\n[#DOCHEADER_LEAD]u
4100 . PRINT \\*[$CHAPTER_TITLE]
4101 . RLD \\n[#DOC_LEAD]u \" Just looks better this way
4108 .MAC NAMED_DOCHEADER END
4110 . FAMILY \\*[$TITLE_FAM]
4112 . PT_SIZE \\*[$TITLE_PT_SIZE]
4113 . LS \\n[#DOCHEADER_LEAD]u
4115 . if !'\\*[$SUBTITLE]'' \{\
4116 . FAMILY \\*[$SUBTITLE_FAM]
4117 . FT \\*[$SUBTITLE_FT]
4118 . PT_SIZE \\*[$SUBTITLE_PT_SIZE]
4119 . PRINT \\*[$SUBTITLE]
4121 . if !'\\*[$AUTHOR_1]'' \{\
4122 . FAMILY \\*[$AUTHOR_FAM]
4123 . FT \\*[$AUTHOR_FT]
4124 . PT_SIZE \\*[$AUTHOR_PT_SIZE]
4125 . if !'\\*[$ATTRIBUTE_STRING]'' \{ .PRINT \\*[$ATTRIBUTE_STRING] \}
4128 . FAMILY \\*[$DOCTYPE_FAM]
4129 . FT \\*[$DOCTYPE_FT]
4130 . PT_SIZE \\*[$DOCTYPE_PT_SIZE]
4131 . LS \\n[#DOCHEADER_LEAD]u
4132 . ALD \\n[#DOCHEADER_LEAD]u
4133 . UNDERSCORE "\\*[$DOC_TYPE]
4138 . if !\\n[#PRINT_STYLE] \{\
4139 . PRINTSTYLE TYPEWRITE
4146 . PRINT "You neglected to enter a PRINTSTYLE"
4148 . ab PRINTSTYLE missing
4151 . if \\n[#COLLATE] \{\
4152 . COPYSTYLE \\*[$COPY_STYLE]
4153 . nr #HEADERS_ON \\n[#HEADER_STATE]
4154 . if \\n[#PAGE_NUM_V_POS]=1 \{ .nr #PAGINATE \\n[#PAGINATION_STATE] \}
4155 . sp |\\n[#HEADER_MARGIN]u
4157 . if !'\\*[$RESTORE_PAGENUM_STYLE]'' \{\
4158 . PAGENUM_STYLE \\*[$RESTORE_PAGENUM_STYLE]
4159 . rm $RESTORE_PAGENUM_STYLE
4164 . ie \\n[#COLLATED_DOC]=1 \{\
4165 \# Collect TITLE for TOC.
4166 . nr #TOC_ENTRY_PN \\n%+\\n[#PAGE_NUM_ADJ]
4167 . af #TOC_ENTRY_PN \\g[#PAGENUMBER]
4168 . ie \\n[#USER_SET_TITLE_ITEM] \{\
4169 . ds $TOC_TITLE_ITEM \\*[$USER_SET_TITLE_ITEM]\\|
4170 . rr #USER_SET_TITLE_ITEM
4171 . rm $USER_SET_TITLE_ITEM
4174 . ie \\n[#DOC_TYPE]=2 \{\
4175 . ie '\\*[$CHAPTER_TITLE]'' \{\
4176 . ds $TOC_TITLE_ITEM \\*[$CHAPTER_STRING] \\*[$CHAPTER]\\|
4179 . ie '\\*[$CHAPTER]'' \{\
4180 . ds $TOC_TITLE_ITEM \\*[$CHAPTER_TITLE]\\|
4183 . ds $TOC_TITLE_ITEM \\*[$CHAPTER_STRING] \\*[$CHAPTER]: \\*[$CHAPTER_TITLE]\\|
4188 . ds $TOC_TITLE_ITEM \\*[$TITLE]\\|
4191 . if \\n[#TOC_AUTHORS]=1 \{\
4192 . ie '\\*[$TOC_AUTHORS]'' \{\
4193 . as $TOC_TITLE_ITEM /\\|\\*[$AUTHOR_1]\\|
4196 . as $TOC_TITLE_ITEM /\\|\\*[$TOC_AUTHORS]\\|
4200 \# Note the use of \!, which transparently embeds the macros used
4201 \# in the TOC_ENTRIES diversion. The elements they control must be
4202 \# processed literally when the diversion is output.
4205 . if \\n[#PRINT_STYLE]=1 \{\
4210 . if \\n[#PRINT_STYLE]=2 \{\
4211 \!. FAMILY \\*[$TOC_TITLE_FAM]
4212 \!. FT \\*[$TOC_TITLE_FT]
4213 \!. PT_SIZE \\n[#TOC_PS]u\\*[$TOC_TITLE_SIZE_CHANGE]
4216 . ie \\n[#PRINT_STYLE]=1 \{\
4217 \!. PAD "\\*[$TOC_TITLE_ITEM]\\*[$TOC_PN_TYPEWRITE]"
4220 \!. PAD "\\h'\\n[#TOC_TITLE_INDENT]u'\\*[$TOC_TITLE_ITEM]\\*[$TOC_PN]"
4225 . if \\n[#PRINT_STYLE]=2 \{\
4226 \!. FAMILY \\*[$TOC_PN_FAM]
4227 \!. FT \\*[$TOC_PN_FT]
4228 \!. PT_SIZE \\n[#TOC_PS]u\\*[$TOC_PN_SIZE_CHANGE]
4231 \!. PRINT \\*[LEADER]
4234 \!. PRINT \\n[#TOC_ENTRY_PN]
4240 . nr #FIRST_DOC_TITLE_PN \\n%+\\n[#PAGE_NUM_ADJ]
4241 . af #FIRST_DOC_TITLE_PN \\g[#PAGENUMBER]
4242 . nr #FIRST_DOC_TOC_PN_PADDING \\n[#TOC_PN_PADDING]
4244 \# End TITLE collection
4245 . if \\n[#PRINT_PAGENUM_ON_PAGE_1] \{\
4246 . sp |\\n[#HEADER_MARGIN]u
4250 . rr #PAGINATION_STATE
4251 \# End collate stuff
4252 . ie \\n[#DOC_HEADER]=0 \{\
4254 . if \\n[#DOC_TYPE]=4 \{\
4255 . if !'\\n(.z'' \{ .di \}
4258 . ie r#ADVANCE_FROM_TOP \{\
4259 . sp |\\n[#ADVANCE_FROM_TOP]u-1v
4262 . el \{ .sp |\\n[#T_MARGIN]u-1v \}
4263 . if \\n[#COLUMNS] \{\
4266 . po \\n[#COL_\\n+[#COL_NUM]_L_MARGIN]u
4267 . ll \\n[#COL_L_LENGTH]u
4271 . if r#ADVANCE_FROM_TOP \{ .rr #ADVANCE_FROM_TOP \}
4274 . if \\n[#PRINT_STYLE]=2 \{ .LS \\n[#DOC_LEAD]u\\*[$DOCHEADER_LEAD_ADJ] \}
4275 . nr #DOCHEADER_LEAD \\n[#LEAD]
4277 . if \\n[#DOC_TYPE]=1 \{\
4279 . sp |\\n[#DOCHEADER_ADVANCE]u-1v
4281 . L_MARGIN \\n[#DOC_L_MARGIN]u
4282 . LL \\n[#DOC_L_LENGTH]u
4284 . if \\n[#PRINT_STYLE]=1 \{\
4289 . ie \\n[#SINGLE_SPACE] \{ .vs \\n[#DOC_LEAD]u*2u \}
4290 . el \{ .vs \\n[#DOC_LEAD]u \}
4292 . if !'\\*[$TITLE]'' \{ .UNDERSCORE "\\*[$TITLE]\}
4294 . if !'\\*[$SUBTITLE]'' \{\
4295 . ie \\n[#SINGLE_SPACE] \{ .vs \\n[#DOC_LEAD]u*2u \}
4296 . el \{ .vs \\n[#DOC_LEAD]u \}
4297 . PRINT \\*[$SUBTITLE]
4299 . if '\\*[$SUBTITLE]'' \{\
4300 . ALD \\n[#DOC_LEAD]u
4302 . ie !'\\*[$AUTHOR_1]'' \{\
4303 . ie \\n[#SINGLE_SPACE] \{ .vs \\n[#DOC_LEAD]u \}
4304 . el \{ .vs \\n[#DOC_LEAD]u/2u \}
4305 . if !d$SUBTITLE \{\
4306 . ie \\n[#SINGLE_SPACE] \{ .ALD \\n[#DOC_LEAD]u \}
4307 . el \{ .ALD \\n[#DOC_LEAD]u*2u \}
4309 . PRINT \\*[$ATTRIBUTE_STRING]
4310 . nr #AUTHORS \\n[#AUTHOR_NUM]
4311 . nr #NEXT_AUTHOR 0 1
4312 . while \\n[#AUTHORS]>\\n[#NEXT_AUTHOR] \{\
4313 . PRINT \\*[$AUTHOR_\\n+[#NEXT_AUTHOR]]
4315 . if \\n[#AUTHOR_LINES]=1 \{\
4316 . ie \\n[#SINGLE_SPACE] \{ .RLD \\n[#DOC_LEAD]u \}
4317 . el \{ .ALD \\n[#DOC_LEAD]u/2u \}
4321 . ie !d$SUBTITLE \{\
4322 . ie \\n[#SINGLE_SPACE] \{ .RLD \\n[#DOC_LEAD]u*2u \}
4323 . el \{ .RLD \\n[#DOC_LEAD]u \}
4326 . ie \\n[#SINGLE_SPACE] \{ .RLD \\n[#DOC_LEAD]u*2u \}
4327 . el \{ .ALD \\n[#DOC_LEAD]u \}
4331 . if \\n[#PRINT_STYLE]=2 \{\
4333 . di DOCHEADER_DIVERSION \" This diversion is only
4334 . br \" necessary to find the depth of the
4335 . DEFAULT_DOCHEADER \" docheader
4338 . nr #DOCHEADER_DEPTH \\n(dn-\\n[#DOCHEADER_LEAD] \"Storing the depth (height) of the diversion
4339 . \"in #DOCHEADER_DEPTH
4340 . rm DOCHEADER_DIVERSION \" Removing the diversion macro
4345 . if \\n[#DOC_TYPE]=2 \{\
4347 . sp |\\n[#DOCHEADER_ADVANCE]u-1v
4349 . L_MARGIN \\n[#DOC_L_MARGIN]u
4350 . LL \\n[#DOC_L_LENGTH]u
4352 . if \\n[#PRINT_STYLE]=1 \{\
4357 . vs \\n[#DOC_LEAD]u
4358 . ie '\\*[$CHAPTER]'' \{\
4360 . ie !'\\*[$CHAPTER_TITLE]'' \{\
4361 . PRINT \\*[$CHAPTER_TITLE]
4365 . PRINT \\*[$CHAPTER_STRING]
4371 . PRINT \\*[$CHAPTER_STRING] \\*[$CHAPTER]
4373 . if !'\\*[$CHAPTER_TITLE]'' \{\
4374 . if \\n[#SINGLE_SPACE] \{ .ALD \\n[#DOC_LEAD]u \}
4375 . UNDERSCORE "\\*[$CHAPTER_TITLE]
4378 . if \\n[#SINGLE_SPACE] \{ .ALD \\n[#DOC_LEAD]u \}
4380 . if \\n[#PRINT_STYLE]=2 \{\
4382 . di DOCHEADER_DIVERSION \" This diversion is only
4383 . br \" necessary to find the depth of the
4384 . CHAPTER_DOCHEADER \" docheader
4387 . nr #DOCHEADER_DEPTH \\n(dn-\\n[#DOCHEADER_LEAD] \" Storing the depth (height) of the diversion
4388 . \" in #DOCHEADER_DEPTH
4389 . rm DOCHEADER_DIVERSION \" Removing the diversion macro
4394 . if \\n[#DOC_TYPE]=3 \{\
4396 . sp |\\n[#DOCHEADER_ADVANCE]u-1v
4398 . L_MARGIN \\n[#DOC_L_MARGIN]u
4399 . LL \\n[#DOC_L_LENGTH]u
4401 . if \\n[#PRINT_STYLE]=1 \{\
4406 . ie \\n[#SINGLE_SPACE] \{ .vs \\n[#DOC_LEAD]u*2u \}
4407 . el \{ .vs \\n[#DOC_LEAD]u \}
4409 . if !'\\*[$TITLE]'' \{ .UNDERSCORE "\\*[$TITLE]\}
4411 . if !'\\*[$SUBTITLE]'' \{\
4412 . ie \\n[#SINGLE_SPACE] \{ .vs \\n[#DOC_LEAD]u*2u \}
4413 . el \{ .vs \\n[#DOC_LEAD]u \}
4414 . PRINT \\*[$SUBTITLE]
4416 . if '\\*[$SUBTITLE]'' \{\
4417 . ALD \\n[#DOC_LEAD]u
4419 . ie !'\\*[$AUTHOR_1]'' \{\
4420 . ie \\n[#SINGLE_SPACE] \{ .vs \\n[#DOC_LEAD]u \}
4421 . el \{ .vs \\n[#DOC_LEAD]u/2u \}
4422 . if !d$SUBTITLE \{\
4423 . ie \\n[#SINGLE_SPACE] \{ .ALD \\n[#DOC_LEAD]u \}
4424 . el \{ .ALD \\n[#DOC_LEAD]u*2u \}
4426 . PRINT \\*[$ATTRIBUTE_STRING]
4427 . nr #AUTHORS \\n[#AUTHOR_NUM]
4428 . nr #NEXT_AUTHOR 0 1
4429 . while \\n[#AUTHORS]>\\n[#NEXT_AUTHOR] \{\
4430 . PRINT \\*[$AUTHOR_\\n+[#NEXT_AUTHOR]]
4432 . if \\n[#AUTHOR_LINES]=1 \{\
4433 . ie \\n[#SINGLE_SPACE] \{ .RLD \\n[#DOC_LEAD]u \}
4434 . el \{ .ALD \\n[#DOC_LEAD]u/2u \}
4437 . vs \\n[#DOC_LEAD]u
4439 . ie !d$SUBTITLE \{\
4440 . ie \\n[#SINGLE_SPACE] \{ .RLD \\n[#DOC_LEAD]u*2u \}
4441 . el \{ .RLD \\n[#DOC_LEAD]u \}
4444 . ie \\n[#SINGLE_SPACE] \{ . \}
4445 . el \{ .RLD \\n[#DOC_LEAD]u \}
4448 . ie \\n[#SINGLE_SPACE] \{ .ALD \\n[#DOC_LEAD]u*2u \}
4449 . el \{ .ALD \\n[#DOC_LEAD]u \}
4450 . UNDERSCORE2 "\\*[$DOC_TYPE]
4451 . if \\n[#SINGLE_SPACE] \{ .ALD \\n[#DOC_LEAD]u \}
4453 . if \\n[#PRINT_STYLE]=2 \{\
4455 . di DOCHEADER_DIVERSION \" This diversion is only
4456 . br \" necessary to find the depth of the
4457 . NAMED_DOCHEADER \" docheader
4460 . nr #DOCHEADER_DEPTH \\n(dn-\\n[#DOCHEADER_LEAD] \"Storing the depth (height) of the diversion
4461 . \"in #DOCHEADER_DEPTH
4462 . rm DOCHEADER_DIVERSION \" Removing the diversion macro
4466 . if !\\n[#DOC_TYPE]=4 \{\
4467 . if \\n[#PRINT_STYLE]=1 \{ .ALD \\n[#DOC_LEAD]u \}
4468 . nr #DOCHEADER_SPACE_ADJ \\n[#DOCHEADER_DEPTH]%\\n[#DOC_LEAD]
4469 . ie !\\n[#DOCHEADER_SPACE_ADJ]=0 \{ .nr #DOCHEADER_EXTRA_SPACE \\n[#DOC_LEAD]-\\n[#DOCHEADER_SPACE_ADJ] \}
4470 . el \{ .nr #DOCHEADER_EXTRA_SPACE 0 \}
4471 . if \\n[#PRINT_STYLE]=2 \{ .ALD (\\n[#DOC_LEAD]u*2u)+\\n[#DOCHEADER_EXTRA_SPACE]u \}
4472 . if \\n[#COLUMNS] \{\
4474 . nr #L_LENGTH_FOR_EPI \\n[#L_LENGTH]
4475 . po \\n[#COL_\\n+[#COL_NUM]_L_MARGIN]u
4476 . LL \\n[#COL_L_LENGTH]u
4482 . rr #DOCHEADER_LEAD
4483 . rr #DOCHEADER_LEAD_ADJ
4486 . rr #DOCHEADER_ADVANCE
4487 . rr #ADVANCE_FROM_TOP
4488 . rr #DOCHEADER_SPACE_ADJ
4489 . rr #DOCHEADER_EXTRA_SPACE
4494 . rm $TOC_TITLE_ITEM
4496 . nr #START_FOR_FOOTERS 1
4499 \# ====================================================================
4501 \# +++MACROS TO CHANGE SOME DEFAULTS+++
4506 \# <none> | <anything> [distance to advance from top of page]
4508 \# Turns printing of document header on or off. If a second argument
4509 \# in units of measure is given, advances that distance from the
4510 \# top of the page without printing the document header.
4512 \# Default is on. If the 1st argument is <anything> (which turns
4513 \# document headers off), the optional 2nd argument may be given
4514 \# (with a unit of measure).
4517 . ie '\\$1'' \{ .nr #DOC_HEADER 1 \}
4519 . if !'\\$2'' \{ .nr #ADVANCE_FROM_TOP (\\$2) \}
4525 \# DOCUMENT HEADER LEADING
4526 \# -----------------------
4528 \# <+|- amount by which to in/decrease leading of doc header>
4530 \# Stores user supplied lead in/decrease in string $DOCHEADER_LEAD_ADJ.
4532 \# A unit of measure must be supplied. Decimal fractions OK.
4533 \# Default is +0, i.e. same as DOC_LEAD.
4535 .MAC DOCHEADER_LEAD END
4536 . ds $DOCHEADER_LEAD_ADJ \\$1
4540 \# DOCHEADER ADVANCE
4541 \# -----------------
4543 \# <docheader start position>
4545 \# Creates register #DOCHEADER_ADVANCE, used in START.
4547 \# Unit of measure required.
4548 \# Default is same as T_MARGIN.
4550 .MAC DOCHEADER_ADVANCE END
4551 . nr #DOCHEADER_ADVANCE (\\$1)
4558 \# <family to use for the document header title>
4560 \# Creates or modifies string $TITLE_FAM.
4562 \# Default is same as running text.
4564 .MAC TITLE_FAMILY END
4565 . ds $TITLE_FAM \\$1
4572 \# <font to use for the document header title>
4574 \# Creates or modifies string $TITLE_FT.
4586 \# <+|- number of points by which to in/decrease title at start
4587 \# of the document (relative to running text)>
4589 \# Creates string $TITLE_SIZE_CHANGE.
4591 \# Must be preceded by a +|- sign, with no space afterwards.
4592 \# Fractional point sizes are allowed.
4593 \# Default is +3.5 for printstyle TYPESET DEFAULT | STORY | NAMED;
4594 \# 4 for TYPESET CHAPTER; +0 for TYPEWRITE.
4597 . ds $TITLE_SIZE_CHANGE \\$1
4601 \# CHAPTER TITLE FAMILY
4602 \# --------------------
4604 \# <family to use for the chapter title, if there is one>
4606 \# Creates or modifies string $CHAPTER_TITLE_FAM.
4608 \# Default isame as running text.
4610 .MAC CHAPTER_TITLE_FAMILY END
4611 . ds $CHAPTER_TITLE_FAM \\$1
4615 \# CHAPTER TITLE FONT
4616 \# ------------------
4618 \# <font to use for the chapter title, if there is one>
4620 \# Creates or modifies string $CHAPTER_TITLE_FT.
4622 \# Default is bold italic for TYPESET; varies in TYPEWRITE between
4623 \# caps and underscored, depending on whether chapter title stands
4624 \# alone or has CHAPTER # above it.
4626 .MAC CHAPTER_TITLE_FONT END
4627 . ds $CHAPTER_TITLE_FT \\$1
4631 \# CHAPTER TITLE SIZE
4632 \# ------------------
4634 \# <+|- number of points by which to in/decrease title at start
4635 \# of the document (relative to running text)>
4637 \# Creates string $CHAPTER_TITLE_SIZE_CHANGE.
4639 \# Must be preceded by a +|- sign, with no space afterwards.
4640 \# Fractional point sizes are allowed.
4641 \# Default is +4 for printstyle TYPESET
4643 .MAC CHAPTER_TITLE_SIZE END
4644 . ds $CHAPTER_TITLE_SIZE_CHANGE \\$1
4651 \# <family to use for the document header title>
4653 \# Creates or modifies string $SUBTITLE_FAM.
4655 \# Default is same as running text.
4657 .MAC SUBTITLE_FAMILY END
4658 . ds $SUBTITLE_FAM \\$1
4665 \# <font to use for the document header title>
4667 \# Creates or modifies string $SUBTITLE_FT.
4669 \# Default is same as running text.
4671 .MAC SUBTITLE_FONT END
4672 . ds $SUBTITLE_FT \\$1
4679 \# <+|- number of points by which to in/decrease subtitle at start
4680 \# of the document (relative to running text)>
4682 \# Creates or modifies string $SUBTITLE_SIZE_CHANGE.
4684 \# Must be preceded by a +|- sign with no space afterwards.
4685 \# Fractional point sizes are allowed.
4688 .MAC SUBTITLE_SIZE END
4689 . ds $SUBTITLE_SIZE_CHANGE \\$1
4696 \# <family to use for author in document header>
4698 \# Creates or modifies string $AUTHOR_FAM.
4700 \# Default is same as running text.
4702 .MAC AUTHOR_FAMILY END
4703 . ds $AUTHOR_FAM \\$1
4710 \# <font to use for author in document header>
4712 \# Creates or modifies string $AUTHOR_FT.
4714 \# Default is italic.
4716 .MAC AUTHOR_FONT END
4717 . ds $AUTHOR_FT \\$1
4724 \# <+|- number of points by which to in/decrease author at start
4727 \# Creates or modifies string $AUTHOR_SIZE_CHANGE.
4729 \# Must be preceded by a +|- sign with no space afterwards.
4730 \# Fractional point sizes are allowed.
4731 \# Default is same as running text.
4733 .MAC AUTHOR_SIZE END
4734 . ds $AUTHOR_SIZE_CHANGE \\$1
4741 \# <family to use for the document type string>
4743 \# Creates or modifies string $DOCTYPE_FAM.
4745 \# Default is same as running text.
4747 .MAC DOCTYPE_FAMILY END
4748 . ds $DOCTYPE_FAM \\$1
4755 \# <font to use for the document type string>
4757 \# Creates or modifies string $DOCTYPE_FT.
4759 \# Default is bold italic.
4761 .MAC DOCTYPE_FONT END
4762 . ds $DOCTYPE_FT \\$1
4769 \# <+|- number of points by which to in/decrease the document
4770 \# type string (relative to running text)>
4772 \# Creates or modifies string $DOCTYPE_SIZE_CHANGE.
4774 \# Must be preceded by a +|- sign with no space afterwards.
4775 \# Fractional point sizes are allowed.
4776 \# Default is +3 for TYPESET; 0 for TYPEWRITE.
4778 .MAC DOCTYPE_SIZE END
4779 . ds $DOCTYPE_SIZE_CHANGE \\$1
4783 \# DOCUMENT LEFT MARGIN
4784 \# --------------------
4786 \# <left margin of document>
4788 \# Creates or modifies register #DOC_L_MARGIN.
4790 \# Affects EVERYTHING on the page.
4792 .MAC DOC_LEFT_MARGIN END
4794 . nr #DOC_L_MARGIN (\\$1)
4795 . L_MARGIN \\n[#DOC_L_MARGIN]u
4799 \# DOCUMENT RIGHT MARGIN
4800 \# ---------------------
4802 \# <right margin of document>
4804 \# Creates or modifies register #DOC_R_MARGIN.
4806 \# Affects EVERYTHING on the page.
4808 .MAC DOC_RIGHT_MARGIN END
4810 . nr #DOC_R_MARGIN (\\$1)
4811 . R_MARGIN \\n[#DOC_R_MARGIN]
4812 . nr #DOC_L_LENGTH \\n[#L_LENGTH]
4816 \# DOCUMENT LINE LENGTH
4817 \# --------------------
4819 \# <line length of document>
4821 \# Creates or modifies string $DOC_L_LENGTH.
4823 \# Affects EVERYTHING on the page.
4825 .MAC DOC_LINE_LENGTH END
4827 . nr #DOC_L_LENGTH (\\$1)
4828 . LL \\n[#DOC_L_LENGTH]u
4836 \# <family of running text>
4838 \# Creates or modifies string $DOC_FAM.
4840 \# Affects everything EXCEPT headers and footers.
4845 . FAMILY \\*[$DOC_FAM]
4846 . TITLE_FAMILY \\*[$DOC_FAM]
4847 . SUBTITLE_FAMILY \\*[$DOC_FAM]
4848 . AUTHOR_FAMILY \\*[$DOC_FAM]
4849 . DOCTYPE_FAMILY \\*[$DOC_FAM]
4850 . HEAD_FAMILY \\*[$DOC_FAM]
4851 . SUBHEAD_FAMILY \\*[$DOC_FAM]
4852 . QUOTE_FAMILY \\*[$DOC_FAM]
4853 . BLOCKQUOTE_FAMILY \\*[$DOC_FAM]
4854 . EPIGRAPH_FAMILY \\*[$DOC_FAM]
4855 . HDRFTR_FAMILY \\*[$DOC_FAM]
4856 . PAGENUM_FAMILY \\*[$DOC_FAM]
4860 \# DOCUMENT POINT SIZE
4861 \# -------------------
4863 \# <point size of running text>
4865 \# Creates or modifies register #DOC_PT_SIZE.
4867 \# DOC_PT_SIZE is the basis for calculating all type sizes in
4870 .MAC DOC_PT_SIZE END
4871 . if \\n[#IGNORE] \{ .return \}
4874 . nr #DOC_PT_SIZE \\n[#PT_SIZE]
4881 \# <lead (".vs") of running text> [ADJUST]
4883 \# Creates or modifies register #DOC_LEAD. If the optional
4884 \# ADJUST argument is given, adjusts leading so that the last
4885 \# line of text falls exactly on #B_MARGIN.
4887 \# DOC_LEAD is the basis for calculating all leading changes in
4888 \# a document. Default for TYPESET is 16; 24 for TYPEWRITE.
4890 \# Because the visible bottom or footer margin of a page depends
4891 \# on the overall document lead supplied by the register #DOC_LEAD,
4892 \# DOC_LEAD, in the body of a document, should always be associated
4893 \# with the start of a new page (in other words, just before or
4894 \# just after a manual NEWPAGE).
4897 . if \\n[#IGNORE] \{ .return \}
4900 . nr #DOC_LEAD \\n[#LEAD]
4901 . if '\\$2'ADJUST' \{ .TRAPS \}
4904 \# ADJUST DOCUMENT LEAD
4905 \# --------------------
4907 \# <none> | <anything>
4909 \# Adjusts document lead so that the last line of text falls exactly
4912 .MAC DOC_LEAD_ADJUST END
4913 . ie '\\$1'' \{ .nr #ADJ_DOC_LEAD 1 \}
4914 . el \{ .nr #ADJ_DOC_LEAD 0 \}
4923 \# Advances to the next "legal" baseline.
4925 \# If a user plays around with spacing in a doc (say, with ALD),
4926 \# it isn't easy to get mom back on track so she can achieve
4927 \# perfectly flush bottom margins. Any time SHIM is used, it
4928 \# ensures that the next output line falls on a legal baseline.
4931 . nr #CURRENT_V_POS \\n(.d
4932 . nr #LEGAL_BASELINE \\n[#T_MARGIN] \\n[#DOC_LEAD]
4933 . while \\n+[#LEGAL_BASELINE]<\\n[#CURRENT_V_POS] \{ . \}
4934 . nr #SHIM \\n[#LEGAL_BASELINE]-\\n[#CURRENT_V_POS]
4942 \# L | LEFT | R | RIGHT | C | CENTER | CENTRE | J | JUSTIFY
4944 \# Creates or modifies string $DOC_QUAD.
4946 \# While QUAD (from the typesetting macros) can be used before START
4947 \# to change the default document quad, DOC_QUAD *must* be used after
4948 \# the START macro has been invoked.
4950 \# Default is LEFT for printstyle TYPEWRITE, JUSTIFY for printstyle
4955 . QUAD \\*[$DOC_QUAD]
4958 \# ====================================================================
4960 \# +++INTERNATIONALIZATION+++
4965 \# <what goes in the "by" slot before author in the document header>
4967 \# Creates or modifies string $ATTRIBUTE_STRING.
4969 \# Default is "by". A blank string ("") may be used if no
4970 \# attribution is desired.
4972 .MAC ATTRIBUTE_STRING END
4973 . ds $ATTRIBUTE_STRING \\$1
4980 \# <what to print any time the word "chapter" is required>
4982 \# Creates or modifies string $CHAPTER_STRING.
4984 \# Default is "chapter".
4986 .MAC CHAPTER_STRING END
4987 . ds $CHAPTER_STRING \\$1
4994 \# <what to print any time the word "draft" is required>
4996 \# Creates or modifies string $DRAFT_STRING.
4998 \# Default is "draft".
5000 .MAC DRAFT_STRING END
5001 . ds $DRAFT_STRING \\$1
5008 \# <what to print any time the word "revision" is required>
5010 \# Creates or modifies string $REVISION_STRING.
5012 \# Default is "revision".
5014 .MAC REVISION_STRING END
5015 . ds $REVISION_STRING \\$1
5022 \# <what to print with the finis macro>
5024 \# Creates or modifies string $FINIS_STRING.
5026 \# Default is "END".
5028 .MAC FINIS_STRING END
5031 . ds $FINIS_STRING \\$1
5035 \# ====================================================================
5037 \# +++RECTO/VERSO+++
5042 \# <none> | <anything>
5044 \# Switches HDRFTR_LEFT and HDRFTR_RIGHT on alternate pages. Also
5045 \# switches page numbers left and right if either is chosen rather
5046 \# than the default centered page numbers. Switches left and right
5047 \# margins if differing values have been entered.
5051 .MAC RECTO_VERSO END
5052 . ie '\\$1'' \{ .nr #RECTO_VERSO 1 \}
5053 . el \{ .nr #RECTO_VERSO 0 \}
5056 \# ====================================================================
5063 \# <family to use for epigraphs>
5065 \# Creates or modifies string $EPI_FAM.
5067 \# Default is same as running text.
5069 .MAC EPIGRAPH_FAMILY END
5077 \# <font to use for epigraphs>
5079 \# Creates or modifies string $EPI_FT.
5081 \# Default is same as running text.
5083 .MAC EPIGRAPH_FONT END
5091 \# <-|+ number of points by which to de/increase point size of epigraphs
5092 \# (relative to running text)>
5094 \# Creates or modifies string $EPI_SIZE_CHANGE.
5096 \# Must be preceded by a - or + sign with no space afterwards.
5097 \# Fractional point sizes are allowed. Default -1.5 for printstyle
5098 \# TYPESET; +0 for TYPEWRITE.
5100 .MAC EPIGRAPH_SIZE END
5101 . ds $EPI_SIZE_CHANGE \\$1
5108 \# L | LEFT | J | JUSTIFY
5110 \# Creates or modifies string $EPI_QUAD.
5112 \# Default is $DOC_QUAD when BLOCK argument is passed to EPIGRAPH.
5114 .MAC EPIGRAPH_QUAD END
5122 \# <value by which to multiply PP_INDENT for block epigraphs>
5124 \# Creates or modifies register #EPI_OFFSET_VALUE.
5126 \# Default is 2 for TYPEWRITE, 3 for TYPESET.
5128 .MAC EPIGRAPH_INDENT END
5129 . nr #EPI_OFFSET_VALUE \\$1
5133 \# EPIGRAPH AUTOLEAD
5134 \# -----------------
5136 \# <amount of lead to add to the epigraph ps for epigraph leading>
5138 \# Creates or modifies register #EPI_AUTOLEAD.
5140 \# Default is 2 (for TYPESET; TYPEWRITE doesn't require this).
5142 .MAC EPIGRAPH_AUTOLEAD END
5143 . nr #EPI_AUTOLEAD \\$1
5150 \# BLOCK | <anything>
5152 \# Places an epigraph before the document's text, after the
5153 \# document header, or after a HEAD.
5155 \# #EPIGRAPH 1 = centered; 2 = block
5157 \# By default, epigraphs are centered, allowing the user
5158 \# to input them on a line per line basis. To change this
5159 \# behaviour, the user can supply the argument BLOCK, which
5160 \# will produce indented, filled text similar to BLOCKQUOTE.
5162 \# If a block epigraph contains more than one para, ALL paras of
5163 \# the epigraph must be preceded by PP. Otherwise, PP is optional.
5168 . if \\n[#START] \{\
5169 . if \\n[#PRINT_STYLE]=1 \{\
5170 . if \\n[#AUTHOR_LINES]=1 \{ .ALD \\n[#DOC_LEAD]u \}
5176 . ll \\n[#L_LENGTH]u
5179 . if \\n[#COLUMNS] \{\
5180 . ie \\n[#START] \{\
5181 . ll \\n[#DOC_L_LENGTH]u
5185 . ll \\n[#COL_L_LENGTH]u
5190 . if \\n[#PRINT_STYLE]=1 \{\
5193 . if '\\*[$EPI_FT]'I' \{\
5197 . ie \\n[#SINGLE_SPACE] \{ .vs \\n[#DOC_LEAD]u \}
5198 . el \{ .vs \\n[#DOC_LEAD]u/2u \}
5199 . nr #EPI_LEAD \\n[#LEAD]
5200 . nr #EPI_LEAD_DIFF \\n[#DOC_LEAD]-\\n[#EPI_LEAD]
5202 . if \\n[#PRINT_STYLE]=2 \{\
5203 . FAMILY \\*[$EPI_FAM]
5205 . PT_SIZE \\n[#DOC_PT_SIZE]u\\*[$EPI_SIZE_CHANGE]
5206 . AUTOLEAD \\n[#EPI_AUTOLEAD]
5207 . nr #EPI_LEAD \\n[#LEAD]
5208 . nr #EPI_LEAD_DIFF \\n[#DOC_LEAD]-\\n[#EPI_LEAD]
5214 . ie '\\$1'BLOCK' \{\
5217 . ie \\n[#START] \{\
5218 . ie \\n[#COLUMNS] \{\
5219 . ll \\n[#L_LENGTH_FOR_EPI]u-(\\n[#PP_INDENT]u*(\\n[#EPI_OFFSET_VALUE]u*2u))
5223 . ll \\n[#L_LENGTH]u-(\\n[#PP_INDENT]u*(\\n[#EPI_OFFSET_VALUE]u*2u))
5228 . ll \\n[#L_LENGTH]u-(\\n[#PP_INDENT]u*(\\n[#EPI_OFFSET_VALUE]u*2u))
5230 . if \\n[#COLUMNS] \{\
5231 . ll \\n[#COL_L_LENGTH]u-(\\n[#PP_INDENT]u*(\\n[#EPI_OFFSET_VALUE]u*2u))
5236 . if \\n[#PRINT_STYLE]=1 \{\
5239 . if '\\*[$EPI_FT]'I' \{\
5243 . ie \\n[#SINGLE_SPACE] \{ .vs \\n[#DOC_LEAD]u \}
5244 . el \{ .vs \\n[#DOC_LEAD]u/2u \}
5247 . nr #EPI_LEAD \\n[#LEAD]
5248 . nr #EPI_LEAD_DIFF \\n[#DOC_LEAD]-\\n[#EPI_LEAD]
5252 . if \\n[#PRINT_STYLE]=2 \{\
5253 . FAMILY \\*[$EPI_FAM]
5255 . PT_SIZE \\n[#DOC_PT_SIZE]u\\*[$EPI_SIZE_CHANGE]
5256 . AUTOLEAD \\n[#EPI_AUTOLEAD]
5257 . QUAD \\*[$EPI_QUAD]
5259 . nr #EPI_LEAD \\n[#LEAD]
5260 . nr #EPI_LEAD_DIFF \\n[#DOC_LEAD]-\\n[#EPI_LEAD]
5277 \# Ends diversion started in EPIGRAPH. Makes spacing
5278 \# adjustments to compensate for the difference between epigraph
5279 \# leading and overall document leading, so that the bottom of
5280 \# the pages remain flush.
5282 \# In addition to its usual place at the beginning of a
5283 \# document, EPIGRAPH may also be used after HEAD.
5285 .MAC DO_EPIGRAPH END
5290 . nr #EPI_DEPTH \\n[#DIVER_DEPTH]-\\n[#EPI_LEAD]
5291 . nr #EPI_LINES \\n[#EPI_DEPTH]/\\n[#EPI_LEAD]
5292 . ie \\n[#START] \{\
5293 . nr #EPI_WHITESPACE (\\n[#DOC_LEAD]*\\n[#EPI_LINES])-\\n[#EPI_DEPTH]
5294 . while \\n[#EPI_WHITESPACE]>\\n[#DOC_LEAD] \{ .nr #EPI_WHITESPACE -\\n[#DOC_LEAD] \}
5295 . if \\n[#PRINT_STYLE]=2 \{\
5296 . RLD \\n[#DOC_LEAD]u
5297 . if \\n[#EPI_WHITESPACE]<\\n[#DOC_LEAD] \{\
5298 . ALD \\n[#EPI_LEAD_DIFF]u+(\\n[#EPI_WHITESPACE]u/2u)
5300 . if \\n[#EPI_WHITESPACE]>\\n[#DOC_LEAD] \{\
5301 . ALD \\n[#EPI_LEAD_DIFF]u+(\\n[#EPI_WHITESPACE]u/2u)-\\n[#DOC_LEAD]u
5306 . ie \\n[#EPI_DEPTH]<\\n[#TRAP_DISTANCE] \{\
5308 . nr #EPI_WHITESPACE (\\n[#DOC_LEAD]*\\n[#EPI_LINES])-\\n[#EPI_DEPTH]
5309 . while \\n[#EPI_WHITESPACE]>\\n[#DOC_LEAD] \{ .nr #EPI_WHITESPACE -\\n[#DOC_LEAD] \}
5310 . ie \\n[#PRINT_STYLE]=1 \{\
5311 . if \\n[#EPI_WHITESPACE]=\\n[#DOC_LEAD] \{ .ALD \\n[#EPI_WHITESPACE]u/2u \}
5314 . if \\n[#EPI_WHITESPACE]<\\n[#DOC_LEAD] \{\
5315 . ALD \\n[#EPI_LEAD_DIFF]u+(\\n[#EPI_WHITESPACE]u/2u)
5317 . if \\n[#EPI_WHITESPACE]>\\n[#DOC_LEAD] \{\
5318 . ALD \\n[#EPI_LEAD_DIFF]u+(\\n[#EPI_WHITESPACE]u/2u)-\\n[#DOC_LEAD]u
5323 . nr #EPI_LINES_TO_TRAP 0 1
5324 . while \\n[#EPI_LEAD]*\\n+[#EPI_LINES_TO_TRAP]<\\n[#TRAP_DISTANCE] \{ .nr #LOOP 1 \}
5325 . nr #EPI_LINES_TO_TRAP -1
5326 . nr #EPI_WHITESPACE (\\n[#EPI_LINES_TO_TRAP]*\\n[#DOC_LEAD])-(\\n[#EPI_LINES_TO_TRAP]*\\n[#EPI_LEAD])
5327 . while \\n[#EPI_WHITESPACE]>\\n[#DOC_LEAD] \{ .nr #EPI_WHITESPACE -\\n[#DOC_LEAD] \}
5328 . if \\n[#EPI_WHITESPACE]<\\n[#DOC_LEAD] \{ .ALD \\n[#EPI_WHITESPACE]u \}
5329 . if \\n[#EPI_WHITESPACE]>\\n[#DOC_LEAD] \{ .ALD \\n[#EPI_WHITESPACE]u-\\n[#DOC_LEAD]u \}
5332 . if \\n[#EPIGRAPH]=1 \{\
5333 . po \\n[#L_MARGIN]u
5334 . if \\n[#COLUMNS] \{ .po \\n[#COL_\\n[#COL_NUM]_L_MARGIN]u \}
5336 . if \\n[#EPIGRAPH]=2 \{\
5337 . nr #EPI_OFFSET \\n[#L_MARGIN]+(\\n[#PP_INDENT]*\\n[#EPI_OFFSET_VALUE])
5338 . if \\n[#COLUMNS] \{\
5339 . nr #EPI_OFFSET \\n[#COL_\\n[#COL_NUM]_L_MARGIN]+(\\n[#PP_INDENT]*\\n[#EPI_OFFSET_VALUE])
5341 . po \\n[#EPI_OFFSET]u
5346 . ie \\n[#START] \{\
5347 . if \\n[#PRINT_STYLE]=1 \{\
5348 . ie \\n[#SINGLE_SPACE] \{ .ALD \\n[#DOC_LEAD]u \}
5350 . ie \\n[#EPI_LINES]%2=1 \{ .ALD \\n[#DOC_LEAD]u \}
5351 . el \{ .ALD \\n[#DOC_LEAD]u/2u \}
5354 . if \\n[#PRINT_STYLE]=2 \{\
5355 . if \\n[#EPI_WHITESPACE]<\\n[#DOC_LEAD] \{\
5356 . ALD \\n[#EPI_WHITESPACE]u/2u
5358 . if \\n[#EPI_WHITESPACE]>\\n[#DOC_LEAD] \{\
5359 . ALD (\\n[#EPI_WHITESPACE]u/2u)-\\n[#DOC_LEAD]u
5365 . ie \\n[#EPI_FITS] \{\
5366 . ie \\n[#FN_FOR_EPI] \{\
5367 . nr #EPI_LINES_TO_END 1
5368 . nr #EPI_WHITESPACE (\\n[#EPI_LINES_TO_END]*\\n[#DOC_LEAD])-(\\n[#EPI_LINES_TO_END]*\\n[#EPI_LEAD])
5369 . while \\n[#EPI_WHITESPACE]>\\n[#DOC_LEAD] \{ .nr #EPI_WHITESPACE -\\n[#DOC_LEAD] \}
5370 . ALD \\n[#EPI_WHITESPACE]u-(\\n[#DOC_LEAD]u-\\n[#EPI_LEAD]u)
5373 . ie \\n[#PRINT_STYLE]=1 \{\
5374 . if \\n[#EPI_WHITESPACE]=\\n[#DOC_LEAD] \{ .ALD \\n[#EPI_WHITESPACE]u \}
5377 . if \\n[#EPI_WHITESPACE]<\\n[#DOC_LEAD] \{\
5378 . ALD \\n[#EPI_WHITESPACE]u/2u
5380 . if \\n[#EPI_WHITESPACE]>\\n[#DOC_LEAD] \{\
5381 . ALD (\\n[#EPI_WHITESPACE]u/2u)-\\n[#DOC_LEAD]u
5387 . nr #EPI_LINES_TO_END \\n[#EPI_LINES]-\\n[#EPI_LINES_TO_TRAP]
5388 . if \\n[#LOOP] \{. nr #EPI_LINES_TO_END +1 \}
5390 . nr #EPI_WHITESPACE (\\n[#EPI_LINES_TO_END]*\\n[#DOC_LEAD])-(\\n[#EPI_LINES_TO_END]*\\n[#EPI_LEAD])
5391 . while \\n[#EPI_WHITESPACE]>\\n[#DOC_LEAD] \{ .nr #EPI_WHITESPACE -\\n[#DOC_LEAD] \}
5392 . ALD \\n[#EPI_WHITESPACE]u-(\\n[#DOC_LEAD]u-\\n[#EPI_LEAD]u)
5393 . if \\n[#PRINT_STYLE]=1 \{\
5394 . if !\\n[#SINGLE_SPACE] \{\
5395 . nr #EPI_LINES_EVEN \\n[#EPI_LINES_TO_END]%2
5396 . ie \\n[#EPI_LINES_EVEN] \{ .ALD .5v \}
5398 . rr #EPI_LINES_EVEN
5405 . ALD \\n[#DOC_LEAD]u
5406 . QUAD \\*[$DOC_QUAD]
5407 . po \\n[#L_MARGIN]u
5408 . if \\n[#COLUMNS] \{ .po \\n[#COL_\\n[#COL_NUM]_L_MARGIN]u \}
5409 . if \\n[#START] \{\
5410 . if \\n[#COLUMNS] \{\
5411 . po \\n[#COL_\\n[#COL_NUM]_L_MARGIN]u
5417 \# ====================================================================
5419 \# +++FINIS MACRO+++
5426 \# Deposits --END-- at the end of a document.
5430 . if \\n[#TAB_ACTIVE] \{ .TQ \}
5431 . if \\n[#INDENT_ACTIVE] \{ .IQ CLEAR \}
5432 . if \\n[#FOOTERS_ON] \{\
5433 . nr #FOOTERS_WERE_ON 1
5436 . if \\n[#PAGINATE] \{\
5437 . if \\n[#PAGE_NUM_V_POS]=2 \{\
5438 . nr #PAGINATION_WAS_ON 1
5442 . nr #EM_ADJUST (1m/8)
5443 . if \\n[#COLUMNS] \{ .po \\n[#COL_\\n[#COL_NUM]_L_MARGIN]u \}
5444 . ALD \\n[#DOC_LEAD]u
5446 . if \\n[#PRINT_STYLE]=1 \{ .PRINT "--\\*[$FINIS_STRING]--\}
5447 . if \\n[#PRINT_STYLE]=2 \{\
5448 . PRINT "\v'-\\n[#EM_ADJUST]u'\(em\v'+\\n[#EM_ADJUST]u'\\*[$FINIS_STRING]\v'-\\n[#EM_ADJUST]u'\*[FU1]\(em
5452 \# ====================================================================
5454 \# +++HEADERS/FOOTERS+++
5456 \# Define a string so that the current page number can be incorporated
5457 \# into the strings for hdrftr left, right, and center. NOTE: This is
5458 \# not the same thing as using the shortform # in hdrftr strings.
5460 .ds PAGE# \En[#PAGENUMBER]
5466 \# <family to use in header/footers>
5468 \# Creates or modifies string $HDRFTR_FAM.
5470 \# Default is same as running text.
5472 .MAC HDRFTR_FAMILY END
5473 . ds $HDRFTR_FAM \\$1
5480 \# <+|-number of points by which to in/decrease point size of
5481 \# header/footers (relative to running text)>
5483 \# Creates or modifies string $HDRFTR_SIZE_CHANGE.
5485 \# Must be preceded by a +|- sign. No space afterwards.
5486 \# Fractional point sizes are allowed. Default is +0.
5488 \# By default, header/footers print the author .5 points smaller
5489 \# than the base point size of running text, center titles
5490 \# (Chapter, Draft, Revision, etc.) .5 points smaller
5491 \# than running text (in italics), and the document title 2 full
5492 \# points smaller than running text (in caps). The HDRFTR_SIZE
5493 \# macro changes the overall size for all three parts while
5494 \# maintaining the internal size changes.
5496 \# In other words, if the user likes the header/footers but wants
5497 \# them a bit bigger or a bit smaller, s/he should use HDRFTR_SIZE.
5499 .MAC HDRFTR_SIZE END
5500 . ds $HDRFTR_SIZE_CHANGE \\$1
5507 \# <amount of space between header/footer and header/footer rule>
5509 \# Creates or modifies register #HDRFTR_RULE_GAP to hold amount
5510 \# of space between header/footer and header/footer rule.
5514 .MAC HDRFTR_RULE_GAP END
5515 . nr #HDRFTR_RULE_GAP (\\$1)
5522 \# <what to put in the left position of page header/footers>
5524 \# Creates or modifies string $HDRFTR_LEFT.
5525 \# Creates register #USER_DEF_HDRFTR_LEFT, which, if 1,
5526 \# overrides the $HDRFTR_LEFT string created by default
5529 \# Especially useful if doc has more than one author, and a list
5530 \# of authors by last name is desired in header/footers.
5531 \# Default is author.
5533 \# If the argument is the # character, simply prints the current
5536 \# If the user wants to *incorporate* the page number into the string,
5537 \# \*[PAGE#] must be used. For example, if the user wants to put
5538 \# an elipsis before the page number in the string, s/he should use
5539 \# ...\*[PAGE#], not ...#
5541 .MAC HDRFTR_LEFT END
5542 . nr #USER_DEF_HDRFTR_LEFT 1
5543 . ds $HDRFTR_LEFT \\$1
5547 \# HDRFTR LEFT FAMILY
5548 \# ------------------
5550 \# <family of header/footer left string>
5552 \# Creates or modifies string $HDRFTR_LEFT_FAM.
5554 .MAC HDRFTR_LEFT_FAMILY END
5555 . ds $HDRFTR_LEFT_FAM \\$1
5562 \# <font of header/footer left string>
5564 \# Creates or modifies string $HDRFTR_LEFT_FT.
5566 .MAC HDRFTR_LEFT_FONT END
5567 . ds $HDRFTR_LEFT_FT \\$1
5574 \# <+|- number of points to in/decrease size of left string in
5575 \# header/footers (relative to running text)>
5577 \# Creates or modifies string HDRFTR_LEFT_SIZE_CHANGE.
5579 \# Must be preceded by a +|- sign. No space afterwards.
5580 \# Fractional point sizes are allowed.
5581 \# Default is -.5 for printstyle TYPESET; if all caps, -2
5582 \# Has no effect in TYPEWRITE.
5584 .MAC HDRFTR_LEFT_SIZE END
5585 . ds $HDRFTR_LEFT_SIZE_CHANGE \\$1
5592 \# <none> | <anything>
5594 \# Turns capitalisation of $HDRFTR_LEFT (typically, the author of
5595 \# the document) on or off.
5599 .MAC HDRFTR_LEFT_CAPS END
5601 . nr #HDRFTR_LEFT_CAPS 1
5604 . nr #HDRFTR_LEFT_CAPS 0
5605 . ds $HDRFTR_RIGHT_SIZE_CHANGE +0
5613 \# <what to put in the centre position of page header/footers>
5615 \# Creates or modifies string $HDRFTR_CENTER.
5616 \# Creates register #USER_DEF_HDRFTR_CENTER, which, if 1,
5617 \# overrides the $HDRFTR_CENTER string created by default
5620 \# Default is document type if DOCTYPE NAMED, Chapter # if DOCTYPE
5621 \# CHAPTER, draft and revision number if COPYSTYLE DRAFT.
5623 \# If the argument is the # character, simply prints the current
5626 \# If the user wants to *incorporate* the page number into the string,
5627 \# \*[PAGE#] must be used. For example, if the user wants to put
5628 \# an elipsis before the page number in the string, s/he should use
5629 \# ...\*[PAGE#], not ...#
5631 .MAC HDRFTR_CENTER END
5632 . nr #USER_DEF_HDRFTR_CENTER 1
5633 . if '\\$0'FOOTER_CENTER' \{\
5634 . ds $HDRFTR_CENTER_OLD \\*[$HDRFTR_CENTER]
5635 . ds $HDRFTR_CENTER_NEW \\$1
5637 . if '\\$0'FOOTER_CENTRE' \{\
5638 . ds $HDRFTR_CENTER_OLD \\*[$HDRFTR_CENTER]
5639 . ds $HDRFTR_CENTER_NEW \\$1
5641 . ds $HDRFTR_CENTER \\$1
5645 \# HDRFTR CENTER FAMILY
5646 \# --------------------
5648 \# <family of header/footer center string>
5650 \# Creates or modifies string $HDRFTR_CENTER_FAM.
5652 .MAC HDRFTR_CENTER_FAMILY END
5653 . ds $HDRFTR_CENTER_FAM \\$1
5657 \# HDRFTR CENTER FONT
5658 \# ------------------
5660 \# <font of header/footer center string>
5662 \# Creates or modifies string $HDRFTR_CENTER_FT.
5664 .MAC HDRFTR_CENTER_FONT END
5665 . ds $HDRFTR_CENTER_FT \\$1
5669 \# HDRFTR CENTER SIZE
5670 \# ------------------
5672 \# <+|- number of points to in/decrease size of centre string in
5673 \# header/footers (relative to header/footer size)>
5675 \# Creates string HDRFTR_CENTER_SIZE_CHANGE.
5677 \# Must be preceded by a +|- sign. No space afterwards.
5678 \# Fractional point sizes are allowed.
5679 \# Default is -.5 for printstyle TYPESET; if all caps, -2
5680 \# Has no effect in TYPEWRITE.
5682 .MAC HDRFTR_CENTER_SIZE END
5683 . ds $HDRFTR_CENTER_SIZE_CHANGE \\$1
5687 \# HDRFTR CENTER CAPS
5688 \# ------------------
5690 \# <none> | <anything>
5692 \# Turns capitalisation of $HDRFTR_CENTER (typically, doctype of
5693 \# the document) on or off.
5697 .MAC HDRFTR_CENTER_CAPS END
5699 . nr #HDRFTR_CENTER_CAPS 1
5702 . nr #HDRFTR_CENTER_CAPS 0
5703 . ds $HDRFTR_CENTER_SIZE_CHANGE +0
5708 \# HDRFTR CENTER PADDING
5709 \# ---------------------
5711 \# LEFT | RIGHT <amount of padding to put left or right of hdrftr
5714 \# Creates or modifies registers #HDRFTR_CTR_PAD_LEFT or
5715 \# #HDRFTR_CTR_PAD_RIGHT.
5717 \# By default, the HDRFTR_CENTER string is centered on the doc
5718 \# line length. Long titles or long author names can screw up
5719 \# visual centering, or create overprints. This macro allows the
5720 \# user to pad the center string by the specified amount of space
5721 \# to fix these problems. Use only one of LEFT or RIGHT.
5723 \# A unit of measure is required.
5725 .MAC HDRFTR_CENTER_PAD END
5726 . if '\\$1'LEFT' \{\
5727 . nr #HDRFTR_CTR_PAD_LEFT (\\$2)
5729 . if '\\$1'RIGHT' \{\
5730 . nr #HDRFTR_CTR_PAD_RIGHT (\\$2)
5735 \# SWITCH HDRFTR CENTER PADDING SIDE - support macro
5736 \# --------------------------------
5740 \# Switches the padding side of hdrftr center padding.
5742 \# Required to keep spacing around hdrftr string constant
5743 \# in recto/verso documents.
5745 .MAC SWITCH_HDRFTR_CENTER_PAD END
5746 . nr #HDRFTR_CTR_PAD_TMP \\n[#HDRFTR_CTR_PAD_LEFT]
5747 . HDRFTR_CENTER_PAD LEFT \\n[#HDRFTR_CTR_PAD_RIGHT]u
5748 . HDRFTR_CENTER_PAD RIGHT \\n[#HDRFTR_CTR_PAD_TMP]u
5755 \# <what to put in the right position of page header/footers>
5757 \# Creates or modifies string $HDRFTR_RIGHT.
5758 \# Creates register #USER_DEF_HDRFTR_RIGHT, which, if 1,
5759 \# overrides the $HDRFTR_RIGHT string created by default
5762 \# Default is document title.
5764 \# If the argument is the # character, simply prints the current
5767 \# If the user wants to *incorporate* the page number into the string,
5768 \# \*[PAGE#] must be used. For example, if the user wants to put
5769 \# an elipsis before the page number in the string, s/he should use
5770 \# ...\*[PAGE#], not ...#
5772 .MAC HDRFTR_RIGHT END
5773 . nr #USER_DEF_HDRFTR_RIGHT 1
5774 . ds $HDRFTR_RIGHT \\$1
5778 \# HDRFTR RIGHT FAMILY
5779 \# -------------------
5781 \# <family of header/footer right string>
5783 \# Creates or modifies string $HDRFTR_RIGHT_FAM.
5785 .MAC HDRFTR_RIGHT_FAMILY END
5786 . ds $HDRFTR_RIGHT_FAM \\$1
5790 \# HDRFTR RIGHT FONT
5791 \# -----------------
5793 \# <font of header/footer right string>
5795 \# Creates or modifies string $HDRFTR_RIGHT_FT.
5797 .MAC HDRFTR_RIGHT_FONT END
5798 . ds $HDRFTR_RIGHT_FT \\$1
5802 \# HDRFTR RIGHT SIZE
5803 \# -----------------
5805 \# <+|- number of points to in/decrease size of right string in
5806 \# header/footers (relative to header/footer size)>
5808 \# Creates or modifies string HDRFTR_RIGHT_SIZE_CHANGE.
5810 \# Must be preceded by a +|- sign. No space afterwards.
5811 \# Fractional point sizes are allowed.
5812 \# Default is -2 for printstyle TYPESET if all caps; otherwise -.5
5813 \# Has no effect in TYPEWRITE.
5815 .MAC HDRFTR_RIGHT_SIZE END
5816 . ds $HDRFTR_RIGHT_SIZE_CHANGE \\$1
5820 \# HDRFTR RIGHT CAPS
5821 \# -----------------
5823 \# <none> | <anything>
5825 \# Turns capitalisation of $HDRFTR_RIGHT (typically, the title of
5826 \# the document) on or off.
5830 .MAC HDRFTR_RIGHT_CAPS END
5832 . nr #HDRFTR_RIGHT_CAPS 1
5835 . nr #HDRFTR_RIGHT_CAPS 0
5836 . ds $HDRFTR_RIGHT_SIZE_CHANGE +0
5843 \# <none> | <anything>
5845 \# If invoked via the alias HDRFTR_RULE_INTERNAL in HDRFTR, prints a rule
5846 \# under the header/footer. Otherwise, turns HDRFTR_RULE on or off.
5848 .MAC HDRFTR_RULE END \"To print rule under header/over footer.
5849 . ie '\\$0'HDRFTR_RULE_INTERNAL' \{\
5850 . ie \\n[#USERDEF_HDRFTR] \{\
5851 . nr #CAP_HEIGHT_ADJUST \\n[#HDRFTR_HEIGHT]
5853 . if \\n[#HEADERS_ON] \{ .ALD \\n[#HDRFTR_RULE_GAP]u \}
5854 . if \\n[#FOOTERS_ON] \{\
5855 . RLD \\n[#HDRFTR_RULE_GAP]u+\\n[#CAP_HEIGHT_ADJUST]u+1p
5857 . PRINT \\l'\\n[#DOC_L_LENGTH]u'
5861 . if \\n[#PRINT_STYLE]=1 \{\
5862 . nr #CAP_HEIGHT_ADJUST \\n[#CAP_HEIGHT]
5864 . if \\n[#PRINT_STYLE]=2 \{\
5865 . ie \\n[#LEFT_CAP_HEIGHT]>\\n[#CENTER_CAP_HEIGHT] \{\
5866 . nr #CAP_HEIGHT_ADJUST \\n[#LEFT_CAP_HEIGHT]
5868 . el \{ .nr #CAP_HEIGHT_ADJUST \\n[#CENTER_CAP_HEIGHT] \}
5869 . ie \\n[#CAP_HEIGHT_ADJUST]>\\n[#RIGHT_CAP_HEIGHT] \{\
5870 . nr #CAP_HEIGHT_ADJUST \\n[#CAP_HEIGHT_ADJUST]
5872 . el \{ .nr #CAP_HEIGHT_ADJUST \\n[#RIGHT_CAP_HEIGHT] \}
5875 . if \\n[#HEADERS_ON] \{ .ALD \\n[#HDRFTR_RULE_GAP]u \}
5876 . if \\n[#FOOTERS_ON] \{\
5877 . RLD \\n[#LEAD]u*3u+\\n[#HDRFTR_RULE_GAP]u+\\n[#CAP_HEIGHT_ADJUST]u+1p
5879 . PRINT \\l'\\n[#DOC_L_LENGTH]u'
5884 . ie '\\$1'' \{ .nr #HDRFTR_RULE 1 \}
5885 . el \{ .nr #HDRFTR_RULE 0 \}
5890 .ALIAS HDRFTR_RULE_INTERNAL HDRFTR_RULE
5898 \# Sets the family, font, and point size of all strings in
5899 \# header/footers to the same family and point size as running
5900 \# text. Font for the header/footer becomes roman throughout.
5902 .MAC HDRFTR_PLAIN END
5903 . HDRFTR_FAMILY \\*[$DOC_FAM]
5904 . HDRFTR_PT_SIZE \\n[#DOC_PT_SIZE]
5905 . HDRFTR_LEFT_FAMILY \\*[$DOC_FAM]
5906 . HDRFTR_LEFT_FONT R
5907 . HDRFTR_LEFT_SIZE +0
5908 . HDRFTR_LEFT_CAPS OFF
5909 . HDRFTR_CENTER_FAMILY \\*[$DOC_FAM]
5910 . HDRFTR_CENTER_FONT R
5911 . HDRFTR_CENTER_SIZE +0
5912 . HDRFTR_CENTER_CAPS OFF
5913 . HDRFTR_RIGHT_FAMILY \\*[$DOC_FAM]
5914 . HDRFTR_RIGHT_FONT R
5915 . HDRFTR_RIGHT_SIZE +0
5916 . HDRFTR_RIGHT_CAPS OFF
5923 \# <none> | <anything>
5925 \# Creates or modifies register #SWITCH_HDRFTR, used to switch
5926 \# default location of HDRFTR_LEFT and HDRFTR_RIGHT.
5928 \# Typically, the author string appears at the left of header/footers,
5929 \# and the title string appears at the right. This switches the
5930 \# location of the two. Useful in conjuction with RECTO_VERSO to
5931 \# tweak switches on alternate pages to come out as the user wishes.
5932 \# The assumption of RECTO_VERSO is that the first page of the document
5933 \# (recto) is odd, and even though it has no header/footer, if it did have one,
5934 \# it would print as AUTHOR...CENTER...TITLE (or whatever strings
5935 \# the user has supplied for HDRFTR_LEFT/RIGHT), meaning that the
5936 \# next page, which does have a header/footer, will come out as
5937 \# TITLE...CENTER...AUTHOR (or whatever strings the user has
5938 \# supplied for HDRFTR_LEFT/RIGHT). SWITCH_HDRFTRS allows the user
5939 \# to get the desired string in the desired place on the desired
5940 \# recto/verso page.
5944 .MAC SWITCH_HDRFTR END
5945 . ie '\\$1'' \{ .nr #SWITCH_HDRFTR 1 \}
5946 . el \{ .nr #SWITCH_HDRFTR 0 \}
5950 \# USER DEFINED HDRFTR RECTO
5951 \# -------------------------
5953 \# L | LEFT | C | CENTER | CENTER | R | RIGHT <hdrftr_recto_string>
5955 \# Toggles #USERDEF_HDRFTR on, stores quad as #USERDEF_HDRFTR_RECTO_QUAD,
5956 \# stores string in $USERDEF_HDRFTR_RECTO.
5958 \# For use when users don't want 3-part headers/footers, but rather
5959 \# want to design their own headers/footers and need different
5960 \# headers/footers on recto and verso pages. Using just
5961 \# HEADER_RECTO, even when recto/verso is not on, allows users to
5962 \# design their own headers/footers for doc pages.
5964 .MAC HDRFTR_RECTO END
5965 . nr #USERDEF_HDRFTR 1
5966 . if '\\$1'L' \{ .nr #USERDEF_HDRFTR_RECTO_QUAD 1 \}
5967 . if '\\$1'LEFT' \{ .nr #USERDEF_HDRFTR_RECTO_QUAD 1 \}
5968 . if '\\$1'C' \{ .nr #USERDEF_HDRFTR_RECTO_QUAD 2 \}
5969 . if '\\$1'CENTER' \{ .nr #USERDEF_HDRFTR_RECTO_QUAD 2 \}
5970 . if '\\$1'CENTRE' \{ .nr #USERDEF_HDRFTR_RECTO_QUAD 2 \}
5971 . if '\\$1'R' \{ .nr #USERDEF_HDRFTR_RECTO_QUAD 3 \}
5972 . if '\\$1'RIGHT' \{ .nr #USERDEF_HDRFTR_RECTO_QUAD 3 \}
5973 . ds $USERDEF_HDRFTR_RECTO \\$2
5977 \# USER DEFINED HDRFTR VERSO
5978 \# -------------------------
5980 \# L | LEFT | C | CENTER | CENTER | R | RIGHT <hdrftr_verso_string>
5982 \# Toggles #USERDEF_HDRFTR on, stores quad as #USERDEF_HDRFTR_VERSO_QUAD,
5983 \# stores string in $USERDEF_HDRFTR_VERSO.
5985 \# For use when users don't want 3-part headers/footers, but rather
5986 \# want to design their own headers/footers and need different
5987 \# headers/footers on recto and verso pages.
5989 .MAC HDRFTR_VERSO END
5990 . nr #USERDEF_HDRFTR 1
5991 . if '\\$1'L' \{ .nr #USERDEF_HDRFTR_VERSO_QUAD 1 \}
5992 . if '\\$1'LEFT' \{ .nr #USERDEF_HDRFTR_VERSO_QUAD 1 \}
5993 . if '\\$1'C' \{ .nr #USERDEF_HDRFTR_VERSO_QUAD 2 \}
5994 . if '\\$1'CENTER' \{ .nr #USERDEF_HDRFTR_VERSO_QUAD 2 \}
5995 . if '\\$1'CENTRE' \{ .nr #USERDEF_HDRFTR_VERSO_QUAD 2 \}
5996 . if '\\$1'R' \{ .nr #USERDEF_HDRFTR_VERSO_QUAD 3 \}
5997 . if '\\$1'RIGHT' \{ .nr #USERDEF_HDRFTR_VERSO_QUAD 3 \}
5998 . ds $USERDEF_HDRFTR_VERSO \\$2
6002 \# PRINT FOOTER ON FIRST PAGE
6003 \# --------------------------
6005 \# <none> | <anything>
6007 \# Toggles register #PRINT_FOOTER_ON_PAGE_1
6009 \# Lets user choose whether to print footer on first
6012 .MAC FOOTER_ON_FIRST_PAGE END
6013 . ie '\\$1'' \{ .nr #PRINT_FOOTER_ON_PAGE_1 1 \}
6014 . el \{ .rr #PRINT_FOOTER_ON_PAGE_1 \}
6018 \# PRINT PAGE NUMBER ON FIRST PAGE
6019 \# -------------------------------
6021 \# <none> | <anything>
6023 \# Toggles register #PRINT_PAGENUM_ON_PAGE_1
6025 \# Lets user choose whether to print page number on first
6026 \# page of doc and after collate when footers are on or page numbering
6027 \# has been user set at top of page.
6029 .MAC PAGENUM_ON_FIRST_PAGE END
6030 . ie '\\$1'' \{ .nr #PRINT_PAGENUM_ON_PAGE_1 1 \}
6031 . el \{ .rr #PRINT_PAGENUM_ON_PAGE_1 \}
6035 \# PRINT HEADER/FOOTER
6036 \# -------------------
6040 \# Based on defaults or values entered by user, prints a
6041 \# three-part title at either the top or the bottom of the page.
6043 \# Called from within either HEADER or FOOTER.
6045 .MAC PRINT_HDRFTR END
6046 . if \\n[#DOC_TYPE]=4 \{\
6047 . nr #SUITE \En[.pn]
6049 . if \\n[#FOOTERS_ON] \{\
6050 . if \\n[#START_FOR_FOOTERS] \{\
6051 . rr #START_FOR_FOOTERS
6052 . if !\\n[#PRINT_FOOTER_ON_PAGE_1] \{ .return \}
6055 . if \\n[#HEADERS_ON] \{ .vs 0 \}
6056 . if \\n[#USERDEF_HDRFTR] \{\
6057 . PRINT_USERDEF_HDRFTR
6060 . if \\n[#SWITCH_HDRFTR] \{\
6061 . ds $HDRFTR_TMP_SWITCH \\*[$HDRFTR_LEFT]
6062 . ds $HDRFTR_LEFT \\*[$HDRFTR_RIGHT]
6063 . ds $HDRFTR_RIGHT \\*[$HDRFTR_TMP_SWITCH]
6064 . ds $HDRFTR_TMP_SIZE_CHANGE_SWITCH \\*[$HDRFTR_LEFT_SIZE_CHANGE]
6065 . ds $HDRFTR_LEFT_SIZE_CHANGE \\*[$HDRFTR_RIGHT_SIZE_CHANGE]
6066 . ds $HDRFTR_RIGHT_SIZE_CHANGE \\*[$HDRFTR_TMP_SIZE_CHANGE_SWITCH]
6067 . nr #HDRFTR_TMP_CAPS_SWITCH \\n[#HDRFTR_LEFT_CAPS]
6068 . nr #HDRFTR_LEFT_CAPS \\n[#HDRFTR_RIGHT_CAPS]
6069 . nr #HDRFTR_RIGHT_CAPS \\n[#HDRFTR_TMP_CAPS_SWITCH]
6070 . rr #HDRFTR_TMP_CAPS_SWITCH
6071 . rm $HDRFTR_TMP_SWITCH
6072 . rm $HDRFTR_TMP_SIZE_CHANGE_SWITCH
6073 . nr #SWITCH_HDRFTR 0
6075 . nr #PAGENUMBER \\n%+\\n[#PAGE_NUM_ADJ]
6076 . if \\n[#ENDNOTES] \{ .PAGENUM_STYLE \\*[$EN_PN_STYLE] \}
6077 . if \\n[#PRINT_STYLE]=1 \{\
6078 . if \\n[#FOOTERS_ON] \{\
6081 . nr #LEFT_CAP_HEIGHT \\n[#CAP_HEIGHT]
6086 . if \\n[#RECTO_VERSO]=0 \{ .LEFT \}
6087 . if \\n[#HDRFTR_LEFT_CAPS] \{ .CAPS \}
6088 . ie '\\*[$HDRFTR_LEFT]'#' \{\
6089 . PRINT \\n[#PAGENUMBER]
6092 . ie !'\\*[$HDRFTR_LEFT]'' \{ . PRINT \\*[$HDRFTR_LEFT] \}
6093 . el \{ .PRINT \& \}
6095 . if \\n[#HDRFTR_LEFT_CAPS] \{ .CAPS OFF \}
6097 . if \\n[#HDRFTR_CENTER_CAPS] \{ .CAPS \}
6098 . ie '\\*[$HDRFTR_CENTER]'#' \{\
6099 . PRINT \\v'-(\\n[#LEAD]u*1u)'\\h'\\n[#HDRFTR_CTR_PAD_LEFT]u'\\n[#PAGENUMBER]\\h'\\n[#HDRFTR_CTR_PAD_RIGHT]u'
6102 . ie !'\\*[$HDRFTR_CENTER]'' \{ .PRINT \\v'-(\\n[#LEAD]u*1u)'\\h'\\n[#HDRFTR_CTR_PAD_LEFT]u'\\*[$HDRFTR_CENTER]\\h'\\n[#HDRFTR_CTR_PAD_RIGHT]u' \}
6103 . el \{ .PRINT \& \}
6105 . if \\n[#HDRFTR_CENTER_CAPS] \{ .CAPS OFF \}
6108 . if \\n[#RECTO_VERSO]=0 \{ .RIGHT \}
6109 . if \\n[#HDRFTR_RIGHT_CAPS] \{ .CAPS \}
6110 . ie '\\*[$HDRFTR_RIGHT]'#' \{\
6111 . PRINT \\v'-(\\n[#LEAD]u*2u)'\\n[#PAGENUMBER]
6114 . ie !'\\*[$HDRFTR_RIGHT]'' \{ .PRINT \\v'-(\\n[#LEAD]u*2u)'\\*[$HDRFTR_RIGHT] \}
6115 . el \{ .PRINT \& \}
6117 . if \\n[#HDRFTR_RIGHT_CAPS] \{ .CAPS OFF \}
6119 . if \\n[#PRINT_STYLE]=2 \{\
6120 . FAMILY \\*[$HDRFTR_LEFT_FAM]
6121 . FT \\*[$HDRFTR_LEFT_FT]
6122 . PT_SIZE \\n[#HDRFTR_PT_SIZE]u\\*[$HDRFTR_LEFT_SIZE_CHANGE]
6123 . if \\n[#FOOTERS_ON] \{\
6126 . nr #LEFT_CAP_HEIGHT \\n[#CAP_HEIGHT]
6131 . if \\n[#RECTO_VERSO]=0 \{ .LEFT \}
6132 . if \\n[#HDRFTR_LEFT_CAPS] \{ .CAPS \}
6133 . ie '\\*[$HDRFTR_LEFT]'#' \{ .PRINT \\n[#PAGENUMBER] \}
6135 . ie !'\\*[$HDRFTR_LEFT]'' \{ . PRINT \\*[$HDRFTR_LEFT] \}
6136 . el \{ .PRINT \& \}
6138 . if \\n[#HDRFTR_LEFT_CAPS] \{ .CAPS OFF \}
6139 . FAMILY \\*[$HDRFTR_CENTER_FAM]
6140 . FT \\*[$HDRFTR_CENTER_FT]
6141 . PT_SIZE \\n[#HDRFTR_PT_SIZE]u\\*[$HDRFTR_CENTER_SIZE_CHANGE]
6142 . if \\n[#FOOTERS_ON] \{\
6145 . nr #CENTER_CAP_HEIGHT \\n[#CAP_HEIGHT]
6149 . if \\n[#HDRFTR_CENTER_CAPS] \{ .CAPS \}
6150 . ie '\\*[$HDRFTR_CENTER]'#' \{\
6151 . PRINT \\v'-(\\n[#LEAD]u*1u)'\\h'\\n[#HDRFTR_CTR_PAD_LEFT]u'\\n[#PAGENUMBER]\\h'\\n[#HDRFTR_CTR_PAD_RIGHT]u'
6154 . ie !'\\*[$HDRFTR_CENTER]'' \{ .PRINT \\v'-(\\n[#LEAD]u*1u)'\\h'\\n[#HDRFTR_CTR_PAD_LEFT]u'\\*[$HDRFTR_CENTER]\\h'\\n[#HDRFTR_CTR_PAD_RIGHT]u' \}
6155 . el \{ .PRINT \& \}
6157 . if \\n[#HDRFTR_CENTER_CAPS] \{ .CAPS OFF \}
6158 . FAMILY \\*[$HDRFTR_RIGHT_FAM]
6159 . FT \\*[$HDRFTR_RIGHT_FT]
6160 . PT_SIZE \\n[#HDRFTR_PT_SIZE]u\\*[$HDRFTR_RIGHT_SIZE_CHANGE]
6161 . if \\n[#FOOTERS_ON] \{\
6164 . nr #RIGHT_CAP_HEIGHT \\n[#CAP_HEIGHT]
6169 . if \\n[#RECTO_VERSO]=0 \{ .RIGHT \}
6170 . if \\n[#HDRFTR_RIGHT_CAPS] \{ .CAPS \}
6171 . ie '\\*[$HDRFTR_RIGHT]'#' \{\
6172 . PRINT \\v'-(\\n[#LEAD]u*2u)'\\n[#PAGENUMBER]
6175 . ie !'\\*[$HDRFTR_RIGHT]'' \{ .PRINT \\v'-(\\n[#LEAD]u*2u)'\\*[$HDRFTR_RIGHT] \}
6176 . el \{ .PRINT \& \}
6178 . if \\n[#HDRFTR_RIGHT_CAPS] \{ .CAPS OFF \}
6180 . if \\n[#HDRFTR_RULE] \{\
6181 . HDRFTR_RULE_INTERNAL
6186 \# PRINT USER DEFINED HEADER/FOOTER
6187 \# --------------------------------
6191 \# Based on defaults or values entered by user, prints a single part
6192 \# (i.e. not 3-part) title at either the top or the bottom of the page.
6194 \# Called from within PRINT_HDRFTR.
6196 .MAC PRINT_USERDEF_HDRFTR END
6197 . nr #PAGENUMBER \\n%+\\n[#PAGE_NUM_ADJ]
6199 . if \\n[#PRINT_STYLE]=2 \{\
6200 . FAMILY \\*[$HDRFTR_FAM]
6202 . PT_SIZE \\n[#HDRFTR_PT_SIZE]u
6204 . ie \\n[#RECTO_VERSO] \{\
6206 . if \\n[#USERDEF_HDRFTR_RECTO_QUAD]=1 \{ .LEFT \}
6207 . if \\n[#USERDEF_HDRFTR_RECTO_QUAD]=2 \{ .CENTER \}
6208 . if \\n[#USERDEF_HDRFTR_RECTO_QUAD]=3 \{ .RIGHT \}
6209 . PRINT \\*[$USERDEF_HDRFTR_RECTO]
6211 . if \\n[#FOOTERS_ON] \{\
6214 . nr #HDRFTR_HEIGHT \\n[#CAP_HEIGHT]
6219 . ie !'\\*[$USERDEF_HDRFTR_VERSO]'' \{\
6220 . if \\n[#USERDEF_HDRFTR_VERSO_QUAD]=1 \{ .LEFT \}
6221 . if \\n[#USERDEF_HDRFTR_VERSO_QUAD]=2 \{ .CENTER \}
6222 . if \\n[#USERDEF_HDRFTR_VERSO_QUAD]=3 \{ .RIGHT \}
6224 . PRINT \\*[$USERDEF_HDRFTR_VERSO]
6226 . if \\n[#FOOTERS_ON] \{\
6229 . nr #HDRFTR_HEIGHT \\n[#CAP_HEIGHT]
6233 . if \\n[#USERDEF_HDRFTR_RECTO_QUAD]=1 \{ .LEFT \}
6234 . if \\n[#USERDEF_HDRFTR_RECTO_QUAD]=2 \{ .CENTER \}
6235 . if \\n[#USERDEF_HDRFTR_RECTO_QUAD]=3 \{ .RIGHT \}
6236 . PRINT \\*[$USERDEF_HDRFTR_RECTO]
6238 . if \\n[#FOOTERS_ON] \{\
6241 . nr #HDRFTR_HEIGHT \\n[#CAP_HEIGHT]
6248 . if \\n[#USERDEF_HDRFTR_RECTO_QUAD]=1 \{ .LEFT \}
6249 . if \\n[#USERDEF_HDRFTR_RECTO_QUAD]=2 \{ .CENTER \}
6250 . if \\n[#USERDEF_HDRFTR_RECTO_QUAD]=3 \{ .RIGHT \}
6251 . PRINT \\*[$USERDEF_HDRFTR_RECTO]
6253 . if \\n[#FOOTERS_ON] \{\
6256 . nr #HDRFTR_HEIGHT \\n[#CAP_HEIGHT]
6261 . if \\n[#HDRFTR_RULE] \{\
6262 . HDRFTR_RULE_INTERNAL
6269 \# HEADERS (off or on)
6270 \# -------------------
6272 \# <none> | <anything>
6274 \# Turns headers at the top of the page off or on.
6279 . ie '\\$1'' \{ .nr #HEADERS_ON 1 \}
6280 . el \{ .nr #HEADERS_ON 0 \}
6287 \# <amount of space between top of page and header>
6289 \# Creates or modifies register #HEADER_MARGIN to hold amount
6290 \# of space between top of page and header.
6292 \# Requires unit of measure. Default is 4P+6p, measured top-of-page
6295 .MAC HEADER_MARGIN END
6296 . nr #HEADER_MARGIN (\\$1)
6303 \# <amount of space between header and running text>
6305 \# Creates or modifies register #HEADER_GAP to hold amount
6306 \# of space between header and running text.
6308 \# Default is 1P+6p.
6311 . nr #HEADER_GAP (\\$1)
6320 \# Prints header appropriate to DOC_TYPE, PRINTSTYLE, and COPYSTYLE.
6322 \# In order to convert the title string to caps in the header (in the
6323 \# event that the user enters .TITLE in caps/lc), I've used
6324 \# quad left, quad centre, and quad right to arrange the three bits
6325 \# of the header, rather than .tl. This allows the use of the CAPS macro.
6326 \# The downside is that I have to add \\v'-(\\n[#LEAD]u*#) in order
6327 \# for -Tlatin1 output to align the header/footer strings on the baseline.
6328 \# The console output still isn't brilliant, but at least it's
6332 . PROCESS_FN_LEFTOVER
6333 . nr #FN_COUNT_FOR_COLS 0 1
6334 . if \\n[#RESET_FN_NUMBER] \{ .nr #FN_NUMBER 0 1 \}
6335 . po \\n[#DOC_L_MARGIN]u
6336 . if \\n[#RECTO_VERSO] \{\
6337 . if !\\n[#TOC_RV_SWITCH] \{\
6338 . nr #DOC_LR_MARGIN_TMP \\n[#DOC_L_MARGIN]
6339 . DOC_LEFT_MARGIN \\n[#DOC_R_MARGIN]u
6340 . DOC_RIGHT_MARGIN \\n[#DOC_LR_MARGIN_TMP]u
6341 . SWITCH_HDRFTR_CENTER_PAD
6346 . if \\n[#PRINT_STYLE]=1 \{ .vs 0 \}
6347 . if \\n[#PRINT_STYLE]=2 \{ .LS 0 \}
6348 . sp |\\n[#HEADER_MARGIN]u-1v
6349 . ll \\n[#DOC_L_LENGTH]u
6351 . if \\n[#PRINT_STYLE]=1 \{\
6354 . ps 12\\*[$HDRFTR_SIZE_CHANGE]
6356 . if \\n[#PRINT_STYLE]=2 \{\
6357 . FAMILY \\*[$HDRFTR_FAM]
6359 . PT_SIZE \\n[#DOC_PT_SIZE]u\\*[$HDRFTR_SIZE_CHANGE]
6361 . nr #HDRFTR_PT_SIZE \\n[#PT_SIZE]
6362 . if \\n[#CAPS_ON] \{\
6366 . if \\n[#UNDERLINE_ON] \{\
6367 . nr #UNDERLINE_WAS_ON 1
6370 . if \\n[#PRINT_STYLE]=1 \{\
6371 . if \\n[#ENDNOTES]=1 \{\
6372 . if \\n[#EN_SINGLESPACE] \{\ \"Endnotes s-spaced have different lead
6373 . nr #RESTORE_DOC_LEAD \\n[#DOC_LEAD]
6374 . nr #DOC_LEAD \\n[#EN_LEAD]u
6378 . ie \\n[#HEADERS_ON] \{\
6380 . sp |\\n[#T_MARGIN]u-\\n[#DOC_LEAD]u
6383 . ie \\n[#PAGE_NUM_V_POS]=1 \{\
6384 . ie \\n[#PAGINATE] \{\
6386 . sp |\\n[#T_MARGIN]u-\\n[#DOC_LEAD]u
6388 . el \{ .sp |\\n[#T_MARGIN]u-\\n[#DOC_LEAD]u \}
6390 . el \{ .sp |\\n[#T_MARGIN]u-\\n[#DOC_LEAD]u \}
6392 . if \\n[#PRINT_STYLE]=1 \{\
6393 . if \\n[#ENDNOTES]=1 \{\
6394 . if \\n[#EN_SINGLESPACE] \{\
6395 . nr #DOC_LEAD \\n[#RESTORE_DOC_LEAD]u
6396 . rr #RESTORE_DOC_LEAD
6400 . nr #PAGE_TOP \\n(nl
6402 . po \\n[#L_MARGIN]u
6403 . if \\n[#RECTO_VERSO] \{\
6404 . nr #L_MARGIN +\\n[#L_MARGIN_DIFF]
6406 . if \\n[#CAPS_WAS_ON] \{\
6410 . if \\n[#UNDERLINE_WAS_ON] \{\
6412 . rr #UNDERLINE_WAS_ON
6414 . if \\n[#TAB_ACTIVE] \{ .TAB \\n[#CURRENT_TAB] \}
6415 . if \\n[#QUOTE] \{\
6416 . ie \\n[#TAB_ACTIVE] \{ .TAB \\n[#CURRENT_TAB] \}
6418 . nr #Q_OFFSET \\n[#L_MARGIN]+(\\n[#PP_INDENT]*\\n[#Q_OFFSET_VALUE])
6419 . po \\n[#Q_OFFSET]u
6422 . if \\n[#EPIGRAPH] \{\
6423 . ie \\n[#TAB_ACTIVE] \{ .TAB \\n[#CURRENT_TAB] \}
6425 . nr #EPI_OFFSET \\n[#L_MARGIN]+(\\n[#PP_INDENT]*\\n[#EPI_OFFSET_VALUE])
6426 . po \\n[#EPI_OFFSET]u
6429 . ie \\n[#EPIGRAPH] \{\
6430 . ie !\\n[#EPI_ACTIVE] \{\
6435 . ie \\n[#EPI_FITS] \{ .ns \}
6436 . el \{ .ALD \\n[#DOC_LEAD]u-\\n[#EPI_LEAD]u \}
6441 . if \\n[#COLUMNS] \{\
6442 . if \\n[#RECTO_VERSO] \{ .COLUMNS \\n[#NUM_COLS] \\n[#GUTTER]u \}
6445 . po \\n[#COL_\\n+[#COL_NUM]_L_MARGIN]u
6446 . ll \\n[#COL_L_LENGTH]u
6448 . if \\n[#QUOTE] \{\
6449 . po +(\\n[#PP_INDENT]u*\\n[#Q_OFFSET_VALUE]u)
6451 . if \\n[#EPIGRAPH] \{\
6452 . if \\n[#EPI_ACTIVE] \{\
6453 . ie \\n[#EPI_FITS] \{ . \}
6454 . el \{ .nr dc -\\n[#EPI_LEAD_DIFF] \}
6456 . po \\n[#COL_\\n[#COL_NUM]_L_MARGIN]u+(\\n[#PP_INDENT]u*\\n[#EPI_OFFSET_VALUE]u)
6459 . if \\n[#PRINT_STYLE]=1 \{\
6460 . if \\n[#SLANT_ON] \{\
6461 . if \\n[#UNDERLINE_SLANT] \{ .UNDERLINE \}
6466 \# ====================================================================
6470 \# FOOTERS (off or on)
6471 \# -------------------
6473 \# <none> | <anything>
6475 \# Turns footers at the bottom of the page off or on.
6477 \# Default is off. If on, page numbers automatically go at
6478 \# the top, centered, unless pagination has been turned off,
6479 \# or the pagenumber position has been changed to left or right.
6484 . PAGE_NUM_POS TOP CENTER
6486 . el \{ .nr #FOOTERS_ON 0 \}
6495 \# Creates or modifies register #FOOTER_MARGIN which holds the
6496 \# amount of space to leave between the page number and the bottom
6499 \# Unit of measure required. Default is 3P.
6501 .MAC FOOTER_MARGIN END
6502 . ie \\n%>0 \{ .nr #FOOTER_MARGIN (\\$1) \}
6510 \# <distance from end of running text to page # or footer>
6512 \# Creates or modifies register #FOOTER_GAP which holds the
6513 \# amount of space to leave between running text and the page number.
6515 \# Requires unit of measure. Default is 3P. Measured baseline to
6519 . ie \\n%>0 \{ .nr #FOOTER_GAP (\\$1) \}
6529 \# Places footer at bottom of page if #FOOTERS=1, otherwise
6530 \# places page number at bottom of page (if #PAGINATE=1).
6531 \# Page numbers are in arabic or roman according to COPYSTYLE.
6532 \# DRAFT starts the document at page 1 regardless of PAGENUMBER.
6533 \# FINAL respects PAGENUMBER.
6537 . if \\n[#START]=1 \{\
6542 . nr #L_MARGIN_DIFF \\n[#L_MARGIN]-\\n[#DOC_L_MARGIN]
6543 . if !\\n[#FN_DEFER] \{\
6545 . if \\n[#FN_COUNT] \{\
6546 . sp |\\n[#PAGE_LENGTH]u-(\\n[#B_MARGIN]u+\\n[#FN_DEPTH]u)
6547 . po \\n[#DOC_L_MARGIN]u
6548 . if \\n[#COLUMNS] \{ .po \\n[#COL_\\n[#COL_NUM]_L_MARGIN]u \}
6552 . if '\\n(.z'FN_OVERFLOW' \{\
6554 . nr #FN_OVERFLOW_DEPTH \\n[#DIVER_DEPTH]
6557 . if \\n[#COL_NEXT] \{ .nr #COL_NUM \\n-[#COL_NUM] \}
6560 . ie \\n[#COLUMNS] \{\
6561 . ie \\n[#COL_NUM]=\\n[#NUM_COLS] \{ .DO_FOOTER \}
6563 . ie \\n[#ENDNOTES] \{ .sp |\\n(ecu-\\n[#EN_LEAD]u \}
6564 . el \{ .sp |\\n(dcu \}
6565 . po \\n[#COL_\\n+[#COL_NUM]_L_MARGIN]u
6566 . PROCESS_FN_LEFTOVER
6567 . if !\\n[#EPIGRAPH] \{ .rr #COL_NEXT \}
6568 . if !\\n[#QUOTE] \{ .rr #COL_NEXT \}
6569 . if \\n[#QUOTE] \{\
6570 . nr #Q_OFFSET \\n[#L_MARGIN]+(\\n[#PP_INDENT]*\\n[#Q_OFFSET_VALUE])
6571 . if \\n[#COLUMNS] \{ .nr #Q_OFFSET \\n[#COL_\\n[#COL_NUM]_L_MARGIN]+(\\n[#PP_INDENT]*\\n[#Q_OFFSET_VALUE]) \}
6572 . po \\n[#Q_OFFSET]u
6574 . if \\n[#EPIGRAPH] \{\
6575 . nr #EPI_OFFSET \\n[#L_MARGIN]+(\\n[#PP_INDENT]*\\n[#EPI_OFFSET_VALUE])
6576 . if \\n[#COLUMNS] \{ .nr #EPI_OFFSET \\n[#COL_\\n[#COL_NUM]_L_MARGIN]+(\\n[#PP_INDENT]*\\n[#EPI_OFFSET_VALUE]) \}
6577 . po \\n[#EPI_OFFSET]u
6579 . ie \\n[#EPIGRAPH] \{\
6580 . ie !\\n[#EPI_ACTIVE] \{\
6585 . sp |\\n(dcu+(\\n[#DOC_LEAD]u-\\n[#EPI_LEAD]u)
6594 . el \{ .DO_FOOTER \}
6603 \# Prints footer (page number, or 3-part footer).
6604 \# Resets CAPS and UNDERLINE if they were on.
6607 . ie (\\n[#FOOTER_MARGIN]+\\n(.v)>\\n[#B_MARGIN] \{\
6611 . sp |\\n[#PAGE_LENGTH]u-\\n[#FOOTER_MARGIN]u-1v
6614 . po \\n[#DOC_L_MARGIN]u
6615 . ll \\n[#DOC_L_LENGTH]u
6617 . FAMILY \\*[$HDRFTR_FAM]
6619 . PT_SIZE \\n[#DOC_PT_SIZE]u\\*[$HDRFTR_SIZE_CHANGE]
6620 . if \\n[#PRINT_STYLE]=1 \{\
6625 . nr #HDRFTR_PT_SIZE \\n[#PT_SIZE]
6626 . if \\n[#CAPS_ON] \{\
6630 . if \\n[#UNDERLINE_ON] \{\
6631 . nr #UNDERLINE_WAS_ON 1
6634 . ie \\n[#FOOTERS_ON] \{\
6635 . if !\\n[#SKIP_FOOTER]=1 \{ .PRINT_HDRFTR \}
6638 . if \\n[#PAGINATE] \{\
6639 . if \\n[#PAGE_NUM_V_POS]=2 \{\
6640 . if !\\n[#SKIP_FOOTER]=1 \{ .PRINT_PAGE_NUMBER \}
6645 . if \\n[#CAPS_WAS_ON] \{\
6649 . if \\n[#UNDERLINE_WAS_ON] \{\
6651 . rr #UNDERLINE_WAS_ON
6658 \# ====================================================================
6662 \# ---Head numbers---
6667 \# <none> | <anything>
6669 \# Toggles register #NUMBER_HEAD; sets incrementing register #HEAD_NUM.
6673 .MAC NUMBER_HEADS END
6676 . if !\\n[#HEAD_NUM] \{ .nr #HEAD_NUM 0 1 \}
6678 . el \{ .rr #NUMBER_HEAD \}
6682 \# RESET HEAD NUMBER
6683 \# -----------------
6685 \# <none> | <desired head number>
6687 \# Resets incrementing register #HEAD_NUM to 1 or, if there's
6688 \# an argument, to user supplied number.
6690 \# Also resets subhead and parahead numbers. If this is not
6691 \# desired, subhead and parahead numbers may be reset individually.
6693 .MAC RESET_HEAD_NUMBER END
6700 . nr #HEAD_NUM \\$1-1 1
6710 \# <none> | <anything>
6712 \# Toggles register #NUMBER_SH; sets incrementing register #SH_NUM.
6716 .MAC NUMBER_SUBHEADS END
6719 . if !\\n[#SH_NUM] \{ .nr #SH_NUM 0 1 \}
6721 . el \{ .rr #NUMBER_SH \}
6725 \# RESET SUBHEAD NUMBER
6726 \# --------------------
6728 \# <none> | <desired subhead number>
6730 \# Resets incrementing register #SH_NUM to 1 or, if there's
6731 \# an argument, to user supplied number.
6733 \# When the subhead number is reset, it resets the parahead number as
6734 \# well. If this behaviour is not what's wanted, RESET_SUBHEAD_NUMBER
6735 \# allows the user to set the parahead number to whatever s/he desires.
6737 .MAC RESET_SUBHEAD_NUMBER END
6738 . ie '\\$1'' \{ .nr #SH_NUM 0 1 \}
6740 . nr #SH_NUM \\$1-1 1
6749 \# <none> | <anything>
6751 \# Toggles register #NUMBER_PH; sets incrementing register #PH_NUM.
6755 .MAC NUMBER_PARAHEADS END
6758 . if !\\n[#PH_NUM] \{ .nr #PH_NUM 0 1 \}
6760 . el \{ .rr #NUMBER_PH \}
6764 \# RESET PARAHEAD NUMBER
6765 \# ---------------------
6767 \# <none> | <desired parahead number>
6769 \# Resets incrementing register #PH_NUM to 1 or, if there's
6770 \# an argument, to user supplied number.
6772 \# Resetting the parahead number resets the parahead number
6775 .MAC RESET_PARAHEAD_NUMBER END
6776 . ie '\\$1'' \{ .nr #PH_NUM 0 1 \}
6777 . el \{ nr #SH_NUM \\$1-1 1 \}
6786 \# <family to use for section titles (main heads)>
6788 \# Creates or modifies string $HEAD_FAM.
6790 \# Default is same as running text.
6792 .MAC HEAD_FAMILY END
6800 \# <font to use for section titles (main heads)>
6802 \# Creates or modifies string $HEAD_FT.
6814 \# <+|- number of points by which to in/decrease point size of
6815 \# section titles (relative to running text)>
6817 \# Creates or modifies string $HEAD_SIZE_CHANGE.
6819 \# Must be preceded by a - or + sign with no space afterwards.
6820 \# Fractional point sizes are allowed.
6821 \# Default +1 for printstyle TYPESET; +0 for TYPEWRITE.
6824 . ds $HEAD_SIZE_CHANGE \\$1
6831 \# L | LEFT | R | RIGHT | C | CENTER | CENTRE
6833 \# Creates or modifies string $HEAD_QUAD.
6835 \# Default is CENTER.
6838 . ds $HEAD_QUAD \\$1
6845 \# <none> | <anything>
6847 \# Creates or modifies register #HEAD_CAPS.
6852 . ie '\\$1'' \{ .nr #HEAD_CAPS 1 \}
6853 . el \{ .nr #HEAD_CAPS 0 \}
6860 \# <none> | <anything>
6862 \# Creates register #HEAD_SPACE, which toggles whether the space
6863 \# before heads is 1 extra line space ("off") or 2 ("on"). Used only
6864 \# in PRINTSTYLE TYPESET.
6869 . ie '\\$1'' \{ .nr #HEAD_SPACE 1 \}
6870 . el \{ .nr #HEAD_SPACE 0 \}
6877 \# <none> | <anything>
6879 \# Creates or modifies register #HEAD_UNDERLINE.
6883 .MAC HEAD_UNDERLINE END
6884 . ie '\\$1'' \{ .nr #HEAD_UNDERLINE 1 \}
6885 . el \{ .nr #HEAD_UNDERLINE 0 \}
6892 \# "text of main head" ["text of main head"] ...
6894 \# In TYPEWRITE, prints main heads centered, all caps, underlined.
6895 \# In TYPESET, prints bold main heads 1 point larger than running
6896 \# text, all caps, underlined.
6898 \# The HEAD macro requires that double-quotes (") surround
6899 \# each line of text.
6903 \# Collect head for TOC.
6905 . nr #TOC_ENTRY_PN \\n%+\\n[#PAGE_NUM_ADJ]
6906 . af #TOC_ENTRY_PN \\g[#PAGENUMBER]
6907 . while \\n[#ARG_NUM]<\\n[#NUM_ARGS] \{\
6908 . ie \\n[#ARG_NUM]=\\n[#NUM_ARGS] \{\
6909 . as $TOC_HEAD_ITEM \\$[\\n+[#ARG_NUM]]\\|
6912 \# Note that in the .as lines, below, \ at the end has a literal
6914 . ie \\n[#NUMBER_HEAD] \{\
6915 . ie \\n[#ARG_NUM]=0 \{\
6916 . as $TOC_HEAD_ITEM \\n+[#HEAD_NUM].\0\\$[\\n+[#ARG_NUM]]\
6917 . nr #HEAD_NUM \\n-[#HEAD_NUM]
6920 . as $TOC_HEAD_ITEM \\$[\\n+[#ARG_NUM]]\
6924 . as $TOC_HEAD_ITEM \\$[\\n+[#ARG_NUM]]\
6928 \# Note the use of \!, which transparently embeds the macros used
6929 \# in the TOC_ENTRIES diversion. The elements they control must be
6930 \# processed literally when the diversion is output.
6933 . if \\n[#PRINT_STYLE]=1 \{\
6938 . if \\n[#PRINT_STYLE]=2 \{\
6939 \!. FAMILY \\*[$TOC_HEAD_FAM]
6940 \!. FT \\*[$TOC_HEAD_FT]
6941 \!. PT_SIZE \\n[#TOC_PS]u\\*[$TOC_HEAD_SIZE_CHANGE]
6944 . ie \\n[#PRINT_STYLE]=1 \{\
6945 \!. PAD "\\h'2m'\\*[$TOC_HEAD_ITEM]\\*[$TOC_PN_TYPEWRITE]"
6948 \!. PAD "\\h'\\n[#TOC_HEAD_INDENT]u'\\*[$TOC_HEAD_ITEM]\\*[$TOC_PN]"
6953 . if \\n[#PRINT_STYLE]=2 \{\
6954 \!. FAMILY \\*[$TOC_PN_FAM]
6955 \!. FT \\*[$TOC_PN_FT]
6956 \!. PT_SIZE \\n[#TOC_PS]u\\*[$TOC_PN_SIZE_CHANGE]
6959 \!. PRINT \\*[LEADER]
6962 \!. PRINT \\n[#TOC_ENTRY_PN]
6966 \# End collection of head for TOC
6970 . ll \\n[#L_LENGTH]u
6972 . if \\n[#COLUMNS] \{\
6973 . ll \\n[#COL_L_LENGTH]u
6977 . QUAD \\*[$HEAD_QUAD]
6978 . if \\n[#PRINT_STYLE]=1 \{\
6982 . vs \\n[#DOC_LEAD]u
6985 . if \\n[#PRINT_STYLE]=2 \{\
6986 . FAMILY \\*[$HEAD_FAM]
6988 . PT_SIZE \\n[#DOC_PT_SIZE]u\\*[$HEAD_SIZE_CHANGE]
6989 . LS \\n[#DOC_LEAD]u
6991 . if r#QUOTE \{ .rr #QUOTE \}
6992 . if r#EPIGRAPH \{ .rr #EPIGRAPH \}
6993 . if \\n[#PRINT_STYLE]=1 \{ .ne 3 \}
6994 . if \\n[#PRINT_STYLE]=2 \{\
6995 . ie \\n[#HEAD_SPACE] \{ .ne 4 \}
6998 . ie \\n[#START] \{\
6999 . if \\n[#DOC_HEADER]=0 \{ . \}
7002 . if \\n[#PRINT_STYLE]=1 \{\
7003 . if !\\n[#LINEBREAK] \{\
7004 . ALD \\n[#DOC_LEAD]u
7005 . if \\n[#SINGLE_SPACE] \{ .ALD \\n[#DOC_LEAD]u \}
7008 . if \\n[#PRINT_STYLE]=2 \{\
7009 . ie \\n[#PP_SPACE] \{\
7010 . ie \\n[#END_QUOTE] \{ . \}
7012 . if !\\n[#LINEBREAK] \{\
7013 . if \\n[#HEAD_SPACE] \{ .ALD \\n[#DOC_LEAD]u \}
7018 . ie \\n[#HEAD_SPACE] \{ .ALD \\n[#DOC_LEAD]u*2u \}
7019 . el \{ .ALD \\n[#DOC_LEAD]u \}
7021 . if \\n[#END_QUOTE] \{\
7022 . if !\\n[#Q_FITS] \{\
7023 . RLD \\n[#DOC_LEAD]u
7024 . if \\n[#PP_ACTIVE] \{ .ALD \\n[#DOC_LEAD]u \}
7026 . if \\n[#Q_AT_TOP] \{\
7027 . RLD \\n[#DOC_LEAD]u
7028 . if \\n[#Q_AT_TOP] \{ .ALD \\n[#DOC_LEAD]u \}
7031 . if \\n[#LINEBREAK] \{\
7032 . if \\n[#HEAD_SPACE] \{ .RLD \\n[#DOC_LEAD]u \}
7038 . if \\n[#HEAD_CAPS] \{ .CAPS \}
7039 . while \\n[#ARG_NUM]<\\n[#NUM_ARGS] \{\
7040 . ie \\n[#NUMBER_HEAD] \{\
7041 . ie \\n[#ARG_NUM]=0 \{\
7043 . ie \\n[#HEAD_UNDERLINE]=0 \{ .PRINT "\\n+[#HEAD_NUM].\0\\$[\\n+[#ARG_NUM]]\}
7044 . el \{ .UNDERSCORE "\\n+[#HEAD_NUM].\0\\$[\\n+[#ARG_NUM]]\}
7049 . ie \\n[#HEAD_UNDERLINE]=0 \{ .PRINT "\\$[\\n+[#ARG_NUM]]\}
7050 . el \{ .UNDERSCORE "\\$[\\n+[#ARG_NUM]]\}
7056 . ie \\n[#HEAD_UNDERLINE]=0 \{ .PRINT "\\$[\\n+[#ARG_NUM]]\}
7057 . el \{ .UNDERSCORE "\\$[\\n+[#ARG_NUM]]\}
7064 . ALD \\n[#DOC_LEAD]u
7065 . RESET_SUBHEAD_NUMBER
7066 . RESET_PARAHEAD_NUMBER
7067 . if r#START \{ .rr #START \}
7068 . if r#EPIGRAPH \{ .rr #EPIGRAPH \}
7069 . if r#QUOTE \{ .rr #QUOTE \}
7070 . if r#Q_FITS \{ .rr #Q_FITS \}
7071 . if r#END_QUOTE \{ .rr #END_QUOTE \}
7072 . if r#LINEBREAK \{ .rr #LINEBREAK \}
7073 . if r#Q_AT_TOP \{ .rr #Q_AT_TOP \}
7074 . if r#PP_ACTIVE \{ .rr #PP_ACTIVE \}
7086 \# <family to use in subheads>
7088 \# Creates or modifies string $SH_FAM.
7090 \# Default is same as running text.
7092 .MAC SUBHEAD_FAMILY END
7100 \# <font to use in subheads>
7102 \# Creates or modifies string $SH_FT.
7106 .MAC SUBHEAD_FONT END
7114 \# <+|- number of points by which to in/decrease point size of subheads
7115 \# (relative to running text)>
7117 \# Creates or modifies string $SH_SIZE_CHANGE.
7119 \# Must be preceded by a +|- sign. No space afterwards.
7120 \# Fractional point sizes are allowed.
7121 \# Default is +.5 for printstyle TYPESET; +0 for TYPEWRITE.
7123 .MAC SUBHEAD_SIZE END
7124 . ds $SH_SIZE_CHANGE \\$1
7131 \# L | LEFT | R | RIGHT | C | CENTER | CENTRE
7133 \# Creates or modifies string $SH_QUAD.
7135 \# Default is LEFT for both TYPESET and TYPEWRITE.
7137 .MAC SUBHEAD_QUAD END
7145 \# "text of subhead" ["text of subhead"] ...
7147 \# In TYPEWRITE, prints subheads underlined.
7148 \# In TYPESET, prints subheads bold, .5 points larger than running
7150 \# In both styles, a line space precedes the subhead, and a small
7151 \# amount of lead comes after.
7153 \# As with the HEAD macro, double-quotes (") must surround
7154 \# each line of text.
7158 \# Collect subhead for TOC.
7160 . nr #TOC_ENTRY_PN \\n%+\\n[#PAGE_NUM_ADJ]
7161 . while \\n[#ARG_NUM]<\\n[#NUM_ARGS] \{\
7162 . ie \\n[#ARG_NUM]=\\n[#NUM_ARGS] \{\
7163 . as $TOC_SH_ITEM \\$[\\n+[#ARG_NUM]]\\|
7166 \# Note that in the .as lines, below, \ at the end has a literal
7168 . ie \\n[#NUMBER_SH] \{\
7169 . ie \\n[#ARG_NUM]=0 \{\
7170 . as $TOC_SH_ITEM \\n+[#SH_NUM].\0\\$[\\n+[#ARG_NUM]]\
7171 . nr #SH_NUM \\n-[#SH_NUM]
7174 . as $TOC_SH_ITEM \\$[\\n+[#ARG_NUM]]\
7178 . as $TOC_SH_ITEM \\$[\\n+[#ARG_NUM]]\
7182 \# Note the use of \!, which transparently embeds the macros used
7183 \# in the TOC_ENTRIES diversion. The elements they control must be
7184 \# processed literally when the diversion is output.
7187 . if \\n[#PRINT_STYLE]=1 \{\
7192 . if \\n[#PRINT_STYLE]=2 \{\
7193 \!. FAMILY \\*[$TOC_SH_FAM]
7194 \!. FT \\*[$TOC_SH_FT]
7195 \!. PT_SIZE \\n[#TOC_PS]u\\*[$TOC_SH_SIZE_CHANGE]
7198 . ie \\n[#PRINT_STYLE]=1 \{\
7199 \!. PAD "\\h'4m'\\*[$TOC_SH_ITEM]\\*[$TOC_PN_TYPEWRITE]"
7202 \!. PAD "\\h'\\n[#TOC_SH_INDENT]u'\\*[$TOC_SH_ITEM]\\*[$TOC_PN]"
7207 . if \\n[#PRINT_STYLE]=2 \{\
7208 \!. FAMILY \\*[$TOC_PN_FAM]
7209 \!. FT \\*[$TOC_PN_FT]
7210 \!. PT_SIZE \\n[#TOC_PS]u\\*[$TOC_PN_SIZE_CHANGE]
7213 \!. PRINT \\*[LEADER]
7216 \!. PRINT \\n[#TOC_ENTRY_PN]
7220 \# End collection of head for TOC
7223 . if r#QUOTE \{ .rr #QUOTE \}
7224 . if r#Q_AT_TOP \{ .rr #Q_AT_TOP \}
7226 . ll \\n[#L_LENGTH]u
7228 . if \\n[#COLUMNS] \{\
7229 . ll \\n[#COL_L_LENGTH]u
7233 . if \\n[#PRINT_STYLE]=1 \{\
7237 . vs \\n[#DOC_LEAD]u
7238 . QUAD \\*[$SH_QUAD]
7241 . if \\n[#PRINT_STYLE]=2 \{\
7242 . FAMILY \\*[$SH_FAM]
7244 . PT_SIZE \\n[#DOC_PT_SIZE]u\\*[$SH_SIZE_CHANGE]
7245 . LS \\n[#DOC_LEAD]u
7246 . QUAD \\*[$SH_QUAD]
7248 . if \\n[#PRINT_STYLE]=1 \{ .nr #SH_LEAD_ADJUST \\n[#LEAD]/5 \}
7249 . if \\n[#PRINT_STYLE]=2 \{ .nr #SH_LEAD_ADJUST \\n[#LEAD]/8 \}
7250 . ie \\n[#START] \{ . \}
7252 . ie ( \\n[#TRAP_DISTANCE] < (\\n[#DOC_LEAD]u*2u) ) \{\
7253 . ie \\n[#COLUMNS] \{ .COL_NEXT \}
7257 . ie \\n[#HEAD]=1 \{ . \}
7259 . if \\n[#PRINT_STYLE]=1 \{\
7260 . if !\\n[#LINEBREAK] \{ .ALD \\n[#DOC_LEAD]u \}
7262 . if \\n[#PRINT_STYLE]=2 \{\
7263 . ie \\n[#PP_SPACE]=1 \{\
7264 . ie !\\n[#LINEBREAK] \{ .ALD \\n[#DOC_LEAD]u \}
7265 . el \{ .RLD \\n[#DOC_LEAD]u \}
7268 . if !\\n[#LINEBREAK] \{ .ALD \\n[#DOC_LEAD]u \}
7275 . if \\n[#PRINT_STYLE]=1 \{\
7276 . while \\n[#ARG_NUM]<\\n[#NUM_ARGS] \{\
7277 . ie \\n[#NUMBER_SH] \{\
7278 . ie \\n[#ARG_NUM]=0 \{\
7279 . ie \\n[#NUMBER_HEAD] \{\
7281 . UNDERSCORE "\v'-\\n[#SH_LEAD_ADJUST]u'\\n[#HEAD_NUM].\\n+[#SH_NUM]\0\\$[\\n+[#ARG_NUM]]
7286 . UNDERSCORE "\v'-\\n[#SH_LEAD_ADJUST]u'\\n+[#SH_NUM].\0\\$[\\n+[#ARG_NUM]]
7292 . ie \\n[#HEAD_UNDERLINE]=0 \{ .PRINT "\v'-\\n[#SH_LEAD_ADJUST]u'\\$[\\n+[#ARG_NUM]]\}
7293 . el \{ .UNDERSCORE "\v'-\\n[#SH_LEAD_ADJUST]u'\\$[\\n+[#ARG_NUM]]\}
7299 . UNDERSCORE "\v'-\\n[#SH_LEAD_ADJUST]u'\\$[\\n+[#ARG_NUM]]
7304 . if \\n[#PRINT_STYLE]=1 \{\
7305 . if \\n[#SINGLE_SPACE] \{ .ALD \\n[#DOC_LEAD]u \}
7307 . if \\n[#PRINT_STYLE]=2 \{\
7308 . ie \\n[#PP_SPACE]=0 \{\
7309 . while \\n[#ARG_NUM]<\\n[#NUM_ARGS] \{\
7310 . ie \\n[#NUMBER_SH] \{\
7311 . ie \\n[#ARG_NUM]=0 \{\
7312 . ie \\n[#NUMBER_HEAD] \{\
7314 . PRINT "\v'-\\n[#SH_LEAD_ADJUST]u'\\n[#HEAD_NUM].\\n+[#SH_NUM]\0\\$[\\n+[#ARG_NUM]]
7319 . PRINT "\v'-\\n[#SH_LEAD_ADJUST]u'\\n+[#SH_NUM].\0\\$[\\n+[#ARG_NUM]]
7325 . PRINT "\\v'-\\n[#SH_LEAD_ADJUST]u'\\$[\\n+[#ARG_NUM]]
7331 . PRINT "\\v'-\\n[#SH_LEAD_ADJUST]u'\\$[\\n+[#ARG_NUM]]
7337 . ALD \\n[#DOC_LEAD]u
7338 . if \\n[#HEAD]=1 \{ .RLD \\n[#DOC_LEAD]u \}
7339 . if \\n[#END_QUOTE] \{ .RLD \\n[#DOC_LEAD]u \}
7340 . if \\n[#EPIGRAPH] \{ .RLD \\n[#DOC_LEAD]u \}
7341 . while \\n[#ARG_NUM]<\\n[#NUM_ARGS] \{\
7342 . PRINT "\\$[\\n+[#ARG_NUM]]
7344 . ALD \\n[#DOC_LEAD]u
7349 . RESET_PARAHEAD_NUMBER
7350 . if r#START \{ .rr #START \}
7351 . if r#EPIGRAPH \{ .rr #EPIGRAPH \}
7352 . if r#Q_FITS \{ .rr #Q_FITS \}
7353 . if r#END_QUOTE \{ .rr #END_QUOTE \}
7354 . if r#LINEBREAK \{ .rr #LINEBREAK \}
7360 \# ---Paragraph heads---
7365 \# <family to use in paraheads>
7367 \# Creates or modifies string $PH_FAM.
7369 \# Default is same as running text.
7371 .MAC PARAHEAD_FAMILY END
7379 \# <font to use in paraheads>
7381 \# Creates or modifies string $PH_FT.
7383 \# Default is bold italic for TYPESET; underlined for TYPEWRITE.
7385 .MAC PARAHEAD_FONT END
7393 \# <+|- number of points by which to in/decrease point size of subheads
7394 \# (relative to running text)>
7396 \# Creates or modifies string $PH_SIZE_CHANGE.
7398 \# Must be preceded by a +|- sign. No space afterwards.
7399 \# Fractional point sizes are allowed. No unit of measure, please.
7400 \# Default is +.5 for printstyle TYPESET; +0 for TYPEWRITE.
7402 .MAC PARAHEAD_SIZE END
7403 . ds $PH_SIZE_CHANGE \\$1
7412 \# Creates or modifies register #PH_INDENT.
7414 \# Default is 1/2 #PP_INDENT for TYPESET and TYPEWRITE.
7416 .MAC PARAHEAD_INDENT END
7417 . nr #PH_INDENT (\\$1)
7426 \# Deposits a paragraph head at the start and into the body of a
7429 \# PARAHEAD *must* come after PP.
7432 \# Collect parahead for TOC.
7433 . nr #TOC_ENTRY_PN \\n%+\\n[#PAGE_NUM_ADJ]
7434 . ie \\n[#NUMBER_PH] \{\
7435 . ds $TOC_PH_ITEM \\n+[#PH_NUM].\0\\$1\\|
7436 . nr #PH_NUM \\n-[#PH_NUM]
7439 . ds $TOC_PH_ITEM \\$1\\|
7443 . if \\n[#PRINT_STYLE]=1 \{\
7448 . if \\n[#PRINT_STYLE]=2 \{\
7449 \!. FAMILY \\*[$TOC_PH_FAM]
7450 \!. FT \\*[$TOC_PH_FT]
7451 \!. PT_SIZE \\n[#TOC_PS]u\\*[$TOC_PH_SIZE_CHANGE]
7454 . ie \\n[#PRINT_STYLE]=1 \{\
7455 \!. PAD "\\h'6m'\\*[$TOC_PH_ITEM]\\*[$TOC_PN_TYPEWRITE]"
7458 \!. PAD "\\h'\\n[#TOC_PH_INDENT]u'\\*[$TOC_PH_ITEM]\\*[$TOC_PN]"
7463 . if \\n[#PRINT_STYLE]=2 \{\
7464 \!. FAMILY \\*[$TOC_PN_FAM]
7465 \!. FT \\*[$TOC_PN_FT]
7466 \!. PT_SIZE \\n[#TOC_PS]u\\*[$TOC_PN_SIZE_CHANGE]
7469 \!. PRINT \\*[LEADER]
7472 \!. PRINT \\n[#TOC_ENTRY_PN]
7476 \# End collection of parahead for TOC
7478 . if \\n[#SLANT_ON] \{\
7479 . nr #SLANT_WAS_ON 1
7483 . if \\n[#INDENT_FIRST_PARAS] \{\
7484 . ti \\n[#PH_INDENT]u
7487 . el \{ .ti \\n[#PH_INDENT]u \}
7488 . if \\n[#PRINT_STYLE]=1 \{\
7493 . ie \\n[#NUMBER_PH] \{\
7494 . if \\n[#NUMBER_HEAD] \{\
7495 . ie \\n[#NUMBER_SH] \{\
7496 . UNDERSCORE "\R'#NUMBERED 1'\\n[#HEAD_NUM].\\n[#SH_NUM].\\n+[#PH_NUM].\\ \\$1"
7500 . UNDERSCORE "\R'#NUMBERED 1'\\n[#HEAD_NUM].\\n+[#PH_NUM].\\ \\$1
7504 . ie \\n[#NUMBER_SH] \{\
7505 . if !\\n[#NUMBERED] \{\
7506 . UNDERSCORE "\\n[#SH_NUM].\\n+[#PH_NUM].\\ \\$1
7511 . if !\\n[#NUMBERED] \{\
7512 . UNDERSCORE "\\n+[#PH_NUM].\\ \\$1
7521 . if \\n[#SLANT_WAS_ON] \{\
7522 . if \\n[#UNDERLINE_SLANT] \{ .UNDERLINE \}
7523 . if \\n[#SLANT_MEANS_SLANT] \{\
7529 . if \\n[#PRINT_STYLE]=2 \{\
7532 . PT_SIZE \\*[$PH_SIZE_CHANGE]
7533 . ie \\n[#NUMBER_PH] \{\
7534 . if \\n[#NUMBER_HEAD] \{\
7535 . ie \\n[#NUMBER_SH] \{\
7536 . PRINT "\R'#NUMBERED 1'\\n[#HEAD_NUM].\\n[#SH_NUM].\\n+[#PH_NUM].\0\\$1\h'.6m'\c"
7539 . PRINT "\R'#NUMBERED 1'\\n[#HEAD_NUM].\\n+[#PH_NUM].\0\\$1\h'.6m'\c"
7542 . ie \\n[#NUMBER_SH] \{\
7543 . if !\\n[#NUMBERED] \{\
7544 . PRINT "\\n[#SH_NUM].\\n+[#PH_NUM].\0\\$1\h'.6m'\c"
7548 . if !\\n[#NUMBERED] \{\
7549 . PRINT "\\n+[#PH_NUM].\0\\$1\h'.6m'\c"
7554 . PRINT "\\$1\h'.6m'\c"
7556 . FAMILY \\*[$DOC_FAM]
7558 . PT_SIZE \\n[#DOC_PT_SIZE]u
7559 . if \\n[#SLANT_WAS_ON] \{\
7560 . rr #SLANT_WAS_ON 1
7569 \# ====================================================================
7571 \# +++LINE BREAKS+++
7573 \# LINEBREAK CHARACTER
7574 \# -------------------
7576 \# [character] [iterations] [vertical adjustment]
7578 \# Allows user to specify a line break character and the number
7579 \# of times to repeat it horiontally.
7581 \# Without an argument, LINEBREAK_CHAR will deposit a blank line.
7583 \# Vertical adjustment requires a unit of measure (most likely
7584 \# "p"), and has to be preceded by +|-
7586 .MAC LINEBREAK_CHAR END
7588 . ds $LINEBREAK_CHAR \\$1
7589 . ds $LINEBREAK_CHAR_V_ADJ \\$3
7590 . if '\\*[$LINEBREAK_CHAR_V_ADJ]'' \{\
7591 . ds $LINEBREAK_CHAR_V_ADJ +0
7593 . while \\$2>\\n[#REPEAT] \{\
7594 . as $LINEBREAK_CHAR "\\ \\$1
7595 . nr #REPEAT \\n[#REPEAT]+1
7606 \# Deposits line break character.
7608 \# If $LINEBREAK_CHAR is blank, simply advances 2 line spaces.
7611 . if r#Q_AT_TOP \{ .rr #Q_AT_TOP \}
7612 . po \\n[#DOC_L_MARGIN]u
7613 . ie '\\*[$LINEBREAK_CHAR]'' \{ .ALD \\n[#DOC_LEAD]u*2 \}
7615 . if \\n[#PRINT_STYLE]=1 \{\
7616 . ie \\n[#END_QUOTE] \{ . \}
7617 . el \{ .ALD \\n[#DOC_LEAD]u \}
7619 . if \\n[#PRINT_STYLE]=2 \{\
7620 . ie \\n[#END_QUOTE] \{ . \}
7621 . el \{ .ALD \\n[#DOC_LEAD]u \}
7624 . PRINT \\v'\\*[$LINEBREAK_CHAR_V_ADJ]'\\*[$LINEBREAK_CHAR]\\v'\\*[$LINEBREAK_CHAR_V_ADJ]'
7625 . if \\n[#PRINT_STYLE]=1 \{ .ALD \\n[#DOC_LEAD]u \}
7626 . if \\n[#PRINT_STYLE]=2 \{ .ALD \\n[#DOC_LEAD]u \}
7627 . QUAD \\*[$DOC_QUAD]
7630 . if r#QUOTE \{ .rr #QUOTE \}
7631 . if r#END_QUOTE \{ .rr #END_QUOTE \}
7635 \# ====================================================================
7642 \# <font of running text>
7644 \# Creates or modifies string $PP_FT.
7646 \# Affects all paragraphs.
7649 . if \\n[#IGNORE] \{ .return \}
7659 \# <amount to indent paragraphs in running text (ipPcm)>
7661 \# Allows user to change the default para indent. The change will
7662 \# affect the indent of QUOTEs and BLOCKQUOTEs as well.
7664 \# Default for printstyle TYPEWRITE is 1/2-inch. Default for
7665 \# printstyle TYPESET is 2 ems. The defaults are set in
7666 \# PRINTSTYLE, not DEFAULTS.
7668 .MAC PARA_INDENT END
7669 . nr #PP_INDENT (\\$1)
7673 \# INDENT FIRST PARAGRAPHS
7674 \# -----------------------
7676 \# <none> | <anything>
7678 \# By default, the first para of a document, as well as the first
7679 \# paras of blockquotes and block-style epigraphs are not indented.
7680 \# When invoked, this macro will indent all paras.
7684 .MAC INDENT_FIRST_PARAS END
7685 . ie '\\$1'' \{ .nr #INDENT_FIRST_PARAS 1 \}
7686 . el \{ .rr #INDENT_FIRST_PARAS \}
7690 \# INTER-PARAGRAPH SPACING
7691 \# -----------------------
7693 \# <none> | <anything>
7695 \# Adds a line space between paragraphs in body text. Block quotes
7698 \# Default is OFF. PARA_SPACE ON is not recommended for use
7699 \# with PRINTSTYLE TYPEWRITE.
7702 . ie '\\$1'' \{ .nr #PP_SPACE 1 \}
7703 . el \{ .rr #PP_SPACE \}
7712 \# Figures out what to do with paragraphs under differing conditions.
7714 \# For the time being, there's no automatic widow/orphan control.
7715 \# Controlling them isn't just a matter of establishing an arbitrary
7716 \# number of lines needed for a para, since groff doesn't then
7717 \# handle single line paragraphs gracefully. Usually, the whole
7718 \# page needs to be tweaked.
7720 \# Note the use of transparent line break (\!.br) to get
7721 \# PP to work within blockquotes and epigraphs.
7723 \# PP_STYLE 1 = regular paras; 2 = blockquotes, epigraphs
7727 . if \\n[#DOC_TYPE]=4 \{\
7728 . if !'\\n(.z'' \{ .di \}
7732 . QUAD \\*[$DOC_QUAD]
7733 . ALD \\n[#DOC_LEAD]u*2u
7739 . ALD \\n[#DOC_LEAD]u
7745 . ALD \\n[#DOC_LEAD]u
7748 . if \\n[#GREETING] \{\
7751 . ALD \\n[#DOC_LEAD]u
7756 . if r#Q_AT_TOP \{ .rr #Q_AT_TOP \}
7757 . if \\n[#PP_STYLE]=1 \{\
7758 . if \\n[#ENDNOTE] \{\
7759 . nr #RESET_PARA_SPACE \\n[#PP_SPACE]
7760 . ie \\n[#EN_PP_SPACE] \{ .PARA_SPACE \}
7761 . el \{ .PARA_SPACE OFF \}
7764 . if !\\n[#ENDNOTE] \{ .po \\n[#L_MARGIN]u \}
7765 . if \\n[#COLUMNS] \{\
7766 . if !\\n[#ENDNOTE] \{ .po \\n[#COL_\\n[#COL_NUM]_L_MARGIN]u \}
7768 . if \\n[#TAB_ACTIVE] \{ .TAB \\n[#CURRENT_TAB] \}
7769 . ie \\n[#PRINT_STYLE]=1 \{\
7773 . ie \\n[#ENDNOTE] \{ .vs \\n[#EN_LEAD]u \}
7774 . el \{ .vs \\n[#DOC_LEAD]u \}
7775 . QUAD \\*[$DOC_QUAD]
7777 . if \\n[#SLANT_ON] \{\
7778 . if \\n[#UNDERLINE_SLANT] \{ .UNDERLINE \}
7782 . ie \\n[#ENDNOTE] \{\
7783 . FAMILY \\*[$EN_FAM]
7785 . PT_SIZE \\n[#EN_PS]u
7787 . QUAD \\*[$EN_QUAD]
7790 . FAMILY \\*[$DOC_FAM]
7792 . PT_SIZE \\n[#DOC_PT_SIZE]u
7793 . LS \\n[#DOC_LEAD]u
7794 . QUAD \\*[$DOC_QUAD]
7798 . if \\n[#INDENT_FIRST_PARAS] \{\
7799 . ie \\n[#INDENT_ACTIVE] \{ .ti \\n[#INDENT]u+\\n[#PP_INDENT]u \}
7800 . el \{ .ti \\n[#PP_INDENT]u \}
7801 . if '\\n(.z'END_NOTES' \{\
7802 . ti \\n[#EN_PP_INDENT]u+\\n[#EN_TEXT_INDENT]u
7805 . if r#END_QUOTE \{\
7806 . if \\n[#END_QUOTE] \{\
7807 . if !\\n[#LINEBREAK] \{\
7808 . ie \\n[#INDENT_ACTIVE] \{ .ti \\n[#INDENT]u+\\n[#PP_INDENT]u \}
7809 . el \{ .ti \\n[#PP_INDENT]u \}
7810 . if '\\n(.z'END_NOTES' \{\
7811 . ti \\n[#EN_PP_INDENT]u+\\n[#EN_TEXT_INDENT]u
7819 . if \\n[#PP_SPACE] \{\
7820 . if \\n[#PRINT_STYLE]=2 \{\
7821 . ie \\n[#END_QUOTE] \{\
7824 . el \{ .ALD \\n[#DOC_LEAD]u \}
7827 . ie \\n[#INDENT_ACTIVE] \{ .ti \\n[#INDENT]u+\\n[#PP_INDENT]u \}
7828 . el \{ .ti \\n[#PP_INDENT]u \}
7829 . if '\\n(.z'END_NOTES' \{\
7830 . ti \\n[#EN_PP_INDENT]u+\\n[#EN_TEXT_INDENT]u
7833 . if r#START \{ .rr #START \}
7834 . if r#QUOTE \{ .rr #QUOTE \}
7835 . if r#END_QUOTE \{ .rr #END_QUOTE \}
7836 . if r#HEAD \{ .rr #HEAD \}
7837 . if r#EPIGRAPH \{ .rr #EPIGRAPH \}
7838 . if r#Q_FITS \{ .rr #Q_FITS \}
7839 . if r#LINEBREAK \{ .rr #LINEBREAK \}
7840 . if \\n[#ENDNOTE] \{\
7841 . ie \\n[#RESET_PARA_SPACE] \{ .PARA_SPACE \}
7842 . el \{ .PARA_SPACE OFF \}
7844 . if \\n[#CONDENSE] \{\
7847 . if \\n[#EXTEND]=1 \{\
7852 . if \\n[#PP_STYLE]=2 \{\
7854 . if \\n[#BROKEN_QUOTE] \{\
7855 . ie \\n(nl=\\n[#PAGE_TOP] \{ .nr #Q_PP 1 \}
7856 . el \{ .nr #Q_PP 0 \}
7859 . ie \\n[#Q_PP]=0 \{\
7860 . if \\n[#INDENT_FIRST_PARAS] \{\
7861 . ti \\n[#PP_INDENT]u/2u
7863 . if \\n[#ENDNOTE] \{\
7864 . ie \\n[#INDENT_FIRSTS] \{ .ti \\n[#PP_INDENT]u/2u \}
7869 . ti \\n[#PP_INDENT]u/2u
7871 . if \\n[#CONDENSE] \{\
7874 . if \\n[#EXTEND]=1 \{\
7882 \# ====================================================================
7886 \# ---Line for line (poetic) quotes---
7891 \# <family to use in line for line quotes>
7893 \# Creates or modifies string $QUOTE_FAM.
7895 \# Default is same as running text.
7897 .MAC QUOTE_FAMILY END
7898 . ds $QUOTE_FAM \\$1
7905 \# <font to use in line for line quotes>
7907 \# Creates or modifies string $QUOTE_FT.
7909 \# Default is italic for TYPESET.
7919 \# <-|+ number of points by which to de/increase point size of
7920 \# line for line quotes (relative to running text)>
7922 \# Creates or modifies string $QUOTE_SIZE_CHANGE.
7924 \# Must be preceded by a - or + sign with no space afterwards.
7925 \# Fractional point sizes are allowed.
7929 . ds $QUOTE_SIZE_CHANGE \\$1
7936 \# <none> | <anything>
7938 \# Creates or modifies register #UNDERLINE_QUOTES (toggle).
7939 \# If on, line for line quotes are underlined when printstyle
7942 \# Default is ON for printstyle TYPEWRITE.
7944 .MAC UNDERLINE_QUOTES END
7945 . ie '\\$1'' \{ .nr #UNDERLINE_QUOTES 1 \}
7946 . el \{ .rr #UNDERLINE_QUOTES \}
7953 \# <value by which to multiply PP_INDENT for indented quoted text>
7955 \# Creates or modifies register #Q_OFFSET_VALUE.
7957 \# Default is 3 for typeset; 2 for typewrite
7959 .MAC QUOTE_INDENT END
7960 . nr #Q_OFFSET_VALUE \\$1
7964 \# ALWAYS FULLSPACE QUOTES
7965 \# -----------------------
7967 \# <none> | <anything>
7969 \# Toggles register #FULLSPACE_QUOTES.
7971 \# If user doesn't like the default 1/2 line space above and below
7972 \# quotes, s/he can turn it off here. Has no effect in TYPEWRITE.
7974 .MAC ALWAYS_FULLSPACE_QUOTES END
7975 . if '\\$1'' \{ .nr #FULLSPACE_QUOTES 1 \}
7976 . el \{ .rr #FULLSPACE_QUOTES \}
7983 \# <none> | <anything>
7985 \# Indents quoted text on a line for line basis, or turns QUOTE off.
7987 \# Owing to the need to bottom align TYPESET pages, quoted text gets
7988 \# diverted so its depth can be measured (in DO_QUOTE) for determining
7989 \# how much space to put before and after.
7993 \# **Uncomment the next line to prevent orphaned quote lines.
7999 . ll \\n[#L_LENGTH]u-(\\n[#PP_INDENT]u*\\n[#Q_OFFSET_VALUE]u)
8001 . if \\n[#COLUMNS] \{\
8002 . ll \\n[#COL_L_LENGTH]u-(\\n[#PP_INDENT]u*\\n[#Q_OFFSET_VALUE]u)
8005 . if \\n[#PRINT_STYLE]=1 \{\
8009 . vs \\n[#DOC_LEAD]u
8012 . if \\n[#PRINT_STYLE]=2 \{\
8013 . FAMILY \\*[$QUOTE_FAM]
8015 . PT_SIZE \\n[#DOC_PT_SIZE]u\\*[$QUOTE_SIZE_CHANGE]
8016 . LS \\n[#DOC_LEAD]u
8020 . if \\n[#PRINT_STYLE]=1 \{\
8021 . if \\n[#UNDERLINE_QUOTES] \{\
8026 . el \{ .DO_QUOTE \}
8030 \# ---Blockquotes---
8032 \# BLOCKQUOTE FAMILY
8033 \# -----------------
8035 \# <family to use in blockquotes>
8037 \# Creates or modifies string $BQUOTE_FAM.
8039 \# Default is same as running text.
8041 .MAC BLOCKQUOTE_FAMILY END
8042 . ds $BQUOTE_FAM \\$1
8049 \# <font to use in blockquotes>
8051 \# Creates or modifies string $BQUOTE_FT.
8053 \# Default is same as running text.
8055 .MAC BLOCKQUOTE_FONT END
8056 . ds $BQUOTE_FT \\$1
8063 \# <-|+ number of points by which to de/increase point size of blockquotes
8064 \# (relative to running text)>
8066 \# Creates or modifies string $BQUOTE_SIZE_CHANGE.
8068 \# Must be preceded by a - or + sign with no space afterwards.
8069 \# Fractional point sizes are allowed.
8070 \# Default is -1 for printstyle TYPESET; +0 for TYPEWRITE.
8072 .MAC BLOCKQUOTE_SIZE END
8073 . ds $BQUOTE_SIZE_CHANGE \\$1
8080 \# <quad to use in blockquotes>
8082 \# Creates or modifies string $BQUOTE_QUAD.
8086 .MAC BLOCKQUOTE_QUAD END
8087 . ds $BQUOTE_QUAD \\$1
8094 \# <none> | <anything>
8096 \# Indents quoted text in fill mode and shortens line length
8097 \# accordingly, or turns BLOCKQUOTE off.
8099 \# Owing to the need to bottom align TYPESET pages, quoted text gets
8100 \# diverted so its depth can be measured (in DO_QUOTE) for determining
8101 \# how much space to put before and after.
8103 \# .PP after blockquote is optional if there's only one para,
8104 \# but REQUIRED if there's more than one.
8114 . ll \\n[#L_LENGTH]u-(\\n[#PP_INDENT]u*(\\n[#Q_OFFSET_VALUE]u*2u))
8115 . if \\n[#ENDNOTE] \{\
8116 . if \\n[#EN_NUMBERS_ALIGN_RIGHT] \{\
8117 . ll \\n[#RESET_L_LENGTH]u-\\n[#EN_TEXT_INDENT]u-(\\n[#EN_PP_INDENT]u*(\\n[#Q_OFFSET_VALUE]u*2u))
8119 . if \\n[#EN_NUMBERS_ALIGN_LEFT] \{\
8120 . ll \\n[#L_LENGTH]u-(\\n[#EN_PP_INDENT]u*(\\n[#Q_OFFSET_VALUE]u*2u))
8125 . if \\n[#COLUMNS] \{\
8126 . ll \\n[#COL_L_LENGTH]u-(\\n[#PP_INDENT]u*(\\n[#Q_OFFSET_VALUE]u*2u))
8127 . if \\n[#ENDNOTE] \{\
8128 . if \\n[#EN_NUMBERS_ALIGN_RIGHT] \{\
8129 . ll \\n[#RESET_L_LENGTH]u-\\n[#EN_TEXT_INDENT]u-(\\n[#EN_PP_INDENT]u*(\\n[#Q_OFFSET_VALUE]u*2u))
8131 . if \\n[#EN_NUMBERS_ALIGN_LEFT] \{\
8132 . ll \\n[#COL_L_LENGTH]u-(\\n[#EN_PP_INDENT]u*(\\n[#Q_OFFSET_VALUE]u*2u))
8137 . if \\n[#PRINT_STYLE]=1 \{\
8141 . vs \\n[#DOC_LEAD]u
8145 . if \\n[#PRINT_STYLE]=2 \{\
8146 . FAMILY \\*[$BQUOTE_FAM]
8147 . FT \\*[$BQUOTE_FT]
8148 . PT_SIZE \\n[#DOC_PT_SIZE]u\\*[$BQUOTE_SIZE_CHANGE]
8149 . LS \\n[#DOC_LEAD]u
8150 . if \\n[#ENDNOTE] \{\
8151 . PT_SIZE \\n[#EN_PS]u\\*[$BQUOTE_SIZE_CHANGE]
8153 . QUAD \\*[$BQUOTE_QUAD]
8157 . if \\n[#INDENT_FIRST_PARAS] \{\
8158 . ie !\\n[#ENDNOTE] \{\
8159 . if \\n[#PRINT_STYLE]=1 \{ .ti \\n[#PP_INDENT]u/2u \}
8160 . if \\n[#PRINT_STYLE]=2 \{ .ti \\n[#PP_INDENT]u/2u \}
8163 . if \\n[#INDENT_FIRSTS]=1 \{\
8164 . if \\n[#PRINT_STYLE]=1 \{ .ti \\n[#EN_PP_INDENT]u/2u \}
8165 . if \\n[#PRINT_STYLE]=2 \{ .ti \\n[#EN_PP_INDENT]u/2u \}
8170 . el \{ .DO_QUOTE \}
8179 \# Ends the diversion P_QUOTE or B_QUOTE. Spaces them according to
8180 \# PRINT_STYLE, whether there's inter-paragraph spacing, and page
8181 \# position. TYPEWRITE treats spacing the same way in all circumstance
8182 \# (viz. an extra line space). TYPESET puts in only half
8183 \# line spaces if the entire quote plus 1 line of body under the quote
8184 \# fits on the the page; otherwise it puts in a full extra blank
8185 \# line. (This is to ensure the page remains bottom aligned).
8191 \# **Change *1 to *2 in next line to prevent orphans after quotes
8192 . if \\n[#ENDNOTE] \{\
8193 . nr #RESET_QUOTE_SPACING \\n[#FULLSPACE_QUOTES]
8194 . ALWAYS_FULLSPACE_QUOTES
8196 . nr #Q_DEPTH \\n[#DIVER_DEPTH]+(\\n[#LEAD]*1)
8197 . if \\n[#PRINT_STYLE]=1 \{\
8198 . if \\n[#START]=1 \{ . \}
8199 . if \\n[#START]=0 \{\
8200 . if !\\n[#LINEBREAK] \{ .ALD \\n[#DOC_LEAD]u \}
8203 . if \\n[#HEAD]=1 \{ .RLD \\n[#DOC_LEAD]u \}
8206 . if \\n[#PRINT_STYLE]=2 \{\
8207 . ie \\n[#PP_SPACE] \{\
8208 . ie \\n[#HEAD]>0 \{ . \}
8210 . ie \\n[#START] \{ . \}
8211 . el \{ .ALD \\n[#DOC_LEAD]u \}
8215 . ie \\n[#Q_DEPTH]<\\n[#TRAP_DISTANCE] \{\
8217 . ie \\n[#HEAD]=1 \{ . \}
8219 . ie \\n[#START] \{ . \}
8221 . ie \\n[#FULLSPACE_QUOTES] \{\
8222 . ie \\n[#ENDNOTE] \{\
8223 . ALD \\n[#EN_LEAD]u
8225 . el \{ .ALD \\n[#DOC_LEAD]u \}
8228 . ie \\n[#ENDNOTE] \{\
8229 . ALD \\n[#EN_LEAD]u/2u
8231 . el \{ .ALD \\n[#DOC_LEAD]u/2u \}
8239 . if \\n[#HEAD]=1 \{ . \}
8242 . ie \\n[#ENDNOTE] \{ .ALD \\n[#EN_LEAD]u \}
8243 . el \{ .ALD \\n[#DOC_LEAD]u \}
8248 . nr #Q_OFFSET \\n[#L_MARGIN]+(\\n[#PP_INDENT]*\\n[#Q_OFFSET_VALUE])
8249 . if \\n[#COLUMNS] \{\
8250 . nr #Q_OFFSET \\n[#COL_\\n[#COL_NUM]_L_MARGIN]+(\\n[#PP_INDENT]*\\n[#Q_OFFSET_VALUE])
8252 . if !\\n[#ENDNOTE] \{ .po \\n[#Q_OFFSET]u \}
8253 . if \\n[#ENDNOTE] \{\
8254 . in +\\n[#EN_PP_INDENT]u*\\n[#Q_OFFSET_VALUE]u
8256 . if \\n[#QUOTE]=1 \{\
8259 . if !\\n[#START] \{ .rr #QUOTE \}
8261 . if \\n[#QUOTE]=2 \{\
8265 . if \\n[#PRINT_STYLE]=1 \{\
8266 . ALD \\n[#DOC_LEAD]u
8268 . if \\n[#PRINT_STYLE]=2 \{\
8269 . ie \\n[#START] \{\
8270 . ie \\n[#PP_SPACE] \{ . \}
8271 . el \{ .ALD \\n[#DOC_LEAD]u \}
8274 . ie \\n[#PP_SPACE] \{ . \}
8276 . ie \\n[#HEAD]=1 \{ .ALD \\n[#DOC_LEAD]u \}
8278 . ie \\n[#Q_FITS] \{\
8279 . ie \\n[#Q_TOP]=\\n[#PAGE_TOP] \{\
8281 . ALD \\n[#DOC_LEAD]u
8284 . ie \\n[#FULLSPACE_QUOTES] \{ .ALD \\n[#DOC_LEAD]u \}
8285 . el \{ .ALD \\n[#DOC_LEAD]u/2u \}
8288 . el \{ .ALD \\n[#DOC_LEAD]u \}
8293 . if \\n[#ENDNOTE] \{ .nr #FULLSPACE_QUOTES \\n[#RESET_QUOTE_SPACING] \}
8294 . if r#HEAD \{ .rr #HEAD \}
8295 . if r#EPIGRAPH \{ .rr #EPIGRAPH \}
8300 . if !\\n[#ENDNOTE] \{ .po \\n[#L_MARGIN]u \}
8301 . if \\n[#ENDNOTE] \{\
8302 . in \\n[#EN_TEXT_INDENT]u
8304 . if \\n[#COLUMNS] \{\
8305 . if !\\n[#ENDNOTE] \{ .po \\n[#COL_\\n[#COL_NUM]_L_MARGIN]u \}
8306 . if \\n[#ENDNOTE] \{\
8307 . in \\n[#EN_TEXT_INDENT]u
8310 . ie !\\n[#ENDNOTE] \{\
8311 . nr #RESET_PP_INDENT \\n[#PP_INDENT]
8314 . PARA_INDENT \\n[#RESET_PP_INDENT]u
8315 . QUAD \\*[$DOC_QUAD]
8318 . nr #RESET_EN_PP_INDENT \\n[#EN_PP_INDENT]
8319 . ENDNOTE_PARA_INDENT 0
8321 . ENDNOTE_PARA_INDENT \\n[#RESET_EN_PP_INDENT]u
8326 \# ====================================================================
8333 \# Ends the diversion P_QUOTE or B_QUOTE, breaks to a new
8334 \# page, and reinvokes BLOCKQUOTE.
8336 \# Because quotes go into a diversion before they're output,
8337 \# footnotes in quotes that cross pages behave erratically. The footnote
8338 \# isn't processed until the diversion ends, hence the footnote
8339 \# marker in the quote isn't always correct for the new page (it's
8340 \# picked up from the old one). BREAK_QUOTE is a workaround for
8343 .MAC BREAK_QUOTE END
8346 . nr #BROKEN_QUOTE 1
8349 . nr #Q_DEPTH \\n[#DIVER_DEPTH]+(\\n[#LEAD]*1)
8350 . if \\n[#PRINT_STYLE]=1 \{\
8351 . if !\\n[#LINEBREAK] \{ .ALD \\n[#DOC_LEAD]u \}
8353 . if \\n[#HEAD]=1 \{ .RLD \\n[#DOC_LEAD]u \}
8356 . if \\n[#PRINT_STYLE]=2 \{\
8357 . ie \\n[#PP_SPACE] \{\
8358 . ie \\n[#HEAD]=1 \{ . \}
8360 . if !\\n[#LINEBREAK] \{ .ALD \\n[#DOC_LEAD]u \}
8366 . if \\n[#HEAD]=1 \{ . \}
8368 . el \{ .ALD \\n[#DOC_LEAD]u \}
8371 . nr #Q_OFFSET \\n[#L_MARGIN]+(\\n[#PP_INDENT]*\\n[#Q_OFFSET_VALUE])
8372 . if \\n[#COLUMNS] \{ .nr #Q_OFFSET \\n[#COL_\\n[#COL_NUM]_L_MARGIN]+(\\n[#PP_INDENT]*\\n[#Q_OFFSET_VALUE]) \}
8373 . po \\n[#Q_OFFSET]u
8374 . if \\n[#QUOTE]=1 \{\
8377 . if !\\n[#START] \{ .rr #QUOTE \}
8379 . if \\n[#QUOTE]=2 \{\
8383 . if r#HEAD \{ .rr #HEAD \}
8384 . if r#EPIGRAPH \{ .rr #EPIGRAPH \}
8389 . if \\n[#PRINT_STYLE]=1 \{\
8390 . if \\n[#UNDERLINE_QUOTES] \{\
8394 . po \\n[#L_MARGIN]u
8395 . if \\n[#COLUMNS] \{ .po \\n[#COL_\\n[#COL_NUM]_L_MARGIN]u \}
8396 . QUAD \\*[$DOC_QUAD]
8397 . sp |\\n[#PAGE_LENGTH]u \" To trip footer/header
8401 \# ====================================================================
8408 \# <none> | <anything>
8410 \# Turns page numbering off or on.
8412 \# Page numbering is on by default with .PAPER.
8416 . ie '\\$1'' \{ .nr #PAGINATE 1 \}
8417 . el \{ .nr #PAGINATE 0 \}
8421 \# SUSPEND PAGINATION (before ENDNOTES)
8422 \# ------------------
8426 \# Creates register #SUSPEND_PAGINATION
8428 \# Useful only to suspend pagination before outputting endnotes.
8430 .MAC SUSPEND_PAGINATION END
8431 . nr #SUSPEND_PAGINATION 1
8434 \# RESTORE PAGINATION (after ENDNOTES)
8435 \# ------------------
8439 \# Removes register #SUSPEND_PAGINATION. Creates register
8440 \# #DEFER_PAGINATION
8442 \# Useful only to restore pagination after outputting endnotes.
8444 .MAC RESTORE_PAGINATION END
8445 . rr #SUSPEND_PAGINATION
8446 . if \\n[#PAGE_NUM_V_POS]=1 \{ .PAGINATE \}
8447 . if \\n[#PAGE_NUM_V_POS]=2 \{ .nr #DEFER_PAGINATION 1 \}
8451 \# PAGENUMBER FAMILY
8452 \# -----------------
8454 \# <family to use for page numbers>
8456 \# Creates or modifies string $PAGE_NUM_FAM.
8458 \# Default is same as running text.
8460 .MAC PAGENUM_FAMILY END
8461 . ds $PAGE_NUM_FAM \\$1
8468 \# <font to use for page numbers>
8470 \# Creates or modifies string $PAGE_NUM_FT.
8472 \# Default is same as running text.
8474 .MAC PAGENUM_FONT END
8475 . ds $PAGE_NUM_FT \\$1
8482 \# <+|- number of points by which to in/decrease point size of
8483 \# page numbers (relative to running text)>
8485 \# Creates or modifies string $PAGE_NUM_SIZE_CHANGE.
8487 \# Must be preceded by a +|- sign with no space afterward.
8488 \# Fractional point sizes are allowed.
8491 .MAC PAGENUM_SIZE END
8492 . ds $PAGE_NUM_SIZE_CHANGE \\$1
8496 \# PAGE NUMBER FORMAT
8497 \# ------------------
8499 \# DIGIT | ROMAN | roman | ALPHA | alpha
8501 \# Assigns user entered format to #PAGENUMBER.
8503 .MAC PAGENUM_STYLE END
8504 . nr #PAGENUM_STYLE_SET 1
8505 . if '\\$1'DIGIT' \{\
8506 . ds $PAGENUM_STYLE \\$1
8509 . if '\\$1'ROMAN' \{\
8510 . ds $PAGENUM_STYLE \\$1
8513 . if '\\$1'roman' \{\
8514 . ds $PAGENUM_STYLE \\$1
8517 . if '\\$1'ALPHA' \{\
8518 . ds $PAGENUM_STYLE \\$1
8521 . if '\\$1'alpha' \{\
8522 . ds $PAGENUM_STYLE \\$1
8528 \# HYPHENS AROUND PAGE NUMBERS
8529 \# ---------------------------
8531 \# <none> | <anything>
8533 \# Creates or modifies register #PAGE_NUM_HYPHENS.
8534 \# Used to dis/enable hyphens on either side of page numbers.
8538 .MAC PAGENUM_HYPHENS END
8539 . nr #PAGE_NUM_HYPHENS_SET 1
8540 . ie '\\$1'' \{ .nr #PAGE_NUM_HYPHENS 1 \}
8541 . el \{ .rr #PAGE_NUM_HYPHENS \}
8545 \# PAGENUMBER POSITION
8546 \# -------------------
8548 \# TOP | BOTTOM LEFT | CENTER | RIGHT
8550 \# Creates or modifies various PAGE_NUM_H | V_POS registers.
8551 \# Used to position page numbers.
8553 \# Default is center/bottom.
8555 .MAC PAGENUM_POS END
8556 . nr #PAGE_NUM_POS_SET 1
8557 . if '\\$1'TOP' \{ .nr #PAGE_NUM_V_POS 1 \}
8558 . if '\\$1'BOTTOM' \{ .nr #PAGE_NUM_V_POS 2 \}
8559 . if '\\$2'LEFT' \{ .nr #PAGE_NUM_H_POS 1 \}
8560 . if '\\$2'CENTER' \{ .nr #PAGE_NUM_H_POS 2 \}
8561 . if '\\$2'CENTRE' \{ .nr #PAGE_NUM_H_POS 2 \}
8562 . if '\\$2'RIGHT' \{ .nr #PAGE_NUM_H_POS 3 \}
8566 \# PRINT PAGE NUMBER
8567 \# -----------------
8571 \# Prints page number if PAGEINATE=1.
8573 .MAC PRINT_PAGE_NUMBER END
8575 . po \\n[#DOC_L_MARGIN]u
8576 . ll \\n[#DOC_L_LENGTH]u
8578 . FAMILY \\*[$PAGE_NUM_FAM]
8579 . FT \\*[$PAGE_NUM_FT]
8580 . PT_SIZE \\n[#DOC_PT_SIZE]u\\*[$PAGE_NUM_SIZE_CHANGE]
8581 . if \\n[#PRINT_STYLE]=1 \{\
8586 . if \\n[#PAGE_NUM_V_POS]=1 \{ .vs 0 \}
8588 . ie \\n[#PAGE_NUM_H_POS]=1 \{ .LEFT \}
8592 . ie \\n[#PAGE_NUM_H_POS]=1 \{ .RIGHT \}
8595 . if \\n[#PAGE_NUM_H_POS]=2 \{.CENTER \}
8596 . if \\n[#RECTO_VERSO]=0 \{\
8597 . if \\n[#PAGE_NUM_H_POS]=1 \{ .LEFT \}
8598 . if \\n[#PAGE_NUM_H_POS]=2 \{ .CENTER \}
8599 . if \\n[#PAGE_NUM_H_POS]=3 \{ .RIGHT \}
8601 . nr #PAGENUMBER \\n%+\\n[#PAGE_NUM_ADJ]
8602 . if \\n[#EN_FIRST_PAGE] \{\
8603 . if \\n[#EN_FIRST_PN] \{ .PAGENUMBER \\n[#EN_FIRST_PN] \}
8606 . if \\n[#TOC_FIRST_PAGE] \{\
8608 . rr #TOC_FIRST_PAGE
8610 . ie \\n[#DRAFT_WITH_PAGENUM] \{\
8611 . ie '\\*[$REVISION]'' \{\
8612 . PRINT "\\*[$DRAFT_STRING]\\*[$DRAFT] / \\n[#PAGENUMBER]"
8615 . ie '\\*[$DRAFT]'' \{\
8616 . PRINT "\\*[$REVISION_STRING] \\*[$REVISION] / \\n[#PAGENUMBER]"
8619 . PRINT "\\*[$DRAFT_STRING]\\*[$DRAFT], \\*[$REVISION_STRING] \\*[$REVISION] / \\n[#PAGENUMBER]"
8624 . ie \\n[#PAGE_NUM_HYPHENS] \{ .PRINT "- \\n[#PAGENUMBER] -" \}
8625 . el \{ .PRINT "\\n[#PAGENUMBER]" \}
8630 \# ====================================================================
8637 \# <family to use in footnotes>
8639 \# Creates or modifies string $FN_FAM.
8641 \# Default is same as running text.
8643 .MAC FOOTNOTE_FAMILY END
8651 \# <font to use in footnotes>
8653 \# Creates or modifies string $FN_FT.
8655 \# Default is roman.
8657 .MAC FOOTNOTE_FONT END
8665 \# <+|- number of points by which to in/decrease point size of footnotes
8666 \# (relative to running text)>
8668 \# Creates or modifies string $FN_SIZE_CHANGE.
8670 \# Must be preceded by a +|- sign. No space afterwards.
8671 \# Fractional point sizes are allowed.
8672 \# Default is -2 for printstyle TYPESET; +0 for TYPEWRITE.
8674 .MAC FOOTNOTE_SIZE END
8675 . ds $FN_SIZE_CHANGE \\$1
8679 \# FOOTNOTE AUTOLEAD
8680 \# -----------------
8682 \# <autolead value for footnotes>
8684 \# Creates or modifies register #FN_AUTOLEAD.
8686 \# Default is #DOC_LEAD/2 for TYPEWRITE; 2 for TYPESET
8688 .MAC FOOTNOTE_AUTOLEAD END
8689 . nr #FN_AUTOLEAD \\$1
8696 \# <quad to use in footnotes>
8698 \# Creates or modifies string $FN_QUAD.
8700 \# Default is same as running text.
8702 .MAC FOOTNOTE_QUAD END
8710 \# <none> | <anything>
8712 \# Turns generation of footnote markers on or off.
8716 .MAC FOOTNOTE_MARKERS END
8717 . ie '\\$1'' \{ .nr #FN_MARKERS 1 \}
8718 . el \{ .nr #FN_MARKERS 0 \}
8722 \# FOOTNOTE MARKER STYLE
8723 \# ---------------------
8727 \# Sets register #FN_MARKER_STYLE, used in FOOTNOTE to determine
8728 \# the style of footnote markers.
8730 \# 1=STAR; 2=NUMBER. Default is STAR.
8732 .MAC FOOTNOTE_MARKER_STYLE END
8733 . if '\\$1'STAR' \{\
8734 . nr #FN_MARKER_STYLE 1
8736 . if '\\$1'NUMBER' \{\
8737 . nr #FN_MARKER_STYLE 2
8742 \# RESET FOOTNOTE NUMBER
8743 \# ---------------------
8747 \# Resets register #FN_NUMBER to 1. If argument is PAGE, creates
8748 \# toggle #RESET_FN_NUMBER which is checked in HEADER. If 1,
8749 \# numbered footnotes on every page start at 1.
8751 .MAC RESET_FOOTNOTE_NUMBER END
8752 . ie '\\$1'' \{ .nr #FN_NUMBER 0 1 \}
8753 . el \{ .nr #RESET_FN_NUMBER 1 \}
8757 \# FOOTNOTE RULE LENGTH
8758 \# --------------------
8760 \# <length of rule used to separate footnotes from running text>
8762 \# Creates or modifies registers #FN_RULE_LENGTH.
8764 \# Requires unit of measure (iPpcm).
8765 \# Default is 4P for both PRINTSTYLEs.
8767 .MAC FOOTNOTE_RULE_LENGTH END
8768 . nr #FN_RULE_LENGTH (\\$1)
8772 \# FOOTNOTE_RULE_ADJ
8773 \# -----------------
8775 \# <number of points to raise footnote rule from it's baseline position>
8777 \# Creates or modifies register #FN_RULE_ADJ.
8779 \# Default is 3p for both TYPESTYLES.
8781 \# Requires unit of measure.
8783 .MAC FOOTNOTE_RULE_ADJ END
8784 . nr #FN_RULE_ADJ (\\$1)
8791 \# <none> | <anything>
8793 \# Turns printing of footnote separator rule on or off. If invoked as
8794 \# PRINT_FOOTNOTE_RULE, prints footnote separator rule.
8798 \# Invoked in FOOTNOTE (as PRINT_FOOTNOTE_RULE) as 1st line of a footnote
8799 \# if the footnote number (#FN_COUNT) is 1.
8801 .MAC FOOTNOTE_RULE END
8802 . ie '\\$0'PRINT_FOOTNOTE_RULE' \{\
8803 . if \\n[#FN_RULE]=0 \{ .RLD 1v \}
8804 \!. PT_SIZE 12 \"Not sure why these have to be transparently embedded, but they do.
8807 . PRINT \\v'-\\n[#FN_RULE_ADJ]u'\\l'\\n[#FN_RULE_LENGTH]u'\\v'+\\n[#FN_RULE_ADJ]u'
8808 \!. PT_SIZE \\n[#DOC_PT_SIZE]u\\*$[FN_SIZE_CHANGE]
8809 . QUAD \\*[$FN_QUAD]
8812 . ie '\\$1'' \{ .nr #FN_RULE 1 \}
8813 . el \{ .nr #FN_RULE 0 \}
8821 \# <none> | INDENT L|LEFT|R|RIGHT|B|BOTH <indent value> > | <anything>
8823 \# Begins collecting and diverting footnote text if no argument
8824 \# given. Otherwise, ends diversion FOOTNOTES, measures footnote
8825 \# depth, and sets footnote trap.
8827 \# The input line preceding a footnote call MUST terminate with \c
8828 \# or the footnote marker will be spaced away from the word it
8829 \# should be joined to.
8831 \# If FOOTNOTES is invoked with INDENT, the footnote will
8832 \# be indented. An indent style and an indent value must be given.
8833 \# Subsequent footnotes will NOT be indented; INDENT must be given
8834 \# for each footnote the user wants indented.
8838 . if \\n[#FN_MARKERS] \{\
8839 . if \\n[#CONDENSE] \{ \*[CONDX]\c \}
8840 . if \\n[#EXTEND] \{ \*[EXTX]\c \}
8841 . if \\n[#PRINT_STYLE]=1 \{\
8842 . if \\n[#UNDERLINE_ON] \{\
8843 . nr #UNDERLINE_WAS_ON 1
8847 . if !\\n[#NO_FN_MARKER] \{\
8848 . if \\n[#FN_MARKER_STYLE]=1 \{\
8849 . ie \\n[#FN_COUNT_FOR_COLS] \{\
8850 . if \\n[#FN_COUNT_FOR_COLS]=0 \{ .PRINT \*[BU3]* \}
8851 . if \\n[#FN_COUNT_FOR_COLS]=1 \{ .PRINT \*[BU3]\(dg \}
8852 . if \\n[#FN_COUNT_FOR_COLS]=2 \{ .PRINT \*[BU3]** \}
8853 . if \\n[#FN_COUNT_FOR_COLS]=3 \{ .PRINT \*[BU3]\(dg\(dg \}
8854 . if \\n[#FN_COUNT_FOR_COLS]=4 \{ .PRINT \*[BU3]*** \}
8855 . if \\n[#FN_COUNT_FOR_COLS]=5 \{ .PRINT \*[BU3]\(dg\(dg\(dg \}
8856 . if \\n[#FN_COUNT_FOR_COLS]=6 \{ .PRINT \*[BU3]**** \}
8857 . if \\n[#FN_COUNT_FOR_COLS]=7 \{ .PRINT \*[BU3]\(dg\(dg\(dg\(dg \}
8858 . if \\n[#FN_COUNT_FOR_COLS]=8 \{ .PRINT \*[BU3]***** \}
8859 . if \\n[#FN_COUNT_FOR_COLS]=9 \{ .PRINT \*[BU3]\(dg\(dg\(dg\(dg\(dg \}
8862 . if \\n[#FN_COUNT]=0 \{ .PRINT \*[BU3]* \}
8863 . if \\n[#FN_COUNT]=1 \{ .PRINT \*[BU3]\(dg \}
8864 . if \\n[#FN_COUNT]=2 \{ .PRINT \*[BU3]** \}
8865 . if \\n[#FN_COUNT]=3 \{ .PRINT \*[BU3]\(dg\(dg \}
8866 . if \\n[#FN_COUNT]=4 \{ .PRINT \*[BU3]*** \}
8867 . if \\n[#FN_COUNT]=5 \{ .PRINT \*[BU3]\(dg\(dg\(dg \}
8868 . if \\n[#FN_COUNT]=6 \{ .PRINT \*[BU3]**** \}
8869 . if \\n[#FN_COUNT]=7 \{ .PRINT \*[BU3]\(dg\(dg\(dg\(dg \}
8870 . if \\n[#FN_COUNT]=8 \{ .PRINT \*[BU3]***** \}
8871 . if \\n[#FN_COUNT]=9 \{ .PRINT \*[BU3]\(dg\(dg\(dg\(dg\(dg\(dg \}
8874 . if \\n[#FN_MARKER_STYLE]=2 \{\
8875 . 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" \}
8876 . if \\n[#PRINT_STYLE]=2 \{ .PRINT "\*[SUP]\\n+[#FN_NUMBER]\*[SUPX]" \}
8880 . nr #SPACE_REMAINING \\n[#PAGE_LENGTH]-\\n[#B_MARGIN]-(\\n(nl+1v)
8881 . nr #PP_STYLE_PREV \\n[#PP_STYLE]
8883 . if \\n[#INDENT_FIRST_PARAS] \{ .nr #INDENT_FIRSTS 1 \}
8884 . INDENT_FIRST_PARAS
8886 . ll \\n[#DOC_L_LENGTH]u
8888 . if \\n[#COLUMNS] \{\
8889 . ll \\n[#COL_L_LENGTH]u
8892 . if \\n[#FN_R_INDENT] \{\
8893 . ll -\\n[#FN_R_INDENT]u
8896 . if \\n[#FN_BR_INDENT] \{\
8897 . ll -\\n[#FN_BR_INDENT]u
8900 . FAMILY \\*[$FN_FAM]
8902 . PT_SIZE \\n[#DOC_PT_SIZE]u\\*[$FN_SIZE_CHANGE]
8903 . AUTOLEAD \\n[#FN_AUTOLEAD]
8904 . QUAD \\*[$FN_QUAD]
8905 . if \\n[#PRINT_STYLE]=1 \{\
8909 . ie \\n[#SINGLE_SPACE] \{ .vs \\n[#DOC_LEAD]u \}
8910 . el \{ .vs \\n[#DOC_LEAD]u/2u \}
8914 . nr #FN_LEAD \\n[#LEAD]
8916 . if \\n[#EPIGRAPH] \{ .nr #FN_FOR_EPI 1 \}
8917 . if \\n[#FN_DEFER_SPACE] \{\
8918 . if \\n[#FN_MARKER_STYLE]=1 \{ .ALD 1v \}
8919 . if \\n[#RESET_FN_NUMBER] \{ .ALD 1v \}
8920 . rr #FN_DEFER_SPACE
8922 . if \\n+[#FN_COUNT]=1 \{\
8923 . if !\\n[#FN_DEPTH] \{\
8924 . if \\n[#PRINT_STYLE]=1 \{ .ALD \\n[#DOC_LEAD]u \}
8925 . ie \\n[#FN_RULE] \{ .PRINT_FOOTNOTE_RULE \}
8929 . if \\n[#FN_MARKERS] \{\
8930 . if !\\n[#NO_FN_MARKER] \{\
8931 . if \\n[#FN_MARKER_STYLE]=1 \{\
8932 . ie \\n+[#FN_COUNT_FOR_COLS] \{\
8933 . if \\n[#FN_COUNT_FOR_COLS]=1 \{ .PRINT *\c \}
8934 . if \\n[#FN_COUNT_FOR_COLS]=2 \{ .PRINT \(dg\c \}
8935 . if \\n[#FN_COUNT_FOR_COLS]=3 \{ .PRINT **\c \}
8936 . if \\n[#FN_COUNT_FOR_COLS]=4 \{ .PRINT \(dg\(dg\c \}
8937 . if \\n[#FN_COUNT_FOR_COLS]=5 \{ .PRINT ***\c \}
8938 . if \\n[#FN_COUNT_FOR_COLS]=6 \{ .PRINT \(dg\(dg\(dg\c \}
8939 . if \\n[#FN_COUNT_FOR_COLS]=7 \{ .PRINT ****\c \}
8940 . if \\n[#FN_COUNT_FOR_COLS]=8 \{ .PRINT \(dg\(dg\(dg\(dg\c \}
8941 . if \\n[#FN_COUNT_FOR_COLS]=9 \{ .PRINT *****\c \}
8942 . if \\n[#FN_COUNT_FOR_COLS]=10 \{ .PRINT \(dg\(dg\(dg\(dg\(dg\c \}
8945 . if \\n[#FN_COUNT]=1 \{ .PRINT *\c \}
8946 . if \\n[#FN_COUNT]=2 \{ .PRINT \(dg\c \}
8947 . if \\n[#FN_COUNT]=3 \{ .PRINT **\c \}
8948 . if \\n[#FN_COUNT]=4 \{ .PRINT \(dg\(dg\c \}
8949 . if \\n[#FN_COUNT]=5 \{ .PRINT ***\c \}
8950 . if \\n[#FN_COUNT]=6 \{ .PRINT \(dg\(dg\(dg\c \}
8951 . if \\n[#FN_COUNT]=7 \{ .PRINT ****\c \}
8952 . if \\n[#FN_COUNT]=8 \{ .PRINT \(dg\(dg\(dg\(dg\c \}
8953 . if \\n[#FN_COUNT]=9 \{ .PRINT *****\c \}
8954 . if \\n[#FN_COUNT]=10 \{ .PRINT \(dg\(dg\(dg\(dg\(dg\c \}
8957 . if \\n[#FN_MARKER_STYLE]=2 \{\
8958 . if \\n[#PRINT_STYLE]=1 \{ .PRINT "(\\n[#FN_NUMBER])\c" \}
8959 . if \\n[#PRINT_STYLE]=2 \{ .PRINT "\*[SUP]\\n[#FN_NUMBER]\*[SUPX]\c" \}
8965 . ie '\\$1'INDENT' \{\
8967 . if '\\$2'L' \{ .in (\\$3) \}
8968 . if '\\$2'LEFT' \{ .in (\\$3) \}
8969 . if '\\$2'R' \{ .nr #FN_R_INDENT (\\$3) \}
8970 . if '\\$2'RIGHT' \{ .nr #FN_R_INDENT (\\$3) \}
8972 . nr #FN_BL_INDENT (\\$3)
8973 . ie '\\$4'' \{ .nr #FN_BR_INDENT \\n[#FN_BL_INDENT] \}
8974 . el \{ .nr #FN_BR_INDENT (\\$4) \}
8975 . in \\n[#FN_BL_INDENT]u
8977 . if '\\$2'BOTH' \{\
8978 . nr #FN_BL_INDENT (\\$3)
8979 . ie '\\$4'' \{ .nr #FN_BR_INDENT \\n[#FN_BL_INDENT] \}
8980 . el \{ .nr #FN_BR_INDENT (\\$4) \}
8981 . in \\n[#FN_BL_INDENT]u
8989 . in 0 \"Turn off indent possibly set by FOOTNOTE INDENT...
8990 . if \\n[#PRINT_STYLE]=1 \{\
8991 . if \\n[#UNDERLINE_WAS_ON] \{\
8993 . rr #UNDERLINE_WAS_ON
8999 . nr #PP_STYLE \\n[#PP_STYLE_PREV]
9000 . if !\\n[#INDENT_FIRSTS] \{ .INDENT_FIRST_PARAS OFF \}
9002 . nr #FN_DEPTH +\\n[#DIVER_DEPTH]
9003 . if \\n[#FN_DEFER] \{\
9004 . nr #FN_DEFER_SPACE 1
9007 . if \\n[#FN_DEPTH]>\\n[#SPACE_REMAINING] \{\
9008 . ie \\n[#SPACE_REMAINING]<(\\n[#LEAD]*2) \{ .nr #FN_DEFER 1 \}
9011 . while (\\n+[#FN_LINES]*\\n[#FN_LEAD])<\\n[#SPACE_REMAINING] \{\
9012 . nr #FN_DEPTH (\\n[#FN_LINES]*\\n[#FN_LEAD])
9016 . nr #VARIABLE_FOOTER_POS -\\n[#DIVER_DEPTH]
9017 . if \\n[#FN_COUNT]=1 \{ .nr #VARIABLE_FOOTER_POS -1v \}
9019 . ch FOOTER \\n[#VARIABLE_FOOTER_POS]u
9020 . if (\\n(nl+1v)>(\\n[#PAGE_LENGTH]+\\n[#VARIABLE_FOOTER_POS]) \{\
9021 . ch FOOTER \\n(nlu+1v
9023 . if \\n[#FN_DEFER] \{\
9024 . nr #VARIABLE_FOOTER_POS 0-\\n[#B_MARGIN]u
9025 . ch FOOTER \\n[#VARIABLE_FOOTER_POS]u
9028 . nr #NO_FN_MARKER 0
9032 .MAC FN_OVERFLOW_TRAP END
9033 . if \\n[#FN_COUNT] \{\
9039 .MAC DIVERT_FN_LEFTOVER END
9040 . nr #NO_FN_MARKER 1
9046 . rr #FN_OVERFLOW_DEPTH
9050 .MAC PROCESS_FN_LEFTOVER END
9051 . if !\\n[#FN_DEFER] \{\
9054 . nr #VARIABLE_FOOTER_POS 0-\\n[#B_MARGIN]
9056 . if \\n[#FN_DEFER] \{\
9057 . nr #VARIABLE_FOOTER_POS -(\\n[#FN_DEPTH]+\\n[#DOC_LEAD])
9059 . nr #SPACE_REMAINING 0
9060 . ch FOOTER -\\n[#B_MARGIN]u
9061 . if \\n[#FN_DEFER] \{\
9062 . nr #NO_FN_MARKER 1
9069 . if !\\n[#FN_DEFER] \{\
9070 . if \\n[#FN_OVERFLOW_DEPTH] \{\
9071 . DIVERT_FN_LEFTOVER
9078 \# ====================================================================
9082 \# When endnotes are output, the spacing between the notes is always 1
9083 \# extra linespace. This can have bottom margin consequences. If this
9084 \# doesn't bother you, don't worry about it. If it does bother you, and
9085 \# you want to adjust the spacing between any two endnotes (as they're
9086 \# output), make the spacing adjustments (.ALD/.RLD) at the *end* of
9087 \# endnotes (i.e. just before .ENDNOTE OFF), not at the top.
9089 \# Endnotes must be output manually with .ENDNOTES. This allows user
9090 \# the flexibility to output endnotes at the end of each collated
9091 \# document, or to output them at the end of the entire document.
9096 \# <family to use in endnotes>
9098 \# Creates or modifies string $EN_FAM.
9100 \# Default is same as running text in body of document.
9102 .MAC ENDNOTE_FAMILY END
9110 \# <font to use in endnotes>
9112 \# Creates or modifies string $EN_FT.
9114 \# Default is roman.
9116 .MAC ENDNOTE_FONT END
9121 \# ENDNOTE POINT SIZE
9122 \# ------------------
9124 \# <base point size for endnotes>
9126 \# Creates or modifies register #EN_PS.
9128 \# Default is same as running text in body of document.
9130 \# This size control macro differs from other size control macros
9131 \# in that it sets an absolute point size, not a relative one. This
9132 \# is because a) endnotes always appear separate from the body of
9133 \# a document and therefore don't need to be relative to the body
9134 \# of the document, and b) there are quite a few elements of the
9135 \# endnotes page(s) that need to be relative to the base point size
9136 \# of that page. If the base endnote point size were relative to
9137 \# the body of the document (i.e. a _SIZE macro taking a +|- value)
9138 \# getting the rest of the endnote elements sized properly could
9139 \# become very confusing.
9141 .MAC ENDNOTE_PT_SIZE END
9142 . nr #EN_PS (p;\\$1)
9149 \# <base leading to use in endnotes> [ ADJUST ]
9151 \# Creates or modifies register #EN_LEAD. Creates or removes
9152 \# register #ADJ_EN_LEAD. Stores arguments in strings if ENDNOTE_LEAD
9153 \# set before START.
9155 \# Default is 14 points for TYPESET, adjusted; 24 for TYPEWRITE.
9157 .MAC ENDNOTE_LEAD END
9158 . if !\\n[#OK_PROCESS_LEAD] \{\
9161 . ds $ADJUST_EN_LEAD \\$2
9166 . nr #EN_LEAD (p;\\$1)
9167 . if '\\$2'ADJUST' \{\
9168 . nr #ORIG_DOC_LEAD \\n[#DOC_LEAD]
9169 . nr #ADJ_DOC_LEAD 1
9171 . nr #NO_TRAP_RESET 1
9172 . DOC_LEAD \\n[#EN_LEAD]u ADJUST
9173 . nr #EN_LEAD \\n[#DOC_LEAD]
9174 . DOC_LEAD \\n[#ORIG_DOC_LEAD]u
9185 \# LEFT | L | CENTER | C | RIGHT | R | JUSTIFY | J
9187 \# Creates or modifies string $EN_QUAD.
9189 \# Default is justified for TYPESET, left for TYPEWRITE.
9191 .MAC ENDNOTE_QUAD END
9196 \# ENDNOTES_HDRFTR_CENTER
9197 \# ----------------------
9201 \# Creates or removes toggle register #EN_HDRFTR_CENTER, used to
9202 \# determine whether mom should print a/the hdrftr center string
9203 \# on the endnotes page. Primarily to enable/disable printing of the
9204 \# chapter name in hdrftrs when DOCTYPE CHAPTER.
9208 .MAC ENDNOTES_HDRFTR_CENTER END
9209 . ie '\\$1'' \{ .nr #EN_HDRFTR_CENTER 1 \}
9210 . el \{ .rr #EN_HDRFTR_CENTER \}
9217 \# <title for endnotes page>
9219 \# Creates or modifies string $EN_STRING.
9221 \# Default is "Endnotes"
9223 .MAC ENDNOTE_STRING END
9224 . ds $EN_STRING \\$1
9228 \# ENDNOTE STRING FAMILY
9229 \# ---------------------
9231 \# <family to use for endnote string>
9233 \# Creates or modifies string $EN_STRING_FAM.
9235 \# Default is same as running text in body of document.
9237 .MAC ENDNOTE_STRING_FAMILY END
9238 . ds $EN_STRING_FAM \\$1
9242 \# ENDNOTE STRING FONT
9243 \# -------------------
9245 \# <font to use for endnote string>
9247 \# Creates or modifies string $EN_FT.
9249 \# Default is BOLD for TYPEWRITE; roman for TYPESET
9251 .MAC ENDNOTE_STRING_FONT END
9252 . ds $EN_STRING_FT \\$1
9256 \# ENDNOTE STRING SIZE
9257 \# -------------------
9259 \# <+|- number of points by which to in/decrease endnote string
9260 \# (relative to base endnote size)>
9262 \# Creates or modifies string $EN_STRING_SIZE_CHANGE.
9264 \# Default is +1 for TYPESET.
9266 .MAC ENDNOTE_STRING_SIZE END \"Default for TYPESET is +1
9267 . ds $EN_STRING_SIZE_CHANGE \\$1
9271 \# ENDNOTE STRING QUAD
9272 \# -------------------
9274 \# LEFT | L | CENTER | C | RIGHT | R
9276 \# Creates or modifies string $EN_STRING_QUAD.
9278 \# Default is centered.
9280 .MAC ENDNOTE_STRING_QUAD END
9281 . ds $EN_STRING_QUAD \\$1
9285 \# ENDNOTE STRING UNDERSCORE
9286 \# -------------------------
9290 \# Turns underscoring of endnote main title on or off. If the argument
9291 \# is the digit "2", turns on double-underscoring.
9293 \# Default is double-underscored.
9295 .MAC ENDNOTE_STRING_UNDERSCORE END
9296 . ie '\\$1'' \{ .nr #EN_STRING_UNDERSCORE 1 \}
9298 . ie '\\$1'2' \{ .nr #EN_STRING_UNDERSCORE 2 \}
9299 . el \{ .nr #EN_STRING_UNDERSCORE 0 \}
9304 \# ENDNOTE STRING CAPS
9305 \# -------------------
9307 \# <none> | <anything>
9309 \# Turns capitalization of the endnotes pages title string
9310 \# "Endnotes" on or off.
9312 \# Users may want the endnotes pages title string to be in caps,
9313 \# but the toc entry for endnotes in lower case. If the argument
9314 \# to ENDNOTE_STRING is in lower case and ENDNOTE_STRING_CAPS is
9315 \# turned on, this is exactly what will happen.
9319 .MAC ENDNOTE_STRING_CAPS END
9320 . ie '\\$1'' \{ .nr #EN_STRING_CAPS 1 \}
9321 . el \{ .rr #EN_STRING_CAPS \}
9328 \# <string that appears before the first endnote pertaining to any document>
9330 \# Creates string $EN_TITLE_STRING.
9332 \# Default is the document title, or, if doc is a chapter, "Chapter #"
9334 .MAC ENDNOTE_TITLE END
9339 \# ENDNOTE TITLE FAMILY
9340 \# --------------------
9342 \# <family to use for endnote title>
9344 \# Creates string $EN_TITLE_FAM.
9346 \# Default is same as running text of document.
9348 .MAC ENDNOTE_TITLE_FAMILY END
9349 . ds $EN_TITLE_FAM \\$1
9353 \# ENDNOTE TITLE FONT
9354 \# ------------------
9356 \# <font to use for endnote title>
9358 \# Creates string $EN_TITLE_FT.
9360 \# Default is bold for TYPESET; roman for TYPEWRITE.
9362 .MAC ENDNOTE_TITLE_FONT END
9363 . ds $EN_TITLE_FT \\$1
9367 \# ENDNOTE TITLE SIZE
9368 \# ------------------
9370 \# <+|- number of points by which to in/decrease endnote title
9371 \# (relative to base endnote size)>
9373 \# Creates string $EN_TITLE_SIZE_CHANGE.
9375 \# Default is 0 (i.e. title same size as text of endnotes).
9377 .MAC ENDNOTE_TITLE_SIZE END
9378 . ds $EN_TITLE_SIZE_CHANGE \\$1
9382 \# ENDNOTE TITLE QUAD
9383 \# ------------------
9385 \# <quad direction of endnote title>
9387 \# Creates string $EN_TITLE_QUAD.
9391 .MAC ENDNOTE_TITLE_QUAD END
9392 . ds $EN_TITLE_QUAD \\$1
9396 \# ENDNOTE TITLE UNDERSCORE
9397 \# ------------------------
9401 \# Creates or removes register #EN_TITLE_UNDERSCORE.
9403 \# Default is to underscore the endnote titles.
9405 .MAC ENDNOTE_TITLE_UNDERSCORE END
9406 . ie '\\$1'' \{ .nr #EN_TITLE_UNDERSCORE 1 \}
9407 . el \{ .rr #EN_TITLE_UNDERSCORE \}
9411 \# ENDNOTE NUMBER FAMILY
9412 \# ---------------------
9414 \# <family to use for endnote numbers on endnotes page>
9416 \# Creates string $EN_NUMBER_FAM.
9418 \# Default is same as running text of document.
9420 \# Family, font, and size of endnote numbers applies only to the
9421 \# numbers as they appear on the endnotes page(s). The superscript
9422 \# numbers that appear in running text are unaffected.
9424 .MAC ENDNOTE_NUMBER_FAMILY END
9425 . ds $EN_NUMBER_FAM \\$1
9429 \# ENDNOTE NUMBER FONT
9430 \# -------------------
9432 \# <font to use for endnote numbers on endnotes page>
9434 \# Creates string $EN_NUMBER_FT.
9436 \# Default is bold for TYPESET; roman for TYPEWRITE.
9438 \# Family, font, and size of endnote numbers applies only to the
9439 \# numbers as they appear on the endnotes page(s). The superscript
9440 \# numbers that appear in running text are unaffected.
9442 .MAC ENDNOTE_NUMBER_FONT END \"Default for TYPESET is bold
9443 . ds $EN_NUMBER_FT \\$1
9447 \# ENDNOTE NUMBER SIZE
9448 \# -------------------
9450 \# <+|- number of points by which to in/decrease endnote numbers
9451 \# (relative to base endnote size)>
9453 \# Creates string $EN_NUMBER_SIZE_CHANGE.
9457 \# Family, font, and size of endnote numbers applies only to the
9458 \# numbers as they appear on the endnotes page(s). The superscript
9459 \# numbers that appear in running text are unaffected.
9461 .MAC ENDNOTE_NUMBER_SIZE END
9462 . ds $EN_NUMBER_SIZE_CHANGE \\$1
9466 \# ENDNOTE NUMBERS ALIGN RIGHT
9467 \# ---------------------------
9469 \# <max. number of digit placeholders that will appear in endnotes>
9471 \# Toggles register #EN_NUMBERS_ALIGN_RIGHT on; creates register
9472 \# #EN_NUMBER_PLACEHOLDERS.
9474 \# Default is for footnote numbers to be right aligned to 2 placeholders.
9476 .MAC ENDNOTE_NUMBERS_ALIGN_RIGHT END
9477 . rr #EN_NUMBERS_ALIGN_LEFT
9478 . nr #EN_NUMBERS_ALIGN_RIGHT 1
9479 . nr #EN_NUMBER_PLACEHOLDERS \\$1
9483 \# ENDNOTE NUMBERS ALIGN LEFT
9484 \# --------------------------
9488 \# Toggles register #EN_NUMBERS_ALIGN_LEFT on.
9490 \# Default is for footnote numbers to be right aligned to 2 placeholders
9491 \# (i.e. not left aligned).
9493 .MAC ENDNOTE_NUMBERS_ALIGN_LEFT END
9494 . rr #EN_NUMBERS_ALIGN_RIGHT
9495 . nr #EN_NUMBERS_ALIGN_LEFT 1
9499 \# ENDNOTE PARAGRAPH INDENT
9500 \# ------------------------
9502 \# <first line indent of paras subsequent to 1st in endnotes>
9504 \# Creates register #EN_PP_INDENT for use in .PP.
9506 \# Requires a unit of measure.
9508 \# Default is 1.5m for TYPESET; same indent as PARA_INDENT for TYPEWRITE.
9510 .MAC ENDNOTE_PARA_INDENT END
9511 . nr #EN_PP_INDENT (\\$1)
9515 \# TURN OFF COLUMN MODE FOR ENDNOTES
9516 \# ---------------------------------
9518 \# <none> | <anything>
9520 \# Creates or removes register #EN_NO_COLS
9522 \# Allows user to tell mom not to set endnotes in columnar
9523 \# documents in columns. Default is to set endnotes in columns.
9525 .MAC ENDNOTES_NO_COLUMNS END
9526 . ie '\\$1'' \{ .nr #EN_NO_COLS 1 \}
9527 . el \{ .rr #EN_NO_COLS \}
9531 \# NO FIRST PAGE NUMBER ON ENDNOTES FIRST PAGE
9532 \# -------------------------------------------
9534 \# <none> | <anything>
9536 \# Creates or removes register #EN_NO_FIRST_PN
9538 \# For use if FOOTERS are on. Tells ENDNOTES not to put a page
9539 \# number on the first endnotes page. Some users may want this.
9540 \# Default is to print a page number at the top of the first
9541 \# endnotes page when footers are on.
9543 .MAC ENDNOTES_NO_FIRST_PAGENUM END
9544 . ie '\\$1'' \{ .nr #EN_NO_FIRST_PN 1 \}
9545 . el \{ .rr #EN_NO_FIRST_PN \}
9549 \# PAGE HEADERS ON ENDNOTES PAGES
9550 \# ------------------------------
9554 \# Creates or removes register #EN_ALLOWS_HEADERS or
9555 \# #EN_ALLOWS_HEADERS_ALL
9557 \# Whether ENDNOTES puts a page header at the top of endnotes
9558 \# pages if page headers are used throughout the document.
9559 \# Default is to insert the page headers, but not on the first
9560 \# page. If the optional argument ALL is given, ENDNOTES puts a
9561 \# page header on the first page as well.
9563 .MAC ENDNOTES_ALLOWS_HEADERS END
9564 . ie '\\$1'' \{ .nr #EN_ALLOWS_HEADERS 1 \}
9567 . nr #EN_ALLOWS_HEADERS 1
9568 . nr #EN_ALLOWS_HEADERS_ALL 1
9571 . rr #EN_ALLOWS_HEADERS
9572 . rr #EN_ALLOWS_HEADERS_ALL
9578 \# ENDNOTES PAGES PAGE NUMBERING STYLE
9581 \# DIGIT | ROMAN | roman | ALPHA | alpha
9583 \# Creates or modifies $EN_PN_STYLE.
9585 \# Allows user to define what style should be used for endnotes
9586 \# pages page numbering. Arguments are the same as for
9589 \# Default is DIGIT.
9591 .MAC ENDNOTES_PAGENUM_STYLE END
9592 . ds $EN_PN_STYLE \\$1
9596 \# FIRST PAGE NUMBER FOR ENDNOTES
9597 \# ------------------------------
9599 \# <page number that appears on page 1 of endnotes pages>
9601 \# Creates or modifies string $EN_FIRST_PN
9603 \# To be used with caution, only if all endnotes
9604 \# are to be output at once, i.e. not at the end of the separate
9605 \# docs of a collated doc
9607 .MAC ENDNOTES_FIRST_PAGENUMBER END
9608 . nr #EN_FIRST_PN \\$1
9611 \# SINGLESPACE ENDNOTES
9612 \# --------------------
9614 \# <none> | <anything>
9616 \# Sets lead of endnotes pages in TYPEWRITE to 12 points,
9619 \# Default is to double-space endnotes pages.
9621 .MAC SINGLESPACE_ENDNOTES END
9622 . if \\n[#PRINT_STYLE]=1 \{\
9623 . ie \\n[#SINGLE_SPACE] \{\
9624 . nr #EN_SINGLESPACE 1
9626 . if \\n[#OK_PROCESS_LEAD] \{\
9627 . ENDNOTE_LEAD 12 ADJUST
9633 . nr #EN_SINGLESPACE 1
9635 . if \\n[#OK_PROCESS_LEAD] \{\
9636 . ENDNOTE_LEAD 12 ADJUST
9641 . rr #EN_SINGLESPACE
9643 . if \\n[#OK_PROCESS_LEAD] \{\
9644 . ENDNOTE_LEAD 24 ADJUST
9653 \# ENDNOTE PARAGRAPH SPACE
9654 \# -----------------------
9658 \# Creates toggle register #EN_PP_SPACE for use in .PP.
9660 \# Like PARA_SPACE. Default is not to space endnote paras.
9662 .MAC ENDNOTE_PARA_SPACE END
9663 . ie '\\$1'' \{ .nr #EN_PP_SPACE 1 \}
9664 . el \{ .rr #EN_PP_SPACE \}
9673 \# Places superscript endnote number in text, then collects and
9674 \# processes endnote in diversion END_NOTES.
9676 \# \c must be appended to the word immediately preceding .ENDNOTE.
9681 . if \\n[#CONDENSE] \{ \*[CONDX]\c \}
9682 . if \\n[#EXTEND] \{ \*[EXTX]\c \}
9683 . if \\n[#PRINT_STYLE]=1 \{\
9684 . if \\n[#UNDERLINE_ON] \{\
9685 . nr #UNDERLINE_WAS_ON 1
9688 . if \\n[#SLANT_ON] \{\
9689 . nr #SLANT_WAS_ON 1
9692 . PRINT "\s-2\v'-\\n[#DOC_LEAD]u/5u'\\n+[#EN_NUMBER]\v'+\\n[#DOC_LEAD]u/5u'\s+2"
9694 . if \\n[#PRINT_STYLE]=2 \{ .PRINT "\*[SUP]\\n+[#EN_NUMBER]\*[SUPX]" \}
9695 . nr #PP_STYLE_PREV \\n[#PP_STYLE]
9697 . if \\n[#INDENT_FIRST_PARAS] \{ .nr #INDENT_FIRSTS 1 \}
9698 . INDENT_FIRST_PARAS
9701 . LL \\n[#DOC_L_LENGTH]u
9703 . if \\n[#COLUMNS] \{\
9704 . ie \\n[#EN_NO_COLS] \{ .LL \\n[#DOC_L_LENGTH]u \}
9705 . el \{ .LL \\n[#COL_L_LENGTH]u \}
9709 . if \\n[#EN_NUMBER]=1 \{\
9711 . if \\n[#PRINT_STYLE]=1 \{\
9716 . if \\n[#PRINT_STYLE]=2 \{\
9717 . FAMILY \\*[$EN_TITLE_FAM]
9718 . FT \\*[$EN_TITLE_FT]
9719 . PT_SIZE \\n[#EN_PS]u\\*[$EN_TITLE_SIZE_CHANGE]
9722 . if !'\\*[$EN_TITLE]'' \{\
9723 . if '\\*[$EN_TITLE_QUAD]'L' \{ .LEFT \}
9724 . if '\\*[$EN_TITLE_QUAD]'LEFT' \{ .LEFT \}
9725 . if '\\*[$EN_TITLE_QUAD]'C' \{ .CENTER \}
9726 . if '\\*[$EN_TITLE_QUAD]'CENTER' \{ .CENTER \}
9727 . if '\\*[$EN_TITLE_QUAD]'CENTRE' \{ .CENTER \}
9728 . if '\\*[$EN_TITLE_QUAD]'R' \{ .RIGHT \}
9729 . if '\\*[$EN_TITLE_QUAD]'RIGHT' \{ .RIGHT \}
9730 . ie \\n[#EN_TITLE_UNDERSCORE] \{\
9731 . UNDERSCORE "\\*[$EN_TITLE]
9734 . PRINT "\\*[$EN_TITLE]
9738 . ie \\n[#EN_NUMBERS_ALIGN_RIGHT] \{\
9739 . ie \\n[#EN_NUMBER]=1 \{\
9740 . if !'\\*[$EN_TITLE]'' \{ .sp \}
9744 . if \\n[#PRINT_STYLE]=1 \{\
9749 . if \\n[#PRINT_STYLE]=2 \{\
9750 . FAMILY \\*[$EN_NUMBER_FAM]
9751 . FT \\*[$EN_NUMBER_FT]
9752 . PT_SIZE \\n[#EN_PS]u\\*[$EN_NUMBER_SIZE_CHANGE]
9754 . nr #RESET_L_LENGTH \\n(.l
9755 . nr #EN_NUMBER_L_LENGTH \w'\0'*\\n[#EN_NUMBER_PLACEHOLDERS]+\w'.'
9756 . ll \\n[#EN_NUMBER_L_LENGTH]u
9759 . if \\n[#PRINT_STYLE]=1 \{\
9764 . if \\n[#PRINT_STYLE]=2 \{\
9765 . FAMILY \\*[$EN_FAM]
9767 . PT_SIZE \\n[#EN_PS]u
9770 . ll \\n[#RESET_L_LENGTH]u
9771 . in \\n[#EN_NUMBER_L_LENGTH]u+\w'.\0'u
9772 . nr #EN_TEXT_INDENT \\n(.i
9773 . QUAD \\*[$EN_QUAD]
9777 . ie \\n[#EN_NUMBER]=1 \{\
9778 . if !'\\*[$EN_TITLE]'' \{ .sp \}
9781 . if \\n[#PRINT_STYLE]=1 \{\
9786 . if \\n[#PRINT_STYLE]=2 \{\
9787 . FAMILY \\*[$EN_NUMBER_FAM]
9788 . FT \\*[$EN_NUMBER_FT]
9789 . PT_SIZE \\n[#EN_PS]u\\*[$EN_NUMBER_SIZE_CHANGE]
9791 . QUAD \\*[$EN_QUAD]
9792 \En[#EN_NUMBER].\0\c
9793 . if \\n[#PRINT_STYLE]=2 \{\
9794 . FAMILY \\*[$EN_FAM]
9796 . PT_SIZE \\n[#EN_PS]u
9802 . if \\n[#EN_NUMBERS_ALIGN_RIGHT] \{\
9807 . nr #PP_STYLE \\n[#PP_STYLE_PREV]
9808 . if !\\n[#INDENT_FIRSTS] \{ .INDENT_FIRST_PARAS OFF \}
9811 . if \\n[#PRINT_STYLE]=1 \{\
9812 . if \\n[#UNDERLINE_WAS_ON] \{\
9813 . rr #UNDERLINE_WAS_ON
9817 . if \\n[#SLANT_WAS_ON] \{\
9830 \# Sets new document leading from #EN_LEAD, breaks to a new page,
9831 \# sets up an endnotes page based on registers and strings associated
9832 \# with endnotes, then outputs diversion END_NOTES.
9836 . nr #PAGINATION_STATE \\n[#PAGINATE]
9837 . nr #EN_FIRST_PAGE 1
9838 . nr #HEADER_STATE \\n[#HEADERS_ON]
9839 . ds $RESTORE_PAGENUM_STYLE \\*[$PAGENUM_STYLE]
9840 . if \\n[#HEADERS_ON]=1 \{\
9841 . if !\\n[#EN_ALLOWS_HEADERS_ALL] \{ .HEADERS OFF \}
9843 . if \\n[#HEADER_STATE]=1 \{\
9844 . ie \\n[#EN_HDRFTR_CENTER]=1 \{ . \}
9845 . el \{ .rm $HDRFTR_CENTER \}
9847 . ie !\\n[#SUSPEND_PAGINATION] \{\
9848 . if \\n[#PAGINATE]=1 \{\
9849 . if \\n[#PAGE_NUM_V_POS]=1 \{\
9850 . PAGENUM_STYLE \\*[$EN_PN_STYLE]
9851 . if \\n[#EN_FIRST_PN] \{ .PAGENUMBER \\n[#EN_FIRST_PN]-1 \}
9852 . if r#EN_NO_FIRST_PN \{ .nr #PAGINATE 0 \}
9857 . ie \\n[#PAGE_NUM_V_POS]=2 \{ .nr #PAGINATE 1 \}
9858 . el \{ .nr #PAGINATE 0 \}
9860 . if \\n[#FOOTERS_ON]=1 \{\
9861 . if !'\\*[$HDRFTR_CENTER_OLD]'' \{ .ds $HDRFTR_CENTER \\*[$HDRFTR_CENTER_OLD] \}
9864 . if \\n[#FINIS] \{\
9865 . if \\n[#FOOTERS_WERE_ON] \{\
9867 . rr #FOOTERS_WERE_ON
9869 . if \\n[#PAGINATION_WAS_ON] \{\ \"This register only set in FINIS
9870 . if \\n[#PAGINATION_STATE]=1 \{\
9872 . rr #PAGINATION_WAS_ON
9877 . if \\n[#FOOTERS_WERE_ON] \{\
9879 . rr #FOOTERS_WERE_ON
9881 . if \\n[#PAGINATION_WAS_ON] \{\
9882 . if \\n[#PAGINATION_STATE]=1 \{\
9884 . rr #PAGINATION_WAS_ON
9887 . if \\n[#FOOTERS_ON]=1 \{\
9888 . ds $HDRFTR_CENTER \\*[$HDRFTR_CENTER_NEW]
9889 . rm $HDRFTR_CENTER_OLD
9890 . rm $HDRFTR_CENTER_NEW
9892 . ie !\\n[#SUSPEND_PAGINATION] \{\
9893 . if \\n[#PAGE_NUM_V_POS]=1 \{\
9894 . if r#EN_NO_FIRST_PN \{\
9895 . if \\n[#PAGINATION_STATE]=1 \{\
9902 . if \\n[#PAGE_NUM_V_POS]=2 \{ .nr #PAGINATE 0 \}
9904 . rr #PAGINATION_STATE
9905 . PAGENUM_STYLE \\*[$EN_PN_STYLE]
9906 . if \\n[#EN_FIRST_PN] \{ .PAGENUMBER \\n[#EN_FIRST_PN] \}
9907 . if \\n[#HEADER_STATE]=1 \{\
9908 . if \\n[#EN_ALLOWS_HEADERS] \{ .HEADERS \}
9910 \# Collect endnote title string for TOC
9911 . nr #TOC_ENTRY_PN \\n%+\\n[#PAGE_NUM_ADJ]
9912 . af #TOC_ENTRY_PN \\g[#PAGENUMBER]
9913 . ds $TOC_TITLE_ITEM \\*[$EN_STRING]\\|
9916 . if \\n[#PRINT_STYLE]=1 \{\
9921 . if \\n[#PRINT_STYLE]=2 \{\
9922 \!. FAMILY \\*[$TOC_TITLE_FAM]
9923 \!. FT \\*[$TOC_TITLE_FT]
9924 \!. PT_SIZE \\n[#TOC_PS]u\\*[$TOC_TITLE_SIZE_CHANGE]
9927 . ie \\n[#PRINT_STYLE]=1 \{\
9928 \!. PAD "\\*[$TOC_TITLE_ITEM]\\*[$TOC_PN_TYPEWRITE]"
9931 \!. PAD "\\h'\\n[#TOC_TITLE_INDENT]u'\\*[$TOC_TITLE_ITEM]\\*[$TOC_PN]"
9936 . if \\n[#PRINT_STYLE]=2 \{\
9937 \!. FAMILY \\*[$TOC_PN_FAM]
9938 \!. FT \\*[$TOC_PN_FT]
9939 \!. PT_SIZE \\n[#TOC_PS]u\\*[$TOC_PN_SIZE_CHANGE]
9942 \!. PRINT \\*[LEADER]
9945 \!. PRINT \\n[#TOC_ENTRY_PN]
9949 \# End collection of endnote title string for TOC
9951 . if \\n[#PRINT_STYLE]=1 \{ .vs \\n[#EN_LEAD]u \}
9952 . if \\n[#PRINT_STYLE]=2 \{\
9953 . if \\n[#EN_NO_COLS] \{\
9954 . if \\n[#COLUMNS] \{ .nr #COLUMNS_WERE_ON 1 \}
9957 . nr #RESTORE_DOC_LEAD \\n[#DOC_LEAD]
9958 . ie \\n[#ADJ_EN_LEAD] \{\
9959 . nr #DOC_LEAD \\n[#EN_LEAD]
9961 . el \{ .DOC_LEAD \\n[#EN_LEAD]u \}
9964 . sp |\\n[#T_MARGIN]u
9966 . if \\n[#SLANT_ON] \{\
9970 . if !'\\*[$EN_STRING]'' \{\
9971 . if \\n[#PRINT_STYLE]=1 \{\
9977 . if \\n[#PRINT_STYLE]=2 \{\
9978 . LL \\n[#DOC_L_LENGTH]u
9980 . if \\n[#COLUMNS] \{\
9981 . ie \\n[#EN_NO_COLS] \{ .LL \\n[#DOC_L_LENGTH]u \}
9982 . el \{ .LL \\n[#COL_L_LENGTH]u \}
9985 . FAMILY \\*[$EN_STRING_FAM]
9986 . FT \\*[$EN_STRING_FT]
9987 . PT_SIZE \\n[#EN_PS]u\\*[$EN_STRING_SIZE_CHANGE]
9990 . if '\\*[$EN_STRING_QUAD]'L' \{ .LEFT \}
9991 . if '\\*[$EN_STRING_QUAD]'LEFT' \{ .LEFT \}
9992 . if '\\*[$EN_STRING_QUAD]'C' \{ .CENTER \}
9993 . if '\\*[$EN_STRING_QUAD]'CENTER' \{ .CENTER \}
9994 . if '\\*[$EN_STRING_QUAD]'CENTRE' \{ .CENTER \}
9995 . if '\\*[$EN_STRING_QUAD]'R' \{ .RIGHT \}
9996 . if '\\*[$EN_STRING_QUAD]'RIGHT' \{ .RIGHT \}
9998 . if \\n[#EN_STRING_CAPS] \{ .CAPS \}
9999 . ie \\n[#EN_STRING_UNDERSCORE] \{\
10000 . ie \\n[#EN_STRING_UNDERSCORE]=2 \{\
10001 . UNDERSCORE2 "\\*[$EN_STRING]
10004 . UNDERSCORE "\\*[$EN_STRING]
10008 . PRINT "\\*[$EN_STRING]
10012 . ALD \\n[#EN_LEAD]u
10013 . QUAD \\*[$EN_QUAD]
10019 . if \\n[#PRINT_STYLE]=1 \{ .vs \\n[#DOC_LEAD]u \}
10020 . if \\n[#PRINT_STYLE]=2 \{\
10021 . ie \\n[#ADJ_EN_LEAD] \{\
10022 . nr #DOC_LEAD \\n[#RESTORE_DOC_LEAD]
10024 . el \{ .DOC_LEAD \\n[#RESTORE_DOC_LEAD]u \}
10025 . rr #RESTORE_DOC_LEAD
10027 . if \\n[#COLUMNS_WERE_ON] \{ .nr #COLUMNS 1 \}
10028 . if \\n[#HEADER_STATE]=1 \{ .HEADERS \}
10032 \# ====================================================================
10034 \# +++TABLE OF CONTENTS+++
10036 \# Strings to allocate space for leaders and entry page numbers
10038 .ds $TOC_PN \\*[ST100]\\F[\\*[$TOC_PN_FAM]]\\f[\\*[$TOC_PN_FT]]\\s[\\n[#TOC_PS]u]#\\*[ST100X]\\*[ST101]\\s[\\*[$TOC_PN_SIZE_CHANGE]]\\|\\h'\\w'0'u*\\n[#TOC_PN_PADDING]u'\*[ST101X]
10039 .ds $TOC_PN_TYPEWRITE \\*[ST100]#\\*[ST100X]\\*[ST101]\\|\\h'\\w'0'u*\\n[#TOC_PN_PADDING]u'\\*[ST101X]
10041 \# TOC ENTRIES PAGE NUMBERS PADDING
10042 \# --------------------------------
10044 \# <number of placeholders for toc entries page numbers>
10046 \# Creates or modifies register #TOC_PN_PADDING.
10048 \# "Placeholders" is the maximum number of digits in a page
10053 .MAC TOC_PADDING END
10054 . nr #TOC_PN_PADDING \\$1
10061 \# <none> | <anything>
10063 \# Creates or removes register #PAGINATE_TOC.
10065 \# Default is to paginate toc.
10067 .MAC PAGINATE_TOC END
10068 . ie '\\$1'' \{ .nr #PAGINATE_TOC 1 \}
10069 . el \{ .nr #PAGINATE_TOC 0 \}
10076 \# <overall default family for toc pages>
10078 \# Creates string $TOC_FAM.
10080 \# Default is same as document family.
10082 .MAC TOC_FAMILY END
10090 \# <base point size for toc pages>
10092 \# Creates or modifies register #TOC_PS.
10094 \# This size control macro differs from other size control macros
10095 \# in that it sets an absolute point size, not a relative one.
10096 \# See notes for ENDNOTE_PT_SIZE for explanation. No unit of
10097 \# measure required.
10099 \# No unit of measure required (points assumed). Default is 11.5
10102 .MAC TOC_PT_SIZE END
10103 . nr #TOC_PS (p;\\$1)
10110 \# <leading for toc pages> [ADJUST]
10112 \# Creates or modifies register #TOC_LEAD. If optional ADJUST
10113 \# given, adjusts lead to fill page. If #OK_PROCESS_LEAD doesn't
10114 \# exist, stores arguments for when it's okay to run the macro.
10116 \# No unit of measure required (points assumed).
10118 \# Default is same as DOC_LEAD.
10121 . if !\\n[#OK_PROCESS_LEAD] \{\
10122 . ds $TOC_LEAD \\$1
10124 . ds $ADJUST_TOC_LEAD \\$2
10129 . nr #TOC_LEAD (p;\\$1)
10130 . if '\\$2'ADJUST' \{\
10131 . nr #ORIG_DOC_LEAD \\n[#DOC_LEAD]
10132 . nr #ADJ_DOC_LEAD 1
10133 . nr #ADJ_TOC_LEAD 1
10134 . nr #NO_TRAP_RESET 1
10135 . DOC_LEAD \\n[#TOC_LEAD]u ADJUST
10136 . nr #TOC_LEAD \\n[#DOC_LEAD]
10137 . DOC_LEAD \\n[#ORIG_DOC_LEAD]u
10138 . rr #NO_TRAP_RESET
10140 . rr #ORIG_DOC_LEAD
10145 \# TOC PAGES PAGE-NUMBERING STYLE
10146 \# ------------------------------
10148 \# DIGIT | ROMAN | roman | ALPHA | alpha
10150 \# Creates or modifies string $TOC_PN_STYLE
10152 \# Page numbering style for page numbers that appear in the
10153 \# headers/footers of toc pages. See notes for PAGENUM_STYLE.
10155 \# Default is roman.
10157 .MAC TOC_PAGENUM_STYLE END
10158 . ds $TOC_PN_STYLE \\$1
10162 \# TOC RECTO_VERSO SWITCH
10163 \# ----------------------
10165 \# <none> | <anything>
10167 \# Creates or removes register #TOC_RV_SWITCH
10169 \# Allows switching of L/R margins if a doc is recto/verso and
10170 \# the first toc page happens to fall the wrong way
10172 .MAC TOC_RV_SWITCH END
10173 . ie '\\$1'' \{ .nr #TOC_RV_SWITCH 1 \}
10174 . el \{ .rr #TOC_RV_SWITCH \}
10177 \# - for TOC "doc header" (i.e. "Contents")
10179 \# TOC HEADER FAMILY
10180 \# -----------------
10182 \# <family for toc header>
10184 \# Creates or modifies string $TOC_HEADER_FAM
10186 \# Default is same as TOC_FAMILY.
10188 .MAC TOC_HEADER_FAMILY END
10189 . ds $TOC_HEADER_FAM \\$1
10196 \# <font for toc header>
10198 \# Creates or modified string $TOC_HEADER_FT
10200 \# Default is bold for TYPESET.
10202 .MAC TOC_HEADER_FONT END
10203 . ds $TOC_HEADER_FT \\$1
10210 \# <+|- number of points by which to in/decrease toc header
10211 \# (relative to overall toc point size)>
10213 \# Creates or modifies string $TOC_HEADER_SIZE_CHANGE.
10217 .MAC TOC_HEADER_SIZE END
10218 . ds $TOC_HEADER_SIZE_CHANGE \\$1
10225 \# L | LEFT | C | CENTER | CENTRE | R | RIGHT
10227 \# Creates or modifies string $TOC_HEADER_QUAD.
10229 \# Default is LEFT.
10231 .MAC TOC_HEADER_QUAD END
10232 . ds $TOC_HEADER_QUAD \\$1
10236 \# TOC HEADER STRING
10237 \# -----------------
10239 \# <string for "doc header" of first toc page>
10241 \# Creates or modifies string $TOC_HEADER_STRING
10243 \# Default is "Contents".
10245 .MAC TOC_HEADER_STRING END
10246 . ds $TOC_HEADER_STRING \\$1
10249 \# - for TOC entries page number numerals
10251 \# TOC ENTRIES PAGE NUMBER FAMILY
10252 \# ------------------------------
10254 \# <family to use for toc entries page number>
10256 \# Creates or modifies string $TOC_PN_FAM.
10258 \# Default is same as $TOC_FAM.
10260 .MAC TOC_PN_FAMILY END
10261 . ds $TOC_PN_FAM \\$1
10265 \# TOC ENTRIES PAGE NUMBER FONT
10266 \# ----------------------------
10268 \# <font to use for toc entries page number>
10270 \# Creates or modifies string $TOC_PN_FT.
10272 \# Default is roman.
10274 .MAC TOC_PN_FONT END
10275 . ds $TOC_PN_FT \\$1
10279 \# TOC ENTRIES PAGE NUMBER SIZE
10280 \# ----------------------------
10282 \# <+|- number of points by which to in/decrease toc
10283 \# entries page numbers (relative to overall toc point size)>
10285 \# Creates or modifies string $TOC_PN_SIZE_CHANGE.
10289 .MAC TOC_PN_SIZE END
10290 . ds $TOC_PN_SIZE_CHANGE \\$1
10294 \# Control macros for toc doc titles, heads, subheads and paraheads
10295 \# ----------------------------------------------------------------
10297 \# All these control macros behave the same way, setting the family,
10298 \# font, point size and indent from the left margin of the different
10299 \# kinds of entries that can appear in the toc. The way they
10300 \# operate is identical to all other _FAMILY, _FONT and _SIZE
10301 \# control macros. _INDENT takes an absolute value.
10302 \# TOC_APPENDS_AUTHORS is unique in this section.
10304 \# - for title entries
10306 .MAC TOC_TITLE_FAMILY END
10307 . ds $TOC_TITLE_FAM \\$1
10311 .MAC TOC_TITLE_FONT END
10312 . ds $TOC_TITLE_FT \\$1
10316 .MAC TOC_TITLE_SIZE END
10317 . ds $TOC_TITLE_SIZE_CHANGE \\$1
10321 .MAC TOC_TITLE_INDENT END
10322 . nr #TOC_TITLE_INDENT (\\$1)
10326 .MAC TOC_TITLE_ENTRY END
10327 . nr #USER_SET_TITLE_ITEM 1
10328 . ds $USER_SET_TITLE_ITEM \\$1
10332 \# APPEND AUTHOR(S) TO TOC DOC TITLE ENTRIES
10333 \# -----------------------------------------
10335 \# <none> | <name(s) of author(s) as they should appear in toc doc title entries>
10337 \# Creates register #TOC_AUTHORS (to tell TOC to append authors
10338 \# to toc doc title entries). Optionally creates string
10341 \# Normally, TOC does not append the author(s) to a toc doc title
10342 \# entry. This special macro instructs TOC to do so.
10344 \# If user has multiple authors for each doc when collating,
10345 \# TOC_APPENDS_AUTHOR "<string>" must be inserted somewhere between
10346 \# COLLATE and START in each doc. Otherwise, mom prints only the
10347 \# first author given to AUTHOR.
10349 .MAC TOC_APPENDS_AUTHOR END
10350 . nr #TOC_AUTHORS 1
10352 . ds $TOC_AUTHORS \\$1
10356 \# - for head entries
10358 .MAC TOC_HEAD_FAMILY END
10359 . ds $TOC_HEAD_FAM \\$1
10363 .MAC TOC_HEAD_FONT END
10364 . ds $TOC_HEAD_FT \\$1
10368 .MAC TOC_HEAD_SIZE END
10369 . ds $TOC_HEAD_SIZE_CHANGE \\$1
10373 .MAC TOC_HEAD_INDENT END
10374 . nr #TOC_HEAD_INDENT (\\$1)
10377 \# - for subhead entries
10379 .MAC TOC_SUBHEAD_FAMILY END
10380 . ds $TOC_SH_FAM \\$1
10384 .MAC TOC_SUBHEAD_FONT END
10385 . ds $TOC_SH_FT \\$1
10389 .MAC TOC_SUBHEAD_SIZE END
10390 . ds $TOC_SH_SIZE_CHANGE \\$1
10394 .MAC TOC_SUBHEAD_INDENT END
10395 . nr #TOC_SH_INDENT (\\$1)
10398 \# - for parahead entries
10400 .MAC TOC_PARAHEAD_FAMILY END
10401 . ds $TOC_PH_FAM \\$1
10405 .MAC TOC_PARAHEAD_FONT END
10406 . ds $TOC_PH_FT \\$1
10410 .MAC TOC_PARAHEAD_SIZE END
10411 . ds $TOC_PH_SIZE_CHANGE \\$1
10415 .MAC TOC_PARAHEAD_INDENT END
10416 . nr #TOC_PH_INDENT (\\$1)
10421 . if !r#PAGINATE_TOC \{ .PAGINATE_TOC \}
10422 . nr #TOC_FIRST_PAGE 1
10423 . if \\n[#FINIS] \{\
10424 . if \\n[#FOOTERS_WERE_ON] \{\
10425 . FOOTERS \" Have to turn FOOTERS on for next bit to work, so we can't skip this step
10428 . if \\n[#FOOTERS_ON]=1 \{\
10429 . if !'\\*[$HDRFTR_CENTER_OLD]'' \{ .ds $HDRFTR_CENTER \\*[$HDRFTR_CENTER_OLD] \}
10430 . ie \\n[#PAGINATE_TOC]=1 \{ .PAGINATE \}
10431 . el \{ .PAGINATION OFF \}
10433 . if \\n[#FOOTERS_WERE_ON] \{ .FOOTERS OFF \} \" But have to turn FOOTERS off again so they don't print when FINIS was called
10435 . if \\n[#FINIS] \{\
10436 . if \\n[#FOOTERS_WERE_ON] \{ .FOOTERS \} \" Finally, turn footers on if they were on
10437 . rr #FOOTERS_WERE_ON
10438 . if \\n[#PAGINATION_WAS_ON] \{\
10440 . rr #PAGINATION_WAS_ON
10444 . ie \\n[#PAGINATE_TOC]=1 \{ .PAGINATE \}
10445 . el \{ .PAGINATION OFF \}
10446 . if \\n[#FOOTERS_ON]=1 \{\
10447 . ds $HDRFTR_CENTER \\*[$HDRFTR_CENTER_NEW]
10448 . rm $HDRFTR_CENTER_OLD
10449 . rm $HDRFTR_CENTER_NEW
10454 . if \\n[#PRINT_STYLE]=1 \{\
10456 . DOC_LEAD 24 ADJUST
10462 . if \\n[#PRINT_STYLE]=2 \{\
10463 . ie r#ADJ_TOC_LEAD \{\
10464 . nr #NO_TRAP_RESET 1
10465 . DOC_LEAD \\n[#TOC_LEAD]u ADJUST
10466 . rr #NO_TRAP_RESET
10468 . el \{ .DOC_LEAD \\n[#TOC_LEAD]u \}
10470 . sp |\\n[#T_MARGIN]u-\\n[#DOC_LEAD]u
10471 . if \\n[#SLANT_ON] \{\
10474 . DOC_LINE_LENGTH \\n[#DOC_L_LENGTH]u
10475 . QUAD \\*[$TOC_HEADER_QUAD]
10476 . PAGENUM_STYLE \\*[$TOC_PN_STYLE]
10477 . if \\n[#PRINT_STYLE]=1 \{\
10482 . if \\n[#PRINT_STYLE]=2 \{\
10483 . FAMILY \\*[$TOC_HEADER_FAM]
10484 . FT \\*[$TOC_HEADER_FT]
10485 . PT_SIZE \\n[#TOC_PS]u\\*[$TOC_HEADER_SIZE_CHANGE]
10487 . ie \\n[#PRINT_STYLE]=1 \{\
10490 . PRINT "\\*[$TOC_HEADER_STRING]"
10495 . PRINT "\\*[$TOC_HEADER_STRING]"
10499 \# In collated docs, this bit inserts the first doc's title
10500 \# underneath the TOC header, before the TOC_ENTRIES diversion
10503 . if d$FIRST_DOC_TITLE \{\
10504 . nr #RESTORE_TOC_PN_PADDING \\n[#TOC_PN_PADDING]
10505 . TOC_PADDING \\n[#FIRST_DOC_TOC_PN_PADDING]
10506 . if \\n[#PRINT_STYLE]=2 \{\
10507 . FAMILY \\*[$TOC_TITLE_FAM]
10508 . FT \\*[$TOC_TITLE_FT]
10509 . PT_SIZE \\n[#TOC_PS]u\\*[$TOC_TITLE_SIZE_CHANGE]
10511 . ie \\n[#PRINT_STYLE]=1 \{\
10512 . PAD "\\*[$FIRST_DOC_TITLE]\\*[$TOC_PN_TYPEWRITE]"
10515 . PAD "\\h'\\n[#TOC_TITLE_INDENT]u'\\*[$FIRST_DOC_TITLE]\\*[$TOC_PN]"
10520 . if \\n[#PRINT_STYLE]=2 \{\
10521 . FAMILY \\*[$TOC_PN_FAM]
10522 . FT \\*[$TOC_PN_FT]
10523 . PT_SIZE \\n[#TOC_PS]u\\*[$TOC_PN_SIZE_CHANGE]
10526 . PRINT \\*[LEADER]
10528 . PRINT \\n[#FIRST_DOC_TITLE_PN]
10531 . TOC_PADDING \\n[#RESTORE_TOC_PN_PADDING]
10537 \# ====================================================================
10544 \# <number of columns> <width of gutters>
10546 \# Creates registers associated with setting docs in columns.
10547 \# Calculates column line lengths and offsets
10549 \# COLUMNS, if used, s/b the last macro invoked before START.
10552 . if \\n[#IGNORE_COLUMNS]=1 \{ .return \}
10554 . nr #NUM_COLS \\$1
10555 . nr #GUTTER (\\$2)
10556 . nr #COL_L_LENGTH \\n[#L_LENGTH]-(\\n[#GUTTER]*(\\n[#NUM_COLS]-1))/\\n[#NUM_COLS]
10557 . nr #COL_TOTAL 0 \\n[#COL_L_LENGTH]+\\n[#GUTTER]
10559 . while !\\n[#COL_NUM]=\\n[#NUM_COLS] \{\
10560 . nr #COL_\\n+[#COL_NUM]_L_MARGIN \\n[#L_MARGIN]+\\n[#COL_TOTAL]
10561 . nr #COL_TOTAL \\n+[#COL_TOTAL]
10573 \# Breaks current column and moves to next column.
10574 \# If current column is the last on the page, breaks
10578 . if \\n[#COLUMNS] \{\
10580 . ie '\\$0'COL_NEXT' \{ .br \}
10585 . ie \\n[#COL_NUM]=\\n[#NUM_COLS] \{\
10592 \# ====================================================================
10594 \# +++DOCUMENT PROCESSING MISC AND SUPPORT MACROS+++
10601 \# Turns headers off (if on) and saves header state, sets register
10602 \# #COLLATE to 1 (toggle), and breaks to a new page.
10604 \# COLLATE exists primarily to allow putting multiple chapters in
10605 \# a single file, although it can be used for any document type. After
10606 \# COLLATE, any of the macros that normally precede START may be
10607 \# used, and should behave as expected.
10609 \# N.B.--the START macro *must* be used after COLLATE (and any other
10610 \# macros that alter mom's behaviour).
10614 . nr #HEADER_STATE \\n[#HEADERS_ON]
10616 . if \\n[#PAGE_NUM_V_POS]=1 \{\
10617 . nr #PAGINATION_STATE \\n[#PAGINATE]
10622 \# Collect first doc's title for TOC
10623 . if \\n[#COLLATED_DOC]=0 \{\
10624 . ie \\n[#USER_SET_TITLE_ITEM] \{\
10625 . ds $FIRST_DOC_TITLE \\*[$USER_SET_TITLE_ITEM]\\|
10626 . rr #USER_SET_TITLE_ITEM
10627 . rm $USER_SET_TITLE_ITEM
10630 . ie \\n[#DOC_TYPE]=2 \{\
10631 . ie '\\*[$CHAPTER_TITLE]'' \{\
10632 . ds $FIRST_DOC_TITLE \\*[$CHAPTER_STRING] \\*[$CHAPTER]\\|
10635 . ie '\\*[$CHAPTER]'' \{\
10636 . ds $FIRST_DOC_TITLE \\*[$CHAPTER_TITLE]\\|
10639 . ds $FIRST_DOC_TITLE \\*[$CHAPTER_STRING] \\*[$CHAPTER]: \\*[$CHAPTER_TITLE]\\|
10644 . ds $FIRST_DOC_TITLE \\*[$TITLE]\\|
10647 . if \\n[#TOC_AUTHORS]=1 \{\
10648 . ie '\\*[$TOC_AUTHORS]'' \{\
10649 . as $FIRST_DOC_TITLE /\\|\\*[$AUTHOR_1]\\|
10652 . as $FIRST_DOC_TITLE /\\|\\*[$TOC_AUTHORS]\\|
10656 . nr #COLLATED_DOC 1
10658 \# End title collection for TOC
10659 . LL \\n[#DOC_L_LENGTH]u
10661 . LS \\n[#DOC_LEAD]u
10666 . if \\n[#DEFER_PAGINATION] \{ .PAGINATE \}
10667 . if !'\\*[$RESTORE_PAGENUM_STYLE]'' \{\
10668 . PAGENUM_STYLE \\*[$RESTORE_PAGENUM_STYLE]
10669 . rm $RESTORE_PAGENUM_STYLE
10675 \# OUTPUT BLANK PAGES
10676 \# ------------------
10678 \# <number of blank pages to output>
10680 \# Outputs blank pages.
10682 \# If recto/verso, each page is recto/verso, even if there's
10686 . nr #HOW_MANY \\$1
10688 . while \\n+[#PAGES]<=\\n[#HOW_MANY] \{\
10689 . if \\n[#HEADERS_ON]=1 \{\
10690 . nr #HEADERS_WERE_ON 1
10693 . if \\n[#PAGE_NUM_V_POS]=1 \{\
10694 . if \\n[#PAGINATE]=1 \{ .nr #PAGINATE_WAS_ON 1 \}
10699 . if \\n[#FOOTERS_ON]=1 \{\
10700 . nr #FOOTERS_WERE_ON 1
10703 . if \\n[#PAGE_NUM_V_POS]=2 \{\
10704 . if \\n[#PAGINATE]=1 \{ .nr #PAGINATE_WAS_ON 1 \}
10707 . if \\n[#HEADERS_WERE_ON] \{ .HEADERS \}
10708 . if \\n[#PAGE_NUM_V_POS]=1 \{\
10709 . if \\n[#PAGINATE_WAS_ON] \{ .PAGINATE \}
10713 . if \\n[#FOOTERS_WERE_ON] \{ .FOOTERS \}
10714 . if \\n[#PAGE_NUM_V_POS]=2 \{\
10715 . if \\n[#PAGINATE_WAS_ON] \{ .PAGINATE \}
10717 . rr #HEADERS_WERE_ON
10718 . rr #FOOTERS_WERE_ON
10719 . rr #PAGINATE_WAS_ON
10723 \# SET TRAPS FOR HEADERS/FOOTERS/FOOTNOTES
10724 \# ---------------------------------------
10728 \# Sets header/footer/footnotes/etc... traps.
10729 \# Calculates the number of lines that actually fit on a
10730 \# page based on #B_MARGIN and resets page bottom trap to coincide
10731 \# with the depth of that number of lines , or, if #ADJ_DOC_LEAD=1,
10732 \# adjusts #DOC_LEAD so that the last line of text on a page falls
10733 \# exactly on #B_MARGIN.
10736 \# *Remove all header/footer traps
10737 . if !\\n[#NO_TRAP_RESET] \{\
10742 \# *Plant header trap
10745 \# *Adjust lead so last line of text falls on B_MARGIN,...
10746 . ie \\n[#ADJ_DOC_LEAD]=1 \{\
10747 . nr #LINES_PER_PAGE 0 1
10748 . nr #DOC_LEAD_ADJ 0 1
10749 . nr #DEPTH_TO_B_MARGIN \\n[#PAGE_LENGTH]-\\n[#B_MARGIN]-1v
10750 . while \\n[#T_MARGIN]+(\\n[#DOC_LEAD]*\\n+[#LINES_PER_PAGE])<\\n[#DEPTH_TO_B_MARGIN] \{ . \}
10751 . nr #LINES_PER_PAGE -1
10752 . while \\n[#T_MARGIN]+(\\n[#DOC_LEAD]+\\n+[#DOC_LEAD_ADJ]*\\n[#LINES_PER_PAGE])<\\n[#DEPTH_TO_B_MARGIN] \{ . \}
10753 . DOC_LEAD \\n[#DOC_LEAD]u+\\n[#DOC_LEAD_ADJ]u
10755 \# *...or calculate new B_MARGIN based on # of lines (at #DOC_LEAD) that fit
10758 . nr #LINES_PER_PAGE 0 1
10759 . nr #DEPTH_TO_B_MARGIN \\n[#PAGE_LENGTH]-\\n[#B_MARGIN]-1v
10760 . while \\n[#T_MARGIN]+(\\n[#DOC_LEAD]*\\n+[#LINES_PER_PAGE])<\\n[#DEPTH_TO_B_MARGIN] \{ . \}
10761 . nr #B_MARGIN \\n[#PAGE_LENGTH]-(\\n[#T_MARGIN]+(\\n[#DOC_LEAD]*\\n[#LINES_PER_PAGE]))
10763 \# *Set footer and footnote overflow traps
10764 . if !\\n[#NO_TRAP_RESET] \{\
10766 . nr #SPACE_REMAINING 0
10768 . nr #VARIABLE_FOOTER_POS 0-\\n[#B_MARGIN]u
10770 . wh -\\n[#B_MARGIN]u FN_OVERFLOW_TRAP
10771 . ch FOOTER -\\n[#B_MARGIN]u
10782 \# Adds left, right, or both indent values to document elements
10783 \# like heads and subheads that are processed in environments.
10785 .MAC CHECK_INDENT END
10786 . if \\n[#INDENT_LEFT_ACTIVE] \{\
10787 . in \\n[#L_INDENT]u
10788 . if \\n[#QUOTE] \{\
10789 . in -\\n[#L_INDENT]u \"Because you added an indent in 2nd line of macro
10790 . ll -\\n[#L_INDENT]u
10793 . if \\n[#EPIGRAPH] \{\
10794 . in -\\n[#L_INDENT]u
10795 . ll -\\n[#L_INDENT]u
10799 . if \\n[#INDENT_RIGHT_ACTIVE] \{\
10800 . ll -\\n[#R_INDENT]u
10803 . if \\n[#INDENT_BOTH_ACTIVE] \{\
10804 . in \\n[#BL_INDENT]u
10805 . ll -\\n[#BR_INDENT]u
10807 . if \\n[#QUOTE] \{\
10808 . in -\\n[#BL_INDENT]u
10809 . ie \\n[#BR_INDENT]=\\n[#BL_INDENT] \{\
10810 . ll -\\n[#BR_INDENT]u
10814 . ll -(\\n[#BR_INDENT]u/2u)
10818 . if \\n[#EPIGRAPH] \{\
10819 . in -\\n[#BL_INDENT]u
10820 . ie \\n[#BR_INDENT]=\\n[#BL_INDENT] \{\
10821 . ll -\\n[#BR_INDENT]u
10825 . ll -(\\n[#BR_INDENT]u/2u)
10838 \# Removes left, right, or both indent values from document elements
10839 \# like heads and subheads that are processed in environments.
10841 .MAC REMOVE_INDENT END
10843 . ll \\n[#L_LENGTH]u
10848 \# ====================================================================
10850 \# +++DOCUMENT PROCESSING ALIASES+++
10852 \# Aliases to make life easier for users: synonyms, short forms
10853 \# and alternate spellings.
10857 .ALIAS BREAK_BLOCKQUOTE BREAK_QUOTE
10858 .ALIAS BREAK_CITATION BREAK_QUOTE
10859 .ALIAS BREAK_CITE BREAK_QUOTE
10860 .ALIAS CITATION BLOCKQUOTE
10861 .ALIAS CITE BLOCKQUOTE
10862 .ALIAS DOC_R_MARGIN DOC_RIGHT_MARGIN
10863 .ALIAS DOC_L_MARGIN DOC_LEFT_MARGIN
10864 .ALIAS DOC_L_LENGTH DOC_LINE_LENGTH
10865 .ALIAS DOC_RMARGIN DOC_RIGHT_MARGIN
10866 .ALIAS DOC_LMARGIN DOC_LEFT_MARGIN
10867 .ALIAS DOC_LLENGTH DOC_LINE_LENGTH
10868 .ALIAS DOC_FAM DOC_FAMILY
10870 .ALIAS PP_FT PP_FONT
10871 .ALIAS DOC_PS DOC_PT_SIZE
10872 .ALIAS DOC_LS DOC_LEAD
10873 .ALIAS PAGENUM PAGENUMBER
10874 .ALIAS PAGINATION PAGINATE
10875 .ALIAS TOC_FAM TOC_FAM
10876 .ALIAS TOC_PS TOC_PT_SIZE
10878 \# HEADER and FOOTER aliases for HDRFTR macros.
10880 .ALIAS ENDNOTES_HEADER_CENTER ENDNOTES_HDRFTR_CENTER
10881 .ALIAS HEADER_FAMILY HDRFTR_FAMILY
10882 .ALIAS HEADER_FAM HDRFTR_FAMILY
10883 .ALIAS HEADER_SIZE HDRFTR_SIZE
10884 .ALIAS HEADER_PLAIN HDRFTR_PLAIN
10885 .ALIAS HEADER_RULE_GAP HDRFTR_RULE_GAP
10886 .ALIAS HEADER_RULE HDRFTR_RULE
10887 .ALIAS HEADER_LEFT HDRFTR_LEFT
10888 .ALIAS HEADER_LEFT_FAMILY HDRFTR_LEFT_FAMILY
10889 .ALIAS HEADER_LEFT_FAM HDRFTR_LEFT_FAMILY
10890 .ALIAS HEADER_LEFT_FONT HDRFTR_LEFT_FONT
10891 .ALIAS HEADER_LEFT_FT HDRFTR_LEFT_FONT
10892 .ALIAS HEADER_LEFT_SIZE HDRFTR_LEFT_SIZE
10893 .ALIAS HEADER_LEFT_PS HDRFTR_LEFT_SIZE
10894 .ALIAS HEADER_LEFT_CAPS HDRFTR_LEFT_CAPS
10895 .ALIAS HEADER_CENTER HDRFTR_CENTER
10896 .ALIAS HEADER_CENTRE HDRFTR_CENTER
10897 .ALIAS HEADER_CENTER_FAMILY HDRFTR_CENTER_FAMILY
10898 .ALIAS HEADER_CENTRE_FAMILY HDRFTR_CENTER_FAMILY
10899 .ALIAS HEADER_CENTER_FAM HDRFTR_CENTER_FAMILY
10900 .ALIAS HEADER_CENTRE_FAM HDRFTR_CENTER_FAMILY
10901 .ALIAS HEADER_CENTER_FONT HDRFTR_CENTER_FONT
10902 .ALIAS HEADER_CENTRE_FONT HDRFTR_CENTER_FONT
10903 .ALIAS HEADER_CENTER_FT HDRFTR_CENTER_FONT
10904 .ALIAS HEADER_CENTRE_FT HDRFTR_CENTER_FONT
10905 .ALIAS HEADER_CENTER_SIZE HDRFTR_CENTER_SIZE
10906 .ALIAS HEADER_CENTRE_SIZE HDRFTR_CENTER_SIZE
10907 .ALIAS HEADER_CENTER_PS HDRFTR_CENTER_SIZE
10908 .ALIAS HEADER_CENTRE_PS HDRFTR_CENTER_SIZE
10909 .ALIAS HEADER_CENTER_PAD HDRFTR_CENTER_PAD
10910 .ALIAS HEADER_CENTRE_PAD HDRFTR_CENTER_PAD
10911 .ALIAS HEADER_CENTER_CAPS HDRFTR_CENTER_CAPS
10912 .ALIAS HEADER_CENTRE_CAPS HDRFTR_CENTER_CAPS
10913 .ALIAS HEADER_RIGHT HDRFTR_RIGHT
10914 .ALIAS HEADER_RIGHT_FAMILY HDRFTR_RIGHT_FAMILY
10915 .ALIAS HEADER_RIGHT_FAM HDRFTR_RIGHT_FAMILY
10916 .ALIAS HEADER_RIGHT_FONT HDRFTR_RIGHT_FONT
10917 .ALIAS HEADER_RIGHT_FT HDRFTR_RIGHT_FONT
10918 .ALIAS HEADER_RIGHT_SIZE HDRFTR_RIGHT_SIZE
10919 .ALIAS HEADER_RIGHT_PS HDRFTR_RIGHT_SIZE
10920 .ALIAS HEADER_RIGHT_CAPS HDRFTR_RIGHT_CAPS
10921 .ALIAS HEADER_RECTO HDRFTR_RECTO
10922 .ALIAS HEADER_VERSO HDRFTR_VERSO
10923 .ALIAS ENDNOTES_FOOTER_CENTER ENDNOTES_HDRFTR_CENTER
10924 .ALIAS FOOTER_FAMILY HDRFTR_FAMILY
10925 .ALIAS FOOTER_FAM HDRFTR_FAMILY
10926 .ALIAS FOOTER_SIZE HDRFTR_SIZE
10927 .ALIAS FOOTER_PLAIN HDRFTR_PLAIN
10928 .ALIAS FOOTER_RULE_GAP HDRFTR_RULE_GAP
10929 .ALIAS FOOTER_RULE HDRFTR_RULE
10930 .ALIAS FOOTER_LEFT HDRFTR_LEFT
10931 .ALIAS FOOTER_LEFT_FAMILY HDRFTR_LEFT_FAMILY
10932 .ALIAS FOOTER_LEFT_FAM HDRFTR_LEFT_FAMILY
10933 .ALIAS FOOTER_LEFT_FONT HDRFTR_LEFT_FONT
10934 .ALIAS FOOTER_LEFT_FT HDRFTR_LEFT_FONT
10935 .ALIAS FOOTER_LEFT_SIZE HDRFTR_LEFT_SIZE
10936 .ALIAS FOOTER_LEFT_PS HDRFTR_LEFT_SIZE
10937 .ALIAS FOOTER_LEFT_CAPS HDRFTR_LEFT_CAPS
10938 .ALIAS FOOTER_CENTER HDRFTR_CENTER
10939 .ALIAS FOOTER_CENTRE HDRFTR_CENTER
10940 .ALIAS FOOTER_CENTER_FAMILY HDRFTR_CENTER_FAMILY
10941 .ALIAS FOOTER_CENTRE_FAMILY HDRFTR_CENTER_FAMILY
10942 .ALIAS FOOTER_CENTER_FAM HDRFTR_CENTER_FAMILY
10943 .ALIAS FOOTER_CENTRE_FAM HDRFTR_CENTER_FAMILY
10944 .ALIAS FOOTER_CENTER_FONT HDRFTR_CENTER_FONT
10945 .ALIAS FOOTER_CENTRE_FONT HDRFTR_CENTER_FONT
10946 .ALIAS FOOTER_CENTER_FT HDRFTR_CENTER_FONT
10947 .ALIAS FOOTER_CENTRE_FT HDRFTR_CENTER_FONT
10948 .ALIAS FOOTER_CENTER_SIZE HDRFTR_CENTER_SIZE
10949 .ALIAS FOOTER_CENTRE_SIZE HDRFTR_CENTER_SIZE
10950 .ALIAS FOOTER_CENTER_PAD HDRFTR_CENTER_PAD
10951 .ALIAS FOOTER_CENTRE_PAD HDRFTR_CENTER_PAD
10952 .ALIAS FOOTER_CENTER_PS HDRFTR_CENTER_SIZE
10953 .ALIAS FOOTER_CENTRE_PS HDRFTR_CENTER_SIZE
10954 .ALIAS FOOTER_CENTER_CAPS HDRFTR_CENTER_CAPS
10955 .ALIAS FOOTER_CENTRE_CAPS HDRFTR_CENTER_CAPS
10956 .ALIAS FOOTER_RIGHT HDRFTR_RIGHT
10957 .ALIAS FOOTER_RIGHT_FAMILY HDRFTR_RIGHT_FAMILY
10958 .ALIAS FOOTER_RIGHT_FAM HDRFTR_RIGHT_FAMILY
10959 .ALIAS FOOTER_RIGHT_FONT HDRFTR_RIGHT_FONT
10960 .ALIAS FOOTER_RIGHT_FT HDRFTR_RIGHT_FONT
10961 .ALIAS FOOTER_RIGHT_SIZE HDRFTR_RIGHT_SIZE
10962 .ALIAS FOOTER_RIGHT_PS HDRFTR_RIGHT_SIZE
10963 .ALIAS FOOTER_RIGHT_CAPS HDRFTR_RIGHT_CAPS
10964 .ALIAS FOOTER_RECTO HDRFTR_RECTO
10965 .ALIAS FOOTER_VERSO HDRFTR_VERSO
10966 .ALIAS SWITCH_HEADERS SWITCH_HDRFTR
10967 .ALIAS SWITCH_FOOTERS SWITCH_HDRFTR
10971 .ALIAS COL_BREAK COL_NEXT
10972 .ALIAS PRINT_FOOTNOTE_RULE FOOTNOTE_RULE