groff: update vendor branch to v1.20.1
[dragonfly.git] / contrib / groff / contrib / mom / om.tmac
CommitLineData
92d0a6a6 1.\" om.tmac
465b256c
JR
2.ig
3Mom -- a typesetting/document-processing macro set for groff.
4
4d3e9548
JL
5Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
6 Free Software Foundation, Inc.
7 Written by Peter Schaffter (pschaffter@magma.ca)
465b256c
JR
8
9This file is part of groff.
10
11groff is free software; you can redistribute it and/or modify it under
12the terms of the GNU General Public License as published by the Free
4d3e9548
JL
13Software Foundation, either version 3 of the License, or
14(at your option) any later version.
465b256c
JR
15
16groff is distributed in the hope that it will be useful, but WITHOUT ANY
17WARRANTY; without even the implied warranty of MERCHANTABILITY or
18FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19for more details.
20
4d3e9548
JL
21You should have received a copy of the GNU General Public License
22along with this program. If not, see <http://www.gnu.org/licenses/>.
465b256c 23
4d3e9548 24Version 1.5-c
465b256c
JR
25-------------
26Antoine de St-Exupéry asserted that elegance in engineering is
27achieved not when there is nothing left to add, but when there is
28nothing left to take away.
29
30By those standards, mom is a Rube Goldberg contraption. She was
31created over the years while groff, and my understanding of it,
32changed and evolved. However, I'm a firm believer in "if it
33ain't broke, don't fix it," so I'm leaving any major clean-up
34of redundancies and whatnot for a rainy day.
35
36Inasmuch as possible, macros that turn a feature on or off follow
37a similar style. Invoking the macro without an argument turns
38the feature on. Invoking it with any other argument turns it off.
39Use of the argument OFF is recommended, but not required; users
40may find other conventions preferable (e.g. NO, X, END, QUIT, etc.).
41
42"<anything>" in the description of arguments that can be passed
43to a macro means that any argument turns the feature off.
44..
4d3e9548 45.\" %beginstrip%
92d0a6a6 46\#
465b256c 47\# ====================================================================
92d0a6a6 48\#
465b256c
JR
49\# Check which version of groff is being run
50.if (\n[.x]\n[.y] < 118) \
4d3e9548 51. ab [mom]: You need GNU troff version 1.18 or higher to run this version of mom.
465b256c
JR
52\# Check that GNU troff is being run
53.if !\n[.g]=1 \
4d3e9548 54. ab [mom]: The mom macros require that you be running GNU troff.
465b256c 55.if \n(.C \
4d3e9548 56. ab [mom]: The groff mom macros do not work in compatibility mode.
465b256c
JR
57\# Add supplementary styles
58.sty \n[.fp] L \" Light Roman
59.sty \n[.fp] LI \" Light Italic
60.sty \n[.fp] LCD \" Light Condensed Roman
61.sty \n[.fp] LCDI \" Light Condensed Italic
62.sty \n[.fp] LEX \" Light Extended Roman
63.sty \n[.fp] LEXI \" Light Extended Italic
64.sty \n[.fp] CD \" Medium/Book Condensed Roman
65.sty \n[.fp] CDI \" Medium/Book Condensed Italic
66.sty \n[.fp] EX \" Medium/Book Extended Roman
67.sty \n[.fp] EXI \" Medium/Book Extended Italic
68.sty \n[.fp] DB \" DemiBold Roman
69.sty \n[.fp] DBI \" DemiBold Italic
70.sty \n[.fp] BCD \" Bold Condensed Roman
71.sty \n[.fp] BCDI \" Bold Condensed Italic
72.sty \n[.fp] BEX \" Bold Extended Roman
73.sty \n[.fp] BEXI \" Bold Extended Italic
74.sty \n[.fp] HV \" Heavy Roman
75.sty \n[.fp] HVI \" Heavy Italic
76.sty \n[.fp] HVCD \" Heavy Condensed Roman
77.sty \n[.fp] HVCDI \" Heavy Condensed Italic
78.sty \n[.fp] HVEX \" Heavy Extended Roman
79.sty \n[.fp] HVEXI \" Heavy Extended Italic
80.sty \n[.fp] BL \" Black Roman
81.sty \n[.fp] BLI \" Black Italic
82.sty \n[.fp] BLCD \" Black Condensed Roman
83.sty \n[.fp] BLCDI \" Black Condensed Italic
84.sty \n[.fp] BLEX \" Black Extended Roman
85.sty \n[.fp] BLEXI \" Black Extended Italic
86.sty \n[.fp] UBL \" Ultra-Black Roman
87.sty \n[.fp] UBLI \" Ultra-Black Italic
92d0a6a6 88\#
4d3e9548
JL
89\# Instruct grops to use square linecaps and joins.
90\# This instruction is also executed in DO_B_MARGIN, NEWPAGE, and HEADER
91\#
92\X'ps: exec 0 setlinejoin'\X'ps: exec 0 setlinecap'
93\#
92d0a6a6
JR
94\# ====================================================================
95\#
96\# TYPESETTING MACROS, STRINGS, AND ALIASES
97\# ========================================
98\#
99\# +++ALIASES+++
100\#
465b256c
JR
101\# Alias .als as ALIAS, and .aln (number registers) as ALIASN
102\#
103.als ALIAS als
104.als ALIASN aln
105\#
106\#
107\# ALIASES FOR GROFF REQUESTS
108\# --------------------------
92d0a6a6
JR
109\#
110.ALIAS MAC de
111.ALIAS BR br
92d0a6a6
JR
112.ALIAS SP sp
113.ALIAS PAGELENGTH pl
92d0a6a6
JR
114.ALIAS SPREAD brp
115.ALIAS ESC_CHAR ec
465b256c 116.ALIAS STRING ds
4d3e9548 117.ALIAS INCLUDE so
92d0a6a6
JR
118\#
119\# ALIASES FOR NUMBER REGISTERS
120\# ----------------------------
121\#
122.ALIASN #PT_SIZE .ps \"fractional point size in units
123.ALIASN #DIVER_DEPTH dn \"diversion depth
124.ALIASN #DIVER_WIDTH dl \"diversion width
125.ALIASN #TRAP_DISTANCE .t \"distance to next trap
126.ALIASN #LEAD .v \"line space (.vs, not .ls)
127.ALIASN #PAGE_LENGTH .p \"page length
128.ALIASN #NUM_ARGS .$ \"number of arguments passed to a macro
129.ALIASN #INDENT .i \"value of current indent
130\#
131\# ====================================================================
132\#
133\# MISCELLANEOUS
134\# =============
92d0a6a6 135.nr #L_MARGIN \n(.o \" Tabs, etc require #L_MARGIN
465b256c
JR
136.cflags 4 /\(en \" So slash and en-dashes get broken
137.warn 8192
138\#
4d3e9548
JL
139\# About the warn level
140\# --------------------
141\#
142\# There's a lot of testing for the presence of number registers and
143\# strings in this macro file. Many of the registers and strings
144\# pop into and out of existence on the fly. For convenience, I
145\# often use
146\#
147\# .if \\n[whatever] and .if !\\n[whatever]
148\#
149\# to test "if the register exists and is (not) empty." Groff,
150\# encountering such tests when called with the -ww options, emits
151\#
152\# warning: number register whatever not defined.
153\#
154\# Groff also warns about strings similarly tested for.
155\#
156\# The warn level, above, is high in order to shut off those
157\# warnings. If you're futzing in this file and need more verbose
158\# warnings, either comment out ".warn 8192" or set the warnlevel
159\# to the one you need (but be ready for lots of what I've just
160\# described).
92d0a6a6
JR
161\#
162\# ====================================================================
163\#
92d0a6a6
JR
164\# +++PAGE LAYOUT+++
165\#
166\# Macros that control the physical layout of the page: paper size
167\# and margins.
168\#
169\# PAGE WIDTH
170\# ----------
171\# *Argument:
172\# <width of printer sheet>
173\# *Function:
174\# Stores user supplied page width in register #PAGE_WIDTH.
175\# *Notes:
176\# #PAGE_WIDTH is used to establish the default LL (and right margin).
177\# Requires unit of measure.
178\#
179.MAC PAGEWIDTH END
180. br
181. nr #PAGE_WIDTH \\$1
182. if !r#L_MARGIN \{ .L_MARGIN \\n(.o \}
183. if !r#R_MARGIN \{ .R_MARGIN 1i \}
184.END
185\#
186\#
187\# L_MARGIN
188\# --------
189\# *Argument:
190\# <offset from page left>
191\# *Function:
192\# Stores user supplied page offset in register #L_MARGIN.
193\# Sets .po to user supplied offset.
194\# *Notes:
195\# Requires unit of measure.
196\#
197.MAC L_MARGIN END
198. br
199. nr #L_MARGIN (\\$1)
200. po \\n[#L_MARGIN]u
201.END
202\#
203\#
204\# R_MARGIN
205\# --------
206\# *Argument:
207\# <width of right margin>
208\# *Function:
209\# Stores user supplied right margin in register #R_MARGIN.
210\# *Notes:
211\# This is a pseudo-margin. Right margin is actually a function of
212\# line length. The macro calculates line length from the page offset
213\# and the value plugged into #R_MARGIN.
214\#
215\# N.B. -- PAGEWIDTH and L_MARGIN have to be defined before R_MARGIN.
216\#
217\# Requires unit of measure.
218\#
219.MAC R_MARGIN END
220. br
221. nr #R_MARGIN (\\$1)
222. ll \\n[#PAGE_WIDTH]u-\\n[#L_MARGIN]u-\\n[#R_MARGIN]u
223. ta \\n(.lu
224. nr #L_LENGTH \\n(.l
225.END
226\#
227\#
228\# T_MARGIN
229\# --------
230\# *Argument:
231\# <distance to advance from top of page>
232\# *Function:
233\# Stores the user supplied top margin in register #T_MARGIN.
234\# Advances user supplied depth from the top of the page.
235\# *Notes:
236\# Requires unit of measure.
237\#
238.MAC T_MARGIN END
92d0a6a6 239. nr #T_MARGIN (\\$1)
465b256c 240. nr #TOP 1
92d0a6a6 241. if !\\n[#DOCS] \{\
92d0a6a6
JR
242. sp |\\n[#T_MARGIN]u-1v
243. \}
244. wh 0i DO_T_MARGIN
245.END
246\#
247\#
248\# B_MARGIN
249\# --------
250\# *Argument:
251\# <space to leave at the bottom of the page>
252\# *Function:
253\# Stores the user supplied bottom margin in register #B_MARGIN.
254\# *Notes:
255\# Requires unit of measure.
256\#
257.MAC B_MARGIN END
258. br
259. nr #B_MARGIN (\\$1)
465b256c
JR
260. nr #ORIGINAL_B_MARGIN \\n[#B_MARGIN]
261. nr #B_MARGIN_SET 1
92d0a6a6
JR
262. wh -\\n[#B_MARGIN]u DO_B_MARGIN
263.END
264\#
265\#
266\# PAGE
267\# ----
268\# *Arguments:
269\# <pagewidth> [pagelength [leftmargin [rightmargin [topmargin [bottommargin]]]]]
270\# *Function:
271\# Page set-up. Collects arguments and passes them to the appropriate
272\# macros.
273\# *Notes:
274\# All arguments after pagewidth are optional, but must appear
275\# in the order given above. (User can fill in as much or as
276\# little as desired.)
277\#
278\# All arguments require a unit of measure.
279\#
280.MAC PAGE END
281. br
465b256c
JR
282. PAGEWIDTH \\$1
283. PAGELENGTH \\$2
284. ie '\\$3'' \{ .L_MARGIN \\n(.o \}
285. el \{ .L_MARGIN \\$3 \}
286. ie '\\$4'' \{ .R_MARGIN 1i \}
287. el \{ .R_MARGIN \\$4 \}
288. if !'\\$5'' \{ .T_MARGIN \\$5 \}
289. if !'\\$6'' \{ .B_MARGIN \\$6 \}
92d0a6a6
JR
290.END
291\#
292\# =====================================================================
293\#
294\# +++PAGE CONTROL+++
295\#
296\# Generic macros for breaking pages.
297\#
298\# DO_T_MARGIN
299\# -----------
300\# *Argument:
301\# <none>
302\# *Function:
465b256c 303\# Plants the top margin at the top of each page.
92d0a6a6 304\# *Notes:
465b256c 305\# The trap is set in .T_MARGIN or .PAGE
92d0a6a6
JR
306\#
307.MAC DO_T_MARGIN END
465b256c
JR
308. ev T_MARGIN
309. nr #TOP 1
92d0a6a6
JR
310. sp |\\n[#T_MARGIN]u-1v
311. ev
465b256c 312. sp -\\n[#T_MARGIN_LEAD_ADJ]u
92d0a6a6
JR
313.END
314\#
315\#
316\# DO_B_MARGIN
317\# -----------
318\# *Argument:
319\# <none>
320\# *Function:
465b256c 321\# Plants the bottom margin at the bottom of each page.
92d0a6a6 322\# *Notes:
465b256c 323\# The trap is set in .B_MARGIN or .PAGE.
92d0a6a6
JR
324\#
325.MAC DO_B_MARGIN END
465b256c
JR
326. nr #T_MARGIN_LEAD_ADJ \\n[#LEAD]-12000
327. ev B_MARGIN
92d0a6a6 328. bp
4d3e9548 329. nop \X'ps: exec 0 setlinejoin'\X'ps: exec 0 setlinecap'
92d0a6a6
JR
330. ev
331.END
332\#
465b256c
JR
333\#
334\# NEWPAGE
335\# -------
336\# *Argument:
337\# <none>
338\# *Function:
339\# Breaks to a new page.
340\# *Notes:
341\# If a B_MARGIN has been set, processes that, otherwise, just
342\# breaks to a new page.
343\#
344.MAC NEWPAGE END
4d3e9548
JL
345. ie \\n[#NO_BREAK] \{\
346' br
347. rr #NO_BREAK
348. \}
349. el \{\
350. br
351. \}
465b256c
JR
352. nr #NEWPAGE 1
353. ie \\n[#B_MARGIN_SET]=1 \{\
354. ie !\\n[#DOCS]=1 \{\
355. ev NP
356. bp
4d3e9548 357. nop \X'ps: exec 0 setlinejoin'\X'ps: exec 0 setlinecap'
465b256c
JR
358. ev
359. \}
360. el \{\
361. if \\n[#COLUMNS]=1 \{ .nr #COL_NUM \\n[#NUM_COLS] \}
362. ie !\\n[#FN_DEPTH] \{\
363. ch FN_OVERFLOW_TRAP
364. DO_B_MARGIN
365. wh -(\\n[#FN_OVERFLOW_TRAP_POS]u) FN_OVERFLOW_TRAP
366. \}
367. el \{\
368. DO_B_MARGIN
369. \}
370. \}
371. \}
372. el \{\
373. DO_B_MARGIN
374. \}
375.END
376\#
92d0a6a6
JR
377\# =====================================================================
378\#
379\# +++GENERAL STYLE MACROS+++
380\#
381\# Macros that are likely to appear together to define general
382\# type style: line length, family, font, point size, and line
383\# spacing.
384\#
385\# LINE LENGTH
386\# -----------
387\# *Argument:
388\# <line length>
389\# *Function:
390\# Stores user supplied line length in register #L_LENGTH.
391\# Sets .ll to #L_LENGTHu
392\# *Notes:
393\# Requires unit of measure.
394\#
395.MAC LL END
92d0a6a6 396. nr #USER_SET_L_LENGTH 1
465b256c
JR
397. ll \\$1
398. nr #L_LENGTH \\n(.l
92d0a6a6
JR
399. ta \\n(.lu
400.END
401\#
402\#
465b256c
JR
403\# +++FAMILY AND FONT+++
404\#
405\# FALLBACK FONT
406\# -------------
407\# *Argument:
408\# <fallback font> [ ABORT | WARN ] | ABORT | WARN
409\# *Function:
410\# Sets register #ABORT_FT_ERRORS to 1, or defines a fallback font
411\# called "dummy" at font position 0.
412\# *Notes:
413\# Calls to non-existent families cause mom to continue processing
414\# files using the fallback font until a valid family is entered.
415\#
416\# Calls to non-existent fonts generate warnings. If ABORT is passed
417\# to FALLBACK_FONT, mom stops processing files after the warning.
418\# Otherwise, she continues to process files using the fallback font
419\# after the warning is issued. The default fallback font is CR; the
420\# default for font warnings is to abort.
421\#
422.MAC FALLBACK_FONT END
423. if \\n[#NUM_ARGS]=1 \{\
424. if '\\$1'ABORT' \{ .nr #ABORT_FT_ERRORS 1 \}
425. if '\\$1'WARN' \{\
426. if r#ABORT_FT_ERRORS \{ .nr #ABORT_FT_ERRORS 0 \}
427. \}
428. if !'\\$1'ABORT' \{\
429. if !'\\$1'WARN' \{\
430. fp 0 dummy \\$1
431. \}
432. \}
433. \}
434. if \\n[#NUM_ARGS]=2 \{\
435. fp 0 dummy \\$1
436. if '\\$2'ABORT' \{ .nr #ABORT_FT_ERRORS 1 \}
437. if '\\$2'WARN' \{ .nr #ABORT_FT_ERRORS 0 \}
438. \}
439.END
440\#
441.FALLBACK_FONT CR ABORT
442\#
92d0a6a6
JR
443\# FAMILY
444\# ------
445\# *Argument:
446\# <font family>
447\# *Function:
448\# Stores user supplied font family in string $FAMILY. Sets .fam
449\# to $FAMILY.
450\#
451.MAC FAMILY END
4d3e9548 452. ds $FAMILY \\$1
465b256c
JR
453. if \\n[#PRINT_STYLE]=1 \{\
454. fam C
455. return
456. \}
457. if \\n[#IGNORE] \{\
458. fam C
459. return
460. \}
461. if (\\n[.x]\\n[.y]\\n[.Y] >= 1192) \{\
462. ds $SAVED_STYLE \\n[.sty]
463. \}
465b256c 464. ft 0
92d0a6a6 465. fam \\*[$FAMILY]
465b256c
JR
466. if (\\n[.x]\\n[.y]\\n[.Y] >= 1192) \{\
467. ft \\*[$SAVED_STYLE]
468. if !F\\n[.fn] \{\
469. ft 0
470. \}
471. \}
4d3e9548
JL
472. ie \\n[#PRE_COLLATE]=1 \{ . \}
473. el \{\
474. if \\n[#COLLATE]=1 \{\
475. if !r#START \{ .DOC_FAM \\*[$FAMILY] \}
476. \}
465b256c 477. \}
92d0a6a6
JR
478.END
479\#
480\#
481\# FONT
482\# ----
483\# *Argument:
465b256c 484\# R | I | B | BI | <other style extension>
92d0a6a6
JR
485\# *Function:
486\# Stores user supplied font in $FONT and sets .ft to $FONT.
487\#
488.MAC FT END
4d3e9548 489. ds $FONT \\$1
92d0a6a6
JR
490. if \\n[#PRINT_STYLE]=1 \{\
491. ie '\\$1'I' \{\
492. if \\n[#UNDERLINE_ITALIC]=1 \{\
493. UNDERLINE
494. return
495. \}
496. if \\n[#ITALIC_MEANS_ITALIC]=1 \{\
497. ds $FONT \\$1
498. ft \\*[$FONT]
499. return
500. \}
501. \}
502. el \{ .UNDERLINE OFF \}
503. return
504. \}
465b256c 505. ft 0
92d0a6a6 506. ft \\*[$FONT]
4d3e9548 507. if (\\n[.x]\\n[.y]\\n[.Y] >= 1192) \{\
465b256c
JR
508. if '\\n[.sty]'' \{\
509. if !F\\n[.fn] \{\
510. if !S\\*[$FONT] \{\
511. tm1 "[mom]: Font style "\\*[$FONT]" at line \\n(.c has not been registered.
512. ie \\n[#ABORT_FT_ERRORS]=0 \{\
513. tm1 " Continuing to process using fallback font.
514. \}
515. el .ab Aborting.
516. \}
517. if \\n[.f]=0 \{\
518. tm1 "[mom]: Either font style "\\*[$FONT]" at line \\n(.c does not exist in family "\\n[.fam]",
519. tm1 " or family "\\n[.fam]" has not been installed in font/devps.
520. ie \\n[#ABORT_FT_ERRORS]=0 \{\
521. tm1 " Continuing to process using fallback font.
522. \}
523. el .ab Aborting.
524. \}
525. \}
526. \}
527. \}
92d0a6a6
JR
528.END
529\#
530\#
531\# POINT SIZE
532\# ----------
533\# *Arguments:
534\# <point size of type>
535\# *Function:
536\# Sets point size to user supplied value in scaled points.
537\# If #AUTO_LEAD is on, sets .vs to #AUTOLEAD_VALUE+#PT_SIZE.
538\# *Notes:
539\# Must NOT use a unit of measure.
540\#
541.MAC PT_SIZE END
542. if \\n[#PRINT_STYLE]=1 \{ .return \}
543. if \\n[#IGNORE] \{ .return \}
544. nr #PT_SIZE_SET 1
545. ps \\$1
546. if \\n[#AUTO_LEAD] \{\
547. ie \\n[#AUTOLEAD_FACTOR] \{ .vs \\n[#PT_SIZE]u*\\n[#AUTOLEAD_VALUE]u/1000u \}
548. el \{ .vs \\n[#PT_SIZE]u+\\n[#AUTOLEAD_VALUE]u \}
549. \}
550. nr #PT_SIZE_IN_UNITS \\n[.ps]
551.END
552\#
553\#
554\# SIZE (inline)
555\# -------------
556\# *Arguments:
557\# <point size of type>
558\# *Function:
559\# Sets point size to user supplied value in scaled points.
560\# Intended to be called inline with \*[SIZE <n><unit>]
561\# *Notes:
562\# Can be used with a unit of measure or not.
563\#
564.MAC SIZE END
565\c
566.ps \\$1
567.END
568\#
569\#
570\# LEADING
571\# -------
572\# *Argument:
573\# <leading between lines of text>
574\# *Function:
465b256c 575\# Turns off #AUTOLEAD if it's on.
92d0a6a6
JR
576\# Sets .vs to user supplied value.
577\# *Notes:
465b256c 578\# Does not require unit of measure. LS automatically turns off AUTOLEAD.
92d0a6a6
JR
579\#
580.MAC LS END
465b256c
JR
581. br
582. nr #OLD_LEAD \\n(.v
92d0a6a6
JR
583. if \\n[#PRINT_STYLE]=1 \{ .return \}
584. if \\n[#IGNORE] \{ .return \}
92d0a6a6
JR
585. if \\n[#AUTO_LEAD] \{\
586. rr #AUTO_LEAD
587. rr #AUTOLEAD_FACTOR
588. \}
589. vs \\$1
465b256c
JR
590. if \\n[#TOP] \{\
591. nr #TOP_BASELINE_ADJ \\n(.v-\\n[#OLD_LEAD]
592. sp -\\n[#TOP_BASELINE_ADJ]u
593. rr #TOP
594. rr #TOP_BASELINE_ADJ
92d0a6a6
JR
595. \}
596.END
597\#
465b256c
JR
598.MAC RESET_LEAD END
599' vs
600. ch RESET_LEAD
601.END
602\#
92d0a6a6
JR
603\#
604\# AUTOLEAD
605\# --------
606\# *Argument:
607\# <leading value to add to #PT_SIZE> [FACTOR]
608\# *Function:
609\# Stores user supplied auto-lead value in register #AUTOLEAD_VALUE.
610\# Adds #AUT0LEAD_VALUE to #PT_SIZE when invoked to set leading.
611\# All subsequent PT_SIZE requests reset the leading in the same way until
612\# AUTOLEAD is turned off.
613\# *Notes:
614\# With the optional FACTOR argument, the current point size is
615\# multiplied by #AUTOLEAD_VALUE instead of the two being added
616\# together.
617\#
618.MAC AUTOLEAD END
619. if \\n[#PRINT_STYLE]=1 \{ .return \}
620. if \\n[#IGNORE] \{ .return \}
621. nr #AUTO_LEAD 1
465b256c 622. nr #OLD_LEAD \\n(.v
92d0a6a6
JR
623. nr #AUTOLEAD_VALUE (p;\\$1)
624. ie \\n[#NUM_ARGS]=2 \{\
625. if '\\$2'FACTOR' \{\
626. nr #AUTOLEAD_FACTOR 1
627. vs \\n[#PT_SIZE]u*\\n[#AUTOLEAD_VALUE]u/1000u
628. \}
629. \}
630. el \{\
631. vs \\n[#PT_SIZE]u+\\n[#AUTOLEAD_VALUE]u
632. \}
465b256c
JR
633. if \\n[#TOP] \{\
634. nr #TOP_BASELINE_ADJ \\n(.v-\\n[#OLD_LEAD]
635. sp -\\n[#TOP_BASELINE_ADJ]u
636. rr #TOP
637. rr #TOP_BASELINE_ADJ
92d0a6a6
JR
638. \}
639.END
640\#
641\#
642\# STRINGS FOR INLINE CONTROL OF GENERAL TYPE STYLE
643\# ------------------------------------------------
644.ds ROM \EfR
645.ds IT \EfI
646.ds BD \EfB
647.ds BDI \Ef(BI
4d3e9548 648.ds PREV \Ef[]
92d0a6a6
JR
649.ds S \Es
650\#
651\# =====================================================================
652\#
653\# +++KERNING+++
654\#
655\# AUTOMATIC PAIRWISE KERNING
656\# --------------------------
657\# *Arguments:
658\# <none> | <anything>
659\# *Function:
660\# Turns automatic pairwise kerning on or off.
661\#
662.MAC KERN END
663. ie '\\$1'' \{\
664. kern
665. nr #KERN 1
666. \}
667. el \{\
668. kern 0
669. nr #KERN 0
670. \}
671.END
672\#
673\#
4d3e9548
JL
674\# INLINE KERNING AND HORIZONTAL MOVEMENT
675\# --------------------------------------
676\# Kerning
677\#
678\# Inline kerning provides a simple method for users to adjust the
679\# amount of space between any two letters. It's predicated on a
680\# unit of measure "U", which is 1/36 of the current point size as
681\# returned by \n[.ps]. E.g., if the current point size is 18,
682\# \n[.ps] returns 18000u, therefore U=500u. Since U remains
683\# proportional relative to the current point size, the amount
684\# of kerning between two letters as expressed in Us remains
685\# visually similar regardless of changes in point size.
686\#
687\# N.B.--the amount of inline kerning supplied by \*[BU<n>] or
688\# \*[FU<n>] is added to or subtracted from any kerning that already
689\# takes place between two characters when automatic kerning is
690\# turned on.
691\#
692\# In groff v. 1.17.2, it was not possible to pass arguments to macros that
693\# were called with inline escapes, nor thence to evaluate conditional
694\# expressions. Consequently, each pseudo-escape \[BU<n>] had to be defined
695\# separately with ".char".
696\#
697\# As of v. 1.18, one can pass arguments to inline strings/macros,
698\# hence it is now possible to do \*[BU n] where n, inline, is the desired
699\# number of kern units. The original .char definitions have been left in
700\# for backward compatibility with documents created prior to mom-1.1.3c.
92d0a6a6
JR
701\#
702.nr #KERN_UNIT 36
703.ds BU \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*\\$1u)'
704.ds FU \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*\\$1u)'
705\#
706\# Initialize strings for pre-1.1.3c-style BU and FU
707\#
708.nr #LOOP 0 1
709.while \n+[#LOOP]<37 \{\
710. ds BU\n[#LOOP] \h'-(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*\n[#LOOP]u)'
711.\}
712\#
713.nr #LOOP 0 1
714.while \n+[#LOOP]<37 \{\
715. ds FU\n[#LOOP] \h'(\En[#PT_SIZE]u/\n[#KERN_UNIT]u*\n[#LOOP]u)'
716.\}
717.rr #LOOP
718\#
4d3e9548
JL
719\# Horizontal movements
720\# --------------------
721\# BP1...12.75 and FP1...12.75 move backwards or forwards inline by the
722\# specified number of points.
723\#
724\# Left in for backward compatibility with mom-1.1.3c, the
725\# preferred methods for inline horizontal movements are now
726\# \*[BCK <n><unit>] and \*[FWD <n><unit>].
92d0a6a6 727\#
465b256c
JR
728.ds BCK \h'-\\$1'
729.ds FWD \h'\\$1'
92d0a6a6
JR
730\#
731.ds BP.25 \h'-.25'
732.ds BP.5 \h'-.5'
733.ds BP.75 \h'-.75'
734.ds BP1 \h'-1p'
735.ds BP1.25 \h'-1.25p'
736.ds BP1.5 \h'-1.5p'
737.ds BP1.75 \h'-1.75p'
738.ds BP2 \h'-2p'
739.ds BP2.25 \h'-2.25p'
740.ds BP2.5 \h'-2.5p'
741.ds BP2.75 \h'-2.75p'
742.ds BP3 \h'-3p'
743.ds BP3.25 \h'-3.25p'
744.ds BP3.5 \h'-3.5p'
745.ds BP3.75 \h'-3.75p'
746.ds BP4 \h'-4p'
747.ds BP4.25 \h'-4.25p'
748.ds BP4.5 \h'-4.5p'
749.ds BP4.75 \h'-4.75p'
750.ds BP5 \h'-5p'
751.ds BP5.25 \h'-5.25p'
752.ds BP5.5 \h'-5.5p'
753.ds BP5.75 \h'-5.75p'
754.ds BP6 \h'-6p'
755.ds BP6.25 \h'-6.25p'
756.ds BP6.5 \h'-6.5p'
757.ds BP6.75 \h'-6.75p'
758.ds BP7 \h'-7p'
759.ds BP7.25 \h'-7.25p'
760.ds BP7.5 \h'-7.5p'
761.ds BP7.75 \h'-7.75p'
762.ds BP8 \h'-8p'
763.ds BP8.25 \h'-8.25p'
764.ds BP8.5 \h'-8.5p'
765.ds BP8.75 \h'-8.75p'
766.ds BP9 \h'-9p'
767.ds BP9.25 \h'-9.25p'
768.ds BP9.5 \h'-9.5p'
769.ds BP9.75 \h'-9.75p'
770.ds BP10 \h'-10p'
771.ds BP10.25 \h'-10.25p'
772.ds BP10.5 \h'-10.5p'
773.ds BP10.75 \h'-10.75p'
774.ds BP11 \h'-11p'
775.ds BP11.25 \h'-11.25p'
776.ds BP11.5 \h'-11.5p'
777.ds BP11.75 \h'-11.75p'
778.ds BP12 \h'-12p'
779.ds BP12.25 \h'-12.25p'
780.ds BP12.5 \h'-12.5p'
781.ds BP12.75 \h'-12.75p'
782\#
783.ds FP.25 \h'.25'
784.ds FP.5 \h'.5'
785.ds FP.75 \h'.75'
786.ds FP1 \h'1p'
787.ds FP1.25 \h'1.25p'
788.ds FP1.5 \h'1.5p'
789.ds FP1.75 \h'1.75p'
790.ds FP2 \h'2p'
791.ds FP2.25 \h'2.25p'
792.ds FP2.5 \h'2.5p'
793.ds FP2.75 \h'2.75p'
794.ds FP3 \h'3p'
795.ds FP3.25 \h'3.25p'
796.ds FP3.5 \h'3.5p'
797.ds FP3.75 \h'3.75p'
798.ds FP4 \h'4p'
799.ds FP4.25 \h'4.25p'
800.ds FP4.5 \h'4.5p'
801.ds FP4.75 \h'4.75p'
802.ds FP5 \h'5p'
803.ds FP5.25 \h'5.25p'
804.ds FP5.5 \h'5.5p'
805.ds FP5.75 \h'5.75p'
806.ds FP6 \h'6p'
807.ds FP6.25 \h'6.25p'
808.ds FP6.5 \h'6.5p'
809.ds FP6.75 \h'6.75p'
810.ds FP7 \h'7p'
811.ds FP7.25 \h'7.25p'
812.ds FP7.5 \h'7.5p'
813.ds FP7.75 \h'7.75p'
814.ds FP8 \h'8p'
815.ds FP8.25 \h'8.25p'
816.ds FP8.5 \h'8.5p'
817.ds FP8.75 \h'8.75p'
818.ds FP9 \h'9p'
819.ds FP9.25 \h'9.25p'
820.ds FP9.5 \h'9.5p'
821.ds FP9.75 \h'9.75p'
822.ds FP10 \h'10p'
823.ds FP10.25 \h'10.25p'
824.ds FP10.5 \h'10.5p'
825.ds FP10.75 \h'10.75p'
826.ds FP11 \h'11p'
827.ds FP11.25 \h'11.25p'
828.ds FP11.5 \h'11.5p'
829.ds FP11.75 \h'11.75p'
830.ds FP12 \h'12p'
831.ds FP12.25 \h'12.25p'
832.ds FP12.5 \h'12.5p'
833.ds FP12.75 \h'12.75p'
834\#
835\#
836\# WHOLE LINE KERNING (RW and EW)
837\# -----------------------------
4d3e9548
JL
838\# The line kerning macros are special instances of track kerning,
839\# used where a complete line needs to be tightened (or relaxed) in
840\# order to accomodate or remove one or two more characters
841\# than the default justification permits.
92d0a6a6
JR
842\#
843\# *Argument:
844\# <amount of overall "kerning" (letter spacing) to apply to the line>
845\# *Function:
846\# Invokes .tkf (track kerning) for the current font with
847\# 1 as both the upper and lower point size limits, so that
848\# the value entered by the user applies regardless of point
849\# size. RW ("Reduce Whitespace") reduces the amount of space
850\# between all characters by an equal amount. EW ("Extra
851\# Whitespace") increases the amount of space.
852\# *Notes:
853\# Decimal values are acceptable.
854\#
4d3e9548
JL
855\# The groff documentation is a tad confusing about what unit of
856\# measure is used in track kerning, only that the width of each
857\# character is increased or decreased by the amount(s) passed as
858\# arguments to .tkf, and something about linear function of point
859\# size. In fact, with the way I've put this macro together, it
860\# doesn't matter. All the user needs to know is that a value of
861\# one will produce an unacceptably tight or loose line at most text
862\# point sizes; therefore, effective use of RW and EW is in the
863\# fractional range below 1 (e.g. .25, .5). Given that RW and EW
864\# are for massaging type, a certain amount of experimentation and
865\# previewing is expected and necessary.
866\#
867\# \n(.f holds the current font number, which is acceptable to .tkf.
868\#
869\# RW and EW must be reset to 0 to cancel their effect on subsequent
870\# output lines.
92d0a6a6
JR
871\#
872.MAC RW END
465b256c
JR
873. if \\n[#BR_AT_LINE_KERN] \{\
874. ie \\n[#JUSTIFY]=1 \{ .brp \}
875. el \{ .br \}
876. \}
877. tkf \\n(.f 1 -\\$1 1 -\\$1
92d0a6a6
JR
878.END
879\#
880\#
881.MAC EW END
465b256c
JR
882. if \\n[#BR_AT_LINE_KERN] \{\
883. ie \\n[#JUSTIFY]=1 \{ .brp \}
884. el \{ .br \}
885. \}
886. tkf \\n(.f 1 \\$1 1 \\$1
92d0a6a6
JR
887.END
888\#
889\#
890\# BREAK AT LINE KERN
891\# ------------------
892\# *Arguments:
893\# toggle
894\# *Function:
895\# Enables/disables .br's before .RW and .EW
896\# *Notes:
897\# Mostly, users will want .br's before any kind of line kerning, but
898\# there may be cases where they don't. BR_BEFORE_LINE_KERN is off by
899\# default and must be invoked explicitly.
900\#
901.MAC BR_AT_LINE_KERN END
902. ie '\\$1'' \{ .nr #BR_AT_LINE_KERN 1 \}
903. el \{ .rr #BR_AT_LINE_KERN \}
904.END
905\#
906\# =====================================================================
907\#
908\# +++HYPHENATION+++
909\#
910\# AUTO HYPHENATION
911\# ----------------
912\# *Arguments:
913\# <none> | <anything> | DEFAULT
914\# or
915\# LINES <n> | MARGIN <n> | SPACE <n>
916\# *Function:
917\# Turns auto hyphenation on or off, resets the hyphenation style
918\# to default, or permits the setting of various hyphenation
919\# parameters.
920\# *Notes:
465b256c
JR
921\# HY, by itself, defaults to .hy 14, i.e. no hyphens after the
922\# first two or before the last two characters of a word, and no
923\# hyphenation of the last line prior to a trap (e.g., at the
924\# bottom of a page).
92d0a6a6
JR
925\#
926\# HY DEFAULT resets the hyphenation style to .hy 14 (see
927\# above) if that behaviour is desired after changes have been
928\# made to LINES, MARGIN, or SPACE.
929\#
930\# HY LINES <n> sets the number of allowable consecutive hyphenated lines.
931\#
932\# HY MARGIN <n> sets the amount of space (ipPcm) allowed at the end
933\# of a line in QUAD mode before hyphenation is tripped (e.g. if there's
934\# only 6 points left, groff won't try to hyphenate the next word).
935\#
936\# HY SPACE sets the amount of extra interword space (ipPcm) that can
937\# be added in JUSTIFY mode to prevent a line from being hyphenated.
938\#
939.MAC HY END
940. ie '\\$1'' \{\
941. hy 14
942. nr #HYPHENATE 1
943. \}
944. el \{\
945. if !'\\$1'LINES' \{\
946. nh
947. nr #HYPHENATE 0
948. \}
949. if !'\\$1'MARGIN' \{\
950. nh
951. nr #HYPHENATE 0
952. \}
953. if !'\\$1'SPACE' \{\
954. nh
955. nr #HYPHENATE 0
956. \}
957. if !'\\$1'DEFAULT' \{\
958. nh
959. nr #HYPHENATE 0
960. \}
961. if '\\$1'LINES' \{ .hlm \\$2 \}
962. if '\\$1'MARGIN' \{ .hym \\$2 \}
963. if '\\$1'SPACE' \{ .hys \\$2 \}
964. if '\\$1'DEFAULT' \{\
965. hlm -1
966. hym 0
967. hys 0
968. \}
969. \}
970.END
971\#
972\#
973\# HYPHENATION PARAMETERS
974\# ----------------------
975\# *Arguments:
976\# <# of lines> | <size of margin> | <amount of interword space>
977\# *Function:
978\# Allows user to specify .HY LINES, MARGIN, and SPACE with a single command.
979\#
980.MAC HY_SET END
981. nr #HY_SET 1
982. hlm \\$1
983. hym \\$2
984. hys \\$3
985.END
986\#
987\# =====================================================================
988\#
989\# +++VERTICAL SPACING+++
990\#
991\# ADVANCE LEAD
992\# ------------
993\# *Argument:
994\# <user supplied lead to advance below current baseline>
995\# *Function:
996\# Creates or modifies register #ALD. Adds user supplied lead
997\# below current baseline.
998\# *Notes:
999\# Requires a unit of measure.
1000\#
1001.MAC ALD END
465b256c
JR
1002. if \\n(nl=0 \{ .nr #TOP 1 \}
1003. if '\\$0'ALD' \{\
1004. nr #ALD (\\$1)
1005. sp \\n[#ALD]u
1006. \}
1007. if '\\$0'ADD_SPACE' \{\
1008. nr #ALD (\\$1)
1009. rs
1010. sp \\n[#ALD]u
1011. \}
1012. if '\\$0'SPACE' \{\
4d3e9548 1013. sp \\$1
465b256c
JR
1014. \}
1015. if '\\$0'SP' \{\
4d3e9548 1016. sp \\$1
465b256c 1017. \}
92d0a6a6
JR
1018.END
1019\#
1020\#
1021\# REVERSE LEAD
1022\# ------------
1023\# *Argument:
1024\# <user supplied lead to reverse above current baseline>
1025\# *Function:
1026\# Creates or modifies register #RLD. Reverses user supplied
1027\# lead above current baseline.
1028\# *Notes:
1029\# Requires a unit of measure.
1030\#
1031.MAC RLD END
1032. nr #RLD (\\$1)
1033. sp -\\n[#RLD]u
1034.END
1035\#
1036\# ALD/RLD STRINGS
1037\# ---------------
4d3e9548
JL
1038\# The strings \*[ALD.25]...\*[ALD12.75] and their corresponding
1039\# \*[RLD] forms have been left in for backward compatibility with
1040\# documents created using mom-1.1.3c or earlier. The prefered methods
1041\# of advancing and reversing on the page inline are \*[UP <n><unit>]
1042\# and \*[DOWN <n><unit>].
92d0a6a6 1043\#
465b256c
JR
1044.ds DOWN \v'\\$1'
1045.ds UP \v'-\\$1'
92d0a6a6
JR
1046\#
1047.ds ALD.25 \v'.25p'
1048.ds ALD.5 \v'.5p'
1049.ds ALD.75 \v'.75p'
1050.ds ALD1 \v'1p'
1051.ds ALD1.25 \v'1.25p'
1052.ds ALD1.5 \v'1.5p'
1053.ds ALD1.75 \v'1.75p'
1054.ds ALD2 \v'2p'
1055.ds ALD2.25 \v'2.25p'
1056.ds ALD2.5 \v'2.5p'
1057.ds ALD2.75 \v'2.75p'
1058.ds ALD3 \v'3p'
1059.ds ALD3.25 \v'3.25p'
1060.ds ALD3.5 \v'3.5p'
1061.ds ALD3.75 \v'3.75p'
1062.ds ALD4 \v'4p'
1063.ds ALD4.25 \v'4.25p'
1064.ds ALD4.5 \v'4.5p'
1065.ds ALD4.75 \v'4.75p'
1066.ds ALD5 \v'5p'
1067.ds ALD5.25 \v'5.25p'
1068.ds ALD5.5 \v'5.5p'
1069.ds ALD5.75 \v'5.75p'
1070.ds ALD6 \v'6p'
1071.ds ALD6.25 \v'6.25p'
1072.ds ALD6.5 \v'6.5p'
1073.ds ALD6.75 \v'6.75p'
1074.ds ALD7 \v'7p'
1075.ds ALD7.25 \v'7.25p'
1076.ds ALD7.5 \v'7.5p'
1077.ds ALD7.75 \v'7.75p'
1078.ds ALD8 \v'8p'
1079.ds ALD8.25 \v'8.25p'
1080.ds ALD8.5 \v'8.5p'
1081.ds ALD8.75 \v'8.75p'
1082.ds ALD9 \v'9p'
1083.ds ALD9.25 \v'9.25p'
1084.ds ALD9.5 \v'9.5p'
1085.ds ALD9.75 \v'9.75p'
1086.ds ALD10 \v'10p'
1087.ds ALD10.25 \v'10.25p'
1088.ds ALD10.5 \v'10.5p'
1089.ds ALD10.75 \v'10.75p'
1090.ds ALD11 \v'11p'
1091.ds ALD11.25 \v'11.25p'
1092.ds ALD11.5 \v'11.5p'
1093.ds ALD11.75 \v'11.75p'
1094.ds ALD12 \v'12p'
1095.ds ALD12.25 \v'12.5p'
1096.ds ALD12.5 \v'12.5p'
1097.ds ALD12.75 \v'12.75p'
1098\#
1099.ds RLD.25 \v'-.25p'
1100.ds RLD.5 \v'-.5p'
1101.ds RLD.75 \v'-.75p'
1102.ds RLD1 \v'-1p'
1103.ds RLD1.25 \v'-1.25p'
1104.ds RLD1.5 \v'-1.5p'
1105.ds RLD1.75 \v'-1.75p'
1106.ds RLD2 \v'-2p'
1107.ds RLD2.25 \v'-2.25p'
1108.ds RLD2.5 \v'-2.5p'
1109.ds RLD2.75 \v'-2.75p'
1110.ds RLD3 \v'-3p'
1111.ds RLD3.25 \v'-3.25p'
1112.ds RLD3.5 \v'-3.5p'
1113.ds RLD3.75 \v'-3.75p'
1114.ds RLD4 \v'-4p'
1115.ds RLD4.25 \v'-4.25p'
1116.ds RLD4.5 \v'-4.5p'
1117.ds RLD4.75 \v'-4.75p'
1118.ds RLD5 \v'-5p'
1119.ds RLD5.25 \v'-5.25p'
1120.ds RLD5.5 \v'-5.5p'
1121.ds RLD5.75 \v'-5.75p'
1122.ds RLD6 \v'-6p'
1123.ds RLD6.25 \v'-6.25p'
1124.ds RLD6.5 \v'-6.5p'
1125.ds RLD6.75 \v'-6.75p'
1126.ds RLD7 \v'-7p'
1127.ds RLD7.25 \v'-7.25p'
1128.ds RLD7.5 \v'-7.5p'
1129.ds RLD7.75 \v'-7.75p'
1130.ds RLD8 \v'-8p'
1131.ds RLD8.25 \v'-8.25p'
1132.ds RLD8.5 \v'-8.5p'
1133.ds RLD8.75 \v'-8.75p'
1134.ds RLD9 \v'-9p'
1135.ds RLD9.25 \v'-9.25p'
1136.ds RLD9.5 \v'-9.5p'
1137.ds RLD9.75 \v'-9.75p'
1138.ds RLD10 \v'-10p'
1139.ds RLD10.25 \v'-10.25p'
1140.ds RLD10.5 \v'-10.5p'
1141.ds RLD10.75 \v'-10.75p'
1142.ds RLD11 \v'-11p'
1143.ds RLD11.25 \v'-11.25p'
1144.ds RLD11.5 \v'-11.5p'
1145.ds RLD11.75 \v'-11.75p'
1146.ds RLD12 \v'-12p'
1147.ds RLD12.25 \v'-12.5p'
1148.ds RLD12.5 \v'-12.5p'
1149.ds RLD12.75 \v'-12.75p'
1150\#
1151\# =====================================================================
1152\#
1153\# +++REFINEMENTS+++
1154\#
1155\# AUTOMATIC LIGATURES
1156\# -------------------
1157\# *Arguments:
1158\# <none> | <anything>
1159\# *Function:
1160\# Turns automatic ligature generation on or off.
1161\# *Notes:
1162\# Ligatures may be supplied manually with \(fi, \(fl, etc.
1163\#
1164.MAC LIGATURES END
1165. ie '\\$1'' \{\
1166. lg
1167. nr #LIGATURES 1
1168. \}
1169. el \{\
1170. lg 0
1171. nr #LIGATURES 0
1172. \}
1173.END
1174\#
1175\#
1176\# SMARTQUOTES
1177\# -----------
1178\# *Arguments:
1179\# [ ,, ] | [ << ] | [ >> ] | <anything>
1180\# or
1181\# [ DA | DE | ES | FR | IT | NL | NO | PT | SV ] | <anything>
1182\# *Function:
1183\# Turns smartquotes on (optionally with a quoting style from the
1184\# argument list, or off).
1185\# *Notes:
1186\# The " character is read outside the macro when mom is
1187\# processed. The strings for open/close ($QUOTE<n>) are then
1188\# defined in the macro.
1189\#
465b256c 1190\# (Note to myself: code for " is \N'34'.)
92d0a6a6
JR
1191\#
1192.char " \\*[$QUOTE\\n[#OPEN_CLOSE]]\R'#OPEN_CLOSE (1-\\n[#OPEN_CLOSE])'
1193\#
1194.MAC SMARTQUOTES END
1195. rr #ARGS_TO_SQ
4d3e9548
JL
1196. if \\n[#RESTORE_SQ]=1 \{\
1197. rr #RESTORE_SQ
1198. ie '\\*[$RESTORE_SQ]'' \{\
1199. ds $QUOTE0 \[dq]
1200. ds $QUOTE1 \[dq]
1201. \}
1202. el \{\
1203. SMARTQUOTES \\*[$RESTORE_SQ]
1204. return
1205. \}
1206. \}
92d0a6a6
JR
1207. ie '\\$1'' \{\
1208. nr #OPEN_CLOSE 0
1209. ds $QUOTE0 \\[lq]
1210. ds $QUOTE1 \\[rq]
4d3e9548 1211. ds $RESTORE_SQ \\$1
92d0a6a6
JR
1212. \}
1213. el \{\
1214. if '\\$1',,' \{\
1215. nr #ARGS_TO_SQ 1
1216. ds $QUOTE0 \\[Bq]
1217. ds $QUOTE1 \\[lq]
4d3e9548 1218. ds $RESTORE_SQ \\$1
92d0a6a6
JR
1219. \}
1220. if '\\$1'<<' \{\
1221. nr #ARGS_TO_SQ 1
1222. ds $QUOTE0 \\[Fo]
1223. ds $QUOTE1 \\[Fc]
4d3e9548 1224. ds $RESTORE_SQ \\$1
92d0a6a6
JR
1225. \}
1226. if '\\$1'>>' \{\
1227. nr #ARGS_TO_SQ 1
1228. ds $QUOTE0 \\[Fc]
1229. ds $QUOTE1 \\[Fo]
4d3e9548 1230. ds $RESTORE_SQ \\$1
92d0a6a6
JR
1231. \}
1232. if '\\$1'DA' \{\
1233. nr #ARGS_TO_SQ 1
1234. ds $QUOTE0 \\[Fc]
1235. ds $QUOTE1 \\[Fo]
4d3e9548 1236. ds $RESTORE_SQ \\$1
92d0a6a6
JR
1237. \}
1238. if '\\$1'DE' \{\
1239. nr #ARGS_TO_SQ 1
1240. ds $QUOTE0 \\[Bq]
1241. ds $QUOTE1 \\[lq]
4d3e9548 1242. ds $RESTORE_SQ \\$1
92d0a6a6
JR
1243. \}
1244. if '\\$1'ES' \{\
1245. nr #ARGS_TO_SQ 1
1246. ds $QUOTE0 \\[lq]
1247. ds $QUOTE1 \\[rq]
4d3e9548 1248. ds $RESTORE_SQ \\$1
92d0a6a6
JR
1249. \}
1250. if '\\$1'FR' \{\
1251. nr #ARGS_TO_SQ 1
1252. ds $QUOTE0 \\[Fo]\\|
1253. ds $QUOTE1 \\|\\[Fc]
4d3e9548 1254. ds $RESTORE_SQ \\$1
92d0a6a6
JR
1255. \}
1256. if '\\$1'IT' \{\
1257. nr #ARGS_TO_SQ 1
1258. ds $QUOTE0 \\[Fo]\\|
1259. ds $QUOTE1 \\|\\[Fc]
4d3e9548 1260. ds $RESTORE_SQ \\$1
92d0a6a6
JR
1261. \}
1262. if '\\$1'NL' \{\
1263. nr #ARGS_TO_SQ 1
1264. ds $QUOTE0 \\[rq]
1265. ds $QUOTE1 \\[rq]
4d3e9548 1266. ds $RESTORE_SQ \\$1
92d0a6a6
JR
1267. \}
1268. if '\\$1'NO' \{\
1269. nr #ARGS_TO_SQ 1
1270. ds $QUOTE0 \\[Fo]
1271. ds $QUOTE1 \\[Fc]
4d3e9548 1272. ds $RESTORE_SQ \\$1
92d0a6a6
JR
1273. \}
1274. if '\\$1'PT' \{\
1275. nr #ARGS_TO_SQ 1
1276. ds $QUOTE0 \\[Fo]
1277. ds $QUOTE1 \\[Fc]
4d3e9548 1278. ds $RESTORE_SQ \\$1
92d0a6a6
JR
1279. \}
1280. if '\\$1'SV' \{\
1281. nr #ARGS_TO_SQ 1
1282. ds $QUOTE0 \\[Fc]
1283. ds $QUOTE1 \\[Fc]
4d3e9548 1284. ds $RESTORE_SQ \\$1
92d0a6a6
JR
1285. \}
1286. if !r#ARGS_TO_SQ \{\
1287. ds $QUOTE0 \\[dq]
1288. ds $QUOTE1 \\[dq]
4d3e9548 1289. nr #RESTORE_SQ 1
92d0a6a6
JR
1290. \}
1291. \}
1292.END
1293\#
1294.ds $QUOTE0 \[dq]
1295.ds $QUOTE1 \[dq]
1296\#
1297\# Strings for foot and inch marks
1298\#
1299.ds FOOT \(fm
1300.ds INCH \(fm\(fm
1301\#
1302\# =====================================================================
1303\#
1304\# +++LINE BREAKS+++
1305\#
1306\# NO-SPACE BREAK
1307\# --------------
1308\# *Argument:
1309\# <none>
1310\# *Function:
1311\# Breaks a line without advancing.
1312\# *Notes:
1313\# EL is the mnemonic used on older, dedicated typesetting machines
465b256c
JR
1314\# to indicate "process the line, without advancing the galley
1315\# medium." It stands for End Line.
92d0a6a6 1316\#
465b256c
JR
1317\# The \c inline must be appended to the end of input lines when in
1318\# nofill mode; in fill modes, the \c inline must not be used.
92d0a6a6
JR
1319\#
1320.MAC EL END
465b256c
JR
1321. TRAP OFF
1322. if \\n[#PSEUDO_FILL]=1 \&
92d0a6a6
JR
1323. br
1324. sp -1v
465b256c 1325. TRAP
92d0a6a6
JR
1326.END
1327\#
465b256c
JR
1328\# An inline escape to accomplish the same thing. Actually
1329\# preferable, since it works with filled and non-filled copy and
1330\# doesn't require the user to remember to use (or not use) the \c.
1331\#
4d3e9548 1332.ds B \h'|0'\R'#NO_ADVANCE 1'\c
465b256c 1333\#
92d0a6a6
JR
1334\# =====================================================================
1335\#
1336\# +++FILLING/QUADDING/JUSTIFYING+++
1337\#
1338\# JUSTIFY
1339\# -------
1340\# *Argument:
1341\# <none>
1342\# *Function:
1343\# Turns fill on and sets .ad to b.
1344\# *Notes:
1345\# Justifies text left and right.
1346\#
1347.MAC JUSTIFY END
1348. if \\n[#TAB_ACTIVE]=0 \{\
1349. nr #QUAD 1
1350. ds $RESTORE_QUAD_VALUE \\*[$QUAD_VALUE]
1351. \}
1352' ce 0
1353. QUAD J
1354. if \\n[#PRINT_STYLE]=1 \{ .QUAD L \}
465b256c 1355. nr #PSEUDO_FILL 0
92d0a6a6
JR
1356.END
1357\#
1358\#
1359\# QUAD
1360\# ----
1361\# *Arguments:
1362\# L | LEFT | R | RIGHT | C | CENTER/CENTRE
1363\# *Function:
1364\# Turns fill on and sets .ad to l, r, or c.
1365\# *Notes:
1366\# Terminology is a problem here. Some people call quad left
1367\# left justified, flush left, or flush left/rag right (and the
1368\# reverse for quad right). Quad center is sometimes called rag
1369\# both. For our purposes, all "quad" modes mean that groff fill
1370\# mode is enabled.
1371\#
1372.MAC QUAD END
1373. ds $QUAD_VALUE \\$1
1374. if \\n[#TAB_ACTIVE]=0 \{\
1375. nr #QUAD 1
1376. ds $RESTORE_QUAD_VALUE \\*[$QUAD_VALUE]
1377. \}
1378' ce 0
1379' fi
465b256c
JR
1380. if '\\*[$QUAD_VALUE]'L' \{\
1381. nr #JUSTIFY 0
1382. ad l
1383. \}
1384. if '\\*[$QUAD_VALUE]'LEFT' \{\
1385. nr #JUSTIFY 0
1386. ad l
1387. \}
1388. if '\\*[$QUAD_VALUE]'R' \{\
1389. nr #JUSTIFY 0
1390. ad r
1391. \}
1392. if '\\*[$QUAD_VALUE]'RIGHT' \{\
1393. nr #JUSTIFY 0
1394. ad r
1395. \}
1396. if '\\*[$QUAD_VALUE]'C' \{\
1397. nr #JUSTIFY 0
1398. ad c
1399. \}
1400. if '\\*[$QUAD_VALUE]'CENTER' \{\
1401. nr #JUSTIFY 0
1402. ad c
1403. \}
1404. if '\\*[$QUAD_VALUE]'CENTRE' \{\
1405. nr #JUSTIFY 0
1406. ad c
1407. \}
1408. if '\\*[$QUAD_VALUE]'J' \{\
1409. nr #JUSTIFY 1
1410. ad b
1411. \}
1412. if '\\*[$QUAD_VALUE]'JUSTIFY' \{\
1413. nr #JUSTIFY 1
1414. ad b
1415. \}
1416. nr #PSEUDO_FILL 0
92d0a6a6
JR
1417.END
1418\#
1419\#
1420\# LEFT, RIGHT, AND CENTER
1421\# -----------------------
4d3e9548
JL
1422\# The purpose of these macros is to allow the user to enter lines of
1423\# text that will be quadded LRC *without* the user having to enter .BR
1424\# or .br between lines. For the sake of consistency, all three appear
1425\# to behave similarly (from the point of view of the user), although
1426\# the underlying primitives don't. For this reason, LEFT, RIGHT, and
1427\# CENTER must be followed by .QUAD [L R C J] or .JUSTIFY to restore
1428\# text to groff fill mode.
92d0a6a6
JR
1429\#
1430\# LEFT
1431\# ----
1432\# *Argument:
1433\# <none>
1434\# *Function:
1435\# Turns fill mode off. Allows user to quad lines left without
1436\# requiring the .BR or .br macro.
1437\# *Notes:
1438\# LEFT simply turns fill off. Lines that exceed the current LL will
465b256c 1439\# not be broken, just continued (indefinitely) until a return is
92d0a6a6
JR
1440\# encountered. Note that this behaviour differs from the RIGHT and
1441\# CENTER macros.
1442\#
1443.MAC LEFT END
1444. if \\n[#TAB_ACTIVE]=0 \{\
1445. rr #QUAD
1446. ds $RESTORE_QUAD_VALUE LEFT
1447. \}
1448. ce 0
1449. nf
465b256c 1450. nr #PSEUDO_FILL 1
4d3e9548 1451.\" Fix for a little conflict with DOCTYPE LETTER
92d0a6a6
JR
1452. if '\\n(.z'LETTERHEAD1' \{ .rr #DATE_FIRST \}
1453.END
1454\#
1455\#
1456\# RIGHT
1457\# -----
1458\# *Argument:
1459\# <none>
1460\# *Function:
1461\# Turns fill on. Allows user to quad lines right without
1462\# requiring the .BR or .br macro.
1463\# *Notes:
1464\# Lines that exceed the current LL will be broken, with the excess
1465\# text quadded right.
1466\#
1467.MAC RIGHT END
1468. if \\n[#TAB_ACTIVE]=0 \{\
1469. rr #QUAD
1470. ds $RESTORE_QUAD_VALUE RIGHT
1471. \}
4d3e9548 1472. nf
92d0a6a6 1473. rj 100000
465b256c 1474. nr #PSEUDO_FILL 1
92d0a6a6
JR
1475.END
1476\#
1477\#
1478\# CENTER
1479\# ------
1480\# *Argument:
1481\# <none>
1482\# *Function:
1483\# Turns fill on. Allows user to center lines without
1484\# requiring the .BR or .br macro.
1485\# *Notes:
1486\# Lines that exceed the current LL will be broken, with the excess
1487\# text centered.
1488\#
1489.MAC CENTER END
1490. if \\n[#TAB_ACTIVE]=0 \{\
465b256c 1491. rr #QUAD
92d0a6a6
JR
1492. ds $RESTORE_QUAD_VALUE CENTER
1493. \}
4d3e9548 1494. nf
92d0a6a6 1495. ce 100000
465b256c 1496. nr #PSEUDO_FILL 1
92d0a6a6
JR
1497.END
1498\#
1499\# =====================================================================
1500\#
1501\# +++TABS+++
1502\#
4d3e9548
JL
1503\# There are two different kinds of tabs available: typesetting tabs
1504\# and string tabs.
1505\#
1506\# Typesetting tabs are set with TAB_SET, which requires a tab number,
1507\# an indent (offset) from the left margin and a length (optionally
1508\# with a quad direction and an instruction to fill lines). After tabs
1509\# are set with TAB_SET, they are called with .TAB n, where "n"
1510\# corresponds to the number passed to TAB_SET as a valid tab number.
1511\#
1512\# String tabs allow the user to mark off tab positions inline. Tab
1513\# indents and lengths are calculated from the beginning and end
1514\# positions of the marks. Up to 19 string tabs may be created,
1515\# numbered 1-19. Once created, they are called with .TAB n,
1516\# just like typesetting tabs.
1517\#
1518\# Setting up string tabs is a two-step procedure. First, the user
1519\# enters an input line in which s/he wants to mark off string tabs.
1520\# The beginning of a tab is marked with \*[STn], where "n" is
1521\# the desired number of the tab. The end of the the tab is marked
1522\# with \*[STnX]. All ST's must have a matching STX. String tabs
1523\# may be nested.
1524\#
1525\# Next, the user invokes .ST n for every string tab defined, and
1526\# optionally passes quad information to it. That done, string tabs
1527\# can be called just like typesetting tabs.
1528\#
1529\# String tabs don't preview properly with gxditview. Use gv instead.
92d0a6a6
JR
1530\#
1531\# Strings for string tab inlines
1532\# ------------------------------
92d0a6a6
JR
1533\# Initialize string tab markers numbered 1 to 19.
1534\#
1535.nr #LOOP 0 1
1536.while \n+[#LOOP]<20 \{\
1537. ds ST\n[#LOOP] \Ek[#ST\n[#LOOP]_OFFSET]
1538.\}
1539\#
1540.nr #LOOP 0 1
1541.while \n+[#LOOP]<20 \{\
1542. ds ST\n[#LOOP]X \Ek[#ST\n[#LOOP]_MARK]
1543.\}
1544.rr #LOOP
1545\#
1546\#
1547\# These are reserved ST numbers for internal use
1548.ds ST100 \Ek[#ST100_OFFSET]
1549.ds ST100X \Ek[#ST100_MARK]
1550.ds ST101 \Ek[#ST101_OFFSET]
1551.ds ST101X \Ek[#ST101_MARK]
1552\#
1553\#
1554\# QUAD AND SET STRING TABS
1555\# ------------------------
1556\# *Arguments:
1557\# <stringtab number> L | R | C | J [QUAD]
1558\# *Function:
1559\# Creates strings $ST<#>_QUAD_DIR and $ST<#>_FILL, then sets up a
1560\# tab based on the collected information.
1561\# *Notes:
465b256c 1562\# Like TAB_SET, ST invoked without a quad direction will default to LEFT.
92d0a6a6
JR
1563\# If lines should be filled and quadded, use the optional argument QUAD.
1564\# N.B. -- indents *must* be turned off before setting string tabs
1565\# inside .PAD
1566\#
1567.MAC ST END
1568. ds $ST\\$1_QUAD_DIR \\$2
1569. if \\n[#NUM_ARGS]=3 \{\
1570. ds $ST\\$1_FILL QUAD
1571. \}
1572. nr #ST\\$1_LENGTH \\n[#ST\\$1_MARK]-\\n[#ST\\$1_OFFSET]
1573. ie \\n[#IN_TAB] \{\
1574. TAB_SET \\$1 \\n[#ST\\$1_OFFSET]u+\\n[#ST_OFFSET]u \\n[#ST\\$1_LENGTH]u \\*[$ST\\$1_QUAD_DIR] \\*[$ST\\$1_FILL]
1575. \}
1576. el \{\
1577. TAB_SET \\$1 \\n[#ST\\$1_OFFSET]u \\n[#ST\\$1_LENGTH]u \\*[$ST\\$1_QUAD_DIR] \\*[$ST\\$1_FILL]
1578. \}
1579.END
1580\#
1581\#
1582\# TAB SET
1583\# -------
1584\# *Arguments:
1585\# <n> ident(ipPcm) length(ipPcm) [L | R | C | J [QUAD]]
1586\# *Function:
1587\# Creates macros TABn and TAB n, where "n" is any arbitrary number.
1588\# TABn is a typesetting tab (i.e. a tab defined as an indent
1589\# from the page left offset plus a line length.)
1590\# *Notes:
1591\# n = arbitrary digit to identify the tab
1592\# indent = indent from left margin; unit of measure required
1593\# length = length of tab (unit of measure required; can be
1594\# \w'<string>'u--if more than one word in string, surround
1595\# with double quotes "\w'<three word string>'"
1596\# LRCJ = quad for tab (left, right, center, justified)
1597\# If option QUAD afterwards is not given, quad is line for line
1598\# (no fill mode), meaning that there's no need for .BR or .br
1599\# between lines.
1600\# QUAD = fill tab (so it behaves as if .QUAD LRC or .JUSTIFY
1601\# had been given).
1602\#
1603\# N.B. -- indents *must* be turned off before setting tabs
1604\#
4d3e9548
JL
1605\# Examples:
1606\# --------
1607\#
1608\# .TAB_SET 1 2P+6p 12P C
1609\#
1610\# means "create a tab numbered 1 that starts 2 picas and 6 points from
1611\# the left margin, is 12 picas long, and centre each input line."
1612\#
1613\# .TAB_SET 1 2P+6P 12P C QUAD
1614\#
1615\# means exactly the same thing, except that input lines are joined and
1616\# the area delimted by the tab filled with centered text.
1617\#
1618\# TAB n can be called at any time after being set.
1619\#
1620\# Tabs are NOT columnar in behaviour. If the text inside a
1621\# tab runs to several lines, when you call the next tab a break
1622\# occurs, meaning that the new tab starts one line below the last
1623\# line in the previous tab. For columnar behaviour, you must
1624\# use the multi-column macros in addition to tabs.
1625\#
1626\# If you want tabs to line up bottom-line to bottom-line (most likely
1627\# single line tabs), use .TN (provided the tabs are numbered sequentially).
1628\# Otherwise, you must use .EL then .TAB <n> if you want them to align.
1629\#
1630\# If you want to reset tabs, you must use .TQ before .TAB_SET.
1631\#
1632\# Note that indents are turned off automatically whenever a new
1633\# tab is called with TAB <n>.
1634\#
1635\# Tabs themselves are user-invoked using the TAB macro with a numeric
1636\# argument, e.g. TAB 1.
1637\#
1638\# Generally, in order not to get confused, it's a good idea
1639\# to make sure all indents are off before setting tabs.
92d0a6a6
JR
1640\#
1641.MAC TAB_SET END
1642. br
1643. nr #TAB_NUMBER \\$1
1644. ds $CURRENT_TAB \\n[#TAB_NUMBER]
1645. nr #TAB_OFFSET (\\$2)
1646. nr #TAB_LENGTH (\\$3)
1647. MAC TAB\\n[#TAB_NUMBER] DONE \"Define TAB macro
465b256c
JR
1648. if !\\\\n[#TB+]=1 \{ .br \}
1649. if \\\\n[#TB+]=1 \{\
1650. EL
1651. vpt 0
1652. rr #TB+
1653. \}
92d0a6a6
JR
1654. in 0
1655. nr #TAB_ACTIVE 1
1656. nr #CURRENT_TAB \\n[#TAB_NUMBER]
1657. ds $CURRENT_TAB \\*[$CURRENT_TAB]
1658. nr #TAB_OFFSET\\*[$CURRENT_TAB] \\n[#TAB_OFFSET]
1659. nr #ST_OFFSET \\n[#TAB_OFFSET]
1660. po \\\\n[#L_MARGIN]u+\\\\n[#TAB_OFFSET\\\\*[$CURRENT_TAB]]u
1661. ll \\n[#TAB_LENGTH]u
1662. ta \En(.lu
1663. ie '\\$5'QUAD' \{\
1664. if '\\$4'L' \{ .QUAD L \}
1665. if '\\$4'R' \{ .QUAD R \}
1666. if '\\$4'C' \{ .QUAD C \}
1667. if '\\$4'J' \{ .JUSTIFY \}
1668. \}
1669. el \{\
1670. if '\\$4'' \{ .LEFT \}
1671. if '\\$4'L' \{ .LEFT \}
1672. if '\\$4'R' \{ .RIGHT \}
1673. if '\\$4'C' \{ .CENTER \}
1674. if '\\$4'J' \{ .JUSTIFY \}
1675. \}
465b256c
JR
1676. if \\\\n[#TN]=1 \{\
1677. TRAP
1678. rr #TN
1679. \}
92d0a6a6
JR
1680.DONE
1681. rr #TAB_ACTIVE
1682.END
1683\#
1684\#
1685\# TAB
1686\# ---
1687\# *Arguments:
1688\# <tab number to tab into>
1689\# *Function:
1690\# Moves to tab number passed as an argument.
1691\#
1692.MAC TAB END
1693. ds $TAB_NUMBER \\$1
1694. TAB\\*[$TAB_NUMBER]
1695. nr #IN_TAB 1
1696.END
1697\#
1698\#
1699\# TAB NEXT
1700\# --------
1701\# *Argument:
1702\# <none>
1703\# *Function:
1704\# Automagically moves to TAB<n+1> on the same line as the last
1705\# line of the previous tab.
1706\# *Notes:
465b256c
JR
1707\# The \c inline must be appended to the end of input lines when in
1708\# nofill mode; in fill modes, the \c inline must not be used.
92d0a6a6
JR
1709\#
1710.MAC TN END
465b256c
JR
1711. nr #TN 1
1712. TRAP OFF
1713. sp -1v
92d0a6a6
JR
1714. nr #NEXT_TAB \\n[#CURRENT_TAB]+1
1715. TAB\\n[#NEXT_TAB]
465b256c 1716. TRAP
92d0a6a6
JR
1717.END
1718\#
465b256c
JR
1719\# An inline escape to accomplish the same thing. Actually
1720\# preferable, since it works with filled and non-filled copy and
1721\# doesn't require the user to remember to use (or not use) the \c.
1722\#
1723.ds TB+ "\c\\R'#TB+ 1'\\R'#TN 1'\\R'#NEXT_TAB \\n[#CURRENT_TAB]+1'\\*[TAB\\n[#NEXT_TAB]]\c
92d0a6a6
JR
1724\#
1725\# TAB QUIT
1726\# --------
1727\# *Argument:
1728\# <none>
1729\# *Function:
1730\# Sets #TAB_ACTIVE to "0" (off).
1731\# Resets left margin to value in effect prior to tabs.
1732\# Resets line length to value in effect prior to tabs.
1733\# Checks #QUAD to see if we were in flush or quad mode
1734\# prior to tabs (0=off, 1=on).
1735\# Resets QUAD [ L|R|C ], LEFT, RIGHT, CENTER, or JUSTIFY
1736\# in effect prior to tabs.
1737\# *Notes:
1738\# TQ *must* come before setting any new tabs if you want the
1739\# tabs' indents measured from page left. Otherwise, the tabs'
1740\# indents are measured from the left margin of the tab you're
1741\# currently in.
1742\#
1743.MAC TQ END
1744. br
1745. rr #TAB_ACTIVE
1746. rr #IN_TAB
1747. po \\n[#L_MARGIN]u
1748. ll \\n[#L_LENGTH]u
1749. ta \\n(.lu
1750. ie \\n[#QUAD] \{\
1751. ie '\\*[$RESTORE_QUAD_VALUE]'J' \{ .JUSTIFY \}
1752. el \{ .QUAD \\*[$RESTORE_QUAD_VALUE] \}
1753. \}
1754. el \{\
1755. if '\\*[$RESTORE_QUAD_VALUE]'LEFT' \{ .LEFT \}
1756. if '\\*[$RESTORE_QUAD_VALUE]'RIGHT' \{ .RIGHT \}
1757. if '\\*[$RESTORE_QUAD_VALUE]'CENTER' \{ .CENTER \}
1758. \}
1759.END
1760\#
1761\# ====================================================================
1762\#
1763\# COLOR HANDLING
1764\# ==============
1765\#
1766\# COLOR
1767\# -----
1768\# *Arguments:
1769\# <pre-defined NEWCOLOR or XCOLOR>
1770\# *Function:
1771\# Allows the inline escape for setting color to be called
1772\# as a macro.
1773\#
1774.MAC COLOR END
1775.ie \\n(.u=1 \{\
1776\c
1777\\*[\\$1]\c
465b256c 1778.\}
92d0a6a6
JR
1779.el \{ \\*[\\$1] \}
1780.END
1781\#
1782\#
1783\# NEWCOLOR
1784\# --------
1785\# *Arguments:
1786\# <color name> [<color scheme>] <color definition>
1787\# *Function:
1788\# Based on .defcolor, allows users to name and define colors using
1789\# one of the four color schemes rgb, cmy, cmyk and grey. The new
1790\# color is then defined as a string so that it can be called inline
1791\# with \*[COLORNAME] or with .COLOR.
1792\# *Notes:
1793\# With only two args, the default color scheme is rgb.
1794\#
1795\# It is highly recommended that users define new colors as
1796\# all-cap strings, to differentiate them from x colors, which must
1797\# be in lower case.
1798\#
1799.MAC NEWCOLOR END
1800. if \\n[#NUM_ARGS]=2 \{\
1801. defcolor \\$1 rgb \\$2
1802. \}
1803. if \\n[#NUM_ARGS]=3 \{\
1804. if '\\$2'RGB' .ds $COLOR_SCHEME rgb
1805. if '\\$2'CYM' .ds $COLOR_SCHEME cym
1806. if '\\$2'CMYK' .ds $COLOR_SCHEME cmyk
1807. if '\\$2'GRAY' .ds $COLOR_SCHEME gray
1808. if '\\$2'GREY' .ds $COLOR_SCHEME gray
1809. defcolor \\$1 \\*[$COLOR_SCHEME] \\$3
1810. \}
1811. ds \\$1 \\m[\\$1]
1812.END
1813\#
1814\#
1815\# XCOLOR
1816\# ------
1817\# *Arguments:
1818\# <x color name> [<alias>]
1819\# *Function:
1820\# Defines a string of x color name (i.e. a predefined x
1821\# color). If <alias> is given, creates a string of <alias name>
1822\# that references the x color name of the first argument.
1823\# *Notes:
4d3e9548 1824\# The color name must be a valid color name from rgb.txt, and
92d0a6a6
JR
1825\# must be given entirely in lower case, all one word.
1826\#
1827.MAC XCOLOR END
1828. ds \\$1 \m[\\$1]
4d3e9548
JL
1829. if \\n[#NUM_ARGS]=2 \{\
1830. ds \\$2 \m[\\$1]
1831. ds $\\$2_FILL \\$1
1832. \}
92d0a6a6
JR
1833.END
1834\#
92d0a6a6
JR
1835\# Pre-define xcolors black and white
1836\#
1837.ds black \m[black]
1838.ds BLACK \m[black]
1839.ds white \m[white]
1840.ds WHITE \m[WHITE]
1841\#
1842\# =====================================================================
1843\#
1844\# +++MISCELLANEOUS USEFUL MACROS AND STRINGS+++
1845\#
1846\# UNDERLINE
1847\# ---------
1848\# *Arguments:
1849\# <none> | <anything>
1850\# *Function:
1851\# When on, underlines all letters, words, and digits in a passage,
1852\# ignoring punctuation and spaces.
1853\# *Notes:
1854\# Only for use when the font family is COURIER, to simulate
1855\# typewriter-style underlining of italic passages.
1856\#
1857.MAC UNDERLINE END
1858. ie '\\$1'' \{\
1859. nr #UNDERLINE_ON 1
1860. char A _\bA
1861. char B _\bB
1862. char C _\bC
1863. char D _\bD
1864. char E _\bE
1865. char F _\bF
1866. char G _\bG
1867. char H _\bH
1868. char I _\bI
1869. char J _\bJ
1870. char K _\bK
1871. char L _\bL
1872. char M _\bM
1873. char N _\bN
1874. char O _\bO
1875. char P _\bP
1876. char Q _\bQ
1877. char R _\bR
1878. char S _\bS
1879. char T _\bT
1880. char U _\bU
1881. char V _\bV
1882. char W _\bW
1883. char X _\bX
1884. char Y _\bY
1885. char Z _\bZ
1886. char \[`A] _\b\[`A]
1887. char \[^A] _\b\[^A]
1888. char \['A] _\b\['A]
1889. char \[:A] _\b\[:A]
1890. char \[oA] _\b\[oA]
1891. char \[~A] _\b\[~A]
1892. char \[AE] _\b\[AE]
1893. char \[`E] _\b\[`E]
1894. char \[^E] _\b\[^E]
1895. char \['E] _\b\['E]
1896. char \[:E] _\b\[:E]
1897. char \[`I] _\b\[`I]
1898. char \[^I] _\b\[^I]
1899. char \['I] _\b\['I]
1900. char \[:I] _\b\[:I]
1901. char \[`O] _\b\[`O]
1902. char \[^O] _\b\[^O]
1903. char \['O] _\b\['O]
1904. char \[:O] _\b\[:O]
1905. char \[~O] _\b\[~O]
1906. char \[/O] _\b\[/O]
1907. char \[`U] _\b\[`U]
1908. char \[^U] _\b\[^U]
1909. char \['U] _\b\['U]
1910. char \[:U] _\b\[:U]
1911. char \[,C] _\b\[,C]
1912. char \[-D] _\b\[-D]
1913. char \[~N] _\b\[~N]
1914. char \[TP] _\b\[TP]
1915. char \['Y] _\b\['Y]
1916. char \[:Y] _\b\[:Y]
1917. char a _\ba
1918. char b _\bb
1919. char c _\bc
1920. char d _\bd
1921. char e _\be
1922. char f _\bf
1923. char g _\bg
1924. char h _\bh
1925. char i _\bi
1926. char j _\bj
1927. char k _\bk
1928. char l _\bl
1929. char m _\bm
1930. char n _\bn
1931. char o _\bo
1932. char p _\bp
1933. char q _\bq
1934. char r _\br
1935. char s _\bs
1936. char t _\bt
1937. char u _\bu
1938. char v _\bv
1939. char w _\bw
1940. char x _\bx
1941. char y _\by
1942. char z _\bz
1943. char \[`a] _\b\[`a]
1944. char \[^a] _\b\[^a]
1945. char \['a] _\b\['a]
1946. char \[:a] _\b\[:a]
1947. char \[oa] _\b\[oa]
1948. char \[~a] _\b\[~a]
1949. char \[ae] _\b\[ae]
1950. char \[`e] _\b\[`e]
1951. char \[^e] _\b\[^e]
1952. char \['e] _\b\['e]
1953. char \[:e] _\b\[:e]
1954. char \[`i] _\b\[`i]
1955. char \[^i] _\b\[^i]
1956. char \['i] _\b\['i]
1957. char \[:i] _\b\[:i]
1958. char \[`o] _\b\[`o]
1959. char \[^o] _\b\[^o]
1960. char \['o] _\b\['o]
1961. char \[:o] _\b\[:o]
1962. char \[~o] _\b\[~o]
1963. char \[/o] _\b\[/o]
1964. char \[`u] _\b\[`u]
1965. char \[^u] _\b\[^u]
1966. char \['u] _\b\['u]
1967. char \[:u] _\b\[:u]
1968. char \[,c] _\b\[,c]
1969. char \[Sd] _\b\[Sd]
1970. char \[~n] _\b\[~n]
1971. char \[Tp] _\b\[Tp]
1972. char \['y] _\b\['y]
1973. char \[:y] _\b\[:y]
1974. char \[ss] _\b\[ss]
1975. char ' _\b'
1976. char 1 _\b1
1977. char 2 _\b2
1978. char 3 _\b3
1979. char 4 _\b4
1980. char 5 _\b5
1981. char 6 _\b6
1982. char 7 _\b7
1983. char 8 _\b8
1984. char 9 _\b9
1985. char 0 _\b0
1986. \}
1987. el \{\
1988. nr #UNDERLINE_ON 0
1989. 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 \
1990 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 \
1991 \[`A] \[^A] \['A] \[:A] \[oA] \[~A] \[AE] \[`E] \[^E] \['E] \[:E] \
1992 \[`I] \[^I] \['I] \[:I] \[`O] \[^O] \['O] \[:O] \[~O] \[/O] \[`U] \
1993 \[^U] \['U] \[:U] \[,C] \[-D] \[~N] \[TP] \['Y] \[:Y] \
1994 \[`a] \[^a] \['a] \[:a] \[oa] \[~a] \[ae] \[`e] \[^e] \['e] \[:e] \[`i] \
1995 \[^i] \['i] \[:i] \[`o] \[^o] \['o] \[:o] \[~o] \[/o] \[`u] \[^u] \['u] \
1996 \[:u] \[,c] \[Sd] \[~n] \[Tp] \['y] \[:y] \[ss] \
1997 ' 1 2 3 4 5 6 7 8 9 0
1998. \}
1999.END
2000\#
2001\#
2002\# UL/ULX
2003\# ------
2004\# *Arguments:
2005\# <none>
2006\# *Function:
2007\# Underscores all letters, words, and digits in a passage,
2008\# ignoring punctuation and spaces.
2009\# *Notes:
2010\# Intended to be called with inline escapes \*[UL] (underline
2011\# on) and \*[ULX] (underline off). Only works when the font family
4d3e9548 2012\# is fixed width, to simulate typewriter-style underlining of italic
92d0a6a6
JR
2013\# passages.
2014\#
2015.MAC UL END
2016\c\R'#UNDERLINE_ON 1'
2017. char A _\bA
2018. char B _\bB
2019. char C _\bC
2020. char D _\bD
2021. char E _\bE
2022. char F _\bF
2023. char G _\bG
2024. char H _\bH
2025. char I _\bI
2026. char J _\bJ
2027. char K _\bK
2028. char L _\bL
2029. char M _\bM
2030. char N _\bN
2031. char O _\bO
2032. char P _\bP
2033. char Q _\bQ
2034. char R _\bR
2035. char S _\bS
2036. char T _\bT
2037. char U _\bU
2038. char V _\bV
2039. char W _\bW
2040. char X _\bX
2041. char Y _\bY
2042. char Z _\bZ
2043. char \[`A] _\b\[`A]
2044. char \[^A] _\b\[^A]
2045. char \['A] _\b\['A]
2046. char \[:A] _\b\[:A]
2047. char \[oA] _\b\[oA]
2048. char \[~A] _\b\[~A]
2049. char \[AE] _\b\[AE]
2050. char \[`E] _\b\[`E]
2051. char \[^E] _\b\[^E]
2052. char \['E] _\b\['E]
2053. char \[:E] _\b\[:E]
2054. char \[`I] _\b\[`I]
2055. char \[^I] _\b\[^I]
2056. char \['I] _\b\['I]
2057. char \[:I] _\b\[:I]
2058. char \[`O] _\b\[`O]
2059. char \[^O] _\b\[^O]
2060. char \['O] _\b\['O]
2061. char \[:O] _\b\[:O]
2062. char \[~O] _\b\[~O]
2063. char \[/O] _\b\[/O]
2064. char \[`U] _\b\[`U]
2065. char \[^U] _\b\[^U]
2066. char \['U] _\b\['U]
2067. char \[:U] _\b\[:U]
2068. char \[,C] _\b\[,C]
2069. char \[-D] _\b\[-D]
2070. char \[~N] _\b\[~N]
2071. char \[TP] _\b\[TP]
2072. char \['Y] _\b\['Y]
2073. char \[:Y] _\b\[:Y]
2074. char a _\ba
2075. char b _\bb
2076. char c _\bc
2077. char d _\bd
2078. char e _\be
2079. char f _\bf
2080. char g _\bg
2081. char h _\bh
2082. char i _\bi
2083. char j _\bj
2084. char k _\bk
2085. char l _\bl
2086. char m _\bm
2087. char n _\bn
2088. char o _\bo
2089. char p _\bp
2090. char q _\bq
2091. char r _\br
2092. char s _\bs
2093. char t _\bt
2094. char u _\bu
2095. char v _\bv
2096. char w _\bw
2097. char x _\bx
2098. char y _\by
2099. char z _\bz
2100. char \[`a] _\b\[`a]
2101. char \[^a] _\b\[^a]
2102. char \['a] _\b\['a]
2103. char \[:a] _\b\[:a]
2104. char \[oa] _\b\[oa]
2105. char \[~a] _\b\[~a]
2106. char \[ae] _\b\[ae]
2107. char \[`e] _\b\[`e]
2108. char \[^e] _\b\[^e]
2109. char \['e] _\b\['e]
2110. char \[:e] _\b\[:e]
2111. char \[`i] _\b\[`i]
2112. char \[^i] _\b\[^i]
2113. char \['i] _\b\['i]
2114. char \[:i] _\b\[:i]
2115. char \[`o] _\b\[`o]
2116. char \[^o] _\b\[^o]
2117. char \['o] _\b\['o]
2118. char \[:o] _\b\[:o]
2119. char \[~o] _\b\[~o]
2120. char \[/o] _\b\[/o]
2121. char \[`u] _\b\[`u]
2122. char \[^u] _\b\[^u]
2123. char \['u] _\b\['u]
2124. char \[:u] _\b\[:u]
2125. char \[,c] _\b\[,c]
2126. char \[Sd] _\b\[Sd]
2127. char \[~n] _\b\[~n]
2128. char \[Tp] _\b\[Tp]
2129. char \['y] _\b\['y]
2130. char \[:y] _\b\[:y]
2131. char \[ss] _\b\[ss]
2132. char ' _\b'
2133. char 1 _\b1
2134. char 2 _\b2
2135. char 3 _\b3
2136. char 4 _\b4
2137. char 5 _\b5
2138. char 6 _\b6
2139. char 7 _\b7
2140. char 8 _\b8
2141. char 9 _\b9
2142. char 0 _\b0
2143.END
2144\#
2145\#
2146.MAC ULX END
2147\c\R'#UNDERLINE_ON 0'
2148. 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 \
2149 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 \
2150 \[`A] \[^A] \['A] \[:A] \[oA] \[~A] \[AE] \[`E] \[^E] \['E] \[:E] \
2151 \[`I] \[^I] \['I] \[:I] \[`O] \[^O] \['O] \[:O] \[~O] \[/O] \[`U] \
2152 \[^U] \['U] \[:U] \[,C] \[-D] \[~N] \[TP] \['Y] \[:Y] \
2153 \[`a] \[^a] \['a] \[:a] \[oa] \[~a] \[ae] \[`e] \[^e] \['e] \[:e] \[`i] \
2154 \[^i] \['i] \[:i] \[`o] \[^o] \['o] \[:o] \[~o] \[/o] \[`u] \[^u] \['u] \
2155 \[:u] \[,c] \[Sd] \[~n] \[Tp] \['y] \[:y] \[ss] \
2156 ' 1 2 3 4 5 6 7 8 9 0
2157.END
2158\#
2159\#
2160\# UNDERSCORE
2161\# ----------
2162\# *Arguments:
4d3e9548 2163\# [<points below baseline>] "text"
92d0a6a6
JR
2164\# *Function:
2165\# Places an underscore 2 points under the string if no lead given,
2166\# otherwise places underscore under string by user specified amount.
2167\# *Notes:
2168\# When using this macro, the string to be underscored must begin
2169\# with double-quotes ("), regardless of whether it's the sole
2170\# argument or the second.
2171\# E.g.:
2172\# .UNDERSCORE "Text to be underscored
2173\# or
2174\# .UNDERSCORE 2p "Text to be underscored
2175\#
2176\# All text is underscored (including punctuation and spaces).
4d3e9548
JL
2177\# This is the primary difference between UNDERLINE and
2178\# UNDERSCORE, aside from the fact the UNDERLINE only works with
2179\# fixed width fonts.
92d0a6a6
JR
2180\#
2181\# UNDERSCORE does not work across line breaks. Each line of
2182\# text must be entered separately with UNDERSCORE. If the
2183\# UNDERSCORE begins in the middle of a line and crosses over a
2184\# break, the portion before the break must be entered in its own
2185\# UNDERSCORE, as must the portion that comes after the break.
2186\#
2187.MAC UNDERSCORE END
4d3e9548
JL
2188. nr #SAVED_UNDERSCORE_WEIGHT \\n[#UNDERSCORE_WEIGHT]
2189. nr #SAVED_UNDERSCORE_WEIGHT_ADJ \\n[#UNDERSCORE_WEIGHT_ADJ]
2190. ds $SAVED_UNDERSCORE_GAP \\*[$UNDERSCORE_GAP]
2191. if \\n[#FROM_BIB_STRING]=1 \{\
2192. nr #UNDERSCORE_WEIGHT \\n[#BIB_STRING_UNDERLINE_WEIGHT]
2193. nr #UNDERSCORE_WEIGHT_ADJ \\n[#BIB_STRING_UNDERLINE_WEIGHT_ADJ]
2194. ds $UNDERSCORE_GAP \\*[$BIB_STRING_UNDERLINE_GAP]
2195. \}
2196. if \\n[#FROM_COVER]=1 \{\
2197. nr #UNDERSCORE_WEIGHT \\n[#COVER_UNDERLINE_WEIGHT]
2198. nr #UNDERSCORE_WEIGHT_ADJ \\n[#COVER_UNDERLINE_WEIGHT_ADJ]
2199. ds $UNDERSCORE_GAP \\*[$COVER_UNDERLINE_GAP]
2200. \}
2201. if \\n[#FROM_DOC_COVER]=1 \{\
2202. nr #UNDERSCORE_WEIGHT \\n[#DOCCOVER_UNDERLINE_WEIGHT]
2203. nr #UNDERSCORE_WEIGHT_ADJ \\n[#DOCCOVER_UNDERLINE_WEIGHT_ADJ]
2204. ds $UNDERSCORE_GAP \\*[$DOCCOVER_UNDERLINE_GAP]
2205. \}
2206. if \\n[#FROM_DOCTYPE]=1 \{\
2207. nr #UNDERSCORE_WEIGHT \\n[#DOCTYPE_UNDERLINE_WEIGHT]
2208. nr #UNDERSCORE_WEIGHT_ADJ \\n[#DOCTYPE_UNDERLINE_WEIGHT_ADJ]
2209. ds $UNDERSCORE_GAP \\*[$DOCTYPE_UNDERLINE_GAP]
2210. \}
2211. if \\n[#FROM_HEAD]=1 \{\
2212. nr #UNDERSCORE_WEIGHT \\n[#HEAD_UNDERLINE_WEIGHT]
2213. nr #UNDERSCORE_WEIGHT_ADJ \\n[#HEAD_UNDERLINE_WEIGHT_ADJ]
2214. ds $UNDERSCORE_GAP \\*[$HEAD_UNDERLINE_GAP]
2215. \}
2216. if \\n[#FROM_EN_STRING]=1 \{\
2217. nr #UNDERSCORE_WEIGHT \\n[#EN_STRING_UNDERLINE_WEIGHT]
2218. nr #UNDERSCORE_WEIGHT_ADJ \\n[#EN_STRING_UNDERLINE_WEIGHT_ADJ]
2219. ds $UNDERSCORE_GAP \\*[$EN_STRING_UNDERLINE_GAP]
2220. \}
2221. if \\n[#FROM_EN_TITLE]=1 \{\
2222. nr #UNDERSCORE_WEIGHT \\n[#EN_TITLE_UNDERLINE_WEIGHT]
2223. nr #UNDERSCORE_WEIGHT_ADJ \\n[#EN_TITLE_UNDERLINE_WEIGHT_ADJ]
2224. ds $UNDERSCORE_GAP \\*[$EN_TITLE_UNDERLINE_GAP]
2225. \}
2226. ie \\n[#NUM_ARGS]=1 \{\
2227. nr #TEXT_WIDTH \w'\\$1'
2228\\$1\
2229\D't \\n[#UNDERSCORE_WEIGHT]'\
2230\h'-\\n[#TEXT_WIDTH]u-\\n[#UNDERSCORE_WEIGHT]u'\
2231\v'+(\\*[$UNDERSCORE_GAP])+\\n[#UNDERSCORE_WEIGHT_ADJ]u'\
2232\D'l \\n[#TEXT_WIDTH]u 0'\
2233\D't \\n[#RULE_WEIGHT]'\
2234\h'-\\n[#RULE_WEIGHT]u'\
2235\v'-(\\*[$UNDERSCORE_GAP])-\\n[#UNDERSCORE_WEIGHT_ADJ]u'
2236. \}
2237. el \{\
2238. nr #TEXT_WIDTH \w'\\$2'
2239\\$2\
2240\h'-\\n[#TEXT_WIDTH]u-\\n[#UNDERSCORE_WEIGHT]u'\
2241\v'+(\\$1)+\\n[#UNDERSCORE_WEIGHT_ADJ]u'\
2242\D't \\n[#UNDERSCORE_WEIGHT]'\
2243\D'l \\n[#TEXT_WIDTH]u 0'\
2244\D't \\n[#RULE_WEIGHT]'\
2245\h'-\\n[#RULE_WEIGHT]u'\
2246\v'-(\\$1)-\\n[#UNDERSCORE_WEIGHT_ADJ]u'
2247. \}
2248. nr #UNDERSCORE_WEIGHT \\n[#SAVED_UNDERSCORE_WEIGHT]
2249. nr #UNDERSCORE_WEIGHT_ADJ \\n[#SAVED_UNDERSCORE_WEIGHT_ADJ]
2250. ds $UNDERSCORE_GAP \\*[$SAVED_UNDERSCORE_GAP]
2251. rr #SAVED_UNDERSCORE_WEIGHT
2252. rr #SAVED_UNDERSCORE_WEIGHT_ADJ
2253. rm $SAVED_UNDERSCORE_GAP
92d0a6a6
JR
2254.END
2255\#
2256\#
2257\# DOUBLE UNDERSCORE
2258\# -----------------
2259\# *Arguments:
2260\# [points below baseline] [points distance between rules] "text"
2261\# *Function:
2262\# Same as UNDERSCORE, except it produces a double underscore. The default
2263\# distance between the rules is 2 points.
2264\# *Notes:
2265\# The same double-quote requirement as UNDERSCORE.
2266\#
4d3e9548 2267\#
92d0a6a6 2268.MAC UNDERSCORE2 END
4d3e9548
JL
2269. nr #SAVED_UNDERSCORE_WEIGHT \\n[#UNDERSCORE_WEIGHT]
2270. nr #SAVED_UNDERSCORE_WEIGHT_ADJ \\n[#UNDERSCORE_WEIGHT_ADJ]
2271. ds $SAVED_UNDERSCORE_GAP \\*[$UNDERSCORE_GAP]
2272. ds $SAVED_RULE_GAP \\*[$RULE_GAP]
2273. if \\n[#NUM_ARGS]=2 \{\
2274. ds $UNDERSCORE_GAP \\$1
2275. \}
2276. if \\n[#NUM_ARGS]=3 \{\
2277. ds $UNDERSCORE_GAP \\$1
2278. ds $RULE_GAP \\$2
2279. \}
2280. if \\n[#FROM_BIB_STRING] \{\
2281. nr #UNDERSCORE_WEIGHT \\n[#BIB_STRING_UNDERLINE_WEIGHT]
2282. nr #UNDERSCORE_WEIGHT_ADJ \\n[#BIB_STRING_UNDERLINE_WEIGHT_ADJ]
2283. ds $UNDERSCORE_GAP \\*[$BIB_STRING_UNDERLINE_GAP]
2284. ds $RULE_GAP \\*[$BIB_STRING_RULE_GAP]
2285. \}
2286. if \\n[#FROM_EN_STRING] \{\
2287. nr #UNDERSCORE_WEIGHT \\n[#EN_STRING_UNDERLINE_WEIGHT]
2288. nr #UNDERSCORE_WEIGHT_ADJ \\n[#EN_STRING_UNDERLINE_WEIGHT_ADJ]
2289. ds $UNDERSCORE_GAP \\*[$EN_STRING_UNDERLINE_GAP]
2290. ds $RULE_GAP \\*[$EN_STRING_RULE_GAP]
2291. \}
92d0a6a6 2292. if \\n[#NUM_ARGS]=1 \{\
4d3e9548
JL
2293. nr #TEXT_WIDTH \w'\\$1'
2294\\$1\
2295\D't \\n[#UNDERSCORE_WEIGHT]'\
2296\v'+\\*[$UNDERSCORE_GAP]+\\n[#UNDERSCORE_WEIGHT_ADJ]u'\
2297\h'-\\n[#TEXT_WIDTH]u-\\n[#UNDERSCORE_WEIGHT]u'\
2298\D'l \\n[#TEXT_WIDTH]u 0'\
2299\v'+\\*[$RULE_GAP]+\\n[#UNDERSCORE_WEIGHT]u'\
2300\h'-\\n[#TEXT_WIDTH]u'\
2301\D'l \\n[#TEXT_WIDTH]u 0'\
2302\D't \\n[#RULE_WEIGHT]'\
2303\h'-\\n[#RULE_WEIGHT]u'\
2304\v'-(\\*[$UNDERSCORE_GAP]+\\*[$RULE_GAP])-(\\n[#UNDERSCORE_WEIGHT]u*2u)'
92d0a6a6
JR
2305. \}
2306. if \\n[#NUM_ARGS]=2 \{\
4d3e9548
JL
2307. nr #TEXT_WIDTH \w'\\$2'
2308\\$2\
2309\D't \\n[#UNDERSCORE_WEIGHT]'\
2310\v'+\\*[$UNDERSCORE_GAP]+\\n[#UNDERSCORE_WEIGHT_ADJ]u'\
2311\h'-\\n[#TEXT_WIDTH]u-\\n[#UNDERSCORE_WEIGHT]u'\
2312\D'l \\n[#TEXT_WIDTH]u 0'\
2313\v'+(\\*[$RULE_GAP])+\\n[#UNDERSCORE_WEIGHT]u'\
2314\h'-\\n[#TEXT_WIDTH]u'\
2315\D'l \\n[#TEXT_WIDTH]u 0'\
2316\D't \\n[#RULE_WEIGHT]'\
2317\h'-\\n[#RULE_WEIGHT]u'\
2318\v'-(\\*[$UNDERSCORE_GAP]+\\*[$RULE_GAP])+(\\n[#UNDERSCORE_WEIGHT]u*2u)'
92d0a6a6
JR
2319. \}
2320. if \\n[#NUM_ARGS]=3 \{\
4d3e9548
JL
2321. nr #TEXT_WIDTH \w'\\$3'
2322\\$3\
2323\D't \\n[#UNDERSCORE_WEIGHT]'\
2324\v'+\\*[$UNDERSCORE_GAP]+\\n[#UNDERSCORE_WEIGHT_ADJ]u'\
2325\h'-\\n[#TEXT_WIDTH]u-\\n[#UNDERSCORE_WEIGHT]u'\
2326\D'l \\n[#TEXT_WIDTH]u 0'\
2327\v'+\\*[$RULE_GAP]+\\n[#UNDERSCORE_WEIGHT]u'\
2328\h'-\\n[#TEXT_WIDTH]u'\
2329\D'l \\n[#TEXT_WIDTH]u 0'\
2330\D't \\n[#RULE_WEIGHT]'\
2331\h'-\\n[#RULE_WEIGHT]u'\
2332\v'-(\\*[$UNDERSCORE_GAP]+\\*[$RULE_GAP])-(\\n[#UNDERSCORE_WEIGHT]u*2u)'
2333. \}
2334. nr #UNDERSCORE_WEIGHT \\n[#SAVED_UNDERSCORE_WEIGHT]
2335. nr #UNDERSCORE_WEIGHT_ADJ \\n[#SAVED_UNDERSCORE_WEIGHT_ADJ]
2336. ds $UNDERSCORE_GAP \\*[$SAVED_UNDERSCORE_GAP]
2337. rr #SAVED_UNDERSCORE_WEIGHT
2338. rr #SAVED_UNDERSCORE_WEIGHT_ADJ
2339. rm $SAVED_UNDERSCORE_GAP
2340. rm $SAVED_RULE_GAP
2341.END
2342\#
2343\# Default underscoring rule gaps
2344\#
2345.ds $BIB_STRING_UNDERLINE_GAP 2p
2346.ds $BIB_STRING_RULE_GAP 2p
2347.ds $COVER_UNDERLINE_GAP 2p
2348.ds $DOCCOVER_UNDERLINE_GAP 2p
2349.ds $DOCTYPE_UNDERLINE_GAP 2p
2350.ds $EN_STRING_UNDERLINE_GAP 2p
2351.ds $EN_STRING_RULE_GAP 2p
2352.ds $EN_TITLE_UNDERLINE_GAP 2p
2353.ds $HEAD_UNDERLINE_GAP 2p
2354.ds $RULE_GAP 2p
2355.ds $UNDERSCORE_GAP 2p
92d0a6a6
JR
2356\#
2357\#
2358\# SUPERSCRIPT INLINES
2359\# -------------------
2360\# *Function:
2361\# Prints everything after invocation as superscript.
2362\# *Notes:
2363\# \*[SUP] and \*[SUPX] turn superscript on and off respectively.
2364\# If running type is pseudo-condensed/expanded, invoke the superscript
2365\# strings as \*[CONDSUP] or \*[EXTSUP] and turn off with \*[CONDSUPX]
2366\# and \*[EXTSUPX] respectively.
2367\#
2368.ds SUP \
2369\R'#PT_SIZE_IN_UNITS \En[.ps]'\
2370\R'#SUP_PT_SIZE \En[#PT_SIZE_IN_UNITS]u*6u/10u'\
465b256c 2371\s[\En[#PT_SIZE_IN_UNITS]u]\v'-.26m'\s[\En[#SUP_PT_SIZE]u]
92d0a6a6 2372\#
465b256c 2373.ds SUPX \s[\En[#PT_SIZE_IN_UNITS]u]\v'.26m'
92d0a6a6
JR
2374\#
2375.ds CONDSUP \
2376\R'#PT_SIZE_IN_UNITS \En[.ps]'\
2377\R'#SUP_PT_SIZE \En[#PT_SIZE_IN_UNITS]u*6u/10u'\
2378\s[\En[#PT_SIZE_IN_UNITS]u]\v'-.3m'\s[\En[#SUP_PT_SIZE]u]\E*[COND_FOR_SUP]
2379\#
2380.ds CONDSUPX \s[\En[#PT_SIZE_IN_UNITS]u]\v'.3m'\E*[COND]
2381\#
2382.ds EXTSUP \
2383\R'#PT_SIZE_IN_UNITS \En[.ps]'\
2384\R'#SUP_PT_SIZE \En[#PT_SIZE_IN_UNITS]u*6u/10u'\
2385\s[\En[#PT_SIZE_IN_UNITS]u]\v'-.3m'\s[\En[#SUP_PT_SIZE]u]\E*[EXT_FOR_SUP]
2386\#
2387.ds EXTSUPX \s[\En[#PT_SIZE_IN_UNITS]u]\v'.3m'\E*[EXT]
2388\#
2389\#
2390\# SLANT
2391\# -----
2392\#
2393\# SETSLANT
2394\# --------
2395\# *Arguments:
2396\# <number of degrees> | RESET
2397\# *Function:
2398\# Modifies register #DEGREES for use with \*[SLANT], or resets
2399\# it to the default. Defines string \*[SLANTX]
2400\# *Notes:
2401\# \*[SLANT] permits pseudo-italicizing of a font in cases where
2402\# no italic font exists in a particular family.
2403\#
2404\# Default # of degrees is 15.
2405\#
2406\# Do not use unit of measure with arg to SETSLANT.
2407\#
2408\# It may be necessary to adjust the spacing on either side of
2409\# [SLANT] and [SLANTX].
2410\#
2411\# In docs, SLANT carries over from para to para.
2412\#
2413.nr #DEGREES 15
2414.ds SLANT \ER'#SLANT_ON 1'\ES'\En[#DEGREES]'
2415.ds SLANTX \ER'#SLANT_ON 0'\ES'0'
2416\#
2417.MAC SETSLANT END
2418. ie '\\$1'RESET' \{\
2419. nr #DEGREES 15
2420. if \\n[#PRINT_STYLE]=1 \{\
2421. if \\n[#UNDERLINE_SLANT] \{ .return \}
2422. \}
2423. ds SLANT \ER'#SLANT_ON 1'\ES'\En[#DEGREES]'
2424. \}
2425. el \{\
2426. nr #DEGREES \\$1
2427. if \\n[#PRINT_STYLE]=1 \{\
2428. if \\n[#UNDERLINE_SLANT] \{ .return \}
2429. \}
2430. ds SLANT \ER'#SLANT_ON 1'\ES'\En[#DEGREES]'
2431. \}
2432. ds SLANTX \ER'#SLANT_ON 0'\ES'0'
2433.END
2434\#
2435\#
2436\# BOLDER
2437\# ------
2438\#
2439\# SETBOLDER
2440\# ---------
2441\# *Arguments:
2442\# <amount of emboldening> | RESET
2443\# *Function:
2444\# Modifies register #BOLDER_UNITS for use with \*[BOLDER], or resets
2445\# it to the default 700 units.
2446\# *Notes:
2447\# \*[BOLDER] allows pseudo-emboldening of a font where no bold
2448\# font exists in a particular family.
2449\#
2450\# Default for SETBOLDER is 700 units. Do not use unit of measure
2451\# with arg to SETBOLDER.
2452\#
2453.nr #BOLDER_UNITS 700
2454\#
2455.MAC SETBOLDER END
2456. if \\n[#IGNORE]=1 \{ .return \}
2457. ie '\\$1'RESET' \{ .nr #BOLDER_UNITS 700 \}
2458. el \{ .nr #BOLDER_UNITS \\$1 \}
2459.END
2460\#
2461\#
2462.MAC BOLDER END
2463\c
2464.bd \\n(.f \\n[#BOLDER_UNITS]
2465.END
2466\#
2467\#
2468.MAC BOLDERX END
2469\c
2470.bd \\n(.f
2471.END
2472\#
2473\# +++CONDENSE/EXTEND+++
2474\#
2475\# CONDENSE/EXTEND
2476\# ---------------
2477\# *Arguments:
2478\# <percentage to condense/expand type size>
2479\# *Function:
2480\# Stores current point size in z's in #PT_SIZE_IN_UNITS, figures out
2481\# new point size (for character width) from arg, and defines string
2482\# COND or EXT, which set the type size to the new character width,
2483\# and sets the height of type to the value stored in CURRENT_PT_SIZE
2484\# *Notes:
2485\# CONDENSE_OR_EXTEND is invoked from the aliases
2486\# CONDENSE and EXTEND. CONDENSE implies <100, EXTEND
2487\# implies >100. Do not use a percent sign in the argument.
2488\#
2489\# There is no default setting for CONDENSE or EXTEND.
2490\# 80 is a good approximation of condensed type, 120 is okay
2491\# for extended.
2492\#
2493\# The value set by CONDENSE or EXTEND applies to all
2494\# subsequent \*[COND] or \*[EXT] escapes until a new value is set.
2495\#
2496\# \*[COND] or \*[EXT] must be turned off before all changes of point
2497\# size and reinvoked afterwards (if so desired). This refers to
2498\# changes of point size via control lines AND with via inlines.
2499\#
2500.MAC CONDENSE_OR_EXTEND END
2501. if '\\$0'CONDENSE' \{\
2502. ds $COND_PERCENT \\$1
2503. if \\n[#PRINT_STYLE]=1 \{\
2504. rm $COND_PERCENT
2505. ds $COND_PERCENT 100
2506. \}
2507. ds COND \
2508\R'#PT_SIZE_IN_UNITS \En[.ps]'\
2509\R'#CONDENSE 1'\
2510\R'#COND_WIDTH (\En[#PT_SIZE_IN_UNITS]u*\E*[$COND_PERCENT]u)/100'\
2511\Es[\En[#COND_WIDTH]u]\EH'\En[#PT_SIZE_IN_UNITS]u'
2512. ds COND_FOR_SUP \
2513\R'#COND_WIDTH (\En[#SUP_PT_SIZE]u*\E*[$COND_PERCENT]u)/100'\
2514\Es[\En[#COND_WIDTH]u]\H'\En[#SUP_PT_SIZE]u'
2515. \}
2516. if '\\$0'EXTEND' \{\
2517. ds $EXT_PERCENT \\$1
2518. if \\n[#PRINT_STYLE]=1 \{\
2519. rm $EXT_PERCENT
2520. ds $EXT_PERCENT 100
2521. \}
2522. ds EXT \
2523\R'#PT_SIZE_IN_UNITS \En[.ps]'\
2524\R'#EXTEND 1'\
2525\R'#EXT_WIDTH (\En[#PT_SIZE_IN_UNITS]u*\E*[$EXT_PERCENT]u)/100'\
2526\Es[\En[#EXT_WIDTH]u]\EH'\En[#PT_SIZE_IN_UNITS]u'
2527. ds EXT_FOR_SUP \
2528\R'#EXT_WIDTH (\En[#SUP_PT_SIZE]u*\E*[$EXT_PERCENT]u)/100'\
2529\Es[\En[#EXT_WIDTH]u]\H'\En[#EXT_PT_SIZE]u'
2530. \}
2531.END
2532\#
2533.ds CONDX \ER'#CONDENSE 0'\Es0\R'#PT_SIZE_IN_UNITS \En[.ps]'\H'\En[#PT_SIZE_IN_UNITS]u'
2534.ds EXTX \ER'#EXTEND 0'\Es0\R'#PT_SIZE_IN_UNITS \En[.ps]'\H'\En[#PT_SIZE_IN_UNITS]u'
2535\#
2536\#
2537\# +++PAD LINES+++ (insert space)
2538\#
2539\# PAD MARKER
2540\# ----------
2541\# *Arguments:
2542\# <character to use for marking pad points>
2543\# *Function:
2544\# Defines string $PAD_MARKER, used in PAD
2545\# *Notes:
2546\# $PAD_MARKER is normally # (the pound sign).
2547\#
2548.MAC PAD_MARKER END
2549. ds $PAD_MARKER \\$1
2550.END
2551\#
2552\#
2553\# PAD
2554\# ---
2555\# *Argments:
2556\# "<string of text with padding markers inserted>"
2557\# *Function:
2558\# Defines and redefines padding character (default=pound sign
2559\# unless padding character has been set with PAD_MARKER)
2560\# several times so that when the string is output at the end
2561\# of the macro, every # has been converted to an equal-sized
2562\# amount of padding (blank space) on a line. # is equivalent to
2563\# CompuGraphic's old <IS>.
2564\# *Notes:
2565\# String tabs may be marked off during PAD.
2566\#
2567.MAC PAD END
2568. if \\n(.u=1 \{ .nr #FILL_MODE 1 \}
2569. nf
465b256c 2570. if !d$PAD_MARKER .ds $PAD_MARKER #
92d0a6a6
JR
2571. char \\*[$PAD_MARKER] \R'#PAD_COUNT \En[#PAD_COUNT]+1'
2572. ds $FAMILY_FOR_PAD \\n[.fam]
465b256c
JR
2573. fp \\n[.fp] \\n[.sty]
2574. ds $FONT_FOR_PAD \\*[$FONT]
92d0a6a6
JR
2575. nr #SIZE_FOR_PAD \\n[.ps]
2576. ds $PAD_STRING \\$1
2577. as $PAD_STRING \Ekp
2578. di PAD_STRING
2579. fam \\*[$FAMILY_FOR_PAD]
465b256c 2580\\f[\\*[$FONT_FOR_PAD]]\\s[\\n[#SIZE_FOR_PAD]u]\\*[$PAD_STRING]
92d0a6a6
JR
2581. br
2582. di
2583. char \\*[$PAD_MARKER] \R'#SPACE_TO_END \En(.l-\Enp'\R'#PAD_SPACE \En[#SPACE_TO_END]/\En[#PAD_COUNT]'
2584. di PAD_STRING
2585. fam \\*[$FAMILY_FOR_PAD]
465b256c 2586\\f]\\*[$FONT_FOR_PAD]]\\s[\\n[#SIZE_FOR_PAD]u]\\*[$PAD_STRING]
92d0a6a6
JR
2587. br
2588. di
2589. char \\*[$PAD_MARKER] \h'\En[#PAD_SPACE]u'
2590. ie \\n[#SILENT] \{\
2591. SILENT
2592. fam \\*[$FAMILY_FOR_PAD]
465b256c 2593\\f[\\*[$FONT_FOR_PAD]]\\s[\\n[#SIZE_FOR_PAD]u]\\*[$PAD_STRING]
92d0a6a6
JR
2594. br
2595. SILENT OFF
2596. \}
2597. el \{\
2598. fam \\*[$FAMILY_FOR_PAD]
465b256c 2599\\f[\\*[$FONT_FOR_PAD]]\\s[\\n[#SIZE_FOR_PAD]u]\\*[$PAD_STRING]
92d0a6a6
JR
2600. br
2601. \}
2602. if \\n[#FILL_MODE]=1 \{\
2603. fi
2604. rr #FILL_MODE
2605. \}
2606. rr #PAD_COUNT
2607. rr #SPACE_TO_END
2608. rr #PAD_SPACE
2609. rm $PAD_STRING
2610. rm PAD_STRING
2611. rchar #
465b256c
JR
2612. if '\\$2'NOBREAK' \{\
2613. TRAP OFF
2614. EOL
2615. TRAP
2616. \}
92d0a6a6
JR
2617.END
2618\#
2619\#
2620\# +++LEADERS+++
2621\#
4d3e9548
JL
2622\# The leader mechanism is primitive, but it works. Basically, every
2623\# macro in this set that includes a line length also sets a single
2624\# groff tab stop at the right hand end of the line. That way,
2625\# whenever Ctrl-A is invoked (always at the end of an input line),
2626\# leader of the correct length gets deposited. Ctrl-A is accessed by
2627\# the string LEADER (i.e. inline, as \*[LEADER]). Leaders within tabs
2628\# get their length from the tab line length.
92d0a6a6
JR
2629\#
2630\# SET LEADER CHARACTER
2631\# --------------------
2632\# *Arguments:
2633\# <character to use whenever \*[LEADER] is invoked>
2634\# *Function:
2635\# Set leader character.
2636\#
2637.MAC LEADER_CHARACTER END
2638. lc \\$1
2639.END
2640\#
2641.ds LEADER \ 1
2642\#
2643\# +++DROP CAPS+++
2644\#
2645\# DROP CAP FAMILY
2646\# ---------------
2647\# *Argument:
2648\# <family of drop cap>
2649\# *Function:
2650\# Creates or modifies string $DC_FAM.
2651\#
2652.MAC DROPCAP_FAMILY END
2653. ds $DC_FAM \\$1
2654.END
2655\#
2656\#
2657\# DROP CAP FONT
2658\# -------------
2659\# *Argument:
2660\# <font of drop cap>
2661\# *Function:
2662\# Creates or modifies string $DC_FT.
2663\#
2664.MAC DROPCAP_FONT END
2665. ds $DC_FT \\$1
2666.END
2667\#
2668\#
2669\# DROPCAP COLOR
2670\# -------------
2671\# *Arguments:
2672\# <pre-defined XCOLOR or NEWCOLOR>
2673\# *Function:
2674\# Defines string $DC_COLOR to argument.
2675\# *Notes:
2676\# User must define an XCOLOR or NEWCOLOR before using
2677\# DC_COLOR.
2678\#
2679.MAC DROPCAP_COLOR END
2680. if \\n[#PRINT_STYLE]=1 \{ .return \}
2681. nr #DC_COLOR 1
2682. ds $DC_COLOR \\$1
2683.END
2684\#
2685\#
2686\# DROP CAP GUTTER
2687\# ---------------
2688\# *Argument:
2689\# <width of gutter between drop cap and indented text>
2690\# *Function:
2691\# Creates or modifies register #DC_GUT.
2692\# *Notes:
2693\# Requires unit of measure. Default is 3p.
2694\#
2695.MAC DROPCAP_GUTTER END
2696. nr #DC_GUT (\\$1)
2697.END
2698\#
2699\#
2700\# DROP CAP ADJUST
2701\# ---------------
2702\# *Argument:
2703\# <+|- # of points to in/decrease point size of drop cap letter>
2704\# *Function:
2705\# Creates or modifies string $DC_ADJUST.
2706\# *Notes:
2707\# Despite its best efforts, DROPCAP doesn't always get the point
2708\# size of the drop cap critically perfect. DROPCAP_ADJUST lets
2709\# the user add or subtract points (or fractions of points) to
2710\# get the size right.
2711\#
2712\# Requires the + or - sign.
2713\#
2714.MAC DROPCAP_ADJUST END
2715. ds $DC_ADJUST \\$1
2716.END
2717\#
2718\#
2719\# DROP CAP
2720\# --------
2721\# *Arguments:
2722\# <dropcap letter> <# of lines> [COND <% to condense> | EXT <% to extend>]
2723\# *Function:
2724\# Calculates point size of dropcap based on # of lines passed as
2725\# arg 2. Sets indent for text based on dropcap width+gutter.
2726\# Advances and prints dropcap; reverses and prints indented text
2727\# to bottom of dropcap, then resets indent to left margin (plus
2728\# any indent that was in effect prior to invoking DROPCAP).
2729\# *Notes:
2730\# Drop caps put a strain on on resource-challenged systems.
2731\#
2732\# Drop caps when using the doc processing macro PP only work with
2733\# initial paragraphs (i.e. at doc start, or after heads), only when
2734\# DROPCAPS comes immediately after PP, and only when the PRINTSTYLE
2735\# is TYPESET. If these conditions aren't met, DROPCAPS is silently
2736\# ignored.
2737\#
2738\# The COND or EXT argument are processed separately from all
2739\# other COND or EXT inlines or macros, hence passing COND or
2740\# EXT has no effect on running type.
2741\#
2742.MAC DROPCAP END
4d3e9548
JL
2743. if \\n[#IGNORE]=1 \{\
2744. PRINT \\$1\c
2745. return
2746. \}
92d0a6a6 2747. br
4d3e9548
JL
2748. if n \{\
2749. PRINT \\$1\c
2750. return
2751. \}
92d0a6a6 2752. if \\n[#DOCS] \{\
4d3e9548
JL
2753. if \\n[#PRINT_STYLE]=1 \{\
2754. PRINT \\$1\c
2755. return
2756. \}
92d0a6a6 2757. if \\n[#PRINT_STYLE]=2 \{\
4d3e9548
JL
2758. if \\n[#PP_STYLE]=2 \{\
2759. PRINT \\$1\c
2760. return
2761. \}
2762. if \\n[#PP]>1 \{\
2763. PRINT \\$1\c
2764. return
2765. \}
92d0a6a6
JR
2766. ti 0
2767. \}
2768. \}
2769. ds $DROPCAP \\$1
2770. nr #DC_LINES \\$2-1
465b256c
JR
2771. if \\n[#CONDENSE]=1 \{\
2772. ds $RESTORE_COND \\*[$COND_PERCENT]
2773\\*[CONDX]
2774. nr #CONDENSE_WAS_ON 1
2775. \}
2776. if \\n[#EXTEND]=1 \{\
2777. ds $RESTORE_EXT \\*[$EXT_PERCENT]
2778\\*[EXTX]
2779. nr #EXTEND_WAS_ON 1
2780. \}
92d0a6a6
JR
2781. if '\\$3'COND' \{ .CONDENSE \\$4 \}
2782. if '\\$3'EXT' \{ .EXTEND \\$4 \}
2783. if !r#DC_GUT \{ .nr #DC_GUT (3p) \}
2784. ds $RESTORE_FAM \\n[.fam]
465b256c 2785. ds $RESTORE_FT \\*[$FONT]
92d0a6a6
JR
2786. nr #RESTORE_PT_SIZE \\n[#PT_SIZE]
2787. nr #RESTORE_INDENT \\n(.i
2788. SIZESPECS
2789. nr #DC_HEIGHT \\n[#DC_LINES]*\\n[#LEAD]+\\n[#CAP_HEIGHT]
2790. ie !d$DC_FAM \{ .FAM \\n[.fam] \}
2791. el \{ .FAM \\*[$DC_FAM] \}
465b256c 2792. ie !d$DC_FT \{ .FT \\*[$FONT] \}
92d0a6a6
JR
2793. el \{ .FT \\*[$DC_FT] \}
2794. while \\n[#GET_DC_HEIGHT]<\\n[#DC_HEIGHT] \{\
2795. ps \\n[#PT_SIZE]u+100u
2796. SIZESPECS
2797. nr #GET_DC_HEIGHT \\n[#CAP_HEIGHT]
465b256c 2798.\}
92d0a6a6
JR
2799. if d$DC_ADJUST \{ .ps \\*[$DC_ADJUST]p \}
2800. mk x
2801. sp \\n[#DC_LINES]v
4d3e9548 2802. if \\n[#DOCS]=1 \{ .SHIM \}
92d0a6a6
JR
2803. ie \\n[#DC_COLOR]=1 \{\
2804. ie !'\\$3'' \{\
2805. ie '\\$3'COND' \{ .PRINT \m[\\*[$DC_COLOR]]\\*[COND]\\*[$DROPCAP]\\*[CONDX]\m[] \}
2806. el \{ .PRINT \m[\\*[$DC_COLOR]]\\*[EXT]\\*[$DROPCAP]\\*[EXTX]\m[] \}
2807. \}
2808. el \{ .PRINT \m[\\*[$DC_COLOR]]\\*[$DROPCAP]\m[] \}
2809. \}
2810. el \{\
2811. ie !'\\$3'' \{\
2812. ie '\\$3'COND' \{ .PRINT \\*[COND]\\*[$DROPCAP]\\*[CONDX] \}
2813. el \{ .PRINT \\*[EXT]\\*[$DROPCAP]\\*[EXTX] \}
2814. \}
2815. el \{ .PRINT \m[\\*[$DC_COLOR]]\\*[$DROPCAP]\m[] \}
2816. \}
2817. if '\\$3'COND' \{ \E*[COND] \}
2818. if '\\$3'EXT' \{ \E*[EXT] \}
2819. ie \\n(.i \{ .in +\w'\\*[$DROPCAP]'u+\\n[#DC_GUT]u \}
465b256c 2820. el \{ .in \w'\\*[$DROPCAP]'u+\\n[#DC_GUT]u \}
92d0a6a6
JR
2821. if '\\$3'COND' \{ \E*[CONDX]\c \}
2822. if '\\$3'EXT' \{ \E*[EXTX]\c \}
2823. rt \\nxu
2824. FAM \\*[$RESTORE_FAM]
465b256c 2825. FT \\*[$RESTORE_FT]
92d0a6a6 2826. ps \\n[#RESTORE_PT_SIZE]u
465b256c
JR
2827. if \\n[#CONDENSE_WAS_ON] \{\
2828. CONDENSE \\*[$RESTORE_COND]
2829\\*[COND]\c
2830. \}
2831. if \\n[#EXTEND_WAS_ON] \{\
2832. EXTEND \\*[$RESTORE_EXT]
2833\\*[EXT]\c
2834. \}
92d0a6a6
JR
2835. ie \\n(.u \{ .wh \\n(.du+\\n[#DC_HEIGHT]u-1v DROPCAP_OFF \}
2836. el \{ .wh \\n(.du+\\n[#DC_HEIGHT]u DROPCAP_OFF \}
465b256c
JR
2837. rr #CONDENSE_WAS_ON
2838. rr #EXTEND_WAS_ON
92d0a6a6
JR
2839. rm $DROPCAP
2840. rr #DC_LINES
2841. rm $RESTORE_COND
2842. rm $RESTORE_EXT
2843. rm $RESTORE_FAM
465b256c 2844. rm $RESTORE_FT
92d0a6a6
JR
2845. rr #RESTORE_PT_SIZE
2846. rr #RESTORE_INDENT
2847. rr #DC_HEIGHT
2848. rr #GET_DC_HEIGHT
2849. rr x
2850.END
2851\#
2852.MAC DROPCAP_OFF END
2853' in \\n[#RESTORE_INDENT]u
2854.END
2855\#
4d3e9548
JL
2856\# =====================================================================
2857\#
2858\# +++GRAPHICAL OBJECTS+++
2859\#
2860\# HORIZONTAL RULE - DRH
2861\# ---------------------
2862\# *Arguments:
2863\# <none> | <rule weight> <indent> <length> [ <color> ]
2864\# *Function:
2865\# With no arg, draws a full measure rule. With args, draws
2866\# described horizontal rule.
2867\# *Notes:
2868\# Rules are drawn left-to-right, from the baseline down, and
2869\# return to their point of origin. Color must be set in the
2870\# macro; otherwise the color will be black, regardless of current
2871\# .gcolor. If no arg given, the rule weight is the one set by
2872\# RULE_WEIGHT.
2873\#
2874.MAC DRH END
2875. if \\n[.vpt]=1 \{\
2876. vpt 0
2877. nr #RESTORE_TRAP 1
2878. \}
2879. ie !\\n[#NO_ADVANCE]=1 \{ .br \}
2880. el \{\
2881. sp -1v
2882. rr #NO_ADVANCE
2883. \}
2884. ie \\n(.u=1 \{\
2885. nr #FILLED 1
2886. nr #FILL_MODE \\n(.j
2887. \}
2888. el \{\
2889. nr #NOFILL 1
2890. if \\n[.ce]>0 \{ .nr #NOFILL_MODE 3 \}
2891. if \\n[.rj]>0 \{ .nr #NOFILL_MODE 5 \}
2892. ce 0
2893. rj 0
2894. \}
2895. nf
2896. ds $RL_WEIGHT \\$1
2897. ds $RL_INDENT \\$2
2898. ds $RL_LENGTH \\$3
2899. ie !'\\$4'' \{\
2900. ds $RL_COLOR \\$4
2901. \}
2902. el \{\
2903. ds $RL_COLOR default
2904. \}
2905. nr #SAVED_WEIGHT \\n[#RULE_WEIGHT]
2906. nr #SAVED_WEIGHT_ADJ \\n[#RULE_WEIGHT_ADJ]
2907. di NULL
2908. if \\n[#NUM_ARGS]>=1 \{ .RULE_WEIGHT \\*[$RL_WEIGHT] \}
2909. di
2910. gcolor \\*[$RL_COLOR]
2911. ie \\n[#NUM_ARGS]=0 \{\
2912. ie \\n[#INDENT_ACTIVE] \{\
2913. nr #RESTORE_L_LENGTH \\n(.l
2914. if \\n[#INDENT_BOTH_ACTIVE] \{ .ll \\n(.lu-\\n[#BL_INDENT]u \}
2915. if \\n[#INDENT_LEFT_ACTIVE] \{ .ll \\n(.lu-\\n[#L_INDENT]u \}
2916\D't \\n[#RULE_WEIGHT]'\
2917\h'\\*[$RL_INDENT]-\\n[#RULE_WEIGHT]u'\
2918\v'\\n[#RULE_WEIGHT_ADJ]u'\
2919\D'l \En(.lu 0'\v'-\\n[#RULE_WEIGHT_ADJ]u'\
2920\v'-\\n[#RULE_WEIGHT_ADJ]u'\
2921\D't \\n[#SAVED_RULE_WEIGHT]'
2922. ll \\n[#RESTORE_L_LENGTH]u
2923. rr #RESTORE_L_LENGTH
2924. \}
2925. el \{\
2926\D't \\n[#RULE_WEIGHT]'\
2927\h'\\*[$RL_INDENT]-\\n[#RULE_WEIGHT]u'\
2928\v'\\n[#RULE_WEIGHT_ADJ]u'\
2929\D'l \En(.lu 0'\v'-\\n[#RULE_WEIGHT_ADJ]u'\
2930\v'-\\n[#RULE_WEIGHT_ADJ]u'\
2931\D't \\n[#SAVED_RULE_WEIGHT]'
2932. \}
2933. \}
2934. el \{\
2935\D't \\n[#RULE_WEIGHT]'\
2936\h'\\*[$RL_INDENT]-\\n[#RULE_WEIGHT]u'\
2937\v'\\n[#RULE_WEIGHT_ADJ]u'\
2938\D'l \\*[$RL_LENGTH] 0'\
2939\v'-\\n[#RULE_WEIGHT_ADJ]u'\
2940\D't \\n[#SAVED_RULE_WEIGHT]'
2941. \}
2942. if \\n[#FILLED]=1 \{\
2943. if \\n[#FILL_MODE]=0 \{ .QUAD LEFT \}
2944. if \\n[#FILL_MODE]=1 \{ .JUSTIFY \}
2945. if \\n[#FILL_MODE]=3 \{ .QUAD CENTER \}
2946. if \\n[#FILL_MODE]=5 \{ .QUAD RIGHT \}
2947. rr #FILLED
2948. \}
2949. sp -1v
2950. if \\n[#NOFILL]=1 \{\
2951. if \\n[#NOFILL_MODE]=3 \{ .CENTER \}
2952. if \\n[#NOFILL_MODE]=5 \{ .RIGHT \}
2953. \}
2954. gcolor
2955. nr #RULE_WEIGHT \\n[#SAVED_WEIGHT]
2956. nr #RULE_WEIGHT_ADJ \\n[#SAVED_WEIGHT_ADJ]
2957. rr #SAVED_WEIGHT
2958. rr #SAVED_WEIGHT_ADJ
2959. if \\n[#RESTORE_TRAP]=1 \{\
2960. vpt 1
2961. rr #RESTORE_TRAP
2962. \}
2963.END
2964\#
92d0a6a6
JR
2965\#
2966\# RULE
2967\# ----
2968\# *Argument:
2969\# <none>
2970\# *Function:
2971\# Draws a rule the length of the current measure.
2972\# *Notes:
4d3e9548
JL
2973\# A convenience macro. DRV does the same thing. Kept in for
2974\# backward compatibility.
92d0a6a6
JR
2975\#
2976.MAC RULE END
92d0a6a6 2977. if \\n(.u=1 \{\
4d3e9548 2978. nr #FILLED 1
92d0a6a6
JR
2979. ds $CURRENT_QUAD \\*[$QUAD_VALUE]
2980. nf
2981. \}
2982. ie \\n[#INDENT_ACTIVE] \{\
92d0a6a6
JR
2983. if \\n[#INDENT_BOTH_ACTIVE] \{ .ll \\n(.lu-\\n[#BL_INDENT]u \}
2984. if \\n[#INDENT_LEFT_ACTIVE] \{ .ll \\n(.lu-\\n[#L_INDENT]u \}
4d3e9548
JL
2985. PRINT \D't \\n[#RULE_WEIGHT]'\v'\\n[#RULE_WEIGHT_ADJ]u'\D'l \En(.lu 0'\v'-\\n[#RULE_WEIGHT_ADJ]u'\h'|0'\c
2986. ll
92d0a6a6
JR
2987. rr #RESTORE_L_LENGTH
2988. \}
2989. el \{\
4d3e9548 2990. PRINT \D't \\n[#RULE_WEIGHT]'\v'\\n[#RULE_WEIGHT_ADJ]u'\D'l \En(.lu 0'\v'-\\n[#RULE_WEIGHT_ADJ]u'\h'|0'\c
465b256c 2991. \}
4d3e9548 2992. if r#FILLED \{\
465b256c 2993. fi
4d3e9548 2994. rr #FILLED
465b256c
JR
2995. QUAD \\*[$CURRENT_QUAD]
2996. rm $CURRENT_QUAD
92d0a6a6 2997. \}
4d3e9548 2998. EOL
92d0a6a6
JR
2999.END
3000\#
92d0a6a6 3001\#
4d3e9548
JL
3002\# VERTICAL RULE - DRV
3003\# -------------------
3004\# *Arguments:
3005\# <rule weight> <indent> <depth> [ <color> ]
92d0a6a6 3006\# *Function:
4d3e9548 3007\# Draws described vertical rule.
92d0a6a6 3008\# *Notes:
4d3e9548
JL
3009\# Rules are drawn left-to-right, from the baseline down, and
3010\# return to their point of origin. Color must be set in the
3011\# macro; otherwise the color will be black, regardless of current
3012\# .gcolor.
92d0a6a6 3013\#
4d3e9548
JL
3014.MAC DRV END
3015. if \\n[.vpt]=1 \{\
3016. vpt 0
3017. nr #RESTORE_TRAP 1
3018. \}
3019. ie !\\n[#NO_ADVANCE]=1 \{ .br \}
92d0a6a6 3020. el \{\
4d3e9548
JL
3021. sp -1v
3022. rr #NO_ADVANCE
3023. \}
3024. ie \\n(.u=1 \{\
3025. nr #FILLED 1
3026. nr #FILL_MODE \\n(.j
3027. \}
3028. el \{\
3029. nr #NOFILL 1
3030. if \\n[.ce]>0 \{ .nr #NOFILL_MODE 3 \}
3031. if \\n[.rj]>0 \{ .nr #NOFILL_MODE 5 \}
3032. ce 0
3033. rj 0
3034. \}
3035. nf
3036. ds $RL_WEIGHT \\$1
3037. ds $RL_INDENT \\$2
3038. ds $RL_DEPTH \\$3
3039. ie !'\\$4'' \{\
3040. ds $RL_COLOR \\$4
3041. \}
3042. el \{\
3043. ds $RL_COLOR default
3044. \}
3045. nr #SAVED_WEIGHT \\n[#RULE_WEIGHT]
3046. nr #SAVED_WEIGHT_ADJ \\n[#RULE_WEIGHT_ADJ]
3047. di NULL
3048. RULE_WEIGHT \\*[$RL_WEIGHT]
3049. di
3050. gcolor \\*[$RL_COLOR]
3051\D't \\n[#RULE_WEIGHT]'\
3052\h'\\*[$RL_INDENT]-\\n[#RULE_WEIGHT_ADJ]u'\
3053\D'l 0 \\*[$RL_DEPTH]'\
3054\D't \\n[#SAVED_RULE_WEIGHT]'
3055. if \\n[#FILLED]=1 \{\
3056. if \\n[#FILL_MODE]=0 \{ .QUAD LEFT \}
3057. if \\n[#FILL_MODE]=1 \{ .JUSTIFY \}
3058. if \\n[#FILL_MODE]=3 \{ .QUAD CENTER \}
3059. if \\n[#FILL_MODE]=5 \{ .QUAD RIGHT \}
3060. rr #FILLED
3061. \}
3062. sp -1v
3063. if \\n[#NOFILL]=1 \{\
3064. if \\n[#NOFILL_MODE]=3 \{ .CENTER \}
3065. if \\n[#NOFILL_MODE]=5 \{ .RIGHT \}
3066. \}
3067. gcolor
3068. nr #RULE_WEIGHT \\n[#SAVED_WEIGHT]
3069. nr #RULE_WEIGHT_ADJ \\n[#SAVED_WEIGHT_ADJ]
3070. if \\n[#RESTORE_TRAP]=1 \{\
3071. vpt 1
3072. rr #RESTORE_TRAP
92d0a6a6
JR
3073. \}
3074.END
3075\#
4d3e9548
JL
3076\# BOXES - DBX
3077\# -----------
3078\# *Arguments:
3079\# <rule weight | SOLID> <indent> <length> <depth> [ <color> ]
92d0a6a6 3080\# *Function:
4d3e9548 3081\# Draws described box.
92d0a6a6 3082\# *Notes:
4d3e9548
JL
3083\# Boxes are drawn left-to-right, from the baseline down, and
3084\# return to their point of origin. Box rules are drawn from the
3085\# perimeter inwards. Color must be set in the macro; otherwise
3086\# the color will be black, regardless of current .gcolor. If no
3087\# arg given, the rule weight is the one set by RULE_WEIGHT.
3088\#
3089.MAC DBX END
3090. if \\n[.vpt]=1 \{\
3091. vpt 0
3092. nr #RESTORE_TRAP 1
3093. \}
3094. ie !\\n[#NO_ADVANCE]=1 \{ .br \}
92d0a6a6 3095. el \{\
4d3e9548
JL
3096. sp -1v
3097. rr #NO_ADVANCE
3098. \}
3099. ie \\n(.u=1 \{\
3100. nr #FILLED 1
3101. nr #FILL_MODE \\n(.j
3102. \}
3103. el \{\
3104. nr #NOFILL 1
3105. if \\n[.ce]>0 \{ .nr #NOFILL_MODE 3 \}
3106. if \\n[.rj]>0 \{ .nr #NOFILL_MODE 5 \}
3107. ce 0
3108. rj 0
3109. \}
3110. nf
3111. ie '\\$1'SOLID' \{\
3112. nr #BX_SOLID 1
3113. \}
3114. el \{\
3115. ds $BX_WEIGHT \\$1
3116. \}
3117. ds $BX_INDENT \\$2
3118. ds $BX_WIDTH \\$3
3119. ds $BX_DEPTH \\$4
3120. ie !'\\$5'' \{\
3121. ie d$\\$5_FILL \{\
3122. ds $BX_COLOR \\*[$\\$5_FILL]
3123. \}
92d0a6a6 3124. el \{\
4d3e9548 3125. ds $BX_COLOR \\$5
92d0a6a6
JR
3126. \}
3127. \}
4d3e9548
JL
3128. el \{\
3129. ds $BX_COLOR default
3130. \}
3131. nr #SAVED_WEIGHT \\n[#RULE_WEIGHT]
3132. nr #SAVED_WEIGHT_ADJ \\n[#WEIGHT_ADJ]
3133. if !'\\$1'SOLID' \{\
3134. di NULL
3135. RULE_WEIGHT \\*[$BX_WEIGHT]
3136. di
3137. \}
3138. ds $BX_INDENT \\*[$BX_INDENT]-\\n[#WEIGHT_ADJ]u
3139. ie \\n[#BX_SOLID]=1 \{\
3140. fcolor \\*[$BX_COLOR]
3141\h'\\*[$BX_INDENT]'\
3142\D'P \\*[$BX_WIDTH] 0 0 \\*[$BX_DEPTH] -\\*[$BX_WIDTH] 0 0 -\\*[$BX_DEPTH]'
3143. fcolor
3144. rr #BX_SOLID
3145. \}
3146. el \{\
3147. gcolor \\*[$BX_COLOR]
3148\D't \\n[#RULE_WEIGHT]'\
3149\h'\\*[$BX_INDENT]'\
3150\v'\\n[#WEIGHT_ADJ]u'\
3151\D'p \\*[$BX_WIDTH]-\\n[#RULE_WEIGHT]u 0 0 \\*[$BX_DEPTH]-\\n[#RULE_WEIGHT]u -\\*[$BX_WIDTH]+\\n[#RULE_WEIGHT]u 0 0 -\\*[$BX_DEPTH]+\\n[#RULE_WEIGHT]u'\
3152\v'-\\n[#WEIGHT_ADJ]u'\
3153\D't \\n[#SAVED_RULE_WEIGHT]'
3154. gcolor
3155. \}
3156. sp -1v
3157. if \\n[#FILLED]=1 \{\
3158. if \\n[#FILL_MODE]=0 \{ .QUAD LEFT \}
3159. if \\n[#FILL_MODE]=1 \{ .JUSTIFY \}
3160. if \\n[#FILL_MODE]=3 \{ .QUAD CENTER \}
3161. if \\n[#FILL_MODE]=5 \{ .QUAD RIGHT \}
3162. rr #FILLED
3163. \}
3164. if \\n[#NOFILL]=1 \{\
3165. if \\n[#NOFILL_MODE]=3 \{ .CENTER \}
3166. if \\n[#NOFILL_MODE]=5 \{ .RIGHT \}
3167. \}
3168. nr #RULE_WEIGHT \\n[#SAVED_WEIGHT]
3169. nr #WEIGHT_ADJ \\n[#SAVED_WEIGHT_ADJ]
3170. rr #SAVED_WEIGHT
3171. rr #SAVED_WEIGHT_ADJ
3172. if \\n[#RESTORE_TRAP]=1 \{\
3173. vpt 1
3174. rr #RESTORE_TRAP
3175. \}
3176.END
3177\#
3178\#
3179\# ELLIPSES - DCL
3180\# --------------
3181\# *Arguments:
3182\# <rule weight | SOLID> <indent> <width> <depth> [ <color> ]
3183\# *Function:
3184\# Draws described ellipses.
3185\# *Notes:
3186\# Ellipses (circles) are drawn left-to-right, from the baseline
3187\# down, and return to their point of origin. Ellipse rules are
3188\# drawn from the perimeter inwards. Color must be set in the
3189\# macro; otherwise the color will be black, regardless of current
3190\# .gcolor. If no arg given, the rule weight is the one set by
3191\# RULE_WEIGHT.
3192\#
3193.MAC DCL END
3194. if \\n[.vpt]=1 \{\
3195. vpt 0
3196. nr #RESTORE_TRAP 1
3197. \}
3198. ie !\\n[#NO_ADVANCE]=1 \{ .br \}
3199. el \{\
3200. sp -1v
3201. rr #NO_ADVANCE
3202. \}
3203. ie \\n(.u=1 \{\
3204. nr #FILLED 1
3205. nr #FILL_MODE \\n(.j
3206. \}
3207. el \{\
3208. nr #NOFILL 1
3209. if \\n[.ce]>0 \{ .nr #NOFILL_MODE 3 \}
3210. if \\n[.rj]>0 \{ .nr #NOFILL_MODE 5 \}
3211. ce 0
3212. rj 0
3213. \}
3214. nf
3215. ie '\\$1'SOLID' \{\
3216. nr #CL_SOLID 1
3217. \}
3218. el \{\
3219. ds $CL_WEIGHT \\$1
3220. \}
3221. ds $CL_INDENT \\$2
3222. ds $CL_WIDTH \\$3
3223. ds $CL_DEPTH \\$4
3224. ie !'\\$5'' \{\
3225. ie d$\\$5_FILL \{\
3226. ds $CL_COLOR \\*[$\\$5_FILL]
3227. \}
3228. el \{\
3229. ds $CL_COLOR \\$5
3230. \}
3231. \}
3232. el \{\
3233. ds $CL_COLOR default
3234. \}
3235. nr #SAVED_WEIGHT \\n[#RULE_WEIGHT]
3236. nr #SAVED_WEIGHT_ADJ \\n[#WEIGHT_ADJ]
3237. if !'\\$1'SOLID' \{\
3238. di NULL
3239. RULE_WEIGHT \\*[$CL_WEIGHT]
3240. di
3241. \}
3242. ds $CL_INDENT \\*[$CL_INDENT]-\\n[#WEIGHT_ADJ]u
3243. ie \\n[#CL_SOLID]=1 \{\
3244. fcolor \\*[$CL_COLOR]
3245\h'\\*[$CL_INDENT]'\
3246\v'\\*[$CL_DEPTH]/2u'\
3247\D'E \\*[$CL_WIDTH]-\\n[#RULE_WEIGHT]u \\*[$CL_DEPTH]-\\n[#RULE_WEIGHT]u'\
3248\v'-\\*[$CL_DEPTH]/2u'
3249. fcolor
3250. rr #CL_SOLID
3251. \}
3252. el \{\
3253. gcolor \\*[$CL_COLOR]
3254\D't \\n[#RULE_WEIGHT]'\
3255\h'\\*[$CL_INDENT]'\
3256\v'\\*[$CL_DEPTH]/2u'\
3257\D'e \\*[$CL_WIDTH]-\\n[#RULE_WEIGHT]u \\*[$CL_DEPTH]-\\n[#RULE_WEIGHT]u'\
3258\v'-(\\*[$CL_DEPTH]/2u)'\
3259\D't \\n[#SAVED_RULE_WEIGHT]'
3260. gcolor
3261. \}
3262. sp -1v
3263. if \\n[#FILLED]=1 \{\
3264. if \\n[#FILL_MODE]=0 \{ .QUAD LEFT \}
3265. if \\n[#FILL_MODE]=1 \{ .JUSTIFY \}
3266. if \\n[#FILL_MODE]=3 \{ .QUAD CENTER \}
3267. if \\n[#FILL_MODE]=5 \{ .QUAD RIGHT \}
3268. rr #FILLED
3269. \}
3270. if \\n[#NOFILL]=1 \{\
3271. if \\n[#NOFILL_MODE]=3 \{ .CENTER \}
3272. if \\n[#NOFILL_MODE]=5 \{ .RIGHT \}
3273. \}
3274. nr #RULE_WEIGHT \\n[#SAVED_WEIGHT]
3275. nr #WEIGHT_ADJ \\n[#SAVED_WEIGHT_ADJ]
3276. rr #SAVED_WEIGHT
3277. rr #SAVED_WEIGHT_ADJ
3278. if \\n[#RESTORE_TRAP]=1 \{\
3279. vpt 1
3280. rr #RESTORE_TRAP
3281. \}
3282.END
3283\#
3284\#
3285\# RULE WEIGHT
3286\# -----------
3287\# *Argument:
3288\# <weight of rules in points>
3289\# *Function:
3290\# Sets \D't <n>' to the correct number of machine units for the
3291\# argument given in points.
3292\# *Notes:
3293\# Decimal fractions are allowed. Rule weight must be > 100.
3294\#
3295.MAC RULE_WEIGHT END
3296. di NULL \" Diverted so there's no problem with breaks, spacing, etc.
3297. ds $ARG \\$1
3298. substring $ARG -1
3299. if !\B'\\*[$ARG]' \{\
3300. tm1 "[mom]: The argument to \\$0 must not have a unit of measure appended.
3301. ab Aborting at \\$0, line \\n[.c].
3302. \}
3303. length #STR_LENGTH \\$1
3304. ds $ARG \\$1
3305. substring $ARG 0 0
3306. ie '\\*[$ARG]'.' \{\
3307. ds $ARG \\$1
3308. substring $ARG 1 \\n[#STR_LENGTH]-1
3309. nr #WEIGHT \\*[$ARG]*100
3310. if (\\n[#WEIGHT]>=1000) \{\
3311. while (\\n[#WEIGHT]>=1000) \{\
3312. nr #WEIGHT \\n[#WEIGHT]/10
3313. \}
3314 \}
3315. \}
3316. el \{\
3317. ds $ARG \\$1
3318. substring $ARG 1 1
3319. ie '\\*[$ARG]'.' \{\
3320. ds $LHS \\$1
3321. substring $LHS 0 0
3322. ds $RHS \\$1
3323. substring $RHS 2
3324. nr #WEIGHT \\*[$LHS]\\*[$RHS]*100
3325. if (\\n[#WEIGHT]>=10000) \{\
3326. while (\\n[#WEIGHT]>=10000) \{\
3327. nr #WEIGHT \\n[#WEIGHT]/10
3328. \}
3329. \}
3330. \}
3331. el \{\
3332. ie \\n[#STR_LENGTH]<=2 \{\
3333. nr #WEIGHT \\$1*1000
3334. \}
3335. el \{\
3336. ds $ARG \\$1
3337. substring $ARG 2 2
3338. ie !'\\*[$ARG]'.' \{\
3339. tm1 "[mom]: Invalid argument given to macro \\$0 at line \\n[.c].
3340. tm1 " Rule weight must be > 100 points.
3341. tm1 " Falling back to default weight .5 points.
3342. nr #WEIGHT 500
3343. \}
3344. el \{\
3345. ds $LHS \\$1
3346. substring $LHS 0 1
3347. ds $RHS \\$1
3348. substring $RHS 3
3349. nr #WEIGHT \\*[$LHS]\\*[$RHS]*1000
3350. if (\\n[#WEIGHT]>=100000) \{\
3351. while (\\n[#WEIGHT]>=100000) \{\
3352. nr #WEIGHT \\n[#WEIGHT]/10
3353. \}
3354. \}
3355. \}
3356. \}
3357. \}
3358. \}
3359. nr #WEIGHT_ADJ \\n[#WEIGHT]/2
3360. if '\\$0'BIBLIOGRAPHY_STRING_UNDERLINE_WEIGHT' \{\
3361. nr #BIB_STRING_UNDERLINE_WEIGHT \\n[#WEIGHT]
3362. nr #BIB_STRING_UNDERLINE_WEIGHT_ADJ \\n[#WEIGHT_ADJ]
3363. \}
3364. if '\\$0'COVER_UNDERLINE_WEIGHT' \{\
3365. nr #COVER_UNDERLINE_WEIGHT \\n[#WEIGHT]
3366. nr #COVER_UNDERLINE_WEIGHT_ADJ \\n[#WEIGHT_ADJ]
3367. \}
3368. if '\\$0'DOCCOVER_UNDERLINE_WEIGHT' \{\
3369. nr #DOCCOVER_UNDERLINE_WEIGHT \\n[#WEIGHT]
3370. nr #DOCCOVER_UNDERLINE_WEIGHT_ADJ \\n[#WEIGHT_ADJ]
3371. \}
3372. if '\\$0'DOCTYPE_UNDERLINE_WEIGHT' \{\
3373. nr #DOCTYPE_UNDERLINE_WEIGHT \\n[#WEIGHT]
3374. nr #DOCTYPE_UNDERLINE_WEIGHT_ADJ \\n[#WEIGHT_ADJ]
3375. \}
3376. if '\\$0'ENDNOTE_STRING_UNDERLINE_WEIGHT' \{\
3377. nr #EN_STRING_UNDERLINE_WEIGHT \\n[#WEIGHT]
3378. nr #EN_STRING_UNDERLINE_WEIGHT_ADJ \\n[#WEIGHT_ADJ]
3379. \}
3380. if '\\$0'ENDNOTE_TITLE_UNDERLINE_WEIGHT' \{\
3381. nr #EN_TITLE_UNDERLINE_WEIGHT \\n[#WEIGHT]
3382. nr #EN_TITLE_UNDERLINE_WEIGHT_ADJ \\n[#WEIGHT_ADJ]
3383. \}
3384. if '\\$0'FOOTER_RULE_WEIGHT' \{\
3385. nr #FOOTER_RULE_WEIGHT \\n[#WEIGHT]
3386. nr #FOOTER_RULE_WEIGHT_ADJ \\n[#WEIGHT_ADJ]
3387. \}
3388. if '\\$0'FOOTNOTE_RULE_WEIGHT' \{\
3389. nr #FN_RULE_WEIGHT \\n[#WEIGHT]
3390. nr #FN_RULE_WEIGHT_ADJ \\n[#WEIGHT_ADJ]
3391. \}
3392. if '\\$0'HEAD_UNDERLINE_WEIGHT' \{\
3393. nr #HEAD_UNDERLINE_WEIGHT \\n[#WEIGHT]
3394. nr #HEAD_UNDERLINE_WEIGHT_ADJ \\n[#WEIGHT_ADJ]
3395. \}
3396. if '\\$0'HEADER_RULE_WEIGHT' \{\
3397. nr #HEADER_RULE_WEIGHT \\n[#WEIGHT]
3398. nr #HEADER_RULE_WEIGHT_ADJ \\n[#WEIGHT_ADJ]
3399. \}
3400. if '\\$0'RULE_WEIGHT' \{\
3401. nr #RULE_WEIGHT \\n[#WEIGHT]
3402. nr #RULE_WEIGHT_ADJ \\n[#WEIGHT_ADJ]
3403. \}
3404. if '\\$0'UNDERSCORE_WEIGHT' \{\
3405. nr #UNDERSCORE_WEIGHT \\n[#WEIGHT]
3406. nr #UNDERSCORE_WEIGHT_ADJ \\n[#WEIGHT_ADJ]
3407. \}
3408. di
3409.END
3410\#
3411\# Aliases
3412\# ~~~~~~~
3413.ALIAS BIBLIOGRAPHY_STRING_UNDERLINE_WEIGHT RULE_WEIGHT
3414.ALIAS COVER_UNDERLINE_WEIGHT RULE_WEIGHT
3415.ALIAS DOCCOVER_UNDERLINE_WEIGHT RULE_WEIGHT
3416.ALIAS DOCTYPE_UNDERLINE_WEIGHT RULE_WEIGHT
3417.ALIAS ENDNOTE_STRING_UNDERLINE_WEIGHT RULE_WEIGHT
3418.ALIAS ENDNOTE_TITLE_UNDERLINE_WEIGHT RULE_WEIGHT
3419.ALIAS FOOTER_RULE_WEIGHT RULE_WEIGHT
3420.ALIAS FOOTNOTE_RULE_WEIGHT RULE_WEIGHT
3421.ALIAS HEAD_UNDERLINE_WEIGHT RULE_WEIGHT
3422.ALIAS HEADER_RULE_WEIGHT RULE_WEIGHT
3423.ALIAS UNDERSCORE_WEIGHT RULE_WEIGHT
3424\#
3425\# Default rule weights
3426\# ~~~~~~~~~~~~~~~~~~~~
3427.nr #BIB_STRING_UNDERLINE_WEIGHT 500
3428.nr #COVER_UNDERLINE_WEIGHT 500
3429.nr #DOCCOVER_UNDERLINE_WEIGHT 500
3430.nr #DOCTYPE_UNDERLINE_WEIGHT 500
3431.nr #EN_STRING_UNDERLINE_WEIGHT 500
3432.nr #EN_TITLE_UNDERLINE_WEIGHT 500
3433.nr #FN_RULE_WEIGHT 500
3434.nr #FOOTER_RULE_WEIGHT 500
3435.nr #HEAD_UNDERLINE_WEIGHT 500
3436.nr #HEADER_RULE_WEIGHT 500
3437.nr #RULE_WEIGHT 500
3438.nr #UNDERSCORE_WEIGHT 500
3439\#
3440.nr #BIB_STRING_UNDERLINE_WEIGHT_ADJ \\n[#BIB_STRING_UNDERLINE_WEIGHT]/2
3441.nr #COVER_UNDERLINE_WEIGHT_ADJ \\n[#DOCTYPE_UNDERLINE_WEIGHT]/2
3442.nr #DOCCOVER_UNDERLINE_WEIGHT_ADJ \\n[#DOCTYPE_RULE_WEIGHT]/2
3443.nr #DOCTYPE_UNDERLINE_WEIGHT_ADJ \\n[#DOCTYPE_RULE_WEIGHT]/2
3444.nr #EN_STRING_UNDERLINE_WEIGHT_ADJ \\n[#EN_STRING_UNDERLINE_WEIGHT]/2
3445.nr #EN_TITLE_UNDERLINE_WEIGHT_ADJ \\n[#EN_STRING_UNDERLINE_WEIGHT]/2
3446.nr #FOOTER_RULE_WEIGHT_ADJ \\n[#FOOTER_RULE_WEIGHT]/2
3447.nr #FN_RULE_WEIGHT_ADJ \\n[#FN_RULE_WEIGHT]/2
3448.nr #HEAD_UNDERLINE_WEIGHT_ADJ \\n[#HEAD_UNDERLINE_WEIGHT]/2
3449.nr #HEADER_RULE_WEIGHT_ADJ \\n[#HEADER_RULE_WEIGHT]/2
3450.nr #RULE_WEIGHT_ADJ \\n[#RULE_WEIGHT]/2
3451.nr #UNDERSCORE_WEIGHT_ADJ \\n[#UNDERSCORE_WEIGHT]/2
3452\#
3453\# Set default rule weight
3454\#
3455.di NULL
3456\D't 500'
3457.di
3458\#
3459\# =====================================================================
3460\#
3461\# +++WORD AND SENTENCE SPACING+++
3462\#
3463\# WORD SPACE CONTROL
3464\# ------------------
3465\# *Argument:
3466\# <+|->wordspace | DEFAULT
3467\# *Function:
3468\# Increases or decreases interword space by user supplied amount.
3469\# If DEFAULT, value is set to 12 (groff default).
3470\# *Notes:
3471\# $WS_CONSTANT is the groff default word space.
3472\# $WS_VAR is the user supplied amount by which to in/decrease word space.
3473\# $WS is a concatenation of WS_CONSTANT and WS_VAR.
3474\#
3475\# Because the user supplied value requires a literal + or - sign,
3476\# the macro argument is stored in a string.
3477\#
3478\# \n[.sss] holds the current sentence space value.
3479\#
3480.MAC WS END
3481. ds $WS_CONSTANT 12
3482. ds $WS_VAR \\$1
3483. ie '\\$1'DEFAULT' .ds $WS_VAR +0
3484. el .ds $WS (\\*[$WS_CONSTANT]\\*[$WS_VAR])
3485. ie \\n[.sss]=12 \{ .ss \\*[$WS] 12 \}
3486. el \{\
3487. ss \\*[$WS] (\\*[$WS]\\*[$SS_VAR])
3488. SS \\*[$SS_VAR]
3489. \}
3490.END
3491\#
3492\#
3493\# SENTENCE SPACE CONTROL
3494\# ----------------------
3495\# *Argument:
3496\# <+-sentencespace> | 0 | DEFAULT
3497\# *Function:
3498\# Increases or decreases sentence space by user supplied amount.
3499\# If 0, sentence spaces are ignored. If DEFAULT, value is
3500\# set to 12 (groff default).
3501\# *Notes:
3502\# Because the user supplied value requires a literal + or - sign,
3503\# the macro argument is stored in a string.
3504\#
3505\# Sentence space applies only to input where sentences are separated
3506\# by two spaces (and/or, in fill mode [FLUSH L|R|C or JUSTIFY], an EOL).
3507\# Changing .SS when sentences are separated by only one space has
3508\# no effect on the space between sentences.
3509\#
3510\# \n[.ss] holds the current wordspace value.
3511\# \n[.sss] holds the current sentence space value.
3512\#
3513.MAC SS END
3514. ie '\\$1'0' \{ .ss \\n[.ss] (\\n[.ss]-\\n[.ss]) \}
3515. el \{\
3516. ie '\\$1'DEFAULT' \{ .ss \\n[.ss] \}
3517. el \{\
3518. ds $SS_VAR \\$1
3519. ss \\n[.ss] (0\\*[$SS_VAR])
3520. \}
3521. \}
3522.END
3523\#
3524\#
3525\# =====================================================================
3526\#
3527\# +++INDENTS+++
3528\#
3529\# There are five styles of indents: left, right, both, temporary,
3530\# and hanging. Each is set/invoked with a different macro.
3531\# Indent macros begin with the letter "I", hence .IL means "indent left,"
3532\# .IR means "indent right," and so on.
3533\#
3534\# The first time any of the indent macros is used, it requires an
3535\# argument--the size of the indent (with a unit of measure). The
3536\# size may also be entered using the \w escape--very useful
3537\# for numbered lists using HI. The unit of measure is required.
3538\# Subsequent invocations don't require the argument; the indent
3539\# measure remains the same until it's changed by invoking the macro
3540\# with an argument again.
3541\#
3542\# If no indents are in effect, the arguments passed to indent macros are
3543\# measured from the left and right margins of the page. If a left indent
3544\# or a right indent is already in effect, the arguments passed to
3545\# the indent macros are calculated from the current values; in other words,
3546\# the arguments are additive. If you quit an indent and later return
3547\# to it, its value will be the value last in effect, unless you pass
3548\# it an argument. If you do pass an argument, it is added to the last
3549\# value in effect, unless you cleared the indent with one of
3550\# .I<LRB>X/Q macros.
3551\#
3552\# Example
3553\# -------
3554\#
3555\# .IL 2P
3556\# ...some text...
3557\# .IL 2P
3558\# ...some text...
3559\# .IQ
3560\# ...some text...
3561\# .IL
3562\# ...some text...
3563\#
3564\# The first .IL 2P indents text 2P from the left margin. The second
3565\# .IL 2P indents text by an additional 2P, i.e. 4P from the left margin.
3566\# .IQ turns the indent off. The last .IL (which has no argument)
3567\# takes its value from the total of all arguments passed to .IL (in
3568\# this case, 2P and 2P), therefore it indents 2P+2P from the left
3569\# margin, i.e. 4P. If you wanted the last .IL to indent just 2P,
3570\# you'd either have to reset the .IL prior to .IQ (.IL -2P), or pass
3571\# the last .IL the argument 2P.
3572\#
3573\# To reverse the sense of an indent added to an indent, you may use
3574\# negative values.
3575\#
3576\# Indents can be turned off individually with ILX, IRX, and IBX.
3577\# LEFT and RIGHT indents may be combined and manipulated
3578\# separately, (e.g. you can have an IL of 2P and an IR of 4P
3579\# operative at the same time, and then change, say, the IL to
3580\# 4P--thereby left indenting 6P--while the IR remains at 4P.
3581\#
3582\# IB automatically turns off IL and IR. They have to be reinvoked
3583\# again when needed. IL and IR automatically turn IB off; it, too,
3584\# has to be reinvoked with needed.
3585\#
3586\# All indents can be turned off at once with IQ. The ILX, IRX, IBX,
3587\# and IQ macros simply turn the indents off; the values stored in
3588\# the respective indent macros (IL, IR, IB) remain in effect. If
3589\# the user wishes to clear the values, the I<LRB>X macros should be
3590\# invoked with the single argument CLEAR. IQ CLEAR clears out
3591\# the values stored for all indent styles.
3592\#
3593\# Indents *must* be turned off before settting string tabs
3594\# inside PAD. Generally, in order not to get confused, it's a
3595\# good idea to turn all indents off before setting any tabs.
3596\#
3597\# TI and HI are special cases. There's no need to turn them off,
3598\# since they affect only one line--the first after their
3599\# invocation. Like the other indent styles, the first time
3600\# they're invoked, they require a value in iPpcm; each subsequent
3601\# invocation without an argument will use the same value. To
3602\# change the value, simply pass a new value. Values for TI and HI
3603\# are *not* additive.
3604\#
3605\# HI presupposes that you already have a left or both indent on.
3606\# HI will never hang a line outside the left margin of a document
3607\# or column. In other words, you must have IL or IB on before you
3608\# can use HI.
92d0a6a6
JR
3609\#
3610\# INDENT LEFT
3611\# -----------
3612\#
3613.MAC IL END
3614. if \\n[#INDENT_STYLE_BOTH] \{ .IBX \}
3615. nr #INDENT_STYLE_LEFT 1
3616. nr #INDENT_ACTIVE 1
3617. nr #INDENT_LEFT_ACTIVE 1
3618. ie '\\$1'' \{\
3619. br
3620. in \\n[#L_INDENT]u
3621. ta \\n(.lu-\\n[#L_INDENT]u
3622. \}
3623. el \{\
3624. br
3625. nr #L_INDENT +(\\$1)
3626. in \\n[#L_INDENT]u
3627. ta \\n(.lu-\\n[#L_INDENT]u
3628. \}
3629.END
3630\#
3631\#
3632\# +++INDENT RIGHT+++
3633\#
3634.MAC IR END
3635. if \\n[#INDENT_STYLE_BOTH] \{ .IBX \}
3636. nr #INDENT_STYLE_RIGHT 1
3637. nr #INDENT_ACTIVE 1
3638. nr #INDENT_RIGHT_ACTIVE 1
3639. ie '\\$1'' \{\
3640. br
3641. ie \\n[#TAB_ACTIVE] \{\
3642. ll \\n(.lu-\\n[#R_INDENT]u
3643. ta \\n(.lu-\\n[#L_INDENT]u
3644. \}
3645. el \{\
3646. ll \\n[#L_LENGTH]u-\\n[#R_INDENT]u
3647. ta \\n(.lu-\\n[#L_INDENT]u
3648. \}
3649. \}
3650. el \{\
3651. br
3652. nr #R_INDENT +(\\$1)
3653. ie \\n[#TAB_ACTIVE] \{\
3654. ll \\n(.lu-\\n[#R_INDENT]u
3655. ta \\n(.lu-\\n[#L_INDENT]u
3656. \}
3657. el \{\
3658. ll \\n[#L_LENGTH]u-\\n[#R_INDENT]u
3659. ta \\n(.lu-\\n[#L_INDENT]u
3660. \}
3661. \}
3662.END
3663\#
3664\#
3665\# +++INDENT BOTH+++
3666\#
3667.MAC IB END
3668. if \\n[#INDENT_STYLE_LEFT] \{ .ILX \}
3669. if \\n[#INDENT_STYLE_RIGHT] \{ .IRX \}
3670. nr #INDENT_STYLE_BOTH 1
3671. nr #INDENT_ACTIVE 1
3672. nr #INDENT_BOTH_ACTIVE 1
3673. ie '\\$1'' \{\
3674. br
3675. in \\n[#BL_INDENT]u
3676. ie \\n[#TAB_ACTIVE] \{\
3677. ll \\n(.lu-\\n[#BR_INDENT]u
3678. ta \\n(.lu-\\n[#BR_INDENT]u
3679. \}
3680. el \{\
3681. ll \\n[#L_LENGTH]u-\\n[#BR_INDENT]u
3682. ta \\n(.lu-\\n[#BR_INDENT]u
3683. \}
3684. \}
3685. el \{\
3686. br
3687. nr #BL_INDENT (\\n[#INDENT]+\\$1)
3688. ie \\n[#NUM_ARGS]=2 \{ .nr #BR_INDENT +(\\$2) \}
3689. el \{ .nr #BR_INDENT \\n[#BL_INDENT] \}
3690. ie \\n[#TAB_ACTIVE] \{\
3691. in \\n[#BL_INDENT]u
3692. ll \\n(.lu-\\n[#BR_INDENT]u
3693. ta \\n(.lu-\\n[#BL_INDENT]u
3694. \}
3695. el \{\
3696. in \\n[#BL_INDENT]u
3697. ll \\n[#L_LENGTH]u-\\n[#BR_INDENT]u
3698. ta \\n(.lu-\\n[#BR_INDENT]u
3699. \}
3700. \}
3701.END
3702\#
3703\#
3704\# +++TEMPORARY INDENT+++
3705\#
3706.MAC TI END
3707. br
3708. ie '\\$1'' \{\
3709. ti \\n[#T_INDENT]u
3710. if \\n[#INDENT_LEFT_ACTIVE] \{\
3711. ti \\n[#T_INDENT]u+\\n[#L_INDENT]u
3712. \}
3713. if \\n[#INDENT_BOTH_ACTIVE] \{\
3714. ti \\n[#T_INDENT]u+\\n[#BL_INDENT]u
3715. \}
3716. \}
3717. el \{\
3718. nr #T_INDENT (\\$1)
3719. ti \\n[#T_INDENT]u
3720. \}
3721.END
3722\#
3723\#
3724\# +++HANGING INDENT+++
3725\#
3726.MAC HI END
3727. ie '\\$1'' \{ .ti -\\n[#HL_INDENT]u \}
3728. el \{\
3729. nr #HL_INDENT (\\$1)
3730. ti -\\n[#HL_INDENT]u
3731. \}
3732.END
3733\#
3734\#
3735\# +++INDENTS OFF+++
3736\#
3737.MAC ILX END
3738. br
3739. in 0
3740. rr #INDENT_LEFT_ACTIVE
3741. if '\\$1'CLEAR' \{\
3742. rr #L_INDENT
3743. rr #INDENT_STYLE_LEFT
3744. \}
3745.END
3746\#
3747\#
3748.MAC IRX END
3749. br
3750. rr #INDENT_RIGHT_ACTIVE
3751. ie \\n[#TAB_ACTIVE] \{ .TAB\\n[#CURRENT_TAB] \}
3752. el \{\
3753. ie \\n[#COLUMNS] \{\
3754. ll \\n[#COL_L_LENGTH]u
3755. ta \\n(.lu
3756. \}
3757. el \{\
3758. ll \\n[#L_LENGTH]u
3759. ta \\n(.lu
3760. \}
3761. \}
3762. if '\\$1'CLEAR' \{\
3763. rr #R_INDENT
3764. rr #INDENT_STYLE_RIGHT
3765. \}
3766.END
3767\#
3768\#
3769.MAC IBX END
3770. br
3771. in 0
3772. rr #INDENT_BOTH_ACTIVE
3773. ie \\n[#TAB_ACTIVE] \{ .TAB\\n[#CURRENT_TAB] \}
3774. el \{\
3775. ie \\n[#COLUMNS] \{\
3776. ll \\n[#COL_L_LENGTH]u
3777. ta \\n(.lu
3778. \}
3779. el \{\
3780. ll \\n[#L_LENGTH]u
3781. ta \\n(.lu
3782. \}
3783. \}
3784. if '\\$1'CLEAR' \{\
3785. rr #BL_INDENT
3786. rr #BR_INDENT
3787. rr #INDENT_STYLE_BOTH
3788. \}
3789.END
3790\#
3791\#
3792.MAC IX END
3793. if '\\$0'IX' \{\
3794. if !\\n[#IX_WARN] \{\
3795. tm1 "[mom]: Use of .IX is now deprecated. Use .IQ instead.
3796. tm1 " .IX will continue to behave as before, but to
3797. tm1 " avoid this message, please update your document.
3798. nr #IX_WARN 1
3799. \}
3800. \}
3801. br
3802. in 0
3803. rr #INDENT_LEFT_ACTIVE
3804. rr #INDENT_RIGHT_ACTIVE
3805. rr #INDENT_BOTH_ACTIVE
3806. if \\n[#INDENT_STYLE_RIGHT] \{\
3807. ie \\n[#TAB_ACTIVE] \{ .TAB\\n[#CURRENT_TAB] \}
3808. el \{\
3809. ie \\n[#COLUMNS] \{\
3810. ll \\n[#COL_L_LENGTH]u
3811. ta \\n(.lu
3812. \}
3813. el \{\
3814. ll \\n[#L_LENGTH]u
3815. ta \\n(.lu
3816. \}
3817. \}
3818. \}
3819. if \\n[#INDENT_STYLE_BOTH] \{\
3820. ie \\n[#TAB_ACTIVE] \{ .TAB\\n[#CURRENT_TAB] \}
3821. el \{\
3822. ie \\n[#COLUMNS] \{\
3823. ll \\n[#COL_L_LENGTH]u
3824. ta \\n(.lu
3825. \}
3826. el \{\
3827. ll \\n[#L_LENGTH]u
3828. ta \\n(.lu
3829. \}
3830. \}
3831. \}
3832. if '\\$1'CLEAR' \{\
3833. if \\n[#INDENT_STYLE_RIGHT] \{\
3834. ie \\n[#TAB_ACTIVE] \{ .TAB\\n[#CURRENT_TAB] \}
3835. el \{\
3836. ie \\n[#COLUMNS] \{\
3837. ll \\n[#COL_L_LENGTH]u
3838. ta \\n(.lu
3839. \}
3840. el \{\
3841. ll \\n[#L_LENGTH]u
3842. ta \\n(.lu
3843. \}
3844. \}
3845. \}
3846. if \\n[#INDENT_STYLE_BOTH] \{\
3847. ie \\n[#TAB_ACTIVE] \{ .TAB\\n[#CURRENT_TAB] \}
3848. el \{\
3849. ie \\n[#COLUMNS] \{\
3850. ll \\n[#COL_L_LENGTH]u
3851. ta \\n(.lu
3852. \}
3853. el \{\
3854. ll \\n[#L_LENGTH]u
3855. ta \\n(.lu
3856. \}
3857. \}
3858. \}
3859. rr #L_INDENT
3860. rr #R_INDENT
3861. rr #BL_INDENT
3862. rr #BR_INDENT
3863. rr #T_INDENT
3864. rr #H_INDENT
3865. rr #INDENT_STYLE_LEFT
3866. rr #INDENT_STYLE_RIGHT
3867. rr #INDENT_STYLE_BOTH
3868. \}
3869. rr #INDENT_ACTIVE
3870.END
3871\#
3872\# =====================================================================
3873\#
3874\# +++MULTIPLE COLUMNS+++
3875\#
3876\# MULTIPLE COLUMNS ON
3877\# -------------------
3878\# *Arguments:
3879\# <none>
3880\# *Function:
3881\# Marks the top of a column set
3882\#
3883.MAC MCO END
3884.mk c
3885.END
3886\#
3887\# MULTIPLE COLUMN RETURN
3888\# ----------------------
3889\# *Arguments:
3890\# <none>
3891\# *Function:
3892\# Returns to the top of a column set
3893\#
3894.MAC MCR END
465b256c 3895. TRAP OFF
92d0a6a6 3896. sp |\\ncu
465b256c 3897. TRAP
92d0a6a6
JR
3898.END
3899\#
3900\# MULTIPLE COLUMNS OFF
3901\# --------------------
3902\# *Arguments:
3903\# <none> | <lead to advance beneath bottom of deepest column>
3904\# *Function:
3905\# Advances to the end of a column set
3906\# *Notes:
3907\# With no argument, advances to the next baseline (at the current
3908\# leading value) beneath the longest column. With an argument
3909\# (which requires a unit of measure), advances arg distance
3910\# beneath the baseline of the deepest column. If the argument
3911\# is zero, advances to the baseline of the deepest column.
3912\#
3913.MAC MCX END
4d3e9548 3914. TRAP OFF
92d0a6a6
JR
3915. ie '\\$1'' \{\
3916. TQ
3917. sp |\\n(.hu
3918. \}
3919. el \{\
3920. nr #MCX_ALD (\\$1)
3921. TQ
3922. ie \\n[#MCX_ALD]=0 \{ .sp |\\n(.hu-1v \}
3923. el \{ .sp |\\n(.hu+\\n[#MCX_ALD]u \}
465b256c 3924. rr #MCX_ALD
92d0a6a6 3925. \}
4d3e9548 3926. TRAP
92d0a6a6
JR
3927.END
3928\#
3929\# =====================================================================
3930\#
3931\# +++TYPESETTING SUPPORT MACROS+++
3932\#
3933\# TRAP
3934\# ----
3935\# *Arguments:
3936\# toggle
3937\# *Function:
3938\# Enables/disables traps.
3939\# *Notes:
3940\# EL and TN don't function as advertised on the last line before
3941\# a trap (when they break the preceding line, they spring the
3942\# trap, and groff won't back up to the line preceding the trap).
3943\# TRAP is a kludge to get EL and TN work properly on last lines.
3944\# The user simply enloses the offending lines in TRAP OFF/TRAP.
3945\#
3946.MAC TRAP END
3947. ie '\\$1'' \{ .vpt 1 \}
3948. el \{ .vpt 0 \}
3949.END
3950\#
3951\#
3952\# SILENT
3953\# ------
3954\# *Arguments:
3955\# <none> | <anything>
3956\# *Function:
3957\# Diverts text so that it doesn't print, or turns the function off.
3958\# *Notes:
3959\# Useful for setting up autotabs where you don't want the line with
3960\# the tab marks to print.
3961\#
3962\# Also aliased as COMMENT, in case user wants to input a batch of
3963\# text that doesn't print.
3964\#
3965.MAC SILENT END
3966. nr #SILENT 1
3967. if \\n[#QUAD] \{ .br \}
3968. ie '\\$1'' \{ .di NO_FLASH \}
3969. el \{\
3970. br
3971. di
3972. rm NO_FLASH
3973. rr #SILENT
3974. \}
3975.END
3976\#
3977\#
3978\# PRINT
3979\# -----
92d0a6a6
JR
3980\# *Function:
3981\# Prints anything. A macro that helps keep my code nicely indented.
3982\#
3983.MAC PRINT END
465b256c 3984. nop \\$*
92d0a6a6
JR
3985.END
3986\#
3987\#
3988\# CAPS
3989\# ----
3990\# *Arguments:
3991\# <none> | <anything>
3992\# *Function:
3993\# Converts text to caps, or, if OFF, reverts to normal caps/lc.
4d3e9548
JL
3994\# *Notes:
3995\# For inline control of capitalization style, use \*[UC] and
3996\# \*[LC].
92d0a6a6
JR
3997\#
3998.MAC CAPS END
3999. ie '\\$1'' \{\
4000. tr aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ
4001. tr Ă \[`A]
4002. tr â\[^A]
4003. tr á\['A]
4004. tr ä\[:A]
4005. tr ĂĄ\[oA]
4006. tr ĂŁ\[~A]
4007. tr æ\[AE]
4008. tr è\[`E]
4009. tr ĂŞ\[^E]
4010. tr Ă©\['E]
4011. tr Ă«\[:E]
4012. tr ì\[`I]
4013. tr Ă®\[^I]
4014. tr Ă­\['I]
4015. tr ĂŻ\[:I]
4016. tr ò\[`O]
4017. tr Ă´\[^O]
4018. tr Ăł\['O]
4019. tr ö\[:O]
4020. tr õ\[~O]
4021. tr ø\[/O]
4022. tr Ăą\[`U]
4023. tr Ă»\[^U]
4024. tr Ăş\['U]
4025. tr ĂĽ\[:U]
4026. tr ç\[,C]
4027. tr ð\[-D]
4028. tr ñ\[~N]
4029. tr Ăľ\[TP]
4030. tr Ă˝\['Y]
4031. tr Ăż\[:Y]
4032. nr #CAPS_ON 1
4033. \}
4034. el \{\
4035. tr aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz
4036. tr Ă \[`a]
4037. tr â\[^a]
4038. tr á\['a]
4039. tr ä\[:a]
4040. tr ĂĄ\[oa]
4041. tr ĂŁ\[~a]
4042. tr æ\[ae]
4043. tr è\[`e]
4044. tr ĂŞ\[^e]
4045. tr Ă©\['e]
4046. tr Ă«\[:e]
4047. tr ì\[`i]
4048. tr Ă®\[^i]
4049. tr Ă­\['i]
4050. tr ĂŻ\[:i]
4051. tr ò\[`o]
4052. tr Ă´\[^o]
4053. tr Ăł\['o]
4054. tr ö\[:o]
4055. tr õ\[~o]
4056. tr ø\[/o]
4057. tr Ăą\[`u]
4058. tr Ă»\[^u]
4059. tr Ăş\['u]
4060. tr ĂĽ\[:u]
4061. tr ç\[,c]
4062. tr ð\[Sd]
4063. tr ñ\[~n]
4064. tr Ăľ\[Tp]
4065. tr Ă˝\['y]
4066. tr Ăż\[:y]
4067. rr #CAPS_ON
4068. \}
4069.END
4070\#
4d3e9548
JL
4071.MAC UC END
4072\c
4073. tr aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ
4074. tr Ă \[`A]
4075. tr â\[^A]
4076. tr á\['A]
4077. tr ä\[:A]
4078. tr ĂĄ\[oA]
4079. tr ĂŁ\[~A]
4080. tr æ\[AE]
4081. tr è\[`E]
4082. tr ĂŞ\[^E]
4083. tr Ă©\['E]
4084. tr Ă«\[:E]
4085. tr ì\[`I]
4086. tr Ă®\[^I]
4087. tr Ă­\['I]
4088. tr ĂŻ\[:I]
4089. tr ò\[`O]
4090. tr Ă´\[^O]
4091. tr Ăł\['O]
4092. tr ö\[:O]
4093. tr õ\[~O]
4094. tr ø\[/O]
4095. tr Ăą\[`U]
4096. tr Ă»\[^U]
4097. tr Ăş\['U]
4098. tr ĂĽ\[:U]
4099. tr ç\[,C]
4100. tr ð\[-D]
4101. tr ñ\[~N]
4102. tr Ăľ\[TP]
4103. tr Ă˝\['Y]
4104. tr Ăż\[:Y]
4105. nr #CAPS_ON 1
4106.END
4107\#
4108.MAC LC END
4109\c
4110. tr aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz
4111. tr Ă \[`a]
4112. tr â\[^a]
4113. tr á\['a]
4114. tr ä\[:a]
4115. tr ĂĄ\[oa]
4116. tr ĂŁ\[~a]
4117. tr æ\[ae]
4118. tr è\[`e]
4119. tr ĂŞ\[^e]
4120. tr Ă©\['e]
4121. tr Ă«\[:e]
4122. tr ì\[`i]
4123. tr Ă®\[^i]
4124. tr Ă­\['i]
4125. tr ĂŻ\[:i]
4126. tr ò\[`o]
4127. tr Ă´\[^o]
4128. tr Ăł\['o]
4129. tr ö\[:o]
4130. tr õ\[~o]
4131. tr ø\[/o]
4132. tr Ăą\[`u]
4133. tr Ă»\[^u]
4134. tr Ăş\['u]
4135. tr ĂĽ\[:u]
4136. tr ç\[,c]
4137. tr ð\[Sd]
4138. tr ñ\[~n]
4139. tr Ăľ\[Tp]
4140. tr Ă˝\['y]
4141. tr Ăż\[:y]
4142. rr #CAPS_ON
4143.END
4144\#
92d0a6a6
JR
4145\# SIZESPECS
4146\# ---------
4147\# Argument:
4148\# <none>
4149\# Function:
4150\# Gets cap-height, x-height, and descender depth of the
4151\# current font at the current point size.
4152\# *Notes:
4153\# The routine is diverted so it remains invisible to output.
4154\#
4155.MAC SIZESPECS END
4156. di TYPESIZE
4157E\\R'#CAP_HEIGHT \\n[.cht]'
4158e\\R'#X_HEIGHT \\n[.cht]'
4159y\\R'#DESCENDER \\n[.cdp]'
4160. br
4161. di
4162.END
4163\#
4164\# =====================================================================
4165\#
4166\# +++TYPESETTING ALIASES+++
4167\#
465b256c 4168.ALIAS ADD_SPACE ALD
92d0a6a6
JR
4169.ALIAS CENTRE CENTER
4170.ALIAS COLOUR COLOR
4171.ALIAS COMMENT SILENT
4172.ALIAS CONDENSE CONDENSE_OR_EXTEND
4173.ALIAS EXTEND CONDENSE_OR_EXTEND
4174.ALIAS FAM FAMILY
4d3e9548 4175.ALIAS FONT FT
92d0a6a6
JR
4176.ALIAS HYPHENATE HY
4177.ALIAS HYPHENATION HY
4178.ALIAS HYSET HY_SET
4179.ALIAS IBQ IBX
4180.ALIAS ILQ ILX
4181.ALIAS IQ IX
4182.ALIAS IRQ IRX
4183.ALIAS LIG LIGATURES
4184.ALIAS NEWCOLOUR NEWCOLOR
4185.ALIAS PADMARKER PAD_MARKER
465b256c
JR
4186.ALIAS SP ALD
4187.ALIAS SPACE ALD
92d0a6a6
JR
4188.ALIAS TABSET TAB_SET
4189.ALIAS TB TAB
4190.ALIAS UNDERSCORE_2 UNDERSCORE2
465b256c 4191.ALIAS XCOLOUR XCOLOR
92d0a6a6
JR
4192\#
4193\#
4194\# ====================================================================
4195\#
4196\# DOCUMENT PROCESSING MACROS, STRINGS AND ALIASES
4197\# ===============================================
4198\#
4199\# +++PAGE DIMENSIONS+++
4200\#
4201\# PAPER SIZE
4202\# ----------
4203\# *Arguments:
4204\# LETTER | LEGAL | STATEMENT | TABLOID | LEDGER | FOLIO | QUARTO | 10x14 | EXECUTIVE | A3 | A4 | A5 | B4 | B5
4205\# *Function:
465b256c 4206\# Sets up dimensions for different paper sizes.
92d0a6a6
JR
4207\#
4208.MAC PAPER END
4209. ds $PAPER \\$1
4210. if '\\*[$PAPER]'LETTER' \{\
4211. PAGEWIDTH 8.5i
4212. PAGELENGTH 11i
4213. \}
4214. if '\\*[$PAPER]'LEGAL' \{\
4215. PAGEWIDTH 8.5i
4216. PAGELENGTH 14i
4217. \}
4218. if '\\*[$PAPER]'STATEMENT' \{\
4219. PAGEWIDTH 5.5i
4220. PAGELENGTH 8.5i
4221. \}
4222. if '\\*[$PAPER]'TABLOID' \{\
4223. PAGEWIDTH 11i
4224. PAGELENGTH 17i
4225. \}
4226. if '\\*[$PAPER]'LEDGER' \{\
4227. PAGEWIDTH 17i
4228. PAGELENGTH 11i
4229. \}
4230. if '\\*[$PAPER]'FOLIO' \{\
4231. PAGEWIDTH 8.5i
4232. PAGELENGTH 13i
4233. \}
4234. if '\\*[$PAPER]'QUARTO' \{\
4235. PAGEWIDTH 610p
4236. PAGELENGTH 780p
4237. \}
4238. if '\\*[$PAPER]'10x14' \{\
4239. PAGEWIDTH 10i
4240. PAGELENGTH 14i
4241. \}
4242. if '\\*[$PAPER]'EXECUTIVE' \{\
4243. PAGEWIDTH 7.25i
4244. PAGELENGTH 10.5i
4245. \}
4246. if '\\*[$PAPER]'A3' \{\
4247. PAGEWIDTH 842p
4248. PAGELENGTH 1190p
4249. \}
4250. if '\\*[$PAPER]'A4' \{\
4251. PAGEWIDTH 595p
4252. PAGELENGTH 842p
4253. \}
4254. if '\\*[$PAPER]'A5' \{\
4255. PAGEWIDTH 421p
4256. PAGELENGTH 595p
4257. \}
4258. if '\\*[$PAPER]'B4' \{\
4259. PAGEWIDTH 709p
4260. PAGELENGTH 1002p
4261. \}
4262. if '\\*[$PAPER]'B5' \{\
4263. PAGEWIDTH 501p
4264. PAGELENGTH 709p
4265. \}
4266. if !r#L_MARGIN \{ .L_MARGIN \\n(.o \}
4267. if !r#R_MARGIN \{ .R_MARGIN 1i \}
4268.END
4269\#
4270\#
4271\# ====================================================================
4272\#
4273\# +++PRINTSTYLE -- TYPEWRITE OR TYPESET+++
4274\#
4275\# PRINTSTYLE
4276\# ----------
4277\# *Arguments:
4278\# TYPESET | TYPEWRITE [SINGLESPACE]
4279\# *Function:
4280\# Sets type specs for typewriter-style or typeset output.
4281\# *Notes:
4282\# Number registers: TYPEWRITE=1, TYPESET=2.
4283\#
4284.MAC PRINTSTYLE END
465b256c
JR
4285. if !\\n[#COLLATE]=1 \{\
4286. if !d$PAPER \{ .PAPER LETTER \}
4287. if '\\$1'TYPEWRITE' \{\
4288. nr #PRINT_STYLE 1
4289. if !\\n[#DOC_TYPE]=4 \{ .L_MARGIN 6P \}
4290. if !\\n[#DOC_TYPE]=4 \{ .R_MARGIN 6P \}
4291. TYPEWRITER
4292. color 0
4293. ie '\\$2'SINGLESPACE' \{\
4294. nr #SINGLE_SPACE 1
4295. vs 12
4296. nr #ORIGINAL_DOC_LEAD \\n(.v
4297. \}
4298. el \{\
4299. vs 24
4300. nr #ORIGINAL_DOC_LEAD \\n(.v
4301. \}
4302. QUAD L
4303. HY OFF
4304. SMARTQUOTES OFF
4305. if !\\n[#PP_INDENT] \{\
4306. in 3P \"Set indent
4307. nr #PP_INDENT \\n(.i \"Read into #PP_INDENT
4308. in 0 \"Remove indent
4309. \}
4310. HDRFTR_RIGHT_CAPS
4311. nr #BOLDER_UNITS 0
4312. nr #CONDENSE 0
4313. nr #EXTEND 0
4d3e9548 4314. if !\\n[#ITALIC_MEANS_ITALIC] \{ .rm IT \}
465b256c
JR
4315. rm BD
4316. rm BDI
4d3e9548
JL
4317. if !\\n[#ITALIC_MEANS_ITALIC] \{ .rm PREV \}
4318. if !\\n[#SLANT_MEANS_SLANT] \{ .UNDERLINE_SLANT \}
4319. if !\\n[#ITALIC_MEANS_ITALIC] \{ .UNDERLINE_ITALIC \}
4320. if !\\n[#UNDERLINE_QUOTES] \{ .UNDERLINE_QUOTES \}
465b256c 4321. nr #IGNORE_COLUMNS 1
4d3e9548
JL
4322. nr #RULE_WEIGHT 500
4323. nr #HEAD_UNDERLINE_WEIGHT 500
465b256c
JR
4324. char \(em --
4325. tr `'
4326. \}
4327. if '\\$1'TYPESET' \{\
4328. nr #PRINT_STYLE 2
4329. if !\\n[#DOC_TYPE]=4 \{ .L_MARGIN 6P \}
4330. if !\\n[#DOC_TYPE]=4 \{ .R_MARGIN 6P \}
4331. FAMILY T
4332. FT R
4333. if !\\n[#DOC_TYPE]=4 \{ .PT_SIZE 12.5 \}
4334. if !\\n[#DOC_TYPE]=4 \{ .LS 16 \}
4335. JUSTIFY
4336. HY
4337. HY_SET 2 36p 1p
4338. KERN
4339. LIG
4340. SS 0
4341. SMARTQUOTES
4342. if !\\n[#PP_INDENT] \{\
4343. in 2m \"Set indent
4344. nr #PP_INDENT \\n(.i \"Read into #PP_INDENT
4345. in 0 \"Remove indent
4346. \}
4347. HDRFTR_RIGHT_CAPS
4348. rr #IGNORE_COLUMNS
92d0a6a6 4349. \}
92d0a6a6
JR
4350. \}
4351.END
4352\#
4353\#
4354\# Macros to control behaviour of PRINTSTYLE TYPEWRITE
4355\#
465b256c
JR
4356\# First, a little utility macro.
4357\#
4358.MAC TYPEWRITER END
4359. fam C
4360. ft R
4361. ps 12
4362.END
4363\#
4364\#
92d0a6a6
JR
4365\# ITALIC MEANS ITALIC
4366\# -------------------
4367\# *Argument:
4368\# <none>
4369\# *Function:
4370\# Instructs TYPEWRITE to treat italics as italics, whether
4371\# invoked via control lines or inline.
4372\# *Notes:
4373\# ITALIC_MEANS_ITALIC and UNDERLINE_ITALIC are mututally exclusive,
4374\# hence invoking the one automatically turns off the other.
4375\#
4376.MAC ITALIC_MEANS_ITALIC END
4377. if \\n[#PRINT_STYLE]=1 \{\
4378. nr #ITALIC_MEANS_ITALIC 1
4379. rr #UNDERLINE_ITALIC
4380. rm ROM
4381. rm IT
4382. rm PREV
4383. ds ROM \EfR
4384. ds IT \EfI
4385. ds PREV \EfR
4386. \}
4387.END
4388\#
4389\#
4390\# UNDERLINE ITALIC
4391\# ----------------
4392\# *Argument:
4393\# <none>
4394\# *Function:
4395\# Instructs TYPEWRITE to underline italics, whether invoked
4396\# via control lines or inline.
4397\# *Notes:
4398\# UNDERLINE_ITALIC and ITALIC_MEANS_ITALIC are mututally exclusive,
4399\# hence invoking the one automatically turns off the other.
4400\#
4401\# UNDERLINE_ITALIC is the default for TYPEWRITE.
4402\#
4403.MAC UNDERLINE_ITALIC END
4404. if \\n[#PRINT_STYLE]=1 \{\
4405. nr #UNDERLINE_ITALIC 1
4406. rr #ITALIC_MEANS_ITALIC
4407. rm ROM
4408. rm IT
4409. rm PREV
4410. ds ROM \E*[ULX]
4411. ds IT \E*[UL]
4412. ds PREV \E*[ULX]
4413. \}
4414.END
4415\#
4416\#
4417\# UNDERLINE SLANT
4418\# ---------------
4419\# *Arguments:
4420\# <none> | <anything>
4421\# *Function:
4422\# Instructs TYPEWRITE to underline occurences of \*[SLANT], or
4423\# turns feature off.
4424\# *Notes:
4425\# Users may want \*[SLANT] to mean slant in TYPEWRITE, although
4426\# most of the time, \*[SLANT] most likely means the user wanted
4427\# italic but didn't have it, ergo the need to tell TYPEWRITE to
4428\# treat \*[SLANT] as italic (i.e. underlined).
4429\#
4430\# UNDERLINE_SLANT and SLANT_MEANS_SLANT are mututally exclusive,
4431\# hence invoking the one automatically turns off the other.
4432\#
4433\# UNDERLINE_SLANT is the default for TYPEWRITE.
4434\#
4435.MAC UNDERLINE_SLANT END
4436. if \\n[#PRINT_STYLE]=1 \{\
4437. rr #SLANT_MEANS_SLANT
4438. nr #UNDERLINE_SLANT 1
4439. rm SLANT
4440. rm SLANTX
4441. ds SLANT \ER'#SLANT_ON 1'\E*[UL]
4442. ds SLANTX \ER'#SLANT_ON 0'\E*[ULX]
4443. \}
4444.END
4445\#
4446\#
4447.MAC SLANT_MEANS_SLANT END
4448. if \\n[#PRINT_STYLE]=1 \{\
4449. rr #UNDERLINE_SLANT
4450. nr #SLANT_MEANS_SLANT 1
4451. rm SLANT
4452. rm SLANTX
4453. ds SLANT \ER'#SLANT_ON 1'\ES'\En[#DEGREES]'
4454. ds SLANTX \ER'#SLANT_ON 0'\ES'0'
4455. \}
4456.END
4457\#
4458\#
4459.MAC IGNORE_COLUMNS END
4460. if \\n[#PRINT_STYLE]=1 \{ .nr #NO_COLUMNS 1 \}
4461.END
4462\#
4463\#
4464\# ====================================================================
4465\#
4466\# +++COPY STYLE -- DRAFT OR FINAL+++
4467\#
4468\# COPY STYLE
4469\# ----------
4470\# *Arguments:
4471\# DRAFT | FINAL
4472\# *Function:
4473\# Sets registers that are used to determine what to put
4474\# in the default header, and how to number pages.
4475\# *Notes:
4476\# DOCTYPE must come before COPYSTYLE.
4477\#
4478.MAC COPYSTYLE END
4479. ds $COPY_STYLE \\$1
4480. if '\\*[$COPY_STYLE]'DRAFT' \{\
4481. nr #COPY_STYLE 1
4482. if !d$DRAFT \{ .DRAFT 1 \}
4483. \}
4484. if '\\*[$COPY_STYLE]'FINAL' \{ .nr #COPY_STYLE 2 \}
4485. if !d$CHAPTER_STRING \{ .CHAPTER_STRING "Chapter" \}
4486. if !d$DRAFT_STRING \{ .DRAFT_STRING "Draft" \}
4487. if !d$REVISION_STRING \{ .REVISION_STRING "Rev." \}
465b256c 4488.\" Default
92d0a6a6
JR
4489. if \\n[#DOC_TYPE]=1 \{\
4490. ie \\n[#COPY_STYLE]=1 \{\
4491. ie \\n[#PAGENUM_STYLE_SET] \{ .PAGENUM_STYLE \\*[$PAGENUM_STYLE] \}
4492. el \{ .PAGENUM_STYLE roman \}
4493. if \\n[#USER_DEF_HDRFTR_CENTER]=0 \{\
4494. ie \\n[#DRAFT_WITH_PAGENUM] \{\
4495. ds $HDRFTR_CENTER
4496. \}
4497. el \{\
4498. ie '\\*[$REVISION]'' \{\
4499. ds $HDRFTR_CENTER \
4500 \\*[$DRAFT_STRING]\\*[$DRAFT]
4501. \}
4502. el \{\
4503. ds $HDRFTR_CENTER \
4504 \\*[$DRAFT_STRING]\\*[$DRAFT], \
4505 \\*[$REVISION_STRING] \\*[$REVISION]
4506. \}
4507. \}
4508. \}
4509. \}
4510. el \{\
4511. ie \\n[#PAGENUM_STYLE_SET] \{ .PAGENUM_STYLE \\*[$PAGENUM_STYLE] \}
4512. el \{ .PAGENUM_STYLE DIGIT \}
465b256c 4513. if r#DRAFT_WITH_PAGENUM \{ .rr #DRAFT_WITH_PAGENUM \}
92d0a6a6
JR
4514. if \\n[#USER_DEF_HDRFTR_CENTER]=0 \{\
4515. ds $HDRFTR_CENTER
4516. rr #USER_DEF_HDRFTR_CENTER
4517. \}
4518. \}
4519. \}
465b256c 4520.\" Chapter
92d0a6a6 4521. if \\n[#DOC_TYPE]=2 \{\
465b256c 4522.\" Copystyle DRAFT
92d0a6a6
JR
4523. ie \\n[#COPY_STYLE]=1 \{\
4524. ie \\n[#PAGENUM_STYLE_SET] \{ .PAGENUM_STYLE \\*[$PAGENUM_STYLE] \}
4525. el \{ .PAGENUM_STYLE roman \}
4526. if \\n[#USER_DEF_HDRFTR_CENTER]=0 \{\
4527. ie \\n[#DRAFT_WITH_PAGENUM] \{\
4528. ie '\\*[$CHAPTER]'' \{\
4d3e9548 4529. ie !'\\*[$CHAPTER_TITLE_1]'' \{\
92d0a6a6
JR
4530. ds $HDRFTR_CENTER \\*[$CHAPTER_TITLE]
4531. \}
465b256c 4532. el .ds $HDRFTR_CENTER \\*[$CHAPTER_STRING]
92d0a6a6
JR
4533. \}
4534. el \{\
4d3e9548 4535. ie !'\\*[$CHAPTER_TITLE_1]'' \{\
92d0a6a6
JR
4536. ds $HDRFTR_CENTER \\*[$CHAPTER_TITLE]
4537. \}
465b256c 4538. el .ds $HDRFTR_CENTER \\*[$CHAPTER_STRING] \\*[$CHAPTER]
92d0a6a6
JR
4539. \}
4540. \}
4541. el \{\
4542. ie '\\*[$REVISION]'' \{\
4543. ie '\\*[$CHAPTER]'' \{\
4d3e9548 4544. ie !'\\*[$CHAPTER_TITLE_1]'' \{\
92d0a6a6
JR
4545. ie '\\*[$DRAFT]'' \{\
4546. ds $HDRFTR_CENTER \\*[$CHAPTER_TITLE]
4547. \}
4548. el \{\
4549. ds $HDRFTR_CENTER \
4550 \\*[$CHAPTER_TITLE], \
4551 \\*[$DRAFT_STRING]\\*[$DRAFT]
4552. \}
4553. \}
4554. el \{\
4555. ie '\\*[$DRAFT]'' \{\
4556. ds $HDRFTR_CENTER \
4557 \\*[$CHAPTER_STRING]
4558. \}
4559. el \{\
4560. ds $HDRFTR_CENTER \
4561 \\*[$CHAPTER_STRING], \
4562 \\*[$DRAFT_STRING]\\*[$DRAFT]
4563. \}
4564. \}
4565. \}
4566. el \{\
4d3e9548 4567. ie !'\\*[$CHAPTER_TITLE_1]'' \{\
92d0a6a6
JR
4568. ie '\\*[$DRAFT]'' \{\
4569. ds $HDRFTR_CENTER \\*[$CHAPTER_TITLE]
4570. \}
4571. el \{\
4572. ds $HDRFTR_CENTER \
4d3e9548 4573 \\*[$CHAPTER_TITLE_1], \
92d0a6a6
JR
4574 \\*[$DRAFT_STRING]\\*[$DRAFT]
4575. \}
4576. \}
4577. el \{\
4578. ie '\\*[$DRAFT]'' \{\
4579. ds $HDRFTR_CENTER \
4580 \\*[$CHAPTER_STRING] \\*[$CHAPTER]
4581. \}
4582. el \{\
4583. ds $HDRFTR_CENTER \
4584 \\*[$CHAPTER_STRING] \\*[$CHAPTER], \
4585 \\*[$DRAFT_STRING]\\*[$DRAFT]
4586. \}
4587. \}
4588. \}
4589. \}
4590. el \{\
4591. ie '\\*[$CHAPTER]'' \{\
4d3e9548 4592. ie !'\\*[$CHAPTER_TITLE_1]'' \{\
92d0a6a6
JR
4593. ie '\\*[$DRAFT]'' \{\
4594. ds $HDRFTR_CENTER \
4595 \\*[$CHAPTER_TITLE], \
4d3e9548 4596 \\*[$REVISION_STRING] \\*[$REVISION]
92d0a6a6
JR
4597. \}
4598. el \{\
4599. ds $HDRFTR_CENTER \
4600 \\*[$CHAPTER_TITLE], \
4601 \\*[$DRAFT_STRING]\\*[$DRAFT], \
4d3e9548 4602 \\*[$REVISION_STRING] \\*[$REVISION]
92d0a6a6
JR
4603. \}
4604. \}
4605. el \{\
4606. ie '\\*[$DRAFT]'' \{\
4607. ds $HDRFTR_CENTER \
4608 \\*[$CHAPTER_STRING], \
4d3e9548 4609 \\*[$REVISION_STRING] \\*[$REVISION]
92d0a6a6
JR
4610. \}
4611. el \{\
4612. ds $HDRFTR_CENTER \
4613 \\*[$CHAPTER_STRING], \
4614 \\*[$DRAFT_STRING]\\*[$DRAFT], \
4d3e9548 4615 \\*[$REVISION_STRING] \\*[$REVISION]
92d0a6a6
JR
4616. \}
4617. \}
4618. \}
4619. el \{\
4d3e9548 4620. ie !'\\*[$CHAPTER_TITLE_1]'' \{\
92d0a6a6
JR
4621. ie '\\*[$DRAFT]'' \{\
4622. ds $HDRFTR_CENTER \
4623 \\*[$CHAPTER_TITLE], \
4d3e9548 4624 \\*[$REVISION_STRING] \\*[$REVISION]
92d0a6a6
JR
4625. \}
4626. el \{\
4627. ds $HDRFTR_CENTER \
4628 \\*[$CHAPTER_TITLE], \
4629 \\*[$DRAFT_STRING]\\*[$DRAFT], \
4d3e9548 4630 \\*[$REVISION_STRING] \\*[$REVISION]
92d0a6a6
JR
4631. \}
4632. \}
4633. el \{\
4634. ie '\\*[$DRAFT]'' \{\
4635. ds $HDRFTR_CENTER \
4636 \\*[$CHAPTER_STRING] \\*[$CHAPTER], \
4d3e9548 4637 \\*[$REVISION_STRING] \\*[$REVISION]
92d0a6a6
JR
4638. \}
4639. el \{\
4640. ds $HDRFTR_CENTER \
4641 \\*[$CHAPTER_STRING] \\*[$CHAPTER], \
4642 \\*[$DRAFT_STRING]\\*[$DRAFT], \
4d3e9548 4643 \\*[$REVISION_STRING] \\*[$REVISION]
92d0a6a6
JR
4644. \}
4645. \}
4646. \}
4647. \}
4648. \}
4649. \}
4650. \}
465b256c 4651.\" Copystyle FINAL
92d0a6a6 4652. el \{\
465b256c 4653. if r#DRAFT_WITH_PAGENUM \{ .rr #DRAFT_WITH_PAGENUM \}
92d0a6a6
JR
4654. if \\n[#USER_DEF_HDRFTR_CENTER]=0 \{\
4655. ie \\n[#PAGENUM_STYLE_SET] \{ .PAGENUM_STYLE \\*[$PAGENUM_STYLE] \}
4656. el \{ .PAGENUM_STYLE DIGIT \}
4657. ie '\\*[$CHAPTER]'' \{\
4d3e9548 4658. ie !'\\*[$CHAPTER_TITLE_1]'' \{\
92d0a6a6
JR
4659. ds $HDRFTR_CENTER \\*[$CHAPTER_TITLE]
4660. \}
4661. el \{\
4662. ds $HDRFTR_CENTER \\*[$CHAPTER_STRING]
4663. \}
4664. \}
4665. el \{\
4d3e9548 4666. ie !'\\*[$CHAPTER_TITLE_1]'' \{\
92d0a6a6
JR
4667. ds $HDRFTR_CENTER \\*[$CHAPTER_TITLE]
4668. \}
4669. el \{\
4670. ds $HDRFTR_CENTER \\*[$CHAPTER_STRING] \\*[$CHAPTER]
4671. \}
4672. \}
4673. \}
4674. \}
4675. \}
465b256c 4676.\" Named
92d0a6a6
JR
4677. if \\n[#DOC_TYPE]=3 \{\
4678. ie \\n[#COPY_STYLE]=1 \{\
4679. ie \\n[#PAGENUM_STYLE_SET] \{ .PAGENUM_STYLE \\*[$PAGENUM_STYLE] \}
4680. el \{ .PAGENUM_STYLE roman \}
4681. ie \\n[#DRAFT_WITH_PAGENUM] \{\
4682. ds $HDRFTR_CENTER \\*[$DOC_TYPE]
4683. \}
4684. el \{\
4685. if \\n[#USER_DEF_HDRFTR_CENTER]=0 \{\
4686. ie '\\*[$REVISION]'' \{\
4687. ie '\\*[$DRAFT]'' \{\
4688. ds $HDRFTR_CENTER \\*[$DOC_TYPE]
4689. \}
4690. el \{\
4691. ds $HDRFTR_CENTER \
4692 \\*[$DOC_TYPE], \
4693 \\*[$DRAFT_STRING]\\*[$DRAFT]
4694. \}
4695. \}
4696. el \{\
4697. ie '\\*[$DRAFT]'' \{\
4698. ds $HDRFTR_CENTER \
4699 \\*[$DOC_TYPE], \
4700 \\*[$REVISION_STRING] \\*[$REVISION]
4701. \}
4702. el \{\
4703. ds $HDRFTR_CENTER \
4704 \\*[$DOC_TYPE], \
4705 \\*[$DRAFT_STRING]\\*[$DRAFT], \
4706 \\*[$REVISION_STRING] \\*[$REVISION]
4707. \}
4708. \}
4709. \}
4710. \}
4711. \}
4712. el \{\
465b256c 4713. if r#DRAFT_WITH_PAGENUM \{ .rr #DRAFT_WITH_PAGENUM \}
92d0a6a6
JR
4714. if \\n[#USER_DEF_HDRFTR_CENTER]=0 \{\
4715. ie \\n[#PAGENUM_STYLE_SET] \{ .PAGENUM_STYLE \\*[$PAGENUM_STYLE] \}
4716. el \{ .PAGENUM_STYLE DIGIT \}
4717. ds $HDRFTR_CENTER \\*[$DOC_TYPE]
4718. \}
4719. \}
4720. \}
4721.END
4722\#
4723\# ====================================================================
4724\#
465b256c 4725\# +++COLLECT DOC INFO -- STRINGS AND REGISTERS FOR REFERENCE MACROS+++
92d0a6a6
JR
4726\#
4727\# *Arguments:
4728\# various string/register arguments
4729\# *Function:
4730\# Collect information about documents.
4731\#
4732\#
465b256c 4733.MAC DOCTITLE END
4d3e9548
JL
4734. rr #DOCTITLE_NUM
4735. nr #DOCTITLE_NUM 0 1
4736. while \\n[#NUM_ARGS]>\\n[#DOCTITLE_NUM] \{\
4737. ds $DOC_TITLE_\\n+[#DOCTITLE_NUM] \\$\\n[#DOCTITLE_NUM]
4738.\}
4739. ds $DOC_TITLE \\$*
92d0a6a6
JR
4740.END
4741\#
4742.MAC TITLE END \"Document title
4d3e9548
JL
4743. ie \\n[#NUM_ARGS]=0 \{\
4744. if \\n[#TITLE_NUM] \{\
4745. nr #ITEM 0 1
4746. while \\n[#TITLE_NUM]>\\n[#ITEM] \{\
4747. rm $TITLE_\\n+[#ITEM]
4748.\}
4749. rr #TITLE_NUM
4750. \}
4751. \}
4752. el \{\
4753. nr #TITLE_NUM 0 1
4754. while \\n[#NUM_ARGS]>\\n[#TITLE_NUM] \{\
4755. ds $TITLE_\\n+[#TITLE_NUM] \\$\\n[#TITLE_NUM]
4756.\}
4757. ds $TITLE \\$*
4758. \}
92d0a6a6
JR
4759.END
4760\#
4761\#
4762.MAC SUBTITLE END \"Document sub-title
4d3e9548
JL
4763. ie \\n[#NUM_ARGS]=0 \{\
4764. if \\n[#SUBTITLE_NUM] \{\
4765. nr #ITEM 0 1
4766. while \\n[#SUBTITLE_NUM]>\\n[#ITEM] \{\
4767. rm $SUBTITLE_\\n+[#ITEM]
4768.\}
4769. rr #SUBTITLE_NUM
4770. rm $SUBTITLE
4771. \}
4772. \}
4773. el \{\
4774. if '\\$1'DOC_COVER' \{\
4775. shift
4776. nr #SUBTITLE_DOCCOVER_NUM 0 1
4777. while \\n[#NUM_ARGS]>\\n[#SUBTITLE_DOCCOVER_NUM] \{\
4778. ds $SUBTITLE_DOCCOVER_\\n+[#SUBTITLE_DOCCOVER_NUM] \\$\\n[#SUBTITLE_DOCCOVER_NUM]
4779.\}
4780. return
4781. \}
4782. if '\\$1'COVER' \{\
4783. shift
4784. nr #SUBTITLE_COVER_NUM 0 1
4785. while \\n[#NUM_ARGS]>\\n[#SUBTITLE_COVER_NUM] \{\
4786. ds $SUBTITLE_COVER_\\n+[#SUBTITLE_COVER_NUM] \\$\\n[#SUBTITLE_COVER_NUM]
4787.\}
4788. return
4789. \}
4790. nr #SUBTITLE_NUM 0 1
4791. while \\n[#NUM_ARGS]>\\n[#SUBTITLE_NUM] \{\
4792. ds $SUBTITLE_\\n+[#SUBTITLE_NUM] \\$\\n[#SUBTITLE_NUM]
4793.\}
4794. ds $SUBTITLE \\$*
4795. \}
92d0a6a6
JR
4796.END
4797\#
4798\#
4799.MAC CHAPTER END \"If document is a chapter, the chapter number
4d3e9548 4800. nr #CHAPTER_CALLED 1
92d0a6a6 4801. ds $CHAPTER \\$1
4d3e9548
JL
4802. if r#CH_NUM \{\
4803. if \B'\\*[$CHAPTER]' \{\
4804. nr #CH_NUM \\*[$CHAPTER]
4805. \}
4806. \}
92d0a6a6
JR
4807.END
4808\#
4809\#
4810.MAC CHAPTER_TITLE END \" This defines what comes after Chapter #
4d3e9548
JL
4811. ie \\n[#NUM_ARGS]=0 \{\
4812. if \\n[#CHAPTER_TITLE_NUM] \{\
4813. nr #ITEM 0 1
4814. while \\n[#CHAPTER_TITLE_NUM]>\\n[#ITEM] \{\
4815. rm $CHAPTER_TITLE_\\n+[#ITEM]
4816.\}
4817. rr #CHAPTER_TITLE_NUM
4818. rm $CHAPTER_TITLE
4819. \}
4820. \}
4821. el \{\
4822. rr #CHAPTER_TITLE_NUM
4823. nr #CHAPTER_TITLE_NUM 0 1
4824. while \\n[#NUM_ARGS]>\\n[#CHAPTER_TITLE_NUM] \{\
4825. ds $CHAPTER_TITLE_\\n+[#CHAPTER_TITLE_NUM] \\$\\n[#CHAPTER_TITLE_NUM]
4826.\}
4827. ds $CHAPTER_TITLE \\$*
4828. \}
92d0a6a6
JR
4829.END
4830\#
4831\#
4832.MAC DRAFT END \"Draft number
465b256c
JR
4833. ie '\\$1'' .ds $DRAFT
4834. el .ds $DRAFT " \\$1
92d0a6a6
JR
4835.END
4836\#
4837\#
4838.MAC REVISION END \"Revision number
4839. ds $REVISION \\$1
4840.END
4841\#
4842\#
4843.MAC DRAFT_WITH_PAGENUMBER END \"Attach draft/revision strings to page number
4844. nr #DRAFT_WITH_PAGENUM 1
4845.END
4846\#
4847\#
4848.MAC AUTHOR END \"Author. Enclose all args fully in double quotes.
4d3e9548
JL
4849. if '\\$1'DOC_COVER' \{\
4850. shift
4851. nr #AUTHOR_DOCCOVER_NUM 0 1
4852. while \\n[#NUM_ARGS]>\\n[#AUTHOR_DOCCOVER_NUM] \{\
4853. ds $AUTHOR_DOCCOVER_\\n+[#AUTHOR_DOCCOVER_NUM] \\$\\n[#AUTHOR_DOCCOVER_NUM]
4854.\}
4855. return
4856. \}
4857. if '\\$1'COVER' \{\
4858. shift
4859. nr #AUTHOR_COVER_NUM 0 1
4860. while \\n[#NUM_ARGS]>\\n[#AUTHOR_COVER_NUM] \{\
4861. ds $AUTHOR_COVER_\\n+[#AUTHOR_COVER_NUM] \\$\\n[#AUTHOR_COVER_NUM]
4862.\}
4863. return
4864. \}
4865. nr #AUTHOR_NUM 0 1
4866. rm $AUTHORS
92d0a6a6
JR
4867. while \\n[#NUM_ARGS]>\\n[#AUTHOR_NUM] \{\
4868. ds $AUTHOR_\\n+[#AUTHOR_NUM] \\$\\n[#AUTHOR_NUM]
4d3e9548 4869. as $AUTHORS \\*[$AUTHOR_\\n[#AUTHOR_NUM]], \"
465b256c 4870.\}
4d3e9548
JL
4871. substring $AUTHORS 0 -3
4872. ds $AUTHOR \\*[$AUTHOR_1]
92d0a6a6
JR
4873.END
4874\#
4d3e9548 4875.ALIAS EDITOR AUTHOR
92d0a6a6 4876\#
4d3e9548
JL
4877.MAC COPYRIGHT END \"For use on cover pages only
4878. ie \\n[#NUM_ARGS]=1 \{\
4879. ds $COPYRIGHT \[co]\\$1
4880. rm $COPYRIGHT_DOCCOVER
4881. rm $COPYRIGHT_COVER
4882. \}
4883. el \{\
4884. if '\\$1'DOC_COVER' \{\
4885. ds $COPYRIGHT_DOCCOVER \[co]\\$2
4886. \}
4887. if '\\$1'COVER' \{\
4888. ds $COPYRIGHT_COVER \[co]\\$2
4889. \}
4890. \}
465b256c
JR
4891.END
4892\#
4893\#
4d3e9548
JL
4894.MAC MISC END \"For use on cover pages only; enclose all args in double quotes
4895. ie \\n[#NUM_ARGS]=0 \{\
4896. if \\n[#MISC_NUM] \{\
4897. nr #ITEM 0 1
4898. while \\n[#MISC_NUM]>\\n[#ITEM] \{\
4899. rm $MISC_\\n+[#ITEM]
4900.\}
4901. rr #MISC_NUM
4902. rr #NUM_MISCS
4903. \}
4904. if \\n[#MISC_DOCCOVER_NUM] \{\
4905. nr #ITEM 0 1
4906. while \\n[#MISC_DOCCOVER_NUM]>\\n[#ITEM] \{\
4907. rm $MISC_DOCCOVER_\\n+[#ITEM]
4908.\}
4909. rr #MISC_DOCCOVER_NUM
4910. rr #NUM_MISCS
4911. \}
4912. if \\n[#MISC_COVER_NUM] \{\
4913. nr #ITEM 0 1
4914. while \\n[#MISC_COVER_NUM]>\\n[#ITEM] \{\
4915. rm $MISC_COVER_\\n+[#ITEM]
4916.\}
4917. rr #MISC_COVER_NUM
4918. rr #NUM_MISCS
4919. \}
4920. \}
4921. el \{\
4922. if !'\\$1'DOC_COVER' \{\
4923. if !'\\$1'COVER' \{ .nr #NEITHER 1 \}
4924. \}
4925. if !'\\$1'COVER' \{\
4926. if !'\\$1'DOC_COVER'\{ .nr #NEITHER 1 \}
4927. \}
4928. if '\\$1'DOC_COVER' \{\
4929. shift
4930. nr #MISC_DOCCOVER_NUM 0 1
4931. while \\n[#NUM_ARGS]>\\n[#MISC_DOCCOVER_NUM] \{\
4932. ds $MISC_DOCCOVER_\\n+[#MISC_DOCCOVER_NUM] \\$\\n[#MISC_DOCCOVER_NUM]
4933.\}
4934. nr #NUM_MISCS_DOCCOVER \\n[#NUM_ARGS]
4935. \}
4936. if '\\$1'COVER' \{\
4937. shift
4938. nr #MISC_COVER_NUM 0 1
4939. while \\n[#NUM_ARGS]>\\n[#MISC_COVER_NUM] \{\
4940. ds $MISC_COVER_\\n+[#MISC_COVER_NUM] \\$\\n[#MISC_COVER_NUM]
465b256c 4941.\}
4d3e9548
JL
4942. nr #NUM_MISCS_COVER \\n[#NUM_ARGS]
4943. \}
4944. if \\n[#NEITHER]=1 \{\
4945. nr #MISC_NUM 0 1
4946. while \\n[#NUM_ARGS]>\\n[#MISC_NUM] \{\
4947. ds $MISC_\\n+[#MISC_NUM] \\$\\n[#MISC_NUM]
4948.\}
4949. nr #NUM_MISCS \\n[#NUM_ARGS]
4950. rr #NEITHER
4951. \}
4952. \}
465b256c
JR
4953.END
4954\#
4955\#
92d0a6a6
JR
4956.MAC PAGENUMBER END \"Page # that appears on page one.
4957. nr #n%_AT_PAGENUM_SET \\n%
4958. nr #PAGE_NUM_ADJ \\$1-\\n[#n%_AT_PAGENUM_SET]
4959. rr #n%_AT_PAGENUM_SET
4960. nr #PAGE_NUM_SET 1
4961.END
4962\#
4963\# ====================================================================
4964\#
4965\# +++TYPE OF DOCUMENT+++
4966\#
4967\# DOCUMENT TYPE
4968\# -------------
4969\# *Argument:
4970\# DEFAULT | CHAPTER | NAMED "<whatever> | LETTER
4971\# *Function:
4972\# Creates strings and sets registers for document types.
4973\# *Notes:
4974\# Number registers: DEFAULT=1, CHAPTER=2, NAMED=3, LETTER=4
4975\#
4976.MAC DOCTYPE END
4977. if '\\$1'DEFAULT' \{\
4978. nr #DOC_TYPE 1
4979. \}
4980. if '\\$1'CHAPTER' \{\
4981. nr #DOC_TYPE 2
4982. \}
4983. if '\\$1'NAMED' \{\
4984. ds $DOC_TYPE \\$2
4985. nr #DOC_TYPE 3
4986. \}
4987. if '\\$1'LETTER' \{\
4988. nr #DOC_TYPE 4
4989. L_MARGIN 1.125i
4990. R_MARGIN 1.125i
4991. PT_SIZE 12
4992. LS 13.5
4993. DOCHEADER OFF
4994. PARA_INDENT 3m
4995. INDENT_FIRST_PARAS
4996. PARA_SPACE
4997. ds $SUITE \En[#SUITE]
4998. HEADER_MARGIN 3P+6p
4999. HEADER_GAP 3P
5000. FOOTERS
5001. FOOTER_RULE OFF
5002. FOOTER_LEFT ""
5003. FOOTER_CENTER ""
5004. FOOTER_RIGHT_SIZE +0
5005. FOOTER_RIGHT "\&.../\E*[$SUITE]
5006. FOOTER_ON_FIRST_PAGE
5007. em ALL_DONE
5008. \}
5009.END
5010\#
5011\# +++LETTER MACROS+++
5012\#
5013\# First, create a register to hold incrementing numbers to be
5014\# appended to LETTERHEAD.
5015\#
5016.nr #FIELD 0 1
5017\#
5018\# DATE
5019\# ----
5020\# *Arguments:
5021\# <none>
5022\# *Function:
5023\# Stores date (entered on the line after .DATE) in diversion
5024\# LETTERHEAD<n>
5025\#
5026.MAC DATE END
5027. if !'\\n(.z'' \{ .di \}
5028. di LETTERHEAD\\n+[#FIELD]
5029. ie \\n[#FIELD]=1 \{\
5030. nr #DATE_FIRST 1
5031. RIGHT
5032. \}
5033. el \{\
5034. LEFT
5035. \}
5036.END
5037\#
5038\#
5039\# TO
5040\# --
5041\# *Arguments:
5042\# <none>
5043\# *Function:
5044\# Stores addressee address (entered on the line after .TO) in
5045\# diversion LETTERHEAD<n>
5046\#
5047.MAC TO END
5048. if !'\\n(.z'' \{ .di \}
5049. di LETTERHEAD\\n+[#FIELD]
5050. LEFT
5051.END
5052\#
5053\#
5054\# FROM
5055\# ----
5056\# *Arguments:
5057\# <none>
5058\# *Function:
5059\# Stores addresser address (entered on the line after .FROM) in
5060\# diversion LETTERHEAD<n>
5061\#
5062.MAC FROM END
5063. if !'\\n(.z'' \{ .di \}
5064. di LETTERHEAD\\n+[#FIELD]
5065. LEFT
5066.END
5067\#
5068\#
5069\# GREETING
5070\# --------
5071\# *Arguments:
5072\# <none>
5073\# *Function:
5074\# Stores greeting (entered on the line after .GREETING) in
5075\# diversion LETTERHEAD<n>
5076\#
5077.MAC GREETING END
5078. if !'\\n(.z'' \{ .di \}
5079. di LETTERHEAD\\n+[#FIELD]
5080. LEFT
5081.END
5082\#
5083\#
5084\# CLOSING
5085\# -------
5086\# *Arguments:
5087\# <closing string>
5088\# *Function:
5089\# Stores greeting in diversion CLOSING.
5090\#
5091.MAC CLOSING END
5092. br
5093. nr #CLOSING 1
5094. di CLOSING
5095. LEFT
5096.END
5097\#
5098\#
5099\# NO SUITE
5100\# --------
5101\# *Arguments:
5102\# <none>
5103\# *Function:
5104\# Redefines $FOOTER_RIGHT to blank so that a suite number doesn't
5105\# appear at the bottom of letter pages.
5106\#
5107.MAC NO_SUITE END
5108. FOOTER_RIGHT ""
5109.END
5110\#
5111\# ====================================================================
5112\#
5113\# +++DEFAULTS+++
5114\#
465b256c
JR
5115\# TYPE-STYLE CONTROL MACROS
5116\# -------------------------
4d3e9548
JL
5117\# The control macros for family, font, size, quad and color are here
5118\# grouped together. Each (e.g. _FAMILY or _FONT) tests for a calling
5119\# alias before performing the action(s) appropriate to the calling
5120\# macro. Defaults for all these guys are set in DEFAULTS, and listed
5121\# in the "Control Macros" section of the documentation pertinent to
5122\# the macro whose style is to be changed.
465b256c
JR
5123\#
5124.MAC _FAMILY END
4d3e9548 5125. if '\\$0'AUTHOR_FAMILY'
465b256c
JR
5126. if '\\$0'BIBLIOGRAPHY_FAMILY' .ds $BIB_FAM \\$1
5127. if '\\$0'BIBLIOGRAPHY_STRING_FAMILY' .ds $BIB_STRING_FAM \\$1
5128. if '\\$0'BLOCKQUOTE_FAMILY' .ds $BQUOTE_FAM \\$1
5129. if '\\$0'CITATION_FAMILY' .ds $BQUOTE_FAM \\$1
5130. if '\\$0'CITE_FAMILY' .ds $BQUOTE_FAM \\$1
5131. if '\\$0'CHAPTER_TITLE_FAMILY' .ds $CHAPTER_TITLE_FAM \\$1
5132. if '\\$0'COVER_AUTHOR_FAMILY' .ds $COVER_AUTHOR_FAM \\$1
5133. if '\\$0'COVER_CHAPTER_TITLE_FAMILY' .ds $COVER_CHAPTER_TITLE_FAM \\$1
5134. if '\\$0'COVER_COPYRIGHT_FAMILY' .ds $COVER_COPYRIGHT_FAM \\$1
5135. if '\\$0'COVER_DOCTYPE_FAMILY' .ds $COVER_DOCTYPE_FAM \\$1
5136. if '\\$0'COVER_FAMILY' .ds $COVER_FAM \\$1
5137. if '\\$0'COVER_SUBTITLE_FAMILY' .ds $COVER_SUBTITLE_FAM \\$1
5138. if '\\$0'COVER_TITLE_FAMILY' .ds $COVER_TITLE_FAM \\$1
5139. if '\\$0'DOC_COVER_AUTHOR_FAMILY' .ds $DOC_COVER_AUTHOR_FAM \\$1
5140. if '\\$0'DOC_COVER_CHAPTER_TITLE_FAMILY' .ds $DOC_COVER_CHAPTER_TITLE_FAM \\$1
5141. if '\\$0'DOC_COVER_COPYRIGHT_FAMILY' .ds $DOC_COVER_COPYRIGHT_FAM \\$1
5142. if '\\$0'DOC_COVER_DOCTYPE_FAMILY' .ds $DOC_COVER_DOCTYPE_FAM \\$1
5143. if '\\$0'DOC_COVER_FAMILY' .ds $DOC_COVER_FAM \\$1
5144. if '\\$0'DOC_COVER_SUBTITLE_FAMILY' .ds $DOC_COVER_SUBTITLE_FAM \\$1
5145. if '\\$0'DOC_COVER_TITLE_FAMILY' .ds $DOC_COVER_TITLE_FAM \\$1
5146. if '\\$0'DOCHEADER_FAMILY' .ds $DOCHEADER_FAM \\$1
5147. if '\\$0'DOCTYPE_FAMILY' .ds $DOCTYPE_FAM \\$1
5148. if '\\$0'ENDNOTE_FAMILY' .ds $EN_FAM \\$1
5149. if '\\$0'ENDNOTE_NUMBER_FAMILY' .ds $EN_NUMBER_FAM \\$1
5150. if '\\$0'ENDNOTE_LINENUMBER_FAMILY' .ds $EN_LN_FAM \\$1
5151. if '\\$0'ENDNOTE_STRING_FAMILY' .ds $EN_STRING_FAM \\$1
5152. if '\\$0'ENDNOTE_TITLE_FAMILY' .ds $EN_TITLE_FAM \\$1
5153. if '\\$0'EPIGRAPH_FAMILY' .ds $EPI_FAM \\$1
5154. if '\\$0'FOOTNOTE_FAMILY' .ds $FN_FAM \\$1
5155. if '\\$0'HDRFTR_CENTER_FAMILY' .ds $HDRFTR_CENTER_FAM \\$1
5156. if '\\$0'HDRFTR_FAMILY' \{\
5157. ds $HDRFTR_FAM \\$1
5158. ds $HDRFTR_LEFT_FAM \\$1
5159. ds $HDRFTR_CENTER_FAM \\$1
5160. ds $HDRFTR_RIGHT_FAM \\$1
5161. \}
5162. if '\\$0'HDRFTR_LEFT_FAMILY' .ds $HDRFTR_LEFT_FAM \\$1
5163. if '\\$0'HDRFTR_RIGHT_FAMILY' .ds $HDRFTR_RIGHT_FAM \\$1
5164. if '\\$0'HEAD_FAMILY' .ds $HEAD_FAM \\$1
4d3e9548 5165. if '\\$0'LINENUMBER_FAMILY' .ds $LN_FAM \\$1
465b256c
JR
5166. if '\\$0'PAGENUM_FAMILY' .ds $PAGE_NUM_FAM \\$1
5167. if '\\$0'PARAHEAD_FAMILY' .ds $PH_FAM \\$1
5168. if '\\$0'QUOTE_FAMILY' .ds $QUOTE_FAM \\$1
5169. if '\\$0'SUBHEAD_FAMILY' .ds $SH_FAM \\$1
5170. if '\\$0'SUBTITLE_FAMILY' .ds $SUBTITLE_FAM \\$1
5171. if '\\$0'TITLE_FAMILY' .ds $TITLE_FAM \\$1
5172. if '\\$0'TOC_FAMILY' .ds $TOC_FAM \\$1
5173. if '\\$0'TOC_FAM' .ds $TOC_FAM \\$1
5174. if '\\$0'TOC_HEADER_FAMILY' .ds $TOC_HEADER_FAM \\$1
5175. if '\\$0'TOC_HEAD_FAMILY' .ds $TOC_HEAD_FAM \\$1
5176. if '\\$0'TOC_PARAHEAD_FAMILY' .ds $TOC_PH_FAM \\$1
5177. if '\\$0'TOC_PN_FAMILY' .ds $TOC_PN_FAM \\$1
5178. if '\\$0'TOC_SUBHEAD_FAMILY' .ds $TOC_SH_FAM \\$1
5179. if '\\$0'TOC_TITLE_FAMILY' .ds $TOC_TITLE_FAM \\$1
5180.END
5181\#
5182\#
5183.MAC _FONT END
5184. if '\\$0'AUTHOR_FONT' .ds $AUTHOR_FT \\$1
5185. if '\\$0'BIBLIOGRAPHY_FONT' .ds $BIB_FT \\$1
5186. if '\\$0'BIBLIOGRAPHY_STRING_FONT' .ds $BIB_STRING_FT \\$1
5187. if '\\$0'BLOCKQUOTE_FONT' .ds $BQUOTE_FT \\$1
5188. if '\\$0'CITATION_FONT' .ds $BQUOTE_FT \\$1
5189. if '\\$0'CITE_FONT' .ds $BQUOTE_FT \\$1
5190. if '\\$0'CHAPTER_TITLE_FONT' .ds $CHAPTER_TITLE_FT \\$1
5191. if '\\$0'COVER_AUTHOR_FONT' .ds $COVER_AUTHOR_FT \\$1
5192. if '\\$0'COVER_CHAPTER_TITLE_FONT' .ds $COVER_CHAPTER_TITLE_FT \\$1
5193. if '\\$0'COVER_COPYRIGHT_FONT' .ds $COVER_COPYRIGHT_FT \\$1
5194. if '\\$0'COVER_DOCTYPE_FONT' .ds $COVER_DOCTYPE_FT \\$1
5195. if '\\$0'COVER_SUBTITLE_FONT' .ds $COVER_SUBTITLE_FT \\$1
5196. if '\\$0'COVER_TITLE_FONT' .ds $COVER_TITLE_FT \\$1
5197. if '\\$0'DOC_COVER_AUTHOR_FONT' .ds $DOC_COVER_AUTHOR_FT \\$1
5198. if '\\$0'DOC_COVER_CHAPTER_TITLE_FONT' .ds $DOC_COVER_CHAPTER_TITLE_FT \\$1
5199. if '\\$0'DOC_COVER_COPYRIGHT_FONT' .ds $DOC_COVER_COPYRIGHT_FT \\$1
5200. if '\\$0'DOC_COVER_DOCTYPE_FONT' .ds $DOC_COVER_DOCTYPE_FT \\$1
5201. if '\\$0'DOC_COVER_SUBTITLE_FONT' .ds $DOC_COVER_SUBTITLE_FT \\$1
5202. if '\\$0'DOC_COVER_TITLE_FONT' .ds $DOC_COVER_TITLE_FT \\$1
5203. if '\\$0'DOCTYPE_FONT' .ds $DOCTYPE_FT \\$1
5204. if '\\$0'ENDNOTE_FONT' .ds $EN_FT \\$1
5205. if '\\$0'ENDNOTE_NUMBER_FONT' .ds $EN_NUMBER_FT \\$1
5206. if '\\$0'ENDNOTE_LINENUMBER_FONT' .ds $EN_LN_FT \\$1
5207. if '\\$0'ENDNOTE_STRING_FONT' .ds $EN_STRING_FT \\$1
5208. if '\\$0'ENDNOTE_TITLE_FONT' .ds $EN_TITLE_FT \\$1
5209. if '\\$0'EPIGRAPH_FONT' .ds $EPI_FT \\$1
5210. if '\\$0'FOOTNOTE_FONT' .ds $FN_FT \\$1
5211. if '\\$0'HDRFTR_CENTER_FONT' .ds $HDRFTR_CENTER_FT \\$1
5212. if '\\$0'HDRFTR_LEFT_FONT' .ds $HDRFTR_LEFT_FT \\$1
5213. if '\\$0'HDRFTR_RIGHT_FONT' .ds $HDRFTR_RIGHT_FT \\$1
5214. if '\\$0'HEAD_FONT' .ds $HEAD_FT \\$1
4d3e9548 5215. if '\\$0'LINENUMBER_FONT' .ds $LN_FT \\$1
465b256c
JR
5216. if '\\$0'PAGENUM_FONT' .ds $PAGE_NUM_FT \\$1
5217. if '\\$0'PARAHEAD_FONT' .ds $PH_FT \\$1
5218. if '\\$0'QUOTE_FONT' .ds $QUOTE_FT \\$1
5219. if '\\$0'SUBHEAD_FONT' .ds $SH_FT \\$1
5220. if '\\$0'SUBTITLE_FONT' .ds $SUBTITLE_FT \\$1
5221. if '\\$0'TITLE_FONT' .ds $TITLE_FT \\$1
5222. if '\\$0'TOC_HEADER_FONT' .ds $TOC_HEADER_FT \\$1
5223. if '\\$0'TOC_HEAD_FONT' .ds $TOC_HEAD_FT \\$1
5224. if '\\$0'TOC_PARAHEAD_FONT' .ds $TOC_PH_FT \\$1
5225. if '\\$0'TOC_PN_FONT' .ds $TOC_PN_FT \\$1
5226. if '\\$0'TOC_SUBHEAD_FONT' .ds $TOC_SH_FT \\$1
5227. if '\\$0'TOC_TITLE_FONT' .ds $TOC_TITLE_FT \\$1
5228.END
5229\#
5230\#
5231.MAC _SIZE END
5232. if '\\$0'AUTHOR_SIZE' .ds $AUTHOR_SIZE_CHANGE \\$1
5233. if '\\$0'BIBLIOGRAPHY_STRING_SIZE' .ds $BIB_STRING_SIZE_CHANGE \\$1
5234. if '\\$0'BLOCKQUOTE_SIZE' .ds $BQUOTE_SIZE_CHANGE \\$1
5235. if '\\$0'CITATION_SIZE' .ds $BQUOTE_SIZE_CHANGE \\$1
5236. if '\\$0'CITE_SIZE' .ds $BQUOTE_SIZE_CHANGE \\$1
5237. if '\\$0'CHAPTER_TITLE_SIZE' .ds $CHAPTER_TITLE_SIZE_CHANGE \\$1
5238. if '\\$0'COVER_AUTHOR_SIZE' .ds $COVER_AUTHOR_SIZE_CHANGE \\$1
5239. if '\\$0'COVER_CHAPTER_TITLE_SIZE' .ds $COVER_CHAPTER_TITLE_SIZE_CHANGE \\$1
5240. if '\\$0'COVER_COPYRIGHT_SIZE' .ds $COVER_COPYRIGHT_SIZE_CHANGE \\$1
5241. if '\\$0'COVER_DOCTYPE_SIZE' .ds $COVER_DOCTYPE_SIZE_CHANGE \\$1
5242. if '\\$0'COVER_SUBTITLE_SIZE' .ds $COVER_SUBTITLE_SIZE_CHANGE \\$1
5243. if '\\$0'COVER_TITLE_SIZE' .ds $COVER_TITLE_SIZE_CHANGE \\$1
5244. if '\\$0'DOC_COVER_AUTHOR_SIZE' .ds $DOC_COVER_AUTHOR_SIZE_CHANGE \\$1
5245. if '\\$0'DOC_COVER_CHAPTER_TITLE_SIZE' .ds $DOC_COVER_CHAPTER_TITLE_SIZE_CHANGE \\$1
5246. if '\\$0'DOC_COVER_COPYRIGHT_SIZE' .ds $DOC_COVER_COPYRIGHT_SIZE_CHANGE \\$1
5247. if '\\$0'DOC_COVER_DOCTYPE_SIZE' .ds $DOC_COVER_DOCTYPE_SIZE_CHANGE \\$1
5248. if '\\$0'DOC_COVER_SUBTITLE_SIZE' .ds $DOC_COVER_SUBTITLE_SIZE_CHANGE \\$1
5249. if '\\$0'DOC_COVER_TITLE_SIZE' .ds $DOC_COVER_TITLE_SIZE_CHANGE \\$1
5250. if '\\$0'DOCTYPE_SIZE' .ds $DOCTYPE_SIZE_CHANGE \\$1
5251. if '\\$0'ENDNOTE_NUMBER_SIZE' .ds $EN_NUMBER_SIZE_CHANGE \\$1
5252. if '\\$0'ENDNOTE_LINENUMBER_SIZE' .ds $EN_LN_SIZE_CHANGE \\$1
5253. if '\\$0'ENDNOTE_STRING_SIZE' .ds $EN_STRING_SIZE_CHANGE \\$1
4d3e9548 5254. if '\\$0'ENDNOTE_TITLE_SIZE' .ds $EN_TITLE_SIZE_CHANGE \\$1
465b256c
JR
5255. if '\\$0'EPIGRAPH_SIZE' .ds $EPI_SIZE_CHANGE \\$1
5256. if '\\$0'FOOTNOTE_SIZE' .ds $FN_SIZE_CHANGE \\$1
5257. if '\\$0'HDRFTR_CENTER_SIZE' .ds $HDRFTR_CENTER_SIZE_CHANGE \\$1
5258. if '\\$0'HDRFTR_LEFT_SIZE' .ds $HDRFTR_LEFT_SIZE_CHANGE \\$1
5259. if '\\$0'HDRFTR_RIGHT_SIZE' .ds $HDRFTR_RIGHT_SIZE_CHANGE \\$1
5260. if '\\$0'HDRFTR_SIZE' .ds $HDRFTR_SIZE_CHANGE \\$1
5261. if '\\$0'HEAD_SIZE' .ds $HEAD_SIZE_CHANGE \\$1
4d3e9548 5262. if '\\$0'LINENUMBER_SIZE' .ds $LN_SIZE_CHANGE \\$1
465b256c
JR
5263. if '\\$0'PAGENUM_SIZE' .ds $PAGE_NUM_SIZE_CHANGE \\$1
5264. if '\\$0'PARAHEAD_SIZE' .ds $PH_SIZE_CHANGE \\$1
5265. if '\\$0'QUOTE_SIZE' .ds $QUOTE_SIZE_CHANGE \\$1
5266. if '\\$0'SUBHEAD_SIZE' .ds $SH_SIZE_CHANGE \\$1
5267. if '\\$0'SUBTITLE_SIZE' .ds $SUBTITLE_SIZE_CHANGE \\$1
5268. if '\\$0'TITLE_SIZE' .ds $TITLE_SIZE_CHANGE \\$1
5269. if '\\$0'TOC_HEADER_SIZE' .ds $TOC_HEADER_SIZE_CHANGE \\$1
5270. if '\\$0'TOC_HEAD_SIZE' .ds $TOC_HEAD_SIZE_CHANGE \\$1
5271. if '\\$0'TOC_PARAHEAD_SIZE' .ds $TOC_PH_SIZE_CHANGE \\$1
5272. if '\\$0'TOC_PN_SIZE' .ds $TOC_PN_SIZE_CHANGE \\$1
5273. if '\\$0'TOC_SUBHEAD_SIZE' .ds $TOC_SH_SIZE_CHANGE \\$1
5274. if '\\$0'TOC_TITLE_SIZE' .ds $TOC_TITLE_SIZE_CHANGE \\$1
5275.END
5276\#
5277\#
5278.MAC _COLOR END
5279. if \\n[#PRINT_STYLE]=1 \{ .return \}
5280. if '\\$0'ATTRIBUTE_COLOR' \{\
5281. nr #ATTRIBUTE_COLOR 1
5282. ds $ATTRIBUTE_COLOR \\$1
92d0a6a6 5283. \}
465b256c
JR
5284. if '\\$0'AUTHOR_COLOR' \{\
5285. nr #AUTHOR_COLOR 1
5286. ds $AUTHOR_COLOR \\$1
92d0a6a6 5287. \}
465b256c
JR
5288. if '\\$0'BLOCKQUOTE_COLOR' \{\
5289. nr #BQUOTE_COLOR 1
5290. ds $BQUOTE_COLOR \\$1
92d0a6a6 5291. \}
465b256c
JR
5292. if '\\$0'CITATION_COLOR' \{\
5293. nr #BQUOTE_COLOR 1
5294. ds $BQUOTE_COLOR \\$1
92d0a6a6 5295. \}
465b256c
JR
5296. if '\\$0'CITE_COLOR' \{\
5297. nr #BQUOTE_COLOR 1
5298. ds $BQUOTE_COLOR \\$1
92d0a6a6 5299. \}
465b256c
JR
5300. if '\\$0'CHAPTER_TITLE_COLOR' \{\
5301. nr #CHAPTER_TITLE_COLOR 1
5302. ds $CHAPTER_TITLE_COLOR \\$1
5303. \}
5304. if '\\$0'COVER_ATTRIBUTE_COLOR' \{\
5305. nr #COVER_ATTRIBUTE_COLOR 1
5306. ds $COVER_ATTRIBUTE_COLOR \\$1
5307. \}
5308. if '\\$0'COVER_AUTHOR_COLOR' \{\
5309. nr #COVER_AUTHOR_COLOR 1
5310. ds $COVER_AUTHOR_COLOR \\$1
5311. \}
5312. if '\\$0'COVER_CHAPTER_TITLE_COLOR' \{\
5313. nr #COVER_CHAPTER_TITLE_COLOR 1
5314. ds $COVER_CHAPTER_TITLE_COLOR \\$1
5315. \}
5316. if '\\$0'COVER_COLOR' \{\
5317. nr #COVER_COLOR 1
5318. ds $COVER_COLOR \\$1
5319. \}
5320. if '\\$0'COVER_COPYRIGHT_COLOR' \{\
5321. nr #COVER_COPYRIGHT_COLOR 1
5322. ds $COVER_COPYRIGHT_COLOR \\$1
5323. \}
5324. if '\\$0'COVER_MISC_COLOR' \{\
5325. nr #COVER_MISC_COLOR 1
5326. ds $COVER_MISC_COLOR \\$1
5327. \}
5328. if '\\$0'COVER_TITLE_COLOR' \{\
5329. nr #COVER_TITLE_COLOR 1
5330. ds $COVER_TITLE_COLOR \\$1
5331. \}
5332. if '\\$0'COVER_SUBTITLE_COLOR' \{\
5333. nr #COVER_SUBTITLE_COLOR 1
5334. ds $COVER_SUBTITLE_COLOR \\$1
5335. \}
5336. if '\\$0'COVER_DOCTYPE_COLOR' \{\
5337. nr #COVER_DOCTYPE_COLOR 1
5338. ds $COVER_DOCTYPE_COLOR \\$1
5339. \}
5340. if '\\$0'DOC_COVER_ATTRIBUTE_COLOR' \{\
5341. nr #DOC_COVER_ATTRIBUTE_COLOR 1
5342. ds $DOC_COVER_ATTRIBUTE_COLOR \\$1
5343. \}
5344. if '\\$0'DOC_COVER_AUTHOR_COLOR' \{\
5345. nr #DOC_COVER_AUTHOR_COLOR 1
5346. ds $DOC_COVER_AUTHOR_COLOR \\$1
5347. \}
5348. if '\\$0'DOC_COVER_CHAPTER_TITLE_COLOR' \{\
5349. nr #DOC_COVER_CHAPTER_TITLE_COLOR 1
5350. ds $DOC_COVER_CHAPTER_TITLE_COLOR \\$1
5351. \}
5352. if '\\$0'DOC_COVER_COLOR' \{\
5353. nr #DOC_COVER_COLOR 1
5354. ds $DOC_COVER_COLOR \\$1
5355. \}
5356. if '\\$0'DOC_COVER_COPYRIGHT_COLOR' \{\
5357. nr #DOC_COVER_COPYRIGHT_COLOR 1
5358. ds $DOC_COVER_COPYRIGHT_COLOR \\$1
5359. \}
5360. if '\\$0'DOC_COVER_MISC_COLOR' \{\
5361. nr #DOC_COVER_MISC_COLOR 1
5362. ds $DOC_COVER_MISC_COLOR \\$1
5363. \}
5364. if '\\$0'DOC_COVER_TITLE_COLOR' \{\
5365. nr #DOC_COVER_TITLE_COLOR 1
5366. ds $DOC_COVER_TITLE_COLOR \\$1
5367. \}
5368. if '\\$0'DOC_COVER_SUBTITLE_COLOR' \{\
5369. nr #DOC_COVER_SUBTITLE_COLOR 1
5370. ds $DOC_COVER_SUBTITLE_COLOR \\$1
5371. \}
5372. if '\\$0'DOC_COVER_DOCTYPE_COLOR' \{\
5373. nr #DOC_COVER_DOCTYPE_COLOR 1
5374. ds $DOC_COVER_DOCTYPE_COLOR \\$1
5375. \}
5376. if '\\$0'DOCHEADER_COLOR' \{\
5377. nr #DOCHEADER_COLOR 1
5378. ds $DOCHEADER_COLOR \\$1
5379. \}
5380. if '\\$0'DOCTYPE_COLOR' \{\
5381. nr #DOCTYPE_COLOR 1
5382. ds $DOCTYPE_COLOR \\$1
5383. \}
5384. if '\\$0'EPIGRAPH_COLOR' \{\
5385. nr #EPI_COLOR 1
5386. ds $EPI_COLOR \\$1
5387. \}
5388. if '\\$0'FINIS_COLOR' \{\
5389. nr #FINIS_COLOR 1
5390. ds $FINIS_COLOR \\$1
5391. \}
5392. if '\\$0'FOOTNOTE_COLOR' \{\
5393. nr #FOOTNOTE_COLOR 1
5394. ds $FOOTNOTE_COLOR \\$1
5395. \}
5396. if '\\$0'HDRFTR_CENTER_COLOR' \{\
5397. nr #HDRFTR_CENTER_COLOR 1
5398. ds $HDRFTR_CENTER_COLOR \\$1
5399. \}
5400. if '\\$0'HDRFTR_COLOR' \{\
5401. nr #HDRFTR_COLOR 1
5402. ds $HDRFTR_COLOR \\$1
5403. \}
5404. if '\\$0'HDRFTR_LEFT_COLOR' \{\
5405. nr #HDRFTR_LEFT_COLOR 1
5406. ds $HDRFTR_LEFT_COLOR \\$1
5407. \}
5408. if '\\$0'HDRFTR_RIGHT_COLOR' \{\
5409. nr #HDRFTR_RIGHT_COLOR 1
5410. ds $HDRFTR_RIGHT_COLOR \\$1
5411. \}
5412. if '\\$0'HDRFTR_RULE_COLOR' \{\
5413. nr #HDRFTR_RULE_COLOR 1
5414. ds $HDRFTR_RULE_COLOR \\$1
5415. \}
5416. if '\\$0'HEAD_COLOR' \{\
5417. nr #HEAD_COLOR 1
5418. ds $HEAD_COLOR \\$1
5419. \}
5420. if '\\$0'LINEBREAK_COLOR' \{\
5421. nr #LINEBREAK_COLOR 1
5422. ds $LINEBREAK_COLOR \\$1
5423. \}
4d3e9548
JL
5424. if '\\$0'LINENUMBER_COLOR' \{\
5425. nr #LINENUMBER_COLOR 1
5426. ds $LN_COLOR \\$1
5427. \}
465b256c
JR
5428. if '\\$0'PAGENUM_COLOR' \{\
5429. nr #PAGE_NUM_COLOR 1
5430. ds $PAGENUM_COLOR \\$1
5431. \}
5432. if '\\$0'PARAHEAD_COLOR' \{\
5433. nr #PH_COLOR 1
5434. ds $PH_COLOR \\$1
5435. \}
5436. if '\\$0'QUOTE_COLOR' \{\
5437. nr #QUOTE_COLOR 1
5438. ds $QUOTE_COLOR \\$1
5439. \}
5440. if '\\$0'SUBHEAD_COLOR' \{\
5441. nr #SH_COLOR 1
5442. ds $SH_COLOR \\$1
5443. \}
5444. if '\\$0'SUBTITLE_COLOR' \{\
5445. nr #SUBTITLE_COLOR 1
5446. ds $SUBTITLE_COLOR \\$1
5447. \}
5448. if '\\$0'TITLE_COLOR' \{\
5449. nr #TITLE_COLOR 1
5450. ds $TITLE_COLOR \\$1
5451. \}
5452.END
5453\#
5454\#
5455.MAC _QUAD END
5456. if '\\$0'BIBLIOGRAPHY_QUAD' \{\
5457. ds $BIB_QUAD \\$1
5458. if '\\*[$BIB_QUAD]'R' .ab Fatal error: \\$0 must be set to either L or J
5459. if '\\*[$BIB_QUAD]'C' .ab Fatal error: \\$0 must be set to either L or J
5460. \}
5461. if '\\$0'BIBLIOGRAPHY_STRING_QUAD' .ds $BIB_STRING_QUAD \\$1
5462. if '\\$0'BLOCKQUOTE_QUAD' .ds $BQUOTE_QUAD \\$1
5463. if '\\$0'CITATION_QUAD' .ds $BQUOTE_QUAD \\$1
5464. if '\\$0'CITE_QUAD' .ds $BQUOTE_QUAD \\$1
5465. if '\\$0'COVER_COPYRIGHT_QUAD' .ds $COVER_COPYRIGHT_QUAD \\$1
5466. if '\\$0'COVER_MISC_QUAD' .ds $COVER_MISC_QUAD \\$1
5467. if '\\$0'DOC_COVER_COPYRIGHT_QUAD' .ds $DOC_COVER_COPYRIGHT_QUAD \\$1
5468. if '\\$0'DOC_COVER_MISC_QUAD' .ds $DOC_COVER_MISC_QUAD \\$1
5469. if '\\$0'DOC_QUAD' \{\
5470. ds $DOC_QUAD \\$1
5471. QUAD \\*[$DOC_QUAD]
5472. \}
5473. if '\\$0'ENDNOTE_QUAD' \{\
5474. ds $EN_QUAD \\$1
5475. if '\\*[$EN_QUAD]'R' .ab Fatal error: \\$0 must be set to either L or J
5476. if '\\*[$EN_QUAD]'C' .ab Fatal error: \\$0 must be set to either L or J
5477. \}
5478. if '\\$0'ENDNOTE_STRING_QUAD' .ds $EN_STRING_QUAD \\$1
5479. if '\\$0'ENDNOTE_TITLE_QUAD' .ds $EN_TITLE_QUAD \\$1
5480. if '\\$0'EPIGRAPH_QUAD' .ds $EPI_QUAD \\$1
5481. if '\\$0'FOOTNOTE_QUAD' .ds $FN_QUAD \\$1
5482. if '\\$0'HEAD_QUAD' .ds $HEAD_QUAD \\$1
5483. if '\\$0'SUBHEAD_QUAD' .ds $SH_QUAD \\$1
5484. if '\\$0'TOC_HEADER_QUAD' .ds $TOC_HEADER_QUAD \\$1
5485.END
5486\#
5487\#
5488\# DEFAULTS
5489\# --------
5490\# *Arguments:
5491\# <none>
5492\# *Function:
5493\# Sets up defaults if no values are entered prior to START.
5494\# *Notes:
5495\# The defaults for $CHAPTER_STRING, $DRAFT_STRING, and
5496\# $REVISION_STRING are in the COPYSTYLE macro.
5497\#
5498.MAC DEFAULTS END
5499. if !d$PAPER \{ .PAPER LETTER \}
5500. if !\\n[#DOC_TYPE] \{ .DOCTYPE DEFAULT \}
5501. ie \\n[#PAGENUM_STYLE_SET] \{ .PAGENUM_STYLE \\*[$PAGENUM_STYLE] \}
5502. el \{\
5503. if !\\n[#COPY_STYLE]=1 \{ .PAGENUM_STYLE DIGIT \}
5504. \}
5505. if !\\n[#COPY_STYLE] \{ .COPYSTYLE FINAL \}
5506. if \\n[#DRAFT_WITH_PAGENUM] \{ .COPYSTYLE \\*[$COPY_STYLE] \}
5507. if \\n[#DOC_TYPE]=4 \{\
5508. if !\\n[#USER_SET_L_LENGTH] \{\
5509. R_MARGIN \\n[#R_MARGIN]u
5510. rr #USER_SET_L_LENGTH
5511. \}
5512. if \\n[#PRINT_STYLE]=1 \{ .PRINTSTYLE TYPEWRITE SINGLESPACE \}
5513. \}
5514. if \\n[#COPY_STYLE]=1 \{\
5515. COPYSTYLE DRAFT
5516. PAGENUMBER 1
5517. \}
5518. if !r#DOC_HEADER \{ .DOCHEADER \}
5519. if !r#HEADERS_ON \{ .HEADERS \}
5520. if !r#PAGINATE \{ .PAGINATE \}
5521. if \\n[#FOOTERS_ON] \{\
5522. HEADERS OFF
5523. if \\n[#PAGE_NUM_POS_SET]=0 \{ .PAGENUM_POS TOP CENTER \}
5524. \}
5525. if !r#HEADER_MARGIN \{ .HEADER_MARGIN 4P+6p \}
5526. if !r#HEADER_GAP \{ .HEADER_GAP 3P \}
5527. if \\n[#FOOTERS_ON] \{\
5528. if \\n[#PAGINATE]=0 \{\
5529. if !r#T_MARGIN \{ .T_MARGIN 6P \}
5530. \}
5531. \}
5532. if \\n[#HEADERS_ON]=0 \{\
5533. if \\n[#FOOTERS_ON]=0 \{\
5534. if !r#T_MARGIN \{ .T_MARGIN 6P \}
5535. \}
92d0a6a6
JR
5536. \}
5537. if !r#T_MARGIN \{ .T_MARGIN \\n[#HEADER_MARGIN]+\\n[#HEADER_GAP] \}
465b256c 5538. if !r#DOCHEADER_ADVANCE \{ .nr #DOCHEADER_ADVANCE \\n[#T_MARGIN] \}
92d0a6a6
JR
5539. if !r#FOOTER_MARGIN \{ .FOOTER_MARGIN 3P \}
5540. if !r#FOOTER_GAP \{ .FOOTER_GAP 3P \}
5541. if !r#B_MARGIN \{ .B_MARGIN \\n[#FOOTER_MARGIN]u+\\n[#FOOTER_GAP]u \}
5542. if (\\n[#FOOTER_MARGIN]+\\n(.v)>\\n[#B_MARGIN] \{\
5543. tm1 "[mom]: Your chosen bottom margin for running text is too close to the footer margin.
5544. tm1 " No footers or bottom-of-page page numbers will be printed.
5545. tm1 " Please reset B_MARGIN or FOOTER_MARGIN to allow enough space.
5546. tm1 " If no footers or bottom-of-page page numbers are required,
465b256c 5547. tm1 " type in .FOOTER_MARGIN 0 before .START
92d0a6a6 5548. \}
4d3e9548
JL
5549. if !r#HEADER_RULE_GAP \{ .HEADER_RULE_GAP 4p \}
5550. if !r#FOOTER_RULE_GAP \{ .FOOTER_RULE_GAP 4p \}
92d0a6a6
JR
5551. if !r#HDRFTR_RULE \{ .HDRFTR_RULE \}
5552. if !r#PAGE_NUM_SET \{ .PAGENUMBER 1 \}
465b256c 5553.\" Read in number registers and strings for type parameters
92d0a6a6
JR
5554. nr #DOC_L_MARGIN \\n[#L_MARGIN]
5555. nr #DOC_L_LENGTH \\n[#L_LENGTH]
5556. nr #DOC_R_MARGIN \\n[#PAGE_WIDTH]-(\\n[#DOC_L_MARGIN]+\\n[#L_LENGTH])
5557. ds $DOC_FAM \\*[$FAMILY]
5558. nr #DOC_PT_SIZE \\n[#PT_SIZE]
5559. nr #DOC_LEAD \\n[#LEAD]
465b256c
JR
5560.\" #SAVED_DOC_LEAD is set in COLLATE
5561. if r#SAVED_DOC_LEAD \{\
5562. if !\\n[#DOC_LEAD]=\\n[#SAVED_DOC_LEAD] \{ .nr #RERUN_TRAPS 1 \}
5563. \}
5564. ie \\n[#ADJ_DOC_LEAD]=1 \{ . \}
5565. el \{\
5566. if !\\n[#DOC_LEAD_ADJUST_OFF] \{\
5567. DOC_LEAD_ADJUST
5568. \}
5569. \}
4d3e9548
JL
5570. ds $DOC_QUAD \\*[$QUAD_VALUE]
5571. if '\\*[$FONT]'' \{ .FT R \}
5572. if '\\*[$PP_FT]'' \{\
5573. ds $PP_FT \\*[$FONT]
5574. \}
5575. if !'\\*[$PP_FT]'' \{\
5576. ds $PP_FT \\*[$FONT]
5577. \}
465b256c 5578.\" Counters
92d0a6a6
JR
5579. nr #PP 0
5580. nr #FN_NUMBER 0 1
5581. nr #EN_NUMBER 0 1
5582. nr #FN_COUNT_FOR_COLS 0 1
465b256c 5583. nr #DONE_ONCE 0 1
92d0a6a6
JR
5584. RESET_HEAD_NUMBER
5585. RESET_SUBHEAD_NUMBER
5586. RESET_PARAHEAD_NUMBER
465b256c 5587.\" General style defaults for both PRINTSTYLEs
92d0a6a6
JR
5588. nr #PP_STYLE 1
5589. PARA_INDENT \\n[#PP_INDENT]u
5590. if !d$HDRFTR_FAM \{ .HDRFTR_FAMILY \\*[$DOC_FAM] \}
5591. if !d$HDRFTR_SIZE_CHANGE \{ .HDRFTR_SIZE +0 \}
5592. if !d$PAGE_NUM_FAM \{ .PAGENUM_FAMILY \\*[$DOC_FAM] \}
5593. if !d$PAGE_NUM_FT \{ .PAGENUM_FONT R \}
5594. if !d$PAGE_NUM_SIZE_CHANGE \{ .PAGENUM_SIZE +0 \}
5595. if !r#PAGE_NUM_POS_SET \{ .PAGENUM_POS BOTTOM CENTER \}
5596. ie \\n[#PAGE_NUM_HYPHENS_SET] \{\
5597. if \\n[#PAGE_NUM_HYPHENS]=0 \{ .PAGENUM_HYPHENS OFF \}
5598. if \\n[#PAGE_NUM_HYPHENS]=1 \{ .PAGENUM_HYPHENS \}
5599. \}
5600. el \{ .PAGENUM_HYPHENS \}
5601. if !d$HEAD_QUAD \{ .HEAD_QUAD CENTER \}
5602. if !r#HEAD_CAPS \{ .HEAD_CAPS \}
5603. if !r#HEAD_UNDERLINE \{ .HEAD_UNDERLINE \}
5604. if !d$SH_QUAD \{ .SUBHEAD_QUAD LEFT \}
5605. if !r#HDRFTR_RIGHT_CAPS \{ .HDRFTR_RIGHT_CAPS \}
5606. if \\n[#HDRFTR_RIGHT_CAPS]=0 \{\
5607. if !d$HDRFTR_RIGHT_SIZE_CHANGE \{ .HDRFTR_RIGHT_SIZE +0 \}
5608. \}
465b256c
JR
5609. if !d$FN_FAM \{ .FOOTNOTE_FAMILY \\*[$DOC_FAM] \}
5610. if !d$FN_FT \{ .FOOTNOTE_FONT R \}
5611. if !d$FN_QUAD \{ .FOOTNOTE_QUAD \\*[$DOC_QUAD] \}
5612. if !r#FN_RULE \{ .FOOTNOTE_RULE \}
5613. if !r#FN_MARKERS \{ .FOOTNOTE_MARKERS \}
4d3e9548
JL
5614. if \\n[#FN_MARKERS]=1 \{\
5615. if !\\n[#FN_MARKER_STYLE] \{ .FOOTNOTE_MARKER_STYLE STAR \}
5616. \}
465b256c
JR
5617. if !\\n[#EN_MARKER_STYLE] \{ .ENDNOTE_MARKER_STYLE NUMBER \}
5618. if !d$EN_PN_STYLE \{ .ENDNOTES_PAGENUM_STYLE digit \}
5619. if !d$EN_FAM \{ .ENDNOTE_FAMILY \\*[$DOC_FAM] \}
5620. if !d$EN_FT \{ .ENDNOTE_FONT R \}
5621. if !d$EN_QUAD \{ .ENDNOTE_QUAD \\*[$DOC_QUAD] \}
5622. if !d$EN_STRING \{ .ENDNOTE_STRING "Endnotes" \}
5623. if !d$EN_STRING_FAM \{ .ENDNOTE_STRING_FAMILY \\*[$EN_FAM] \}
5624. if !d$EN_STRING_QUAD \{ .ENDNOTE_STRING_QUAD CENTER \}
4d3e9548 5625. if !r#EN_STRING_UNDERLINE \{ .nr #EN_STRING_UNDERLINE 2 \}
465b256c 5626. if !r#EN_STRING_CAPS \{ .ENDNOTE_STRING_CAPS \}
92d0a6a6
JR
5627. if !d$EN_TITLE \{\
5628. ie \\n[#DOC_TYPE]=2 \{\
4d3e9548
JL
5629. ie !'\\*[$CHAPTER_TITLE_1]'' \{\
5630. ie '\\*[$CHAPTER]'' \{ .ENDNOTE_TITLE "\\*[$CHAPTER_TITLE]" \}
5631. el \{ .ENDNOTE_TITLE "\\*[$CHAPTER_STRING] \\*[$CHAPTER]: \\*[$CHAPTER_TITLE]" \}
5632. \}
5633. el \{\
5634. ie '\\*[$CHAPTER]'' \{ .ENDNOTE_TITLE "\\*[$CHAPTER_STRING]" \}
5635. el \{ .ENDNOTE_TITLE "\\*[$CHAPTER_STRING] \\*[$CHAPTER]" \}
5636. \}
5637. \}
5638. el \{ .ENDNOTE_TITLE "\\*[$TITLE]" \}
5639. \}
5640. if !d$EN_TITLE_FAM \{ .ENDNOTE_TITLE_FAMILY \\*[$EN_FAM] \}
5641. if !d$EN_TITLE_QUAD \{ .ENDNOTE_TITLE_QUAD LEFT \}
5642. if !r#EN_TITLE_UNDERLINE \{ .nr #EN_TITLE_UNDERLINE 1 \}
5643. if !d$EN_NUMBER_FAM \{ .ENDNOTE_NUMBER_FAMILY \\*[$EN_FAM] \}
5644. if !d$EN_LN_FAM \{ .ENDNOTE_LINENUMBER_FAMILY \\*[$EN_FAM] \}
5645. if !r#EN_NUMBERS_ALIGN_LEFT \{\
92d0a6a6
JR
5646. if !r#EN_NUMBERS_ALIGN_RIGHT \{ .ENDNOTE_NUMBERS_ALIGN_RIGHT 2 \}
5647. \}
4d3e9548
JL
5648. if !d$EN_LN_GAP \{ .ENDNOTE_LINENUMBER_GAP 1.5n \}
5649. if !r#EN_ALLOWS_HEADERS \{ .ENDNOTES_ALLOWS_HEADERS \}
465b256c
JR
5650. if !d$BIB_PN_STYLE \{ .BIBLIOGRAPHY_PAGENUM_STYLE digit \}
5651. if !d$BIB_FAM \{ .BIBLIOGRAPHY_FAMILY \\*[$DOC_FAM] \}
5652. if !d$BIB_FT \{ .BIBLIOGRAPHY_FONT R \}
5653. if !d$BIB_QUAD \{ .BIBLIOGRAPHY_QUAD \\*[$DOC_QUAD] \}
5654. if !d$BIB_STRING \{ .BIBLIOGRAPHY_STRING "Bibliography" \}
5655. if !d$BIB_STRING_FAM \{ .BIBLIOGRAPHY_STRING_FAMILY \\*[$BIB_FAM] \}
5656. if !d$BIB_STRING_QUAD \{ .BIBLIOGRAPHY_STRING_QUAD CENTER \}
4d3e9548 5657. if !r#BIB_STRING_UNDERLINE \{ .nr #BIB_STRING_UNDERLINE 2 \}
465b256c
JR
5658. if !r#BIB_STRING_CAPS \{ .BIBLIOGRAPHY_STRING_CAPS \}
5659. if !d$TOC_HEADER_STRING \{ .TOC_HEADER_STRING "Contents" \}
5660. if !d$TOC_HEADER_QUAD \{ .TOC_HEADER_QUAD LEFT \}
5661. if !d$TOC_PN_STYLE \{ .TOC_PAGENUM_STYLE roman \}
5662. if !r#TOC_PN_PADDING \{ .TOC_PADDING 3 \}
5663. if !r#TOC_TITLE_INDENT \{ .TOC_TITLE_INDENT 0 \}
465b256c 5664.\" String defaults for both PRINTSTYLEs
92d0a6a6
JR
5665. ie \\n[#DOC_TYPE]=1 \{\
5666. ie '\\*[$DOC_TITLE]'' \{\
465b256c 5667. if \\n[#USER_DEF_HDRFTR_LEFT]=0 .ds $HDRFTR_LEFT \\*[$AUTHOR_1]
465b256c 5668. if \\n[#USER_DEF_HDRFTR_RIGHT]=0 .ds $HDRFTR_RIGHT \\*[$TITLE]
92d0a6a6
JR
5669. \}
5670. el \{\
5671. if \\n[#COPY_STYLE]=1 \{ .DRAFT_WITH_PAGENUMBER \}
465b256c 5672. if \\n[#USER_DEF_HDRFTR_LEFT]=0 .ds $HDRFTR_LEFT \\*[$AUTHOR_1]
465b256c 5673. if \\n[#USER_DEF_HDRFTR_CENTER]=0 .ds $HDRFTR_CENTER \\*[$TITLE]
465b256c 5674. if \\n[#USER_DEF_HDRFTR_RIGHT]=0 .ds $HDRFTR_RIGHT \\*[$DOC_TITLE]
92d0a6a6
JR
5675. \}
5676. \}
5677. el \{\
465b256c 5678. if \\n[#USER_DEF_HDRFTR_LEFT]=0 .ds $HDRFTR_LEFT \\*[$AUTHOR_1]
465b256c 5679. if \\n[#USER_DEF_HDRFTR_RIGHT]=0 .ds $HDRFTR_RIGHT \\*[$TITLE]
92d0a6a6 5680. \}
4d3e9548
JL
5681. if !d$ATTRIBUTE_STRING .ds $ATTRIBUTE_STRING by
5682. if !d$FINIS_STRING \{ .FINIS_STRING "End" \}
5683. if !r#FINIS_STRING_CAPS \{ .nr #FINIS_STRING_CAPS 1 \}
465b256c
JR
5684.\" Covers
5685. if !r#DOC_COVERS_OFF \{ .nr #DOC_COVERS 1 \}
5686. if !r#COVERS_OFF \{ .nr #COVERS 1 \}
5687. if !d$COVER_COPYRIGHT_QUAD \{ .COVER_COPYRIGHT_QUAD R \}
5688. if !d$COVER_MISC_QUAD \{ .COVER_MISC_QUAD L \}
5689. if !d$DOC_COVER_COPYRIGHT_QUAD \{ .DOC_COVER_COPYRIGHT_QUAD R \}
5690. if !d$DOC_COVER_MISC_QUAD \{ .DOC_COVER_MISC_QUAD L \}
4d3e9548
JL
5691. if !r#DOCCOVER_UNDERLINE \{ .DOC_COVER_UNDERLINE \}
5692. if !r#COVER_UNDERLINE \{ .COVER_UNDERLINE \}
465b256c 5693.\" Defaults for printstyle TYPEWRITE
92d0a6a6
JR
5694. if \\n[#PRINT_STYLE]=1 \{\
5695. if \\n[#UNDERLINE_QUOTES]=1 \{ .UNDERLINE_QUOTES \}
5696. if \\n[#UNDERLINE_QUOTES]=0 \{ .UNDERLINE_QUOTES OFF \}
465b256c 5697.\" +Quotes and blockquotes
4d3e9548
JL
5698. if !r#Q_OFFSET_VALUE \{\
5699. if '\\*[$Q_OFFSET_VALUE]'' \{ .QUOTE_INDENT 2 \}
5700. \}
465b256c 5701.\" +Epigraphs
4d3e9548
JL
5702. if !r#EPI_OFFSET_VALUE \{\
5703. if '\\*[$EPI_OFFSET_VALUE]'' \{ .EPIGRAPH_INDENT 2 \}
5704. \}
465b256c 5705.\" +Linebreaks
92d0a6a6 5706. if !d$LINEBREAK_CHAR \{ .LINEBREAK_CHAR * 3 2p \}
465b256c 5707.\" +Footnotes
92d0a6a6
JR
5708. if !d$FN_SIZE_CHANGE \{ .FOOTNOTE_SIZE +0 \}
5709. if !r#FN_RULE_LENGTH \{ .FOOTNOTE_RULE_LENGTH 2i \}
465b256c
JR
5710.\" +Paragraph heads
5711. if !r#PH_INDENT \{ .PARAHEAD_INDENT \\n[#PP_INDENT]u/2u \}
5712.\" +Endnotes
5713. if !r#EN_PP_INDENT \{ .ENDNOTE_PARA_INDENT \\n[#PP_INDENT] \}
5714.\" +Footnotes
92d0a6a6 5715. if !r#FN_RULE_ADJ \{ .FOOTNOTE_RULE_ADJ 6p \}
465b256c 5716.\" +Slant stuff
92d0a6a6
JR
5717. if !r#SLANT_MEANS_SLANT \{\
5718. ie \\n[#UNDERLINE_SLANT]=1 \{ .UNDERLINE_SLANT \}
5719. el \{ .UNDERLINE_SLANT OFF \}
5720. \}
92d0a6a6 5721. \}
465b256c 5722.\" Defaults for printstyle TYPESET
92d0a6a6 5723. if \\n[#PRINT_STYLE]=2 \{\
4d3e9548 5724. if !d$DOCHEADER_LEAD_ADJ \{ .DOCHEADER_LEAD +0 \}
465b256c
JR
5725.\" +Cover
5726. if !d$COVER_LEAD_ADJ \{ .COVER_LEAD +0 \}
5727. if !d$COVER_FAM \{ .COVER_FAMILY \\*[$DOC_FAM] \}
5728.\" (title)
5729. if !d$COVER_TITLE_FAM \{\
5730. ie !d$COVER_FAM \{ .COVER_TITLE_FAMILY \\*[$DOC_FAM] \}
5731. el \{ .COVER_TITLE_FAMILY \\*[$COVER_FAM] \}
5732. \}
5733. if !d$COVER_TITLE_FT \{ .COVER_TITLE_FONT B \}
5734. if !d$COVER_TITLE_SIZE_CHANGE \{ .COVER_TITLE_SIZE +3.5 \}
5735.\" (chapter title)
5736. if !d$COVER_CHAPTER_TITLE_FAM \{\
5737. ie !d$COVER_FAM \{ .COVER_CHAPTER_TITLE_FAMILY \\*[$DOC_FAM] \}
5738. el \{ .COVER_CHAPTER_TITLE_FAMILY \\*[$COVER_FAM] \}
5739. \}
5740. if !d$COVER_CHAPTER_TITLE_FT \{ .COVER_CHAPTER_TITLE_FONT BI \}
5741. if !d$COVER_CHAPTER_TITLE_SIZE_CHANGE \{ .COVER_CHAPTER_TITLE_SIZE +4 \}
5742.\" (subtitle)
5743. if !d$COVER_SUBTITLE_FAM \{\
5744. ie !d$COVER_FAM \{ .COVER_SUBTITLE_FAMILY \\*[$DOC_FAM] \}
5745. el \{ .COVER_SUBTITLE_FAMILY \\*[$COVER_FAM] \}
5746. \}
5747. if !d$COVER_SUBTITLE_FT \{ .COVER_SUBTITLE_FONT R \}
5748. if !d$COVER_SUBTITLE_SIZE_CHANGE \{ .COVER_SUBTITLE_SIZE +0 \}
5749.\" (attribution and author[s])
5750. if !d$COVER_AUTHOR_FAM \{\
5751. ie !d$COVER_FAM \{ .COVER_AUTHOR_FAMILY \\*[$DOC_FAM] \}
5752. el \{ .COVER_AUTHOR_FAMILY \\*[$COVER_FAM] \}
5753. \}
5754. if !d$COVER_AUTHOR_FT \{ .COVER_AUTHOR_FONT I \}
5755. if !d$COVER_AUTHOR_SIZE_CHANGE \{ .COVER_AUTHOR_SIZE +0 \}
5756.\" (doctype if "named")
5757. if !d$COVER_DOCTYPE_FAM \{\
5758. ie !d$COVER_FAM \{ .COVER_DOCTYPE_FAMILY \\*[$DOC_FAM] \}
5759. el \{ .COVER_DOCTYPE_FAMILY \\*[$COVER_FAM] \}
5760. \}
5761. if !d$COVER_DOCTYPE_FT \{ .COVER_DOCTYPE_FONT BI \}
5762. if !d$COVER_DOCTYPE_SIZE_CHANGE \{ .COVER_DOCTYPE_SIZE +3 \}
5763.\" (copyright)
5764. if !d$COVER_COPYRIGHT_FAM \{\
5765. ie !d$COVER_FAM \{ .COVER_COPYRIGHT_FAMILY \\*[$DOC_FAM] \}
5766. el \{ .COVER_COPYRIGHT_FAMILY \\*[$COVER_FAM] \}
5767. \}
5768. if !d$COVER_COPYRIGHT_FT \{ .COVER_COPYRIGHT_FONT R \}
5769. if !d$COVER_COPYRIGHT_SIZE_CHANGE \{ .COVER_COPYRIGHT_SIZE -2 \}
5770.\" +Doc cover
5771. if !d$DOC_COVER_LEAD_ADJ \{ .DOC_COVER_LEAD +0 \}
5772. if !d$DOC_COVER_FAM \{ .DOC_COVER_FAMILY \\*[$DOC_FAM] \}
5773.\" (title)
5774. if !d$DOC_COVER_TITLE_FAM \{\
5775. ie !d$DOC_COVER_FAM \{ .DOC_COVER_TITLE_FAMILY \\*[$DOC_FAM] \}
5776. el \{ .DOC_COVER_TITLE_FAMILY \\*[$DOC_COVER_FAM] \}
5777. \}
5778. if !d$DOC_COVER_TITLE_FT \{ .DOC_COVER_TITLE_FONT B \}
5779. if !d$DOC_COVER_TITLE_SIZE_CHANGE \{ .DOC_COVER_TITLE_SIZE +3.5 \}
5780.\" (chapter title)
5781. if !d$DOC_COVER_CHAPTER_TITLE_FAM \{\
5782. ie !d$DOC_COVER_FAM \{ .DOC_COVER_CHAPTER_TITLE_FAMILY \\*[$DOC_FAM] \}
5783. el \{ .DOC_COVER_CHAPTER_TITLE_FAMILY \\*[$DOC_COVER_FAM] \}
5784. \}
5785. if !d$DOC_COVER_CHAPTER_TITLE_FT \{ .DOC_COVER_CHAPTER_TITLE_FONT BI \}
5786. if !d$DOC_COVER_CHAPTER_TITLE_SIZE_CHANGE \{ .DOC_COVER_CHAPTER_TITLE_SIZE +4 \}
5787.\" (subtitle)
5788. if !d$DOC_COVER_SUBTITLE_FAM \{\
5789. ie !d$DOC_COVER_FAM \{ .DOC_COVER_SUBTITLE_FAMILY \\*[$DOC_FAM] \}
5790. el \{ .DOC_COVER_SUBTITLE_FAMILY \\*[$DOC_COVER_FAM] \}
5791. \}
5792. if !d$DOC_COVER_SUBTITLE_FT \{ .DOC_COVER_SUBTITLE_FONT R \}
5793. if !d$DOC_COVER_SUBTITLE_SIZE_CHANGE \{ .DOC_COVER_SUBTITLE_SIZE +0 \}
5794.\" (attribution and author[s])
5795. if !d$DOC_COVER_AUTHOR_FAM \{\
5796. ie !d$DOC_COVER_FAM \{ .DOC_COVER_AUTHOR_FAMILY \\*[$DOC_FAM] \}
5797. el \{ .DOC_COVER_AUTHOR_FAMILY \\*[$DOC_COVER_FAM] \}
5798. \}
5799. if !d$DOC_COVER_AUTHOR_FT \{ .DOC_COVER_AUTHOR_FONT I \}
5800. if !d$DOC_COVER_AUTHOR_SIZE_CHANGE \{ .DOC_COVER_AUTHOR_SIZE +0 \}
5801.\" (doctype if "named")
5802. if !d$DOC_COVER_DOCTYPE_FAM \{\
5803. ie !d$DOC_COVER_FAM \{ .DOC_COVER_DOCTYPE_FAMILY \\*[$DOC_FAM] \}
5804. el \{ .DOC_COVER_DOCTYPE_FAMILY \\*[$DOC_COVER_FAM] \}
5805. \}
5806. if !d$DOC_COVER_DOCTYPE_FT \{ .DOC_COVER_DOCTYPE_FONT BI \}
5807. if !d$DOC_COVER_DOCTYPE_SIZE_CHANGE \{ .DOC_COVER_DOCTYPE_SIZE +3 \}
5808.\" (copyright)
5809. if !d$DOC_COVER_COPYRIGHT_FAM \{\
5810. ie !d$DOC_COVER_FAM \{ .DOC_COVER_COPYRIGHT_FAMILY \\*[$DOC_FAM] \}
5811. el \{ .DOC_COVER_COPYRIGHT_FAMILY \\*[$DOC_COVER_FAM] \}
5812. \}
5813. if !d$DOC_COVER_COPYRIGHT_FT \{ .DOC_COVER_COPYRIGHT_FONT R \}
5814. if !d$DOC_COVER_COPYRIGHT_SIZE_CHANGE \{ .DOC_COVER_COPYRIGHT_SIZE -2 \}
5815.\" +Docheader
5816. if !d$DOCHEADER_FAM \{ .DOCHEADER_FAMILY \\*[$DOC_FAM] \}
5817. if !d$TITLE_FAM \{\
5818. ie !d$DOCHEADER_FAM \{ .TITLE_FAMILY \\*[$DOC_FAM] \}
5819. el \{ .TITLE_FAMILY \\*[$DOCHEADER_FAM] \}
5820. \}
5821. if !d$TITLE_FT \{ .TITLE_FONT B \}
92d0a6a6
JR
5822. if !d$TITLE_SIZE_CHANGE \{\
5823. ie \\n[#DOC_TYPE]=2 \{ .TITLE_SIZE +4 \}
5824. el \{ .TITLE_SIZE +3.5 \}
5825. \}
465b256c
JR
5826. if !d$CHAPTER_TITLE_FAM \{\
5827. ie !d$DOCHEADER_FAM \{ .CHAPTER_TITLE_FAMILY \\*[$DOC_FAM] \}
5828. el \{ .CHAPTER_TITLE_FAMILY \\*[$DOCHEADER_FAM] \}
5829. \}
5830. if !d$CHAPTER_TITLE_FT \{ .CHAPTER_TITLE_FONT BI \}
5831. if !d$CHAPTER_TITLE_SIZE_CHANGE \{ .CHAPTER_TITLE_SIZE +4 \}
5832. if !d$SUBTITLE_FAM \{\
5833. ie !d$DOCHEADER_FAM \{ .SUBTITLE_FAMILY \\*[$DOC_FAM] \}
5834. el \{ .SUBTITLE_FAMILY \\*[$DOCHEADER_FAM] \}
5835. \}
5836. if !d$SUBTITLE_FT \{ .SUBTITLE_FONT R \}
5837. if !d$SUBTITLE_SIZE_CHANGE \{ .SUBTITLE_SIZE +0 \}
5838. if !d$AUTHOR_FAM \{\
5839. ie !d$DOCHEADER_FAM \{ .AUTHOR_FAMILY \\*[$DOC_FAM] \}
5840. el \{ .AUTHOR_FAMILY \\*[$DOCHEADER_FAM] \}
5841. \}
5842. if !d$AUTHOR_FT \{ .AUTHOR_FONT I \}
5843. if !d$AUTHOR_SIZE_CHANGE \{ .AUTHOR_SIZE +0 \}
5844. if !d$DOCTYPE_FAM \{\
5845. ie !d$DOCHEADER_FAM \{ .DOCTYPE_FAMILY \\*[$DOC_FAM] \}
5846. el \{ .DOCTYPE_FAMILY \\*[$DOCHEADER_FAM] \}
5847. \}
4d3e9548
JL
5848. if !d$DOCTYPE_FT \{ .DOCTYPE_FONT BI \}
5849. if !d$DOCTYPE_SIZE_CHANGE \{ .DOCTYPE_SIZE +3 \}
5850. if !r#DOCTYPE_UNDERLINE \{ .DOCTYPE_UNDERLINE \}
465b256c 5851.\" +Headers and footers
92d0a6a6 5852. if !d$HDRFTR_LEFT_FAM \{ .HDRFTR_LEFT_FAMILY \\*[$DOC_FAM] \}
465b256c 5853. if !d$HDRFTR_LEFT_FT \{ .HDRFTR_LEFT_FONT R \}
92d0a6a6
JR
5854. if \\n[#HDRFTR_LEFT_CAPS] \{\
5855. if !d$HDRFTR_LEFT_SIZE_CHANGE \{ .HDRFTR_LEFT_SIZE -2 \}
5856. \}
5857. if !d$HDRFTR_LEFT_SIZE_CHANGE \{ .HDRFTR_LEFT_SIZE -.5 \}
5858. if !d$HDRFTR_CENTER_FAM \{ .HDRFTR_CENTER_FAMILY \\*[$DOC_FAM] \}
5859. if !d$HDRFTR_CENTER_FT \{ .HDRFTR_CENTER_FONT I \}
5860. if \\n[#HDRFTR_CENTER_CAPS] \{\
5861. if !d$HDRFTR_CENTER_SIZE_CHANGE \{ .HDRFTR_CENTER_SIZE -2 \}
5862. \}
465b256c
JR
5863. if !d$HDRFTR_CENTER_SIZE_CHANGE \{ .HDRFTR_CENTER_SIZE -.5 \}
5864. if !d$HDRFTR_RIGHT_FAM \{ .HDRFTR_RIGHT_FAMILY \\*[$DOC_FAM] \}
5865. if !d$HDRFTR_RIGHT_FT \{ .HDRFTR_RIGHT_FONT R \}
92d0a6a6
JR
5866. if \\n[#HDRFTR_RIGHT_CAPS] \{\
5867. if !d$HDRFTR_RIGHT_SIZE_CHANGE \{ .HDRFTR_RIGHT_SIZE -2 \}
5868. \}
5869. if !d$HDRFTR_RIGHT_SIZE_CHANGE \{ .HDRFTR_RIGHT_SIZE -.5 \}
465b256c 5870.\" +Heads
92d0a6a6
JR
5871. if !d$HEAD_FAM \{ .HEAD_FAMILY \\*[$DOC_FAM] \}
5872. if !d$HEAD_FT \{ .HEAD_FONT B \}
5873. if !d$HEAD_SIZE_CHANGE \{ .HEAD_SIZE +1 \}
5874. if !r#HEAD_SPACE \{ .HEAD_SPACE \}
465b256c 5875.\" +Subheads
92d0a6a6
JR
5876. if !d$SH_FAM \{ .SUBHEAD_FAMILY \\*[$DOC_FAM] \}
5877. if !d$SH_FT \{ .SUBHEAD_FONT B \}
5878. if !d$SH_SIZE_CHANGE \{ .SUBHEAD_SIZE +.5 \}
465b256c 5879.\" +Paragraph heads
92d0a6a6
JR
5880. if !d$PH_FAM \{ .PARAHEAD_FAMILY \\*[$DOC_FAM] \}
5881. if !d$PH_FT \{ .PARAHEAD_FONT BI \}
5882. if !d$PH_SIZE_CHANGE \{ .PARAHEAD_SIZE -.25 \}
5883. if !r#PH_INDENT \{ .PARAHEAD_INDENT \\n[#PP_INDENT]u/2u \}
465b256c 5884.\" +Quotes
92d0a6a6
JR
5885. if !d$QUOTE_FAM \{ .QUOTE_FAMILY \\*[$DOC_FAM] \}
5886. if !d$QUOTE_FT \{ .QUOTE_FONT I \}
5887. if !d$QUOTE_SIZE_CHANGE \{ .QUOTE_SIZE +0 \}
4d3e9548
JL
5888. if !r#Q_OFFSET_VALUE \{\
5889. if '\\*[$Q_OFFSET_VALUE]'' \{ .QUOTE_INDENT 3 \}
5890. \}
465b256c
JR
5891.\" +Blockquotes
5892.\" Note: the leading for quotes and blockquotes is set after .DEFAULTS in START
92d0a6a6
JR
5893. if !d$BQUOTE_FAM \{ .BLOCKQUOTE_FAMILY \\*[$DOC_FAM] \}
5894. if !d$BQUOTE_FT \{ .BLOCKQUOTE_FONT R \}
5895. if !d$BQUOTE_SIZE_CHANGE \{ .BLOCKQUOTE_SIZE -1 \}
5896. if !d$BQUOTE_QUAD \{ .BLOCKQUOTE_QUAD LEFT \}
465b256c 5897.\" +Epigraphs
92d0a6a6
JR
5898. if !d$EPI_FAM \{ .EPIGRAPH_FAMILY \\*[$DOC_FAM] \}
5899. if !d$EPI_FT \{ .EPIGRAPH_FONT R \}
5900. if !d$EPI_SIZE_CHANGE \{ .EPIGRAPH_SIZE -1.5 \}
5901. if !r#EPI_AUTOLEAD \{ .EPIGRAPH_AUTOLEAD 2 \}
5902. if !d$EPI_QUAD \{ .EPIGRAPH_QUAD \\*[$DOC_QUAD] \}
4d3e9548
JL
5903. if !r#EPI_OFFSET_VALUE \{\
5904. if '\\*[$EPI_OFFSET_VALUE]'' \{ .EPIGRAPH_INDENT 3 \}
5905. \}
465b256c 5906.\" +Linebreaks
4d3e9548
JL
5907. if !d$LINEBREAK_CHAR \{ .LINEBREAK_CHAR * 3 3p \}
5908. if !d$LINEBREAK_COLOR \{ .LINEBREAK_COLOR black \}
465b256c 5909.\" +Footnotes
92d0a6a6
JR
5910. if !r#FN_RULE_LENGTH \{ .FOOTNOTE_RULE_LENGTH 4P \}
5911. if !r#FN_RULE_ADJ \{ .FOOTNOTE_RULE_ADJ 3p \}
5912. if !d$FN_SIZE_CHANGE \{ .FOOTNOTE_SIZE -2 \}
5913. if !r#FN_AUTOLEAD \{ .FOOTNOTE_AUTOLEAD 2 \}
465b256c 5914.\" +Endnotes
4d3e9548 5915. if !r#EN_PS \{ .ENDNOTE_PT_SIZE (\\n[#DOC_PT_SIZE]u)\}
92d0a6a6
JR
5916. if !d$EN_STRING_FT \{ .ENDNOTE_STRING_FONT B \}
5917. if !d$EN_STRING_SIZE_CHANGE \{ .ENDNOTE_STRING_SIZE +1 \}
5918. if !d$EN_TITLE_FT \{ .ENDNOTE_TITLE_FONT B \}
5919. if !d$EN_TITLE_SIZE_CHANGE \{ .ENDNOTE_TITLE_SIZE +0 \}
5920. if !d$EN_NUMBER_FT \{ .ENDNOTE_NUMBER_FONT B \}
4d3e9548 5921. if !d$EN_LN_FT \{ .ENDNOTE_LINENUMBER_FONT R \}
465b256c 5922. if !d$EN_NUMBER_SIZE_CHANGE \{ .ENDNOTE_NUMBER_SIZE +0 \}
92d0a6a6 5923. if !r#EN_PP_INDENT \{ .ENDNOTE_PARA_INDENT 1.5m \}
465b256c 5924.\" +Bibliography
4d3e9548
JL
5925. if !r#BIB_LIST \{ .BIBLIOGRAPHY_TYPE LIST . \}
5926. if !r#BIB_PS \{ .BIBLIOGRAPHY_PT_SIZE (\\n[#DOC_PT_SIZE]u) \}
5927. if !d$BIB_STRING_FT \{ .BIBLIOGRAPHY_STRING_FONT B \}
5928. if !d$BIB_STRING_SIZE_CHANGE \{ .BIBLIOGRAPHY_STRING_SIZE +1 \}
465b256c 5929.\" +Table of contents
92d0a6a6 5930. if !d$TOC_FAM \{ .TOC_FAMILY \\*[$DOC_FAM] \}
4d3e9548 5931. if !r#TOC_PS \{ .TOC_PT_SIZE (\\n[#DOC_PT_SIZE]u) \}
92d0a6a6
JR
5932. if !r#TOC_LEAD \{ .TOC_LEAD \\n[#DOC_LEAD]u ADJUST \}
5933. if !d$TOC_HEADER_FAM \{ .TOC_HEADER_FAMILY \\*[$TOC_FAM] \}
465b256c
JR
5934. if !d$TOC_HEADER_SIZE_CHANGE \{ .TOC_HEADER_SIZE +4 \}
5935. if !d$TOC_HEADER_FT \{ .TOC_HEADER_FONT B \}
92d0a6a6 5936. if !d$TOC_TITLE_FAM \{ .TOC_TITLE_FAMILY \\*[$TOC_FAM] \}
465b256c
JR
5937. if !d$TOC_PN_FAM \{ .TOC_PN_FAMILY \\*[$TOC_FAM] \}
5938. if !d$TOC_HEAD_FAM \{ .TOC_HEAD_FAMILY \\*[$TOC_FAM] \}
5939. if !d$TOC_SH_FAM \{ .TOC_SUBHEAD_FAMILY \\*[$TOC_FAM] \}
92d0a6a6 5940. if !d$TOC_PH_FAM \{ .TOC_PARAHEAD_FAMILY \\*[$TOC_FAM] \}
465b256c
JR
5941. if !d$TOC_TITLE_FT \{ .TOC_TITLE_FONT BI \}
5942. if !d$TOC_PN_FT \{ .TOC_PN_FONT R \}
5943. if !d$TOC_HEAD_FT \{ .TOC_HEAD_FONT B \}
5944. if !d$TOC_SH_FT \{ .TOC_SUBHEAD_FONT R \}
5945. if !d$TOC_PH_FT \{ .TOC_PARAHEAD_FONT I \}
5946. if !d$TOC_TITLE_SIZE_CHANGE \{ .TOC_TITLE_SIZE +.5 \}
5947. if !d$TOC_PN_SIZE_CHANGE \{ .TOC_PN_SIZE +0 \}
5948. if !d$TOC_HEAD_SIZE_CHANGE \{ .TOC_HEAD_SIZE +.5 \}
92d0a6a6 5949. if !d$TOC_SH_SIZE_CHANGE \{ .TOC_SUBHEAD_SIZE +0 \}
465b256c 5950. if !d$TOC_PH_SIZE_CHANGE \{ .TOC_PARAHEAD_SIZE +0 \}
4d3e9548
JL
5951. ps \\n[#TOC_PS]u\\*[$TOC_TITLE_SIZE_CHANGE]
5952. if !r#TOC_HEAD_INDENT \{ .TOC_HEAD_INDENT \w'\0\0.' \}
5953. ps
5954. ps \\n[#TOC_PS]u\\*[$TOC_HEAD_SIZE_CHANGE]
5955. if !r#TOC_SH_INDENT \{ .TOC_SUBHEAD_INDENT \\n[#TOC_HEAD_INDENT]+\w'\0\0.' \}
5956. ps
5957. ps \\n[#TOC_PS]u\\*[$TOC_SH_SIZE_CHANGE]
5958. if !r#TOC_PH_INDENT \{ .TOC_PARAHEAD_INDENT \\n[#TOC_SH_INDENT]+\w'\0\0.' \}
5959. ps
465b256c
JR
5960. \}
5961.\" +Refer support
4d3e9548 5962. if !r#EN_REF \{ .nr #FN_REF 1 \}
465b256c
JR
5963. if '\\*[$REF_FN_INDENT]'' \{\
5964. if \\n[#PRINT_STYLE]=1 \{ .INDENT_REFS FOOTNOTE 2m \}
5965. if \\n[#PRINT_STYLE]=2 \{ .INDENT_REFS FOOTNOTE 1.5m \}
5966. \}
5967. if '\\*[$REF_EN_INDENT]'' \{\
5968. if \\n[#PRINT_STYLE]=1 \{ .INDENT_REFS ENDNOTE 2m \}
5969. if \\n[#PRINT_STYLE]=2 \{ .INDENT_REFS ENDNOTE 1.5m \}
92d0a6a6 5970. \}
465b256c
JR
5971. if '\\*[$REF_BIB_INDENT]'' \{\
5972. if \\n[#PRINT_STYLE]=1 \{ .INDENT_REFS BIBLIO 2m \}
5973. if \\n[#PRINT_STYLE]=2 \{ .INDENT_REFS BIBLIO 1.5m :\}
5974. \}
5975.\" Adjust doc leading for PRINTSTYLE TYPESET
92d0a6a6
JR
5976. if \\n[#PRINT_STYLE]=2 \{\
5977. ie \\n[#ADJ_DOC_LEAD]=1 \{ .DOC_LEAD_ADJUST \}
5978. el \{ . \}
5979. \}
465b256c
JR
5980.\" This diversion is to get a value for #FN_AUTOLEAD
5981. di NULL
5982. ev NULL
5983. if \\n[#PRINT_STYLE]=1 \{\
5984. ps 12
5985. ie \\n[#SINGLE_SPACE]=1 \{ .vs \\n[#ORIGINAL_DOC_LEAD]u \}
5986. el \{ .vs \\n[#ORIGINAL_DOC_LEAD]u/2u \}
5987. \}
5988. if \\n[#PRINT_STYLE]=2 \{\
5989. PT_SIZE \\n[#DOC_PT_SIZE]u\\*[$FN_SIZE_CHANGE]
5990. AUTOLEAD \\n[#FN_AUTOLEAD]
5991. \}
5992. nr #FN_LEAD \\n[#LEAD]
5993. if \\n[#PRINT_STYLE]=2 \{ .LS \\n[#DOC_LEAD]u \}
5994. ev
5995. di
5996. ie !\\n[#COLLATE] \{\
5997.\" DOC_LEAD adjusted (or not) here
92d0a6a6 5998. TRAPS
465b256c 5999.\" Endnote, bibliography and toc leading
92d0a6a6
JR
6000. nr #OK_PROCESS_LEAD 1
6001. nr #RESTORE_DOC_LEAD \\n(.v
465b256c 6002. nr #RESTORE_B_MARGIN \\n[#B_MARGIN]
92d0a6a6
JR
6003. if \\n[#PRINT_STYLE]=1 \{\
6004. ie \\n[#SINGLE_SPACE] \{\
6005. ENDNOTE_LEAD 12 ADJUST
465b256c 6006. BIBLIOGRAPHY_LEAD 12 ADJUST
92d0a6a6
JR
6007. \}
6008. el \{\
6009. ie \\n[#EN_SINGLESPACE] \{ .ENDNOTE_LEAD 12 ADJUST \}
6010. el \{ .ENDNOTE_LEAD 24 ADJUST \}
465b256c
JR
6011. ie \\n[#BIB_SINGLESPACE] \{ .BIBLIOGRAPHY_LEAD 12 ADJUST \}
6012. el \{ .BIBLIOGRAPHY_LEAD 24 ADJUST \}
92d0a6a6
JR
6013. \}
6014. \}
6015. if \\n[#PRINT_STYLE]=2 \{\
6016. ie !d$EN_LEAD \{ .ENDNOTE_LEAD 14 ADJUST \}
6017. el \{ .ENDNOTE_LEAD \\*[$EN_LEAD] \\*[$ADJUST_EN_LEAD] \}
465b256c
JR
6018. ie !d$BIB_LEAD \{ .BIBLIOGRAPHY_LEAD 14 ADJUST \}
6019. el \{ .BIBLIOGRAPHY_LEAD \\*[$BIB_LEAD] \\*[$ADJUST_BIB_LEAD] \}
92d0a6a6
JR
6020. ie !d$TOC_LEAD \{ .TOC_LEAD \\n[#RESTORE_DOC_LEAD]u \}
6021. el \{ .TOC_LEAD \\*[$TOC_LEAD] \\*[$ADJUST_TOC_LEAD] \}
6022. rm $ADJUST_EN_LEAD
465b256c 6023. rm $ADJUST_BIB_LEAD
92d0a6a6
JR
6024. rm $ADJUST_TOC_LEAD
6025. \}
465b256c
JR
6026. ie !d$BIB_SPACE \{ .BIBLIOGRAPHY_SPACING 1v \}
6027. el \{\
6028. if \\n[#DEFER_BIB_SPACING]=1 \{\
6029. BIBLIOGRAPHY_SPACING \\*[$BIB_SPACE]
6030. rr #DEFER_BIB_SPACING
6031. \}
6032. \}
92d0a6a6 6033. DOC_LEAD \\n[#RESTORE_DOC_LEAD]u
465b256c
JR
6034. nr #B_MARGIN \\n[#RESTORE_B_MARGIN]
6035. \}
6036. el \{\
6037. if \\n[#COLLATE] \{\
6038. if !\\n[#PRINT_STYLE]=1 \{\
6039. if \\n[#RERUN_TRAPS] \{ .TRAPS \}
6040. \}
6041. \}
92d0a6a6
JR
6042. \}
6043. if \\n[#PRINT_STYLE]=1 \{ .nr #IGNORE 1 \}
6044.END
6045\#
6046\# ====================================================================
6047\#
6048\# +++START THE DOCUMENT+++
6049\#
6050\# THE START MACRO
6051\# ---------------
6052\# *Arguments:
6053\# <none>
6054\# *Function:
6055\# Reads in default document style parameters and any parameter
6056\# the user has changed before issuing START.
6057\# Using the information gathered in the opening macros,
6058\# prints appropriate title (or chapter #), subtitle, author
6059\# and document type (if appropriate).
6060\# *Notes:
6061\# The .PRINT \& (zero-width character) is required to get the
6062\# subsequent .sp request to work as advertised.
6063\#
6064\# The overall document line length, family, and point-size
6065\# are stored in #DOC_L_LENGTH, $DOC_FAM, and #DOC_PT_SIZE for
6066\# use in the HEADER and FOOTER macros.
6067\#
6068\# First, define some strings for point sizes
6069\#
465b256c
JR
6070\# Doc cover
6071.ds $DOC_COVER_AUTHOR_PT_SIZE \\n[#DOC_PT_SIZE]u\\*[$DOC_COVER_AUTHOR_SIZE_CHANGE]
6072.ds $DOC_COVER_CHAPTER_TITLE_PT_SIZE \\n[#DOC_PT_SIZE]u\\*[$DOC_COVER_CHAPTER_TITLE_SIZE_CHANGE]
6073.ds $DOC_COVER_COPYRIGHT_PT_SIZE \\n[#DOC_PT_SIZE]u\\*[$DOC_COVER_COPYRIGHT_SIZE_CHANGE]
6074.ds $DOC_COVER_DOCTYPE_PT_SIZE \\n[#DOC_PT_SIZE]u\\*[$DOC_COVER_DOCTYPE_SIZE_CHANGE]
6075.ds $DOC_COVER_SUBTITLE_PT_SIZE \\n[#DOC_PT_SIZE]u\\*[$DOC_COVER_SUBTITLE_SIZE_CHANGE]
6076.ds $DOC_COVER_TITLE_PT_SIZE \\n[#DOC_PT_SIZE]u\\*[$DOC_COVER_TITLE_SIZE_CHANGE]
6077\# Cover
6078.ds $COVER_AUTHOR_PT_SIZE \\n[#DOC_PT_SIZE]u\\*[$COVER_AUTHOR_SIZE_CHANGE]
6079.ds $COVER_CHAPTER_TITLE_PT_SIZE \\n[#DOC_PT_SIZE]u\\*[$COVER_CHAPTER_TITLE_SIZE_CHANGE]
6080.ds $COVER_COPYRIGHT_PT_SIZE \\n[#DOC_PT_SIZE]u\\*[$COVER_COPYRIGHT_SIZE_CHANGE]
6081.ds $COVER_DOCTYPE_PT_SIZE \\n[#DOC_PT_SIZE]u\\*[$COVER_DOCTYPE_SIZE_CHANGE]
6082.ds $COVER_SUBTITLE_PT_SIZE \\n[#DOC_PT_SIZE]u\\*[$COVER_SUBTITLE_SIZE_CHANGE]
6083.ds $COVER_TITLE_PT_SIZE \\n[#DOC_PT_SIZE]u\\*[$COVER_TITLE_SIZE_CHANGE]
6084\# Docheader
6085.ds $AUTHOR_PT_SIZE \\n[#DOC_PT_SIZE]u\\*[$AUTHOR_SIZE_CHANGE]
6086.ds $CHAPTER_TITLE_PT_SIZE \\n[#DOC_PT_SIZE]u\\*[$CHAPTER_TITLE_SIZE_CHANGE]
6087.ds $COPYRIGHT_PT_SIZE \\n[#DOC_PT_SIZE]u\\*[$COPYRIGHT_SIZE_CHANGE]
6088.ds $DOCTYPE_PT_SIZE \\n[#DOC_PT_SIZE]u\\*[$DOCTYPE_SIZE_CHANGE]
6089.ds $SUBTITLE_PT_SIZE \\n[#DOC_PT_SIZE]u\\*[$SUBTITLE_SIZE_CHANGE]
6090.ds $TITLE_PT_SIZE \\n[#DOC_PT_SIZE]u\\*[$TITLE_SIZE_CHANGE]
92d0a6a6
JR
6091\#
6092\# Next, some utility macros for various routines to prevent repetition
6093\#
4d3e9548
JL
6094. if '\\$1'DOC_COVER' \{\
6095. shift
6096. nr #AUTHOR_DOCCOVER_NUM 0 1
6097. while \\n[#NUM_ARGS]>\\n[#AUTHOR_DOCCOVER_NUM] \{\
6098. ds $AUTHOR_DOCCOVER_\\n+[#AUTHOR_DOCCOVER_NUM] \\$\\n[#AUTHOR_DOCCOVER_NUM]
6099.\}
6100. return
6101. \}
6102. if '\\$1'COVER' \{\
6103. shift
6104. nr #AUTHOR_COVER_NUM 0 1
6105. while \\n[#NUM_ARGS]>\\n[#AUTHOR_COVER_NUM] \{\
6106. ds $AUTHOR_COVER_\\n+[#AUTHOR_COVER_NUM] \\$\\n[#AUTHOR_COVER_NUM]
6107.\}
6108. return
6109. \}
6110\#
92d0a6a6 6111.MAC PRINT_AUTHORS END
465b256c 6112. ie r#DOING_COVER \{\
4d3e9548
JL
6113. if \\n[#DOC_COVER]=1 \{\
6114. ie !'\\*[$AUTHOR_DOCCOVER_1]'' \{\
6115. nr #AUTHORS \\n[#AUTHOR_DOCCOVER_NUM]
6116. nr #NEXT_AUTHOR 0 1
6117. while \\n[#AUTHORS]>\\n[#NEXT_AUTHOR] \{\
6118. ie \\n[#DOC_COVER_AUTHOR_COLOR]=1 \{\
6119. PRINT \m[\\*[$DOC_COVER_AUTHOR_COLOR]]\\*[$AUTHOR_DOCCOVER_\\n+[#NEXT_AUTHOR]]\m[]
6120. \}
6121. el \{ .PRINT \\*[$AUTHOR_DOCCOVER_\\n+[#NEXT_AUTHOR]] \}
465b256c 6122.\}
4d3e9548
JL
6123. \}
6124. el \{\
6125. nr #AUTHORS \\n[#AUTHOR_NUM]
6126. nr #NEXT_AUTHOR 0 1
6127. while \\n[#AUTHORS]>\\n[#NEXT_AUTHOR] \{\
6128. ie \\n[#DOC_COVER_AUTHOR_COLOR]=1 \{\
6129. PRINT \m[\\*[$DOC_COVER_AUTHOR_COLOR]]\\*[$AUTHOR_\\n+[#NEXT_AUTHOR]]\m[]
6130. \}
6131. el \{ .PRINT \\*[$AUTHOR_\\n+[#NEXT_AUTHOR]] \}
6132.\}
6133. \}
6134. return
465b256c 6135. \}
4d3e9548
JL
6136. if \\n[#COVER]=1 \{\
6137. ie !'\\*[$AUTHOR_COVER_1]'' \{\
6138. nr #AUTHORS \\n[#AUTHOR_COVER_NUM]
6139. nr #NEXT_AUTHOR 0 1
6140. while \\n[#AUTHORS]>\\n[#NEXT_AUTHOR] \{\
6141. ie \\n[#COVER_AUTHOR_COLOR]=1 \{\
6142. PRINT \m[\\*[$COVER_AUTHOR_COLOR]]\\*[$AUTHOR_COVER_\\n+[#NEXT_AUTHOR]]\m[]
6143. \}
6144. el \{ .PRINT \\*[$AUTHOR_COVER_\\n+[#NEXT_AUTHOR]] \}
465b256c 6145.\}
4d3e9548
JL
6146. \}
6147. el \{\
6148. nr #AUTHORS \\n[#AUTHOR_NUM]
6149. nr #NEXT_AUTHOR 0 1
6150. while \\n[#AUTHORS]>\\n[#NEXT_AUTHOR] \{\
6151. ie \\n[#COVER_AUTHOR_COLOR]=1 \{\
6152. PRINT \m[\\*[$COVER_AUTHOR_COLOR]]\\*[$AUTHOR_\\n+[#NEXT_AUTHOR]]\m[]
6153. \}
6154. el \{ .PRINT \\*[$AUTHOR_\\n+[#NEXT_AUTHOR]] \}
6155.\}
6156. \}
6157. return
92d0a6a6 6158. \}
465b256c
JR
6159. \}
6160. el \{\
4d3e9548
JL
6161. nr #AUTHORS \\n[#AUTHOR_NUM]
6162. nr #NEXT_AUTHOR 0 1
465b256c
JR
6163. while \\n[#AUTHORS]>\\n[#NEXT_AUTHOR] \{\
6164. ie \\n[#AUTHOR_COLOR]=1 \{\
6165. PRINT \m[\\*[$AUTHOR_COLOR]]\\*[$AUTHOR_\\n+[#NEXT_AUTHOR]]\m[]
6166. \}
6167. el \{ .PRINT \\*[$AUTHOR_\\n+[#NEXT_AUTHOR]] \}
6168.\}
92d0a6a6
JR
6169. \}
6170.END
6171\#
6172.MAC DEFAULT_DOCHEADER END
4d3e9548
JL
6173. if !'\\*[$TITLE_1]'' \{\
6174. CENTER
6175. FAMILY \\*[$TITLE_FAM]
6176. FT \\*[$TITLE_FT]
6177. PT_SIZE \\*[$TITLE_PT_SIZE]
6178. LS \\n[#DOCHEADER_LEAD]u
6179. nr #ARG_NUM 0 1
6180. while \\n[#TITLE_NUM]>=\\n+[#ARG_NUM] \{\
6181. ie \\n[#TITLE_COLOR]=1 \{\
6182. PRINT "\m[\\*[$TITLE_COLOR]]\\*[$TITLE_\\n[#ARG_NUM]]\m[]
6183. \}
6184. el \{\
6185. PRINT "\\*[$TITLE_\\n[#ARG_NUM]]
6186. \}
6187.\}
92d0a6a6 6188. \}
4d3e9548 6189. if !'\\*[$SUBTITLE_1]'' \{\
92d0a6a6
JR
6190. FAMILY \\*[$SUBTITLE_FAM]
6191. FT \\*[$SUBTITLE_FT]
6192. PT_SIZE \\*[$SUBTITLE_PT_SIZE]
4d3e9548
JL
6193. nr #ARG_NUM 0 1
6194. while \\n[#SUBTITLE_NUM]>=\\n+[#ARG_NUM] \{\
6195. ie \\n[#SUBTITLE_COLOR]=1 \{\
6196. PRINT "\m[\\*[$SUBTITLE_COLOR]]\\*[$SUBTITLE_\\n[#ARG_NUM]]\m[]
6197. \}
6198. el \{\
6199. PRINT "\\*[$SUBTITLE_\\n[#ARG_NUM]]
6200. \}
6201.\}
92d0a6a6
JR
6202. \}
6203. if !'\\*[$AUTHOR_1]'' \{\
6204. FAMILY \\*[$AUTHOR_FAM]
6205. FT \\*[$AUTHOR_FT]
6206. PT_SIZE \\*[$AUTHOR_PT_SIZE]
4d3e9548
JL
6207. ie \\n[#ATTRIBUTE_COLOR]=1 \{\
6208. PRINT \&\m[\\*[$ATTRIBUTE_COLOR]]\\*[$ATTRIBUTE_STRING]\m[]
92d0a6a6 6209. \}
4d3e9548 6210. el \{ .PRINT \&\\*[$ATTRIBUTE_STRING] \}
92d0a6a6
JR
6211. PRINT_AUTHORS
6212. \}
4d3e9548
JL
6213. FAMILY \\*[$DOC_FAM]
6214. FT R
92d0a6a6
JR
6215.END
6216\#
6217\#
6218.MAC CHAPTER_DOCHEADER END
6219. CENTER
6220. FAMILY \\*[$TITLE_FAM]
6221. FT \\*[$TITLE_FT]
6222. PT_SIZE \\*[$TITLE_PT_SIZE]
6223. LS \\n[#DOCHEADER_LEAD]u
465b256c 6224.\" Chapter title only
92d0a6a6 6225. ie '\\*[$CHAPTER]'' \{\
4d3e9548 6226. ie !'\\*[$CHAPTER_TITLE_1]'' \{\
92d0a6a6
JR
6227. if \\n[#PRINT_STYLE]=2 \{\
6228. FAMILY \\*[$CHAPTER_TITLE_FAM]
6229. FT \\*[$CHAPTER_TITLE_FT]
6230. PT_SIZE \\*[$CHAPTER_TITLE_PT_SIZE]
6231. LS \\n[#DOCHEADER_LEAD]u
6232. \}
4d3e9548
JL
6233. nr #ARG_NUM 0 1
6234. while \\n[#CHAPTER_TITLE_NUM]>=\\n+[#ARG_NUM] \{\
6235. ie \\n[#TITLE_COLOR]=1 \{\
6236. PRINT \m[\\*[$TITLE_COLOR]]\\*[$CHAPTER_TITLE_\\n[#ARG_NUM]]\m[]
6237. \}
6238. el \{ .PRINT \\*[$CHAPTER_TITLE_\\n[#ARG_NUM]] \}
6239.\}
92d0a6a6
JR
6240. \}
6241. el \{\
6242. ie \\n[#TITLE_COLOR]=1 \{\
6243. PRINT \m[\\*[$TITLE_COLOR]]\\*[$CHAPTER_STRING]\m[]
6244. \}
6245. el \{ .PRINT \\*[$CHAPTER_STRING] \}
6246. \}
6247. \}
465b256c 6248.\" Chapter string, possibly with a chapter title
92d0a6a6
JR
6249. el \{\
6250. ie \\n[#TITLE_COLOR]=1 \{\
6251. PRINT \m[\\*[$TITLE_COLOR]]\\*[$CHAPTER_STRING] \\*[$CHAPTER]\m[]
6252. \}
6253. el \{ .PRINT \\*[$CHAPTER_STRING] \\*[$CHAPTER] \}
4d3e9548 6254. if !'\\*[$CHAPTER_TITLE_1]'' \{\
92d0a6a6
JR
6255. if \\n[#PRINT_STYLE]=2 \{\
6256. FAMILY \\*[$CHAPTER_TITLE_FAM]
6257. FT \\*[$CHAPTER_TITLE_FT]
6258. PT_SIZE \\*[$CHAPTER_TITLE_PT_SIZE]
6259. LS \\n[#DOCHEADER_LEAD]u
4d3e9548
JL
6260. ALD \\n[.v]u/4u \"Put a little space before the chapter title
6261. \}
6262. nr #ARG_NUM 0 1
6263. while \\n[#CHAPTER_TITLE_NUM]>=\\n+[#ARG_NUM] \{\
465b256c 6264. ie \\n[#CHAPTER_TITLE_COLOR]=1 \{\
4d3e9548 6265. PRINT \m[\\*[$CHAPTER_TITLE_COLOR]]\\*[$CHAPTER_TITLE_\\n[#ARG_NUM]]\m[]
92d0a6a6 6266. \}
4d3e9548
JL
6267. el \{ .PRINT \\*[$CHAPTER_TITLE_\\n[#ARG_NUM]] \}
6268.\}
6269. RLD \\n[#DOC_LEAD]u \" Just looks better this way
92d0a6a6
JR
6270. \}
6271. \}
4d3e9548
JL
6272. FAMILY \\*[$DOC_FAM]
6273. FT R
92d0a6a6
JR
6274.END
6275\#
6276\#
6277.MAC NAMED_DOCHEADER END
6278. CENTER
6279. FAMILY \\*[$TITLE_FAM]
6280. FT \\*[$TITLE_FT]
6281. PT_SIZE \\*[$TITLE_PT_SIZE]
6282. LS \\n[#DOCHEADER_LEAD]u
4d3e9548
JL
6283. if !'\\*[$TITLE_1]'' \{\
6284. nr #ARG_NUM 0 1
6285. while \\n[#TITLE_NUM]>=\\n+[#ARG_NUM] \{\
6286. ie \\n[#TITLE_COLOR]=1 \{\
6287. PRINT "\m[\\*[$TITLE_COLOR]]\\*[$TITLE_\\n[#ARG_NUM]]\m[]
6288. \}
6289. el \{\
6290. PRINT "\\*[$TITLE_\\n[#ARG_NUM]]
6291. \}
6292.\}
92d0a6a6 6293. \}
92d0a6a6
JR
6294. if !'\\*[$SUBTITLE]'' \{\
6295. FAMILY \\*[$SUBTITLE_FAM]
6296. FT \\*[$SUBTITLE_FT]
6297. PT_SIZE \\*[$SUBTITLE_PT_SIZE]
4d3e9548
JL
6298. nr #ARG_NUM 0 1
6299. while \\n[#SUBTITLE_NUM]>=\\n+[#ARG_NUM] \{\
6300. ie \\n[#SUBTITLE_COLOR]=1 \{\
6301. PRINT "\m[\\*[$SUBTITLE_COLOR]]\\*[$SUBTITLE_\\n[#ARG_NUM]]\m[]
6302. \}
6303. el \{\
6304. PRINT "\\*[$SUBTITLE_\\n[#ARG_NUM]]
6305. \}
6306.\}
92d0a6a6
JR
6307. \}
6308. if !'\\*[$AUTHOR_1]'' \{\
6309. FAMILY \\*[$AUTHOR_FAM]
6310. FT \\*[$AUTHOR_FT]
6311. PT_SIZE \\*[$AUTHOR_PT_SIZE]
4d3e9548
JL
6312. ie \\n[#ATTRIBUTE_COLOR]=1 \{\
6313. PRINT \&\m[\\*[$ATTRIBUTE_COLOR]]\\*[$ATTRIBUTE_STRING]\m[]
92d0a6a6 6314. \}
4d3e9548 6315. el \{ .PRINT \&\\*[$ATTRIBUTE_STRING] \}
92d0a6a6
JR
6316. PRINT_AUTHORS
6317. \}
6318. FAMILY \\*[$DOCTYPE_FAM]
6319. FT \\*[$DOCTYPE_FT]
6320. PT_SIZE \\*[$DOCTYPE_PT_SIZE]
6321. LS \\n[#DOCHEADER_LEAD]u
6322. ALD \\n[#DOCHEADER_LEAD]u
4d3e9548
JL
6323. nr #FROM_DOCTYPE 1
6324. if \\n[#DOCTYPE_COLOR]=1 \{\
92d0a6a6 6325. COLOR \\*[$DOCTYPE_COLOR]
92d0a6a6 6326. \}
4d3e9548
JL
6327. ie \\n[#DOCTYPE_UNDERLINE]=1 \{\
6328. UNDERSCORE \\*[$DOCTYPE_UNDERLINE_GAP] "\\*[$DOC_TYPE]"
6329. \}
6330. el \{\
6331. PRINT "\\*[$DOC_TYPE]"
6332. \}
6333. COLOR black
6334. FAMILY \\*[$DOC_FAM]
6335. FT R
6336. rr #FROM_DOCTYPE
92d0a6a6
JR
6337.END
6338\#
6339\#
465b256c
JR
6340\# COVER PAGE
6341\# ----------
6342\# *Arguments:
6343\# TITLE | DOCTITLE | CHAPTER | CHAPTER_TITLE | CHAPTER+TITLE | COVERTITLE ...
4d3e9548 6344\# ... [ SUBTITLE AUTHOR DOCTYPE COPYRIGHT MISC BLANKPAGE ]
465b256c
JR
6345\# *Function:
6346\# Toggles the number register for each cover page element
6347\# passed as an argument.
6348\# *Notes:
6349\# TITLE, DOCTITLE, CHAPTER, CHAPTER_TITLE or CHAPTER+TITLE must
6350\# be supplied. After that, users may enter as many or as few of
6351\# the arguments as they like; however, the arguments must appear
4d3e9548
JL
6352\# in the order given above. BLANKPAGE, as the final argument,
6353\# inserts a blank page after the cover.
465b256c
JR
6354\#
6355\# If called as DOC_COVER, performs the same operations, but
6356\# applies everything to a doc cover.
6357\#
6358.MAC COVER END
6359. ie '\\$0'DOC_COVER' \{\
4d3e9548 6360. if '\\$\\n[#NUM_ARGS]'BLANKPAGE' \{ .nr #DOCCOVER_BLANKPAGE 1 \}
465b256c
JR
6361. nr #DOC_COVER 1
6362. if '\\$1'TITLE' \{ .nr #DOC_COVER_TITLE 1 \}
6363. if '\\$1'DOCTITLE' \{ .nr #DOC_COVER_TITLE 2 \}
6364. if '\\$1'CHAPTER' \{ .nr #DOC_COVER_TITLE 3 \}
6365. if '\\$1'CHAPTER_TITLE' \{ .nr #DOC_COVER_TITLE 4 \}
6366. if '\\$1'CHAPTER+TITLE' \{ .nr #DOC_COVER_TITLE 5 \}
6367. if '\\$1'COVERTITLE' \{ .nr #DOC_COVER_TITLE 6 \}
6368. if '\\$2'SUBTITLE' \{ .nr #DOC_COVER_SUBTITLE 1 \}
6369. if '\\$2'AUTHOR' \{ .nr #DOC_COVER_AUTHOR 1 \}
6370. if '\\$2'DOCTYPE' \{ .nr #DOC_COVER_DOCTYPE 1 \}
6371. if '\\$2'COPYRIGHT' \{ .nr #DOC_COVER_COPYRIGHT 1 \}
6372. if '\\$2'MISC' \{ .nr #DOC_COVER_MISC 1 \}
6373. if '\\$3'AUTHOR' \{ .nr #DOC_COVER_AUTHOR 1 \}
6374. if '\\$3'DOCTYPE' \{ .nr #DOC_COVER_DOCTYPE 1 \}
6375. if '\\$3'COPYRIGHT' \{ .nr #DOC_COVER_COPYRIGHT 1 \}
6376. if '\\$3'MISC' \{ .nr #DOC_COVER_MISC 1 \}
6377. if '\\$4'DOCTYPE' \{ .nr #DOC_COVER_DOCTYPE 1 \}
6378. if '\\$4'COPYRIGHT' \{ .nr #DOC_COVER_COPYRIGHT 1 \}
6379. if '\\$4'MISC' \{ .nr #DOC_COVER_MISC 1 \}
6380. if '\\$5'COPYRIGHT' \{ .nr #DOC_COVER_COPYRIGHT 1 \}
6381. if '\\$5'MISC' \{ .nr #DOC_COVER_MISC 1 \}
6382. if '\\$6'MISC' \{ .nr #DOC_COVER_MISC 1 \}
92d0a6a6 6383. \}
465b256c 6384. el \{\
4d3e9548 6385. if '\\$\\n[#NUM_ARGS]'BLANKPAGE' \{ .nr #COVER_BLANKPAGE 1 \}
465b256c
JR
6386. nr #COVER 1
6387. if '\\$1'TITLE' \{ .nr #COVER_TITLE 1 \}
6388. if '\\$1'DOCTITLE' \{ .nr #COVER_TITLE 2 \}
6389. if '\\$1'CHAPTER' \{ .nr #COVER_TITLE 3 \}
6390. if '\\$1'CHAPTER_TITLE' \{ .nr #COVER_TITLE 4 \}
6391. if '\\$1'CHAPTER+TITLE' \{ .nr #COVER_TITLE 5 \}
6392. if '\\$1'COVERTITLE' \{ .nr #COVER_TITLE 6 \}
6393. if '\\$2'SUBTITLE' \{ .nr #COVER_SUBTITLE 1 \}
6394. if '\\$2'AUTHOR' \{ .nr #COVER_AUTHOR 1 \}
6395. if '\\$2'DOCTYPE' \{ .nr #COVER_DOCTYPE 1 \}
6396. if '\\$2'COPYRIGHT' \{ .nr #COVER_COPYRIGHT 1 \}
6397. if '\\$2'MISC' \{ .nr #COVER_MISC 1 \}
6398. if '\\$3'AUTHOR' \{ .nr #COVER_AUTHOR 1 \}
6399. if '\\$3'DOCTYPE' \{ .nr #COVER_DOCTYPE 1 \}
6400. if '\\$3'COPYRIGHT' \{ .nr #COVER_COPYRIGHT 1 \}
6401. if '\\$3'MISC' \{ .nr #COVER_MISC 1 \}
6402. if '\\$4'DOCTYPE' \{ .nr #COVER_DOCTYPE 1 \}
6403. if '\\$4'COPYRIGHT' \{ .nr #COVER_COPYRIGHT 1 \}
6404. if '\\$4'MISC' \{ .nr #COVER_MISC 1 \}
6405. if '\\$5'COPYRIGHT' \{ .nr #COVER_COPYRIGHT 1 \}
6406. if '\\$5'MISC' \{ .nr #COVER_MISC 1 \}
6407. if '\\$6'MISC' \{ .nr #COVER_MISC 1 \}
6408. \}
6409.END
6410\#
6411\#
6412.MAC COVERTITLE END
4d3e9548
JL
6413. ie '\\$0'DOC_COVERTITLE' \{\
6414. ie \\n[#NUM_ARGS]=0 \{\
6415. if \\n[#DOC_COVER_TITLE_NUM] \{\
6416. nr #ITEM 0 1
6417. while \\n[#DOC_COVER_TITLE_NUM]>\\n[#ITEM] \{\
6418. rm $DOC_COVER_TITLE_\\n+[#ITEM]
6419.\}
6420. rr #DOC_COVER_TITLE_NUM
6421. rm $DOC_COVER_TITLE
6422. \}
6423. \}
6424. el \{\
6425. nr #DOC_COVER_TITLE_NUM 0 1
6426. while \\n[#NUM_ARGS]>\\n[#DOC_COVER_TITLE_NUM] \{\
6427. ds $DOC_COVER_TITLE_\\n+[#DOC_COVER_TITLE_NUM] \\$\\n[#DOC_COVER_TITLE_NUM]
6428.\}
6429. ds $DOC_COVER_TITLE \\$*
6430. \}
6431. \}
6432. el \{\
6433. ie \\n[#NUM_ARGS]=0 \{\
6434. if \\n[#COVER_TITLE_NUM] \{\
6435. nr #ITEM 0 1
6436. while \\n[#COVER_TITLE_NUM]>\\n[#ITEM] \{\
6437. rm $COVER_TITLE_\\n+[#ITEM]
6438.\}
6439. rr #COVER_TITLE_NUM
6440. rm $COVER_TITLE
6441. \}
6442. \}
6443. el \{\
6444. nr #COVER_TITLE_NUM 0 1
6445. while \\n[#NUM_ARGS]>\\n[#COVER_TITLE_NUM] \{\
6446. ds $COVER_TITLE_\\n+[#COVER_TITLE_NUM] \\$\\n[#COVER_TITLE_NUM]
6447.\}
6448. ds $COVER_TITLE \\$*
6449. \}
6450. \}
465b256c
JR
6451.END
6452\#
6453\#
6454\# COVER PAGE LEADING
6455\# ------------------
6456\# *Arguments:
6457\# <+|- amount by which to in/decrease leading of cover/doc cover>
6458\# *Function:
6459\# Stores user supplied lead in/decrease in string $COVER_LEAD_ADJ
6460\# or $DOC_COVER_LEAD_ADJ, depending on whether the macro was called
6461\# with an alias (DOC_COVER_LEAD).
6462\# *Notes:
6463\# A unit of measure must be supplied. Decimal fractions OK.
6464\# Default is +0, i.e. same as DOC_LEAD.
6465\#
6466.MAC COVER_LEAD END
6467. ie '\\$0'DOC_COVER_LEAD' \{\
6468. ds $DOC_COVER_LEAD_ADJ \\$1
6469. \}
6470. el \{\
6471. ds $COVER_LEAD_ADJ \\$1
6472. \}
6473.END
6474\#
6475\#
6476\# COVER PAGE START POSITION
6477\# -------------------------
6478\# *Arguments:
6479\# <distance from page top at which to start cover/doc cover>
6480\# *Function:
6481\# Stores user supplied lead in/decrease in #COVER_START_POS
6482\# or #DOC_COVER_START_POS, depending on whether the macro was
6483\# called by an alias (DOC_COVER_ADVANCE).
6484\# *Notes:
6485\# A unit of measure must be supplied. Decimal fractions OK.
6486\# If user doesn't invoke this macro, the default starting
6487\# position for both covers and doc covers is 1/3 of the way
6488\# down the page (setup in DO_COVER).
6489\#
6490.MAC COVER_ADVANCE END
6491. ie '\\$0'DOC_COVER_ADVANCE' \{\
6492. nr #DOC_COVER_START_POS (\\$1)
6493. \}
6494. el \{\
6495. nr #COVER_START_POS (\\$1)
6496. \}
6497.END
6498\#
6499\#
4d3e9548
JL
6500\# UNDERLINE CONTROL
6501\# -----------------
6502\# *Arguments:
6503\# [ DOUBLE ] [ <underline weight> [<underline gap>] ] | <none> | <anything>
6504\# *Function:
6505\# Toggles underlining of the element indicated by the calling alias
6506\# on or off. Uses #<element>_UNDERLINE_WEIGHT to set the weight,
6507\# and defines string $<element>_UNDERLINE_GAP.
6508\# *Notes:
6509\# Calling aliases COVER_ and DOCCOVER_ only apply if DOCTYPE is
6510\# NAMED and the DOCTYPE arg is passed to COVER or DOC_COVER.
6511\#
6512.MAC _UNDERLINE END
6513. ie '\\$1'' \{\
6514. if '\\$0'BIBLIOGRAPHY_STRING_UNDERLINE' \{ .nr #BIB_STRING_UNDERLINE 1 \}
6515. if '\\$0'BIBLIOGRAPHY_STRING_UNDERSCORE' \{ .nr #BIB_STRING_UNDERLINE 1 \}
6516. if '\\$0'COVER_UNDERLINE' \{ .nr #COVER_UNDERLINE 1 \}
6517. if '\\$0'DOC_COVER_UNDERLINE' \{ .nr #DOCCOVER_UNDERLINE 1 \}
6518. if '\\$0'DOCTYPE_UNDERLINE' \{ .nr #DOCTYPE_UNDERLINE 1 \}
6519. if '\\$0'HEAD_UNDERLINE' \{ .nr #HEAD_UNDERLINE 1 \}
6520. if '\\$0'ENDNOTE_STRING_UNDERLINE' \{ .nr #EN_STRING_UNDERLINE 1 \}
6521. if '\\$0'ENDNOTE_STRING_UNDERSCORE' \{ .nr #EN_STRING_UNDERLINE 1 \}
6522. if '\\$0'ENDNOTE_TITLE_UNDERLINE' \{ .nr #EN_TITLE_UNDERLINE 1 \}
6523. if '\\$0'ENDNOTE_TITLE_UNDERSCORE' \{ .nr #EN_TITLE_UNDERLINE 1 \}
6524. \}
6525. el \{\
6526. ie \\n[#NUM_ARGS]=1 \{\
6527. ds $ARG \\$1
6528. substring $ARG -1
6529. ie \B'\\*[$ARG]' \{\
6530. if !\\n[#PRINT_STYLE]=1 \{\
6531. if '\\$0'BIBLIOGRAPHY_STRING_UNDERLINE' \{ .BIBLIOGRAPHY_STRING_UNDERLINE_WEIGHT \\$1 \}
6532. if '\\$0'BIBLIOGRAPHY_STRING_UNDERSCORE' \{ .BIBLIOGRAPHY_STRING_UNDERLINE_WEIGHT \\$1 \}
6533. if '\\$0'COVER_UNDERLINE' \{ .COVER_UNDERLINE_WEIGHT \\$1 \}
6534. if '\\$0'DOC_COVER_UNDERLINE' \{ .DOCCOVER_UNDERLINE_WEIGHT \\$1 \}
6535. if '\\$0'DOCTYPE_UNDERLINE' \{ .DOCTYPE_UNDERLINE_WEIGHT \\$1 \}
6536. if '\\$0'HEAD_UNDERLINE' \{ .HEAD_UNDERLINE_WEIGHT \\$1 \}
6537. if '\\$0'ENDNOTE_STRING_UNDERLINE' \{ .ENDNOTE_STRING_UNDERLINE_WEIGHT \\$1 \}
6538. if '\\$0'ENDNOTE_STRING_UNDERSCORE' \{ .ENDNOTE_STRING_UNDERLINE_WEIGHT \\$1 \}
6539. if '\\$0'ENDNOTE_TITLE_UNDERLINE' \{ .ENDNOTE_TITLE_UNDERLINE_WEIGHT \\$1 \}
6540. if '\\$0'ENDNOTE_TITLE_UNDERSCORE' \{ .ENDNOTE_TITLE_UNDERLINE_WEIGHT \\$1 \}
6541. \}
6542. \}
6543. el \{\
6544. if '\\$0'BIBLIOGRAPHY_STRING_UNDERLINE' \{\
6545. ie '\\$1'DOUBLE' \{ .nr #BIB_STRING_UNDERLINE 2 \}
6546. el \{ .nr #BIB_STRING_UNDERLINE 0 \}
6547. \}
6548. if '\\$0'BIBLIOGRAPHY_STRING_UNDERSCORE' \{\
6549. ie '\\$1'DOUBLE' \{ .nr #BIB_STRING_UNDERLINE 2 \}
6550. el \{ .nr #BIB_STRING_UNDERLINE 0 \}
6551. \}
6552. if '\\$0'COVER_UNDERLINE' \{ .nr #COVER_UNDERLINE 0 \}
6553. if '\\$0'DOC_COVER_UNDERLINE' \{ .nr #DOCCOVER_UNDERLINE 0 \}
6554. if '\\$0'DOCTYPE_UNDERLINE' \{ .nr #DOCTYPE_UNDERLINE 0 \}
6555. if '\\$0'HEAD_UNDERLINE' \{ .nr #HEAD_UNDERLINE 0 \}
6556. if '\\$0'ENDNOTE_STRING_UNDERLINE' \{\
6557. ie '\\$1'DOUBLE' \{ .nr #EN_STRING_UNDERLINE 2 \}
6558. el \{ .nr #EN_STRING_UNDERLINE 0 \}
6559. \}
6560. if '\\$0'ENDNOTE_STRING_UNDERSCORE' \{\
6561. ie '\\$1'DOUBLE' \{ .nr #EN_STRING_UNDERLINE 2 \}
6562. el \{ .nr #EN_STRING_UNDERLINE 0 \}
6563. \}
6564. \}
6565. \}
6566. el \{\
6567. if !\\n[#PRINT_STYLE]=1 \{\
6568. if '\\$0'BIBLIOGRAPHY_STRING_UNDERLINE' \{\
6569. nr #BIB_STRING_UNDERLINE 1
6570. if '\\$1'DOUBLE' \{\
6571. nr #BIB_STRING_UNDERLINE 2
6572. shift
6573. \}
6574. BIBLIOGRAPHY_STRING_UNDERLINE_WEIGHT \\$1
6575. if !'\\$2'' \{\
6576. ds $BIB_STRING_UNDERLINE_GAP \\$2
6577. \}
6578. if !'\\$3'' \{\
6579. ds $BIB_STRING_RULE_GAP \\$3
6580. \}
6581. \}
6582. if '\\$0'BIBLIOGRAPHY_STRING_UNDERSCORE' \{\
6583. nr #BIB_STRING_UNDERLINE 1
6584. if '\\$1'DOUBLE' \{\
6585. nr #BIB_STRING_UNDERLINE 2
6586. shift
6587. \}
6588. BIBLIOGRAPHY_STRING_UNDERLINE_WEIGHT \\$1
6589. if !'\\$2'' \{\
6590. ds $BIB_STRING_UNDERLINE_GAP \\$2
6591. \}
6592. if !'\\$3'' \{\
6593. ds $BIB_STRING_RULE_GAP \\$3
6594. \}
6595. \}
6596. if '\\$0'COVER_UNDERLINE' \{\
6597. nr #COVER_UNDERLINE 1
6598. COVER_UNDERLINE_WEIGHT \\$1
6599. ds $COVER_UNDERLINE_GAP \\$2
6600. \}
6601. if '\\$0'DOC_COVER_UNDERLINE' \{\
6602. nr #DOCCOVER_UNDERLINE 1
6603. DOCCOVER_UNDERLINE_WEIGHT \\$1
6604. ds $DOCCOVER_UNDERLINE_GAP \\$2
6605. \}
6606. if '\\$0'DOCTYPE_UNDERLINE' \{\
6607. nr #DOCTYPE_UNDERLINE 1
6608. DOCTYPE_UNDERLINE_WEIGHT \\$1
6609. ds $DOCTYPE_UNDERLINE_GAP \\$2
6610. \}
6611. if '\\$0'HEAD_UNDERLINE' \{\
6612. nr #HEAD_UNDERLINE 1
6613. HEAD_UNDERLINE_WEIGHT \\$1
6614. ds $HEAD_UNDERLINE_GAP \\$2
6615. \}
6616\# ENDNOTE_STRING_UNDERLINE and ENDNOTE_STRING_UNDERSCORE are identical;
6617\# the _UNDERSCORE version is left in for backward compatibility.
6618. if '\\$0'ENDNOTE_STRING_UNDERLINE' \{\
6619. nr #EN_STRING_UNDERLINE 1
6620. if '\\$1'DOUBLE' \{\
6621. nr #EN_STRING_UNDERLINE 2
6622. shift
6623. \}
6624. ENDNOTE_STRING_UNDERLINE_WEIGHT \\$1
6625. if !'\\$2'' \{\
6626. ds $EN_STRING_UNDERLINE_GAP \\$2
6627. \}
6628. if !'\\$3'' \{\
6629. ds $EN_STRING_RULE_GAP \\$3
6630. \}
6631. \}
6632. if '\\$0'ENDNOTE_STRING_UNDERSCORE' \{\
6633. nr #EN_STRING_UNDERLINE 1
6634. if '\\$1'DOUBLE' \{\
6635. nr #EN_STRING_UNDERLINE 2
6636. shift
6637. \}
6638. ENDNOTE_STRING_UNDERLINE_WEIGHT \\$1
6639. if !'\\$2'' \{\
6640. ds $EN_STRING_UNDERLINE_GAP \\$2
6641. \}
6642. if !'\\$3'' \{\
6643. ds $EN_STRING_RULE_GAP \\$3
6644. \}
6645. \}
6646\# ENDNOTE_TITLE_UNDERLINE and ENDNOTE_TITLE_UNDERSCORE are identical;
6647\# the _UNDERSCORE version is left in for backward compatibility.
6648. if '\\$0'ENDNOTE_TITLE_UNDERLINE' \{\
6649. nr #ENDNOTE_TITLE_UNDERLINE 1
6650. ENDNOTE_TITLE_UNDERLINE_WEIGHT \\$1
6651. ds $EN_TITLE_UNDERLINE_GAP \\$2
6652. \}
6653. if '\\$0'ENDNOTE_TITLE_UNDERSCORE' \{\
6654. nr #ENDNOTE_TITLE_UNDERLINE 1
6655. ENDNOTE_TITLE_UNDERLINE_WEIGHT \\$1
6656. ds $EN_TITLE_UNDERLINE_GAP \\$2
6657. \}
6658. \}
6659. \}
6660. \}
6661.END
6662\#
6663.ALIAS BIBLIOGRAPHY_STRING_UNDERSCORE _UNDERLINE
6664.ALIAS BIBLIOGRAPHY_STRING_UNDERLINE _UNDERLINE
6665.ALIAS COVER_UNDERLINE _UNDERLINE
6666.ALIAS DOC_COVER_UNDERLINE _UNDERLINE
6667.ALIAS DOCTYPE_UNDERLINE _UNDERLINE
6668.ALIAS HEAD_UNDERLINE _UNDERLINE
6669.ALIAS ENDNOTE_STRING_UNDERLINE _UNDERLINE
6670.ALIAS ENDNOTE_STRING_UNDERSCORE _UNDERLINE
6671.ALIAS ENDNOTE_TITLE_UNDERLINE _UNDERLINE
6672.ALIAS ENDNOTE_TITLE_UNDERSCORE _UNDERLINE
6673\#
6674\#
465b256c
JR
6675\# COVERS - WHETHER TO PRINT
6676\# -------------------------
6677\# *Arguments:
6678\# <none> | <anything>
6679\# *Function:
6680\# Creates or removes registers #COVERS and #COVERS_OFF, checked for
6681\# in DEFAULTS (in START) prior to printing
6682\#
6683.MAC COVERS END
6684. ie '\\$0'DOC_COVERS' \{\
6685. ie '\\$1'' \{\
6686. rr #DOC_COVERS_OFF
6687. nr #DOC_COVERS 1
6688. \}
6689. el \{\
6690. rr #DOC_COVERS
6691. nr #DOC_COVERS_OFF 1
92d0a6a6
JR
6692. \}
6693. \}
465b256c
JR
6694. el \{\
6695. ie '\\$1'' \{\
6696. rr #COVERS_OFF
6697. nr #COVERS 1
92d0a6a6
JR
6698. \}
6699. el \{\
465b256c
JR
6700. rr #COVERS
6701. nr #COVERS_OFF 1
6702. \}
6703. \}
6704.END
6705\#
6706\#
4d3e9548
JL
6707\# COVER_COUNTS_PAGES
6708\# ------------------
6709\# *Arguments:
6710\# <none> | <anything>
6711\# *Function:
6712\# Creates or removes registers #COVERS_COUNT or #DOCCOVERS_COUNT,
6713\# used in END_COVER to determine whether to increment the page
6714\# number silently when doc covers or covers are output.
6715\#
6716.MAC COVER_COUNTS_PAGES END
6717. if '\\$0'DOC_COVER_COUNTS_PAGES' \{\
6718. ie '\\$1'' \{ .nr #DOCCOVERS_COUNT 1 \}
6719. el \{ .rr #DOCCOVERS_COUNT \}
6720. return
6721. \}
6722. if '\\$0'COVER_COUNTS_PAGES' \{\
6723. ie '\\$1'' \{ .nr #COVERS_COUNT 1 \}
6724. el \{ .rr #COVERS_COUNT \}
6725. return
6726. \}
6727.END
6728\#
6729\#
465b256c
JR
6730.MAC DO_COVER END
6731. nr #DOING_COVER 1
6732. ev COVER
6733. evc 0
6734. TRAP OFF
6735. if \\n[#PAGINATE]=1 \{\
6736. nr #PAGINATION_WAS_ON 1
6737. rr #PAGINATE
6738. \}
6739. if \\n[#HEADERS_ON]=1 \{\
6740. nr #HEADERS_WERE_ON 1
6741. HEADERS OFF
6742. \}
6743. if \\n[#FOOTERS_ON]=1 \{\
6744. nr #FOOTERS_WERE_ON 1
6745. FOOTERS OFF
6746. \}
6747. if \\n[#COLUMNS]=1 \{\
6748. nr #COLUMNS_WERE_ON 1
6749. rr #COLUMNS
6750. \}
6751.\" Doc cover
6752. ie '\\$0'DO_DOC_COVER' \{\
6753. if !r#DOC_COVER_START_POS \{\
6754. nr #DOC_COVER_START_POS \\n[#PAGE_LENGTH]/3
6755. \}
6756. if \\n[#PRINT_STYLE]=1 \{\
6757. ie \\n[#SINGLE_SPACE]=1 \{ .vs \\n[#DOC_LEAD]u*2u \}
6758. el \{ .vs \\n[#DOC_LEAD]u \}
6759. \}
6760. if \\n[#PRINT_STYLE]=2 \{\
6761. LS \\n[#DOC_LEAD]u\\*[$DOC_COVER_LEAD_ADJ]
6762. nr #DOC_COVER_LEAD \\n[#LEAD]
6763. \}
6764. PRINT \&
6765. sp |\\n[#DOC_COVER_START_POS]u-1v
6766. if \\n[#DOC_COVER_COLOR]=1 \{\
6767. nf
6768\m[\\*[$DOC_COVER_COLOR]]
6769. EOL
6770. \}
6771. CENTER
6772. FAMILY \\*[$DOC_COVER_TITLE_FAM]
6773. FT \\*[$DOC_COVER_TITLE_FT]
6774. PT_SIZE \\*[$DOC_COVER_TITLE_PT_SIZE]
6775. LS \\n[#DOC_COVER_LEAD]u
6776. if \\n[#PRINT_STYLE]=1 \{ .TYPEWRITER \}
6777. if \\n[#DOC_COVER_TITLE]=1 \{\
6778. ie \\n[#PRINT_STYLE]=1 \{\
6779. CAPS
4d3e9548
JL
6780. nr #ARG_NUM 0 1
6781. while \\n[#TITLE_NUM]>=\\n+[#ARG_NUM] \{\
6782. UNDERSCORE "\\*[$TITLE_\\n[#ARG_NUM]]"
6783.\}
465b256c
JR
6784. CAPS OFF
6785. \}
6786. el \{\
4d3e9548
JL
6787. nr #ARG_NUM 0 1
6788. while \\n[#TITLE_NUM]>=\\n+[#ARG_NUM] \{\
465b256c 6789. ie \\n[#DOC_COVER_TITLE_COLOR]=1 \{\
4d3e9548 6790. PRINT "\m[\\*[$DOC_COVER_TITLE_COLOR]]\\*[$TITLE_\\n[#ARG_NUM]]\m[]
92d0a6a6 6791. \}
4d3e9548
JL
6792. el \{\
6793. PRINT "\\*[$TITLE_\\n[#ARG_NUM]]
6794. \}
6795.\}
465b256c
JR
6796. \}
6797. \}
6798. if \\n[#DOC_COVER_TITLE]=2 \{\
6799. ie \\n[#PRINT_STYLE]=1 \{\
6800. CAPS
4d3e9548
JL
6801. nr #ARG_NUM 0 1
6802. while \\n[#DOCTITLE_NUM]>=\\n+[#ARG_NUM] \{\
6803. UNDERSCORE "\\*[$DOC_TITLE_\\n[#ARG_NUM]]"
6804.\}
465b256c 6805. CAPS OFF
92d0a6a6
JR
6806. \}
6807. el \{\
4d3e9548
JL
6808. nr #ARG_NUM 0 1
6809. while \\n[#DOCTITLE_NUM]>=\\n+[#ARG_NUM] \{\
465b256c 6810. ie \\n[#DOC_COVER_TITLE_COLOR]=1 \{\
4d3e9548 6811. PRINT \m[\\*[$DOC_COVER_TITLE_COLOR]]\\*[$DOC_TITLE_\\n[#ARG_NUM]]\m[]
465b256c 6812. \}
4d3e9548
JL
6813. el \{ .PRINT \\*[$DOC_TITLE_\\n[#ARG_NUM]] \}
6814.\}
92d0a6a6
JR
6815. \}
6816. \}
465b256c
JR
6817. if \\n[#DOC_COVER_TITLE]=3 \{\
6818. ie \\n[#PRINT_STYLE]=1 \{\
6819. CAPS
6820. PRINT \\*[$CHAPTER_STRING] \\*[$CHAPTER]
6821. CAPS OFF
92d0a6a6
JR
6822. \}
6823. el \{\
465b256c
JR
6824. ie \\n[#DOC_COVER_TITLE_COLOR]=1 \{\
6825. PRINT \m[\\*[$DOC_COVER_TITLE_COLOR]]\\*[$CHAPTER_STRING] \\*[$CHAPTER]\m[]
6826. \}
6827. el \{ .PRINT \\*[$CHAPTER_STRING] \\*[$CHAPTER] \}
92d0a6a6
JR
6828. \}
6829. \}
465b256c
JR
6830. if \\n[#DOC_COVER_TITLE]=4 \{\
6831. ie \\n[#PRINT_STYLE]=1 \{\
6832. CAPS
4d3e9548
JL
6833. nr #ARG_NUM 0 1
6834. ie \\n[#SINGLE_SPACE]=0 \{\
6835. vs \\n[#DOC_LEAD]u/2u
6836. \}
6837. el \{\
6838. vs \\n[#DOC_LEAD]u
6839. \}
6840. sp
6841. while \\n[#CHAPTER_TITLE_NUM]>=\\n+[#ARG_NUM] \{\
6842. UNDERSCORE "\\*[$CHAPTER_TITLE_\\n[#ARG_NUM]]"
6843.\}
465b256c 6844. CAPS OFF
4d3e9548 6845. if \\n[#SINGLE_SPACE]=0 \{ .vs \\n[#DOC_LEAD]u \}
465b256c
JR
6846. \}
6847. el \{\
4d3e9548
JL
6848. nr #ARG_NUM 0 1
6849. while \\n[#CHAPTER_TITLE_NUM]>=\\n+[#ARG_NUM] \{\
465b256c 6850. ie \\n[#DOC_COVER_TITLE_COLOR]=1 \{\
4d3e9548 6851. PRINT \m[\\*[$DOC_COVER_TITLE_COLOR]]\\*[$CHAPTER_TITLE_\\n[#ARG_NUM]]\m[]
465b256c 6852. \}
4d3e9548
JL
6853. el \{ .PRINT \\*[$CHAPTER_TITLE_\\n[#ARG_NUM]] \}
6854.\}
465b256c
JR
6855. \}
6856. \}
6857. if \\n[#DOC_COVER_TITLE]=5 \{\
6858. ie \\n[#PRINT_STYLE]=1 \{\
6859. CAPS
6860. PRINT \\*[$CHAPTER_STRING] \\*[$CHAPTER]
6861. CAPS OFF
6862. \}
6863. el \{\
6864. ie \\n[#DOC_COVER_TITLE_COLOR]=1 \{\
6865. PRINT \m[\\*[$DOC_COVER_TITLE_COLOR]]\\*[$CHAPTER_STRING] \\*[$CHAPTER]\m[]
6866. \}
6867. el \{ .PRINT \\*[$CHAPTER_STRING] \\*[$CHAPTER] \}
6868. \}
4d3e9548 6869. if !'\\*[$CHAPTER_TITLE_1]'' \{\
465b256c 6870. ie \\n[#PRINT_STYLE]=1 \{\
4d3e9548
JL
6871. ie \\n[#SINGLE_SPACE]=0 \{\
6872. vs \\n[#DOC_LEAD]u/2u
6873. \}
6874. el \{\
6875. vs \\n[#DOC_LEAD]u
6876. \}
6877. sp
6878. nr #ARG_NUM 0 1
6879. while \\n[#CHAPTER_TITLE_NUM]>=\\n+[#ARG_NUM] \{\
6880. UNDERSCORE "\\*[$CHAPTER_TITLE_\\n[#ARG_NUM]]"
6881.\}
6882. if \\n[#SINGLE_SPACE]=0 \{ .vs \\n[#DOC_LEAD]u \}
465b256c
JR
6883. \}
6884. el \{\
6885. FAMILY \\*[$DOC_COVER_CHAPTER_TITLE_FAM]
6886. FT \\*[$DOC_COVER_CHAPTER_TITLE_FT]
6887. PT_SIZE \\*[$DOC_COVER_CHAPTER_TITLE_PT_SIZE]
4d3e9548
JL
6888. nr #ARG_NUM 0 1
6889. ALD \\n[.v]u/4u \"Put a little space before the chapter title
6890. while \\n[#CHAPTER_TITLE_NUM]>=\\n+[#ARG_NUM] \{\
6891. ie \\n[#DOC_COVER_TITLE_COLOR]=1 \{\
6892. PRINT \m[\\*[$DOC_COVER_TITLE_COLOR]]\\*[$CHAPTER_TITLE_\\n[#ARG_NUM]]\m[]
6893. \}
6894. el \{ .PRINT \\*[$CHAPTER_TITLE_\\n[#ARG_NUM]] \}
6895.\}
465b256c
JR
6896. \}
6897. \}
6898. \}
6899. if \\n[#DOC_COVER_TITLE]=6 \{\
6900. ie \\n[#PRINT_STYLE]=1 \{\
6901. CAPS
4d3e9548
JL
6902. nr #ARG_NUM 0 1
6903. while \\n[#DOC_COVER_TITLE_NUM]>=\\n+[#ARG_NUM] \{\
6904. UNDERSCORE "\\*[$DOC_COVER_TITLE_\\n[#ARG_NUM]]"
6905.\}
465b256c
JR
6906. CAPS OFF
6907. \}
6908. el \{\
4d3e9548
JL
6909. nr #ARG_NUM 0 1
6910. while \\n[#DOC_COVER_TITLE_NUM]>=\\n+[#ARG_NUM] \{\
465b256c 6911. ie \\n[#DOC_COVER_TITLE_COLOR]=1 \{\
4d3e9548 6912. PRINT \m[\\*[$DOC_COVER_TITLE_COLOR]]\\*[$DOC_COVER_TITLE_\\n[#ARG_NUM]]\m[]
465b256c 6913. \}
4d3e9548
JL
6914. el \{ .PRINT \\*[$DOC_COVER_TITLE_\\n[#ARG_NUM]] \}
6915.\}
465b256c
JR
6916. \}
6917. \}
4d3e9548
JL
6918. if !\\n[#DOC_TYPE]=2 \{\
6919. if \\n[#DOC_COVER_SUBTITLE]=1 \{\
6920. FAMILY \\*[$DOC_COVER_SUBTITLE_FAM]
6921. FT \\*[$DOC_COVER_SUBTITLE_FT]
6922. PT_SIZE \\*[$DOC_COVER_SUBTITLE_PT_SIZE]
6923. if \\n[#PRINT_STYLE]=1 \{\
6924. TYPEWRITER
6925. ie \\n[#SINGLE_SPACE]=0 \{ .vs \\n[#DOC_LEAD]u/2u \}
6926. el \{ .vs \\n[#DOC_LEAD]u \}
6927. sp
6928. \}
6929. if \\n[#DOC_COVER]=1 \{\
6930. ie !'\\*[$SUBTITLE_DOCCOVER_1]'' \{\
6931. nr #SUBTITLES \\n[#SUBTITLE_DOCCOVER_NUM]
6932. nr #NEXT_SUBTITLE 0 1
6933. while \\n[#SUBTITLES]>\\n[#NEXT_SUBTITLE] \{\
6934. ie \\n[#DOC_COVER_SUBTITLE_COLOR]=1 \{\
6935. PRINT \m[\\*[$DOC_COVER_SUBTITLE_COLOR]]\\*[$SUBTITLE_DOCCOVER_\\n+[#NEXT_SUBTITLE]]\m[]
6936. \}
6937. el \{ .PRINT \\*[$SUBTITLE_DOCCOVER_\\n+[#NEXT_SUBTITLE]] \}
6938.\}
6939. \}
6940. el \{\
6941. nr #SUBTITLES \\n[#SUBTITLE_NUM]
6942. nr #NEXT_SUBTITLE 0 1
6943. while \\n[#SUBTITLES]>\\n[#NEXT_SUBTITLE] \{\
6944. ie \\n[#DOC_COVER_SUBTITLE_COLOR]=1 \{\
6945. PRINT \m[\\*[$DOC_COVER_SUBTITLE_COLOR]]\\*[$SUBTITLE_\\n+[#NEXT_SUBTITLE]]\m[]
6946. \}
6947. el \{ .PRINT \\*[$SUBTITLE_\\n+[#NEXT_SUBTITLE]] \}
6948.\}
465b256c 6949. \}
465b256c 6950. \}
4d3e9548
JL
6951. if \\n[#PRINT_STYLE]=1 \{\
6952. if \\n[#SINGLE_SPACE]=0 \{ .vs \}
6953. \}
6954. \}
6955. if \\n[#PRINT_STYLE]=1 \{\
6956. if !r#DOC_COVER_SUBTITLE \{ .sp \}
6957. \}
465b256c
JR
6958. \}
6959. if \\n[#DOC_COVER_AUTHOR]=1 \{\
6960. FAMILY \\*[$DOC_COVER_AUTHOR_FAM]
6961. FT \\*[$DOC_COVER_AUTHOR_FT]
6962. PT_SIZE \\*[$DOC_COVER_AUTHOR_PT_SIZE]
6963. if \\n[#PRINT_STYLE]=1 \{\
6964. TYPEWRITER
4d3e9548
JL
6965. ie \\n[#SINGLE_SPACE]=1 \{ .vs \\n[#DOC_LEAD]u \}
6966. el \{ .vs \\n[#DOC_LEAD]u/2u \}
6967. sp
465b256c 6968. \}
4d3e9548 6969. ie d$ATTRIBUTE_STRING_DOCCOVER \{\
465b256c 6970. ie \\n[#DOC_COVER_ATTRIBUTE_COLOR]=1 \{\
4d3e9548
JL
6971. PRINT \&\m[\\*[$DOC_COVER_ATTRIBUTE_COLOR]]\\*[$ATTRIBUTE_STRING_DOCCOVER]\m[]
6972. \}
6973. el \{ .PRINT \&\\*[$ATTRIBUTE_STRING_DOCCOVER] \}
6974. \}
6975. el \{\
6976. if d$ATTRIBUTE_STRING \{\
6977. ie \\n[#DOC_COVER_ATTRIBUTE_COLOR]=1 \{\
6978. PRINT \&\m[\\*[$DOC_COVER_ATTRIBUTE_COLOR]]\\*[$ATTRIBUTE_STRING]\m[]
6979. \}
6980. el \{ .PRINT \&\\*[$ATTRIBUTE_STRING] \}
465b256c 6981. \}
465b256c
JR
6982. \}
6983. PRINT_AUTHORS
6984. \}
6985. FAMILY \\*[$DOC_COVER_DOCTYPE_FAM]
6986. FT \\*[$DOC_COVER_DOCTYPE_FT]
6987. PT_SIZE \\*[$DOC_COVER_DOCTYPE_PT_SIZE]
6988. SP
4d3e9548
JL
6989. if \\n[#DOC_TYPE]=3 \{\
6990. if \\n[#DOC_COVER_DOCTYPE]=1 \{\
6991. ie \\n[#PRINT_STYLE]=1 \{\
6992. TYPEWRITER
6993. vs \\n[#DOC_LEAD]u
6994. UNDERSCORE2 "\\*[$DOC_TYPE]"
6995. \}
6996. el \{\
6997. nr #FROM_DOC_COVER 1
6998. ie \\n[#DOC_COVER_DOCTYPE_COLOR]=1 \{\
6999. COLOR \\*[$DOC_COVER_DOCTYPE_COLOR]
7000. ie \\n[#DOCCOVER_UNDERLINE]= 1 \{ .UNDERSCORE \\*[$DOCCOVER_UNDERLINE_GAP] "\\*[$DOC_TYPE]" \}
7001. el \{ .PRINT "\\*[$DOC_TYPE]" \}
7002. \}
7003. el \{\
7004. ie \\n[#DOCCOVER_UNDERLINE]=1 \{ .UNDERSCORE \\*[$DOCCOVER_UNDERLINE_GAP] "\\*[$DOC_TYPE]" \}
7005. el \{ .PRINT "\\*[$DOC_TYPE]" \}
7006. \}
7007. rr #FROM_DOC_COVER
465b256c 7008. \}
465b256c
JR
7009. \}
7010. \}
7011. sp |\\n[#VISUAL_B_MARGIN]u+\\n[#DOC_LEAD]u
7012. ie \\n[#PRINT_STYLE]=1 \{\
7013. TYPEWRITER
7014. ie \\n[#SINGLE_SPACE]=1 \{ .vs \\n[#DOC_LEAD]u \}
7015. el \{ .vs \\n[#DOC_LEAD]u/2u \}
7016. \}
7017. el \{\
7018. FAMILY \\*[$DOC_COVER_COPYRIGHT_FAM]
7019. FT \\*[$DOC_COVER_COPYRIGHT_FT]
7020. AUTOLEAD 2
7021. PT_SIZE \\*[$DOC_COVER_COPYRIGHT_PT_SIZE]
7022. \}
7023. if \\n[#DOC_COVER_COPYRIGHT]=1 \{\
4d3e9548
JL
7024. if !'\\*[$COPYRIGHT_DOCCOVER]'' \{\
7025. ds $SAVED_COPYRIGHT \\*[$COPYRIGHT]
7026. ds $COPYRIGHT \\*[$COPYRIGHT_DOCCOVER]
7027. \}
465b256c
JR
7028. QUAD \\*[$DOC_COVER_COPYRIGHT_QUAD]
7029. ie \\n[#DOC_COVER_COPYRIGHT_COLOR]=1 \{\
7030. PRINT \m[\\*[$DOC_COVER_COPYRIGHT_COLOR]]\\*[$COPYRIGHT]\m[]
7031. \}
7032. el \{ .PRINT \\*[$COPYRIGHT] \}
4d3e9548 7033. ds $COPYRIGHT \\*[$SAVED_COPYRIGHT]
465b256c
JR
7034. \}
7035. sp |\\n[#VISUAL_B_MARGIN]u+\\n[#DOC_LEAD]u
7036. if \\n[#DOC_COVER_MISC]=1 \{\
7037. QUAD \\*[$DOC_COVER_MISC_QUAD]
4d3e9548
JL
7038. ie !'\\*[$MISC_DOCCOVER_1]'' \{\
7039. nr #MISCS \\n[#MISC_DOCCOVER_NUM]
7040. sp -\\n[#MISCS]+1
7041. nr #NEXT_MISC 0 1
7042. while \\n[#MISCS]>\\n[#NEXT_MISC] \{\
7043. ie \\n[#DOC_COVER_MISC_COLOR]=1 \{\
7044. PRINT \m[\\*[$DOC_COVER_MISC_COLOR]]\\*[$MISC_DOCCOVER_\\n+[#NEXT_MISC]]\m[]
7045. rm $MISC_DOCCOVER_\\n[#NEXT_MISC]
7046. rm $MISC_\\n[#NEXT_MISC]
7047. br
7048. \}
7049. el \{\
7050. PRINT \\*[$MISC_DOCCOVER_\\n+[#NEXT_MISC]]
7051. rm $MISC_DOCCOVER_\\n[#NEXT_MISC]
7052. rm $MISC_\\n[#NEXT_MISC]
7053. br
7054. \}
465b256c 7055.\}
4d3e9548
JL
7056. rm $MISC_\\n+[#NEXT_MISC]
7057. \}
7058. el \{\
7059. nr #MISCS \\n[#MISC_NUM]
7060. sp -\\n[#MISCS]+1
7061. nr #NEXT_MISC 0 1
7062. while \\n[#MISCS]>\\n[#NEXT_MISC] \{\
7063. ie \\n[#DOC_COVER_MISC_COLOR]=1 \{\
7064. PRINT \m[\\*[$DOC_COVER_MISC_COLOR]]\\*[$MISC_\\n+[#NEXT_MISC]]\m[]
7065. br
7066. \}
7067. el \{\
7068. PRINT \\*[$MISC_\\n+[#NEXT_MISC]]
7069. br
7070. \}
7071.\}
7072. \}
465b256c 7073. \}
4d3e9548
JL
7074. if \\n[#DOCCOVERS_COUNT]=1 \{ .nr #PAGE_NUM_ADJ +1 \}
7075. nr #DOCCOVER_END 1
7076. END_COVER
465b256c
JR
7077. \}
7078.\" Cover
7079. el \{\
7080. if !r#COVER_START_POS \{\
7081. nr #COVER_START_POS \\n[#PAGE_LENGTH]/3
7082. \}
7083. if \\n[#PRINT_STYLE]=1 \{\
7084. ie \\n[#SINGLE_SPACE]=1 \{ .vs \\n[#DOC_LEAD]u*2u \}
7085. el \{ .vs \\n[#DOC_LEAD]u \}
7086. \}
7087. if \\n[#PRINT_STYLE]=2 \{\
7088. LS \\n[#DOC_LEAD]u\\*[$COVER_LEAD_ADJ]
7089. nr #COVER_LEAD \\n[#LEAD]
7090. \}
7091. PRINT \&
7092. sp |\\n[#COVER_START_POS]u-1v
7093. if \\n[#COVER_COLOR]=1 \{\
7094. nf
7095\m[\\*[$COVER_COLOR]]
7096. EOL
7097. \}
7098. CENTER
7099. FAMILY \\*[$COVER_TITLE_FAM]
7100. FT \\*[$COVER_TITLE_FT]
7101. PT_SIZE \\*[$COVER_TITLE_PT_SIZE]
7102. LS \\n[#COVER_LEAD]u
7103. if \\n[#PRINT_STYLE]=1 \{ .TYPEWRITER \}
7104. if \\n[#COVER_TITLE]=1 \{\
7105. ie \\n[#PRINT_STYLE]=1 \{\
7106. CAPS
4d3e9548
JL
7107. nr #ARG_NUM 0 1
7108. while \\n[#TITLE_NUM]>=\\n+[#ARG_NUM] \{\
7109. UNDERSCORE "\\*[$TITLE_\\n[#ARG_NUM]]"
7110.\}
465b256c
JR
7111. CAPS OFF
7112. \}
7113. el \{\
4d3e9548
JL
7114. nr #ARG_NUM 0 1
7115. while \\n[#TITLE_NUM]>=\\n+[#ARG_NUM] \{\
465b256c 7116. ie \\n[#COVER_TITLE_COLOR]=1 \{\
4d3e9548
JL
7117. PRINT "\m[\\*[$COVER_TITLE_COLOR]]\\*[$TITLE_\\n[#ARG_NUM]]\m[]
7118. \}
7119. el \{\
7120. PRINT "\\*[$TITLE_\\n[#ARG_NUM]]
465b256c 7121. \}
4d3e9548 7122.\}
465b256c
JR
7123. \}
7124. \}
7125. if \\n[#COVER_TITLE]=2 \{\
7126. ie \\n[#PRINT_STYLE]=1 \{\
7127. CAPS
4d3e9548
JL
7128. nr #ARG_NUM 0 1
7129. while \\n[#DOCTITLE_NUM]>=\\n+[#ARG_NUM] \{\
7130. UNDERSCORE "\\*[$DOC_TITLE_\\n[#ARG_NUM]]"
7131.\}
465b256c
JR
7132. CAPS OFF
7133. \}
7134. el \{\
4d3e9548
JL
7135. nr #ARG_NUM 0 1
7136. while \\n[#DOCTITLE_NUM]>=\\n+[#ARG_NUM] \{\
7137. ie \\n[#DOC_COVER_TITLE_COLOR]=1 \{\
7138. PRINT \m[\\*[$DOC_COVER_TITLE_COLOR]]\\*[$DOC_TITLE_\\n[#ARG_NUM]]\m[]
465b256c 7139. \}
4d3e9548
JL
7140. el \{ .PRINT \\*[$DOC_TITLE_\\n[#ARG_NUM]] \}
7141.\}
465b256c
JR
7142. \}
7143. \}
7144. if \\n[#COVER_TITLE]=3 \{\
7145. ie \\n[#PRINT_STYLE]=1 \{\
7146. CAPS
7147. PRINT \\*[$CHAPTER_STRING] \\*[$CHAPTER]
7148. CAPS OFF
7149. \}
7150. el \{\
7151. ie \\n[#COVER_TITLE_COLOR]=1 \{\
7152. PRINT \m[\\*[$COVER_TITLE_COLOR]]\\*[$CHAPTER_STRING] \\*[$CHAPTER]\m[]
7153. \}
7154. el \{ .PRINT \\*[$CHAPTER_STRING] \\*[$CHAPTER] \}
7155. \}
7156. \}
7157. if \\n[#COVER_TITLE]=4 \{\
7158. ie \\n[#PRINT_STYLE]=1 \{\
4d3e9548
JL
7159. ie \\n[#SINGLE_SPACE]=0 \{\
7160. vs \\n[#DOC_LEAD]u/2u
7161. \}
7162. el \{\
7163. vs \\n[#DOC_LEAD]u
7164. \}
7165. sp
465b256c 7166. CAPS
4d3e9548
JL
7167. nr #ARG_NUM 0 1
7168. while \\n[#CHAPTER_TITLE_NUM]>=\\n+[#ARG_NUM] \{\
7169. UNDERSCORE "\\*[$CHAPTER_TITLE_\\n[#ARG_NUM]]"
7170.\}
465b256c 7171. CAPS OFF
4d3e9548 7172. if \\n[#SINGLE_SPACE]=0 \{ .vs \\n[#DOC_LEAD]u \}
465b256c
JR
7173. \}
7174. el \{\
4d3e9548
JL
7175. nr #ARG_NUM 0 1
7176. while \\n[#CHAPTER_TITLE_NUM]>=\\n+[#ARG_NUM] \{\
7177. ie \\n[#DOC_COVER_TITLE_COLOR]=1 \{\
7178. PRINT \m[\\*[$DOC_COVER_TITLE_COLOR]]\\*[$CHAPTER_TITLE_\\n[#ARG_NUM]]\m[]
465b256c 7179. \}
4d3e9548
JL
7180. el \{ .PRINT \\*[$CHAPTER_TITLE_\\n[#ARG_NUM]] \}
7181.\}
465b256c
JR
7182. \}
7183. \}
7184. if \\n[#COVER_TITLE]=5 \{\
7185. ie \\n[#PRINT_STYLE]=1 \{\
7186. CAPS
7187. PRINT \\*[$CHAPTER_STRING] \\*[$CHAPTER]
7188. CAPS OFF
7189. \}
7190. el \{\
7191. ie \\n[#COVER_TITLE_COLOR]=1 \{\
7192. PRINT \m[\\*[$COVER_TITLE_COLOR]]\\*[$CHAPTER_STRING] \\*[$CHAPTER]\m[]
7193. \}
7194. el \{ .PRINT \\*[$CHAPTER_STRING] \\*[$CHAPTER] \}
7195. \}
4d3e9548 7196. if !'\\*[$CHAPTER_TITLE_1]'' \{\
465b256c 7197. ie \\n[#PRINT_STYLE]=1 \{\
4d3e9548
JL
7198. ie \\n[#SINGLE_SPACE]=0 \{\
7199. vs \\n[#DOC_LEAD]u/2u
7200. \}
7201. el \{\
7202. vs \\n[#DOC_LEAD]u
7203. \}
7204. sp
7205. nr #ARG_NUM 0 1
7206. while \\n[#CHAPTER_TITLE_NUM]>=\\n+[#ARG_NUM] \{\
7207. UNDERSCORE "\\*[$CHAPTER_TITLE_\\n[#ARG_NUM]]"
7208.\}
7209. if \\n[#SINGLE_SPACE]=0 \{ .vs \\n[#DOC_LEAD]u \}
465b256c
JR
7210. \}
7211. el \{\
7212. FAMILY \\*[$COVER_CHAPTER_TITLE_FAM]
7213. FT \\*[$COVER_CHAPTER_TITLE_FT]
7214. PT_SIZE \\*[$COVER_CHAPTER_TITLE_PT_SIZE]
4d3e9548
JL
7215. ALD \\n[.v]u/4u \"Put a little space before the chapter title
7216. nr #ARG_NUM 0 1
7217. while \\n[#CHAPTER_TITLE_NUM]>=\\n+[#ARG_NUM] \{\
7218. ie \\n[#DOC_COVER_TITLE_COLOR]=1 \{\
7219. PRINT \m[\\*[$DOC_COVER_TITLE_COLOR]]\\*[$CHAPTER_TITLE_\\n[#ARG_NUM]]\m[]
7220. \}
7221. el \{ .PRINT \\*[$CHAPTER_TITLE_\\n[#ARG_NUM]] \}
7222.\}
465b256c
JR
7223. \}
7224. \}
7225. \}
7226. if \\n[#COVER_TITLE]=6 \{\
7227. ie \\n[#PRINT_STYLE]=1 \{\
7228. CAPS
4d3e9548
JL
7229. nr #ARG_NUM 0 1
7230. while \\n[#COVER_TITLE_NUM]>=\\n+[#ARG_NUM] \{\
7231. UNDERSCORE "\\*[$COVER_TITLE_\\n[#ARG_NUM]]"
7232.\}
465b256c
JR
7233. CAPS OFF
7234. \}
7235. el \{\
4d3e9548
JL
7236. nr #ARG_NUM 0 1
7237. while \\n[#COVER_TITLE_NUM]>=\\n+[#ARG_NUM] \{\
465b256c 7238. ie \\n[#COVER_TITLE_COLOR]=1 \{\
4d3e9548 7239. PRINT \m[\\*[$COVER_TITLE_COLOR]]\\*[$COVER_TITLE_\\n[#ARG_NUM]]\m[]
465b256c 7240. \}
4d3e9548
JL
7241. el \{ .PRINT \\*[$COVER_TITLE_\\n[#ARG_NUM]] \}
7242.\}
465b256c
JR
7243. \}
7244. \}
4d3e9548
JL
7245. if !\\n[#DOC_TYPE]=2 \{\
7246. if \\n[#COVER_SUBTITLE]=1 \{\
7247. FAMILY \\*[$COVER_SUBTITLE_FAM]
7248. FT \\*[$COVER_SUBTITLE_FT]
7249. PT_SIZE \\*[$COVER_SUBTITLE_PT_SIZE]
7250. if \\n[#PRINT_STYLE]=1 \{\
7251. TYPEWRITER
7252. if \\n[#PRINT_STYLE]=1 \{\
7253. TYPEWRITER
7254. ie \\n[#SINGLE_SPACE]=0 \{ .vs \\n[#DOC_LEAD]u/2u \}
7255. el \{ .vs \\n[#DOC_LEAD]u \}
7256. sp
7257. \}
7258. \}
7259. if \\n[#COVER]=1 \{\
7260. ie !'\\*[$SUBTITLE_COVER_1]'' \{\
7261. nr #SUBTITLES \\n[#SUBTITLE_COVER_NUM]
7262. nr #NEXT_SUBTITLE 0 1
7263. while \\n[#SUBTITLES]>\\n[#NEXT_SUBTITLE] \{\
7264. ie \\n[#COVER_SUBTITLE_COLOR]=1 \{\
7265. PRINT \m[\\*[$COVER_SUBTITLE_COLOR]]\\*[$SUBTITLE_COVER_\\n+[#NEXT_SUBTITLE]]\m[]
7266. \}
7267. el \{ .PRINT \\*[$SUBTITLE_COVER_\\n+[#NEXT_SUBTITLE]] \}
7268.\}
7269. \}
7270. el \{\
7271. nr #SUBTITLES \\n[#SUBTITLE_NUM]
7272. nr #NEXT_SUBTITLE 0 1
7273. while \\n[#SUBTITLES]>\\n[#NEXT_SUBTITLE] \{\
7274. ie \\n[#COVER_SUBTITLE_COLOR]=1 \{\
7275. PRINT \m[\\*[$COVER_SUBTITLE_COLOR]]\\*[$SUBTITLE_\\n+[#NEXT_SUBTITLE]]\m[]
7276. \}
7277. el \{ .PRINT \\*[$SUBTITLE_\\n+[#NEXT_SUBTITLE]] \}
7278.\}
465b256c 7279. \}
465b256c 7280. \}
4d3e9548
JL
7281. if \\n[#PRINT_STYLE]=1 \{\
7282. if \\n[#SINGLE_SPACE]=0 \{ .vs \}
7283. \}
7284. \}
7285. if \\n[#PRINT_STYLE]=1 \{\
7286. if !r#COVER_SUBTITLE \{ .sp \}
7287. \}
465b256c
JR
7288. \}
7289. if \\n[#COVER_AUTHOR]=1 \{\
7290. FAMILY \\*[$COVER_AUTHOR_FAM]
7291. FT \\*[$COVER_AUTHOR_FT]
7292. PT_SIZE \\*[$COVER_AUTHOR_PT_SIZE]
7293. if \\n[#PRINT_STYLE]=1 \{\
7294. TYPEWRITER
4d3e9548
JL
7295. ie \\n[#SINGLE_SPACE]=1 \{ .vs \\n[#DOC_LEAD]u \}
7296. el \{ .vs \\n[#DOC_LEAD]u/2u \}
7297. sp
465b256c 7298. \}
4d3e9548 7299. ie d$ATTRIBUTE_STRING_COVER \{\
465b256c 7300. ie \\n[#COVER_ATTRIBUTE_COLOR]=1 \{\
4d3e9548
JL
7301. PRINT \&\m[\\*[$COVER_ATTRIBUTE_COLOR]]\\*[$ATTRIBUTE_STRING_COVER]\m[]
7302. \}
7303. el \{ .PRINT \&\\*[$ATTRIBUTE_STRING_COVER] \}
7304. \}
7305. el \{\
7306. if d$ATTRIBUTE_STRING \{\